Skip to content

Commit a8332ee

Browse files
authored
Merge branch 'v2-dev' into feat/DX-9314
2 parents 56bc1ae + 5326571 commit a8332ee

192 files changed

Lines changed: 2452 additions & 8185 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/lint.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Lint
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
jobs:
8+
lint:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: pnpm/action-setup@v4
13+
with:
14+
version: 10.28.0
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: '22.x'
18+
cache: 'pnpm'
19+
- run: pnpm install --no-frozen-lockfile
20+
- run: pnpm -r --sort --workspace-concurrency=1 run build
21+
- run: pnpm run lint

.github/workflows/tsgen-integration-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
run: csdx plugins:link
4343

4444
- name: Run integration tests
45-
run: pnpm --filter contentstack-cli-tsgen run test
45+
run: pnpm --filter contentstack-cli-tsgen run test:integration
4646
env:
4747
TOKEN_ALIAS: ${{ secrets.TOKEN_ALIAS }}
4848

.github/workflows/unit-test.yml

Lines changed: 9 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -22,80 +22,16 @@ jobs:
2222
node-version: '22.x'
2323
cache: 'pnpm' # optional but recommended
2424

25-
- name: Prune pnpm store
26-
run: pnpm store prune
2725
- name: Install Dependencies
2826
run: pnpm install --no-frozen-lockfile
2927

3028
- name: Build all plugins
31-
run: |
32-
NODE_ENV=PREPACK_MODE pnpm -r --sort run build
33-
34-
- name: Run tests for Contentstack Import Plugin
35-
working-directory: ./packages/contentstack-import
36-
run: npm run test:unit
37-
38-
- name: Run tests for Contentstack Export Plugin
39-
working-directory: ./packages/contentstack-export
40-
run: npm run test:unit
41-
42-
- name: Run tests for Audit plugin
43-
working-directory: ./packages/contentstack-audit
44-
run: npm run test:unit
45-
46-
- name: Run tests for Contentstack Migration
47-
working-directory: ./packages/contentstack-migration
48-
run: npm run test
49-
50-
- name: Run tests for Contentstack Export To CSV
51-
working-directory: ./packages/contentstack-export-to-csv
52-
run: npm run test:unit
53-
54-
- name: Run tests for Contentstack Bootstrap
55-
working-directory: ./packages/contentstack-bootstrap
56-
run: npm run test
57-
58-
- name: Run tests for Contentstack Branches
59-
working-directory: ./packages/contentstack-branches
60-
run: npm run test:unit
61-
62-
- name: Run tests for Contentstack Query Export
63-
working-directory: ./packages/contentstack-query-export
64-
run: npm run test:unit
65-
66-
- name: Run tests for Contentstack Apps CLI
67-
working-directory: ./packages/contentstack-apps-cli
68-
run: npm run test:unit:report
69-
70-
- name: Run tests for Contentstack Content Type plugin
71-
working-directory: ./packages/contentstack-content-type
72-
run: npm run test:unit
73-
74-
- name: Run tests for Contentstack Regex Validate plugin
75-
working-directory: ./packages/contentstack-cli-cm-regex-validate
76-
run: npm run test:unit
77-
78-
- name: Run tests for Contentstack Migrate RTE
79-
working-directory: ./packages/contentstack-migrate-rte
80-
run: npm test
81-
82-
- name: Run tests for Contentstack Bulk Operations
83-
working-directory: ./packages/contentstack-bulk-operations
84-
run: npm test
85-
86-
- name: Run tests for Contentstack Variants
87-
working-directory: ./packages/contentstack-variants
88-
run: npm run test
89-
90-
- name: Run tests for Contentstack Asset Management
91-
working-directory: ./packages/contentstack-asset-management
92-
run: npm run test:unit
93-
94-
- name: Run tests for Contentstack Clone
95-
working-directory: ./packages/contentstack-clone
96-
run: npm run test:unit
97-
98-
# - name: Run tests for Contentstack External Migrate
99-
# working-directory: ./packages/contentstack-external-migrate
100-
# run: npm test
101-
29+
run: NODE_ENV=PREPACK_MODE pnpm -r --sort run build
30+
31+
# Single run over every plugin's `test` (unit) script. --no-bail runs all packages even
32+
# when one fails, and pnpm prints a per-package summary at the end, so failures are still
33+
# easy to locate in the one log. --workspace-concurrency=1 keeps the output sequential and
34+
# readable. Integration suites live under a separate `test:integration` script and do not
35+
# run here; the tsgen integration suite has its own workflow (tsgen-integration-test.yml).
36+
- name: Run unit tests for all plugins
37+
run: pnpm -r --no-bail --workspace-concurrency=1 --filter './packages/*' run test

.talismanrc

Lines changed: 41 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,42 @@
11
fileignoreconfig:
2-
- filename: pnpm-lock.yaml
3-
checksum: e6eecc09255df3dcb320328998d5faef14f2d1e18f561d4b9efcd8ed599476b9
4-
- filename: packages/contentstack-bulk-operations/src/messages/index.ts
5-
checksum: 07c2bf3f3130ad5e8b6a2971d76139e9b643c70a9ff5f7450adfb5c9bf3d7164
6-
- filename: packages/contentstack-bulk-operations/src/utils/operation-flag-matrix.ts
7-
checksum: 99a3c3eb422a17f73f4c8f15088004fa4c95df3545bdf510310c1f3a20e4c2c2
8-
- filename: packages/contentstack-bulk-operations/src/base-bulk-command.ts
9-
checksum: cb1147ac666b607a093c4c827d143d0bd2de5b6e9d59973f1b7052451e82a89b
10-
- filename: packages/contentstack-bulk-operations/src/commands/cm/stacks/bulk-assets.ts
11-
checksum: 8bca423db4c3815c651ad922d986a53b6271cce3ea27f5987b66ee594151165e
12-
- filename: packages/contentstack-bulk-operations/test/unit/commands/bulk-assets-init.test.ts
13-
checksum: 590b1cfe42d46d0917ac90f363b1ccd05200b180bd9c58c770ffd1f12eb18327
14-
- filename: packages/contentstack-bulk-operations/test/unit/utils/operation-flag-matrix.test.ts
15-
checksum: 35451ca4c03359b06531a8461091f4a3a45c4dea1f8853081fb53e4ce28c1cc3
16-
- filename: packages/contentstack-bulk-operations/test/unit/base-bulk-command.test.ts
17-
checksum: ca699a9d73757d44ded4d9d27beb4f460f911a7c88a14551a9402a3ac0c69873
18-
- filename: packages/contentstack-export/src/utils/export-config-handler.ts
19-
checksum: 7e9807759211ce97c041462fa12fd77e76e6003d5ff5774d2107d5ae9cec1705
20-
version: ""
2+
- filename: pnpm-lock.yaml
3+
checksum: f149ffa2864c1e5aa5b3f3363ea0d690e288168167d103775cb1f61be81151d5
4+
- filename: packages/contentstack-branches/test/unit/helpers/stub-auth.ts
5+
checksum: 8cafd5994d3ec13ba9af74c80b330bfd14721ea4e0359b456598964a6c2913ce
6+
- filename: packages/contentstack-export/src/config/index.ts
7+
checksum: 0219426b1873decef4d74bef5bfd50d1ed8f2567a2136122d869e4e53e4b4b99
8+
- filename: packages/contentstack-clone/README.md
9+
checksum: fad666bf6290c980406ddd18caec2dd89d9c7a22b422010865199659956ab523
10+
- filename: packages/contentstack-migration/README.md
11+
checksum: ceb7631888ee81711a32e2ac07762957bbf0f9c6c7f3f6bbc5d86326bd4352cc
12+
- filename: packages/contentstack-external-migrate/test/commands/migrate/import.test.ts
13+
checksum: 1d955eb34ab7e7e11cfad35cdbcb00692e39568bc690f46089fcbc0ca22a4852
14+
- filename: packages/contentstack-external-migrate/test/adapters/contentful/export.test.ts
15+
checksum: 118cc140edf3b68191d1ef770c4142f9f5aa7af87a5a1832d6b3edee53d61c83
16+
- filename: packages/contentstack-cli-tsgen/test/unit/helper.test.ts
17+
checksum: 146ff2a85a8f5ec463e51821f54c5f08143fa04209541a51017270e83b6ed46d
18+
- filename: packages/contentstack-cli-cm-regex-validate/test/utils/connect-stack.test.ts
19+
checksum: 018980aa2b919967b9ef9ab1bdf635d4867fe21593fba5890afa443f440228ff
20+
- filename: packages/contentstack-bulk-operations/src/messages/index.ts
21+
checksum: 07c2bf3f3130ad5e8b6a2971d76139e9b643c70a9ff5f7450adfb5c9bf3d7164
22+
- filename: packages/contentstack-bulk-operations/src/utils/operation-flag-matrix.ts
23+
checksum: 99a3c3eb422a17f73f4c8f15088004fa4c95df3545bdf510310c1f3a20e4c2c2
24+
- filename: packages/contentstack-bulk-operations/src/base-bulk-command.ts
25+
checksum: cb1147ac666b607a093c4c827d143d0bd2de5b6e9d59973f1b7052451e82a89b
26+
- filename: packages/contentstack-bulk-operations/src/commands/cm/stacks/bulk-assets.ts
27+
checksum: 8bca423db4c3815c651ad922d986a53b6271cce3ea27f5987b66ee594151165e
28+
- filename: packages/contentstack-bulk-operations/test/unit/commands/bulk-assets-init.test.ts
29+
checksum: 590b1cfe42d46d0917ac90f363b1ccd05200b180bd9c58c770ffd1f12eb18327
30+
- filename: packages/contentstack-bulk-operations/test/unit/utils/operation-flag-matrix.test.ts
31+
checksum: 35451ca4c03359b06531a8461091f4a3a45c4dea1f8853081fb53e4ce28c1cc3
32+
- filename: packages/contentstack-bulk-operations/test/unit/base-bulk-command.test.ts
33+
checksum: ca699a9d73757d44ded4d9d27beb4f460f911a7c88a14551a9402a3ac0c69873
34+
- filename: packages/contentstack-external-migrate/src/lib/create-stack.ts
35+
checksum: 68a9510db6f2746ac5006c091d276c1ba619a9e15c76a3edae3967e4f9c2dd4e
36+
- filename: packages/contentstack-external-migrate/test/lib/create-stack.test.ts
37+
checksum: 2dcbc359ee275e59e0536f3c325416eac8c43eb341b04da0d3757f5b5e556d9c
38+
- filename: CHANGELOG.md
39+
checksum: 88c7e1dee308fa4ae25e7815ead0842b1aac7ed669b02859cc8b25cba879595d
40+
- filename: packages/contentstack-bulk-operations/test/unit/services/taxonomy-service.test.ts
41+
checksum: abc5ac707341760cf59d5b8b1c4e13cf2c79955e2735c33e2db3ec6bc48eddb6
42+
version: '1.0'

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ Please refer to the Contentstack Command-line Interface release notes [here](htt
55

66

77

8+
## @contentstack/cli-bulk-operations
9+
### Version: 2.0.0-beta.5
10+
#### Date: Jul-21-2025
11+
##### Breaking Change:
12+
- Removed the api version flag from `cm:stacks:bulk-entries`. The NRP header value is now hardcoded at the SDK call site, so the flag is no longer needed. Any scripts or CI pipelines that pass this flag must remove it — it will cause an unrecognized-flag error after this release.
13+
##### Fix:
14+
- Force NRP header to version 3.2 on all entry and asset publish/unpublish requests. The header is injected per-call and does not affect other CMA requests.
15+
816
#### Date: Feb-09-2025
917
## cli
1018
- Refactor Endpoints Integration using Utils SDK in cli-cm-config v1.9.0

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"clean:packages": "pnpm -r --filter './packages/*' run clean",
1414
"build": "pnpm -r --filter './packages/*' run build",
1515
"test": "pnpm -r --filter './packages/*' run test",
16+
"lint": "pnpm -r --filter './packages/*' run lint",
1617
"prepack": "pnpm -r --filter './packages/*' run prepack",
1718
"bootstrap": "pnpm install",
1819
"clean:modules": "rm -rf node_modules packages/**/node_modules",
Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,50 @@
11
import tseslint from 'typescript-eslint';
22
import globals from 'globals';
3+
import unicorn from 'eslint-plugin-unicorn';
4+
import n from 'eslint-plugin-n';
35

46
export default [
57
...tseslint.configs.recommended,
68
{
7-
ignores: [
8-
'lib/**/*',
9-
'test/**/*',
10-
'dist/**/*',
11-
],
9+
ignores: ['lib/**/*', 'test/**/*', 'types/**/*', 'node_modules/**/*', '*.js'],
1210
},
1311
{
1412
languageOptions: {
1513
parser: tseslint.parser,
1614
parserOptions: {
17-
project: './tsconfig.json',
15+
sourceType: 'module',
1816
},
19-
sourceType: 'module',
2017
globals: {
2118
...globals.node,
2219
},
2320
},
21+
// unicorn/node registered (not enabled) so pre-existing inline eslint-disable
22+
// directives that reference their rules resolve under ESLint 10 flat config.
2423
plugins: {
2524
'@typescript-eslint': tseslint.plugin,
25+
unicorn,
26+
node: n,
2627
},
2728
rules: {
28-
'@typescript-eslint/no-unused-vars': [
29-
'error',
30-
{
31-
args: 'none',
32-
},
33-
],
34-
'@typescript-eslint/prefer-namespace-keyword': 'error',
35-
quotes: 'off',
36-
semi: 'off',
29+
// Pre-existing lint debt surfaced once the ESLint-10 flat-config crash was
30+
// fixed. Kept visible as warnings (tracked for follow-up cleanup) rather
31+
// than blocking, since these rules were never enforced while lint crashed.
32+
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none', ignoreRestSiblings: true }],
33+
'@typescript-eslint/no-explicit-any': 'warn',
34+
'@typescript-eslint/no-unused-expressions': ['warn', { allowShortCircuit: true, allowTernary: true }],
35+
'@typescript-eslint/no-require-imports': 'warn',
36+
'@typescript-eslint/ban-ts-comment': 'warn',
37+
'@typescript-eslint/no-wrapper-object-types': 'warn',
38+
'@typescript-eslint/no-unsafe-function-type': 'warn',
39+
'@typescript-eslint/no-empty-object-type': 'warn',
40+
'@typescript-eslint/no-this-alias': 'warn',
41+
'@typescript-eslint/no-use-before-define': 'off',
3742
'@typescript-eslint/no-redeclare': 'off',
38-
eqeqeq: ['error', 'smart'],
39-
'id-match': 'error',
43+
'prefer-const': 'warn',
44+
'prefer-rest-params': 'warn',
45+
'no-var': 'warn',
46+
eqeqeq: 'warn',
4047
'no-eval': 'error',
41-
'no-var': 'error',
42-
'@typescript-eslint/no-explicit-any': 'off',
43-
'@typescript-eslint/no-require-imports': 'off',
44-
'prefer-const': 'error',
4548
},
4649
},
4750
];

packages/contentstack-apps-cli/package.json

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,15 @@
8080
}
8181
},
8282
"scripts": {
83-
"build": "npm run clean && shx rm -rf lib && tsc -b",
84-
"lint": "eslint .",
85-
"postpack": "shx rm -f oclif.manifest.json",
86-
"posttest": "npm run lint",
87-
"prepack": "npm run build && oclif manifest && oclif readme",
88-
"test": "mocha --forbid-only \"test/**/*.test.ts\"",
83+
"build": "pnpm compile",
84+
"lint": "eslint \"src/**/*.ts\"",
85+
"postpack": "rm -f oclif.manifest.json",
86+
"prepack": "pnpm compile && oclif manifest && oclif readme",
87+
"test": "mocha --forbid-only \"test/unit/**/*.test.ts\"",
8988
"version": "oclif readme && git add README.md",
90-
"clean": "rm -rf ./lib tsconfig.tsbuildinfo oclif.manifest.json",
91-
"test:unit:report": "nyc --extension .ts mocha --forbid-only \"test/unit/**/*.test.ts\"",
92-
"test:unit:report:json": "mocha --reporter json --reporter-options output=report.json --forbid-only \"test/unit/**/*.test.ts\" && nyc --reporter=clover --extension .ts mocha --forbid-only \"test/unit/**/*.test.ts\""
89+
"clean": "rm -rf ./lib ./node_modules tsconfig.tsbuildinfo oclif.manifest.json",
90+
"compile": "tsc -b tsconfig.json",
91+
"format": "eslint \"src/**/*.ts\" --fix"
9392
},
9493
"engines": {
9594
"node": ">=22.0.0"
Lines changed: 27 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,50 @@
11
import tseslint from 'typescript-eslint';
22
import globals from 'globals';
3-
import oclif from 'eslint-config-oclif-typescript';
3+
import unicorn from 'eslint-plugin-unicorn';
4+
import n from 'eslint-plugin-n';
45

56
export default [
67
...tseslint.configs.recommended,
7-
oclif,
8+
{
9+
ignores: ['lib/**/*', 'test/**/*', 'types/**/*', 'node_modules/**/*', '*.js'],
10+
},
811
{
912
languageOptions: {
1013
parser: tseslint.parser,
1114
parserOptions: {
12-
project: './tsconfig.json',
15+
sourceType: 'module',
1316
},
14-
sourceType: 'module',
1517
globals: {
1618
...globals.node,
1719
},
1820
},
21+
// unicorn/node registered (not enabled) so pre-existing inline eslint-disable
22+
// directives that reference their rules resolve under ESLint 10 flat config.
1923
plugins: {
2024
'@typescript-eslint': tseslint.plugin,
25+
unicorn,
26+
node: n,
2127
},
2228
rules: {
23-
'@typescript-eslint/no-unused-vars': [
24-
'error',
25-
{
26-
args: 'none',
27-
},
28-
],
29-
'@typescript-eslint/prefer-namespace-keyword': 'error',
30-
'@typescript-eslint/quotes': [
31-
'error',
32-
'single',
33-
{
34-
avoidEscape: true,
35-
allowTemplateLiterals: true,
36-
},
37-
],
38-
semi: 'off',
39-
'@typescript-eslint/type-annotation-spacing': 'error',
29+
// Pre-existing lint debt surfaced once the ESLint-10 flat-config crash was
30+
// fixed. Kept visible as warnings (tracked for follow-up cleanup) rather
31+
// than blocking, since these rules were never enforced while lint crashed.
32+
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none', ignoreRestSiblings: true }],
33+
'@typescript-eslint/no-explicit-any': 'warn',
34+
'@typescript-eslint/no-unused-expressions': ['warn', { allowShortCircuit: true, allowTernary: true }],
35+
'@typescript-eslint/no-require-imports': 'warn',
36+
'@typescript-eslint/ban-ts-comment': 'warn',
37+
'@typescript-eslint/no-wrapper-object-types': 'warn',
38+
'@typescript-eslint/no-unsafe-function-type': 'warn',
39+
'@typescript-eslint/no-empty-object-type': 'warn',
40+
'@typescript-eslint/no-this-alias': 'warn',
41+
'@typescript-eslint/no-use-before-define': 'off',
4042
'@typescript-eslint/no-redeclare': 'off',
41-
eqeqeq: ['error', 'smart'],
42-
'id-match': 'error',
43+
'prefer-const': 'warn',
44+
'prefer-rest-params': 'warn',
45+
'no-var': 'warn',
46+
eqeqeq: 'warn',
4347
'no-eval': 'error',
44-
'no-var': 'error',
45-
quotes: 'off',
46-
indent: 'off',
47-
camelcase: 'off',
48-
'comma-dangle': 'off',
49-
'arrow-parens': 'off',
50-
'operator-linebreak': 'off',
51-
'object-curly-spacing': 'off',
52-
'node/no-missing-import': 'off',
53-
'padding-line-between-statements': 'off',
54-
'@typescript-eslint/ban-ts-ignore': 'off',
55-
'unicorn/no-abusive-eslint-disable': 'off',
56-
'unicorn/consistent-function-scoping': 'off',
57-
'@typescript-eslint/no-use-before-define': 'off',
5848
},
5949
},
6050
];

0 commit comments

Comments
 (0)