From 6cb30e08cb45717af6373fabd0dcb6afda7bf7dd Mon Sep 17 00:00:00 2001 From: raj pandey Date: Tue, 9 Jan 2024 15:35:00 +0530 Subject: [PATCH] gcp changes in import --- package-lock.json | 8 ++++---- packages/contentstack-clone/package.json | 4 ++-- packages/contentstack-import/package.json | 2 +- packages/contentstack-import/src/config/index.ts | 3 +++ packages/contentstack-import/src/utils/asset-helper.ts | 2 +- packages/contentstack-seed/package.json | 2 +- packages/contentstack/package.json | 4 ++-- pnpm-lock.yaml | 6 +++--- 8 files changed, 17 insertions(+), 14 deletions(-) diff --git a/package-lock.json b/package-lock.json index e7cf5847c3..8298023c32 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23501,7 +23501,7 @@ "@contentstack/cli-cm-clone": "~1.9.0", "@contentstack/cli-cm-export": "~1.10.2", "@contentstack/cli-cm-export-to-csv": "~1.6.2", - "@contentstack/cli-cm-import": "~1.13.0", + "@contentstack/cli-cm-import": "~1.14.0", "@contentstack/cli-cm-migrate-rte": "~1.4.15", "@contentstack/cli-cm-seed": "~1.7.1", "@contentstack/cli-command": "~1.2.17", @@ -24054,7 +24054,7 @@ "dependencies": { "@colors/colors": "^1.5.0", "@contentstack/cli-cm-export": "~1.10.2", - "@contentstack/cli-cm-import": "~1.13.0", + "@contentstack/cli-cm-import": "~1.14.0", "@contentstack/cli-command": "~1.2.16", "@contentstack/cli-utilities": "~1.5.10", "async": "^3.2.4", @@ -24920,7 +24920,7 @@ }, "packages/contentstack-import": { "name": "@contentstack/cli-cm-import", - "version": "1.13.0", + "version": "1.14.0", "license": "MIT", "dependencies": { "@contentstack/cli-audit": "^1.3.2", @@ -25381,7 +25381,7 @@ "version": "1.7.1", "license": "MIT", "dependencies": { - "@contentstack/cli-cm-import": "~1.13.0", + "@contentstack/cli-cm-import": "~1.14.0", "@contentstack/cli-command": "~1.2.16", "@contentstack/cli-utilities": "~1.5.10", "inquirer": "8.2.4", diff --git a/packages/contentstack-clone/package.json b/packages/contentstack-clone/package.json index 46e1791133..c728206e3d 100644 --- a/packages/contentstack-clone/package.json +++ b/packages/contentstack-clone/package.json @@ -6,7 +6,7 @@ "bugs": "https://github.com/rohitmishra209/cli-cm-clone/issues", "dependencies": { "@contentstack/cli-cm-export": "~1.10.2", - "@contentstack/cli-cm-import": "~1.13.0", + "@contentstack/cli-cm-import": "~1.14.0", "@contentstack/cli-command": "~1.2.16", "@contentstack/cli-utilities": "~1.5.10", "@colors/colors": "^1.5.0", @@ -70,4 +70,4 @@ "cm:stack-clone": "O-CLN" } } -} \ No newline at end of file +} diff --git a/packages/contentstack-import/package.json b/packages/contentstack-import/package.json index 185e5a6515..d0853eb783 100644 --- a/packages/contentstack-import/package.json +++ b/packages/contentstack-import/package.json @@ -1,7 +1,7 @@ { "name": "@contentstack/cli-cm-import", "description": "Contentstack CLI plugin to import content into stack", - "version": "1.13.0", + "version": "1.14.0", "author": "Contentstack", "bugs": "https://github.com/contentstack/cli/issues", "dependencies": { diff --git a/packages/contentstack-import/src/config/index.ts b/packages/contentstack-import/src/config/index.ts index ae588e5748..80ceffdcd8 100644 --- a/packages/contentstack-import/src/config/index.ts +++ b/packages/contentstack-import/src/config/index.ts @@ -8,6 +8,8 @@ const config: DefaultConfig = { // host:'https://azure-na-api.contentstack.com/v3', // use below hosts for azure-eu region // host:'https://azure-eu-api.contentstack.com/v3', + // use below hosts for gcp-na region + // host:'https://gcp-na-api.contentstack.com', // pass locale, only to migrate entries from that locale // not passing `locale` will migrate all the locales present // locales: ['fr-fr'], @@ -18,6 +20,7 @@ const config: DefaultConfig = { 'https://eu-api.contentstack.com': 'https://eu-developerhub-api.contentstack.com', 'https://azure-na-api.contentstack.com': 'https://azure-na-developerhub-api.contentstack.com', 'https://azure-eu-api.contentstack.com': 'https://azure-eu-developerhub-api.contentstack.com', + 'https://gcp-na-api.contentstack.com': 'https://gcp-na-developerhub-api.contentstack.com', }, modules: { apiConcurrency: 5, diff --git a/packages/contentstack-import/src/utils/asset-helper.ts b/packages/contentstack-import/src/utils/asset-helper.ts index b889623335..49b88cd39d 100644 --- a/packages/contentstack-import/src/utils/asset-helper.ts +++ b/packages/contentstack-import/src/utils/asset-helper.ts @@ -358,7 +358,7 @@ function findFileUrls(schema: any, _entry: any, assetUrls: any) { text = JSON.stringify(_entry); } markdownRegEx = new RegExp( - '(https://(assets|(eu-|azure-na-|azure-eu-)?images).contentstack.(io|com)/v3/assets/(.*?)/(.*?)/(.*?)/(.*?)(?="))', + '(https://(assets|(eu-|azure-na-|azure-eu-|gcp-na-)?images).contentstack.(io|com)/v3/assets/(.*?)/(.*?)/(.*?)/(.*?)(?="))', 'g', ); while ((markdownMatch = markdownRegEx.exec(text)) !== null) { diff --git a/packages/contentstack-seed/package.json b/packages/contentstack-seed/package.json index a5998b0e1f..48b2324208 100644 --- a/packages/contentstack-seed/package.json +++ b/packages/contentstack-seed/package.json @@ -5,7 +5,7 @@ "author": "Contentstack", "bugs": "https://github.com/contentstack/cli/issues", "dependencies": { - "@contentstack/cli-cm-import": "~1.13.0", + "@contentstack/cli-cm-import": "~1.14.0", "@contentstack/cli-command": "~1.2.16", "@contentstack/cli-utilities": "~1.5.10", "inquirer": "8.2.4", diff --git a/packages/contentstack/package.json b/packages/contentstack/package.json index 9e4921c8d7..cced863c5a 100755 --- a/packages/contentstack/package.json +++ b/packages/contentstack/package.json @@ -30,7 +30,7 @@ "@contentstack/cli-cm-clone": "~1.9.0", "@contentstack/cli-cm-export": "~1.10.2", "@contentstack/cli-cm-export-to-csv": "~1.6.2", - "@contentstack/cli-cm-import": "~1.13.0", + "@contentstack/cli-cm-import": "~1.14.0", "@contentstack/cli-cm-migrate-rte": "~1.4.15", "@contentstack/cli-cm-seed": "~1.7.1", "@contentstack/cli-command": "~1.2.17", @@ -160,4 +160,4 @@ } }, "repository": "https://github.com/contentstack/cli" -} \ No newline at end of file +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9cfe8e1a66..f4b90e9efc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,7 +18,7 @@ importers: '@contentstack/cli-cm-clone': ~1.9.0 '@contentstack/cli-cm-export': ~1.10.2 '@contentstack/cli-cm-export-to-csv': ~1.6.2 - '@contentstack/cli-cm-import': ~1.13.0 + '@contentstack/cli-cm-import': ~1.14.0 '@contentstack/cli-cm-migrate-rte': ~1.4.15 '@contentstack/cli-cm-seed': ~1.7.1 '@contentstack/cli-command': ~1.2.17 @@ -422,7 +422,7 @@ importers: specifiers: '@colors/colors': ^1.5.0 '@contentstack/cli-cm-export': ~1.10.2 - '@contentstack/cli-cm-import': ~1.13.0 + '@contentstack/cli-cm-import': ~1.14.0 '@contentstack/cli-command': ~1.2.16 '@contentstack/cli-utilities': ~1.5.10 '@oclif/test': ^1.2.7 @@ -984,7 +984,7 @@ importers: packages/contentstack-seed: specifiers: - '@contentstack/cli-cm-import': ~1.13.0 + '@contentstack/cli-cm-import': ~1.14.0 '@contentstack/cli-command': ~1.2.16 '@contentstack/cli-utilities': ~1.5.10 '@oclif/plugin-help': ^5.1.19