From 980f2d978a89cdba0d68728e738d06a306817da6 Mon Sep 17 00:00:00 2001 From: sunil-lakshman <104969541+sunil-lakshman@users.noreply.github.com> Date: Wed, 28 Aug 2024 13:21:54 +0530 Subject: [PATCH 1/2] Implemented compass app integration in Bootstrap command CLI --- package-lock.json | 4 ++-- packages/contentstack-bootstrap/README.md | 2 +- packages/contentstack-bootstrap/package.json | 2 +- packages/contentstack-bootstrap/src/config.ts | 6 +++--- packages/contentstack/package.json | 2 +- pnpm-lock.yaml | 8 ++++---- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index 969f4cc9ce..a568bac1d8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24306,7 +24306,7 @@ "dependencies": { "@contentstack/cli-audit": "~1.6.5", "@contentstack/cli-auth": "~1.3.20", - "@contentstack/cli-cm-bootstrap": "~1.10.0", + "@contentstack/cli-cm-bootstrap": "~1.11.0", "@contentstack/cli-cm-branches": "~1.1.2", "@contentstack/cli-cm-bulk-publish": "~1.4.8", "@contentstack/cli-cm-clone": "~1.10.7", @@ -24700,7 +24700,7 @@ }, "packages/contentstack-bootstrap": { "name": "@contentstack/cli-cm-bootstrap", - "version": "1.10.0", + "version": "1.11.0", "license": "MIT", "dependencies": { "@contentstack/cli-cm-seed": "~1.7.6", diff --git a/packages/contentstack-bootstrap/README.md b/packages/contentstack-bootstrap/README.md index 982912d9ae..4fcc88c103 100644 --- a/packages/contentstack-bootstrap/README.md +++ b/packages/contentstack-bootstrap/README.md @@ -15,7 +15,7 @@ $ npm install -g @contentstack/cli-cm-bootstrap $ csdx COMMAND running command... $ csdx (--version) -@contentstack/cli-cm-bootstrap/1.10.0 darwin-arm64 node-v22.2.0 +@contentstack/cli-cm-bootstrap/1.11.0 darwin-arm64 node-v22.2.0 $ csdx --help [COMMAND] USAGE $ csdx COMMAND diff --git a/packages/contentstack-bootstrap/package.json b/packages/contentstack-bootstrap/package.json index 8254ee5dc1..3182f4da35 100644 --- a/packages/contentstack-bootstrap/package.json +++ b/packages/contentstack-bootstrap/package.json @@ -1,7 +1,7 @@ { "name": "@contentstack/cli-cm-bootstrap", "description": "Bootstrap contentstack apps", - "version": "1.10.0", + "version": "1.11.0", "author": "Contentstack", "bugs": "https://github.com/contentstack/cli/issues", "scripts": { diff --git a/packages/contentstack-bootstrap/src/config.ts b/packages/contentstack-bootstrap/src/config.ts index 2061e1188d..9275cfd4d8 100644 --- a/packages/contentstack-bootstrap/src/config.ts +++ b/packages/contentstack-bootstrap/src/config.ts @@ -30,7 +30,7 @@ const config: Configuration = { { displayName: 'Vue JS', configKey: 'vue-starter' }, { displayName: 'Stencil', configKey: 'stencil-starter' }, { displayName: 'Nuxt3', configKey: 'nuxt3-starter' }, - // { displayName: 'Compass App', configKey: 'compass-app' } + { displayName: 'Compass App', configKey: 'compass-app' } ], appLevelConfig: { nextjs: { @@ -50,8 +50,8 @@ const config: Configuration = { stack: 'contentstack/stack-contentstack-angular-modularblock-example', }, 'compass-app': { - source: 'contentstack/contentstack-universal-demo', - stack: 'contentstack/stack-contentstack-universal-demo', + source: 'contentstack/compass-starter-app', + stack: 'contentstack/compass-starter-stack', master_locale: 'en', }, 'nuxtjs-disabled': { diff --git a/packages/contentstack/package.json b/packages/contentstack/package.json index ee5f537e43..da04b29677 100755 --- a/packages/contentstack/package.json +++ b/packages/contentstack/package.json @@ -24,7 +24,7 @@ "dependencies": { "@contentstack/cli-audit": "~1.6.5", "@contentstack/cli-auth": "~1.3.20", - "@contentstack/cli-cm-bootstrap": "~1.10.0", + "@contentstack/cli-cm-bootstrap": "~1.11.0", "@contentstack/cli-cm-branches": "~1.1.2", "@contentstack/cli-cm-bulk-publish": "~1.4.8", "@contentstack/cli-cm-export": "~1.11.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 41817b8745..7f91b2d4d1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,7 +12,7 @@ importers: specifiers: '@contentstack/cli-audit': ~1.6.5 '@contentstack/cli-auth': ~1.3.20 - '@contentstack/cli-cm-bootstrap': ~1.10.0 + '@contentstack/cli-cm-bootstrap': ~1.11.0 '@contentstack/cli-cm-branches': ~1.1.2 '@contentstack/cli-cm-bulk-publish': ~1.4.8 '@contentstack/cli-cm-clone': ~1.10.7 @@ -6610,7 +6610,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 6.21.0_4lxgoysztp3gakdxqfzw7vhg4u + '@typescript-eslint/parser': 6.21.0_qusgslmwnowdaqieuropes6b5q debug: 3.2.7 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 @@ -6669,7 +6669,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 6.21.0_4lxgoysztp3gakdxqfzw7vhg4u + '@typescript-eslint/parser': 6.21.0_qusgslmwnowdaqieuropes6b5q debug: 3.2.7 eslint: 8.57.0 eslint-import-resolver-typescript: 3.6.1_6h7qehjxqemqblxgxbb5h7bqlm @@ -6766,7 +6766,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 6.21.0_4lxgoysztp3gakdxqfzw7vhg4u + '@typescript-eslint/parser': 6.21.0_qusgslmwnowdaqieuropes6b5q array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 array.prototype.flat: 1.3.2 From 8a517c2c8ed0f5c7b4188a28f7bbc83260d6ab45 Mon Sep 17 00:00:00 2001 From: sunil-lakshman <104969541+sunil-lakshman@users.noreply.github.com> Date: Fri, 30 Aug 2024 18:17:11 +0530 Subject: [PATCH 2/2] Fixed import error issue --- packages/contentstack-import/src/import/modules/entries.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/contentstack-import/src/import/modules/entries.ts b/packages/contentstack-import/src/import/modules/entries.ts index 82dda9345b..d6c76f2f27 100644 --- a/packages/contentstack-import/src/import/modules/entries.ts +++ b/packages/contentstack-import/src/import/modules/entries.ts @@ -973,6 +973,10 @@ export default class EntriesImport extends BaseClass { apiOptions.apiData = null; return apiOptions; } + if(requestObject.environments.length === 0 || requestObject.locales.length === 0 ){ + apiOptions.apiData = null; + return apiOptions; + } apiOptions.apiData = requestObject; return apiOptions; }