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. 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); - } - }); }); });