@firestartr/cli 1.54.0-snapshot-2 → 1.54.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
@@ -358075,6 +358075,14 @@ const external_node_child_process_namespaceObject = __WEBPACK_EXTERNAL_createReq
358075
358075
  secrets: {
358076
358076
  $ref: 'firestartr.dev://github/GithubComponentClaimSecrets',
358077
358077
  },
358078
+ topics: {
358079
+ type: 'array',
358080
+ items: {
358081
+ type: 'string',
358082
+ maxLength: 50,
358083
+ pattern: '^[a-z0-9][a-z0-9-]*$',
358084
+ },
358085
+ },
358078
358086
  },
358079
358087
  required: ['visibility', 'org'],
358080
358088
  },
@@ -358548,7 +358556,11 @@ const ArgoCDSchemas = [argocd_schema];
358548
358556
  additionalProperties: false,
358549
358557
  type: 'object',
358550
358558
  properties: {
358551
- secretName: { type: 'string' },
358559
+ secretName: {
358560
+ type: 'string',
358561
+ description: 'Validation for Kubernetes Secret keys, allowing only alphanumeric characters, hyphens, underscores, and dots.',
358562
+ pattern: '^([a-zA-Z0-9._-]+)$',
358563
+ },
358552
358564
  remoteRef: { type: 'string' },
358553
358565
  },
358554
358566
  required: ['secretName'],
@@ -358611,29 +358623,24 @@ const ArgoCDSchemas = [argocd_schema];
358611
358623
  allOf: [
358612
358624
  { $ref: 'firestartr.dev://common/ClaimProviderEnvelope' },
358613
358625
  {
358614
- anyOf: [
358615
- {
358616
- properties: {
358617
- externalSecrets: {
358618
- $ref: 'firestartr.dev://secrets/ExternalSecretsSection',
358619
- },
358620
- secretStore: {
358621
- $ref: 'firestartr.dev://secrets/SecretStore',
358622
- },
358623
- },
358624
- required: ['secretStore', 'externalSecrets'],
358626
+ type: 'object',
358627
+ properties: {
358628
+ externalSecrets: {
358629
+ $ref: 'firestartr.dev://secrets/ExternalSecretsSection',
358625
358630
  },
358626
- {
358627
- properties: {
358628
- pushSecrets: {
358629
- $ref: 'firestartr.dev://secrets/PushSecretsSection',
358630
- },
358631
- secretStore: {
358632
- $ref: 'firestartr.dev://secrets/SecretStore',
358633
- },
358634
- },
358635
- required: ['secretStore', 'pushSecrets'],
358631
+ secretStore: {
358632
+ $ref: 'firestartr.dev://secrets/SecretStore',
358633
+ },
358634
+ pushSecrets: {
358635
+ $ref: 'firestartr.dev://secrets/PushSecretsSection',
358636
358636
  },
358637
+ },
358638
+ // 1. MANDATORY RULE (ALWAYS): secretStore
358639
+ required: ['secretStore'],
358640
+ // 2. CONDITIONAL RULE (AT LEAST ONE): externalSecrets OR pushSecrets
358641
+ anyOf: [
358642
+ { required: ['externalSecrets'] },
358643
+ { required: ['pushSecrets'] },
358637
358644
  ],
358638
358645
  },
358639
358646
  ],
@@ -358861,7 +358868,7 @@ function checkGrep() {
358861
358868
  });
358862
358869
  });
358863
358870
  }
358864
- async function loadClaim(claimRef, org, defaults = loadClaimDefaults(), patchClaim = loader_patchClaim, loadInitializers, loadGlobals, loadOverrides, loadNormalizers, cwd, existingRefs = {}) {
358871
+ async function loadClaim(claimRef, org, defaults = loadClaimDefaults(), patchClaim = loader_patchClaim, loadInitializers, loadGlobals, loadOverrides, loadNormalizers, cwd, existingRefs = {}, postValidations = new Map()) {
358865
358872
  await checkGrep();
358866
358873
  let result = existingRefs;
358867
358874
  cdk8s_renderer_src_logger.info(`Load reference ${claimRef}`);
@@ -358899,7 +358906,7 @@ async function loadClaim(claimRef, org, defaults = loadClaimDefaults(), patchCla
358899
358906
  const references = extractAllRefs(catalog_common.io.toYaml(claim));
358900
358907
  for (const ref of references) {
358901
358908
  if (!result[ref]) {
358902
- const resolvedReferences = await loadClaim(ref, org, defaults, patchClaim, loadInitializers, loadGlobals, loadOverrides, loadNormalizers, cwd, result);
358909
+ const [resolvedReferences] = await loadClaim(ref, org, defaults, patchClaim, loadInitializers, loadGlobals, loadOverrides, loadNormalizers, cwd, result, postValidations);
358903
358910
  result = lodash_default().merge(result, resolvedReferences);
358904
358911
  }
358905
358912
  }
@@ -358907,7 +358914,7 @@ async function loadClaim(claimRef, org, defaults = loadClaimDefaults(), patchCla
358907
358914
  catch (err) {
358908
358915
  throw `Lazy Loading: ${err}`;
358909
358916
  }
358910
- return result;
358917
+ return [result, postValidations];
358911
358918
  }
358912
358919
  let LoadedClaims = {};
358913
358920
  let VisitedClaims = {};
@@ -359309,7 +359316,7 @@ async function loadClaimsList(claimRefList, claimsPath = config_getPath('claims'
359309
359316
  };
359310
359317
  const defaults = loadClaimDefaults();
359311
359318
  for await (const claimRef of claimRefList) {
359312
- const renderedClaimData = await loadClaim(claimRef, getOrg(), defaults, loader_patchClaim, loadInitializers, loadGlobals, loadOverrides, loadNormalizers, claimsPath);
359319
+ const [renderedClaimData] = await loadClaim(claimRef, getOrg(), defaults, loader_patchClaim, loadInitializers, loadGlobals, loadOverrides, loadNormalizers, claimsPath);
359313
359320
  data.renderClaims = lodash_default().merge(data.renderClaims, renderedClaimData);
359314
359321
  }
359315
359322
  const crClaimReferences = [];
@@ -362202,6 +362209,7 @@ function toJson_FirestartrGithubRepositorySpecRepo(obj) {
362202
362209
  'hasIssues': obj.hasIssues,
362203
362210
  'hasWiki': obj.hasWiki,
362204
362211
  'pages': obj.pages,
362212
+ 'topics': obj.topics?.map(y => y),
362205
362213
  'visibility': obj.visibility,
362206
362214
  'defaultBranch': obj.defaultBranch,
362207
362215
  'additionalBranches': obj.additionalBranches?.map(y => toJson_FirestartrGithubRepositorySpecRepoAdditionalBranches(y)),
@@ -364327,6 +364335,7 @@ class GithubRepositoryChart extends BaseGithubChart {
364327
364335
  defaultBranch: claim.providers.github?.branchStrategy?.defaultBranch,
364328
364336
  codeowners: createCodeOwnersData(claim),
364329
364337
  additionalBranches: claim.providers.github.additionalBranches || [],
364338
+ topics: claim.providers.github.topics || [],
364330
364339
  },
364331
364340
  actions,
364332
364341
  permissions: this.createPermissions(claim),
@@ -365398,11 +365407,27 @@ async function renderClaim(catalogScope, firestartrScope, claim, patches, previo
365398
365407
  }
365399
365408
 
365400
365409
  ;// CONCATENATED MODULE: ../cdk8s_renderer/src/validations/crossReferences.ts
365410
+
365401
365411
  const IS_COMPONENT_CLAIM_REF = new RegExp(/^ComponentClaim-/);
365412
+ const IS_TF_WORKSPACE = new RegExp(/^TFWorkspaceClaim-/);
365402
365413
  function validateSubReferences(renderClaims) {
365403
365414
  for (const ref of Object.keys(renderClaims)) {
365404
365415
  if (IS_COMPONENT_CLAIM_REF.test(ref))
365405
365416
  validateClaimsSecretsRefs(ref, renderClaims);
365417
+ else if (IS_TF_WORKSPACE.test(ref))
365418
+ validateTFClaimsSecretsRefs(ref, renderClaims);
365419
+ }
365420
+ }
365421
+ function validateTFClaimsSecretsRefs(ref, renderClaims) {
365422
+ const claim = renderClaims[ref].claim;
365423
+ const values = claim.providers?.terraform?.values;
365424
+ const secretRefs = Object.values(values).filter((v) => isRepoSecretRef(v));
365425
+ for (const secret of secretRefs) {
365426
+ const [secretName, key] = secret.split(':').slice(2);
365427
+ const keyFound = searchSecretKey(renderClaims[`SecretsClaim-${secretName}`].claim, key);
365428
+ if (!keyFound) {
365429
+ throw new Error(`CrossReference error: TFWorkspaceClaim/${claim.name} references a non-existent secret key: '${secretName}:${key}'`);
365430
+ }
365406
365431
  }
365407
365432
  }
365408
365433
  function validateClaimsSecretsRefs(ref, renderClaims) {
@@ -373360,7 +373385,6 @@ function resolveReferences(item, deps) {
373360
373385
  try {
373361
373386
  const references = {};
373362
373387
  const itemReferences = item.spec.references;
373363
- console.dir(itemReferences);
373364
373388
  // if(!process.env.TONISILLO) process.exit(1)
373365
373389
  for (const iRef of itemReferences) {
373366
373390
  const ref = deps[`${iRef.ref.kind}-${iRef.ref.name}`];
@@ -1014,6 +1014,10 @@ export interface FirestartrGithubRepositorySpecRepo {
1014
1014
  * @schema FirestartrGithubRepositorySpecRepo#pages
1015
1015
  */
1016
1016
  readonly pages?: any;
1017
+ /**
1018
+ * @schema FirestartrGithubRepositorySpecRepo#topics
1019
+ */
1020
+ readonly topics?: string[];
1017
1021
  /**
1018
1022
  * @schema FirestartrGithubRepositorySpecRepo#visibility
1019
1023
  */
@@ -505,6 +505,14 @@ declare const schemas: {
505
505
  secrets: {
506
506
  $ref: string;
507
507
  };
508
+ topics: {
509
+ type: string;
510
+ items: {
511
+ type: string;
512
+ maxLength: number;
513
+ pattern: string;
514
+ };
515
+ };
508
516
  };
509
517
  required: string[];
510
518
  $ref?: undefined;
@@ -887,6 +895,8 @@ declare const schemas: {
887
895
  properties: {
888
896
  secretName: {
889
897
  type: string;
898
+ description: string;
899
+ pattern: string;
890
900
  };
891
901
  remoteRef: {
892
902
  type: string;
@@ -947,31 +957,27 @@ declare const schemas: {
947
957
  description: string;
948
958
  allOf: ({
949
959
  $ref: string;
960
+ type?: undefined;
961
+ properties?: undefined;
962
+ required?: undefined;
950
963
  anyOf?: undefined;
951
964
  } | {
952
- anyOf: ({
953
- properties: {
954
- externalSecrets: {
955
- $ref: string;
956
- };
957
- secretStore: {
958
- $ref: string;
959
- };
960
- pushSecrets?: undefined;
965
+ type: string;
966
+ properties: {
967
+ externalSecrets: {
968
+ $ref: string;
961
969
  };
962
- required: string[];
963
- } | {
964
- properties: {
965
- pushSecrets: {
966
- $ref: string;
967
- };
968
- secretStore: {
969
- $ref: string;
970
- };
971
- externalSecrets?: undefined;
970
+ secretStore: {
971
+ $ref: string;
972
972
  };
973
+ pushSecrets: {
974
+ $ref: string;
975
+ };
976
+ };
977
+ required: string[];
978
+ anyOf: {
973
979
  required: string[];
974
- })[];
980
+ }[];
975
981
  $ref?: undefined;
976
982
  })[];
977
983
  };
@@ -31,6 +31,8 @@ declare const _default: {
31
31
  properties: {
32
32
  secretName: {
33
33
  type: string;
34
+ description: string;
35
+ pattern: string;
34
36
  };
35
37
  remoteRef: {
36
38
  type: string;
@@ -91,31 +93,27 @@ declare const _default: {
91
93
  description: string;
92
94
  allOf: ({
93
95
  $ref: string;
96
+ type?: undefined;
97
+ properties?: undefined;
98
+ required?: undefined;
94
99
  anyOf?: undefined;
95
100
  } | {
96
- anyOf: ({
97
- properties: {
98
- externalSecrets: {
99
- $ref: string;
100
- };
101
- secretStore: {
102
- $ref: string;
103
- };
104
- pushSecrets?: undefined;
101
+ type: string;
102
+ properties: {
103
+ externalSecrets: {
104
+ $ref: string;
105
105
  };
106
- required: string[];
107
- } | {
108
- properties: {
109
- pushSecrets: {
110
- $ref: string;
111
- };
112
- secretStore: {
113
- $ref: string;
114
- };
115
- externalSecrets?: undefined;
106
+ secretStore: {
107
+ $ref: string;
108
+ };
109
+ pushSecrets: {
110
+ $ref: string;
116
111
  };
112
+ };
113
+ required: string[];
114
+ anyOf: {
117
115
  required: string[];
118
- })[];
116
+ }[];
119
117
  $ref?: undefined;
120
118
  })[];
121
119
  };
@@ -31,6 +31,8 @@ export declare const SecretsSchemas: {
31
31
  properties: {
32
32
  secretName: {
33
33
  type: string;
34
+ description: string;
35
+ pattern: string;
34
36
  };
35
37
  remoteRef: {
36
38
  type: string;
@@ -91,31 +93,27 @@ export declare const SecretsSchemas: {
91
93
  description: string;
92
94
  allOf: ({
93
95
  $ref: string;
96
+ type?: undefined;
97
+ properties?: undefined;
98
+ required?: undefined;
94
99
  anyOf?: undefined;
95
100
  } | {
96
- anyOf: ({
97
- properties: {
98
- externalSecrets: {
99
- $ref: string;
100
- };
101
- secretStore: {
102
- $ref: string;
103
- };
104
- pushSecrets?: undefined;
101
+ type: string;
102
+ properties: {
103
+ externalSecrets: {
104
+ $ref: string;
105
105
  };
106
- required: string[];
107
- } | {
108
- properties: {
109
- pushSecrets: {
110
- $ref: string;
111
- };
112
- secretStore: {
113
- $ref: string;
114
- };
115
- externalSecrets?: undefined;
106
+ secretStore: {
107
+ $ref: string;
108
+ };
109
+ pushSecrets: {
110
+ $ref: string;
116
111
  };
112
+ };
113
+ required: string[];
114
+ anyOf: {
117
115
  required: string[];
118
- })[];
116
+ }[];
119
117
  $ref?: undefined;
120
118
  })[];
121
119
  };
@@ -35,6 +35,14 @@ declare const _default: {
35
35
  secrets: {
36
36
  $ref: string;
37
37
  };
38
+ topics: {
39
+ type: string;
40
+ items: {
41
+ type: string;
42
+ maxLength: number;
43
+ pattern: string;
44
+ };
45
+ };
38
46
  };
39
47
  required: string[];
40
48
  $ref?: undefined;
@@ -140,6 +140,14 @@ export declare const GithubSchemas: ({
140
140
  secrets: {
141
141
  $ref: string;
142
142
  };
143
+ topics: {
144
+ type: string;
145
+ items: {
146
+ type: string;
147
+ maxLength: number;
148
+ pattern: string;
149
+ };
150
+ };
143
151
  };
144
152
  required: string[];
145
153
  $ref?: undefined;
@@ -28,6 +28,7 @@ export interface IGithubRepositoryClaim extends IComponentClaim {
28
28
  name: string;
29
29
  orphan: boolean;
30
30
  }[];
31
+ topics?: string[];
31
32
  };
32
33
  };
33
34
  }
@@ -2,5 +2,5 @@ import { InitializerPatches } from '../initializers/base';
2
2
  import { GlobalSection } from '../globals/base';
3
3
  import { OverriderPatches } from '../overriders/base';
4
4
  import { Normalizer } from '../normalizers/base';
5
- export declare function loadClaim(claimRef: string, org: string, defaults: any, patchClaim: (claim: any, defaults: any) => any, loadInitializers: (claim: any) => Promise<InitializerPatches[]>, loadGlobals: (claim: any) => Promise<GlobalSection[]>, loadOverrides: (claim: any) => OverriderPatches[], loadNormalizers: (claim: any, path: string) => Promise<Normalizer[]>, cwd?: string, existingRefs?: any): Promise<any>;
5
+ export declare function loadClaim(claimRef: string, org: string, defaults: any, patchClaim: (claim: any, defaults: any) => any, loadInitializers: (claim: any) => Promise<InitializerPatches[]>, loadGlobals: (claim: any) => Promise<GlobalSection[]>, loadOverrides: (claim: any) => OverriderPatches[], loadNormalizers: (claim: any, path: string) => Promise<Normalizer[]>, cwd?: string, existingRefs?: any, postValidations?: Map<string, Function[]>): Promise<any[]>;
6
6
  export declare function resetLazyLoader(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestartr/cli",
3
- "version": "1.54.0-snapshot-2",
3
+ "version": "1.54.0-snapshot-3",
4
4
  "private": false,
5
5
  "description": "Commandline tool",
6
6
  "main": "build/main.js",