@firestartr/cli 1.49.0-snapshot-6 → 1.49.0-snapshot-8
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 +447 -48
- package/build/packages/cdk8s_renderer/imports/firestartr.dev.d.ts +336 -0
- package/build/packages/cdk8s_renderer/src/charts/github/repositoryChart.d.ts +15 -0
- package/build/packages/cdk8s_renderer/src/refsSorter/refsExtractor.d.ts +1 -0
- package/build/packages/cdk8s_renderer/src/utils/repositoryClaimUtils.d.ts +42 -0
- package/build/packages/operator/src/utils/index.d.ts +2 -0
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -165028,7 +165028,7 @@ __exportStar(__nccwpck_require__(58898), exports);
|
|
|
165028
165028
|
__exportStar(__nccwpck_require__(17419), exports);
|
|
165029
165029
|
__exportStar(__nccwpck_require__(70161), exports);
|
|
165030
165030
|
__exportStar(__nccwpck_require__(55079), exports);
|
|
165031
|
-
__exportStar(__nccwpck_require__(
|
|
165031
|
+
__exportStar(__nccwpck_require__(39477), exports);
|
|
165032
165032
|
__exportStar(__nccwpck_require__(34311), exports);
|
|
165033
165033
|
__exportStar(__nccwpck_require__(88740), exports);
|
|
165034
165034
|
__exportStar(__nccwpck_require__(15023), exports);
|
|
@@ -166666,7 +166666,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
166666
166666
|
exports.TerraformModule = void 0;
|
|
166667
166667
|
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
|
|
166668
166668
|
const terraform_element_1 = __nccwpck_require__(70161);
|
|
166669
|
-
const terraform_provider_1 = __nccwpck_require__(
|
|
166669
|
+
const terraform_provider_1 = __nccwpck_require__(39477);
|
|
166670
166670
|
const util_1 = __nccwpck_require__(79751);
|
|
166671
166671
|
const tokens_1 = __nccwpck_require__(58898);
|
|
166672
166672
|
const tfExpression_1 = __nccwpck_require__(75754);
|
|
@@ -166985,7 +166985,7 @@ TerraformOutput[_a] = { fqn: "cdktf.TerraformOutput", version: "0.19.2" };
|
|
|
166985
166985
|
|
|
166986
166986
|
/***/ }),
|
|
166987
166987
|
|
|
166988
|
-
/***/
|
|
166988
|
+
/***/ 39477:
|
|
166989
166989
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
166990
166990
|
|
|
166991
166991
|
|
|
@@ -167539,7 +167539,7 @@ const constructs_1 = __nccwpck_require__(38794);
|
|
|
167539
167539
|
const _tokens_1 = __nccwpck_require__(9074);
|
|
167540
167540
|
const terraform_element_1 = __nccwpck_require__(70161);
|
|
167541
167541
|
const util_1 = __nccwpck_require__(79751);
|
|
167542
|
-
const terraform_provider_1 = __nccwpck_require__(
|
|
167542
|
+
const terraform_provider_1 = __nccwpck_require__(39477);
|
|
167543
167543
|
const local_backend_1 = __nccwpck_require__(31797);
|
|
167544
167544
|
const tfExpression_1 = __nccwpck_require__(75754);
|
|
167545
167545
|
const terraform_output_1 = __nccwpck_require__(15023);
|
|
@@ -170929,7 +170929,7 @@ exports.ValidateProviderPresence = void 0;
|
|
|
170929
170929
|
// Copyright (c) HashiCorp, Inc
|
|
170930
170930
|
// SPDX-License-Identifier: MPL-2.0
|
|
170931
170931
|
const constructs_1 = __nccwpck_require__(38794);
|
|
170932
|
-
const terraform_provider_1 = __nccwpck_require__(
|
|
170932
|
+
const terraform_provider_1 = __nccwpck_require__(39477);
|
|
170933
170933
|
const terraform_resource_1 = __nccwpck_require__(34311);
|
|
170934
170934
|
const terraform_data_source_1 = __nccwpck_require__(88740);
|
|
170935
170935
|
const terraform_stack_1 = __nccwpck_require__(17419);
|
|
@@ -298091,6 +298091,7 @@ async function createOrphanBranch(repo, branch, owner = 'prefapp') {
|
|
|
298091
298091
|
;// CONCATENATED MODULE: ../github/src/check_run.ts
|
|
298092
298092
|
|
|
298093
298093
|
|
|
298094
|
+
|
|
298094
298095
|
const FLUSH_TIMEOUT = 4; // seconds
|
|
298095
298096
|
const GITHUB_OUTPUT_TEXT_LIMIT = 65000; // ~65k hard limit for output.text
|
|
298096
298097
|
/**
|
|
@@ -298227,6 +298228,9 @@ class GithubCheckRun {
|
|
|
298227
298228
|
});
|
|
298228
298229
|
this.closed = true;
|
|
298229
298230
|
}
|
|
298231
|
+
catch (e) {
|
|
298232
|
+
github_src_logger.error(e);
|
|
298233
|
+
}
|
|
298230
298234
|
finally {
|
|
298231
298235
|
this.closing = false;
|
|
298232
298236
|
}
|
|
@@ -299357,6 +299361,25 @@ function resolveCodeownersRef(ref, org) {
|
|
|
299357
299361
|
}
|
|
299358
299362
|
return result;
|
|
299359
299363
|
}
|
|
299364
|
+
const IS_SECRET_REF = new RegExp(/^ref:secretsclaim:([a-zA-Z0-9_-]+):([a-zA-Z0-9_-]+)$/);
|
|
299365
|
+
function isRepoSecretRef(suspectedRef) {
|
|
299366
|
+
return IS_SECRET_REF.test(suspectedRef);
|
|
299367
|
+
}
|
|
299368
|
+
function extractRepoSecretRef(ref) {
|
|
299369
|
+
if (!IS_SECRET_REF.test(ref)) {
|
|
299370
|
+
throw new Error(`extractRepoSecretRef: ref not valid ${ref}`);
|
|
299371
|
+
}
|
|
299372
|
+
const parts = ref.split(':');
|
|
299373
|
+
const secretKind = parts[1];
|
|
299374
|
+
if (secretKind !== 'secretsclaim') {
|
|
299375
|
+
throw new Error(`extractRepoSecretRef: Invalid secret kind ${secretKind}`);
|
|
299376
|
+
}
|
|
299377
|
+
return {
|
|
299378
|
+
kind: secretKind,
|
|
299379
|
+
name: parts[2],
|
|
299380
|
+
key: parts[3],
|
|
299381
|
+
};
|
|
299382
|
+
}
|
|
299360
299383
|
|
|
299361
299384
|
;// CONCATENATED MODULE: ../cdk8s_renderer/src/overriders/base.ts
|
|
299362
299385
|
|
|
@@ -300682,6 +300705,7 @@ const NORMALIZERS = [
|
|
|
300682
300705
|
|
|
300683
300706
|
|
|
300684
300707
|
|
|
300708
|
+
|
|
300685
300709
|
const kindMap = {
|
|
300686
300710
|
user: 'UserClaim',
|
|
300687
300711
|
group: 'GroupClaim',
|
|
@@ -300735,6 +300759,11 @@ function extractAllRefs(claimData) {
|
|
|
300735
300759
|
refs.push(...groupRefs);
|
|
300736
300760
|
break;
|
|
300737
300761
|
}
|
|
300762
|
+
case 'ComponentClaim': {
|
|
300763
|
+
const secretsRefs = getComponentVarsAndSecretsRefs(parsedClaim);
|
|
300764
|
+
refs.push(...secretsRefs);
|
|
300765
|
+
break;
|
|
300766
|
+
}
|
|
300738
300767
|
}
|
|
300739
300768
|
cdk8s_renderer_src_logger.info(`Refs for ${parsedClaim.kind}-${parsedClaim.name}: ${[...new Set(refs)].join(',')}`);
|
|
300740
300769
|
return [...new Set(refs)];
|
|
@@ -300781,6 +300810,33 @@ function getTfWorkspacesRefs(values, references = []) {
|
|
|
300781
300810
|
}
|
|
300782
300811
|
return references;
|
|
300783
300812
|
}
|
|
300813
|
+
function getComponentVarsAndSecretsRefs(parsedClaim) {
|
|
300814
|
+
const refs = {};
|
|
300815
|
+
const githubProvider = parsedClaim.providers?.github;
|
|
300816
|
+
if (githubProvider) {
|
|
300817
|
+
const varsBlock = githubProvider.vars;
|
|
300818
|
+
const secretsBlock = githubProvider.secrets;
|
|
300819
|
+
if (varsBlock) {
|
|
300820
|
+
for (const block of Object.keys(varsBlock)) {
|
|
300821
|
+
for (const refVar of varsBlock[block]) {
|
|
300822
|
+
if (isRepoSecretRef(refVar.value)) {
|
|
300823
|
+
const secretRef = extractRepoSecretRef(refVar.value);
|
|
300824
|
+
refs[`SecretsClaim-${secretRef.name}`] = true;
|
|
300825
|
+
}
|
|
300826
|
+
}
|
|
300827
|
+
}
|
|
300828
|
+
}
|
|
300829
|
+
if (secretsBlock) {
|
|
300830
|
+
for (const block of Object.keys(secretsBlock)) {
|
|
300831
|
+
for (const secret of secretsBlock[block]) {
|
|
300832
|
+
const secretRef = extractRepoSecretRef(secret.value);
|
|
300833
|
+
refs[`SecretsClaim-${secretRef.name}`] = true;
|
|
300834
|
+
}
|
|
300835
|
+
}
|
|
300836
|
+
}
|
|
300837
|
+
}
|
|
300838
|
+
return Object.keys(refs);
|
|
300839
|
+
}
|
|
300784
300840
|
function getClaimReferences(claim) {
|
|
300785
300841
|
const headerRegex = catalog_common.types.regex.YAMLHeaderRegex;
|
|
300786
300842
|
const multilineRegex = catalog_common.types.regex.YAMLMultilineRegex;
|
|
@@ -301555,7 +301611,7 @@ const external_node_child_process_namespaceObject = __WEBPACK_EXTERNAL_createReq
|
|
|
301555
301611
|
$id: 'firestartr.dev://github/GithubComponentClaimSecretRef',
|
|
301556
301612
|
type: 'string',
|
|
301557
301613
|
description: 'the reference of the secret',
|
|
301558
|
-
pattern: '^ref:
|
|
301614
|
+
pattern: '^ref:secretsclaim:([a-zA-Z0-9_-]+):([a-zA-Z0-9_-]+)$',
|
|
301559
301615
|
},
|
|
301560
301616
|
GithubComponentClaimRepoSecret: {
|
|
301561
301617
|
$id: 'firestartr.dev://github/GithubComponentClaimRepoSecret',
|
|
@@ -305318,6 +305374,8 @@ function toJson_FirestartrGithubRepositorySpec(obj) {
|
|
|
305318
305374
|
'actions': toJson_FirestartrGithubRepositorySpecActions(obj.actions),
|
|
305319
305375
|
'pages': toJson_FirestartrGithubRepositorySpecPages(obj.pages),
|
|
305320
305376
|
'permissions': obj.permissions?.map(y => toJson_FirestartrGithubRepositorySpecPermissions(y)),
|
|
305377
|
+
'secrets': toJson_FirestartrGithubRepositorySpecSecrets(obj.secrets),
|
|
305378
|
+
'vars': toJson_FirestartrGithubRepositorySpecVars(obj.vars),
|
|
305321
305379
|
'branchProtections': obj.branchProtections?.map(y => toJson_FirestartrGithubRepositorySpecBranchProtections(y)),
|
|
305322
305380
|
'writeConnectionSecretToRef': toJson_FirestartrGithubRepositorySpecWriteConnectionSecretToRef(obj.writeConnectionSecretToRef),
|
|
305323
305381
|
};
|
|
@@ -305428,6 +305486,39 @@ function toJson_FirestartrGithubRepositorySpecPermissions(obj) {
|
|
|
305428
305486
|
// filter undefined values
|
|
305429
305487
|
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
305430
305488
|
}
|
|
305489
|
+
/**
|
|
305490
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecSecrets' to JSON representation.
|
|
305491
|
+
*/
|
|
305492
|
+
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
305493
|
+
function toJson_FirestartrGithubRepositorySpecSecrets(obj) {
|
|
305494
|
+
if (obj === undefined) {
|
|
305495
|
+
return undefined;
|
|
305496
|
+
}
|
|
305497
|
+
const result = {
|
|
305498
|
+
'actions': obj.actions?.map(y => toJson_FirestartrGithubRepositorySpecSecretsActions(y)),
|
|
305499
|
+
'codespaces': obj.codespaces?.map(y => toJson_FirestartrGithubRepositorySpecSecretsCodespaces(y)),
|
|
305500
|
+
'copilot': obj.copilot?.map(y => toJson_FirestartrGithubRepositorySpecSecretsCopilot(y)),
|
|
305501
|
+
};
|
|
305502
|
+
// filter undefined values
|
|
305503
|
+
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
305504
|
+
}
|
|
305505
|
+
/**
|
|
305506
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecVars' to JSON representation.
|
|
305507
|
+
*/
|
|
305508
|
+
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
305509
|
+
function toJson_FirestartrGithubRepositorySpecVars(obj) {
|
|
305510
|
+
if (obj === undefined) {
|
|
305511
|
+
return undefined;
|
|
305512
|
+
}
|
|
305513
|
+
const result = {
|
|
305514
|
+
'variableItemSchema': toJson_FirestartrGithubRepositorySpecVarsVariableItemSchema(obj.variableItemSchema),
|
|
305515
|
+
'actions': obj.actions?.map(y => toJson_FirestartrGithubRepositorySpecVarsActions(y)),
|
|
305516
|
+
'dependabot': obj.dependabot?.map(y => toJson_FirestartrGithubRepositorySpecVarsDependabot(y)),
|
|
305517
|
+
'codespaces': obj.codespaces?.map(y => toJson_FirestartrGithubRepositorySpecVarsCodespaces(y)),
|
|
305518
|
+
};
|
|
305519
|
+
// filter undefined values
|
|
305520
|
+
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
305521
|
+
}
|
|
305431
305522
|
/**
|
|
305432
305523
|
* Converts an object of type 'FirestartrGithubRepositorySpecBranchProtections' to JSON representation.
|
|
305433
305524
|
*/
|
|
@@ -305580,6 +305671,115 @@ function toJson_FirestartrGithubRepositorySpecPermissionsRef(obj) {
|
|
|
305580
305671
|
// filter undefined values
|
|
305581
305672
|
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
305582
305673
|
}
|
|
305674
|
+
/**
|
|
305675
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecSecretsActions' to JSON representation.
|
|
305676
|
+
*/
|
|
305677
|
+
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
305678
|
+
function toJson_FirestartrGithubRepositorySpecSecretsActions(obj) {
|
|
305679
|
+
if (obj === undefined) {
|
|
305680
|
+
return undefined;
|
|
305681
|
+
}
|
|
305682
|
+
const result = {
|
|
305683
|
+
'name': obj.name,
|
|
305684
|
+
'ref': toJson_FirestartrGithubRepositorySpecSecretsActionsRef(obj.ref),
|
|
305685
|
+
};
|
|
305686
|
+
// filter undefined values
|
|
305687
|
+
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
305688
|
+
}
|
|
305689
|
+
/**
|
|
305690
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecSecretsCodespaces' to JSON representation.
|
|
305691
|
+
*/
|
|
305692
|
+
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
305693
|
+
function toJson_FirestartrGithubRepositorySpecSecretsCodespaces(obj) {
|
|
305694
|
+
if (obj === undefined) {
|
|
305695
|
+
return undefined;
|
|
305696
|
+
}
|
|
305697
|
+
const result = {
|
|
305698
|
+
'name': obj.name,
|
|
305699
|
+
'ref': toJson_FirestartrGithubRepositorySpecSecretsCodespacesRef(obj.ref),
|
|
305700
|
+
};
|
|
305701
|
+
// filter undefined values
|
|
305702
|
+
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
305703
|
+
}
|
|
305704
|
+
/**
|
|
305705
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecSecretsCopilot' to JSON representation.
|
|
305706
|
+
*/
|
|
305707
|
+
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
305708
|
+
function toJson_FirestartrGithubRepositorySpecSecretsCopilot(obj) {
|
|
305709
|
+
if (obj === undefined) {
|
|
305710
|
+
return undefined;
|
|
305711
|
+
}
|
|
305712
|
+
const result = {
|
|
305713
|
+
'name': obj.name,
|
|
305714
|
+
'ref': toJson_FirestartrGithubRepositorySpecSecretsCopilotRef(obj.ref),
|
|
305715
|
+
};
|
|
305716
|
+
// filter undefined values
|
|
305717
|
+
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
305718
|
+
}
|
|
305719
|
+
/**
|
|
305720
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecVarsVariableItemSchema' to JSON representation.
|
|
305721
|
+
*/
|
|
305722
|
+
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
305723
|
+
function toJson_FirestartrGithubRepositorySpecVarsVariableItemSchema(obj) {
|
|
305724
|
+
if (obj === undefined) {
|
|
305725
|
+
return undefined;
|
|
305726
|
+
}
|
|
305727
|
+
const result = {
|
|
305728
|
+
'name': obj.name,
|
|
305729
|
+
'value': obj.value,
|
|
305730
|
+
'ref': toJson_FirestartrGithubRepositorySpecVarsVariableItemSchemaRef(obj.ref),
|
|
305731
|
+
};
|
|
305732
|
+
// filter undefined values
|
|
305733
|
+
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
305734
|
+
}
|
|
305735
|
+
/**
|
|
305736
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecVarsActions' to JSON representation.
|
|
305737
|
+
*/
|
|
305738
|
+
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
305739
|
+
function toJson_FirestartrGithubRepositorySpecVarsActions(obj) {
|
|
305740
|
+
if (obj === undefined) {
|
|
305741
|
+
return undefined;
|
|
305742
|
+
}
|
|
305743
|
+
const result = {
|
|
305744
|
+
'name': obj.name,
|
|
305745
|
+
'value': obj.value,
|
|
305746
|
+
'ref': toJson_FirestartrGithubRepositorySpecVarsActionsRef(obj.ref),
|
|
305747
|
+
};
|
|
305748
|
+
// filter undefined values
|
|
305749
|
+
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
305750
|
+
}
|
|
305751
|
+
/**
|
|
305752
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecVarsDependabot' to JSON representation.
|
|
305753
|
+
*/
|
|
305754
|
+
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
305755
|
+
function toJson_FirestartrGithubRepositorySpecVarsDependabot(obj) {
|
|
305756
|
+
if (obj === undefined) {
|
|
305757
|
+
return undefined;
|
|
305758
|
+
}
|
|
305759
|
+
const result = {
|
|
305760
|
+
'name': obj.name,
|
|
305761
|
+
'value': obj.value,
|
|
305762
|
+
'ref': toJson_FirestartrGithubRepositorySpecVarsDependabotRef(obj.ref),
|
|
305763
|
+
};
|
|
305764
|
+
// filter undefined values
|
|
305765
|
+
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
305766
|
+
}
|
|
305767
|
+
/**
|
|
305768
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecVarsCodespaces' to JSON representation.
|
|
305769
|
+
*/
|
|
305770
|
+
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
305771
|
+
function toJson_FirestartrGithubRepositorySpecVarsCodespaces(obj) {
|
|
305772
|
+
if (obj === undefined) {
|
|
305773
|
+
return undefined;
|
|
305774
|
+
}
|
|
305775
|
+
const result = {
|
|
305776
|
+
'name': obj.name,
|
|
305777
|
+
'value': obj.value,
|
|
305778
|
+
'ref': toJson_FirestartrGithubRepositorySpecVarsCodespacesRef(obj.ref),
|
|
305779
|
+
};
|
|
305780
|
+
// filter undefined values
|
|
305781
|
+
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
305782
|
+
}
|
|
305583
305783
|
/**
|
|
305584
305784
|
* Converts an object of type 'FirestartrGithubRepositorySpecWriteConnectionSecretToRefOutputs' to JSON representation.
|
|
305585
305785
|
*/
|
|
@@ -305624,6 +305824,118 @@ function toJson_FirestartrGithubRepositorySpecContextProviderRef(obj) {
|
|
|
305624
305824
|
// filter undefined values
|
|
305625
305825
|
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
305626
305826
|
}
|
|
305827
|
+
/**
|
|
305828
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecSecretsActionsRef' to JSON representation.
|
|
305829
|
+
*/
|
|
305830
|
+
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
305831
|
+
function toJson_FirestartrGithubRepositorySpecSecretsActionsRef(obj) {
|
|
305832
|
+
if (obj === undefined) {
|
|
305833
|
+
return undefined;
|
|
305834
|
+
}
|
|
305835
|
+
const result = {
|
|
305836
|
+
'kind': obj.kind,
|
|
305837
|
+
'name': obj.name,
|
|
305838
|
+
'key': obj.key,
|
|
305839
|
+
};
|
|
305840
|
+
// filter undefined values
|
|
305841
|
+
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
305842
|
+
}
|
|
305843
|
+
/**
|
|
305844
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecSecretsCodespacesRef' to JSON representation.
|
|
305845
|
+
*/
|
|
305846
|
+
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
305847
|
+
function toJson_FirestartrGithubRepositorySpecSecretsCodespacesRef(obj) {
|
|
305848
|
+
if (obj === undefined) {
|
|
305849
|
+
return undefined;
|
|
305850
|
+
}
|
|
305851
|
+
const result = {
|
|
305852
|
+
'kind': obj.kind,
|
|
305853
|
+
'name': obj.name,
|
|
305854
|
+
'key': obj.key,
|
|
305855
|
+
};
|
|
305856
|
+
// filter undefined values
|
|
305857
|
+
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
305858
|
+
}
|
|
305859
|
+
/**
|
|
305860
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecSecretsCopilotRef' to JSON representation.
|
|
305861
|
+
*/
|
|
305862
|
+
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
305863
|
+
function toJson_FirestartrGithubRepositorySpecSecretsCopilotRef(obj) {
|
|
305864
|
+
if (obj === undefined) {
|
|
305865
|
+
return undefined;
|
|
305866
|
+
}
|
|
305867
|
+
const result = {
|
|
305868
|
+
'kind': obj.kind,
|
|
305869
|
+
'name': obj.name,
|
|
305870
|
+
'key': obj.key,
|
|
305871
|
+
};
|
|
305872
|
+
// filter undefined values
|
|
305873
|
+
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
305874
|
+
}
|
|
305875
|
+
/**
|
|
305876
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecVarsVariableItemSchemaRef' to JSON representation.
|
|
305877
|
+
*/
|
|
305878
|
+
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
305879
|
+
function toJson_FirestartrGithubRepositorySpecVarsVariableItemSchemaRef(obj) {
|
|
305880
|
+
if (obj === undefined) {
|
|
305881
|
+
return undefined;
|
|
305882
|
+
}
|
|
305883
|
+
const result = {
|
|
305884
|
+
'kind': obj.kind,
|
|
305885
|
+
'name': obj.name,
|
|
305886
|
+
'key': obj.key,
|
|
305887
|
+
};
|
|
305888
|
+
// filter undefined values
|
|
305889
|
+
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
305890
|
+
}
|
|
305891
|
+
/**
|
|
305892
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecVarsActionsRef' to JSON representation.
|
|
305893
|
+
*/
|
|
305894
|
+
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
305895
|
+
function toJson_FirestartrGithubRepositorySpecVarsActionsRef(obj) {
|
|
305896
|
+
if (obj === undefined) {
|
|
305897
|
+
return undefined;
|
|
305898
|
+
}
|
|
305899
|
+
const result = {
|
|
305900
|
+
'kind': obj.kind,
|
|
305901
|
+
'name': obj.name,
|
|
305902
|
+
'key': obj.key,
|
|
305903
|
+
};
|
|
305904
|
+
// filter undefined values
|
|
305905
|
+
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
305906
|
+
}
|
|
305907
|
+
/**
|
|
305908
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecVarsDependabotRef' to JSON representation.
|
|
305909
|
+
*/
|
|
305910
|
+
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
305911
|
+
function toJson_FirestartrGithubRepositorySpecVarsDependabotRef(obj) {
|
|
305912
|
+
if (obj === undefined) {
|
|
305913
|
+
return undefined;
|
|
305914
|
+
}
|
|
305915
|
+
const result = {
|
|
305916
|
+
'kind': obj.kind,
|
|
305917
|
+
'name': obj.name,
|
|
305918
|
+
'key': obj.key,
|
|
305919
|
+
};
|
|
305920
|
+
// filter undefined values
|
|
305921
|
+
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
305922
|
+
}
|
|
305923
|
+
/**
|
|
305924
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecVarsCodespacesRef' to JSON representation.
|
|
305925
|
+
*/
|
|
305926
|
+
/* eslint-disable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
305927
|
+
function toJson_FirestartrGithubRepositorySpecVarsCodespacesRef(obj) {
|
|
305928
|
+
if (obj === undefined) {
|
|
305929
|
+
return undefined;
|
|
305930
|
+
}
|
|
305931
|
+
const result = {
|
|
305932
|
+
'kind': obj.kind,
|
|
305933
|
+
'name': obj.name,
|
|
305934
|
+
'key': obj.key,
|
|
305935
|
+
};
|
|
305936
|
+
// filter undefined values
|
|
305937
|
+
return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
|
|
305938
|
+
}
|
|
305627
305939
|
/* eslint-enable max-len, @stylistic/max-len, quote-props, @stylistic/quote-props */
|
|
305628
305940
|
/**
|
|
305629
305941
|
* @schema FirestartrGithubRepositorySpecContextBackendRefKind
|
|
@@ -306966,6 +307278,8 @@ class GithubRepositoryChart extends BaseGithubChart {
|
|
|
306966
307278
|
},
|
|
306967
307279
|
actions,
|
|
306968
307280
|
permissions: this.createPermissions(claim),
|
|
307281
|
+
vars: this.createVars(claim),
|
|
307282
|
+
secrets: this.createRepoSecrets(claim),
|
|
306969
307283
|
pages: claim.providers.github.pages,
|
|
306970
307284
|
branchProtections: [],
|
|
306971
307285
|
writeConnectionSecretToRef: {
|
|
@@ -307037,6 +307351,87 @@ class GithubRepositoryChart extends BaseGithubChart {
|
|
|
307037
307351
|
}
|
|
307038
307352
|
return permissions;
|
|
307039
307353
|
}
|
|
307354
|
+
/**
|
|
307355
|
+
* @description This method creates the vars data for the repository
|
|
307356
|
+
* @param claim
|
|
307357
|
+
* @returns VarsConfiguration
|
|
307358
|
+
*/
|
|
307359
|
+
createVars(claim) {
|
|
307360
|
+
const vars = {};
|
|
307361
|
+
const varsDefinition = claim.providers?.github?.vars;
|
|
307362
|
+
if (varsDefinition) {
|
|
307363
|
+
if (varsDefinition.actions) {
|
|
307364
|
+
vars.actions = this.formatVars(varsDefinition.actions);
|
|
307365
|
+
}
|
|
307366
|
+
if (varsDefinition.codespaces) {
|
|
307367
|
+
vars.codespaces = this.formatVars(varsDefinition.codespaces);
|
|
307368
|
+
}
|
|
307369
|
+
if (varsDefinition.copilot) {
|
|
307370
|
+
vars.copilot = this.formatVars(varsDefinition.copilot);
|
|
307371
|
+
}
|
|
307372
|
+
}
|
|
307373
|
+
return vars;
|
|
307374
|
+
}
|
|
307375
|
+
/**
|
|
307376
|
+
* @description This method creates the secrets data for the repository
|
|
307377
|
+
* @param claim
|
|
307378
|
+
* @returns RepoSecretsConfiguration
|
|
307379
|
+
*/
|
|
307380
|
+
createRepoSecrets(claim) {
|
|
307381
|
+
const repoSecrets = {};
|
|
307382
|
+
const repoSecretsDefinitions = claim.providers?.github?.secrets;
|
|
307383
|
+
if (repoSecretsDefinitions) {
|
|
307384
|
+
if (repoSecretsDefinitions.actions) {
|
|
307385
|
+
repoSecrets.actions = this.formatRepoSecrets(repoSecretsDefinitions.actions);
|
|
307386
|
+
}
|
|
307387
|
+
if (repoSecretsDefinitions.codespaces) {
|
|
307388
|
+
repoSecrets.codespaces = this.formatRepoSecrets(repoSecretsDefinitions.codespaces);
|
|
307389
|
+
}
|
|
307390
|
+
if (repoSecretsDefinitions.copilot) {
|
|
307391
|
+
repoSecrets.copilot = this.formatRepoSecrets(repoSecretsDefinitions.copilot);
|
|
307392
|
+
}
|
|
307393
|
+
}
|
|
307394
|
+
return repoSecrets;
|
|
307395
|
+
}
|
|
307396
|
+
formatVars(blockDefinition) {
|
|
307397
|
+
return blockDefinition.map((varDef) => {
|
|
307398
|
+
if (isRepoSecretRef(varDef.value)) {
|
|
307399
|
+
const parts = varDef.value.split(':');
|
|
307400
|
+
return {
|
|
307401
|
+
name: varDef.name,
|
|
307402
|
+
ref: {
|
|
307403
|
+
kind: 'Secret',
|
|
307404
|
+
name: parts[2],
|
|
307405
|
+
key: parts[3],
|
|
307406
|
+
},
|
|
307407
|
+
};
|
|
307408
|
+
}
|
|
307409
|
+
else {
|
|
307410
|
+
return {
|
|
307411
|
+
name: varDef.name,
|
|
307412
|
+
value: varDef.value,
|
|
307413
|
+
};
|
|
307414
|
+
}
|
|
307415
|
+
});
|
|
307416
|
+
}
|
|
307417
|
+
formatRepoSecrets(blockDefinition) {
|
|
307418
|
+
return blockDefinition.map((secretDef) => {
|
|
307419
|
+
if (isRepoSecretRef(secretDef.value)) {
|
|
307420
|
+
const parts = secretDef.value.split(':');
|
|
307421
|
+
return {
|
|
307422
|
+
name: secretDef.name,
|
|
307423
|
+
ref: {
|
|
307424
|
+
kind: 'Secret',
|
|
307425
|
+
name: parts[2],
|
|
307426
|
+
key: parts[3],
|
|
307427
|
+
},
|
|
307428
|
+
};
|
|
307429
|
+
}
|
|
307430
|
+
else {
|
|
307431
|
+
throw new Error(`RepoSecret value is not correct: ${secretDef.value}`);
|
|
307432
|
+
}
|
|
307433
|
+
});
|
|
307434
|
+
}
|
|
307040
307435
|
extraCharts() {
|
|
307041
307436
|
return this.get('features') || [];
|
|
307042
307437
|
}
|
|
@@ -314647,6 +315042,40 @@ function tf_checkrun_extractPrInfo(item) {
|
|
|
314647
315042
|
return { prNumber, repo, org };
|
|
314648
315043
|
}
|
|
314649
315044
|
|
|
315045
|
+
;// CONCATENATED MODULE: ../operator/src/utils/index.ts
|
|
315046
|
+
const secretRegex = /\$\{\{ secrets\.(.*?) \}\}/g;
|
|
315047
|
+
function replaceConfigSecrets(config, secrets) {
|
|
315048
|
+
for (const key in config) {
|
|
315049
|
+
if (typeof config[key] === 'object' && config[key] !== null) {
|
|
315050
|
+
// If the property is an object, call this function recursively
|
|
315051
|
+
replaceConfigSecrets(config[key], secrets);
|
|
315052
|
+
}
|
|
315053
|
+
else if (typeof config[key] === 'string') {
|
|
315054
|
+
// If the property is a string and its value is equal to secrets.something,
|
|
315055
|
+
// replace the value with the value of the 'something' key in the secrets object
|
|
315056
|
+
config[key] = config[key].replace(secretRegex, (_, group1) => {
|
|
315057
|
+
if (!secrets[group1]) {
|
|
315058
|
+
throw new Error(`Secret ${group1} not found in secrets`);
|
|
315059
|
+
}
|
|
315060
|
+
return secrets[group1];
|
|
315061
|
+
});
|
|
315062
|
+
}
|
|
315063
|
+
}
|
|
315064
|
+
return config;
|
|
315065
|
+
}
|
|
315066
|
+
function replaceInlineSecrets(inline, secrets) {
|
|
315067
|
+
if (typeof inline !== 'string' || !inline)
|
|
315068
|
+
return inline;
|
|
315069
|
+
let result = inline;
|
|
315070
|
+
result = result.replace(secretRegex, (_, group1) => {
|
|
315071
|
+
if (!secrets[group1]) {
|
|
315072
|
+
throw new Error(`Secret ${group1} not found in secrets`);
|
|
315073
|
+
}
|
|
315074
|
+
return secrets[group1];
|
|
315075
|
+
});
|
|
315076
|
+
return result;
|
|
315077
|
+
}
|
|
315078
|
+
|
|
314650
315079
|
;// CONCATENATED MODULE: ../operator/src/tfworkspaces/process-operation.ts
|
|
314651
315080
|
|
|
314652
315081
|
|
|
@@ -314658,6 +315087,7 @@ function tf_checkrun_extractPrInfo(item) {
|
|
|
314658
315087
|
|
|
314659
315088
|
|
|
314660
315089
|
|
|
315090
|
+
|
|
314661
315091
|
const TF_PROJECTS_PATH = '/tmp/tfworkspaces';
|
|
314662
315092
|
function process_operation_processOperation(item, op, handler) {
|
|
314663
315093
|
try {
|
|
@@ -315223,25 +315653,6 @@ function getRefContextFromCr(cr, deps) {
|
|
|
315223
315653
|
}
|
|
315224
315654
|
return secrets;
|
|
315225
315655
|
}
|
|
315226
|
-
function replaceConfigSecrets(config, secrets) {
|
|
315227
|
-
for (const key in config) {
|
|
315228
|
-
if (typeof config[key] === 'object' && config[key] !== null) {
|
|
315229
|
-
// If the property is an object, call this function recursively
|
|
315230
|
-
replaceConfigSecrets(config[key], secrets);
|
|
315231
|
-
}
|
|
315232
|
-
else if (typeof config[key] === 'string') {
|
|
315233
|
-
// If the property is a string and its value is equal to secrets.something,
|
|
315234
|
-
// replace the value with the value of the 'something' key in the secrets object
|
|
315235
|
-
config[key] = config[key].replace(/\$\{\{ secrets\.(.*?) \}\}/g, (_, group1) => {
|
|
315236
|
-
if (!secrets[group1]) {
|
|
315237
|
-
throw new Error(`Secret ${group1} not found in secrets`);
|
|
315238
|
-
}
|
|
315239
|
-
return secrets[group1];
|
|
315240
|
-
});
|
|
315241
|
-
}
|
|
315242
|
-
}
|
|
315243
|
-
return config;
|
|
315244
|
-
}
|
|
315245
315656
|
function adaptProviders(item, deps) {
|
|
315246
315657
|
const result = {};
|
|
315247
315658
|
result['secrets'] = [];
|
|
@@ -315266,10 +315677,11 @@ function adaptProvider(providerFromItem, deps) {
|
|
|
315266
315677
|
const providerDependency = deps[providerName].cr;
|
|
315267
315678
|
const providerSecrets = getRefContextFromCr(providerDependency, deps);
|
|
315268
315679
|
const providerConfigData = replaceConfigSecrets(JSON.parse(providerDependency.spec.config), providerSecrets);
|
|
315680
|
+
const providerInlineData = replaceInlineSecrets(providerDependency.spec.inline, providerSecrets);
|
|
315269
315681
|
provider['name'] = providerDependency.spec.type;
|
|
315270
315682
|
provider['version'] = providerDependency.spec.version;
|
|
315271
315683
|
provider['source'] = providerDependency.spec.source;
|
|
315272
|
-
provider['inline'] =
|
|
315684
|
+
provider['inline'] = providerInlineData;
|
|
315273
315685
|
provider['config'] = providerConfigData;
|
|
315274
315686
|
const secrets = [];
|
|
315275
315687
|
if (providerDependency.spec.env) {
|
|
@@ -315294,8 +315706,10 @@ function adaptBackend(item, deps) {
|
|
|
315294
315706
|
const backendDependency = deps[backendName].cr;
|
|
315295
315707
|
const backendSecrets = getRefContextFromCr(backendDependency, deps);
|
|
315296
315708
|
const providerConfigData = replaceConfigSecrets(JSON.parse(backendDependency.spec.config), backendSecrets);
|
|
315709
|
+
const providerInlineData = replaceInlineSecrets(backendDependency.spec.inline, backendSecrets);
|
|
315297
315710
|
backend[backendDependency.spec.type] = {};
|
|
315298
315711
|
backend[backendDependency.spec.type]['config'] = providerConfigData;
|
|
315712
|
+
backend[backendDependency.spec.type]['inline'] = providerInlineData;
|
|
315299
315713
|
return backend;
|
|
315300
315714
|
}
|
|
315301
315715
|
/**
|
|
@@ -315503,6 +315917,7 @@ async function acquireLease(namespace, cb, interval = 10000) {
|
|
|
315503
315917
|
|
|
315504
315918
|
|
|
315505
315919
|
|
|
315920
|
+
|
|
315506
315921
|
const processOperationPlan_TF_PROJECTS_PATH = '/tmp/tfworkspaces';
|
|
315507
315922
|
function processOperationPlan(item, op, handler) {
|
|
315508
315923
|
try {
|
|
@@ -315797,25 +316212,6 @@ function processOperationPlan_getRefContextFromCr(cr, deps) {
|
|
|
315797
316212
|
}
|
|
315798
316213
|
return secrets;
|
|
315799
316214
|
}
|
|
315800
|
-
function processOperationPlan_replaceConfigSecrets(config, secrets) {
|
|
315801
|
-
for (const key in config) {
|
|
315802
|
-
if (typeof config[key] === 'object' && config[key] !== null) {
|
|
315803
|
-
// If the property is an object, call this function recursively
|
|
315804
|
-
processOperationPlan_replaceConfigSecrets(config[key], secrets);
|
|
315805
|
-
}
|
|
315806
|
-
else if (typeof config[key] === 'string') {
|
|
315807
|
-
// If the property is a string and its value is equal to secrets.something,
|
|
315808
|
-
// replace the value with the value of the 'something' key in the secrets object
|
|
315809
|
-
config[key] = config[key].replace(/\$\{\{ secrets\.(.*?) \}\}/g, (_, group1) => {
|
|
315810
|
-
if (!secrets[group1]) {
|
|
315811
|
-
throw new Error(`Secret ${group1} not found in secrets`);
|
|
315812
|
-
}
|
|
315813
|
-
return secrets[group1];
|
|
315814
|
-
});
|
|
315815
|
-
}
|
|
315816
|
-
}
|
|
315817
|
-
return config;
|
|
315818
|
-
}
|
|
315819
316215
|
function processOperationPlan_adaptProviders(item, deps) {
|
|
315820
316216
|
const result = {};
|
|
315821
316217
|
result['secrets'] = [];
|
|
@@ -315839,11 +316235,12 @@ function processOperationPlan_adaptProvider(providerFromItem, deps) {
|
|
|
315839
316235
|
const providerName = `FirestartrProviderConfig-${providerFromItem.ref.name}`;
|
|
315840
316236
|
const providerDependency = deps[providerName].cr;
|
|
315841
316237
|
const providerSecrets = processOperationPlan_getRefContextFromCr(providerDependency, deps);
|
|
315842
|
-
const providerConfigData =
|
|
316238
|
+
const providerConfigData = replaceConfigSecrets(JSON.parse(providerDependency.spec.config), providerSecrets);
|
|
316239
|
+
const providerInlineData = replaceInlineSecrets(providerDependency.spec.inline, providerSecrets);
|
|
315843
316240
|
provider['name'] = providerDependency.spec.type;
|
|
315844
316241
|
provider['version'] = providerDependency.spec.version;
|
|
315845
316242
|
provider['source'] = providerDependency.spec.source;
|
|
315846
|
-
provider['inline'] =
|
|
316243
|
+
provider['inline'] = providerInlineData;
|
|
315847
316244
|
provider['config'] = providerConfigData;
|
|
315848
316245
|
const secrets = [];
|
|
315849
316246
|
if (providerDependency.spec.env) {
|
|
@@ -315867,9 +316264,11 @@ function processOperationPlan_adaptBackend(item, deps) {
|
|
|
315867
316264
|
const backendName = `FirestartrProviderConfig-${item.spec.context.backend.ref.name}`;
|
|
315868
316265
|
const backendDependency = deps[backendName].cr;
|
|
315869
316266
|
const backendSecrets = processOperationPlan_getRefContextFromCr(backendDependency, deps);
|
|
315870
|
-
const providerConfigData =
|
|
316267
|
+
const providerConfigData = replaceConfigSecrets(JSON.parse(backendDependency.spec.config), backendSecrets);
|
|
316268
|
+
const providerInlineData = replaceInlineSecrets(backendDependency.spec.inline, backendSecrets);
|
|
315871
316269
|
backend[backendDependency.spec.type] = {};
|
|
315872
316270
|
backend[backendDependency.spec.type]['config'] = providerConfigData;
|
|
316271
|
+
backend[backendDependency.spec.type]['inline'] = providerInlineData;
|
|
315873
316272
|
return backend;
|
|
315874
316273
|
}
|
|
315875
316274
|
/**
|
|
@@ -896,6 +896,14 @@ export interface FirestartrGithubRepositorySpec {
|
|
|
896
896
|
* @schema FirestartrGithubRepositorySpec#permissions
|
|
897
897
|
*/
|
|
898
898
|
readonly permissions: FirestartrGithubRepositorySpecPermissions[];
|
|
899
|
+
/**
|
|
900
|
+
* @schema FirestartrGithubRepositorySpec#secrets
|
|
901
|
+
*/
|
|
902
|
+
readonly secrets?: FirestartrGithubRepositorySpecSecrets;
|
|
903
|
+
/**
|
|
904
|
+
* @schema FirestartrGithubRepositorySpec#vars
|
|
905
|
+
*/
|
|
906
|
+
readonly vars?: FirestartrGithubRepositorySpecVars;
|
|
899
907
|
/**
|
|
900
908
|
* @schema FirestartrGithubRepositorySpec#branchProtections
|
|
901
909
|
*/
|
|
@@ -1067,6 +1075,52 @@ export interface FirestartrGithubRepositorySpecPermissions {
|
|
|
1067
1075
|
* Converts an object of type 'FirestartrGithubRepositorySpecPermissions' to JSON representation.
|
|
1068
1076
|
*/
|
|
1069
1077
|
export declare function toJson_FirestartrGithubRepositorySpecPermissions(obj: FirestartrGithubRepositorySpecPermissions | undefined): Record<string, any> | undefined;
|
|
1078
|
+
/**
|
|
1079
|
+
* @schema FirestartrGithubRepositorySpecSecrets
|
|
1080
|
+
*/
|
|
1081
|
+
export interface FirestartrGithubRepositorySpecSecrets {
|
|
1082
|
+
/**
|
|
1083
|
+
* @schema FirestartrGithubRepositorySpecSecrets#actions
|
|
1084
|
+
*/
|
|
1085
|
+
readonly actions?: FirestartrGithubRepositorySpecSecretsActions[];
|
|
1086
|
+
/**
|
|
1087
|
+
* @schema FirestartrGithubRepositorySpecSecrets#codespaces
|
|
1088
|
+
*/
|
|
1089
|
+
readonly codespaces?: FirestartrGithubRepositorySpecSecretsCodespaces[];
|
|
1090
|
+
/**
|
|
1091
|
+
* @schema FirestartrGithubRepositorySpecSecrets#copilot
|
|
1092
|
+
*/
|
|
1093
|
+
readonly copilot?: FirestartrGithubRepositorySpecSecretsCopilot[];
|
|
1094
|
+
}
|
|
1095
|
+
/**
|
|
1096
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecSecrets' to JSON representation.
|
|
1097
|
+
*/
|
|
1098
|
+
export declare function toJson_FirestartrGithubRepositorySpecSecrets(obj: FirestartrGithubRepositorySpecSecrets | undefined): Record<string, any> | undefined;
|
|
1099
|
+
/**
|
|
1100
|
+
* @schema FirestartrGithubRepositorySpecVars
|
|
1101
|
+
*/
|
|
1102
|
+
export interface FirestartrGithubRepositorySpecVars {
|
|
1103
|
+
/**
|
|
1104
|
+
* @schema FirestartrGithubRepositorySpecVars#variableItemSchema
|
|
1105
|
+
*/
|
|
1106
|
+
readonly variableItemSchema?: FirestartrGithubRepositorySpecVarsVariableItemSchema;
|
|
1107
|
+
/**
|
|
1108
|
+
* @schema FirestartrGithubRepositorySpecVars#actions
|
|
1109
|
+
*/
|
|
1110
|
+
readonly actions?: FirestartrGithubRepositorySpecVarsActions[];
|
|
1111
|
+
/**
|
|
1112
|
+
* @schema FirestartrGithubRepositorySpecVars#dependabot
|
|
1113
|
+
*/
|
|
1114
|
+
readonly dependabot?: FirestartrGithubRepositorySpecVarsDependabot[];
|
|
1115
|
+
/**
|
|
1116
|
+
* @schema FirestartrGithubRepositorySpecVars#codespaces
|
|
1117
|
+
*/
|
|
1118
|
+
readonly codespaces?: FirestartrGithubRepositorySpecVarsCodespaces[];
|
|
1119
|
+
}
|
|
1120
|
+
/**
|
|
1121
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecVars' to JSON representation.
|
|
1122
|
+
*/
|
|
1123
|
+
export declare function toJson_FirestartrGithubRepositorySpecVars(obj: FirestartrGithubRepositorySpecVars | undefined): Record<string, any> | undefined;
|
|
1070
1124
|
/**
|
|
1071
1125
|
* @schema FirestartrGithubRepositorySpecBranchProtections
|
|
1072
1126
|
*/
|
|
@@ -1251,6 +1305,141 @@ export interface FirestartrGithubRepositorySpecPermissionsRef {
|
|
|
1251
1305
|
* Converts an object of type 'FirestartrGithubRepositorySpecPermissionsRef' to JSON representation.
|
|
1252
1306
|
*/
|
|
1253
1307
|
export declare function toJson_FirestartrGithubRepositorySpecPermissionsRef(obj: FirestartrGithubRepositorySpecPermissionsRef | undefined): Record<string, any> | undefined;
|
|
1308
|
+
/**
|
|
1309
|
+
* @schema FirestartrGithubRepositorySpecSecretsActions
|
|
1310
|
+
*/
|
|
1311
|
+
export interface FirestartrGithubRepositorySpecSecretsActions {
|
|
1312
|
+
/**
|
|
1313
|
+
* @schema FirestartrGithubRepositorySpecSecretsActions#name
|
|
1314
|
+
*/
|
|
1315
|
+
readonly name: string;
|
|
1316
|
+
/**
|
|
1317
|
+
* @schema FirestartrGithubRepositorySpecSecretsActions#ref
|
|
1318
|
+
*/
|
|
1319
|
+
readonly ref: FirestartrGithubRepositorySpecSecretsActionsRef;
|
|
1320
|
+
}
|
|
1321
|
+
/**
|
|
1322
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecSecretsActions' to JSON representation.
|
|
1323
|
+
*/
|
|
1324
|
+
export declare function toJson_FirestartrGithubRepositorySpecSecretsActions(obj: FirestartrGithubRepositorySpecSecretsActions | undefined): Record<string, any> | undefined;
|
|
1325
|
+
/**
|
|
1326
|
+
* @schema FirestartrGithubRepositorySpecSecretsCodespaces
|
|
1327
|
+
*/
|
|
1328
|
+
export interface FirestartrGithubRepositorySpecSecretsCodespaces {
|
|
1329
|
+
/**
|
|
1330
|
+
* @schema FirestartrGithubRepositorySpecSecretsCodespaces#name
|
|
1331
|
+
*/
|
|
1332
|
+
readonly name: string;
|
|
1333
|
+
/**
|
|
1334
|
+
* @schema FirestartrGithubRepositorySpecSecretsCodespaces#ref
|
|
1335
|
+
*/
|
|
1336
|
+
readonly ref: FirestartrGithubRepositorySpecSecretsCodespacesRef;
|
|
1337
|
+
}
|
|
1338
|
+
/**
|
|
1339
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecSecretsCodespaces' to JSON representation.
|
|
1340
|
+
*/
|
|
1341
|
+
export declare function toJson_FirestartrGithubRepositorySpecSecretsCodespaces(obj: FirestartrGithubRepositorySpecSecretsCodespaces | undefined): Record<string, any> | undefined;
|
|
1342
|
+
/**
|
|
1343
|
+
* @schema FirestartrGithubRepositorySpecSecretsCopilot
|
|
1344
|
+
*/
|
|
1345
|
+
export interface FirestartrGithubRepositorySpecSecretsCopilot {
|
|
1346
|
+
/**
|
|
1347
|
+
* @schema FirestartrGithubRepositorySpecSecretsCopilot#name
|
|
1348
|
+
*/
|
|
1349
|
+
readonly name: string;
|
|
1350
|
+
/**
|
|
1351
|
+
* @schema FirestartrGithubRepositorySpecSecretsCopilot#ref
|
|
1352
|
+
*/
|
|
1353
|
+
readonly ref: FirestartrGithubRepositorySpecSecretsCopilotRef;
|
|
1354
|
+
}
|
|
1355
|
+
/**
|
|
1356
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecSecretsCopilot' to JSON representation.
|
|
1357
|
+
*/
|
|
1358
|
+
export declare function toJson_FirestartrGithubRepositorySpecSecretsCopilot(obj: FirestartrGithubRepositorySpecSecretsCopilot | undefined): Record<string, any> | undefined;
|
|
1359
|
+
/**
|
|
1360
|
+
* @schema FirestartrGithubRepositorySpecVarsVariableItemSchema
|
|
1361
|
+
*/
|
|
1362
|
+
export interface FirestartrGithubRepositorySpecVarsVariableItemSchema {
|
|
1363
|
+
/**
|
|
1364
|
+
* @schema FirestartrGithubRepositorySpecVarsVariableItemSchema#name
|
|
1365
|
+
*/
|
|
1366
|
+
readonly name?: string;
|
|
1367
|
+
/**
|
|
1368
|
+
* @schema FirestartrGithubRepositorySpecVarsVariableItemSchema#value
|
|
1369
|
+
*/
|
|
1370
|
+
readonly value?: string;
|
|
1371
|
+
/**
|
|
1372
|
+
* @schema FirestartrGithubRepositorySpecVarsVariableItemSchema#ref
|
|
1373
|
+
*/
|
|
1374
|
+
readonly ref?: FirestartrGithubRepositorySpecVarsVariableItemSchemaRef;
|
|
1375
|
+
}
|
|
1376
|
+
/**
|
|
1377
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecVarsVariableItemSchema' to JSON representation.
|
|
1378
|
+
*/
|
|
1379
|
+
export declare function toJson_FirestartrGithubRepositorySpecVarsVariableItemSchema(obj: FirestartrGithubRepositorySpecVarsVariableItemSchema | undefined): Record<string, any> | undefined;
|
|
1380
|
+
/**
|
|
1381
|
+
* @schema FirestartrGithubRepositorySpecVarsActions
|
|
1382
|
+
*/
|
|
1383
|
+
export interface FirestartrGithubRepositorySpecVarsActions {
|
|
1384
|
+
/**
|
|
1385
|
+
* @schema FirestartrGithubRepositorySpecVarsActions#name
|
|
1386
|
+
*/
|
|
1387
|
+
readonly name?: string;
|
|
1388
|
+
/**
|
|
1389
|
+
* @schema FirestartrGithubRepositorySpecVarsActions#value
|
|
1390
|
+
*/
|
|
1391
|
+
readonly value?: string;
|
|
1392
|
+
/**
|
|
1393
|
+
* @schema FirestartrGithubRepositorySpecVarsActions#ref
|
|
1394
|
+
*/
|
|
1395
|
+
readonly ref?: FirestartrGithubRepositorySpecVarsActionsRef;
|
|
1396
|
+
}
|
|
1397
|
+
/**
|
|
1398
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecVarsActions' to JSON representation.
|
|
1399
|
+
*/
|
|
1400
|
+
export declare function toJson_FirestartrGithubRepositorySpecVarsActions(obj: FirestartrGithubRepositorySpecVarsActions | undefined): Record<string, any> | undefined;
|
|
1401
|
+
/**
|
|
1402
|
+
* @schema FirestartrGithubRepositorySpecVarsDependabot
|
|
1403
|
+
*/
|
|
1404
|
+
export interface FirestartrGithubRepositorySpecVarsDependabot {
|
|
1405
|
+
/**
|
|
1406
|
+
* @schema FirestartrGithubRepositorySpecVarsDependabot#name
|
|
1407
|
+
*/
|
|
1408
|
+
readonly name?: string;
|
|
1409
|
+
/**
|
|
1410
|
+
* @schema FirestartrGithubRepositorySpecVarsDependabot#value
|
|
1411
|
+
*/
|
|
1412
|
+
readonly value?: string;
|
|
1413
|
+
/**
|
|
1414
|
+
* @schema FirestartrGithubRepositorySpecVarsDependabot#ref
|
|
1415
|
+
*/
|
|
1416
|
+
readonly ref?: FirestartrGithubRepositorySpecVarsDependabotRef;
|
|
1417
|
+
}
|
|
1418
|
+
/**
|
|
1419
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecVarsDependabot' to JSON representation.
|
|
1420
|
+
*/
|
|
1421
|
+
export declare function toJson_FirestartrGithubRepositorySpecVarsDependabot(obj: FirestartrGithubRepositorySpecVarsDependabot | undefined): Record<string, any> | undefined;
|
|
1422
|
+
/**
|
|
1423
|
+
* @schema FirestartrGithubRepositorySpecVarsCodespaces
|
|
1424
|
+
*/
|
|
1425
|
+
export interface FirestartrGithubRepositorySpecVarsCodespaces {
|
|
1426
|
+
/**
|
|
1427
|
+
* @schema FirestartrGithubRepositorySpecVarsCodespaces#name
|
|
1428
|
+
*/
|
|
1429
|
+
readonly name?: string;
|
|
1430
|
+
/**
|
|
1431
|
+
* @schema FirestartrGithubRepositorySpecVarsCodespaces#value
|
|
1432
|
+
*/
|
|
1433
|
+
readonly value?: string;
|
|
1434
|
+
/**
|
|
1435
|
+
* @schema FirestartrGithubRepositorySpecVarsCodespaces#ref
|
|
1436
|
+
*/
|
|
1437
|
+
readonly ref?: FirestartrGithubRepositorySpecVarsCodespacesRef;
|
|
1438
|
+
}
|
|
1439
|
+
/**
|
|
1440
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecVarsCodespaces' to JSON representation.
|
|
1441
|
+
*/
|
|
1442
|
+
export declare function toJson_FirestartrGithubRepositorySpecVarsCodespaces(obj: FirestartrGithubRepositorySpecVarsCodespaces | undefined): Record<string, any> | undefined;
|
|
1254
1443
|
/**
|
|
1255
1444
|
* @schema FirestartrGithubRepositorySpecWriteConnectionSecretToRefOutputs
|
|
1256
1445
|
*/
|
|
@@ -1298,6 +1487,153 @@ export interface FirestartrGithubRepositorySpecContextProviderRef {
|
|
|
1298
1487
|
* Converts an object of type 'FirestartrGithubRepositorySpecContextProviderRef' to JSON representation.
|
|
1299
1488
|
*/
|
|
1300
1489
|
export declare function toJson_FirestartrGithubRepositorySpecContextProviderRef(obj: FirestartrGithubRepositorySpecContextProviderRef | undefined): Record<string, any> | undefined;
|
|
1490
|
+
/**
|
|
1491
|
+
* @schema FirestartrGithubRepositorySpecSecretsActionsRef
|
|
1492
|
+
*/
|
|
1493
|
+
export interface FirestartrGithubRepositorySpecSecretsActionsRef {
|
|
1494
|
+
/**
|
|
1495
|
+
* @schema FirestartrGithubRepositorySpecSecretsActionsRef#kind
|
|
1496
|
+
*/
|
|
1497
|
+
readonly kind: string;
|
|
1498
|
+
/**
|
|
1499
|
+
* @schema FirestartrGithubRepositorySpecSecretsActionsRef#name
|
|
1500
|
+
*/
|
|
1501
|
+
readonly name: string;
|
|
1502
|
+
/**
|
|
1503
|
+
* @schema FirestartrGithubRepositorySpecSecretsActionsRef#key
|
|
1504
|
+
*/
|
|
1505
|
+
readonly key: string;
|
|
1506
|
+
}
|
|
1507
|
+
/**
|
|
1508
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecSecretsActionsRef' to JSON representation.
|
|
1509
|
+
*/
|
|
1510
|
+
export declare function toJson_FirestartrGithubRepositorySpecSecretsActionsRef(obj: FirestartrGithubRepositorySpecSecretsActionsRef | undefined): Record<string, any> | undefined;
|
|
1511
|
+
/**
|
|
1512
|
+
* @schema FirestartrGithubRepositorySpecSecretsCodespacesRef
|
|
1513
|
+
*/
|
|
1514
|
+
export interface FirestartrGithubRepositorySpecSecretsCodespacesRef {
|
|
1515
|
+
/**
|
|
1516
|
+
* @schema FirestartrGithubRepositorySpecSecretsCodespacesRef#kind
|
|
1517
|
+
*/
|
|
1518
|
+
readonly kind: string;
|
|
1519
|
+
/**
|
|
1520
|
+
* @schema FirestartrGithubRepositorySpecSecretsCodespacesRef#name
|
|
1521
|
+
*/
|
|
1522
|
+
readonly name: string;
|
|
1523
|
+
/**
|
|
1524
|
+
* @schema FirestartrGithubRepositorySpecSecretsCodespacesRef#key
|
|
1525
|
+
*/
|
|
1526
|
+
readonly key: string;
|
|
1527
|
+
}
|
|
1528
|
+
/**
|
|
1529
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecSecretsCodespacesRef' to JSON representation.
|
|
1530
|
+
*/
|
|
1531
|
+
export declare function toJson_FirestartrGithubRepositorySpecSecretsCodespacesRef(obj: FirestartrGithubRepositorySpecSecretsCodespacesRef | undefined): Record<string, any> | undefined;
|
|
1532
|
+
/**
|
|
1533
|
+
* @schema FirestartrGithubRepositorySpecSecretsCopilotRef
|
|
1534
|
+
*/
|
|
1535
|
+
export interface FirestartrGithubRepositorySpecSecretsCopilotRef {
|
|
1536
|
+
/**
|
|
1537
|
+
* @schema FirestartrGithubRepositorySpecSecretsCopilotRef#kind
|
|
1538
|
+
*/
|
|
1539
|
+
readonly kind: string;
|
|
1540
|
+
/**
|
|
1541
|
+
* @schema FirestartrGithubRepositorySpecSecretsCopilotRef#name
|
|
1542
|
+
*/
|
|
1543
|
+
readonly name: string;
|
|
1544
|
+
/**
|
|
1545
|
+
* @schema FirestartrGithubRepositorySpecSecretsCopilotRef#key
|
|
1546
|
+
*/
|
|
1547
|
+
readonly key: string;
|
|
1548
|
+
}
|
|
1549
|
+
/**
|
|
1550
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecSecretsCopilotRef' to JSON representation.
|
|
1551
|
+
*/
|
|
1552
|
+
export declare function toJson_FirestartrGithubRepositorySpecSecretsCopilotRef(obj: FirestartrGithubRepositorySpecSecretsCopilotRef | undefined): Record<string, any> | undefined;
|
|
1553
|
+
/**
|
|
1554
|
+
* @schema FirestartrGithubRepositorySpecVarsVariableItemSchemaRef
|
|
1555
|
+
*/
|
|
1556
|
+
export interface FirestartrGithubRepositorySpecVarsVariableItemSchemaRef {
|
|
1557
|
+
/**
|
|
1558
|
+
* @schema FirestartrGithubRepositorySpecVarsVariableItemSchemaRef#kind
|
|
1559
|
+
*/
|
|
1560
|
+
readonly kind: string;
|
|
1561
|
+
/**
|
|
1562
|
+
* @schema FirestartrGithubRepositorySpecVarsVariableItemSchemaRef#name
|
|
1563
|
+
*/
|
|
1564
|
+
readonly name: string;
|
|
1565
|
+
/**
|
|
1566
|
+
* @schema FirestartrGithubRepositorySpecVarsVariableItemSchemaRef#key
|
|
1567
|
+
*/
|
|
1568
|
+
readonly key: string;
|
|
1569
|
+
}
|
|
1570
|
+
/**
|
|
1571
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecVarsVariableItemSchemaRef' to JSON representation.
|
|
1572
|
+
*/
|
|
1573
|
+
export declare function toJson_FirestartrGithubRepositorySpecVarsVariableItemSchemaRef(obj: FirestartrGithubRepositorySpecVarsVariableItemSchemaRef | undefined): Record<string, any> | undefined;
|
|
1574
|
+
/**
|
|
1575
|
+
* @schema FirestartrGithubRepositorySpecVarsActionsRef
|
|
1576
|
+
*/
|
|
1577
|
+
export interface FirestartrGithubRepositorySpecVarsActionsRef {
|
|
1578
|
+
/**
|
|
1579
|
+
* @schema FirestartrGithubRepositorySpecVarsActionsRef#kind
|
|
1580
|
+
*/
|
|
1581
|
+
readonly kind: string;
|
|
1582
|
+
/**
|
|
1583
|
+
* @schema FirestartrGithubRepositorySpecVarsActionsRef#name
|
|
1584
|
+
*/
|
|
1585
|
+
readonly name: string;
|
|
1586
|
+
/**
|
|
1587
|
+
* @schema FirestartrGithubRepositorySpecVarsActionsRef#key
|
|
1588
|
+
*/
|
|
1589
|
+
readonly key: string;
|
|
1590
|
+
}
|
|
1591
|
+
/**
|
|
1592
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecVarsActionsRef' to JSON representation.
|
|
1593
|
+
*/
|
|
1594
|
+
export declare function toJson_FirestartrGithubRepositorySpecVarsActionsRef(obj: FirestartrGithubRepositorySpecVarsActionsRef | undefined): Record<string, any> | undefined;
|
|
1595
|
+
/**
|
|
1596
|
+
* @schema FirestartrGithubRepositorySpecVarsDependabotRef
|
|
1597
|
+
*/
|
|
1598
|
+
export interface FirestartrGithubRepositorySpecVarsDependabotRef {
|
|
1599
|
+
/**
|
|
1600
|
+
* @schema FirestartrGithubRepositorySpecVarsDependabotRef#kind
|
|
1601
|
+
*/
|
|
1602
|
+
readonly kind: string;
|
|
1603
|
+
/**
|
|
1604
|
+
* @schema FirestartrGithubRepositorySpecVarsDependabotRef#name
|
|
1605
|
+
*/
|
|
1606
|
+
readonly name: string;
|
|
1607
|
+
/**
|
|
1608
|
+
* @schema FirestartrGithubRepositorySpecVarsDependabotRef#key
|
|
1609
|
+
*/
|
|
1610
|
+
readonly key: string;
|
|
1611
|
+
}
|
|
1612
|
+
/**
|
|
1613
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecVarsDependabotRef' to JSON representation.
|
|
1614
|
+
*/
|
|
1615
|
+
export declare function toJson_FirestartrGithubRepositorySpecVarsDependabotRef(obj: FirestartrGithubRepositorySpecVarsDependabotRef | undefined): Record<string, any> | undefined;
|
|
1616
|
+
/**
|
|
1617
|
+
* @schema FirestartrGithubRepositorySpecVarsCodespacesRef
|
|
1618
|
+
*/
|
|
1619
|
+
export interface FirestartrGithubRepositorySpecVarsCodespacesRef {
|
|
1620
|
+
/**
|
|
1621
|
+
* @schema FirestartrGithubRepositorySpecVarsCodespacesRef#kind
|
|
1622
|
+
*/
|
|
1623
|
+
readonly kind: string;
|
|
1624
|
+
/**
|
|
1625
|
+
* @schema FirestartrGithubRepositorySpecVarsCodespacesRef#name
|
|
1626
|
+
*/
|
|
1627
|
+
readonly name: string;
|
|
1628
|
+
/**
|
|
1629
|
+
* @schema FirestartrGithubRepositorySpecVarsCodespacesRef#key
|
|
1630
|
+
*/
|
|
1631
|
+
readonly key: string;
|
|
1632
|
+
}
|
|
1633
|
+
/**
|
|
1634
|
+
* Converts an object of type 'FirestartrGithubRepositorySpecVarsCodespacesRef' to JSON representation.
|
|
1635
|
+
*/
|
|
1636
|
+
export declare function toJson_FirestartrGithubRepositorySpecVarsCodespacesRef(obj: FirestartrGithubRepositorySpecVarsCodespacesRef | undefined): Record<string, any> | undefined;
|
|
1301
1637
|
/**
|
|
1302
1638
|
* @schema FirestartrGithubRepositorySpecContextBackendRefKind
|
|
1303
1639
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ApiObject, GroupVersionKind } from 'cdk8s';
|
|
2
|
+
import { NamedVars, RepoSecrets } from '../../utils/repositoryClaimUtils';
|
|
2
3
|
import { FirestartrGithubRepositoryProps } from '../../../imports/firestartr.dev';
|
|
3
4
|
import { IUnitializedStateKey } from '../../claims/base';
|
|
4
5
|
import { BaseGithubChart } from './base';
|
|
@@ -14,6 +15,20 @@ export declare class GithubRepositoryChart extends BaseGithubChart {
|
|
|
14
15
|
* @returns Permission[]
|
|
15
16
|
*/
|
|
16
17
|
private createPermissions;
|
|
18
|
+
/**
|
|
19
|
+
* @description This method creates the vars data for the repository
|
|
20
|
+
* @param claim
|
|
21
|
+
* @returns VarsConfiguration
|
|
22
|
+
*/
|
|
23
|
+
private createVars;
|
|
24
|
+
/**
|
|
25
|
+
* @description This method creates the secrets data for the repository
|
|
26
|
+
* @param claim
|
|
27
|
+
* @returns RepoSecretsConfiguration
|
|
28
|
+
*/
|
|
29
|
+
private createRepoSecrets;
|
|
30
|
+
formatVars(blockDefinition: any): NamedVars;
|
|
31
|
+
formatRepoSecrets(blockDefinition: any): RepoSecrets;
|
|
17
32
|
extraCharts(): {
|
|
18
33
|
claim: {
|
|
19
34
|
kind: string;
|
|
@@ -3,3 +3,4 @@ export declare function extractRefs(renderClaims: RenderClaims, kind: string): a
|
|
|
3
3
|
export declare function extractAllRefs(claimData: string): any[];
|
|
4
4
|
export declare function getGroupParentRef(parent: string, references?: any[]): any[];
|
|
5
5
|
export declare function getTfWorkspacesRefs(values: any, references?: any[]): any[];
|
|
6
|
+
export declare function getComponentVarsAndSecretsRefs(parsedClaim: any): string[];
|
|
@@ -45,3 +45,45 @@ export interface CollaboratorPermission {
|
|
|
45
45
|
* @returns string
|
|
46
46
|
*/
|
|
47
47
|
export declare function createCodeOwnersData(claim: any, additionalRules?: any[]): string;
|
|
48
|
+
/**
|
|
49
|
+
* A reference to a secret, which can be an internal or external source.
|
|
50
|
+
*/
|
|
51
|
+
export interface SecretRef {
|
|
52
|
+
kind: 'Secret' | 'ExternalSecret';
|
|
53
|
+
name: string;
|
|
54
|
+
key: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* * A variable definition. It must have a name and can be either a literal
|
|
58
|
+
* * value or a reference to a secret.
|
|
59
|
+
* */
|
|
60
|
+
export type Var = {
|
|
61
|
+
name: string;
|
|
62
|
+
value: string;
|
|
63
|
+
} | {
|
|
64
|
+
name: string;
|
|
65
|
+
ref: SecretRef;
|
|
66
|
+
};
|
|
67
|
+
export type RepoSecret = {
|
|
68
|
+
name: string;
|
|
69
|
+
ref: RepoSecretRef;
|
|
70
|
+
};
|
|
71
|
+
export type NamedVars = Var[];
|
|
72
|
+
export type RepoSecrets = RepoSecret[];
|
|
73
|
+
export interface VarsConfiguration {
|
|
74
|
+
copilot?: NamedVars;
|
|
75
|
+
actions?: NamedVars;
|
|
76
|
+
codespaces?: NamedVars;
|
|
77
|
+
}
|
|
78
|
+
export interface RepoSecretsConfiguration {
|
|
79
|
+
copilot?: RepoSecrets;
|
|
80
|
+
actions?: RepoSecrets;
|
|
81
|
+
codespaces?: RepoSecrets;
|
|
82
|
+
}
|
|
83
|
+
export interface RepoSecretRef {
|
|
84
|
+
kind: 'secretsclaim';
|
|
85
|
+
name: string;
|
|
86
|
+
key: string;
|
|
87
|
+
}
|
|
88
|
+
export declare function isRepoSecretRef(suspectedRef: string): boolean;
|
|
89
|
+
export declare function extractRepoSecretRef(ref: string): RepoSecretRef;
|