@commercetools-frontend/application-cli 7.0.0 → 7.2.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.
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var storageBucketsConfig = require('./storage-buckets-config-c97b3f01.cjs.dev.js');
5
+ var storageBucketsConfig = require('./storage-buckets-config-c9659859.cjs.dev.js');
6
6
  require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
7
7
  require('@babel/runtime-corejs3/core-js-stable/object/keys');
8
8
  require('@babel/runtime-corejs3/core-js-stable/instance/filter');
9
- require('@babel/runtime-corejs3/core-js-stable/instance/concat');
9
+ require('@babel/runtime-corejs3/core-js-stable/instance/bind');
10
10
  require('cosmiconfig');
11
11
  require('ts-deepmerge');
12
12
  require('lodash');
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var storageBucketsConfig = require('./storage-buckets-config-eb422a27.cjs.prod.js');
5
+ var storageBucketsConfig = require('./storage-buckets-config-09739a58.cjs.prod.js');
6
6
  require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
7
7
  require('@babel/runtime-corejs3/core-js-stable/object/keys');
8
8
  require('@babel/runtime-corejs3/core-js-stable/instance/filter');
9
- require('@babel/runtime-corejs3/core-js-stable/instance/concat');
9
+ require('@babel/runtime-corejs3/core-js-stable/instance/bind');
10
10
  require('cosmiconfig');
11
11
  require('ts-deepmerge');
12
12
  require('lodash');
@@ -1,8 +1,8 @@
1
- export { b as bucketEnvironments, e as bucketRegions, c as clusterContexts, d as defineStorageBucketsConfig, s as storageProviders } from './storage-buckets-config-3894c4d6.esm.js';
1
+ export { b as bucketEnvironments, e as bucketRegions, c as clusterContexts, d as defineStorageBucketsConfig, s as storageProviders } from './storage-buckets-config-89e84e61.esm.js';
2
2
  import '@babel/runtime-corejs3/core-js-stable/instance/for-each';
3
3
  import '@babel/runtime-corejs3/core-js-stable/object/keys';
4
4
  import '@babel/runtime-corejs3/core-js-stable/instance/filter';
5
- import '@babel/runtime-corejs3/core-js-stable/instance/concat';
5
+ import '@babel/runtime-corejs3/core-js-stable/instance/bind';
6
6
  import 'cosmiconfig';
7
7
  import 'ts-deepmerge';
8
8
  import 'lodash';
@@ -1,5 +1,6 @@
1
1
  import type { TStorageProviderTag, TStorageProvider } from "./types.js";
2
2
  export declare const clusterContexts: {
3
+ readonly 'ctp_staging_aws_eu-central-1_v1': "ctp_staging_aws_eu-central-1_v1";
3
4
  readonly 'ctp_staging_gcp_europe-west1_v1': "ctp_staging_gcp_europe-west1_v1";
4
5
  readonly 'ctp_testing_performance_gcp_europe-west1_v1': "ctp_testing_performance_gcp_europe-west1_v1";
5
6
  readonly 'ctp_production_aws_eu-central-1_v1': "ctp_production_aws_eu-central-1_v1";
@@ -9,6 +10,7 @@ export declare const clusterContexts: {
9
10
  readonly 'ctp_production_gcp_australia-southeast1_v1': "ctp_production_gcp_australia-southeast1_v1";
10
11
  };
11
12
  export declare const bucketEnvironments: {
13
+ readonly 'ctp-aws-staging-eu': "ctp-aws-staging-eu";
12
14
  readonly 'ctp-gcp-staging-eu': "ctp-gcp-staging-eu";
13
15
  readonly 'ctp-gcp-testing-performance-eu': "ctp-gcp-testing-performance-eu";
14
16
  readonly 'ctp-aws-production-eu': "ctp-aws-production-eu";
@@ -3,7 +3,7 @@
3
3
  var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
4
4
  var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
5
5
  var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
6
- var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
6
+ var _bindInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/bind');
7
7
  var cosmiconfig = require('cosmiconfig');
8
8
  var tsDeepmerge = require('ts-deepmerge');
9
9
  var lodash = require('lodash');
@@ -13,10 +13,11 @@ function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e };
13
13
  var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachInstanceProperty);
14
14
  var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
15
15
  var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
16
- var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
16
+ var _bindInstanceProperty__default = /*#__PURE__*/_interopDefault(_bindInstanceProperty);
17
17
  var lodash__default = /*#__PURE__*/_interopDefault(lodash);
18
18
 
19
19
  const clusterContexts = {
20
+ 'ctp_staging_aws_eu-central-1_v1': 'ctp_staging_aws_eu-central-1_v1',
20
21
  'ctp_staging_gcp_europe-west1_v1': 'ctp_staging_gcp_europe-west1_v1',
21
22
  'ctp_testing_performance_gcp_europe-west1_v1': 'ctp_testing_performance_gcp_europe-west1_v1',
22
23
  'ctp_production_aws_eu-central-1_v1': 'ctp_production_aws_eu-central-1_v1',
@@ -26,6 +27,7 @@ const clusterContexts = {
26
27
  'ctp_production_gcp_australia-southeast1_v1': 'ctp_production_gcp_australia-southeast1_v1'
27
28
  };
28
29
  const bucketEnvironments = {
30
+ 'ctp-aws-staging-eu': 'ctp-aws-staging-eu',
29
31
  'ctp-gcp-staging-eu': 'ctp-gcp-staging-eu',
30
32
  'ctp-gcp-testing-performance-eu': 'ctp-gcp-testing-performance-eu',
31
33
  'ctp-aws-production-eu': 'ctp-aws-production-eu',
@@ -55,6 +57,7 @@ const storageProviders = {
55
57
  urls: {
56
58
  public: {
57
59
  default: null,
60
+ [bucketEnvironments['ctp-aws-staging-eu']]: 'https://mc-storage.eu-central-1.aws.escemo.com',
58
61
  [bucketEnvironments['ctp-aws-production-eu']]: 'https://mc-storage.eu-central-1.aws.commercetools.com',
59
62
  [bucketEnvironments['ctp-aws-production-us']]: 'https://mc-storage.us-east-2.aws.commercetools.com'
60
63
  },
@@ -73,6 +76,9 @@ const defaultConfig = {
73
76
  }, {
74
77
  cloudEnvironment: clusterContexts['ctp_testing_performance_gcp_europe-west1_v1'],
75
78
  bucketEnvironment: bucketEnvironments['ctp-gcp-testing-performance-eu']
79
+ }, {
80
+ cloudEnvironment: clusterContexts['ctp_staging_aws_eu-central-1_v1'],
81
+ bucketEnvironment: bucketEnvironments['ctp-aws-staging-eu']
76
82
  }],
77
83
  [bucketRegions.europe]: [{
78
84
  cloudEnvironment: clusterContexts['ctp_production_aws_eu-central-1_v1'],
@@ -96,27 +102,25 @@ const defaultConfig = {
96
102
  }]
97
103
  };
98
104
  function defineStorageBucketsConfig() {
99
- var _options$disabledBuck, _options$disabledEnvi;
100
105
  let _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
101
106
  regions = _ref.regions,
102
107
  options = _ref.options;
103
108
  const actualConfig = regions ? tsDeepmerge.merge(defaultConfig, regions) : defaultConfig;
104
- const disabledBucketRegions = (_options$disabledBuck = options === null || options === void 0 ? void 0 : options.disabledBucketRegions) !== null && _options$disabledBuck !== void 0 ? _options$disabledBuck : [];
105
- const disabledEnvironments = (_options$disabledEnvi = options === null || options === void 0 ? void 0 : options.disabledEnvironments) !== null && _options$disabledEnvi !== void 0 ? _options$disabledEnvi : [];
109
+ const disabledBucketRegions = options?.disabledBucketRegions ?? [];
110
+ const disabledEnvironments = options?.disabledEnvironments ?? [];
106
111
  _forEachInstanceProperty__default["default"](disabledBucketRegions).call(disabledBucketRegions, disabledBucketRegion => {
107
112
  delete actualConfig[disabledBucketRegion];
108
113
  });
109
114
  const allBucketRegions = _Object$keys__default["default"](actualConfig);
110
115
  _forEachInstanceProperty__default["default"](disabledEnvironments).call(disabledEnvironments, disabledEnvrionment => {
111
116
  _forEachInstanceProperty__default["default"](allBucketRegions).call(allBucketRegions, bucketRegionToBeRemoved => {
112
- var _actualConfig$bucketR;
113
- actualConfig[bucketRegionToBeRemoved] = (_actualConfig$bucketR = actualConfig[bucketRegionToBeRemoved]) === null || _actualConfig$bucketR === void 0 ? void 0 : _filterInstanceProperty__default["default"](_actualConfig$bucketR).call(_actualConfig$bucketR, bucketEnvironmentConfig => bucketEnvironmentConfig.cloudEnvironment !== disabledEnvrionment);
117
+ var _context, _context2;
118
+ actualConfig[bucketRegionToBeRemoved] = ((_context = actualConfig[bucketRegionToBeRemoved]) == null ? void 0 : _bindInstanceProperty__default["default"](_context2 = Function.call).call(_context2, _filterInstanceProperty__default["default"](_context), _context))?.(bucketEnvironmentConfig => bucketEnvironmentConfig.cloudEnvironment !== disabledEnvrionment);
114
119
  });
115
120
  });
116
121
  return actualConfig;
117
122
  }
118
123
  async function loadStorageBucketsConfig() {
119
- var _explorerResult;
120
124
  let explorerResult;
121
125
  const storageBucketConfigExplorer = cosmiconfig.cosmiconfig('storage-buckets', {
122
126
  searchStrategy: 'project'
@@ -130,7 +134,7 @@ async function loadStorageBucketsConfig() {
130
134
  if (!explorerResult) {
131
135
  throw new Error('Failed loading a storage bucket configuration');
132
136
  }
133
- return (_explorerResult = explorerResult) === null || _explorerResult === void 0 ? void 0 : _explorerResult.config;
137
+ return explorerResult?.config;
134
138
  }
135
139
  async function loadConfig(moduleName, defaultConfig) {
136
140
  const configExplorer = cosmiconfig.cosmiconfig(moduleName, {
@@ -138,13 +142,12 @@ async function loadConfig(moduleName, defaultConfig) {
138
142
  });
139
143
  try {
140
144
  const cosmiconfigResult = await configExplorer.search();
141
- const mergedConfig = lodash__default["default"].merge(defaultConfig, cosmiconfigResult === null || cosmiconfigResult === void 0 ? void 0 : cosmiconfigResult.config);
142
- console.log("\u2139\uFE0F Merged and loaded cosmiconfig file for '".concat(moduleName, "'."));
145
+ const mergedConfig = lodash__default["default"].merge(defaultConfig, cosmiconfigResult?.config);
146
+ console.log(`ℹ️ Merged and loaded cosmiconfig file for '${moduleName}'.`);
143
147
  return mergedConfig;
144
148
  } catch (e) {
145
- var _context, _context2;
146
149
  console.warn(e);
147
- throw new Error(_concatInstanceProperty__default["default"](_context = _concatInstanceProperty__default["default"](_context2 = "Failed loading a ".concat(moduleName, " configuration. Create a cosmiconfig for '")).call(_context2, moduleName, "' for example '")).call(_context, moduleName, ".config.cjs.'"));
150
+ throw new Error(`Failed loading a ${moduleName} configuration. Create a cosmiconfig for '${moduleName}' for example '${moduleName}.config.cjs.'`);
148
151
  }
149
152
  }
150
153
 
@@ -1,12 +1,13 @@
1
1
  import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/for-each';
2
2
  import _Object$keys from '@babel/runtime-corejs3/core-js-stable/object/keys';
3
3
  import _filterInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/filter';
4
- import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
4
+ import _bindInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/bind';
5
5
  import { cosmiconfig } from 'cosmiconfig';
6
6
  import { merge } from 'ts-deepmerge';
7
7
  import lodash from 'lodash';
8
8
 
9
9
  const clusterContexts = {
10
+ 'ctp_staging_aws_eu-central-1_v1': 'ctp_staging_aws_eu-central-1_v1',
10
11
  'ctp_staging_gcp_europe-west1_v1': 'ctp_staging_gcp_europe-west1_v1',
11
12
  'ctp_testing_performance_gcp_europe-west1_v1': 'ctp_testing_performance_gcp_europe-west1_v1',
12
13
  'ctp_production_aws_eu-central-1_v1': 'ctp_production_aws_eu-central-1_v1',
@@ -16,6 +17,7 @@ const clusterContexts = {
16
17
  'ctp_production_gcp_australia-southeast1_v1': 'ctp_production_gcp_australia-southeast1_v1'
17
18
  };
18
19
  const bucketEnvironments = {
20
+ 'ctp-aws-staging-eu': 'ctp-aws-staging-eu',
19
21
  'ctp-gcp-staging-eu': 'ctp-gcp-staging-eu',
20
22
  'ctp-gcp-testing-performance-eu': 'ctp-gcp-testing-performance-eu',
21
23
  'ctp-aws-production-eu': 'ctp-aws-production-eu',
@@ -45,6 +47,7 @@ const storageProviders = {
45
47
  urls: {
46
48
  public: {
47
49
  default: null,
50
+ [bucketEnvironments['ctp-aws-staging-eu']]: 'https://mc-storage.eu-central-1.aws.escemo.com',
48
51
  [bucketEnvironments['ctp-aws-production-eu']]: 'https://mc-storage.eu-central-1.aws.commercetools.com',
49
52
  [bucketEnvironments['ctp-aws-production-us']]: 'https://mc-storage.us-east-2.aws.commercetools.com'
50
53
  },
@@ -63,6 +66,9 @@ const defaultConfig = {
63
66
  }, {
64
67
  cloudEnvironment: clusterContexts['ctp_testing_performance_gcp_europe-west1_v1'],
65
68
  bucketEnvironment: bucketEnvironments['ctp-gcp-testing-performance-eu']
69
+ }, {
70
+ cloudEnvironment: clusterContexts['ctp_staging_aws_eu-central-1_v1'],
71
+ bucketEnvironment: bucketEnvironments['ctp-aws-staging-eu']
66
72
  }],
67
73
  [bucketRegions.europe]: [{
68
74
  cloudEnvironment: clusterContexts['ctp_production_aws_eu-central-1_v1'],
@@ -86,27 +92,25 @@ const defaultConfig = {
86
92
  }]
87
93
  };
88
94
  function defineStorageBucketsConfig() {
89
- var _options$disabledBuck, _options$disabledEnvi;
90
95
  let _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
91
96
  regions = _ref.regions,
92
97
  options = _ref.options;
93
98
  const actualConfig = regions ? merge(defaultConfig, regions) : defaultConfig;
94
- const disabledBucketRegions = (_options$disabledBuck = options === null || options === void 0 ? void 0 : options.disabledBucketRegions) !== null && _options$disabledBuck !== void 0 ? _options$disabledBuck : [];
95
- const disabledEnvironments = (_options$disabledEnvi = options === null || options === void 0 ? void 0 : options.disabledEnvironments) !== null && _options$disabledEnvi !== void 0 ? _options$disabledEnvi : [];
99
+ const disabledBucketRegions = options?.disabledBucketRegions ?? [];
100
+ const disabledEnvironments = options?.disabledEnvironments ?? [];
96
101
  _forEachInstanceProperty(disabledBucketRegions).call(disabledBucketRegions, disabledBucketRegion => {
97
102
  delete actualConfig[disabledBucketRegion];
98
103
  });
99
104
  const allBucketRegions = _Object$keys(actualConfig);
100
105
  _forEachInstanceProperty(disabledEnvironments).call(disabledEnvironments, disabledEnvrionment => {
101
106
  _forEachInstanceProperty(allBucketRegions).call(allBucketRegions, bucketRegionToBeRemoved => {
102
- var _actualConfig$bucketR;
103
- actualConfig[bucketRegionToBeRemoved] = (_actualConfig$bucketR = actualConfig[bucketRegionToBeRemoved]) === null || _actualConfig$bucketR === void 0 ? void 0 : _filterInstanceProperty(_actualConfig$bucketR).call(_actualConfig$bucketR, bucketEnvironmentConfig => bucketEnvironmentConfig.cloudEnvironment !== disabledEnvrionment);
107
+ var _context, _context2;
108
+ actualConfig[bucketRegionToBeRemoved] = ((_context = actualConfig[bucketRegionToBeRemoved]) == null ? void 0 : _bindInstanceProperty(_context2 = Function.call).call(_context2, _filterInstanceProperty(_context), _context))?.(bucketEnvironmentConfig => bucketEnvironmentConfig.cloudEnvironment !== disabledEnvrionment);
104
109
  });
105
110
  });
106
111
  return actualConfig;
107
112
  }
108
113
  async function loadStorageBucketsConfig() {
109
- var _explorerResult;
110
114
  let explorerResult;
111
115
  const storageBucketConfigExplorer = cosmiconfig('storage-buckets', {
112
116
  searchStrategy: 'project'
@@ -120,7 +124,7 @@ async function loadStorageBucketsConfig() {
120
124
  if (!explorerResult) {
121
125
  throw new Error('Failed loading a storage bucket configuration');
122
126
  }
123
- return (_explorerResult = explorerResult) === null || _explorerResult === void 0 ? void 0 : _explorerResult.config;
127
+ return explorerResult?.config;
124
128
  }
125
129
  async function loadConfig(moduleName, defaultConfig) {
126
130
  const configExplorer = cosmiconfig(moduleName, {
@@ -128,13 +132,12 @@ async function loadConfig(moduleName, defaultConfig) {
128
132
  });
129
133
  try {
130
134
  const cosmiconfigResult = await configExplorer.search();
131
- const mergedConfig = lodash.merge(defaultConfig, cosmiconfigResult === null || cosmiconfigResult === void 0 ? void 0 : cosmiconfigResult.config);
132
- console.log("\u2139\uFE0F Merged and loaded cosmiconfig file for '".concat(moduleName, "'."));
135
+ const mergedConfig = lodash.merge(defaultConfig, cosmiconfigResult?.config);
136
+ console.log(`ℹ️ Merged and loaded cosmiconfig file for '${moduleName}'.`);
133
137
  return mergedConfig;
134
138
  } catch (e) {
135
- var _context, _context2;
136
139
  console.warn(e);
137
- throw new Error(_concatInstanceProperty(_context = _concatInstanceProperty(_context2 = "Failed loading a ".concat(moduleName, " configuration. Create a cosmiconfig for '")).call(_context2, moduleName, "' for example '")).call(_context, moduleName, ".config.cjs.'"));
140
+ throw new Error(`Failed loading a ${moduleName} configuration. Create a cosmiconfig for '${moduleName}' for example '${moduleName}.config.cjs.'`);
138
141
  }
139
142
  }
140
143
 
@@ -3,7 +3,7 @@
3
3
  var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
4
4
  var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
5
5
  var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
6
- var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
6
+ var _bindInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/bind');
7
7
  var cosmiconfig = require('cosmiconfig');
8
8
  var tsDeepmerge = require('ts-deepmerge');
9
9
  var lodash = require('lodash');
@@ -13,10 +13,11 @@ function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e };
13
13
  var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachInstanceProperty);
14
14
  var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
15
15
  var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
16
- var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
16
+ var _bindInstanceProperty__default = /*#__PURE__*/_interopDefault(_bindInstanceProperty);
17
17
  var lodash__default = /*#__PURE__*/_interopDefault(lodash);
18
18
 
19
19
  const clusterContexts = {
20
+ 'ctp_staging_aws_eu-central-1_v1': 'ctp_staging_aws_eu-central-1_v1',
20
21
  'ctp_staging_gcp_europe-west1_v1': 'ctp_staging_gcp_europe-west1_v1',
21
22
  'ctp_testing_performance_gcp_europe-west1_v1': 'ctp_testing_performance_gcp_europe-west1_v1',
22
23
  'ctp_production_aws_eu-central-1_v1': 'ctp_production_aws_eu-central-1_v1',
@@ -26,6 +27,7 @@ const clusterContexts = {
26
27
  'ctp_production_gcp_australia-southeast1_v1': 'ctp_production_gcp_australia-southeast1_v1'
27
28
  };
28
29
  const bucketEnvironments = {
30
+ 'ctp-aws-staging-eu': 'ctp-aws-staging-eu',
29
31
  'ctp-gcp-staging-eu': 'ctp-gcp-staging-eu',
30
32
  'ctp-gcp-testing-performance-eu': 'ctp-gcp-testing-performance-eu',
31
33
  'ctp-aws-production-eu': 'ctp-aws-production-eu',
@@ -55,6 +57,7 @@ const storageProviders = {
55
57
  urls: {
56
58
  public: {
57
59
  default: null,
60
+ [bucketEnvironments['ctp-aws-staging-eu']]: 'https://mc-storage.eu-central-1.aws.escemo.com',
58
61
  [bucketEnvironments['ctp-aws-production-eu']]: 'https://mc-storage.eu-central-1.aws.commercetools.com',
59
62
  [bucketEnvironments['ctp-aws-production-us']]: 'https://mc-storage.us-east-2.aws.commercetools.com'
60
63
  },
@@ -73,6 +76,9 @@ const defaultConfig = {
73
76
  }, {
74
77
  cloudEnvironment: clusterContexts['ctp_testing_performance_gcp_europe-west1_v1'],
75
78
  bucketEnvironment: bucketEnvironments['ctp-gcp-testing-performance-eu']
79
+ }, {
80
+ cloudEnvironment: clusterContexts['ctp_staging_aws_eu-central-1_v1'],
81
+ bucketEnvironment: bucketEnvironments['ctp-aws-staging-eu']
76
82
  }],
77
83
  [bucketRegions.europe]: [{
78
84
  cloudEnvironment: clusterContexts['ctp_production_aws_eu-central-1_v1'],
@@ -96,27 +102,25 @@ const defaultConfig = {
96
102
  }]
97
103
  };
98
104
  function defineStorageBucketsConfig() {
99
- var _options$disabledBuck, _options$disabledEnvi;
100
105
  let _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
101
106
  regions = _ref.regions,
102
107
  options = _ref.options;
103
108
  const actualConfig = regions ? tsDeepmerge.merge(defaultConfig, regions) : defaultConfig;
104
- const disabledBucketRegions = (_options$disabledBuck = options === null || options === void 0 ? void 0 : options.disabledBucketRegions) !== null && _options$disabledBuck !== void 0 ? _options$disabledBuck : [];
105
- const disabledEnvironments = (_options$disabledEnvi = options === null || options === void 0 ? void 0 : options.disabledEnvironments) !== null && _options$disabledEnvi !== void 0 ? _options$disabledEnvi : [];
109
+ const disabledBucketRegions = options?.disabledBucketRegions ?? [];
110
+ const disabledEnvironments = options?.disabledEnvironments ?? [];
106
111
  _forEachInstanceProperty__default["default"](disabledBucketRegions).call(disabledBucketRegions, disabledBucketRegion => {
107
112
  delete actualConfig[disabledBucketRegion];
108
113
  });
109
114
  const allBucketRegions = _Object$keys__default["default"](actualConfig);
110
115
  _forEachInstanceProperty__default["default"](disabledEnvironments).call(disabledEnvironments, disabledEnvrionment => {
111
116
  _forEachInstanceProperty__default["default"](allBucketRegions).call(allBucketRegions, bucketRegionToBeRemoved => {
112
- var _actualConfig$bucketR;
113
- actualConfig[bucketRegionToBeRemoved] = (_actualConfig$bucketR = actualConfig[bucketRegionToBeRemoved]) === null || _actualConfig$bucketR === void 0 ? void 0 : _filterInstanceProperty__default["default"](_actualConfig$bucketR).call(_actualConfig$bucketR, bucketEnvironmentConfig => bucketEnvironmentConfig.cloudEnvironment !== disabledEnvrionment);
117
+ var _context, _context2;
118
+ actualConfig[bucketRegionToBeRemoved] = ((_context = actualConfig[bucketRegionToBeRemoved]) == null ? void 0 : _bindInstanceProperty__default["default"](_context2 = Function.call).call(_context2, _filterInstanceProperty__default["default"](_context), _context))?.(bucketEnvironmentConfig => bucketEnvironmentConfig.cloudEnvironment !== disabledEnvrionment);
114
119
  });
115
120
  });
116
121
  return actualConfig;
117
122
  }
118
123
  async function loadStorageBucketsConfig() {
119
- var _explorerResult;
120
124
  let explorerResult;
121
125
  const storageBucketConfigExplorer = cosmiconfig.cosmiconfig('storage-buckets', {
122
126
  searchStrategy: 'project'
@@ -130,7 +134,7 @@ async function loadStorageBucketsConfig() {
130
134
  if (!explorerResult) {
131
135
  throw new Error('Failed loading a storage bucket configuration');
132
136
  }
133
- return (_explorerResult = explorerResult) === null || _explorerResult === void 0 ? void 0 : _explorerResult.config;
137
+ return explorerResult?.config;
134
138
  }
135
139
  async function loadConfig(moduleName, defaultConfig) {
136
140
  const configExplorer = cosmiconfig.cosmiconfig(moduleName, {
@@ -138,13 +142,12 @@ async function loadConfig(moduleName, defaultConfig) {
138
142
  });
139
143
  try {
140
144
  const cosmiconfigResult = await configExplorer.search();
141
- const mergedConfig = lodash__default["default"].merge(defaultConfig, cosmiconfigResult === null || cosmiconfigResult === void 0 ? void 0 : cosmiconfigResult.config);
142
- console.log("\u2139\uFE0F Merged and loaded cosmiconfig file for '".concat(moduleName, "'."));
145
+ const mergedConfig = lodash__default["default"].merge(defaultConfig, cosmiconfigResult?.config);
146
+ console.log(`ℹ️ Merged and loaded cosmiconfig file for '${moduleName}'.`);
143
147
  return mergedConfig;
144
148
  } catch (e) {
145
- var _context, _context2;
146
149
  console.warn(e);
147
- throw new Error(_concatInstanceProperty__default["default"](_context = _concatInstanceProperty__default["default"](_context2 = "Failed loading a ".concat(moduleName, " configuration. Create a cosmiconfig for '")).call(_context2, moduleName, "' for example '")).call(_context, moduleName, ".config.cjs.'"));
150
+ throw new Error(`Failed loading a ${moduleName} configuration. Create a cosmiconfig for '${moduleName}' for example '${moduleName}.config.cjs.'`);
148
151
  }
149
152
  }
150
153
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/application-cli",
3
- "version": "7.0.0",
3
+ "version": "7.2.0",
4
4
  "description": "Internal CLI to manage Merchant Center application deployments across various environments.",
5
5
  "keywords": [
6
6
  "commercetools",
@@ -22,13 +22,13 @@
22
22
  "dependencies": {
23
23
  "@babel/core": "^7.22.11",
24
24
  "@babel/runtime-corejs3": "^7.21.0",
25
- "@commercetools-frontend/application-config": "24.11.0",
26
- "@commercetools-frontend/constants": "24.11.0",
27
- "@commercetools-frontend/l10n": "24.11.0",
25
+ "@commercetools-frontend/application-config": "25.1.0",
26
+ "@commercetools-frontend/constants": "25.1.0",
27
+ "@commercetools-frontend/l10n": "25.1.0",
28
28
  "@manypkg/find-root": "2.2.3",
29
29
  "commander": "^13.1.0",
30
30
  "cosmiconfig": "9.0.0",
31
- "dotenv": "16.6.1",
31
+ "dotenv": "17.2.3",
32
32
  "execa": "5.1.1",
33
33
  "jsonschema": "^1.4.1",
34
34
  "listr2": "8.3.3",
@@ -38,11 +38,11 @@
38
38
  "ts-deepmerge": "7.0.3"
39
39
  },
40
40
  "devDependencies": {
41
- "@tsconfig/node20": "20.1.6",
41
+ "@tsconfig/node24": "24.0.0",
42
42
  "@types/lodash": "^4.14.198",
43
43
  "@types/micromatch": "4.0.9",
44
- "@types/node": "22.19.1",
45
- "typescript": "5.2.2"
44
+ "@types/node": "24.10.6",
45
+ "typescript": "5.7.2"
46
46
  },
47
47
  "engines": {
48
48
  "node": ">=21",