From 1876523214499c52633c9731924f260d4d9d9dc2 Mon Sep 17 00:00:00 2001 From: raj pandey Date: Mon, 3 Aug 2026 11:44:03 +0530 Subject: [PATCH 1/2] fix(DX-10057): remove dead --branch flag from auth:tokens:add MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The --branch flag was defined in the flags schema but never read in run() and never persisted in configHandler.set(). Token objects were always saved as { token, apiKey, type } or { token, apiKey, environment, type } — branch was never included. The feature was planned but never completed. Removed: - --branch flag definition in auth/tokens/add.ts - Two it.skip tests that only existed to test branch-on-token behaviour - --branch args from the one active test that passed them (test was asserting on errorStub which was never called, making it vacuous) Co-Authored-By: Claude Sonnet 4.6 --- .../src/commands/auth/tokens/add.ts | 6 --- .../test/unit/commands/tokens-add.test.ts | 40 ------------------- 2 files changed, 46 deletions(-) diff --git a/packages/contentstack-auth/src/commands/auth/tokens/add.ts b/packages/contentstack-auth/src/commands/auth/tokens/add.ts index 015361c584..c1d932aac3 100644 --- a/packages/contentstack-auth/src/commands/auth/tokens/add.ts +++ b/packages/contentstack-auth/src/commands/auth/tokens/add.ts @@ -50,12 +50,6 @@ export default class TokensAddCommand extends BaseCommand { conf.validAPIKey, '--token', conf.validToken, - '--branch', - 'main', ]); assert.calledOnce(successStub); @@ -270,24 +268,6 @@ describe('Management and Delivery token flags', () => { } }); - it.skip('Should add a token successfully after all the values are passed with stack having branches enabled', async () => { - nock('https://api.contentstack.io').get('/v3/environments').query({ limit: 1 }).reply(200, { environments: [] }); - - await TokensAddCommand.run([ - '--management', - '--alias', - 'newToken', - '--stack-api-key', - conf.validAPIKey, - '--token', - conf.validToken, - '--branch', - 'main', - ]); - - assert.calledOnce(successStub); - }); - it.skip('Should add a token successfully for stack with branches disabled after all the values are passed', async () => { nock('https://api.contentstack.io').get('/v3/environments').query({ limit: 1 }).reply(200, { environments: [] }); @@ -364,25 +344,5 @@ describe('Management and Delivery token flags', () => { ]); assert.calledWith(successStub, 'CLI_AUTH_TOKENS_ADD_SUCCESS'); }); - it('Should throw and error for stack with branches disabled', async () => { - let branch = 'my-branch'; - try { - await TokensAddCommand.run([ - '--delivery', - '--alias', - 'newToken', - '--stack-api-key', - process.env.BRANCH_DISABLED_API_KEY!, - '--token', - process.env.BRANCH_DISABLED_DELIVERY_TOKEN!, - '--environment', - process.env.BRANCH_DISABLED_ENVIRONMENT!, - '--branch', - branch, - ]); - } catch (error: any) { - assert.calledOnce(errorStub); - } - }); }); }); From 9cdf531d7f4109fd9b0df163509666c6f0967c0a Mon Sep 17 00:00:00 2001 From: raj pandey Date: Tue, 4 Aug 2026 14:49:54 +0530 Subject: [PATCH 2/2] docs(DX-10057): fix 3 stale errors in MIGRATION.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - cm:migration alias: correct exception note — alias was removed, not preserved - Seed curated list: 4 repos → 3 repos, remove stack-starter-app entry - Bootstrap flags: --appType / -s is removed (no replacement), not renamed to --app-type - Strip internal ticket reference from stack-starter-app note Co-Authored-By: Claude Sonnet 4.6 --- MIGRATION.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/MIGRATION.md b/MIGRATION.md index cdd71252e3..a4f9a454ae 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -372,7 +372,7 @@ Several short-form command aliases that worked in V1 no longer exist in V2. Runn | `csdx audit` | `csdx cm:stacks:audit` | | `csdx audit:fix` | `csdx cm:stacks:audit:fix` | -> ✅ **Exception:** `csdx cm:migration` is the one V1 alias that **survived** — it still works in V2. +> ❌ **Note:** `csdx cm:migration` was also removed in V2 — use `csdx cm:stacks:migration` instead. **Before (1.x.x):** ```bash @@ -518,7 +518,7 @@ csdx config:set:log --no-show-console-logs |---|---| | `--appName` / `-a` | `--app-name` | | `--directory` / `-d` | `--project-dir` | -| `--appType` / `-s` | `--app-type` | +| `--appType` / `-s` | *(removed — no replacement needed)* | **Removed `--app-name` values (13 total):** @@ -561,20 +561,21 @@ csdx cm:bootstrap --appName reactjs --directory ./myapp --appType sampleapp csdx cm:bootstrap --app-name compass-app --project-dir ./myapp ``` -**Migration Action:** Replace removed `--app-name` values with one of the 8 valid V2 app names. Update `--appName` → `--app-name`, `--directory` → `--project-dir`, `--appType` → `--app-type`. +**Migration Action:** Replace removed `--app-name` values with one of the 8 valid V2 app names. Update `--appName` → `--app-name`, `--directory` → `--project-dir`. Remove any `--appType` / `-s` usage — the flag no longer exists and app type is hardcoded internally. --- -### 17. 🌱 Seed Stack List Is Now Curated (4 Stacks Only) +### 17. 🌱 Seed Stack List Is Now Curated (3 Stacks Only) **What Changed:** -In V1, running `csdx cm:stacks:seed` without `--repo` triggered a live GitHub API search and presented all matching Contentstack repositories. In V2, the list is fixed — only 4 curated repos are shown in the interactive picker. +In V1, running `csdx cm:stacks:seed` without `--repo` triggered a live GitHub API search and presented all matching Contentstack repositories. In V2, the list is fixed — only 3 curated repos are shown in the interactive picker. **V2 curated list:** 1. `contentstack/kickstart-stack-seed` — Kickstart stack seed 2. `contentstack/kickstart-veda-seed` — Kickstart Veda 3. `contentstack/compass-starter-stack` — Compass starter stack -4. `contentstack/stack-starter-app` — Starter app + +> **Note:** `contentstack/stack-starter-app` was removed from the curated list. If you need it, pass it directly via `--repo contentstack/stack-starter-app`. If you previously relied on the interactive list to discover repos, those repos no longer appear. Any script that passed a repo name not in this list via the interactive prompt will now time out or fail.