@commercetools-frontend/application-config 20.10.1 → 20.11.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/dist/commercetools-frontend-application-config.cjs.dev.js +41 -34
- package/dist/commercetools-frontend-application-config.cjs.prod.js +41 -34
- package/dist/commercetools-frontend-application-config.esm.js +9 -2
- package/dist/declarations/src/schema.d.ts +1 -0
- package/package.json +3 -6
- package/schema.json +3 -0
|
@@ -59,9 +59,9 @@ var uniq__default = /*#__PURE__*/_interopDefault(uniq);
|
|
|
59
59
|
var _trimInstanceProperty__default = /*#__PURE__*/_interopDefault(_trimInstanceProperty);
|
|
60
60
|
var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
|
|
61
61
|
|
|
62
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default[
|
|
62
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
63
63
|
|
|
64
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct__default[
|
|
64
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
65
65
|
|
|
66
66
|
var MissingOrInvalidConfigError = /*#__PURE__*/function (_Error) {
|
|
67
67
|
_inherits(MissingOrInvalidConfigError, _Error);
|
|
@@ -75,7 +75,7 @@ var MissingOrInvalidConfigError = /*#__PURE__*/function (_Error) {
|
|
|
75
75
|
|
|
76
76
|
_this = _super.call(this, message);
|
|
77
77
|
|
|
78
|
-
_Object$defineProperty__default[
|
|
78
|
+
_Object$defineProperty__default["default"](_assertThisInitialized(_this), 'name', {
|
|
79
79
|
value: 'MissingOrInvalidConfigError'
|
|
80
80
|
});
|
|
81
81
|
|
|
@@ -88,26 +88,26 @@ var MissingOrInvalidConfigError = /*#__PURE__*/function (_Error) {
|
|
|
88
88
|
// for instance in respect to both source files and dist files.
|
|
89
89
|
|
|
90
90
|
var findPackageRootPath = function findPackageRootPath(dir) {
|
|
91
|
-
var packageJsonPath = path__default[
|
|
91
|
+
var packageJsonPath = path__default["default"].join(dir, 'package.json');
|
|
92
92
|
|
|
93
|
-
if (fs__default[
|
|
93
|
+
if (fs__default["default"].existsSync(packageJsonPath)) {
|
|
94
94
|
return dir;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
var parentDir = path__default[
|
|
97
|
+
var parentDir = path__default["default"].join(dir, '..');
|
|
98
98
|
return findPackageRootPath(parentDir);
|
|
99
99
|
};
|
|
100
100
|
|
|
101
101
|
var loadJsModule = function loadJsModule(filePath) {
|
|
102
102
|
var packageRootPath = findPackageRootPath( // Start from the parent folder
|
|
103
|
-
path__default[
|
|
103
|
+
path__default["default"].join(__dirname, '..')); // Load the JS module using a child process. This is primarly to avoid
|
|
104
104
|
// unwanted behaviors using `@babel/register` in the main process.
|
|
105
105
|
// The loader script does the actual `require` of the given `filePath`
|
|
106
106
|
// and uses `@babel/register` to correctly parse and execute the file.
|
|
107
107
|
// The "required module output" is then written into `stdout` and parsed
|
|
108
108
|
// as JSON.
|
|
109
109
|
|
|
110
|
-
var output = child_process.execFileSync(path__default[
|
|
110
|
+
var output = child_process.execFileSync(path__default["default"].join(packageRootPath, 'scripts/load-js-module.js'), [filePath], {
|
|
111
111
|
encoding: 'utf8'
|
|
112
112
|
});
|
|
113
113
|
return JSON.parse(output);
|
|
@@ -287,6 +287,9 @@ var schemaJson = {
|
|
|
287
287
|
},
|
|
288
288
|
"style-src": {
|
|
289
289
|
$ref: "#/definitions/cspDirective"
|
|
290
|
+
},
|
|
291
|
+
"frame-src": {
|
|
292
|
+
$ref: "#/definitions/cspDirective"
|
|
290
293
|
}
|
|
291
294
|
},
|
|
292
295
|
additionalProperties: false,
|
|
@@ -457,7 +460,7 @@ var schemaJson = {
|
|
|
457
460
|
]
|
|
458
461
|
};
|
|
459
462
|
|
|
460
|
-
var ajv = new Ajv__default[
|
|
463
|
+
var ajv = new Ajv__default["default"]({
|
|
461
464
|
strict: true,
|
|
462
465
|
useDefaults: true
|
|
463
466
|
});
|
|
@@ -468,17 +471,17 @@ var printErrors = function printErrors(errors) {
|
|
|
468
471
|
return 'No errors';
|
|
469
472
|
}
|
|
470
473
|
|
|
471
|
-
return _mapInstanceProperty__default[
|
|
474
|
+
return _mapInstanceProperty__default["default"](errors).call(errors, function (error) {
|
|
472
475
|
var _context, _context2, _context3;
|
|
473
476
|
|
|
474
|
-
var baseMessage = _concatInstanceProperty__default[
|
|
477
|
+
var baseMessage = _concatInstanceProperty__default["default"](_context = "".concat(error.instancePath, " ")).call(_context, error.message);
|
|
475
478
|
|
|
476
479
|
switch (error.keyword) {
|
|
477
480
|
case 'additionalProperties':
|
|
478
|
-
return _concatInstanceProperty__default[
|
|
481
|
+
return _concatInstanceProperty__default["default"](_context2 = "".concat(baseMessage, ": ")).call(_context2, error.params.additionalProperty);
|
|
479
482
|
|
|
480
483
|
case 'enum':
|
|
481
|
-
return _concatInstanceProperty__default[
|
|
484
|
+
return _concatInstanceProperty__default["default"](_context3 = "".concat(baseMessage, ": ")).call(_context3, error.params.allowedValues.toString());
|
|
482
485
|
|
|
483
486
|
default:
|
|
484
487
|
return baseMessage;
|
|
@@ -531,7 +534,7 @@ var mapCloudIdentifierToApiUrl = function mapCloudIdentifierToApiUrl(key) {
|
|
|
531
534
|
default:
|
|
532
535
|
// We would probably never get to this point, as the JSON schema validation
|
|
533
536
|
// kicks in before.
|
|
534
|
-
throw new Error(_concatInstanceProperty__default[
|
|
537
|
+
throw new Error(_concatInstanceProperty__default["default"](_context = "Unknown cloud identifier \"".concat(key, "\". Supported values: ")).call(_context, _Object$values__default["default"](CLOUD_IDENTIFIERS).toString()));
|
|
535
538
|
}
|
|
536
539
|
};
|
|
537
540
|
|
|
@@ -540,7 +543,7 @@ var getUniqueValues = function getUniqueValues() {
|
|
|
540
543
|
|
|
541
544
|
var initialValues = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
542
545
|
var additionalValues = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
543
|
-
return uniq__default[
|
|
546
|
+
return uniq__default["default"](_concatInstanceProperty__default["default"](_context2 = []).call(_context2, _toConsumableArray(initialValues), _toConsumableArray(additionalValues)));
|
|
544
547
|
};
|
|
545
548
|
|
|
546
549
|
var nonProductionEnvironment = ['development', 'test'];
|
|
@@ -550,7 +553,7 @@ var getIsProd = function getIsProd(env) {
|
|
|
550
553
|
// a production environment unless it's one of `development` or `test`.
|
|
551
554
|
// This allows to use for example the `staging` value, which from the
|
|
552
555
|
// application perspective is still considered a production environment.
|
|
553
|
-
env.MC_APP_ENV ? !_includesInstanceProperty__default[
|
|
556
|
+
env.MC_APP_ENV ? !_includesInstanceProperty__default["default"](nonProductionEnvironment).call(nonProductionEnvironment, env.MC_APP_ENV) : env.NODE_ENV === 'production'
|
|
554
557
|
);
|
|
555
558
|
};
|
|
556
559
|
|
|
@@ -605,7 +608,7 @@ var substituteEnvVariablePlaceholder = function substituteEnvVariablePlaceholder
|
|
|
605
608
|
if (!hasEnvField) {
|
|
606
609
|
var _context;
|
|
607
610
|
|
|
608
|
-
throw new Error(_concatInstanceProperty__default[
|
|
611
|
+
throw new Error(_concatInstanceProperty__default["default"](_context = "Missing environment variable '".concat(requestedEnvVar, "' specified in config as 'env:")).call(_context, requestedEnvVar, "'."));
|
|
609
612
|
}
|
|
610
613
|
|
|
611
614
|
var escapedMatchedString = matchedString.replace(/[${}:]/g, '\\$&');
|
|
@@ -629,7 +632,7 @@ var substituteIntlVariablePlaceholder = function substituteIntlVariablePlacehold
|
|
|
629
632
|
if (!hasIntlMessage) {
|
|
630
633
|
var _context2, _context3;
|
|
631
634
|
|
|
632
|
-
throw new Error(_concatInstanceProperty__default[
|
|
635
|
+
throw new Error(_concatInstanceProperty__default["default"](_context2 = _concatInstanceProperty__default["default"](_context3 = "Missing message key '".concat(requestedIntlMessageId, "' specified in config as 'intl:")).call(_context3, locale, ":")).call(_context2, requestedIntlMessageId, "'."));
|
|
633
636
|
}
|
|
634
637
|
|
|
635
638
|
var escapedMatchedString = matchedString.replace(/[${}:]/g, '\\$&');
|
|
@@ -641,7 +644,7 @@ var substituteFilePathVariablePlaceholder = function substituteFilePathVariableP
|
|
|
641
644
|
_valueOfPlaceholder$s6 = _slicedToArray(_valueOfPlaceholder$s5, 2),
|
|
642
645
|
filePathOrModule = _valueOfPlaceholder$s6[1];
|
|
643
646
|
|
|
644
|
-
var content = fs__default[
|
|
647
|
+
var content = fs__default["default"].readFileSync(require.resolve(filePathOrModule, {
|
|
645
648
|
// Relative paths should be resolved from the application folder.
|
|
646
649
|
paths: [meta.applicationPath]
|
|
647
650
|
}), {
|
|
@@ -653,12 +656,12 @@ var substituteFilePathVariablePlaceholder = function substituteFilePathVariableP
|
|
|
653
656
|
|
|
654
657
|
var getValueOfPlaceholder = function getValueOfPlaceholder(valueWithPlaceholder) {
|
|
655
658
|
return valueWithPlaceholder.replace(variableSyntax, function (_match, varName) {
|
|
656
|
-
return _trimInstanceProperty__default[
|
|
659
|
+
return _trimInstanceProperty__default["default"](varName).call(varName);
|
|
657
660
|
}).replace(/\s/g, '');
|
|
658
661
|
};
|
|
659
662
|
|
|
660
663
|
var substituteVariablePlaceholders = function substituteVariablePlaceholders(config, meta) {
|
|
661
|
-
return JSON.parse(_JSON$stringify__default[
|
|
664
|
+
return JSON.parse(_JSON$stringify__default["default"](config), function (_key, value) {
|
|
662
665
|
// Only strings are allowed
|
|
663
666
|
var substitutedValue = value;
|
|
664
667
|
|
|
@@ -666,7 +669,7 @@ var substituteVariablePlaceholders = function substituteVariablePlaceholders(con
|
|
|
666
669
|
var matchResult = substitutedValue.match(variableSyntax);
|
|
667
670
|
|
|
668
671
|
if (matchResult) {
|
|
669
|
-
_forEachInstanceProperty__default[
|
|
672
|
+
_forEachInstanceProperty__default["default"](matchResult).call(matchResult, function (matchedString) {
|
|
670
673
|
var valueOfPlaceholder = getValueOfPlaceholder(matchedString);
|
|
671
674
|
|
|
672
675
|
if (isEnvVariablePlaceholder(valueOfPlaceholder)) {
|
|
@@ -684,10 +687,12 @@ var substituteVariablePlaceholders = function substituteVariablePlaceholders(con
|
|
|
684
687
|
});
|
|
685
688
|
};
|
|
686
689
|
|
|
687
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default[
|
|
690
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); if (enumerableOnly) { symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
688
691
|
|
|
689
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context3; _forEachInstanceProperty__default[
|
|
690
|
-
|
|
692
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context3; _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(source), true)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors__default["default"]) { _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)); } else { var _context4; _forEachInstanceProperty__default["default"](_context4 = ownKeys(Object(source))).call(_context4, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } } return target; }
|
|
693
|
+
// TODO: make it configurable.
|
|
694
|
+
var developmentPort = 3001;
|
|
695
|
+
var developmentAppUrl = "http://localhost:".concat(developmentPort);
|
|
691
696
|
|
|
692
697
|
var omitDevConfigIfEmpty = function omitDevConfigIfEmpty(devConfig) {
|
|
693
698
|
if ( // @ts-expect-error: the `accountLinks` is not explicitly typed as it's only used by the account app.
|
|
@@ -708,7 +713,7 @@ var processConfig = function processConfig() {
|
|
|
708
713
|
_ref$processEnv = _ref.processEnv,
|
|
709
714
|
processEnv = _ref$processEnv === void 0 ? process.env : _ref$processEnv,
|
|
710
715
|
_ref$applicationPath = _ref.applicationPath,
|
|
711
|
-
applicationPath = _ref$applicationPath === void 0 ? fs__default[
|
|
716
|
+
applicationPath = _ref$applicationPath === void 0 ? fs__default["default"].realpathSync(process.cwd()) : _ref$applicationPath;
|
|
712
717
|
|
|
713
718
|
if (cachedConfig && !disableCache) return cachedConfig;
|
|
714
719
|
var appEnvKey = (_ref2 = (_processEnv$MC_APP_EN = processEnv.MC_APP_ENV) !== null && _processEnv$MC_APP_EN !== void 0 ? _processEnv$MC_APP_EN : processEnv.NODE_ENV) !== null && _ref2 !== void 0 ? _ref2 : 'development';
|
|
@@ -727,15 +732,15 @@ var processConfig = function processConfig() {
|
|
|
727
732
|
|
|
728
733
|
var envAppUrl = isProd ? appConfig.env.production.url : developmentAppUrl;
|
|
729
734
|
var appUrl = getOrThrow(function () {
|
|
730
|
-
return new _URL__default[
|
|
735
|
+
return new _URL__default["default"](envAppUrl);
|
|
731
736
|
}, "Invalid application URL: \"".concat(envAppUrl, "\"")); // Use `||` instead of `??` to include empty string values.
|
|
732
737
|
|
|
733
738
|
var envCdnUrl = isProd ? appConfig.env.production.cdnUrl || appUrl.href : developmentAppUrl;
|
|
734
739
|
var cdnUrl = getOrThrow(function () {
|
|
735
|
-
return new _URL__default[
|
|
740
|
+
return new _URL__default["default"](envCdnUrl);
|
|
736
741
|
}, "Invalid application CDN URL: \"".concat(envCdnUrl, "\""));
|
|
737
742
|
var mcApiUrl = getOrThrow(function () {
|
|
738
|
-
return new _URL__default[
|
|
743
|
+
return new _URL__default["default"]( // Use `||` instead of `??` to include empty string values.
|
|
739
744
|
appConfig.mcApiUrl || mapCloudIdentifierToApiUrl(appConfig.cloudIdentifier));
|
|
740
745
|
}, "Invalid MC API URL: \"".concat(appConfig.mcApiUrl, "\"")); // The real application ID is only used in production.
|
|
741
746
|
// In development, we prefix the entry point with the "__local" prefix.
|
|
@@ -749,7 +754,7 @@ var processConfig = function processConfig() {
|
|
|
749
754
|
if (appConfig.env.production.applicationId) {
|
|
750
755
|
var _context;
|
|
751
756
|
|
|
752
|
-
applicationId = _concatInstanceProperty__default[
|
|
757
|
+
applicationId = _concatInstanceProperty__default["default"](_context = "".concat(appConfig.env.production.applicationId, ":")).call(_context, appConfig.entryPointUriPath);
|
|
753
758
|
} else {
|
|
754
759
|
// As long as we don't require the application ID in production, we should
|
|
755
760
|
// fall back to unset the value.
|
|
@@ -758,8 +763,10 @@ var processConfig = function processConfig() {
|
|
|
758
763
|
}
|
|
759
764
|
|
|
760
765
|
var developmentConfig = isProd ? undefined : omitDevConfigIfEmpty({
|
|
761
|
-
oidc: isOidcForDevelopmentEnabled ? omitEmpty__default[
|
|
762
|
-
authorizeUrl: [
|
|
766
|
+
oidc: isOidcForDevelopmentEnabled ? omitEmpty__default["default"]({
|
|
767
|
+
authorizeUrl: [// In case the MC API url points to localhost, we need to point
|
|
768
|
+
// to a local running dev login page to handle the workflow properly.
|
|
769
|
+
mcApiUrl.hostname === 'localhost' ? mcApiUrl.origin.replace(mcApiUrl.port, String(developmentPort)) : mcApiUrl.origin.replace('mc-api', 'mc'), '/login/authorize'].join(''),
|
|
763
770
|
initialProjectKey: (_appConfig$env$develo = appConfig.env.development) === null || _appConfig$env$develo === void 0 ? void 0 : _appConfig$env$develo.initialProjectKey,
|
|
764
771
|
teamId: (_appConfig$env$develo2 = appConfig.env.development) === null || _appConfig$env$develo2 === void 0 ? void 0 : _appConfig$env$develo2.teamId,
|
|
765
772
|
oAuthScopes: appConfig.oAuthScopes
|
|
@@ -769,7 +776,7 @@ var processConfig = function processConfig() {
|
|
|
769
776
|
accountLinks: appConfig.accountLinks
|
|
770
777
|
});
|
|
771
778
|
cachedConfig = {
|
|
772
|
-
env: _objectSpread(_objectSpread(_objectSpread({}, omitEmpty__default[
|
|
779
|
+
env: _objectSpread(_objectSpread(_objectSpread({}, omitEmpty__default["default"](additionalAppEnv)), {}, {
|
|
773
780
|
// TODO: how else should we provide the app identifier?
|
|
774
781
|
applicationId: applicationId,
|
|
775
782
|
applicationName: appConfig.name,
|
|
@@ -787,7 +794,7 @@ var processConfig = function processConfig() {
|
|
|
787
794
|
}),
|
|
788
795
|
headers: _objectSpread(_objectSpread({}, appConfig.headers), {}, {
|
|
789
796
|
csp: _objectSpread(_objectSpread({}, (_appConfig$headers = appConfig.headers) === null || _appConfig$headers === void 0 ? void 0 : _appConfig$headers.csp), {}, {
|
|
790
|
-
'connect-src': getUniqueValues((_appConfig$headers2 = appConfig.headers) === null || _appConfig$headers2 === void 0 ? void 0 : _appConfig$headers2.csp['connect-src'], _concatInstanceProperty__default[
|
|
797
|
+
'connect-src': getUniqueValues((_appConfig$headers2 = appConfig.headers) === null || _appConfig$headers2 === void 0 ? void 0 : _appConfig$headers2.csp['connect-src'], _concatInstanceProperty__default["default"](_context2 = [mcApiUrl.origin]).call(_context2, isProd ? [appUrl.href] : [])),
|
|
791
798
|
'script-src': getUniqueValues((_appConfig$headers3 = appConfig.headers) === null || _appConfig$headers3 === void 0 ? void 0 : _appConfig$headers3.csp['script-src'], isProd ? [appUrl.href, cdnUrl.href] : []),
|
|
792
799
|
'style-src': getUniqueValues((_appConfig$headers4 = appConfig.headers) === null || _appConfig$headers4 === void 0 ? void 0 : _appConfig$headers4.csp['style-src'], isProd ? [appUrl.href, cdnUrl.href] : [])
|
|
793
800
|
})
|
|
@@ -59,9 +59,9 @@ var uniq__default = /*#__PURE__*/_interopDefault(uniq);
|
|
|
59
59
|
var _trimInstanceProperty__default = /*#__PURE__*/_interopDefault(_trimInstanceProperty);
|
|
60
60
|
var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
|
|
61
61
|
|
|
62
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default[
|
|
62
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct__default["default"](Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
63
63
|
|
|
64
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct__default[
|
|
64
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
65
65
|
|
|
66
66
|
var MissingOrInvalidConfigError = /*#__PURE__*/function (_Error) {
|
|
67
67
|
_inherits(MissingOrInvalidConfigError, _Error);
|
|
@@ -75,7 +75,7 @@ var MissingOrInvalidConfigError = /*#__PURE__*/function (_Error) {
|
|
|
75
75
|
|
|
76
76
|
_this = _super.call(this, message);
|
|
77
77
|
|
|
78
|
-
_Object$defineProperty__default[
|
|
78
|
+
_Object$defineProperty__default["default"](_assertThisInitialized(_this), 'name', {
|
|
79
79
|
value: 'MissingOrInvalidConfigError'
|
|
80
80
|
});
|
|
81
81
|
|
|
@@ -88,26 +88,26 @@ var MissingOrInvalidConfigError = /*#__PURE__*/function (_Error) {
|
|
|
88
88
|
// for instance in respect to both source files and dist files.
|
|
89
89
|
|
|
90
90
|
var findPackageRootPath = function findPackageRootPath(dir) {
|
|
91
|
-
var packageJsonPath = path__default[
|
|
91
|
+
var packageJsonPath = path__default["default"].join(dir, 'package.json');
|
|
92
92
|
|
|
93
|
-
if (fs__default[
|
|
93
|
+
if (fs__default["default"].existsSync(packageJsonPath)) {
|
|
94
94
|
return dir;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
var parentDir = path__default[
|
|
97
|
+
var parentDir = path__default["default"].join(dir, '..');
|
|
98
98
|
return findPackageRootPath(parentDir);
|
|
99
99
|
};
|
|
100
100
|
|
|
101
101
|
var loadJsModule = function loadJsModule(filePath) {
|
|
102
102
|
var packageRootPath = findPackageRootPath( // Start from the parent folder
|
|
103
|
-
path__default[
|
|
103
|
+
path__default["default"].join(__dirname, '..')); // Load the JS module using a child process. This is primarly to avoid
|
|
104
104
|
// unwanted behaviors using `@babel/register` in the main process.
|
|
105
105
|
// The loader script does the actual `require` of the given `filePath`
|
|
106
106
|
// and uses `@babel/register` to correctly parse and execute the file.
|
|
107
107
|
// The "required module output" is then written into `stdout` and parsed
|
|
108
108
|
// as JSON.
|
|
109
109
|
|
|
110
|
-
var output = child_process.execFileSync(path__default[
|
|
110
|
+
var output = child_process.execFileSync(path__default["default"].join(packageRootPath, 'scripts/load-js-module.js'), [filePath], {
|
|
111
111
|
encoding: 'utf8'
|
|
112
112
|
});
|
|
113
113
|
return JSON.parse(output);
|
|
@@ -287,6 +287,9 @@ var schemaJson = {
|
|
|
287
287
|
},
|
|
288
288
|
"style-src": {
|
|
289
289
|
$ref: "#/definitions/cspDirective"
|
|
290
|
+
},
|
|
291
|
+
"frame-src": {
|
|
292
|
+
$ref: "#/definitions/cspDirective"
|
|
290
293
|
}
|
|
291
294
|
},
|
|
292
295
|
additionalProperties: false,
|
|
@@ -457,7 +460,7 @@ var schemaJson = {
|
|
|
457
460
|
]
|
|
458
461
|
};
|
|
459
462
|
|
|
460
|
-
var ajv = new Ajv__default[
|
|
463
|
+
var ajv = new Ajv__default["default"]({
|
|
461
464
|
strict: true,
|
|
462
465
|
useDefaults: true
|
|
463
466
|
});
|
|
@@ -468,17 +471,17 @@ var printErrors = function printErrors(errors) {
|
|
|
468
471
|
return 'No errors';
|
|
469
472
|
}
|
|
470
473
|
|
|
471
|
-
return _mapInstanceProperty__default[
|
|
474
|
+
return _mapInstanceProperty__default["default"](errors).call(errors, function (error) {
|
|
472
475
|
var _context, _context2, _context3;
|
|
473
476
|
|
|
474
|
-
var baseMessage = _concatInstanceProperty__default[
|
|
477
|
+
var baseMessage = _concatInstanceProperty__default["default"](_context = "".concat(error.instancePath, " ")).call(_context, error.message);
|
|
475
478
|
|
|
476
479
|
switch (error.keyword) {
|
|
477
480
|
case 'additionalProperties':
|
|
478
|
-
return _concatInstanceProperty__default[
|
|
481
|
+
return _concatInstanceProperty__default["default"](_context2 = "".concat(baseMessage, ": ")).call(_context2, error.params.additionalProperty);
|
|
479
482
|
|
|
480
483
|
case 'enum':
|
|
481
|
-
return _concatInstanceProperty__default[
|
|
484
|
+
return _concatInstanceProperty__default["default"](_context3 = "".concat(baseMessage, ": ")).call(_context3, error.params.allowedValues.toString());
|
|
482
485
|
|
|
483
486
|
default:
|
|
484
487
|
return baseMessage;
|
|
@@ -531,7 +534,7 @@ var mapCloudIdentifierToApiUrl = function mapCloudIdentifierToApiUrl(key) {
|
|
|
531
534
|
default:
|
|
532
535
|
// We would probably never get to this point, as the JSON schema validation
|
|
533
536
|
// kicks in before.
|
|
534
|
-
throw new Error(_concatInstanceProperty__default[
|
|
537
|
+
throw new Error(_concatInstanceProperty__default["default"](_context = "Unknown cloud identifier \"".concat(key, "\". Supported values: ")).call(_context, _Object$values__default["default"](CLOUD_IDENTIFIERS).toString()));
|
|
535
538
|
}
|
|
536
539
|
};
|
|
537
540
|
|
|
@@ -540,7 +543,7 @@ var getUniqueValues = function getUniqueValues() {
|
|
|
540
543
|
|
|
541
544
|
var initialValues = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
542
545
|
var additionalValues = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
543
|
-
return uniq__default[
|
|
546
|
+
return uniq__default["default"](_concatInstanceProperty__default["default"](_context2 = []).call(_context2, _toConsumableArray(initialValues), _toConsumableArray(additionalValues)));
|
|
544
547
|
};
|
|
545
548
|
|
|
546
549
|
var nonProductionEnvironment = ['development', 'test'];
|
|
@@ -550,7 +553,7 @@ var getIsProd = function getIsProd(env) {
|
|
|
550
553
|
// a production environment unless it's one of `development` or `test`.
|
|
551
554
|
// This allows to use for example the `staging` value, which from the
|
|
552
555
|
// application perspective is still considered a production environment.
|
|
553
|
-
env.MC_APP_ENV ? !_includesInstanceProperty__default[
|
|
556
|
+
env.MC_APP_ENV ? !_includesInstanceProperty__default["default"](nonProductionEnvironment).call(nonProductionEnvironment, env.MC_APP_ENV) : env.NODE_ENV === 'production'
|
|
554
557
|
);
|
|
555
558
|
};
|
|
556
559
|
|
|
@@ -605,7 +608,7 @@ var substituteEnvVariablePlaceholder = function substituteEnvVariablePlaceholder
|
|
|
605
608
|
if (!hasEnvField) {
|
|
606
609
|
var _context;
|
|
607
610
|
|
|
608
|
-
throw new Error(_concatInstanceProperty__default[
|
|
611
|
+
throw new Error(_concatInstanceProperty__default["default"](_context = "Missing environment variable '".concat(requestedEnvVar, "' specified in config as 'env:")).call(_context, requestedEnvVar, "'."));
|
|
609
612
|
}
|
|
610
613
|
|
|
611
614
|
var escapedMatchedString = matchedString.replace(/[${}:]/g, '\\$&');
|
|
@@ -629,7 +632,7 @@ var substituteIntlVariablePlaceholder = function substituteIntlVariablePlacehold
|
|
|
629
632
|
if (!hasIntlMessage) {
|
|
630
633
|
var _context2, _context3;
|
|
631
634
|
|
|
632
|
-
throw new Error(_concatInstanceProperty__default[
|
|
635
|
+
throw new Error(_concatInstanceProperty__default["default"](_context2 = _concatInstanceProperty__default["default"](_context3 = "Missing message key '".concat(requestedIntlMessageId, "' specified in config as 'intl:")).call(_context3, locale, ":")).call(_context2, requestedIntlMessageId, "'."));
|
|
633
636
|
}
|
|
634
637
|
|
|
635
638
|
var escapedMatchedString = matchedString.replace(/[${}:]/g, '\\$&');
|
|
@@ -641,7 +644,7 @@ var substituteFilePathVariablePlaceholder = function substituteFilePathVariableP
|
|
|
641
644
|
_valueOfPlaceholder$s6 = _slicedToArray(_valueOfPlaceholder$s5, 2),
|
|
642
645
|
filePathOrModule = _valueOfPlaceholder$s6[1];
|
|
643
646
|
|
|
644
|
-
var content = fs__default[
|
|
647
|
+
var content = fs__default["default"].readFileSync(require.resolve(filePathOrModule, {
|
|
645
648
|
// Relative paths should be resolved from the application folder.
|
|
646
649
|
paths: [meta.applicationPath]
|
|
647
650
|
}), {
|
|
@@ -653,12 +656,12 @@ var substituteFilePathVariablePlaceholder = function substituteFilePathVariableP
|
|
|
653
656
|
|
|
654
657
|
var getValueOfPlaceholder = function getValueOfPlaceholder(valueWithPlaceholder) {
|
|
655
658
|
return valueWithPlaceholder.replace(variableSyntax, function (_match, varName) {
|
|
656
|
-
return _trimInstanceProperty__default[
|
|
659
|
+
return _trimInstanceProperty__default["default"](varName).call(varName);
|
|
657
660
|
}).replace(/\s/g, '');
|
|
658
661
|
};
|
|
659
662
|
|
|
660
663
|
var substituteVariablePlaceholders = function substituteVariablePlaceholders(config, meta) {
|
|
661
|
-
return JSON.parse(_JSON$stringify__default[
|
|
664
|
+
return JSON.parse(_JSON$stringify__default["default"](config), function (_key, value) {
|
|
662
665
|
// Only strings are allowed
|
|
663
666
|
var substitutedValue = value;
|
|
664
667
|
|
|
@@ -666,7 +669,7 @@ var substituteVariablePlaceholders = function substituteVariablePlaceholders(con
|
|
|
666
669
|
var matchResult = substitutedValue.match(variableSyntax);
|
|
667
670
|
|
|
668
671
|
if (matchResult) {
|
|
669
|
-
_forEachInstanceProperty__default[
|
|
672
|
+
_forEachInstanceProperty__default["default"](matchResult).call(matchResult, function (matchedString) {
|
|
670
673
|
var valueOfPlaceholder = getValueOfPlaceholder(matchedString);
|
|
671
674
|
|
|
672
675
|
if (isEnvVariablePlaceholder(valueOfPlaceholder)) {
|
|
@@ -684,10 +687,12 @@ var substituteVariablePlaceholders = function substituteVariablePlaceholders(con
|
|
|
684
687
|
});
|
|
685
688
|
};
|
|
686
689
|
|
|
687
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default[
|
|
690
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); if (enumerableOnly) { symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
688
691
|
|
|
689
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context3; _forEachInstanceProperty__default[
|
|
690
|
-
|
|
692
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context3; _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(source), true)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors__default["default"]) { _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)); } else { var _context4; _forEachInstanceProperty__default["default"](_context4 = ownKeys(Object(source))).call(_context4, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } } return target; }
|
|
693
|
+
// TODO: make it configurable.
|
|
694
|
+
var developmentPort = 3001;
|
|
695
|
+
var developmentAppUrl = "http://localhost:".concat(developmentPort);
|
|
691
696
|
|
|
692
697
|
var omitDevConfigIfEmpty = function omitDevConfigIfEmpty(devConfig) {
|
|
693
698
|
if ( // @ts-expect-error: the `accountLinks` is not explicitly typed as it's only used by the account app.
|
|
@@ -708,7 +713,7 @@ var processConfig = function processConfig() {
|
|
|
708
713
|
_ref$processEnv = _ref.processEnv,
|
|
709
714
|
processEnv = _ref$processEnv === void 0 ? process.env : _ref$processEnv,
|
|
710
715
|
_ref$applicationPath = _ref.applicationPath,
|
|
711
|
-
applicationPath = _ref$applicationPath === void 0 ? fs__default[
|
|
716
|
+
applicationPath = _ref$applicationPath === void 0 ? fs__default["default"].realpathSync(process.cwd()) : _ref$applicationPath;
|
|
712
717
|
|
|
713
718
|
if (cachedConfig && !disableCache) return cachedConfig;
|
|
714
719
|
var appEnvKey = (_ref2 = (_processEnv$MC_APP_EN = processEnv.MC_APP_ENV) !== null && _processEnv$MC_APP_EN !== void 0 ? _processEnv$MC_APP_EN : processEnv.NODE_ENV) !== null && _ref2 !== void 0 ? _ref2 : 'development';
|
|
@@ -727,15 +732,15 @@ var processConfig = function processConfig() {
|
|
|
727
732
|
|
|
728
733
|
var envAppUrl = isProd ? appConfig.env.production.url : developmentAppUrl;
|
|
729
734
|
var appUrl = getOrThrow(function () {
|
|
730
|
-
return new _URL__default[
|
|
735
|
+
return new _URL__default["default"](envAppUrl);
|
|
731
736
|
}, "Invalid application URL: \"".concat(envAppUrl, "\"")); // Use `||` instead of `??` to include empty string values.
|
|
732
737
|
|
|
733
738
|
var envCdnUrl = isProd ? appConfig.env.production.cdnUrl || appUrl.href : developmentAppUrl;
|
|
734
739
|
var cdnUrl = getOrThrow(function () {
|
|
735
|
-
return new _URL__default[
|
|
740
|
+
return new _URL__default["default"](envCdnUrl);
|
|
736
741
|
}, "Invalid application CDN URL: \"".concat(envCdnUrl, "\""));
|
|
737
742
|
var mcApiUrl = getOrThrow(function () {
|
|
738
|
-
return new _URL__default[
|
|
743
|
+
return new _URL__default["default"]( // Use `||` instead of `??` to include empty string values.
|
|
739
744
|
appConfig.mcApiUrl || mapCloudIdentifierToApiUrl(appConfig.cloudIdentifier));
|
|
740
745
|
}, "Invalid MC API URL: \"".concat(appConfig.mcApiUrl, "\"")); // The real application ID is only used in production.
|
|
741
746
|
// In development, we prefix the entry point with the "__local" prefix.
|
|
@@ -749,7 +754,7 @@ var processConfig = function processConfig() {
|
|
|
749
754
|
if (appConfig.env.production.applicationId) {
|
|
750
755
|
var _context;
|
|
751
756
|
|
|
752
|
-
applicationId = _concatInstanceProperty__default[
|
|
757
|
+
applicationId = _concatInstanceProperty__default["default"](_context = "".concat(appConfig.env.production.applicationId, ":")).call(_context, appConfig.entryPointUriPath);
|
|
753
758
|
} else {
|
|
754
759
|
// As long as we don't require the application ID in production, we should
|
|
755
760
|
// fall back to unset the value.
|
|
@@ -758,8 +763,10 @@ var processConfig = function processConfig() {
|
|
|
758
763
|
}
|
|
759
764
|
|
|
760
765
|
var developmentConfig = isProd ? undefined : omitDevConfigIfEmpty({
|
|
761
|
-
oidc: isOidcForDevelopmentEnabled ? omitEmpty__default[
|
|
762
|
-
authorizeUrl: [
|
|
766
|
+
oidc: isOidcForDevelopmentEnabled ? omitEmpty__default["default"]({
|
|
767
|
+
authorizeUrl: [// In case the MC API url points to localhost, we need to point
|
|
768
|
+
// to a local running dev login page to handle the workflow properly.
|
|
769
|
+
mcApiUrl.hostname === 'localhost' ? mcApiUrl.origin.replace(mcApiUrl.port, String(developmentPort)) : mcApiUrl.origin.replace('mc-api', 'mc'), '/login/authorize'].join(''),
|
|
763
770
|
initialProjectKey: (_appConfig$env$develo = appConfig.env.development) === null || _appConfig$env$develo === void 0 ? void 0 : _appConfig$env$develo.initialProjectKey,
|
|
764
771
|
teamId: (_appConfig$env$develo2 = appConfig.env.development) === null || _appConfig$env$develo2 === void 0 ? void 0 : _appConfig$env$develo2.teamId,
|
|
765
772
|
oAuthScopes: appConfig.oAuthScopes
|
|
@@ -769,7 +776,7 @@ var processConfig = function processConfig() {
|
|
|
769
776
|
accountLinks: appConfig.accountLinks
|
|
770
777
|
});
|
|
771
778
|
cachedConfig = {
|
|
772
|
-
env: _objectSpread(_objectSpread(_objectSpread({}, omitEmpty__default[
|
|
779
|
+
env: _objectSpread(_objectSpread(_objectSpread({}, omitEmpty__default["default"](additionalAppEnv)), {}, {
|
|
773
780
|
// TODO: how else should we provide the app identifier?
|
|
774
781
|
applicationId: applicationId,
|
|
775
782
|
applicationName: appConfig.name,
|
|
@@ -787,7 +794,7 @@ var processConfig = function processConfig() {
|
|
|
787
794
|
}),
|
|
788
795
|
headers: _objectSpread(_objectSpread({}, appConfig.headers), {}, {
|
|
789
796
|
csp: _objectSpread(_objectSpread({}, (_appConfig$headers = appConfig.headers) === null || _appConfig$headers === void 0 ? void 0 : _appConfig$headers.csp), {}, {
|
|
790
|
-
'connect-src': getUniqueValues((_appConfig$headers2 = appConfig.headers) === null || _appConfig$headers2 === void 0 ? void 0 : _appConfig$headers2.csp['connect-src'], _concatInstanceProperty__default[
|
|
797
|
+
'connect-src': getUniqueValues((_appConfig$headers2 = appConfig.headers) === null || _appConfig$headers2 === void 0 ? void 0 : _appConfig$headers2.csp['connect-src'], _concatInstanceProperty__default["default"](_context2 = [mcApiUrl.origin]).call(_context2, isProd ? [appUrl.href] : [])),
|
|
791
798
|
'script-src': getUniqueValues((_appConfig$headers3 = appConfig.headers) === null || _appConfig$headers3 === void 0 ? void 0 : _appConfig$headers3.csp['script-src'], isProd ? [appUrl.href, cdnUrl.href] : []),
|
|
792
799
|
'style-src': getUniqueValues((_appConfig$headers4 = appConfig.headers) === null || _appConfig$headers4 === void 0 ? void 0 : _appConfig$headers4.csp['style-src'], isProd ? [appUrl.href, cdnUrl.href] : [])
|
|
793
800
|
})
|
|
@@ -259,6 +259,9 @@ var schemaJson = {
|
|
|
259
259
|
},
|
|
260
260
|
"style-src": {
|
|
261
261
|
$ref: "#/definitions/cspDirective"
|
|
262
|
+
},
|
|
263
|
+
"frame-src": {
|
|
264
|
+
$ref: "#/definitions/cspDirective"
|
|
262
265
|
}
|
|
263
266
|
},
|
|
264
267
|
additionalProperties: false,
|
|
@@ -659,7 +662,9 @@ var substituteVariablePlaceholders = function substituteVariablePlaceholders(con
|
|
|
659
662
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); if (enumerableOnly) { symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
660
663
|
|
|
661
664
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context3; _forEachInstanceProperty(_context3 = ownKeys(Object(source), true)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors) { _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)); } else { var _context4; _forEachInstanceProperty(_context4 = ownKeys(Object(source))).call(_context4, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
662
|
-
|
|
665
|
+
// TODO: make it configurable.
|
|
666
|
+
var developmentPort = 3001;
|
|
667
|
+
var developmentAppUrl = "http://localhost:".concat(developmentPort);
|
|
663
668
|
|
|
664
669
|
var omitDevConfigIfEmpty = function omitDevConfigIfEmpty(devConfig) {
|
|
665
670
|
if ( // @ts-expect-error: the `accountLinks` is not explicitly typed as it's only used by the account app.
|
|
@@ -731,7 +736,9 @@ var processConfig = function processConfig() {
|
|
|
731
736
|
|
|
732
737
|
var developmentConfig = isProd ? undefined : omitDevConfigIfEmpty({
|
|
733
738
|
oidc: isOidcForDevelopmentEnabled ? omitEmpty({
|
|
734
|
-
authorizeUrl: [
|
|
739
|
+
authorizeUrl: [// In case the MC API url points to localhost, we need to point
|
|
740
|
+
// to a local running dev login page to handle the workflow properly.
|
|
741
|
+
mcApiUrl.hostname === 'localhost' ? mcApiUrl.origin.replace(mcApiUrl.port, String(developmentPort)) : mcApiUrl.origin.replace('mc-api', 'mc'), '/login/authorize'].join(''),
|
|
735
742
|
initialProjectKey: (_appConfig$env$develo = appConfig.env.development) === null || _appConfig$env$develo === void 0 ? void 0 : _appConfig$env$develo.initialProjectKey,
|
|
736
743
|
teamId: (_appConfig$env$develo2 = appConfig.env.development) === null || _appConfig$env$develo2 === void 0 ? void 0 : _appConfig$env$develo2.teamId,
|
|
737
744
|
oAuthScopes: appConfig.oAuthScopes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/application-config",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.11.0",
|
|
4
4
|
"description": "Configuration utilities for building Custom Applications",
|
|
5
5
|
"bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
|
|
6
6
|
"repository": {
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"homepage": "https://docs.commercetools.com/custom-applications",
|
|
12
12
|
"keywords": ["javascript", "frontend", "react", "toolkit", "config"],
|
|
13
13
|
"license": "MIT",
|
|
14
|
-
"private": false,
|
|
15
14
|
"publishConfig": {
|
|
16
15
|
"access": "public"
|
|
17
16
|
},
|
|
@@ -26,17 +25,15 @@
|
|
|
26
25
|
"README.md"
|
|
27
26
|
],
|
|
28
27
|
"scripts": {
|
|
29
|
-
"prepare": "./../../scripts/version.js replace",
|
|
30
|
-
"prebuild": "yarn build:schema",
|
|
31
28
|
"build:schema": "json2ts schema.json src/schema.ts --style.singleQuote --bannerComment '/* eslint-disable prettier/prettier */\n// This file was automatically generated by json-schema-to-typescript.\n// DO NOT MODIFY IT BY HAND. Instead, modify the source schema.json file.'"
|
|
32
29
|
},
|
|
33
30
|
"dependencies": {
|
|
34
31
|
"@babel/register": "7.15.3",
|
|
35
32
|
"@babel/runtime": "7.15.4",
|
|
36
33
|
"@babel/runtime-corejs3": "7.15.4",
|
|
37
|
-
"@commercetools-frontend/babel-preset-mc-app": "20.10.
|
|
34
|
+
"@commercetools-frontend/babel-preset-mc-app": "20.10.6",
|
|
38
35
|
"ajv": "8.6.3",
|
|
39
|
-
"core-js": "3.
|
|
36
|
+
"core-js": "3.19.0",
|
|
40
37
|
"cosmiconfig": "7.0.1",
|
|
41
38
|
"lodash": "4.17.21",
|
|
42
39
|
"omit-empty-es": "1.1.3"
|