@commercetools-frontend/mc-scripts 27.9.0 → 27.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.cjs.dev.js +1 -1
- package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.cjs.prod.js +1 -1
- package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.esm.js +1 -1
- package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.dev.js +17 -17
- package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.prod.js +17 -17
- package/cli/dist/commercetools-frontend-mc-scripts-cli.esm.js +17 -17
- package/dist/{build-1d64eec3.esm.js → build-5a0c84e7.esm.js} +8 -8
- package/dist/{build-bfc565e1.cjs.dev.js → build-b9cbc1d1.cjs.dev.js} +8 -8
- package/dist/{build-ffa10fc4.cjs.prod.js → build-cdeab3a8.cjs.prod.js} +8 -8
- package/dist/{build-vite-e4eeb1a3.cjs.dev.js → build-vite-0e8f3463.cjs.dev.js} +16 -14
- package/dist/{build-vite-377f721f.cjs.prod.js → build-vite-aa0e7242.cjs.prod.js} +16 -14
- package/dist/{build-vite-2ea8a241.esm.js → build-vite-ce3c4fb6.esm.js} +16 -14
- package/dist/commercetools-frontend-mc-scripts.cjs.dev.js +1 -1
- package/dist/commercetools-frontend-mc-scripts.cjs.prod.js +1 -1
- package/dist/commercetools-frontend-mc-scripts.esm.js +1 -1
- package/dist/{compile-html-f4ac88cc.cjs.dev.js → compile-html-8679f721.cjs.dev.js} +5 -2
- package/dist/{compile-html-025cd493.esm.js → compile-html-adfef598.esm.js} +4 -2
- package/dist/{compile-html-50fd05ec.cjs.prod.js → compile-html-b80f9651.cjs.prod.js} +5 -2
- package/dist/{config-sync-5a7916dc.cjs.dev.js → config-sync-2b56a941.cjs.dev.js} +17 -17
- package/dist/{config-sync-df11a5bf.cjs.prod.js → config-sync-41bc7f5e.cjs.prod.js} +17 -17
- package/dist/{config-sync-be573249.esm.js → config-sync-7031a7de.esm.js} +17 -17
- package/dist/{config-sync-ci-a34b7b54.esm.js → config-sync-ci-1866c188.esm.js} +25 -20
- package/dist/{config-sync-ci-1d706e60.cjs.dev.js → config-sync-ci-6d12f2f3.cjs.dev.js} +27 -22
- package/dist/{config-sync-ci-9bb94255.cjs.prod.js → config-sync-ci-ea943de9.cjs.prod.js} +27 -22
- package/dist/{config-sync-helpers-5fbe31c5.cjs.dev.js → config-sync-helpers-36985f8c.cjs.dev.js} +57 -48
- package/dist/{config-sync-helpers-aaaa44ef.cjs.prod.js → config-sync-helpers-79ccaaad.cjs.prod.js} +55 -46
- package/dist/{config-sync-helpers-876b7d09.esm.js → config-sync-helpers-875ef4a4.esm.js} +56 -47
- package/dist/{create-postcss-config-3a80caef.cjs.dev.js → create-postcss-config-13cb1cb8.cjs.dev.js} +1 -1
- package/dist/{create-postcss-config-7d0b0ae1.cjs.prod.js → create-postcss-config-1eeb3d9d.cjs.prod.js} +1 -1
- package/dist/{create-postcss-config-a9f7c8a8.esm.js → create-postcss-config-390e8a52.esm.js} +1 -1
- package/dist/{create-webpack-config-for-development-ee3e94e6.cjs.prod.js → create-webpack-config-for-development-6608b4e4.cjs.prod.js} +15 -10
- package/dist/{create-webpack-config-for-development-a81db65f.cjs.dev.js → create-webpack-config-for-development-9a3a3a93.cjs.dev.js} +15 -10
- package/dist/{create-webpack-config-for-development-34ec7d5c.esm.js → create-webpack-config-for-development-dd95f3d5.esm.js} +15 -9
- package/dist/{create-webpack-config-for-production-585f2e76.cjs.dev.js → create-webpack-config-for-production-29b34b8c.cjs.dev.js} +8 -8
- package/dist/{create-webpack-config-for-production-f1317617.cjs.prod.js → create-webpack-config-for-production-2e6e5036.cjs.prod.js} +8 -8
- package/dist/{create-webpack-config-for-production-633d3891.esm.js → create-webpack-config-for-production-31bb3d24.esm.js} +8 -8
- package/dist/{credentials-storage-fd195144.cjs.dev.js → credentials-storage-1826f1a2.cjs.dev.js} +1 -1
- package/dist/{credentials-storage-ea1c16dc.cjs.prod.js → credentials-storage-60a63c81.cjs.prod.js} +1 -1
- package/dist/{credentials-storage-67deadc3.esm.js → credentials-storage-bfaa78f0.esm.js} +1 -1
- package/dist/{deployment-previews-set-ee6978a8.esm.js → deployment-previews-set-410cecf1.esm.js} +27 -22
- package/dist/{deployment-previews-set-5aeb990a.cjs.dev.js → deployment-previews-set-a04efad3.cjs.dev.js} +28 -22
- package/dist/{deployment-previews-set-d96668d6.cjs.prod.js → deployment-previews-set-bebd7a04.cjs.prod.js} +28 -22
- package/dist/{graphql-requests-d1683e27.cjs.dev.js → graphql-requests-1ea68584.cjs.dev.js} +8 -5
- package/dist/{graphql-requests-8a5d602b.cjs.prod.js → graphql-requests-98b1b779.cjs.prod.js} +8 -5
- package/dist/{graphql-requests-1bd861af.esm.js → graphql-requests-c491206a.esm.js} +8 -5
- package/dist/{i18n-message-complilation-7311cb29.cjs.dev.js → i18n-message-complilation-393d344a.cjs.prod.js} +1 -1
- package/dist/{i18n-message-complilation-7762da61.cjs.prod.js → i18n-message-complilation-3f80e8d6.cjs.dev.js} +1 -1
- package/dist/{i18n-message-complilation-21d3b0aa.esm.js → i18n-message-complilation-8aec9d1b.esm.js} +1 -1
- package/dist/{login-d51248e8.cjs.prod.js → login-a99d14e6.cjs.prod.js} +38 -60
- package/dist/{login-79d02906.esm.js → login-b935aede.esm.js} +37 -58
- package/dist/{login-62b53ebe.cjs.dev.js → login-cd99208a.cjs.dev.js} +38 -60
- package/dist/{optimizations-da5a0cfa.cjs.prod.js → optimizations-09a6638c.cjs.prod.js} +8 -5
- package/dist/{optimizations-54382f7b.esm.js → optimizations-1b3f8157.esm.js} +7 -5
- package/dist/{optimizations-56be74d6.cjs.dev.js → optimizations-640ffcac.cjs.dev.js} +8 -5
- package/dist/{package-5371f8ba.esm.js → package-15124b28.esm.js} +3 -4
- package/dist/{package-af294ed4.cjs.dev.js → package-90af7dfe.cjs.prod.js} +3 -4
- package/dist/{package-3539c84a.cjs.prod.js → package-98adb0d5.cjs.dev.js} +3 -4
- package/dist/{paths-39f22b8b.esm.js → paths-7bf7e88e.esm.js} +9 -4
- package/dist/{paths-7768b440.cjs.prod.js → paths-af1a725a.cjs.prod.js} +10 -4
- package/dist/{paths-b76fc753.cjs.dev.js → paths-ec3e3a7d.cjs.dev.js} +10 -4
- package/dist/{serve-b1c12985.cjs.dev.js → serve-760fc169.cjs.dev.js} +13 -14
- package/dist/{serve-3837602d.cjs.prod.js → serve-87ef7d4f.cjs.prod.js} +13 -14
- package/dist/{serve-22475fec.esm.js → serve-ddf30b4c.esm.js} +13 -13
- package/dist/{start-6fe0ccd2.esm.js → start-08895b5f.esm.js} +11 -13
- package/dist/{start-6e03b662.cjs.dev.js → start-a0945fde.cjs.dev.js} +11 -13
- package/dist/{start-bea9b61d.cjs.prod.js → start-d9bd5dfb.cjs.prod.js} +11 -13
- package/dist/{start-vite-dd8a1e26.cjs.prod.js → start-vite-00514c35.cjs.prod.js} +5 -4
- package/dist/{start-vite-698c9e82.cjs.dev.js → start-vite-10e49e5c.cjs.dev.js} +5 -4
- package/dist/{start-vite-4b0df191.esm.js → start-vite-745d3123.esm.js} +5 -4
- package/dist/{try-load-nimbus-plugins-d502a5fe.cjs.dev.js → try-load-nimbus-plugins-06ce5d83.cjs.dev.js} +1 -1
- package/dist/{try-load-nimbus-plugins-2f528d8f.esm.js → try-load-nimbus-plugins-526dccbd.esm.js} +1 -1
- package/dist/{try-load-nimbus-plugins-a713d7d3.cjs.prod.js → try-load-nimbus-plugins-59c3a594.cjs.prod.js} +1 -1
- package/dist/{vite-plugin-svgr-de6ee7da.esm.js → vite-plugin-svgr-22c8d518.esm.js} +4 -4
- package/dist/{vite-plugin-svgr-4034a834.cjs.prod.js → vite-plugin-svgr-53ef97c7.cjs.dev.js} +4 -4
- package/dist/{vite-plugin-svgr-7d06f400.cjs.dev.js → vite-plugin-svgr-5de1cad9.cjs.prod.js} +4 -4
- package/package.json +32 -31
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.dev.js +2 -2
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.prod.js +2 -2
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.esm.js +2 -2
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.dev.js +7 -8
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.prod.js +7 -8
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.esm.js +7 -8
- package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.cjs.dev.js +1 -1
- package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.cjs.prod.js +1 -1
- package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.esm.js +1 -1
|
@@ -7,9 +7,10 @@ var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/ins
|
|
|
7
7
|
var chalk = require('chalk');
|
|
8
8
|
var prompts = require('prompts');
|
|
9
9
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
10
|
-
var configSyncHelpers = require('./config-sync-helpers-
|
|
11
|
-
var credentialsStorage$1 = require('./credentials-storage-
|
|
12
|
-
var graphqlRequests = require('./graphql-requests-
|
|
10
|
+
var configSyncHelpers = require('./config-sync-helpers-79ccaaad.cjs.prod.js');
|
|
11
|
+
var credentialsStorage$1 = require('./credentials-storage-60a63c81.cjs.prod.js');
|
|
12
|
+
var graphqlRequests = require('./graphql-requests-98b1b779.cjs.prod.js');
|
|
13
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
13
14
|
require('@babel/runtime-corejs3/core-js-stable/json/stringify');
|
|
14
15
|
require('lodash/omit');
|
|
15
16
|
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
@@ -21,7 +22,6 @@ require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
|
21
22
|
require('@babel/runtime-corejs3/core-js-stable/instance/repeat');
|
|
22
23
|
require('@babel/runtime-corejs3/core-js-stable/set');
|
|
23
24
|
require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
|
|
24
|
-
require('@babel/runtime-corejs3/core-js-stable/instance/bind');
|
|
25
25
|
require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
26
26
|
require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
27
27
|
require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
@@ -36,7 +36,7 @@ require('graphql');
|
|
|
36
36
|
require('graphql-request');
|
|
37
37
|
require('@commercetools-frontend/constants');
|
|
38
38
|
require('@commercetools/http-user-agent');
|
|
39
|
-
require('./package-
|
|
39
|
+
require('./package-90af7dfe.cjs.prod.js');
|
|
40
40
|
|
|
41
41
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
42
42
|
|
|
@@ -59,7 +59,7 @@ async function promptForOrganization(_ref) {
|
|
|
59
59
|
customViewId
|
|
60
60
|
});
|
|
61
61
|
if (userOrganizations.total === 0) {
|
|
62
|
-
throw new Error(
|
|
62
|
+
throw new Error("It seems you are not an admin of any Organization. Please make sure to be part of the Administrators team of the Organization you want the ".concat(entityType, " to be configured to."));
|
|
63
63
|
}
|
|
64
64
|
if (userOrganizations.total === 1) {
|
|
65
65
|
const _userOrganizations$re = _slicedToArray(userOrganizations.results, 1),
|
|
@@ -82,7 +82,7 @@ async function promptForOrganization(_ref) {
|
|
|
82
82
|
}),
|
|
83
83
|
selectedOrganizationId = _await$prompts.organizationId;
|
|
84
84
|
if (!selectedOrganizationId) {
|
|
85
|
-
throw new Error(
|
|
85
|
+
throw new Error("No Organization selected, aborting.");
|
|
86
86
|
}
|
|
87
87
|
const organizationName = _findInstanceProperty__default["default"](organizationChoices).call(organizationChoices, _ref2 => {
|
|
88
88
|
let value = _ref2.value;
|
|
@@ -130,7 +130,7 @@ async function createOrUpdateCustomApplication(_ref4) {
|
|
|
130
130
|
entityType: 'Custom Application'
|
|
131
131
|
});
|
|
132
132
|
const confirmed = await confirmAction({
|
|
133
|
-
message:
|
|
133
|
+
message: "You are about to create a new Custom Application in the \"".concat(chalk__default["default"].green(organization.name), "\" organization. Are you sure you want to proceed?"),
|
|
134
134
|
dryRun: options.dryRun,
|
|
135
135
|
dryRunMessage: 'Using "--dry-run", no data will be created.'
|
|
136
136
|
});
|
|
@@ -148,15 +148,15 @@ async function createOrUpdateCustomApplication(_ref4) {
|
|
|
148
148
|
|
|
149
149
|
// Check for changes
|
|
150
150
|
if (!status.configDiff) {
|
|
151
|
-
console.log(chalk__default["default"].green(
|
|
152
|
-
console.log(
|
|
151
|
+
console.log(chalk__default["default"].green("Custom Application up-to-date."));
|
|
152
|
+
console.log("You can inspect the Custom Application data in the Merchant Center at \"".concat(chalk__default["default"].gray(status.link), "\"."));
|
|
153
153
|
return;
|
|
154
154
|
}
|
|
155
155
|
console.log('Changes detected:');
|
|
156
156
|
console.log(status.configDiff);
|
|
157
157
|
console.log();
|
|
158
158
|
const confirmed = await confirmAction({
|
|
159
|
-
message:
|
|
159
|
+
message: "You are about to update the Custom Application \"".concat(chalk__default["default"].green(localCustomEntityData.entryPointUriPath), "\" with the changes above. Are you sure you want to proceed?"),
|
|
160
160
|
dryRun: options.dryRun,
|
|
161
161
|
dryRunMessage: 'Using "--dry-run", no data will be updated.'
|
|
162
162
|
});
|
|
@@ -191,7 +191,7 @@ async function createOrUpdateCustomView(_ref5) {
|
|
|
191
191
|
entityType: 'Custom View'
|
|
192
192
|
});
|
|
193
193
|
const confirmed = await confirmAction({
|
|
194
|
-
message:
|
|
194
|
+
message: "You are about to create a new Custom View in the \"".concat(chalk__default["default"].green(organization.name), "\" organization. Are you sure you want to proceed?"),
|
|
195
195
|
dryRun: options.dryRun,
|
|
196
196
|
dryRunMessage: 'Using "--dry-run", no data will be created.'
|
|
197
197
|
});
|
|
@@ -209,15 +209,15 @@ async function createOrUpdateCustomView(_ref5) {
|
|
|
209
209
|
|
|
210
210
|
// Check for changes
|
|
211
211
|
if (!status.configDiff) {
|
|
212
|
-
console.log(chalk__default["default"].green(
|
|
213
|
-
console.log(
|
|
212
|
+
console.log(chalk__default["default"].green("Custom View up-to-date."));
|
|
213
|
+
console.log("You can inspect the Custom View data in the Merchant Center at \"".concat(chalk__default["default"].gray(status.link), "\"."));
|
|
214
214
|
return;
|
|
215
215
|
}
|
|
216
216
|
console.log('Changes detected:');
|
|
217
217
|
console.log(status.configDiff);
|
|
218
218
|
console.log();
|
|
219
219
|
const confirmed = await confirmAction({
|
|
220
|
-
message:
|
|
220
|
+
message: "You are about to update the Custom View \"".concat(chalk__default["default"].green(localCustomEntityData.defaultLabel), "\" with the changes above. Are you sure you want to proceed?"),
|
|
221
221
|
dryRun: options.dryRun,
|
|
222
222
|
dryRunMessage: 'Using "--dry-run", no data will be updated.'
|
|
223
223
|
});
|
|
@@ -238,11 +238,11 @@ async function run(options) {
|
|
|
238
238
|
mcApiUrl = _applicationConfig$en.mcApiUrl,
|
|
239
239
|
applicationIdentifier = _applicationConfig$en.applicationIdentifier,
|
|
240
240
|
customViewId = _applicationConfig$en.customViewId;
|
|
241
|
-
console.log(
|
|
241
|
+
console.log("Using Merchant Center environment \"".concat(chalk__default["default"].green(mcApiUrl), "\"."));
|
|
242
242
|
console.log();
|
|
243
243
|
const isSessionValid = credentialsStorage.isSessionValid(mcApiUrl);
|
|
244
244
|
if (!isSessionValid) {
|
|
245
|
-
throw new Error(
|
|
245
|
+
throw new Error("You don't have a valid session. Please, run the \"mc-scripts login\" command to authenticate yourself.");
|
|
246
246
|
}
|
|
247
247
|
if (configSyncHelpers.isCustomViewData(localCustomEntityData)) {
|
|
248
248
|
await createOrUpdateCustomView({
|
|
@@ -5,9 +5,10 @@ import _filterInstanceProperty from '@babel/runtime-corejs3/core-js-stable/insta
|
|
|
5
5
|
import chalk from 'chalk';
|
|
6
6
|
import prompts from 'prompts';
|
|
7
7
|
import { processConfig } from '@commercetools-frontend/application-config';
|
|
8
|
-
import { i as isCustomViewData, c as checkCustomApplicationStatus, p as performCreateCustomApplication, a as performUpdateCustomApplication, b as checkCustomViewStatus, d as performCreateCustomView, e as performUpdateCustomView } from './config-sync-helpers-
|
|
9
|
-
import { C as CredentialsStorage } from './credentials-storage-
|
|
10
|
-
import { f as fetchUserOrganizations } from './graphql-requests-
|
|
8
|
+
import { i as isCustomViewData, c as checkCustomApplicationStatus, p as performCreateCustomApplication, a as performUpdateCustomApplication, b as checkCustomViewStatus, d as performCreateCustomView, e as performUpdateCustomView } from './config-sync-helpers-875ef4a4.esm.js';
|
|
9
|
+
import { C as CredentialsStorage } from './credentials-storage-bfaa78f0.esm.js';
|
|
10
|
+
import { f as fetchUserOrganizations } from './graphql-requests-c491206a.esm.js';
|
|
11
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
11
12
|
import '@babel/runtime-corejs3/core-js-stable/json/stringify';
|
|
12
13
|
import 'lodash/omit';
|
|
13
14
|
import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
|
|
@@ -19,7 +20,6 @@ import '@babel/runtime-corejs3/helpers/defineProperty';
|
|
|
19
20
|
import '@babel/runtime-corejs3/core-js-stable/instance/repeat';
|
|
20
21
|
import '@babel/runtime-corejs3/core-js-stable/set';
|
|
21
22
|
import '@babel/runtime-corejs3/core-js-stable/instance/for-each';
|
|
22
|
-
import '@babel/runtime-corejs3/core-js-stable/instance/bind';
|
|
23
23
|
import '@babel/runtime-corejs3/core-js-stable/instance/reduce';
|
|
24
24
|
import '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
25
25
|
import '@babel/runtime-corejs3/helpers/classCallCheck';
|
|
@@ -34,7 +34,7 @@ import 'graphql';
|
|
|
34
34
|
import 'graphql-request';
|
|
35
35
|
import '@commercetools-frontend/constants';
|
|
36
36
|
import '@commercetools/http-user-agent';
|
|
37
|
-
import './package-
|
|
37
|
+
import './package-15124b28.esm.js';
|
|
38
38
|
|
|
39
39
|
const credentialsStorage = new CredentialsStorage();
|
|
40
40
|
async function promptForOrganization(_ref) {
|
|
@@ -49,7 +49,7 @@ async function promptForOrganization(_ref) {
|
|
|
49
49
|
customViewId
|
|
50
50
|
});
|
|
51
51
|
if (userOrganizations.total === 0) {
|
|
52
|
-
throw new Error(
|
|
52
|
+
throw new Error("It seems you are not an admin of any Organization. Please make sure to be part of the Administrators team of the Organization you want the ".concat(entityType, " to be configured to."));
|
|
53
53
|
}
|
|
54
54
|
if (userOrganizations.total === 1) {
|
|
55
55
|
const _userOrganizations$re = _slicedToArray(userOrganizations.results, 1),
|
|
@@ -72,7 +72,7 @@ async function promptForOrganization(_ref) {
|
|
|
72
72
|
}),
|
|
73
73
|
selectedOrganizationId = _await$prompts.organizationId;
|
|
74
74
|
if (!selectedOrganizationId) {
|
|
75
|
-
throw new Error(
|
|
75
|
+
throw new Error("No Organization selected, aborting.");
|
|
76
76
|
}
|
|
77
77
|
const organizationName = _findInstanceProperty(organizationChoices).call(organizationChoices, _ref2 => {
|
|
78
78
|
let value = _ref2.value;
|
|
@@ -120,7 +120,7 @@ async function createOrUpdateCustomApplication(_ref4) {
|
|
|
120
120
|
entityType: 'Custom Application'
|
|
121
121
|
});
|
|
122
122
|
const confirmed = await confirmAction({
|
|
123
|
-
message:
|
|
123
|
+
message: "You are about to create a new Custom Application in the \"".concat(chalk.green(organization.name), "\" organization. Are you sure you want to proceed?"),
|
|
124
124
|
dryRun: options.dryRun,
|
|
125
125
|
dryRunMessage: 'Using "--dry-run", no data will be created.'
|
|
126
126
|
});
|
|
@@ -138,15 +138,15 @@ async function createOrUpdateCustomApplication(_ref4) {
|
|
|
138
138
|
|
|
139
139
|
// Check for changes
|
|
140
140
|
if (!status.configDiff) {
|
|
141
|
-
console.log(chalk.green(
|
|
142
|
-
console.log(
|
|
141
|
+
console.log(chalk.green("Custom Application up-to-date."));
|
|
142
|
+
console.log("You can inspect the Custom Application data in the Merchant Center at \"".concat(chalk.gray(status.link), "\"."));
|
|
143
143
|
return;
|
|
144
144
|
}
|
|
145
145
|
console.log('Changes detected:');
|
|
146
146
|
console.log(status.configDiff);
|
|
147
147
|
console.log();
|
|
148
148
|
const confirmed = await confirmAction({
|
|
149
|
-
message:
|
|
149
|
+
message: "You are about to update the Custom Application \"".concat(chalk.green(localCustomEntityData.entryPointUriPath), "\" with the changes above. Are you sure you want to proceed?"),
|
|
150
150
|
dryRun: options.dryRun,
|
|
151
151
|
dryRunMessage: 'Using "--dry-run", no data will be updated.'
|
|
152
152
|
});
|
|
@@ -181,7 +181,7 @@ async function createOrUpdateCustomView(_ref5) {
|
|
|
181
181
|
entityType: 'Custom View'
|
|
182
182
|
});
|
|
183
183
|
const confirmed = await confirmAction({
|
|
184
|
-
message:
|
|
184
|
+
message: "You are about to create a new Custom View in the \"".concat(chalk.green(organization.name), "\" organization. Are you sure you want to proceed?"),
|
|
185
185
|
dryRun: options.dryRun,
|
|
186
186
|
dryRunMessage: 'Using "--dry-run", no data will be created.'
|
|
187
187
|
});
|
|
@@ -199,15 +199,15 @@ async function createOrUpdateCustomView(_ref5) {
|
|
|
199
199
|
|
|
200
200
|
// Check for changes
|
|
201
201
|
if (!status.configDiff) {
|
|
202
|
-
console.log(chalk.green(
|
|
203
|
-
console.log(
|
|
202
|
+
console.log(chalk.green("Custom View up-to-date."));
|
|
203
|
+
console.log("You can inspect the Custom View data in the Merchant Center at \"".concat(chalk.gray(status.link), "\"."));
|
|
204
204
|
return;
|
|
205
205
|
}
|
|
206
206
|
console.log('Changes detected:');
|
|
207
207
|
console.log(status.configDiff);
|
|
208
208
|
console.log();
|
|
209
209
|
const confirmed = await confirmAction({
|
|
210
|
-
message:
|
|
210
|
+
message: "You are about to update the Custom View \"".concat(chalk.green(localCustomEntityData.defaultLabel), "\" with the changes above. Are you sure you want to proceed?"),
|
|
211
211
|
dryRun: options.dryRun,
|
|
212
212
|
dryRunMessage: 'Using "--dry-run", no data will be updated.'
|
|
213
213
|
});
|
|
@@ -228,11 +228,11 @@ async function run(options) {
|
|
|
228
228
|
mcApiUrl = _applicationConfig$en.mcApiUrl,
|
|
229
229
|
applicationIdentifier = _applicationConfig$en.applicationIdentifier,
|
|
230
230
|
customViewId = _applicationConfig$en.customViewId;
|
|
231
|
-
console.log(
|
|
231
|
+
console.log("Using Merchant Center environment \"".concat(chalk.green(mcApiUrl), "\"."));
|
|
232
232
|
console.log();
|
|
233
233
|
const isSessionValid = credentialsStorage.isSessionValid(mcApiUrl);
|
|
234
234
|
if (!isSessionValid) {
|
|
235
|
-
throw new Error(
|
|
235
|
+
throw new Error("You don't have a valid session. Please, run the \"mc-scripts login\" command to authenticate yourself.");
|
|
236
236
|
}
|
|
237
237
|
if (isCustomViewData(localCustomEntityData)) {
|
|
238
238
|
await createOrUpdateCustomView({
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import _slicedToArray from '@babel/runtime-corejs3/helpers/esm/slicedToArray';
|
|
2
2
|
import _findInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
3
|
+
import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
3
4
|
import _mapInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/map';
|
|
4
5
|
import chalk from 'chalk';
|
|
5
6
|
import { processConfig } from '@commercetools-frontend/application-config';
|
|
6
|
-
import { i as isCustomViewData, c as checkCustomApplicationStatus, p as performCreateCustomApplication, a as performUpdateCustomApplication, b as checkCustomViewStatus, d as performCreateCustomView, e as performUpdateCustomView } from './config-sync-helpers-
|
|
7
|
-
import { f as fetchUserOrganizations } from './graphql-requests-
|
|
7
|
+
import { i as isCustomViewData, c as checkCustomApplicationStatus, p as performCreateCustomApplication, a as performUpdateCustomApplication, b as checkCustomViewStatus, d as performCreateCustomView, e as performUpdateCustomView } from './config-sync-helpers-875ef4a4.esm.js';
|
|
8
|
+
import { f as fetchUserOrganizations } from './graphql-requests-c491206a.esm.js';
|
|
8
9
|
import _Date$now from '@babel/runtime-corejs3/core-js-stable/date/now';
|
|
9
10
|
import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
10
|
-
import jwtDecode from 'jwt-decode';
|
|
11
|
-
import { C as CredentialsStorage } from './credentials-storage-
|
|
11
|
+
import { jwtDecode } from 'jwt-decode';
|
|
12
|
+
import { C as CredentialsStorage } from './credentials-storage-bfaa78f0.esm.js';
|
|
12
13
|
import '@babel/runtime-corejs3/core-js-stable/json/stringify';
|
|
13
14
|
import 'lodash/omit';
|
|
14
15
|
import '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
|
|
@@ -20,7 +21,6 @@ import '@babel/runtime-corejs3/helpers/defineProperty';
|
|
|
20
21
|
import '@babel/runtime-corejs3/core-js-stable/instance/repeat';
|
|
21
22
|
import '@babel/runtime-corejs3/core-js-stable/set';
|
|
22
23
|
import '@babel/runtime-corejs3/core-js-stable/instance/for-each';
|
|
23
|
-
import '@babel/runtime-corejs3/core-js-stable/instance/bind';
|
|
24
24
|
import '@babel/runtime-corejs3/core-js-stable/instance/reduce';
|
|
25
25
|
import '@babel/runtime-corejs3/core-js-stable/instance/filter';
|
|
26
26
|
import '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
@@ -29,7 +29,7 @@ import 'graphql';
|
|
|
29
29
|
import 'graphql-request';
|
|
30
30
|
import '@commercetools-frontend/constants';
|
|
31
31
|
import '@commercetools/http-user-agent';
|
|
32
|
-
import './package-
|
|
32
|
+
import './package-15124b28.esm.js';
|
|
33
33
|
import '@babel/runtime-corejs3/helpers/classCallCheck';
|
|
34
34
|
import '@babel/runtime-corejs3/helpers/createClass';
|
|
35
35
|
import 'node:fs';
|
|
@@ -91,7 +91,7 @@ async function authenticateForCI(_ref) {
|
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
throw new Error(
|
|
94
|
+
throw new Error("No valid authentication found for CI mode. Please provide one of:\n" + " - ".concat(ENV_VARS$1.TOKEN, ": A valid MC session token\n") + " - Run \"mc-scripts login --headless\" with IDENTITY_EMAIL and IDENTITY_PASSWORD\n" + " - Run \"mc-scripts login\" interactively to create a session");
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
/**
|
|
@@ -102,7 +102,7 @@ const ENV_VARS = {
|
|
|
102
102
|
ORGANIZATION_NAME: 'CT_ORGANIZATION_NAME'
|
|
103
103
|
};
|
|
104
104
|
async function resolveOrganization(_ref) {
|
|
105
|
-
var
|
|
105
|
+
var _context5, _context7, _context8;
|
|
106
106
|
let mcApiUrl = _ref.mcApiUrl,
|
|
107
107
|
applicationIdentifier = _ref.applicationIdentifier,
|
|
108
108
|
customViewId = _ref.customViewId;
|
|
@@ -112,7 +112,7 @@ async function resolveOrganization(_ref) {
|
|
|
112
112
|
customViewId
|
|
113
113
|
});
|
|
114
114
|
if (userOrganizations.total === 0) {
|
|
115
|
-
throw new Error(
|
|
115
|
+
throw new Error("No organizations found. Please ensure you are an admin of at least one Organization.");
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
// Check if organization was provided via environment variables
|
|
@@ -122,7 +122,8 @@ async function resolveOrganization(_ref) {
|
|
|
122
122
|
var _context;
|
|
123
123
|
const matchingOrg = _findInstanceProperty(_context = userOrganizations.results).call(_context, org => org.id === organizationId);
|
|
124
124
|
if (!matchingOrg) {
|
|
125
|
-
|
|
125
|
+
var _context2;
|
|
126
|
+
throw new Error(_concatInstanceProperty(_context2 = "Organization with ID \"".concat(organizationId, "\" (from ")).call(_context2, ENV_VARS.ORGANIZATION_ID, ") not found or you don't have admin access to it."));
|
|
126
127
|
}
|
|
127
128
|
return {
|
|
128
129
|
id: matchingOrg.id,
|
|
@@ -130,10 +131,11 @@ async function resolveOrganization(_ref) {
|
|
|
130
131
|
};
|
|
131
132
|
}
|
|
132
133
|
if (organizationName) {
|
|
133
|
-
var
|
|
134
|
-
const matchingOrg = _findInstanceProperty(
|
|
134
|
+
var _context3;
|
|
135
|
+
const matchingOrg = _findInstanceProperty(_context3 = userOrganizations.results).call(_context3, org => org.name === organizationName);
|
|
135
136
|
if (!matchingOrg) {
|
|
136
|
-
|
|
137
|
+
var _context4;
|
|
138
|
+
throw new Error(_concatInstanceProperty(_context4 = "Organization with name \"".concat(organizationName, "\" (from ")).call(_context4, ENV_VARS.ORGANIZATION_NAME, ") not found or you don't have admin access to it."));
|
|
137
139
|
}
|
|
138
140
|
return {
|
|
139
141
|
id: matchingOrg.id,
|
|
@@ -145,7 +147,7 @@ async function resolveOrganization(_ref) {
|
|
|
145
147
|
if (userOrganizations.total === 1) {
|
|
146
148
|
const _userOrganizations$re = _slicedToArray(userOrganizations.results, 1),
|
|
147
149
|
organization = _userOrganizations$re[0];
|
|
148
|
-
console.log(
|
|
150
|
+
console.log("Using organization \"".concat(chalk.green(organization.name), "\" (only one available)."));
|
|
149
151
|
return {
|
|
150
152
|
id: organization.id,
|
|
151
153
|
name: organization.name
|
|
@@ -153,8 +155,11 @@ async function resolveOrganization(_ref) {
|
|
|
153
155
|
}
|
|
154
156
|
|
|
155
157
|
// Multiple organizations and none specified - error in CI mode
|
|
156
|
-
const orgNames = _mapInstanceProperty(
|
|
157
|
-
|
|
158
|
+
const orgNames = _mapInstanceProperty(_context5 = userOrganizations.results).call(_context5, org => {
|
|
159
|
+
var _context6;
|
|
160
|
+
return _concatInstanceProperty(_context6 = " - \"".concat(org.name, "\" (ID: ")).call(_context6, org.id, ")");
|
|
161
|
+
}).join('\n');
|
|
162
|
+
throw new Error(_concatInstanceProperty(_context7 = _concatInstanceProperty(_context8 = "Multiple organizations found. Please specify one using ".concat(ENV_VARS.ORGANIZATION_ID, " or ")).call(_context8, ENV_VARS.ORGANIZATION_NAME, " environment variable:\n")).call(_context7, orgNames));
|
|
158
163
|
}
|
|
159
164
|
async function handleCustomApplication(_ref2) {
|
|
160
165
|
let mcApiUrl = _ref2.mcApiUrl,
|
|
@@ -187,7 +192,7 @@ async function handleCustomApplication(_ref2) {
|
|
|
187
192
|
// Check for changes
|
|
188
193
|
if (!status.configDiff) {
|
|
189
194
|
console.log(chalk.green('Custom Application is up-to-date.'));
|
|
190
|
-
console.log(
|
|
195
|
+
console.log("URL: ".concat(chalk.gray(status.link)));
|
|
191
196
|
return;
|
|
192
197
|
}
|
|
193
198
|
console.log('Changes detected:');
|
|
@@ -235,7 +240,7 @@ async function handleCustomView(_ref3) {
|
|
|
235
240
|
// Check for changes
|
|
236
241
|
if (!status.configDiff) {
|
|
237
242
|
console.log(chalk.green('Custom View is up-to-date.'));
|
|
238
|
-
console.log(
|
|
243
|
+
console.log("URL: ".concat(chalk.gray(status.link)));
|
|
239
244
|
return;
|
|
240
245
|
}
|
|
241
246
|
console.log('Changes detected:');
|
|
@@ -257,7 +262,7 @@ async function run(options) {
|
|
|
257
262
|
mcApiUrl = _applicationConfig$en.mcApiUrl,
|
|
258
263
|
applicationIdentifier = _applicationConfig$en.applicationIdentifier,
|
|
259
264
|
customViewId = _applicationConfig$en.customViewId;
|
|
260
|
-
console.log(
|
|
265
|
+
console.log("Environment: ".concat(chalk.green(mcApiUrl)));
|
|
261
266
|
|
|
262
267
|
// Authenticate for CI
|
|
263
268
|
console.log('Authenticating...');
|
|
@@ -268,7 +273,7 @@ async function run(options) {
|
|
|
268
273
|
console.log(chalk.green('Authentication successful.'));
|
|
269
274
|
} catch (error) {
|
|
270
275
|
if (error instanceof Error) {
|
|
271
|
-
throw new Error(
|
|
276
|
+
throw new Error("Authentication failed: ".concat(error.message));
|
|
272
277
|
}
|
|
273
278
|
throw error;
|
|
274
279
|
}
|
|
@@ -2,15 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
4
4
|
var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
5
|
+
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
5
6
|
var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
6
7
|
var chalk = require('chalk');
|
|
7
8
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
8
|
-
var configSyncHelpers = require('./config-sync-helpers-
|
|
9
|
-
var graphqlRequests = require('./graphql-requests-
|
|
9
|
+
var configSyncHelpers = require('./config-sync-helpers-36985f8c.cjs.dev.js');
|
|
10
|
+
var graphqlRequests = require('./graphql-requests-1ea68584.cjs.dev.js');
|
|
10
11
|
var _Date$now = require('@babel/runtime-corejs3/core-js-stable/date/now');
|
|
11
12
|
var _includesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
12
13
|
var jwtDecode = require('jwt-decode');
|
|
13
|
-
var credentialsStorage = require('./credentials-storage-
|
|
14
|
+
var credentialsStorage = require('./credentials-storage-1826f1a2.cjs.dev.js');
|
|
14
15
|
require('@babel/runtime-corejs3/core-js-stable/json/stringify');
|
|
15
16
|
require('lodash/omit');
|
|
16
17
|
require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
@@ -22,7 +23,6 @@ require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
|
22
23
|
require('@babel/runtime-corejs3/core-js-stable/instance/repeat');
|
|
23
24
|
require('@babel/runtime-corejs3/core-js-stable/set');
|
|
24
25
|
require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
|
|
25
|
-
require('@babel/runtime-corejs3/core-js-stable/instance/bind');
|
|
26
26
|
require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
27
27
|
require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
28
28
|
require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
@@ -31,7 +31,7 @@ require('graphql');
|
|
|
31
31
|
require('graphql-request');
|
|
32
32
|
require('@commercetools-frontend/constants');
|
|
33
33
|
require('@commercetools/http-user-agent');
|
|
34
|
-
require('./package-
|
|
34
|
+
require('./package-98adb0d5.cjs.dev.js');
|
|
35
35
|
require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
36
36
|
require('@babel/runtime-corejs3/helpers/createClass');
|
|
37
37
|
require('node:fs');
|
|
@@ -42,11 +42,11 @@ require('./does-file-exist-eb86baca.cjs.dev.js');
|
|
|
42
42
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
43
43
|
|
|
44
44
|
var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
|
|
45
|
+
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
45
46
|
var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
|
|
46
47
|
var chalk__default = /*#__PURE__*/_interopDefault(chalk);
|
|
47
48
|
var _Date$now__default = /*#__PURE__*/_interopDefault(_Date$now);
|
|
48
49
|
var _includesInstanceProperty__default = /*#__PURE__*/_interopDefault(_includesInstanceProperty);
|
|
49
|
-
var jwtDecode__default = /*#__PURE__*/_interopDefault(jwtDecode);
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* Environment variable names for CI authentication
|
|
@@ -68,7 +68,7 @@ async function authenticateForCI(_ref) {
|
|
|
68
68
|
const envToken = process.env[ENV_VARS$1.TOKEN];
|
|
69
69
|
if (envToken) {
|
|
70
70
|
try {
|
|
71
|
-
const decodedToken =
|
|
71
|
+
const decodedToken = jwtDecode.jwtDecode(envToken);
|
|
72
72
|
const now = Math.floor(_Date$now__default["default"]() / 1000);
|
|
73
73
|
if (decodedToken.exp <= now) {
|
|
74
74
|
throw new Error('The provided MC_ACCESS_TOKEN has expired');
|
|
@@ -95,14 +95,14 @@ async function authenticateForCI(_ref) {
|
|
|
95
95
|
if (credentialsStorage$1.isSessionValid(mcApiUrl)) {
|
|
96
96
|
const token = credentialsStorage$1.getToken(mcApiUrl);
|
|
97
97
|
if (token) {
|
|
98
|
-
const decodedToken =
|
|
98
|
+
const decodedToken = jwtDecode.jwtDecode(token);
|
|
99
99
|
return {
|
|
100
100
|
token,
|
|
101
101
|
expiresAt: decodedToken.exp
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
-
throw new Error(
|
|
105
|
+
throw new Error("No valid authentication found for CI mode. Please provide one of:\n" + " - ".concat(ENV_VARS$1.TOKEN, ": A valid MC session token\n") + " - Run \"mc-scripts login --headless\" with IDENTITY_EMAIL and IDENTITY_PASSWORD\n" + " - Run \"mc-scripts login\" interactively to create a session");
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
/**
|
|
@@ -113,7 +113,7 @@ const ENV_VARS = {
|
|
|
113
113
|
ORGANIZATION_NAME: 'CT_ORGANIZATION_NAME'
|
|
114
114
|
};
|
|
115
115
|
async function resolveOrganization(_ref) {
|
|
116
|
-
var
|
|
116
|
+
var _context5, _context7, _context8;
|
|
117
117
|
let mcApiUrl = _ref.mcApiUrl,
|
|
118
118
|
applicationIdentifier = _ref.applicationIdentifier,
|
|
119
119
|
customViewId = _ref.customViewId;
|
|
@@ -123,7 +123,7 @@ async function resolveOrganization(_ref) {
|
|
|
123
123
|
customViewId
|
|
124
124
|
});
|
|
125
125
|
if (userOrganizations.total === 0) {
|
|
126
|
-
throw new Error(
|
|
126
|
+
throw new Error("No organizations found. Please ensure you are an admin of at least one Organization.");
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
// Check if organization was provided via environment variables
|
|
@@ -133,7 +133,8 @@ async function resolveOrganization(_ref) {
|
|
|
133
133
|
var _context;
|
|
134
134
|
const matchingOrg = _findInstanceProperty__default["default"](_context = userOrganizations.results).call(_context, org => org.id === organizationId);
|
|
135
135
|
if (!matchingOrg) {
|
|
136
|
-
|
|
136
|
+
var _context2;
|
|
137
|
+
throw new Error(_concatInstanceProperty__default["default"](_context2 = "Organization with ID \"".concat(organizationId, "\" (from ")).call(_context2, ENV_VARS.ORGANIZATION_ID, ") not found or you don't have admin access to it."));
|
|
137
138
|
}
|
|
138
139
|
return {
|
|
139
140
|
id: matchingOrg.id,
|
|
@@ -141,10 +142,11 @@ async function resolveOrganization(_ref) {
|
|
|
141
142
|
};
|
|
142
143
|
}
|
|
143
144
|
if (organizationName) {
|
|
144
|
-
var
|
|
145
|
-
const matchingOrg = _findInstanceProperty__default["default"](
|
|
145
|
+
var _context3;
|
|
146
|
+
const matchingOrg = _findInstanceProperty__default["default"](_context3 = userOrganizations.results).call(_context3, org => org.name === organizationName);
|
|
146
147
|
if (!matchingOrg) {
|
|
147
|
-
|
|
148
|
+
var _context4;
|
|
149
|
+
throw new Error(_concatInstanceProperty__default["default"](_context4 = "Organization with name \"".concat(organizationName, "\" (from ")).call(_context4, ENV_VARS.ORGANIZATION_NAME, ") not found or you don't have admin access to it."));
|
|
148
150
|
}
|
|
149
151
|
return {
|
|
150
152
|
id: matchingOrg.id,
|
|
@@ -156,7 +158,7 @@ async function resolveOrganization(_ref) {
|
|
|
156
158
|
if (userOrganizations.total === 1) {
|
|
157
159
|
const _userOrganizations$re = _slicedToArray(userOrganizations.results, 1),
|
|
158
160
|
organization = _userOrganizations$re[0];
|
|
159
|
-
console.log(
|
|
161
|
+
console.log("Using organization \"".concat(chalk__default["default"].green(organization.name), "\" (only one available)."));
|
|
160
162
|
return {
|
|
161
163
|
id: organization.id,
|
|
162
164
|
name: organization.name
|
|
@@ -164,8 +166,11 @@ async function resolveOrganization(_ref) {
|
|
|
164
166
|
}
|
|
165
167
|
|
|
166
168
|
// Multiple organizations and none specified - error in CI mode
|
|
167
|
-
const orgNames = _mapInstanceProperty__default["default"](
|
|
168
|
-
|
|
169
|
+
const orgNames = _mapInstanceProperty__default["default"](_context5 = userOrganizations.results).call(_context5, org => {
|
|
170
|
+
var _context6;
|
|
171
|
+
return _concatInstanceProperty__default["default"](_context6 = " - \"".concat(org.name, "\" (ID: ")).call(_context6, org.id, ")");
|
|
172
|
+
}).join('\n');
|
|
173
|
+
throw new Error(_concatInstanceProperty__default["default"](_context7 = _concatInstanceProperty__default["default"](_context8 = "Multiple organizations found. Please specify one using ".concat(ENV_VARS.ORGANIZATION_ID, " or ")).call(_context8, ENV_VARS.ORGANIZATION_NAME, " environment variable:\n")).call(_context7, orgNames));
|
|
169
174
|
}
|
|
170
175
|
async function handleCustomApplication(_ref2) {
|
|
171
176
|
let mcApiUrl = _ref2.mcApiUrl,
|
|
@@ -198,7 +203,7 @@ async function handleCustomApplication(_ref2) {
|
|
|
198
203
|
// Check for changes
|
|
199
204
|
if (!status.configDiff) {
|
|
200
205
|
console.log(chalk__default["default"].green('Custom Application is up-to-date.'));
|
|
201
|
-
console.log(
|
|
206
|
+
console.log("URL: ".concat(chalk__default["default"].gray(status.link)));
|
|
202
207
|
return;
|
|
203
208
|
}
|
|
204
209
|
console.log('Changes detected:');
|
|
@@ -246,7 +251,7 @@ async function handleCustomView(_ref3) {
|
|
|
246
251
|
// Check for changes
|
|
247
252
|
if (!status.configDiff) {
|
|
248
253
|
console.log(chalk__default["default"].green('Custom View is up-to-date.'));
|
|
249
|
-
console.log(
|
|
254
|
+
console.log("URL: ".concat(chalk__default["default"].gray(status.link)));
|
|
250
255
|
return;
|
|
251
256
|
}
|
|
252
257
|
console.log('Changes detected:');
|
|
@@ -268,7 +273,7 @@ async function run(options) {
|
|
|
268
273
|
mcApiUrl = _applicationConfig$en.mcApiUrl,
|
|
269
274
|
applicationIdentifier = _applicationConfig$en.applicationIdentifier,
|
|
270
275
|
customViewId = _applicationConfig$en.customViewId;
|
|
271
|
-
console.log(
|
|
276
|
+
console.log("Environment: ".concat(chalk__default["default"].green(mcApiUrl)));
|
|
272
277
|
|
|
273
278
|
// Authenticate for CI
|
|
274
279
|
console.log('Authenticating...');
|
|
@@ -279,7 +284,7 @@ async function run(options) {
|
|
|
279
284
|
console.log(chalk__default["default"].green('Authentication successful.'));
|
|
280
285
|
} catch (error) {
|
|
281
286
|
if (error instanceof Error) {
|
|
282
|
-
throw new Error(
|
|
287
|
+
throw new Error("Authentication failed: ".concat(error.message));
|
|
283
288
|
}
|
|
284
289
|
throw error;
|
|
285
290
|
}
|