@commercetools-frontend/application-cli 3.0.2 → 3.1.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,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var storageBucketsConfig = require('./storage-buckets-config-89962880.cjs.dev.js');
5
+ var storageBucketsConfig = require('./storage-buckets-config-e69e5c69.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
- require('@babel/runtime-corejs3/core-js-stable/instance/filter');
9
- require('@babel/runtime-corejs3/core-js-stable/instance/concat');
10
8
  require('cosmiconfig');
11
9
  require('ts-deepmerge');
12
10
  require('lodash');
@@ -2,11 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var storageBucketsConfig = require('./storage-buckets-config-2f9a9168.cjs.prod.js');
5
+ var storageBucketsConfig = require('./storage-buckets-config-a24cb35d.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
- require('@babel/runtime-corejs3/core-js-stable/instance/filter');
9
- require('@babel/runtime-corejs3/core-js-stable/instance/concat');
10
8
  require('cosmiconfig');
11
9
  require('ts-deepmerge');
12
10
  require('lodash');
@@ -1,8 +1,6 @@
1
- export { b as bucketEnvironments, e as bucketRegions, c as clusterContexts, d as defineStorageBucketsConfig, s as storageProviders } from './storage-buckets-config-6e04b3d3.esm.js';
1
+ export { b as bucketEnvironments, e as bucketRegions, c as clusterContexts, d as defineStorageBucketsConfig, s as storageProviders } from './storage-buckets-config-f59a9bbc.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
- import '@babel/runtime-corejs3/core-js-stable/instance/filter';
5
- import '@babel/runtime-corejs3/core-js-stable/instance/concat';
6
4
  import 'cosmiconfig';
7
5
  import 'ts-deepmerge';
8
6
  import 'lodash';
@@ -14,6 +14,7 @@ export declare const clusterContexts: {
14
14
  readonly 'ctp_production_aws_cn-northwest-1_v1': "ctp_production_aws_cn-northwest-1_v1";
15
15
  readonly ctp_staging_azure_northeurope_v1: "ctp_staging_azure_northeurope_v1";
16
16
  readonly ctp_production_azure_eastus_v1: "ctp_production_azure_eastus_v1";
17
+ readonly ctp_production_azure_germanywestcentral_v1: "ctp_production_azure_germanywestcentral_v1";
17
18
  };
18
19
  export declare const bucketEnvironments: {
19
20
  readonly 'ctp-gcp-staging': "ctp-gcp-staging";
@@ -22,6 +23,7 @@ export declare const bucketEnvironments: {
22
23
  readonly 'ctp-gcp-testing-performance-eu': "ctp-gcp-testing-performance-eu";
23
24
  readonly 'ctp-azure-staging': "ctp-azure-staging";
24
25
  readonly 'ctp-azure-production-us': "ctp-azure-production-us";
26
+ readonly 'ctp-azure-production-eu': "ctp-azure-production-eu";
25
27
  readonly 'ctp-aws-production-fra': "ctp-aws-production-fra";
26
28
  readonly 'ctp-gcp-production-eu': "ctp-gcp-production-eu";
27
29
  readonly 'ctp-vw-production-eu': "ctp-vw-production-eu";
@@ -2,8 +2,6 @@
2
2
 
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
- var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
6
- var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
7
5
  var cosmiconfig = require('cosmiconfig');
8
6
  var tsDeepmerge = require('ts-deepmerge');
9
7
  var lodash = require('lodash');
@@ -12,8 +10,6 @@ function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e };
12
10
 
13
11
  var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachInstanceProperty);
14
12
  var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
15
- var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
16
- var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
17
13
  var lodash__default = /*#__PURE__*/_interopDefault(lodash);
18
14
 
19
15
  const clusterContexts = {
@@ -30,7 +26,8 @@ const clusterContexts = {
30
26
  'ctp_production_gcp_australia-southeast1_v1': 'ctp_production_gcp_australia-southeast1_v1',
31
27
  'ctp_production_aws_cn-northwest-1_v1': 'ctp_production_aws_cn-northwest-1_v1',
32
28
  ctp_staging_azure_northeurope_v1: 'ctp_staging_azure_northeurope_v1',
33
- ctp_production_azure_eastus_v1: 'ctp_production_azure_eastus_v1'
29
+ ctp_production_azure_eastus_v1: 'ctp_production_azure_eastus_v1',
30
+ ctp_production_azure_germanywestcentral_v1: 'ctp_production_azure_germanywestcentral_v1'
34
31
  };
35
32
  const bucketEnvironments = {
36
33
  'ctp-gcp-staging': 'ctp-gcp-staging',
@@ -39,6 +36,7 @@ const bucketEnvironments = {
39
36
  'ctp-gcp-testing-performance-eu': 'ctp-gcp-testing-performance-eu',
40
37
  'ctp-azure-staging': 'ctp-azure-staging',
41
38
  'ctp-azure-production-us': 'ctp-azure-production-us',
39
+ 'ctp-azure-production-eu': 'ctp-azure-production-eu',
42
40
  'ctp-aws-production-fra': 'ctp-aws-production-fra',
43
41
  'ctp-gcp-production-eu': 'ctp-gcp-production-eu',
44
42
  'ctp-vw-production-eu': 'ctp-vw-production-eu',
@@ -110,6 +108,9 @@ const defaultConfig = {
110
108
  }, {
111
109
  cloudEnvironment: clusterContexts['vw_production_aws_eu-central-1_v1'],
112
110
  bucketEnvironment: bucketEnvironments['ctp-vw-production-eu']
111
+ }, {
112
+ cloudEnvironment: clusterContexts['ctp_production_azure_germanywestcentral_v1'],
113
+ bucketEnvironment: bucketEnvironments['ctp-azure-production-eu']
113
114
  }],
114
115
  [bucketRegions.northAmerica]: [{
115
116
  cloudEnvironment: clusterContexts['att_production_aws_us-east-1_v1'],
@@ -143,27 +144,24 @@ const defaultConfig = {
143
144
  }]
144
145
  };
145
146
  function defineStorageBucketsConfig() {
146
- var _options$disabledBuck, _options$disabledEnvi;
147
147
  let _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
148
148
  regions = _ref.regions,
149
149
  options = _ref.options;
150
150
  const actualConfig = regions ? tsDeepmerge.merge(defaultConfig, regions) : defaultConfig;
151
- const disabledBucketRegions = (_options$disabledBuck = options === null || options === void 0 ? void 0 : options.disabledBucketRegions) !== null && _options$disabledBuck !== void 0 ? _options$disabledBuck : [];
152
- const disabledEnvironments = (_options$disabledEnvi = options === null || options === void 0 ? void 0 : options.disabledEnvironments) !== null && _options$disabledEnvi !== void 0 ? _options$disabledEnvi : [];
151
+ const disabledBucketRegions = options?.disabledBucketRegions ?? [];
152
+ const disabledEnvironments = options?.disabledEnvironments ?? [];
153
153
  _forEachInstanceProperty__default["default"](disabledBucketRegions).call(disabledBucketRegions, disabledBucketRegion => {
154
154
  delete actualConfig[disabledBucketRegion];
155
155
  });
156
156
  const allBucketRegions = _Object$keys__default["default"](actualConfig);
157
157
  _forEachInstanceProperty__default["default"](disabledEnvironments).call(disabledEnvironments, disabledEnvrionment => {
158
158
  _forEachInstanceProperty__default["default"](allBucketRegions).call(allBucketRegions, bucketRegionToBeRemoved => {
159
- var _actualConfig$bucketR;
160
- 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);
159
+ actualConfig[bucketRegionToBeRemoved] = actualConfig[bucketRegionToBeRemoved]?.filter(bucketEnvironmentConfig => bucketEnvironmentConfig.cloudEnvironment !== disabledEnvrionment);
161
160
  });
162
161
  });
163
162
  return actualConfig;
164
163
  }
165
164
  async function loadStorageBucketsConfig() {
166
- var _explorerResult;
167
165
  let explorerResult;
168
166
  const storageBucketConfigExplorer = cosmiconfig.cosmiconfig('storage-buckets', {
169
167
  searchStrategy: 'project'
@@ -177,7 +175,7 @@ async function loadStorageBucketsConfig() {
177
175
  if (!explorerResult) {
178
176
  throw new Error('Failed loading a storage bucket configuration');
179
177
  }
180
- return (_explorerResult = explorerResult) === null || _explorerResult === void 0 ? void 0 : _explorerResult.config;
178
+ return explorerResult?.config;
181
179
  }
182
180
  async function loadConfig(moduleName, defaultConfig) {
183
181
  const configExplorer = cosmiconfig.cosmiconfig(moduleName, {
@@ -185,13 +183,12 @@ async function loadConfig(moduleName, defaultConfig) {
185
183
  });
186
184
  try {
187
185
  const cosmiconfigResult = await configExplorer.search();
188
- const mergedConfig = lodash__default["default"].merge(defaultConfig, cosmiconfigResult === null || cosmiconfigResult === void 0 ? void 0 : cosmiconfigResult.config);
189
- console.log("\u2139\uFE0F Merged and loaded cosmiconfig file for '".concat(moduleName, "'."));
186
+ const mergedConfig = lodash__default["default"].merge(defaultConfig, cosmiconfigResult?.config);
187
+ console.log(`ℹ️ Merged and loaded cosmiconfig file for '${moduleName}'.`);
190
188
  return mergedConfig;
191
189
  } catch (e) {
192
- var _context, _context2;
193
190
  console.warn(e);
194
- 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.'"));
191
+ throw new Error(`Failed loading a ${moduleName} configuration. Create a cosmiconfig for '${moduleName}' for example '${moduleName}.config.cjs.'`);
195
192
  }
196
193
  }
197
194
 
@@ -2,8 +2,6 @@
2
2
 
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
- var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
6
- var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
7
5
  var cosmiconfig = require('cosmiconfig');
8
6
  var tsDeepmerge = require('ts-deepmerge');
9
7
  var lodash = require('lodash');
@@ -12,8 +10,6 @@ function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e };
12
10
 
13
11
  var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachInstanceProperty);
14
12
  var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
15
- var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
16
- var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
17
13
  var lodash__default = /*#__PURE__*/_interopDefault(lodash);
18
14
 
19
15
  const clusterContexts = {
@@ -30,7 +26,8 @@ const clusterContexts = {
30
26
  'ctp_production_gcp_australia-southeast1_v1': 'ctp_production_gcp_australia-southeast1_v1',
31
27
  'ctp_production_aws_cn-northwest-1_v1': 'ctp_production_aws_cn-northwest-1_v1',
32
28
  ctp_staging_azure_northeurope_v1: 'ctp_staging_azure_northeurope_v1',
33
- ctp_production_azure_eastus_v1: 'ctp_production_azure_eastus_v1'
29
+ ctp_production_azure_eastus_v1: 'ctp_production_azure_eastus_v1',
30
+ ctp_production_azure_germanywestcentral_v1: 'ctp_production_azure_germanywestcentral_v1'
34
31
  };
35
32
  const bucketEnvironments = {
36
33
  'ctp-gcp-staging': 'ctp-gcp-staging',
@@ -39,6 +36,7 @@ const bucketEnvironments = {
39
36
  'ctp-gcp-testing-performance-eu': 'ctp-gcp-testing-performance-eu',
40
37
  'ctp-azure-staging': 'ctp-azure-staging',
41
38
  'ctp-azure-production-us': 'ctp-azure-production-us',
39
+ 'ctp-azure-production-eu': 'ctp-azure-production-eu',
42
40
  'ctp-aws-production-fra': 'ctp-aws-production-fra',
43
41
  'ctp-gcp-production-eu': 'ctp-gcp-production-eu',
44
42
  'ctp-vw-production-eu': 'ctp-vw-production-eu',
@@ -110,6 +108,9 @@ const defaultConfig = {
110
108
  }, {
111
109
  cloudEnvironment: clusterContexts['vw_production_aws_eu-central-1_v1'],
112
110
  bucketEnvironment: bucketEnvironments['ctp-vw-production-eu']
111
+ }, {
112
+ cloudEnvironment: clusterContexts['ctp_production_azure_germanywestcentral_v1'],
113
+ bucketEnvironment: bucketEnvironments['ctp-azure-production-eu']
113
114
  }],
114
115
  [bucketRegions.northAmerica]: [{
115
116
  cloudEnvironment: clusterContexts['att_production_aws_us-east-1_v1'],
@@ -143,27 +144,24 @@ const defaultConfig = {
143
144
  }]
144
145
  };
145
146
  function defineStorageBucketsConfig() {
146
- var _options$disabledBuck, _options$disabledEnvi;
147
147
  let _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
148
148
  regions = _ref.regions,
149
149
  options = _ref.options;
150
150
  const actualConfig = regions ? tsDeepmerge.merge(defaultConfig, regions) : defaultConfig;
151
- const disabledBucketRegions = (_options$disabledBuck = options === null || options === void 0 ? void 0 : options.disabledBucketRegions) !== null && _options$disabledBuck !== void 0 ? _options$disabledBuck : [];
152
- const disabledEnvironments = (_options$disabledEnvi = options === null || options === void 0 ? void 0 : options.disabledEnvironments) !== null && _options$disabledEnvi !== void 0 ? _options$disabledEnvi : [];
151
+ const disabledBucketRegions = options?.disabledBucketRegions ?? [];
152
+ const disabledEnvironments = options?.disabledEnvironments ?? [];
153
153
  _forEachInstanceProperty__default["default"](disabledBucketRegions).call(disabledBucketRegions, disabledBucketRegion => {
154
154
  delete actualConfig[disabledBucketRegion];
155
155
  });
156
156
  const allBucketRegions = _Object$keys__default["default"](actualConfig);
157
157
  _forEachInstanceProperty__default["default"](disabledEnvironments).call(disabledEnvironments, disabledEnvrionment => {
158
158
  _forEachInstanceProperty__default["default"](allBucketRegions).call(allBucketRegions, bucketRegionToBeRemoved => {
159
- var _actualConfig$bucketR;
160
- 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);
159
+ actualConfig[bucketRegionToBeRemoved] = actualConfig[bucketRegionToBeRemoved]?.filter(bucketEnvironmentConfig => bucketEnvironmentConfig.cloudEnvironment !== disabledEnvrionment);
161
160
  });
162
161
  });
163
162
  return actualConfig;
164
163
  }
165
164
  async function loadStorageBucketsConfig() {
166
- var _explorerResult;
167
165
  let explorerResult;
168
166
  const storageBucketConfigExplorer = cosmiconfig.cosmiconfig('storage-buckets', {
169
167
  searchStrategy: 'project'
@@ -177,7 +175,7 @@ async function loadStorageBucketsConfig() {
177
175
  if (!explorerResult) {
178
176
  throw new Error('Failed loading a storage bucket configuration');
179
177
  }
180
- return (_explorerResult = explorerResult) === null || _explorerResult === void 0 ? void 0 : _explorerResult.config;
178
+ return explorerResult?.config;
181
179
  }
182
180
  async function loadConfig(moduleName, defaultConfig) {
183
181
  const configExplorer = cosmiconfig.cosmiconfig(moduleName, {
@@ -185,13 +183,12 @@ async function loadConfig(moduleName, defaultConfig) {
185
183
  });
186
184
  try {
187
185
  const cosmiconfigResult = await configExplorer.search();
188
- const mergedConfig = lodash__default["default"].merge(defaultConfig, cosmiconfigResult === null || cosmiconfigResult === void 0 ? void 0 : cosmiconfigResult.config);
189
- console.log("\u2139\uFE0F Merged and loaded cosmiconfig file for '".concat(moduleName, "'."));
186
+ const mergedConfig = lodash__default["default"].merge(defaultConfig, cosmiconfigResult?.config);
187
+ console.log(`ℹ️ Merged and loaded cosmiconfig file for '${moduleName}'.`);
190
188
  return mergedConfig;
191
189
  } catch (e) {
192
- var _context, _context2;
193
190
  console.warn(e);
194
- 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.'"));
191
+ throw new Error(`Failed loading a ${moduleName} configuration. Create a cosmiconfig for '${moduleName}' for example '${moduleName}.config.cjs.'`);
195
192
  }
196
193
  }
197
194
 
@@ -1,7 +1,5 @@
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
- import _filterInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/filter';
4
- import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
5
3
  import { cosmiconfig } from 'cosmiconfig';
6
4
  import { merge } from 'ts-deepmerge';
7
5
  import lodash from 'lodash';
@@ -20,7 +18,8 @@ const clusterContexts = {
20
18
  'ctp_production_gcp_australia-southeast1_v1': 'ctp_production_gcp_australia-southeast1_v1',
21
19
  'ctp_production_aws_cn-northwest-1_v1': 'ctp_production_aws_cn-northwest-1_v1',
22
20
  ctp_staging_azure_northeurope_v1: 'ctp_staging_azure_northeurope_v1',
23
- ctp_production_azure_eastus_v1: 'ctp_production_azure_eastus_v1'
21
+ ctp_production_azure_eastus_v1: 'ctp_production_azure_eastus_v1',
22
+ ctp_production_azure_germanywestcentral_v1: 'ctp_production_azure_germanywestcentral_v1'
24
23
  };
25
24
  const bucketEnvironments = {
26
25
  'ctp-gcp-staging': 'ctp-gcp-staging',
@@ -29,6 +28,7 @@ const bucketEnvironments = {
29
28
  'ctp-gcp-testing-performance-eu': 'ctp-gcp-testing-performance-eu',
30
29
  'ctp-azure-staging': 'ctp-azure-staging',
31
30
  'ctp-azure-production-us': 'ctp-azure-production-us',
31
+ 'ctp-azure-production-eu': 'ctp-azure-production-eu',
32
32
  'ctp-aws-production-fra': 'ctp-aws-production-fra',
33
33
  'ctp-gcp-production-eu': 'ctp-gcp-production-eu',
34
34
  'ctp-vw-production-eu': 'ctp-vw-production-eu',
@@ -100,6 +100,9 @@ const defaultConfig = {
100
100
  }, {
101
101
  cloudEnvironment: clusterContexts['vw_production_aws_eu-central-1_v1'],
102
102
  bucketEnvironment: bucketEnvironments['ctp-vw-production-eu']
103
+ }, {
104
+ cloudEnvironment: clusterContexts['ctp_production_azure_germanywestcentral_v1'],
105
+ bucketEnvironment: bucketEnvironments['ctp-azure-production-eu']
103
106
  }],
104
107
  [bucketRegions.northAmerica]: [{
105
108
  cloudEnvironment: clusterContexts['att_production_aws_us-east-1_v1'],
@@ -133,27 +136,24 @@ const defaultConfig = {
133
136
  }]
134
137
  };
135
138
  function defineStorageBucketsConfig() {
136
- var _options$disabledBuck, _options$disabledEnvi;
137
139
  let _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
138
140
  regions = _ref.regions,
139
141
  options = _ref.options;
140
142
  const actualConfig = regions ? merge(defaultConfig, regions) : defaultConfig;
141
- const disabledBucketRegions = (_options$disabledBuck = options === null || options === void 0 ? void 0 : options.disabledBucketRegions) !== null && _options$disabledBuck !== void 0 ? _options$disabledBuck : [];
142
- const disabledEnvironments = (_options$disabledEnvi = options === null || options === void 0 ? void 0 : options.disabledEnvironments) !== null && _options$disabledEnvi !== void 0 ? _options$disabledEnvi : [];
143
+ const disabledBucketRegions = options?.disabledBucketRegions ?? [];
144
+ const disabledEnvironments = options?.disabledEnvironments ?? [];
143
145
  _forEachInstanceProperty(disabledBucketRegions).call(disabledBucketRegions, disabledBucketRegion => {
144
146
  delete actualConfig[disabledBucketRegion];
145
147
  });
146
148
  const allBucketRegions = _Object$keys(actualConfig);
147
149
  _forEachInstanceProperty(disabledEnvironments).call(disabledEnvironments, disabledEnvrionment => {
148
150
  _forEachInstanceProperty(allBucketRegions).call(allBucketRegions, bucketRegionToBeRemoved => {
149
- var _actualConfig$bucketR;
150
- actualConfig[bucketRegionToBeRemoved] = (_actualConfig$bucketR = actualConfig[bucketRegionToBeRemoved]) === null || _actualConfig$bucketR === void 0 ? void 0 : _filterInstanceProperty(_actualConfig$bucketR).call(_actualConfig$bucketR, bucketEnvironmentConfig => bucketEnvironmentConfig.cloudEnvironment !== disabledEnvrionment);
151
+ actualConfig[bucketRegionToBeRemoved] = actualConfig[bucketRegionToBeRemoved]?.filter(bucketEnvironmentConfig => bucketEnvironmentConfig.cloudEnvironment !== disabledEnvrionment);
151
152
  });
152
153
  });
153
154
  return actualConfig;
154
155
  }
155
156
  async function loadStorageBucketsConfig() {
156
- var _explorerResult;
157
157
  let explorerResult;
158
158
  const storageBucketConfigExplorer = cosmiconfig('storage-buckets', {
159
159
  searchStrategy: 'project'
@@ -167,7 +167,7 @@ async function loadStorageBucketsConfig() {
167
167
  if (!explorerResult) {
168
168
  throw new Error('Failed loading a storage bucket configuration');
169
169
  }
170
- return (_explorerResult = explorerResult) === null || _explorerResult === void 0 ? void 0 : _explorerResult.config;
170
+ return explorerResult?.config;
171
171
  }
172
172
  async function loadConfig(moduleName, defaultConfig) {
173
173
  const configExplorer = cosmiconfig(moduleName, {
@@ -175,13 +175,12 @@ async function loadConfig(moduleName, defaultConfig) {
175
175
  });
176
176
  try {
177
177
  const cosmiconfigResult = await configExplorer.search();
178
- const mergedConfig = lodash.merge(defaultConfig, cosmiconfigResult === null || cosmiconfigResult === void 0 ? void 0 : cosmiconfigResult.config);
179
- console.log("\u2139\uFE0F Merged and loaded cosmiconfig file for '".concat(moduleName, "'."));
178
+ const mergedConfig = lodash.merge(defaultConfig, cosmiconfigResult?.config);
179
+ console.log(`ℹ️ Merged and loaded cosmiconfig file for '${moduleName}'.`);
180
180
  return mergedConfig;
181
181
  } catch (e) {
182
- var _context, _context2;
183
182
  console.warn(e);
184
- 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.'"));
183
+ throw new Error(`Failed loading a ${moduleName} configuration. Create a cosmiconfig for '${moduleName}' for example '${moduleName}.config.cjs.'`);
185
184
  }
186
185
  }
187
186
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/application-cli",
3
- "version": "3.0.2",
3
+ "version": "3.1.0",
4
4
  "description": "Internal CLI to manage Merchant Center application deployments across various environments.",
5
5
  "keywords": [
6
6
  "commercetools",
@@ -23,26 +23,26 @@
23
23
  "@babel/core": "^7.22.11",
24
24
  "@babel/runtime": "^7.21.0",
25
25
  "@babel/runtime-corejs3": "^7.21.0",
26
- "@commercetools-frontend/application-config": "22.29.0",
27
- "@commercetools-frontend/constants": "22.29.0",
28
- "@commercetools-frontend/l10n": "22.29.0",
26
+ "@commercetools-frontend/application-config": "22.30.3",
27
+ "@commercetools-frontend/constants": "22.30.3",
28
+ "@commercetools-frontend/l10n": "22.30.3",
29
29
  "@manypkg/find-root": "2.2.2",
30
30
  "cac": "^6.7.14",
31
31
  "cosmiconfig": "9.0.0",
32
32
  "dotenv": "16.4.5",
33
33
  "execa": "5.1.1",
34
34
  "jsonschema": "^1.4.1",
35
- "listr2": "8.2.3",
35
+ "listr2": "8.2.4",
36
36
  "lodash": "4.17.21",
37
37
  "micromatch": "4.0.7",
38
38
  "node-fetch": "2.7.0",
39
- "ts-deepmerge": "7.0.0"
39
+ "ts-deepmerge": "7.0.1"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@tsconfig/node20": "20.1.4",
43
43
  "@types/lodash": "^4.14.198",
44
44
  "@types/micromatch": "4.0.9",
45
- "@types/node": "20.14.9",
45
+ "@types/node": "20.14.15",
46
46
  "typescript": "5.2.2"
47
47
  },
48
48
  "engines": {