Skip to content

Commit 2f4f034

Browse files
committed
modifed the publish entries serialize function to avoid the use of additional array
1 parent 022c91e commit 2f4f034

10 files changed

Lines changed: 2426 additions & 423 deletions

File tree

package-lock.json

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

packages/contentstack-audit/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ EXAMPLES
267267
$ csdx plugins
268268
```
269269

270-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.2/src/commands/plugins/index.ts)_
270+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.4/src/commands/plugins/index.ts)_
271271

272272
## `csdx plugins:add PLUGIN`
273273

@@ -341,7 +341,7 @@ EXAMPLES
341341
$ csdx plugins:inspect myplugin
342342
```
343343

344-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.2/src/commands/plugins/inspect.ts)_
344+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.4/src/commands/plugins/inspect.ts)_
345345

346346
## `csdx plugins:install PLUGIN`
347347

@@ -390,7 +390,7 @@ EXAMPLES
390390
$ csdx plugins:install someuser/someplugin
391391
```
392392

393-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.2/src/commands/plugins/install.ts)_
393+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.4/src/commands/plugins/install.ts)_
394394

395395
## `csdx plugins:link PATH`
396396

@@ -420,7 +420,7 @@ EXAMPLES
420420
$ csdx plugins:link myplugin
421421
```
422422

423-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.2/src/commands/plugins/link.ts)_
423+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.4/src/commands/plugins/link.ts)_
424424

425425
## `csdx plugins:remove [PLUGIN]`
426426

@@ -461,7 +461,7 @@ FLAGS
461461
--reinstall Reinstall all plugins after uninstalling.
462462
```
463463

464-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.2/src/commands/plugins/reset.ts)_
464+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.4/src/commands/plugins/reset.ts)_
465465

466466
## `csdx plugins:uninstall [PLUGIN]`
467467

@@ -489,7 +489,7 @@ EXAMPLES
489489
$ csdx plugins:uninstall myplugin
490490
```
491491

492-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.2/src/commands/plugins/uninstall.ts)_
492+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.4/src/commands/plugins/uninstall.ts)_
493493

494494
## `csdx plugins:unlink [PLUGIN]`
495495

@@ -533,5 +533,5 @@ DESCRIPTION
533533
Update installed plugins.
534534
```
535535

536-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.2/src/commands/plugins/update.ts)_
536+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.4/src/commands/plugins/update.ts)_
537537
<!-- commandsstop -->

packages/contentstack-clone/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"dependencies": {
88
"@colors/colors": "^1.5.0",
99
"@contentstack/cli-cm-export": "~1.11.6",
10-
"@contentstack/cli-cm-import": "~1.16.5",
10+
"@contentstack/cli-cm-import": "~1.16.6",
1111
"@contentstack/cli-command": "~1.2.19",
1212
"@contentstack/cli-utilities": "~1.7.1",
1313
"async": "^3.2.4",

packages/contentstack-import/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ $ npm install -g @contentstack/cli-cm-import
4747
$ csdx COMMAND
4848
running command...
4949
$ csdx (--version)
50-
@contentstack/cli-cm-import/1.16.5 darwin-arm64 node-v22.2.0
50+
@contentstack/cli-cm-import/1.16.6 darwin-arm64 node-v22.2.0
5151
$ csdx --help [COMMAND]
5252
USAGE
5353
$ csdx COMMAND

packages/contentstack-import/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@contentstack/cli-cm-import",
33
"description": "Contentstack CLI plugin to import content into stack",
4-
"version": "1.16.5",
4+
"version": "1.16.6",
55
"author": "Contentstack",
66
"bugs": "https://github.com/contentstack/cli/issues",
77
"dependencies": {

packages/contentstack-import/src/import/modules/entries.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -912,14 +912,13 @@ export default class EntriesImport extends BaseClass {
912912
if (chunk) {
913913
let apiContent = values(chunk as Record<string, any>[]);
914914
let apiContentDuplicate: any = [];
915-
apiContent.forEach((content: Record<string, any>) => {
916-
content?.publish_details?.forEach((publish: Record<string, any>) => {
917-
let c2 = { ...content };
918-
c2.locale = publish.locale;
919-
c2.publish_details = [publish];
920-
apiContentDuplicate.push(c2);
921-
});
922-
});
915+
apiContentDuplicate = apiContent.flatMap((content: Record<string, any>) =>
916+
content?.publish_details?.map((publish: Record<string, any>) => ({
917+
...content,
918+
locale: publish.locale,
919+
publish_details: [publish],
920+
}))
921+
);
923922
apiContent = apiContentDuplicate;
924923
await this.makeConcurrentCall({
925924
apiContent,

packages/contentstack-seed/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"author": "Contentstack",
66
"bugs": "https://github.com/contentstack/cli/issues",
77
"dependencies": {
8-
"@contentstack/cli-cm-import": "~1.16.5",
8+
"@contentstack/cli-cm-import": "~1.16.6",
99
"@contentstack/cli-command": "~1.2.19",
1010
"@contentstack/cli-utilities": "~1.7.1",
1111
"inquirer": "8.2.4",

packages/contentstack/README.md

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli
1818
$ csdx COMMAND
1919
running command...
2020
$ csdx (--version|-v)
21-
@contentstack/cli/1.23.0 darwin-arm64 node-v22.2.0
21+
@contentstack/cli/1.24.0 darwin-arm64 node-v22.2.0
2222
$ csdx --help [COMMAND]
2323
USAGE
2424
$ csdx COMMAND
@@ -3161,18 +3161,23 @@ Set region for CLI
31613161

31623162
```
31633163
USAGE
3164-
$ csdx config:set:region [REGION] [-d <value> -m <value> --ui-host <value> -n <value>]
3164+
$ csdx config:set:region [REGION] [-d <value> -m <value> --ui-host <value> -n <value>] [--developer-hub <value>]
3165+
[--personalize <value>] [--launch <value>]
31653166
31663167
ARGUMENTS
31673168
REGION Name for the region
31683169
31693170
FLAGS
3170-
-d, --cda=<value> Custom host to set for content delivery API, if this flag is added then cma, ui-host and name
3171-
flags are required
3172-
-m, --cma=<value> Custom host to set for content management API, , if this flag is added then cda, ui-host and
3173-
name flags are required
3174-
-n, --name=<value> Name for the region, if this flag is added then cda, cma and ui-host flags are required
3175-
--ui-host=<value> Custom UI host to set for CLI, if this flag is added then cda, cma and name flags are required
3171+
-d, --cda=<value> Custom host to set for content delivery API, if this flag is added then cma, ui-host and
3172+
name flags are required
3173+
-m, --cma=<value> Custom host to set for content management API, , if this flag is added then cda, ui-host
3174+
and name flags are required
3175+
-n, --name=<value> Name for the region, if this flag is added then cda, cma and ui-host flags are required
3176+
--developer-hub=<value> Custom host to set for developer hub API
3177+
--launch=<value> Custom host to set for launch API
3178+
--personalize=<value> Custom host to set for personalization API
3179+
--ui-host=<value> Custom UI host to set for CLI, if this flag is added then cda, cma and name flags are
3180+
required
31763181
31773182
DESCRIPTION
31783183
Set region for CLI
@@ -3191,6 +3196,14 @@ EXAMPLES
31913196
$ csdx config:set:region GCP-NA
31923197
31933198
$ csdx config:set:region --cma <contentstack_cma_endpoint> --cda <contentstack_cda_endpoint> --ui-host <contentstack_ui_host_endpoint> --name "India"
3199+
3200+
$ csdx config:set:region --cma <contentstack_cma_endpoint> --cda <contentstack_cda_endpoint> --ui-host <contentstack_ui_host_endpoint> --name "India" --developer-hub <developer_hub_url>
3201+
3202+
$ csdx config:set:region --cma <contentstack_cma_endpoint> --cda <contentstack_cda_endpoint> --ui-host <contentstack_ui_host_endpoint> --name "India" --personalize <personalize_url>
3203+
3204+
$ csdx config:set:region --cma <contentstack_cma_endpoint> --cda <contentstack_cda_endpoint> --ui-host <contentstack_ui_host_endpoint> --name "India" --launch <launch_url>
3205+
3206+
$ csdx config:set:region --cda <contentstack_cda_endpoint> --cma <contentstack_cma_endpoint> --ui-host <contentstack_ui_host_endpoint> --name "India" --developer-hub <developer_hub_url> --personalize <personalize_url> --launch <launch_url>
31943207
```
31953208

31963209
_See code: [@contentstack/cli-config](https://github.com/contentstack/cli/blob/main/packages/contentstack-config/src/commands/config/set/region.ts)_
@@ -3510,7 +3523,7 @@ EXAMPLES
35103523
$ csdx plugins
35113524
```
35123525

3513-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.2/src/commands/plugins/index.ts)_
3526+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.4/src/commands/plugins/index.ts)_
35143527

35153528
## `csdx plugins:add PLUGIN`
35163529

@@ -3584,7 +3597,7 @@ EXAMPLES
35843597
$ csdx plugins:inspect myplugin
35853598
```
35863599

3587-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.2/src/commands/plugins/inspect.ts)_
3600+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.4/src/commands/plugins/inspect.ts)_
35883601

35893602
## `csdx plugins:install PLUGIN`
35903603

@@ -3633,7 +3646,7 @@ EXAMPLES
36333646
$ csdx plugins:install someuser/someplugin
36343647
```
36353648

3636-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.2/src/commands/plugins/install.ts)_
3649+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.4/src/commands/plugins/install.ts)_
36373650

36383651
## `csdx plugins:link PATH`
36393652

@@ -3663,7 +3676,7 @@ EXAMPLES
36633676
$ csdx plugins:link myplugin
36643677
```
36653678

3666-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.2/src/commands/plugins/link.ts)_
3679+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.4/src/commands/plugins/link.ts)_
36673680

36683681
## `csdx plugins:remove [PLUGIN]`
36693682

@@ -3704,7 +3717,7 @@ FLAGS
37043717
--reinstall Reinstall all plugins after uninstalling.
37053718
```
37063719

3707-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.2/src/commands/plugins/reset.ts)_
3720+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.4/src/commands/plugins/reset.ts)_
37083721

37093722
## `csdx plugins:uninstall [PLUGIN]`
37103723

@@ -3732,7 +3745,7 @@ EXAMPLES
37323745
$ csdx plugins:uninstall myplugin
37333746
```
37343747

3735-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.2/src/commands/plugins/uninstall.ts)_
3748+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.4/src/commands/plugins/uninstall.ts)_
37363749

37373750
## `csdx plugins:unlink [PLUGIN]`
37383751

@@ -3776,7 +3789,7 @@ DESCRIPTION
37763789
Update installed plugins.
37773790
```
37783791

3779-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.2/src/commands/plugins/update.ts)_
3792+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.4/src/commands/plugins/update.ts)_
37803793

37813794
## `csdx tokens`
37823795

packages/contentstack/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"@contentstack/cli-cm-export": "~1.11.6",
3131
"@contentstack/cli-cm-clone": "~1.10.7",
3232
"@contentstack/cli-cm-export-to-csv": "~1.7.2",
33-
"@contentstack/cli-cm-import": "~1.16.5",
33+
"@contentstack/cli-cm-import": "~1.16.6",
3434
"@contentstack/cli-cm-migrate-rte": "~1.4.18",
3535
"@contentstack/cli-cm-seed": "~1.7.8",
3636
"@contentstack/cli-command": "~1.2.19",

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)