@firestartr/cli 2.9.0-snapshot-org-variables-section-1 → 2.9.0-snapshot-org-variables-section-2
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
|
@@ -329168,6 +329168,7 @@ function validateGithubOrgSettingsSingleton(crs) {
|
|
|
329168
329168
|
const GITHUB_ORG_VARIABLE_SECTION_KIND = 'FirestartrGithubOrganizationVariableSection';
|
|
329169
329169
|
const githubOrgVariableSection_FIRESTARTR_CLAIM_REF_ANNOTATION = 'firestartr.dev/claim-ref';
|
|
329170
329170
|
const githubOrgVariableSection_CLAIM_REF_LABEL = 'claim-ref';
|
|
329171
|
+
const COMPONENT_REF_PATTERN = /^component:(.+)$/;
|
|
329171
329172
|
function githubOrgVariableSection_formatResourceRef(name, claimRef) {
|
|
329172
329173
|
return claimRef ? `${name} (claim: ${claimRef})` : name;
|
|
329173
329174
|
}
|
|
@@ -329215,6 +329216,34 @@ function validateActionsVariablesUniqueness(crs) {
|
|
|
329215
329216
|
}
|
|
329216
329217
|
}
|
|
329217
329218
|
}
|
|
329219
|
+
function validateActionsVariablesSelectedRepositories(renderClaims) {
|
|
329220
|
+
for (const claimKey of Object.keys(renderClaims)) {
|
|
329221
|
+
if (!claimKey.startsWith('OrgSettingsClaim-'))
|
|
329222
|
+
continue;
|
|
329223
|
+
const claimData = renderClaims[claimKey];
|
|
329224
|
+
const claim = claimData?.claim;
|
|
329225
|
+
const actionsVariables = claim?.providers?.github?.actions_variables;
|
|
329226
|
+
if (!Array.isArray(actionsVariables))
|
|
329227
|
+
continue;
|
|
329228
|
+
for (const variable of actionsVariables) {
|
|
329229
|
+
if (variable.visibility !== 'selected')
|
|
329230
|
+
continue;
|
|
329231
|
+
const selectedRepos = variable.selected_repositories;
|
|
329232
|
+
if (!Array.isArray(selectedRepos) || selectedRepos.length === 0)
|
|
329233
|
+
continue;
|
|
329234
|
+
for (const ref of selectedRepos) {
|
|
329235
|
+
const match = ref.match(COMPONENT_REF_PATTERN);
|
|
329236
|
+
if (!match)
|
|
329237
|
+
continue;
|
|
329238
|
+
const componentName = match[1];
|
|
329239
|
+
const expectedKey = `ComponentClaim-${componentName}`;
|
|
329240
|
+
if (!renderClaims[expectedKey]) {
|
|
329241
|
+
throw new Error(`CrossReference error: OrgSettingsClaim/${claim.name} references a non-existent component "${componentName}" in actions_variables.${variable.name}.selected_repositories`);
|
|
329242
|
+
}
|
|
329243
|
+
}
|
|
329244
|
+
}
|
|
329245
|
+
}
|
|
329246
|
+
}
|
|
329218
329247
|
|
|
329219
329248
|
;// CONCATENATED MODULE: ../cdk8s_renderer/src/renderer/renderer.ts
|
|
329220
329249
|
|
|
@@ -329248,6 +329277,7 @@ async function renderer_render(catalogScope, firestartrScope, claimList) {
|
|
|
329248
329277
|
try {
|
|
329249
329278
|
validateSubReferences(data.renderClaims);
|
|
329250
329279
|
validateComponentPagesPath(data.renderClaims);
|
|
329280
|
+
validateActionsVariablesSelectedRepositories(data.renderClaims);
|
|
329251
329281
|
validateTfStateKeyUniqueness(result);
|
|
329252
329282
|
validateGithubOrgSettingsSingleton(fullCrSet);
|
|
329253
329283
|
validateGithubOrgVariableSectionSingleton(result);
|
|
@@ -522561,7 +522591,7 @@ const crsStatusSubcommand = {
|
|
|
522561
522591
|
};
|
|
522562
522592
|
|
|
522563
522593
|
;// CONCATENATED MODULE: ./package.json
|
|
522564
|
-
const package_namespaceObject = JSON.parse('{"i8":"2.9.0-snapshot-org-variables-section-
|
|
522594
|
+
const package_namespaceObject = JSON.parse('{"i8":"2.9.0-snapshot-org-variables-section-2"}');
|
|
522565
522595
|
;// CONCATENATED MODULE: ../../package.json
|
|
522566
522596
|
const package_namespaceObject_1 = {"i8":"2.8.0"};
|
|
522567
522597
|
;// CONCATENATED MODULE: ./src/subcommands/index.ts
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { RenderedCrMap } from '../renderer/types';
|
|
1
|
+
import { RenderClaims, RenderedCrMap } from '../renderer/types';
|
|
2
2
|
export declare function validateGithubOrgVariableSectionSingleton(crs: RenderedCrMap): void;
|
|
3
3
|
export declare function validateActionsVariablesUniqueness(crs: RenderedCrMap): void;
|
|
4
|
+
export declare function validateActionsVariablesSelectedRepositories(renderClaims: RenderClaims): void;
|