Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge development to staging #1182

Merged
merged 88 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from 85 commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
dbc3db3
fix(import): fixed stack inaccessible issue
Sep 28, 2023
12ed347
fix: updated version
Oct 5, 2023
44bf8a3
fix: resolved conflicts
Oct 6, 2023
e2dab55
fix: updated version
Oct 6, 2023
032dd08
Merge branch 'development' into fix/41082
netrajpatel Oct 10, 2023
2fb2c3a
Merge branch 'development' into fix/41082
netrajpatel Oct 13, 2023
cf6dbbf
Merge remote-tracking branch 'origin/development' into fix/41082
Oct 17, 2023
b457fbd
fix: minor fix
Oct 18, 2023
36245f1
Merge remote-tracking branch 'origin/fix/41082' into fix/41082
Oct 18, 2023
21d9fc6
Merge branch 'development' into fix/41082
netrajpatel Oct 18, 2023
38db9a0
added asset overwrite, enabled entries, removed module dependency wit…
shafeeqd959 Oct 31, 2023
328dc1c
fix: incorrect date format in merge script
aman19K Oct 31, 2023
3981ab5
bumped versions
shafeeqd959 Oct 31, 2023
339bb1f
updated type
shafeeqd959 Oct 31, 2023
cf0cff3
updated core version
shafeeqd959 Oct 31, 2023
b4cbbc3
remove oclif manifest json version bump
cs-raj Nov 1, 2023
b7c8e2c
fix: added handling for invalid tokens
Nov 1, 2023
8ccb610
fix: bumped version
Nov 2, 2023
03f5233
Merge branch 'development' into bugfix/CS-42154
cs-raj Nov 3, 2023
1d696b2
fix: added pathValidator utility method
Oct 26, 2023
638db7c
fix: updated package-lock
Oct 26, 2023
a25d202
fix: updated versions
abhinav-from-contentstack Nov 6, 2023
3eb6545
fix: updated lock files and READMEs
abhinav-from-contentstack Nov 6, 2023
10354f2
Merge branch 'development' into bugfix/CS-42154
cs-raj Nov 6, 2023
d13ef09
updated with development branch
shafeeqd959 Nov 6, 2023
bf33e7a
updated asset import folder name
shafeeqd959 Nov 6, 2023
89743a7
bumped dependencies
shafeeqd959 Nov 6, 2023
e0216d8
Merge branch 'development' into fix/CS-42204
aman19K Nov 6, 2023
4ddcff0
Test: Unit test cases added for utility and content-types audit command
antonyagustine Nov 6, 2023
836ab7e
Merge branch 'development' into bugfix/CS-42154
cs-raj Nov 7, 2023
7525f47
Merge branch 'development' into test/CS-41111
antonyagustine Nov 7, 2023
6960959
Package updates
antonyagustine Nov 7, 2023
4ae5bd3
Merge pull request #1135 from contentstack/feat/import-asset-overwrite
shafeeqd959 Nov 7, 2023
1a20a1b
Reverted import logger change, .DS_Store file removed
antonyagustine Nov 7, 2023
089885b
Merge branch 'development' into fix/CS-42204
aman19K Nov 7, 2023
7d9d20c
version bumped
aman19K Nov 7, 2023
7fc0975
Merge branch 'development' into bugfix/CS-42154
cs-raj Nov 7, 2023
e75363c
Merge pull request #1139 from contentstack/bugfix/CS-42154
cs-raj Nov 7, 2023
dcc728c
Merge branch 'development' into fix/CS-42204
aman19K Nov 7, 2023
9136780
Merge pull request #1136 from contentstack/fix/CS-42204
aman19K Nov 7, 2023
66c0e47
Merge branch 'development' into test/CS-41111
antonyagustine Nov 7, 2023
6a6218a
Code clean
antonyagustine Nov 7, 2023
defba44
Merge branch 'test/CS-41111' of https://github.com/contentstack/cli i…
antonyagustine Nov 7, 2023
247931c
Merge pull request #1148 from contentstack/test/CS-41111
antonyagustine Nov 7, 2023
d6bd263
Tests: Audit functionality unit test cases added for entry module
antonyagustine Nov 8, 2023
968289f
Lint fixes
antonyagustine Nov 9, 2023
2769b81
Merge branch 'development' into fix/CS-42136
Nov 9, 2023
ba8a252
Merge pull request #1140 from contentstack/fix/CS-42136
netrajpatel Nov 9, 2023
0e598d4
Code clean
antonyagustine Nov 9, 2023
e29be44
Merge branch 'development' into test/CS-41399
antonyagustine Nov 9, 2023
a97bef0
package.json updated
antonyagustine Nov 9, 2023
c1adc42
Merge pull request #1152 from contentstack/test/CS-41399
antonyagustine Nov 9, 2023
0301807
fix: resolved conflicts
Nov 10, 2023
921cf49
fix: added add locale util
Nov 14, 2023
155b65a
Merge remote-tracking branch 'origin/fix/41082' into fix/41082
Nov 14, 2023
1781c97
Feat: Add missing global fields schema in to content type if global f…
antonyagustine Nov 15, 2023
421fe13
Code clean
antonyagustine Nov 16, 2023
5df0df6
Test: Mock data updated/modified
antonyagustine Nov 16, 2023
dc940fe
Merge pull request #1156 from contentstack/feat/CS-42443
antonyagustine Nov 16, 2023
a251073
Doc: Updated doc reviewed UI texts
antonyagustine Nov 16, 2023
8c1cdcb
Merge pull request #1158 from contentstack/doc/CS-42686
antonyagustine Nov 16, 2023
f23f1ac
fixed branch export
shafeeqd959 Nov 17, 2023
f135838
Merge branch 'development' of github.com:contentstack/cli into fix/CS…
shafeeqd959 Nov 17, 2023
3957f27
bumped version
shafeeqd959 Nov 17, 2023
53092bb
Merge pull request #1159 from contentstack/fix/CS-42526
shafeeqd959 Nov 20, 2023
b3b4295
Merge branch 'development' into fix/41082
netrajpatel Nov 20, 2023
232cc4b
Merge branch 'staging' into stag-to-dev
antonyagustine Nov 20, 2023
1ce9655
Fix: Package lock file updated
antonyagustine Nov 20, 2023
167e49c
Merge pull request #1164 from contentstack/stag-to-dev
antonyagustine Nov 20, 2023
c3125f7
Merge branch 'staging' into stag-to-dev
antonyagustine Nov 20, 2023
3fbc1cf
Merge pull request #1168 from contentstack/stag-to-dev
antonyagustine Nov 20, 2023
d6803a2
Fix: Test case fix, Write csv fix
antonyagustine Nov 21, 2023
f56f374
Merge pull request #1170 from contentstack/fix/write-csv-fix
antonyagustine Nov 21, 2023
23eddae
Merge branch 'development' into fix/41082
aman19K Nov 24, 2023
fa3b22e
Merge pull request #1067 from contentstack/fix/41082
aman19K Nov 24, 2023
664de96
Merge branch 'development' into staging_to_development
cs-raj Nov 24, 2023
f2e5275
package-lock update
cs-raj Nov 24, 2023
9c06e4e
Merge branch 'development' into staging_to_development
cs-raj Nov 24, 2023
61918d7
Update the management sdk version to 1.12.0
cs-raj Nov 24, 2023
af2f7eb
Merge pull request #1180 from contentstack/fix/management_sdk_version
cs-raj Nov 25, 2023
2965ad6
Merge branch 'development' into staging_to_development
cs-raj Nov 25, 2023
026e2e4
pnpm lock file update
cs-raj Nov 25, 2023
7c01a10
Merge pull request #1179 from contentstack/staging_to_development
cs-raj Nov 27, 2023
3637048
version bumped
aman19K Nov 27, 2023
9f41734
Merge pull request #1181 from contentstack/refactor/CS-42608-version-…
aman19K Nov 27, 2023
c892c1f
reverted audit,auth, bulk-publish, export-to-csv, migrate-rte,command…
aman19K Nov 27, 2023
c2da2c0
Merge branch 'development' into refactor/CS-42608-version-bump
aman19K Nov 27, 2023
3c1ed99
Merge pull request #1183 from contentstack/refactor/CS-42608-version-…
aman19K Nov 27, 2023
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
350 changes: 235 additions & 115 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/contentstack-audit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $ npm install -g @contentstack/cli-audit
$ csdx COMMAND
running command...
$ csdx (--version|-v)
@contentstack/cli-audit/1.2.1 darwin-arm64 node-v21.1.0
@contentstack/cli-audit/1.3.1 darwin-arm64 node-v20.8.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
6 changes: 3 additions & 3 deletions packages/contentstack-audit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentstack/cli-audit",
"version": "1.3.0",
"version": "1.3.1",
"description": "Contentstack audit plugin",
"author": "Contentstack CLI",
"homepage": "https://github.com/contentstack/cli",
Expand All @@ -18,8 +18,8 @@
"/oclif.manifest.json"
],
"dependencies": {
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-utilities": "~1.5.7",
"@contentstack/cli-command": "~1.2.17",
"@contentstack/cli-utilities": "~1.5.8",
"@oclif/plugin-help": "^5",
"@oclif/plugin-plugins": "^3.8.4",
"chalk": "^4.1.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-auth
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-auth/1.3.16 darwin-arm64 node-v21.1.0
@contentstack/cli-auth/1.3.18 darwin-arm64 node-v20.8.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
6 changes: 3 additions & 3 deletions packages/contentstack-auth/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-auth",
"description": "Contentstack CLI plugin for authentication activities",
"version": "1.3.17",
"version": "1.3.18",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"scripts": {
Expand All @@ -22,8 +22,8 @@
"test:unit:report": "nyc --extension .ts mocha --forbid-only \"test/unit/**/*.test.ts\""
},
"dependencies": {
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-utilities": "~1.5.7",
"@contentstack/cli-command": "~1.2.17",
"@contentstack/cli-utilities": "~1.5.8",
"chalk": "^4.0.0",
"debug": "^4.1.1",
"inquirer": "8.2.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-bootstrap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $ npm install -g @contentstack/cli-cm-bootstrap
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-cm-bootstrap/1.6.2 darwin-arm64 node-v20.8.0
@contentstack/cli-cm-bootstrap/1.7.0 darwin-arm64 node-v20.8.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
8 changes: 4 additions & 4 deletions packages/contentstack-bootstrap/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-cm-bootstrap",
"description": "Bootstrap contentstack apps",
"version": "1.6.3",
"version": "1.7.0",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"scripts": {
Expand All @@ -17,9 +17,9 @@
"test:report": "nyc --reporter=lcov mocha \"test/**/*.test.js\""
},
"dependencies": {
"@contentstack/cli-cm-seed": "~1.6.3",
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-utilities": "~1.5.7",
"@contentstack/cli-cm-seed": "~1.7.0",
"@contentstack/cli-command": "~1.2.17",
"@contentstack/cli-utilities": "~1.5.8",
"inquirer": "8.2.4",
"mkdirp": "^1.0.4",
"tar": "^6.1.13"
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-branches/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ $ npm install -g @contentstack/cli-cm-branches
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-cm-branches/1.0.16 darwin-arm64 node-v21.1.0
@contentstack/cli-cm-branches/1.0.18 darwin-arm64 node-v20.8.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
6 changes: 3 additions & 3 deletions packages/contentstack-branches/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@contentstack/cli-cm-branches",
"description": "Contentstack CLI plugin to do branches operations",
"version": "1.0.17",
"version": "1.0.18",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-utilities": "~1.5.7",
"@contentstack/cli-command": "~1.2.17",
"@contentstack/cli-utilities": "~1.5.8",
"@oclif/core": "^2.9.3",
"async": "^3.2.4",
"big-json": "^3.2.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fs from 'fs';
import { cliux } from '@contentstack/cli-utilities';
import { cliux, formatTime, formatDate } from '@contentstack/cli-utilities';
import { entryCreateScript } from './entry-create-script';
import { entryUpdateScript } from './entry-update-script';
import { entryCreateUpdateScript } from './entry-create-update-script';
Expand Down Expand Up @@ -74,9 +74,7 @@ export function getContentTypeMergeStatus(status) {
export function createMergeScripts(contentType: CreateMergeScriptsProps, mergeJobUID: string, content?: any) {
const date = new Date();
const rootFolder = 'merge_scripts';
const fileCreatedAt = `${date.getFullYear()}${
date.getMonth().toString.length === 1 ? `0${date.getMonth() + 1}` : date.getMonth() + 1
}${date.getUTCDate()}${date.getHours()}${date.getMinutes()}${date.getSeconds()}`;
const fileCreatedAt = `${formatDate(date)}${formatTime(date)}`;
const mergeScriptsSlug = `merge_scripts_${mergeJobUID}_${fileCreatedAt}`;

const fullPath = `${rootFolder}/${mergeScriptsSlug}`;
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-bulk-publish/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-cm-bulk-publish
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-cm-bulk-publish/1.3.14 darwin-arm64 node-v21.1.0
@contentstack/cli-cm-bulk-publish/1.3.16 darwin-arm64 node-v20.8.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
6 changes: 3 additions & 3 deletions packages/contentstack-bulk-publish/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@contentstack/cli-cm-bulk-publish",
"description": "Contentstack CLI plugin for bulk publish actions",
"version": "1.3.15",
"version": "1.3.16",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-utilities": "~1.5.7",
"@contentstack/cli-command": "~1.2.17",
"@contentstack/cli-utilities": "~1.5.8",
"bluebird": "^3.7.2",
"chalk": "^4.1.2",
"dotenv": "^16.1.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-clone/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $ npm install -g @contentstack/cli-cm-clone
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-cm-clone/1.7.0 darwin-arm64 node-v20.8.0
@contentstack/cli-cm-clone/1.8.0 darwin-arm64 node-v20.8.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
10 changes: 5 additions & 5 deletions packages/contentstack-clone/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "@contentstack/cli-cm-clone",
"description": "Contentstack stack clone plugin",
"version": "1.7.1",
"version": "1.8.0",
"author": "Contentstack",
"bugs": "https://github.com/rohitmishra209/cli-cm-clone/issues",
"dependencies": {
"@contentstack/cli-cm-export": "~1.10.1",
"@contentstack/cli-cm-import": "~1.11.1",
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-utilities": "~1.5.7",
"@contentstack/cli-cm-export": "~1.10.2",
"@contentstack/cli-cm-import": "~1.12.0",
"@contentstack/cli-command": "~1.2.17",
"@contentstack/cli-utilities": "~1.5.8",
"@colors/colors": "^1.5.0",
"async": "^3.2.4",
"chalk": "^4.1.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/contentstack-command/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-command",
"description": "Contentstack CLI plugin for configuration",
"version": "1.2.16",
"version": "1.2.17",
"author": "Contentstack",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand All @@ -17,7 +17,7 @@
"format": "eslint src/**/*.ts --fix"
},
"dependencies": {
"@contentstack/cli-utilities": "~1.5.7",
"@contentstack/cli-utilities": "~1.5.8",
"contentstack": "^3.10.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-config
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-config/1.4.14 darwin-arm64 node-v21.1.0
@contentstack/cli-config/1.4.16 darwin-arm64 node-v20.8.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
6 changes: 3 additions & 3 deletions packages/contentstack-config/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-config",
"description": "Contentstack CLI plugin for configuration",
"version": "1.4.15",
"version": "1.4.16",
"author": "Contentstack",
"scripts": {
"build": "npm run clean && npm run compile",
Expand All @@ -21,8 +21,8 @@
"test:unit:report": "nyc --extension .ts mocha --forbid-only \"test/unit/**/*.test.ts\""
},
"dependencies": {
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-utilities": "~1.5.7",
"@contentstack/cli-command": "~1.2.17",
"@contentstack/cli-utilities": "~1.5.8",
"chalk": "^4.0.0",
"debug": "^4.1.1",
"inquirer": "8.2.4",
Expand Down
6 changes: 3 additions & 3 deletions packages/contentstack-export-to-csv/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@contentstack/cli-cm-export-to-csv",
"description": "Export entities to csv",
"version": "1.6.1",
"version": "1.6.2",
"author": "Abhinav Gupta @abhinav-from-contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-utilities": "~1.5.7",
"@contentstack/cli-command": "~1.2.17",
"@contentstack/cli-utilities": "~1.5.8",
"chalk": "^4.1.0",
"fast-csv": "^4.3.6",
"inquirer": "8.2.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-export/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ $ npm install -g @contentstack/cli-cm-export
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-cm-export/1.10.1 darwin-arm64 node-v20.8.0
@contentstack/cli-cm-export/1.10.2 darwin-arm64 node-v20.8.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
6 changes: 3 additions & 3 deletions packages/contentstack-export/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@contentstack/cli-cm-export",
"description": "Contentstack CLI plugin to export content from stack",
"version": "1.10.1",
"version": "1.10.2",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-utilities": "~1.5.7",
"@contentstack/cli-command": "~1.2.17",
"@contentstack/cli-utilities": "~1.5.8",
"@oclif/core": "^2.9.3",
"async": "^3.2.4",
"big-json": "^3.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const setupConfig = async (exportCmdFlags: any): Promise<ExportConfig> => {
const managementTokenAlias = exportCmdFlags['management-token-alias'] || exportCmdFlags['alias'];

if (managementTokenAlias) {
const { token, apiKey } = configHandler.get(`tokens.${managementTokenAlias}`);
const { token, apiKey } = configHandler.get(`tokens.${managementTokenAlias}`) || {};
config.management_token = token;
config.apiKey = apiKey;
if (!config.management_token) {
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-import/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ $ npm install -g @contentstack/cli-cm-import
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-cm-import/1.11.0 darwin-arm64 node-v20.8.0
@contentstack/cli-cm-import/1.12.0 darwin-arm64 node-v20.8.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
11 changes: 6 additions & 5 deletions packages/contentstack-import/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@contentstack/cli-cm-import",
"description": "Contentstack CLI plugin to import content into stack",
"version": "1.11.1",
"version": "1.12.0",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-utilities": "~1.5.7",
"@contentstack/cli-command": "~1.2.17",
"@contentstack/cli-utilities": "~1.5.8",
"@contentstack/management": "~1.12.0",
"@oclif/core": "^2.9.3",
"axios": "^1.6.0",
Expand All @@ -21,7 +21,8 @@
"mkdirp": "^1.0.4",
"promise-limit": "^2.7.0",
"tslib": "^2.4.1",
"winston": "^3.7.2"
"winston": "^3.7.2",
"uuid": "^9.0.0"
},
"devDependencies": {
"@oclif/test": "^1.2.6",
Expand Down Expand Up @@ -97,4 +98,4 @@
}
},
"repository": "https://github.com/contentstack/cli"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ export default class ImportCommand extends Command {
'replace-existing': flags.boolean({
required: false,
description: 'Replaces the existing module in the target stack.',
dependsOn: ['module'],
}),
'skip-existing': flags.boolean({
required: false,
Expand Down
16 changes: 3 additions & 13 deletions packages/contentstack-import/src/import/module-importer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ContentstackClient, HttpClient } from '@contentstack/cli-utilities';
import { addLocale, ContentstackClient } from '@contentstack/cli-utilities';

import startModuleImport from './modules';
import startJSModuleImport from './modules-js';
Expand Down Expand Up @@ -26,19 +26,9 @@ class ModuleImporter {

// Temporarily adding this api call to verify management token has read and write permissions
// TODO: CS-40354 - CLI | import rewrite | Migrate HTTP call to SDK call once fix is ready from SDK side
const httpClient = new HttpClient({
headers: { api_key: this.importConfig.apiKey, authorization: this.importConfig.management_token },
});

const { data } = await httpClient.post(`https://${this.importConfig.host}/v3/locales`, {
locale: {
name: 'English',
code: 'en-us',
},
});

if (data.error_code === 161) {
throw new Error(data.error_message);
if (this.importConfig.management_token) {
await addLocale(this.importConfig.apiKey, this.importConfig.management_token, this.importConfig.host);
}

if (!this.importConfig.master_locale) {
Expand Down
Loading
Loading