Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
41fe965
removed plugins and updated workflows
shafeeqd959 Feb 26, 2026
760d652
updated installation script
shafeeqd959 Feb 26, 2026
9b9db77
update unit test workflow
shafeeqd959 Feb 26, 2026
36810a1
update unit test workflow
shafeeqd959 Feb 26, 2026
e6af960
updated workflows
shafeeqd959 Mar 2, 2026
5cf2d0f
updated release flow
shafeeqd959 Mar 2, 2026
9fa8a75
fixed unit test cases
shafeeqd959 Mar 2, 2026
d9ee237
updated clean script
shafeeqd959 Mar 3, 2026
a39f041
updated build with oclif manifest
shafeeqd959 Mar 3, 2026
7615b9c
added update lock file script
shafeeqd959 Mar 3, 2026
ec8d622
update unit test workflow
shafeeqd959 Mar 5, 2026
f955291
updated config test script
shafeeqd959 Mar 5, 2026
b19d6e1
updated config test script
shafeeqd959 Mar 5, 2026
41de899
update tesconfig
shafeeqd959 Mar 5, 2026
2047e3f
update tesconfig
shafeeqd959 Mar 5, 2026
c21518c
fixed test cases
shafeeqd959 Mar 5, 2026
2c27390
fixed test cases
shafeeqd959 Mar 5, 2026
f205c57
fixed test cases
shafeeqd959 Mar 5, 2026
78a15a9
fixed test cases
shafeeqd959 Mar 5, 2026
35f9dcd
update unit testcase yml
shafeeqd959 Mar 5, 2026
652ca0c
updated unit testcase yml
shafeeqd959 Mar 5, 2026
f12c92a
updated unit testcase yml
shafeeqd959 Mar 5, 2026
8be1c79
updated unit testcase yml
shafeeqd959 Mar 5, 2026
423fee8
updated unit testcase yml
shafeeqd959 Mar 5, 2026
24f861a
updated unit testcase yml
shafeeqd959 Mar 5, 2026
5433c42
updated unit testcase yml
shafeeqd959 Mar 5, 2026
0bc99fb
updated unit testcase yml
shafeeqd959 Mar 5, 2026
3d8042c
updated unit testcase yml
shafeeqd959 Mar 5, 2026
cb6fb36
bumped version
shafeeqd959 Mar 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/policy-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ jobs:
if [ "$license_file_found" = false ]; then
echo "No license file found. Please add a license file to the repository."
exit 1
fi
fi
71 changes: 71 additions & 0 deletions .github/workflows/release-v1-beta-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Release CLI Core (v1 Beta)

on:
push:
branches: [v1-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: 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

# 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 Core Beta Release
if: ${{ steps.publish-core.conclusion == 'success' }}
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.PKG_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
123 changes: 123 additions & 0 deletions .github/workflows/release-v1-beta-platform-plugins.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: Release CLI Platform Plugins (v1 Beta)

on:
push:
branches: [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

# 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

# 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
102 changes: 18 additions & 84 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,104 +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: Install dependencies for all plugins
run: |
NODE_ENV=PREPACK_MODE npm run setup-repo-old
# - name: Temporarily disable contentstack package
# run: mv packages/contentstack/package.json packages/contentstack/package.json.disabled || true

- name: Run tests for Contentstack Command
working-directory: ./packages/contentstack-command
run: npm run test:unit
- name: Install Dependencies (Excluding Contentstack)
run: pnpm install --frozen-lockfile

- name: Run tests for Contentstack Import Plugin
working-directory: ./packages/contentstack-import
run: npm run test:unit
- name: Build all plugins (Excluding Contentstack)
run: |
NODE_ENV=PREPACK_MODE pnpm -r --sort run build

- name: Run tests for Contentstack Export Plugin
working-directory: ./packages/contentstack-export
run: npm run test:unit
# - name: Restore contentstack package
# run: mv packages/contentstack/package.json.disabled packages/contentstack/package.json || true

- name: Run tests for Audit plugin
working-directory: ./packages/contentstack-audit
- name: Run tests for Contentstack Command
working-directory: ./packages/contentstack-command
run: npm run test:unit

- name: Run tests for Contentstack Config
working-directory: ./packages/contentstack-config
run: npm run test

- name: Run tests for Contentstack Migrate RTE
working-directory: ./packages/contentstack-migrate-rte
run: npm run test

- 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: 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: npm run test:unit

# - name: Run tests for Contentstack Import Setup
# working-directory: ./packages/contentstack-import-setup
# run: npm run test:unit

- 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
run: NODE_ENV=PREPACK_MODE npm run test:unit
10 changes: 9 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
# shamefully-hoist=true
# 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
12 changes: 6 additions & 6 deletions .talismanrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
fileignoreconfig:
- filename: package-lock.json
checksum: c91b9e5fba1c84c0b6de15ad2f8cce698a5c781c9db31bebb7a3ad63ee88d9e1
- filename: pnpm-lock.yaml
checksum: 8405d813bbcc584a7540542acfdbc27f5b8768da60354b7eff9f6cd93c3d832d
- filename: packages/contentstack-bootstrap/src/bootstrap/utils.ts
checksum: 6e6fb00bb11b03141e5ad27eeaa4af9718dc30520c3e73970bc208cc0ba2a7d2
- filename: package-lock.json
checksum: c91b9e5fba1c84c0b6de15ad2f8cce698a5c781c9db31bebb7a3ad63ee88d9e1
- filename: pnpm-lock.yaml
checksum: cd3f55a64a28b62847a9519afe256177012e2e57a9dd17268b6aa3dcd95c92f7
- filename: packages/contentstack-bootstrap/src/bootstrap/utils.ts
checksum: 6e6fb00bb11b03141e5ad27eeaa4af9718dc30520c3e73970bc208cc0ba2a7d2
version: '1.0'
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
@@ -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
Loading
Loading