Skip to content

Commit

Permalink
Merge pull request #1602 from contentstack/staging
Browse files Browse the repository at this point in the history
DX | 07-10-2024 | Variant bugs & OAuth support release
  • Loading branch information
aman19K authored Oct 4, 2024
2 parents a6bfacc + 8d430e8 commit f364fe0
Show file tree
Hide file tree
Showing 62 changed files with 775 additions and 314 deletions.
401 changes: 323 additions & 78 deletions package-lock.json

Large diffs are not rendered by default.

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.7.1 darwin-arm64 node-v22.2.0
@contentstack/cli-audit/1.7.2 darwin-arm64 node-v22.2.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
6 changes: 3 additions & 3 deletions packages/contentstack-audit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentstack/cli-audit",
"version": "1.7.1",
"version": "1.7.2",
"description": "Contentstack audit plugin",
"author": "Contentstack CLI",
"homepage": "https://github.com/contentstack/cli",
Expand All @@ -18,8 +18,8 @@
"/oclif.manifest.json"
],
"dependencies": {
"@contentstack/cli-command": "~1.3.0",
"@contentstack/cli-utilities": "~1.7.2",
"@contentstack/cli-command": "~1.3.2",
"@contentstack/cli-utilities": "~1.8.0",
"@oclif/plugin-help": "^5",
"@oclif/plugin-plugins": "^5.0.0",
"chalk": "^4.1.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-auth
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-auth/1.3.21 darwin-arm64 node-v22.2.0
@contentstack/cli-auth/1.3.22 darwin-arm64 node-v22.2.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
6 changes: 3 additions & 3 deletions packages/contentstack-auth/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-auth",
"description": "Contentstack CLI plugin for authentication activities",
"version": "1.3.21",
"version": "1.3.22",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"scripts": {
Expand All @@ -22,8 +22,8 @@
"test:unit:report": "nyc --extension .ts mocha --forbid-only \"test/unit/**/*.test.ts\""
},
"dependencies": {
"@contentstack/cli-command": "~1.3.0",
"@contentstack/cli-utilities": "~1.7.2",
"@contentstack/cli-command": "~1.3.2",
"@contentstack/cli-utilities": "~1.8.0",
"chalk": "^4.0.0",
"debug": "^4.1.1",
"inquirer": "8.2.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-bootstrap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $ npm install -g @contentstack/cli-cm-bootstrap
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-cm-bootstrap/1.12.0 darwin-arm64 node-v22.2.0
@contentstack/cli-cm-bootstrap/1.13.0 darwin-arm64 node-v22.2.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
8 changes: 4 additions & 4 deletions packages/contentstack-bootstrap/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-cm-bootstrap",
"description": "Bootstrap contentstack apps",
"version": "1.12.0",
"version": "1.13.0",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"scripts": {
Expand All @@ -17,9 +17,9 @@
"test:report": "nyc --reporter=lcov mocha \"test/**/*.test.js\""
},
"dependencies": {
"@contentstack/cli-cm-seed": "~1.9.0",
"@contentstack/cli-command": "~1.3.0",
"@contentstack/cli-utilities": "~1.7.2",
"@contentstack/cli-cm-seed": "~1.10.0",
"@contentstack/cli-command": "~1.3.2",
"@contentstack/cli-utilities": "~1.8.0",
"inquirer": "8.2.4",
"mkdirp": "^1.0.4",
"tar": "^6.2.1 "
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.1.3 darwin-arm64 node-v22.2.0
@contentstack/cli-cm-branches/1.1.4 darwin-arm64 node-v22.2.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
10 changes: 5 additions & 5 deletions packages/contentstack-branches/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@contentstack/cli-cm-branches",
"description": "Contentstack CLI plugin to do branches operations",
"version": "1.1.3",
"version": "1.1.4",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-command": "~1.3.0",
"@contentstack/cli-utilities": "~1.7.2",
"@contentstack/cli-command": "~1.3.2",
"@contentstack/cli-utilities": "~1.8.0",
"@oclif/core": "^3.26.5",
"async": "^3.2.4",
"big-json": "^3.2.0",
Expand All @@ -25,8 +25,8 @@
"winston": "^3.7.2"
},
"devDependencies": {
"@contentstack/cli-auth": "~1.3.19",
"@contentstack/cli-config": "~1.7.0",
"@contentstack/cli-auth": "~1.3.22",
"@contentstack/cli-config": "~1.7.3",
"@contentstack/cli-dev-dependencies": "~1.2.4",
"@oclif/plugin-help": "^5.1.19",
"@oclif/test": "^2.5.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-bulk-publish/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-cm-bulk-publish
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-cm-bulk-publish/1.4.8 darwin-arm64 node-v22.2.0
@contentstack/cli-cm-bulk-publish/1.4.9 darwin-arm64 node-v22.2.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
6 changes: 3 additions & 3 deletions packages/contentstack-bulk-publish/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@contentstack/cli-cm-bulk-publish",
"description": "Contentstack CLI plugin for bulk publish actions",
"version": "1.4.8",
"version": "1.4.9",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-command": "~1.3.0",
"@contentstack/cli-utilities": "~1.7.2",
"@contentstack/cli-command": "~1.3.2",
"@contentstack/cli-utilities": "~1.8.0",
"bluebird": "^3.7.2",
"chalk": "^4.1.2",
"dotenv": "^16.1.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-clone/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $ npm install -g @contentstack/cli-cm-clone
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-cm-clone/1.12.0 darwin-arm64 node-v22.2.0
@contentstack/cli-cm-clone/1.13.0 darwin-arm64 node-v22.2.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
10 changes: 5 additions & 5 deletions packages/contentstack-clone/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@contentstack/cli-cm-clone",
"description": "Contentstack stack clone plugin",
"version": "1.12.0",
"version": "1.13.0",
"author": "Contentstack",
"bugs": "https://github.com/rohitmishra209/cli-cm-clone/issues",
"dependencies": {
"@colors/colors": "^1.5.0",
"@contentstack/cli-cm-export": "~1.13.0",
"@contentstack/cli-cm-import": "~1.18.0",
"@contentstack/cli-command": "~1.3.0",
"@contentstack/cli-utilities": "~1.7.2",
"@contentstack/cli-cm-export": "~1.14.0",
"@contentstack/cli-cm-import": "~1.19.0",
"@contentstack/cli-command": "~1.3.2",
"@contentstack/cli-utilities": "~1.8.0",
"async": "^3.2.4",
"chalk": "^4.1.0",
"child_process": "^1.0.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/contentstack-command/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-command",
"description": "Contentstack CLI plugin for configuration",
"version": "1.3.1",
"version": "1.3.2",
"author": "Contentstack",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand All @@ -17,7 +17,7 @@
"format": "eslint src/**/*.ts --fix"
},
"dependencies": {
"@contentstack/cli-utilities": "~1.7.2",
"@contentstack/cli-utilities": "~1.8.0",
"contentstack": "^3.10.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-config
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-config/1.7.2 darwin-arm64 node-v22.2.0
@contentstack/cli-config/1.7.3 darwin-arm64 node-v22.2.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
6 changes: 3 additions & 3 deletions packages/contentstack-config/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-config",
"description": "Contentstack CLI plugin for configuration",
"version": "1.7.2",
"version": "1.7.3",
"author": "Contentstack",
"scripts": {
"build": "npm run clean && npm run compile",
Expand All @@ -21,8 +21,8 @@
"test:unit:report": "nyc --extension .ts mocha --forbid-only \"test/unit/**/*.test.ts\""
},
"dependencies": {
"@contentstack/cli-command": "~1.3.0",
"@contentstack/cli-utilities": "~1.7.2",
"@contentstack/cli-command": "~1.3.2",
"@contentstack/cli-utilities": "~1.8.0",
"chalk": "^4.0.0",
"debug": "^4.1.1",
"inquirer": "8.2.4",
Expand Down
6 changes: 3 additions & 3 deletions packages/contentstack-export-to-csv/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@contentstack/cli-cm-export-to-csv",
"description": "Export entities to csv",
"version": "1.7.2",
"version": "1.7.3",
"author": "Abhinav Gupta @abhinav-from-contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-command": "~1.3.0",
"@contentstack/cli-utilities": "~1.7.2",
"@contentstack/cli-command": "~1.3.2",
"@contentstack/cli-utilities": "~1.8.0",
"chalk": "^4.1.0",
"fast-csv": "^4.3.6",
"inquirer": "8.2.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-export/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ $ npm install -g @contentstack/cli-cm-export
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-cm-export/1.13.0 darwin-arm64 node-v22.2.0
@contentstack/cli-cm-export/1.14.0 darwin-arm64 node-v22.2.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
12 changes: 6 additions & 6 deletions packages/contentstack-export/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@contentstack/cli-cm-export",
"description": "Contentstack CLI plugin to export content from stack",
"version": "1.13.0",
"version": "1.14.0",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-command": "~1.3.0",
"@contentstack/cli-variants": "~1.0.0",
"@contentstack/cli-utilities": "~1.7.2",
"@contentstack/cli-command": "~1.3.2",
"@contentstack/cli-variants": "~1.1.0",
"@contentstack/cli-utilities": "~1.8.0",
"@oclif/core": "^3.26.5",
"async": "^3.2.4",
"big-json": "^3.2.0",
Expand All @@ -25,8 +25,8 @@
"winston": "^3.7.2"
},
"devDependencies": {
"@contentstack/cli-auth": "~1.3.19",
"@contentstack/cli-config": "~1.7.0",
"@contentstack/cli-auth": "~1.3.22",
"@contentstack/cli-config": "~1.7.3",
"@contentstack/cli-dev-dependencies": "~1.2.4",
"@oclif/plugin-help": "^5.1.19",
"@oclif/test": "^2.5.6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ export default class ExportMarketplaceApps {
*/
async getAppConfigurations(index: number, appInstallation: any) {
const appName = appInstallation?.manifest?.name;
log(this.exportConfig, `Exporting ${appName} app and it's config.`, 'info');
const appUid = appInstallation?.manifest?.uid;
const app = appName || appUid;
log(this.exportConfig, `Exporting ${app} app and it's config.`, 'info');

await this.appSdk
.marketplace(this.exportConfig.org_uid)
Expand All @@ -158,17 +160,17 @@ export default class ExportMarketplaceApps {

if (!isEmpty(data?.server_configuration)) {
this.installedApps[index]['server_configuration'] = this.nodeCrypto.encrypt(data.server_configuration);
log(this.exportConfig, `Exported ${appName} app and it's config.`, 'success');
log(this.exportConfig, `Exported ${app} app and it's config.`, 'success');
} else {
log(this.exportConfig, `Exported ${appName} app`, 'success');
log(this.exportConfig, `Exported ${app} app`, 'success');
}
} else if (error) {
log(this.exportConfig, `Error on exporting ${appName} app and it's config.`, 'error');
log(this.exportConfig, `Error on exporting ${app} app and it's config.`, 'error');
log(this.exportConfig, error, 'error');
}
})
.catch((error: any) => {
log(this.exportConfig, `Failed to export ${appName} app config ${formatError(error)}`, 'error');
log(this.exportConfig, `Failed to export ${app} app config ${formatError(error)}`, 'error');
log(this.exportConfig, error, 'error');
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
AnyProperty,
} from '@contentstack/cli-variants';

import { log, formatError } from '../../utils';
import { log } from '../../utils';
import { ModuleClassParams, ExportConfig } from '../../types';

export default class ExportPersonalize {
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.18.0 darwin-arm64 node-v22.2.0
@contentstack/cli-cm-import/1.19.0 darwin-arm64 node-v22.2.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
10 changes: 5 additions & 5 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.18.0",
"version": "1.19.0",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-audit": "~1.7.0",
"@contentstack/cli-command": "~1.3.0",
"@contentstack/cli-utilities": "~1.7.2",
"@contentstack/cli-audit": "~1.7.2",
"@contentstack/cli-command": "~1.3.2",
"@contentstack/cli-utilities": "~1.8.0",
"@contentstack/management": "~1.17.0",
"@contentstack/cli-variants": "~1.0.0",
"@contentstack/cli-variants": "~1.1.0",
"@oclif/core": "^3.26.5",
"big-json": "^3.2.0",
"bluebird": "^3.7.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ export default class ImportMarketplaceApps {
);

if (installation.installation_uid) {
const appName = this.appNameMapping[app.manifest.name] ?? app.manifest.name;
const appName = this.appNameMapping[app.manifest.name] || app.manifest.name || app.manifest.uid;
log(this.importConfig, `${appName} app installed successfully.!`, 'success');
await makeRedirectUrlCall(installation, appName, this.importConfig);
this.installationUidMapping[app.uid] = installation.installation_uid;
Expand All @@ -448,7 +448,8 @@ export default class ImportMarketplaceApps {
await confirmToCloseProcess(installation, this.importConfig);
}
} else if (!isEmpty(configuration) || !isEmpty(server_configuration)) {
log(this.importConfig, `${app.manifest.name} is already installed`, 'success');
const appName = app.manifest.name || app.manifest.uid;
log(this.importConfig, `${appName} is already installed`, 'success');
updateParam = await ifAppAlreadyExist(app, currentStackApp, this.importConfig);
}

Expand Down Expand Up @@ -481,7 +482,8 @@ export default class ImportMarketplaceApps {
trace(data, 'error', true);
log(this.importConfig, formatError(data.message), 'success');
} else {
log(this.importConfig, `${app.manifest.name} app config updated successfully.!`, 'success');
const appName = app.manifest.name || app.manifest.uid;
log(this.importConfig, `${appName} app config updated successfully.!`, 'success');
}
})
.catch((error: any) => {
Expand Down
Loading

0 comments on commit f364fe0

Please sign in to comment.