Skip to content

Commit 22633be

Browse files
Merge pull request #248 from contentstack/v2-dev
DX | 29-06-2026 | Beta Release
2 parents 2cd7c60 + 1f1b75b commit 22633be

207 files changed

Lines changed: 36450 additions & 3873 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: 25 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,23 @@ jobs:
183191
package: ./packages/contentstack-migrate-rte/package.json
184192
access: public
185193
tag: beta
194+
# External Migrate
195+
- name: Publishing external-migrate (Beta)
196+
uses: JS-DevTools/npm-publish@v3
197+
with:
198+
token: ${{ secrets.NPM_TOKEN }}
199+
package: ./packages/contentstack-external-migrate/package.json
200+
access: public
201+
tag: beta
202+
203+
- name: Create Production Release
204+
id: create_release
205+
env:
206+
GITHUB_TOKEN: ${{ secrets.PKG_TOKEN }}
207+
VERSION: ${{ steps.publish-plugins.outputs.version }}
208+
run: |
209+
# Get the previous production release for comparison
210+
PREVIOUS_PROD=$(gh release list --limit 10 | grep -v 'prerelease' | head -1 | cut -f1)
186211
187212
# Bulk Operations
188213
- name: Publishing bulk-operations (Beta)

.talismanrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
fileignoreconfig:
22
- filename: pnpm-lock.yaml
3-
checksum: cdead0797199d22bbc55b9e5b6b86983f28eb760fabe5e1f2d5139c4456a9131
4-
version: '1.0'
3+
checksum: 0feb3713a8f2e4a8a1f5f528218c2c578265dc5b31ff283a283fefc949bbafd2
4+
version: ""

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"pnpm": "^10.28.0"
77
},
88
"engines": {
9-
"node": ">=18.0.0"
9+
"node": ">=22.0.0"
1010
},
1111
"private": true,
1212
"scripts": {

packages/contentstack-apps-cli/.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/contentstack-apps-cli/.eslintrc

Lines changed: 0 additions & 42 deletions
This file was deleted.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import tseslint from 'typescript-eslint';
2+
import globals from 'globals';
3+
4+
export default [
5+
...tseslint.configs.recommended,
6+
{
7+
ignores: [
8+
'lib/**/*',
9+
'test/**/*',
10+
'dist/**/*',
11+
],
12+
},
13+
{
14+
languageOptions: {
15+
parser: tseslint.parser,
16+
parserOptions: {
17+
project: './tsconfig.json',
18+
},
19+
sourceType: 'module',
20+
globals: {
21+
...globals.node,
22+
},
23+
},
24+
plugins: {
25+
'@typescript-eslint': tseslint.plugin,
26+
},
27+
rules: {
28+
'@typescript-eslint/no-unused-vars': [
29+
'error',
30+
{
31+
args: 'none',
32+
},
33+
],
34+
'@typescript-eslint/prefer-namespace-keyword': 'error',
35+
quotes: 'off',
36+
semi: 'off',
37+
'@typescript-eslint/no-redeclare': 'off',
38+
eqeqeq: ['error', 'smart'],
39+
'id-match': 'error',
40+
'no-eval': 'error',
41+
'no-var': 'error',
42+
'@typescript-eslint/no-explicit-any': 'off',
43+
'@typescript-eslint/no-require-imports': 'off',
44+
'prefer-const': 'error',
45+
},
46+
},
47+
];

packages/contentstack-apps-cli/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@contentstack/apps-cli",
3-
"version": "2.0.0-beta.0",
3+
"version": "2.0.0-beta.1",
44
"description": "App ClI",
55
"author": "Contentstack CLI",
66
"homepage": "https://github.com/contentstack/cli-plugins/tree/main/packages/contentstack-apps-cli",
@@ -22,9 +22,9 @@
2222
],
2323
"dependencies": {
2424
"@apollo/client": "^3.14.1",
25-
"@contentstack/cli-command": "~2.0.0-beta.8",
25+
"@contentstack/cli-command": "~2.0.0-beta.9",
2626
"@contentstack/cli-launch": "^1.10.0",
27-
"@contentstack/cli-utilities": "~2.0.0-beta.9",
27+
"@contentstack/cli-utilities": "~2.0.0-beta.10",
2828
"adm-zip": "^0.5.17",
2929
"chalk": "^5.6.2",
3030
"lodash": "^4.18.1",
@@ -46,7 +46,7 @@
4646
"axios": "^1.16.1",
4747
"chai": "^4.5.0",
4848
"dotenv": "^16.6.1",
49-
"eslint": "^8.57.1",
49+
"eslint": "^10.5.0",
5050
"eslint-config-oclif": "^6.0.157",
5151
"eslint-config-oclif-typescript": "^3.1.14",
5252
"mocha": "^10.8.2",
@@ -80,7 +80,7 @@
8080
},
8181
"scripts": {
8282
"build": "npm run clean && shx rm -rf lib && tsc -b",
83-
"lint": "eslint . --ext .ts --config .eslintrc",
83+
"lint": "eslint .",
8484
"postpack": "shx rm -f oclif.manifest.json",
8585
"posttest": "npm run lint",
8686
"prepack": "npm run build && oclif manifest && oclif readme",
@@ -91,7 +91,7 @@
9191
"test:unit:report:json": "mocha --reporter json --reporter-options output=report.json --forbid-only \"test/unit/**/*.test.ts\" && nyc --reporter=clover --extension .ts mocha --forbid-only \"test/unit/**/*.test.ts\""
9292
},
9393
"engines": {
94-
"node": ">=16"
94+
"node": ">=22.0.0"
9595
},
9696
"bugs": "https://github.com/contentstack/cli-plugins/issues",
9797
"keywords": [

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-asset-management/.eslintrc

Lines changed: 0 additions & 54 deletions
This file was deleted.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# @contentstack/cli-asset-management
2+
3+
Asset Management 2.0 API adapter for Contentstack CLI export and import. Used by the export and import plugins when Asset Management (AM 2.0) is enabled. To learn how to export and import content in Contentstack, refer to the [Migration guide](https://www.contentstack.com/docs/developers/cli/migration/).
4+
5+
[![License](https://img.shields.io/npm/l/@contentstack/cli)](https://github.com/contentstack/cli/blob/main/LICENSE)
6+
7+
<!-- toc -->
8+
* [@contentstack/cli-asset-management](#contentstackcli-asset-management)
9+
* [Overview](#overview)
10+
* [Usage](#usage)
11+
* [Exports](#exports)
12+
<!-- tocstop -->
13+
14+
# Overview
15+
16+
This package provides:
17+
18+
- **AssetManagementAdapter** – HTTP client for the Asset Management API (spaces, assets, folders, fields, asset types).
19+
- **exportSpaceStructure** – Exports space metadata and full workspace structure (metadata, folders, assets, fields, asset types) for linked workspaces.
20+
- **Types**`AssetManagementExportOptions`, `LinkedWorkspace`, `IAssetManagementAdapter`, and related types for export/import integration.
21+
22+
# Usage
23+
24+
This package is consumed by the export and import plugins. When using the export CLI with the `--asset-management` flag (or when the host app enables AM 2.0), the export plugin calls `exportSpaceStructure` with linked workspaces and options:
25+
26+
```ts
27+
import { exportSpaceStructure } from '@contentstack/cli-asset-management';
28+
29+
await exportSpaceStructure({
30+
linkedWorkspaces,
31+
exportDir,
32+
branchName: 'main',
33+
assetManagementUrl,
34+
org_uid,
35+
context,
36+
progressManager,
37+
progressProcessName,
38+
updateStatus,
39+
downloadAsset, // optional
40+
});
41+
```
42+
43+
# Exports
44+
45+
| Export | Description |
46+
|--------|-------------|
47+
| `exportSpaceStructure` | Async function to export space structure for given linked workspaces. |
48+
| `AssetManagementAdapter` | Class to call the Asset Management API (getSpace, getWorkspaceFields, getWorkspaceAssets, etc.). |
49+
| Types from `./types` | `AssetManagementExportOptions`, `ExportSpaceOptions`, `ChunkedJsonWriteOptions`, `LinkedWorkspace`, `SpaceResponse`, `FieldsResponse`, `AssetTypesResponse`, and related API types. |

0 commit comments

Comments
 (0)