Skip to content

Commit 536e219

Browse files
authored
Merge pull request #1473 from contentstack/next-feature-update
Variants changes
2 parents b7d3593 + 3726f57 commit 536e219

File tree

95 files changed

+4967
-2505
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+4967
-2505
lines changed

README.md

100755100644
File mode changed.

package-lock.json

Lines changed: 634 additions & 2358 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/contentstack-bootstrap/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"test:report": "nyc --reporter=lcov mocha \"test/**/*.test.js\""
1818
},
1919
"dependencies": {
20-
"@contentstack/cli-cm-seed": "~1.7.9",
20+
"@contentstack/cli-cm-seed": "~1.8.0",
2121
"@contentstack/cli-command": "~1.3.0",
2222
"@contentstack/cli-utilities": "~1.7.2",
2323
"inquirer": "8.2.4",
@@ -73,4 +73,4 @@
7373
}
7474
},
7575
"repository": "contentstack/cli"
76-
}
76+
}

packages/contentstack-clone/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ $ npm install -g @contentstack/cli-cm-clone
1616
$ csdx COMMAND
1717
running command...
1818
$ csdx (--version)
19-
@contentstack/cli-cm-clone/1.10.7 darwin-arm64 node-v22.2.0
19+
@contentstack/cli-cm-clone/1.11.0 darwin-arm64 node-v22.2.0
2020
$ csdx --help [COMMAND]
2121
USAGE
2222
$ csdx COMMAND

packages/contentstack-clone/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "@contentstack/cli-cm-clone",
33
"description": "Contentstack stack clone plugin",
4-
"version": "1.10.7",
4+
"version": "1.11.0",
55
"author": "Contentstack",
66
"bugs": "https://github.com/rohitmishra209/cli-cm-clone/issues",
77
"dependencies": {
88
"@colors/colors": "^1.5.0",
9-
"@contentstack/cli-cm-export": "~1.11.7",
10-
"@contentstack/cli-cm-import": "~1.16.7",
9+
"@contentstack/cli-cm-export": "~1.12.0",
10+
"@contentstack/cli-cm-import": "~1.17.0",
1111
"@contentstack/cli-command": "~1.3.0",
1212
"@contentstack/cli-utilities": "~1.7.2",
1313
"async": "^3.2.4",

packages/contentstack-command/src/interfaces/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ export interface Region {
22
name: string;
33
cma: string;
44
cda: string;
5-
uiHost: string;
65
developerHubUrl: string;
7-
launchHubUrl: string;
86
personalizeUrl: string;
7+
launchHubUrl: string;
8+
uiHost: string;
99
}

packages/contentstack-export/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ $ npm install -g @contentstack/cli-cm-export
4848
$ csdx COMMAND
4949
running command...
5050
$ csdx (--version)
51-
@contentstack/cli-cm-export/1.11.7 darwin-arm64 node-v22.2.0
51+
@contentstack/cli-cm-export/1.12.0 darwin-arm64 node-v22.2.0
5252
$ csdx --help [COMMAND]
5353
USAGE
5454
$ csdx COMMAND

packages/contentstack-export/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
22
"name": "@contentstack/cli-cm-export",
33
"description": "Contentstack CLI plugin to export content from stack",
4-
"version": "1.11.7",
4+
"version": "1.12.0",
55
"author": "Contentstack",
66
"bugs": "https://github.com/contentstack/cli/issues",
77
"dependencies": {
88
"@contentstack/cli-command": "~1.3.0",
9+
"@contentstack/cli-variants": "~0.0.1-alpha",
910
"@contentstack/cli-utilities": "~1.7.2",
1011
"@oclif/core": "^3.26.5",
1112
"async": "^3.2.4",
@@ -98,4 +99,4 @@
9899
}
99100
},
100101
"repository": "https://github.com/contentstack/cli"
101-
}
102+
}

packages/contentstack-export/src/commands/cm/stacks/export.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ export default class ExportCommand extends Command {
105105
let exportConfig = await setupExportConfig(flags);
106106
// Note setting host to create cma client
107107
exportConfig.host = this.cmaHost;
108+
exportConfig.region = this.region;
108109
exportConfig.developerHubBaseUrl = this.developerHubUrl;
109110
exportDir = exportConfig.cliLogsPath || exportConfig.data || exportConfig.exportDir;
110111
const managementAPIClient: ContentstackClient = await managementSDKClient(exportConfig);

packages/contentstack-export/src/config/index.ts

Lines changed: 83 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const config: DefaultConfig = {
3333
'content-types',
3434
'custom-roles',
3535
'workflows',
36+
'personalization',
3637
'entries',
3738
'labels',
3839
'marketplace-apps',
@@ -143,6 +144,47 @@ const config: DefaultConfig = {
143144
dependencies: ['locales', 'content-types'],
144145
exportVersions: false,
145146
},
147+
personalization: {
148+
baseURL: {
149+
NA: 'https://personalization-api.contentstack.com',
150+
},
151+
dirName: 'personalization',
152+
exportOrder: ['attributes', 'audiences', 'events', 'experiences'],
153+
projects: {
154+
dirName: 'projects',
155+
fileName: 'projects.json',
156+
},
157+
attributes: {
158+
dirName: 'attributes',
159+
fileName: 'attributes.json',
160+
},
161+
audiences: {
162+
dirName: 'audiences',
163+
fileName: 'audiences.json',
164+
},
165+
events: {
166+
dirName: 'events',
167+
fileName: 'events.json',
168+
},
169+
experiences: {
170+
dirName: 'experiences',
171+
fileName: 'experiences.json',
172+
},
173+
},
174+
variantEntry: {
175+
serveMockData: false,
176+
dirName: 'variants',
177+
fileName: 'index.json',
178+
chunkFileSize: 1,
179+
query: {
180+
skip: 0,
181+
limit: 100,
182+
include_variant: false,
183+
include_count: true,
184+
include_publish_details: true,
185+
},
186+
mockDataPath: './variant-mock-data.json',
187+
},
146188
extensions: {
147189
dirName: 'extensions',
148190
fileName: 'extensions.json',
@@ -166,7 +208,46 @@ const config: DefaultConfig = {
166208
dirName: 'taxonomies',
167209
fileName: 'taxonomies.json',
168210
invalidKeys: ['updated_at', 'created_by', 'updated_by', 'stackHeaders', 'urlPath', 'created_at'],
169-
}
211+
},
212+
events: {
213+
dirName: 'events',
214+
fileName: 'events.json',
215+
invalidKeys: [
216+
'updatedAt',
217+
'createdBy',
218+
'updatedBy',
219+
'_id',
220+
'createdAt',
221+
'createdByUserName',
222+
'updatedByUserName',
223+
],
224+
},
225+
audiences: {
226+
dirName: 'audiences',
227+
fileName: 'audiences.json',
228+
invalidKeys: [
229+
'updatedAt',
230+
'createdBy',
231+
'updatedBy',
232+
'_id',
233+
'createdAt',
234+
'createdByUserName',
235+
'updatedByUserName',
236+
],
237+
},
238+
attributes: {
239+
dirName: 'attributes',
240+
fileName: 'attributes.json',
241+
invalidKeys: [
242+
'updatedAt',
243+
'createdBy',
244+
'updatedBy',
245+
'_id',
246+
'createdAt',
247+
'createdByUserName',
248+
'updatedByUserName',
249+
],
250+
},
170251
},
171252
languagesCode: [
172253
'af-za',
@@ -393,6 +474,7 @@ const config: DefaultConfig = {
393474
stacks: '/stacks/',
394475
},
395476
preserveStackVersion: false,
477+
personalizationEnabled: false,
396478
fetchConcurrency: 5,
397479
writeConcurrency: 5,
398480
developerHubBaseUrl: '',

0 commit comments

Comments
 (0)