@commercetools-frontend/application-cli 2.3.1 → 2.3.2

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,9 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var storageBucketsConfig = require('./storage-buckets-config-28a1d76e.cjs.dev.js');
5
+ var storageBucketsConfig = require('./storage-buckets-config-8e7abeff.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');
8
9
  require('cosmiconfig');
9
10
  require('ts-deepmerge');
10
11
 
@@ -2,9 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var storageBucketsConfig = require('./storage-buckets-config-e3ea6d6f.cjs.prod.js');
5
+ var storageBucketsConfig = require('./storage-buckets-config-e092f613.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');
8
9
  require('cosmiconfig');
9
10
  require('ts-deepmerge');
10
11
 
@@ -1,5 +1,6 @@
1
- export { b as bucketEnvironments, a as bucketRegions, e as bucketUrls, c as clusterContexts, d as defineStorageBucketsConfig, p as publicStorageUrls, s as storageProviders } from './storage-buckets-config-705b6341.esm.js';
1
+ export { b as bucketEnvironments, a as bucketRegions, e as bucketUrls, c as clusterContexts, d as defineStorageBucketsConfig, p as publicStorageUrls, s as storageProviders } from './storage-buckets-config-f41d07bc.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';
4
5
  import 'cosmiconfig';
5
6
  import 'ts-deepmerge';
@@ -2,6 +2,7 @@
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');
5
6
  var cosmiconfig = require('cosmiconfig');
6
7
  var tsDeepmerge = require('ts-deepmerge');
7
8
 
@@ -9,6 +10,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e };
9
10
 
10
11
  var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachInstanceProperty);
11
12
  var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
13
+ var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
12
14
 
13
15
  const clusterContexts = {
14
16
  'ctp_staging_gcp_europe-west1_v1': 'ctp_staging_gcp_europe-west1_v1',
@@ -134,24 +136,27 @@ const defaultConfig = {
134
136
  }]
135
137
  };
136
138
  function defineStorageBucketsConfig() {
139
+ var _options$disabledBuck, _options$disabledEnvi;
137
140
  let _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
138
141
  regions = _ref.regions,
139
142
  options = _ref.options;
140
143
  const actualConfig = regions ? tsDeepmerge.merge(defaultConfig, regions) : defaultConfig;
141
- const disabledBucketRegions = options?.disabledBucketRegions ?? [];
142
- const disabledEnvironments = options?.disabledEnvironments ?? [];
144
+ const disabledBucketRegions = (_options$disabledBuck = options === null || options === void 0 ? void 0 : options.disabledBucketRegions) !== null && _options$disabledBuck !== void 0 ? _options$disabledBuck : [];
145
+ const disabledEnvironments = (_options$disabledEnvi = options === null || options === void 0 ? void 0 : options.disabledEnvironments) !== null && _options$disabledEnvi !== void 0 ? _options$disabledEnvi : [];
143
146
  _forEachInstanceProperty__default["default"](disabledBucketRegions).call(disabledBucketRegions, disabledBucketRegion => {
144
147
  delete actualConfig[disabledBucketRegion];
145
148
  });
146
149
  const allBucketRegions = _Object$keys__default["default"](actualConfig);
147
150
  _forEachInstanceProperty__default["default"](disabledEnvironments).call(disabledEnvironments, disabledEnvrionment => {
148
151
  _forEachInstanceProperty__default["default"](allBucketRegions).call(allBucketRegions, bucketRegionToBeRemoved => {
149
- actualConfig[bucketRegionToBeRemoved] = actualConfig[bucketRegionToBeRemoved]?.filter(bucketEnvironmentConfig => bucketEnvironmentConfig.cloudEnvironment !== disabledEnvrionment);
152
+ var _actualConfig$bucketR;
153
+ 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);
150
154
  });
151
155
  });
152
156
  return actualConfig;
153
157
  }
154
158
  async function loadStorageBucketsConfig() {
159
+ var _explorerResult;
155
160
  let explorerResult;
156
161
  const storageBucketConfigExplorer = cosmiconfig.cosmiconfig('storage-buckets', {
157
162
  searchStrategy: 'project'
@@ -165,7 +170,7 @@ async function loadStorageBucketsConfig() {
165
170
  if (!explorerResult) {
166
171
  throw new Error('Failed loading a storage bucket configuration');
167
172
  }
168
- return explorerResult?.config;
173
+ return (_explorerResult = explorerResult) === null || _explorerResult === void 0 ? void 0 : _explorerResult.config;
169
174
  }
170
175
 
171
176
  exports.bucketEnvironments = bucketEnvironments;
@@ -2,6 +2,7 @@
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');
5
6
  var cosmiconfig = require('cosmiconfig');
6
7
  var tsDeepmerge = require('ts-deepmerge');
7
8
 
@@ -9,6 +10,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e };
9
10
 
10
11
  var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachInstanceProperty);
11
12
  var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
13
+ var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
12
14
 
13
15
  const clusterContexts = {
14
16
  'ctp_staging_gcp_europe-west1_v1': 'ctp_staging_gcp_europe-west1_v1',
@@ -134,24 +136,27 @@ const defaultConfig = {
134
136
  }]
135
137
  };
136
138
  function defineStorageBucketsConfig() {
139
+ var _options$disabledBuck, _options$disabledEnvi;
137
140
  let _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
138
141
  regions = _ref.regions,
139
142
  options = _ref.options;
140
143
  const actualConfig = regions ? tsDeepmerge.merge(defaultConfig, regions) : defaultConfig;
141
- const disabledBucketRegions = options?.disabledBucketRegions ?? [];
142
- const disabledEnvironments = options?.disabledEnvironments ?? [];
144
+ const disabledBucketRegions = (_options$disabledBuck = options === null || options === void 0 ? void 0 : options.disabledBucketRegions) !== null && _options$disabledBuck !== void 0 ? _options$disabledBuck : [];
145
+ const disabledEnvironments = (_options$disabledEnvi = options === null || options === void 0 ? void 0 : options.disabledEnvironments) !== null && _options$disabledEnvi !== void 0 ? _options$disabledEnvi : [];
143
146
  _forEachInstanceProperty__default["default"](disabledBucketRegions).call(disabledBucketRegions, disabledBucketRegion => {
144
147
  delete actualConfig[disabledBucketRegion];
145
148
  });
146
149
  const allBucketRegions = _Object$keys__default["default"](actualConfig);
147
150
  _forEachInstanceProperty__default["default"](disabledEnvironments).call(disabledEnvironments, disabledEnvrionment => {
148
151
  _forEachInstanceProperty__default["default"](allBucketRegions).call(allBucketRegions, bucketRegionToBeRemoved => {
149
- actualConfig[bucketRegionToBeRemoved] = actualConfig[bucketRegionToBeRemoved]?.filter(bucketEnvironmentConfig => bucketEnvironmentConfig.cloudEnvironment !== disabledEnvrionment);
152
+ var _actualConfig$bucketR;
153
+ 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);
150
154
  });
151
155
  });
152
156
  return actualConfig;
153
157
  }
154
158
  async function loadStorageBucketsConfig() {
159
+ var _explorerResult;
155
160
  let explorerResult;
156
161
  const storageBucketConfigExplorer = cosmiconfig.cosmiconfig('storage-buckets', {
157
162
  searchStrategy: 'project'
@@ -165,7 +170,7 @@ async function loadStorageBucketsConfig() {
165
170
  if (!explorerResult) {
166
171
  throw new Error('Failed loading a storage bucket configuration');
167
172
  }
168
- return explorerResult?.config;
173
+ return (_explorerResult = explorerResult) === null || _explorerResult === void 0 ? void 0 : _explorerResult.config;
169
174
  }
170
175
 
171
176
  exports.bucketEnvironments = bucketEnvironments;
@@ -1,5 +1,6 @@
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';
3
4
  import { cosmiconfig } from 'cosmiconfig';
4
5
  import { merge } from 'ts-deepmerge';
5
6
 
@@ -127,24 +128,27 @@ const defaultConfig = {
127
128
  }]
128
129
  };
129
130
  function defineStorageBucketsConfig() {
131
+ var _options$disabledBuck, _options$disabledEnvi;
130
132
  let _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
131
133
  regions = _ref.regions,
132
134
  options = _ref.options;
133
135
  const actualConfig = regions ? merge(defaultConfig, regions) : defaultConfig;
134
- const disabledBucketRegions = options?.disabledBucketRegions ?? [];
135
- const disabledEnvironments = options?.disabledEnvironments ?? [];
136
+ const disabledBucketRegions = (_options$disabledBuck = options === null || options === void 0 ? void 0 : options.disabledBucketRegions) !== null && _options$disabledBuck !== void 0 ? _options$disabledBuck : [];
137
+ const disabledEnvironments = (_options$disabledEnvi = options === null || options === void 0 ? void 0 : options.disabledEnvironments) !== null && _options$disabledEnvi !== void 0 ? _options$disabledEnvi : [];
136
138
  _forEachInstanceProperty(disabledBucketRegions).call(disabledBucketRegions, disabledBucketRegion => {
137
139
  delete actualConfig[disabledBucketRegion];
138
140
  });
139
141
  const allBucketRegions = _Object$keys(actualConfig);
140
142
  _forEachInstanceProperty(disabledEnvironments).call(disabledEnvironments, disabledEnvrionment => {
141
143
  _forEachInstanceProperty(allBucketRegions).call(allBucketRegions, bucketRegionToBeRemoved => {
142
- actualConfig[bucketRegionToBeRemoved] = actualConfig[bucketRegionToBeRemoved]?.filter(bucketEnvironmentConfig => bucketEnvironmentConfig.cloudEnvironment !== disabledEnvrionment);
144
+ var _actualConfig$bucketR;
145
+ actualConfig[bucketRegionToBeRemoved] = (_actualConfig$bucketR = actualConfig[bucketRegionToBeRemoved]) === null || _actualConfig$bucketR === void 0 ? void 0 : _filterInstanceProperty(_actualConfig$bucketR).call(_actualConfig$bucketR, bucketEnvironmentConfig => bucketEnvironmentConfig.cloudEnvironment !== disabledEnvrionment);
143
146
  });
144
147
  });
145
148
  return actualConfig;
146
149
  }
147
150
  async function loadStorageBucketsConfig() {
151
+ var _explorerResult;
148
152
  let explorerResult;
149
153
  const storageBucketConfigExplorer = cosmiconfig('storage-buckets', {
150
154
  searchStrategy: 'project'
@@ -158,7 +162,7 @@ async function loadStorageBucketsConfig() {
158
162
  if (!explorerResult) {
159
163
  throw new Error('Failed loading a storage bucket configuration');
160
164
  }
161
- return explorerResult?.config;
165
+ return (_explorerResult = explorerResult) === null || _explorerResult === void 0 ? void 0 : _explorerResult.config;
162
166
  }
163
167
 
164
168
  export { bucketRegions as a, bucketEnvironments as b, clusterContexts as c, defineStorageBucketsConfig as d, bucketUrls as e, loadStorageBucketsConfig as l, publicStorageUrls as p, storageProviders as s };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/application-cli",
3
- "version": "2.3.1",
3
+ "version": "2.3.2",
4
4
  "description": "Internal CLI to manage Merchant Center application deployments across various environments.",
5
5
  "keywords": [
6
6
  "commercetools",
@@ -22,22 +22,22 @@
22
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.22.0",
26
- "@commercetools-frontend/constants": "22.22.0",
27
- "@commercetools-frontend/l10n": "22.22.0",
25
+ "@commercetools-frontend/application-config": "22.23.3",
26
+ "@commercetools-frontend/constants": "22.23.3",
27
+ "@commercetools-frontend/l10n": "22.23.3",
28
28
  "@manypkg/find-root": "2.2.1",
29
29
  "cac": "^6.7.14",
30
30
  "cosmiconfig": "9.0.0",
31
- "dotenv": "16.4.2",
31
+ "dotenv": "16.4.5",
32
32
  "execa": "5.1.1",
33
33
  "jsonschema": "^1.4.1",
34
- "listr2": "8.0.2",
34
+ "listr2": "8.2.0",
35
35
  "node-fetch": "2.7.0",
36
36
  "ts-deepmerge": "7.0.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@tsconfig/node20": "20.1.2",
40
- "@types/node": "20.12.2",
39
+ "@tsconfig/node20": "20.1.4",
40
+ "@types/node": "20.12.7",
41
41
  "typescript": "5.2.2"
42
42
  },
43
43
  "engines": {