@firestartr/cli 2.8.0-snapshot-maps-claim-generator-3 → 2.8.0-snapshot-5

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/build/index.js +20 -5
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -323695,12 +323695,22 @@ async function crawlClaimsDir(dir, basePath, claims) {
323695
323695
  try {
323696
323696
  const data = await external_fs_default().promises.readFile(fullPath, 'utf-8');
323697
323697
  const claim = catalog_common/* default.io.fromYaml */.Z.io.fromYaml(data);
323698
- if (!('kind' in claim && 'name' in claim)) {
323699
- logger.warn(`Skipping file ${fullPath}: missing kind or name`);
323698
+ if (typeof claim !== 'object' ||
323699
+ claim === null ||
323700
+ typeof claim.kind !== 'string' ||
323701
+ !claim.kind ||
323702
+ typeof claim.name !== 'string' ||
323703
+ !claim.name) {
323704
+ logger.warn(`Skipping file ${fullPath}: missing or invalid kind or name`);
323700
323705
  continue;
323701
323706
  }
323702
323707
  const ref = `${claim.kind}-${claim.name}`;
323703
- const relativePath = external_path_default().relative(basePath, fullPath);
323708
+ if (claims[ref]) {
323709
+ throw new Error(`Duplicate claim reference: ${ref}`);
323710
+ }
323711
+ const relativePath = external_path_default().relative(basePath, fullPath)
323712
+ .split((external_path_default()).sep)
323713
+ .join((external_path_default()).posix.sep);
323704
323714
  claims[ref] = { filePath: relativePath };
323705
323715
  }
323706
323716
  catch (err) {
@@ -342765,7 +342775,12 @@ const cdk8s_rendererSubcommands = {
342765
342775
  await cdk8s_renderer.addLastStateAndLastClaimAnnotations(options['crLocation'], options['lastStatePrLink'], options['lastClaimPrLink']);
342766
342776
  }
342767
342777
  else if (options['generate-claims-map']) {
342768
- await generateClaimsMap(options['claims'], options['claims-map-output'], options['sha']);
342778
+ const claimsPath = options['claims'];
342779
+ const outputPath = options['claims-map-output'];
342780
+ if (!claimsPath || !outputPath) {
342781
+ throw new Error('--claims and --claims-map-output are required with --generate-claims-map');
342782
+ }
342783
+ await generateClaimsMap(claimsPath, outputPath, options['sha']);
342769
342784
  }
342770
342785
  },
342771
342786
  };
@@ -521408,7 +521423,7 @@ const crsStatusSubcommand = {
521408
521423
  };
521409
521424
 
521410
521425
  ;// CONCATENATED MODULE: ./package.json
521411
- const package_namespaceObject = JSON.parse('{"i8":"2.8.0-snapshot-maps-claim-generator-3"}');
521426
+ const package_namespaceObject = JSON.parse('{"i8":"2.8.0-snapshot-5"}');
521412
521427
  ;// CONCATENATED MODULE: ../../package.json
521413
521428
  const package_namespaceObject_1 = {"i8":"2.7.0"};
521414
521429
  ;// CONCATENATED MODULE: ./src/subcommands/index.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestartr/cli",
3
- "version": "2.8.0-snapshot-maps-claim-generator-3",
3
+ "version": "2.8.0-snapshot-5",
4
4
  "private": false,
5
5
  "description": "Commandline tool",
6
6
  "main": "build/main.js",