Skip to content

Commit 40e37d7

Browse files
committed
added developerhub url from cma, and version bump
1 parent 12c4f36 commit 40e37d7

File tree

3 files changed

+6
-19
lines changed

3 files changed

+6
-19
lines changed

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@contentstack/apps-cli",
3-
"version": "1.0.6",
3+
"version": "1.0.7",
44
"description": "App ClI",
55
"author": "Contentstack CLI",
66
"homepage": "https://github.com/contentstack/contentstack-apps-cli",

src/util/inquirer.ts

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -160,23 +160,10 @@ async function getInstalledApps(
160160
*/
161161
async function getDeveloperHubUrl(): Promise<string> {
162162
const { cma, name } = configHandler.get("region") || {};
163-
let developerHubBaseUrl = (config.developerHubUrls as Record<string, string>)[
164-
cma
165-
];
166-
167-
if (!developerHubBaseUrl) {
168-
developerHubBaseUrl = await cliux.inquire({
169-
type: "input",
170-
name: "name",
171-
validate: (url) => {
172-
if (!url) return errors.BASE_URL_EMPTY;
173-
174-
return true;
175-
},
176-
message: $t(commonMsg.DEVELOPER_HUB_URL_PROMPT, { name }),
177-
});
178-
}
163+
let developerHubBaseUrl = cma.replace('api','developerhub-api')
179164

165+
developerHubBaseUrl = developerHubBaseUrl.startsWith('dev9')?developerHubBaseUrl.replace('dev9','dev'):developerHubBaseUrl;
166+
180167
if (developerHubBaseUrl.startsWith("http")) {
181168
developerHubBaseUrl = developerHubBaseUrl.split("//")[1];
182169
}

0 commit comments

Comments
 (0)