@commercetools-frontend/mc-scripts 27.5.3 → 27.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.dev.js +39 -19
- package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.prod.js +39 -19
- package/cli/dist/commercetools-frontend-mc-scripts-cli.esm.js +11 -11
- package/dist/{build-BP3m-wjz.cjs.prod.js → build-74ba5097.cjs.prod.js} +23 -23
- package/dist/{build-Dq8dqtsd.cjs.dev.js → build-7c291b9e.cjs.dev.js} +23 -23
- package/dist/{build-GEMI3W9m.esm.js → build-bfc4d2be.esm.js} +7 -7
- package/dist/{build-vite-D67xSRU1.cjs.prod.js → build-vite-73361390.cjs.prod.js} +32 -32
- package/dist/{build-vite-Dxi3rfHf.cjs.dev.js → build-vite-8453739c.cjs.dev.js} +32 -32
- package/dist/{build-vite-CO8mi4hd.esm.js → build-vite-a9c1c374.esm.js} +5 -5
- package/dist/commercetools-frontend-mc-scripts.cjs.dev.js +4 -2
- package/dist/commercetools-frontend-mc-scripts.cjs.prod.js +4 -2
- package/dist/commercetools-frontend-mc-scripts.esm.js +2 -2
- package/dist/{compile-html-BVvy3IQD.esm.js → compile-html-025cd493.esm.js} +2 -2
- package/dist/{compile-html-Ds1YojsY.cjs.dev.js → compile-html-50fd05ec.cjs.prod.js} +8 -8
- package/dist/{compile-html-DZlUpFXg.cjs.prod.js → compile-html-f4ac88cc.cjs.dev.js} +8 -8
- package/dist/{config-sync-D6xLjo9S.cjs.prod.js → config-sync-09f66547.cjs.prod.js} +22 -22
- package/dist/{config-sync-Bu7U5gn5.esm.js → config-sync-15eb8589.esm.js} +5 -5
- package/dist/{config-sync-ci-SDsF-Onw.cjs.dev.js → config-sync-ci-61250b40.cjs.dev.js} +21 -21
- package/dist/{config-sync-ci-CXgQcemF.cjs.prod.js → config-sync-ci-72d17127.cjs.prod.js} +21 -21
- package/dist/{config-sync-ci-Dq7bAqeu.esm.js → config-sync-ci-906ef640.esm.js} +5 -5
- package/dist/{config-sync-Cd0sSSrd.cjs.dev.js → config-sync-fa80ea02.cjs.dev.js} +22 -22
- package/dist/{config-sync-helpers-9kvPwuoy.cjs.prod.js → config-sync-helpers-9e749cc1.cjs.prod.js} +47 -47
- package/dist/{config-sync-helpers-DUK45F_R.cjs.dev.js → config-sync-helpers-f35fab2b.cjs.dev.js} +47 -47
- package/dist/{config-sync-helpers-BLXJp1-D.esm.js → config-sync-helpers-f3861cb3.esm.js} +3 -3
- package/dist/{create-postcss-config-CN9_8Usa.esm.js → create-postcss-config-9f7fc8fe.esm.js} +1 -1
- package/dist/{create-postcss-config-DAShdAyB.cjs.prod.js → create-postcss-config-aa65bd02.cjs.prod.js} +3 -3
- package/dist/{create-postcss-config-NN2FAhvH.cjs.dev.js → create-postcss-config-bda2f46f.cjs.dev.js} +3 -3
- package/dist/{create-webpack-config-for-development-hxSNyq2_.cjs.dev.js → create-webpack-config-for-development-37fd15dd.cjs.dev.js} +25 -25
- package/dist/{create-webpack-config-for-development-CxGehl7I.cjs.prod.js → create-webpack-config-for-development-7f9ac343.cjs.prod.js} +25 -25
- package/dist/{create-webpack-config-for-development-5HpRHV9G.esm.js → create-webpack-config-for-development-cfc8c0d8.esm.js} +5 -5
- package/dist/{create-webpack-config-for-production-BY0UNoNz.esm.js → create-webpack-config-for-production-0ed3db08.esm.js} +5 -5
- package/dist/{create-webpack-config-for-production-CW0DlZBz.cjs.prod.js → create-webpack-config-for-production-c6f5fc5e.cjs.prod.js} +32 -32
- package/dist/{create-webpack-config-for-production-Edp9dzmw.cjs.dev.js → create-webpack-config-for-production-f0692e4f.cjs.dev.js} +32 -32
- package/dist/{credentials-storage-B79bb0Ns.esm.js → credentials-storage-67deadc3.esm.js} +1 -1
- package/dist/{credentials-storage-C3TlK0a8.cjs.prod.js → credentials-storage-ea1c16dc.cjs.prod.js} +10 -10
- package/dist/{credentials-storage-B0tDCH7i.cjs.dev.js → credentials-storage-fd195144.cjs.dev.js} +10 -10
- package/dist/{deployment-previews-set-nvkAPwYw.cjs.prod.js → deployment-previews-set-77a06501.cjs.prod.js} +22 -22
- package/dist/{deployment-previews-set-C2OPIfy-.esm.js → deployment-previews-set-8e17e07a.esm.js} +4 -4
- package/dist/{deployment-previews-set-BuHX8wKo.cjs.dev.js → deployment-previews-set-bfc5a58a.cjs.dev.js} +22 -22
- package/dist/{does-file-exist-DrcZIPe6.cjs.dev.js → does-file-exist-be53305d.cjs.prod.js} +2 -2
- package/dist/{does-file-exist-DrcZIPe6.cjs.prod.js → does-file-exist-eb86baca.cjs.dev.js} +2 -2
- package/dist/{graphql-requests-DCLX_2y0.esm.js → graphql-requests-1afa51b6.esm.js} +4 -4
- package/dist/{graphql-requests-D0rtMo7K.cjs.prod.js → graphql-requests-65332887.cjs.prod.js} +9 -9
- package/dist/{graphql-requests-BeUd4g3v.cjs.dev.js → graphql-requests-8c5aeb2f.cjs.dev.js} +9 -9
- package/dist/{i18n-message-complilation-CdVhuyWk.cjs.dev.js → i18n-message-complilation-7311cb29.cjs.dev.js} +3 -3
- package/dist/{i18n-message-complilation-CdVhuyWk.cjs.prod.js → i18n-message-complilation-7762da61.cjs.prod.js} +3 -3
- package/dist/{login-DKzmRa46.cjs.dev.js → login-3dbe724f.cjs.prod.js} +60 -42
- package/dist/{login-BagHOLO1.cjs.prod.js → login-6bc2696b.cjs.dev.js} +60 -42
- package/dist/{login-DZVfG3Jq.esm.js → login-dbab5c47.esm.js} +3 -3
- package/dist/{optimizations-Cjrg77Gu.esm.js → optimizations-54382f7b.esm.js} +1 -1
- package/dist/{optimizations-CEaq4axa.cjs.dev.js → optimizations-56be74d6.cjs.dev.js} +8 -8
- package/dist/{optimizations-CEaq4axa.cjs.prod.js → optimizations-da5a0cfa.cjs.prod.js} +8 -8
- package/dist/package-7c551972.esm.js +165 -0
- package/dist/package-7fcd7258.cjs.prod.js +167 -0
- package/dist/package-8cf0508d.cjs.dev.js +167 -0
- package/dist/{paths-Cg5Vq6RE.esm.js → paths-39f22b8b.esm.js} +1 -1
- package/dist/{paths-DtvtCG0U.cjs.prod.js → paths-7768b440.cjs.prod.js} +5 -5
- package/dist/{paths-B0WM5jb9.cjs.dev.js → paths-b76fc753.cjs.dev.js} +5 -5
- package/dist/{serve-fXDv4-Pm.esm.js → serve-22475fec.esm.js} +2 -2
- package/dist/{serve-BxRJOSeR.cjs.dev.js → serve-3837602d.cjs.prod.js} +13 -13
- package/dist/{serve-BwNRk6vi.cjs.prod.js → serve-b1c12985.cjs.dev.js} +13 -13
- package/dist/{start-suUcoYml.esm.js → start-5985f6fa.esm.js} +7 -7
- package/dist/{start-OjGog63p.cjs.dev.js → start-633a16e4.cjs.dev.js} +17 -17
- package/dist/{start-CQgQhNhU.cjs.prod.js → start-e7fdfc20.cjs.prod.js} +17 -17
- package/dist/{start-vite-CeaoWKrT.cjs.dev.js → start-vite-068e9f73.cjs.dev.js} +14 -14
- package/dist/{start-vite-Bf9UIg63.cjs.prod.js → start-vite-29078b3a.cjs.prod.js} +14 -14
- package/dist/{start-vite-BOrX5xsW.esm.js → start-vite-7d1161e8.esm.js} +3 -3
- package/dist/{vite-plugin-svgr-CRRIY_Py.cjs.prod.js → vite-plugin-svgr-4034a834.cjs.prod.js} +24 -6
- package/dist/{vite-plugin-svgr-CRRIY_Py.cjs.dev.js → vite-plugin-svgr-7d06f400.cjs.dev.js} +24 -6
- package/package.json +8 -8
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.dev.js +4 -2
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.prod.js +4 -2
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.esm.js +2 -2
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.dev.js +10 -8
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.prod.js +10 -8
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.esm.js +8 -8
- package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.cjs.dev.js +2 -2
- package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.cjs.prod.js +2 -2
- package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.esm.js +1 -1
- package/dist/package-B1Y3_DDl.cjs.dev.js +0 -17
- package/dist/package-BiK3ergJ.esm.js +0 -15
- package/dist/package-DxhqRLHb.cjs.prod.js +0 -12
- /package/dist/{does-file-exist-C7l6j7NP.esm.js → does-file-exist-32618334.esm.js} +0 -0
- /package/dist/{i18n-message-complilation-BRZ7ffQI.esm.js → i18n-message-complilation-21d3b0aa.esm.js} +0 -0
- /package/dist/{vendors-to-transpile-DLHlk7c-.cjs.dev.js → vendors-to-transpile-04a49d40.cjs.prod.js} +0 -0
- /package/dist/{vendors-to-transpile-DLHlk7c-.cjs.prod.js → vendors-to-transpile-6ab4ea06.cjs.dev.js} +0 -0
- /package/dist/{vendors-to-transpile-uu9TNPDO.esm.js → vendors-to-transpile-7dc84a72.esm.js} +0 -0
- /package/dist/{vite-plugin-svgr-B1JerYlQ.esm.js → vite-plugin-svgr-de6ee7da.esm.js} +0 -0
package/dist/{config-sync-helpers-DUK45F_R.cjs.dev.js → config-sync-helpers-f35fab2b.cjs.dev.js}
RENAMED
|
@@ -18,9 +18,9 @@ var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/ins
|
|
|
18
18
|
var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
19
19
|
var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
20
20
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
21
|
-
var graphqlRequests = require('./graphql-requests-
|
|
21
|
+
var graphqlRequests = require('./graphql-requests-8c5aeb2f.cjs.dev.js');
|
|
22
22
|
|
|
23
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
23
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
24
24
|
|
|
25
25
|
var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
|
|
26
26
|
var chalk__default = /*#__PURE__*/_interopDefault(chalk);
|
|
@@ -39,25 +39,25 @@ var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInsta
|
|
|
39
39
|
var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
|
|
40
40
|
var _mapInstanceProperty__default = /*#__PURE__*/_interopDefault(_mapInstanceProperty);
|
|
41
41
|
|
|
42
|
-
function ownKeys(e, r) { var t = _Object$keys__default
|
|
43
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context9, _context0; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default
|
|
42
|
+
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; }
|
|
43
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context9, _context0; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context9 = ownKeys(Object(t), !0)).call(_context9, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context0 = ownKeys(Object(t))).call(_context0, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
44
44
|
|
|
45
45
|
// Since not all terminal supports colors, to make things more consistent for testing purposes,
|
|
46
46
|
// during tests the color used is appended before the string instead of coloring it.
|
|
47
47
|
const isTest = process.env.NODE_ENV === 'test';
|
|
48
48
|
const red = str => {
|
|
49
49
|
if (isTest) return `<color-red>${str}</color-red>`;
|
|
50
|
-
return chalk__default
|
|
50
|
+
return chalk__default["default"].red(str);
|
|
51
51
|
};
|
|
52
52
|
const green = str => {
|
|
53
53
|
if (isTest) return `<color-green>${str}</color-green>`;
|
|
54
|
-
return chalk__default
|
|
54
|
+
return chalk__default["default"].green(str);
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
// Two spaces are used for indentation.
|
|
58
58
|
const indent = indentLevel => {
|
|
59
59
|
var _context;
|
|
60
|
-
return _repeatInstanceProperty__default
|
|
60
|
+
return _repeatInstanceProperty__default["default"](_context = ' ').call(_context, indentLevel);
|
|
61
61
|
};
|
|
62
62
|
const getStringDiff = _ref => {
|
|
63
63
|
let previousValue = _ref.previousValue,
|
|
@@ -84,9 +84,9 @@ const getArrayDiff = _ref2 => {
|
|
|
84
84
|
label = _ref2.label,
|
|
85
85
|
_ref2$indentLevel = _ref2.indentLevel,
|
|
86
86
|
indentLevel = _ref2$indentLevel === void 0 ? 0 : _ref2$indentLevel;
|
|
87
|
-
const oldArraySet = new _Set__default
|
|
87
|
+
const oldArraySet = new _Set__default["default"](previousValue);
|
|
88
88
|
const arrayDiff = [];
|
|
89
|
-
((_context2 = nextValue) == null ? void 0 : _bindInstanceProperty__default
|
|
89
|
+
((_context2 = nextValue) == null ? void 0 : _bindInstanceProperty__default["default"](_context3 = Function.call).call(_context3, _forEachInstanceProperty__default["default"](_context2), _context2))?.(item => {
|
|
90
90
|
if (oldArraySet.has(item)) {
|
|
91
91
|
oldArraySet.delete(item);
|
|
92
92
|
} else {
|
|
@@ -97,7 +97,7 @@ const getArrayDiff = _ref2 => {
|
|
|
97
97
|
}));
|
|
98
98
|
}
|
|
99
99
|
});
|
|
100
|
-
_forEachInstanceProperty__default
|
|
100
|
+
_forEachInstanceProperty__default["default"](oldArraySet).call(oldArraySet, item => {
|
|
101
101
|
arrayDiff.push(getStringDiff({
|
|
102
102
|
previousValue: item,
|
|
103
103
|
label,
|
|
@@ -111,7 +111,7 @@ const getPermissionsDiff = _ref3 => {
|
|
|
111
111
|
let previousValue = _ref3.previousValue,
|
|
112
112
|
nextValue = _ref3.nextValue;
|
|
113
113
|
const permissionDiff = ['permissions changed'];
|
|
114
|
-
const mappedOldPermissions = _reduceInstanceProperty__default
|
|
114
|
+
const mappedOldPermissions = _reduceInstanceProperty__default["default"](previousValue).call(previousValue, (previousPermission, _ref4) => {
|
|
115
115
|
let name = _ref4.name,
|
|
116
116
|
oAuthScopes = _ref4.oAuthScopes;
|
|
117
117
|
return _objectSpread(_objectSpread({}, previousPermission), {}, {
|
|
@@ -119,7 +119,7 @@ const getPermissionsDiff = _ref3 => {
|
|
|
119
119
|
});
|
|
120
120
|
}, {});
|
|
121
121
|
const indentLevel = 1;
|
|
122
|
-
_forEachInstanceProperty__default
|
|
122
|
+
_forEachInstanceProperty__default["default"](nextValue).call(nextValue, newPermission => {
|
|
123
123
|
const currentDiff = [`${indent(indentLevel)}"${newPermission.name}" changed`];
|
|
124
124
|
// if the permission name is not in the old config, it means it is a new addition.
|
|
125
125
|
if (!mappedOldPermissions[newPermission.name]) {
|
|
@@ -136,11 +136,11 @@ const getPermissionsDiff = _ref3 => {
|
|
|
136
136
|
}));
|
|
137
137
|
delete mappedOldPermissions[newPermission.name];
|
|
138
138
|
}
|
|
139
|
-
_filterInstanceProperty__default
|
|
139
|
+
_filterInstanceProperty__default["default"](currentDiff).call(currentDiff, Boolean).length > 1 && permissionDiff.push(currentDiff.join('\n'));
|
|
140
140
|
});
|
|
141
141
|
|
|
142
142
|
// if there are old permissions left, it means they were deleted in the new Permissions.
|
|
143
|
-
_forEachInstanceProperty__default
|
|
143
|
+
_forEachInstanceProperty__default["default"](_context4 = _Object$keys__default["default"](mappedOldPermissions)).call(_context4, oldPermissionName => {
|
|
144
144
|
permissionDiff.push(`${indent(indentLevel)}"${red(oldPermissionName)}" was removed`);
|
|
145
145
|
});
|
|
146
146
|
if (permissionDiff.length > 1) return permissionDiff.join('\n');
|
|
@@ -155,14 +155,14 @@ const getLabelAllLocalesDiff = _ref5 => {
|
|
|
155
155
|
_ref5$indentLevel = _ref5.indentLevel,
|
|
156
156
|
indentLevel = _ref5$indentLevel === void 0 ? 0 : _ref5$indentLevel;
|
|
157
157
|
const labelAllLocalesDiff = [`${indent(indentLevel - 1)}labelAllLocales changed`];
|
|
158
|
-
const mappedOldLabelAllLocales = _reduceInstanceProperty__default
|
|
158
|
+
const mappedOldLabelAllLocales = _reduceInstanceProperty__default["default"](previousValue).call(previousValue, (previousLabelAllLocale, _ref6) => {
|
|
159
159
|
let locale = _ref6.locale,
|
|
160
160
|
value = _ref6.value;
|
|
161
161
|
return _objectSpread(_objectSpread({}, previousLabelAllLocale), {}, {
|
|
162
162
|
[locale]: value
|
|
163
163
|
});
|
|
164
164
|
}, {});
|
|
165
|
-
_forEachInstanceProperty__default
|
|
165
|
+
_forEachInstanceProperty__default["default"](nextValue).call(nextValue, newLabelAllLocale => {
|
|
166
166
|
if (newLabelAllLocale.locale in mappedOldLabelAllLocales) {
|
|
167
167
|
const oldLocaleValue = mappedOldLabelAllLocales[newLabelAllLocale.locale];
|
|
168
168
|
if (oldLocaleValue !== newLabelAllLocale.value) {
|
|
@@ -180,7 +180,7 @@ const getLabelAllLocalesDiff = _ref5 => {
|
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
});
|
|
183
|
-
_forEachInstanceProperty__default
|
|
183
|
+
_forEachInstanceProperty__default["default"](_context5 = _Object$keys__default["default"](mappedOldLabelAllLocales)).call(_context5, key => {
|
|
184
184
|
const localeDiff = getStringDiff({
|
|
185
185
|
previousValue: key,
|
|
186
186
|
label: 'locale',
|
|
@@ -201,7 +201,7 @@ const getTypeSettingsDiff = _ref7 => {
|
|
|
201
201
|
const nonNullableNextValue = nextValue || {};
|
|
202
202
|
const indentLevel = 1;
|
|
203
203
|
const typeSettingsDiff = [`${indent(indentLevel - 1)}type settings changed`];
|
|
204
|
-
_forEachInstanceProperty__default
|
|
204
|
+
_forEachInstanceProperty__default["default"](_context6 = _Object$keys__default["default"](nonNullablePreviousValue)).call(_context6, key => {
|
|
205
205
|
const typeSettingDiff = getStringDiff({
|
|
206
206
|
previousValue: nonNullablePreviousValue[key],
|
|
207
207
|
nextValue: nonNullableNextValue[key],
|
|
@@ -262,7 +262,7 @@ const getMainMenuLinkDiff = _ref9 => {
|
|
|
262
262
|
if (menuLabelsDiff) {
|
|
263
263
|
mainMenuLinkDiff.push(menuLabelsDiff);
|
|
264
264
|
}
|
|
265
|
-
const filteredMainMenuLinkDiff = _filterInstanceProperty__default
|
|
265
|
+
const filteredMainMenuLinkDiff = _filterInstanceProperty__default["default"](mainMenuLinkDiff).call(mainMenuLinkDiff, Boolean);
|
|
266
266
|
if (filteredMainMenuLinkDiff.length > 1) return filteredMainMenuLinkDiff.join('\n');
|
|
267
267
|
return null;
|
|
268
268
|
};
|
|
@@ -271,10 +271,10 @@ const getSubmenuLinksDiff = _ref0 => {
|
|
|
271
271
|
let previousValue = _ref0.previousValue,
|
|
272
272
|
nextValue = _ref0.nextValue;
|
|
273
273
|
const submenuLinksDiff = ['submenuLink changed'];
|
|
274
|
-
const mappedSubmenuLinks = _reduceInstanceProperty__default
|
|
274
|
+
const mappedSubmenuLinks = _reduceInstanceProperty__default["default"](previousValue).call(previousValue, (previousSubmenuLink, currentSubmenuLink) => _objectSpread(_objectSpread({}, previousSubmenuLink), {}, {
|
|
275
275
|
[currentSubmenuLink.uriPath]: currentSubmenuLink
|
|
276
276
|
}), {});
|
|
277
|
-
const getOrder = value => _mapInstanceProperty__default
|
|
277
|
+
const getOrder = value => _mapInstanceProperty__default["default"](value).call(value, link => link.uriPath).join(', ');
|
|
278
278
|
const previousOrder = getOrder(previousValue);
|
|
279
279
|
const newOrder = getOrder(nextValue);
|
|
280
280
|
if (previousOrder !== newOrder) {
|
|
@@ -282,12 +282,12 @@ const getSubmenuLinksDiff = _ref0 => {
|
|
|
282
282
|
submenuLinksDiff.push(`${indent(2)}previous order: [${previousOrder}]`);
|
|
283
283
|
submenuLinksDiff.push(`${indent(2)}new order: [${newOrder}]`);
|
|
284
284
|
}
|
|
285
|
-
_forEachInstanceProperty__default
|
|
285
|
+
_forEachInstanceProperty__default["default"](nextValue).call(nextValue, newSubmenuLink => {
|
|
286
286
|
const oldSubMenuLink = mappedSubmenuLinks[newSubmenuLink.uriPath];
|
|
287
287
|
if (newSubmenuLink.uriPath in mappedSubmenuLinks) {
|
|
288
288
|
var _context7;
|
|
289
289
|
const submenuLinkDiff = [`${indent(1)}menu link "${newSubmenuLink.uriPath}" changed`];
|
|
290
|
-
_forEachInstanceProperty__default
|
|
290
|
+
_forEachInstanceProperty__default["default"](_context7 = _Object$keys__default["default"](mappedSubmenuLinks[newSubmenuLink.uriPath])).call(_context7, key => {
|
|
291
291
|
switch (key) {
|
|
292
292
|
case 'defaultLabel':
|
|
293
293
|
{
|
|
@@ -331,7 +331,7 @@ const getSubmenuLinksDiff = _ref0 => {
|
|
|
331
331
|
}
|
|
332
332
|
});
|
|
333
333
|
delete mappedSubmenuLinks[newSubmenuLink.uriPath];
|
|
334
|
-
const filteredSubmenuLinksDiff = _filterInstanceProperty__default
|
|
334
|
+
const filteredSubmenuLinksDiff = _filterInstanceProperty__default["default"](submenuLinkDiff).call(submenuLinkDiff, Boolean);
|
|
335
335
|
if (filteredSubmenuLinksDiff.length > 1) {
|
|
336
336
|
submenuLinksDiff.push(filteredSubmenuLinksDiff.join('\n'));
|
|
337
337
|
}
|
|
@@ -346,7 +346,7 @@ const getSubmenuLinksDiff = _ref0 => {
|
|
|
346
346
|
}
|
|
347
347
|
}
|
|
348
348
|
});
|
|
349
|
-
_forEachInstanceProperty__default
|
|
349
|
+
_forEachInstanceProperty__default["default"](_context8 = _Object$keys__default["default"](mappedSubmenuLinks)).call(_context8, key => {
|
|
350
350
|
const linksDiff = getStringDiff({
|
|
351
351
|
previousValue: key,
|
|
352
352
|
label: 'menu link',
|
|
@@ -536,12 +536,12 @@ async function performCreateCustomApplication(_ref2) {
|
|
|
536
536
|
localCustomEntityData = _ref2.localCustomEntityData,
|
|
537
537
|
applicationIdentifier = _ref2.applicationIdentifier,
|
|
538
538
|
dryRun = _ref2.dryRun;
|
|
539
|
-
console.log(`Creating Custom Application in organization "${chalk__default
|
|
540
|
-
const data = omit__default
|
|
539
|
+
console.log(`Creating Custom Application in organization "${chalk__default["default"].green(organizationName)}"...`);
|
|
540
|
+
const data = omit__default["default"](localCustomEntityData, ['id']);
|
|
541
541
|
if (dryRun) {
|
|
542
542
|
console.log();
|
|
543
543
|
console.log('Dry run - would create Custom Application with:');
|
|
544
|
-
console.log(chalk__default
|
|
544
|
+
console.log(chalk__default["default"].gray(_JSON$stringify__default["default"](data, null, 2)));
|
|
545
545
|
return null;
|
|
546
546
|
}
|
|
547
547
|
const createdCustomApplication = await graphqlRequests.createCustomApplication({
|
|
@@ -558,10 +558,10 @@ async function performCreateCustomApplication(_ref2) {
|
|
|
558
558
|
organizationId,
|
|
559
559
|
customEntityId: createdCustomApplication.id
|
|
560
560
|
});
|
|
561
|
-
console.log(chalk__default
|
|
562
|
-
console.log(`ID: ${chalk__default
|
|
561
|
+
console.log(chalk__default["default"].green('Custom Application created successfully.'));
|
|
562
|
+
console.log(`ID: ${chalk__default["default"].cyan(createdCustomApplication.id)}`);
|
|
563
563
|
console.log(`Please update the "env.production.applicationId" field in your local Custom Application config file with the ID above.`);
|
|
564
|
-
console.log(`URL: ${chalk__default
|
|
564
|
+
console.log(`URL: ${chalk__default["default"].gray(customAppLink)}`);
|
|
565
565
|
return createdCustomApplication.id;
|
|
566
566
|
}
|
|
567
567
|
async function performUpdateCustomApplication(_ref3) {
|
|
@@ -571,11 +571,11 @@ async function performUpdateCustomApplication(_ref3) {
|
|
|
571
571
|
localCustomEntityData = _ref3.localCustomEntityData,
|
|
572
572
|
applicationIdentifier = _ref3.applicationIdentifier,
|
|
573
573
|
dryRun = _ref3.dryRun;
|
|
574
|
-
const data = omit__default
|
|
574
|
+
const data = omit__default["default"](localCustomEntityData, ['id']);
|
|
575
575
|
if (dryRun) {
|
|
576
576
|
console.log();
|
|
577
|
-
console.log(`Dry run - would update Custom Application "${chalk__default
|
|
578
|
-
console.log(chalk__default
|
|
577
|
+
console.log(`Dry run - would update Custom Application "${chalk__default["default"].green(data.entryPointUriPath)}" with:`);
|
|
578
|
+
console.log(chalk__default["default"].gray(_JSON$stringify__default["default"](data, null, 2)));
|
|
579
579
|
return;
|
|
580
580
|
}
|
|
581
581
|
console.log('Updating Custom Application...');
|
|
@@ -591,8 +591,8 @@ async function performUpdateCustomApplication(_ref3) {
|
|
|
591
591
|
organizationId,
|
|
592
592
|
customEntityId: applicationId
|
|
593
593
|
});
|
|
594
|
-
console.log(chalk__default
|
|
595
|
-
console.log(`URL: ${chalk__default
|
|
594
|
+
console.log(chalk__default["default"].green('Custom Application updated successfully.'));
|
|
595
|
+
console.log(`URL: ${chalk__default["default"].gray(customAppLink)}`);
|
|
596
596
|
}
|
|
597
597
|
async function performCreateCustomView(_ref4) {
|
|
598
598
|
let mcApiUrl = _ref4.mcApiUrl,
|
|
@@ -601,12 +601,12 @@ async function performCreateCustomView(_ref4) {
|
|
|
601
601
|
localCustomEntityData = _ref4.localCustomEntityData,
|
|
602
602
|
applicationIdentifier = _ref4.applicationIdentifier,
|
|
603
603
|
dryRun = _ref4.dryRun;
|
|
604
|
-
console.log(`Creating Custom View in organization "${chalk__default
|
|
605
|
-
const data = omit__default
|
|
604
|
+
console.log(`Creating Custom View in organization "${chalk__default["default"].green(organizationName)}"...`);
|
|
605
|
+
const data = omit__default["default"](localCustomEntityData, ['id']);
|
|
606
606
|
if (dryRun) {
|
|
607
607
|
console.log();
|
|
608
608
|
console.log('Dry run - would create Custom View with:');
|
|
609
|
-
console.log(chalk__default
|
|
609
|
+
console.log(chalk__default["default"].gray(_JSON$stringify__default["default"](data, null, 2)));
|
|
610
610
|
return null;
|
|
611
611
|
}
|
|
612
612
|
const createdCustomView = await graphqlRequests.createCustomView({
|
|
@@ -624,10 +624,10 @@ async function performCreateCustomView(_ref4) {
|
|
|
624
624
|
customEntityId: createdCustomView.id,
|
|
625
625
|
isCustomView: true
|
|
626
626
|
});
|
|
627
|
-
console.log(chalk__default
|
|
628
|
-
console.log(`ID: ${chalk__default
|
|
627
|
+
console.log(chalk__default["default"].green('Custom View created successfully.'));
|
|
628
|
+
console.log(`ID: ${chalk__default["default"].cyan(createdCustomView.id)}`);
|
|
629
629
|
console.log(`Please update the "env.production.customViewId" field in your local Custom View config file with the ID above.`);
|
|
630
|
-
console.log(`URL: ${chalk__default
|
|
630
|
+
console.log(`URL: ${chalk__default["default"].gray(customViewLink)}`);
|
|
631
631
|
return createdCustomView.id;
|
|
632
632
|
}
|
|
633
633
|
async function performUpdateCustomView(_ref5) {
|
|
@@ -637,11 +637,11 @@ async function performUpdateCustomView(_ref5) {
|
|
|
637
637
|
localCustomEntityData = _ref5.localCustomEntityData,
|
|
638
638
|
applicationIdentifier = _ref5.applicationIdentifier,
|
|
639
639
|
dryRun = _ref5.dryRun;
|
|
640
|
-
const data = omit__default
|
|
640
|
+
const data = omit__default["default"](localCustomEntityData, ['id']);
|
|
641
641
|
if (dryRun) {
|
|
642
642
|
console.log();
|
|
643
|
-
console.log(`Dry run - would update Custom View "${chalk__default
|
|
644
|
-
console.log(chalk__default
|
|
643
|
+
console.log(`Dry run - would update Custom View "${chalk__default["default"].green(data.defaultLabel)}" with:`);
|
|
644
|
+
console.log(chalk__default["default"].gray(_JSON$stringify__default["default"](data, null, 2)));
|
|
645
645
|
return;
|
|
646
646
|
}
|
|
647
647
|
console.log('Updating Custom View...');
|
|
@@ -658,8 +658,8 @@ async function performUpdateCustomView(_ref5) {
|
|
|
658
658
|
customEntityId: customViewId,
|
|
659
659
|
isCustomView: true
|
|
660
660
|
});
|
|
661
|
-
console.log(chalk__default
|
|
662
|
-
console.log(`URL: ${chalk__default
|
|
661
|
+
console.log(chalk__default["default"].green('Custom View updated successfully.'));
|
|
662
|
+
console.log(`URL: ${chalk__default["default"].gray(customViewLink)}`);
|
|
663
663
|
}
|
|
664
664
|
async function checkCustomApplicationStatus(_ref6) {
|
|
665
665
|
let mcApiUrl = _ref6.mcApiUrl,
|
|
@@ -16,10 +16,10 @@ import _filterInstanceProperty from '@babel/runtime-corejs3/core-js-stable/insta
|
|
|
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 {
|
|
19
|
+
import { c as createCustomApplication, u as updateCustomApplication, a as createCustomView, b as updateCustomView, d as fetchCustomApplication, e as fetchCustomView } from './graphql-requests-1afa51b6.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 _context9, _context0; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context9 = ownKeys(Object(t),
|
|
22
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context9, _context0; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context9 = ownKeys(Object(t), !0)).call(_context9, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context0 = ownKeys(Object(t))).call(_context0, 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.
|
|
@@ -700,4 +700,4 @@ async function checkCustomViewStatus(_ref7) {
|
|
|
700
700
|
};
|
|
701
701
|
}
|
|
702
702
|
|
|
703
|
-
export {
|
|
703
|
+
export { performUpdateCustomApplication as a, checkCustomViewStatus as b, checkCustomApplicationStatus as c, performCreateCustomView as d, performUpdateCustomView as e, isCustomViewData as i, performCreateCustomApplication as p };
|
package/dist/{create-postcss-config-CN9_8Usa.esm.js → create-postcss-config-9f7fc8fe.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-7c551972.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
|
|
@@ -2,9 +2,9 @@
|
|
|
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-7fcd7258.cjs.prod.js');
|
|
6
6
|
|
|
7
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
8
8
|
|
|
9
9
|
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
10
10
|
|
|
@@ -19,7 +19,7 @@ const safeResolvePath = (packageName, fileRelativePath) => {
|
|
|
19
19
|
const _defaultPackageEntryP = defaultPackageEntryPoint.split('dist'),
|
|
20
20
|
_defaultPackageEntryP2 = _slicedToArray(_defaultPackageEntryP, 1),
|
|
21
21
|
pathToPackage = _defaultPackageEntryP2[0];
|
|
22
|
-
return path__default
|
|
22
|
+
return path__default["default"].join(pathToPackage, fileRelativePath);
|
|
23
23
|
};
|
|
24
24
|
function createPostcssConfig() {
|
|
25
25
|
let _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
package/dist/{create-postcss-config-NN2FAhvH.cjs.dev.js → create-postcss-config-bda2f46f.cjs.dev.js}
RENAMED
|
@@ -2,9 +2,9 @@
|
|
|
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-8cf0508d.cjs.dev.js');
|
|
6
6
|
|
|
7
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
8
8
|
|
|
9
9
|
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
10
10
|
|
|
@@ -19,7 +19,7 @@ const safeResolvePath = (packageName, fileRelativePath) => {
|
|
|
19
19
|
const _defaultPackageEntryP = defaultPackageEntryPoint.split('dist'),
|
|
20
20
|
_defaultPackageEntryP2 = _slicedToArray(_defaultPackageEntryP, 1),
|
|
21
21
|
pathToPackage = _defaultPackageEntryP2[0];
|
|
22
|
-
return path__default
|
|
22
|
+
return path__default["default"].join(pathToPackage, fileRelativePath);
|
|
23
23
|
};
|
|
24
24
|
function createPostcssConfig() {
|
|
25
25
|
let _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
@@ -25,12 +25,12 @@ var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
|
|
|
25
25
|
var _Object$assign = require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
26
26
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
27
27
|
var mcHtmlTemplate = require('@commercetools-frontend/mc-html-template');
|
|
28
|
-
var createPostcssConfig = require('./create-postcss-config-
|
|
29
|
-
var optimizations = require('./optimizations-
|
|
30
|
-
var paths = require('./paths-
|
|
31
|
-
var vendorsToTranspile = require('./vendors-to-transpile-
|
|
28
|
+
var createPostcssConfig = require('./create-postcss-config-bda2f46f.cjs.dev.js');
|
|
29
|
+
var optimizations = require('./optimizations-56be74d6.cjs.dev.js');
|
|
30
|
+
var paths = require('./paths-b76fc753.cjs.dev.js');
|
|
31
|
+
var vendorsToTranspile = require('./vendors-to-transpile-6ab4ea06.cjs.dev.js');
|
|
32
32
|
|
|
33
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
33
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
34
34
|
|
|
35
35
|
var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
|
|
36
36
|
var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertySymbols);
|
|
@@ -61,10 +61,10 @@ let LocalHtmlWebpackPlugin = /*#__PURE__*/function () {
|
|
|
61
61
|
key: "apply",
|
|
62
62
|
value: function apply(compiler) {
|
|
63
63
|
compiler.hooks.compilation.tap('LocalHtmlWebpackPlugin', compilation => {
|
|
64
|
-
HtmlWebpackPlugin__default
|
|
64
|
+
HtmlWebpackPlugin__default["default"].getHooks(compilation).beforeEmit.tapAsync('LocalHtmlWebpackPlugin', async (data, cb) => {
|
|
65
65
|
try {
|
|
66
66
|
const applicationConfig$1 = await applicationConfig.processConfig();
|
|
67
|
-
const enhancedLocalEnv = _Object$assign__default
|
|
67
|
+
const enhancedLocalEnv = _Object$assign__default["default"]({}, applicationConfig$1.env,
|
|
68
68
|
// Now that the app config is defined as a `env.json`, when we start the FE app
|
|
69
69
|
// to point to the local backend API by passing the `MC_API_URL` env does not
|
|
70
70
|
// work anymore). To make it work again, we can override the `env.json` config
|
|
@@ -86,8 +86,8 @@ let LocalHtmlWebpackPlugin = /*#__PURE__*/function () {
|
|
|
86
86
|
}]);
|
|
87
87
|
}();
|
|
88
88
|
|
|
89
|
-
function ownKeys(e, r) { var t = _Object$keys__default
|
|
90
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default
|
|
89
|
+
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; }
|
|
90
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys(Object(t), !0)).call(_context6, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys(Object(t))).call(_context7, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
91
91
|
// https://babeljs.io/blog/2017/09/11/zero-config-with-babel-macros
|
|
92
92
|
const momentLocalesToKeep = ["de", "de-at", "de-ch", "en-gb", "en-au", "en-ca", "en-ie", "en-in", "en-nz", "en-sg", "es", "es-do", "es-mx", "fr", "pt-br"];
|
|
93
93
|
const defaultToggleFlags = {
|
|
@@ -151,7 +151,7 @@ function createWebpackConfigForDevelopment() {
|
|
|
151
151
|
// https://github.com/facebook/create-react-app/issues/290
|
|
152
152
|
// `web` extension prefixes have been added for better support
|
|
153
153
|
// for React Native Web.
|
|
154
|
-
extensions: _mapInstanceProperty__default
|
|
154
|
+
extensions: _mapInstanceProperty__default["default"](_context = ['js', 'mjs', 'cjs', 'ts', 'tsx', 'json', 'jsx']).call(_context, ext => `.${ext}`),
|
|
155
155
|
// NOTE: this is meant to be a temporary list of fallback/polyfills for certain
|
|
156
156
|
// nodejs modules. With Webpack <5 these polyfills were included by default in Webpack,
|
|
157
157
|
// however now it's not the case anymore.
|
|
@@ -162,7 +162,7 @@ function createWebpackConfigForDevelopment() {
|
|
|
162
162
|
}
|
|
163
163
|
},
|
|
164
164
|
entry: {
|
|
165
|
-
app: _filterInstanceProperty__default
|
|
165
|
+
app: _filterInstanceProperty__default["default"](_context2 = [require.resolve('@commercetools-frontend/mc-scripts/application-runtime'), !mergedOptions.toggleFlags.disableCoreJs && require.resolve('core-js/stable'),
|
|
166
166
|
// When using the experimental `react-refresh` integration,
|
|
167
167
|
// the webpack plugin takes care of injecting the dev client for us.
|
|
168
168
|
!hasReactRefresh &&
|
|
@@ -199,12 +199,12 @@ function createWebpackConfigForDevelopment() {
|
|
|
199
199
|
// This is the URL that app is served from. We use "/" in development.
|
|
200
200
|
publicPath: '/',
|
|
201
201
|
// Point sourcemap entries to the original disk location (format as URL on Windows)
|
|
202
|
-
devtoolModuleFilenameTemplate: info => path__default
|
|
202
|
+
devtoolModuleFilenameTemplate: info => path__default["default"].resolve(info.absoluteResourcePath).replace(/\\/g, '/')
|
|
203
203
|
},
|
|
204
|
-
plugins: _filterInstanceProperty__default
|
|
204
|
+
plugins: _filterInstanceProperty__default["default"](_context3 = [new WebpackBar__default["default"](),
|
|
205
205
|
// Allows to "assign" custom options to the `webpack` object.
|
|
206
206
|
// At the moment, this is used to share some props with `postcss.config`.
|
|
207
|
-
new webpack__default
|
|
207
|
+
new webpack__default["default"].LoaderOptionsPlugin({
|
|
208
208
|
options: {
|
|
209
209
|
sourceFolders: mergedOptions.sourceFolders,
|
|
210
210
|
context: __dirname
|
|
@@ -212,25 +212,25 @@ function createWebpackConfigForDevelopment() {
|
|
|
212
212
|
}),
|
|
213
213
|
// Makes some environment variables available to the JS code, for example:
|
|
214
214
|
// if (process.env.NODE_ENV === 'development') { ... }.
|
|
215
|
-
new webpack__default
|
|
215
|
+
new webpack__default["default"].DefinePlugin({
|
|
216
216
|
__DEV__: 'true',
|
|
217
217
|
'process.env': {
|
|
218
|
-
NODE_ENV: _JSON$stringify__default
|
|
218
|
+
NODE_ENV: _JSON$stringify__default["default"]('development')
|
|
219
219
|
}
|
|
220
|
-
}), mergedOptions.toggleFlags.generateIndexHtml && new HtmlWebpackPlugin__default
|
|
220
|
+
}), mergedOptions.toggleFlags.generateIndexHtml && new HtmlWebpackPlugin__default["default"]({
|
|
221
221
|
inject: false,
|
|
222
222
|
filename: paths.paths.appIndexHtml,
|
|
223
223
|
template: require.resolve('@commercetools-frontend/mc-html-template/webpack')
|
|
224
224
|
}), mergedOptions.toggleFlags.generateIndexHtml && new LocalHtmlWebpackPlugin(),
|
|
225
225
|
// Only keep locales that are available in the Merchant Center.
|
|
226
|
-
new MomentLocalesPlugin__default
|
|
226
|
+
new MomentLocalesPlugin__default["default"]({
|
|
227
227
|
localesToKeep: momentLocalesToKeep
|
|
228
228
|
}),
|
|
229
229
|
// This is necessary to emit hot updates (CSS and Fast Refresh):
|
|
230
|
-
new webpack__default
|
|
230
|
+
new webpack__default["default"].HotModuleReplacementPlugin(),
|
|
231
231
|
// Experimental hot reloading for React .
|
|
232
232
|
// https://github.com/facebook/react/tree/master/packages/react-refresh
|
|
233
|
-
hasReactRefresh && new ReactRefreshWebpackPlugin__default
|
|
233
|
+
hasReactRefresh && new ReactRefreshWebpackPlugin__default["default"]({
|
|
234
234
|
overlay: {
|
|
235
235
|
entry: webpackDevClientEntry,
|
|
236
236
|
// The expected exports are slightly different from what the overlay exports,
|
|
@@ -305,7 +305,7 @@ function createWebpackConfigForDevelopment() {
|
|
|
305
305
|
name: 'prefixIds',
|
|
306
306
|
params: {
|
|
307
307
|
delim: '',
|
|
308
|
-
prefix: (_, info) => `svg${crypto__default
|
|
308
|
+
prefix: (_, info) => `svg${crypto__default["default"].createHash('shake256', {
|
|
309
309
|
outputLength: 6
|
|
310
310
|
}).update(info.path || '').digest('hex')}`
|
|
311
311
|
}
|
|
@@ -321,7 +321,7 @@ function createWebpackConfigForDevelopment() {
|
|
|
321
321
|
return (
|
|
322
322
|
// Use this only for plain SVG.
|
|
323
323
|
// For SVG as React components, see loader above.
|
|
324
|
-
_endsWithInstanceProperty__default
|
|
324
|
+
_endsWithInstanceProperty__default["default"](fileName).call(fileName, '.svg') && !_endsWithInstanceProperty__default["default"](fileName).call(fileName, '.react.svg')
|
|
325
325
|
);
|
|
326
326
|
},
|
|
327
327
|
use: [{
|
|
@@ -358,7 +358,7 @@ function createWebpackConfigForDevelopment() {
|
|
|
358
358
|
return (
|
|
359
359
|
// Use this only for plain CSS.
|
|
360
360
|
// For css-modules, see loader above.
|
|
361
|
-
_endsWithInstanceProperty__default
|
|
361
|
+
_endsWithInstanceProperty__default["default"](fileName).call(fileName, '.css') && !(_endsWithInstanceProperty__default["default"](fileName).call(fileName, '.mod.css') || _endsWithInstanceProperty__default["default"](fileName).call(fileName, '.module.css'))
|
|
362
362
|
);
|
|
363
363
|
},
|
|
364
364
|
// "postcss" loader applies autoprefixer to our CSS.
|
|
@@ -430,7 +430,7 @@ function createWebpackConfigForDevelopment() {
|
|
|
430
430
|
presets: [[require.resolve('@commercetools-frontend/babel-preset-mc-app'), {
|
|
431
431
|
runtime: optimizations.hasJsxRuntime() ? 'automatic' : 'classic'
|
|
432
432
|
}]],
|
|
433
|
-
plugins: _filterInstanceProperty__default
|
|
433
|
+
plugins: _filterInstanceProperty__default["default"](_context4 = [hasReactRefresh && require.resolve('react-refresh/babel'),
|
|
434
434
|
// Add coverage instrumentation when running Cypress tests
|
|
435
435
|
process.env.CYPRESS_COVERAGE && require.resolve('babel-plugin-istanbul')]).call(_context4, Boolean),
|
|
436
436
|
// This is a feature of `babel-loader` for webpack (not Babel itself).
|
|
@@ -440,7 +440,7 @@ function createWebpackConfigForDevelopment() {
|
|
|
440
440
|
highlightCode: true
|
|
441
441
|
}
|
|
442
442
|
}],
|
|
443
|
-
include: _concatInstanceProperty__default
|
|
443
|
+
include: _concatInstanceProperty__default["default"](_context5 = mergedOptions.sourceFolders).call(_context5, vendorsToTranspile.vendorsToTranspile),
|
|
444
444
|
// Disable require.ensure as it's not a standard language feature.
|
|
445
445
|
parser: {
|
|
446
446
|
requireEnsure: false
|