Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
28 changes: 20 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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.12.0 darwin-arm64 node-v22.14.0
@contentstack/cli-audit/1.12.1 darwin-arm64 node-v22.14.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
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.4.0 darwin-arm64 node-v22.14.0
@contentstack/cli-cm-branches/1.4.1 darwin-arm64 node-v22.14.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-clone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dependencies": {
"@colors/colors": "^1.6.0",
"@contentstack/cli-cm-export": "~1.16.0",
"@contentstack/cli-cm-import": "~1.21.2",
"@contentstack/cli-cm-import": "~1.21.3",
"@contentstack/cli-command": "~1.5.0",
"@contentstack/cli-utilities": "~1.11.0",
"chalk": "^4.1.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-export/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-command": "~1.5.0",
"@contentstack/cli-variants": "~1.2.0",
"@contentstack/cli-variants": "~1.2.1",
"@oclif/core": "^4.2.7",
"@contentstack/cli-utilities": "~1.11.0",
"async": "^3.2.6",
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.21.2 darwin-arm64 node-v22.14.0
@contentstack/cli-cm-import/1.21.3 darwin-arm64 node-v22.14.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
4 changes: 2 additions & 2 deletions packages/contentstack-import/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@contentstack/cli-cm-import",
"description": "Contentstack CLI plugin to import content into stack",
"version": "1.21.2",
"version": "1.21.3",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-audit": "~1.12.1",
"@contentstack/cli-command": "~1.5.0",
"@contentstack/cli-utilities": "~1.11.0",
"@contentstack/management": "~1.20.2",
"@contentstack/cli-variants": "~1.2.0",
"@contentstack/cli-variants": "~1.2.1",
"@oclif/core": "^4.2.7",
"big-json": "^3.2.0",
"bluebird": "^3.7.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-import/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ const config: DefaultConfig = {
getEncryptionKeyMaxRetry: 3,
// useBackedupDir: '',
// backupConcurrency: 10,
onlyTSModules: ['taxonomies', 'personalize'],
onlyTSModules: ['taxonomies', 'personalize', 'variant-entries'],
auditConfig: {
noLog: false, // Skip logs printing on terminal
skipConfirm: true, // Skip confirmation if any
Expand Down
1 change: 1 addition & 0 deletions packages/contentstack-migration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"@oclif/test": "^4.1.6",
"chai": "^4.5.0",
"eslint": "^8.57.1",
"eslint-config-oclif": "^6.0.46",
"jsdoc-to-markdown": "^8.0.3",
"nock": "^13.5.6",
"nyc": "^15.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-seed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-cm-import": "~1.21.2",
"@contentstack/cli-cm-import": "~1.21.3",
"@contentstack/cli-command": "~1.5.0",
"@contentstack/cli-utilities": "~1.11.0",
"@contentstack/management": "~1.20.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-variants/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentstack/cli-variants",
"version": "1.2.0",
"version": "1.2.1",
"description": "Variants plugin",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions packages/contentstack-variants/src/import/experiences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ export default class Experiences extends PersonalizationAdapter<ImportConfig> {
return true;
}
} catch (error) {
this.log(this.config, `Error while validating variant group and variants creation:`, 'error');
throw error;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ export class PersonalizationAdapter<T> extends AdapterHelper<T, HttpClient> impl
const token = authenticationHandler.accessToken;
if (authenticationHandler.isOauthEnabled) {
this.apiClient.headers({ authorization: token });
if(this.adapterConfig.cmaConfig) {
if (this.adapterConfig.cmaConfig) {
this.cmaAPIClient?.headers({ authorization: token });
}
} else {
this.apiClient.headers({ authtoken: token });
if(this.adapterConfig.cmaConfig) {
if (this.adapterConfig.cmaConfig) {
this.cmaAPIClient?.headers({ authtoken: token });
}
}
Expand Down Expand Up @@ -91,12 +91,18 @@ export class PersonalizationAdapter<T> extends AdapterHelper<T, HttpClient> impl

async getExperience(experienceUid: string): Promise<ExperienceStruct | void> {
const getExperiencesEndPoint = `/experiences/${experienceUid}`;
if (this.apiClient.requestConfig?.().data) {
delete this.apiClient.requestConfig?.().data; // explicitly prevent any accidental body
}
const data = await this.apiClient.get(getExperiencesEndPoint);
return (await this.handleVariantAPIRes(data)) as ExperienceStruct;
}

async getExperienceVersions(experienceUid: string): Promise<ExperienceStruct | void> {
const getExperiencesVersionsEndPoint = `/experiences/${experienceUid}/versions`;
if (this.apiClient.requestConfig?.().data) {
delete this.apiClient.requestConfig?.().data; // explicitly prevent any accidental body
}
const data = await this.apiClient.get(getExperiencesVersionsEndPoint);
return (await this.handleVariantAPIRes(data)) as ExperienceStruct;
}
Expand Down Expand Up @@ -231,11 +237,7 @@ export class PersonalizationAdapter<T> extends AdapterHelper<T, HttpClient> impl

const errorMsg = data?.errors
? formatErrors(data.errors)
: data?.error ||
data?.error_message ||
data?.message ||
'Something went wrong while processing variant entries request!';

: data?.error || data?.error_message || data?.message || data;
throw errorMsg;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ export class VariantHttpClient<C> extends AdapterHelper<C, HttpClient> implement

const errorMsg = data?.errors
? formatErrors(data.errors)
: data?.error_message || data?.message || 'Something went wrong while processing entry variant request!';
: data?.error_message || data?.message || data;

throw errorMsg;
}
Expand Down
14 changes: 7 additions & 7 deletions packages/contentstack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli
$ csdx COMMAND
running command...
$ csdx (--version|-v)
@contentstack/cli/1.40.0 darwin-arm64 node-v22.14.0
@contentstack/cli/1.40.1 darwin-arm64 node-v22.14.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down Expand Up @@ -3646,8 +3646,8 @@ USAGE
$ csdx launch [-d <value>] [-c <value>] [--type GitHub|FileUpload] [--framework Gatsby|NextJs|CRA (Create
React App)|CSR (Client-Side Rendered)|Angular|VueJs|Other] [--org <value>] [-n <value>] [-e <value>] [--branch
<value>] [--build-command <value>] [--out-dir <value>] [--server-command <value>] [--variable-type Import variables
from a stack|Manually add custom variables to the list|Import variables from the local env file] [-a <value>]
[--env-variables <value>] [--redeploy-latest] [--redeploy-last-upload]
from a stack|Manually add custom variables to the list|Import variables from the .env.local file|Skip adding
environment variables] [-a <value>] [--env-variables <value>] [--redeploy-latest] [--redeploy-last-upload]

FLAGS
-a, --alias=<value> [optional] Alias (name) for the delivery token.
Expand All @@ -3670,9 +3670,10 @@ FLAGS
--type=<option> [optional] Type of adapters. <options: GitHub|FileUpload>
<options: GitHub|FileUpload>
--variable-type=<option> [optional] Provide a variable type. <options: Import variables from a stack|Manually add
custom variables to the list|Import variables from the local env file>
custom variables to the list|Import variables from the .env.local file|Skip adding
environment variables>
<options: Import variables from a stack|Manually add custom variables to the list|Import
variables from the local env file>
variables from the .env.local file|Skip adding environment variables>

DESCRIPTION
Launch related operations
Expand Down Expand Up @@ -3775,8 +3776,7 @@ USAGE
$ csdx launch:functions [-p <value>] [-d <value>]

FLAGS
-d, --data-dir=<value> [default: /Users/aman.kumar/Documents/datasync-repo/cli/packages/contentstack] Current working
directory
-d, --data-dir=<value> [default: /Users/sunil.lakshman/Documents/cli/packages/contentstack] Current working directory
-p, --port=<value> [default: 3000] Port number

DESCRIPTION
Expand Down
4 changes: 2 additions & 2 deletions packages/contentstack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@contentstack/cli-cm-clone": "~1.14.0",
"@contentstack/cli-cm-export": "~1.16.0",
"@contentstack/cli-cm-export-to-csv": "~1.8.0",
"@contentstack/cli-cm-import": "~1.21.2",
"@contentstack/cli-cm-import": "~1.21.3",
"@contentstack/cli-cm-import-setup": "1.2.0",
"@contentstack/cli-cm-migrate-rte": "~1.5.1",
"@contentstack/cli-cm-seed": "~1.11.0",
Expand All @@ -39,7 +39,7 @@
"@contentstack/cli-launch": "^1.8.0",
"@contentstack/cli-migration": "~1.7.0",
"@contentstack/cli-utilities": "~1.11.0",
"@contentstack/cli-variants": "~1.2.0",
"@contentstack/cli-variants": "~1.2.1",
"@contentstack/management": "~1.20.2",
"@oclif/core": "^4.2.10",
"@oclif/plugin-help": "^6.2.27",
Expand Down
Loading
Loading