diff --git a/.github/workflows/release-production-plugins.yml b/.github/workflows/release-production-plugins.yml new file mode 100644 index 000000000..f85490b1e --- /dev/null +++ b/.github/workflows/release-production-plugins.yml @@ -0,0 +1,151 @@ +name: Release CLI Plugins (Production) + +on: + push: + branches: [main] + workflow_dispatch: # manually trigger the workflow + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + with: + version: 10.28.0 + - uses: actions/setup-node@v4 + with: + node-version: '22.x' + + - name: Enable Corepack + run: corepack enable + + - name: Install pnpm + run: corepack prepare pnpm@10.28.0 --activate + + - name: Clean the repository + run: pnpm run clean:all + + - name: Install root dependencies + run: pnpm install --no-frozen-lockfile + + - name: Build all plugins + run: pnpm -r --sort run build + + - name: Reading Configuration + id: release_config + uses: rgarcia-phi/json-to-variables@v1.1.0 + with: + filename: .github/config/release.json + prefix: release + + # Variants + - name: Publishing variants (Production) + uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} + package: ./packages/contentstack-variants/package.json + tag: latest + + # Export + - name: Publishing export (Production) + uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} + package: ./packages/contentstack-export/package.json + tag: latest + + # Audit + - name: Publishing audit (Production) + uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} + package: ./packages/contentstack-audit/package.json + tag: latest + + # Import + - name: Publishing import (Production) + uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} + package: ./packages/contentstack-import/package.json + tag: latest + + # Clone + - name: Publishing clone (Production) + uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} + package: ./packages/contentstack-clone/package.json + tag: latest + + # Import Setup + - name: Publishing import-setup (Production) + uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} + package: ./packages/contentstack-import-setup/package.json + tag: latest + + # Export to CSV + - name: Publishing export to csv (Production) + uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} + package: ./packages/contentstack-export-to-csv/package.json + tag: latest + + # Migration + - name: Publishing migration (Production) + uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} + package: ./packages/contentstack-migration/package.json + tag: latest + + # Seed + - name: Publishing seed (Production) + uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} + package: ./packages/contentstack-seed/package.json + tag: latest + + # Bootstrap + - name: Publishing bootstrap (Production) + uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} + package: ./packages/contentstack-bootstrap/package.json + tag: latest + + # Bulk Publish + - name: Publishing bulk publish (Production) + uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} + package: ./packages/contentstack-bulk-publish/package.json + tag: latest + + # Branches + - name: Publishing branches (Production) + uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} + package: ./packages/contentstack-branches/package.json + tag: latest + + - name: Create Production Release + id: create_release + env: + GITHUB_TOKEN: ${{ secrets.PKG_TOKEN }} + VERSION: ${{ steps.publish-plugins.outputs.version }} + run: | + # Get the previous production release for comparison + PREVIOUS_PROD=$(gh release list --limit 10 | grep -v 'prerelease' | head -1 | cut -f1) + + if [ -n "$PREVIOUS_PROD" ]; then + gh release create "v${VERSION}" --title "Production Release $VERSION" --notes-from-tag "$PREVIOUS_PROD" + else + gh release create "v${VERSION}" --title "Production Release $VERSION" --generate-notes + fi diff --git a/.github/workflows/release-v1-beta-plugins.yml b/.github/workflows/release-v1-beta-plugins.yml deleted file mode 100644 index 6c53041e3..000000000 --- a/.github/workflows/release-v1-beta-plugins.yml +++ /dev/null @@ -1,253 +0,0 @@ -name: Release CLI Plugins (v1 Beta) - -on: - push: - branches: [disable-v1-beta] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v4 - with: - version: 10.28.0 - - uses: actions/setup-node@v4 - with: - node-version: '22.x' - - - name: Enable Corepack - run: corepack enable - - - name: Install pnpm - run: corepack prepare pnpm@10.28.0 --activate - - - name: Install root dependencies - run: pnpm install - - - name: Reading Configuration - id: release_config - uses: rgarcia-phi/json-to-variables@v1.1.0 - with: - filename: .github/config/release.json - prefix: release - - # Variants - - name: Installing dependencies of variants - id: variants-installation - if: ${{env.release_releaseAll == 'true' || env.release_plugins_utilities == 'true'}} - working-directory: ./packages/contentstack-variants - run: npm install - - name: Compiling variants - if: ${{ steps.variants-installation.conclusion == 'success' }} - working-directory: ./packages/contentstack-variants - run: npm run prepack - - name: Publishing variants (Beta) - uses: JS-DevTools/npm-publish@v3 - if: ${{ steps.variants-installation.conclusion == 'success' }} - with: - token: ${{ secrets.NPM_TOKEN }} - package: ./packages/contentstack-variants/package.json - access: public - tag: beta - - # Export - - name: Installing dependencies of export - id: export-installation - if: ${{ env.release_releaseAll == 'true' || env.release_plugins_export == 'true'}} - working-directory: ./packages/contentstack-export - run: npm install - - name: Compiling export - if: ${{ steps.export-installation.conclusion == 'success' }} - working-directory: ./packages/contentstack-export - run: npm run prepack - - name: Publishing export (Beta) - uses: JS-DevTools/npm-publish@v3 - if: ${{ steps.export-installation.conclusion == 'success' }} - with: - token: ${{ secrets.NPM_TOKEN }} - package: ./packages/contentstack-export/package.json - tag: beta - - # Audit - - name: Installing dependencies of audit - id: audit-installation - if: ${{env.release_releaseAll == 'true' || env.release_plugins_audit == 'true'}} - working-directory: ./packages/contentstack-audit - run: npm install - - name: Compiling audit - if: ${{ steps.audit-installation.conclusion == 'success' }} - working-directory: ./packages/contentstack-audit - run: npm run prepack - - name: Publishing audit (Beta) - uses: JS-DevTools/npm-publish@v3 - if: ${{ steps.audit-installation.conclusion == 'success' }} - with: - token: ${{ secrets.NPM_TOKEN }} - package: ./packages/contentstack-audit/package.json - access: public - tag: beta - - # Import - - name: Installing dependencies of import - id: import-installation - if: ${{env.release_releaseAll == 'true' || env.release_plugins_import == 'true'}} - working-directory: ./packages/contentstack-import - run: npm install - - name: Compiling import - if: ${{ steps.import-installation.conclusion == 'success' }} - working-directory: ./packages/contentstack-import - run: npm run prepack - - name: Publishing import (Beta) - uses: JS-DevTools/npm-publish@v3 - if: ${{ steps.import-installation.conclusion == 'success' }} - with: - token: ${{ secrets.NPM_TOKEN }} - package: ./packages/contentstack-import/package.json - tag: beta - - # Clone - - name: Installing dependencies of clone - id: clone-installation - if: ${{env.release_releaseAll == 'true' || env.release_plugins_clone == 'true'}} - working-directory: ./packages/contentstack-clone - run: npm install - - name: Publishing clone (Beta) - uses: JS-DevTools/npm-publish@v3 - if: ${{ steps.clone-installation.conclusion == 'success' }} - with: - token: ${{ secrets.NPM_TOKEN }} - package: ./packages/contentstack-clone/package.json - tag: beta - - # Import Setup - - name: Installing dependencies of import-setup - id: import-setup-installation - if: ${{env.release_releaseAll == 'true' || env.release_plugins_import_setup == 'true'}} - working-directory: ./packages/contentstack-import-setup - run: npm install - - name: Compiling import-setup - if: ${{ steps.import-setup-installation.conclusion == 'success' }} - working-directory: ./packages/contentstack-import-setup - run: npm run prepack - - name: Publishing import-setup (Beta) - uses: JS-DevTools/npm-publish@v3 - if: ${{ steps.import-setup-installation.conclusion == 'success' }} - with: - token: ${{ secrets.NPM_TOKEN }} - package: ./packages/contentstack-import-setup/package.json - access: public - tag: beta - - # Export to CSV - - name: Installing dependencies of export to csv - id: export-to-csv-installation - if: ${{env.release_releaseAll == 'true' || env.release_plugins_export-to-csv == 'true'}} - working-directory: ./packages/contentstack-export-to-csv - run: npm install - - name: Publishing export to csv (Beta) - uses: JS-DevTools/npm-publish@v3 - if: ${{ steps.export-to-csv-installation.conclusion == 'success' }} - with: - token: ${{ secrets.NPM_TOKEN }} - package: ./packages/contentstack-export-to-csv/package.json - tag: beta - - # Migration - - name: Installing dependencies of migration - id: migration-installation - if: ${{env.release_releaseAll == 'true' || env.release_plugins_migration == 'true'}} - working-directory: ./packages/contentstack-migration - run: npm install - - name: Publishing migration (Beta) - uses: JS-DevTools/npm-publish@v3 - if: ${{ steps.migration-installation.conclusion == 'success' }} - with: - token: ${{ secrets.NPM_TOKEN }} - package: ./packages/contentstack-migration/package.json - tag: beta - - # Seed - - name: Installing dependencies of seed - id: seed-installation - if: ${{env.release_releaseAll == 'true' || env.release_plugins_seed == 'true'}} - working-directory: ./packages/contentstack-seed - run: npm install - - name: Compiling seed - if: ${{ steps.seed-installation.conclusion == 'success' }} - working-directory: ./packages/contentstack-seed - run: npm run prepack - - name: Publishing seed (Beta) - uses: JS-DevTools/npm-publish@v3 - if: ${{ steps.seed-installation.conclusion == 'success' }} - with: - token: ${{ secrets.NPM_TOKEN }} - package: ./packages/contentstack-seed/package.json - tag: beta - - # Bootstrap - - name: Installing dependencies of bootstrap - id: bootstrap-installation - if: ${{env.release_releaseAll == 'true' || env.release_plugins_bootstrap == 'true'}} - working-directory: ./packages/contentstack-bootstrap - run: npm install - - name: Compiling bootstrap - if: ${{ steps.bootstrap-installation.conclusion == 'success' }} - working-directory: ./packages/contentstack-bootstrap - run: npm run prepack - - name: Publishing bootstrap (Beta) - uses: JS-DevTools/npm-publish@v3 - if: ${{ steps.bootstrap-installation.conclusion == 'success' }} - with: - token: ${{ secrets.NPM_TOKEN }} - package: ./packages/contentstack-bootstrap/package.json - tag: beta - - # Bulk Publish - - name: Installing dependencies of bulk publish - id: bulk-publish-installation - if: ${{env.release_releaseAll == 'true' || env.release_plugins_bulk-publish == 'true'}} - working-directory: ./packages/contentstack-bulk-publish - run: npm install - - name: Publishing bulk publish (Beta) - uses: JS-DevTools/npm-publish@v3 - if: ${{ steps.bulk-publish-installation.conclusion == 'success' }} - with: - token: ${{ secrets.NPM_TOKEN }} - package: ./packages/contentstack-bulk-publish/package.json - tag: beta - - # Branches - - name: Installing dependencies of branches - id: branches-installation - if: ${{env.release_releaseAll == 'true' || env.release_plugins_branches == 'true'}} - working-directory: ./packages/contentstack-branches - run: npm install - - name: Compiling branches - if: ${{ steps.branches-installation.conclusion == 'success' }} - working-directory: ./packages/contentstack-branches - run: npm run prepack - - name: Publishing branches (Beta) - uses: JS-DevTools/npm-publish@v3 - if: ${{ steps.branches-installation.conclusion == 'success' }} - with: - token: ${{ secrets.NPM_TOKEN }} - package: ./packages/contentstack-branches/package.json - access: public - tag: beta - - - name: Create Beta Release - if: ${{ steps.publish-core.conclusion == 'success' }} - id: create_release - env: - GITHUB_TOKEN: ${{ secrets.PKG_TOKEN }} - VERSION: ${{ steps.publish-core.outputs.version }} - run: | - # Get the previous beta release for comparison - PREVIOUS_BETA=$(gh release list --limit 10 | grep 'beta' | head -1 | cut -f1) - - if [ -n "$PREVIOUS_BETA" ]; then - gh release create v"$VERSION" --title "Beta Release $VERSION" --notes-from-tag "$PREVIOUS_BETA" --prerelease - else - gh release create v"$VERSION" --title "Beta Release $VERSION" --generate-notes --prerelease - fi diff --git a/.talismanrc b/.talismanrc index eb4c5e60e..564e618c4 100644 --- a/.talismanrc +++ b/.talismanrc @@ -1,10 +1,4 @@ fileignoreconfig: - - filename: package-lock.json - checksum: c91b9e5fba1c84c0b6de15ad2f8cce698a5c781c9db31bebb7a3ad63ee88d9e1 - filename: pnpm-lock.yaml - checksum: 1b80993eacbc8bf861883d3e5382e6c708e68d4c0b881e31251999285e772e9b - - filename: packages/contentstack-bootstrap/src/bootstrap/utils.ts - checksum: 6e6fb00bb11b03141e5ad27eeaa4af9718dc30520c3e73970bc208cc0ba2a7d2 - - filename: .husky/pre-commit - checksum: 7a12030ddfea18d6f85edc25f1721fb2009df00fdd42bab66b05de25ab3e32b2 + checksum: 90c094faa23d82277ad7d48858147354ad28d11c0f317722a79bd70658b23835 version: '1.0' diff --git a/package.json b/package.json index ef58763cb..7c2e9e7a7 100644 --- a/package.json +++ b/package.json @@ -10,16 +10,17 @@ }, "private": true, "scripts": { - "clean": "pnpm -r --filter './packages/*' run clean", + "clean:packages": "pnpm -r --filter './packages/*' run clean:packages", "build": "pnpm -r --filter './packages/*' run build", "test": "pnpm -r --filter './packages/*' run test", "prepack": "pnpm -r --filter './packages/*' run prepack", "bootstrap": "pnpm install", "clean:modules": "rm -rf node_modules packages/**/node_modules", "clean:lock": "rm -f pnpm-lock.yaml", - "clean:all": "pnpm store prune && rm -rf node_modules && pnpm run clean", + "clean:all": "pnpm store prune && rm -rf node_modules && pnpm run clean:packages", "setup": "pnpm run clean:all && pnpm run bootstrap && pnpm run build", - "prepare": "npx husky && chmod +x .husky/pre-commit" + "prepare": "npx husky && chmod +x .husky/pre-commit", + "update:lockfile": "pnpm install --lockfile-only" }, "license": "MIT", "packageManager": "pnpm@10.28.0", diff --git a/packages/contentstack-audit/README.md b/packages/contentstack-audit/README.md index cf0fa3427..8bc29344f 100644 --- a/packages/contentstack-audit/README.md +++ b/packages/contentstack-audit/README.md @@ -19,7 +19,7 @@ $ npm install -g @contentstack/cli-audit $ csdx COMMAND running command... $ csdx (--version|-v) -@contentstack/cli-audit/1.17.1 darwin-arm64 node-v24.13.0 +@contentstack/cli-audit/1.19.0-beta.1 darwin-arm64 node-v22.13.1 $ csdx --help [COMMAND] USAGE $ csdx COMMAND @@ -309,7 +309,7 @@ EXAMPLES $ csdx plugins ``` -_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.55/src/commands/plugins/index.ts)_ +_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.56/src/commands/plugins/index.ts)_ ## `csdx plugins:add PLUGIN` @@ -383,7 +383,7 @@ EXAMPLES $ csdx plugins:inspect myplugin ``` -_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.55/src/commands/plugins/inspect.ts)_ +_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.56/src/commands/plugins/inspect.ts)_ ## `csdx plugins:install PLUGIN` @@ -432,7 +432,7 @@ EXAMPLES $ csdx plugins:install someuser/someplugin ``` -_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.55/src/commands/plugins/install.ts)_ +_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.56/src/commands/plugins/install.ts)_ ## `csdx plugins:link PATH` @@ -463,7 +463,7 @@ EXAMPLES $ csdx plugins:link myplugin ``` -_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.55/src/commands/plugins/link.ts)_ +_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.56/src/commands/plugins/link.ts)_ ## `csdx plugins:remove [PLUGIN]` @@ -504,7 +504,7 @@ FLAGS --reinstall Reinstall all plugins after uninstalling. ``` -_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.55/src/commands/plugins/reset.ts)_ +_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.56/src/commands/plugins/reset.ts)_ ## `csdx plugins:uninstall [PLUGIN]` @@ -532,7 +532,7 @@ EXAMPLES $ csdx plugins:uninstall myplugin ``` -_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.55/src/commands/plugins/uninstall.ts)_ +_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.56/src/commands/plugins/uninstall.ts)_ ## `csdx plugins:unlink [PLUGIN]` @@ -576,5 +576,5 @@ DESCRIPTION Update installed plugins. ``` -_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.55/src/commands/plugins/update.ts)_ +_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.56/src/commands/plugins/update.ts)_ diff --git a/packages/contentstack-audit/package.json b/packages/contentstack-audit/package.json index 086881a1e..d407634e2 100644 --- a/packages/contentstack-audit/package.json +++ b/packages/contentstack-audit/package.json @@ -1,6 +1,6 @@ { "name": "@contentstack/cli-audit", - "version": "1.18.0", + "version": "1.19.0", "description": "Contentstack audit plugin", "author": "Contentstack CLI", "homepage": "https://github.com/contentstack/cli", @@ -18,8 +18,8 @@ "/oclif.manifest.json" ], "dependencies": { - "@contentstack/cli-command": "~1.7.2", - "@contentstack/cli-utilities": "~1.17.4", + "@contentstack/cli-command": "~1.8.0", + "@contentstack/cli-utilities": "~1.18.0", "@oclif/core": "^4.3.0", "@oclif/plugin-help": "^6.2.28", "@oclif/plugin-plugins": "^5.4.54", @@ -66,15 +66,15 @@ "repositoryPrefix": "<%- repo %>/blob/main/packages/contentstack-audit/<%- commandPath %>" }, "scripts": { - "build": "pnpm compile", + "build": "pnpm compile && oclif manifest && oclif readme", "lint": "eslint . --ext .ts --config .eslintrc", "postpack": "shx rm -f oclif.manifest.json", "posttest": "npm run lint", - "compile": "shx rm -rf lib tsconfig.tsbuildinfo && tsc -b", + "compile": "tsc -b tsconfig.json", "prepack": "pnpm compile && oclif manifest && oclif readme", "test": "mocha --forbid-only \"test/**/*.test.ts\"", "version": "oclif readme && git add README.md", - "clean": "rm -rf ./lib ./node_modules .tsbuildinfo oclif.manifest.json", + "clean": "rm -rf ./lib ./node_modules tsconfig.tsbuildinfo", "test:unit:report": "nyc --extension .ts mocha --forbid-only \"test/unit/**/*.test.ts\"", "test:unit": "mocha --timeout 10000 --forbid-only \"test/unit/**/*.test.ts\"" }, diff --git a/packages/contentstack-bootstrap/README.md b/packages/contentstack-bootstrap/README.md index 37b8076db..bbcf06b4b 100644 --- a/packages/contentstack-bootstrap/README.md +++ b/packages/contentstack-bootstrap/README.md @@ -15,7 +15,7 @@ $ npm install -g @contentstack/cli-cm-bootstrap $ csdx COMMAND running command... $ csdx (--version) -@contentstack/cli-cm-bootstrap/1.18.2 darwin-arm64 node-v24.13.0 +@contentstack/cli-cm-bootstrap/1.19.0-beta.1 darwin-arm64 node-v22.13.1 $ csdx --help [COMMAND] USAGE $ csdx COMMAND @@ -44,14 +44,14 @@ Bootstrap contentstack apps ``` USAGE - $ csdx cm:bootstrap [--app-name ] [--project-dir ] [-k | --org | -n ] [-y - ] [--run-dev-server] [-a ] + $ csdx cm:bootstrap [--app-name ] [--project-dir ] [-k | --org | -n ] [-y] + [--run-dev-server] [-a ] FLAGS -a, --alias= Alias of the management token -k, --stack-api-key= Provide stack API key to seed content -n, --stack-name= Name of the new stack that will be created. - -y, --yes= [Optional] Skip stack confirmation + -y, --yes [Optional] Skip stack confirmation --app-name= App name, kickstart-next, kickstart-next-ssr, kickstart-next-ssg, kickstart-next-graphql, kickstart-next-middleware, kickstart-nuxt, kickstart-nuxt-ssr --org= Provide organization UID to create a new stack diff --git a/packages/contentstack-bootstrap/package.json b/packages/contentstack-bootstrap/package.json index 4bb047cf2..1e8c65479 100644 --- a/packages/contentstack-bootstrap/package.json +++ b/packages/contentstack-bootstrap/package.json @@ -1,12 +1,12 @@ { "name": "@contentstack/cli-cm-bootstrap", "description": "Bootstrap contentstack apps", - "version": "1.18.4", + "version": "1.19.0", "author": "Contentstack", "bugs": "https://github.com/contentstack/cli/issues", "scripts": { - "build": "pnpm compile", - "clean": "rm -rf ./lib ./node_modules tsconfig.build.tsbuildinfo", + "build": "pnpm compile && oclif manifest && oclif readme", + "clean": "rm -rf ./lib ./node_modules tsconfig.tsbuildinfo", "compile": "tsc -b tsconfig.json", "postpack": "rm -f oclif.manifest.json", "prepack": "pnpm compile && oclif manifest && oclif readme", @@ -16,15 +16,15 @@ "test:report": "nyc --reporter=lcov mocha \"test/**/*.test.js\"" }, "dependencies": { - "@contentstack/cli-cm-seed": "~1.14.3", - "@contentstack/cli-command": "~1.7.2", - "@contentstack/cli-config": "~1.19.0", - "@contentstack/cli-utilities": "~1.17.4", + "@contentstack/cli-cm-seed": "~1.15.0", + "@contentstack/cli-command": "~1.8.0", + "@contentstack/cli-config": "~1.20.0", + "@contentstack/cli-utilities": "~1.18.0", "@oclif/core": "^4.3.0", "@oclif/plugin-help": "^6.2.37", "inquirer": "8.2.7", "mkdirp": "^1.0.4", - "tar": "^7.5.7" + "tar": "^7.5.11" }, "devDependencies": { "@oclif/test": "^4.1.13", diff --git a/packages/contentstack-bootstrap/src/bootstrap/index.ts b/packages/contentstack-bootstrap/src/bootstrap/index.ts index dca6a7220..c68bcdcaa 100644 --- a/packages/contentstack-bootstrap/src/bootstrap/index.ts +++ b/packages/contentstack-bootstrap/src/bootstrap/index.ts @@ -28,7 +28,7 @@ export interface SeedParams { stackAPIKey?: string; org?: string; stackName?: string; - yes?: string; + yes?: boolean; managementTokenAlias?: string | undefined; managementToken?: string | undefined; } @@ -95,7 +95,7 @@ export default class Bootstrap { cmd.push('-n', this.options.seedParams.stackName); } if (this.options.seedParams.yes) { - cmd.push('-y', this.options.seedParams.yes); + cmd.push('-y'); } if (this.options.seedParams.managementTokenAlias) { cmd.push('--alias', this.options.seedParams.managementTokenAlias); diff --git a/packages/contentstack-bootstrap/src/bootstrap/utils.ts b/packages/contentstack-bootstrap/src/bootstrap/utils.ts index 164f9a1ad..cd1da33e4 100644 --- a/packages/contentstack-bootstrap/src/bootstrap/utils.ts +++ b/packages/contentstack-bootstrap/src/bootstrap/utils.ts @@ -40,11 +40,11 @@ export const setupEnvironments = async ( if (!managementToken) { const managementBody = { token: { - name: 'sample app', - description: 'This is a sample management token.', + name: 'Compass Starter App', + description: 'This is a compass starter app management token.', scope: [ { - module: 'content_type', + module: '$all', acl: { read: true, write: true, @@ -58,8 +58,9 @@ export const setupEnvironments = async ( }, }, ], - expires_on: '3000-01-01', + expires_on: null, is_email_notification_enabled: false, + rate_limit_enabled: false, }, }; managementTokenResult = await managementAPIClient @@ -313,7 +314,7 @@ const envFileHandler = async ( }CONTENTSTACK_ENVIRONMENT=${environmentVariables.environment}${!isUSRegion && !customHost ? '\nCONTENTSTACK_REGION=' + region.name : '' }\nCONTENTSTACK_LIVE_PREVIEW=${livePreviewEnabled}\nCONTENTSTACK_LIVE_EDIT_TAGS=false\nCONTENTSTACK_API_HOST=${customHost ? customHost : managementAPIHost }${!isUSRegion && !customHost ? '\nCONTENTSTACK_REGION=' + region.name : '' - }\nCONTENTSTACK_APP_HOST=${appHost}\nCONTENTSTACK_MANAGEMENT_TOKEN=${managementTokenResult.uid + }\nCONTENTSTACK_APP_HOST=${appHost}\nCONTENTSTACK_MANAGEMENT_TOKEN=${managementTokenResult.token }\nCONTENTSTACK_HOST=${cdnHost}`; result = await writeEnvFile(content, filePath); break; diff --git a/packages/contentstack-bootstrap/src/commands/cm/bootstrap.ts b/packages/contentstack-bootstrap/src/commands/cm/bootstrap.ts index 8cf129cf3..431b402c5 100644 --- a/packages/contentstack-bootstrap/src/commands/cm/bootstrap.ts +++ b/packages/contentstack-bootstrap/src/commands/cm/bootstrap.ts @@ -73,7 +73,7 @@ export default class BootstrapCommand extends Command { required: false, exclusive: ['stack-api-key'], }), - yes: flags.string({ + yes: flags.boolean({ description: '[Optional] Skip stack confirmation', char: 'y', required: false, @@ -157,7 +157,7 @@ export default class BootstrapCommand extends Command { }); } - const yes = bootstrapCommandFlags.yes as string; + const yes = bootstrapCommandFlags.yes as boolean; const appConfig: AppConfig = getAppLevelConfigByName(selectedAppName || selectedApp.configKey); const master_locale = appConfig.master_locale || DEFAULT_MASTER_LOCALE; @@ -181,7 +181,7 @@ export default class BootstrapCommand extends Command { if (stackAPIKey) seedParams.stackAPIKey = stackAPIKey; if (org) seedParams.org = org; if (stackName) seedParams.stackName = stackName; - if (yes) seedParams.yes = yes; + if (yes) seedParams.yes = true; if (managementTokenAlias) { seedParams.managementTokenAlias = managementTokenAlias; const listOfTokens = configHandler.get('tokens'); diff --git a/packages/contentstack-branches/README.md b/packages/contentstack-branches/README.md index ff11cd472..baa022197 100755 --- a/packages/contentstack-branches/README.md +++ b/packages/contentstack-branches/README.md @@ -37,7 +37,7 @@ $ npm install -g @contentstack/cli-cm-branches $ csdx COMMAND running command... $ csdx (--version) -@contentstack/cli-cm-branches/1.6.3 darwin-arm64 node-v24.13.0 +@contentstack/cli-cm-branches/1.7.0-beta.1 darwin-arm64 node-v22.13.1 $ csdx --help [COMMAND] USAGE $ csdx COMMAND diff --git a/packages/contentstack-branches/package.json b/packages/contentstack-branches/package.json index 9d78c8ccb..1e27161cc 100644 --- a/packages/contentstack-branches/package.json +++ b/packages/contentstack-branches/package.json @@ -1,20 +1,20 @@ { "name": "@contentstack/cli-cm-branches", "description": "Contentstack CLI plugin to do branches operations", - "version": "1.6.3", + "version": "1.7.0", "author": "Contentstack", "bugs": "https://github.com/contentstack/cli/issues", "dependencies": { - "@contentstack/cli-command": "~1.7.2", + "@contentstack/cli-command": "~1.8.0", "@oclif/core": "^4.3.0", "@oclif/plugin-help": "^6.2.28", - "@contentstack/cli-utilities": "~1.17.4", + "@contentstack/cli-utilities": "~1.18.0", "chalk": "^4.1.2", "just-diff": "^6.0.2", "lodash": "^4.17.23" }, "devDependencies": { - "@contentstack/cli-dev-dependencies": "~1.3.0", + "@contentstack/cli-dev-dependencies": "^1.3.1", "@oclif/plugin-help": "^6.2.28", "@types/flat": "^5.0.5", "chai": "^4.5.0", @@ -30,8 +30,8 @@ "typescript": "^4.9.5" }, "scripts": { - "build": "pnpm compile", - "clean": "rm -rf ./lib ./node_modules tsconfig.build.tsbuildinfo", + "build": "pnpm compile && oclif manifest && oclif readme", + "clean": "rm -rf ./lib ./node_modules tsconfig.tsbuildinfo", "compile": "tsc -b tsconfig.json", "postpack": "rm -f oclif.manifest.json", "prepack": "pnpm compile && oclif manifest && oclif readme", diff --git a/packages/contentstack-bulk-publish/README.md b/packages/contentstack-bulk-publish/README.md index bd8a81139..f4455320a 100644 --- a/packages/contentstack-bulk-publish/README.md +++ b/packages/contentstack-bulk-publish/README.md @@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-cm-bulk-publish $ csdx COMMAND running command... $ csdx (--version) -@contentstack/cli-cm-bulk-publish/1.10.6 darwin-arm64 node-v24.13.0 +@contentstack/cli-cm-bulk-publish/1.11.0-beta.1 darwin-arm64 node-v22.13.1 $ csdx --help [COMMAND] USAGE $ csdx COMMAND diff --git a/packages/contentstack-bulk-publish/package.json b/packages/contentstack-bulk-publish/package.json index 5c5ee027e..ab8ec99e1 100644 --- a/packages/contentstack-bulk-publish/package.json +++ b/packages/contentstack-bulk-publish/package.json @@ -1,13 +1,13 @@ { "name": "@contentstack/cli-cm-bulk-publish", "description": "Contentstack CLI plugin for bulk publish actions", - "version": "1.10.7", + "version": "1.11.0", "author": "Contentstack", "bugs": "https://github.com/contentstack/cli/issues", "dependencies": { - "@contentstack/cli-command": "~1.7.2", - "@contentstack/cli-config": "~1.19.0", - "@contentstack/cli-utilities": "~1.17.4", + "@contentstack/cli-command": "~1.8.0", + "@contentstack/cli-config": "~1.20.0", + "@contentstack/cli-utilities": "~1.18.0", "@oclif/core": "^4.3.0", "@oclif/plugin-help": "^6.2.28", "chalk": "^4.1.2", @@ -92,6 +92,7 @@ "scripts": { "postpack": "rm -f oclif.manifest.json", "prepack": "oclif manifest && oclif readme", + "build": "oclif manifest && oclif readme", "test:unit": "mocha --reporter spec --forbid-only \"test/unit/**/*.test.js\"", "posttest": "eslint .", "version": "oclif readme && git add README.md", diff --git a/packages/contentstack-clone/README.md b/packages/contentstack-clone/README.md index ec5f1bc21..17adaaae8 100644 --- a/packages/contentstack-clone/README.md +++ b/packages/contentstack-clone/README.md @@ -16,7 +16,7 @@ $ npm install -g @contentstack/cli-cm-clone $ csdx COMMAND running command... $ csdx (--version) -@contentstack/cli-cm-clone/1.20.0 darwin-arm64 node-v24.13.0 +@contentstack/cli-cm-clone/1.21.0-beta.1 darwin-arm64 node-v22.13.1 $ csdx --help [COMMAND] USAGE $ csdx COMMAND diff --git a/packages/contentstack-clone/package.json b/packages/contentstack-clone/package.json index 5e329a017..9a6620c6b 100644 --- a/packages/contentstack-clone/package.json +++ b/packages/contentstack-clone/package.json @@ -1,15 +1,15 @@ { "name": "@contentstack/cli-cm-clone", "description": "Contentstack stack clone plugin", - "version": "1.20.1", + "version": "1.21.0", "author": "Contentstack", "bugs": "https://github.com/rohitmishra209/cli-cm-clone/issues", "dependencies": { "@colors/colors": "^1.6.0", - "@contentstack/cli-cm-export": "~1.23.2", - "@contentstack/cli-cm-import": "~1.31.3", - "@contentstack/cli-command": "~1.7.2", - "@contentstack/cli-utilities": "~1.17.4", + "@contentstack/cli-cm-export": "~1.24.0", + "@contentstack/cli-cm-import": "~1.32.0", + "@contentstack/cli-command": "~1.8.0", + "@contentstack/cli-utilities": "~1.18.0", "@oclif/core": "^4.3.0", "@oclif/plugin-help": "^6.2.28", "chalk": "^4.1.2", @@ -61,8 +61,8 @@ }, "repository": "https://github.com/contentstack/cli", "scripts": { - "build": "pnpm compile", - "clean": "rm -rf ./lib ./node_modules tsconfig.build.tsbuildinfo", + "build": "pnpm compile && oclif manifest && oclif readme", + "clean": "rm -rf ./lib ./node_modules tsconfig.tsbuildinfo", "compile": "tsc -b tsconfig.json", "postpack": "rm -f oclif.manifest.json", "prepack": "pnpm compile && oclif manifest && oclif readme", diff --git a/packages/contentstack-export-to-csv/package.json b/packages/contentstack-export-to-csv/package.json index 67cb7e087..286bf4be4 100644 --- a/packages/contentstack-export-to-csv/package.json +++ b/packages/contentstack-export-to-csv/package.json @@ -1,12 +1,12 @@ { "name": "@contentstack/cli-cm-export-to-csv", "description": "Export entries, taxonomies, terms, or organization users to CSV", - "version": "1.11.0", + "version": "1.12.0", "author": "Contentstack", "bugs": "https://github.com/contentstack/cli/issues", "dependencies": { - "@contentstack/cli-command": "~1.7.2", - "@contentstack/cli-utilities": "~1.17.4", + "@contentstack/cli-command": "~1.8.0", + "@contentstack/cli-utilities": "~1.18.0", "@oclif/core": "^4.8.0", "@oclif/plugin-help": "^6.2.32", "fast-csv": "^4.3.6", @@ -65,8 +65,8 @@ }, "repository": "https://github.com/contentstack/cli", "scripts": { - "build": "pnpm compile", - "clean": "rm -rf ./lib ./node_modules tsconfig.tsbuildinfo oclif.manifest.json", + "build": "pnpm compile && oclif manifest && oclif readme", + "clean": "rm -rf ./lib ./node_modules tsconfig.tsbuildinfo", "compile": "tsc -b tsconfig.json", "lint": "eslint src/**/*.ts", "lint:fix": "eslint src/**/*.ts --fix", diff --git a/packages/contentstack-export/README.md b/packages/contentstack-export/README.md index cac9da993..4686224b0 100755 --- a/packages/contentstack-export/README.md +++ b/packages/contentstack-export/README.md @@ -48,7 +48,7 @@ $ npm install -g @contentstack/cli-cm-export $ csdx COMMAND running command... $ csdx (--version) -@contentstack/cli-cm-export/1.23.1 darwin-arm64 node-v24.13.0 +@contentstack/cli-cm-export/1.24.0-beta.1 darwin-arm64 node-v22.13.1 $ csdx --help [COMMAND] USAGE $ csdx COMMAND diff --git a/packages/contentstack-export/package.json b/packages/contentstack-export/package.json index 4f7718bed..1cb9c788c 100644 --- a/packages/contentstack-export/package.json +++ b/packages/contentstack-export/package.json @@ -1,14 +1,14 @@ { "name": "@contentstack/cli-cm-export", "description": "Contentstack CLI plugin to export content from stack", - "version": "1.23.2", + "version": "1.24.0", "author": "Contentstack", "bugs": "https://github.com/contentstack/cli/issues", "dependencies": { - "@contentstack/cli-command": "~1.7.2", + "@contentstack/cli-command": "~1.8.0", "@oclif/core": "^4.3.3", - "@contentstack/cli-variants": "~1.3.8", - "@contentstack/cli-utilities": "~1.17.4", + "@contentstack/cli-variants": "~1.4.0", + "@contentstack/cli-utilities": "~1.18.0", "async": "^3.2.6", "big-json": "^3.2.0", "bluebird": "^3.7.2", @@ -21,9 +21,9 @@ "winston": "^3.17.0" }, "devDependencies": { - "@contentstack/cli-auth": "~1.7.3", - "@contentstack/cli-config": "~1.19.0", - "@contentstack/cli-dev-dependencies": "~1.3.1", + "@contentstack/cli-auth": "~1.8.0", + "@contentstack/cli-config": "~1.20.0", + "@contentstack/cli-dev-dependencies": "^1.3.1", "@oclif/plugin-help": "^6.2.28", "@oclif/test": "^4.1.13", "@types/big-json": "^3.2.5", @@ -46,8 +46,8 @@ "typescript": "^4.9.5" }, "scripts": { - "build": "pnpm compile", - "clean": "rm -rf ./lib ./node_modules tsconfig.build.tsbuildinfo", + "build": "pnpm compile && oclif manifest && oclif readme", + "clean": "rm -rf ./lib ./node_modules tsconfig.tsbuildinfo", "compile": "tsc -b tsconfig.json", "postpack": "rm -f oclif.manifest.json", "prepack": "pnpm compile && oclif manifest && oclif readme", diff --git a/packages/contentstack-import-setup/README.md b/packages/contentstack-import-setup/README.md index 9cd591edb..4e493ec83 100644 --- a/packages/contentstack-import-setup/README.md +++ b/packages/contentstack-import-setup/README.md @@ -47,7 +47,7 @@ $ npm install -g @contentstack/cli-cm-import-setup $ csdx COMMAND running command... $ csdx (--version) -@contentstack/cli-cm-import-setup/1.7.3 darwin-arm64 node-v24.13.0 +@contentstack/cli-cm-import-setup/1.8.0-beta.1 darwin-arm64 node-v22.13.1 $ csdx --help [COMMAND] USAGE $ csdx COMMAND diff --git a/packages/contentstack-import-setup/package.json b/packages/contentstack-import-setup/package.json index 5cf029ba3..ac1cf337c 100644 --- a/packages/contentstack-import-setup/package.json +++ b/packages/contentstack-import-setup/package.json @@ -1,12 +1,12 @@ { "name": "@contentstack/cli-cm-import-setup", "description": "Contentstack CLI plugin to setup the mappers and configurations for the import command", - "version": "1.7.3", + "version": "1.8.0", "author": "Contentstack", "bugs": "https://github.com/contentstack/cli/issues", "dependencies": { - "@contentstack/cli-command": "~1.7.2", - "@contentstack/cli-utilities": "~1.17.4", + "@contentstack/cli-command": "~1.8.0", + "@contentstack/cli-utilities": "~1.18.0", "@oclif/core": "^4.3.0", "big-json": "^3.2.0", "chalk": "^4.1.2", @@ -40,8 +40,8 @@ "typescript": "^4.9.5" }, "scripts": { - "build": "pnpm compile", - "clean": "rm -rf ./lib ./node_modules tsconfig.build.tsbuildinfo", + "build": "pnpm compile && oclif manifest && oclif readme", + "clean": "rm -rf ./lib ./node_modules tsconfig.tsbuildinfo", "compile": "tsc -b tsconfig.json", "postpack": "rm -f oclif.manifest.json", "prepack": "pnpm compile && oclif manifest && oclif readme", diff --git a/packages/contentstack-import/README.md b/packages/contentstack-import/README.md index 8a97a7731..4fccc24c1 100644 --- a/packages/contentstack-import/README.md +++ b/packages/contentstack-import/README.md @@ -47,7 +47,7 @@ $ npm install -g @contentstack/cli-cm-import $ csdx COMMAND running command... $ csdx (--version) -@contentstack/cli-cm-import/1.31.2 darwin-arm64 node-v24.13.0 +@contentstack/cli-cm-import/1.32.0-beta.1 darwin-arm64 node-v22.13.1 $ csdx --help [COMMAND] USAGE $ csdx COMMAND diff --git a/packages/contentstack-import/package.json b/packages/contentstack-import/package.json index 5b36a87af..8aa4667ae 100644 --- a/packages/contentstack-import/package.json +++ b/packages/contentstack-import/package.json @@ -1,14 +1,14 @@ { "name": "@contentstack/cli-cm-import", "description": "Contentstack CLI plugin to import content into stack", - "version": "1.31.3", + "version": "1.32.0", "author": "Contentstack", "bugs": "https://github.com/contentstack/cli/issues", "dependencies": { - "@contentstack/cli-audit": "~1.18.0", - "@contentstack/cli-command": "~1.7.2", - "@contentstack/cli-utilities": "~1.17.4", - "@contentstack/cli-variants": "~1.3.8", + "@contentstack/cli-audit": "~1.19.0", + "@contentstack/cli-command": "~1.8.0", + "@contentstack/cli-utilities": "~1.18.0", + "@contentstack/cli-variants": "~1.4.0", "@oclif/core": "^4.3.0", "big-json": "^3.2.0", "bluebird": "^3.7.2", @@ -45,8 +45,8 @@ "typescript": "^4.9.5" }, "scripts": { - "build": "pnpm compile", - "clean": "rm -rf ./lib ./node_modules tsconfig.build.tsbuildinfo", + "build": "pnpm compile && oclif manifest && oclif readme", + "clean": "rm -rf ./lib ./node_modules tsconfig.tsbuildinfo", "compile": "tsc -b tsconfig.json", "postpack": "rm -f oclif.manifest.json", "prepack": "pnpm compile && oclif manifest && oclif readme", diff --git a/packages/contentstack-import/src/import/modules/custom-roles.ts b/packages/contentstack-import/src/import/modules/custom-roles.ts index fcb1611d4..a5788747c 100644 --- a/packages/contentstack-import/src/import/modules/custom-roles.ts +++ b/packages/contentstack-import/src/import/modules/custom-roles.ts @@ -14,6 +14,7 @@ export default class ImportCustomRoles extends BaseClass { private customRolesUidMapperPath: string; private envUidMapperFolderPath: string; private entriesUidMapperFolderPath: string; + private assetsUidMapperFolderPath: string; private createdCustomRolesPath: string; private customRolesFailsPath: string; private customRolesConfig: CustomRoleConfig; @@ -25,6 +26,8 @@ export default class ImportCustomRoles extends BaseClass { private environmentsUidMap: Record; private entriesUidMap: Record; private localesUidMap: Record; + private assetsUidMap: Record; + private assetsFolderUidMap: Record; public targetLocalesMap: Record; public sourceLocalesMap: Record; @@ -37,6 +40,7 @@ export default class ImportCustomRoles extends BaseClass { this.customRolesUidMapperPath = join(this.customRolesMapperPath, 'uid-mapping.json'); this.envUidMapperFolderPath = join(this.importConfig.backupDir, 'mapper', 'environments'); this.entriesUidMapperFolderPath = join(this.importConfig.backupDir, 'mapper', 'entries'); + this.assetsUidMapperFolderPath = join(this.importConfig.backupDir, 'mapper', 'assets'); this.createdCustomRolesPath = join(this.customRolesMapperPath, 'success.json'); this.customRolesFailsPath = join(this.customRolesMapperPath, 'fails.json'); this.customRoles = {}; @@ -47,6 +51,8 @@ export default class ImportCustomRoles extends BaseClass { this.environmentsUidMap = {}; this.entriesUidMap = {}; this.localesUidMap = {}; + this.assetsUidMap = {}; + this.assetsFolderUidMap = {}; } /** @@ -86,6 +92,16 @@ export default class ImportCustomRoles extends BaseClass { ? (fsUtil.readFile(join(this.entriesUidMapperFolderPath, 'uid-mapping.json'), true) as Record) || {} : {}; + log.debug('Loading assets UID data...', this.importConfig.context); + this.assetsUidMap = fileHelper.fileExistsSync(this.assetsUidMapperFolderPath) + ? (fsUtil.readFile(join(this.assetsUidMapperFolderPath, 'uid-mapping.json'), true) as Record) || {} + : {}; + + log.debug('Loading asset folders UID data...', this.importConfig.context); + this.assetsFolderUidMap = fileHelper.fileExistsSync(this.assetsUidMapperFolderPath) + ? (fsUtil.readFile(join(this.assetsUidMapperFolderPath, 'folder-mapping.json'), true) as Record) || {} + : {}; + if (this.customRolesUidMapper && Object.keys(this.customRolesUidMapper || {}).length > 0) { const customRolesUidCount = Object.keys(this.customRolesUidMapper || {}).length; log.debug(`Loaded existing custom roles UID data: ${customRolesUidCount} items`, this.importConfig.context); @@ -290,6 +306,23 @@ export default class ImportCustomRoles extends BaseClass { } else { log.debug('No entry UID mappings available for transformation.', this.importConfig.context); } + } else if (rule.module === 'asset') { + if (!isEmpty(this.assetsUidMap)) { + const originalAssets = rule.assets?.length || 0; + rule.assets = map(rule.assets, (uid: string) => (this.assetsUidMap[uid] as string) ?? uid); + log.debug(`Transformed ${originalAssets} asset UIDs for rule`, this.importConfig.context); + } else { + log.debug('No asset UID mappings available for transformation.', this.importConfig.context); + } + } else if (rule.module === 'folder') { + if (!isEmpty(this.assetsFolderUidMap)) { + const originalFolders = rule.folders?.length || 0; + rule.folders = map(rule.folders, (uid: string) => (this.assetsFolderUidMap[uid] as string) ?? uid); + rule.heirarchy = map(rule.heirarchy, (uid: string) => (this.assetsFolderUidMap[uid] as string) ?? uid); + log.debug(`Transformed ${originalFolders} folder UIDs for rule`, this.importConfig.context); + } else { + log.debug('No asset folder UID mappings available for transformation.', this.importConfig.context); + } } return rule; }; diff --git a/packages/contentstack-migration/README.md b/packages/contentstack-migration/README.md index bc918ec3c..2837fd794 100644 --- a/packages/contentstack-migration/README.md +++ b/packages/contentstack-migration/README.md @@ -21,7 +21,7 @@ $ npm install -g @contentstack/cli-migration $ csdx COMMAND running command... $ csdx (--version) -@contentstack/cli-migration/1.10.3 darwin-arm64 node-v24.13.0 +@contentstack/cli-migration/1.12.0-beta.1 darwin-arm64 node-v22.13.1 $ csdx --help [COMMAND] USAGE $ csdx COMMAND @@ -121,7 +121,7 @@ EXAMPLES $ csdx cm:migration --alias --file-path -k ``` -_See code: [src/commands/cm/stacks/migration.js](https://github.com/contentstack/cli/blob/main/packages/contentstack-migration/src/commands/cm/stacks/migration.js)_ +_See code: [src/commands/cm/stacks/migration.ts](https://github.com/contentstack/cli/blob/main/packages/contentstack-migration/src/commands/cm/stacks/migration.ts)_ ### Points to remember diff --git a/packages/contentstack-migration/package.json b/packages/contentstack-migration/package.json index c411c89d1..fa1e57610 100644 --- a/packages/contentstack-migration/package.json +++ b/packages/contentstack-migration/package.json @@ -1,11 +1,11 @@ { "name": "@contentstack/cli-migration", - "version": "1.11.0", + "version": "1.12.0", "author": "@contentstack", "bugs": "https://github.com/contentstack/cli/issues", "dependencies": { - "@contentstack/cli-command": "~1.7.2", - "@contentstack/cli-utilities": "~1.17.4", + "@contentstack/cli-command": "~1.8.0", + "@contentstack/cli-utilities": "~1.18.0", "@oclif/core": "^4.3.0", "@oclif/plugin-help": "^6.2.28", "async": "^3.2.6", @@ -53,7 +53,7 @@ }, "repository": "contentstack/cli", "scripts": { - "build": "pnpm compile", + "build": "pnpm compile && oclif manifest && oclif readme", "postpack": "rm -f oclif.manifest.json", "generate-api-ref-md-doc": "nyc jsdoc2md ./src/modules/*.ts > ./docs/api-reference.md || true", "compile": "tsc -b tsconfig.json", @@ -63,7 +63,7 @@ "test:unit": "mocha --timeout 10000 --forbid-only \"test/unit/**/*.test.ts\"", "test:unit:report": "nyc --extension .ts mocha --forbid-only \"test/unit/**/*.test.ts\"", "version": "oclif readme && git add README.md", - "clean": "rm -rf ./lib ./node_modules tsconfig.build.tsbuildinfo" + "clean": "rm -rf ./lib ./node_modules tsconfig.tsbuildinfo" }, "csdxConfig": { "expiredCommands": { diff --git a/packages/contentstack-seed/README.md b/packages/contentstack-seed/README.md index d2bb983a3..eb010e1dd 100644 --- a/packages/contentstack-seed/README.md +++ b/packages/contentstack-seed/README.md @@ -10,17 +10,17 @@ To import content to your stack, you can choose from the following two sources: ## Commands -* [`csdx cm:stacks:seed [--repo ] [--org ] [-k ] [-n ] [-y ] [-s ] [--locale ]`](#csdx-cmstacksseed---repo-value---org-value--k-value--n-value--y-value--s-value---locale-value) -* [`csdx cm:stacks:seed [--repo ] [--org ] [-k ] [-n ] [-y ] [-s ] [--locale ]`](#csdx-cmstacksseed---repo-value---org-value--k-value--n-value--y-value--s-value---locale-value) +* [`csdx cm:stacks:seed [--repo ] [--org ] [-k ] [-n ] [-y] [-s ] [--locale ]`](#csdx-cmstacksseed---repo-value---org-value--k-value--n-value--y--s-value---locale-value) +* [`csdx cm:stacks:seed [--repo ] [--org ] [-k ] [-n ] [-y] [-s ] [--locale ]`](#csdx-cmstacksseed---repo-value---org-value--k-value--n-value--y--s-value---locale-value) -## `csdx cm:stacks:seed [--repo ] [--org ] [-k ] [-n ] [-y ] [-s ] [--locale ]` +## `csdx cm:stacks:seed [--repo ] [--org ] [-k ] [-n ] [-y] [-s ] [--locale ]` Create a stack from existing content types, entries, assets, etc ``` USAGE - $ csdx cm:seed cm:stacks:seed [--repo ] [--org ] [-k ] [-n ] [-y ] [-s - ] [--locale ] + $ csdx cm:seed cm:stacks:seed [--repo ] [--org ] [-k ] [-n ] [-y] [-s ] + [--locale ] FLAGS -a, --alias= Alias of the management token @@ -29,7 +29,7 @@ FLAGS -o, --org= Provide Organization UID to create a new stack -r, --repo= GitHub organization name or GitHub user name/repository name. -s, --stack= Provide the stack UID to seed content. - -y, --yes= [Optional] Skip the stack confirmation. + -y, --yes [Optional] Skip the stack confirmation. DESCRIPTION Create a stack from existing content types, entries, assets, etc @@ -49,14 +49,14 @@ EXAMPLES $ csdx cm:stacks:seed --repo "account/repository" --org "your-org-uid" --stack-name "stack-name" //create a new stack in given org uid ``` -## `csdx cm:stacks:seed [--repo ] [--org ] [-k ] [-n ] [-y ] [-s ] [--locale ]` +## `csdx cm:stacks:seed [--repo ] [--org ] [-k ] [-n ] [-y] [-s ] [--locale ]` Create a stack from existing content types, entries, assets, etc ``` USAGE - $ csdx cm:stacks:seed [--repo ] [--org ] [-k ] [-n ] [-y ] [-s ] - [--locale ] + $ csdx cm:stacks:seed [--repo ] [--org ] [-k ] [-n ] [-y] [-s ] [--locale + ] FLAGS -a, --alias= Alias of the management token @@ -65,7 +65,7 @@ FLAGS -o, --org= Provide Organization UID to create a new stack -r, --repo= GitHub organization name or GitHub user name/repository name. -s, --stack= Provide the stack UID to seed content. - -y, --yes= [Optional] Skip the stack confirmation. + -y, --yes [Optional] Skip the stack confirmation. DESCRIPTION Create a stack from existing content types, entries, assets, etc diff --git a/packages/contentstack-seed/package.json b/packages/contentstack-seed/package.json index 7736e1dc6..e3ab61968 100644 --- a/packages/contentstack-seed/package.json +++ b/packages/contentstack-seed/package.json @@ -1,16 +1,16 @@ { "name": "@contentstack/cli-cm-seed", "description": "create a Stack from existing content types, entries, assets, etc.", - "version": "1.14.3", + "version": "1.15.0", "author": "Contentstack", "bugs": "https://github.com/contentstack/cli/issues", "dependencies": { - "@contentstack/cli-cm-import": "~1.31.3", - "@contentstack/cli-command": "~1.7.2", - "@contentstack/cli-utilities": "~1.17.4", + "@contentstack/cli-cm-import": "~1.32.0", + "@contentstack/cli-command": "~1.8.0", + "@contentstack/cli-utilities": "~1.18.0", "inquirer": "8.2.7", "mkdirp": "^1.0.4", - "tar": "^7.5.7", + "tar": "^7.5.11", "tmp": "^0.2.5" }, "devDependencies": { @@ -67,8 +67,8 @@ "postpack": "rm -f oclif.manifest.json", "prepack": "pnpm compile && oclif manifest && oclif readme", "version": "oclif readme && git add README.md", - "clean": "rm -rf ./lib ./node_modules tsconfig.build.tsbuildinfo", + "clean": "rm -rf ./lib ./node_modules tsconfig.tsbuildinfo", "compile": "tsc -b tsconfig.json", - "build": "pnpm compile" + "build": "pnpm compile && oclif manifest && oclif readme" } } diff --git a/packages/contentstack-seed/src/commands/cm/stacks/seed.ts b/packages/contentstack-seed/src/commands/cm/stacks/seed.ts index 44edbcbe7..da6563ce9 100644 --- a/packages/contentstack-seed/src/commands/cm/stacks/seed.ts +++ b/packages/contentstack-seed/src/commands/cm/stacks/seed.ts @@ -20,7 +20,7 @@ export default class SeedCommand extends Command { '$ csdx cm:stacks:seed --repo "account/repository" --org "your-org-uid" --stack-name "stack-name" //create a new stack in given org uid', ]; - static usage = 'cm:stacks:seed [--repo ] [--org ] [-k ] [-n ] [-y ] [-s ] [--locale ]'; + static usage = 'cm:stacks:seed [--repo ] [--org ] [-k ] [-n ] [-y] [-s ] [--locale ]'; static flags: FlagInput = { repo: flags.string({ @@ -59,7 +59,7 @@ export default class SeedCommand extends Command { required: false, hidden: true, }), - yes: flags.string({ + yes: flags.boolean({ char: 'y', required: false, description: '[Optional] Skip the stack confirmation.', @@ -80,6 +80,7 @@ export default class SeedCommand extends Command { }), locale: flags.string({ description: 'Master Locale of the stack', + default: 'en-us', hidden: true, }), }; @@ -106,7 +107,7 @@ export default class SeedCommand extends Command { stackUid: seedFlags['stack-api-key'] || seedFlags.stack, stackName: seedFlags['stack-name'], fetchLimit: seedFlags['fetch-limit'], - skipStackConfirmation: seedFlags['yes'], + skipStackConfirmation: seedFlags.yes, isAuthenticated: isAuthenticated(), alias: managementTokenAlias, master_locale: seedFlags['locale'], diff --git a/packages/contentstack-seed/src/seed/github/client.ts b/packages/contentstack-seed/src/seed/github/client.ts index 2bd9a7013..066913fb7 100644 --- a/packages/contentstack-seed/src/seed/github/client.ts +++ b/packages/contentstack-seed/src/seed/github/client.ts @@ -118,6 +118,26 @@ export default class GitHubClient { return false; } + async getMasterLocaleFromRepo(repo: string): Promise { + try { + const response = await this.httpClient.get( + `https://raw.githubusercontent.com/${this.username}/${repo}/main/stack/locales/master-locale.json`, + ); + + if (response.data) { + const localeData = response.data; + const localeKey = Object.keys(localeData)[0]; + if (localeKey && localeData[localeKey]?.code) { + return localeData[localeKey].code; + } + } + } catch (error) { + console.log('Could not fetch master locale from repository', error); + } + + return null; + } + async getLatestTarballUrl(repo: string) { try { const response = await this.httpClient.get(`${this.gitHubRepoUrl}/${repo}/releases/latest`); diff --git a/packages/contentstack-seed/src/seed/importer.ts b/packages/contentstack-seed/src/seed/importer.ts index ddeece2f4..e3b8b2b9b 100644 --- a/packages/contentstack-seed/src/seed/importer.ts +++ b/packages/contentstack-seed/src/seed/importer.ts @@ -1,3 +1,4 @@ +import * as fs from 'fs'; import * as process from 'process'; import * as path from 'path'; import ImportCommand from '@contentstack/cli-cm-import'; @@ -16,7 +17,13 @@ export interface ImporterOptions { } export async function run(options: ImporterOptions) { - const importPath = pathValidator(path.resolve(sanitizePath(options.tmpPath), STACK_FOLDER)); + const tmpPathResolved = path.resolve(sanitizePath(options.tmpPath)); + const stackPath = path.join(tmpPathResolved, STACK_FOLDER); + + // Support both structures: repo with stack/ folder (per docs) or content at root + const importPath = fs.existsSync(stackPath) + ? pathValidator(stackPath) + : pathValidator(tmpPathResolved); const args = options.alias ? ['-k', options.api_key, '-d', importPath, '--alias', options.alias!] diff --git a/packages/contentstack-seed/src/seed/index.ts b/packages/contentstack-seed/src/seed/index.ts index 4223acb0a..31e6fb9aa 100644 --- a/packages/contentstack-seed/src/seed/index.ts +++ b/packages/contentstack-seed/src/seed/index.ts @@ -27,7 +27,7 @@ export interface ContentModelSeederOptions { stackUid: string | undefined; stackName: string | undefined; fetchLimit: string | undefined; - skipStackConfirmation: string | undefined; + skipStackConfirmation: boolean | undefined; isAuthenticated: boolean | false; managementToken?: string | undefined; alias?: string | undefined; @@ -181,52 +181,24 @@ export default class ContentModelSeeder { } async shouldProceed(api_key: string) { - let count; const stack_details = await this.csClient.getStack(api_key); - if(this.options.master_locale != stack_details.master_locale){ - cliux.print(`Compass app requires the master locale to be set to English (en).`,{ - color: "yellow", - bold: true, - }); - return false; - } - const managementBody = { - "name":"Checking roles for creating management token", - "description":"This is a compass app management token.", - "scope":[ - { - "module":"content_type", - "acl":{ - "read":true, - "write":true - } - }, - { - "module":"branch", - "branches":[ - "main" - ], - "acl":{ - "read":true - } - } - ], - "expires_on": "3000-01-01", - "is_email_notification_enabled":false - } - let managementTokenResult = await this.csClient.createManagementToken(api_key, this.managementToken, managementBody); - if(managementTokenResult?.response_code == "161" || managementTokenResult?.response_code == "401"){ + const repoMasterLocale = await this.ghClient.getMasterLocaleFromRepo(this.ghRepo as string); + const expectedLocale = repoMasterLocale || this.options.master_locale || ENGLISH_LOCALE; + + if (stack_details.master_locale !== expectedLocale) { cliux.print( - `Info: Failed to generate a management token.\nNote: Management token is not available in your plan. Please contact the admin for support.`, + `Repository '${this.ghRepo}' requires the master locale to be set to '${expectedLocale}', but your stack has '${stack_details.master_locale}'.`, { - color: 'red', + color: 'yellow', + bold: true, }, ); return false; - } - count = await this.csClient.getContentTypeCount(api_key, this.managementToken); + } + + const count = await this.csClient.getContentTypeCount(api_key, this.managementToken); - if (count > 0 && this._options.skipStackConfirmation !== 'yes') { + if (count > 0 && !this._options.skipStackConfirmation) { const proceed = await inquireProceed(); if (!proceed) { diff --git a/packages/contentstack-seed/tests/seeder.test.ts b/packages/contentstack-seed/tests/seeder.test.ts index 10d1e2d7d..c9ca02f57 100644 --- a/packages/contentstack-seed/tests/seeder.test.ts +++ b/packages/contentstack-seed/tests/seeder.test.ts @@ -67,6 +67,8 @@ describe('ContentModelSeeder', () => { }); test('should automatically proceed when no content types', async () => { + ContentstackClient.prototype.getStack = jest.fn().mockResolvedValue({ master_locale: 'en-us' }); + GitHubClient.prototype.getMasterLocaleFromRepo = jest.fn().mockResolvedValue(null); ContentstackClient.prototype.getContentTypeCount = jest.fn().mockResolvedValue(0); const seeder = new ContentModelSeeder(options); @@ -76,6 +78,8 @@ describe('ContentModelSeeder', () => { }); test('should not proceed when content types exists and user cancels', async () => { + ContentstackClient.prototype.getStack = jest.fn().mockResolvedValue({ master_locale: 'en-us' }); + GitHubClient.prototype.getMasterLocaleFromRepo = jest.fn().mockResolvedValue(null); ContentstackClient.prototype.getContentTypeCount = jest.fn().mockResolvedValue(1); // @ts-ignore @@ -88,6 +92,8 @@ describe('ContentModelSeeder', () => { }); test('should proceed when content types exists and user accepts risk', async () => { + ContentstackClient.prototype.getStack = jest.fn().mockResolvedValue({ master_locale: 'en-us' }); + GitHubClient.prototype.getMasterLocaleFromRepo = jest.fn().mockResolvedValue(null); ContentstackClient.prototype.getContentTypeCount = jest.fn().mockResolvedValue(1); // @ts-ignore @@ -99,6 +105,19 @@ describe('ContentModelSeeder', () => { expect(proceed).toBe(true); }); + test('should skip confirmation when skipStackConfirmation is true', async () => { + ContentstackClient.prototype.getStack = jest.fn().mockResolvedValue({ master_locale: 'en-us' }); + GitHubClient.prototype.getMasterLocaleFromRepo = jest.fn().mockResolvedValue(null); + ContentstackClient.prototype.getContentTypeCount = jest.fn().mockResolvedValue(1); + + const optionsWithSkip = { ...options, skipStackConfirmation: true }; + const seeder = new ContentModelSeeder(optionsWithSkip); + const proceed = await seeder.shouldProceed(api_key); + + expect(proceed).toBe(true); + expect(inquireProceed).not.toHaveBeenCalled(); + }); + test('should create stack', async () => { ContentstackClient.prototype.createStack = jest.fn().mockResolvedValue({ api_key: api_key, diff --git a/packages/contentstack-variants/package.json b/packages/contentstack-variants/package.json index 22b628923..047a2cd8c 100644 --- a/packages/contentstack-variants/package.json +++ b/packages/contentstack-variants/package.json @@ -1,6 +1,6 @@ { "name": "@contentstack/cli-variants", - "version": "1.3.8", + "version": "1.4.0", "description": "Variants plugin", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -9,7 +9,7 @@ "prepack": "pnpm compile", "compile": "tsc -b tsconfig.json", "test": "mocha --require ts-node/register --forbid-only \"test/**/*.test.ts\"", - "clean": "rm -rf ./lib ./node_modules tsconfig.build.tsbuildinfo", + "clean": "rm -rf ./lib ./node_modules tsconfig.tsbuildinfo", "test:unit:report": "nyc --extension .ts mocha --require ts-node/register --forbid-only \"test/unit/**/*.test.ts\"" }, "keywords": [ @@ -18,7 +18,7 @@ "author": "antony.raj@contentstack.com", "license": "MIT", "devDependencies": { - "@contentstack/cli-dev-dependencies": "^1.3.0", + "@contentstack/cli-dev-dependencies": "^1.3.1", "@oclif/plugin-help": "^6.2.28", "@oclif/test": "^4.1.13", "@types/node": "^20.17.50", @@ -28,7 +28,7 @@ "typescript": "^5.8.3" }, "dependencies": { - "@contentstack/cli-utilities": "~1.17.4", + "@contentstack/cli-utilities": "~1.18.0", "@oclif/core": "^4.3.0", "@oclif/plugin-help": "^6.2.28", "lodash": "^4.17.23", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9ca841ad6..bb4399f6a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,6 +4,9 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +overrides: + picomatch: 4.0.4 + importers: .: @@ -106,7 +109,7 @@ importers: packages/contentstack-bootstrap: dependencies: '@contentstack/cli-cm-seed': - specifier: ~1.14.3 + specifier: ~1.15.0 version: link:../contentstack-seed '@contentstack/cli-command': specifier: ~1.7.2 @@ -130,8 +133,8 @@ importers: specifier: ^1.0.4 version: 1.0.4 tar: - specifier: ^7.5.7 - version: 7.5.9 + specifier: ^7.5.11 + version: 7.5.11 devDependencies: '@oclif/test': specifier: ^4.1.13 @@ -204,7 +207,7 @@ importers: version: 4.17.23 devDependencies: '@contentstack/cli-dev-dependencies': - specifier: ~1.3.0 + specifier: ^1.3.1 version: 1.3.1 '@types/flat': specifier: ^5.0.5 @@ -304,10 +307,10 @@ importers: specifier: ^1.6.0 version: 1.6.0 '@contentstack/cli-cm-export': - specifier: ~1.23.2 + specifier: ~1.24.0 version: link:../contentstack-export '@contentstack/cli-cm-import': - specifier: ~1.31.3 + specifier: ~1.32.0 version: link:../contentstack-import '@contentstack/cli-command': specifier: ~1.7.2 @@ -398,7 +401,7 @@ importers: specifier: ~1.17.4 version: 1.17.4(@types/node@22.19.12) '@contentstack/cli-variants': - specifier: ~1.3.8 + specifier: ~1.4.0 version: link:../contentstack-variants '@oclif/core': specifier: ^4.3.3 @@ -435,13 +438,13 @@ importers: version: 3.19.0 devDependencies: '@contentstack/cli-auth': - specifier: ~1.7.3 + specifier: ~1.7.2 version: 1.7.3(@types/node@22.19.12) '@contentstack/cli-config': specifier: ~1.19.0 version: 1.19.0(@types/node@22.19.12) '@contentstack/cli-dev-dependencies': - specifier: ~1.3.1 + specifier: ^1.3.1 version: 1.3.1 '@oclif/plugin-help': specifier: ^6.2.28 @@ -586,7 +589,7 @@ importers: packages/contentstack-import: dependencies: '@contentstack/cli-audit': - specifier: ~1.18.0 + specifier: ~1.19.0 version: link:../contentstack-audit '@contentstack/cli-command': specifier: ~1.7.2 @@ -595,7 +598,7 @@ importers: specifier: ~1.17.4 version: 1.17.4(@types/node@14.18.63)(debug@4.4.3) '@contentstack/cli-variants': - specifier: ~1.3.8 + specifier: ~1.4.0 version: link:../contentstack-variants '@oclif/core': specifier: ^4.3.0 @@ -877,7 +880,7 @@ importers: packages/contentstack-seed: dependencies: '@contentstack/cli-cm-import': - specifier: ~1.31.3 + specifier: ~1.32.0 version: link:../contentstack-import '@contentstack/cli-command': specifier: ~1.7.2 @@ -892,8 +895,8 @@ importers: specifier: ^1.0.4 version: 1.0.4 tar: - specifier: ^7.5.7 - version: 7.5.9 + specifier: ^7.5.11 + version: 7.5.11 tmp: specifier: ^0.2.5 version: 0.2.5 @@ -966,7 +969,7 @@ importers: version: 3.19.0 devDependencies: '@contentstack/cli-dev-dependencies': - specifier: ^1.3.0 + specifier: ^1.3.1 version: 1.3.1 '@oclif/test': specifier: ^4.1.13 @@ -2023,6 +2026,9 @@ packages: '@sinonjs/text-encoding@0.7.3': resolution: {integrity: sha512-DE427ROAphMQzU4ENbliGYrBSYPXF+TtLg9S8vzeA+OF4ZKzoDdzfL8sxuMUGS/lgRhM6j1URSk9ghf7Xo1tyA==} + deprecated: |- + Deprecated: no longer maintained and no longer used by Sinon packages. See + https://github.com/sinonjs/nise/issues/243 for replacement details. '@smithy/abort-controller@4.2.10': resolution: {integrity: sha512-qocxM/X4XGATqQtUkbE9SPUB6wekBi+FyJOMbPj0AhvyvFGYEmOlz6VB22iMePCQsFmMIvFSeViDvA7mZJG47g==} @@ -3932,7 +3938,7 @@ packages: resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} engines: {node: '>=12.0.0'} peerDependencies: - picomatch: ^3 || ^4 + picomatch: 4.0.4 peerDependenciesMeta: picomatch: optional: true @@ -4063,6 +4069,7 @@ packages: fs-then-native@2.0.0: resolution: {integrity: sha512-X712jAOaWXkemQCAmWeg5rOT2i+KOpWz1Z/txk/cW0qlOu2oQ9H61vc5w3X/iyuUEfq/OyaFJ78/cZAQD1/bgA==} engines: {node: '>=4.0.0'} + deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} @@ -5539,12 +5546,8 @@ packages: picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} - picomatch@2.3.1: - resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} - engines: {node: '>=8.6'} - - picomatch@4.0.3: - resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==} + picomatch@4.0.4: + resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==} engines: {node: '>=12'} pirates@4.0.7: @@ -6180,8 +6183,8 @@ packages: resolution: {integrity: sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==} engines: {node: '>=6'} - tar@7.5.9: - resolution: {integrity: sha512-BTLcK0xsDh2+PUe9F6c2TlRp4zOOBMTkoQHQIWSIzI0R7KG46uEwq4OPk2W7bZcprBMsuaeFsqwYr7pjh6CuHg==} + tar@7.5.11: + resolution: {integrity: sha512-ChjMH33/KetonMTAtpYdgUFr0tbz69Fp2v7zWxQfYZX4g5ZN2nOBXm1R2xyA+lMIKrLKIoKAwFj93jE/avX9cQ==} engines: {node: '>=18'} temp-path@1.0.0: @@ -6194,10 +6197,12 @@ packages: test-value@2.1.0: resolution: {integrity: sha512-+1epbAxtKeXttkGFMTX9H42oqzOTufR1ceCF+GYA5aOmvaPq9wd4PUS8329fn2RRLGNeUkgRLnVpycjx8DsO2w==} engines: {node: '>=0.10.0'} + deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. test-value@3.0.0: resolution: {integrity: sha512-sVACdAWcZkSU9x7AOmJo5TqE+GyNJknHaHsMrR6ZnhjVlVN9Yx6FjHrsKZ3BjIpPCT68zYesPWkakrNupwfOTQ==} engines: {node: '>=4.0.0'} + deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. text-hex@1.0.0: resolution: {integrity: sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==} @@ -8349,7 +8354,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 14.18.63 + '@types/node': 20.19.34 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -9015,7 +9020,7 @@ snapshots: eslint-visitor-keys: 4.2.1 espree: 10.4.0 estraverse: 5.3.0 - picomatch: 4.0.3 + picomatch: 4.0.4 transitivePeerDependencies: - supports-color - typescript @@ -9027,7 +9032,7 @@ snapshots: eslint-visitor-keys: 4.2.1 espree: 10.4.0 estraverse: 5.3.0 - picomatch: 4.0.3 + picomatch: 4.0.4 transitivePeerDependencies: - supports-color - typescript @@ -9040,7 +9045,7 @@ snapshots: eslint-visitor-keys: 4.2.1 espree: 10.4.0 estraverse: 5.3.0 - picomatch: 4.0.3 + picomatch: 4.0.4 '@szmarczak/http-timer@5.0.1': dependencies: @@ -9819,7 +9824,7 @@ snapshots: anymatch@3.1.3: dependencies: normalize-path: 3.0.0 - picomatch: 2.3.1 + picomatch: 4.0.4 append-transform@2.0.0: dependencies: @@ -10799,7 +10804,7 @@ snapshots: '@typescript-eslint/parser': 6.21.0(eslint@8.57.1)(typescript@5.9.3) eslint-config-xo-space: 0.35.0(eslint@8.57.1) eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.9.3))(eslint@8.57.1))(eslint@8.57.1) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.9.3))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1) eslint-plugin-mocha: 10.5.0(eslint@8.57.1) eslint-plugin-n: 15.7.0(eslint@8.57.1) eslint-plugin-perfectionist: 2.11.0(eslint@8.57.1)(typescript@5.9.3) @@ -10861,7 +10866,7 @@ snapshots: eslint-config-xo: 0.49.0(eslint@8.57.1) eslint-config-xo-space: 0.35.0(eslint@8.57.1) eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.9.3))(eslint@8.57.1))(eslint@8.57.1) - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.56.1(eslint@8.57.1)(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@8.56.1(eslint@8.57.1)(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.9.3))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1) eslint-plugin-jsdoc: 50.8.0(eslint@8.57.1) eslint-plugin-mocha: 10.5.0(eslint@8.57.1) eslint-plugin-n: 17.24.0(eslint@8.57.1)(typescript@5.9.3) @@ -10913,7 +10918,7 @@ snapshots: tinyglobby: 0.2.15 unrs-resolver: 1.11.1 optionalDependencies: - eslint-plugin-import: 2.32.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1) + eslint-plugin-import: 2.32.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.9.3))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1) transitivePeerDependencies: - supports-color @@ -11018,7 +11023,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.9.3))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -11076,7 +11081,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.56.1(eslint@8.57.1)(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.1): + eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.56.1(eslint@8.57.1)(typescript@5.9.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.9.3))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -11485,9 +11490,9 @@ snapshots: dependencies: bser: 2.1.1 - fdir@6.5.0(picomatch@4.0.3): + fdir@6.5.0(picomatch@4.0.4): optionalDependencies: - picomatch: 4.0.3 + picomatch: 4.0.4 fecha@4.2.3: {} @@ -12417,7 +12422,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 14.18.63 + '@types/node': 20.19.34 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -12530,7 +12535,7 @@ snapshots: chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 - picomatch: 2.3.1 + picomatch: 4.0.4 jest-validate@29.7.0: dependencies: @@ -12879,7 +12884,7 @@ snapshots: micromatch@4.0.8: dependencies: braces: 3.0.3 - picomatch: 2.3.1 + picomatch: 4.0.4 mime-db@1.52.0: {} @@ -13400,9 +13405,7 @@ snapshots: picocolors@1.1.1: {} - picomatch@2.3.1: {} - - picomatch@4.0.3: {} + picomatch@4.0.4: {} pirates@4.0.7: {} @@ -13533,7 +13536,7 @@ snapshots: readdirp@3.6.0: dependencies: - picomatch: 2.3.1 + picomatch: 4.0.4 recheck-jar@4.4.5: optional: true @@ -14072,7 +14075,7 @@ snapshots: tapable@2.3.0: {} - tar@7.5.9: + tar@7.5.11: dependencies: '@isaacs/fs-minipass': 4.0.1 chownr: 3.0.0 @@ -14120,8 +14123,8 @@ snapshots: tinyglobby@0.2.15: dependencies: - fdir: 6.5.0(picomatch@4.0.3) - picomatch: 4.0.3 + fdir: 6.5.0(picomatch@4.0.4) + picomatch: 4.0.4 tmp@0.0.33: dependencies: @@ -14161,12 +14164,12 @@ snapshots: ts-declaration-location@1.0.7(typescript@4.9.5): dependencies: - picomatch: 4.0.3 + picomatch: 4.0.4 typescript: 4.9.5 ts-declaration-location@1.0.7(typescript@5.9.3): dependencies: - picomatch: 4.0.3 + picomatch: 4.0.4 typescript: 5.9.3 ts-jest@29.4.6(@babel/core@7.29.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.29.0))(jest-util@29.7.0)(jest@29.7.0(@types/node@14.18.63)(ts-node@8.10.2(typescript@4.9.5)))(typescript@4.9.5): diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 18ec407ef..4ac3fe84f 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,2 +1,4 @@ packages: - 'packages/*' +overrides: + picomatch: 4.0.4