@firestartr/cli 1.52.0-snapshot-2 → 1.52.0-snapshot-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js
CHANGED
|
@@ -364194,7 +364194,6 @@ class GithubRepositoryChart extends BaseGithubChart {
|
|
|
364194
364194
|
actions,
|
|
364195
364195
|
permissions: this.createPermissions(claim),
|
|
364196
364196
|
vars: this.createVars(claim),
|
|
364197
|
-
secrets: this.createRepoSecrets(claim),
|
|
364198
364197
|
pages: claim.providers.github.pages,
|
|
364199
364198
|
branchProtections: [],
|
|
364200
364199
|
writeConnectionSecretToRef: {
|
|
@@ -364296,27 +364295,6 @@ class GithubRepositoryChart extends BaseGithubChart {
|
|
|
364296
364295
|
}
|
|
364297
364296
|
return vars;
|
|
364298
364297
|
}
|
|
364299
|
-
/**
|
|
364300
|
-
* @description This method creates the secrets data for the repository
|
|
364301
|
-
* @param claim
|
|
364302
|
-
* @returns RepoSecretsConfiguration
|
|
364303
|
-
*/
|
|
364304
|
-
createRepoSecrets(claim) {
|
|
364305
|
-
const repoSecrets = {};
|
|
364306
|
-
const repoSecretsDefinitions = claim.providers?.github?.secrets;
|
|
364307
|
-
if (repoSecretsDefinitions) {
|
|
364308
|
-
if (repoSecretsDefinitions.actions) {
|
|
364309
|
-
repoSecrets.actions = this.formatRepoSecrets(repoSecretsDefinitions.actions);
|
|
364310
|
-
}
|
|
364311
|
-
if (repoSecretsDefinitions.codespaces) {
|
|
364312
|
-
repoSecrets.codespaces = this.formatRepoSecrets(repoSecretsDefinitions.codespaces);
|
|
364313
|
-
}
|
|
364314
|
-
if (repoSecretsDefinitions.dependabot) {
|
|
364315
|
-
repoSecrets.dependabot = this.formatRepoSecrets(repoSecretsDefinitions.dependabot);
|
|
364316
|
-
}
|
|
364317
|
-
}
|
|
364318
|
-
return repoSecrets;
|
|
364319
|
-
}
|
|
364320
364298
|
formatVars(blockDefinition) {
|
|
364321
364299
|
return blockDefinition.map((varDef) => {
|
|
364322
364300
|
if (isRepoSecretRef(varDef.value)) {
|
|
@@ -364338,24 +364316,6 @@ class GithubRepositoryChart extends BaseGithubChart {
|
|
|
364338
364316
|
}
|
|
364339
364317
|
});
|
|
364340
364318
|
}
|
|
364341
|
-
formatRepoSecrets(blockDefinition) {
|
|
364342
|
-
return blockDefinition.map((secretDef) => {
|
|
364343
|
-
if (isRepoSecretRef(secretDef.value)) {
|
|
364344
|
-
const parts = secretDef.value.split(':');
|
|
364345
|
-
return {
|
|
364346
|
-
name: secretDef.name,
|
|
364347
|
-
ref: {
|
|
364348
|
-
kind: 'Secret',
|
|
364349
|
-
name: parts[2],
|
|
364350
|
-
key: parts[3],
|
|
364351
|
-
},
|
|
364352
|
-
};
|
|
364353
|
-
}
|
|
364354
|
-
else {
|
|
364355
|
-
throw new Error(`RepoSecret value is not correct: ${secretDef.value}`);
|
|
364356
|
-
}
|
|
364357
|
-
});
|
|
364358
|
-
}
|
|
364359
364319
|
extraCharts() {
|
|
364360
364320
|
const charts = [this.get('secrets_section') ?? undefined];
|
|
364361
364321
|
return charts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiObject, GroupVersionKind } from 'cdk8s';
|
|
2
|
-
import { NamedVars
|
|
2
|
+
import { NamedVars } from '../../utils/repositoryClaimUtils';
|
|
3
3
|
import { FirestartrGithubRepositoryProps } from '../../../imports/firestartr.dev';
|
|
4
4
|
import { IUnitializedStateKey } from '../../claims/base';
|
|
5
5
|
import { BaseGithubChart } from './base';
|
|
@@ -22,14 +22,7 @@ export declare class GithubRepositoryChart extends BaseGithubChart {
|
|
|
22
22
|
* @returns VarsConfiguration
|
|
23
23
|
*/
|
|
24
24
|
private createVars;
|
|
25
|
-
/**
|
|
26
|
-
* @description This method creates the secrets data for the repository
|
|
27
|
-
* @param claim
|
|
28
|
-
* @returns RepoSecretsConfiguration
|
|
29
|
-
*/
|
|
30
|
-
private createRepoSecrets;
|
|
31
25
|
formatVars(blockDefinition: any): NamedVars;
|
|
32
|
-
formatRepoSecrets(blockDefinition: any): RepoSecrets;
|
|
33
26
|
extraCharts(): {
|
|
34
27
|
claim: {
|
|
35
28
|
kind: string;
|