Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):**

Expand Down Expand Up @@ -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.

Expand Down
6 changes: 0 additions & 6 deletions packages/contentstack-auth/src/commands/auth/tokens/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ export default class TokensAddCommand extends BaseCommand<typeof TokensAddComman
description: 'Add the token name',
env: 'TOKEN',
}),
branch: flags.string({
required: false,
multiple: false,
description: 'Branch name',
hidden: true,
}),
};

static usage =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,6 @@ describe('Management and Delivery token flags', () => {
conf.validAPIKey,
'--token',
conf.validToken,
'--branch',
'main',
]);

assert.calledOnce(successStub);
Expand All @@ -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: [] });

Expand Down Expand Up @@ -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);
}
});
});
});
Loading