@commercetools-frontend/mc-scripts 24.11.0 → 24.13.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.
Files changed (76) hide show
  1. package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.cjs.dev.js +1 -1
  2. package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.cjs.prod.js +1 -1
  3. package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.esm.js +1 -1
  4. package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.dev.js +13 -14
  5. package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.prod.js +13 -14
  6. package/cli/dist/commercetools-frontend-mc-scripts-cli.esm.js +13 -14
  7. package/dist/{build-659191e5.cjs.prod.js → build-136a1b89.cjs.prod.js} +7 -7
  8. package/dist/{build-4a46d4f2.esm.js → build-85028596.esm.js} +7 -7
  9. package/dist/{build-566e6a6f.cjs.dev.js → build-f737874d.cjs.dev.js} +7 -7
  10. package/dist/{build-vite-5d317720.cjs.prod.js → build-vite-4a6c90c2.cjs.prod.js} +9 -8
  11. package/dist/{build-vite-59e1f185.esm.js → build-vite-85211835.esm.js} +9 -8
  12. package/dist/{build-vite-16b1a575.cjs.dev.js → build-vite-e26f6c9f.cjs.dev.js} +9 -8
  13. package/dist/commercetools-frontend-mc-scripts.cjs.dev.js +1 -1
  14. package/dist/commercetools-frontend-mc-scripts.cjs.prod.js +1 -1
  15. package/dist/commercetools-frontend-mc-scripts.esm.js +1 -1
  16. package/dist/{compile-html-f4ac88cc.cjs.dev.js → compile-html-8679f721.cjs.dev.js} +5 -2
  17. package/dist/{compile-html-025cd493.esm.js → compile-html-adfef598.esm.js} +4 -2
  18. package/dist/{compile-html-50fd05ec.cjs.prod.js → compile-html-b80f9651.cjs.prod.js} +5 -2
  19. package/dist/{config-sync-5c9abc61.cjs.dev.js → config-sync-a6d29e7e.cjs.dev.js} +80 -69
  20. package/dist/{config-sync-d75c4c90.cjs.prod.js → config-sync-c2f0d0d2.cjs.prod.js} +78 -67
  21. package/dist/{config-sync-f6fbc36d.esm.js → config-sync-ca738e38.esm.js} +79 -69
  22. package/dist/{create-postcss-config-d0e65de0.esm.js → create-postcss-config-2a12c11b.esm.js} +1 -1
  23. package/dist/{create-postcss-config-fb85a144.cjs.prod.js → create-postcss-config-43a47b87.cjs.prod.js} +1 -1
  24. package/dist/{create-postcss-config-64f2da19.cjs.dev.js → create-postcss-config-7ea95e6f.cjs.dev.js} +1 -1
  25. package/dist/{create-webpack-config-for-development-a5f08567.cjs.prod.js → create-webpack-config-for-development-01784333.cjs.prod.js} +9 -7
  26. package/dist/{create-webpack-config-for-development-e5725c8d.cjs.dev.js → create-webpack-config-for-development-09988fe4.cjs.dev.js} +9 -7
  27. package/dist/{create-webpack-config-for-development-a77e14bc.esm.js → create-webpack-config-for-development-ca57ea56.esm.js} +9 -7
  28. package/dist/{create-webpack-config-for-production-f92681a6.cjs.prod.js → create-webpack-config-for-production-58d046e9.cjs.prod.js} +7 -7
  29. package/dist/{create-webpack-config-for-production-7a6d390e.esm.js → create-webpack-config-for-production-7b4166fc.esm.js} +7 -7
  30. package/dist/{create-webpack-config-for-production-c0536780.cjs.dev.js → create-webpack-config-for-production-d1699ee5.cjs.dev.js} +7 -7
  31. package/dist/{credentials-storage-0b89aa0e.cjs.prod.js → credentials-storage-381abf27.cjs.prod.js} +1 -1
  32. package/dist/{credentials-storage-4464313c.esm.js → credentials-storage-7285d7b4.esm.js} +1 -1
  33. package/dist/{credentials-storage-cbb5c559.cjs.dev.js → credentials-storage-de220814.cjs.dev.js} +1 -1
  34. package/dist/{deployment-previews-set-5ea606f0.cjs.dev.js → deployment-previews-set-6baa8fc7.cjs.dev.js} +28 -22
  35. package/dist/{deployment-previews-set-da359e5f.cjs.prod.js → deployment-previews-set-86ea8608.cjs.prod.js} +28 -22
  36. package/dist/{deployment-previews-set-f346c6db.esm.js → deployment-previews-set-8b33d390.esm.js} +27 -22
  37. package/dist/{graphql-requests-0bfaefaf.cjs.prod.js → graphql-requests-4ff022ec.cjs.prod.js} +8 -5
  38. package/dist/{graphql-requests-96bc67f5.cjs.dev.js → graphql-requests-73d961d9.cjs.dev.js} +8 -5
  39. package/dist/{graphql-requests-0fadb1e6.esm.js → graphql-requests-b6ca7894.esm.js} +8 -5
  40. package/dist/{i18n-message-complilation-7311cb29.cjs.dev.js → i18n-message-complilation-393d344a.cjs.prod.js} +1 -1
  41. package/dist/{i18n-message-complilation-7762da61.cjs.prod.js → i18n-message-complilation-3f80e8d6.cjs.dev.js} +1 -1
  42. package/dist/{i18n-message-complilation-21d3b0aa.esm.js → i18n-message-complilation-8aec9d1b.esm.js} +1 -1
  43. package/dist/{login-e18068ff.esm.js → login-5c212340.esm.js} +32 -23
  44. package/dist/{login-ae425412.cjs.dev.js → login-856475d9.cjs.dev.js} +35 -23
  45. package/dist/{login-cc1d6e23.cjs.prod.js → login-b4e3433c.cjs.prod.js} +35 -23
  46. package/dist/{optimizations-7789145e.cjs.dev.js → optimizations-ea21b802.cjs.prod.js} +8 -5
  47. package/dist/{optimizations-bf991634.esm.js → optimizations-ea71a24a.esm.js} +7 -5
  48. package/dist/{optimizations-fb93514f.cjs.prod.js → optimizations-ebbeaf88.cjs.dev.js} +8 -5
  49. package/dist/{package-3874f63c.cjs.prod.js → package-36c179b4.cjs.prod.js} +10 -10
  50. package/dist/{package-9101f68f.cjs.dev.js → package-483f057b.cjs.dev.js} +10 -10
  51. package/dist/{package-9710aafc.esm.js → package-85c56dad.esm.js} +10 -10
  52. package/dist/{paths-39f22b8b.esm.js → paths-7bf7e88e.esm.js} +9 -4
  53. package/dist/{paths-7768b440.cjs.prod.js → paths-af1a725a.cjs.prod.js} +10 -4
  54. package/dist/{paths-b76fc753.cjs.dev.js → paths-ec3e3a7d.cjs.dev.js} +10 -4
  55. package/dist/{serve-50d33f0b.cjs.dev.js → serve-04a03d5f.cjs.dev.js} +6 -4
  56. package/dist/{serve-8a506da6.cjs.prod.js → serve-2a863026.cjs.prod.js} +6 -4
  57. package/dist/{serve-1036c2de.esm.js → serve-fb1a0f5a.esm.js} +6 -4
  58. package/dist/{start-25f6f1cf.cjs.prod.js → start-33cc9cbb.cjs.prod.js} +9 -8
  59. package/dist/{start-01621f67.esm.js → start-654d09ae.esm.js} +9 -8
  60. package/dist/{start-3a463b77.cjs.dev.js → start-e28d1fec.cjs.dev.js} +9 -8
  61. package/dist/{start-vite-29078b3a.cjs.prod.js → start-vite-d548c121.cjs.prod.js} +4 -3
  62. package/dist/{start-vite-7d1161e8.esm.js → start-vite-d649d1f3.esm.js} +4 -3
  63. package/dist/{start-vite-068e9f73.cjs.dev.js → start-vite-eea72ba9.cjs.dev.js} +4 -3
  64. package/dist/{vite-plugin-svgr-de6ee7da.esm.js → vite-plugin-svgr-22c8d518.esm.js} +4 -4
  65. package/dist/{vite-plugin-svgr-4034a834.cjs.prod.js → vite-plugin-svgr-53ef97c7.cjs.dev.js} +4 -4
  66. package/dist/{vite-plugin-svgr-7d06f400.cjs.dev.js → vite-plugin-svgr-5de1cad9.cjs.prod.js} +4 -4
  67. package/package.json +10 -10
  68. package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.dev.js +2 -2
  69. package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.prod.js +2 -2
  70. package/postcss/dist/commercetools-frontend-mc-scripts-postcss.esm.js +2 -2
  71. package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.dev.js +6 -6
  72. package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.prod.js +6 -6
  73. package/webpack/dist/commercetools-frontend-mc-scripts-webpack.esm.js +6 -6
  74. package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.cjs.dev.js +1 -1
  75. package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.cjs.prod.js +1 -1
  76. package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.esm.js +1 -1
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var vendorsToTranspile = require('./vendors-to-transpile-6ab4ea06.cjs.dev.js');
6
6
 
7
7
  // NOTE: This string will be replaced on build time with the package version.
8
- var version = "24.11.0";
8
+ var version = "24.13.0";
9
9
 
10
10
  // These exports are deprecated.
11
11
 
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var vendorsToTranspile = require('./vendors-to-transpile-04a49d40.cjs.prod.js');
6
6
 
7
7
  // NOTE: This string will be replaced on build time with the package version.
8
- var version = "24.11.0";
8
+ var version = "24.13.0";
9
9
 
10
10
  // These exports are deprecated.
11
11
 
@@ -1,7 +1,7 @@
1
1
  export { v as vendorsToTranspile } from './vendors-to-transpile-7dc84a72.esm.js';
2
2
 
3
3
  // NOTE: This string will be replaced on build time with the package version.
4
- var version = "24.11.0";
4
+ var version = "24.13.0";
5
5
 
6
6
  // These exports are deprecated.
7
7
 
@@ -1,10 +1,11 @@
1
1
  'use strict';
2
2
 
3
+ var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
3
4
  var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
4
5
  var fs = require('fs');
5
6
  var chalk = require('chalk');
6
7
  var mcHtmlTemplate = require('@commercetools-frontend/mc-html-template');
7
- var paths = require('./paths-b76fc753.cjs.dev.js');
8
+ var paths = require('./paths-ec3e3a7d.cjs.dev.js');
8
9
  require('@babel/runtime-corejs3/core-js-stable/instance/find');
9
10
  require('path');
10
11
  require('./does-file-exist-eb86baca.cjs.dev.js');
@@ -12,6 +13,7 @@ require('node:fs');
12
13
 
13
14
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
14
15
 
16
+ var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
15
17
  var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
16
18
  var fs__default = /*#__PURE__*/_interopDefault(fs);
17
19
  var chalk__default = /*#__PURE__*/_interopDefault(chalk);
@@ -31,7 +33,8 @@ async function run(options) {
31
33
  const transformerFn = require(transformerPath);
32
34
  transformerFn(compiled);
33
35
  } catch (error) {
34
- throw new Error(`Could not load transformer module "${options.transformer}"\n${error instanceof Error ? error.stack : ''}`);
36
+ var _context;
37
+ throw new Error(_concatInstanceProperty__default["default"](_context = "Could not load transformer module \"".concat(options.transformer, "\"\n")).call(_context, error instanceof Error ? error.stack : ''));
35
38
  }
36
39
  } else if (options.printSecurityHeaders) {
37
40
  console.log(_JSON$stringify__default["default"](compiled.headers));
@@ -1,8 +1,9 @@
1
+ import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
1
2
  import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringify';
2
3
  import fs from 'fs';
3
4
  import chalk from 'chalk';
4
5
  import { compileHtml } from '@commercetools-frontend/mc-html-template';
5
- import { p as paths } from './paths-39f22b8b.esm.js';
6
+ import { p as paths } from './paths-7bf7e88e.esm.js';
6
7
  import '@babel/runtime-corejs3/core-js-stable/instance/find';
7
8
  import 'path';
8
9
  import './does-file-exist-32618334.esm.js';
@@ -23,7 +24,8 @@ async function run(options) {
23
24
  const transformerFn = require(transformerPath);
24
25
  transformerFn(compiled);
25
26
  } catch (error) {
26
- throw new Error(`Could not load transformer module "${options.transformer}"\n${error instanceof Error ? error.stack : ''}`);
27
+ var _context;
28
+ throw new Error(_concatInstanceProperty(_context = "Could not load transformer module \"".concat(options.transformer, "\"\n")).call(_context, error instanceof Error ? error.stack : ''));
27
29
  }
28
30
  } else if (options.printSecurityHeaders) {
29
31
  console.log(_JSON$stringify(compiled.headers));
@@ -1,10 +1,11 @@
1
1
  'use strict';
2
2
 
3
+ var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
3
4
  var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
4
5
  var fs = require('fs');
5
6
  var chalk = require('chalk');
6
7
  var mcHtmlTemplate = require('@commercetools-frontend/mc-html-template');
7
- var paths = require('./paths-7768b440.cjs.prod.js');
8
+ var paths = require('./paths-af1a725a.cjs.prod.js');
8
9
  require('@babel/runtime-corejs3/core-js-stable/instance/find');
9
10
  require('path');
10
11
  require('./does-file-exist-be53305d.cjs.prod.js');
@@ -12,6 +13,7 @@ require('node:fs');
12
13
 
13
14
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
14
15
 
16
+ var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
15
17
  var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
16
18
  var fs__default = /*#__PURE__*/_interopDefault(fs);
17
19
  var chalk__default = /*#__PURE__*/_interopDefault(chalk);
@@ -31,7 +33,8 @@ async function run(options) {
31
33
  const transformerFn = require(transformerPath);
32
34
  transformerFn(compiled);
33
35
  } catch (error) {
34
- throw new Error(`Could not load transformer module "${options.transformer}"\n${error instanceof Error ? error.stack : ''}`);
36
+ var _context;
37
+ throw new Error(_concatInstanceProperty__default["default"](_context = "Could not load transformer module \"".concat(options.transformer, "\"\n")).call(_context, error instanceof Error ? error.stack : ''));
35
38
  }
36
39
  } else if (options.printSecurityHeaders) {
37
40
  console.log(_JSON$stringify__default["default"](compiled.headers));
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
4
+ var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
4
5
  var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
5
6
  var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
6
7
  var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
@@ -9,7 +10,7 @@ var chalk = require('chalk');
9
10
  var omit = require('lodash/omit');
10
11
  var prompts = require('prompts');
11
12
  var applicationConfig = require('@commercetools-frontend/application-config');
12
- var credentialsStorage$1 = require('./credentials-storage-cbb5c559.cjs.dev.js');
13
+ var credentialsStorage$1 = require('./credentials-storage-de220814.cjs.dev.js');
13
14
  var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
14
15
  var _Object$getOwnPropertyDescriptor = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
15
16
  var _Object$getOwnPropertyDescriptors = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
@@ -21,7 +22,7 @@ var _Set = require('@babel/runtime-corejs3/core-js-stable/set');
21
22
  var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
22
23
  var _reduceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
23
24
  var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
24
- var graphqlRequests = require('./graphql-requests-96bc67f5.cjs.dev.js');
25
+ var graphqlRequests = require('./graphql-requests-73d961d9.cjs.dev.js');
25
26
  require('@babel/runtime-corejs3/helpers/classCallCheck');
26
27
  require('@babel/runtime-corejs3/helpers/createClass');
27
28
  require('@babel/runtime-corejs3/core-js-stable/date/now');
@@ -34,10 +35,11 @@ require('graphql');
34
35
  require('graphql-request');
35
36
  require('@commercetools-frontend/constants');
36
37
  require('@commercetools/http-user-agent');
37
- require('./package-9101f68f.cjs.dev.js');
38
+ require('./package-483f057b.cjs.dev.js');
38
39
 
39
40
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
40
41
 
42
+ var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
41
43
  var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
42
44
  var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
43
45
  var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
@@ -57,17 +59,17 @@ var _reduceInstanceProperty__default = /*#__PURE__*/_interopDefault(_reduceInsta
57
59
  var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
58
60
 
59
61
  function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
60
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context7, _context8; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context7 = ownKeys(Object(t), !0)).call(_context7, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context8 = ownKeys(Object(t))).call(_context8, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
62
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context21, _context22; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context21 = ownKeys(Object(t), !0)).call(_context21, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context22 = ownKeys(Object(t))).call(_context22, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
61
63
 
62
64
  // Since not all terminal supports colors, to make things more consistent for testing purposes,
63
65
  // during tests the color used is appended before the string instead of coloring it.
64
66
  const isTest = process.env.NODE_ENV === 'test';
65
67
  const red = str => {
66
- if (isTest) return `<color-red>${str}</color-red>`;
68
+ if (isTest) return "<color-red>".concat(str, "</color-red>");
67
69
  return chalk__default["default"].red(str);
68
70
  };
69
71
  const green = str => {
70
- if (isTest) return `<color-green>${str}</color-green>`;
72
+ if (isTest) return "<color-green>".concat(str, "</color-green>");
71
73
  return chalk__default["default"].green(str);
72
74
  };
73
75
 
@@ -83,13 +85,16 @@ const getStringDiff = _ref => {
83
85
  _ref$indentLevel = _ref.indentLevel,
84
86
  indentLevel = _ref$indentLevel === void 0 ? 0 : _ref$indentLevel;
85
87
  if (!previousValue && nextValue) {
86
- return `${indent(indentLevel)}${label} added: ${green(nextValue)}`;
88
+ var _context2, _context3;
89
+ return _concatInstanceProperty__default["default"](_context2 = _concatInstanceProperty__default["default"](_context3 = "".concat(indent(indentLevel))).call(_context3, label, " added: ")).call(_context2, green(nextValue));
87
90
  }
88
91
  if (previousValue && !nextValue) {
89
- return `${indent(indentLevel)}${label} removed: ${red(previousValue)}`;
92
+ var _context4, _context5;
93
+ return _concatInstanceProperty__default["default"](_context4 = _concatInstanceProperty__default["default"](_context5 = "".concat(indent(indentLevel))).call(_context5, label, " removed: ")).call(_context4, red(previousValue));
90
94
  }
91
95
  if (previousValue && nextValue && previousValue !== nextValue) {
92
- return `${indent(indentLevel)}${label} changed: ${red(previousValue)} => ${green(nextValue)}`;
96
+ var _context6, _context7, _context8;
97
+ return _concatInstanceProperty__default["default"](_context6 = _concatInstanceProperty__default["default"](_context7 = _concatInstanceProperty__default["default"](_context8 = "".concat(indent(indentLevel))).call(_context8, label, " changed: ")).call(_context7, red(previousValue), " => ")).call(_context6, green(nextValue));
93
98
  }
94
99
  return null;
95
100
  };
@@ -102,7 +107,7 @@ const getArrayDiff = _ref2 => {
102
107
  indentLevel = _ref2$indentLevel === void 0 ? 0 : _ref2$indentLevel;
103
108
  const oldArraySet = new _Set__default["default"](previousValue);
104
109
  const arrayDiff = [];
105
- nextValue?.forEach(item => {
110
+ nextValue === null || nextValue === void 0 || _forEachInstanceProperty__default["default"](nextValue).call(nextValue, item => {
106
111
  if (oldArraySet.has(item)) {
107
112
  oldArraySet.delete(item);
108
113
  } else {
@@ -123,7 +128,7 @@ const getArrayDiff = _ref2 => {
123
128
  return arrayDiff.join('\n');
124
129
  };
125
130
  const getPermissionsDiff = _ref3 => {
126
- var _context2;
131
+ var _context1;
127
132
  let previousValue = _ref3.previousValue,
128
133
  nextValue = _ref3.nextValue;
129
134
  const permissionDiff = ['permissions changed'];
@@ -136,10 +141,12 @@ const getPermissionsDiff = _ref3 => {
136
141
  }, {});
137
142
  const indentLevel = 1;
138
143
  _forEachInstanceProperty__default["default"](nextValue).call(nextValue, newPermission => {
139
- const currentDiff = [`${indent(indentLevel)}"${newPermission.name}" changed`];
144
+ var _context9;
145
+ const currentDiff = [_concatInstanceProperty__default["default"](_context9 = "".concat(indent(indentLevel), "\"")).call(_context9, newPermission.name, "\" changed")];
140
146
  // if the permission name is not in the old config, it means it is a new addition.
141
147
  if (!mappedOldPermissions[newPermission.name]) {
142
- permissionDiff.push(`${indent(indentLevel)}"${green(newPermission.name)}" was added`);
148
+ var _context0;
149
+ permissionDiff.push(_concatInstanceProperty__default["default"](_context0 = "".concat(indent(indentLevel), "\"")).call(_context0, green(newPermission.name), "\" was added"));
143
150
  }
144
151
 
145
152
  // if permission name is in the old config, now we check if there was a change
@@ -156,21 +163,22 @@ const getPermissionsDiff = _ref3 => {
156
163
  });
157
164
 
158
165
  // if there are old permissions left, it means they were deleted in the new Permissions.
159
- _forEachInstanceProperty__default["default"](_context2 = _Object$keys__default["default"](mappedOldPermissions)).call(_context2, oldPermissionName => {
160
- permissionDiff.push(`${indent(indentLevel)}"${red(oldPermissionName)}" was removed`);
166
+ _forEachInstanceProperty__default["default"](_context1 = _Object$keys__default["default"](mappedOldPermissions)).call(_context1, oldPermissionName => {
167
+ var _context10;
168
+ permissionDiff.push(_concatInstanceProperty__default["default"](_context10 = "".concat(indent(indentLevel), "\"")).call(_context10, red(oldPermissionName), "\" was removed"));
161
169
  });
162
170
  if (permissionDiff.length > 1) return permissionDiff.join('\n');
163
171
  return null;
164
172
  };
165
173
  const getLabelAllLocalesDiff = _ref5 => {
166
- var _context3;
174
+ var _context14;
167
175
  let _ref5$previousValue = _ref5.previousValue,
168
176
  previousValue = _ref5$previousValue === void 0 ? [] : _ref5$previousValue,
169
177
  _ref5$nextValue = _ref5.nextValue,
170
178
  nextValue = _ref5$nextValue === void 0 ? [] : _ref5$nextValue,
171
179
  _ref5$indentLevel = _ref5.indentLevel,
172
180
  indentLevel = _ref5$indentLevel === void 0 ? 0 : _ref5$indentLevel;
173
- const labelAllLocalesDiff = [`${indent(indentLevel - 1)}labelAllLocales changed`];
181
+ const labelAllLocalesDiff = ["".concat(indent(indentLevel - 1), "labelAllLocales changed")];
174
182
  const mappedOldLabelAllLocales = _reduceInstanceProperty__default["default"](previousValue).call(previousValue, (previousLabelAllLocale, _ref6) => {
175
183
  let locale = _ref6.locale,
176
184
  value = _ref6.value;
@@ -182,7 +190,8 @@ const getLabelAllLocalesDiff = _ref5 => {
182
190
  if (newLabelAllLocale.locale in mappedOldLabelAllLocales) {
183
191
  const oldLocaleValue = mappedOldLabelAllLocales[newLabelAllLocale.locale];
184
192
  if (oldLocaleValue !== newLabelAllLocale.value) {
185
- labelAllLocalesDiff.push(`${indent(indentLevel)}locale "${newLabelAllLocale.locale}" changed: ${red(oldLocaleValue)} => ${green(newLabelAllLocale.value)}`);
193
+ var _context11, _context12, _context13;
194
+ labelAllLocalesDiff.push(_concatInstanceProperty__default["default"](_context11 = _concatInstanceProperty__default["default"](_context12 = _concatInstanceProperty__default["default"](_context13 = "".concat(indent(indentLevel), "locale \"")).call(_context13, newLabelAllLocale.locale, "\" changed: ")).call(_context12, red(oldLocaleValue), " => ")).call(_context11, green(newLabelAllLocale.value)));
186
195
  }
187
196
  delete mappedOldLabelAllLocales[newLabelAllLocale.locale];
188
197
  } else {
@@ -196,7 +205,7 @@ const getLabelAllLocalesDiff = _ref5 => {
196
205
  }
197
206
  }
198
207
  });
199
- _forEachInstanceProperty__default["default"](_context3 = _Object$keys__default["default"](mappedOldLabelAllLocales)).call(_context3, key => {
208
+ _forEachInstanceProperty__default["default"](_context14 = _Object$keys__default["default"](mappedOldLabelAllLocales)).call(_context14, key => {
200
209
  const localeDiff = getStringDiff({
201
210
  previousValue: key,
202
211
  label: 'locale',
@@ -210,14 +219,14 @@ const getLabelAllLocalesDiff = _ref5 => {
210
219
  return null;
211
220
  };
212
221
  const getTypeSettingsDiff = _ref7 => {
213
- var _context4;
222
+ var _context15;
214
223
  let previousValue = _ref7.previousValue,
215
224
  nextValue = _ref7.nextValue;
216
225
  const nonNullablePreviousValue = previousValue || {};
217
226
  const nonNullableNextValue = nextValue || {};
218
227
  const indentLevel = 1;
219
- const typeSettingsDiff = [`${indent(indentLevel - 1)}type settings changed`];
220
- _forEachInstanceProperty__default["default"](_context4 = _Object$keys__default["default"](nonNullablePreviousValue)).call(_context4, key => {
228
+ const typeSettingsDiff = ["".concat(indent(indentLevel - 1), "type settings changed")];
229
+ _forEachInstanceProperty__default["default"](_context15 = _Object$keys__default["default"](nonNullablePreviousValue)).call(_context15, key => {
221
230
  const typeSettingDiff = getStringDiff({
222
231
  previousValue: nonNullablePreviousValue[key],
223
232
  nextValue: nonNullableNextValue[key],
@@ -267,7 +276,7 @@ const getMainMenuLinkDiff = _ref9 => {
267
276
  indentLevel: 2
268
277
  });
269
278
  if (mainMenuLinkPermissionsDiff.length > 0) {
270
- mainMenuLinkDiff.push(`${indent(1)}permissions changed`);
279
+ mainMenuLinkDiff.push("".concat(indent(1), "permissions changed"));
271
280
  mainMenuLinkDiff.push(mainMenuLinkPermissionsDiff);
272
281
  }
273
282
  const menuLabelsDiff = getLabelAllLocalesDiff({
@@ -283,7 +292,7 @@ const getMainMenuLinkDiff = _ref9 => {
283
292
  return null;
284
293
  };
285
294
  const getSubmenuLinksDiff = _ref0 => {
286
- var _context6;
295
+ var _context20;
287
296
  let previousValue = _ref0.previousValue,
288
297
  nextValue = _ref0.nextValue;
289
298
  const submenuLinksDiff = ['submenuLink changed'];
@@ -294,16 +303,17 @@ const getSubmenuLinksDiff = _ref0 => {
294
303
  const previousOrder = getOrder(previousValue);
295
304
  const newOrder = getOrder(nextValue);
296
305
  if (previousOrder !== newOrder) {
297
- submenuLinksDiff.push(`${indent(1)}submenu order changed`);
298
- submenuLinksDiff.push(`${indent(2)}previous order: [${previousOrder}]`);
299
- submenuLinksDiff.push(`${indent(2)}new order: [${newOrder}]`);
306
+ var _context16, _context17;
307
+ submenuLinksDiff.push("".concat(indent(1), "submenu order changed"));
308
+ submenuLinksDiff.push(_concatInstanceProperty__default["default"](_context16 = "".concat(indent(2), "previous order: [")).call(_context16, previousOrder, "]"));
309
+ submenuLinksDiff.push(_concatInstanceProperty__default["default"](_context17 = "".concat(indent(2), "new order: [")).call(_context17, newOrder, "]"));
300
310
  }
301
311
  _forEachInstanceProperty__default["default"](nextValue).call(nextValue, newSubmenuLink => {
302
312
  const oldSubMenuLink = mappedSubmenuLinks[newSubmenuLink.uriPath];
303
313
  if (newSubmenuLink.uriPath in mappedSubmenuLinks) {
304
- var _context5;
305
- const submenuLinkDiff = [`${indent(1)}menu link "${newSubmenuLink.uriPath}" changed`];
306
- _forEachInstanceProperty__default["default"](_context5 = _Object$keys__default["default"](mappedSubmenuLinks[newSubmenuLink.uriPath])).call(_context5, key => {
314
+ var _context18, _context19;
315
+ const submenuLinkDiff = [_concatInstanceProperty__default["default"](_context18 = "".concat(indent(1), "menu link \"")).call(_context18, newSubmenuLink.uriPath, "\" changed")];
316
+ _forEachInstanceProperty__default["default"](_context19 = _Object$keys__default["default"](mappedSubmenuLinks[newSubmenuLink.uriPath])).call(_context19, key => {
307
317
  switch (key) {
308
318
  case 'defaultLabel':
309
319
  {
@@ -327,7 +337,7 @@ const getSubmenuLinksDiff = _ref0 => {
327
337
  indentLevel: 3
328
338
  });
329
339
  if (submenuLinkPermissionsDiff.length > 0) {
330
- submenuLinkDiff.push(`${indent(2)}permissions changed`);
340
+ submenuLinkDiff.push("".concat(indent(2), "permissions changed"));
331
341
  submenuLinkDiff.push(submenuLinkPermissionsDiff);
332
342
  }
333
343
  break;
@@ -362,7 +372,7 @@ const getSubmenuLinksDiff = _ref0 => {
362
372
  }
363
373
  }
364
374
  });
365
- _forEachInstanceProperty__default["default"](_context6 = _Object$keys__default["default"](mappedSubmenuLinks)).call(_context6, key => {
375
+ _forEachInstanceProperty__default["default"](_context20 = _Object$keys__default["default"](mappedSubmenuLinks)).call(_context20, key => {
366
376
  const linksDiff = getStringDiff({
367
377
  previousValue: key,
368
378
  label: 'menu link',
@@ -537,17 +547,18 @@ const getCustomViewConfigDiff = (oldConfig, newConfig) => {
537
547
 
538
548
  const credentialsStorage = new credentialsStorage$1.CredentialsStorage();
539
549
  const getMcUrlLink = _ref => {
550
+ var _context, _context2, _context3;
540
551
  let mcApiUrl = _ref.mcApiUrl,
541
552
  organizationId = _ref.organizationId,
542
553
  customEntityId = _ref.customEntityId,
543
554
  isCustomView = _ref.isCustomView;
544
555
  const mcUrl = mcApiUrl.replace('mc-api', 'mc');
545
- const customEntityLink = `${mcUrl}/account/organizations/${organizationId}/custom-${isCustomView ? 'views' : 'applications'}/owned/${customEntityId}`;
556
+ const customEntityLink = _concatInstanceProperty__default["default"](_context = _concatInstanceProperty__default["default"](_context2 = _concatInstanceProperty__default["default"](_context3 = "".concat(mcUrl, "/account/organizations/")).call(_context3, organizationId, "/custom-")).call(_context2, isCustomView ? 'views' : 'applications', "/owned/")).call(_context, customEntityId);
546
557
  return customEntityLink;
547
558
  };
548
559
  const isCustomViewData = data => data.entryPointUriPath === undefined;
549
560
  async function createOrUpdateCustomApplication(_ref2) {
550
- var _context3;
561
+ var _context6;
551
562
  let mcApiUrl = _ref2.mcApiUrl,
552
563
  localCustomEntityData = _ref2.localCustomEntityData,
553
564
  applicationIdentifier = _ref2.applicationIdentifier,
@@ -558,14 +569,14 @@ async function createOrUpdateCustomApplication(_ref2) {
558
569
  applicationIdentifier
559
570
  });
560
571
  if (!fetchedCustomApplication) {
561
- var _context2;
572
+ var _context5;
562
573
  const userOrganizations = await graphqlRequests.fetchUserOrganizations({
563
574
  mcApiUrl,
564
575
  applicationIdentifier
565
576
  });
566
577
  let organizationId, organizationName;
567
578
  if (userOrganizations.total === 0) {
568
- 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 Custom Application to be configured to.`);
579
+ 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 Custom Application to be configured to.");
569
580
  }
570
581
  if (userOrganizations.total === 1) {
571
582
  const _userOrganizations$re = _slicedToArray(userOrganizations.results, 1),
@@ -573,8 +584,8 @@ async function createOrUpdateCustomApplication(_ref2) {
573
584
  organizationId = organization.id;
574
585
  organizationName = organization.name;
575
586
  } else {
576
- var _context;
577
- const organizationChoices = _mapInstanceProperty__default["default"](_context = userOrganizations.results).call(_context, organization => ({
587
+ var _context4;
588
+ const organizationChoices = _mapInstanceProperty__default["default"](_context4 = userOrganizations.results).call(_context4, organization => ({
578
589
  title: organization.name,
579
590
  value: organization.id
580
591
  }));
@@ -587,7 +598,7 @@ async function createOrUpdateCustomApplication(_ref2) {
587
598
  }),
588
599
  selectedOrganizationId = _await$prompts.organizationId;
589
600
  if (!selectedOrganizationId) {
590
- throw new Error(`No Organization selected, aborting.`);
601
+ throw new Error("No Organization selected, aborting.");
591
602
  }
592
603
  organizationId = selectedOrganizationId;
593
604
  organizationName = _findInstanceProperty__default["default"](organizationChoices).call(organizationChoices, _ref3 => {
@@ -598,7 +609,7 @@ async function createOrUpdateCustomApplication(_ref2) {
598
609
  const _await$prompts2 = await prompts__default["default"]({
599
610
  type: 'text',
600
611
  name: 'confirmation',
601
- message: _filterInstanceProperty__default["default"](_context2 = [`You are about to create a new Custom Application in the "${chalk__default["default"].green(organizationName)}" organization. Are you sure you want to proceed?`, options.dryRun && chalk__default["default"].gray('Using "--dry-run", no data will be created.')]).call(_context2, Boolean).join('\n'),
612
+ message: _filterInstanceProperty__default["default"](_context5 = ["You are about to create a new Custom Application in the \"".concat(chalk__default["default"].green(organizationName), "\" organization. Are you sure you want to proceed?"), options.dryRun && chalk__default["default"].gray('Using "--dry-run", no data will be created.')]).call(_context5, Boolean).join('\n'),
602
613
  initial: 'yes'
603
614
  }),
604
615
  confirmation = _await$prompts2.confirmation;
@@ -609,7 +620,7 @@ async function createOrUpdateCustomApplication(_ref2) {
609
620
  const data = omit__default["default"](localCustomEntityData, ['id']);
610
621
  if (options.dryRun) {
611
622
  console.log();
612
- console.log(`The following payload would be used to create a new Custom Application.`);
623
+ console.log("The following payload would be used to create a new Custom Application.");
613
624
  console.log();
614
625
  console.log(chalk__default["default"].gray(_JSON$stringify__default["default"](data, null, 2)));
615
626
  return;
@@ -633,8 +644,8 @@ async function createOrUpdateCustomApplication(_ref2) {
633
644
  organizationId,
634
645
  customEntityId: createdCustomApplication.id
635
646
  });
636
- console.log(chalk__default["default"].green(`Custom Application created.\nPlease update the "env.production.applicationId" field in your local Custom Application config file with the following value: "${chalk__default["default"].green(createdCustomApplication.id)}".`));
637
- console.log(`You can inspect the Custom Application data in the Merchant Center at "${chalk__default["default"].gray(customAppLink)}".`);
647
+ console.log(chalk__default["default"].green("Custom Application created.\nPlease update the \"env.production.applicationId\" field in your local Custom Application config file with the following value: \"".concat(chalk__default["default"].green(createdCustomApplication.id), "\".")));
648
+ console.log("You can inspect the Custom Application data in the Merchant Center at \"".concat(chalk__default["default"].gray(customAppLink), "\"."));
638
649
  return;
639
650
  }
640
651
  const customAppLink = getMcUrlLink({
@@ -644,8 +655,8 @@ async function createOrUpdateCustomApplication(_ref2) {
644
655
  });
645
656
  const configDiff = getCustomApplicationConfigDiff(fetchedCustomApplication.application, localCustomEntityData);
646
657
  if (!configDiff) {
647
- console.log(chalk__default["default"].green(`Custom Application up-to-date.`));
648
- console.log(`You can inspect the Custom Application data in the Merchant Center at "${chalk__default["default"].gray(customAppLink)}".`);
658
+ console.log(chalk__default["default"].green("Custom Application up-to-date."));
659
+ console.log("You can inspect the Custom Application data in the Merchant Center at \"".concat(chalk__default["default"].gray(customAppLink), "\"."));
649
660
  return;
650
661
  }
651
662
  console.log('Changes detected:');
@@ -654,7 +665,7 @@ async function createOrUpdateCustomApplication(_ref2) {
654
665
  const _await$prompts3 = await prompts__default["default"]({
655
666
  type: 'text',
656
667
  name: 'confirmation',
657
- message: _filterInstanceProperty__default["default"](_context3 = [`You are about to update the Custom Application "${chalk__default["default"].green(localCustomEntityData.entryPointUriPath)}" with the changes above. Are you sure you want to proceed?`, options.dryRun && chalk__default["default"].gray('Using "--dry-run", no data will be updated.')]).call(_context3, Boolean).join('\n'),
668
+ message: _filterInstanceProperty__default["default"](_context6 = ["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?"), options.dryRun && chalk__default["default"].gray('Using "--dry-run", no data will be updated.')]).call(_context6, Boolean).join('\n'),
658
669
  initial: 'yes'
659
670
  }),
660
671
  confirmation = _await$prompts3.confirmation;
@@ -665,7 +676,7 @@ async function createOrUpdateCustomApplication(_ref2) {
665
676
  const data = omit__default["default"](localCustomEntityData, ['id']);
666
677
  if (options.dryRun) {
667
678
  console.log();
668
- console.log(`The following payload would be used to update the Custom Application "${chalk__default["default"].green(data.entryPointUriPath)}".`);
679
+ console.log("The following payload would be used to update the Custom Application \"".concat(chalk__default["default"].green(data.entryPointUriPath), "\"."));
669
680
  console.log();
670
681
  console.log(chalk__default["default"].gray(_JSON$stringify__default["default"](data, null, 2)));
671
682
  return;
@@ -677,11 +688,11 @@ async function createOrUpdateCustomApplication(_ref2) {
677
688
  applicationId: fetchedCustomApplication.application.id,
678
689
  applicationIdentifier
679
690
  });
680
- console.log(chalk__default["default"].green(`Custom Application updated.`));
681
- console.log(`You can inspect the Custom Application data in the Merchant Center at "${chalk__default["default"].gray(customAppLink)}".`);
691
+ console.log(chalk__default["default"].green("Custom Application updated."));
692
+ console.log("You can inspect the Custom Application data in the Merchant Center at \"".concat(chalk__default["default"].gray(customAppLink), "\"."));
682
693
  }
683
694
  async function createOrUpdateCustomView(_ref4) {
684
- var _context6;
695
+ var _fetchedCustomView$cu, _context9, _fetchedCustomView$cu2;
685
696
  let mcApiUrl = _ref4.mcApiUrl,
686
697
  localCustomEntityData = _ref4.localCustomEntityData,
687
698
  customViewId = _ref4.customViewId,
@@ -693,7 +704,7 @@ async function createOrUpdateCustomView(_ref4) {
693
704
  applicationIdentifier
694
705
  });
695
706
  if (!fetchedCustomView) {
696
- var _context5;
707
+ var _context8;
697
708
  const userOrganizations = await graphqlRequests.fetchUserOrganizations({
698
709
  mcApiUrl,
699
710
  customViewId,
@@ -701,7 +712,7 @@ async function createOrUpdateCustomView(_ref4) {
701
712
  });
702
713
  let organizationId, organizationName;
703
714
  if (userOrganizations.total === 0) {
704
- 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 Custom View to be configured to.`);
715
+ 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 Custom View to be configured to.");
705
716
  }
706
717
  if (userOrganizations.total === 1) {
707
718
  const _userOrganizations$re2 = _slicedToArray(userOrganizations.results, 1),
@@ -709,8 +720,8 @@ async function createOrUpdateCustomView(_ref4) {
709
720
  organizationId = organization.id;
710
721
  organizationName = organization.name;
711
722
  } else {
712
- var _context4;
713
- const organizationChoices = _mapInstanceProperty__default["default"](_context4 = userOrganizations.results).call(_context4, organization => ({
723
+ var _context7;
724
+ const organizationChoices = _mapInstanceProperty__default["default"](_context7 = userOrganizations.results).call(_context7, organization => ({
714
725
  title: organization.name,
715
726
  value: organization.id
716
727
  }));
@@ -723,7 +734,7 @@ async function createOrUpdateCustomView(_ref4) {
723
734
  }),
724
735
  selectedOrganizationId = _await$prompts4.organizationId;
725
736
  if (!selectedOrganizationId) {
726
- throw new Error(`No Organization selected, aborting.`);
737
+ throw new Error("No Organization selected, aborting.");
727
738
  }
728
739
  organizationId = selectedOrganizationId;
729
740
  organizationName = _findInstanceProperty__default["default"](organizationChoices).call(organizationChoices, _ref5 => {
@@ -734,7 +745,7 @@ async function createOrUpdateCustomView(_ref4) {
734
745
  const _await$prompts5 = await prompts__default["default"]({
735
746
  type: 'text',
736
747
  name: 'confirmation',
737
- message: _filterInstanceProperty__default["default"](_context5 = [`You are about to create a new Custom View in the "${chalk__default["default"].green(organizationName)}" organization. Are you sure you want to proceed?`, options.dryRun && chalk__default["default"].gray('Using "--dry-run", no data will be created.')]).call(_context5, Boolean).join('\n'),
748
+ message: _filterInstanceProperty__default["default"](_context8 = ["You are about to create a new Custom View in the \"".concat(chalk__default["default"].green(organizationName), "\" organization. Are you sure you want to proceed?"), options.dryRun && chalk__default["default"].gray('Using "--dry-run", no data will be created.')]).call(_context8, Boolean).join('\n'),
738
749
  initial: 'yes'
739
750
  }),
740
751
  confirmation = _await$prompts5.confirmation;
@@ -745,7 +756,7 @@ async function createOrUpdateCustomView(_ref4) {
745
756
  const data = omit__default["default"](localCustomEntityData, ['id']);
746
757
  if (options.dryRun) {
747
758
  console.log();
748
- console.log(`The following payload would be used to create a new Custom View.`);
759
+ console.log("The following payload would be used to create a new Custom View.");
749
760
  console.log();
750
761
  console.log(chalk__default["default"].gray(_JSON$stringify__default["default"](data, null, 2)));
751
762
  return;
@@ -770,20 +781,20 @@ async function createOrUpdateCustomView(_ref4) {
770
781
  customEntityId: createdCustomView.id,
771
782
  isCustomView: true
772
783
  });
773
- console.log(chalk__default["default"].green(`Custom View created.\nPlease update the "env.production.customViewId" field in your local Custom View config file with the following value: "${chalk__default["default"].green(createdCustomView.id)}".`));
774
- console.log(`You can inspect the Custom View data in the Merchant Center at "${chalk__default["default"].gray(customViewLink)}".`);
784
+ console.log(chalk__default["default"].green("Custom View created.\nPlease update the \"env.production.customViewId\" field in your local Custom View config file with the following value: \"".concat(chalk__default["default"].green(createdCustomView.id), "\".")));
785
+ console.log("You can inspect the Custom View data in the Merchant Center at \"".concat(chalk__default["default"].gray(customViewLink), "\"."));
775
786
  return;
776
787
  }
777
788
  const customViewLink = getMcUrlLink({
778
789
  mcApiUrl,
779
790
  organizationId: fetchedCustomView.organizationId,
780
- customEntityId: fetchedCustomView?.customView?.id || '',
791
+ customEntityId: (fetchedCustomView === null || fetchedCustomView === void 0 || (_fetchedCustomView$cu = fetchedCustomView.customView) === null || _fetchedCustomView$cu === void 0 ? void 0 : _fetchedCustomView$cu.id) || '',
781
792
  isCustomView: true
782
793
  });
783
794
  const configDiff = getCustomViewConfigDiff(fetchedCustomView.customView, localCustomEntityData);
784
795
  if (!configDiff) {
785
- console.log(chalk__default["default"].green(`Custom View up-to-date.`));
786
- console.log(`You can inspect the Custom View data in the Merchant Center at "${chalk__default["default"].gray(customViewLink)}".`);
796
+ console.log(chalk__default["default"].green("Custom View up-to-date."));
797
+ console.log("You can inspect the Custom View data in the Merchant Center at \"".concat(chalk__default["default"].gray(customViewLink), "\"."));
787
798
  return;
788
799
  }
789
800
  console.log('Changes detected:');
@@ -792,7 +803,7 @@ async function createOrUpdateCustomView(_ref4) {
792
803
  const _await$prompts6 = await prompts__default["default"]({
793
804
  type: 'text',
794
805
  name: 'confirmation',
795
- message: _filterInstanceProperty__default["default"](_context6 = [`You are about to update the Custom View "${chalk__default["default"].green(localCustomEntityData.defaultLabel)}" with the changes above. Are you sure you want to proceed?`, options.dryRun && chalk__default["default"].gray('Using "--dry-run", no data will be updated.')]).call(_context6, Boolean).join('\n'),
806
+ message: _filterInstanceProperty__default["default"](_context9 = ["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?"), options.dryRun && chalk__default["default"].gray('Using "--dry-run", no data will be updated.')]).call(_context9, Boolean).join('\n'),
796
807
  initial: 'yes'
797
808
  }),
798
809
  confirmation = _await$prompts6.confirmation;
@@ -803,7 +814,7 @@ async function createOrUpdateCustomView(_ref4) {
803
814
  const data = omit__default["default"](localCustomEntityData, ['id']);
804
815
  if (options.dryRun) {
805
816
  console.log();
806
- console.log(`The following payload would be used to update the Custom View "${chalk__default["default"].green(data.defaultLabel)}".`);
817
+ console.log("The following payload would be used to update the Custom View \"".concat(chalk__default["default"].green(data.defaultLabel), "\"."));
807
818
  console.log();
808
819
  console.log(chalk__default["default"].gray(_JSON$stringify__default["default"](data, null, 2)));
809
820
  return;
@@ -812,11 +823,11 @@ async function createOrUpdateCustomView(_ref4) {
812
823
  mcApiUrl,
813
824
  organizationId: fetchedCustomView.organizationId,
814
825
  data: omit__default["default"](localCustomEntityData, ['id']),
815
- customViewId: fetchedCustomView?.customView?.id || '',
826
+ customViewId: (fetchedCustomView === null || fetchedCustomView === void 0 || (_fetchedCustomView$cu2 = fetchedCustomView.customView) === null || _fetchedCustomView$cu2 === void 0 ? void 0 : _fetchedCustomView$cu2.id) || '',
816
827
  applicationIdentifier
817
828
  });
818
- console.log(chalk__default["default"].green(`Custom View updated.`));
819
- console.log(`You can inspect the Custom View data in the Merchant Center at "${chalk__default["default"].gray(customViewLink)}".`);
829
+ console.log(chalk__default["default"].green("Custom View updated."));
830
+ console.log("You can inspect the Custom View data in the Merchant Center at \"".concat(chalk__default["default"].gray(customViewLink), "\"."));
820
831
  }
821
832
  async function run(options) {
822
833
  const applicationConfig$1 = await applicationConfig.processConfig();
@@ -825,11 +836,11 @@ async function run(options) {
825
836
  mcApiUrl = _applicationConfig$en.mcApiUrl,
826
837
  applicationIdentifier = _applicationConfig$en.applicationIdentifier,
827
838
  customViewId = _applicationConfig$en.customViewId;
828
- console.log(`Using Merchant Center environment "${chalk__default["default"].green(mcApiUrl)}".`);
839
+ console.log("Using Merchant Center environment \"".concat(chalk__default["default"].green(mcApiUrl), "\"."));
829
840
  console.log();
830
841
  const isSessionValid = credentialsStorage.isSessionValid(mcApiUrl);
831
842
  if (!isSessionValid) {
832
- throw new Error(`You don't have a valid session. Please, run the "mc-scripts login" command to authenticate yourself.`);
843
+ throw new Error("You don't have a valid session. Please, run the \"mc-scripts login\" command to authenticate yourself.");
833
844
  }
834
845
  if (isCustomViewData(localCustomEntityData)) {
835
846
  createOrUpdateCustomView({