@firestartr/cli 1.41.1 → 1.42.0
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
@@ -287185,6 +287185,7 @@ function extractRefs(renderClaims, kind) {
|
|
287185
287185
|
function extractAllRefs(claimData) {
|
287186
287186
|
const refs = getClaimReferences(claimData);
|
287187
287187
|
const parsedClaim = yaml_dist.parse(claimData);
|
287188
|
+
refs.push(...extractVirtualRefs(parsedClaim));
|
287188
287189
|
switch (parsedClaim.kind) {
|
287189
287190
|
case 'TFWorkspaceClaim': {
|
287190
287191
|
const tfWorkspaceRefs = getTfWorkspacesRefs(parsedClaim.providers.terraform.values);
|
@@ -287205,6 +287206,20 @@ function extractAllRefs(claimData) {
|
|
287205
287206
|
}
|
287206
287207
|
return [...new Set(refs)];
|
287207
287208
|
}
|
287209
|
+
function extractVirtualRefs(parsedClaim) {
|
287210
|
+
const virtualRefs = [];
|
287211
|
+
switch (parsedClaim.kind) {
|
287212
|
+
case 'ComponentClaim': {
|
287213
|
+
if (parsedClaim.providers.github.orgPermissions === 'view' ||
|
287214
|
+
parsedClaim.providers.github.orgPermissions === 'maintain') {
|
287215
|
+
refsExtractor_log(`Adding virtual reference for ${parsedClaim.providers.github.org}-all`);
|
287216
|
+
virtualRefs.push(`GroupClaim-${parsedClaim.providers.github.org}-all`);
|
287217
|
+
}
|
287218
|
+
break;
|
287219
|
+
}
|
287220
|
+
}
|
287221
|
+
return virtualRefs;
|
287222
|
+
}
|
287208
287223
|
function getGroupParentRef(parent, references = []) {
|
287209
287224
|
if (!parent)
|
287210
287225
|
return [];
|
@@ -287315,7 +287330,9 @@ const external_node_child_process_namespaceObject = __WEBPACK_EXTERNAL_createReq
|
|
287315
287330
|
const lazy_loader_log = src_default()('firestartr:renderer:lazy_loader');
|
287316
287331
|
async function loadClaim(claimRef, org, defaults, patchClaim, loadInitializers, loadGlobals, loadOverrides, loadNormalizers, cwd, existingRefs = {}) {
|
287317
287332
|
let result = existingRefs;
|
287333
|
+
lazy_loader_log(`Load reference ${claimRef}`);
|
287318
287334
|
initVirtualClaims(org);
|
287335
|
+
lazy_loader_log(`Load reference (parts) ${claimRef.split(/-/)[0]} ${claimRef.replace(/^[^-]+-/, '')}`);
|
287319
287336
|
// cargas datos con grep
|
287320
287337
|
const claimData = await lazyGetClaim(claimRef.split(/-/)[0], claimRef.replace(/^[^-]+-/, ''), org, cwd);
|
287321
287338
|
const claim = patchClaim(catalog_common.io.fromYaml(claimData), defaults);
|
@@ -287342,6 +287359,7 @@ const LoadedClaims = {};
|
|
287342
287359
|
const VisitedClaims = {};
|
287343
287360
|
async function lazyGetClaim(kind, name, org, cwd) {
|
287344
287361
|
const indice = `${kind}-${name}`;
|
287362
|
+
lazy_loader_log(`Lazy loading ${kind}-${name} with index ${indice}`);
|
287345
287363
|
if (indice in LoadedClaims)
|
287346
287364
|
return LoadedClaims[indice];
|
287347
287365
|
if (isVirtualClaim(kind, name)) {
|
@@ -287430,6 +287448,7 @@ async function setNonVirtualClaimAdditionalData(renderedData, claim, claimRef, l
|
|
287430
287448
|
async function loadVirtualClaim(kind, name, org) {
|
287431
287449
|
const virtualClaim = getVirtualClaim(kind, name);
|
287432
287450
|
const expandedClaim = await virtualClaim.expand({ org });
|
287451
|
+
lazy_loader_log(`Loading virtual claim ${kind} ${name} ${org}`);
|
287433
287452
|
LoadedClaims[`${kind}-${name}`] = catalog_common.io.toYaml(expandedClaim);
|
287434
287453
|
VisitedClaims[`${kind}-${name}`] = 'virtual';
|
287435
287454
|
}
|
@@ -428,7 +428,7 @@ export declare function getBranch(repo: string, branch: string, owner?: string):
|
|
428
428
|
verified_at: string;
|
429
429
|
};
|
430
430
|
};
|
431
|
-
author: {
|
431
|
+
author: Record<string, never> | {
|
432
432
|
name?: string;
|
433
433
|
email?: string;
|
434
434
|
login: string;
|
@@ -451,8 +451,8 @@ export declare function getBranch(repo: string, branch: string, owner?: string):
|
|
451
451
|
site_admin: boolean;
|
452
452
|
starred_at?: string;
|
453
453
|
user_view_type?: string;
|
454
|
-
}
|
455
|
-
committer: {
|
454
|
+
};
|
455
|
+
committer: Record<string, never> | {
|
456
456
|
name?: string;
|
457
457
|
email?: string;
|
458
458
|
login: string;
|
@@ -475,7 +475,7 @@ export declare function getBranch(repo: string, branch: string, owner?: string):
|
|
475
475
|
site_admin: boolean;
|
476
476
|
starred_at?: string;
|
477
477
|
user_view_type?: string;
|
478
|
-
}
|
478
|
+
};
|
479
479
|
parents: {
|
480
480
|
sha: string;
|
481
481
|
url: string;
|