@commercetools-frontend/mc-scripts 24.10.0 → 24.12.0
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 +13 -14
- package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.prod.js +13 -14
- package/cli/dist/commercetools-frontend-mc-scripts-cli.esm.js +13 -14
- package/dist/{build-c91d680c.esm.js → build-1c7d82ef.esm.js} +7 -7
- package/dist/{build-bd986bac.cjs.dev.js → build-895fb1d2.cjs.dev.js} +7 -7
- package/dist/{build-9c26fe58.cjs.prod.js → build-be24f6d9.cjs.prod.js} +7 -7
- package/dist/{build-vite-5d317720.cjs.prod.js → build-vite-4a6c90c2.cjs.prod.js} +9 -8
- package/dist/{build-vite-59e1f185.esm.js → build-vite-85211835.esm.js} +9 -8
- package/dist/{build-vite-16b1a575.cjs.dev.js → build-vite-e26f6c9f.cjs.dev.js} +9 -8
- 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-d57260cc.esm.js → config-sync-78ccf97c.esm.js} +79 -69
- package/dist/{config-sync-200c5df5.cjs.prod.js → config-sync-e32e3fa6.cjs.prod.js} +78 -67
- package/dist/{config-sync-6977827c.cjs.dev.js → config-sync-ffddb604.cjs.dev.js} +80 -69
- package/dist/{create-postcss-config-fe3387fa.cjs.prod.js → create-postcss-config-2d574316.cjs.prod.js} +1 -1
- package/dist/{create-postcss-config-152ced99.esm.js → create-postcss-config-3887c44a.esm.js} +1 -1
- package/dist/{create-postcss-config-fd3dee79.cjs.dev.js → create-postcss-config-a47547b4.cjs.dev.js} +1 -1
- package/dist/{create-webpack-config-for-development-527a632e.cjs.prod.js → create-webpack-config-for-development-03c59e8e.cjs.prod.js} +9 -7
- package/dist/{create-webpack-config-for-development-48e5e9d0.esm.js → create-webpack-config-for-development-2c20b570.esm.js} +9 -7
- package/dist/{create-webpack-config-for-development-049a78d6.cjs.dev.js → create-webpack-config-for-development-99b8871e.cjs.dev.js} +9 -7
- package/dist/{create-webpack-config-for-production-9452f0ea.cjs.dev.js → create-webpack-config-for-production-28456828.cjs.dev.js} +7 -7
- package/dist/{create-webpack-config-for-production-5ef997a2.cjs.prod.js → create-webpack-config-for-production-59e18392.cjs.prod.js} +7 -7
- package/dist/{create-webpack-config-for-production-991b35ad.esm.js → create-webpack-config-for-production-94bc1e6d.esm.js} +7 -7
- package/dist/{credentials-storage-0b89aa0e.cjs.prod.js → credentials-storage-381abf27.cjs.prod.js} +1 -1
- package/dist/{credentials-storage-4464313c.esm.js → credentials-storage-7285d7b4.esm.js} +1 -1
- package/dist/{credentials-storage-cbb5c559.cjs.dev.js → credentials-storage-de220814.cjs.dev.js} +1 -1
- package/dist/{deployment-previews-set-93927f50.cjs.prod.js → deployment-previews-set-117c5626.cjs.prod.js} +28 -22
- package/dist/{deployment-previews-set-b9ebe08f.cjs.dev.js → deployment-previews-set-1e263b53.cjs.dev.js} +28 -22
- package/dist/{deployment-previews-set-178cacbc.esm.js → deployment-previews-set-a243363b.esm.js} +27 -22
- package/dist/{graphql-requests-6043a20b.esm.js → graphql-requests-54b9815d.esm.js} +8 -5
- package/dist/{graphql-requests-c5ecf40e.cjs.prod.js → graphql-requests-b4c8c047.cjs.dev.js} +8 -5
- package/dist/{graphql-requests-5527b635.cjs.dev.js → graphql-requests-b89caeb1.cjs.prod.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-2c875e0b.esm.js → login-0223db92.esm.js} +32 -23
- package/dist/{login-d7cb2619.cjs.dev.js → login-935abd52.cjs.dev.js} +35 -23
- package/dist/{login-73e9f04f.cjs.prod.js → login-bf7607cf.cjs.prod.js} +35 -23
- package/dist/{optimizations-fb93514f.cjs.prod.js → optimizations-ea21b802.cjs.prod.js} +8 -5
- package/dist/{optimizations-bf991634.esm.js → optimizations-ea71a24a.esm.js} +7 -5
- package/dist/{optimizations-7789145e.cjs.dev.js → optimizations-ebbeaf88.cjs.dev.js} +8 -5
- package/dist/{package-6a5c0475.esm.js → package-31f38f64.esm.js} +10 -10
- package/dist/{package-0d7eef40.cjs.dev.js → package-ad6a5026.cjs.prod.js} +10 -10
- package/dist/{package-c32ced1c.cjs.prod.js → package-dc76e3fe.cjs.dev.js} +10 -10
- 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-50d33f0b.cjs.dev.js → serve-04a03d5f.cjs.dev.js} +6 -4
- package/dist/{serve-8a506da6.cjs.prod.js → serve-2a863026.cjs.prod.js} +6 -4
- package/dist/{serve-1036c2de.esm.js → serve-fb1a0f5a.esm.js} +6 -4
- package/dist/{start-296a8335.cjs.prod.js → start-3a301547.cjs.prod.js} +9 -8
- package/dist/{start-f7aed0ed.esm.js → start-57d1d14c.esm.js} +9 -8
- package/dist/{start-66ec8479.cjs.dev.js → start-7e607d2a.cjs.dev.js} +9 -8
- package/dist/{start-vite-29078b3a.cjs.prod.js → start-vite-d548c121.cjs.prod.js} +4 -3
- package/dist/{start-vite-7d1161e8.esm.js → start-vite-d649d1f3.esm.js} +4 -3
- package/dist/{start-vite-068e9f73.cjs.dev.js → start-vite-eea72ba9.cjs.dev.js} +4 -3
- 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 +10 -10
- 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 +6 -6
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.prod.js +6 -6
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.esm.js +6 -6
- 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
|
@@ -25,10 +25,10 @@ var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
|
|
|
25
25
|
var _Object$assign = require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
26
26
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
27
27
|
var mcHtmlTemplate = require('@commercetools-frontend/mc-html-template');
|
|
28
|
-
var createPostcssConfig = require('./create-postcss-config-
|
|
28
|
+
var createPostcssConfig = require('./create-postcss-config-a47547b4.cjs.dev.js');
|
|
29
29
|
var hasJsxRuntime = require('./has-jsx-runtime-aa5d21ee.cjs.dev.js');
|
|
30
|
-
var optimizations = require('./optimizations-
|
|
31
|
-
var paths = require('./paths-
|
|
30
|
+
var optimizations = require('./optimizations-ebbeaf88.cjs.dev.js');
|
|
31
|
+
var paths = require('./paths-ec3e3a7d.cjs.dev.js');
|
|
32
32
|
var vendorsToTranspile = require('./vendors-to-transpile-6ab4ea06.cjs.dev.js');
|
|
33
33
|
|
|
34
34
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
@@ -152,7 +152,7 @@ function createWebpackConfigForDevelopment() {
|
|
|
152
152
|
// https://github.com/facebook/create-react-app/issues/290
|
|
153
153
|
// `web` extension prefixes have been added for better support
|
|
154
154
|
// for React Native Web.
|
|
155
|
-
extensions: _mapInstanceProperty__default["default"](_context = ['js', 'mjs', 'cjs', 'ts', 'tsx', 'json', 'jsx']).call(_context, ext =>
|
|
155
|
+
extensions: _mapInstanceProperty__default["default"](_context = ['js', 'mjs', 'cjs', 'ts', 'tsx', 'json', 'jsx']).call(_context, ext => ".".concat(ext)),
|
|
156
156
|
// NOTE: this is meant to be a temporary list of fallback/polyfills for certain
|
|
157
157
|
// nodejs modules. With Webpack <5 these polyfills were included by default in Webpack,
|
|
158
158
|
// however now it's not the case anymore.
|
|
@@ -306,9 +306,9 @@ function createWebpackConfigForDevelopment() {
|
|
|
306
306
|
name: 'prefixIds',
|
|
307
307
|
params: {
|
|
308
308
|
delim: '',
|
|
309
|
-
prefix: (_, info) =>
|
|
309
|
+
prefix: (_, info) => "svg".concat(crypto__default["default"].createHash('shake256', {
|
|
310
310
|
outputLength: 6
|
|
311
|
-
}).update(info.path || '').digest('hex')
|
|
311
|
+
}).update(info.path || '').digest('hex'))
|
|
312
312
|
}
|
|
313
313
|
}]
|
|
314
314
|
}
|
|
@@ -431,7 +431,9 @@ function createWebpackConfigForDevelopment() {
|
|
|
431
431
|
presets: [[require.resolve('@commercetools-frontend/babel-preset-mc-app'), {
|
|
432
432
|
runtime: hasJsxRuntime.hasJsxRuntime() ? 'automatic' : 'classic'
|
|
433
433
|
}]],
|
|
434
|
-
plugins: _filterInstanceProperty__default["default"](_context4 = [hasReactRefresh && require.resolve('react-refresh/babel')
|
|
434
|
+
plugins: _filterInstanceProperty__default["default"](_context4 = [hasReactRefresh && require.resolve('react-refresh/babel'),
|
|
435
|
+
// Add coverage instrumentation when running Cypress tests
|
|
436
|
+
process.env.CYPRESS_COVERAGE && require.resolve('babel-plugin-istanbul')]).call(_context4, Boolean),
|
|
435
437
|
// This is a feature of `babel-loader` for webpack (not Babel itself).
|
|
436
438
|
// It enables caching results in ./node_modules/.cache/babel-loader/
|
|
437
439
|
// directory for faster rebuilds.
|
|
@@ -29,10 +29,10 @@ var _reduceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/ins
|
|
|
29
29
|
var _Object$assign = require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
30
30
|
var fs = require('fs');
|
|
31
31
|
var path = require('path');
|
|
32
|
-
var createPostcssConfig = require('./create-postcss-config-
|
|
32
|
+
var createPostcssConfig = require('./create-postcss-config-a47547b4.cjs.dev.js');
|
|
33
33
|
var hasJsxRuntime = require('./has-jsx-runtime-aa5d21ee.cjs.dev.js');
|
|
34
|
-
var optimizations = require('./optimizations-
|
|
35
|
-
var paths = require('./paths-
|
|
34
|
+
var optimizations = require('./optimizations-ebbeaf88.cjs.dev.js');
|
|
35
|
+
var paths = require('./paths-ec3e3a7d.cjs.dev.js');
|
|
36
36
|
var vendorsToTranspile = require('./vendors-to-transpile-6ab4ea06.cjs.dev.js');
|
|
37
37
|
|
|
38
38
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
@@ -109,7 +109,7 @@ let FinalStatsWriterPlugin = /*#__PURE__*/function () {
|
|
|
109
109
|
fs__default["default"].writeFileSync(path__default["default"].join(this.config.outputPath, 'stats.json'), _JSON$stringify__default["default"](finalStats, null, 2));
|
|
110
110
|
} catch (error) {
|
|
111
111
|
// eslint-disable-next-line no-console
|
|
112
|
-
console.warn(
|
|
112
|
+
console.warn("[FinalStatsWriterPlugin] The dist folder could not be found at ".concat(this.config.outputPath, ". Check the console for errors during the webpack compilation."));
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
}]);
|
|
@@ -230,7 +230,7 @@ function createWebpackConfigForProduction() {
|
|
|
230
230
|
// https://github.com/facebook/create-react-app/issues/290
|
|
231
231
|
// `web` extension prefixes have been added for better support
|
|
232
232
|
// for React Native Web.
|
|
233
|
-
extensions: _mapInstanceProperty__default["default"](_context2 = ['js', 'mjs', 'cjs', 'ts', 'tsx', 'json', 'jsx']).call(_context2, ext =>
|
|
233
|
+
extensions: _mapInstanceProperty__default["default"](_context2 = ['js', 'mjs', 'cjs', 'ts', 'tsx', 'json', 'jsx']).call(_context2, ext => ".".concat(ext)),
|
|
234
234
|
// NOTE: this is meant to be a temporary list of fallback/polyfills for certain
|
|
235
235
|
// nodejs modules. With Webpack <5 these polyfills were included by default in Webpack,
|
|
236
236
|
// however now it's not the case anymore.
|
|
@@ -360,9 +360,9 @@ function createWebpackConfigForProduction() {
|
|
|
360
360
|
name: 'prefixIds',
|
|
361
361
|
params: {
|
|
362
362
|
delim: '',
|
|
363
|
-
prefix: (_, info) =>
|
|
363
|
+
prefix: (_, info) => "svg".concat(crypto__default["default"].createHash('shake256', {
|
|
364
364
|
outputLength: 6
|
|
365
|
-
}).update(info.path || '').digest('hex')
|
|
365
|
+
}).update(info.path || '').digest('hex'))
|
|
366
366
|
}
|
|
367
367
|
}]
|
|
368
368
|
}
|
|
@@ -29,10 +29,10 @@ var _reduceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/ins
|
|
|
29
29
|
var _Object$assign = require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
30
30
|
var fs = require('fs');
|
|
31
31
|
var path = require('path');
|
|
32
|
-
var createPostcssConfig = require('./create-postcss-config-
|
|
32
|
+
var createPostcssConfig = require('./create-postcss-config-2d574316.cjs.prod.js');
|
|
33
33
|
var hasJsxRuntime = require('./has-jsx-runtime-c3202df5.cjs.prod.js');
|
|
34
|
-
var optimizations = require('./optimizations-
|
|
35
|
-
var paths = require('./paths-
|
|
34
|
+
var optimizations = require('./optimizations-ea21b802.cjs.prod.js');
|
|
35
|
+
var paths = require('./paths-af1a725a.cjs.prod.js');
|
|
36
36
|
var vendorsToTranspile = require('./vendors-to-transpile-04a49d40.cjs.prod.js');
|
|
37
37
|
|
|
38
38
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
@@ -109,7 +109,7 @@ let FinalStatsWriterPlugin = /*#__PURE__*/function () {
|
|
|
109
109
|
fs__default["default"].writeFileSync(path__default["default"].join(this.config.outputPath, 'stats.json'), _JSON$stringify__default["default"](finalStats, null, 2));
|
|
110
110
|
} catch (error) {
|
|
111
111
|
// eslint-disable-next-line no-console
|
|
112
|
-
console.warn(
|
|
112
|
+
console.warn("[FinalStatsWriterPlugin] The dist folder could not be found at ".concat(this.config.outputPath, ". Check the console for errors during the webpack compilation."));
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
}]);
|
|
@@ -230,7 +230,7 @@ function createWebpackConfigForProduction() {
|
|
|
230
230
|
// https://github.com/facebook/create-react-app/issues/290
|
|
231
231
|
// `web` extension prefixes have been added for better support
|
|
232
232
|
// for React Native Web.
|
|
233
|
-
extensions: _mapInstanceProperty__default["default"](_context2 = ['js', 'mjs', 'cjs', 'ts', 'tsx', 'json', 'jsx']).call(_context2, ext =>
|
|
233
|
+
extensions: _mapInstanceProperty__default["default"](_context2 = ['js', 'mjs', 'cjs', 'ts', 'tsx', 'json', 'jsx']).call(_context2, ext => ".".concat(ext)),
|
|
234
234
|
// NOTE: this is meant to be a temporary list of fallback/polyfills for certain
|
|
235
235
|
// nodejs modules. With Webpack <5 these polyfills were included by default in Webpack,
|
|
236
236
|
// however now it's not the case anymore.
|
|
@@ -360,9 +360,9 @@ function createWebpackConfigForProduction() {
|
|
|
360
360
|
name: 'prefixIds',
|
|
361
361
|
params: {
|
|
362
362
|
delim: '',
|
|
363
|
-
prefix: (_, info) =>
|
|
363
|
+
prefix: (_, info) => "svg".concat(crypto__default["default"].createHash('shake256', {
|
|
364
364
|
outputLength: 6
|
|
365
|
-
}).update(info.path || '').digest('hex')
|
|
365
|
+
}).update(info.path || '').digest('hex'))
|
|
366
366
|
}
|
|
367
367
|
}]
|
|
368
368
|
}
|
|
@@ -27,10 +27,10 @@ import _reduceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/insta
|
|
|
27
27
|
import _Object$assign from '@babel/runtime-corejs3/core-js-stable/object/assign';
|
|
28
28
|
import fs from 'fs';
|
|
29
29
|
import path from 'path';
|
|
30
|
-
import { c as createPostcssConfig } from './create-postcss-config-
|
|
30
|
+
import { c as createPostcssConfig } from './create-postcss-config-3887c44a.esm.js';
|
|
31
31
|
import { h as hasJsxRuntime } from './has-jsx-runtime-e3ecb09b.esm.js';
|
|
32
|
-
import { g as getWepbackCacheGroups } from './optimizations-
|
|
33
|
-
import { p as paths } from './paths-
|
|
32
|
+
import { g as getWepbackCacheGroups } from './optimizations-ea71a24a.esm.js';
|
|
33
|
+
import { p as paths } from './paths-7bf7e88e.esm.js';
|
|
34
34
|
import { v as vendorsToTranspile } from './vendors-to-transpile-7dc84a72.esm.js';
|
|
35
35
|
|
|
36
36
|
let FinalStatsWriterPlugin = /*#__PURE__*/function () {
|
|
@@ -79,7 +79,7 @@ let FinalStatsWriterPlugin = /*#__PURE__*/function () {
|
|
|
79
79
|
fs.writeFileSync(path.join(this.config.outputPath, 'stats.json'), _JSON$stringify(finalStats, null, 2));
|
|
80
80
|
} catch (error) {
|
|
81
81
|
// eslint-disable-next-line no-console
|
|
82
|
-
console.warn(
|
|
82
|
+
console.warn("[FinalStatsWriterPlugin] The dist folder could not be found at ".concat(this.config.outputPath, ". Check the console for errors during the webpack compilation."));
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
}]);
|
|
@@ -200,7 +200,7 @@ function createWebpackConfigForProduction() {
|
|
|
200
200
|
// https://github.com/facebook/create-react-app/issues/290
|
|
201
201
|
// `web` extension prefixes have been added for better support
|
|
202
202
|
// for React Native Web.
|
|
203
|
-
extensions: _mapInstanceProperty(_context2 = ['js', 'mjs', 'cjs', 'ts', 'tsx', 'json', 'jsx']).call(_context2, ext =>
|
|
203
|
+
extensions: _mapInstanceProperty(_context2 = ['js', 'mjs', 'cjs', 'ts', 'tsx', 'json', 'jsx']).call(_context2, ext => ".".concat(ext)),
|
|
204
204
|
// NOTE: this is meant to be a temporary list of fallback/polyfills for certain
|
|
205
205
|
// nodejs modules. With Webpack <5 these polyfills were included by default in Webpack,
|
|
206
206
|
// however now it's not the case anymore.
|
|
@@ -330,9 +330,9 @@ function createWebpackConfigForProduction() {
|
|
|
330
330
|
name: 'prefixIds',
|
|
331
331
|
params: {
|
|
332
332
|
delim: '',
|
|
333
|
-
prefix: (_, info) =>
|
|
333
|
+
prefix: (_, info) => "svg".concat(crypto.createHash('shake256', {
|
|
334
334
|
outputLength: 6
|
|
335
|
-
}).update(info.path || '').digest('hex')
|
|
335
|
+
}).update(info.path || '').digest('hex'))
|
|
336
336
|
}
|
|
337
337
|
}]
|
|
338
338
|
}
|
package/dist/{credentials-storage-0b89aa0e.cjs.prod.js → credentials-storage-381abf27.cjs.prod.js}
RENAMED
|
@@ -22,7 +22,7 @@ let CredentialsStorage = /*#__PURE__*/function () {
|
|
|
22
22
|
_classCallCheck(this, CredentialsStorage);
|
|
23
23
|
this.credentialsFilePath = void 0;
|
|
24
24
|
const homedir = os__default["default"].homedir();
|
|
25
|
-
const credentialsFolderPath = path__default["default"].join(homedir,
|
|
25
|
+
const credentialsFolderPath = path__default["default"].join(homedir, ".commercetools");
|
|
26
26
|
this.credentialsFilePath = path__default["default"].join(credentialsFolderPath, 'mc-credentials.json');
|
|
27
27
|
|
|
28
28
|
// Ensure the credentials file is present
|
|
@@ -12,7 +12,7 @@ let CredentialsStorage = /*#__PURE__*/function () {
|
|
|
12
12
|
_classCallCheck(this, CredentialsStorage);
|
|
13
13
|
this.credentialsFilePath = void 0;
|
|
14
14
|
const homedir = os.homedir();
|
|
15
|
-
const credentialsFolderPath = path.join(homedir,
|
|
15
|
+
const credentialsFolderPath = path.join(homedir, ".commercetools");
|
|
16
16
|
this.credentialsFilePath = path.join(credentialsFolderPath, 'mc-credentials.json');
|
|
17
17
|
|
|
18
18
|
// Ensure the credentials file is present
|
package/dist/{credentials-storage-cbb5c559.cjs.dev.js → credentials-storage-de220814.cjs.dev.js}
RENAMED
|
@@ -22,7 +22,7 @@ let CredentialsStorage = /*#__PURE__*/function () {
|
|
|
22
22
|
_classCallCheck(this, CredentialsStorage);
|
|
23
23
|
this.credentialsFilePath = void 0;
|
|
24
24
|
const homedir = os__default["default"].homedir();
|
|
25
|
-
const credentialsFolderPath = path__default["default"].join(homedir,
|
|
25
|
+
const credentialsFolderPath = path__default["default"].join(homedir, ".commercetools");
|
|
26
26
|
this.credentialsFilePath = path__default["default"].join(credentialsFolderPath, 'mc-credentials.json');
|
|
27
27
|
|
|
28
28
|
// Ensure the credentials file is present
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
var _URL = require('@babel/runtime-corejs3/core-js-stable/url');
|
|
4
4
|
var _includesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
5
|
+
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
5
6
|
var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
6
7
|
var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
7
8
|
var chalk = require('chalk');
|
|
8
9
|
var prompts = require('prompts');
|
|
9
10
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
10
|
-
var credentialsStorage$1 = require('./credentials-storage-
|
|
11
|
-
var graphqlRequests = require('./graphql-requests-
|
|
11
|
+
var credentialsStorage$1 = require('./credentials-storage-381abf27.cjs.prod.js');
|
|
12
|
+
var graphqlRequests = require('./graphql-requests-b89caeb1.cjs.prod.js');
|
|
12
13
|
require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
13
14
|
require('@babel/runtime-corejs3/helpers/createClass');
|
|
14
15
|
require('@babel/runtime-corejs3/core-js-stable/json/stringify');
|
|
@@ -30,12 +31,13 @@ require('graphql');
|
|
|
30
31
|
require('graphql-request');
|
|
31
32
|
require('@commercetools-frontend/constants');
|
|
32
33
|
require('@commercetools/http-user-agent');
|
|
33
|
-
require('./package-
|
|
34
|
+
require('./package-ad6a5026.cjs.prod.js');
|
|
34
35
|
|
|
35
36
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
36
37
|
|
|
37
38
|
var _URL__default = /*#__PURE__*/_interopDefault(_URL);
|
|
38
39
|
var _includesInstanceProperty__default = /*#__PURE__*/_interopDefault(_includesInstanceProperty);
|
|
40
|
+
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
39
41
|
var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
|
|
40
42
|
var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
|
|
41
43
|
var chalk__default = /*#__PURE__*/_interopDefault(chalk);
|
|
@@ -55,24 +57,25 @@ const validateUrl = function () {
|
|
|
55
57
|
const validateAlias = function () {
|
|
56
58
|
let alias = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
57
59
|
try {
|
|
58
|
-
new _URL__default["default"](
|
|
60
|
+
new _URL__default["default"]("https://".concat(alias, ".commercetools.com/"));
|
|
59
61
|
return true;
|
|
60
62
|
} catch (error) {
|
|
61
63
|
return false;
|
|
62
64
|
}
|
|
63
65
|
};
|
|
64
66
|
const getMcUrlLink = _ref => {
|
|
67
|
+
var _context2, _context3, _context4;
|
|
65
68
|
let mcApiUrl = _ref.mcApiUrl,
|
|
66
69
|
organizationId = _ref.organizationId,
|
|
67
70
|
customEntityId = _ref.customEntityId,
|
|
68
71
|
isCustomView = _ref.isCustomView;
|
|
69
72
|
const mcUrl = mcApiUrl.replace('mc-api', 'mc');
|
|
70
|
-
const customEntityLink =
|
|
73
|
+
const customEntityLink = _concatInstanceProperty__default["default"](_context2 = _concatInstanceProperty__default["default"](_context3 = _concatInstanceProperty__default["default"](_context4 = "".concat(mcUrl, "/account/organizations/")).call(_context4, organizationId, "/custom-")).call(_context3, isCustomView ? 'views' : 'applications', "/owned/")).call(_context2, customEntityId, "/deployment-previews");
|
|
71
74
|
return customEntityLink;
|
|
72
75
|
};
|
|
73
76
|
const isCustomViewData = data => data.entryPointUriPath === undefined;
|
|
74
77
|
async function setDeploymentPreview(_ref2) {
|
|
75
|
-
var
|
|
78
|
+
var _context6;
|
|
76
79
|
let mcApiUrl = _ref2.mcApiUrl,
|
|
77
80
|
applicationId = _ref2.applicationId,
|
|
78
81
|
applicationIdentifier = _ref2.applicationIdentifier,
|
|
@@ -93,28 +96,28 @@ async function setDeploymentPreview(_ref2) {
|
|
|
93
96
|
applicationIdentifier
|
|
94
97
|
});
|
|
95
98
|
if (!fetchedCustomApplication) {
|
|
96
|
-
throw new Error(
|
|
99
|
+
throw new Error("The Custom Application \"".concat(applicationIdentifier, "\" does not exist in the Merchant Center. Please create a Custom Application first before configuring deployment previews."));
|
|
97
100
|
}
|
|
98
101
|
let deploymentAlias = options.alias;
|
|
99
102
|
// If the alias was not provided as an argument to the script, let's ask for it.
|
|
100
103
|
if (!deploymentAlias) {
|
|
101
|
-
var
|
|
104
|
+
var _context5;
|
|
102
105
|
const _await$prompts = await prompts__default["default"]({
|
|
103
106
|
type: 'text',
|
|
104
107
|
name: 'alias',
|
|
105
|
-
message: _filterInstanceProperty__default["default"](
|
|
108
|
+
message: _filterInstanceProperty__default["default"](_context5 = ["Enter the alias for the deployment preview", options.dryRun && chalk__default["default"].gray('Using "--dry-run", no deployment preview will be created.')]).call(_context5, Boolean).join('\n'),
|
|
106
109
|
validate: value => validateAlias(value)
|
|
107
110
|
}),
|
|
108
111
|
alias = _await$prompts.alias;
|
|
109
112
|
deploymentAlias = alias;
|
|
110
113
|
}
|
|
111
|
-
const existingDeploymentPreview = _findInstanceProperty__default["default"](
|
|
114
|
+
const existingDeploymentPreview = _findInstanceProperty__default["default"](_context6 = fetchedCustomApplication.application.deployments).call(_context6, deployment => deployment.alias === deploymentAlias);
|
|
112
115
|
if (!options.alias && !options.url && existingDeploymentPreview) {
|
|
113
|
-
var
|
|
116
|
+
var _context7;
|
|
114
117
|
const _await$prompts2 = await prompts__default["default"]({
|
|
115
118
|
type: 'confirm',
|
|
116
119
|
name: 'aliasOverrideConfirmation',
|
|
117
|
-
message: _filterInstanceProperty__default["default"](
|
|
120
|
+
message: _filterInstanceProperty__default["default"](_context7 = ["The alias \"".concat(chalk__default["default"].green(deploymentAlias), "\" already exists. Do you want to proceed and update the URL?"), options.dryRun && chalk__default["default"].gray('Using "--dry-run", no deployment preview will be created.')]).call(_context7, Boolean).join('\n'),
|
|
118
121
|
initial: false
|
|
119
122
|
}),
|
|
120
123
|
aliasOverrideConfirmation = _await$prompts2.aliasOverrideConfirmation;
|
|
@@ -125,19 +128,20 @@ async function setDeploymentPreview(_ref2) {
|
|
|
125
128
|
}
|
|
126
129
|
let deploymentUrl = options.url;
|
|
127
130
|
if (!deploymentUrl) {
|
|
128
|
-
var
|
|
131
|
+
var _context8;
|
|
129
132
|
const _await$prompts3 = await prompts__default["default"]({
|
|
130
133
|
type: 'text',
|
|
131
134
|
name: 'url',
|
|
132
|
-
message: _filterInstanceProperty__default["default"](
|
|
135
|
+
message: _filterInstanceProperty__default["default"](_context8 = ["Enter the URL for the deployment preview", options.dryRun && chalk__default["default"].gray('Using "--dry-run", no deployment preview will be created.')]).call(_context8, Boolean).join('\n'),
|
|
133
136
|
validate: value => validateUrl(value)
|
|
134
137
|
}),
|
|
135
138
|
url = _await$prompts3.url;
|
|
136
139
|
deploymentUrl = url;
|
|
137
140
|
}
|
|
138
141
|
if (options.dryRun) {
|
|
139
|
-
|
|
140
|
-
|
|
142
|
+
var _context9, _context0;
|
|
143
|
+
const message = existingDeploymentPreview ? _concatInstanceProperty__default["default"](_context9 = "The existing deployment preview with alias \"".concat(deploymentAlias, "\" would have been updated with this url: \"")).call(_context9, deploymentUrl, "\".") : _concatInstanceProperty__default["default"](_context0 = "A new deployment preview with alias \"".concat(deploymentAlias, "\" would have been created with this url: \"")).call(_context0, deploymentUrl, "\".");
|
|
144
|
+
console.log("\n".concat(message, "\n"));
|
|
141
145
|
return;
|
|
142
146
|
}
|
|
143
147
|
const mcDeploymentPreviewsLink = getMcUrlLink({
|
|
@@ -147,6 +151,7 @@ async function setDeploymentPreview(_ref2) {
|
|
|
147
151
|
isCustomView
|
|
148
152
|
});
|
|
149
153
|
if (existingDeploymentPreview) {
|
|
154
|
+
var _context1;
|
|
150
155
|
await graphqlRequests.updateCustomApplicationDeploymentPreview({
|
|
151
156
|
mcApiUrl,
|
|
152
157
|
organizationId: fetchedCustomApplication.organizationId,
|
|
@@ -156,9 +161,10 @@ async function setDeploymentPreview(_ref2) {
|
|
|
156
161
|
url: deploymentUrl
|
|
157
162
|
}
|
|
158
163
|
});
|
|
159
|
-
console.log(chalk__default["default"].green(
|
|
160
|
-
console.log(chalk__default["default"].green(
|
|
164
|
+
console.log(chalk__default["default"].green(_concatInstanceProperty__default["default"](_context1 = "Deployment preview with alias \"".concat(deploymentAlias, "\" updated successfully with URL \"")).call(_context1, deploymentUrl, "\".")));
|
|
165
|
+
console.log(chalk__default["default"].green("You can access the deployment previews at: ".concat(mcDeploymentPreviewsLink)));
|
|
161
166
|
} else {
|
|
167
|
+
var _context10;
|
|
162
168
|
await graphqlRequests.createCustomApplicationDeploymentPreview({
|
|
163
169
|
mcApiUrl,
|
|
164
170
|
organizationId: fetchedCustomApplication.organizationId,
|
|
@@ -169,8 +175,8 @@ async function setDeploymentPreview(_ref2) {
|
|
|
169
175
|
url: deploymentUrl
|
|
170
176
|
}
|
|
171
177
|
});
|
|
172
|
-
console.log(chalk__default["default"].green(
|
|
173
|
-
console.log(chalk__default["default"].green(
|
|
178
|
+
console.log(chalk__default["default"].green(_concatInstanceProperty__default["default"](_context10 = "Deployment preview with alias \"".concat(deploymentAlias, "\" created successfully with URL \"")).call(_context10, deploymentUrl, "\".")));
|
|
179
|
+
console.log(chalk__default["default"].green("You can access the deployment previews at: ".concat(mcDeploymentPreviewsLink)));
|
|
174
180
|
}
|
|
175
181
|
}
|
|
176
182
|
async function run(options) {
|
|
@@ -180,11 +186,11 @@ async function run(options) {
|
|
|
180
186
|
mcApiUrl = _applicationConfig$en.mcApiUrl,
|
|
181
187
|
applicationIdentifier = _applicationConfig$en.applicationIdentifier;
|
|
182
188
|
const isCustomView = isCustomViewData(localCustomEntityData);
|
|
183
|
-
console.log(
|
|
189
|
+
console.log("Using Merchant Center environment \"".concat(chalk__default["default"].green(mcApiUrl), "\"."));
|
|
184
190
|
console.log();
|
|
185
191
|
const isSessionValid = credentialsStorage.isSessionValid(mcApiUrl);
|
|
186
192
|
if (!isSessionValid) {
|
|
187
|
-
throw new Error(
|
|
193
|
+
throw new Error("You don't have a valid session. Please, run the \"mc-scripts login\" command to authenticate yourself.");
|
|
188
194
|
}
|
|
189
195
|
if (isCustomView) {
|
|
190
196
|
throw new Error('Deployments previews are not supported for Custom Views.');
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
var _URL = require('@babel/runtime-corejs3/core-js-stable/url');
|
|
4
4
|
var _includesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
5
|
+
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
5
6
|
var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
6
7
|
var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
7
8
|
var chalk = require('chalk');
|
|
8
9
|
var prompts = require('prompts');
|
|
9
10
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
10
|
-
var credentialsStorage$1 = require('./credentials-storage-
|
|
11
|
-
var graphqlRequests = require('./graphql-requests-
|
|
11
|
+
var credentialsStorage$1 = require('./credentials-storage-de220814.cjs.dev.js');
|
|
12
|
+
var graphqlRequests = require('./graphql-requests-b4c8c047.cjs.dev.js');
|
|
12
13
|
require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
13
14
|
require('@babel/runtime-corejs3/helpers/createClass');
|
|
14
15
|
require('@babel/runtime-corejs3/core-js-stable/json/stringify');
|
|
@@ -30,12 +31,13 @@ require('graphql');
|
|
|
30
31
|
require('graphql-request');
|
|
31
32
|
require('@commercetools-frontend/constants');
|
|
32
33
|
require('@commercetools/http-user-agent');
|
|
33
|
-
require('./package-
|
|
34
|
+
require('./package-dc76e3fe.cjs.dev.js');
|
|
34
35
|
|
|
35
36
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
36
37
|
|
|
37
38
|
var _URL__default = /*#__PURE__*/_interopDefault(_URL);
|
|
38
39
|
var _includesInstanceProperty__default = /*#__PURE__*/_interopDefault(_includesInstanceProperty);
|
|
40
|
+
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
39
41
|
var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
|
|
40
42
|
var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
|
|
41
43
|
var chalk__default = /*#__PURE__*/_interopDefault(chalk);
|
|
@@ -55,24 +57,25 @@ const validateUrl = function () {
|
|
|
55
57
|
const validateAlias = function () {
|
|
56
58
|
let alias = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
57
59
|
try {
|
|
58
|
-
new _URL__default["default"](
|
|
60
|
+
new _URL__default["default"]("https://".concat(alias, ".commercetools.com/"));
|
|
59
61
|
return true;
|
|
60
62
|
} catch (error) {
|
|
61
63
|
return false;
|
|
62
64
|
}
|
|
63
65
|
};
|
|
64
66
|
const getMcUrlLink = _ref => {
|
|
67
|
+
var _context2, _context3, _context4;
|
|
65
68
|
let mcApiUrl = _ref.mcApiUrl,
|
|
66
69
|
organizationId = _ref.organizationId,
|
|
67
70
|
customEntityId = _ref.customEntityId,
|
|
68
71
|
isCustomView = _ref.isCustomView;
|
|
69
72
|
const mcUrl = mcApiUrl.replace('mc-api', 'mc');
|
|
70
|
-
const customEntityLink =
|
|
73
|
+
const customEntityLink = _concatInstanceProperty__default["default"](_context2 = _concatInstanceProperty__default["default"](_context3 = _concatInstanceProperty__default["default"](_context4 = "".concat(mcUrl, "/account/organizations/")).call(_context4, organizationId, "/custom-")).call(_context3, isCustomView ? 'views' : 'applications', "/owned/")).call(_context2, customEntityId, "/deployment-previews");
|
|
71
74
|
return customEntityLink;
|
|
72
75
|
};
|
|
73
76
|
const isCustomViewData = data => data.entryPointUriPath === undefined;
|
|
74
77
|
async function setDeploymentPreview(_ref2) {
|
|
75
|
-
var
|
|
78
|
+
var _context6;
|
|
76
79
|
let mcApiUrl = _ref2.mcApiUrl,
|
|
77
80
|
applicationId = _ref2.applicationId,
|
|
78
81
|
applicationIdentifier = _ref2.applicationIdentifier,
|
|
@@ -93,28 +96,28 @@ async function setDeploymentPreview(_ref2) {
|
|
|
93
96
|
applicationIdentifier
|
|
94
97
|
});
|
|
95
98
|
if (!fetchedCustomApplication) {
|
|
96
|
-
throw new Error(
|
|
99
|
+
throw new Error("The Custom Application \"".concat(applicationIdentifier, "\" does not exist in the Merchant Center. Please create a Custom Application first before configuring deployment previews."));
|
|
97
100
|
}
|
|
98
101
|
let deploymentAlias = options.alias;
|
|
99
102
|
// If the alias was not provided as an argument to the script, let's ask for it.
|
|
100
103
|
if (!deploymentAlias) {
|
|
101
|
-
var
|
|
104
|
+
var _context5;
|
|
102
105
|
const _await$prompts = await prompts__default["default"]({
|
|
103
106
|
type: 'text',
|
|
104
107
|
name: 'alias',
|
|
105
|
-
message: _filterInstanceProperty__default["default"](
|
|
108
|
+
message: _filterInstanceProperty__default["default"](_context5 = ["Enter the alias for the deployment preview", options.dryRun && chalk__default["default"].gray('Using "--dry-run", no deployment preview will be created.')]).call(_context5, Boolean).join('\n'),
|
|
106
109
|
validate: value => validateAlias(value)
|
|
107
110
|
}),
|
|
108
111
|
alias = _await$prompts.alias;
|
|
109
112
|
deploymentAlias = alias;
|
|
110
113
|
}
|
|
111
|
-
const existingDeploymentPreview = _findInstanceProperty__default["default"](
|
|
114
|
+
const existingDeploymentPreview = _findInstanceProperty__default["default"](_context6 = fetchedCustomApplication.application.deployments).call(_context6, deployment => deployment.alias === deploymentAlias);
|
|
112
115
|
if (!options.alias && !options.url && existingDeploymentPreview) {
|
|
113
|
-
var
|
|
116
|
+
var _context7;
|
|
114
117
|
const _await$prompts2 = await prompts__default["default"]({
|
|
115
118
|
type: 'confirm',
|
|
116
119
|
name: 'aliasOverrideConfirmation',
|
|
117
|
-
message: _filterInstanceProperty__default["default"](
|
|
120
|
+
message: _filterInstanceProperty__default["default"](_context7 = ["The alias \"".concat(chalk__default["default"].green(deploymentAlias), "\" already exists. Do you want to proceed and update the URL?"), options.dryRun && chalk__default["default"].gray('Using "--dry-run", no deployment preview will be created.')]).call(_context7, Boolean).join('\n'),
|
|
118
121
|
initial: false
|
|
119
122
|
}),
|
|
120
123
|
aliasOverrideConfirmation = _await$prompts2.aliasOverrideConfirmation;
|
|
@@ -125,19 +128,20 @@ async function setDeploymentPreview(_ref2) {
|
|
|
125
128
|
}
|
|
126
129
|
let deploymentUrl = options.url;
|
|
127
130
|
if (!deploymentUrl) {
|
|
128
|
-
var
|
|
131
|
+
var _context8;
|
|
129
132
|
const _await$prompts3 = await prompts__default["default"]({
|
|
130
133
|
type: 'text',
|
|
131
134
|
name: 'url',
|
|
132
|
-
message: _filterInstanceProperty__default["default"](
|
|
135
|
+
message: _filterInstanceProperty__default["default"](_context8 = ["Enter the URL for the deployment preview", options.dryRun && chalk__default["default"].gray('Using "--dry-run", no deployment preview will be created.')]).call(_context8, Boolean).join('\n'),
|
|
133
136
|
validate: value => validateUrl(value)
|
|
134
137
|
}),
|
|
135
138
|
url = _await$prompts3.url;
|
|
136
139
|
deploymentUrl = url;
|
|
137
140
|
}
|
|
138
141
|
if (options.dryRun) {
|
|
139
|
-
|
|
140
|
-
|
|
142
|
+
var _context9, _context0;
|
|
143
|
+
const message = existingDeploymentPreview ? _concatInstanceProperty__default["default"](_context9 = "The existing deployment preview with alias \"".concat(deploymentAlias, "\" would have been updated with this url: \"")).call(_context9, deploymentUrl, "\".") : _concatInstanceProperty__default["default"](_context0 = "A new deployment preview with alias \"".concat(deploymentAlias, "\" would have been created with this url: \"")).call(_context0, deploymentUrl, "\".");
|
|
144
|
+
console.log("\n".concat(message, "\n"));
|
|
141
145
|
return;
|
|
142
146
|
}
|
|
143
147
|
const mcDeploymentPreviewsLink = getMcUrlLink({
|
|
@@ -147,6 +151,7 @@ async function setDeploymentPreview(_ref2) {
|
|
|
147
151
|
isCustomView
|
|
148
152
|
});
|
|
149
153
|
if (existingDeploymentPreview) {
|
|
154
|
+
var _context1;
|
|
150
155
|
await graphqlRequests.updateCustomApplicationDeploymentPreview({
|
|
151
156
|
mcApiUrl,
|
|
152
157
|
organizationId: fetchedCustomApplication.organizationId,
|
|
@@ -156,9 +161,10 @@ async function setDeploymentPreview(_ref2) {
|
|
|
156
161
|
url: deploymentUrl
|
|
157
162
|
}
|
|
158
163
|
});
|
|
159
|
-
console.log(chalk__default["default"].green(
|
|
160
|
-
console.log(chalk__default["default"].green(
|
|
164
|
+
console.log(chalk__default["default"].green(_concatInstanceProperty__default["default"](_context1 = "Deployment preview with alias \"".concat(deploymentAlias, "\" updated successfully with URL \"")).call(_context1, deploymentUrl, "\".")));
|
|
165
|
+
console.log(chalk__default["default"].green("You can access the deployment previews at: ".concat(mcDeploymentPreviewsLink)));
|
|
161
166
|
} else {
|
|
167
|
+
var _context10;
|
|
162
168
|
await graphqlRequests.createCustomApplicationDeploymentPreview({
|
|
163
169
|
mcApiUrl,
|
|
164
170
|
organizationId: fetchedCustomApplication.organizationId,
|
|
@@ -169,8 +175,8 @@ async function setDeploymentPreview(_ref2) {
|
|
|
169
175
|
url: deploymentUrl
|
|
170
176
|
}
|
|
171
177
|
});
|
|
172
|
-
console.log(chalk__default["default"].green(
|
|
173
|
-
console.log(chalk__default["default"].green(
|
|
178
|
+
console.log(chalk__default["default"].green(_concatInstanceProperty__default["default"](_context10 = "Deployment preview with alias \"".concat(deploymentAlias, "\" created successfully with URL \"")).call(_context10, deploymentUrl, "\".")));
|
|
179
|
+
console.log(chalk__default["default"].green("You can access the deployment previews at: ".concat(mcDeploymentPreviewsLink)));
|
|
174
180
|
}
|
|
175
181
|
}
|
|
176
182
|
async function run(options) {
|
|
@@ -180,11 +186,11 @@ async function run(options) {
|
|
|
180
186
|
mcApiUrl = _applicationConfig$en.mcApiUrl,
|
|
181
187
|
applicationIdentifier = _applicationConfig$en.applicationIdentifier;
|
|
182
188
|
const isCustomView = isCustomViewData(localCustomEntityData);
|
|
183
|
-
console.log(
|
|
189
|
+
console.log("Using Merchant Center environment \"".concat(chalk__default["default"].green(mcApiUrl), "\"."));
|
|
184
190
|
console.log();
|
|
185
191
|
const isSessionValid = credentialsStorage.isSessionValid(mcApiUrl);
|
|
186
192
|
if (!isSessionValid) {
|
|
187
|
-
throw new Error(
|
|
193
|
+
throw new Error("You don't have a valid session. Please, run the \"mc-scripts login\" command to authenticate yourself.");
|
|
188
194
|
}
|
|
189
195
|
if (isCustomView) {
|
|
190
196
|
throw new Error('Deployments previews are not supported for Custom Views.');
|