@commercetools-frontend/mc-scripts 22.30.2 → 22.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.cjs.dev.js +1 -1
- package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.cjs.prod.js +1 -1
- package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.esm.js +1 -1
- package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.dev.js +19 -19
- package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.prod.js +19 -19
- package/cli/dist/commercetools-frontend-mc-scripts-cli.esm.js +19 -19
- package/dist/{build-f86a84a7.cjs.dev.js → build-08fc2868.cjs.dev.js} +6 -6
- package/dist/{build-14007257.esm.js → build-b00da074.esm.js} +6 -6
- package/dist/{build-9031cc94.cjs.prod.js → build-bfc9ead3.cjs.prod.js} +6 -6
- package/dist/{build-vite-87662f4d.cjs.dev.js → build-vite-14eeea5d.cjs.dev.js} +7 -8
- package/dist/{build-vite-b19a39fb.esm.js → build-vite-71767c7d.esm.js} +7 -8
- package/dist/{build-vite-c7ccff49.cjs.prod.js → build-vite-cefb3775.cjs.prod.js} +7 -8
- package/dist/commercetools-frontend-mc-scripts.cjs.dev.js +1 -1
- package/dist/commercetools-frontend-mc-scripts.cjs.prod.js +1 -1
- package/dist/commercetools-frontend-mc-scripts.esm.js +1 -1
- package/dist/{compile-html-adfef598.esm.js → compile-html-025cd493.esm.js} +2 -4
- package/dist/{compile-html-b80f9651.cjs.prod.js → compile-html-50fd05ec.cjs.prod.js} +2 -5
- package/dist/{compile-html-8679f721.cjs.dev.js → compile-html-f4ac88cc.cjs.dev.js} +2 -5
- package/dist/{config-sync-b325191e.cjs.prod.js → config-sync-a76e45e3.cjs.prod.js} +64 -74
- package/dist/{config-sync-1724cc9a.cjs.dev.js → config-sync-b2172892.cjs.dev.js} +66 -76
- package/dist/{config-sync-fc206c13.esm.js → config-sync-e5aa853f.esm.js} +66 -75
- package/dist/{create-postcss-config-057a555f.cjs.prod.js → create-postcss-config-4636f5c9.cjs.prod.js} +1 -1
- package/dist/{create-postcss-config-0617df94.cjs.dev.js → create-postcss-config-ce058cc5.cjs.dev.js} +1 -1
- package/dist/{create-postcss-config-807412fe.esm.js → create-postcss-config-e3ad83aa.esm.js} +1 -1
- package/dist/{create-webpack-config-for-development-568a4b28.cjs.dev.js → create-webpack-config-for-development-154ee43f.cjs.dev.js} +5 -5
- package/dist/{create-webpack-config-for-development-506dcdae.esm.js → create-webpack-config-for-development-aabb9a02.esm.js} +5 -5
- package/dist/{create-webpack-config-for-development-57671ec4.cjs.prod.js → create-webpack-config-for-development-b65498a3.cjs.prod.js} +5 -5
- package/dist/{create-webpack-config-for-production-7acd5767.cjs.dev.js → create-webpack-config-for-production-ce81f82b.cjs.dev.js} +6 -6
- package/dist/{create-webpack-config-for-production-44bd9918.esm.js → create-webpack-config-for-production-e8ba7a77.esm.js} +6 -6
- package/dist/{create-webpack-config-for-production-98a57ade.cjs.prod.js → create-webpack-config-for-production-f2aadce3.cjs.prod.js} +6 -6
- package/dist/{credentials-storage-c561765b.cjs.prod.js → credentials-storage-cac35ba6.cjs.prod.js} +2 -2
- package/dist/{credentials-storage-60d64f06.cjs.dev.js → credentials-storage-e3abd27b.cjs.dev.js} +2 -2
- package/dist/{credentials-storage-c04d4f40.esm.js → credentials-storage-eb6f9e03.esm.js} +2 -2
- package/dist/{deployment-previews-set-8e61ad4a.cjs.dev.js → deployment-previews-set-1fd17456.cjs.dev.js} +22 -28
- package/dist/{deployment-previews-set-46ac7db8.cjs.prod.js → deployment-previews-set-3c88d175.cjs.prod.js} +22 -28
- package/dist/{deployment-previews-set-e6668f10.esm.js → deployment-previews-set-ca0b28cb.esm.js} +22 -27
- package/dist/{graphql-requests-374900f3.cjs.dev.js → graphql-requests-0887e583.cjs.prod.js} +3 -6
- package/dist/{graphql-requests-4a3570d5.esm.js → graphql-requests-7e319ebc.esm.js} +3 -6
- package/dist/{graphql-requests-b46c1a1f.cjs.prod.js → graphql-requests-b05fd260.cjs.dev.js} +3 -6
- package/dist/{i18n-message-complilation-8aec9d1b.esm.js → i18n-message-complilation-21d3b0aa.esm.js} +1 -1
- package/dist/{i18n-message-complilation-3f80e8d6.cjs.dev.js → i18n-message-complilation-7311cb29.cjs.dev.js} +1 -1
- package/dist/{i18n-message-complilation-393d344a.cjs.prod.js → i18n-message-complilation-7762da61.cjs.prod.js} +1 -1
- package/dist/{login-ae73724b.cjs.dev.js → login-5fa5604e.cjs.dev.js} +8 -8
- package/dist/{login-caf53bc3.esm.js → login-7f5bb79c.esm.js} +8 -8
- package/dist/{login-8982f184.cjs.prod.js → login-829a1b56.cjs.prod.js} +8 -8
- package/dist/{package-15bc96fe.cjs.dev.js → package-378cc0b4.cjs.prod.js} +8 -8
- package/dist/{package-7793b7ec.cjs.prod.js → package-3a9024e1.cjs.dev.js} +8 -8
- package/dist/{package-f33bb0fc.esm.js → package-9a7b7976.esm.js} +8 -8
- package/dist/{paths-7bf7e88e.esm.js → paths-39f22b8b.esm.js} +4 -9
- package/dist/{paths-af1a725a.cjs.prod.js → paths-7768b440.cjs.prod.js} +4 -10
- package/dist/{paths-ec3e3a7d.cjs.dev.js → paths-b76fc753.cjs.dev.js} +4 -10
- package/dist/{serve-7b2e35a1.cjs.prod.js → serve-5666b16a.cjs.prod.js} +2 -3
- package/dist/{serve-5f480513.esm.js → serve-6a951584.esm.js} +2 -3
- package/dist/{serve-efceb930.cjs.dev.js → serve-f898c45e.cjs.dev.js} +2 -3
- package/dist/{start-c1143111.cjs.dev.js → start-58d4a0d4.cjs.dev.js} +7 -8
- package/dist/{start-2c728521.esm.js → start-7877df72.esm.js} +7 -8
- package/dist/{start-5bd6fd2b.cjs.prod.js → start-df494b7b.cjs.prod.js} +7 -8
- package/dist/{start-vite-8e72a6a9.cjs.prod.js → start-vite-1f2a92bd.cjs.prod.js} +3 -4
- package/dist/{start-vite-7d25a064.cjs.dev.js → start-vite-ce32d36a.cjs.dev.js} +3 -4
- package/dist/{start-vite-e706f764.esm.js → start-vite-d68b39d3.esm.js} +3 -4
- package/dist/{vite-plugin-svgr-13d96e7a.esm.js → vite-plugin-svgr-069f402d.esm.js} +2 -2
- package/dist/{vite-plugin-svgr-7def8ea1.cjs.prod.js → vite-plugin-svgr-7fb42bbf.cjs.dev.js} +2 -2
- package/dist/{vite-plugin-svgr-496f5b25.cjs.dev.js → vite-plugin-svgr-b080c510.cjs.prod.js} +2 -2
- package/package.json +8 -8
- 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 +5 -5
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.prod.js +5 -5
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.esm.js +5 -5
- 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,5 +1,4 @@
|
|
|
1
1
|
import _slicedToArray from '@babel/runtime-corejs3/helpers/esm/slicedToArray';
|
|
2
|
-
import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
3
2
|
import _mapInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/map';
|
|
4
3
|
import _findInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
5
4
|
import _filterInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/filter';
|
|
@@ -8,7 +7,7 @@ import chalk from 'chalk';
|
|
|
8
7
|
import omit from 'lodash/omit';
|
|
9
8
|
import prompts from 'prompts';
|
|
10
9
|
import { sanitizeSvg, processConfig } from '@commercetools-frontend/application-config';
|
|
11
|
-
import { C as CredentialsStorage } from './credentials-storage-
|
|
10
|
+
import { C as CredentialsStorage } from './credentials-storage-eb6f9e03.esm.js';
|
|
12
11
|
import _Object$getOwnPropertySymbols from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
|
|
13
12
|
import _Object$getOwnPropertyDescriptor from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor';
|
|
14
13
|
import _Object$getOwnPropertyDescriptors from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors';
|
|
@@ -20,9 +19,9 @@ import _Set from '@babel/runtime-corejs3/core-js-stable/set';
|
|
|
20
19
|
import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/for-each';
|
|
21
20
|
import _reduceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/reduce';
|
|
22
21
|
import _Object$keys from '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
23
|
-
import { f as fetchCustomApplication, a as fetchUserOrganizations, c as createCustomApplication, u as updateCustomApplication, b as fetchCustomView, d as createCustomView, e as updateCustomView } from './graphql-requests-
|
|
22
|
+
import { f as fetchCustomApplication, a as fetchUserOrganizations, c as createCustomApplication, u as updateCustomApplication, b as fetchCustomView, d as createCustomView, e as updateCustomView } from './graphql-requests-7e319ebc.esm.js';
|
|
24
23
|
import '@commercetools/http-user-agent';
|
|
25
|
-
import './package-
|
|
24
|
+
import './package-9a7b7976.esm.js';
|
|
26
25
|
import '@babel/runtime-corejs3/helpers/classCallCheck';
|
|
27
26
|
import '@babel/runtime-corejs3/helpers/createClass';
|
|
28
27
|
import '@babel/runtime-corejs3/core-js-stable/date/now';
|
|
@@ -37,17 +36,17 @@ import 'graphql-request';
|
|
|
37
36
|
import '@commercetools-frontend/constants';
|
|
38
37
|
|
|
39
38
|
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; }
|
|
40
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
39
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context7, _context8; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context7 = ownKeys(Object(t), !0)).call(_context7, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context8 = ownKeys(Object(t))).call(_context8, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
41
40
|
|
|
42
41
|
// Since not all terminal supports colors, to make things more consistent for testing purposes,
|
|
43
42
|
// during tests the color used is appended before the string instead of coloring it.
|
|
44
43
|
const isTest = process.env.NODE_ENV === 'test';
|
|
45
44
|
const red = str => {
|
|
46
|
-
if (isTest) return
|
|
45
|
+
if (isTest) return `<color-red>${str}</color-red>`;
|
|
47
46
|
return chalk.red(str);
|
|
48
47
|
};
|
|
49
48
|
const green = str => {
|
|
50
|
-
if (isTest) return
|
|
49
|
+
if (isTest) return `<color-green>${str}</color-green>`;
|
|
51
50
|
return chalk.green(str);
|
|
52
51
|
};
|
|
53
52
|
|
|
@@ -63,16 +62,13 @@ const getStringDiff = _ref => {
|
|
|
63
62
|
_ref$indentLevel = _ref.indentLevel,
|
|
64
63
|
indentLevel = _ref$indentLevel === void 0 ? 0 : _ref$indentLevel;
|
|
65
64
|
if (!previousValue && nextValue) {
|
|
66
|
-
|
|
67
|
-
return _concatInstanceProperty(_context2 = _concatInstanceProperty(_context3 = "".concat(indent(indentLevel))).call(_context3, label, " added: ")).call(_context2, green(nextValue));
|
|
65
|
+
return `${indent(indentLevel)}${label} added: ${green(nextValue)}`;
|
|
68
66
|
}
|
|
69
67
|
if (previousValue && !nextValue) {
|
|
70
|
-
|
|
71
|
-
return _concatInstanceProperty(_context4 = _concatInstanceProperty(_context5 = "".concat(indent(indentLevel))).call(_context5, label, " removed: ")).call(_context4, red(previousValue));
|
|
68
|
+
return `${indent(indentLevel)}${label} removed: ${red(previousValue)}`;
|
|
72
69
|
}
|
|
73
70
|
if (previousValue && nextValue && previousValue !== nextValue) {
|
|
74
|
-
|
|
75
|
-
return _concatInstanceProperty(_context6 = _concatInstanceProperty(_context7 = _concatInstanceProperty(_context8 = "".concat(indent(indentLevel))).call(_context8, label, " changed: ")).call(_context7, red(previousValue), " => ")).call(_context6, green(nextValue));
|
|
71
|
+
return `${indent(indentLevel)}${label} changed: ${red(previousValue)} => ${green(nextValue)}`;
|
|
76
72
|
}
|
|
77
73
|
return null;
|
|
78
74
|
};
|
|
@@ -85,7 +81,7 @@ const getArrayDiff = _ref2 => {
|
|
|
85
81
|
indentLevel = _ref2$indentLevel === void 0 ? 0 : _ref2$indentLevel;
|
|
86
82
|
const oldArraySet = new _Set(previousValue);
|
|
87
83
|
const arrayDiff = [];
|
|
88
|
-
nextValue
|
|
84
|
+
nextValue?.forEach(item => {
|
|
89
85
|
if (oldArraySet.has(item)) {
|
|
90
86
|
oldArraySet.delete(item);
|
|
91
87
|
} else {
|
|
@@ -106,7 +102,7 @@ const getArrayDiff = _ref2 => {
|
|
|
106
102
|
return arrayDiff.join('\n');
|
|
107
103
|
};
|
|
108
104
|
const getPermissionsDiff = _ref3 => {
|
|
109
|
-
var
|
|
105
|
+
var _context2;
|
|
110
106
|
let previousValue = _ref3.previousValue,
|
|
111
107
|
nextValue = _ref3.nextValue;
|
|
112
108
|
const permissionDiff = ['permissions changed'];
|
|
@@ -119,12 +115,10 @@ const getPermissionsDiff = _ref3 => {
|
|
|
119
115
|
}, {});
|
|
120
116
|
const indentLevel = 1;
|
|
121
117
|
_forEachInstanceProperty(nextValue).call(nextValue, newPermission => {
|
|
122
|
-
|
|
123
|
-
const currentDiff = [_concatInstanceProperty(_context9 = "".concat(indent(indentLevel), "\"")).call(_context9, newPermission.name, "\" changed")];
|
|
118
|
+
const currentDiff = [`${indent(indentLevel)}"${newPermission.name}" changed`];
|
|
124
119
|
// if the permission name is not in the old config, it means it is a new addition.
|
|
125
120
|
if (!mappedOldPermissions[newPermission.name]) {
|
|
126
|
-
|
|
127
|
-
permissionDiff.push(_concatInstanceProperty(_context10 = "".concat(indent(indentLevel), "\"")).call(_context10, green(newPermission.name), "\" was added"));
|
|
121
|
+
permissionDiff.push(`${indent(indentLevel)}"${green(newPermission.name)}" was added`);
|
|
128
122
|
}
|
|
129
123
|
|
|
130
124
|
// if permission name is in the old config, now we check if there was a change
|
|
@@ -141,22 +135,21 @@ const getPermissionsDiff = _ref3 => {
|
|
|
141
135
|
});
|
|
142
136
|
|
|
143
137
|
// if there are old permissions left, it means they were deleted in the new Permissions.
|
|
144
|
-
_forEachInstanceProperty(
|
|
145
|
-
|
|
146
|
-
permissionDiff.push(_concatInstanceProperty(_context12 = "".concat(indent(indentLevel), "\"")).call(_context12, red(oldPermissionName), "\" was removed"));
|
|
138
|
+
_forEachInstanceProperty(_context2 = _Object$keys(mappedOldPermissions)).call(_context2, oldPermissionName => {
|
|
139
|
+
permissionDiff.push(`${indent(indentLevel)}"${red(oldPermissionName)}" was removed`);
|
|
147
140
|
});
|
|
148
141
|
if (permissionDiff.length > 1) return permissionDiff.join('\n');
|
|
149
142
|
return null;
|
|
150
143
|
};
|
|
151
144
|
const getLabelAllLocalesDiff = _ref5 => {
|
|
152
|
-
var
|
|
145
|
+
var _context3;
|
|
153
146
|
let _ref5$previousValue = _ref5.previousValue,
|
|
154
147
|
previousValue = _ref5$previousValue === void 0 ? [] : _ref5$previousValue,
|
|
155
148
|
_ref5$nextValue = _ref5.nextValue,
|
|
156
149
|
nextValue = _ref5$nextValue === void 0 ? [] : _ref5$nextValue,
|
|
157
150
|
_ref5$indentLevel = _ref5.indentLevel,
|
|
158
151
|
indentLevel = _ref5$indentLevel === void 0 ? 0 : _ref5$indentLevel;
|
|
159
|
-
const labelAllLocalesDiff = [
|
|
152
|
+
const labelAllLocalesDiff = [`${indent(indentLevel - 1)}labelAllLocales changed`];
|
|
160
153
|
const mappedOldLabelAllLocales = _reduceInstanceProperty(previousValue).call(previousValue, (previousLabelAllLocale, _ref6) => {
|
|
161
154
|
let locale = _ref6.locale,
|
|
162
155
|
value = _ref6.value;
|
|
@@ -168,8 +161,7 @@ const getLabelAllLocalesDiff = _ref5 => {
|
|
|
168
161
|
if (newLabelAllLocale.locale in mappedOldLabelAllLocales) {
|
|
169
162
|
const oldLocaleValue = mappedOldLabelAllLocales[newLabelAllLocale.locale];
|
|
170
163
|
if (oldLocaleValue !== newLabelAllLocale.value) {
|
|
171
|
-
|
|
172
|
-
labelAllLocalesDiff.push(_concatInstanceProperty(_context13 = _concatInstanceProperty(_context14 = _concatInstanceProperty(_context15 = "".concat(indent(indentLevel), "locale \"")).call(_context15, newLabelAllLocale.locale, "\" changed: ")).call(_context14, red(oldLocaleValue), " => ")).call(_context13, green(newLabelAllLocale.value)));
|
|
164
|
+
labelAllLocalesDiff.push(`${indent(indentLevel)}locale "${newLabelAllLocale.locale}" changed: ${red(oldLocaleValue)} => ${green(newLabelAllLocale.value)}`);
|
|
173
165
|
}
|
|
174
166
|
delete mappedOldLabelAllLocales[newLabelAllLocale.locale];
|
|
175
167
|
} else {
|
|
@@ -183,7 +175,7 @@ const getLabelAllLocalesDiff = _ref5 => {
|
|
|
183
175
|
}
|
|
184
176
|
}
|
|
185
177
|
});
|
|
186
|
-
_forEachInstanceProperty(
|
|
178
|
+
_forEachInstanceProperty(_context3 = _Object$keys(mappedOldLabelAllLocales)).call(_context3, key => {
|
|
187
179
|
const localeDiff = getStringDiff({
|
|
188
180
|
previousValue: key,
|
|
189
181
|
label: 'locale',
|
|
@@ -197,14 +189,14 @@ const getLabelAllLocalesDiff = _ref5 => {
|
|
|
197
189
|
return null;
|
|
198
190
|
};
|
|
199
191
|
const getTypeSettingsDiff = _ref7 => {
|
|
200
|
-
var
|
|
192
|
+
var _context4;
|
|
201
193
|
let previousValue = _ref7.previousValue,
|
|
202
194
|
nextValue = _ref7.nextValue;
|
|
203
195
|
const nonNullablePreviousValue = previousValue || {};
|
|
204
196
|
const nonNullableNextValue = nextValue || {};
|
|
205
197
|
const indentLevel = 1;
|
|
206
|
-
const typeSettingsDiff = [
|
|
207
|
-
_forEachInstanceProperty(
|
|
198
|
+
const typeSettingsDiff = [`${indent(indentLevel - 1)}type settings changed`];
|
|
199
|
+
_forEachInstanceProperty(_context4 = _Object$keys(nonNullablePreviousValue)).call(_context4, key => {
|
|
208
200
|
const typeSettingDiff = getStringDiff({
|
|
209
201
|
previousValue: nonNullablePreviousValue[key],
|
|
210
202
|
nextValue: nonNullableNextValue[key],
|
|
@@ -254,7 +246,7 @@ const getMainMenuLinkDiff = _ref9 => {
|
|
|
254
246
|
indentLevel: 2
|
|
255
247
|
});
|
|
256
248
|
if (mainMenuLinkPermissionsDiff.length > 0) {
|
|
257
|
-
mainMenuLinkDiff.push(
|
|
249
|
+
mainMenuLinkDiff.push(`${indent(1)}permissions changed`);
|
|
258
250
|
mainMenuLinkDiff.push(mainMenuLinkPermissionsDiff);
|
|
259
251
|
}
|
|
260
252
|
const menuLabelsDiff = getLabelAllLocalesDiff({
|
|
@@ -270,7 +262,7 @@ const getMainMenuLinkDiff = _ref9 => {
|
|
|
270
262
|
return null;
|
|
271
263
|
};
|
|
272
264
|
const getSubmenuLinksDiff = _ref10 => {
|
|
273
|
-
var
|
|
265
|
+
var _context6;
|
|
274
266
|
let previousValue = _ref10.previousValue,
|
|
275
267
|
nextValue = _ref10.nextValue;
|
|
276
268
|
const submenuLinksDiff = ['submenuLink changed'];
|
|
@@ -280,9 +272,9 @@ const getSubmenuLinksDiff = _ref10 => {
|
|
|
280
272
|
_forEachInstanceProperty(nextValue).call(nextValue, newSubmenuLink => {
|
|
281
273
|
const oldSubMenuLink = mappedSubmenuLinks[newSubmenuLink.uriPath];
|
|
282
274
|
if (newSubmenuLink.uriPath in mappedSubmenuLinks) {
|
|
283
|
-
var
|
|
284
|
-
const submenuLinkDiff = [
|
|
285
|
-
_forEachInstanceProperty(
|
|
275
|
+
var _context5;
|
|
276
|
+
const submenuLinkDiff = [`${indent(1)}menu link "${newSubmenuLink.uriPath}" changed`];
|
|
277
|
+
_forEachInstanceProperty(_context5 = _Object$keys(mappedSubmenuLinks[newSubmenuLink.uriPath])).call(_context5, key => {
|
|
286
278
|
switch (key) {
|
|
287
279
|
case 'defaultLabel':
|
|
288
280
|
{
|
|
@@ -306,7 +298,7 @@ const getSubmenuLinksDiff = _ref10 => {
|
|
|
306
298
|
indentLevel: 3
|
|
307
299
|
});
|
|
308
300
|
if (submenuLinkPermissionsDiff.length > 0) {
|
|
309
|
-
submenuLinkDiff.push(
|
|
301
|
+
submenuLinkDiff.push(`${indent(2)}permissions changed`);
|
|
310
302
|
submenuLinkDiff.push(submenuLinkPermissionsDiff);
|
|
311
303
|
}
|
|
312
304
|
break;
|
|
@@ -341,7 +333,7 @@ const getSubmenuLinksDiff = _ref10 => {
|
|
|
341
333
|
}
|
|
342
334
|
}
|
|
343
335
|
});
|
|
344
|
-
_forEachInstanceProperty(
|
|
336
|
+
_forEachInstanceProperty(_context6 = _Object$keys(mappedSubmenuLinks)).call(_context6, key => {
|
|
345
337
|
const linksDiff = getStringDiff({
|
|
346
338
|
previousValue: key,
|
|
347
339
|
label: 'menu link',
|
|
@@ -516,18 +508,17 @@ const getCustomViewConfigDiff = (oldConfig, newConfig) => {
|
|
|
516
508
|
|
|
517
509
|
const credentialsStorage = new CredentialsStorage();
|
|
518
510
|
const getMcUrlLink = _ref => {
|
|
519
|
-
var _context, _context2, _context3;
|
|
520
511
|
let mcApiUrl = _ref.mcApiUrl,
|
|
521
512
|
organizationId = _ref.organizationId,
|
|
522
513
|
customEntityId = _ref.customEntityId,
|
|
523
514
|
isCustomView = _ref.isCustomView;
|
|
524
515
|
const mcUrl = mcApiUrl.replace('mc-api', 'mc');
|
|
525
|
-
const customEntityLink =
|
|
516
|
+
const customEntityLink = `${mcUrl}/account/organizations/${organizationId}/custom-${isCustomView ? 'views' : 'applications'}/owned/${customEntityId}`;
|
|
526
517
|
return customEntityLink;
|
|
527
518
|
};
|
|
528
519
|
const isCustomViewData = data => data.entryPointUriPath === undefined;
|
|
529
520
|
async function createOrUpdateCustomApplication(_ref2) {
|
|
530
|
-
var
|
|
521
|
+
var _context3;
|
|
531
522
|
let mcApiUrl = _ref2.mcApiUrl,
|
|
532
523
|
localCustomEntityData = _ref2.localCustomEntityData,
|
|
533
524
|
applicationIdentifier = _ref2.applicationIdentifier,
|
|
@@ -538,14 +529,14 @@ async function createOrUpdateCustomApplication(_ref2) {
|
|
|
538
529
|
applicationIdentifier
|
|
539
530
|
});
|
|
540
531
|
if (!fetchedCustomApplication) {
|
|
541
|
-
var
|
|
532
|
+
var _context2;
|
|
542
533
|
const userOrganizations = await fetchUserOrganizations({
|
|
543
534
|
mcApiUrl,
|
|
544
535
|
applicationIdentifier
|
|
545
536
|
});
|
|
546
537
|
let organizationId, organizationName;
|
|
547
538
|
if (userOrganizations.total === 0) {
|
|
548
|
-
throw new Error(
|
|
539
|
+
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.`);
|
|
549
540
|
}
|
|
550
541
|
if (userOrganizations.total === 1) {
|
|
551
542
|
const _userOrganizations$re = _slicedToArray(userOrganizations.results, 1),
|
|
@@ -553,8 +544,8 @@ async function createOrUpdateCustomApplication(_ref2) {
|
|
|
553
544
|
organizationId = organization.id;
|
|
554
545
|
organizationName = organization.name;
|
|
555
546
|
} else {
|
|
556
|
-
var
|
|
557
|
-
const organizationChoices = _mapInstanceProperty(
|
|
547
|
+
var _context;
|
|
548
|
+
const organizationChoices = _mapInstanceProperty(_context = userOrganizations.results).call(_context, organization => ({
|
|
558
549
|
title: organization.name,
|
|
559
550
|
value: organization.id
|
|
560
551
|
}));
|
|
@@ -567,7 +558,7 @@ async function createOrUpdateCustomApplication(_ref2) {
|
|
|
567
558
|
}),
|
|
568
559
|
selectedOrganizationId = _await$prompts.organizationId;
|
|
569
560
|
if (!selectedOrganizationId) {
|
|
570
|
-
throw new Error(
|
|
561
|
+
throw new Error(`No Organization selected, aborting.`);
|
|
571
562
|
}
|
|
572
563
|
organizationId = selectedOrganizationId;
|
|
573
564
|
organizationName = _findInstanceProperty(organizationChoices).call(organizationChoices, _ref3 => {
|
|
@@ -578,7 +569,7 @@ async function createOrUpdateCustomApplication(_ref2) {
|
|
|
578
569
|
const _await$prompts2 = await prompts({
|
|
579
570
|
type: 'text',
|
|
580
571
|
name: 'confirmation',
|
|
581
|
-
message: _filterInstanceProperty(
|
|
572
|
+
message: _filterInstanceProperty(_context2 = [`You are about to create a new Custom Application in the "${chalk.green(organizationName)}" organization. Are you sure you want to proceed?`, options.dryRun && chalk.gray('Using "--dry-run", no data will be created.')]).call(_context2, Boolean).join('\n'),
|
|
582
573
|
initial: 'yes'
|
|
583
574
|
}),
|
|
584
575
|
confirmation = _await$prompts2.confirmation;
|
|
@@ -589,7 +580,7 @@ async function createOrUpdateCustomApplication(_ref2) {
|
|
|
589
580
|
const data = omit(localCustomEntityData, ['id']);
|
|
590
581
|
if (options.dryRun) {
|
|
591
582
|
console.log();
|
|
592
|
-
console.log(
|
|
583
|
+
console.log(`The following payload would be used to create a new Custom Application.`);
|
|
593
584
|
console.log();
|
|
594
585
|
console.log(chalk.gray(_JSON$stringify(data, null, 2)));
|
|
595
586
|
return;
|
|
@@ -613,8 +604,8 @@ async function createOrUpdateCustomApplication(_ref2) {
|
|
|
613
604
|
organizationId,
|
|
614
605
|
customEntityId: createdCustomApplication.id
|
|
615
606
|
});
|
|
616
|
-
console.log(chalk.green(
|
|
617
|
-
console.log(
|
|
607
|
+
console.log(chalk.green(`Custom Application created.\nPlease update the "env.production.applicationId" field in your local Custom Application config file with the following value: "${chalk.green(createdCustomApplication.id)}".`));
|
|
608
|
+
console.log(`You can inspect the Custom Application data in the Merchant Center at "${chalk.gray(customAppLink)}".`);
|
|
618
609
|
return;
|
|
619
610
|
}
|
|
620
611
|
const customAppLink = getMcUrlLink({
|
|
@@ -624,8 +615,8 @@ async function createOrUpdateCustomApplication(_ref2) {
|
|
|
624
615
|
});
|
|
625
616
|
const configDiff = getCustomApplicationConfigDiff(fetchedCustomApplication.application, localCustomEntityData);
|
|
626
617
|
if (!configDiff) {
|
|
627
|
-
console.log(chalk.green(
|
|
628
|
-
console.log(
|
|
618
|
+
console.log(chalk.green(`Custom Application up-to-date.`));
|
|
619
|
+
console.log(`You can inspect the Custom Application data in the Merchant Center at "${chalk.gray(customAppLink)}".`);
|
|
629
620
|
return;
|
|
630
621
|
}
|
|
631
622
|
console.log('Changes detected:');
|
|
@@ -634,7 +625,7 @@ async function createOrUpdateCustomApplication(_ref2) {
|
|
|
634
625
|
const _await$prompts3 = await prompts({
|
|
635
626
|
type: 'text',
|
|
636
627
|
name: 'confirmation',
|
|
637
|
-
message: _filterInstanceProperty(
|
|
628
|
+
message: _filterInstanceProperty(_context3 = [`You are about to update the Custom Application "${chalk.green(localCustomEntityData.entryPointUriPath)}" with the changes above. Are you sure you want to proceed?`, options.dryRun && chalk.gray('Using "--dry-run", no data will be updated.')]).call(_context3, Boolean).join('\n'),
|
|
638
629
|
initial: 'yes'
|
|
639
630
|
}),
|
|
640
631
|
confirmation = _await$prompts3.confirmation;
|
|
@@ -645,7 +636,7 @@ async function createOrUpdateCustomApplication(_ref2) {
|
|
|
645
636
|
const data = omit(localCustomEntityData, ['id']);
|
|
646
637
|
if (options.dryRun) {
|
|
647
638
|
console.log();
|
|
648
|
-
console.log(
|
|
639
|
+
console.log(`The following payload would be used to update the Custom Application "${chalk.green(data.entryPointUriPath)}".`);
|
|
649
640
|
console.log();
|
|
650
641
|
console.log(chalk.gray(_JSON$stringify(data, null, 2)));
|
|
651
642
|
return;
|
|
@@ -657,11 +648,11 @@ async function createOrUpdateCustomApplication(_ref2) {
|
|
|
657
648
|
applicationId: fetchedCustomApplication.application.id,
|
|
658
649
|
applicationIdentifier
|
|
659
650
|
});
|
|
660
|
-
console.log(chalk.green(
|
|
661
|
-
console.log(
|
|
651
|
+
console.log(chalk.green(`Custom Application updated.`));
|
|
652
|
+
console.log(`You can inspect the Custom Application data in the Merchant Center at "${chalk.gray(customAppLink)}".`);
|
|
662
653
|
}
|
|
663
654
|
async function createOrUpdateCustomView(_ref4) {
|
|
664
|
-
var
|
|
655
|
+
var _context6;
|
|
665
656
|
let mcApiUrl = _ref4.mcApiUrl,
|
|
666
657
|
localCustomEntityData = _ref4.localCustomEntityData,
|
|
667
658
|
customViewId = _ref4.customViewId,
|
|
@@ -673,7 +664,7 @@ async function createOrUpdateCustomView(_ref4) {
|
|
|
673
664
|
applicationIdentifier
|
|
674
665
|
});
|
|
675
666
|
if (!fetchedCustomView) {
|
|
676
|
-
var
|
|
667
|
+
var _context5;
|
|
677
668
|
const userOrganizations = await fetchUserOrganizations({
|
|
678
669
|
mcApiUrl,
|
|
679
670
|
customViewId,
|
|
@@ -681,7 +672,7 @@ async function createOrUpdateCustomView(_ref4) {
|
|
|
681
672
|
});
|
|
682
673
|
let organizationId, organizationName;
|
|
683
674
|
if (userOrganizations.total === 0) {
|
|
684
|
-
throw new Error(
|
|
675
|
+
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.`);
|
|
685
676
|
}
|
|
686
677
|
if (userOrganizations.total === 1) {
|
|
687
678
|
const _userOrganizations$re2 = _slicedToArray(userOrganizations.results, 1),
|
|
@@ -689,8 +680,8 @@ async function createOrUpdateCustomView(_ref4) {
|
|
|
689
680
|
organizationId = organization.id;
|
|
690
681
|
organizationName = organization.name;
|
|
691
682
|
} else {
|
|
692
|
-
var
|
|
693
|
-
const organizationChoices = _mapInstanceProperty(
|
|
683
|
+
var _context4;
|
|
684
|
+
const organizationChoices = _mapInstanceProperty(_context4 = userOrganizations.results).call(_context4, organization => ({
|
|
694
685
|
title: organization.name,
|
|
695
686
|
value: organization.id
|
|
696
687
|
}));
|
|
@@ -703,7 +694,7 @@ async function createOrUpdateCustomView(_ref4) {
|
|
|
703
694
|
}),
|
|
704
695
|
selectedOrganizationId = _await$prompts4.organizationId;
|
|
705
696
|
if (!selectedOrganizationId) {
|
|
706
|
-
throw new Error(
|
|
697
|
+
throw new Error(`No Organization selected, aborting.`);
|
|
707
698
|
}
|
|
708
699
|
organizationId = selectedOrganizationId;
|
|
709
700
|
organizationName = _findInstanceProperty(organizationChoices).call(organizationChoices, _ref5 => {
|
|
@@ -714,7 +705,7 @@ async function createOrUpdateCustomView(_ref4) {
|
|
|
714
705
|
const _await$prompts5 = await prompts({
|
|
715
706
|
type: 'text',
|
|
716
707
|
name: 'confirmation',
|
|
717
|
-
message: _filterInstanceProperty(
|
|
708
|
+
message: _filterInstanceProperty(_context5 = [`You are about to create a new Custom View in the "${chalk.green(organizationName)}" organization. Are you sure you want to proceed?`, options.dryRun && chalk.gray('Using "--dry-run", no data will be created.')]).call(_context5, Boolean).join('\n'),
|
|
718
709
|
initial: 'yes'
|
|
719
710
|
}),
|
|
720
711
|
confirmation = _await$prompts5.confirmation;
|
|
@@ -725,7 +716,7 @@ async function createOrUpdateCustomView(_ref4) {
|
|
|
725
716
|
const data = omit(localCustomEntityData, ['id']);
|
|
726
717
|
if (options.dryRun) {
|
|
727
718
|
console.log();
|
|
728
|
-
console.log(
|
|
719
|
+
console.log(`The following payload would be used to create a new Custom View.`);
|
|
729
720
|
console.log();
|
|
730
721
|
console.log(chalk.gray(_JSON$stringify(data, null, 2)));
|
|
731
722
|
return;
|
|
@@ -750,20 +741,20 @@ async function createOrUpdateCustomView(_ref4) {
|
|
|
750
741
|
customEntityId: createdCustomView.id,
|
|
751
742
|
isCustomView: true
|
|
752
743
|
});
|
|
753
|
-
console.log(chalk.green(
|
|
754
|
-
console.log(
|
|
744
|
+
console.log(chalk.green(`Custom View created.\nPlease update the "env.production.customViewId" field in your local Custom View config file with the following value: "${chalk.green(createdCustomView.id)}".`));
|
|
745
|
+
console.log(`You can inspect the Custom View data in the Merchant Center at "${chalk.gray(customViewLink)}".`);
|
|
755
746
|
return;
|
|
756
747
|
}
|
|
757
748
|
const customViewLink = getMcUrlLink({
|
|
758
749
|
mcApiUrl,
|
|
759
750
|
organizationId: fetchedCustomView.organizationId,
|
|
760
|
-
customEntityId:
|
|
751
|
+
customEntityId: fetchedCustomView?.customView?.id || '',
|
|
761
752
|
isCustomView: true
|
|
762
753
|
});
|
|
763
754
|
const configDiff = getCustomViewConfigDiff(fetchedCustomView.customView, localCustomEntityData);
|
|
764
755
|
if (!configDiff) {
|
|
765
|
-
console.log(chalk.green(
|
|
766
|
-
console.log(
|
|
756
|
+
console.log(chalk.green(`Custom View up-to-date.`));
|
|
757
|
+
console.log(`You can inspect the Custom View data in the Merchant Center at "${chalk.gray(customViewLink)}".`);
|
|
767
758
|
return;
|
|
768
759
|
}
|
|
769
760
|
console.log('Changes detected:');
|
|
@@ -772,7 +763,7 @@ async function createOrUpdateCustomView(_ref4) {
|
|
|
772
763
|
const _await$prompts6 = await prompts({
|
|
773
764
|
type: 'text',
|
|
774
765
|
name: 'confirmation',
|
|
775
|
-
message: _filterInstanceProperty(
|
|
766
|
+
message: _filterInstanceProperty(_context6 = [`You are about to update the Custom View "${chalk.green(localCustomEntityData.defaultLabel)}" with the changes above. Are you sure you want to proceed?`, options.dryRun && chalk.gray('Using "--dry-run", no data will be updated.')]).call(_context6, Boolean).join('\n'),
|
|
776
767
|
initial: 'yes'
|
|
777
768
|
}),
|
|
778
769
|
confirmation = _await$prompts6.confirmation;
|
|
@@ -783,7 +774,7 @@ async function createOrUpdateCustomView(_ref4) {
|
|
|
783
774
|
const data = omit(localCustomEntityData, ['id']);
|
|
784
775
|
if (options.dryRun) {
|
|
785
776
|
console.log();
|
|
786
|
-
console.log(
|
|
777
|
+
console.log(`The following payload would be used to update the Custom View "${chalk.green(data.defaultLabel)}".`);
|
|
787
778
|
console.log();
|
|
788
779
|
console.log(chalk.gray(_JSON$stringify(data, null, 2)));
|
|
789
780
|
return;
|
|
@@ -792,11 +783,11 @@ async function createOrUpdateCustomView(_ref4) {
|
|
|
792
783
|
mcApiUrl,
|
|
793
784
|
organizationId: fetchedCustomView.organizationId,
|
|
794
785
|
data: omit(localCustomEntityData, ['id']),
|
|
795
|
-
customViewId:
|
|
786
|
+
customViewId: fetchedCustomView?.customView?.id || '',
|
|
796
787
|
applicationIdentifier
|
|
797
788
|
});
|
|
798
|
-
console.log(chalk.green(
|
|
799
|
-
console.log(
|
|
789
|
+
console.log(chalk.green(`Custom View updated.`));
|
|
790
|
+
console.log(`You can inspect the Custom View data in the Merchant Center at "${chalk.gray(customViewLink)}".`);
|
|
800
791
|
}
|
|
801
792
|
async function run(options) {
|
|
802
793
|
const applicationConfig = processConfig();
|
|
@@ -805,11 +796,11 @@ async function run(options) {
|
|
|
805
796
|
mcApiUrl = _applicationConfig$en.mcApiUrl,
|
|
806
797
|
applicationIdentifier = _applicationConfig$en.applicationIdentifier,
|
|
807
798
|
customViewId = _applicationConfig$en.customViewId;
|
|
808
|
-
console.log(
|
|
799
|
+
console.log(`Using Merchant Center environment "${chalk.green(mcApiUrl)}".`);
|
|
809
800
|
console.log();
|
|
810
801
|
const isSessionValid = credentialsStorage.isSessionValid(mcApiUrl);
|
|
811
802
|
if (!isSessionValid) {
|
|
812
|
-
throw new Error(
|
|
803
|
+
throw new Error(`You don't have a valid session. Please, run the "mc-scripts login" command to authenticate yourself.`);
|
|
813
804
|
}
|
|
814
805
|
if (isCustomViewData(localCustomEntityData)) {
|
|
815
806
|
createOrUpdateCustomView({
|
|
@@ -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-378cc0b4.cjs.prod.js');
|
|
6
6
|
|
|
7
7
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
8
8
|
|
package/dist/{create-postcss-config-0617df94.cjs.dev.js → create-postcss-config-ce058cc5.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-3a9024e1.cjs.dev.js');
|
|
6
6
|
|
|
7
7
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
8
8
|
|
package/dist/{create-postcss-config-807412fe.esm.js → create-postcss-config-e3ad83aa.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-9a7b7976.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
|
|
@@ -25,9 +25,9 @@ var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
|
|
|
25
25
|
var _Object$assign = require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
26
26
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
27
27
|
var mcHtmlTemplate = require('@commercetools-frontend/mc-html-template');
|
|
28
|
-
var createPostcssConfig = require('./create-postcss-config-
|
|
28
|
+
var createPostcssConfig = require('./create-postcss-config-ce058cc5.cjs.dev.js');
|
|
29
29
|
var hasJsxRuntime = require('./has-jsx-runtime-aa5d21ee.cjs.dev.js');
|
|
30
|
-
var paths = require('./paths-
|
|
30
|
+
var paths = require('./paths-b76fc753.cjs.dev.js');
|
|
31
31
|
var vendorsToTranspile = require('./vendors-to-transpile-6ab4ea06.cjs.dev.js');
|
|
32
32
|
|
|
33
33
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
@@ -150,7 +150,7 @@ function createWebpackConfigForDevelopment() {
|
|
|
150
150
|
// https://github.com/facebook/create-react-app/issues/290
|
|
151
151
|
// `web` extension prefixes have been added for better support
|
|
152
152
|
// for React Native Web.
|
|
153
|
-
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 => `.${ext}`),
|
|
154
154
|
// NOTE: this is meant to be a temporary list of fallback/polyfills for certain
|
|
155
155
|
// nodejs modules. With Webpack <5 these polyfills were included by default in Webpack,
|
|
156
156
|
// however now it's not the case anymore.
|
|
@@ -304,9 +304,9 @@ function createWebpackConfigForDevelopment() {
|
|
|
304
304
|
name: 'prefixIds',
|
|
305
305
|
params: {
|
|
306
306
|
delim: '',
|
|
307
|
-
prefix: (_, info) =>
|
|
307
|
+
prefix: (_, info) => `svg${crypto__default["default"].createHash('shake256', {
|
|
308
308
|
outputLength: 6
|
|
309
|
-
}).update(info.path || '').digest('hex')
|
|
309
|
+
}).update(info.path || '').digest('hex')}`
|
|
310
310
|
}
|
|
311
311
|
}]
|
|
312
312
|
}
|
|
@@ -23,9 +23,9 @@ import _createClass from '@babel/runtime-corejs3/helpers/esm/createClass';
|
|
|
23
23
|
import _Object$assign from '@babel/runtime-corejs3/core-js-stable/object/assign';
|
|
24
24
|
import { processConfig } from '@commercetools-frontend/application-config';
|
|
25
25
|
import { replaceHtmlPlaceholders } from '@commercetools-frontend/mc-html-template';
|
|
26
|
-
import { c as createPostcssConfig } from './create-postcss-config-
|
|
26
|
+
import { c as createPostcssConfig } from './create-postcss-config-e3ad83aa.esm.js';
|
|
27
27
|
import { h as hasJsxRuntime } from './has-jsx-runtime-e3ecb09b.esm.js';
|
|
28
|
-
import { p as paths } from './paths-
|
|
28
|
+
import { p as paths } from './paths-39f22b8b.esm.js';
|
|
29
29
|
import { v as vendorsToTranspile } from './vendors-to-transpile-7dc84a72.esm.js';
|
|
30
30
|
|
|
31
31
|
let LocalHtmlWebpackPlugin = /*#__PURE__*/function () {
|
|
@@ -125,7 +125,7 @@ function createWebpackConfigForDevelopment() {
|
|
|
125
125
|
// https://github.com/facebook/create-react-app/issues/290
|
|
126
126
|
// `web` extension prefixes have been added for better support
|
|
127
127
|
// for React Native Web.
|
|
128
|
-
extensions: _mapInstanceProperty(_context = ['js', 'mjs', 'cjs', 'ts', 'tsx', 'json', 'jsx']).call(_context, ext =>
|
|
128
|
+
extensions: _mapInstanceProperty(_context = ['js', 'mjs', 'cjs', 'ts', 'tsx', 'json', 'jsx']).call(_context, ext => `.${ext}`),
|
|
129
129
|
// NOTE: this is meant to be a temporary list of fallback/polyfills for certain
|
|
130
130
|
// nodejs modules. With Webpack <5 these polyfills were included by default in Webpack,
|
|
131
131
|
// however now it's not the case anymore.
|
|
@@ -279,9 +279,9 @@ function createWebpackConfigForDevelopment() {
|
|
|
279
279
|
name: 'prefixIds',
|
|
280
280
|
params: {
|
|
281
281
|
delim: '',
|
|
282
|
-
prefix: (_, info) =>
|
|
282
|
+
prefix: (_, info) => `svg${crypto.createHash('shake256', {
|
|
283
283
|
outputLength: 6
|
|
284
|
-
}).update(info.path || '').digest('hex')
|
|
284
|
+
}).update(info.path || '').digest('hex')}`
|
|
285
285
|
}
|
|
286
286
|
}]
|
|
287
287
|
}
|
|
@@ -25,9 +25,9 @@ var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
|
|
|
25
25
|
var _Object$assign = require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
26
26
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
27
27
|
var mcHtmlTemplate = require('@commercetools-frontend/mc-html-template');
|
|
28
|
-
var createPostcssConfig = require('./create-postcss-config-
|
|
28
|
+
var createPostcssConfig = require('./create-postcss-config-4636f5c9.cjs.prod.js');
|
|
29
29
|
var hasJsxRuntime = require('./has-jsx-runtime-c3202df5.cjs.prod.js');
|
|
30
|
-
var paths = require('./paths-
|
|
30
|
+
var paths = require('./paths-7768b440.cjs.prod.js');
|
|
31
31
|
var vendorsToTranspile = require('./vendors-to-transpile-04a49d40.cjs.prod.js');
|
|
32
32
|
|
|
33
33
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
@@ -150,7 +150,7 @@ function createWebpackConfigForDevelopment() {
|
|
|
150
150
|
// https://github.com/facebook/create-react-app/issues/290
|
|
151
151
|
// `web` extension prefixes have been added for better support
|
|
152
152
|
// for React Native Web.
|
|
153
|
-
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 => `.${ext}`),
|
|
154
154
|
// NOTE: this is meant to be a temporary list of fallback/polyfills for certain
|
|
155
155
|
// nodejs modules. With Webpack <5 these polyfills were included by default in Webpack,
|
|
156
156
|
// however now it's not the case anymore.
|
|
@@ -304,9 +304,9 @@ function createWebpackConfigForDevelopment() {
|
|
|
304
304
|
name: 'prefixIds',
|
|
305
305
|
params: {
|
|
306
306
|
delim: '',
|
|
307
|
-
prefix: (_, info) =>
|
|
307
|
+
prefix: (_, info) => `svg${crypto__default["default"].createHash('shake256', {
|
|
308
308
|
outputLength: 6
|
|
309
|
-
}).update(info.path || '').digest('hex')
|
|
309
|
+
}).update(info.path || '').digest('hex')}`
|
|
310
310
|
}
|
|
311
311
|
}]
|
|
312
312
|
}
|