@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
@@ -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-0b89aa0e.cjs.prod.js');
13
+ var credentialsStorage$1 = require('./credentials-storage-381abf27.cjs.prod.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-0bfaefaf.cjs.prod.js');
25
+ var graphqlRequests = require('./graphql-requests-4ff022ec.cjs.prod.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-3874f63c.cjs.prod.js');
38
+ require('./package-36c179b4.cjs.prod.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,7 +59,7 @@ 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
  const red = str => {
62
64
  return chalk__default["default"].red(str);
63
65
  };
@@ -77,13 +79,16 @@ const getStringDiff = _ref => {
77
79
  _ref$indentLevel = _ref.indentLevel,
78
80
  indentLevel = _ref$indentLevel === void 0 ? 0 : _ref$indentLevel;
79
81
  if (!previousValue && nextValue) {
80
- return `${indent(indentLevel)}${label} added: ${green(nextValue)}`;
82
+ var _context2, _context3;
83
+ return _concatInstanceProperty__default["default"](_context2 = _concatInstanceProperty__default["default"](_context3 = "".concat(indent(indentLevel))).call(_context3, label, " added: ")).call(_context2, green(nextValue));
81
84
  }
82
85
  if (previousValue && !nextValue) {
83
- return `${indent(indentLevel)}${label} removed: ${red(previousValue)}`;
86
+ var _context4, _context5;
87
+ return _concatInstanceProperty__default["default"](_context4 = _concatInstanceProperty__default["default"](_context5 = "".concat(indent(indentLevel))).call(_context5, label, " removed: ")).call(_context4, red(previousValue));
84
88
  }
85
89
  if (previousValue && nextValue && previousValue !== nextValue) {
86
- return `${indent(indentLevel)}${label} changed: ${red(previousValue)} => ${green(nextValue)}`;
90
+ var _context6, _context7, _context8;
91
+ 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));
87
92
  }
88
93
  return null;
89
94
  };
@@ -96,7 +101,7 @@ const getArrayDiff = _ref2 => {
96
101
  indentLevel = _ref2$indentLevel === void 0 ? 0 : _ref2$indentLevel;
97
102
  const oldArraySet = new _Set__default["default"](previousValue);
98
103
  const arrayDiff = [];
99
- nextValue?.forEach(item => {
104
+ nextValue === null || nextValue === void 0 || _forEachInstanceProperty__default["default"](nextValue).call(nextValue, item => {
100
105
  if (oldArraySet.has(item)) {
101
106
  oldArraySet.delete(item);
102
107
  } else {
@@ -117,7 +122,7 @@ const getArrayDiff = _ref2 => {
117
122
  return arrayDiff.join('\n');
118
123
  };
119
124
  const getPermissionsDiff = _ref3 => {
120
- var _context2;
125
+ var _context1;
121
126
  let previousValue = _ref3.previousValue,
122
127
  nextValue = _ref3.nextValue;
123
128
  const permissionDiff = ['permissions changed'];
@@ -130,10 +135,12 @@ const getPermissionsDiff = _ref3 => {
130
135
  }, {});
131
136
  const indentLevel = 1;
132
137
  _forEachInstanceProperty__default["default"](nextValue).call(nextValue, newPermission => {
133
- const currentDiff = [`${indent(indentLevel)}"${newPermission.name}" changed`];
138
+ var _context9;
139
+ const currentDiff = [_concatInstanceProperty__default["default"](_context9 = "".concat(indent(indentLevel), "\"")).call(_context9, newPermission.name, "\" changed")];
134
140
  // if the permission name is not in the old config, it means it is a new addition.
135
141
  if (!mappedOldPermissions[newPermission.name]) {
136
- permissionDiff.push(`${indent(indentLevel)}"${green(newPermission.name)}" was added`);
142
+ var _context0;
143
+ permissionDiff.push(_concatInstanceProperty__default["default"](_context0 = "".concat(indent(indentLevel), "\"")).call(_context0, green(newPermission.name), "\" was added"));
137
144
  }
138
145
 
139
146
  // if permission name is in the old config, now we check if there was a change
@@ -150,21 +157,22 @@ const getPermissionsDiff = _ref3 => {
150
157
  });
151
158
 
152
159
  // if there are old permissions left, it means they were deleted in the new Permissions.
153
- _forEachInstanceProperty__default["default"](_context2 = _Object$keys__default["default"](mappedOldPermissions)).call(_context2, oldPermissionName => {
154
- permissionDiff.push(`${indent(indentLevel)}"${red(oldPermissionName)}" was removed`);
160
+ _forEachInstanceProperty__default["default"](_context1 = _Object$keys__default["default"](mappedOldPermissions)).call(_context1, oldPermissionName => {
161
+ var _context10;
162
+ permissionDiff.push(_concatInstanceProperty__default["default"](_context10 = "".concat(indent(indentLevel), "\"")).call(_context10, red(oldPermissionName), "\" was removed"));
155
163
  });
156
164
  if (permissionDiff.length > 1) return permissionDiff.join('\n');
157
165
  return null;
158
166
  };
159
167
  const getLabelAllLocalesDiff = _ref5 => {
160
- var _context3;
168
+ var _context14;
161
169
  let _ref5$previousValue = _ref5.previousValue,
162
170
  previousValue = _ref5$previousValue === void 0 ? [] : _ref5$previousValue,
163
171
  _ref5$nextValue = _ref5.nextValue,
164
172
  nextValue = _ref5$nextValue === void 0 ? [] : _ref5$nextValue,
165
173
  _ref5$indentLevel = _ref5.indentLevel,
166
174
  indentLevel = _ref5$indentLevel === void 0 ? 0 : _ref5$indentLevel;
167
- const labelAllLocalesDiff = [`${indent(indentLevel - 1)}labelAllLocales changed`];
175
+ const labelAllLocalesDiff = ["".concat(indent(indentLevel - 1), "labelAllLocales changed")];
168
176
  const mappedOldLabelAllLocales = _reduceInstanceProperty__default["default"](previousValue).call(previousValue, (previousLabelAllLocale, _ref6) => {
169
177
  let locale = _ref6.locale,
170
178
  value = _ref6.value;
@@ -176,7 +184,8 @@ const getLabelAllLocalesDiff = _ref5 => {
176
184
  if (newLabelAllLocale.locale in mappedOldLabelAllLocales) {
177
185
  const oldLocaleValue = mappedOldLabelAllLocales[newLabelAllLocale.locale];
178
186
  if (oldLocaleValue !== newLabelAllLocale.value) {
179
- labelAllLocalesDiff.push(`${indent(indentLevel)}locale "${newLabelAllLocale.locale}" changed: ${red(oldLocaleValue)} => ${green(newLabelAllLocale.value)}`);
187
+ var _context11, _context12, _context13;
188
+ 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)));
180
189
  }
181
190
  delete mappedOldLabelAllLocales[newLabelAllLocale.locale];
182
191
  } else {
@@ -190,7 +199,7 @@ const getLabelAllLocalesDiff = _ref5 => {
190
199
  }
191
200
  }
192
201
  });
193
- _forEachInstanceProperty__default["default"](_context3 = _Object$keys__default["default"](mappedOldLabelAllLocales)).call(_context3, key => {
202
+ _forEachInstanceProperty__default["default"](_context14 = _Object$keys__default["default"](mappedOldLabelAllLocales)).call(_context14, key => {
194
203
  const localeDiff = getStringDiff({
195
204
  previousValue: key,
196
205
  label: 'locale',
@@ -204,14 +213,14 @@ const getLabelAllLocalesDiff = _ref5 => {
204
213
  return null;
205
214
  };
206
215
  const getTypeSettingsDiff = _ref7 => {
207
- var _context4;
216
+ var _context15;
208
217
  let previousValue = _ref7.previousValue,
209
218
  nextValue = _ref7.nextValue;
210
219
  const nonNullablePreviousValue = previousValue || {};
211
220
  const nonNullableNextValue = nextValue || {};
212
221
  const indentLevel = 1;
213
- const typeSettingsDiff = [`${indent(indentLevel - 1)}type settings changed`];
214
- _forEachInstanceProperty__default["default"](_context4 = _Object$keys__default["default"](nonNullablePreviousValue)).call(_context4, key => {
222
+ const typeSettingsDiff = ["".concat(indent(indentLevel - 1), "type settings changed")];
223
+ _forEachInstanceProperty__default["default"](_context15 = _Object$keys__default["default"](nonNullablePreviousValue)).call(_context15, key => {
215
224
  const typeSettingDiff = getStringDiff({
216
225
  previousValue: nonNullablePreviousValue[key],
217
226
  nextValue: nonNullableNextValue[key],
@@ -261,7 +270,7 @@ const getMainMenuLinkDiff = _ref9 => {
261
270
  indentLevel: 2
262
271
  });
263
272
  if (mainMenuLinkPermissionsDiff.length > 0) {
264
- mainMenuLinkDiff.push(`${indent(1)}permissions changed`);
273
+ mainMenuLinkDiff.push("".concat(indent(1), "permissions changed"));
265
274
  mainMenuLinkDiff.push(mainMenuLinkPermissionsDiff);
266
275
  }
267
276
  const menuLabelsDiff = getLabelAllLocalesDiff({
@@ -277,7 +286,7 @@ const getMainMenuLinkDiff = _ref9 => {
277
286
  return null;
278
287
  };
279
288
  const getSubmenuLinksDiff = _ref0 => {
280
- var _context6;
289
+ var _context20;
281
290
  let previousValue = _ref0.previousValue,
282
291
  nextValue = _ref0.nextValue;
283
292
  const submenuLinksDiff = ['submenuLink changed'];
@@ -288,16 +297,17 @@ const getSubmenuLinksDiff = _ref0 => {
288
297
  const previousOrder = getOrder(previousValue);
289
298
  const newOrder = getOrder(nextValue);
290
299
  if (previousOrder !== newOrder) {
291
- submenuLinksDiff.push(`${indent(1)}submenu order changed`);
292
- submenuLinksDiff.push(`${indent(2)}previous order: [${previousOrder}]`);
293
- submenuLinksDiff.push(`${indent(2)}new order: [${newOrder}]`);
300
+ var _context16, _context17;
301
+ submenuLinksDiff.push("".concat(indent(1), "submenu order changed"));
302
+ submenuLinksDiff.push(_concatInstanceProperty__default["default"](_context16 = "".concat(indent(2), "previous order: [")).call(_context16, previousOrder, "]"));
303
+ submenuLinksDiff.push(_concatInstanceProperty__default["default"](_context17 = "".concat(indent(2), "new order: [")).call(_context17, newOrder, "]"));
294
304
  }
295
305
  _forEachInstanceProperty__default["default"](nextValue).call(nextValue, newSubmenuLink => {
296
306
  const oldSubMenuLink = mappedSubmenuLinks[newSubmenuLink.uriPath];
297
307
  if (newSubmenuLink.uriPath in mappedSubmenuLinks) {
298
- var _context5;
299
- const submenuLinkDiff = [`${indent(1)}menu link "${newSubmenuLink.uriPath}" changed`];
300
- _forEachInstanceProperty__default["default"](_context5 = _Object$keys__default["default"](mappedSubmenuLinks[newSubmenuLink.uriPath])).call(_context5, key => {
308
+ var _context18, _context19;
309
+ const submenuLinkDiff = [_concatInstanceProperty__default["default"](_context18 = "".concat(indent(1), "menu link \"")).call(_context18, newSubmenuLink.uriPath, "\" changed")];
310
+ _forEachInstanceProperty__default["default"](_context19 = _Object$keys__default["default"](mappedSubmenuLinks[newSubmenuLink.uriPath])).call(_context19, key => {
301
311
  switch (key) {
302
312
  case 'defaultLabel':
303
313
  {
@@ -321,7 +331,7 @@ const getSubmenuLinksDiff = _ref0 => {
321
331
  indentLevel: 3
322
332
  });
323
333
  if (submenuLinkPermissionsDiff.length > 0) {
324
- submenuLinkDiff.push(`${indent(2)}permissions changed`);
334
+ submenuLinkDiff.push("".concat(indent(2), "permissions changed"));
325
335
  submenuLinkDiff.push(submenuLinkPermissionsDiff);
326
336
  }
327
337
  break;
@@ -356,7 +366,7 @@ const getSubmenuLinksDiff = _ref0 => {
356
366
  }
357
367
  }
358
368
  });
359
- _forEachInstanceProperty__default["default"](_context6 = _Object$keys__default["default"](mappedSubmenuLinks)).call(_context6, key => {
369
+ _forEachInstanceProperty__default["default"](_context20 = _Object$keys__default["default"](mappedSubmenuLinks)).call(_context20, key => {
360
370
  const linksDiff = getStringDiff({
361
371
  previousValue: key,
362
372
  label: 'menu link',
@@ -531,17 +541,18 @@ const getCustomViewConfigDiff = (oldConfig, newConfig) => {
531
541
 
532
542
  const credentialsStorage = new credentialsStorage$1.CredentialsStorage();
533
543
  const getMcUrlLink = _ref => {
544
+ var _context, _context2, _context3;
534
545
  let mcApiUrl = _ref.mcApiUrl,
535
546
  organizationId = _ref.organizationId,
536
547
  customEntityId = _ref.customEntityId,
537
548
  isCustomView = _ref.isCustomView;
538
549
  const mcUrl = mcApiUrl.replace('mc-api', 'mc');
539
- const customEntityLink = `${mcUrl}/account/organizations/${organizationId}/custom-${isCustomView ? 'views' : 'applications'}/owned/${customEntityId}`;
550
+ 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);
540
551
  return customEntityLink;
541
552
  };
542
553
  const isCustomViewData = data => data.entryPointUriPath === undefined;
543
554
  async function createOrUpdateCustomApplication(_ref2) {
544
- var _context3;
555
+ var _context6;
545
556
  let mcApiUrl = _ref2.mcApiUrl,
546
557
  localCustomEntityData = _ref2.localCustomEntityData,
547
558
  applicationIdentifier = _ref2.applicationIdentifier,
@@ -552,14 +563,14 @@ async function createOrUpdateCustomApplication(_ref2) {
552
563
  applicationIdentifier
553
564
  });
554
565
  if (!fetchedCustomApplication) {
555
- var _context2;
566
+ var _context5;
556
567
  const userOrganizations = await graphqlRequests.fetchUserOrganizations({
557
568
  mcApiUrl,
558
569
  applicationIdentifier
559
570
  });
560
571
  let organizationId, organizationName;
561
572
  if (userOrganizations.total === 0) {
562
- 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.`);
573
+ 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.");
563
574
  }
564
575
  if (userOrganizations.total === 1) {
565
576
  const _userOrganizations$re = _slicedToArray(userOrganizations.results, 1),
@@ -567,8 +578,8 @@ async function createOrUpdateCustomApplication(_ref2) {
567
578
  organizationId = organization.id;
568
579
  organizationName = organization.name;
569
580
  } else {
570
- var _context;
571
- const organizationChoices = _mapInstanceProperty__default["default"](_context = userOrganizations.results).call(_context, organization => ({
581
+ var _context4;
582
+ const organizationChoices = _mapInstanceProperty__default["default"](_context4 = userOrganizations.results).call(_context4, organization => ({
572
583
  title: organization.name,
573
584
  value: organization.id
574
585
  }));
@@ -581,7 +592,7 @@ async function createOrUpdateCustomApplication(_ref2) {
581
592
  }),
582
593
  selectedOrganizationId = _await$prompts.organizationId;
583
594
  if (!selectedOrganizationId) {
584
- throw new Error(`No Organization selected, aborting.`);
595
+ throw new Error("No Organization selected, aborting.");
585
596
  }
586
597
  organizationId = selectedOrganizationId;
587
598
  organizationName = _findInstanceProperty__default["default"](organizationChoices).call(organizationChoices, _ref3 => {
@@ -592,7 +603,7 @@ async function createOrUpdateCustomApplication(_ref2) {
592
603
  const _await$prompts2 = await prompts__default["default"]({
593
604
  type: 'text',
594
605
  name: 'confirmation',
595
- 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'),
606
+ 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'),
596
607
  initial: 'yes'
597
608
  }),
598
609
  confirmation = _await$prompts2.confirmation;
@@ -603,7 +614,7 @@ async function createOrUpdateCustomApplication(_ref2) {
603
614
  const data = omit__default["default"](localCustomEntityData, ['id']);
604
615
  if (options.dryRun) {
605
616
  console.log();
606
- console.log(`The following payload would be used to create a new Custom Application.`);
617
+ console.log("The following payload would be used to create a new Custom Application.");
607
618
  console.log();
608
619
  console.log(chalk__default["default"].gray(_JSON$stringify__default["default"](data, null, 2)));
609
620
  return;
@@ -627,8 +638,8 @@ async function createOrUpdateCustomApplication(_ref2) {
627
638
  organizationId,
628
639
  customEntityId: createdCustomApplication.id
629
640
  });
630
- 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)}".`));
631
- console.log(`You can inspect the Custom Application data in the Merchant Center at "${chalk__default["default"].gray(customAppLink)}".`);
641
+ 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), "\".")));
642
+ console.log("You can inspect the Custom Application data in the Merchant Center at \"".concat(chalk__default["default"].gray(customAppLink), "\"."));
632
643
  return;
633
644
  }
634
645
  const customAppLink = getMcUrlLink({
@@ -638,8 +649,8 @@ async function createOrUpdateCustomApplication(_ref2) {
638
649
  });
639
650
  const configDiff = getCustomApplicationConfigDiff(fetchedCustomApplication.application, localCustomEntityData);
640
651
  if (!configDiff) {
641
- console.log(chalk__default["default"].green(`Custom Application up-to-date.`));
642
- console.log(`You can inspect the Custom Application data in the Merchant Center at "${chalk__default["default"].gray(customAppLink)}".`);
652
+ console.log(chalk__default["default"].green("Custom Application up-to-date."));
653
+ console.log("You can inspect the Custom Application data in the Merchant Center at \"".concat(chalk__default["default"].gray(customAppLink), "\"."));
643
654
  return;
644
655
  }
645
656
  console.log('Changes detected:');
@@ -648,7 +659,7 @@ async function createOrUpdateCustomApplication(_ref2) {
648
659
  const _await$prompts3 = await prompts__default["default"]({
649
660
  type: 'text',
650
661
  name: 'confirmation',
651
- 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'),
662
+ 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'),
652
663
  initial: 'yes'
653
664
  }),
654
665
  confirmation = _await$prompts3.confirmation;
@@ -659,7 +670,7 @@ async function createOrUpdateCustomApplication(_ref2) {
659
670
  const data = omit__default["default"](localCustomEntityData, ['id']);
660
671
  if (options.dryRun) {
661
672
  console.log();
662
- console.log(`The following payload would be used to update the Custom Application "${chalk__default["default"].green(data.entryPointUriPath)}".`);
673
+ console.log("The following payload would be used to update the Custom Application \"".concat(chalk__default["default"].green(data.entryPointUriPath), "\"."));
663
674
  console.log();
664
675
  console.log(chalk__default["default"].gray(_JSON$stringify__default["default"](data, null, 2)));
665
676
  return;
@@ -671,11 +682,11 @@ async function createOrUpdateCustomApplication(_ref2) {
671
682
  applicationId: fetchedCustomApplication.application.id,
672
683
  applicationIdentifier
673
684
  });
674
- console.log(chalk__default["default"].green(`Custom Application updated.`));
675
- console.log(`You can inspect the Custom Application data in the Merchant Center at "${chalk__default["default"].gray(customAppLink)}".`);
685
+ console.log(chalk__default["default"].green("Custom Application updated."));
686
+ console.log("You can inspect the Custom Application data in the Merchant Center at \"".concat(chalk__default["default"].gray(customAppLink), "\"."));
676
687
  }
677
688
  async function createOrUpdateCustomView(_ref4) {
678
- var _context6;
689
+ var _fetchedCustomView$cu, _context9, _fetchedCustomView$cu2;
679
690
  let mcApiUrl = _ref4.mcApiUrl,
680
691
  localCustomEntityData = _ref4.localCustomEntityData,
681
692
  customViewId = _ref4.customViewId,
@@ -687,7 +698,7 @@ async function createOrUpdateCustomView(_ref4) {
687
698
  applicationIdentifier
688
699
  });
689
700
  if (!fetchedCustomView) {
690
- var _context5;
701
+ var _context8;
691
702
  const userOrganizations = await graphqlRequests.fetchUserOrganizations({
692
703
  mcApiUrl,
693
704
  customViewId,
@@ -695,7 +706,7 @@ async function createOrUpdateCustomView(_ref4) {
695
706
  });
696
707
  let organizationId, organizationName;
697
708
  if (userOrganizations.total === 0) {
698
- 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.`);
709
+ 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.");
699
710
  }
700
711
  if (userOrganizations.total === 1) {
701
712
  const _userOrganizations$re2 = _slicedToArray(userOrganizations.results, 1),
@@ -703,8 +714,8 @@ async function createOrUpdateCustomView(_ref4) {
703
714
  organizationId = organization.id;
704
715
  organizationName = organization.name;
705
716
  } else {
706
- var _context4;
707
- const organizationChoices = _mapInstanceProperty__default["default"](_context4 = userOrganizations.results).call(_context4, organization => ({
717
+ var _context7;
718
+ const organizationChoices = _mapInstanceProperty__default["default"](_context7 = userOrganizations.results).call(_context7, organization => ({
708
719
  title: organization.name,
709
720
  value: organization.id
710
721
  }));
@@ -717,7 +728,7 @@ async function createOrUpdateCustomView(_ref4) {
717
728
  }),
718
729
  selectedOrganizationId = _await$prompts4.organizationId;
719
730
  if (!selectedOrganizationId) {
720
- throw new Error(`No Organization selected, aborting.`);
731
+ throw new Error("No Organization selected, aborting.");
721
732
  }
722
733
  organizationId = selectedOrganizationId;
723
734
  organizationName = _findInstanceProperty__default["default"](organizationChoices).call(organizationChoices, _ref5 => {
@@ -728,7 +739,7 @@ async function createOrUpdateCustomView(_ref4) {
728
739
  const _await$prompts5 = await prompts__default["default"]({
729
740
  type: 'text',
730
741
  name: 'confirmation',
731
- 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'),
742
+ 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'),
732
743
  initial: 'yes'
733
744
  }),
734
745
  confirmation = _await$prompts5.confirmation;
@@ -739,7 +750,7 @@ async function createOrUpdateCustomView(_ref4) {
739
750
  const data = omit__default["default"](localCustomEntityData, ['id']);
740
751
  if (options.dryRun) {
741
752
  console.log();
742
- console.log(`The following payload would be used to create a new Custom View.`);
753
+ console.log("The following payload would be used to create a new Custom View.");
743
754
  console.log();
744
755
  console.log(chalk__default["default"].gray(_JSON$stringify__default["default"](data, null, 2)));
745
756
  return;
@@ -764,20 +775,20 @@ async function createOrUpdateCustomView(_ref4) {
764
775
  customEntityId: createdCustomView.id,
765
776
  isCustomView: true
766
777
  });
767
- 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)}".`));
768
- console.log(`You can inspect the Custom View data in the Merchant Center at "${chalk__default["default"].gray(customViewLink)}".`);
778
+ 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), "\".")));
779
+ console.log("You can inspect the Custom View data in the Merchant Center at \"".concat(chalk__default["default"].gray(customViewLink), "\"."));
769
780
  return;
770
781
  }
771
782
  const customViewLink = getMcUrlLink({
772
783
  mcApiUrl,
773
784
  organizationId: fetchedCustomView.organizationId,
774
- customEntityId: fetchedCustomView?.customView?.id || '',
785
+ customEntityId: (fetchedCustomView === null || fetchedCustomView === void 0 || (_fetchedCustomView$cu = fetchedCustomView.customView) === null || _fetchedCustomView$cu === void 0 ? void 0 : _fetchedCustomView$cu.id) || '',
775
786
  isCustomView: true
776
787
  });
777
788
  const configDiff = getCustomViewConfigDiff(fetchedCustomView.customView, localCustomEntityData);
778
789
  if (!configDiff) {
779
- console.log(chalk__default["default"].green(`Custom View up-to-date.`));
780
- console.log(`You can inspect the Custom View data in the Merchant Center at "${chalk__default["default"].gray(customViewLink)}".`);
790
+ console.log(chalk__default["default"].green("Custom View up-to-date."));
791
+ console.log("You can inspect the Custom View data in the Merchant Center at \"".concat(chalk__default["default"].gray(customViewLink), "\"."));
781
792
  return;
782
793
  }
783
794
  console.log('Changes detected:');
@@ -786,7 +797,7 @@ async function createOrUpdateCustomView(_ref4) {
786
797
  const _await$prompts6 = await prompts__default["default"]({
787
798
  type: 'text',
788
799
  name: 'confirmation',
789
- 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'),
800
+ 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'),
790
801
  initial: 'yes'
791
802
  }),
792
803
  confirmation = _await$prompts6.confirmation;
@@ -797,7 +808,7 @@ async function createOrUpdateCustomView(_ref4) {
797
808
  const data = omit__default["default"](localCustomEntityData, ['id']);
798
809
  if (options.dryRun) {
799
810
  console.log();
800
- console.log(`The following payload would be used to update the Custom View "${chalk__default["default"].green(data.defaultLabel)}".`);
811
+ console.log("The following payload would be used to update the Custom View \"".concat(chalk__default["default"].green(data.defaultLabel), "\"."));
801
812
  console.log();
802
813
  console.log(chalk__default["default"].gray(_JSON$stringify__default["default"](data, null, 2)));
803
814
  return;
@@ -806,11 +817,11 @@ async function createOrUpdateCustomView(_ref4) {
806
817
  mcApiUrl,
807
818
  organizationId: fetchedCustomView.organizationId,
808
819
  data: omit__default["default"](localCustomEntityData, ['id']),
809
- customViewId: fetchedCustomView?.customView?.id || '',
820
+ customViewId: (fetchedCustomView === null || fetchedCustomView === void 0 || (_fetchedCustomView$cu2 = fetchedCustomView.customView) === null || _fetchedCustomView$cu2 === void 0 ? void 0 : _fetchedCustomView$cu2.id) || '',
810
821
  applicationIdentifier
811
822
  });
812
- console.log(chalk__default["default"].green(`Custom View updated.`));
813
- console.log(`You can inspect the Custom View data in the Merchant Center at "${chalk__default["default"].gray(customViewLink)}".`);
823
+ console.log(chalk__default["default"].green("Custom View updated."));
824
+ console.log("You can inspect the Custom View data in the Merchant Center at \"".concat(chalk__default["default"].gray(customViewLink), "\"."));
814
825
  }
815
826
  async function run(options) {
816
827
  const applicationConfig$1 = await applicationConfig.processConfig();
@@ -819,11 +830,11 @@ async function run(options) {
819
830
  mcApiUrl = _applicationConfig$en.mcApiUrl,
820
831
  applicationIdentifier = _applicationConfig$en.applicationIdentifier,
821
832
  customViewId = _applicationConfig$en.customViewId;
822
- console.log(`Using Merchant Center environment "${chalk__default["default"].green(mcApiUrl)}".`);
833
+ console.log("Using Merchant Center environment \"".concat(chalk__default["default"].green(mcApiUrl), "\"."));
823
834
  console.log();
824
835
  const isSessionValid = credentialsStorage.isSessionValid(mcApiUrl);
825
836
  if (!isSessionValid) {
826
- throw new Error(`You don't have a valid session. Please, run the "mc-scripts login" command to authenticate yourself.`);
837
+ throw new Error("You don't have a valid session. Please, run the \"mc-scripts login\" command to authenticate yourself.");
827
838
  }
828
839
  if (isCustomViewData(localCustomEntityData)) {
829
840
  createOrUpdateCustomView({