@firestartr/cli 1.41.1 → 1.42.1-snapshot-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 +18 -0
- package/package.json +1 -1
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(`group:${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,6 +287330,7 @@ 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);
|
287319
287335
|
// cargas datos con grep
|
287320
287336
|
const claimData = await lazyGetClaim(claimRef.split(/-/)[0], claimRef.replace(/^[^-]+-/, ''), org, cwd);
|
@@ -287342,6 +287358,7 @@ const LoadedClaims = {};
|
|
287342
287358
|
const VisitedClaims = {};
|
287343
287359
|
async function lazyGetClaim(kind, name, org, cwd) {
|
287344
287360
|
const indice = `${kind}-${name}`;
|
287361
|
+
lazy_loader_log(`Lazy loading ${kind}-${name} with index ${indice}`);
|
287345
287362
|
if (indice in LoadedClaims)
|
287346
287363
|
return LoadedClaims[indice];
|
287347
287364
|
if (isVirtualClaim(kind, name)) {
|
@@ -287430,6 +287447,7 @@ async function setNonVirtualClaimAdditionalData(renderedData, claim, claimRef, l
|
|
287430
287447
|
async function loadVirtualClaim(kind, name, org) {
|
287431
287448
|
const virtualClaim = getVirtualClaim(kind, name);
|
287432
287449
|
const expandedClaim = await virtualClaim.expand({ org });
|
287450
|
+
lazy_loader_log(`Loading virtual claim ${kind} ${name} ${org}`);
|
287433
287451
|
LoadedClaims[`${kind}-${name}`] = catalog_common.io.toYaml(expandedClaim);
|
287434
287452
|
VisitedClaims[`${kind}-${name}`] = 'virtual';
|
287435
287453
|
}
|