Skip to content

Commit 2170194

Browse files
authored
Merge pull request #1204 from contentstack/release/hotfix-CS-42696
Release/hotfix cs 42696
2 parents c62f63b + ae7b287 commit 2170194

25 files changed

Lines changed: 1450 additions & 1476 deletions

File tree

package-lock.json

Lines changed: 913 additions & 1103 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: 42 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ USAGE
4141
* [`csdx plugins:install PLUGIN...`](#csdx-pluginsinstall-plugin-1)
4242
* [`csdx plugins:link PLUGIN`](#csdx-pluginslink-plugin)
4343
* [`csdx plugins:uninstall PLUGIN...`](#csdx-pluginsuninstall-plugin)
44+
* [`csdx plugins:reset`](#csdx-pluginsreset)
4445
* [`csdx plugins:uninstall PLUGIN...`](#csdx-pluginsuninstall-plugin-1)
4546
* [`csdx plugins:uninstall PLUGIN...`](#csdx-pluginsuninstall-plugin-2)
4647
* [`csdx plugins:update`](#csdx-pluginsupdate)
@@ -284,7 +285,7 @@ EXAMPLES
284285
$ csdx plugins
285286
```
286287

287-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v3.8.4/src/commands/plugins/index.ts)_
288+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v4.1.10/src/commands/plugins/index.ts)_
288289

289290
## `csdx plugins:install PLUGIN...`
290291

@@ -300,7 +301,11 @@ ARGUMENTS
300301
FLAGS
301302
-f, --force Run yarn install with force flag.
302303
-h, --help Show CLI help.
303-
-v, --verbose
304+
-s, --silent Silences yarn output.
305+
-v, --verbose Show verbose yarn output.
306+
307+
GLOBAL FLAGS
308+
--json Format output as json.
304309
305310
DESCRIPTION
306311
Installs a plugin into the CLI.
@@ -317,11 +322,11 @@ ALIASES
317322
$ csdx plugins:add
318323
319324
EXAMPLES
320-
$ csdx plugins:install myplugin
325+
$ csdx plugins:add myplugin
321326
322-
$ csdx plugins:install https://github.com/someuser/someplugin
327+
$ csdx plugins:add https://github.com/someuser/someplugin
323328
324-
$ csdx plugins:install someuser/someplugin
329+
$ csdx plugins:add someuser/someplugin
325330
```
326331

327332
## `csdx plugins:inspect PLUGIN...`
@@ -349,7 +354,7 @@ EXAMPLES
349354
$ csdx plugins:inspect myplugin
350355
```
351356

352-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v3.8.4/src/commands/plugins/inspect.ts)_
357+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v4.1.10/src/commands/plugins/inspect.ts)_
353358

354359
## `csdx plugins:install PLUGIN...`
355360

@@ -365,7 +370,11 @@ ARGUMENTS
365370
FLAGS
366371
-f, --force Run yarn install with force flag.
367372
-h, --help Show CLI help.
368-
-v, --verbose
373+
-s, --silent Silences yarn output.
374+
-v, --verbose Show verbose yarn output.
375+
376+
GLOBAL FLAGS
377+
--json Format output as json.
369378
370379
DESCRIPTION
371380
Installs a plugin into the CLI.
@@ -389,7 +398,7 @@ EXAMPLES
389398
$ csdx plugins:install someuser/someplugin
390399
```
391400

392-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v3.8.4/src/commands/plugins/install.ts)_
401+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v4.1.10/src/commands/plugins/install.ts)_
393402

394403
## `csdx plugins:link PLUGIN`
395404

@@ -403,8 +412,9 @@ ARGUMENTS
403412
PATH [default: .] path to plugin
404413
405414
FLAGS
406-
-h, --help Show CLI help.
415+
-h, --help Show CLI help.
407416
-v, --verbose
417+
--[no-]install Install dependencies after linking the plugin.
408418
409419
DESCRIPTION
410420
Links a plugin into the CLI for development.
@@ -418,7 +428,7 @@ EXAMPLES
418428
$ csdx plugins:link myplugin
419429
```
420430

421-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v3.8.4/src/commands/plugins/link.ts)_
431+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v4.1.10/src/commands/plugins/link.ts)_
422432

423433
## `csdx plugins:uninstall PLUGIN...`
424434

@@ -441,8 +451,22 @@ DESCRIPTION
441451
ALIASES
442452
$ csdx plugins:unlink
443453
$ csdx plugins:remove
454+
455+
EXAMPLES
456+
$ csdx plugins:remove myplugin
457+
```
458+
459+
## `csdx plugins:reset`
460+
461+
Remove all user-installed and linked plugins.
462+
463+
```
464+
USAGE
465+
$ csdx plugins:reset
444466
```
445467

468+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v4.1.10/src/commands/plugins/reset.ts)_
469+
446470
## `csdx plugins:uninstall PLUGIN...`
447471

448472
Removes a plugin from the CLI.
@@ -464,9 +488,12 @@ DESCRIPTION
464488
ALIASES
465489
$ csdx plugins:unlink
466490
$ csdx plugins:remove
491+
492+
EXAMPLES
493+
$ csdx plugins:uninstall myplugin
467494
```
468495

469-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v3.8.4/src/commands/plugins/uninstall.ts)_
496+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v4.1.10/src/commands/plugins/uninstall.ts)_
470497

471498
## `csdx plugins:uninstall PLUGIN...`
472499

@@ -489,6 +516,9 @@ DESCRIPTION
489516
ALIASES
490517
$ csdx plugins:unlink
491518
$ csdx plugins:remove
519+
520+
EXAMPLES
521+
$ csdx plugins:unlink myplugin
492522
```
493523

494524
## `csdx plugins:update`
@@ -507,5 +537,5 @@ DESCRIPTION
507537
Update installed plugins.
508538
```
509539

510-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v3.8.4/src/commands/plugins/update.ts)_
540+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v4.1.10/src/commands/plugins/update.ts)_
511541
<!-- commandsstop -->

packages/contentstack-audit/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"@contentstack/cli-command": "~1.2.16",
2222
"@contentstack/cli-utilities": "~1.5.8",
2323
"@oclif/plugin-help": "^5",
24-
"@oclif/plugin-plugins": "^3.8.4",
24+
"@oclif/plugin-plugins": "^4.1.9",
2525
"chalk": "^4.1.2",
2626
"fast-csv": "^4.3.6",
2727
"fs-extra": "^11.1.1",
@@ -84,4 +84,4 @@
8484
"keywords": [
8585
"oclif"
8686
]
87-
}
87+
}

packages/contentstack-bootstrap/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ $ npm install -g @contentstack/cli-cm-bootstrap
1515
$ csdx COMMAND
1616
running command...
1717
$ csdx (--version)
18-
@contentstack/cli-cm-bootstrap/1.7.0 darwin-arm64 node-v20.8.0
18+
@contentstack/cli-cm-bootstrap/1.7.1 darwin-arm64 node-v20.8.0
1919
$ csdx --help [COMMAND]
2020
USAGE
2121
$ csdx COMMAND

packages/contentstack-bootstrap/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-bootstrap",
33
"description": "Bootstrap contentstack apps",
4-
"version": "1.7.0",
4+
"version": "1.7.1",
55
"author": "Contentstack",
66
"bugs": "https://github.com/contentstack/cli/issues",
77
"scripts": {

packages/contentstack-bootstrap/src/bootstrap/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,16 @@ export default class Bootstrap {
112112
} else {
113113
throw new Error(messageHandler.parse('CLI_BOOTSTRAP_NO_API_KEY_FOUND'));
114114
}
115+
116+
if (this.options.livePreviewEnabled) {
117+
cliux.print(
118+
'Important: set management token and app host in the environment file before running the application',
119+
{
120+
color: 'yellow',
121+
},
122+
);
123+
}
124+
115125
cliux.print(messageHandler.parse('CLI_BOOTSTRAP_SUCCESS'));
116126
} catch (error) {
117127
cliux.error(messageHandler.parse('CLI_BOOTSTRAP_STACK_CREATION_FAILED', this.appConfig.stack));

packages/contentstack-bootstrap/src/bootstrap/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,11 @@ const envFileHandler = async (
152152
filePath = path.join(clonedDirectory, fileName);
153153
content = `CONTENTSTACK_API_KEY=${environmentVariables.api_key}\nCONTENTSTACK_DELIVERY_TOKEN=${
154154
environmentVariables.deliveryToken
155-
}\nCONTENTSTACK_ENVIRONMENT=${environmentVariables.environment}${
156-
customHost ? '\nCONTENTSTACK_API_HOST=' + customHost : ''
155+
}\nCONTENTSTACK_ENVIRONMENT=${environmentVariables.environment}\nCONTENTSTACK_API_HOST=${
156+
customHost ? customHost : managementAPIHost
157157
}${
158158
!isUSRegion && !customHost ? '\nCONTENTSTACK_REGION=' + region.name : ''
159-
}\nCONTENTSTACK_LIVE_PREVIEW=${livePreviewEnabled}`;
159+
}\nCONTENTSTACK_LIVE_PREVIEW=${livePreviewEnabled}\nCONTENTSTACK_MANAGEMENT_TOKEN=''\nCONTENTSTACK_APP_HOST=''\nCONTENTSTACK_LIVE_EDIT_TAGS=false`;
160160
result = await writeEnvFile(content, filePath);
161161
break;
162162
case 'gatsby':

packages/contentstack-branches/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ $ npm install -g @contentstack/cli-cm-branches
3737
$ csdx COMMAND
3838
running command...
3939
$ csdx (--version)
40-
@contentstack/cli-cm-branches/1.0.18 darwin-arm64 node-v20.8.0
40+
@contentstack/cli-cm-branches/1.0.19 darwin-arm64 node-v20.8.0
4141
$ csdx --help [COMMAND]
4242
USAGE
4343
$ csdx COMMAND

packages/contentstack-branches/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-branches",
33
"description": "Contentstack CLI plugin to do branches operations",
4-
"version": "1.0.18",
4+
"version": "1.0.19",
55
"author": "Contentstack",
66
"bugs": "https://github.com/contentstack/cli/issues",
77
"dependencies": {

packages/contentstack-branches/src/utils/entry-create-script.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -475,15 +475,17 @@ export function entryCreateScript(contentType) {
475475
try {
476476
compareFilteredProperties.length !== 0 &&
477477
compareFilteredProperties.forEach(async (entryDetails) => {
478-
entryDetails = updateAssetDetailsInEntries(entryDetails);
479-
let createdEntry = await stackSDKInstance.contentType('${contentType}').entry().create({ entry: entryDetails }).catch(error => {
480-
throw error;
481-
});
482-
if(createdEntry){
483-
if (flag.references) {
484-
await updateReferences(entryDetails, createdEntry, references);
478+
if(entryDetails !== undefined){
479+
entryDetails = updateAssetDetailsInEntries(entryDetails);
480+
let createdEntry = await stackSDKInstance.contentType('${contentType}').entry().create({ entry: entryDetails }).catch(error => {
481+
throw error;
482+
});
483+
if(createdEntry){
484+
if (flag.references) {
485+
await updateReferences(entryDetails, createdEntry, references);
486+
}
487+
await updateEntry(createdEntry, entryDetails);
485488
}
486-
await updateEntry(createdEntry, entryDetails);
487489
}
488490
});
489491
} catch (error) {

0 commit comments

Comments
 (0)