@firestartr/cli 2.11.0-objects-in-patches → 2.11.0-objects-in-patches-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js
CHANGED
|
@@ -325009,7 +325009,7 @@ var ajv_default = /*#__PURE__*/__nccwpck_require__.n(dist_ajv);
|
|
|
325009
325009
|
type: 'string',
|
|
325010
325010
|
},
|
|
325011
325011
|
value: {
|
|
325012
|
-
type: 'string',
|
|
325012
|
+
type: ['string', 'object', 'array', 'number', 'boolean', 'null'],
|
|
325013
325013
|
},
|
|
325014
325014
|
},
|
|
325015
325015
|
required: ['name', 'op', 'path'],
|
|
@@ -330250,8 +330250,12 @@ class BaseChart extends lib.Chart {
|
|
|
330250
330250
|
template = await patch.apply(template, this.ctx());
|
|
330251
330251
|
patch.validate(template);
|
|
330252
330252
|
}
|
|
330253
|
+
template = await this.postRenderTransform(template);
|
|
330253
330254
|
return this.instanceApiObject(template);
|
|
330254
330255
|
}
|
|
330256
|
+
async postRenderTransform(template) {
|
|
330257
|
+
return template;
|
|
330258
|
+
}
|
|
330255
330259
|
ctx() {
|
|
330256
330260
|
return new ChartContext(this);
|
|
330257
330261
|
}
|
|
@@ -330560,6 +330564,7 @@ class RepoSecretsSectionChart extends BaseGithubChart {
|
|
|
330560
330564
|
|
|
330561
330565
|
|
|
330562
330566
|
|
|
330567
|
+
|
|
330563
330568
|
class GithubRepositoryChart extends BaseGithubChart {
|
|
330564
330569
|
template() {
|
|
330565
330570
|
const claim = this.get('claim');
|
|
@@ -330633,6 +330638,26 @@ class GithubRepositoryChart extends BaseGithubChart {
|
|
|
330633
330638
|
await this.postRenderSecretsSection(this.get('rendered-cr'));
|
|
330634
330639
|
return this;
|
|
330635
330640
|
}
|
|
330641
|
+
async postRenderTransform(template) {
|
|
330642
|
+
const labels = template?.spec?.repo?.labels;
|
|
330643
|
+
if (Array.isArray(labels)) {
|
|
330644
|
+
const seen = new Map();
|
|
330645
|
+
const deduped = [];
|
|
330646
|
+
for (const label of labels) {
|
|
330647
|
+
const key = String(label.name).trim();
|
|
330648
|
+
if (seen.has(key)) {
|
|
330649
|
+
logger.warn(`[cdk8s-renderer] ${template.metadata?.name ?? ''} duplicate label '${key}' dropped; the first (Claim/CR) declaration wins`);
|
|
330650
|
+
continue;
|
|
330651
|
+
}
|
|
330652
|
+
seen.set(key, true);
|
|
330653
|
+
deduped.push(label);
|
|
330654
|
+
}
|
|
330655
|
+
if (deduped.length !== labels.length) {
|
|
330656
|
+
template.spec.repo.labels = deduped;
|
|
330657
|
+
}
|
|
330658
|
+
}
|
|
330659
|
+
return template;
|
|
330660
|
+
}
|
|
330636
330661
|
gvk() {
|
|
330637
330662
|
return FirestartrGithubRepository.GVK;
|
|
330638
330663
|
}
|
|
@@ -525620,7 +525645,7 @@ const crsStatusSubcommand = {
|
|
|
525620
525645
|
};
|
|
525621
525646
|
|
|
525622
525647
|
;// CONCATENATED MODULE: ./package.json
|
|
525623
|
-
const package_namespaceObject = JSON.parse('{"i8":"
|
|
525648
|
+
const package_namespaceObject = JSON.parse('{"i8":" v2.11.0-objects-in-patches-2"}');
|
|
525624
525649
|
;// CONCATENATED MODULE: ../../package.json
|
|
525625
525650
|
const package_namespaceObject_1 = {"i8":"2.10.0"};
|
|
525626
525651
|
// EXTERNAL MODULE: ../../node_modules/semver/index.js
|
|
@@ -12,6 +12,7 @@ export declare abstract class BaseChart extends Chart {
|
|
|
12
12
|
filteredPatches(patches?: any): any;
|
|
13
13
|
render(): Promise<this>;
|
|
14
14
|
postRenderer(patches: ICustomResourcePatch[]): Promise<ApiObject>;
|
|
15
|
+
postRenderTransform(template: any): Promise<any>;
|
|
15
16
|
ctx(): ChartContext;
|
|
16
17
|
get(k: string): any;
|
|
17
18
|
set(k: string, v: any): void;
|
|
@@ -6,6 +6,7 @@ import { BaseGithubChart } from './base';
|
|
|
6
6
|
export declare class GithubRepositoryChart extends BaseGithubChart {
|
|
7
7
|
template(): FirestartrGithubRepositoryProps | IUnitializedStateKey;
|
|
8
8
|
render(): Promise<this>;
|
|
9
|
+
postRenderTransform(template: any): Promise<any>;
|
|
9
10
|
gvk(): GroupVersionKind;
|
|
10
11
|
postRenderFeatures(cr: any): Promise<void>;
|
|
11
12
|
postRenderSecretsSection(cr: any): Promise<void>;
|