@commercetools-frontend/mc-scripts 27.9.0 → 27.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.cjs.dev.js +1 -1
- package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.cjs.prod.js +1 -1
- package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.esm.js +1 -1
- package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.dev.js +17 -17
- package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.prod.js +17 -17
- package/cli/dist/commercetools-frontend-mc-scripts-cli.esm.js +17 -17
- package/dist/{build-1d64eec3.esm.js → build-5a0c84e7.esm.js} +8 -8
- package/dist/{build-bfc565e1.cjs.dev.js → build-b9cbc1d1.cjs.dev.js} +8 -8
- package/dist/{build-ffa10fc4.cjs.prod.js → build-cdeab3a8.cjs.prod.js} +8 -8
- package/dist/{build-vite-e4eeb1a3.cjs.dev.js → build-vite-0e8f3463.cjs.dev.js} +16 -14
- package/dist/{build-vite-377f721f.cjs.prod.js → build-vite-aa0e7242.cjs.prod.js} +16 -14
- package/dist/{build-vite-2ea8a241.esm.js → build-vite-ce3c4fb6.esm.js} +16 -14
- package/dist/commercetools-frontend-mc-scripts.cjs.dev.js +1 -1
- package/dist/commercetools-frontend-mc-scripts.cjs.prod.js +1 -1
- package/dist/commercetools-frontend-mc-scripts.esm.js +1 -1
- package/dist/{compile-html-f4ac88cc.cjs.dev.js → compile-html-8679f721.cjs.dev.js} +5 -2
- package/dist/{compile-html-025cd493.esm.js → compile-html-adfef598.esm.js} +4 -2
- package/dist/{compile-html-50fd05ec.cjs.prod.js → compile-html-b80f9651.cjs.prod.js} +5 -2
- package/dist/{config-sync-5a7916dc.cjs.dev.js → config-sync-2b56a941.cjs.dev.js} +17 -17
- package/dist/{config-sync-df11a5bf.cjs.prod.js → config-sync-41bc7f5e.cjs.prod.js} +17 -17
- package/dist/{config-sync-be573249.esm.js → config-sync-7031a7de.esm.js} +17 -17
- package/dist/{config-sync-ci-a34b7b54.esm.js → config-sync-ci-1866c188.esm.js} +25 -20
- package/dist/{config-sync-ci-1d706e60.cjs.dev.js → config-sync-ci-6d12f2f3.cjs.dev.js} +27 -22
- package/dist/{config-sync-ci-9bb94255.cjs.prod.js → config-sync-ci-ea943de9.cjs.prod.js} +27 -22
- package/dist/{config-sync-helpers-5fbe31c5.cjs.dev.js → config-sync-helpers-36985f8c.cjs.dev.js} +57 -48
- package/dist/{config-sync-helpers-aaaa44ef.cjs.prod.js → config-sync-helpers-79ccaaad.cjs.prod.js} +55 -46
- package/dist/{config-sync-helpers-876b7d09.esm.js → config-sync-helpers-875ef4a4.esm.js} +56 -47
- package/dist/{create-postcss-config-3a80caef.cjs.dev.js → create-postcss-config-13cb1cb8.cjs.dev.js} +1 -1
- package/dist/{create-postcss-config-7d0b0ae1.cjs.prod.js → create-postcss-config-1eeb3d9d.cjs.prod.js} +1 -1
- package/dist/{create-postcss-config-a9f7c8a8.esm.js → create-postcss-config-390e8a52.esm.js} +1 -1
- package/dist/{create-webpack-config-for-development-ee3e94e6.cjs.prod.js → create-webpack-config-for-development-6608b4e4.cjs.prod.js} +15 -10
- package/dist/{create-webpack-config-for-development-a81db65f.cjs.dev.js → create-webpack-config-for-development-9a3a3a93.cjs.dev.js} +15 -10
- package/dist/{create-webpack-config-for-development-34ec7d5c.esm.js → create-webpack-config-for-development-dd95f3d5.esm.js} +15 -9
- package/dist/{create-webpack-config-for-production-585f2e76.cjs.dev.js → create-webpack-config-for-production-29b34b8c.cjs.dev.js} +8 -8
- package/dist/{create-webpack-config-for-production-f1317617.cjs.prod.js → create-webpack-config-for-production-2e6e5036.cjs.prod.js} +8 -8
- package/dist/{create-webpack-config-for-production-633d3891.esm.js → create-webpack-config-for-production-31bb3d24.esm.js} +8 -8
- package/dist/{credentials-storage-fd195144.cjs.dev.js → credentials-storage-1826f1a2.cjs.dev.js} +1 -1
- package/dist/{credentials-storage-ea1c16dc.cjs.prod.js → credentials-storage-60a63c81.cjs.prod.js} +1 -1
- package/dist/{credentials-storage-67deadc3.esm.js → credentials-storage-bfaa78f0.esm.js} +1 -1
- package/dist/{deployment-previews-set-ee6978a8.esm.js → deployment-previews-set-410cecf1.esm.js} +27 -22
- package/dist/{deployment-previews-set-5aeb990a.cjs.dev.js → deployment-previews-set-a04efad3.cjs.dev.js} +28 -22
- package/dist/{deployment-previews-set-d96668d6.cjs.prod.js → deployment-previews-set-bebd7a04.cjs.prod.js} +28 -22
- package/dist/{graphql-requests-d1683e27.cjs.dev.js → graphql-requests-1ea68584.cjs.dev.js} +8 -5
- package/dist/{graphql-requests-8a5d602b.cjs.prod.js → graphql-requests-98b1b779.cjs.prod.js} +8 -5
- package/dist/{graphql-requests-1bd861af.esm.js → graphql-requests-c491206a.esm.js} +8 -5
- package/dist/{i18n-message-complilation-7311cb29.cjs.dev.js → i18n-message-complilation-393d344a.cjs.prod.js} +1 -1
- package/dist/{i18n-message-complilation-7762da61.cjs.prod.js → i18n-message-complilation-3f80e8d6.cjs.dev.js} +1 -1
- package/dist/{i18n-message-complilation-21d3b0aa.esm.js → i18n-message-complilation-8aec9d1b.esm.js} +1 -1
- package/dist/{login-d51248e8.cjs.prod.js → login-a99d14e6.cjs.prod.js} +38 -60
- package/dist/{login-79d02906.esm.js → login-b935aede.esm.js} +37 -58
- package/dist/{login-62b53ebe.cjs.dev.js → login-cd99208a.cjs.dev.js} +38 -60
- package/dist/{optimizations-da5a0cfa.cjs.prod.js → optimizations-09a6638c.cjs.prod.js} +8 -5
- package/dist/{optimizations-54382f7b.esm.js → optimizations-1b3f8157.esm.js} +7 -5
- package/dist/{optimizations-56be74d6.cjs.dev.js → optimizations-640ffcac.cjs.dev.js} +8 -5
- package/dist/{package-5371f8ba.esm.js → package-15124b28.esm.js} +3 -4
- package/dist/{package-af294ed4.cjs.dev.js → package-90af7dfe.cjs.prod.js} +3 -4
- package/dist/{package-3539c84a.cjs.prod.js → package-98adb0d5.cjs.dev.js} +3 -4
- package/dist/{paths-39f22b8b.esm.js → paths-7bf7e88e.esm.js} +9 -4
- package/dist/{paths-7768b440.cjs.prod.js → paths-af1a725a.cjs.prod.js} +10 -4
- package/dist/{paths-b76fc753.cjs.dev.js → paths-ec3e3a7d.cjs.dev.js} +10 -4
- package/dist/{serve-b1c12985.cjs.dev.js → serve-760fc169.cjs.dev.js} +13 -14
- package/dist/{serve-3837602d.cjs.prod.js → serve-87ef7d4f.cjs.prod.js} +13 -14
- package/dist/{serve-22475fec.esm.js → serve-ddf30b4c.esm.js} +13 -13
- package/dist/{start-6fe0ccd2.esm.js → start-08895b5f.esm.js} +11 -13
- package/dist/{start-6e03b662.cjs.dev.js → start-a0945fde.cjs.dev.js} +11 -13
- package/dist/{start-bea9b61d.cjs.prod.js → start-d9bd5dfb.cjs.prod.js} +11 -13
- package/dist/{start-vite-dd8a1e26.cjs.prod.js → start-vite-00514c35.cjs.prod.js} +5 -4
- package/dist/{start-vite-698c9e82.cjs.dev.js → start-vite-10e49e5c.cjs.dev.js} +5 -4
- package/dist/{start-vite-4b0df191.esm.js → start-vite-745d3123.esm.js} +5 -4
- package/dist/{try-load-nimbus-plugins-d502a5fe.cjs.dev.js → try-load-nimbus-plugins-06ce5d83.cjs.dev.js} +1 -1
- package/dist/{try-load-nimbus-plugins-2f528d8f.esm.js → try-load-nimbus-plugins-526dccbd.esm.js} +1 -1
- package/dist/{try-load-nimbus-plugins-a713d7d3.cjs.prod.js → try-load-nimbus-plugins-59c3a594.cjs.prod.js} +1 -1
- package/dist/{vite-plugin-svgr-de6ee7da.esm.js → vite-plugin-svgr-22c8d518.esm.js} +4 -4
- package/dist/{vite-plugin-svgr-4034a834.cjs.prod.js → vite-plugin-svgr-53ef97c7.cjs.dev.js} +4 -4
- package/dist/{vite-plugin-svgr-7d06f400.cjs.dev.js → vite-plugin-svgr-5de1cad9.cjs.prod.js} +4 -4
- package/package.json +32 -31
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.dev.js +2 -2
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.prod.js +2 -2
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.esm.js +2 -2
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.dev.js +7 -8
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.prod.js +7 -8
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.esm.js +7 -8
- package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.cjs.dev.js +1 -1
- package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.cjs.prod.js +1 -1
- package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.esm.js +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
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 chalk from 'chalk';
|
|
3
4
|
import omit from 'lodash/omit';
|
|
@@ -10,26 +11,25 @@ import _defineProperty from '@babel/runtime-corejs3/helpers/esm/defineProperty';
|
|
|
10
11
|
import _repeatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/repeat';
|
|
11
12
|
import _Set from '@babel/runtime-corejs3/core-js-stable/set';
|
|
12
13
|
import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/for-each';
|
|
13
|
-
import _bindInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/bind';
|
|
14
14
|
import _reduceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/reduce';
|
|
15
15
|
import _filterInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/filter';
|
|
16
16
|
import _Object$keys from '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
17
17
|
import _mapInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/map';
|
|
18
18
|
import { sanitizeSvg } from '@commercetools-frontend/application-config';
|
|
19
|
-
import { c as createCustomApplication, u as updateCustomApplication, a as createCustomView, b as updateCustomView, d as fetchCustomApplication, e as fetchCustomView } from './graphql-requests-
|
|
19
|
+
import { c as createCustomApplication, u as updateCustomApplication, a as createCustomView, b as updateCustomView, d as fetchCustomApplication, e as fetchCustomView } from './graphql-requests-c491206a.esm.js';
|
|
20
20
|
|
|
21
21
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
22
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
22
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context21, _context22; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context21 = ownKeys(Object(t), !0)).call(_context21, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context22 = ownKeys(Object(t))).call(_context22, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
23
23
|
|
|
24
24
|
// Since not all terminal supports colors, to make things more consistent for testing purposes,
|
|
25
25
|
// during tests the color used is appended before the string instead of coloring it.
|
|
26
26
|
const isTest = process.env.NODE_ENV === 'test';
|
|
27
27
|
const red = str => {
|
|
28
|
-
if (isTest) return
|
|
28
|
+
if (isTest) return "<color-red>".concat(str, "</color-red>");
|
|
29
29
|
return chalk.red(str);
|
|
30
30
|
};
|
|
31
31
|
const green = str => {
|
|
32
|
-
if (isTest) return
|
|
32
|
+
if (isTest) return "<color-green>".concat(str, "</color-green>");
|
|
33
33
|
return chalk.green(str);
|
|
34
34
|
};
|
|
35
35
|
|
|
@@ -45,19 +45,21 @@ const getStringDiff = _ref => {
|
|
|
45
45
|
_ref$indentLevel = _ref.indentLevel,
|
|
46
46
|
indentLevel = _ref$indentLevel === void 0 ? 0 : _ref$indentLevel;
|
|
47
47
|
if (!previousValue && nextValue) {
|
|
48
|
-
|
|
48
|
+
var _context2, _context3;
|
|
49
|
+
return _concatInstanceProperty(_context2 = _concatInstanceProperty(_context3 = "".concat(indent(indentLevel))).call(_context3, label, " added: ")).call(_context2, green(nextValue));
|
|
49
50
|
}
|
|
50
51
|
if (previousValue && !nextValue) {
|
|
51
|
-
|
|
52
|
+
var _context4, _context5;
|
|
53
|
+
return _concatInstanceProperty(_context4 = _concatInstanceProperty(_context5 = "".concat(indent(indentLevel))).call(_context5, label, " removed: ")).call(_context4, red(previousValue));
|
|
52
54
|
}
|
|
53
55
|
if (previousValue && nextValue && previousValue !== nextValue) {
|
|
54
|
-
|
|
56
|
+
var _context6, _context7, _context8;
|
|
57
|
+
return _concatInstanceProperty(_context6 = _concatInstanceProperty(_context7 = _concatInstanceProperty(_context8 = "".concat(indent(indentLevel))).call(_context8, label, " changed: ")).call(_context7, red(previousValue), " => ")).call(_context6, green(nextValue));
|
|
55
58
|
}
|
|
56
59
|
return null;
|
|
57
60
|
};
|
|
58
61
|
// NOTE: this assumes that the array values are scalar values (not objects).
|
|
59
62
|
const getArrayDiff = _ref2 => {
|
|
60
|
-
var _context2, _context3;
|
|
61
63
|
let previousValue = _ref2.previousValue,
|
|
62
64
|
nextValue = _ref2.nextValue,
|
|
63
65
|
label = _ref2.label,
|
|
@@ -65,7 +67,7 @@ const getArrayDiff = _ref2 => {
|
|
|
65
67
|
indentLevel = _ref2$indentLevel === void 0 ? 0 : _ref2$indentLevel;
|
|
66
68
|
const oldArraySet = new _Set(previousValue);
|
|
67
69
|
const arrayDiff = [];
|
|
68
|
-
|
|
70
|
+
nextValue === null || nextValue === void 0 || _forEachInstanceProperty(nextValue).call(nextValue, item => {
|
|
69
71
|
if (oldArraySet.has(item)) {
|
|
70
72
|
oldArraySet.delete(item);
|
|
71
73
|
} else {
|
|
@@ -86,7 +88,7 @@ const getArrayDiff = _ref2 => {
|
|
|
86
88
|
return arrayDiff.join('\n');
|
|
87
89
|
};
|
|
88
90
|
const getPermissionsDiff = _ref3 => {
|
|
89
|
-
var
|
|
91
|
+
var _context1;
|
|
90
92
|
let previousValue = _ref3.previousValue,
|
|
91
93
|
nextValue = _ref3.nextValue;
|
|
92
94
|
const permissionDiff = ['permissions changed'];
|
|
@@ -99,10 +101,12 @@ const getPermissionsDiff = _ref3 => {
|
|
|
99
101
|
}, {});
|
|
100
102
|
const indentLevel = 1;
|
|
101
103
|
_forEachInstanceProperty(nextValue).call(nextValue, newPermission => {
|
|
102
|
-
|
|
104
|
+
var _context9;
|
|
105
|
+
const currentDiff = [_concatInstanceProperty(_context9 = "".concat(indent(indentLevel), "\"")).call(_context9, newPermission.name, "\" changed")];
|
|
103
106
|
// if the permission name is not in the old config, it means it is a new addition.
|
|
104
107
|
if (!mappedOldPermissions[newPermission.name]) {
|
|
105
|
-
|
|
108
|
+
var _context0;
|
|
109
|
+
permissionDiff.push(_concatInstanceProperty(_context0 = "".concat(indent(indentLevel), "\"")).call(_context0, green(newPermission.name), "\" was added"));
|
|
106
110
|
}
|
|
107
111
|
|
|
108
112
|
// if permission name is in the old config, now we check if there was a change
|
|
@@ -119,21 +123,22 @@ const getPermissionsDiff = _ref3 => {
|
|
|
119
123
|
});
|
|
120
124
|
|
|
121
125
|
// if there are old permissions left, it means they were deleted in the new Permissions.
|
|
122
|
-
_forEachInstanceProperty(
|
|
123
|
-
|
|
126
|
+
_forEachInstanceProperty(_context1 = _Object$keys(mappedOldPermissions)).call(_context1, oldPermissionName => {
|
|
127
|
+
var _context10;
|
|
128
|
+
permissionDiff.push(_concatInstanceProperty(_context10 = "".concat(indent(indentLevel), "\"")).call(_context10, red(oldPermissionName), "\" was removed"));
|
|
124
129
|
});
|
|
125
130
|
if (permissionDiff.length > 1) return permissionDiff.join('\n');
|
|
126
131
|
return null;
|
|
127
132
|
};
|
|
128
133
|
const getLabelAllLocalesDiff = _ref5 => {
|
|
129
|
-
var
|
|
134
|
+
var _context14;
|
|
130
135
|
let _ref5$previousValue = _ref5.previousValue,
|
|
131
136
|
previousValue = _ref5$previousValue === void 0 ? [] : _ref5$previousValue,
|
|
132
137
|
_ref5$nextValue = _ref5.nextValue,
|
|
133
138
|
nextValue = _ref5$nextValue === void 0 ? [] : _ref5$nextValue,
|
|
134
139
|
_ref5$indentLevel = _ref5.indentLevel,
|
|
135
140
|
indentLevel = _ref5$indentLevel === void 0 ? 0 : _ref5$indentLevel;
|
|
136
|
-
const labelAllLocalesDiff = [
|
|
141
|
+
const labelAllLocalesDiff = ["".concat(indent(indentLevel - 1), "labelAllLocales changed")];
|
|
137
142
|
const mappedOldLabelAllLocales = _reduceInstanceProperty(previousValue).call(previousValue, (previousLabelAllLocale, _ref6) => {
|
|
138
143
|
let locale = _ref6.locale,
|
|
139
144
|
value = _ref6.value;
|
|
@@ -145,7 +150,8 @@ const getLabelAllLocalesDiff = _ref5 => {
|
|
|
145
150
|
if (newLabelAllLocale.locale in mappedOldLabelAllLocales) {
|
|
146
151
|
const oldLocaleValue = mappedOldLabelAllLocales[newLabelAllLocale.locale];
|
|
147
152
|
if (oldLocaleValue !== newLabelAllLocale.value) {
|
|
148
|
-
|
|
153
|
+
var _context11, _context12, _context13;
|
|
154
|
+
labelAllLocalesDiff.push(_concatInstanceProperty(_context11 = _concatInstanceProperty(_context12 = _concatInstanceProperty(_context13 = "".concat(indent(indentLevel), "locale \"")).call(_context13, newLabelAllLocale.locale, "\" changed: ")).call(_context12, red(oldLocaleValue), " => ")).call(_context11, green(newLabelAllLocale.value)));
|
|
149
155
|
}
|
|
150
156
|
delete mappedOldLabelAllLocales[newLabelAllLocale.locale];
|
|
151
157
|
} else {
|
|
@@ -159,7 +165,7 @@ const getLabelAllLocalesDiff = _ref5 => {
|
|
|
159
165
|
}
|
|
160
166
|
}
|
|
161
167
|
});
|
|
162
|
-
_forEachInstanceProperty(
|
|
168
|
+
_forEachInstanceProperty(_context14 = _Object$keys(mappedOldLabelAllLocales)).call(_context14, key => {
|
|
163
169
|
const localeDiff = getStringDiff({
|
|
164
170
|
previousValue: key,
|
|
165
171
|
label: 'locale',
|
|
@@ -173,14 +179,14 @@ const getLabelAllLocalesDiff = _ref5 => {
|
|
|
173
179
|
return null;
|
|
174
180
|
};
|
|
175
181
|
const getTypeSettingsDiff = _ref7 => {
|
|
176
|
-
var
|
|
182
|
+
var _context15;
|
|
177
183
|
let previousValue = _ref7.previousValue,
|
|
178
184
|
nextValue = _ref7.nextValue;
|
|
179
185
|
const nonNullablePreviousValue = previousValue || {};
|
|
180
186
|
const nonNullableNextValue = nextValue || {};
|
|
181
187
|
const indentLevel = 1;
|
|
182
|
-
const typeSettingsDiff = [
|
|
183
|
-
_forEachInstanceProperty(
|
|
188
|
+
const typeSettingsDiff = ["".concat(indent(indentLevel - 1), "type settings changed")];
|
|
189
|
+
_forEachInstanceProperty(_context15 = _Object$keys(nonNullablePreviousValue)).call(_context15, key => {
|
|
184
190
|
const typeSettingDiff = getStringDiff({
|
|
185
191
|
previousValue: nonNullablePreviousValue[key],
|
|
186
192
|
nextValue: nonNullableNextValue[key],
|
|
@@ -230,7 +236,7 @@ const getMainMenuLinkDiff = _ref9 => {
|
|
|
230
236
|
indentLevel: 2
|
|
231
237
|
});
|
|
232
238
|
if (mainMenuLinkPermissionsDiff.length > 0) {
|
|
233
|
-
mainMenuLinkDiff.push(
|
|
239
|
+
mainMenuLinkDiff.push("".concat(indent(1), "permissions changed"));
|
|
234
240
|
mainMenuLinkDiff.push(mainMenuLinkPermissionsDiff);
|
|
235
241
|
}
|
|
236
242
|
const menuLabelsDiff = getLabelAllLocalesDiff({
|
|
@@ -246,7 +252,7 @@ const getMainMenuLinkDiff = _ref9 => {
|
|
|
246
252
|
return null;
|
|
247
253
|
};
|
|
248
254
|
const getSubmenuLinksDiff = _ref0 => {
|
|
249
|
-
var
|
|
255
|
+
var _context20;
|
|
250
256
|
let previousValue = _ref0.previousValue,
|
|
251
257
|
nextValue = _ref0.nextValue;
|
|
252
258
|
const submenuLinksDiff = ['submenuLink changed'];
|
|
@@ -257,16 +263,17 @@ const getSubmenuLinksDiff = _ref0 => {
|
|
|
257
263
|
const previousOrder = getOrder(previousValue);
|
|
258
264
|
const newOrder = getOrder(nextValue);
|
|
259
265
|
if (previousOrder !== newOrder) {
|
|
260
|
-
|
|
261
|
-
submenuLinksDiff.push(
|
|
262
|
-
submenuLinksDiff.push(
|
|
266
|
+
var _context16, _context17;
|
|
267
|
+
submenuLinksDiff.push("".concat(indent(1), "submenu order changed"));
|
|
268
|
+
submenuLinksDiff.push(_concatInstanceProperty(_context16 = "".concat(indent(2), "previous order: [")).call(_context16, previousOrder, "]"));
|
|
269
|
+
submenuLinksDiff.push(_concatInstanceProperty(_context17 = "".concat(indent(2), "new order: [")).call(_context17, newOrder, "]"));
|
|
263
270
|
}
|
|
264
271
|
_forEachInstanceProperty(nextValue).call(nextValue, newSubmenuLink => {
|
|
265
272
|
const oldSubMenuLink = mappedSubmenuLinks[newSubmenuLink.uriPath];
|
|
266
273
|
if (newSubmenuLink.uriPath in mappedSubmenuLinks) {
|
|
267
|
-
var
|
|
268
|
-
const submenuLinkDiff = [
|
|
269
|
-
_forEachInstanceProperty(
|
|
274
|
+
var _context18, _context19;
|
|
275
|
+
const submenuLinkDiff = [_concatInstanceProperty(_context18 = "".concat(indent(1), "menu link \"")).call(_context18, newSubmenuLink.uriPath, "\" changed")];
|
|
276
|
+
_forEachInstanceProperty(_context19 = _Object$keys(mappedSubmenuLinks[newSubmenuLink.uriPath])).call(_context19, key => {
|
|
270
277
|
switch (key) {
|
|
271
278
|
case 'defaultLabel':
|
|
272
279
|
{
|
|
@@ -290,7 +297,7 @@ const getSubmenuLinksDiff = _ref0 => {
|
|
|
290
297
|
indentLevel: 3
|
|
291
298
|
});
|
|
292
299
|
if (submenuLinkPermissionsDiff.length > 0) {
|
|
293
|
-
submenuLinkDiff.push(
|
|
300
|
+
submenuLinkDiff.push("".concat(indent(2), "permissions changed"));
|
|
294
301
|
submenuLinkDiff.push(submenuLinkPermissionsDiff);
|
|
295
302
|
}
|
|
296
303
|
break;
|
|
@@ -325,7 +332,7 @@ const getSubmenuLinksDiff = _ref0 => {
|
|
|
325
332
|
}
|
|
326
333
|
}
|
|
327
334
|
});
|
|
328
|
-
_forEachInstanceProperty(
|
|
335
|
+
_forEachInstanceProperty(_context20 = _Object$keys(mappedSubmenuLinks)).call(_context20, key => {
|
|
329
336
|
const linksDiff = getStringDiff({
|
|
330
337
|
previousValue: key,
|
|
331
338
|
label: 'menu link',
|
|
@@ -499,12 +506,13 @@ const getCustomViewConfigDiff = (oldConfig, newConfig) => {
|
|
|
499
506
|
};
|
|
500
507
|
|
|
501
508
|
const getMcUrlLink = _ref => {
|
|
509
|
+
var _context, _context2, _context3;
|
|
502
510
|
let mcApiUrl = _ref.mcApiUrl,
|
|
503
511
|
organizationId = _ref.organizationId,
|
|
504
512
|
customEntityId = _ref.customEntityId,
|
|
505
513
|
isCustomView = _ref.isCustomView;
|
|
506
514
|
const mcUrl = mcApiUrl.replace('mc-api', 'mc');
|
|
507
|
-
const customEntityLink =
|
|
515
|
+
const customEntityLink = _concatInstanceProperty(_context = _concatInstanceProperty(_context2 = _concatInstanceProperty(_context3 = "".concat(mcUrl, "/account/organizations/")).call(_context3, organizationId, "/custom-")).call(_context2, isCustomView ? 'views' : 'applications', "/owned/")).call(_context, customEntityId);
|
|
508
516
|
return customEntityLink;
|
|
509
517
|
};
|
|
510
518
|
const isCustomViewData = data => data.entryPointUriPath === undefined;
|
|
@@ -515,7 +523,7 @@ async function performCreateCustomApplication(_ref2) {
|
|
|
515
523
|
localCustomEntityData = _ref2.localCustomEntityData,
|
|
516
524
|
applicationIdentifier = _ref2.applicationIdentifier,
|
|
517
525
|
dryRun = _ref2.dryRun;
|
|
518
|
-
console.log(
|
|
526
|
+
console.log("Creating Custom Application in organization \"".concat(chalk.green(organizationName), "\"..."));
|
|
519
527
|
const data = omit(localCustomEntityData, ['id']);
|
|
520
528
|
if (dryRun) {
|
|
521
529
|
console.log();
|
|
@@ -538,9 +546,9 @@ async function performCreateCustomApplication(_ref2) {
|
|
|
538
546
|
customEntityId: createdCustomApplication.id
|
|
539
547
|
});
|
|
540
548
|
console.log(chalk.green('Custom Application created successfully.'));
|
|
541
|
-
console.log(
|
|
542
|
-
console.log(
|
|
543
|
-
console.log(
|
|
549
|
+
console.log("ID: ".concat(chalk.cyan(createdCustomApplication.id)));
|
|
550
|
+
console.log("Please update the \"env.production.applicationId\" field in your local Custom Application config file with the ID above.");
|
|
551
|
+
console.log("URL: ".concat(chalk.gray(customAppLink)));
|
|
544
552
|
return createdCustomApplication.id;
|
|
545
553
|
}
|
|
546
554
|
async function performUpdateCustomApplication(_ref3) {
|
|
@@ -553,7 +561,7 @@ async function performUpdateCustomApplication(_ref3) {
|
|
|
553
561
|
const data = omit(localCustomEntityData, ['id']);
|
|
554
562
|
if (dryRun) {
|
|
555
563
|
console.log();
|
|
556
|
-
console.log(
|
|
564
|
+
console.log("Dry run - would update Custom Application \"".concat(chalk.green(data.entryPointUriPath), "\" with:"));
|
|
557
565
|
console.log(chalk.gray(_JSON$stringify(data, null, 2)));
|
|
558
566
|
return;
|
|
559
567
|
}
|
|
@@ -571,7 +579,7 @@ async function performUpdateCustomApplication(_ref3) {
|
|
|
571
579
|
customEntityId: applicationId
|
|
572
580
|
});
|
|
573
581
|
console.log(chalk.green('Custom Application updated successfully.'));
|
|
574
|
-
console.log(
|
|
582
|
+
console.log("URL: ".concat(chalk.gray(customAppLink)));
|
|
575
583
|
}
|
|
576
584
|
async function performCreateCustomView(_ref4) {
|
|
577
585
|
let mcApiUrl = _ref4.mcApiUrl,
|
|
@@ -580,7 +588,7 @@ async function performCreateCustomView(_ref4) {
|
|
|
580
588
|
localCustomEntityData = _ref4.localCustomEntityData,
|
|
581
589
|
applicationIdentifier = _ref4.applicationIdentifier,
|
|
582
590
|
dryRun = _ref4.dryRun;
|
|
583
|
-
console.log(
|
|
591
|
+
console.log("Creating Custom View in organization \"".concat(chalk.green(organizationName), "\"..."));
|
|
584
592
|
const data = omit(localCustomEntityData, ['id']);
|
|
585
593
|
if (dryRun) {
|
|
586
594
|
console.log();
|
|
@@ -604,9 +612,9 @@ async function performCreateCustomView(_ref4) {
|
|
|
604
612
|
isCustomView: true
|
|
605
613
|
});
|
|
606
614
|
console.log(chalk.green('Custom View created successfully.'));
|
|
607
|
-
console.log(
|
|
608
|
-
console.log(
|
|
609
|
-
console.log(
|
|
615
|
+
console.log("ID: ".concat(chalk.cyan(createdCustomView.id)));
|
|
616
|
+
console.log("Please update the \"env.production.customViewId\" field in your local Custom View config file with the ID above.");
|
|
617
|
+
console.log("URL: ".concat(chalk.gray(customViewLink)));
|
|
610
618
|
return createdCustomView.id;
|
|
611
619
|
}
|
|
612
620
|
async function performUpdateCustomView(_ref5) {
|
|
@@ -619,7 +627,7 @@ async function performUpdateCustomView(_ref5) {
|
|
|
619
627
|
const data = omit(localCustomEntityData, ['id']);
|
|
620
628
|
if (dryRun) {
|
|
621
629
|
console.log();
|
|
622
|
-
console.log(
|
|
630
|
+
console.log("Dry run - would update Custom View \"".concat(chalk.green(data.defaultLabel), "\" with:"));
|
|
623
631
|
console.log(chalk.gray(_JSON$stringify(data, null, 2)));
|
|
624
632
|
return;
|
|
625
633
|
}
|
|
@@ -638,7 +646,7 @@ async function performUpdateCustomView(_ref5) {
|
|
|
638
646
|
isCustomView: true
|
|
639
647
|
});
|
|
640
648
|
console.log(chalk.green('Custom View updated successfully.'));
|
|
641
|
-
console.log(
|
|
649
|
+
console.log("URL: ".concat(chalk.gray(customViewLink)));
|
|
642
650
|
}
|
|
643
651
|
async function checkCustomApplicationStatus(_ref6) {
|
|
644
652
|
let mcApiUrl = _ref6.mcApiUrl,
|
|
@@ -670,6 +678,7 @@ async function checkCustomApplicationStatus(_ref6) {
|
|
|
670
678
|
};
|
|
671
679
|
}
|
|
672
680
|
async function checkCustomViewStatus(_ref7) {
|
|
681
|
+
var _fetchedCustomView$cu, _fetchedCustomView$cu2;
|
|
673
682
|
let mcApiUrl = _ref7.mcApiUrl,
|
|
674
683
|
customViewId = _ref7.customViewId,
|
|
675
684
|
applicationIdentifier = _ref7.applicationIdentifier,
|
|
@@ -688,13 +697,13 @@ async function checkCustomViewStatus(_ref7) {
|
|
|
688
697
|
const customViewLink = getMcUrlLink({
|
|
689
698
|
mcApiUrl,
|
|
690
699
|
organizationId: fetchedCustomView.organizationId,
|
|
691
|
-
customEntityId: fetchedCustomView
|
|
700
|
+
customEntityId: (fetchedCustomView === null || fetchedCustomView === void 0 || (_fetchedCustomView$cu = fetchedCustomView.customView) === null || _fetchedCustomView$cu === void 0 ? void 0 : _fetchedCustomView$cu.id) || '',
|
|
692
701
|
isCustomView: true
|
|
693
702
|
});
|
|
694
703
|
return {
|
|
695
704
|
exists: true,
|
|
696
705
|
organizationId: fetchedCustomView.organizationId,
|
|
697
|
-
customViewId: fetchedCustomView
|
|
706
|
+
customViewId: (fetchedCustomView === null || fetchedCustomView === void 0 || (_fetchedCustomView$cu2 = fetchedCustomView.customView) === null || _fetchedCustomView$cu2 === void 0 ? void 0 : _fetchedCustomView$cu2.id) || '',
|
|
698
707
|
configDiff,
|
|
699
708
|
link: customViewLink
|
|
700
709
|
};
|
package/dist/{create-postcss-config-3a80caef.cjs.dev.js → create-postcss-config-13cb1cb8.cjs.dev.js}
RENAMED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
4
4
|
var path = require('path');
|
|
5
|
-
var _package = require('./package-
|
|
5
|
+
var _package = require('./package-98adb0d5.cjs.dev.js');
|
|
6
6
|
|
|
7
7
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
4
4
|
var path = require('path');
|
|
5
|
-
var _package = require('./package-
|
|
5
|
+
var _package = require('./package-90af7dfe.cjs.prod.js');
|
|
6
6
|
|
|
7
7
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
8
8
|
|
package/dist/{create-postcss-config-a9f7c8a8.esm.js → create-postcss-config-390e8a52.esm.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _slicedToArray from '@babel/runtime-corejs3/helpers/esm/slicedToArray';
|
|
2
2
|
import path from 'path';
|
|
3
|
-
import { p as pkgJson } from './package-
|
|
3
|
+
import { p as pkgJson } from './package-15124b28.esm.js';
|
|
4
4
|
|
|
5
5
|
// This function aims to return the same result as `require.resolve`.
|
|
6
6
|
// However, resolving a path to a `.css` file does not return the real
|
|
@@ -19,16 +19,15 @@ var ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
|
|
|
19
19
|
var HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
20
20
|
var MomentLocalesPlugin = require('moment-locales-webpack-plugin');
|
|
21
21
|
var webpack = require('webpack');
|
|
22
|
-
var
|
|
23
|
-
var tryLoadNimbusPlugins = require('./try-load-nimbus-plugins-a713d7d3.cjs.prod.js');
|
|
22
|
+
var tryLoadNimbusPlugins = require('./try-load-nimbus-plugins-59c3a594.cjs.prod.js');
|
|
24
23
|
var _classCallCheck = require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
25
24
|
var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
|
|
26
25
|
var _Object$assign = require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
27
26
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
28
27
|
var mcHtmlTemplate = require('@commercetools-frontend/mc-html-template');
|
|
29
|
-
var createPostcssConfig = require('./create-postcss-config-
|
|
30
|
-
var optimizations = require('./optimizations-
|
|
31
|
-
var paths = require('./paths-
|
|
28
|
+
var createPostcssConfig = require('./create-postcss-config-1eeb3d9d.cjs.prod.js');
|
|
29
|
+
var optimizations = require('./optimizations-09a6638c.cjs.prod.js');
|
|
30
|
+
var paths = require('./paths-af1a725a.cjs.prod.js');
|
|
32
31
|
var vendorsToTranspile = require('./vendors-to-transpile-04a49d40.cjs.prod.js');
|
|
33
32
|
|
|
34
33
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
@@ -51,7 +50,6 @@ var ReactRefreshWebpackPlugin__default = /*#__PURE__*/_interopDefault(ReactRefre
|
|
|
51
50
|
var HtmlWebpackPlugin__default = /*#__PURE__*/_interopDefault(HtmlWebpackPlugin);
|
|
52
51
|
var MomentLocalesPlugin__default = /*#__PURE__*/_interopDefault(MomentLocalesPlugin);
|
|
53
52
|
var webpack__default = /*#__PURE__*/_interopDefault(webpack);
|
|
54
|
-
var WebpackBar__default = /*#__PURE__*/_interopDefault(WebpackBar);
|
|
55
53
|
var _Object$assign__default = /*#__PURE__*/_interopDefault(_Object$assign);
|
|
56
54
|
|
|
57
55
|
let LocalHtmlWebpackPlugin = /*#__PURE__*/function () {
|
|
@@ -152,7 +150,7 @@ function createWebpackConfigForDevelopment() {
|
|
|
152
150
|
// https://github.com/facebook/create-react-app/issues/290
|
|
153
151
|
// `web` extension prefixes have been added for better support
|
|
154
152
|
// for React Native Web.
|
|
155
|
-
extensions: _mapInstanceProperty__default["default"](_context = ['js', 'mjs', 'cjs', 'ts', 'tsx', 'json', 'jsx']).call(_context, ext =>
|
|
153
|
+
extensions: _mapInstanceProperty__default["default"](_context = ['js', 'mjs', 'cjs', 'ts', 'tsx', 'json', 'jsx']).call(_context, ext => ".".concat(ext)),
|
|
156
154
|
// NOTE: this is meant to be a temporary list of fallback/polyfills for certain
|
|
157
155
|
// nodejs modules. With Webpack <5 these polyfills were included by default in Webpack,
|
|
158
156
|
// however now it's not the case anymore.
|
|
@@ -204,7 +202,14 @@ function createWebpackConfigForDevelopment() {
|
|
|
204
202
|
},
|
|
205
203
|
plugins: _filterInstanceProperty__default["default"](_context3 = [tryLoadNimbusPlugins.loadNimbusWebpackPlugin({
|
|
206
204
|
cwd: paths.paths.appRoot
|
|
207
|
-
}),
|
|
205
|
+
}),
|
|
206
|
+
// Colored progress bar in interactive terminals, plain percentage
|
|
207
|
+
// lines otherwise (e.g. CI logs). Replaces `webpackbar`, which is
|
|
208
|
+
// unmaintained and broke on webpack's newer, deferred ProgressPlugin
|
|
209
|
+
// option validation.
|
|
210
|
+
new webpack__default["default"].ProgressPlugin({
|
|
211
|
+
progressBar: 'auto'
|
|
212
|
+
}),
|
|
208
213
|
// Allows to "assign" custom options to the `webpack` object.
|
|
209
214
|
// At the moment, this is used to share some props with `postcss.config`.
|
|
210
215
|
new webpack__default["default"].LoaderOptionsPlugin({
|
|
@@ -308,9 +313,9 @@ function createWebpackConfigForDevelopment() {
|
|
|
308
313
|
name: 'prefixIds',
|
|
309
314
|
params: {
|
|
310
315
|
delim: '',
|
|
311
|
-
prefix: (_, info) =>
|
|
316
|
+
prefix: (_, info) => "svg".concat(crypto__default["default"].createHash('shake256', {
|
|
312
317
|
outputLength: 6
|
|
313
|
-
}).update(info.path || '').digest('hex')
|
|
318
|
+
}).update(info.path || '').digest('hex'))
|
|
314
319
|
}
|
|
315
320
|
}]
|
|
316
321
|
}
|
|
@@ -19,16 +19,15 @@ var ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
|
|
|
19
19
|
var HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
20
20
|
var MomentLocalesPlugin = require('moment-locales-webpack-plugin');
|
|
21
21
|
var webpack = require('webpack');
|
|
22
|
-
var
|
|
23
|
-
var tryLoadNimbusPlugins = require('./try-load-nimbus-plugins-d502a5fe.cjs.dev.js');
|
|
22
|
+
var tryLoadNimbusPlugins = require('./try-load-nimbus-plugins-06ce5d83.cjs.dev.js');
|
|
24
23
|
var _classCallCheck = require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
25
24
|
var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
|
|
26
25
|
var _Object$assign = require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
27
26
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
28
27
|
var mcHtmlTemplate = require('@commercetools-frontend/mc-html-template');
|
|
29
|
-
var createPostcssConfig = require('./create-postcss-config-
|
|
30
|
-
var optimizations = require('./optimizations-
|
|
31
|
-
var paths = require('./paths-
|
|
28
|
+
var createPostcssConfig = require('./create-postcss-config-13cb1cb8.cjs.dev.js');
|
|
29
|
+
var optimizations = require('./optimizations-640ffcac.cjs.dev.js');
|
|
30
|
+
var paths = require('./paths-ec3e3a7d.cjs.dev.js');
|
|
32
31
|
var vendorsToTranspile = require('./vendors-to-transpile-6ab4ea06.cjs.dev.js');
|
|
33
32
|
|
|
34
33
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
@@ -51,7 +50,6 @@ var ReactRefreshWebpackPlugin__default = /*#__PURE__*/_interopDefault(ReactRefre
|
|
|
51
50
|
var HtmlWebpackPlugin__default = /*#__PURE__*/_interopDefault(HtmlWebpackPlugin);
|
|
52
51
|
var MomentLocalesPlugin__default = /*#__PURE__*/_interopDefault(MomentLocalesPlugin);
|
|
53
52
|
var webpack__default = /*#__PURE__*/_interopDefault(webpack);
|
|
54
|
-
var WebpackBar__default = /*#__PURE__*/_interopDefault(WebpackBar);
|
|
55
53
|
var _Object$assign__default = /*#__PURE__*/_interopDefault(_Object$assign);
|
|
56
54
|
|
|
57
55
|
let LocalHtmlWebpackPlugin = /*#__PURE__*/function () {
|
|
@@ -152,7 +150,7 @@ function createWebpackConfigForDevelopment() {
|
|
|
152
150
|
// https://github.com/facebook/create-react-app/issues/290
|
|
153
151
|
// `web` extension prefixes have been added for better support
|
|
154
152
|
// for React Native Web.
|
|
155
|
-
extensions: _mapInstanceProperty__default["default"](_context = ['js', 'mjs', 'cjs', 'ts', 'tsx', 'json', 'jsx']).call(_context, ext =>
|
|
153
|
+
extensions: _mapInstanceProperty__default["default"](_context = ['js', 'mjs', 'cjs', 'ts', 'tsx', 'json', 'jsx']).call(_context, ext => ".".concat(ext)),
|
|
156
154
|
// NOTE: this is meant to be a temporary list of fallback/polyfills for certain
|
|
157
155
|
// nodejs modules. With Webpack <5 these polyfills were included by default in Webpack,
|
|
158
156
|
// however now it's not the case anymore.
|
|
@@ -204,7 +202,14 @@ function createWebpackConfigForDevelopment() {
|
|
|
204
202
|
},
|
|
205
203
|
plugins: _filterInstanceProperty__default["default"](_context3 = [tryLoadNimbusPlugins.loadNimbusWebpackPlugin({
|
|
206
204
|
cwd: paths.paths.appRoot
|
|
207
|
-
}),
|
|
205
|
+
}),
|
|
206
|
+
// Colored progress bar in interactive terminals, plain percentage
|
|
207
|
+
// lines otherwise (e.g. CI logs). Replaces `webpackbar`, which is
|
|
208
|
+
// unmaintained and broke on webpack's newer, deferred ProgressPlugin
|
|
209
|
+
// option validation.
|
|
210
|
+
new webpack__default["default"].ProgressPlugin({
|
|
211
|
+
progressBar: 'auto'
|
|
212
|
+
}),
|
|
208
213
|
// Allows to "assign" custom options to the `webpack` object.
|
|
209
214
|
// At the moment, this is used to share some props with `postcss.config`.
|
|
210
215
|
new webpack__default["default"].LoaderOptionsPlugin({
|
|
@@ -308,9 +313,9 @@ function createWebpackConfigForDevelopment() {
|
|
|
308
313
|
name: 'prefixIds',
|
|
309
314
|
params: {
|
|
310
315
|
delim: '',
|
|
311
|
-
prefix: (_, info) =>
|
|
316
|
+
prefix: (_, info) => "svg".concat(crypto__default["default"].createHash('shake256', {
|
|
312
317
|
outputLength: 6
|
|
313
|
-
}).update(info.path || '').digest('hex')
|
|
318
|
+
}).update(info.path || '').digest('hex'))
|
|
314
319
|
}
|
|
315
320
|
}]
|
|
316
321
|
}
|
|
@@ -17,16 +17,15 @@ import ReactRefreshWebpackPlugin from '@pmmmwh/react-refresh-webpack-plugin';
|
|
|
17
17
|
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
|
18
18
|
import MomentLocalesPlugin from 'moment-locales-webpack-plugin';
|
|
19
19
|
import webpack from 'webpack';
|
|
20
|
-
import
|
|
21
|
-
import { l as loadNimbusWebpackPlugin } from './try-load-nimbus-plugins-2f528d8f.esm.js';
|
|
20
|
+
import { l as loadNimbusWebpackPlugin } from './try-load-nimbus-plugins-526dccbd.esm.js';
|
|
22
21
|
import _classCallCheck from '@babel/runtime-corejs3/helpers/esm/classCallCheck';
|
|
23
22
|
import _createClass from '@babel/runtime-corejs3/helpers/esm/createClass';
|
|
24
23
|
import _Object$assign from '@babel/runtime-corejs3/core-js-stable/object/assign';
|
|
25
24
|
import { processConfig } from '@commercetools-frontend/application-config';
|
|
26
25
|
import { replaceHtmlPlaceholders } from '@commercetools-frontend/mc-html-template';
|
|
27
|
-
import { c as createPostcssConfig } from './create-postcss-config-
|
|
28
|
-
import { g as getWepbackCacheGroups, h as hasJsxRuntime } from './optimizations-
|
|
29
|
-
import { p as paths } from './paths-
|
|
26
|
+
import { c as createPostcssConfig } from './create-postcss-config-390e8a52.esm.js';
|
|
27
|
+
import { g as getWepbackCacheGroups, h as hasJsxRuntime } from './optimizations-1b3f8157.esm.js';
|
|
28
|
+
import { p as paths } from './paths-7bf7e88e.esm.js';
|
|
30
29
|
import { v as vendorsToTranspile } from './vendors-to-transpile-7dc84a72.esm.js';
|
|
31
30
|
|
|
32
31
|
let LocalHtmlWebpackPlugin = /*#__PURE__*/function () {
|
|
@@ -127,7 +126,7 @@ function createWebpackConfigForDevelopment() {
|
|
|
127
126
|
// https://github.com/facebook/create-react-app/issues/290
|
|
128
127
|
// `web` extension prefixes have been added for better support
|
|
129
128
|
// for React Native Web.
|
|
130
|
-
extensions: _mapInstanceProperty(_context = ['js', 'mjs', 'cjs', 'ts', 'tsx', 'json', 'jsx']).call(_context, ext =>
|
|
129
|
+
extensions: _mapInstanceProperty(_context = ['js', 'mjs', 'cjs', 'ts', 'tsx', 'json', 'jsx']).call(_context, ext => ".".concat(ext)),
|
|
131
130
|
// NOTE: this is meant to be a temporary list of fallback/polyfills for certain
|
|
132
131
|
// nodejs modules. With Webpack <5 these polyfills were included by default in Webpack,
|
|
133
132
|
// however now it's not the case anymore.
|
|
@@ -179,7 +178,14 @@ function createWebpackConfigForDevelopment() {
|
|
|
179
178
|
},
|
|
180
179
|
plugins: _filterInstanceProperty(_context3 = [loadNimbusWebpackPlugin({
|
|
181
180
|
cwd: paths.appRoot
|
|
182
|
-
}),
|
|
181
|
+
}),
|
|
182
|
+
// Colored progress bar in interactive terminals, plain percentage
|
|
183
|
+
// lines otherwise (e.g. CI logs). Replaces `webpackbar`, which is
|
|
184
|
+
// unmaintained and broke on webpack's newer, deferred ProgressPlugin
|
|
185
|
+
// option validation.
|
|
186
|
+
new webpack.ProgressPlugin({
|
|
187
|
+
progressBar: 'auto'
|
|
188
|
+
}),
|
|
183
189
|
// Allows to "assign" custom options to the `webpack` object.
|
|
184
190
|
// At the moment, this is used to share some props with `postcss.config`.
|
|
185
191
|
new webpack.LoaderOptionsPlugin({
|
|
@@ -283,9 +289,9 @@ function createWebpackConfigForDevelopment() {
|
|
|
283
289
|
name: 'prefixIds',
|
|
284
290
|
params: {
|
|
285
291
|
delim: '',
|
|
286
|
-
prefix: (_, info) =>
|
|
292
|
+
prefix: (_, info) => "svg".concat(crypto.createHash('shake256', {
|
|
287
293
|
outputLength: 6
|
|
288
|
-
}).update(info.path || '').digest('hex')
|
|
294
|
+
}).update(info.path || '').digest('hex'))
|
|
289
295
|
}
|
|
290
296
|
}]
|
|
291
297
|
}
|
|
@@ -22,7 +22,7 @@ var MomentLocalesPlugin = require('moment-locales-webpack-plugin');
|
|
|
22
22
|
var TerserPlugin = require('terser-webpack-plugin');
|
|
23
23
|
var webpack = require('webpack');
|
|
24
24
|
var webpackBundleAnalyzer = require('webpack-bundle-analyzer');
|
|
25
|
-
var tryLoadNimbusPlugins = require('./try-load-nimbus-plugins-
|
|
25
|
+
var tryLoadNimbusPlugins = require('./try-load-nimbus-plugins-06ce5d83.cjs.dev.js');
|
|
26
26
|
var _classCallCheck = require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
27
27
|
var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
|
|
28
28
|
var _bindInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/bind');
|
|
@@ -30,9 +30,9 @@ var _reduceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/ins
|
|
|
30
30
|
var _Object$assign = require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
31
31
|
var fs = require('fs');
|
|
32
32
|
var path = require('path');
|
|
33
|
-
var createPostcssConfig = require('./create-postcss-config-
|
|
34
|
-
var optimizations = require('./optimizations-
|
|
35
|
-
var paths = require('./paths-
|
|
33
|
+
var createPostcssConfig = require('./create-postcss-config-13cb1cb8.cjs.dev.js');
|
|
34
|
+
var optimizations = require('./optimizations-640ffcac.cjs.dev.js');
|
|
35
|
+
var paths = require('./paths-ec3e3a7d.cjs.dev.js');
|
|
36
36
|
var vendorsToTranspile = require('./vendors-to-transpile-6ab4ea06.cjs.dev.js');
|
|
37
37
|
|
|
38
38
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
@@ -109,7 +109,7 @@ let FinalStatsWriterPlugin = /*#__PURE__*/function () {
|
|
|
109
109
|
fs__default["default"].writeFileSync(path__default["default"].join(this.config.outputPath, 'stats.json'), _JSON$stringify__default["default"](finalStats, null, 2));
|
|
110
110
|
} catch (error) {
|
|
111
111
|
// eslint-disable-next-line no-console
|
|
112
|
-
console.warn(
|
|
112
|
+
console.warn("[FinalStatsWriterPlugin] The dist folder could not be found at ".concat(this.config.outputPath, ". Check the console for errors during the webpack compilation."));
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
}]);
|
|
@@ -230,7 +230,7 @@ function createWebpackConfigForProduction() {
|
|
|
230
230
|
// https://github.com/facebook/create-react-app/issues/290
|
|
231
231
|
// `web` extension prefixes have been added for better support
|
|
232
232
|
// for React Native Web.
|
|
233
|
-
extensions: _mapInstanceProperty__default["default"](_context = ['js', 'mjs', 'cjs', 'ts', 'tsx', 'json', 'jsx']).call(_context, ext =>
|
|
233
|
+
extensions: _mapInstanceProperty__default["default"](_context = ['js', 'mjs', 'cjs', 'ts', 'tsx', 'json', 'jsx']).call(_context, ext => ".".concat(ext)),
|
|
234
234
|
// NOTE: this is meant to be a temporary list of fallback/polyfills for certain
|
|
235
235
|
// nodejs modules. With Webpack <5 these polyfills were included by default in Webpack,
|
|
236
236
|
// however now it's not the case anymore.
|
|
@@ -362,9 +362,9 @@ function createWebpackConfigForProduction() {
|
|
|
362
362
|
name: 'prefixIds',
|
|
363
363
|
params: {
|
|
364
364
|
delim: '',
|
|
365
|
-
prefix: (_, info) =>
|
|
365
|
+
prefix: (_, info) => "svg".concat(crypto__default["default"].createHash('shake256', {
|
|
366
366
|
outputLength: 6
|
|
367
|
-
}).update(info.path || '').digest('hex')
|
|
367
|
+
}).update(info.path || '').digest('hex'))
|
|
368
368
|
}
|
|
369
369
|
}]
|
|
370
370
|
}
|