@commercetools-frontend/application-cli 6.0.0 → 6.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.
|
@@ -432,8 +432,38 @@ set -e
|
|
|
432
432
|
# be overwritten
|
|
433
433
|
echo "Uploading static assets to Google Storage bucket ${bucketUrl}"
|
|
434
434
|
|
|
435
|
+
# List of required file types
|
|
436
|
+
required_files=("*.css" "*.js" "*.js.map" "*.html")
|
|
437
|
+
|
|
438
|
+
# List of optional file types
|
|
439
|
+
optional_files=("*.svg")
|
|
440
|
+
|
|
441
|
+
# Check for the existence of required files
|
|
442
|
+
for file_pattern in "\${required_files[@]}"; do
|
|
443
|
+
if ! find "${assetsPath}/public" -type f -name "$file_pattern" -print -quit | grep -q .; then
|
|
444
|
+
echo "Error: No required files matching $file_pattern found in ${assetsPath}/public."
|
|
445
|
+
exit 1
|
|
446
|
+
fi
|
|
447
|
+
done
|
|
448
|
+
|
|
449
|
+
# Initialize source_pattern with required files
|
|
450
|
+
source_pattern="${assetsPath}/public/{$(IFS=,; echo "\${required_files[*]}")"
|
|
451
|
+
|
|
452
|
+
# Check for optional files and add them to the source_pattern if they exist
|
|
453
|
+
for file_pattern in "\${optional_files[@]}"; do
|
|
454
|
+
if find "$assetsPath" -type f -name "$file_pattern" -print -quit | grep -q .; then
|
|
455
|
+
source_pattern+=",\${file_pattern}"
|
|
456
|
+
fi
|
|
457
|
+
done
|
|
458
|
+
|
|
459
|
+
# Close the brace in source_pattern
|
|
460
|
+
source_pattern+="}"
|
|
461
|
+
|
|
462
|
+
# Expand the source_pattern variable as the below command will not work if the variable is a string
|
|
463
|
+
expanded_source_pattern=$(eval echo $source_pattern)
|
|
464
|
+
|
|
435
465
|
gcloud storage cp \\
|
|
436
|
-
$
|
|
466
|
+
$expanded_source_pattern \\
|
|
437
467
|
"${bucketUrl}" \\
|
|
438
468
|
-n \\
|
|
439
469
|
-z js,css \\
|
|
@@ -549,6 +579,12 @@ echo "Uploading static assets to Amazon S3 bucket ${bucketUrl}"
|
|
|
549
579
|
|
|
550
580
|
set -e
|
|
551
581
|
|
|
582
|
+
# Check for the existence of the application required files types
|
|
583
|
+
if ! find "${assetsPath}" -type f -regex ".*\\.\\(css\\|js\\|html\\)" | grep -q .; then
|
|
584
|
+
echo "Error: No CSS, JS, or HTML files found in ${assetsPath}."
|
|
585
|
+
exit 1
|
|
586
|
+
fi
|
|
587
|
+
|
|
552
588
|
# NOTE:
|
|
553
589
|
# The sync command on the AWS CLI is different to the -n option on the gcloud CLI.
|
|
554
590
|
# Sync will only upload files that are not already in the bucket, but it will skip existing ones
|
|
@@ -566,6 +602,7 @@ aws s3 sync ${assetsPath}/public \\
|
|
|
566
602
|
--include "*.js" \\
|
|
567
603
|
--include "*.js.map" \\
|
|
568
604
|
--include "*.html" \\
|
|
605
|
+
--include "*.svg" \\
|
|
569
606
|
--cache-control="public,max-age=31536000,no-transform" \\
|
|
570
607
|
--profile ${_classPrivateFieldLooseBase(this, _bucketRegion2)[_bucketRegion2]}
|
|
571
608
|
|
|
@@ -1265,7 +1302,7 @@ async function command(cliFlags) {
|
|
|
1265
1302
|
|
|
1266
1303
|
var pkgJson = {
|
|
1267
1304
|
name: "@commercetools-frontend/application-cli",
|
|
1268
|
-
version: "6.
|
|
1305
|
+
version: "6.1.0",
|
|
1269
1306
|
description: "Internal CLI to manage Merchant Center application deployments across various environments.",
|
|
1270
1307
|
keywords: [
|
|
1271
1308
|
"commercetools",
|
|
@@ -1290,9 +1327,9 @@ var pkgJson = {
|
|
|
1290
1327
|
dependencies: {
|
|
1291
1328
|
"@babel/core": "^7.22.11",
|
|
1292
1329
|
"@babel/runtime-corejs3": "^7.21.0",
|
|
1293
|
-
"@commercetools-frontend/application-config": "22.
|
|
1294
|
-
"@commercetools-frontend/constants": "22.
|
|
1295
|
-
"@commercetools-frontend/l10n": "22.
|
|
1330
|
+
"@commercetools-frontend/application-config": "22.39.1",
|
|
1331
|
+
"@commercetools-frontend/constants": "22.39.1",
|
|
1332
|
+
"@commercetools-frontend/l10n": "22.39.1",
|
|
1296
1333
|
"@manypkg/find-root": "2.2.3",
|
|
1297
1334
|
cac: "^6.7.14",
|
|
1298
1335
|
cosmiconfig: "9.0.0",
|
|
@@ -432,8 +432,38 @@ set -e
|
|
|
432
432
|
# be overwritten
|
|
433
433
|
echo "Uploading static assets to Google Storage bucket ${bucketUrl}"
|
|
434
434
|
|
|
435
|
+
# List of required file types
|
|
436
|
+
required_files=("*.css" "*.js" "*.js.map" "*.html")
|
|
437
|
+
|
|
438
|
+
# List of optional file types
|
|
439
|
+
optional_files=("*.svg")
|
|
440
|
+
|
|
441
|
+
# Check for the existence of required files
|
|
442
|
+
for file_pattern in "\${required_files[@]}"; do
|
|
443
|
+
if ! find "${assetsPath}/public" -type f -name "$file_pattern" -print -quit | grep -q .; then
|
|
444
|
+
echo "Error: No required files matching $file_pattern found in ${assetsPath}/public."
|
|
445
|
+
exit 1
|
|
446
|
+
fi
|
|
447
|
+
done
|
|
448
|
+
|
|
449
|
+
# Initialize source_pattern with required files
|
|
450
|
+
source_pattern="${assetsPath}/public/{$(IFS=,; echo "\${required_files[*]}")"
|
|
451
|
+
|
|
452
|
+
# Check for optional files and add them to the source_pattern if they exist
|
|
453
|
+
for file_pattern in "\${optional_files[@]}"; do
|
|
454
|
+
if find "$assetsPath" -type f -name "$file_pattern" -print -quit | grep -q .; then
|
|
455
|
+
source_pattern+=",\${file_pattern}"
|
|
456
|
+
fi
|
|
457
|
+
done
|
|
458
|
+
|
|
459
|
+
# Close the brace in source_pattern
|
|
460
|
+
source_pattern+="}"
|
|
461
|
+
|
|
462
|
+
# Expand the source_pattern variable as the below command will not work if the variable is a string
|
|
463
|
+
expanded_source_pattern=$(eval echo $source_pattern)
|
|
464
|
+
|
|
435
465
|
gcloud storage cp \\
|
|
436
|
-
$
|
|
466
|
+
$expanded_source_pattern \\
|
|
437
467
|
"${bucketUrl}" \\
|
|
438
468
|
-n \\
|
|
439
469
|
-z js,css \\
|
|
@@ -549,6 +579,12 @@ echo "Uploading static assets to Amazon S3 bucket ${bucketUrl}"
|
|
|
549
579
|
|
|
550
580
|
set -e
|
|
551
581
|
|
|
582
|
+
# Check for the existence of the application required files types
|
|
583
|
+
if ! find "${assetsPath}" -type f -regex ".*\\.\\(css\\|js\\|html\\)" | grep -q .; then
|
|
584
|
+
echo "Error: No CSS, JS, or HTML files found in ${assetsPath}."
|
|
585
|
+
exit 1
|
|
586
|
+
fi
|
|
587
|
+
|
|
552
588
|
# NOTE:
|
|
553
589
|
# The sync command on the AWS CLI is different to the -n option on the gcloud CLI.
|
|
554
590
|
# Sync will only upload files that are not already in the bucket, but it will skip existing ones
|
|
@@ -566,6 +602,7 @@ aws s3 sync ${assetsPath}/public \\
|
|
|
566
602
|
--include "*.js" \\
|
|
567
603
|
--include "*.js.map" \\
|
|
568
604
|
--include "*.html" \\
|
|
605
|
+
--include "*.svg" \\
|
|
569
606
|
--cache-control="public,max-age=31536000,no-transform" \\
|
|
570
607
|
--profile ${_classPrivateFieldLooseBase(this, _bucketRegion2)[_bucketRegion2]}
|
|
571
608
|
|
|
@@ -1265,7 +1302,7 @@ async function command(cliFlags) {
|
|
|
1265
1302
|
|
|
1266
1303
|
var pkgJson = {
|
|
1267
1304
|
name: "@commercetools-frontend/application-cli",
|
|
1268
|
-
version: "6.
|
|
1305
|
+
version: "6.1.0",
|
|
1269
1306
|
description: "Internal CLI to manage Merchant Center application deployments across various environments.",
|
|
1270
1307
|
keywords: [
|
|
1271
1308
|
"commercetools",
|
|
@@ -1290,9 +1327,9 @@ var pkgJson = {
|
|
|
1290
1327
|
dependencies: {
|
|
1291
1328
|
"@babel/core": "^7.22.11",
|
|
1292
1329
|
"@babel/runtime-corejs3": "^7.21.0",
|
|
1293
|
-
"@commercetools-frontend/application-config": "22.
|
|
1294
|
-
"@commercetools-frontend/constants": "22.
|
|
1295
|
-
"@commercetools-frontend/l10n": "22.
|
|
1330
|
+
"@commercetools-frontend/application-config": "22.39.1",
|
|
1331
|
+
"@commercetools-frontend/constants": "22.39.1",
|
|
1332
|
+
"@commercetools-frontend/l10n": "22.39.1",
|
|
1296
1333
|
"@manypkg/find-root": "2.2.3",
|
|
1297
1334
|
cac: "^6.7.14",
|
|
1298
1335
|
cosmiconfig: "9.0.0",
|
|
@@ -396,8 +396,38 @@ set -e
|
|
|
396
396
|
# be overwritten
|
|
397
397
|
echo "Uploading static assets to Google Storage bucket ${bucketUrl}"
|
|
398
398
|
|
|
399
|
+
# List of required file types
|
|
400
|
+
required_files=("*.css" "*.js" "*.js.map" "*.html")
|
|
401
|
+
|
|
402
|
+
# List of optional file types
|
|
403
|
+
optional_files=("*.svg")
|
|
404
|
+
|
|
405
|
+
# Check for the existence of required files
|
|
406
|
+
for file_pattern in "\${required_files[@]}"; do
|
|
407
|
+
if ! find "${assetsPath}/public" -type f -name "$file_pattern" -print -quit | grep -q .; then
|
|
408
|
+
echo "Error: No required files matching $file_pattern found in ${assetsPath}/public."
|
|
409
|
+
exit 1
|
|
410
|
+
fi
|
|
411
|
+
done
|
|
412
|
+
|
|
413
|
+
# Initialize source_pattern with required files
|
|
414
|
+
source_pattern="${assetsPath}/public/{$(IFS=,; echo "\${required_files[*]}")"
|
|
415
|
+
|
|
416
|
+
# Check for optional files and add them to the source_pattern if they exist
|
|
417
|
+
for file_pattern in "\${optional_files[@]}"; do
|
|
418
|
+
if find "$assetsPath" -type f -name "$file_pattern" -print -quit | grep -q .; then
|
|
419
|
+
source_pattern+=",\${file_pattern}"
|
|
420
|
+
fi
|
|
421
|
+
done
|
|
422
|
+
|
|
423
|
+
# Close the brace in source_pattern
|
|
424
|
+
source_pattern+="}"
|
|
425
|
+
|
|
426
|
+
# Expand the source_pattern variable as the below command will not work if the variable is a string
|
|
427
|
+
expanded_source_pattern=$(eval echo $source_pattern)
|
|
428
|
+
|
|
399
429
|
gcloud storage cp \\
|
|
400
|
-
$
|
|
430
|
+
$expanded_source_pattern \\
|
|
401
431
|
"${bucketUrl}" \\
|
|
402
432
|
-n \\
|
|
403
433
|
-z js,css \\
|
|
@@ -513,6 +543,12 @@ echo "Uploading static assets to Amazon S3 bucket ${bucketUrl}"
|
|
|
513
543
|
|
|
514
544
|
set -e
|
|
515
545
|
|
|
546
|
+
# Check for the existence of the application required files types
|
|
547
|
+
if ! find "${assetsPath}" -type f -regex ".*\\.\\(css\\|js\\|html\\)" | grep -q .; then
|
|
548
|
+
echo "Error: No CSS, JS, or HTML files found in ${assetsPath}."
|
|
549
|
+
exit 1
|
|
550
|
+
fi
|
|
551
|
+
|
|
516
552
|
# NOTE:
|
|
517
553
|
# The sync command on the AWS CLI is different to the -n option on the gcloud CLI.
|
|
518
554
|
# Sync will only upload files that are not already in the bucket, but it will skip existing ones
|
|
@@ -530,6 +566,7 @@ aws s3 sync ${assetsPath}/public \\
|
|
|
530
566
|
--include "*.js" \\
|
|
531
567
|
--include "*.js.map" \\
|
|
532
568
|
--include "*.html" \\
|
|
569
|
+
--include "*.svg" \\
|
|
533
570
|
--cache-control="public,max-age=31536000,no-transform" \\
|
|
534
571
|
--profile ${_classPrivateFieldLooseBase(this, _bucketRegion2)[_bucketRegion2]}
|
|
535
572
|
|
|
@@ -1229,7 +1266,7 @@ async function command(cliFlags) {
|
|
|
1229
1266
|
|
|
1230
1267
|
var pkgJson = {
|
|
1231
1268
|
name: "@commercetools-frontend/application-cli",
|
|
1232
|
-
version: "6.
|
|
1269
|
+
version: "6.1.0",
|
|
1233
1270
|
description: "Internal CLI to manage Merchant Center application deployments across various environments.",
|
|
1234
1271
|
keywords: [
|
|
1235
1272
|
"commercetools",
|
|
@@ -1254,9 +1291,9 @@ var pkgJson = {
|
|
|
1254
1291
|
dependencies: {
|
|
1255
1292
|
"@babel/core": "^7.22.11",
|
|
1256
1293
|
"@babel/runtime-corejs3": "^7.21.0",
|
|
1257
|
-
"@commercetools-frontend/application-config": "22.
|
|
1258
|
-
"@commercetools-frontend/constants": "22.
|
|
1259
|
-
"@commercetools-frontend/l10n": "22.
|
|
1294
|
+
"@commercetools-frontend/application-config": "22.39.1",
|
|
1295
|
+
"@commercetools-frontend/constants": "22.39.1",
|
|
1296
|
+
"@commercetools-frontend/l10n": "22.39.1",
|
|
1260
1297
|
"@manypkg/find-root": "2.2.3",
|
|
1261
1298
|
cac: "^6.7.14",
|
|
1262
1299
|
cosmiconfig: "9.0.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/application-cli",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"description": "Internal CLI to manage Merchant Center application deployments across various environments.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"commercetools",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@babel/core": "^7.22.11",
|
|
24
24
|
"@babel/runtime-corejs3": "^7.21.0",
|
|
25
|
-
"@commercetools-frontend/application-config": "22.
|
|
26
|
-
"@commercetools-frontend/constants": "22.
|
|
27
|
-
"@commercetools-frontend/l10n": "22.
|
|
25
|
+
"@commercetools-frontend/application-config": "22.39.1",
|
|
26
|
+
"@commercetools-frontend/constants": "22.39.1",
|
|
27
|
+
"@commercetools-frontend/l10n": "22.39.1",
|
|
28
28
|
"@manypkg/find-root": "2.2.3",
|
|
29
29
|
"cac": "^6.7.14",
|
|
30
30
|
"cosmiconfig": "9.0.0",
|