Skip to content

Commit e32d7d5

Browse files
Merge pull request #230 from contentstack/fix/back-merge-dev
back merge
2 parents 8439e35 + 9475887 commit e32d7d5

109 files changed

Lines changed: 31304 additions & 144 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-v2-beta-plugins.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,14 @@ jobs:
135135
package: ./packages/contentstack-branches/package.json
136136
tag: beta
137137

138+
# Apps CLI
139+
- name: Publishing apps-cli (Production)
140+
uses: JS-DevTools/npm-publish@v3
141+
with:
142+
token: ${{ secrets.NPM_TOKEN }}
143+
package: ./packages/contentstack-apps-cli/package.json
144+
tag: latest
145+
138146
# Query Export
139147
- name: Publishing query-export (Beta)
140148
uses: JS-DevTools/npm-publish@v3
@@ -183,6 +191,22 @@ jobs:
183191
package: ./packages/contentstack-migrate-rte/package.json
184192
access: public
185193
tag: beta
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+
202+
- name: Create Production Release
203+
id: create_release
204+
env:
205+
GITHUB_TOKEN: ${{ secrets.PKG_TOKEN }}
206+
VERSION: ${{ steps.publish-plugins.outputs.version }}
207+
run: |
208+
# Get the previous production release for comparison
209+
PREVIOUS_PROD=$(gh release list --limit 10 | grep -v 'prerelease' | head -1 | cut -f1)
186210
187211
# Bulk Operations
188212
- name: Publishing bulk-operations (Beta)

.talismanrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
fileignoreconfig:
22
- filename: pnpm-lock.yaml
3-
checksum: cdead0797199d22bbc55b9e5b6b86983f28eb760fabe5e1f2d5139c4456a9131
3+
checksum: 7ec6345eb15ed0be001753ee49733421a8a07096dc8a18465cdad1b82562fed8
44
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-content-type/README.md

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,181 @@ $ csdx content-type:details -a "management token" -c "content type" --no-path
5454
<!-- usagestop -->
5555
# Commands
5656
<!-- commands -->
57+
* [`csdx content-type:audit`](#csdx-content-typeaudit)
58+
* [`csdx content-type:compare`](#csdx-content-typecompare)
59+
* [`csdx content-type:compare-remote`](#csdx-content-typecompare-remote)
60+
* [`csdx content-type:details`](#csdx-content-typedetails)
61+
* [`csdx content-type:diagram`](#csdx-content-typediagram)
62+
* [`csdx content-type:list`](#csdx-content-typelist)
5763

64+
## `csdx content-type:audit`
65+
66+
Display recent changes to a Content Type
67+
68+
```
69+
USAGE
70+
$ csdx content-type:audit -c <value> [-s <value> | -a <value> | -a <value>] [-k <value> | | ]
71+
72+
FLAGS
73+
-a, --alias=<value> Alias of the management token
74+
-a, --token-alias=<value> Management token alias
75+
-c, --content-type=<value> (required) Content Type UID
76+
-k, --stack-api-key=<value> Stack API Key
77+
-s, --stack=<value> Stack UID
78+
79+
DESCRIPTION
80+
Display recent changes to a Content Type
81+
82+
EXAMPLES
83+
$ csdx content-type:audit --stack-api-key "xxxxxxxxxxxxxxxxxxx" --content-type "home_page"
84+
85+
$ csdx content-type:audit --alias "management token" --content-type "home_page"
86+
```
87+
88+
_See code: [src/commands/content-type/audit.ts](https://github.com/contentstack/cli-plugins/blob/main/packages/contentstack-content-type/src/commands/content-type/audit.ts)_
89+
90+
## `csdx content-type:compare`
91+
92+
Compare two Content Type versions
93+
94+
```
95+
USAGE
96+
$ csdx content-type:compare -c <value> [-s <value> | -a <value>] [-k <value> | ] [-a <value>] [-l <value> -r <value>]
97+
98+
FLAGS
99+
-a, --alias=<value> Alias of the management token
100+
-a, --token-alias=<value> Management token alias
101+
-c, --content-type=<value> (required) Content Type UID
102+
-k, --stack-api-key=<value> Stack API Key
103+
-l, --left=<value> Content Type version, i.e. prev version
104+
-r, --right=<value> Content Type version, i.e. later version
105+
-s, --stack=<value> Stack UID
106+
107+
DESCRIPTION
108+
Compare two Content Type versions
109+
110+
EXAMPLES
111+
$ csdx content-type:compare --stack-api-key "xxxxxxxxxxxxxxxxxxx" --content-type "home_page"
112+
113+
$ csdx content-type:compare --stack-api-key "xxxxxxxxxxxxxxxxxxx" --content-type "home_page" --left # --right #
114+
115+
$ csdx content-type:compare --alias "management token" --content-type "home_page" --left # --right #
116+
```
117+
118+
_See code: [src/commands/content-type/compare.ts](https://github.com/contentstack/cli-plugins/blob/main/packages/contentstack-content-type/src/commands/content-type/compare.ts)_
119+
120+
## `csdx content-type:compare-remote`
121+
122+
compare two Content Types on different Stacks
123+
124+
```
125+
USAGE
126+
$ csdx content-type:compare-remote (-o <value> -r <value>) -c <value>
127+
128+
FLAGS
129+
-c, --content-type=<value> (required) Content Type UID
130+
-o, --origin-stack=<value> (required) Origin Stack API Key
131+
-r, --remote-stack=<value> (required) Remote Stack API Key
132+
133+
DESCRIPTION
134+
compare two Content Types on different Stacks
135+
136+
EXAMPLES
137+
$ csdx content-type:compare-remote --origin-stack "xxxxxxxxxxxxxxxxxxx" --remote-stack "xxxxxxxxxxxxxxxxxxx" -content-type "home_page"
138+
```
139+
140+
_See code: [src/commands/content-type/compare-remote.ts](https://github.com/contentstack/cli-plugins/blob/main/packages/contentstack-content-type/src/commands/content-type/compare-remote.ts)_
141+
142+
## `csdx content-type:details`
143+
144+
Display Content Type details
145+
146+
```
147+
USAGE
148+
$ csdx content-type:details -c <value> [-s <value> | -a <value>] [-k <value> | ] [-a <value>] [-p]
149+
150+
FLAGS
151+
-a, --alias=<value> Alias of the management token
152+
-a, --token-alias=<value> Management token alias
153+
-c, --content-type=<value> (required) Content Type UID
154+
-k, --stack-api-key=<value> Stack API Key
155+
-p, --[no-]path show path column
156+
-s, --stack=<value> Stack UID
157+
158+
DESCRIPTION
159+
Display Content Type details
160+
161+
EXAMPLES
162+
$ csdx content-type:details --stack-api-key "xxxxxxxxxxxxxxxxxxx" --content-type "home_page"
163+
164+
$ csdx content-type:details --alias "management token" --content-type "home_page"
165+
166+
$ csdx content-type:details --alias "management token" --content-type "home_page" --no-path
167+
```
168+
169+
_See code: [src/commands/content-type/details.ts](https://github.com/contentstack/cli-plugins/blob/main/packages/contentstack-content-type/src/commands/content-type/details.ts)_
170+
171+
## `csdx content-type:diagram`
172+
173+
Create a visual diagram of a Stack's Content Types
174+
175+
```
176+
USAGE
177+
$ csdx content-type:diagram -o <value> -d portrait|landscape -t svg|dot [-s <value> | -a <value> | -a <value>] [-k
178+
<value> | | ]
179+
180+
FLAGS
181+
-a, --alias=<value> Alias of the management token
182+
-a, --token-alias=<value> Management token alias
183+
-d, --direction=<option> (required) [default: portrait] graph orientation
184+
<options: portrait|landscape>
185+
-k, --stack-api-key=<value> Stack API Key
186+
-o, --output=<value> (required) full path to output
187+
-s, --stack=<value> Stack UID
188+
-t, --type=<option> (required) [default: svg] graph output file type
189+
<options: svg|dot>
190+
191+
DESCRIPTION
192+
Create a visual diagram of a Stack's Content Types
193+
194+
EXAMPLES
195+
$ csdx content-type:diagram --stack-api-key "xxxxxxxxxxxxxxxxxxx" --output "content-model.svg"
196+
197+
$ csdx content-type:diagram --alias "management token" --output "content-model.svg"
198+
199+
$ csdx content-type:diagram --alias "management token" --output "content-model.svg" --direction "landscape"
200+
201+
$ csdx content-type:diagram --alias "management token" --output "content-model.dot" --type "dot"
202+
```
203+
204+
_See code: [src/commands/content-type/diagram.ts](https://github.com/contentstack/cli-plugins/blob/main/packages/contentstack-content-type/src/commands/content-type/diagram.ts)_
205+
206+
## `csdx content-type:list`
207+
208+
List all Content Types in a Stack
209+
210+
```
211+
USAGE
212+
$ csdx content-type:list [-s <value> | -a <value> | -a <value>] [-k <value> | | ] [-o title|modified]
213+
214+
FLAGS
215+
-a, --alias=<value> Alias of the management token
216+
-a, --token-alias=<value> Management token alias
217+
-k, --stack-api-key=<value> Stack API Key
218+
-o, --order=<option> [default: title] order by column
219+
<options: title|modified>
220+
-s, --stack=<value> Stack UID
221+
222+
DESCRIPTION
223+
List all Content Types in a Stack
224+
225+
EXAMPLES
226+
$ csdx content-type:list --stack-api-key "xxxxxxxxxxxxxxxxxxx"
227+
228+
$ csdx content-type:list --alias "management token"
229+
230+
$ csdx content-type:list --alias "management token" --order modified
231+
```
232+
233+
_See code: [src/commands/content-type/list.ts](https://github.com/contentstack/cli-plugins/blob/main/packages/contentstack-content-type/src/commands/content-type/list.ts)_
58234
<!-- commandsstop -->
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/`.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Changelog
2+
3+
All notable changes to `@contentstack/cli-plugin-migrate` are documented here.
4+
5+
## [0.1.0] — 2026-06-03
6+
7+
### Added
8+
9+
- `csdx migrate:export` — Contentful space export via Contentful CLI
10+
- `csdx migrate:convert` — Contentful export → Contentstack import bundle
11+
- `csdx migrate:audit` — wrapper for `csdx cm:stacks:audit`
12+
- `csdx migrate:import` — wrapper for `csdx cm:stacks:import`
13+
- `csdx migrate:status` — migration workspace manifest and next-step hints
14+
- `migration-manifest.json` tracking (no secrets)
15+
- Documentation set under `docs/` and root `README.md`
16+
17+
### Notes
18+
19+
- Contentful-only (`--legacy contentful`)
20+
- Install via `csdx plugins:link .` after `npm run build`
21+
- Import requires an empty destination stack and `csdx auth:login`

0 commit comments

Comments
 (0)