@meistrari/tela-cli 0.7.20 → 0.7.21

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.
Files changed (2) hide show
  1. package/dist/index.js +21 -16
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -485,24 +485,15 @@ var require_config = __commonJS({
485
485
  }
486
486
  function applyDefaultConfigValues(config) {
487
487
  const defaults = (0, defaults_1.createDefaultConfig)();
488
- const environments = { ...config.environments };
488
+ const environments = {};
489
489
  for (const [id, defaultEnvironment] of Object.entries(defaults.environments)) {
490
- const currentEnvironment = environments[id];
491
- if (!currentEnvironment) {
490
+ const currentEnvironment = config.environments[id];
491
+ environments[id] = currentEnvironment ? applyDefaultEnvironmentValues(id, currentEnvironment, defaultEnvironment) : defaultEnvironment;
492
+ }
493
+ for (const [id, environment] of Object.entries(config.environments)) {
494
+ if (id in defaults.environments)
492
495
  continue;
493
- }
494
- environments[id] = {
495
- ...currentEnvironment,
496
- authApiUrl: id === "staging" && currentEnvironment.authApiUrl === LEGACY_STAGING_AUTH_API_URL ? defaultEnvironment.authApiUrl : currentEnvironment.authApiUrl,
497
- // Some prerelease local configs used the old staging API host before
498
- // staging moved to the telastaging.com domain.
499
- defaultApiUrl: id === "staging" && currentEnvironment.defaultApiUrl === LEGACY_STAGING_DEFAULT_API_URL ? defaultEnvironment.defaultApiUrl : currentEnvironment.defaultApiUrl,
500
- authApplication: currentEnvironment.authApplication ?? defaultEnvironment.authApplication,
501
- services: {
502
- ...defaultEnvironment.services,
503
- ...currentEnvironment.services
504
- }
505
- };
496
+ environments[id] = environment;
506
497
  }
507
498
  return {
508
499
  ...config,
@@ -525,6 +516,20 @@ var require_config = __commonJS({
525
516
  }
526
517
  };
527
518
  }
519
+ function applyDefaultEnvironmentValues(id, currentEnvironment, defaultEnvironment) {
520
+ return {
521
+ ...currentEnvironment,
522
+ authApiUrl: id === "staging" && currentEnvironment.authApiUrl === LEGACY_STAGING_AUTH_API_URL ? defaultEnvironment.authApiUrl : currentEnvironment.authApiUrl,
523
+ // Some prerelease local configs used the old staging API host before
524
+ // staging moved to the telastaging.com domain.
525
+ defaultApiUrl: id === "staging" && currentEnvironment.defaultApiUrl === LEGACY_STAGING_DEFAULT_API_URL ? defaultEnvironment.defaultApiUrl : currentEnvironment.defaultApiUrl,
526
+ authApplication: currentEnvironment.authApplication ?? defaultEnvironment.authApplication,
527
+ services: {
528
+ ...defaultEnvironment.services,
529
+ ...currentEnvironment.services
530
+ }
531
+ };
532
+ }
528
533
  function assertNoCredentialMaterial(value) {
529
534
  if (!value || typeof value !== "object") {
530
535
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/tela-cli",
3
- "version": "0.7.20",
3
+ "version": "0.7.21",
4
4
  "description": "Tela command line tools for local state and agent workflows.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {