Skip to content

feat: migrate contentstack-cli-content-type v2 into cli-plugins monorepo#168

Merged
cs-raj merged 3 commits into
feat/migrate-external-cli-plugins-v2from
enhc/DX-7525
May 25, 2026
Merged

feat: migrate contentstack-cli-content-type v2 into cli-plugins monorepo#168
cs-raj merged 3 commits into
feat/migrate-external-cli-plugins-v2from
enhc/DX-7525

Conversation

@cs-raj
Copy link
Copy Markdown
Contributor

@cs-raj cs-raj commented May 24, 2026

Summary

Migrates the contentstack-cli-content-type standalone plugin into the cli-plugins pnpm monorepo at packages/contentstack-content-type. This is the v2-beta line of the plugin (version 2.0.0-beta.0), following the same pattern established by apps-cli and tsgen migrations.

The npm package name is unchanged (contentstack-cli-content-type). All 6 commands (content-type:list, details, audit, compare, compare-remote, diagram) and their flags are identical to the standalone version.


What's included

New package — packages/contentstack-content-type/

Area Details
Source src/commands/content-type/ (6 commands), src/core/, src/utils/, src/types/, src/config/
Tests 16 Jest + ts-jest test files under tests/ — commands, core logic, HTTP client, utils
Bin bin/run, bin/run.js, bin/run.cmd, bin/dev, bin/dev.js, bin/dev.cmd
Config package.json (v2.0.0-beta.0, pnpm-aligned scripts, monorepo repo/homepage), tsconfig.json (composite), jest.config.js, .eslintrc
Docs AGENTS.md, README.md, SECURITY.md, LICENSE, screenshots/
Skills 4 skill files under skills/ (dev-workflow, testing, code-review, contentstack-cli-content-type) — all updated to use pnpm commands and reference monorepo CI

Monorepo config changes

File Change
.github/workflows/unit-test.yml Added Run tests for Contentstack Content Type plugin step (npm run test:unit)
.github/workflows/release-v2-beta-plugins.yml Added Publishing content-type (Beta) step between query-export and apps-cli
.github/config/release.json Added "content-type": false to plugins object
pnpm-workspace.yaml Bumped tmp: 0.2.4 → 0.2.5 to align with package requirement
pnpm-lock.yaml Updated after pnpm install with new package dependencies
.talismanrc Updated pnpm-lock.yaml checksum
README.md Added content-type to Useful Plugins section
AGENTS.md Added Content Type plugin section with v1/v2 branch guidance, Jest note, migration doc link
CONTENT-TYPE-MIGRATION.md New migration guide at monorepo root (repo/issue tracking change, version lines, install, local dev, archive instructions)

Key decisions

  • Jest retained — the source plugin uses Jest + ts-jest with 80% global coverage thresholds. Unlike most other packages in this monorepo (Mocha + Chai), Jest is kept to avoid rewriting 16 test files. The CI step uses npm run test:unit consistent with monorepo convention.
  • Version 2.0.0-beta.0 — marks the first release from the monorepo on the v2-beta line; v1.x releases continue from v1-dev / main.

Test plan

  • pnpm --filter contentstack-cli-content-type run build completes without errors
  • pnpm --filter contentstack-cli-content-type run test — all 16 test files pass
  • pnpm --filter contentstack-cli-content-type run test:coverage — 80% global thresholds met
  • pnpm --filter contentstack-cli-content-type run lint — ESLint clean
  • NODE_ENV=PREPACK_MODE pnpm -r --sort run build (full monorepo build) passes
  • csdx plugins:link inside packages/contentstack-content-type then csdx content-type:list -a <alias> returns content types
  • Existing packages unaffected — no regressions in monorepo unit-test workflow

@github-actions
Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 0 25 ✅ Passed
🟡 Medium Severity 0 1 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

⚠️ Warning: The following vulnerabilities have exceeded their SLA thresholds (days since publication).

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 1 90 / 365 days ⚠️ Warning
🔵 Low 0 0 180 / 365 days ✅ Passed

ℹ️ Vulnerabilities Without Available Fixes (Informational Only)

The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:

  • Critical without fixes: 0
  • High without fixes: 0
  • Medium without fixes: 1
  • Low without fixes: 0

⚠️ BUILD PASSED WITH WARNINGS - SLA breaches detected for issues without available fixes

Consider reviewing these vulnerabilities when fixes become available.

@github-actions
Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 1 25 ✅ Passed
🟡 Medium Severity 0 2 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

⚠️ Warning: The following vulnerabilities have exceeded their SLA thresholds (days since publication).

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 1 90 / 365 days ⚠️ Warning
🔵 Low 0 0 180 / 365 days ✅ Passed

ℹ️ Vulnerabilities Without Available Fixes (Informational Only)

The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:

  • Critical without fixes: 0
  • High without fixes: 1
  • Medium without fixes: 2
  • Low without fixes: 0

⚠️ BUILD PASSED WITH WARNINGS - SLA breaches detected for issues without available fixes

Consider reviewing these vulnerabilities when fixes become available.

@cs-raj cs-raj marked this pull request as ready for review May 25, 2026 09:31
@cs-raj cs-raj requested a review from a team as a code owner May 25, 2026 09:31
@cs-raj cs-raj merged commit 4b41a77 into feat/migrate-external-cli-plugins-v2 May 25, 2026
6 of 7 checks passed
@cs-raj cs-raj deleted the enhc/DX-7525 branch May 25, 2026 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants