@commercetools-frontend/application-cli 2.1.0 → 2.1.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.
@@ -287,12 +287,23 @@ set -e
287
287
  echo "Uploading static assets to Google Storage bucket ${bucketUrl}"
288
288
 
289
289
  gcloud storage cp \\
290
- ${assetsPath}/public/{*.css,*.js,*.js.map,*.png,*.html,robots.txt} \\
290
+ ${assetsPath}/public/{*.css,*.js,*.js.map,*.html} \\
291
291
  "${bucketUrl}" \\
292
292
  -n \\
293
293
  -z js,css \\
294
294
  --cache-control="public,max-age=31536000,no-transform"
295
295
 
296
+ # We need to upload the PNG and HTML files separately because we want them
297
+ # to be able to overwrite the existing files (if any). For instance, the
298
+ # file or the favicons.
299
+ # This is controlled with the '-n' option (which is used for the JS and CSS
300
+ # as we don't want to overwrite them)
301
+ gcloud storage cp \\
302
+ ${assetsPath}/public/{*.png,robots.txt} \\
303
+ "${bucketUrl}" \\
304
+ -z txt \\
305
+ --cache-control="public,max-age=31536000,no-transform"
306
+
296
307
  if ${skipMenu}; then
297
308
  echo "Skipping menu.json upload"
298
309
  else
@@ -670,15 +681,6 @@ const mapApplicationMenuConfigToGraqhQLMenuJson = config => {
670
681
  shouldRenderDivider: menuLinks.shouldRenderDivider ?? false
671
682
  };
672
683
  };
673
-
674
- // During the migration to the Naming Convention Record for Cloud Environments
675
- // we need to gracefully use the non-compliant and compliant environment names
676
- // for staging to avoid a breaking release of the CLI.
677
- const doesCloudEnvironmentExist = _ref => {
678
- let dotenvPath = _ref.dotenvPath,
679
- cloudEnvironment = _ref.cloudEnvironment;
680
- return fs__default$1["default"].existsSync(path__default["default"].join(dotenvPath ?? '', `.env.${cloudEnvironment}`));
681
- };
682
684
  async function command$2(cliFlags, cwd) {
683
685
  const applicationDirectory = getApplicationDirectory(cwd);
684
686
  const monorepoRoot = findRoot.findRootSync(cwd);
@@ -686,11 +688,7 @@ async function command$2(cliFlags, cwd) {
686
688
 
687
689
  // The env itself is not important for the menu. However, the application config
688
690
  // uses environment placeholders and therefore we need to provide the variables for it.
689
- // TODO: Remove after all repositories migrated to NCR.
690
- const cloudEnvironment = doesCloudEnvironmentExist({
691
- dotenvPath,
692
- cloudEnvironment: storageBucketsConfig.clusterContexts['ctp_staging_gcp_europe-west1_v1']
693
- }) ? storageBucketsConfig.clusterContexts['ctp_staging_gcp_europe-west1_v1'] : 'ctp-gcp-staging';
691
+ const cloudEnvironment = storageBucketsConfig.clusterContexts['ctp_staging_gcp_europe-west1_v1'];
694
692
  const processEnv = _objectSpread$1(_objectSpread$1({}, loadDotenvFiles({
695
693
  dotenvPath,
696
694
  cloudEnvironment
@@ -870,7 +868,7 @@ async function command(cliFlags) {
870
868
 
871
869
  var pkgJson = {
872
870
  name: "@commercetools-frontend/application-cli",
873
- version: "2.1.0",
871
+ version: "2.1.2",
874
872
  description: "Internal CLI to manage Merchant Center application deployments across various environments.",
875
873
  keywords: [
876
874
  "commercetools",
@@ -895,16 +893,16 @@ var pkgJson = {
895
893
  "@babel/core": "^7.22.11",
896
894
  "@babel/runtime-corejs3": "^7.21.0",
897
895
  "@babel/runtime": "^7.21.0",
898
- "@commercetools-frontend/application-config": "22.16.0",
899
- "@commercetools-frontend/constants": "22.16.0",
900
- "@commercetools-frontend/l10n": "22.16.0",
896
+ "@commercetools-frontend/application-config": "22.17.1",
897
+ "@commercetools-frontend/constants": "22.17.1",
898
+ "@commercetools-frontend/l10n": "22.17.1",
901
899
  "@manypkg/find-root": "2.2.1",
902
900
  cac: "^6.7.14",
903
901
  cosmiconfig: "9.0.0",
904
- dotenv: "16.3.2",
902
+ dotenv: "16.4.1",
905
903
  execa: "5.1.1",
906
904
  jsonschema: "^1.4.1",
907
- listr2: "8.0.1",
905
+ listr2: "8.0.2",
908
906
  "node-fetch": "2.7.0",
909
907
  "ts-deepmerge": "7.0.0"
910
908
  },
@@ -287,12 +287,23 @@ set -e
287
287
  echo "Uploading static assets to Google Storage bucket ${bucketUrl}"
288
288
 
289
289
  gcloud storage cp \\
290
- ${assetsPath}/public/{*.css,*.js,*.js.map,*.png,*.html,robots.txt} \\
290
+ ${assetsPath}/public/{*.css,*.js,*.js.map,*.html} \\
291
291
  "${bucketUrl}" \\
292
292
  -n \\
293
293
  -z js,css \\
294
294
  --cache-control="public,max-age=31536000,no-transform"
295
295
 
296
+ # We need to upload the PNG and HTML files separately because we want them
297
+ # to be able to overwrite the existing files (if any). For instance, the
298
+ # file or the favicons.
299
+ # This is controlled with the '-n' option (which is used for the JS and CSS
300
+ # as we don't want to overwrite them)
301
+ gcloud storage cp \\
302
+ ${assetsPath}/public/{*.png,robots.txt} \\
303
+ "${bucketUrl}" \\
304
+ -z txt \\
305
+ --cache-control="public,max-age=31536000,no-transform"
306
+
296
307
  if ${skipMenu}; then
297
308
  echo "Skipping menu.json upload"
298
309
  else
@@ -670,15 +681,6 @@ const mapApplicationMenuConfigToGraqhQLMenuJson = config => {
670
681
  shouldRenderDivider: menuLinks.shouldRenderDivider ?? false
671
682
  };
672
683
  };
673
-
674
- // During the migration to the Naming Convention Record for Cloud Environments
675
- // we need to gracefully use the non-compliant and compliant environment names
676
- // for staging to avoid a breaking release of the CLI.
677
- const doesCloudEnvironmentExist = _ref => {
678
- let dotenvPath = _ref.dotenvPath,
679
- cloudEnvironment = _ref.cloudEnvironment;
680
- return fs__default$1["default"].existsSync(path__default["default"].join(dotenvPath ?? '', `.env.${cloudEnvironment}`));
681
- };
682
684
  async function command$2(cliFlags, cwd) {
683
685
  const applicationDirectory = getApplicationDirectory(cwd);
684
686
  const monorepoRoot = findRoot.findRootSync(cwd);
@@ -686,11 +688,7 @@ async function command$2(cliFlags, cwd) {
686
688
 
687
689
  // The env itself is not important for the menu. However, the application config
688
690
  // uses environment placeholders and therefore we need to provide the variables for it.
689
- // TODO: Remove after all repositories migrated to NCR.
690
- const cloudEnvironment = doesCloudEnvironmentExist({
691
- dotenvPath,
692
- cloudEnvironment: storageBucketsConfig.clusterContexts['ctp_staging_gcp_europe-west1_v1']
693
- }) ? storageBucketsConfig.clusterContexts['ctp_staging_gcp_europe-west1_v1'] : 'ctp-gcp-staging';
691
+ const cloudEnvironment = storageBucketsConfig.clusterContexts['ctp_staging_gcp_europe-west1_v1'];
694
692
  const processEnv = _objectSpread$1(_objectSpread$1({}, loadDotenvFiles({
695
693
  dotenvPath,
696
694
  cloudEnvironment
@@ -870,7 +868,7 @@ async function command(cliFlags) {
870
868
 
871
869
  var pkgJson = {
872
870
  name: "@commercetools-frontend/application-cli",
873
- version: "2.1.0",
871
+ version: "2.1.2",
874
872
  description: "Internal CLI to manage Merchant Center application deployments across various environments.",
875
873
  keywords: [
876
874
  "commercetools",
@@ -895,16 +893,16 @@ var pkgJson = {
895
893
  "@babel/core": "^7.22.11",
896
894
  "@babel/runtime-corejs3": "^7.21.0",
897
895
  "@babel/runtime": "^7.21.0",
898
- "@commercetools-frontend/application-config": "22.16.0",
899
- "@commercetools-frontend/constants": "22.16.0",
900
- "@commercetools-frontend/l10n": "22.16.0",
896
+ "@commercetools-frontend/application-config": "22.17.1",
897
+ "@commercetools-frontend/constants": "22.17.1",
898
+ "@commercetools-frontend/l10n": "22.17.1",
901
899
  "@manypkg/find-root": "2.2.1",
902
900
  cac: "^6.7.14",
903
901
  cosmiconfig: "9.0.0",
904
- dotenv: "16.3.2",
902
+ dotenv: "16.4.1",
905
903
  execa: "5.1.1",
906
904
  jsonschema: "^1.4.1",
907
- listr2: "8.0.1",
905
+ listr2: "8.0.2",
908
906
  "node-fetch": "2.7.0",
909
907
  "ts-deepmerge": "7.0.0"
910
908
  },
@@ -258,12 +258,23 @@ set -e
258
258
  echo "Uploading static assets to Google Storage bucket ${bucketUrl}"
259
259
 
260
260
  gcloud storage cp \\
261
- ${assetsPath}/public/{*.css,*.js,*.js.map,*.png,*.html,robots.txt} \\
261
+ ${assetsPath}/public/{*.css,*.js,*.js.map,*.html} \\
262
262
  "${bucketUrl}" \\
263
263
  -n \\
264
264
  -z js,css \\
265
265
  --cache-control="public,max-age=31536000,no-transform"
266
266
 
267
+ # We need to upload the PNG and HTML files separately because we want them
268
+ # to be able to overwrite the existing files (if any). For instance, the
269
+ # file or the favicons.
270
+ # This is controlled with the '-n' option (which is used for the JS and CSS
271
+ # as we don't want to overwrite them)
272
+ gcloud storage cp \\
273
+ ${assetsPath}/public/{*.png,robots.txt} \\
274
+ "${bucketUrl}" \\
275
+ -z txt \\
276
+ --cache-control="public,max-age=31536000,no-transform"
277
+
267
278
  if ${skipMenu}; then
268
279
  echo "Skipping menu.json upload"
269
280
  else
@@ -641,15 +652,6 @@ const mapApplicationMenuConfigToGraqhQLMenuJson = config => {
641
652
  shouldRenderDivider: menuLinks.shouldRenderDivider ?? false
642
653
  };
643
654
  };
644
-
645
- // During the migration to the Naming Convention Record for Cloud Environments
646
- // we need to gracefully use the non-compliant and compliant environment names
647
- // for staging to avoid a breaking release of the CLI.
648
- const doesCloudEnvironmentExist = _ref => {
649
- let dotenvPath = _ref.dotenvPath,
650
- cloudEnvironment = _ref.cloudEnvironment;
651
- return fs$1.existsSync(path.join(dotenvPath ?? '', `.env.${cloudEnvironment}`));
652
- };
653
655
  async function command$2(cliFlags, cwd) {
654
656
  const applicationDirectory = getApplicationDirectory(cwd);
655
657
  const monorepoRoot = findRootSync(cwd);
@@ -657,11 +659,7 @@ async function command$2(cliFlags, cwd) {
657
659
 
658
660
  // The env itself is not important for the menu. However, the application config
659
661
  // uses environment placeholders and therefore we need to provide the variables for it.
660
- // TODO: Remove after all repositories migrated to NCR.
661
- const cloudEnvironment = doesCloudEnvironmentExist({
662
- dotenvPath,
663
- cloudEnvironment: clusterContexts['ctp_staging_gcp_europe-west1_v1']
664
- }) ? clusterContexts['ctp_staging_gcp_europe-west1_v1'] : 'ctp-gcp-staging';
662
+ const cloudEnvironment = clusterContexts['ctp_staging_gcp_europe-west1_v1'];
665
663
  const processEnv = _objectSpread$1(_objectSpread$1({}, loadDotenvFiles({
666
664
  dotenvPath,
667
665
  cloudEnvironment
@@ -841,7 +839,7 @@ async function command(cliFlags) {
841
839
 
842
840
  var pkgJson = {
843
841
  name: "@commercetools-frontend/application-cli",
844
- version: "2.1.0",
842
+ version: "2.1.2",
845
843
  description: "Internal CLI to manage Merchant Center application deployments across various environments.",
846
844
  keywords: [
847
845
  "commercetools",
@@ -866,16 +864,16 @@ var pkgJson = {
866
864
  "@babel/core": "^7.22.11",
867
865
  "@babel/runtime-corejs3": "^7.21.0",
868
866
  "@babel/runtime": "^7.21.0",
869
- "@commercetools-frontend/application-config": "22.16.0",
870
- "@commercetools-frontend/constants": "22.16.0",
871
- "@commercetools-frontend/l10n": "22.16.0",
867
+ "@commercetools-frontend/application-config": "22.17.1",
868
+ "@commercetools-frontend/constants": "22.17.1",
869
+ "@commercetools-frontend/l10n": "22.17.1",
872
870
  "@manypkg/find-root": "2.2.1",
873
871
  cac: "^6.7.14",
874
872
  cosmiconfig: "9.0.0",
875
- dotenv: "16.3.2",
873
+ dotenv: "16.4.1",
876
874
  execa: "5.1.1",
877
875
  jsonschema: "^1.4.1",
878
- listr2: "8.0.1",
876
+ listr2: "8.0.2",
879
877
  "node-fetch": "2.7.0",
880
878
  "ts-deepmerge": "7.0.0"
881
879
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/application-cli",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "Internal CLI to manage Merchant Center application deployments across various environments.",
5
5
  "keywords": [
6
6
  "commercetools",
@@ -22,16 +22,16 @@
22
22
  "@babel/core": "^7.22.11",
23
23
  "@babel/runtime-corejs3": "^7.21.0",
24
24
  "@babel/runtime": "^7.21.0",
25
- "@commercetools-frontend/application-config": "22.16.0",
26
- "@commercetools-frontend/constants": "22.16.0",
27
- "@commercetools-frontend/l10n": "22.16.0",
25
+ "@commercetools-frontend/application-config": "22.17.1",
26
+ "@commercetools-frontend/constants": "22.17.1",
27
+ "@commercetools-frontend/l10n": "22.17.1",
28
28
  "@manypkg/find-root": "2.2.1",
29
29
  "cac": "^6.7.14",
30
30
  "cosmiconfig": "9.0.0",
31
- "dotenv": "16.3.2",
31
+ "dotenv": "16.4.1",
32
32
  "execa": "5.1.1",
33
33
  "jsonschema": "^1.4.1",
34
- "listr2": "8.0.1",
34
+ "listr2": "8.0.2",
35
35
  "node-fetch": "2.7.0",
36
36
  "ts-deepmerge": "7.0.0"
37
37
  },