@firestartr/cli 2.8.0-snapshot-2 → 2.8.0-snapshot-3

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.
package/build/index.js CHANGED
@@ -321336,6 +321336,9 @@ async function loadClaim(claimRef, org, defaults = loadClaimDefaults(), patchCla
321336
321336
  const variantClaim = lodash_default().cloneDeep(claim);
321337
321337
  variantClaim.name = variant.name;
321338
321338
  variantClaim.providers.terraform = lodash_default().merge({}, claim.providers.terraform, variant.overrides);
321339
+ if (!variant.overrides.name) {
321340
+ variantClaim.providers.terraform.name = variant.name;
321341
+ }
321339
321342
  if (!variantClaim.annotations) {
321340
321343
  variantClaim.annotations = {};
321341
321344
  }
@@ -328163,6 +328166,7 @@ class SecretsChart extends BaseSecretsChart {
328163
328166
 
328164
328167
 
328165
328168
 
328169
+
328166
328170
  function normalizeProvidesApis(providesApis) {
328167
328171
  if (!providesApis)
328168
328172
  return [];
@@ -328416,6 +328420,21 @@ async function renderClaim(catalogScope, firestartrScope, claim, patches, previo
328416
328420
  ],
328417
328421
  };
328418
328422
  }
328423
+ function renameVariantCrFiles(outputDir, renderedMap) {
328424
+ for (const cr of Object.values(renderedMap)) {
328425
+ const crJson = cr.toJson ? cr.toJson() : cr;
328426
+ if (crJson.metadata?.annotations?.['firestartr.dev/variant-of'] &&
328427
+ crJson.kind &&
328428
+ crJson.metadata?.name) {
328429
+ const oldPath = external_path_.join(outputDir, `${crJson.kind}.${crJson.metadata.name}.yaml`);
328430
+ const newPath = external_path_.join(outputDir, `${crJson.kind}.${crJson.metadata.name}.variant.yaml`);
328431
+ if (external_fs_.existsSync(oldPath)) {
328432
+ external_fs_.renameSync(oldPath, newPath);
328433
+ logger.info(`Renamed variant CR file: ${oldPath} -> ${newPath}`);
328434
+ }
328435
+ }
328436
+ }
328437
+ }
328419
328438
 
328420
328439
  ;// CONCATENATED MODULE: ../cdk8s_renderer/src/validations/crossReferences.ts
328421
328440
 
@@ -328920,6 +328939,9 @@ async function renderFromImports(rClaims, crs = {}, catalogOutputDir = '/tmp/.ca
328920
328939
  });
328921
328940
  const result = await renderClaims(catalogScope, firestartrScope, { renderClaims: rClaims, crs, renames: [] });
328922
328941
  firestartrScope.synth();
328942
+ if (crOutputDir) {
328943
+ renameVariantCrFiles(crOutputDir, result);
328944
+ }
328923
328945
  return result;
328924
328946
  }
328925
328947
  async function solver(type, value, rClaims) {
@@ -328978,6 +329000,7 @@ async function addLastStateAndLastClaimAnnotations(filePath, lastStatePRLink, la
328978
329000
 
328979
329001
 
328980
329002
 
329003
+
328981
329004
 
328982
329005
 
328983
329006
  /* harmony default export */ const cdk8s_renderer = ({
@@ -329056,8 +329079,9 @@ async function runRenderer(globalsPath, initializersPath, claimsPath, crsPath, c
329056
329079
  // the system takes everything defined in the claims path
329057
329080
  claimRefsList = await resolveClaimEntries([claimsPath]);
329058
329081
  }
329082
+ let renderedMap;
329059
329083
  try {
329060
- await renderer_render(catalogApp, firestartrApp, claimRefsList);
329084
+ renderedMap = await renderer_render(catalogApp, firestartrApp, claimRefsList);
329061
329085
  }
329062
329086
  catch (error) {
329063
329087
  console.log(`Rendering the system: \n ${error}`);
@@ -329065,6 +329089,7 @@ async function runRenderer(globalsPath, initializersPath, claimsPath, crsPath, c
329065
329089
  }
329066
329090
  catalogApp.synth();
329067
329091
  firestartrApp.synth();
329092
+ renameVariantCrFiles(outputCrDir, renderedMap);
329068
329093
  }
329069
329094
 
329070
329095
  ;// CONCATENATED MODULE: ../importer/src/decanter/config.ts
@@ -521499,7 +521524,7 @@ const crsStatusSubcommand = {
521499
521524
  };
521500
521525
 
521501
521526
  ;// CONCATENATED MODULE: ./package.json
521502
- const package_namespaceObject = JSON.parse('{"i8":"2.8.0-snapshot-2"}');
521527
+ const package_namespaceObject = JSON.parse('{"i8":"2.8.0-snapshot-3"}');
521503
521528
  ;// CONCATENATED MODULE: ../../package.json
521504
521529
  const package_namespaceObject_1 = {"i8":"2.7.0"};
521505
521530
  ;// CONCATENATED MODULE: ./src/subcommands/index.ts
@@ -9,3 +9,4 @@ export declare function renderClaims(catalogScope: Construct, firestartrScope: C
9
9
  renames?: IRenameResult[];
10
10
  }): Promise<RenderedCrMap>;
11
11
  export declare function renderClaim(catalogScope: Construct, firestartrScope: Construct, claim: any, patches: ICustomResourcePatch[], previousCR?: any | null, claimPath?: string): Promise<IRenderClaimResult>;
12
+ export declare function renameVariantCrFiles(outputDir: string, renderedMap: RenderedCrMap): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestartr/cli",
3
- "version": "2.8.0-snapshot-2",
3
+ "version": "2.8.0-snapshot-3",
4
4
  "private": false,
5
5
  "description": "Commandline tool",
6
6
  "main": "build/main.js",