Skip to content

Commit

Permalink
Merge branch 'development' into bugfix/CS-43741
Browse files Browse the repository at this point in the history
  • Loading branch information
cs-raj authored Feb 12, 2024
2 parents 2ab82ee + 160c00d commit 75d82e4
Show file tree
Hide file tree
Showing 24 changed files with 70 additions and 98 deletions.
36 changes: 18 additions & 18 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/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
],
"dependencies": {
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-utilities": "~1.5.11",
"@contentstack/cli-utilities": "~1.5.12",
"@oclif/plugin-help": "^5",
"@oclif/plugin-plugins": "^4.1.9",
"chalk": "^4.1.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"dependencies": {
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-utilities": "~1.5.11",
"@contentstack/cli-utilities": "~1.5.12",
"chalk": "^4.0.0",
"debug": "^4.1.1",
"inquirer": "8.2.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-bootstrap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"dependencies": {
"@contentstack/cli-cm-seed": "~1.7.0",
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-utilities": "~1.5.11",
"@contentstack/cli-utilities": "~1.5.12",
"inquirer": "8.2.4",
"mkdirp": "^1.0.4",
"tar": "^6.1.13"
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-branches/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.2.16",
"@contentstack/cli-utilities": "~1.5.11",
"@contentstack/cli-utilities": "~1.5.12",
"@oclif/core": "^2.9.3",
"async": "^3.2.4",
"big-json": "^3.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-bulk-publish/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.2.16",
"@contentstack/cli-utilities": "~1.5.11",
"@contentstack/cli-utilities": "~1.5.12",
"bluebird": "^3.7.2",
"chalk": "^4.1.2",
"dotenv": "^16.1.4",
Expand Down
4 changes: 2 additions & 2 deletions packages/contentstack-clone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"author": "Contentstack",
"bugs": "https://github.com/rohitmishra209/cli-cm-clone/issues",
"dependencies": {
"@contentstack/cli-cm-export": "~1.10.4",
"@contentstack/cli-cm-export": "~1.10.5",
"@contentstack/cli-cm-import": "~1.13.4",
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-utilities": "~1.5.11",
"@contentstack/cli-utilities": "~1.5.12",
"@colors/colors": "^1.5.0",
"async": "^3.2.4",
"chalk": "^4.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-command/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"format": "eslint src/**/*.ts --fix"
},
"dependencies": {
"@contentstack/cli-utilities": "~1.5.11",
"@contentstack/cli-utilities": "~1.5.12",
"contentstack": "^3.10.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"dependencies": {
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-utilities": "~1.5.11",
"@contentstack/cli-utilities": "~1.5.12",
"chalk": "^4.0.0",
"debug": "^4.1.1",
"inquirer": "8.2.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-export-to-csv/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.2.16",
"@contentstack/cli-utilities": "~1.5.11",
"@contentstack/cli-utilities": "~1.5.12",
"chalk": "^4.1.0",
"fast-csv": "^4.3.6",
"inquirer": "8.2.4",
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.2.16",
"@contentstack/cli-utilities": "~1.5.11",
"@contentstack/cli-utilities": "~1.5.12",
"@oclif/core": "^2.9.3",
"async": "^3.2.4",
"big-json": "^3.2.0",
Expand Down
15 changes: 1 addition & 14 deletions packages/contentstack-export/src/utils/interactive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,4 @@ export const askAPIKey = async (): Promise<string> => {
message: 'Enter the stack api key',
name: 'apiKey',
});
};

export const askDeveloperHub = async(regionName: string): Promise<string> =>{
return await cliux.inquire({
type: 'input',
name: 'name',
validate: (url: string) => {
if (!url) return "Developer-hub URL can't be empty.";

return true;
},
message: `Enter the developer-hub base URL for the ${regionName} region - `,
});
}
};
12 changes: 2 additions & 10 deletions packages/contentstack-export/src/utils/marketplace-app-helper.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
import { cliux, configHandler, NodeCrypto, managementSDKClient } from '@contentstack/cli-utilities';
import { cliux, configHandler, NodeCrypto, managementSDKClient, createDeveloperHubUrl } from '@contentstack/cli-utilities';

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

export const getDeveloperHubUrl = async (exportConfig: ExportConfig) => {
const { cma, name } = configHandler.get('region') || {};
let developerHubBaseUrl = exportConfig?.developerHubUrls[cma];

if (!developerHubBaseUrl) {
developerHubBaseUrl = await askDeveloperHub(name);
}

return developerHubBaseUrl.startsWith('http') ? developerHubBaseUrl : `https://${developerHubBaseUrl}`;
return createDeveloperHubUrl(exportConfig.host);
};

export async function getOrgUid(config: ExportConfig): Promise<string> {
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-import/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dependencies": {
"@contentstack/cli-audit": "~1.4.0",
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-utilities": "~1.5.11",
"@contentstack/cli-utilities": "~1.5.12",
"@contentstack/management": "~1.13.0",
"@oclif/core": "^2.9.3",
"big-json": "^3.2.0",
Expand Down
11 changes: 0 additions & 11 deletions packages/contentstack-import/src/utils/interactive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,6 @@ export const askAPIKey = async (): Promise<string> => {
});
};

export const askDeveloperHubUrl = async (regionName: string): Promise<string> => {
return await cliux.inquire({
type: 'input',
name: 'name',
validate: (url) => {
if (!url) return "Developer-hub URL can't be empty.";
return true;
},
message: `Enter the developer-hub base URL for the ${regionName} region -`,
});
};

export const askEncryptionKey = async(defaultValue: unknown): Promise<string> => {
return await cliux.inquire({
Expand Down
11 changes: 2 additions & 9 deletions packages/contentstack-import/src/utils/marketplace-app-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import {
configHandler,
managementSDKClient,
marketplaceSDKClient,
createDeveloperHubUrl
} from '@contentstack/cli-utilities';

import { log } from './logger';
import { trace } from '../utils/log';
import { ImportConfig, Installation } from '../types';
import { formatError } from '../utils';
import { askDeveloperHubUrl } from './interactive';
import { getAppName, askAppName, selectConfiguration } from '../utils/interactive';

export const getAllStackSpecificApps = async (
Expand Down Expand Up @@ -55,14 +55,7 @@ export const getAllStackSpecificApps = async (
};

export const getDeveloperHubUrl = async (config: ImportConfig): Promise<string> => {
const { cma, name } = configHandler.get('region') || {};
let developerHubBaseUrl = config.developerHubUrls[cma];

if (!developerHubBaseUrl) {
developerHubBaseUrl = await askDeveloperHubUrl(name);
}

return developerHubBaseUrl.startsWith('http') ? developerHubBaseUrl : `https://${developerHubBaseUrl}`;
return createDeveloperHubUrl(config.host);
};

export const getOrgUid = async (config: ImportConfig): Promise<string> => {
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-launch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"dependencies": {
"@apollo/client": "^3.7.9",
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-utilities": "~1.5.11",
"@contentstack/cli-utilities": "~1.5.12",
"@oclif/core": "^2.9.3",
"@oclif/plugin-help": "^5",
"@oclif/plugin-plugins": "^4.1.9",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-migrate-rte/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.2.16",
"@contentstack/cli-utilities": "~1.5.11",
"@contentstack/cli-utilities": "~1.5.12",
"@contentstack/json-rte-serializer": "~2.0.4",
"collapse-whitespace": "^1.1.7",
"chalk": "^4.1.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-migration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-utilities": "~1.5.11",
"@contentstack/cli-utilities": "~1.5.12",
"async": "^3.2.4",
"callsites": "^3.1.0",
"cardinal": "^2.1.1",
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 @@ -7,7 +7,7 @@
"dependencies": {
"@contentstack/cli-cm-import": "~1.13.4",
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-utilities": "~1.5.11",
"@contentstack/cli-utilities": "~1.5.12",
"inquirer": "8.2.4",
"mkdirp": "^1.0.4",
"tar": "^6.1.13",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-utilities/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentstack/cli-utilities",
"version": "1.5.11",
"version": "1.5.12",
"description": "Utilities for contentstack projects",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
Loading

0 comments on commit 75d82e4

Please sign in to comment.