@firestartr/cli 2.10.0-snapshot-fix-refsextractor-committed-1 → 2.10.0-snapshot-force-rebuild-refs-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 +8 -1355
- package/build/packages/cdk8s_renderer/imports/firestartr.dev.d.ts +0 -753
- package/build/packages/cdk8s_renderer/src/charts/github/index.d.ts +0 -2
- package/build/packages/cdk8s_renderer/src/charts/index.d.ts +1 -3
- package/build/packages/cdk8s_renderer/src/claims/base/schemas/index.d.ts +0 -135
- package/build/packages/cdk8s_renderer/src/claims/github/index.d.ts +0 -135
- package/build/packages/cdk8s_renderer/src/claims/github/orgSettings.d.ts +0 -26
- package/build/packages/cdk8s_renderer/src/claims/github/orgsettings.schema.d.ts +0 -70
- package/build/packages/cdk8s_renderer/src/renderer/claims-render.d.ts +1 -1
- package/build/packages/cdk8s_renderer/src/renderer/previous-crs-extractor.d.ts +1 -1
- package/build/packages/github/index.d.ts +0 -1
- package/build/packages/github/src/organization.d.ts +0 -2
- package/build/packages/github/src/with_profile.d.ts +0 -1
- package/package.json +2 -3
- package/build/packages/cdk8s_renderer/src/charts/github/orgSecretSectionChart.d.ts +0 -8
- package/build/packages/cdk8s_renderer/src/charts/github/orgVariableSectionChart.d.ts +0 -8
- package/build/packages/cdk8s_renderer/src/claims/github/orgSecrets.schema.d.ts +0 -67
- package/build/packages/cdk8s_renderer/src/validations/githubOrgSecretSection.d.ts +0 -4
- package/build/packages/cdk8s_renderer/src/validations/githubOrgVariableSection.d.ts +0 -3
- package/build/packages/gh_provisioner/src/entities/ghorgvarsection/index.d.ts +0 -8
package/build/index.js
CHANGED
|
@@ -284613,17 +284613,6 @@ async function doPaginatedRequest(options) {
|
|
|
284613
284613
|
'Cache-Control': 'no-cache',
|
|
284614
284614
|
});
|
|
284615
284615
|
}
|
|
284616
|
-
async function getOrgVariable(org, variableName, octokit) {
|
|
284617
|
-
logger.info(`Getting org variable ${variableName} for org ${org}`);
|
|
284618
|
-
if (!octokit) {
|
|
284619
|
-
octokit = await getOctokitForOrg(org);
|
|
284620
|
-
}
|
|
284621
|
-
const response = await octokit.rest.actions.getOrgVariable({
|
|
284622
|
-
org,
|
|
284623
|
-
name: variableName,
|
|
284624
|
-
});
|
|
284625
|
-
return response.data;
|
|
284626
|
-
}
|
|
284627
284616
|
/* harmony default export */ const organization = ({
|
|
284628
284617
|
getRepositoryList,
|
|
284629
284618
|
getTeamList,
|
|
@@ -284634,7 +284623,6 @@ async function getOrgVariable(org, variableName, octokit) {
|
|
|
284634
284623
|
getOrgTeamsDirectAccess,
|
|
284635
284624
|
getOrgPlanName,
|
|
284636
284625
|
getWebhookList,
|
|
284637
|
-
getOrgVariable,
|
|
284638
284626
|
});
|
|
284639
284627
|
|
|
284640
284628
|
// EXTERNAL MODULE: external "fs"
|
|
@@ -286127,10 +286115,6 @@ function createFacade(profileName) {
|
|
|
286127
286115
|
const octokit = await getOctokitForOrg(orgName);
|
|
286128
286116
|
return getOrgPlanName(orgName, octokit);
|
|
286129
286117
|
},
|
|
286130
|
-
getOrgVariable: async (orgName, variableName) => {
|
|
286131
|
-
const octokit = await getOctokitForOrg(orgName);
|
|
286132
|
-
return getOrgVariable(orgName, variableName, octokit);
|
|
286133
|
-
},
|
|
286134
286118
|
},
|
|
286135
286119
|
repo: {
|
|
286136
286120
|
addStatusCheck: async (output, isFailure, headSha, name, status, repoName, owner) => {
|
|
@@ -319538,14 +319522,9 @@ class UUIDInitializer extends InitializerPatches {
|
|
|
319538
319522
|
},
|
|
319539
319523
|
apply(cr) {
|
|
319540
319524
|
const ctx = helperCTX(this);
|
|
319541
|
-
const
|
|
319542
|
-
|
|
319543
|
-
|
|
319544
|
-
claim.providers?.[ctx.provider]?.tfStateKey ||
|
|
319545
|
-
(0,wrapper.v4)()
|
|
319546
|
-
: cr.spec?.firestartr?.tfStateKey ||
|
|
319547
|
-
claim.providers?.[ctx.provider]?.tfStateKey ||
|
|
319548
|
-
(0,wrapper.v4)();
|
|
319525
|
+
const uuid = previousCR?.spec?.firestartr?.tfStateKey ||
|
|
319526
|
+
claim.providers?.[ctx.provider]?.tfStateKey ||
|
|
319527
|
+
(0,wrapper.v4)();
|
|
319549
319528
|
if (!cr.spec)
|
|
319550
319529
|
cr.spec = {};
|
|
319551
319530
|
if (!cr.spec.firestartr)
|
|
@@ -320087,7 +320066,6 @@ const ONE_WAY_DEFINITIONS = [
|
|
|
320087
320066
|
'/spec/vars',
|
|
320088
320067
|
'/spec/actions/oidc',
|
|
320089
320068
|
'/spec/repo/labels',
|
|
320090
|
-
'/spec/actionsVariables',
|
|
320091
320069
|
];
|
|
320092
320070
|
function applyOneWayDefs(crSpecs) {
|
|
320093
320071
|
const crSpecsClone = JSON.parse(JSON.stringify(crSpecs));
|
|
@@ -322083,26 +322061,6 @@ function extractAllRefs(claimData) {
|
|
|
322083
322061
|
refs.push(...secretsRefs);
|
|
322084
322062
|
break;
|
|
322085
322063
|
}
|
|
322086
|
-
case 'OrgSettingsClaim': {
|
|
322087
|
-
const orgSecrets = parsedClaim.providers?.github?.org_secrets;
|
|
322088
|
-
if (orgSecrets && typeof orgSecrets === 'object') {
|
|
322089
|
-
const secretRefRegex = /^ref:secretsclaim:([a-zA-Z0-9_-]+):([a-zA-Z0-9_-]+)$/;
|
|
322090
|
-
for (const section of ['actions', 'codespaces', 'dependabot']) {
|
|
322091
|
-
const secrets = orgSecrets[section];
|
|
322092
|
-
if (!Array.isArray(secrets))
|
|
322093
|
-
continue;
|
|
322094
|
-
for (const secret of secrets) {
|
|
322095
|
-
if (!secret.value)
|
|
322096
|
-
continue;
|
|
322097
|
-
const match = secret.value.match(secretRefRegex);
|
|
322098
|
-
if (match) {
|
|
322099
|
-
refs.push(`SecretsClaim-${match[1]}`);
|
|
322100
|
-
}
|
|
322101
|
-
}
|
|
322102
|
-
}
|
|
322103
|
-
}
|
|
322104
|
-
break;
|
|
322105
|
-
}
|
|
322106
322064
|
}
|
|
322107
322065
|
logger.info(`Refs for ${parsedClaim.kind}-${parsedClaim.name}: ${[...new Set(refs)].join(',')}`);
|
|
322108
322066
|
return [...new Set(refs)];
|
|
@@ -323229,73 +323187,6 @@ const organizationSettingsProperties = {
|
|
|
323229
323187
|
secret_scanning_push_protection_enabled_for_new_repositories: {
|
|
323230
323188
|
type: 'boolean',
|
|
323231
323189
|
},
|
|
323232
|
-
actions_variables: {
|
|
323233
|
-
type: 'array',
|
|
323234
|
-
items: {
|
|
323235
|
-
type: 'object',
|
|
323236
|
-
properties: {
|
|
323237
|
-
name: {
|
|
323238
|
-
type: 'string',
|
|
323239
|
-
pattern: '^[A-Za-z0-9_]+$',
|
|
323240
|
-
},
|
|
323241
|
-
value: {
|
|
323242
|
-
type: 'string',
|
|
323243
|
-
},
|
|
323244
|
-
visibility: {
|
|
323245
|
-
type: 'string',
|
|
323246
|
-
enum: ['all', 'private', 'selected'],
|
|
323247
|
-
},
|
|
323248
|
-
selected_repositories: {
|
|
323249
|
-
type: 'array',
|
|
323250
|
-
items: {
|
|
323251
|
-
$ref: 'firestartr.dev://common/FirestartrComponentRef',
|
|
323252
|
-
},
|
|
323253
|
-
},
|
|
323254
|
-
},
|
|
323255
|
-
required: ['name', 'value', 'visibility'],
|
|
323256
|
-
additionalProperties: false,
|
|
323257
|
-
allOf: [
|
|
323258
|
-
{
|
|
323259
|
-
if: {
|
|
323260
|
-
properties: {
|
|
323261
|
-
visibility: { const: 'selected' },
|
|
323262
|
-
},
|
|
323263
|
-
required: ['visibility'],
|
|
323264
|
-
},
|
|
323265
|
-
then: {},
|
|
323266
|
-
else: {
|
|
323267
|
-
properties: {
|
|
323268
|
-
selected_repositories: { type: 'array', maxItems: 0 },
|
|
323269
|
-
},
|
|
323270
|
-
},
|
|
323271
|
-
},
|
|
323272
|
-
],
|
|
323273
|
-
},
|
|
323274
|
-
},
|
|
323275
|
-
org_secrets: {
|
|
323276
|
-
type: 'object',
|
|
323277
|
-
properties: {
|
|
323278
|
-
actions: {
|
|
323279
|
-
type: 'array',
|
|
323280
|
-
items: {
|
|
323281
|
-
$ref: 'firestartr.dev://github/GithubOrgClaimSecret',
|
|
323282
|
-
},
|
|
323283
|
-
},
|
|
323284
|
-
codespaces: {
|
|
323285
|
-
type: 'array',
|
|
323286
|
-
items: {
|
|
323287
|
-
$ref: 'firestartr.dev://github/GithubOrgClaimSecret',
|
|
323288
|
-
},
|
|
323289
|
-
},
|
|
323290
|
-
dependabot: {
|
|
323291
|
-
type: 'array',
|
|
323292
|
-
items: {
|
|
323293
|
-
$ref: 'firestartr.dev://github/GithubOrgClaimSecret',
|
|
323294
|
-
},
|
|
323295
|
-
},
|
|
323296
|
-
},
|
|
323297
|
-
additionalProperties: false,
|
|
323298
|
-
},
|
|
323299
323190
|
};
|
|
323300
323191
|
/* harmony default export */ const github_orgsettings_schema = ({
|
|
323301
323192
|
$schema: SCHEMA,
|
|
@@ -323483,75 +323374,6 @@ const organizationSettingsProperties = {
|
|
|
323483
323374
|
},
|
|
323484
323375
|
});
|
|
323485
323376
|
|
|
323486
|
-
;// CONCATENATED MODULE: ../cdk8s_renderer/src/claims/github/orgSecrets.schema.ts
|
|
323487
|
-
|
|
323488
|
-
/* harmony default export */ const orgSecrets_schema = ({
|
|
323489
|
-
$schema: SCHEMA,
|
|
323490
|
-
$id: 'GithubOrgClaimSecrets',
|
|
323491
|
-
definitions: {
|
|
323492
|
-
GithubOrgClaimSecrets: {
|
|
323493
|
-
$id: 'firestartr.dev://github/GithubOrgClaimSecrets',
|
|
323494
|
-
type: 'object',
|
|
323495
|
-
description: 'Organization-level GitHub Actions secrets',
|
|
323496
|
-
properties: {
|
|
323497
|
-
actions: {
|
|
323498
|
-
type: 'array',
|
|
323499
|
-
items: {
|
|
323500
|
-
$ref: 'firestartr.dev://github/GithubOrgClaimSecret',
|
|
323501
|
-
},
|
|
323502
|
-
},
|
|
323503
|
-
codespaces: {
|
|
323504
|
-
type: 'array',
|
|
323505
|
-
items: {
|
|
323506
|
-
$ref: 'firestartr.dev://github/GithubOrgClaimSecret',
|
|
323507
|
-
},
|
|
323508
|
-
},
|
|
323509
|
-
dependabot: {
|
|
323510
|
-
type: 'array',
|
|
323511
|
-
items: {
|
|
323512
|
-
$ref: 'firestartr.dev://github/GithubOrgClaimSecret',
|
|
323513
|
-
},
|
|
323514
|
-
},
|
|
323515
|
-
},
|
|
323516
|
-
additionalProperties: false,
|
|
323517
|
-
},
|
|
323518
|
-
GithubOrgClaimSecretRef: {
|
|
323519
|
-
$id: 'firestartr.dev://github/GithubOrgClaimSecretRef',
|
|
323520
|
-
type: 'string',
|
|
323521
|
-
description: 'the reference of the secret',
|
|
323522
|
-
pattern: '^ref:secretsclaim:([a-zA-Z0-9_-]+):([a-zA-Z0-9_-]+)$',
|
|
323523
|
-
},
|
|
323524
|
-
GithubOrgClaimSecret: {
|
|
323525
|
-
$id: 'firestartr.dev://github/GithubOrgClaimSecret',
|
|
323526
|
-
type: 'object',
|
|
323527
|
-
description: 'An organization-level secret for GitHub Actions',
|
|
323528
|
-
properties: {
|
|
323529
|
-
name: {
|
|
323530
|
-
type: 'string',
|
|
323531
|
-
description: 'the name of the secret',
|
|
323532
|
-
},
|
|
323533
|
-
value: {
|
|
323534
|
-
$ref: 'firestartr.dev://github/GithubOrgClaimSecretRef',
|
|
323535
|
-
},
|
|
323536
|
-
visibility: {
|
|
323537
|
-
type: 'string',
|
|
323538
|
-
enum: ['all', 'selected', 'private'],
|
|
323539
|
-
description: 'which repositories can access the secret',
|
|
323540
|
-
},
|
|
323541
|
-
selected_repositories: {
|
|
323542
|
-
type: 'array',
|
|
323543
|
-
items: {
|
|
323544
|
-
type: 'string',
|
|
323545
|
-
},
|
|
323546
|
-
description: 'list of repository refs when visibility is selected',
|
|
323547
|
-
},
|
|
323548
|
-
},
|
|
323549
|
-
required: ['name', 'value'],
|
|
323550
|
-
additionalProperties: false,
|
|
323551
|
-
},
|
|
323552
|
-
},
|
|
323553
|
-
});
|
|
323554
|
-
|
|
323555
323377
|
;// CONCATENATED MODULE: ../cdk8s_renderer/src/claims/github/index.ts
|
|
323556
323378
|
|
|
323557
323379
|
|
|
@@ -323561,7 +323383,6 @@ const organizationSettingsProperties = {
|
|
|
323561
323383
|
|
|
323562
323384
|
|
|
323563
323385
|
|
|
323564
|
-
|
|
323565
323386
|
const GithubSchemas = [
|
|
323566
323387
|
github_group_schema,
|
|
323567
323388
|
github_user_schema,
|
|
@@ -323571,7 +323392,6 @@ const GithubSchemas = [
|
|
|
323571
323392
|
github_orgsettings_schema,
|
|
323572
323393
|
component_secrets_vars_schema,
|
|
323573
323394
|
component_labels_schema,
|
|
323574
|
-
orgSecrets_schema,
|
|
323575
323395
|
];
|
|
323576
323396
|
|
|
323577
323397
|
;// CONCATENATED MODULE: ../cdk8s_renderer/src/claims/tfworkspaces/terraform.schema.ts
|
|
@@ -326718,7 +326538,7 @@ const VARIANT_OF_ANNOTATION = 'firestartr.dev/variant-of';
|
|
|
326718
326538
|
function isVariantCR(cr) {
|
|
326719
326539
|
return cr.metadata?.annotations?.[VARIANT_OF_ANNOTATION] !== undefined;
|
|
326720
326540
|
}
|
|
326721
|
-
function getPreviousCRfromClaim(claim, previousCRs
|
|
326541
|
+
function getPreviousCRfromClaim(claim, previousCRs) {
|
|
326722
326542
|
const previousCRsKeys = Object.keys(previousCRs);
|
|
326723
326543
|
const isVariantClaim = !!claim._parentClaimName;
|
|
326724
326544
|
for (const previousCRKey of previousCRsKeys) {
|
|
@@ -326727,8 +326547,6 @@ function getPreviousCRfromClaim(claim, previousCRs, expectedKind) {
|
|
|
326727
326547
|
continue;
|
|
326728
326548
|
if (isExcludedFromPreviousCR(previousCR.kind))
|
|
326729
326549
|
continue;
|
|
326730
|
-
if (expectedKind && previousCR.kind !== expectedKind)
|
|
326731
|
-
continue;
|
|
326732
326550
|
const crVariant = isVariantCR(previousCR);
|
|
326733
326551
|
if (isVariantClaim && !crVariant)
|
|
326734
326552
|
continue;
|
|
@@ -327485,412 +327303,6 @@ var FirestartrGithubMembershipSpecContextProviderRefKind;
|
|
|
327485
327303
|
/** FirestartrProviderConfig */
|
|
327486
327304
|
FirestartrGithubMembershipSpecContextProviderRefKind["FIRESTARTR_PROVIDER_CONFIG"] = "FirestartrProviderConfig";
|
|
327487
327305
|
})(FirestartrGithubMembershipSpecContextProviderRefKind || (FirestartrGithubMembershipSpecContextProviderRefKind = {}));
|
|
327488
|
-
/**
|
|
327489
|
-
* A resource to handle GitHub Organization Actions Secrets.
|
|
327490
|
-
*
|
|
327491
|
-
* @schema FirestartrGithubOrganizationSecretSection
|
|
327492
|
-
*/
|
|
327493
|
-
class FirestartrGithubOrganizationSecretSection extends lib.ApiObject {
|
|
327494
|
-
/**
|
|
327495
|
-
* Renders a Kubernetes manifest for "FirestartrGithubOrganizationSecretSection".
|
|
327496
|
-
*
|
|
327497
|
-
* This can be used to inline resource manifests inside other objects (e.g. as templates).
|
|
327498
|
-
*
|
|
327499
|
-
* @param props initialization props
|
|
327500
|
-
*/
|
|
327501
|
-
static manifest(props) {
|
|
327502
|
-
return {
|
|
327503
|
-
...FirestartrGithubOrganizationSecretSection.GVK,
|
|
327504
|
-
...toJson_FirestartrGithubOrganizationSecretSectionProps(props),
|
|
327505
|
-
};
|
|
327506
|
-
}
|
|
327507
|
-
/**
|
|
327508
|
-
* Defines a "FirestartrGithubOrganizationSecretSection" API object
|
|
327509
|
-
* @param scope the scope in which to define this object
|
|
327510
|
-
* @param id a scope-local name for the object
|
|
327511
|
-
* @param props initialization props
|
|
327512
|
-
*/
|
|
327513
|
-
constructor(scope, id, props) {
|
|
327514
|
-
super(scope, id, {
|
|
327515
|
-
...FirestartrGithubOrganizationSecretSection.GVK,
|
|
327516
|
-
...props,
|
|
327517
|
-
});
|
|
327518
|
-
}
|
|
327519
|
-
/**
|
|
327520
|
-
* Renders the object to Kubernetes JSON.
|
|
327521
|
-
*/
|
|
327522
|
-
toJson() {
|
|
327523
|
-
const resolved = super.toJson();
|
|
327524
|
-
return {
|
|
327525
|
-
...FirestartrGithubOrganizationSecretSection.GVK,
|
|
327526
|
-
...toJson_FirestartrGithubOrganizationSecretSectionProps(resolved),
|
|
327527
|
-
};
|
|
327528
|
-
}
|
|
327529
|
-
}
|
|
327530
|
-
/**
|
|
327531
|
-
* Returns the apiVersion and kind for "FirestartrGithubOrganizationSecretSection"
|
|
327532
|
-
*/
|
|
327533
|
-
FirestartrGithubOrganizationSecretSection.GVK = {
|
|
327534
|
-
apiVersion: 'firestartr.dev/v1',
|
|
327535
|
-
kind: 'FirestartrGithubOrganizationSecretSection',
|
|
327536
|
-
};
|
|
327537
|
-
|
|
327538
|
-
/**
|
|
327539
|
-
* Converts an object of type 'FirestartrGithubOrganizationSecretSectionProps' to JSON representation.
|
|
327540
|
-
*/
|
|
327541
|
-
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
327542
|
-
function toJson_FirestartrGithubOrganizationSecretSectionProps(obj) {
|
|
327543
|
-
if (obj === undefined) {
|
|
327544
|
-
return undefined;
|
|
327545
|
-
}
|
|
327546
|
-
const result = {
|
|
327547
|
-
'metadata': obj.metadata,
|
|
327548
|
-
'spec': toJson_FirestartrGithubOrganizationSecretSectionSpec(obj.spec),
|
|
327549
|
-
};
|
|
327550
|
-
// filter undefined values
|
|
327551
|
-
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
327552
|
-
}
|
|
327553
|
-
/**
|
|
327554
|
-
* Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpec' to JSON representation.
|
|
327555
|
-
*/
|
|
327556
|
-
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
327557
|
-
function toJson_FirestartrGithubOrganizationSecretSectionSpec(obj) {
|
|
327558
|
-
if (obj === undefined) {
|
|
327559
|
-
return undefined;
|
|
327560
|
-
}
|
|
327561
|
-
const result = {
|
|
327562
|
-
'org': obj.org,
|
|
327563
|
-
'secrets': toJson_FirestartrGithubOrganizationSecretSectionSpecSecrets(obj.secrets),
|
|
327564
|
-
'context': toJson_FirestartrGithubOrganizationSecretSectionSpecContext(obj.context),
|
|
327565
|
-
'firestartr': toJson_FirestartrGithubOrganizationSecretSectionSpecFirestartr(obj.firestartr),
|
|
327566
|
-
'writeConnectionSecretToRef': toJson_FirestartrGithubOrganizationSecretSectionSpecWriteConnectionSecretToRef(obj.writeConnectionSecretToRef),
|
|
327567
|
-
};
|
|
327568
|
-
// filter undefined values
|
|
327569
|
-
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
327570
|
-
}
|
|
327571
|
-
/**
|
|
327572
|
-
* Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecSecrets' to JSON representation.
|
|
327573
|
-
*/
|
|
327574
|
-
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
327575
|
-
function toJson_FirestartrGithubOrganizationSecretSectionSpecSecrets(obj) {
|
|
327576
|
-
if (obj === undefined) {
|
|
327577
|
-
return undefined;
|
|
327578
|
-
}
|
|
327579
|
-
const result = {
|
|
327580
|
-
'actions': obj.actions?.map(y => toJson_FirestartrGithubOrganizationSecretSectionSpecSecretsActions(y)),
|
|
327581
|
-
'codespaces': obj.codespaces?.map(y => toJson_FirestartrGithubOrganizationSecretSectionSpecSecretsCodespaces(y)),
|
|
327582
|
-
'dependabot': obj.dependabot?.map(y => toJson_FirestartrGithubOrganizationSecretSectionSpecSecretsDependabot(y)),
|
|
327583
|
-
};
|
|
327584
|
-
// filter undefined values
|
|
327585
|
-
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
327586
|
-
}
|
|
327587
|
-
/**
|
|
327588
|
-
* Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecContext' to JSON representation.
|
|
327589
|
-
*/
|
|
327590
|
-
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
327591
|
-
function toJson_FirestartrGithubOrganizationSecretSectionSpecContext(obj) {
|
|
327592
|
-
if (obj === undefined) {
|
|
327593
|
-
return undefined;
|
|
327594
|
-
}
|
|
327595
|
-
const result = {
|
|
327596
|
-
'backend': toJson_FirestartrGithubOrganizationSecretSectionSpecContextBackend(obj.backend),
|
|
327597
|
-
'provider': toJson_FirestartrGithubOrganizationSecretSectionSpecContextProvider(obj.provider),
|
|
327598
|
-
};
|
|
327599
|
-
// filter undefined values
|
|
327600
|
-
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
327601
|
-
}
|
|
327602
|
-
/**
|
|
327603
|
-
* Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecFirestartr' to JSON representation.
|
|
327604
|
-
*/
|
|
327605
|
-
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
327606
|
-
function toJson_FirestartrGithubOrganizationSecretSectionSpecFirestartr(obj) {
|
|
327607
|
-
if (obj === undefined) {
|
|
327608
|
-
return undefined;
|
|
327609
|
-
}
|
|
327610
|
-
const result = {
|
|
327611
|
-
'tfStateKey': obj.tfStateKey,
|
|
327612
|
-
};
|
|
327613
|
-
// filter undefined values
|
|
327614
|
-
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
327615
|
-
}
|
|
327616
|
-
/**
|
|
327617
|
-
* Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecWriteConnectionSecretToRef' to JSON representation.
|
|
327618
|
-
*/
|
|
327619
|
-
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
327620
|
-
function toJson_FirestartrGithubOrganizationSecretSectionSpecWriteConnectionSecretToRef(obj) {
|
|
327621
|
-
if (obj === undefined) {
|
|
327622
|
-
return undefined;
|
|
327623
|
-
}
|
|
327624
|
-
const result = {
|
|
327625
|
-
'name': obj.name,
|
|
327626
|
-
'outputs': obj.outputs?.map(y => toJson_FirestartrGithubOrganizationSecretSectionSpecWriteConnectionSecretToRefOutputs(y)),
|
|
327627
|
-
};
|
|
327628
|
-
// filter undefined values
|
|
327629
|
-
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
327630
|
-
}
|
|
327631
|
-
/**
|
|
327632
|
-
* Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecSecretsActions' to JSON representation.
|
|
327633
|
-
*/
|
|
327634
|
-
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
327635
|
-
function toJson_FirestartrGithubOrganizationSecretSectionSpecSecretsActions(obj) {
|
|
327636
|
-
if (obj === undefined) {
|
|
327637
|
-
return undefined;
|
|
327638
|
-
}
|
|
327639
|
-
const result = {
|
|
327640
|
-
'name': obj.name,
|
|
327641
|
-
'ref': toJson_FirestartrGithubOrganizationSecretSectionSpecSecretsActionsRef(obj.ref),
|
|
327642
|
-
'visibility': obj.visibility,
|
|
327643
|
-
'selectedRepositories': obj.selectedRepositories?.map(y => y),
|
|
327644
|
-
};
|
|
327645
|
-
// filter undefined values
|
|
327646
|
-
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
327647
|
-
}
|
|
327648
|
-
/**
|
|
327649
|
-
* Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecSecretsCodespaces' to JSON representation.
|
|
327650
|
-
*/
|
|
327651
|
-
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
327652
|
-
function toJson_FirestartrGithubOrganizationSecretSectionSpecSecretsCodespaces(obj) {
|
|
327653
|
-
if (obj === undefined) {
|
|
327654
|
-
return undefined;
|
|
327655
|
-
}
|
|
327656
|
-
const result = {
|
|
327657
|
-
'name': obj.name,
|
|
327658
|
-
'ref': toJson_FirestartrGithubOrganizationSecretSectionSpecSecretsCodespacesRef(obj.ref),
|
|
327659
|
-
'visibility': obj.visibility,
|
|
327660
|
-
'selectedRepositories': obj.selectedRepositories?.map(y => y),
|
|
327661
|
-
};
|
|
327662
|
-
// filter undefined values
|
|
327663
|
-
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
327664
|
-
}
|
|
327665
|
-
/**
|
|
327666
|
-
* Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecSecretsDependabot' to JSON representation.
|
|
327667
|
-
*/
|
|
327668
|
-
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
327669
|
-
function toJson_FirestartrGithubOrganizationSecretSectionSpecSecretsDependabot(obj) {
|
|
327670
|
-
if (obj === undefined) {
|
|
327671
|
-
return undefined;
|
|
327672
|
-
}
|
|
327673
|
-
const result = {
|
|
327674
|
-
'name': obj.name,
|
|
327675
|
-
'ref': toJson_FirestartrGithubOrganizationSecretSectionSpecSecretsDependabotRef(obj.ref),
|
|
327676
|
-
'visibility': obj.visibility,
|
|
327677
|
-
'selectedRepositories': obj.selectedRepositories?.map(y => y),
|
|
327678
|
-
};
|
|
327679
|
-
// filter undefined values
|
|
327680
|
-
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
327681
|
-
}
|
|
327682
|
-
/**
|
|
327683
|
-
* Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecContextBackend' to JSON representation.
|
|
327684
|
-
*/
|
|
327685
|
-
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
327686
|
-
function toJson_FirestartrGithubOrganizationSecretSectionSpecContextBackend(obj) {
|
|
327687
|
-
if (obj === undefined) {
|
|
327688
|
-
return undefined;
|
|
327689
|
-
}
|
|
327690
|
-
const result = {
|
|
327691
|
-
'ref': toJson_FirestartrGithubOrganizationSecretSectionSpecContextBackendRef(obj.ref),
|
|
327692
|
-
};
|
|
327693
|
-
// filter undefined values
|
|
327694
|
-
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
327695
|
-
}
|
|
327696
|
-
/**
|
|
327697
|
-
* Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecContextProvider' to JSON representation.
|
|
327698
|
-
*/
|
|
327699
|
-
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
327700
|
-
function toJson_FirestartrGithubOrganizationSecretSectionSpecContextProvider(obj) {
|
|
327701
|
-
if (obj === undefined) {
|
|
327702
|
-
return undefined;
|
|
327703
|
-
}
|
|
327704
|
-
const result = {
|
|
327705
|
-
'ref': toJson_FirestartrGithubOrganizationSecretSectionSpecContextProviderRef(obj.ref),
|
|
327706
|
-
};
|
|
327707
|
-
// filter undefined values
|
|
327708
|
-
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
327709
|
-
}
|
|
327710
|
-
/**
|
|
327711
|
-
* Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecWriteConnectionSecretToRefOutputs' to JSON representation.
|
|
327712
|
-
*/
|
|
327713
|
-
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
327714
|
-
function toJson_FirestartrGithubOrganizationSecretSectionSpecWriteConnectionSecretToRefOutputs(obj) {
|
|
327715
|
-
if (obj === undefined) {
|
|
327716
|
-
return undefined;
|
|
327717
|
-
}
|
|
327718
|
-
const result = {
|
|
327719
|
-
'key': obj.key,
|
|
327720
|
-
};
|
|
327721
|
-
// filter undefined values
|
|
327722
|
-
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
327723
|
-
}
|
|
327724
|
-
/**
|
|
327725
|
-
* Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecSecretsActionsRef' to JSON representation.
|
|
327726
|
-
*/
|
|
327727
|
-
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
327728
|
-
function toJson_FirestartrGithubOrganizationSecretSectionSpecSecretsActionsRef(obj) {
|
|
327729
|
-
if (obj === undefined) {
|
|
327730
|
-
return undefined;
|
|
327731
|
-
}
|
|
327732
|
-
const result = {
|
|
327733
|
-
'kind': obj.kind,
|
|
327734
|
-
'name': obj.name,
|
|
327735
|
-
'key': obj.key,
|
|
327736
|
-
};
|
|
327737
|
-
// filter undefined values
|
|
327738
|
-
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
327739
|
-
}
|
|
327740
|
-
/* eslint-enable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
327741
|
-
/**
|
|
327742
|
-
* Which repositories can access the secret.
|
|
327743
|
-
*
|
|
327744
|
-
* @schema FirestartrGithubOrganizationSecretSectionSpecSecretsActionsVisibility
|
|
327745
|
-
*/
|
|
327746
|
-
var FirestartrGithubOrganizationSecretSectionSpecSecretsActionsVisibility;
|
|
327747
|
-
(function (FirestartrGithubOrganizationSecretSectionSpecSecretsActionsVisibility) {
|
|
327748
|
-
/** all */
|
|
327749
|
-
FirestartrGithubOrganizationSecretSectionSpecSecretsActionsVisibility["ALL"] = "all";
|
|
327750
|
-
/** selected */
|
|
327751
|
-
FirestartrGithubOrganizationSecretSectionSpecSecretsActionsVisibility["SELECTED"] = "selected";
|
|
327752
|
-
/** private */
|
|
327753
|
-
FirestartrGithubOrganizationSecretSectionSpecSecretsActionsVisibility["PRIVATE"] = "private";
|
|
327754
|
-
})(FirestartrGithubOrganizationSecretSectionSpecSecretsActionsVisibility || (FirestartrGithubOrganizationSecretSectionSpecSecretsActionsVisibility = {}));
|
|
327755
|
-
/**
|
|
327756
|
-
* Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecSecretsCodespacesRef' to JSON representation.
|
|
327757
|
-
*/
|
|
327758
|
-
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
327759
|
-
function toJson_FirestartrGithubOrganizationSecretSectionSpecSecretsCodespacesRef(obj) {
|
|
327760
|
-
if (obj === undefined) {
|
|
327761
|
-
return undefined;
|
|
327762
|
-
}
|
|
327763
|
-
const result = {
|
|
327764
|
-
'kind': obj.kind,
|
|
327765
|
-
'name': obj.name,
|
|
327766
|
-
'key': obj.key,
|
|
327767
|
-
};
|
|
327768
|
-
// filter undefined values
|
|
327769
|
-
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
327770
|
-
}
|
|
327771
|
-
/* eslint-enable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
327772
|
-
/**
|
|
327773
|
-
* Which repositories can access the secret.
|
|
327774
|
-
*
|
|
327775
|
-
* @schema FirestartrGithubOrganizationSecretSectionSpecSecretsCodespacesVisibility
|
|
327776
|
-
*/
|
|
327777
|
-
var FirestartrGithubOrganizationSecretSectionSpecSecretsCodespacesVisibility;
|
|
327778
|
-
(function (FirestartrGithubOrganizationSecretSectionSpecSecretsCodespacesVisibility) {
|
|
327779
|
-
/** all */
|
|
327780
|
-
FirestartrGithubOrganizationSecretSectionSpecSecretsCodespacesVisibility["ALL"] = "all";
|
|
327781
|
-
/** selected */
|
|
327782
|
-
FirestartrGithubOrganizationSecretSectionSpecSecretsCodespacesVisibility["SELECTED"] = "selected";
|
|
327783
|
-
/** private */
|
|
327784
|
-
FirestartrGithubOrganizationSecretSectionSpecSecretsCodespacesVisibility["PRIVATE"] = "private";
|
|
327785
|
-
})(FirestartrGithubOrganizationSecretSectionSpecSecretsCodespacesVisibility || (FirestartrGithubOrganizationSecretSectionSpecSecretsCodespacesVisibility = {}));
|
|
327786
|
-
/**
|
|
327787
|
-
* Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecSecretsDependabotRef' to JSON representation.
|
|
327788
|
-
*/
|
|
327789
|
-
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
327790
|
-
function toJson_FirestartrGithubOrganizationSecretSectionSpecSecretsDependabotRef(obj) {
|
|
327791
|
-
if (obj === undefined) {
|
|
327792
|
-
return undefined;
|
|
327793
|
-
}
|
|
327794
|
-
const result = {
|
|
327795
|
-
'kind': obj.kind,
|
|
327796
|
-
'name': obj.name,
|
|
327797
|
-
'key': obj.key,
|
|
327798
|
-
};
|
|
327799
|
-
// filter undefined values
|
|
327800
|
-
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
327801
|
-
}
|
|
327802
|
-
/* eslint-enable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
327803
|
-
/**
|
|
327804
|
-
* Which repositories can access the secret.
|
|
327805
|
-
*
|
|
327806
|
-
* @schema FirestartrGithubOrganizationSecretSectionSpecSecretsDependabotVisibility
|
|
327807
|
-
*/
|
|
327808
|
-
var FirestartrGithubOrganizationSecretSectionSpecSecretsDependabotVisibility;
|
|
327809
|
-
(function (FirestartrGithubOrganizationSecretSectionSpecSecretsDependabotVisibility) {
|
|
327810
|
-
/** all */
|
|
327811
|
-
FirestartrGithubOrganizationSecretSectionSpecSecretsDependabotVisibility["ALL"] = "all";
|
|
327812
|
-
/** selected */
|
|
327813
|
-
FirestartrGithubOrganizationSecretSectionSpecSecretsDependabotVisibility["SELECTED"] = "selected";
|
|
327814
|
-
/** private */
|
|
327815
|
-
FirestartrGithubOrganizationSecretSectionSpecSecretsDependabotVisibility["PRIVATE"] = "private";
|
|
327816
|
-
})(FirestartrGithubOrganizationSecretSectionSpecSecretsDependabotVisibility || (FirestartrGithubOrganizationSecretSectionSpecSecretsDependabotVisibility = {}));
|
|
327817
|
-
/**
|
|
327818
|
-
* Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecContextBackendRef' to JSON representation.
|
|
327819
|
-
*/
|
|
327820
|
-
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
327821
|
-
function toJson_FirestartrGithubOrganizationSecretSectionSpecContextBackendRef(obj) {
|
|
327822
|
-
if (obj === undefined) {
|
|
327823
|
-
return undefined;
|
|
327824
|
-
}
|
|
327825
|
-
const result = {
|
|
327826
|
-
'kind': obj.kind,
|
|
327827
|
-
'name': obj.name,
|
|
327828
|
-
};
|
|
327829
|
-
// filter undefined values
|
|
327830
|
-
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
327831
|
-
}
|
|
327832
|
-
/**
|
|
327833
|
-
* Converts an object of type 'FirestartrGithubOrganizationSecretSectionSpecContextProviderRef' to JSON representation.
|
|
327834
|
-
*/
|
|
327835
|
-
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
327836
|
-
function toJson_FirestartrGithubOrganizationSecretSectionSpecContextProviderRef(obj) {
|
|
327837
|
-
if (obj === undefined) {
|
|
327838
|
-
return undefined;
|
|
327839
|
-
}
|
|
327840
|
-
const result = {
|
|
327841
|
-
'kind': obj.kind,
|
|
327842
|
-
'name': obj.name,
|
|
327843
|
-
};
|
|
327844
|
-
// filter undefined values
|
|
327845
|
-
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
327846
|
-
}
|
|
327847
|
-
/* eslint-enable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
327848
|
-
/**
|
|
327849
|
-
* The type of Kubernetes resource to reference.
|
|
327850
|
-
*
|
|
327851
|
-
* @schema FirestartrGithubOrganizationSecretSectionSpecSecretsActionsRefKind
|
|
327852
|
-
*/
|
|
327853
|
-
var FirestartrGithubOrganizationSecretSectionSpecSecretsActionsRefKind;
|
|
327854
|
-
(function (FirestartrGithubOrganizationSecretSectionSpecSecretsActionsRefKind) {
|
|
327855
|
-
/** Secret */
|
|
327856
|
-
FirestartrGithubOrganizationSecretSectionSpecSecretsActionsRefKind["SECRET"] = "Secret";
|
|
327857
|
-
})(FirestartrGithubOrganizationSecretSectionSpecSecretsActionsRefKind || (FirestartrGithubOrganizationSecretSectionSpecSecretsActionsRefKind = {}));
|
|
327858
|
-
/**
|
|
327859
|
-
* The type of Kubernetes resource to reference.
|
|
327860
|
-
*
|
|
327861
|
-
* @schema FirestartrGithubOrganizationSecretSectionSpecSecretsCodespacesRefKind
|
|
327862
|
-
*/
|
|
327863
|
-
var FirestartrGithubOrganizationSecretSectionSpecSecretsCodespacesRefKind;
|
|
327864
|
-
(function (FirestartrGithubOrganizationSecretSectionSpecSecretsCodespacesRefKind) {
|
|
327865
|
-
/** Secret */
|
|
327866
|
-
FirestartrGithubOrganizationSecretSectionSpecSecretsCodespacesRefKind["SECRET"] = "Secret";
|
|
327867
|
-
})(FirestartrGithubOrganizationSecretSectionSpecSecretsCodespacesRefKind || (FirestartrGithubOrganizationSecretSectionSpecSecretsCodespacesRefKind = {}));
|
|
327868
|
-
/**
|
|
327869
|
-
* The type of Kubernetes resource to reference.
|
|
327870
|
-
*
|
|
327871
|
-
* @schema FirestartrGithubOrganizationSecretSectionSpecSecretsDependabotRefKind
|
|
327872
|
-
*/
|
|
327873
|
-
var FirestartrGithubOrganizationSecretSectionSpecSecretsDependabotRefKind;
|
|
327874
|
-
(function (FirestartrGithubOrganizationSecretSectionSpecSecretsDependabotRefKind) {
|
|
327875
|
-
/** Secret */
|
|
327876
|
-
FirestartrGithubOrganizationSecretSectionSpecSecretsDependabotRefKind["SECRET"] = "Secret";
|
|
327877
|
-
})(FirestartrGithubOrganizationSecretSectionSpecSecretsDependabotRefKind || (FirestartrGithubOrganizationSecretSectionSpecSecretsDependabotRefKind = {}));
|
|
327878
|
-
/**
|
|
327879
|
-
* @schema FirestartrGithubOrganizationSecretSectionSpecContextBackendRefKind
|
|
327880
|
-
*/
|
|
327881
|
-
var FirestartrGithubOrganizationSecretSectionSpecContextBackendRefKind;
|
|
327882
|
-
(function (FirestartrGithubOrganizationSecretSectionSpecContextBackendRefKind) {
|
|
327883
|
-
/** FirestartrProviderConfig */
|
|
327884
|
-
FirestartrGithubOrganizationSecretSectionSpecContextBackendRefKind["FIRESTARTR_PROVIDER_CONFIG"] = "FirestartrProviderConfig";
|
|
327885
|
-
})(FirestartrGithubOrganizationSecretSectionSpecContextBackendRefKind || (FirestartrGithubOrganizationSecretSectionSpecContextBackendRefKind = {}));
|
|
327886
|
-
/**
|
|
327887
|
-
* @schema FirestartrGithubOrganizationSecretSectionSpecContextProviderRefKind
|
|
327888
|
-
*/
|
|
327889
|
-
var FirestartrGithubOrganizationSecretSectionSpecContextProviderRefKind;
|
|
327890
|
-
(function (FirestartrGithubOrganizationSecretSectionSpecContextProviderRefKind) {
|
|
327891
|
-
/** FirestartrProviderConfig */
|
|
327892
|
-
FirestartrGithubOrganizationSecretSectionSpecContextProviderRefKind["FIRESTARTR_PROVIDER_CONFIG"] = "FirestartrProviderConfig";
|
|
327893
|
-
})(FirestartrGithubOrganizationSecretSectionSpecContextProviderRefKind || (FirestartrGithubOrganizationSecretSectionSpecContextProviderRefKind = {}));
|
|
327894
327306
|
/**
|
|
327895
327307
|
* A resource to handle GitHub Organization Settings.
|
|
327896
327308
|
*
|
|
@@ -328149,254 +327561,6 @@ var FirestartrGithubOrganizationSettingsSpecContextProviderRefKind;
|
|
|
328149
327561
|
/** FirestartrProviderConfig */
|
|
328150
327562
|
FirestartrGithubOrganizationSettingsSpecContextProviderRefKind["FIRESTARTR_PROVIDER_CONFIG"] = "FirestartrProviderConfig";
|
|
328151
327563
|
})(FirestartrGithubOrganizationSettingsSpecContextProviderRefKind || (FirestartrGithubOrganizationSettingsSpecContextProviderRefKind = {}));
|
|
328152
|
-
/**
|
|
328153
|
-
* A resource to handle GitHub Organization Actions Variables.
|
|
328154
|
-
*
|
|
328155
|
-
* @schema FirestartrGithubOrganizationVariableSection
|
|
328156
|
-
*/
|
|
328157
|
-
class FirestartrGithubOrganizationVariableSection extends lib.ApiObject {
|
|
328158
|
-
/**
|
|
328159
|
-
* Renders a Kubernetes manifest for "FirestartrGithubOrganizationVariableSection".
|
|
328160
|
-
*
|
|
328161
|
-
* This can be used to inline resource manifests inside other objects (e.g. as templates).
|
|
328162
|
-
*
|
|
328163
|
-
* @param props initialization props
|
|
328164
|
-
*/
|
|
328165
|
-
static manifest(props) {
|
|
328166
|
-
return {
|
|
328167
|
-
...FirestartrGithubOrganizationVariableSection.GVK,
|
|
328168
|
-
...toJson_FirestartrGithubOrganizationVariableSectionProps(props),
|
|
328169
|
-
};
|
|
328170
|
-
}
|
|
328171
|
-
/**
|
|
328172
|
-
* Defines a "FirestartrGithubOrganizationVariableSection" API object
|
|
328173
|
-
* @param scope the scope in which to define this object
|
|
328174
|
-
* @param id a scope-local name for the object
|
|
328175
|
-
* @param props initialization props
|
|
328176
|
-
*/
|
|
328177
|
-
constructor(scope, id, props) {
|
|
328178
|
-
super(scope, id, {
|
|
328179
|
-
...FirestartrGithubOrganizationVariableSection.GVK,
|
|
328180
|
-
...props,
|
|
328181
|
-
});
|
|
328182
|
-
}
|
|
328183
|
-
/**
|
|
328184
|
-
* Renders the object to Kubernetes JSON.
|
|
328185
|
-
*/
|
|
328186
|
-
toJson() {
|
|
328187
|
-
const resolved = super.toJson();
|
|
328188
|
-
return {
|
|
328189
|
-
...FirestartrGithubOrganizationVariableSection.GVK,
|
|
328190
|
-
...toJson_FirestartrGithubOrganizationVariableSectionProps(resolved),
|
|
328191
|
-
};
|
|
328192
|
-
}
|
|
328193
|
-
}
|
|
328194
|
-
/**
|
|
328195
|
-
* Returns the apiVersion and kind for "FirestartrGithubOrganizationVariableSection"
|
|
328196
|
-
*/
|
|
328197
|
-
FirestartrGithubOrganizationVariableSection.GVK = {
|
|
328198
|
-
apiVersion: 'firestartr.dev/v1',
|
|
328199
|
-
kind: 'FirestartrGithubOrganizationVariableSection',
|
|
328200
|
-
};
|
|
328201
|
-
|
|
328202
|
-
/**
|
|
328203
|
-
* Converts an object of type 'FirestartrGithubOrganizationVariableSectionProps' to JSON representation.
|
|
328204
|
-
*/
|
|
328205
|
-
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
328206
|
-
function toJson_FirestartrGithubOrganizationVariableSectionProps(obj) {
|
|
328207
|
-
if (obj === undefined) {
|
|
328208
|
-
return undefined;
|
|
328209
|
-
}
|
|
328210
|
-
const result = {
|
|
328211
|
-
'metadata': obj.metadata,
|
|
328212
|
-
'spec': toJson_FirestartrGithubOrganizationVariableSectionSpec(obj.spec),
|
|
328213
|
-
};
|
|
328214
|
-
// filter undefined values
|
|
328215
|
-
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
328216
|
-
}
|
|
328217
|
-
/**
|
|
328218
|
-
* Converts an object of type 'FirestartrGithubOrganizationVariableSectionSpec' to JSON representation.
|
|
328219
|
-
*/
|
|
328220
|
-
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
328221
|
-
function toJson_FirestartrGithubOrganizationVariableSectionSpec(obj) {
|
|
328222
|
-
if (obj === undefined) {
|
|
328223
|
-
return undefined;
|
|
328224
|
-
}
|
|
328225
|
-
const result = {
|
|
328226
|
-
'org': obj.org,
|
|
328227
|
-
'actionsVariables': obj.actionsVariables?.map(y => toJson_FirestartrGithubOrganizationVariableSectionSpecActionsVariables(y)),
|
|
328228
|
-
'context': toJson_FirestartrGithubOrganizationVariableSectionSpecContext(obj.context),
|
|
328229
|
-
'firestartr': toJson_FirestartrGithubOrganizationVariableSectionSpecFirestartr(obj.firestartr),
|
|
328230
|
-
'writeConnectionSecretToRef': toJson_FirestartrGithubOrganizationVariableSectionSpecWriteConnectionSecretToRef(obj.writeConnectionSecretToRef),
|
|
328231
|
-
};
|
|
328232
|
-
// filter undefined values
|
|
328233
|
-
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
328234
|
-
}
|
|
328235
|
-
/**
|
|
328236
|
-
* Converts an object of type 'FirestartrGithubOrganizationVariableSectionSpecActionsVariables' to JSON representation.
|
|
328237
|
-
*/
|
|
328238
|
-
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
328239
|
-
function toJson_FirestartrGithubOrganizationVariableSectionSpecActionsVariables(obj) {
|
|
328240
|
-
if (obj === undefined) {
|
|
328241
|
-
return undefined;
|
|
328242
|
-
}
|
|
328243
|
-
const result = {
|
|
328244
|
-
'name': obj.name,
|
|
328245
|
-
'value': obj.value,
|
|
328246
|
-
'visibility': obj.visibility,
|
|
328247
|
-
'selectedRepositories': obj.selectedRepositories?.map(y => y),
|
|
328248
|
-
};
|
|
328249
|
-
// filter undefined values
|
|
328250
|
-
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
328251
|
-
}
|
|
328252
|
-
/**
|
|
328253
|
-
* Converts an object of type 'FirestartrGithubOrganizationVariableSectionSpecContext' to JSON representation.
|
|
328254
|
-
*/
|
|
328255
|
-
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
328256
|
-
function toJson_FirestartrGithubOrganizationVariableSectionSpecContext(obj) {
|
|
328257
|
-
if (obj === undefined) {
|
|
328258
|
-
return undefined;
|
|
328259
|
-
}
|
|
328260
|
-
const result = {
|
|
328261
|
-
'backend': toJson_FirestartrGithubOrganizationVariableSectionSpecContextBackend(obj.backend),
|
|
328262
|
-
'provider': toJson_FirestartrGithubOrganizationVariableSectionSpecContextProvider(obj.provider),
|
|
328263
|
-
};
|
|
328264
|
-
// filter undefined values
|
|
328265
|
-
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
328266
|
-
}
|
|
328267
|
-
/**
|
|
328268
|
-
* Converts an object of type 'FirestartrGithubOrganizationVariableSectionSpecFirestartr' to JSON representation.
|
|
328269
|
-
*/
|
|
328270
|
-
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
328271
|
-
function toJson_FirestartrGithubOrganizationVariableSectionSpecFirestartr(obj) {
|
|
328272
|
-
if (obj === undefined) {
|
|
328273
|
-
return undefined;
|
|
328274
|
-
}
|
|
328275
|
-
const result = {
|
|
328276
|
-
'tfStateKey': obj.tfStateKey,
|
|
328277
|
-
};
|
|
328278
|
-
// filter undefined values
|
|
328279
|
-
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
328280
|
-
}
|
|
328281
|
-
/**
|
|
328282
|
-
* Converts an object of type 'FirestartrGithubOrganizationVariableSectionSpecWriteConnectionSecretToRef' to JSON representation.
|
|
328283
|
-
*/
|
|
328284
|
-
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
328285
|
-
function toJson_FirestartrGithubOrganizationVariableSectionSpecWriteConnectionSecretToRef(obj) {
|
|
328286
|
-
if (obj === undefined) {
|
|
328287
|
-
return undefined;
|
|
328288
|
-
}
|
|
328289
|
-
const result = {
|
|
328290
|
-
'name': obj.name,
|
|
328291
|
-
'outputs': obj.outputs?.map(y => toJson_FirestartrGithubOrganizationVariableSectionSpecWriteConnectionSecretToRefOutputs(y)),
|
|
328292
|
-
};
|
|
328293
|
-
// filter undefined values
|
|
328294
|
-
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
328295
|
-
}
|
|
328296
|
-
/* eslint-enable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
328297
|
-
/**
|
|
328298
|
-
* Visibility of the variable
|
|
328299
|
-
*
|
|
328300
|
-
* @schema FirestartrGithubOrganizationVariableSectionSpecActionsVariablesVisibility
|
|
328301
|
-
*/
|
|
328302
|
-
var FirestartrGithubOrganizationVariableSectionSpecActionsVariablesVisibility;
|
|
328303
|
-
(function (FirestartrGithubOrganizationVariableSectionSpecActionsVariablesVisibility) {
|
|
328304
|
-
/** all */
|
|
328305
|
-
FirestartrGithubOrganizationVariableSectionSpecActionsVariablesVisibility["ALL"] = "all";
|
|
328306
|
-
/** private */
|
|
328307
|
-
FirestartrGithubOrganizationVariableSectionSpecActionsVariablesVisibility["PRIVATE"] = "private";
|
|
328308
|
-
/** selected */
|
|
328309
|
-
FirestartrGithubOrganizationVariableSectionSpecActionsVariablesVisibility["SELECTED"] = "selected";
|
|
328310
|
-
})(FirestartrGithubOrganizationVariableSectionSpecActionsVariablesVisibility || (FirestartrGithubOrganizationVariableSectionSpecActionsVariablesVisibility = {}));
|
|
328311
|
-
/**
|
|
328312
|
-
* Converts an object of type 'FirestartrGithubOrganizationVariableSectionSpecContextBackend' to JSON representation.
|
|
328313
|
-
*/
|
|
328314
|
-
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
328315
|
-
function toJson_FirestartrGithubOrganizationVariableSectionSpecContextBackend(obj) {
|
|
328316
|
-
if (obj === undefined) {
|
|
328317
|
-
return undefined;
|
|
328318
|
-
}
|
|
328319
|
-
const result = {
|
|
328320
|
-
'ref': toJson_FirestartrGithubOrganizationVariableSectionSpecContextBackendRef(obj.ref),
|
|
328321
|
-
};
|
|
328322
|
-
// filter undefined values
|
|
328323
|
-
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
328324
|
-
}
|
|
328325
|
-
/**
|
|
328326
|
-
* Converts an object of type 'FirestartrGithubOrganizationVariableSectionSpecContextProvider' to JSON representation.
|
|
328327
|
-
*/
|
|
328328
|
-
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
328329
|
-
function toJson_FirestartrGithubOrganizationVariableSectionSpecContextProvider(obj) {
|
|
328330
|
-
if (obj === undefined) {
|
|
328331
|
-
return undefined;
|
|
328332
|
-
}
|
|
328333
|
-
const result = {
|
|
328334
|
-
'ref': toJson_FirestartrGithubOrganizationVariableSectionSpecContextProviderRef(obj.ref),
|
|
328335
|
-
};
|
|
328336
|
-
// filter undefined values
|
|
328337
|
-
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
328338
|
-
}
|
|
328339
|
-
/**
|
|
328340
|
-
* Converts an object of type 'FirestartrGithubOrganizationVariableSectionSpecWriteConnectionSecretToRefOutputs' to JSON representation.
|
|
328341
|
-
*/
|
|
328342
|
-
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
328343
|
-
function toJson_FirestartrGithubOrganizationVariableSectionSpecWriteConnectionSecretToRefOutputs(obj) {
|
|
328344
|
-
if (obj === undefined) {
|
|
328345
|
-
return undefined;
|
|
328346
|
-
}
|
|
328347
|
-
const result = {
|
|
328348
|
-
'key': obj.key,
|
|
328349
|
-
};
|
|
328350
|
-
// filter undefined values
|
|
328351
|
-
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
328352
|
-
}
|
|
328353
|
-
/**
|
|
328354
|
-
* Converts an object of type 'FirestartrGithubOrganizationVariableSectionSpecContextBackendRef' to JSON representation.
|
|
328355
|
-
*/
|
|
328356
|
-
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
328357
|
-
function toJson_FirestartrGithubOrganizationVariableSectionSpecContextBackendRef(obj) {
|
|
328358
|
-
if (obj === undefined) {
|
|
328359
|
-
return undefined;
|
|
328360
|
-
}
|
|
328361
|
-
const result = {
|
|
328362
|
-
'kind': obj.kind,
|
|
328363
|
-
'name': obj.name,
|
|
328364
|
-
};
|
|
328365
|
-
// filter undefined values
|
|
328366
|
-
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
328367
|
-
}
|
|
328368
|
-
/**
|
|
328369
|
-
* Converts an object of type 'FirestartrGithubOrganizationVariableSectionSpecContextProviderRef' to JSON representation.
|
|
328370
|
-
*/
|
|
328371
|
-
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
328372
|
-
function toJson_FirestartrGithubOrganizationVariableSectionSpecContextProviderRef(obj) {
|
|
328373
|
-
if (obj === undefined) {
|
|
328374
|
-
return undefined;
|
|
328375
|
-
}
|
|
328376
|
-
const result = {
|
|
328377
|
-
'kind': obj.kind,
|
|
328378
|
-
'name': obj.name,
|
|
328379
|
-
};
|
|
328380
|
-
// filter undefined values
|
|
328381
|
-
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
328382
|
-
}
|
|
328383
|
-
/* eslint-enable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
328384
|
-
/**
|
|
328385
|
-
* @schema FirestartrGithubOrganizationVariableSectionSpecContextBackendRefKind
|
|
328386
|
-
*/
|
|
328387
|
-
var FirestartrGithubOrganizationVariableSectionSpecContextBackendRefKind;
|
|
328388
|
-
(function (FirestartrGithubOrganizationVariableSectionSpecContextBackendRefKind) {
|
|
328389
|
-
/** FirestartrProviderConfig */
|
|
328390
|
-
FirestartrGithubOrganizationVariableSectionSpecContextBackendRefKind["FIRESTARTR_PROVIDER_CONFIG"] = "FirestartrProviderConfig";
|
|
328391
|
-
})(FirestartrGithubOrganizationVariableSectionSpecContextBackendRefKind || (FirestartrGithubOrganizationVariableSectionSpecContextBackendRefKind = {}));
|
|
328392
|
-
/**
|
|
328393
|
-
* @schema FirestartrGithubOrganizationVariableSectionSpecContextProviderRefKind
|
|
328394
|
-
*/
|
|
328395
|
-
var FirestartrGithubOrganizationVariableSectionSpecContextProviderRefKind;
|
|
328396
|
-
(function (FirestartrGithubOrganizationVariableSectionSpecContextProviderRefKind) {
|
|
328397
|
-
/** FirestartrProviderConfig */
|
|
328398
|
-
FirestartrGithubOrganizationVariableSectionSpecContextProviderRefKind["FIRESTARTR_PROVIDER_CONFIG"] = "FirestartrProviderConfig";
|
|
328399
|
-
})(FirestartrGithubOrganizationVariableSectionSpecContextProviderRefKind || (FirestartrGithubOrganizationVariableSectionSpecContextProviderRefKind = {}));
|
|
328400
327564
|
/**
|
|
328401
327565
|
* A resource to handle GitHub Organization Webhooks
|
|
328402
327566
|
*
|
|
@@ -331246,122 +330410,6 @@ class GithubOrgSettingsChart extends BaseGithubChart {
|
|
|
331246
330410
|
}
|
|
331247
330411
|
}
|
|
331248
330412
|
|
|
331249
|
-
;// CONCATENATED MODULE: ../cdk8s_renderer/src/charts/github/orgVariableSectionChart.ts
|
|
331250
|
-
|
|
331251
|
-
|
|
331252
|
-
|
|
331253
|
-
class GithubOrgVariableSectionChart extends BaseGithubChart {
|
|
331254
|
-
template() {
|
|
331255
|
-
const claim = this.get('claim');
|
|
331256
|
-
const firestartrId = this.get('firestartrId');
|
|
331257
|
-
const githubProvider = claim.providers.github;
|
|
331258
|
-
const actionsVariables = (githubProvider.actions_variables || []).map((v) => {
|
|
331259
|
-
const entry = {
|
|
331260
|
-
name: v.name,
|
|
331261
|
-
value: v.value,
|
|
331262
|
-
visibility: v.visibility,
|
|
331263
|
-
};
|
|
331264
|
-
if (v.selected_repositories && v.selected_repositories.length > 0) {
|
|
331265
|
-
entry.selectedRepositories = v.selected_repositories.map((ref) => {
|
|
331266
|
-
const match = ref.match(/^component:(.+)$/);
|
|
331267
|
-
if (!match) {
|
|
331268
|
-
throw new ChartRenderError('OrgSettingsClaim', claim.name, `Invalid component ref "${ref}" in selected_repositories. Expected format: component:<name>`);
|
|
331269
|
-
}
|
|
331270
|
-
const componentName = match[1];
|
|
331271
|
-
const resolvedCr = this.refResolver('ComponentClaim', componentName);
|
|
331272
|
-
const org = resolvedCr?.spec?.org;
|
|
331273
|
-
const repoName = resolvedCr?.metadata?.annotations?.['firestartr.dev/external-name'] || resolvedCr?.metadata?.name?.replace(/-[0-9a-f-]{36}$/, '');
|
|
331274
|
-
if (!org || !repoName) {
|
|
331275
|
-
throw new ChartRenderError('OrgSettingsClaim', claim.name, `Referenced component "${componentName}" has no GitHub provider configured`);
|
|
331276
|
-
}
|
|
331277
|
-
return `${org}/${repoName}`;
|
|
331278
|
-
});
|
|
331279
|
-
}
|
|
331280
|
-
return entry;
|
|
331281
|
-
});
|
|
331282
|
-
const template = {
|
|
331283
|
-
metadata: {
|
|
331284
|
-
name: githubProvider.name,
|
|
331285
|
-
},
|
|
331286
|
-
spec: {
|
|
331287
|
-
org: githubProvider.org,
|
|
331288
|
-
actionsVariables,
|
|
331289
|
-
firestartr: {
|
|
331290
|
-
tfStateKey: firestartrId,
|
|
331291
|
-
},
|
|
331292
|
-
writeConnectionSecretToRef: {
|
|
331293
|
-
name: `firestartrgithuborganizationvariablesection-${githubProvider.name}-outputs`.toLowerCase(),
|
|
331294
|
-
outputs: [{ key: 'managed_variables' }, { key: 'variable_ids' }],
|
|
331295
|
-
},
|
|
331296
|
-
},
|
|
331297
|
-
};
|
|
331298
|
-
return JSON.parse(JSON.stringify(template));
|
|
331299
|
-
}
|
|
331300
|
-
gvk() {
|
|
331301
|
-
return FirestartrGithubOrganizationVariableSection.GVK;
|
|
331302
|
-
}
|
|
331303
|
-
instanceApiObject(template) {
|
|
331304
|
-
return new FirestartrGithubOrganizationVariableSection(this, template.metadata.name, template);
|
|
331305
|
-
}
|
|
331306
|
-
}
|
|
331307
|
-
|
|
331308
|
-
;// CONCATENATED MODULE: ../cdk8s_renderer/src/charts/github/orgSecretSectionChart.ts
|
|
331309
|
-
|
|
331310
|
-
|
|
331311
|
-
class GithubOrgSecretSectionChart extends BaseGithubChart {
|
|
331312
|
-
template() {
|
|
331313
|
-
const claim = this.get('claim');
|
|
331314
|
-
const firestartrId = this.get('firestartrId');
|
|
331315
|
-
const githubProvider = claim.providers.github;
|
|
331316
|
-
const orgSecrets = githubProvider.org_secrets || {};
|
|
331317
|
-
const renderSecrets = (section) => {
|
|
331318
|
-
const secrets = orgSecrets[section];
|
|
331319
|
-
if (!Array.isArray(secrets))
|
|
331320
|
-
return [];
|
|
331321
|
-
return secrets.map((secret) => {
|
|
331322
|
-
const parts = secret.value.split(':');
|
|
331323
|
-
return {
|
|
331324
|
-
name: secret.name,
|
|
331325
|
-
ref: {
|
|
331326
|
-
kind: 'Secret',
|
|
331327
|
-
name: parts[2],
|
|
331328
|
-
key: parts[3],
|
|
331329
|
-
},
|
|
331330
|
-
visibility: secret.visibility || 'all',
|
|
331331
|
-
selectedRepositories: secret.selected_repositories || [],
|
|
331332
|
-
};
|
|
331333
|
-
});
|
|
331334
|
-
};
|
|
331335
|
-
const template = {
|
|
331336
|
-
metadata: {
|
|
331337
|
-
name: `${githubProvider.name}-secrets`,
|
|
331338
|
-
},
|
|
331339
|
-
spec: {
|
|
331340
|
-
org: githubProvider.org,
|
|
331341
|
-
secrets: {
|
|
331342
|
-
actions: renderSecrets('actions'),
|
|
331343
|
-
codespaces: renderSecrets('codespaces'),
|
|
331344
|
-
dependabot: renderSecrets('dependabot'),
|
|
331345
|
-
},
|
|
331346
|
-
firestartr: {
|
|
331347
|
-
tfStateKey: firestartrId ? `${firestartrId}-secrets` : firestartrId,
|
|
331348
|
-
},
|
|
331349
|
-
writeConnectionSecretToRef: {
|
|
331350
|
-
name: `firestartrgithuborganizationsecretsection-${githubProvider.name}-outputs`.toLowerCase(),
|
|
331351
|
-
outputs: [{ key: 'managed_secrets' }, { key: 'secret_ids' }],
|
|
331352
|
-
},
|
|
331353
|
-
},
|
|
331354
|
-
};
|
|
331355
|
-
return JSON.parse(JSON.stringify(template));
|
|
331356
|
-
}
|
|
331357
|
-
gvk() {
|
|
331358
|
-
return FirestartrGithubOrganizationSecretSection.GVK;
|
|
331359
|
-
}
|
|
331360
|
-
instanceApiObject(template) {
|
|
331361
|
-
return new FirestartrGithubOrganizationSecretSection(this, template.metadata.name, template);
|
|
331362
|
-
}
|
|
331363
|
-
}
|
|
331364
|
-
|
|
331365
330413
|
;// CONCATENATED MODULE: ../cdk8s_renderer/src/charts/github/index.ts
|
|
331366
330414
|
|
|
331367
330415
|
|
|
@@ -331369,8 +330417,6 @@ class GithubOrgSecretSectionChart extends BaseGithubChart {
|
|
|
331369
330417
|
|
|
331370
330418
|
|
|
331371
330419
|
|
|
331372
|
-
|
|
331373
|
-
|
|
331374
330420
|
;// CONCATENATED MODULE: ../cdk8s_renderer/src/charts/catalog/base.ts
|
|
331375
330421
|
|
|
331376
330422
|
class BaseCatalogChart extends BaseChart {
|
|
@@ -332118,8 +331164,6 @@ class SecretsChart extends BaseSecretsChart {
|
|
|
332118
331164
|
SecretsChart: SecretsChart,
|
|
332119
331165
|
GithubOrgWebhookChart: GithubOrgWebhookChart,
|
|
332120
331166
|
GithubOrgSettingsChart: GithubOrgSettingsChart,
|
|
332121
|
-
GithubOrgVariableSectionChart: GithubOrgVariableSectionChart,
|
|
332122
|
-
GithubOrgSecretSectionChart: GithubOrgSecretSectionChart,
|
|
332123
331167
|
});
|
|
332124
331168
|
|
|
332125
331169
|
;// CONCATENATED MODULE: ../cdk8s_renderer/src/renderer/claims-render.ts
|
|
@@ -332164,28 +331208,13 @@ async function renderClaims(catalogScope, firestartrScope, data) {
|
|
|
332164
331208
|
if (configuredProvider !== AllowedProviders.all.toString()) {
|
|
332165
331209
|
providers = providers.filter((provider) => provider === configuredProvider);
|
|
332166
331210
|
}
|
|
332167
|
-
const
|
|
332168
|
-
? 'FirestartrGithubOrganizationSettings'
|
|
332169
|
-
: undefined;
|
|
332170
|
-
const previousCR = getPreviousCRfromClaim(claim, crs, expectedKind);
|
|
332171
|
-
const variableSectionPreviousCR = claim.kind === 'OrgSettingsClaim'
|
|
332172
|
-
? getPreviousCRfromClaim({ kind: claim.kind, name: `${claim.name}-variable-section` }, crs, 'FirestartrGithubOrganizationVariableSection')
|
|
332173
|
-
: false;
|
|
332174
|
-
const secretSectionPreviousCR = claim.kind === 'OrgSettingsClaim'
|
|
332175
|
-
? getPreviousCRfromClaim({ kind: claim.kind, name: `${claim.name}-secret-section` }, crs, 'FirestartrGithubOrganizationSecretSection')
|
|
332176
|
-
: false;
|
|
331211
|
+
const previousCR = getPreviousCRfromClaim(claim, crs);
|
|
332177
331212
|
const patches = await extractPatches(renderClaims[claimKey], previousCR);
|
|
332178
|
-
let variableSectionPatches = undefined;
|
|
332179
|
-
let secretSectionPatches = undefined;
|
|
332180
|
-
if (claim.kind === 'OrgSettingsClaim') {
|
|
332181
|
-
variableSectionPatches = await extractPatches(renderClaims[claimKey], variableSectionPreviousCR);
|
|
332182
|
-
secretSectionPatches = await extractPatches(renderClaims[claimKey], secretSectionPreviousCR);
|
|
332183
|
-
}
|
|
332184
331213
|
if (!previousCR) {
|
|
332185
331214
|
logger.debug(`No CR found for claim ${claimKey}, it will be rendered from scratch`);
|
|
332186
331215
|
}
|
|
332187
331216
|
const claimPath = renderClaims[claimKey].claimPath;
|
|
332188
|
-
const { firestartrEntity, extraCharts, catalogEntity } = await renderClaim(catalogScope, firestartrScope, claim, patches, previousCR, claimPath
|
|
331217
|
+
const { firestartrEntity, extraCharts, catalogEntity } = await renderClaim(catalogScope, firestartrScope, claim, patches, previousCR, claimPath);
|
|
332189
331218
|
if (catalogEntity) {
|
|
332190
331219
|
result[`${catalogEntity.kind}-${catalogEntity.metadata.name}`] =
|
|
332191
331220
|
catalogEntity.toJson();
|
|
@@ -332214,7 +331243,7 @@ async function renderClaims(catalogScope, firestartrScope, data) {
|
|
|
332214
331243
|
}
|
|
332215
331244
|
return result;
|
|
332216
331245
|
}
|
|
332217
|
-
async function renderClaim(catalogScope, firestartrScope, claim, patches, previousCR = null, claimPath
|
|
331246
|
+
async function renderClaim(catalogScope, firestartrScope, claim, patches, previousCR = null, claimPath) {
|
|
332218
331247
|
let catalogEntity = undefined;
|
|
332219
331248
|
let firestartrEntity = undefined;
|
|
332220
331249
|
const extraCharts = [];
|
|
@@ -332362,48 +331391,6 @@ async function renderClaim(catalogScope, firestartrScope, claim, patches, previo
|
|
|
332362
331391
|
case 'OrgSettingsClaim':
|
|
332363
331392
|
if (loadGithub) {
|
|
332364
331393
|
firestartrEntity = new charts.GithubOrgSettingsChart(firestartrScope, `github-${chartId}`, firestartrId, claim, renderPatches);
|
|
332365
|
-
const variableSectionFirestartrId = variableSectionPreviousCR
|
|
332366
|
-
? variableSectionPreviousCR.spec?.firestartr?.tfStateKey
|
|
332367
|
-
: firestartrId
|
|
332368
|
-
? `${firestartrId}-variables`
|
|
332369
|
-
: null;
|
|
332370
|
-
const vsRenderPatches = variableSectionPatches
|
|
332371
|
-
? variableSectionPatches.filter((patch) => !patch.isPostPatch)
|
|
332372
|
-
: renderPatches;
|
|
332373
|
-
const vsPostPatches = variableSectionPatches
|
|
332374
|
-
? variableSectionPatches.filter((patch) => patch.isPostPatch)
|
|
332375
|
-
: postPatches;
|
|
332376
|
-
const variableSectionChart = new charts.GithubOrgVariableSectionChart(firestartrScope, `github-variables-${chartId}`, variableSectionFirestartrId, claim, vsRenderPatches);
|
|
332377
|
-
await variableSectionChart.render();
|
|
332378
|
-
const variableSectionObject = await variableSectionChart.postRenderer(vsPostPatches);
|
|
332379
|
-
extraCharts.push({
|
|
332380
|
-
claim: {
|
|
332381
|
-
kind: claim.kind,
|
|
332382
|
-
name: `${claim.name}-variable-section`,
|
|
332383
|
-
},
|
|
332384
|
-
chart: variableSectionObject,
|
|
332385
|
-
});
|
|
332386
|
-
const secretSectionFirestartrId = secretSectionPreviousCR
|
|
332387
|
-
? secretSectionPreviousCR.spec?.firestartr?.tfStateKey
|
|
332388
|
-
: firestartrId
|
|
332389
|
-
? `${firestartrId}-secrets`
|
|
332390
|
-
: null;
|
|
332391
|
-
const ssRenderPatches = secretSectionPatches
|
|
332392
|
-
? secretSectionPatches.filter((patch) => !patch.isPostPatch)
|
|
332393
|
-
: renderPatches;
|
|
332394
|
-
const ssPostPatches = secretSectionPatches
|
|
332395
|
-
? secretSectionPatches.filter((patch) => patch.isPostPatch)
|
|
332396
|
-
: postPatches;
|
|
332397
|
-
const secretSectionChart = new charts.GithubOrgSecretSectionChart(firestartrScope, `github-secrets-${chartId}`, secretSectionFirestartrId, claim, ssRenderPatches);
|
|
332398
|
-
await secretSectionChart.render();
|
|
332399
|
-
const secretSectionObject = await secretSectionChart.postRenderer(ssPostPatches);
|
|
332400
|
-
extraCharts.push({
|
|
332401
|
-
claim: {
|
|
332402
|
-
kind: claim.kind,
|
|
332403
|
-
name: `${claim.name}-secret-section`,
|
|
332404
|
-
},
|
|
332405
|
-
chart: secretSectionObject,
|
|
332406
|
-
});
|
|
332407
331394
|
}
|
|
332408
331395
|
break;
|
|
332409
331396
|
default:
|
|
@@ -332463,16 +331450,12 @@ function renameVariantCrFiles(outputDir, renderedMap) {
|
|
|
332463
331450
|
|
|
332464
331451
|
const IS_COMPONENT_CLAIM_REF = new RegExp(/^ComponentClaim-/);
|
|
332465
331452
|
const IS_TF_WORKSPACE = new RegExp(/^TFWorkspaceClaim-/);
|
|
332466
|
-
const IS_ORG_SETTINGS_CLAIM = new RegExp(/^OrgSettingsClaim-/);
|
|
332467
|
-
const COMPONENT_REF_PATTERN = /^component:(.+)$/;
|
|
332468
331453
|
function validateSubReferences(renderClaims) {
|
|
332469
331454
|
for (const ref of Object.keys(renderClaims)) {
|
|
332470
331455
|
if (IS_COMPONENT_CLAIM_REF.test(ref))
|
|
332471
331456
|
validateClaimsSecretsRefs(ref, renderClaims);
|
|
332472
331457
|
else if (IS_TF_WORKSPACE.test(ref))
|
|
332473
331458
|
validateTFClaimsSecretsRefs(ref, renderClaims);
|
|
332474
|
-
else if (IS_ORG_SETTINGS_CLAIM.test(ref))
|
|
332475
|
-
validateOrgSettingsComponentRefs(ref, renderClaims);
|
|
332476
331459
|
}
|
|
332477
331460
|
}
|
|
332478
331461
|
function validateTFClaimsSecretsRefs(ref, renderClaims) {
|
|
@@ -332524,57 +331507,6 @@ function searchSecretKey(secretClaim, key) {
|
|
|
332524
331507
|
}
|
|
332525
331508
|
return found;
|
|
332526
331509
|
}
|
|
332527
|
-
function validateOrgSettingsComponentRefs(ref, renderClaims) {
|
|
332528
|
-
const claim = renderClaims[ref].claim;
|
|
332529
|
-
validateOrgSecretsSelectedRepositories(claim, renderClaims);
|
|
332530
|
-
validateActionsVariablesSelectedRepositories(claim, renderClaims);
|
|
332531
|
-
}
|
|
332532
|
-
function validateOrgSecretsSelectedRepositories(claim, renderClaims) {
|
|
332533
|
-
const orgSecrets = claim?.providers?.github?.org_secrets;
|
|
332534
|
-
if (!orgSecrets || typeof orgSecrets !== 'object')
|
|
332535
|
-
return;
|
|
332536
|
-
for (const section of ['actions', 'codespaces', 'dependabot']) {
|
|
332537
|
-
const secrets = orgSecrets[section];
|
|
332538
|
-
if (!Array.isArray(secrets))
|
|
332539
|
-
continue;
|
|
332540
|
-
for (const secret of secrets) {
|
|
332541
|
-
if (!secret.selected_repositories)
|
|
332542
|
-
continue;
|
|
332543
|
-
for (const repoRef of secret.selected_repositories) {
|
|
332544
|
-
const match = repoRef.match(COMPONENT_REF_PATTERN);
|
|
332545
|
-
if (!match)
|
|
332546
|
-
continue;
|
|
332547
|
-
const [, componentName] = match;
|
|
332548
|
-
const expectedKey = `ComponentClaim-${componentName}`;
|
|
332549
|
-
if (!renderClaims[expectedKey]) {
|
|
332550
|
-
throw new Error(`CrossReference error: OrgSettingsClaim/${claim.name} references a non-existent component "${componentName}" in org_secrets.${section}.${secret.name}.selected_repositories`);
|
|
332551
|
-
}
|
|
332552
|
-
}
|
|
332553
|
-
}
|
|
332554
|
-
}
|
|
332555
|
-
}
|
|
332556
|
-
function validateActionsVariablesSelectedRepositories(claim, renderClaims) {
|
|
332557
|
-
const actionsVariables = claim?.providers?.github?.actions_variables;
|
|
332558
|
-
if (!Array.isArray(actionsVariables))
|
|
332559
|
-
return;
|
|
332560
|
-
for (const variable of actionsVariables) {
|
|
332561
|
-
if (variable.visibility !== 'selected')
|
|
332562
|
-
continue;
|
|
332563
|
-
const selectedRepos = variable.selected_repositories;
|
|
332564
|
-
if (!Array.isArray(selectedRepos) || selectedRepos.length === 0)
|
|
332565
|
-
continue;
|
|
332566
|
-
for (const ref of selectedRepos) {
|
|
332567
|
-
const match = ref.match(COMPONENT_REF_PATTERN);
|
|
332568
|
-
if (!match)
|
|
332569
|
-
continue;
|
|
332570
|
-
const componentName = match[1];
|
|
332571
|
-
const expectedKey = `ComponentClaim-${componentName}`;
|
|
332572
|
-
if (!renderClaims[expectedKey]) {
|
|
332573
|
-
throw new Error(`CrossReference error: OrgSettingsClaim/${claim.name} references a non-existent component "${componentName}" in actions_variables.${variable.name}.selected_repositories`);
|
|
332574
|
-
}
|
|
332575
|
-
}
|
|
332576
|
-
}
|
|
332577
|
-
}
|
|
332578
331510
|
|
|
332579
331511
|
;// CONCATENATED MODULE: ../cdk8s_renderer/src/validations/componentPagesPath.ts
|
|
332580
331512
|
/**
|
|
@@ -332623,176 +331555,6 @@ function validateGithubOrgSettingsSingleton(crs) {
|
|
|
332623
331555
|
}
|
|
332624
331556
|
}
|
|
332625
331557
|
|
|
332626
|
-
;// CONCATENATED MODULE: ../cdk8s_renderer/src/validations/githubOrgVariableSection.ts
|
|
332627
|
-
const GITHUB_ORG_VARIABLE_SECTION_KIND = 'FirestartrGithubOrganizationVariableSection';
|
|
332628
|
-
const githubOrgVariableSection_FIRESTARTR_CLAIM_REF_ANNOTATION = 'firestartr.dev/claim-ref';
|
|
332629
|
-
const githubOrgVariableSection_CLAIM_REF_LABEL = 'claim-ref';
|
|
332630
|
-
function githubOrgVariableSection_formatResourceRef(name, claimRef) {
|
|
332631
|
-
return claimRef ? `${name} (claim: ${claimRef})` : name;
|
|
332632
|
-
}
|
|
332633
|
-
function validateGithubOrgVariableSectionSingleton(crs) {
|
|
332634
|
-
const refsByOrg = new Map();
|
|
332635
|
-
const seenClaimRefs = new Map();
|
|
332636
|
-
for (const crKey of Object.keys(crs)) {
|
|
332637
|
-
const cr = crs[crKey];
|
|
332638
|
-
if (cr.kind !== GITHUB_ORG_VARIABLE_SECTION_KIND)
|
|
332639
|
-
continue;
|
|
332640
|
-
const org = cr.spec?.org;
|
|
332641
|
-
if (typeof org !== 'string' || !org)
|
|
332642
|
-
continue;
|
|
332643
|
-
const name = cr.metadata?.name || crKey;
|
|
332644
|
-
const claimRef = cr.metadata?.annotations?.[githubOrgVariableSection_FIRESTARTR_CLAIM_REF_ANNOTATION] ||
|
|
332645
|
-
cr.metadata?.labels?.[githubOrgVariableSection_CLAIM_REF_LABEL];
|
|
332646
|
-
const normalizedOrg = org.toLowerCase();
|
|
332647
|
-
if (claimRef) {
|
|
332648
|
-
const seen = seenClaimRefs.get(normalizedOrg) || new Set();
|
|
332649
|
-
if (seen.has(claimRef))
|
|
332650
|
-
continue;
|
|
332651
|
-
seen.add(claimRef);
|
|
332652
|
-
seenClaimRefs.set(normalizedOrg, seen);
|
|
332653
|
-
}
|
|
332654
|
-
const refs = refsByOrg.get(normalizedOrg) || [];
|
|
332655
|
-
refs.push(githubOrgVariableSection_formatResourceRef(name, claimRef));
|
|
332656
|
-
refsByOrg.set(normalizedOrg, refs);
|
|
332657
|
-
}
|
|
332658
|
-
for (const [org, refs] of refsByOrg.entries()) {
|
|
332659
|
-
if (refs.length < 2)
|
|
332660
|
-
continue;
|
|
332661
|
-
throw new Error(`Duplicate ${GITHUB_ORG_VARIABLE_SECTION_KIND} resources found for GitHub organization "${org}": ${refs.join(', ')}`);
|
|
332662
|
-
}
|
|
332663
|
-
}
|
|
332664
|
-
function validateActionsVariablesUniqueness(crs) {
|
|
332665
|
-
for (const crKey of Object.keys(crs)) {
|
|
332666
|
-
const cr = crs[crKey];
|
|
332667
|
-
if (cr.kind !== GITHUB_ORG_VARIABLE_SECTION_KIND)
|
|
332668
|
-
continue;
|
|
332669
|
-
const actionsVariables = cr.spec?.actionsVariables;
|
|
332670
|
-
if (!Array.isArray(actionsVariables))
|
|
332671
|
-
continue;
|
|
332672
|
-
const names = new Set();
|
|
332673
|
-
for (const variable of actionsVariables) {
|
|
332674
|
-
const varName = variable?.name;
|
|
332675
|
-
if (!varName)
|
|
332676
|
-
continue;
|
|
332677
|
-
if (names.has(varName)) {
|
|
332678
|
-
const org = cr.spec?.org || 'unknown';
|
|
332679
|
-
throw new Error(`Duplicate action variable name "${varName}" found in ${GITHUB_ORG_VARIABLE_SECTION_KIND} for organization "${org}"`);
|
|
332680
|
-
}
|
|
332681
|
-
names.add(varName);
|
|
332682
|
-
}
|
|
332683
|
-
}
|
|
332684
|
-
}
|
|
332685
|
-
|
|
332686
|
-
;// CONCATENATED MODULE: ../cdk8s_renderer/src/validations/githubOrgSecretSection.ts
|
|
332687
|
-
const GITHUB_ORG_SECRET_SECTION_KIND = 'FirestartrGithubOrganizationSecretSection';
|
|
332688
|
-
const githubOrgSecretSection_FIRESTARTR_CLAIM_REF_ANNOTATION = 'firestartr.dev/claim-ref';
|
|
332689
|
-
const githubOrgSecretSection_CLAIM_REF_LABEL = 'claim-ref';
|
|
332690
|
-
const SECRETS_CLAIM_REF_PATTERN = /^ref:secretsclaim:([a-zA-Z0-9_-]+):([a-zA-Z0-9_-]+)$/;
|
|
332691
|
-
function githubOrgSecretSection_formatResourceRef(name, claimRef) {
|
|
332692
|
-
return claimRef ? `${name} (claim: ${claimRef})` : name;
|
|
332693
|
-
}
|
|
332694
|
-
function validateGithubOrgSecretSectionSingleton(crs) {
|
|
332695
|
-
const refsByOrg = new Map();
|
|
332696
|
-
const seenClaimRefs = new Map();
|
|
332697
|
-
for (const crKey of Object.keys(crs)) {
|
|
332698
|
-
const cr = crs[crKey];
|
|
332699
|
-
if (cr.kind !== GITHUB_ORG_SECRET_SECTION_KIND)
|
|
332700
|
-
continue;
|
|
332701
|
-
const org = cr.spec?.org;
|
|
332702
|
-
if (typeof org !== 'string' || !org)
|
|
332703
|
-
continue;
|
|
332704
|
-
const name = cr.metadata?.name || crKey;
|
|
332705
|
-
const claimRef = cr.metadata?.annotations?.[githubOrgSecretSection_FIRESTARTR_CLAIM_REF_ANNOTATION] ||
|
|
332706
|
-
cr.metadata?.labels?.[githubOrgSecretSection_CLAIM_REF_LABEL];
|
|
332707
|
-
const normalizedOrg = org.toLowerCase();
|
|
332708
|
-
if (claimRef) {
|
|
332709
|
-
const seen = seenClaimRefs.get(normalizedOrg) || new Set();
|
|
332710
|
-
if (seen.has(claimRef))
|
|
332711
|
-
continue;
|
|
332712
|
-
seen.add(claimRef);
|
|
332713
|
-
seenClaimRefs.set(normalizedOrg, seen);
|
|
332714
|
-
}
|
|
332715
|
-
const refs = refsByOrg.get(normalizedOrg) || [];
|
|
332716
|
-
refs.push(githubOrgSecretSection_formatResourceRef(name, claimRef));
|
|
332717
|
-
refsByOrg.set(normalizedOrg, refs);
|
|
332718
|
-
}
|
|
332719
|
-
for (const [org, refs] of refsByOrg.entries()) {
|
|
332720
|
-
if (refs.length < 2)
|
|
332721
|
-
continue;
|
|
332722
|
-
throw new Error(`Duplicate ${GITHUB_ORG_SECRET_SECTION_KIND} resources found for GitHub organization "${org}": ${refs.join(', ')}`);
|
|
332723
|
-
}
|
|
332724
|
-
}
|
|
332725
|
-
function validateSecretNamesUniqueness(crs) {
|
|
332726
|
-
for (const crKey of Object.keys(crs)) {
|
|
332727
|
-
const cr = crs[crKey];
|
|
332728
|
-
if (cr.kind !== GITHUB_ORG_SECRET_SECTION_KIND)
|
|
332729
|
-
continue;
|
|
332730
|
-
const secrets = cr.spec?.secrets;
|
|
332731
|
-
if (!secrets || typeof secrets !== 'object')
|
|
332732
|
-
continue;
|
|
332733
|
-
for (const section of ['actions', 'codespaces', 'dependabot']) {
|
|
332734
|
-
const sectionSecrets = secrets[section];
|
|
332735
|
-
if (!Array.isArray(sectionSecrets))
|
|
332736
|
-
continue;
|
|
332737
|
-
const names = new Set();
|
|
332738
|
-
for (const secret of sectionSecrets) {
|
|
332739
|
-
const secretName = secret?.name;
|
|
332740
|
-
if (!secretName)
|
|
332741
|
-
continue;
|
|
332742
|
-
if (names.has(secretName)) {
|
|
332743
|
-
const org = cr.spec?.org || 'unknown';
|
|
332744
|
-
throw new Error(`Duplicate secret name "${secretName}" found in ${section} section of ${GITHUB_ORG_SECRET_SECTION_KIND} for organization "${org}"`);
|
|
332745
|
-
}
|
|
332746
|
-
names.add(secretName);
|
|
332747
|
-
}
|
|
332748
|
-
}
|
|
332749
|
-
}
|
|
332750
|
-
}
|
|
332751
|
-
function validateOrgSecretsCrossReferences(renderClaims) {
|
|
332752
|
-
for (const claimKey of Object.keys(renderClaims)) {
|
|
332753
|
-
if (!claimKey.startsWith('OrgSettingsClaim-'))
|
|
332754
|
-
continue;
|
|
332755
|
-
const claimData = renderClaims[claimKey];
|
|
332756
|
-
const claim = claimData?.claim;
|
|
332757
|
-
const orgSecrets = claim?.providers?.github?.org_secrets;
|
|
332758
|
-
if (!orgSecrets || typeof orgSecrets !== 'object')
|
|
332759
|
-
continue;
|
|
332760
|
-
for (const section of ['actions', 'codespaces', 'dependabot']) {
|
|
332761
|
-
const secrets = orgSecrets[section];
|
|
332762
|
-
if (!Array.isArray(secrets))
|
|
332763
|
-
continue;
|
|
332764
|
-
for (const secret of secrets) {
|
|
332765
|
-
if (!secret.value)
|
|
332766
|
-
continue;
|
|
332767
|
-
const match = secret.value.match(SECRETS_CLAIM_REF_PATTERN);
|
|
332768
|
-
if (!match)
|
|
332769
|
-
continue;
|
|
332770
|
-
const [, secretClaimName, secretKey] = match;
|
|
332771
|
-
const expectedKey = `SecretsClaim-${secretClaimName}`;
|
|
332772
|
-
if (!renderClaims[expectedKey])
|
|
332773
|
-
continue;
|
|
332774
|
-
const secretClaim = renderClaims[expectedKey]?.claim;
|
|
332775
|
-
const externalSecrets = secretClaim?.providers?.external_secrets?.externalSecrets?.secrets;
|
|
332776
|
-
const pushSecrets = secretClaim?.providers?.external_secrets?.pushSecrets;
|
|
332777
|
-
let keyFound = false;
|
|
332778
|
-
if (Array.isArray(pushSecrets)) {
|
|
332779
|
-
keyFound =
|
|
332780
|
-
pushSecrets.find((s) => s.secretName === secretKey) !==
|
|
332781
|
-
undefined;
|
|
332782
|
-
}
|
|
332783
|
-
if (!keyFound && Array.isArray(externalSecrets)) {
|
|
332784
|
-
keyFound =
|
|
332785
|
-
externalSecrets.find((s) => s.secretName === secretKey) !==
|
|
332786
|
-
undefined;
|
|
332787
|
-
}
|
|
332788
|
-
if (!keyFound) {
|
|
332789
|
-
throw new Error(`CrossReference error: OrgSettingsClaim/${claim.name} references a non-existent secret key "${secretKey}" in SecretsClaim/${secretClaimName} via org_secrets.${section}.${secret.name}`);
|
|
332790
|
-
}
|
|
332791
|
-
}
|
|
332792
|
-
}
|
|
332793
|
-
}
|
|
332794
|
-
}
|
|
332795
|
-
|
|
332796
331558
|
;// CONCATENATED MODULE: ../cdk8s_renderer/src/renderer/renderer.ts
|
|
332797
331559
|
|
|
332798
331560
|
|
|
@@ -332803,8 +331565,6 @@ function validateOrgSecretsCrossReferences(renderClaims) {
|
|
|
332803
331565
|
|
|
332804
331566
|
|
|
332805
331567
|
|
|
332806
|
-
|
|
332807
|
-
|
|
332808
331568
|
/*
|
|
332809
331569
|
* Function called when rendering but not importing
|
|
332810
331570
|
*
|
|
@@ -332826,13 +331586,8 @@ async function renderer_render(catalogScope, firestartrScope, claimList) {
|
|
|
332826
331586
|
try {
|
|
332827
331587
|
validateSubReferences(data.renderClaims);
|
|
332828
331588
|
validateComponentPagesPath(data.renderClaims);
|
|
332829
|
-
validateOrgSecretsCrossReferences(data.renderClaims);
|
|
332830
331589
|
validateTfStateKeyUniqueness(result);
|
|
332831
331590
|
validateGithubOrgSettingsSingleton(fullCrSet);
|
|
332832
|
-
validateGithubOrgVariableSectionSingleton(fullCrSet);
|
|
332833
|
-
validateActionsVariablesUniqueness(result);
|
|
332834
|
-
validateGithubOrgSecretSectionSingleton(fullCrSet);
|
|
332835
|
-
validateSecretNamesUniqueness(result);
|
|
332836
331591
|
validateCrSizes(result);
|
|
332837
331592
|
validatePermissionsUniqueness(result);
|
|
332838
331593
|
}
|
|
@@ -335164,7 +333919,6 @@ const kindPluralMap = {
|
|
|
335164
333919
|
terraformmodules: 'FirestartrTerraformModule',
|
|
335165
333920
|
githuborgwebhooks: 'FirestartrGithubOrgWebhook',
|
|
335166
333921
|
githuborganizationsettings: 'FirestartrGithubOrganizationSettings',
|
|
335167
|
-
githuborganizationvariablesections: 'FirestartrGithubOrganizationVariableSection',
|
|
335168
333922
|
terraformworkspaces: 'FirestartrTerraformWorkspace',
|
|
335169
333923
|
terraformworkspaceplans: 'FirestartrTerraformWorkspacePlan',
|
|
335170
333924
|
providerconfigs: 'FirestartrProviderConfig',
|
|
@@ -337142,7 +335896,6 @@ const kindsWithFinalizer = [
|
|
|
337142
335896
|
'FirestartrGithubRepositoryFeature',
|
|
337143
335897
|
'FirestartrGithubOrgWebhook',
|
|
337144
335898
|
'FirestartrGithubOrganizationSettings',
|
|
337145
|
-
'FirestartrGithubOrganizationVariableSection',
|
|
337146
335899
|
'FirestartrGithubRepositorySecretsSection',
|
|
337147
335900
|
];
|
|
337148
335901
|
const kindsWithDependants = [
|
|
@@ -343684,10 +342437,6 @@ const MODULES = {
|
|
|
343684
342437
|
// github-org-settings-v0.1.0
|
|
343685
342438
|
ref: 'c30c5dfdaddf2bca9e966a726d45970c98576e9e',
|
|
343686
342439
|
},
|
|
343687
|
-
FirestartrGithubOrganizationVariableSection: {
|
|
343688
|
-
module: 'git::https://github.com/prefapp/tfm.git//modules/github-org-variables-section',
|
|
343689
|
-
ref: '79c1407',
|
|
343690
|
-
},
|
|
343691
342440
|
};
|
|
343692
342441
|
function getFirestartrDefaultTFM(kind) {
|
|
343693
342442
|
if (kind in MODULES) {
|
|
@@ -345490,94 +344239,6 @@ class EntityGHOrgSettings extends base_Entity {
|
|
|
345490
344239
|
}
|
|
345491
344240
|
}
|
|
345492
344241
|
|
|
345493
|
-
;// CONCATENATED MODULE: ../gh_provisioner/src/entities/ghorgvarsection/index.ts
|
|
345494
|
-
|
|
345495
|
-
|
|
345496
|
-
|
|
345497
|
-
class EntityGHOrgVarsSection extends base_Entity {
|
|
345498
|
-
constructor(artifact) {
|
|
345499
|
-
super(artifact, {
|
|
345500
|
-
config: {
|
|
345501
|
-
variables: {},
|
|
345502
|
-
},
|
|
345503
|
-
});
|
|
345504
|
-
}
|
|
345505
|
-
async loadResources(tfOp) {
|
|
345506
|
-
gh_provisioner_src_logger.info(`[gh-provisioner] running ${tfOp} on ${this.k8sId}`);
|
|
345507
|
-
try {
|
|
345508
|
-
const cr = this.cr;
|
|
345509
|
-
const actionsVariables = cr.spec.actionsVariables || [];
|
|
345510
|
-
const variables = {};
|
|
345511
|
-
for (const v of actionsVariables) {
|
|
345512
|
-
const entry = {
|
|
345513
|
-
value: v.value,
|
|
345514
|
-
visibility: v.visibility,
|
|
345515
|
-
};
|
|
345516
|
-
if (v.visibility === 'selected' && v.selectedRepositories) {
|
|
345517
|
-
entry.selectedRepositoryIds = v.selectedRepositories;
|
|
345518
|
-
}
|
|
345519
|
-
variables[v.name] = entry;
|
|
345520
|
-
}
|
|
345521
|
-
this.patchData({
|
|
345522
|
-
op: PatchOperations.replace,
|
|
345523
|
-
path: '/config/variables',
|
|
345524
|
-
value: variables,
|
|
345525
|
-
});
|
|
345526
|
-
if (tfOp === 'apply') {
|
|
345527
|
-
await this.adoptVariablesIfNeeded(actionsVariables);
|
|
345528
|
-
}
|
|
345529
|
-
gh_provisioner_src_logger.debug(`[gh-provisioner] ${this.k8sId} loaded its data`);
|
|
345530
|
-
}
|
|
345531
|
-
catch (err) {
|
|
345532
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
345533
|
-
gh_provisioner_src_logger.error(`[gh-provisioner] ${this.k8sId} error loading resources: ${message}`);
|
|
345534
|
-
throw new Error(`[gh-provisioner] ${this.k8sId} error loading resources: ${message}`);
|
|
345535
|
-
}
|
|
345536
|
-
}
|
|
345537
|
-
async adoptVariablesIfNeeded(declaredVars) {
|
|
345538
|
-
const cr = this.cr;
|
|
345539
|
-
const managedVariables = this.cr.fResolveSelfOutputs('managed_variables') || [];
|
|
345540
|
-
const declaredNames = declaredVars.map((v) => v.name);
|
|
345541
|
-
const newToModule = declaredNames.filter((name) => !managedVariables.includes(name));
|
|
345542
|
-
if (newToModule.length === 0) {
|
|
345543
|
-
gh_provisioner_src_logger.debug(`[gh-provisioner] ${this.k8sId} all declared variables are already managed, no adoption needed`);
|
|
345544
|
-
return;
|
|
345545
|
-
}
|
|
345546
|
-
if (managedVariables.length === 0) {
|
|
345547
|
-
gh_provisioner_src_logger.info(`[gh-provisioner] ${this.k8sId} no managed_variables output — first reconciliation, treating all ${newToModule.length} declared variable(s) as new to module`);
|
|
345548
|
-
}
|
|
345549
|
-
for (const varName of newToModule) {
|
|
345550
|
-
try {
|
|
345551
|
-
await this.runWithGithubProvider(async () => {
|
|
345552
|
-
await github["default"].org.getOrgVariable(cr.spec.org, varName);
|
|
345553
|
-
});
|
|
345554
|
-
gh_provisioner_src_logger.info(`[gh-provisioner] ${this.k8sId} adopting pre-existing variable '${varName}' on GitHub org '${cr.spec.org}'`);
|
|
345555
|
-
this.patchImportData({
|
|
345556
|
-
op: PatchOperations.add,
|
|
345557
|
-
path: '/imports/-',
|
|
345558
|
-
value: {
|
|
345559
|
-
to: `github_actions_organization_variable.this["${varName}"]`,
|
|
345560
|
-
id: varName,
|
|
345561
|
-
},
|
|
345562
|
-
});
|
|
345563
|
-
}
|
|
345564
|
-
catch (err) {
|
|
345565
|
-
if (err && err.status === 404) {
|
|
345566
|
-
gh_provisioner_src_logger.info(`[gh-provisioner] ${this.k8sId} variable '${varName}' not found on GitHub org '${cr.spec.org}' — will be created by TFM`);
|
|
345567
|
-
}
|
|
345568
|
-
else if (err && (err.status === 401 || err.status === 403)) {
|
|
345569
|
-
gh_provisioner_src_logger.warn(`[gh-provisioner] ${this.k8sId} token lacks scope to check variable '${varName}' on org '${cr.spec.org}' — skipping adoption gracefully`);
|
|
345570
|
-
}
|
|
345571
|
-
else {
|
|
345572
|
-
gh_provisioner_src_logger.error(`[gh-provisioner] ${this.k8sId} unexpected error checking variable '${varName}' on org '${cr.spec.org}': ${err instanceof Error ? err.message : String(err)}`);
|
|
345573
|
-
}
|
|
345574
|
-
}
|
|
345575
|
-
}
|
|
345576
|
-
}
|
|
345577
|
-
async postProvision(tfOp) { }
|
|
345578
|
-
async loadAddressesToImport() { }
|
|
345579
|
-
}
|
|
345580
|
-
|
|
345581
344242
|
;// CONCATENATED MODULE: ../gh_provisioner/src/entities/ghorgwebhook/index.ts
|
|
345582
344243
|
|
|
345583
344244
|
|
|
@@ -345654,7 +344315,6 @@ class EntityGHOrgWebHook extends base_Entity {
|
|
|
345654
344315
|
|
|
345655
344316
|
|
|
345656
344317
|
|
|
345657
|
-
|
|
345658
344318
|
function entities_getEntity(cr) {
|
|
345659
344319
|
const entityClass = getEntityClass(cr.kind);
|
|
345660
344320
|
return new entityClass(cr);
|
|
@@ -345675,8 +344335,6 @@ function getEntityClass(kind) {
|
|
|
345675
344335
|
return EntityGHOrgWebHook;
|
|
345676
344336
|
case 'FirestartrGithubOrganizationSettings':
|
|
345677
344337
|
return EntityGHOrgSettings;
|
|
345678
|
-
case 'FirestartrGithubOrganizationVariableSection':
|
|
345679
|
-
return EntityGHOrgVarsSection;
|
|
345680
344338
|
default:
|
|
345681
344339
|
throw new Error(`kind ${kind} has no entity associated`);
|
|
345682
344340
|
}
|
|
@@ -346090,7 +344748,6 @@ const GITHUB_RESOURCE_KINDS = [
|
|
|
346090
344748
|
'FirestartrGithubRepositorySecretsSection',
|
|
346091
344749
|
'FirestartrGithubOrgWebhook',
|
|
346092
344750
|
'FirestartrGithubOrganizationSettings',
|
|
346093
|
-
'FirestartrGithubOrganizationVariableSection',
|
|
346094
344751
|
];
|
|
346095
344752
|
const GITHUB_REPOSITORY_DEPENDENT_KINDS = [
|
|
346096
344753
|
'FirestartrGithubRepositoryFeature',
|
|
@@ -347349,9 +346006,6 @@ function isObserveModeActive() {
|
|
|
347349
346006
|
function runOperator(opts) {
|
|
347350
346007
|
const { ignoreLease, dummyExec, namespace, kindList, importMode, importModeSkipPlan, observeMode, withMetrics, } = opts;
|
|
347351
346008
|
const implementedKinds = filterImplementedKinds(kindList);
|
|
347352
|
-
operator_src_logger.info(`operator kindList: ${JSON.stringify(kindList)}`);
|
|
347353
|
-
operator_src_logger.info(`operator implementedKinds: ${JSON.stringify(implementedKinds)}`);
|
|
347354
|
-
operator_src_logger.info(`operator ignoring kinds: ${JSON.stringify(kindList.filter((k) => !implementedKinds.includes(k)))}`);
|
|
347355
346009
|
if (observeMode)
|
|
347356
346010
|
observeModeActive = true;
|
|
347357
346011
|
if (withMetrics)
|
|
@@ -347425,7 +346079,6 @@ const provisionImplementations = {
|
|
|
347425
346079
|
githubmemberships: process_operation_processOperation,
|
|
347426
346080
|
githuborgwebhooks: process_operation_processOperation,
|
|
347427
346081
|
githuborganizationsettings: process_operation_processOperation,
|
|
347428
|
-
githuborganizationvariablesections: process_operation_processOperation,
|
|
347429
346082
|
fsdummiesa: processFirestartrDummies,
|
|
347430
346083
|
fsdummiesb: processFirestartrDummies,
|
|
347431
346084
|
fsdummiesc: processFirestartrDummies,
|
|
@@ -526244,7 +524897,7 @@ const crsStatusSubcommand = {
|
|
|
526244
524897
|
};
|
|
526245
524898
|
|
|
526246
524899
|
;// CONCATENATED MODULE: ./package.json
|
|
526247
|
-
const package_namespaceObject = JSON.parse('{"i8":"2.10.0-snapshot-
|
|
524900
|
+
const package_namespaceObject = JSON.parse('{"i8":"2.10.0-snapshot-force-rebuild-refs-2"}');
|
|
526248
524901
|
;// CONCATENATED MODULE: ../../package.json
|
|
526249
524902
|
const package_namespaceObject_1 = {"i8":"2.9.0"};
|
|
526250
524903
|
// EXTERNAL MODULE: ../../node_modules/semver/index.js
|