@commercetools-frontend/application-cli 1.8.0 → 1.8.1
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.
|
@@ -520,6 +520,15 @@ const mapApplicationMenuConfigToGraqhQLMenuJson = config => {
|
|
|
520
520
|
shouldRenderDivider: menuLinks.shouldRenderDivider ?? false
|
|
521
521
|
};
|
|
522
522
|
};
|
|
523
|
+
|
|
524
|
+
// During the migration to the Naming Convention Record for Cloud Environments
|
|
525
|
+
// we need to gracefully use the non-compliant and compliant environment names
|
|
526
|
+
// for staging to avoid a breaking release of the CLI.
|
|
527
|
+
const doesCloudEnvironmentExist = _ref => {
|
|
528
|
+
let dotenvPath = _ref.dotenvPath,
|
|
529
|
+
cloudEnvironment = _ref.cloudEnvironment;
|
|
530
|
+
return fs__default["default"].existsSync(path__default["default"].join(dotenvPath ?? '', cloudEnvironment));
|
|
531
|
+
};
|
|
523
532
|
async function command$2(cliFlags, cwd) {
|
|
524
533
|
const applicationDirectory = getApplicationDirectory(cwd);
|
|
525
534
|
const monorepoRoot = findRoot.findRootSync(cwd);
|
|
@@ -528,7 +537,11 @@ async function command$2(cliFlags, cwd) {
|
|
|
528
537
|
dotenvPath,
|
|
529
538
|
// The env itself is not important for the menu. However, the application config
|
|
530
539
|
// uses environment placeholders and therefore we need to provide the variables for it.
|
|
531
|
-
|
|
540
|
+
// TODO: Remove after all repositories migrated to NCR.
|
|
541
|
+
cloudEnvironment: doesCloudEnvironmentExist({
|
|
542
|
+
dotenvPath,
|
|
543
|
+
cloudEnvironment: '.env.ctp_staging_gcp_europe-west1_v1'
|
|
544
|
+
}) ? 'ctp_staging_gcp_europe-west1_v1' : 'ctp-gcp-staging'
|
|
532
545
|
})), {}, {
|
|
533
546
|
// Again, make sure that the environment is "development", otherwise
|
|
534
547
|
// the menu config won't be available.
|
|
@@ -705,7 +718,7 @@ async function command(cliFlags) {
|
|
|
705
718
|
|
|
706
719
|
var pkgJson = {
|
|
707
720
|
name: "@commercetools-frontend/application-cli",
|
|
708
|
-
version: "1.8.
|
|
721
|
+
version: "1.8.1",
|
|
709
722
|
description: "Internal CLI to manage Merchant Center application deployments across various environments.",
|
|
710
723
|
keywords: [
|
|
711
724
|
"commercetools",
|
|
@@ -520,6 +520,15 @@ const mapApplicationMenuConfigToGraqhQLMenuJson = config => {
|
|
|
520
520
|
shouldRenderDivider: menuLinks.shouldRenderDivider ?? false
|
|
521
521
|
};
|
|
522
522
|
};
|
|
523
|
+
|
|
524
|
+
// During the migration to the Naming Convention Record for Cloud Environments
|
|
525
|
+
// we need to gracefully use the non-compliant and compliant environment names
|
|
526
|
+
// for staging to avoid a breaking release of the CLI.
|
|
527
|
+
const doesCloudEnvironmentExist = _ref => {
|
|
528
|
+
let dotenvPath = _ref.dotenvPath,
|
|
529
|
+
cloudEnvironment = _ref.cloudEnvironment;
|
|
530
|
+
return fs__default["default"].existsSync(path__default["default"].join(dotenvPath ?? '', cloudEnvironment));
|
|
531
|
+
};
|
|
523
532
|
async function command$2(cliFlags, cwd) {
|
|
524
533
|
const applicationDirectory = getApplicationDirectory(cwd);
|
|
525
534
|
const monorepoRoot = findRoot.findRootSync(cwd);
|
|
@@ -528,7 +537,11 @@ async function command$2(cliFlags, cwd) {
|
|
|
528
537
|
dotenvPath,
|
|
529
538
|
// The env itself is not important for the menu. However, the application config
|
|
530
539
|
// uses environment placeholders and therefore we need to provide the variables for it.
|
|
531
|
-
|
|
540
|
+
// TODO: Remove after all repositories migrated to NCR.
|
|
541
|
+
cloudEnvironment: doesCloudEnvironmentExist({
|
|
542
|
+
dotenvPath,
|
|
543
|
+
cloudEnvironment: '.env.ctp_staging_gcp_europe-west1_v1'
|
|
544
|
+
}) ? 'ctp_staging_gcp_europe-west1_v1' : 'ctp-gcp-staging'
|
|
532
545
|
})), {}, {
|
|
533
546
|
// Again, make sure that the environment is "development", otherwise
|
|
534
547
|
// the menu config won't be available.
|
|
@@ -705,7 +718,7 @@ async function command(cliFlags) {
|
|
|
705
718
|
|
|
706
719
|
var pkgJson = {
|
|
707
720
|
name: "@commercetools-frontend/application-cli",
|
|
708
|
-
version: "1.8.
|
|
721
|
+
version: "1.8.1",
|
|
709
722
|
description: "Internal CLI to manage Merchant Center application deployments across various environments.",
|
|
710
723
|
keywords: [
|
|
711
724
|
"commercetools",
|
|
@@ -494,6 +494,15 @@ const mapApplicationMenuConfigToGraqhQLMenuJson = config => {
|
|
|
494
494
|
shouldRenderDivider: menuLinks.shouldRenderDivider ?? false
|
|
495
495
|
};
|
|
496
496
|
};
|
|
497
|
+
|
|
498
|
+
// During the migration to the Naming Convention Record for Cloud Environments
|
|
499
|
+
// we need to gracefully use the non-compliant and compliant environment names
|
|
500
|
+
// for staging to avoid a breaking release of the CLI.
|
|
501
|
+
const doesCloudEnvironmentExist = _ref => {
|
|
502
|
+
let dotenvPath = _ref.dotenvPath,
|
|
503
|
+
cloudEnvironment = _ref.cloudEnvironment;
|
|
504
|
+
return fs.existsSync(path.join(dotenvPath ?? '', cloudEnvironment));
|
|
505
|
+
};
|
|
497
506
|
async function command$2(cliFlags, cwd) {
|
|
498
507
|
const applicationDirectory = getApplicationDirectory(cwd);
|
|
499
508
|
const monorepoRoot = findRootSync(cwd);
|
|
@@ -502,7 +511,11 @@ async function command$2(cliFlags, cwd) {
|
|
|
502
511
|
dotenvPath,
|
|
503
512
|
// The env itself is not important for the menu. However, the application config
|
|
504
513
|
// uses environment placeholders and therefore we need to provide the variables for it.
|
|
505
|
-
|
|
514
|
+
// TODO: Remove after all repositories migrated to NCR.
|
|
515
|
+
cloudEnvironment: doesCloudEnvironmentExist({
|
|
516
|
+
dotenvPath,
|
|
517
|
+
cloudEnvironment: '.env.ctp_staging_gcp_europe-west1_v1'
|
|
518
|
+
}) ? 'ctp_staging_gcp_europe-west1_v1' : 'ctp-gcp-staging'
|
|
506
519
|
})), {}, {
|
|
507
520
|
// Again, make sure that the environment is "development", otherwise
|
|
508
521
|
// the menu config won't be available.
|
|
@@ -679,7 +692,7 @@ async function command(cliFlags) {
|
|
|
679
692
|
|
|
680
693
|
var pkgJson = {
|
|
681
694
|
name: "@commercetools-frontend/application-cli",
|
|
682
|
-
version: "1.8.
|
|
695
|
+
version: "1.8.1",
|
|
683
696
|
description: "Internal CLI to manage Merchant Center application deployments across various environments.",
|
|
684
697
|
keywords: [
|
|
685
698
|
"commercetools",
|
package/package.json
CHANGED