@firestartr/cli 1.42.1-snapshot-5 → 1.42.1-snapshot-6
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 +0 -20
- package/package.json +1 -1
package/build/index.js
CHANGED
@@ -285869,7 +285869,6 @@ function initVirtualClaims(org) {
|
|
285869
285869
|
PRECALCULATED_VIRTUAL_CLAIMS[`GroupClaim-${org}-all`] = FirestartrAllClaim;
|
285870
285870
|
}
|
285871
285871
|
function isVirtualClaim(kind, name) {
|
285872
|
-
console.log(`Checking ${kind}-${name} agains ${Object.keys(PRECALCULATED_VIRTUAL_CLAIMS)}`);
|
285873
285872
|
return (Object.keys(PRECALCULATED_VIRTUAL_CLAIMS).indexOf(`${kind}-${name}`) !== -1);
|
285874
285873
|
}
|
285875
285874
|
function getVirtualClaim(kind, name) {
|
@@ -287186,7 +287185,6 @@ function extractRefs(renderClaims, kind) {
|
|
287186
287185
|
function extractAllRefs(claimData) {
|
287187
287186
|
const refs = getClaimReferences(claimData);
|
287188
287187
|
const parsedClaim = yaml_dist.parse(claimData);
|
287189
|
-
refs.push(...extractVirtualRefs(parsedClaim));
|
287190
287188
|
switch (parsedClaim.kind) {
|
287191
287189
|
case 'TFWorkspaceClaim': {
|
287192
287190
|
const tfWorkspaceRefs = getTfWorkspacesRefs(parsedClaim.providers.terraform.values);
|
@@ -287207,20 +287205,6 @@ function extractAllRefs(claimData) {
|
|
287207
287205
|
}
|
287208
287206
|
return [...new Set(refs)];
|
287209
287207
|
}
|
287210
|
-
function extractVirtualRefs(parsedClaim) {
|
287211
|
-
const virtualRefs = [];
|
287212
|
-
switch (parsedClaim.kind) {
|
287213
|
-
case 'ComponentClaim': {
|
287214
|
-
if (parsedClaim.providers.github.orgPermissions === 'view' ||
|
287215
|
-
parsedClaim.providers.github.orgPermissions === 'maintain') {
|
287216
|
-
refsExtractor_log(`Adding virtual reference for ${parsedClaim.providers.github.org}-all`);
|
287217
|
-
virtualRefs.push(`GroupClaim-${parsedClaim.providers.github.org}-all`);
|
287218
|
-
}
|
287219
|
-
break;
|
287220
|
-
}
|
287221
|
-
}
|
287222
|
-
return virtualRefs;
|
287223
|
-
}
|
287224
287208
|
function getGroupParentRef(parent, references = []) {
|
287225
287209
|
if (!parent)
|
287226
287210
|
return [];
|
@@ -287331,9 +287315,7 @@ const external_node_child_process_namespaceObject = __WEBPACK_EXTERNAL_createReq
|
|
287331
287315
|
const lazy_loader_log = src_default()('firestartr:renderer:lazy_loader');
|
287332
287316
|
async function loadClaim(claimRef, org, defaults, patchClaim, loadInitializers, loadGlobals, loadOverrides, loadNormalizers, cwd, existingRefs = {}) {
|
287333
287317
|
let result = existingRefs;
|
287334
|
-
lazy_loader_log(`Load reference ${claimRef}`);
|
287335
287318
|
initVirtualClaims(org);
|
287336
|
-
lazy_loader_log(`Load reference (parts) ${claimRef.split(/-/)[0]} ${claimRef.replace(/^[^-]+-/, '')}`);
|
287337
287319
|
// cargas datos con grep
|
287338
287320
|
const claimData = await lazyGetClaim(claimRef.split(/-/)[0], claimRef.replace(/^[^-]+-/, ''), org, cwd);
|
287339
287321
|
const claim = patchClaim(catalog_common.io.fromYaml(claimData), defaults);
|
@@ -287360,7 +287342,6 @@ const LoadedClaims = {};
|
|
287360
287342
|
const VisitedClaims = {};
|
287361
287343
|
async function lazyGetClaim(kind, name, org, cwd) {
|
287362
287344
|
const indice = `${kind}-${name}`;
|
287363
|
-
lazy_loader_log(`Lazy loading ${kind}-${name} with index ${indice}`);
|
287364
287345
|
if (indice in LoadedClaims)
|
287365
287346
|
return LoadedClaims[indice];
|
287366
287347
|
if (isVirtualClaim(kind, name)) {
|
@@ -287449,7 +287430,6 @@ async function setNonVirtualClaimAdditionalData(renderedData, claim, claimRef, l
|
|
287449
287430
|
async function loadVirtualClaim(kind, name, org) {
|
287450
287431
|
const virtualClaim = getVirtualClaim(kind, name);
|
287451
287432
|
const expandedClaim = await virtualClaim.expand({ org });
|
287452
|
-
lazy_loader_log(`Loading virtual claim ${kind} ${name} ${org}`);
|
287453
287433
|
LoadedClaims[`${kind}-${name}`] = catalog_common.io.toYaml(expandedClaim);
|
287454
287434
|
VisitedClaims[`${kind}-${name}`] = 'virtual';
|
287455
287435
|
}
|