@commercetools-frontend/application-cli 1.6.1 → 1.7.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.
|
@@ -26,6 +26,7 @@ var dotenv = require('dotenv');
|
|
|
26
26
|
var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
27
27
|
var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
|
|
28
28
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
29
|
+
var l10n = require('@commercetools-frontend/l10n');
|
|
29
30
|
var _sliceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/slice');
|
|
30
31
|
var fetch = require('node-fetch');
|
|
31
32
|
var jsonschema = require('jsonschema');
|
|
@@ -87,8 +88,8 @@ function createApplicationAssetsUploadScript(_ref) {
|
|
|
87
88
|
return uploadScriptContent;
|
|
88
89
|
}
|
|
89
90
|
|
|
90
|
-
function ownKeys$3(
|
|
91
|
-
function _objectSpread$3(
|
|
91
|
+
function ownKeys$3(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; }
|
|
92
|
+
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$3(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$3(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
92
93
|
function loadDotenvFiles(_ref) {
|
|
93
94
|
let dotenvPath = _ref.dotenvPath,
|
|
94
95
|
cloudEnvironment = _ref.cloudEnvironment;
|
|
@@ -125,8 +126,8 @@ function loadDotenvFiles(_ref) {
|
|
|
125
126
|
return _objectSpread$3(_objectSpread$3({}, sharedProductionEnvironment.parsed), cloudSpecificProductionEnvironment.parsed);
|
|
126
127
|
}
|
|
127
128
|
|
|
128
|
-
function ownKeys$2(
|
|
129
|
-
function _objectSpread$2(
|
|
129
|
+
function ownKeys$2(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; }
|
|
130
|
+
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var _context8, _context9; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context8 = ownKeys$2(Object(t), !0)).call(_context8, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context9 = ownKeys$2(Object(t))).call(_context9, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
130
131
|
const buckedConfigExplorer = cosmiconfig.cosmiconfig('google-storage-buckets');
|
|
131
132
|
function writeUploadScriptFile(_ref) {
|
|
132
133
|
let fileName = _ref.fileName,
|
|
@@ -350,19 +351,19 @@ async function command$3(cliFlags, cwd) {
|
|
|
350
351
|
await taskList.run();
|
|
351
352
|
}
|
|
352
353
|
|
|
353
|
-
function ownKeys$1(
|
|
354
|
-
function _objectSpread$1(
|
|
354
|
+
function ownKeys$1(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; }
|
|
355
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$1(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$1(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
355
356
|
|
|
356
357
|
// The menu links are only parsed from the config in development mode.
|
|
357
358
|
process.env.NODE_ENV = 'development';
|
|
358
|
-
const supportedLocales = ['en', 'de', 'es', 'fr-FR', 'zh-CN', 'ja'];
|
|
359
359
|
const mapLabelAllLocalesWithDefaults = (labelAllLocales, defaultLabel) => {
|
|
360
360
|
let mappedLabelAllLocales = labelAllLocales;
|
|
361
361
|
if (defaultLabel) {
|
|
362
|
+
var _context;
|
|
362
363
|
// Map all supported locales with the given localized labels.
|
|
363
364
|
// If a locale is not defined in the config, we use the `default` label as the value.
|
|
364
365
|
// This is only needed for development as we're trying to map two different schemas.
|
|
365
|
-
mappedLabelAllLocales = _mapInstanceProperty__default["default"](
|
|
366
|
+
mappedLabelAllLocales = _mapInstanceProperty__default["default"](_context = l10n.getSupportedLocales()).call(_context, supportedLocale => {
|
|
366
367
|
const existingField = _findInstanceProperty__default["default"](labelAllLocales).call(labelAllLocales, field => field.locale === supportedLocale);
|
|
367
368
|
if (existingField) return existingField;
|
|
368
369
|
return {
|
|
@@ -380,7 +381,7 @@ const mapLabelAllLocalesWithDefaults = (labelAllLocales, defaultLabel) => {
|
|
|
380
381
|
*/
|
|
381
382
|
|
|
382
383
|
const mapApplicationMenuConfigToGraqhQLMenuJson = config => {
|
|
383
|
-
var _ref, _config$env$__DEVELOP, _config$env$__DEVELOP2, _menuLinks$featureTog, _menuLinks$menuVisibi, _menuLinks$actionRigh, _menuLinks$dataFences,
|
|
384
|
+
var _ref, _config$env$__DEVELOP, _config$env$__DEVELOP2, _menuLinks$featureTog, _menuLinks$menuVisibi, _menuLinks$actionRigh, _menuLinks$dataFences, _context2, _menuLinks$shouldRend;
|
|
384
385
|
const entryPointUriPath = config.env.entryPointUriPath;
|
|
385
386
|
|
|
386
387
|
// @ts-expect-error: the `accountLinks` is not explicitly typed as it's only used by the account app.
|
|
@@ -413,7 +414,7 @@ const mapApplicationMenuConfigToGraqhQLMenuJson = config => {
|
|
|
413
414
|
actionRights: (_menuLinks$actionRigh = menuLinks.actionRights) !== null && _menuLinks$actionRigh !== void 0 ? _menuLinks$actionRigh : null,
|
|
414
415
|
// @ts-ignore: not defined in schema, as it's only used internally.
|
|
415
416
|
dataFences: (_menuLinks$dataFences = menuLinks.dataFences) !== null && _menuLinks$dataFences !== void 0 ? _menuLinks$dataFences : null,
|
|
416
|
-
submenu: _mapInstanceProperty__default["default"](
|
|
417
|
+
submenu: _mapInstanceProperty__default["default"](_context2 = menuLinks.submenuLinks).call(_context2, submenuLink => {
|
|
417
418
|
var _submenuLink$featureT, _submenuLink$menuVisi, _submenuLink$actionRi, _submenuLink$dataFenc;
|
|
418
419
|
return {
|
|
419
420
|
key: submenuLink.uriPath.replace('/', '-'),
|
|
@@ -499,8 +500,8 @@ async function command$1(cliFlags) {
|
|
|
499
500
|
}
|
|
500
501
|
}
|
|
501
502
|
|
|
502
|
-
function ownKeys(
|
|
503
|
-
function _objectSpread(
|
|
503
|
+
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; }
|
|
504
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
504
505
|
const baseMenuProperties = {
|
|
505
506
|
key: {
|
|
506
507
|
type: 'string'
|
|
@@ -619,7 +620,7 @@ async function command(cliFlags) {
|
|
|
619
620
|
|
|
620
621
|
var pkgJson = {
|
|
621
622
|
name: "@commercetools-frontend/application-cli",
|
|
622
|
-
version: "1.
|
|
623
|
+
version: "1.7.0",
|
|
623
624
|
description: "Internal CLI to manage Merchant Center application deployments across various environments.",
|
|
624
625
|
keywords: [
|
|
625
626
|
"commercetools",
|
|
@@ -641,23 +642,24 @@ var pkgJson = {
|
|
|
641
642
|
typecheck: "tsc --noEmit"
|
|
642
643
|
},
|
|
643
644
|
dependencies: {
|
|
644
|
-
"@babel/core": "^7.
|
|
645
|
+
"@babel/core": "^7.22.11",
|
|
645
646
|
"@babel/runtime": "^7.21.0",
|
|
646
647
|
"@babel/runtime-corejs3": "^7.21.0",
|
|
647
|
-
"@commercetools-frontend/application-config": "22.
|
|
648
|
-
"@commercetools-frontend/constants": "22.
|
|
648
|
+
"@commercetools-frontend/application-config": "22.7.1",
|
|
649
|
+
"@commercetools-frontend/constants": "22.7.1",
|
|
650
|
+
"@commercetools-frontend/l10n": "22.7.1",
|
|
649
651
|
"@manypkg/find-root": "2.2.1",
|
|
650
652
|
cac: "^6.7.14",
|
|
651
|
-
cosmiconfig: "8.
|
|
653
|
+
cosmiconfig: "8.3.3",
|
|
652
654
|
dotenv: "16.3.1",
|
|
653
655
|
execa: "5.1.1",
|
|
654
656
|
jsonschema: "^1.4.1",
|
|
655
657
|
listr2: "^6.4.2",
|
|
656
|
-
"node-fetch": "2.
|
|
658
|
+
"node-fetch": "2.7.0"
|
|
657
659
|
},
|
|
658
660
|
devDependencies: {
|
|
659
661
|
"@tsconfig/node18": "1.0.3",
|
|
660
|
-
"@types/node": "20.
|
|
662
|
+
"@types/node": "20.5.9",
|
|
661
663
|
"@types/node-fetch": "2.6.2",
|
|
662
664
|
typescript: "^5.1.3"
|
|
663
665
|
},
|
|
@@ -26,6 +26,7 @@ var dotenv = require('dotenv');
|
|
|
26
26
|
var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
27
27
|
var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
|
|
28
28
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
29
|
+
var l10n = require('@commercetools-frontend/l10n');
|
|
29
30
|
var _sliceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/slice');
|
|
30
31
|
var fetch = require('node-fetch');
|
|
31
32
|
var jsonschema = require('jsonschema');
|
|
@@ -87,8 +88,8 @@ function createApplicationAssetsUploadScript(_ref) {
|
|
|
87
88
|
return uploadScriptContent;
|
|
88
89
|
}
|
|
89
90
|
|
|
90
|
-
function ownKeys$3(
|
|
91
|
-
function _objectSpread$3(
|
|
91
|
+
function ownKeys$3(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; }
|
|
92
|
+
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$3(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$3(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
92
93
|
function loadDotenvFiles(_ref) {
|
|
93
94
|
let dotenvPath = _ref.dotenvPath,
|
|
94
95
|
cloudEnvironment = _ref.cloudEnvironment;
|
|
@@ -125,8 +126,8 @@ function loadDotenvFiles(_ref) {
|
|
|
125
126
|
return _objectSpread$3(_objectSpread$3({}, sharedProductionEnvironment.parsed), cloudSpecificProductionEnvironment.parsed);
|
|
126
127
|
}
|
|
127
128
|
|
|
128
|
-
function ownKeys$2(
|
|
129
|
-
function _objectSpread$2(
|
|
129
|
+
function ownKeys$2(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; }
|
|
130
|
+
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var _context8, _context9; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context8 = ownKeys$2(Object(t), !0)).call(_context8, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context9 = ownKeys$2(Object(t))).call(_context9, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
130
131
|
const buckedConfigExplorer = cosmiconfig.cosmiconfig('google-storage-buckets');
|
|
131
132
|
function writeUploadScriptFile(_ref) {
|
|
132
133
|
let fileName = _ref.fileName,
|
|
@@ -350,19 +351,19 @@ async function command$3(cliFlags, cwd) {
|
|
|
350
351
|
await taskList.run();
|
|
351
352
|
}
|
|
352
353
|
|
|
353
|
-
function ownKeys$1(
|
|
354
|
-
function _objectSpread$1(
|
|
354
|
+
function ownKeys$1(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; }
|
|
355
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$1(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$1(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
355
356
|
|
|
356
357
|
// The menu links are only parsed from the config in development mode.
|
|
357
358
|
process.env.NODE_ENV = 'development';
|
|
358
|
-
const supportedLocales = ['en', 'de', 'es', 'fr-FR', 'zh-CN', 'ja'];
|
|
359
359
|
const mapLabelAllLocalesWithDefaults = (labelAllLocales, defaultLabel) => {
|
|
360
360
|
let mappedLabelAllLocales = labelAllLocales;
|
|
361
361
|
if (defaultLabel) {
|
|
362
|
+
var _context;
|
|
362
363
|
// Map all supported locales with the given localized labels.
|
|
363
364
|
// If a locale is not defined in the config, we use the `default` label as the value.
|
|
364
365
|
// This is only needed for development as we're trying to map two different schemas.
|
|
365
|
-
mappedLabelAllLocales = _mapInstanceProperty__default["default"](
|
|
366
|
+
mappedLabelAllLocales = _mapInstanceProperty__default["default"](_context = l10n.getSupportedLocales()).call(_context, supportedLocale => {
|
|
366
367
|
const existingField = _findInstanceProperty__default["default"](labelAllLocales).call(labelAllLocales, field => field.locale === supportedLocale);
|
|
367
368
|
if (existingField) return existingField;
|
|
368
369
|
return {
|
|
@@ -380,7 +381,7 @@ const mapLabelAllLocalesWithDefaults = (labelAllLocales, defaultLabel) => {
|
|
|
380
381
|
*/
|
|
381
382
|
|
|
382
383
|
const mapApplicationMenuConfigToGraqhQLMenuJson = config => {
|
|
383
|
-
var _ref, _config$env$__DEVELOP, _config$env$__DEVELOP2, _menuLinks$featureTog, _menuLinks$menuVisibi, _menuLinks$actionRigh, _menuLinks$dataFences,
|
|
384
|
+
var _ref, _config$env$__DEVELOP, _config$env$__DEVELOP2, _menuLinks$featureTog, _menuLinks$menuVisibi, _menuLinks$actionRigh, _menuLinks$dataFences, _context2, _menuLinks$shouldRend;
|
|
384
385
|
const entryPointUriPath = config.env.entryPointUriPath;
|
|
385
386
|
|
|
386
387
|
// @ts-expect-error: the `accountLinks` is not explicitly typed as it's only used by the account app.
|
|
@@ -413,7 +414,7 @@ const mapApplicationMenuConfigToGraqhQLMenuJson = config => {
|
|
|
413
414
|
actionRights: (_menuLinks$actionRigh = menuLinks.actionRights) !== null && _menuLinks$actionRigh !== void 0 ? _menuLinks$actionRigh : null,
|
|
414
415
|
// @ts-ignore: not defined in schema, as it's only used internally.
|
|
415
416
|
dataFences: (_menuLinks$dataFences = menuLinks.dataFences) !== null && _menuLinks$dataFences !== void 0 ? _menuLinks$dataFences : null,
|
|
416
|
-
submenu: _mapInstanceProperty__default["default"](
|
|
417
|
+
submenu: _mapInstanceProperty__default["default"](_context2 = menuLinks.submenuLinks).call(_context2, submenuLink => {
|
|
417
418
|
var _submenuLink$featureT, _submenuLink$menuVisi, _submenuLink$actionRi, _submenuLink$dataFenc;
|
|
418
419
|
return {
|
|
419
420
|
key: submenuLink.uriPath.replace('/', '-'),
|
|
@@ -499,8 +500,8 @@ async function command$1(cliFlags) {
|
|
|
499
500
|
}
|
|
500
501
|
}
|
|
501
502
|
|
|
502
|
-
function ownKeys(
|
|
503
|
-
function _objectSpread(
|
|
503
|
+
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; }
|
|
504
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
504
505
|
const baseMenuProperties = {
|
|
505
506
|
key: {
|
|
506
507
|
type: 'string'
|
|
@@ -619,7 +620,7 @@ async function command(cliFlags) {
|
|
|
619
620
|
|
|
620
621
|
var pkgJson = {
|
|
621
622
|
name: "@commercetools-frontend/application-cli",
|
|
622
|
-
version: "1.
|
|
623
|
+
version: "1.7.0",
|
|
623
624
|
description: "Internal CLI to manage Merchant Center application deployments across various environments.",
|
|
624
625
|
keywords: [
|
|
625
626
|
"commercetools",
|
|
@@ -641,23 +642,24 @@ var pkgJson = {
|
|
|
641
642
|
typecheck: "tsc --noEmit"
|
|
642
643
|
},
|
|
643
644
|
dependencies: {
|
|
644
|
-
"@babel/core": "^7.
|
|
645
|
+
"@babel/core": "^7.22.11",
|
|
645
646
|
"@babel/runtime": "^7.21.0",
|
|
646
647
|
"@babel/runtime-corejs3": "^7.21.0",
|
|
647
|
-
"@commercetools-frontend/application-config": "22.
|
|
648
|
-
"@commercetools-frontend/constants": "22.
|
|
648
|
+
"@commercetools-frontend/application-config": "22.7.1",
|
|
649
|
+
"@commercetools-frontend/constants": "22.7.1",
|
|
650
|
+
"@commercetools-frontend/l10n": "22.7.1",
|
|
649
651
|
"@manypkg/find-root": "2.2.1",
|
|
650
652
|
cac: "^6.7.14",
|
|
651
|
-
cosmiconfig: "8.
|
|
653
|
+
cosmiconfig: "8.3.3",
|
|
652
654
|
dotenv: "16.3.1",
|
|
653
655
|
execa: "5.1.1",
|
|
654
656
|
jsonschema: "^1.4.1",
|
|
655
657
|
listr2: "^6.4.2",
|
|
656
|
-
"node-fetch": "2.
|
|
658
|
+
"node-fetch": "2.7.0"
|
|
657
659
|
},
|
|
658
660
|
devDependencies: {
|
|
659
661
|
"@tsconfig/node18": "1.0.3",
|
|
660
|
-
"@types/node": "20.
|
|
662
|
+
"@types/node": "20.5.9",
|
|
661
663
|
"@types/node-fetch": "2.6.2",
|
|
662
664
|
typescript: "^5.1.3"
|
|
663
665
|
},
|
|
@@ -22,6 +22,7 @@ import dotenv from 'dotenv';
|
|
|
22
22
|
import _findInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
23
23
|
import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringify';
|
|
24
24
|
import { processConfig } from '@commercetools-frontend/application-config';
|
|
25
|
+
import { getSupportedLocales } from '@commercetools-frontend/l10n';
|
|
25
26
|
import _sliceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/slice';
|
|
26
27
|
import fetch from 'node-fetch';
|
|
27
28
|
import { Validator } from 'jsonschema';
|
|
@@ -61,8 +62,8 @@ function createApplicationAssetsUploadScript(_ref) {
|
|
|
61
62
|
return uploadScriptContent;
|
|
62
63
|
}
|
|
63
64
|
|
|
64
|
-
function ownKeys$3(
|
|
65
|
-
function _objectSpread$3(
|
|
65
|
+
function ownKeys$3(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; }
|
|
66
|
+
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$3(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$3(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
66
67
|
function loadDotenvFiles(_ref) {
|
|
67
68
|
let dotenvPath = _ref.dotenvPath,
|
|
68
69
|
cloudEnvironment = _ref.cloudEnvironment;
|
|
@@ -99,8 +100,8 @@ function loadDotenvFiles(_ref) {
|
|
|
99
100
|
return _objectSpread$3(_objectSpread$3({}, sharedProductionEnvironment.parsed), cloudSpecificProductionEnvironment.parsed);
|
|
100
101
|
}
|
|
101
102
|
|
|
102
|
-
function ownKeys$2(
|
|
103
|
-
function _objectSpread$2(
|
|
103
|
+
function ownKeys$2(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; }
|
|
104
|
+
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var _context8, _context9; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context8 = ownKeys$2(Object(t), !0)).call(_context8, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context9 = ownKeys$2(Object(t))).call(_context9, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
104
105
|
const buckedConfigExplorer = cosmiconfig('google-storage-buckets');
|
|
105
106
|
function writeUploadScriptFile(_ref) {
|
|
106
107
|
let fileName = _ref.fileName,
|
|
@@ -324,19 +325,19 @@ async function command$3(cliFlags, cwd) {
|
|
|
324
325
|
await taskList.run();
|
|
325
326
|
}
|
|
326
327
|
|
|
327
|
-
function ownKeys$1(
|
|
328
|
-
function _objectSpread$1(
|
|
328
|
+
function ownKeys$1(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; }
|
|
329
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context3 = ownKeys$1(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys$1(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
329
330
|
|
|
330
331
|
// The menu links are only parsed from the config in development mode.
|
|
331
332
|
process.env.NODE_ENV = 'development';
|
|
332
|
-
const supportedLocales = ['en', 'de', 'es', 'fr-FR', 'zh-CN', 'ja'];
|
|
333
333
|
const mapLabelAllLocalesWithDefaults = (labelAllLocales, defaultLabel) => {
|
|
334
334
|
let mappedLabelAllLocales = labelAllLocales;
|
|
335
335
|
if (defaultLabel) {
|
|
336
|
+
var _context;
|
|
336
337
|
// Map all supported locales with the given localized labels.
|
|
337
338
|
// If a locale is not defined in the config, we use the `default` label as the value.
|
|
338
339
|
// This is only needed for development as we're trying to map two different schemas.
|
|
339
|
-
mappedLabelAllLocales = _mapInstanceProperty(
|
|
340
|
+
mappedLabelAllLocales = _mapInstanceProperty(_context = getSupportedLocales()).call(_context, supportedLocale => {
|
|
340
341
|
const existingField = _findInstanceProperty(labelAllLocales).call(labelAllLocales, field => field.locale === supportedLocale);
|
|
341
342
|
if (existingField) return existingField;
|
|
342
343
|
return {
|
|
@@ -354,7 +355,7 @@ const mapLabelAllLocalesWithDefaults = (labelAllLocales, defaultLabel) => {
|
|
|
354
355
|
*/
|
|
355
356
|
|
|
356
357
|
const mapApplicationMenuConfigToGraqhQLMenuJson = config => {
|
|
357
|
-
var _ref, _config$env$__DEVELOP, _config$env$__DEVELOP2, _menuLinks$featureTog, _menuLinks$menuVisibi, _menuLinks$actionRigh, _menuLinks$dataFences,
|
|
358
|
+
var _ref, _config$env$__DEVELOP, _config$env$__DEVELOP2, _menuLinks$featureTog, _menuLinks$menuVisibi, _menuLinks$actionRigh, _menuLinks$dataFences, _context2, _menuLinks$shouldRend;
|
|
358
359
|
const entryPointUriPath = config.env.entryPointUriPath;
|
|
359
360
|
|
|
360
361
|
// @ts-expect-error: the `accountLinks` is not explicitly typed as it's only used by the account app.
|
|
@@ -387,7 +388,7 @@ const mapApplicationMenuConfigToGraqhQLMenuJson = config => {
|
|
|
387
388
|
actionRights: (_menuLinks$actionRigh = menuLinks.actionRights) !== null && _menuLinks$actionRigh !== void 0 ? _menuLinks$actionRigh : null,
|
|
388
389
|
// @ts-ignore: not defined in schema, as it's only used internally.
|
|
389
390
|
dataFences: (_menuLinks$dataFences = menuLinks.dataFences) !== null && _menuLinks$dataFences !== void 0 ? _menuLinks$dataFences : null,
|
|
390
|
-
submenu: _mapInstanceProperty(
|
|
391
|
+
submenu: _mapInstanceProperty(_context2 = menuLinks.submenuLinks).call(_context2, submenuLink => {
|
|
391
392
|
var _submenuLink$featureT, _submenuLink$menuVisi, _submenuLink$actionRi, _submenuLink$dataFenc;
|
|
392
393
|
return {
|
|
393
394
|
key: submenuLink.uriPath.replace('/', '-'),
|
|
@@ -473,8 +474,8 @@ async function command$1(cliFlags) {
|
|
|
473
474
|
}
|
|
474
475
|
}
|
|
475
476
|
|
|
476
|
-
function ownKeys(
|
|
477
|
-
function _objectSpread(
|
|
477
|
+
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; }
|
|
478
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
478
479
|
const baseMenuProperties = {
|
|
479
480
|
key: {
|
|
480
481
|
type: 'string'
|
|
@@ -593,7 +594,7 @@ async function command(cliFlags) {
|
|
|
593
594
|
|
|
594
595
|
var pkgJson = {
|
|
595
596
|
name: "@commercetools-frontend/application-cli",
|
|
596
|
-
version: "1.
|
|
597
|
+
version: "1.7.0",
|
|
597
598
|
description: "Internal CLI to manage Merchant Center application deployments across various environments.",
|
|
598
599
|
keywords: [
|
|
599
600
|
"commercetools",
|
|
@@ -615,23 +616,24 @@ var pkgJson = {
|
|
|
615
616
|
typecheck: "tsc --noEmit"
|
|
616
617
|
},
|
|
617
618
|
dependencies: {
|
|
618
|
-
"@babel/core": "^7.
|
|
619
|
+
"@babel/core": "^7.22.11",
|
|
619
620
|
"@babel/runtime": "^7.21.0",
|
|
620
621
|
"@babel/runtime-corejs3": "^7.21.0",
|
|
621
|
-
"@commercetools-frontend/application-config": "22.
|
|
622
|
-
"@commercetools-frontend/constants": "22.
|
|
622
|
+
"@commercetools-frontend/application-config": "22.7.1",
|
|
623
|
+
"@commercetools-frontend/constants": "22.7.1",
|
|
624
|
+
"@commercetools-frontend/l10n": "22.7.1",
|
|
623
625
|
"@manypkg/find-root": "2.2.1",
|
|
624
626
|
cac: "^6.7.14",
|
|
625
|
-
cosmiconfig: "8.
|
|
627
|
+
cosmiconfig: "8.3.3",
|
|
626
628
|
dotenv: "16.3.1",
|
|
627
629
|
execa: "5.1.1",
|
|
628
630
|
jsonschema: "^1.4.1",
|
|
629
631
|
listr2: "^6.4.2",
|
|
630
|
-
"node-fetch": "2.
|
|
632
|
+
"node-fetch": "2.7.0"
|
|
631
633
|
},
|
|
632
634
|
devDependencies: {
|
|
633
635
|
"@tsconfig/node18": "1.0.3",
|
|
634
|
-
"@types/node": "20.
|
|
636
|
+
"@types/node": "20.5.9",
|
|
635
637
|
"@types/node-fetch": "2.6.2",
|
|
636
638
|
typescript: "^5.1.3"
|
|
637
639
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/application-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "Internal CLI to manage Merchant Center application deployments across various environments.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"commercetools",
|
|
@@ -19,23 +19,24 @@
|
|
|
19
19
|
"README.md"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@babel/core": "^7.
|
|
22
|
+
"@babel/core": "^7.22.11",
|
|
23
23
|
"@babel/runtime": "^7.21.0",
|
|
24
24
|
"@babel/runtime-corejs3": "^7.21.0",
|
|
25
|
-
"@commercetools-frontend/application-config": "22.
|
|
26
|
-
"@commercetools-frontend/constants": "22.
|
|
25
|
+
"@commercetools-frontend/application-config": "22.7.1",
|
|
26
|
+
"@commercetools-frontend/constants": "22.7.1",
|
|
27
|
+
"@commercetools-frontend/l10n": "22.7.1",
|
|
27
28
|
"@manypkg/find-root": "2.2.1",
|
|
28
29
|
"cac": "^6.7.14",
|
|
29
|
-
"cosmiconfig": "8.
|
|
30
|
+
"cosmiconfig": "8.3.3",
|
|
30
31
|
"dotenv": "16.3.1",
|
|
31
32
|
"execa": "5.1.1",
|
|
32
33
|
"jsonschema": "^1.4.1",
|
|
33
34
|
"listr2": "^6.4.2",
|
|
34
|
-
"node-fetch": "2.
|
|
35
|
+
"node-fetch": "2.7.0"
|
|
35
36
|
},
|
|
36
37
|
"devDependencies": {
|
|
37
38
|
"@tsconfig/node18": "1.0.3",
|
|
38
|
-
"@types/node": "20.
|
|
39
|
+
"@types/node": "20.5.9",
|
|
39
40
|
"@types/node-fetch": "2.6.2",
|
|
40
41
|
"typescript": "^5.1.3"
|
|
41
42
|
},
|