@firestartr/cli 1.54.0-snapshot-4 → 1.54.0-snapshot-5
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
|
@@ -356921,6 +356921,49 @@ class PolicyInitializer extends InitializerPatches {
|
|
|
356921
356921
|
PolicyInitializer.applicableKinds = ['TFWorkspaceClaim'];
|
|
356922
356922
|
|
|
356923
356923
|
|
|
356924
|
+
;// CONCATENATED MODULE: ../cdk8s_renderer/src/initializers/metadata.ts
|
|
356925
|
+
|
|
356926
|
+
class MetadataInitializer extends InitializerPatches {
|
|
356927
|
+
constructor() {
|
|
356928
|
+
super(...arguments);
|
|
356929
|
+
this.applicableProviders = ['^catalog'];
|
|
356930
|
+
}
|
|
356931
|
+
async __validate() {
|
|
356932
|
+
return true;
|
|
356933
|
+
}
|
|
356934
|
+
async __patches(claim, _previousCR) {
|
|
356935
|
+
return [
|
|
356936
|
+
{
|
|
356937
|
+
validate(cr) {
|
|
356938
|
+
return true;
|
|
356939
|
+
},
|
|
356940
|
+
apply(cr) {
|
|
356941
|
+
if ('annotations' in claim && typeof claim.annotations === 'object') {
|
|
356942
|
+
cr.metadata = cr.metadata || {};
|
|
356943
|
+
const crAnnotations = cr.metadata.annotations ?? {};
|
|
356944
|
+
cr.metadata.annotations = {
|
|
356945
|
+
...claim.annotations,
|
|
356946
|
+
...crAnnotations,
|
|
356947
|
+
};
|
|
356948
|
+
}
|
|
356949
|
+
return cr;
|
|
356950
|
+
},
|
|
356951
|
+
identify() {
|
|
356952
|
+
return 'initializers/MetadataInitializer';
|
|
356953
|
+
},
|
|
356954
|
+
},
|
|
356955
|
+
];
|
|
356956
|
+
}
|
|
356957
|
+
}
|
|
356958
|
+
MetadataInitializer.applicableKinds = [
|
|
356959
|
+
'ComponentClaim',
|
|
356960
|
+
'GroupClaim',
|
|
356961
|
+
'UserClaim',
|
|
356962
|
+
'TFWorkspaceClaim',
|
|
356963
|
+
'OrgWebhookClaim',
|
|
356964
|
+
];
|
|
356965
|
+
|
|
356966
|
+
|
|
356924
356967
|
;// CONCATENATED MODULE: ../cdk8s_renderer/src/initializers/index.ts
|
|
356925
356968
|
|
|
356926
356969
|
|
|
@@ -356931,12 +356974,14 @@ PolicyInitializer.applicableKinds = ['TFWorkspaceClaim'];
|
|
|
356931
356974
|
|
|
356932
356975
|
|
|
356933
356976
|
|
|
356977
|
+
|
|
356934
356978
|
const INITIALIZERS = [
|
|
356935
356979
|
UUIDInitializer,
|
|
356936
356980
|
InitializerClaimRef,
|
|
356937
356981
|
BackstageInitializer,
|
|
356938
356982
|
PolicyInitializer,
|
|
356939
356983
|
SyncerInitializer,
|
|
356984
|
+
MetadataInitializer,
|
|
356940
356985
|
];
|
|
356941
356986
|
const INITIALIZERS_BY_FILE_NAME = {
|
|
356942
356987
|
[TechnologyInitializer.FILE_NAME()]: TechnologyInitializer,
|
|
@@ -357283,10 +357328,8 @@ class TFWorkspaceNormalizer extends Normalizer {
|
|
|
357283
357328
|
async function normalizeModuleContent(tfRootModulePath) {
|
|
357284
357329
|
let content = '';
|
|
357285
357330
|
const files = {};
|
|
357286
|
-
await crawl(tfRootModulePath,
|
|
357287
|
-
|
|
357288
|
-
(_) => {
|
|
357289
|
-
return true;
|
|
357331
|
+
await crawl(tfRootModulePath, (entry) => {
|
|
357332
|
+
return entry.endsWith('.tf');
|
|
357290
357333
|
}, (entry, data) => {
|
|
357291
357334
|
files[entry] = data;
|
|
357292
357335
|
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { InitializerPatches } from './base';
|
|
2
|
+
export declare class MetadataInitializer extends InitializerPatches {
|
|
3
|
+
applicableProviders: string[];
|
|
4
|
+
static applicableKinds: string[];
|
|
5
|
+
__validate(): Promise<boolean>;
|
|
6
|
+
__patches(claim: any, _previousCR: any): Promise<{
|
|
7
|
+
validate(cr: any): boolean;
|
|
8
|
+
apply(cr: any): any;
|
|
9
|
+
identify(): string;
|
|
10
|
+
}[]>;
|
|
11
|
+
}
|