Skip to content

Commit 8cc80f6

Browse files
authored
Merge pull request #219 from contentstack/feat/externl-migrate-plugin
Introduced a new plugin - contentstack/cli-external-migrate
2 parents 6fec30c + 47d8e8e commit 8cc80f6

112 files changed

Lines changed: 31565 additions & 16 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/release-production-plugins.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,14 @@ jobs:
191191
package: ./packages/contentstack-cli-tsgen/package.json
192192
tag: latest
193193

194+
# External Migrate
195+
- name: Publishing external-migrate (Production)
196+
uses: JS-DevTools/npm-publish@v3
197+
with:
198+
token: ${{ secrets.NPM_TOKEN }}
199+
package: ./packages/contentstack-external-migrate/package.json
200+
tag: latest
201+
194202
- name: Create Production Release
195203
id: create_release
196204
env:

.talismanrc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
fileignoreconfig:
2-
- filename: packages/contentstack-import/src/import/modules/webhooks.ts
3-
checksum: 8c9527f966fe24debfb36d96a280ac3b2dd6494a58128380c69d7475e595436d
4-
- filename: packages/contentstack-import/test/unit/import/modules/webhooks.test.ts
5-
checksum: 3924a3e38211b8554f25365fe3100cb83361d03370fdaa77e5c7f9e74abafcee
2+
- filename: pnpm-lock.yaml
3+
checksum: 07642e8dd04d580185a459e5b088d8a1bb4e91be4e04f4842bf4fe4775205bf6
64
version: '1.0'

packages/contentstack-apps-cli/src/util/common-utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function fetchAppInstallations(
120120
flags: FlagInput,
121121
orgUid: string,
122122
options: MarketPlaceOptions
123-
) {
123+
): Promise<any> {
124124
const { marketplaceSdk } = options;
125125
const app: any = flags["app-uid"];
126126
return marketplaceSdk
@@ -218,7 +218,7 @@ function uninstallApp(
218218
orgUid: string,
219219
options: MarketPlaceOptions,
220220
installationUid: string
221-
) {
221+
): Promise<any> {
222222
const { marketplaceSdk } = options;
223223
// const app: any = flags["app-uid"];
224224
return marketplaceSdk

packages/contentstack-audit/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ $ npm install -g @contentstack/cli-audit
1919
$ csdx COMMAND
2020
running command...
2121
$ csdx (--version|-v)
22-
@contentstack/cli-audit/1.19.3 darwin-arm64 node-v24.14.0
22+
@contentstack/cli-audit/1.19.4 darwin-arm64 node-v24.14.0
2323
$ csdx --help [COMMAND]
2424
USAGE
2525
$ csdx COMMAND

packages/contentstack-branches/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ $ npm install -g @contentstack/cli-cm-branches
3737
$ csdx COMMAND
3838
running command...
3939
$ csdx (--version)
40-
@contentstack/cli-cm-branches/1.8.1 darwin-arm64 node-v24.14.0
40+
@contentstack/cli-cm-branches/1.8.2 darwin-arm64 node-v24.14.0
4141
$ csdx --help [COMMAND]
4242
USAGE
4343
$ csdx COMMAND

packages/contentstack-bulk-publish/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-cm-bulk-publish
1818
$ csdx COMMAND
1919
running command...
2020
$ csdx (--version)
21-
@contentstack/cli-cm-bulk-publish/1.11.3 darwin-arm64 node-v24.14.0
21+
@contentstack/cli-cm-bulk-publish/1.12.0 darwin-arm64 node-v24.14.0
2222
$ csdx --help [COMMAND]
2323
USAGE
2424
$ csdx COMMAND

packages/contentstack-export/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ $ npm install -g @contentstack/cli-cm-export
4848
$ csdx COMMAND
4949
running command...
5050
$ csdx (--version)
51-
@contentstack/cli-cm-export/1.25.0 darwin-arm64 node-v24.14.0
51+
@contentstack/cli-cm-export/1.25.1 darwin-arm64 node-v24.14.0
5252
$ csdx --help [COMMAND]
5353
USAGE
5454
$ csdx COMMAND
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
parserOptions: {
4+
ecmaVersion: 2020,
5+
sourceType: 'module',
6+
},
7+
plugins: ['@typescript-eslint'],
8+
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
9+
rules: {
10+
'unicorn/prefer-module': 'off',
11+
'unicorn/no-abusive-eslint-disable': 'off',
12+
'@typescript-eslint/no-use-before-define': 'off',
13+
'node/no-missing-import': 'off',
14+
'@typescript-eslint/no-explicit-any': 'off',
15+
'@typescript-eslint/no-require-imports': 'off',
16+
'no-useless-escape': 'off',
17+
},
18+
};
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
node_modules/
2+
/lib/
3+
oclif.manifest.json
4+
*.log
5+
.DS_Store
6+
coverage/
7+
8+
# Local migration outputs (may contain customer content)
9+
migration-workspace/
10+
contentstack-import/
11+
audit-reports/
12+
audit-fix/
13+
audit-verify/
14+
export.json
15+
contentfulMigrationData/
16+
_backup_*/
17+
migration-manifest.json
18+
19+
# Import/audit session logs (local artifacts, may contain customer content)
20+
logs/
21+
session.json
22+
23+
# Internal scratch docs — never commit (PR drafts / status notes)
24+
pr.md
25+
achieve.md
26+
out/
27+
.vscode/
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Agent guide — Contentstack Migrate plugin
2+
3+
Use this file when automating work in `cli-plugin-migrate/`.
4+
5+
## What this repo is
6+
7+
- **Package:** `@contentstack/cli-plugin-migrate`
8+
- **Commands:** `csdx migrate:export|convert|audit|import|status`
9+
- **Scope:** Contentful → Contentstack migration (expert CLI, no bundled AI)
10+
11+
## User-facing docs (read first)
12+
13+
| Doc | Use when |
14+
|-----|----------|
15+
| [README.md](./README.md) | Install, commands, troubleshooting |
16+
| [docs/getting-started.md](./docs/getting-started.md) | Onboarding colleagues |
17+
| [docs/expert-workflow.md](./docs/expert-workflow.md) | End-to-end pipeline |
18+
| [docs/limitations-and-scope.md](./docs/limitations-and-scope.md) | What is / isn't supported |
19+
20+
## Maintainer docs
21+
22+
| Doc | Use when |
23+
|-----|----------|
24+
| [docs/architecture.md](./docs/architecture.md) | Package layout, adapters |
25+
| [docs/implementation-principles.md](./docs/implementation-principles.md) | Port vs PRD flags, spawn rules |
26+
| [docs/phases/](./docs/phases/) | Per-command implementation specs |
27+
28+
## Rules for changes
29+
30+
1. **Do not** add `--stack` to `migrate:convert` — import stays on `migrate:import`.
31+
2. **Audit/import** → shell out via `src/lib/csdx-spawn.ts`, do not reimplement CMA.
32+
3. **Export**`src/lib/contentful-cli-spawn.ts` (global `contentful` or `npx -y contentful-cli`).
33+
4. **Never log** management tokens or full stack API keys.
34+
5. **Manifest** updates on successful command completion — see `src/lib/manifest.ts`.
35+
6. Match flag names in [README.md](./README.md) and phase docs, not the old reference Commander CLI.
36+
37+
## Verify
38+
39+
```bash
40+
npm run build && npm test
41+
```
42+
43+
Reference port source (optional, parent monorepo): `../references/import-contentful-cli-main/`.

0 commit comments

Comments
 (0)