diff --git a/.github/config/release.json b/.github/config/release.json index a63e81c81e..db275fed62 100755 --- a/.github/config/release.json +++ b/.github/config/release.json @@ -5,17 +5,7 @@ "command": false, "config": false, "auth": false, - "export": false, - "import": false, - "clone": false, - "export-to-csv": false, - "migration": false, - "seed": false, - "bootstrap": false, - "bulk-publish": false, "dev-dependencies": false, - "launch": false, - "branches": false, "core": false } } diff --git a/.github/workflows/release-beta.yml b/.github/workflows/release-beta.yml deleted file mode 100644 index b7a490a30d..0000000000 --- a/.github/workflows/release-beta.yml +++ /dev/null @@ -1,352 +0,0 @@ -name: Release CLI Plugins (Beta) - -on: - push: - branches: [v2-beta] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v4 - with: - version: 7 - - uses: actions/setup-node@v4 - with: - node-version: '22.x' - - - name: Enable Corepack - run: corepack enable - - - name: Install pnpm - run: corepack prepare pnpm@7 --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 - - # Dev Dependencies - - name: Installing dependencies of dev dependencies - id: dev-dependencies-installation - if: ${{env.release_releaseAll == 'true' || env.release_plugins_dev-dependencies == 'true'}} - working-directory: ./packages/contentstack-dev-dependencies - run: npm install - - name: Compiling dev dependencies - if: ${{ steps.dev-dependencies-installation.conclusion == 'success' }} - working-directory: ./packages/contentstack-dev-dependencies - run: npm run prepack - - name: Publishing dev dependencies (Beta) - uses: JS-DevTools/npm-publish@v3 - if: ${{ steps.dev-dependencies-installation.conclusion == 'success' }} - with: - token: ${{ secrets.NPM_TOKEN }} - package: ./packages/contentstack-dev-dependencies/package.json - tag: beta - - # Utilities - - name: Installing dependencies of utilities - id: utilities-installation - if: ${{env.release_releaseAll == 'true' || env.release_plugins_utilities == 'true'}} - working-directory: ./packages/contentstack-utilities - run: npm install - - name: Compiling utilities - if: ${{ steps.utilities-installation.conclusion == 'success' }} - working-directory: ./packages/contentstack-utilities - run: npm run prepack - - name: Publishing utilities (Beta) - uses: JS-DevTools/npm-publish@v3 - if: ${{ steps.utilities-installation.conclusion == 'success' }} - with: - token: ${{ secrets.NPM_TOKEN }} - package: ./packages/contentstack-utilities/package.json - tag: beta - - # 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 - - # Command - - name: Installing dependencies of command - id: command-installation - if: ${{env.release_releaseAll == 'true' || env.release_plugins_command == 'true'}} - working-directory: ./packages/contentstack-command - run: npm install - - name: Compiling command - if: ${{ steps.command-installation.conclusion == 'success' }} - working-directory: ./packages/contentstack-command - run: npm run prepack - - name: Publishing command (Beta) - uses: JS-DevTools/npm-publish@v3 - if: ${{ steps.command-installation.conclusion == 'success' }} - with: - token: ${{ secrets.NPM_TOKEN }} - package: ./packages/contentstack-command/package.json - tag: beta - - # Config - - name: Installing dependencies of config - id: config-installation - if: ${{env.release_releaseAll == 'true' || env.release_plugins_config == 'true'}} - working-directory: ./packages/contentstack-config - run: npm install - - name: Compiling config - if: ${{ steps.config-installation.conclusion == 'success' }} - working-directory: ./packages/contentstack-config - run: npm run prepack - - name: Publishing config (Beta) - uses: JS-DevTools/npm-publish@v3 - if: ${{ steps.config-installation.conclusion == 'success' }} - with: - token: ${{ secrets.NPM_TOKEN }} - package: ./packages/contentstack-config/package.json - tag: beta - - # Auth - - name: Installing dependencies of auth - id: auth-installation - if: ${{env.release_releaseAll == 'true' || env.release_plugins_auth == 'true'}} - working-directory: ./packages/contentstack-auth - run: npm install - - name: Compiling auth - if: ${{ steps.auth-installation.conclusion == 'success' }} - working-directory: ./packages/contentstack-auth - run: npm run prepack - - name: Publishing auth (Beta) - uses: JS-DevTools/npm-publish@v3 - if: ${{ steps.auth-installation.conclusion == 'success' }} - with: - token: ${{ secrets.NPM_TOKEN }} - package: ./packages/contentstack-auth/package.json - 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: Compiling Clone - if: ${{ steps.clone-installation.conclusion == 'success' }} - working-directory: ./packages/contentstack-clone - run: npm run prepack - - 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 - - # 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 - - # Core CLI - - name: Installing dependencies of core - id: core-installation - if: ${{env.release_releaseAll == 'true' || env.release_plugins_core == 'true'}} - working-directory: ./packages/contentstack - run: npm install - - name: Compiling core - if: ${{ steps.core-installation.conclusion == 'success' }} - working-directory: ./packages/contentstack - run: npm run prepack - - name: Publishing core (Beta) - id: publish-core - uses: JS-DevTools/npm-publish@v3 - if: ${{ steps.core-installation.conclusion == 'success' }} - with: - token: ${{ secrets.NPM_TOKEN }} - package: ./packages/contentstack/package.json - tag: beta - - - name: Create Beta Release - if: ${{ steps.publish-core.conclusion == 'success' }} - id: create_release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_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/.github/workflows/release-v2-beta-core.yml b/.github/workflows/release-v2-beta-core.yml new file mode 100644 index 0000000000..fb6b65a193 --- /dev/null +++ b/.github/workflows/release-v2-beta-core.yml @@ -0,0 +1,69 @@ +name: Release CLI Core (v2 Beta) + +on: + workflow_dispatch: + push: + branches: [v2-beta] + paths: + - 'packages/contentstack/package.json' + +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: Reading Configuration + id: release_config + uses: rgarcia-phi/json-to-variables@v1.1.0 + with: + filename: .github/config/release.json + prefix: release + + # Core CLI + - name: Install all dependencies + id: core-installation + if: ${{env.release_releaseAll == 'true' || env.release_plugins_core == 'true'}} + run: pnpm install --frozen-lockfile + + - name: Build all packages + run: pnpm -r --concurrency 1 run build + + - name: Publishing core (Beta) + id: publish-core + uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} + package: ./packages/contentstack/package.json + tag: beta + + - name: Create Core Beta Release + id: create_release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VERSION: ${{ steps.publish-core.outputs.version }} + run: | + TAG="core@v${VERSION}" + if gh release view "$TAG" &>/dev/null; then + echo "Release $TAG already exists — skipping." + else + gh release create "$TAG" \ + --title "Core Beta $VERSION" \ + --generate-notes \ + --prerelease + fi diff --git a/.github/workflows/release-v2-beta-platform-plugins.yml b/.github/workflows/release-v2-beta-platform-plugins.yml new file mode 100644 index 0000000000..c781280a5f --- /dev/null +++ b/.github/workflows/release-v2-beta-platform-plugins.yml @@ -0,0 +1,79 @@ +name: Release CLI Platform Plugins (v2 Beta) + +on: + push: + branches: [v2-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: Clean the repository + run: pnpm run clean:all + + - name: Install root dependencies + run: pnpm install --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 + + # Dev Dependencies + - name: Publishing dev dependencies (Beta) + uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} + package: ./packages/contentstack-dev-dependencies/package.json + tag: beta + + # Utilities + - name: Publishing utilities (Beta) + uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} + package: ./packages/contentstack-utilities/package.json + tag: beta + + # Command + - name: Publishing command (Beta) + uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} + package: ./packages/contentstack-command/package.json + tag: beta + + # Config + - name: Publishing config (Beta) + uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} + package: ./packages/contentstack-config/package.json + tag: beta + + # Auth + - name: Publishing auth (Beta) + uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} + package: ./packages/contentstack-auth/package.json + tag: beta diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index fc76cf4562..800d7b9bba 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -11,101 +11,38 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 10.28.0 # or your local pnpm version + - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: '22.x' + cache: 'pnpm' # optional but recommended + + # - name: Temporarily disable contentstack package + # run: mv packages/contentstack/package.json packages/contentstack/package.json.disabled || true + + - name: Install Dependencies (Excluding Contentstack) + run: pnpm install --frozen-lockfile - - name: Install dependencies for all plugins + - name: Build all plugins (Excluding Contentstack) run: | - NODE_ENV=PREPACK_MODE npm run setup-repo-old + NODE_ENV=PREPACK_MODE pnpm -r --sort run build + + # - name: Restore contentstack package + # run: mv packages/contentstack/package.json.disabled packages/contentstack/package.json || true - name: Run tests for Contentstack Command working-directory: ./packages/contentstack-command run: npm run test:unit - - name: Run tests for Contentstack Import Plugin - working-directory: ./packages/contentstack-import - run: npm run test:unit - - - name: Run tests for Contentstack Export Plugin - working-directory: ./packages/contentstack-export - run: npm run test:unit - - - name: Run tests for Audit plugin - working-directory: ./packages/contentstack-audit - run: npm run test:unit - - name: Run tests for Contentstack Config working-directory: ./packages/contentstack-config run: npm run test:unit - - name: Run tests for Contentstack Migration - working-directory: ./packages/contentstack-migration - run: npm run test - - - name: Run tests for Contentstack Export To CSV - working-directory: ./packages/contentstack-export-to-csv - run: NODE_ENV=PREPACK_MODE npm run test:unit - - - name: Run tests for Contentstack Bootstrap - working-directory: ./packages/contentstack-bootstrap - run: npm run test - - name: Run tests for Contentstack Auth working-directory: ./packages/contentstack-auth - run: NODE_ENV=PREPACK_MODE npm run test - - # - name: Run tests for Contentstack Import Setup - # working-directory: ./packages/contentstack-import-setup - # run: npm run test:unit - - # TODO: Uncomment this when the tests are fixed - # - name: Run tests for Contentstack Bulk Publish - # working-directory: ./packages/contentstack-bulk-publish - # run: npm run test:unit - - - name: Run tests for Contentstack Branches - working-directory: ./packages/contentstack-branches - run: npm run test:unit - - - name: Run tests for Contentstack Clone - working-directory: ./packages/contentstack-clone - run: npm run test:unit - - # - name: Fetch latest references - # run: | - # git fetch --prune - - # - name: Identify Changed Plugins - # id: changes - # run: | - # echo "Finding changed files..." - # # Ensure both commit references are valid - # if [[ -z "${{ github.event.before }}" || -z "${{ github.sha }}" ]]; then - # echo "Error: Missing commit references" - # exit 1 - # fi - - # CHANGED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }}) - # echo "Changed files:" - # echo "$CHANGED_FILES" - - # # Identify affected plugins - # AFFECTED_PLUGINS=$(echo "$CHANGED_FILES" | grep -oP '(?<=^packages/)([^/]+)' | sort -u | tr '\n' ' ') - # echo "Affected plugins: $AFFECTED_PLUGINS" - - # # Set output for the next step - # echo "::set-output name=affected_plugins::$AFFECTED_PLUGINS" - - # - name: Run Unit Tests for Affected Plugins - # run: | - # for plugin in ${{ steps.changes.outputs.affected_plugins }}; do - # echo "Checking if tests should run for $plugin..." - # if [[ "$plugin" == "contentstack-audit" ]]; then - # echo "Running tests for contentstack-audit..." - # npm run test:unit --prefix ./packages/contentstack-audit - # else - # echo "contentstack-audit has not changed. Skipping tests." - # fi - # done \ No newline at end of file + run: NODE_ENV=PREPACK_MODE npm run test:unit diff --git a/.gitignore b/.gitignore index 5f12fba08a..0e1ca7354a 100644 --- a/.gitignore +++ b/.gitignore @@ -25,4 +25,5 @@ snyk_output.log .cursor/rules/snyk_rules.mdc **/migration-logs **/migration-logs/** -*.logs \ No newline at end of file +*.logs +tsconfig.tsbuildinfo \ No newline at end of file diff --git a/.npmrc b/.npmrc index a0134a1abf..b49c801acf 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,9 @@ -# shamefully-hoist=true \ No newline at end of file +# Use workspace protocol for local development +link-workspace-packages=true +prefer-workspace-packages=true + +# Hoist dependencies to root node_modules +shamefully-hoist=true + +# Use strict peer dependencies +strict-peer-dependencies=false diff --git a/.talismanrc b/.talismanrc index 6cf7ed6af3..e34b538ee0 100644 --- a/.talismanrc +++ b/.talismanrc @@ -2,5 +2,5 @@ fileignoreconfig: - filename: package-lock.json checksum: a76d549ee4cbf3da65907ccf49fd0f2e5027f39be8c7ac431e7e38c9b1b5df8e - filename: pnpm-lock.yaml - checksum: 6fe43d681f940f941c2a30d9cb6352b19705e006581d853a53eac64424d27f99 + checksum: 5d851b8f76611e4e99c2ef445f7a10ebc0e923d8304ed18ea220ac502f66bfc3 version: '1.0' diff --git a/install.sh b/install.sh index ca06650e70..54592a37c3 100755 --- a/install.sh +++ b/install.sh @@ -1,7 +1,7 @@ #!/bin/bash echo 'Installing Contentstack CLI' -npm run setup-repo || { echo -e '\e[31mFailed to install root dependencies.' && exit 1; } +npm run setup || { echo -e '\e[31mFailed to install root dependencies.' && exit 1; } echo 'Installtion, Done!!!' cd packages/contentstack || { echo -e '\e[31mCould not found the working directory.' && exit 1; } ./bin/run --help \ No newline at end of file diff --git a/package.json b/package.json index 2b13e8571f..4ae6360da0 100644 --- a/package.json +++ b/package.json @@ -3,26 +3,27 @@ "version": "1.0.0", "devDependencies": { "husky": "^9.1.7", - "pnpm": "^7.33.7" + "pnpm": "^10.28.0" }, "engines": { "node": ">=18.0.0" }, "private": true, "scripts": { - "cache:clear": "pnpm store prune", - "clean": "pnpm --filter './packages/*' -w clean", - "bootstrap": "pnpm install --no-frozen-lockfile", - "prepack": "pnpm --filter \"./packages/*\" -w prepack", - "test": "pnpm --filter './packages/*' -w test:unit", - "package-lock-only": "npm i --package-lock-only --workspaces", - "setup-repo-old": "npm i && pnpm package-lock-only && pnpm clean && pnpm install --no-frozen-lockfile && pnpm prepack", - "clean-repo": "rm -rf ./package-lock.json ./node_modules ./packages/**/node_modules ./packages/**/.nyc_output ./packages/**/package-lock.json", - "preinstall-clean": "npm run clean-repo && npm cache clean --force && npx pnpm store prune", - "setup-repo": "npm run preinstall-clean && npm i && npm run package-lock-only && npm run clean && pnpm install --no-frozen-lockfile && npm run prepack", - "prepare": "npx husky && chmod +x .husky/pre-commit" + "clean:packages": "pnpm -r --filter './packages/*' run clean", + "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:packages", + "setup": "pnpm run clean:all && pnpm run bootstrap && pnpm run build", + "prepare": "npx husky && chmod +x .husky/pre-commit", + "update:lockfile": "pnpm install --lockfile-only" }, "license": "MIT", + "packageManager": "pnpm@10.28.0", "workspaces": [ "packages/*" ] diff --git a/packages/contentstack-audit/.eslintignore b/packages/contentstack-audit/.eslintignore deleted file mode 100644 index 9b1c8b133c..0000000000 --- a/packages/contentstack-audit/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -/dist diff --git a/packages/contentstack-audit/.eslintrc b/packages/contentstack-audit/.eslintrc deleted file mode 100644 index 7b846193cc..0000000000 --- a/packages/contentstack-audit/.eslintrc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": [ - "oclif", - "oclif-typescript" - ] -} diff --git a/packages/contentstack-audit/.gitignore b/packages/contentstack-audit/.gitignore deleted file mode 100644 index 12a68582ef..0000000000 --- a/packages/contentstack-audit/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -*-debug.log -*-error.log -/.nyc_output -/dist -/lib -/package-lock.json -/tmp -/yarn.lock -node_modules -oclif.manifest.json -.env -*.log -tsconfig.tsbuildinfo -dependabot.yml -.vscode -*.todo -/bkp -.editorconfig -oclif.manifest.json -*.env -.vscode/ -audit-report \ No newline at end of file diff --git a/packages/contentstack-audit/.mocharc.json b/packages/contentstack-audit/.mocharc.json deleted file mode 100644 index 4a09d14464..0000000000 --- a/packages/contentstack-audit/.mocharc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "require": [ - "test/helpers/init.js", - "ts-node/register" - ], - "watch-extensions": [ - "ts" - ], - "recursive": true, - "reporter": "spec", - "timeout": 60000 -} diff --git a/packages/contentstack-audit/LICENSE b/packages/contentstack-audit/LICENSE deleted file mode 100644 index 13a5837088..0000000000 --- a/packages/contentstack-audit/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2026 Contentstack - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/packages/contentstack-audit/README.md b/packages/contentstack-audit/README.md deleted file mode 100644 index a5f3d87eee..0000000000 --- a/packages/contentstack-audit/README.md +++ /dev/null @@ -1,161 +0,0 @@ - - - -# @contentstack/cli-audit - -Audit plugin - -## How to install this plugin - -```shell -$ csdx plugins:install @contentstack/cli-audit -``` - -## How to use this plugin - - -```sh-session -$ npm install -g @contentstack/cli-audit -$ csdx COMMAND -running command... -$ csdx (--version|-v) -@contentstack/cli-audit/2.0.0-beta.3 darwin-arm64 node-v22.13.1 -$ csdx --help [COMMAND] -USAGE - $ csdx COMMAND -... -``` - - -# Commands - - -* [`csdx cm:stacks:audit`](#csdx-cmstacksaudit) -* [`csdx cm:stacks:audit:fix`](#csdx-cmstacksauditfix) -* [`csdx help [COMMAND]`](#csdx-help-command) - -## `csdx cm:stacks:audit` - -Perform audits and find possible errors in the exported Contentstack data - -``` -USAGE - $ csdx cm:stacks:audit [-c ] [-d ] [--show-console-output] [--report-path ] [--modules - content-types|global-fields|entries|extensions|workflows|custom-roles|assets|field-rules|composable-studio...] - [--columns ] [--sort ] [--filter ] [--csv] [--no-truncate] [--no-header] [--output - csv|json|yaml] - -FLAGS - --modules=