@firestartr/cli 1.59.0-snapshot-13 → 1.59.0-snapshot-15
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
|
@@ -366104,7 +366104,7 @@ function importedsRefsWalker(renderClaim) {
|
|
|
366104
366104
|
// the property can be another object, an array, or a primitive value
|
|
366105
366105
|
// has a function to resolve
|
|
366106
366106
|
// has to be an array of functions with
|
|
366107
|
-
// the following signature: (solver:
|
|
366107
|
+
// the following signature: (solver: (type: string, value: string) => Promise<string>) => Promise<void>
|
|
366108
366108
|
const symbolsToResolve = [];
|
|
366109
366109
|
walk(renderClaim.claim, symbolsToResolve, renderClaim);
|
|
366110
366110
|
return symbolsToResolve;
|
|
@@ -366132,14 +366132,17 @@ function walkObject(obj, symbolsToResolve, renderClaim) {
|
|
|
366132
366132
|
continue;
|
|
366133
366133
|
}
|
|
366134
366134
|
const type = match.groups?.type;
|
|
366135
|
-
const
|
|
366135
|
+
const capturedKey = key;
|
|
366136
366136
|
if (type) {
|
|
366137
366137
|
cdk8s_renderer_src_logger.info(`Found an imported-ref in the claim with key ${key} and value ${value}. This will be resolved later.`);
|
|
366138
366138
|
symbolsToResolve.push(async (solver) => {
|
|
366139
|
-
const resolvedValue = await solver(type, match.groups?.value);
|
|
366139
|
+
const resolvedValue = await solver(type, match.groups?.value ?? '');
|
|
366140
366140
|
cdk8s_renderer_src_logger.info(`Resolved imported-ref with key ${key} and value ${value} to ${resolvedValue} in path ${renderClaim.claimPath}`);
|
|
366141
|
-
obj[
|
|
366142
|
-
|
|
366141
|
+
obj[capturedKey] = resolvedValue;
|
|
366142
|
+
if (!renderClaim.claimPath) {
|
|
366143
|
+
throw new Error(`claimPath is required to write the claim after resolving imported refs in ${capturedKey}`);
|
|
366144
|
+
}
|
|
366145
|
+
await catalog_common.io.writeClaim(renderClaim.claim, renderClaim.claimPath);
|
|
366143
366146
|
});
|
|
366144
366147
|
}
|
|
366145
366148
|
}
|
|
@@ -366159,12 +366162,15 @@ function walkArray(arr, symbolsToResolve, renderClaim) {
|
|
|
366159
366162
|
cdk8s_renderer_src_logger.info(`Found an imported-ref in the claim with value ${value}. This will be resolved later.`);
|
|
366160
366163
|
const type = match.groups?.type;
|
|
366161
366164
|
if (type) {
|
|
366162
|
-
const
|
|
366165
|
+
const capturedIndex = i;
|
|
366163
366166
|
symbolsToResolve.push(async (solver) => {
|
|
366164
|
-
const resolvedValue = await solver(type, match.groups?.value);
|
|
366167
|
+
const resolvedValue = await solver(type, match.groups?.value ?? '');
|
|
366165
366168
|
cdk8s_renderer_src_logger.info(`Resolved imported-ref with value ${value} to ${resolvedValue} in path ${renderClaim.claimPath}`);
|
|
366166
|
-
arr[
|
|
366167
|
-
|
|
366169
|
+
arr[capturedIndex] = resolvedValue;
|
|
366170
|
+
if (!renderClaim.claimPath) {
|
|
366171
|
+
throw new Error(`claimPath is required to write the claim after resolving imported refs in ${capturedIndex}`);
|
|
366172
|
+
}
|
|
366173
|
+
await catalog_common.io.writeClaim(renderClaim.claim, renderClaim.claimPath);
|
|
366168
366174
|
});
|
|
366169
366175
|
}
|
|
366170
366176
|
}
|
|
@@ -366178,6 +366184,7 @@ function walkArray(arr, symbolsToResolve, renderClaim) {
|
|
|
366178
366184
|
|
|
366179
366185
|
|
|
366180
366186
|
|
|
366187
|
+
|
|
366181
366188
|
/*
|
|
366182
366189
|
* Function called when rendering from the importer class.
|
|
366183
366190
|
*
|
|
@@ -366196,10 +366203,16 @@ async function renderFromImports(rClaims, crs = {}, catalogOutputDir = '/tmp/.ca
|
|
|
366196
366203
|
const fSolver = (type, value) => {
|
|
366197
366204
|
return solver(type, value, rClaims);
|
|
366198
366205
|
};
|
|
366199
|
-
|
|
366200
|
-
|
|
366201
|
-
const
|
|
366202
|
-
|
|
366206
|
+
try {
|
|
366207
|
+
// we need to expand the imported-refs
|
|
366208
|
+
for (const renderClaim of Object.values(rClaims)) {
|
|
366209
|
+
const symbolsToResolve = importedsRefsWalker(renderClaim);
|
|
366210
|
+
await Promise.all(symbolsToResolve.map((s) => s(fSolver)));
|
|
366211
|
+
}
|
|
366212
|
+
}
|
|
366213
|
+
catch (e) {
|
|
366214
|
+
cdk8s_renderer_src_logger.error(`Error while resolving imported-refs: ${e.message}`);
|
|
366215
|
+
throw new Error(`Error while resolving imported-refs: ${e.message}`);
|
|
366203
366216
|
}
|
|
366204
366217
|
const catalogScope = new lib.App({
|
|
366205
366218
|
outdir: catalogOutputDir,
|
|
@@ -370398,7 +370411,7 @@ function provisionCodeowners(scope, repo, branchDefault, fsGithubRepository) {
|
|
|
370398
370411
|
const config = {
|
|
370399
370412
|
dependsOn: [repo, branchDefault],
|
|
370400
370413
|
branch: fsGithubRepository.spec.repo.defaultBranch,
|
|
370401
|
-
commitMessage: '
|
|
370414
|
+
commitMessage: 'ci: provision CODEOWNERS file',
|
|
370402
370415
|
content: fsGithubRepository.spec.repo.codeowners,
|
|
370403
370416
|
file: '.github/CODEOWNERS',
|
|
370404
370417
|
overwriteOnCreate: true,
|
|
@@ -370704,7 +370717,7 @@ function provisionFeatureFiles(scope, feature) {
|
|
|
370704
370717
|
: {};
|
|
370705
370718
|
const repoConfig = {
|
|
370706
370719
|
branch: file.targetBranch || defaultBranchName,
|
|
370707
|
-
commitMessage: `
|
|
370720
|
+
commitMessage: `ci: ${feature.spec.type} ${feature.spec.version}`,
|
|
370708
370721
|
content: cdktf_lib.Fn.base64decode(file.content),
|
|
370709
370722
|
file: file.path,
|
|
370710
370723
|
repository: feature.resolveRef(feature.spec.repositoryTarget.ref),
|
|
@@ -376739,7 +376752,7 @@ const crs_analyzerSubcommand = {
|
|
|
376739
376752
|
};
|
|
376740
376753
|
|
|
376741
376754
|
;// CONCATENATED MODULE: ./package.json
|
|
376742
|
-
const package_namespaceObject = JSON.parse('{"i8":"1.59.0-snapshot-
|
|
376755
|
+
const package_namespaceObject = JSON.parse('{"i8":"1.59.0-snapshot-15"}');
|
|
376743
376756
|
;// CONCATENATED MODULE: ../../package.json
|
|
376744
376757
|
const package_namespaceObject_1 = {"i8":"1.58.0"};
|
|
376745
376758
|
;// CONCATENATED MODULE: ./src/subcommands/index.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { RenderClaimData } from './types';
|
|
2
|
-
type SymbolResolver = (
|
|
2
|
+
type SymbolResolver = (solver: (type: string, value: string) => Promise<string>) => Promise<void>;
|
|
3
3
|
export declare function importedsRefsWalker(renderClaim: RenderClaimData): SymbolResolver[];
|
|
4
4
|
export {};
|