@firestartr/cli 1.39.2-SNAPSHOT → 1.39.3-SNAPSHOT
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
|
@@ -287249,37 +287249,27 @@ const external_node_child_process_namespaceObject = __WEBPACK_EXTERNAL_createReq
|
|
|
287249
287249
|
|
|
287250
287250
|
|
|
287251
287251
|
const lazy_loader_log = src_default()('firestartr:renderer:lazy_loader');
|
|
287252
|
-
async function loadClaim(claimRef, defaults, patchClaim, loadInitializers, loadGlobals, loadOverrides, loadNormalizers, cwd) {
|
|
287253
|
-
|
|
287254
|
-
|
|
287255
|
-
|
|
287256
|
-
|
|
287257
|
-
|
|
287258
|
-
|
|
287259
|
-
|
|
287260
|
-
|
|
287261
|
-
|
|
287262
|
-
|
|
287263
|
-
|
|
287264
|
-
|
|
287265
|
-
|
|
287266
|
-
|
|
287267
|
-
|
|
287268
|
-
|
|
287269
|
-
|
|
287270
|
-
result = lodash_default().merge(result, resolvedReferences);
|
|
287271
|
-
}
|
|
287272
|
-
}
|
|
287273
|
-
return result;
|
|
287274
|
-
}
|
|
287275
|
-
catch (e) {
|
|
287276
|
-
if (e.message.indexOf(claimRef) > -1) {
|
|
287277
|
-
throw new Error(`Error when loading main claim ${claimRef}: ${e.message}`);
|
|
287278
|
-
}
|
|
287279
|
-
else {
|
|
287280
|
-
throw new Error(`Error when loading dependency: ${e.message}`);
|
|
287252
|
+
async function loadClaim(claimRef, defaults, patchClaim, loadInitializers, loadGlobals, loadOverrides, loadNormalizers, cwd, existingRefs = {}) {
|
|
287253
|
+
let result = existingRefs;
|
|
287254
|
+
// cargas datos con grep
|
|
287255
|
+
const claimData = await lazyGetClaim(claimRef.split(/-/)[0], claimRef.replace(/^[^-]+-/, ''), cwd);
|
|
287256
|
+
const claim = patchClaim(catalog_common.io.fromYaml(claimData), defaults);
|
|
287257
|
+
result[claimRef] = {};
|
|
287258
|
+
result[claimRef]['claim'] = claim;
|
|
287259
|
+
result[claimRef]['claimPath'] = VisitedClaims[claimRef];
|
|
287260
|
+
result[claimRef]['initializers'] = await loadInitializers(claim);
|
|
287261
|
+
result[claimRef]['globals'] = await loadGlobals(claim);
|
|
287262
|
+
result[claimRef]['overrides'] = loadOverrides(claim);
|
|
287263
|
+
result[claimRef]['normalizers'] = await loadNormalizers(claim, result[claimRef]['claimPath']);
|
|
287264
|
+
const claimKind = claim.kind;
|
|
287265
|
+
const references = extractAllRefs(claimData);
|
|
287266
|
+
for (const ref of references) {
|
|
287267
|
+
if (!result[ref]) {
|
|
287268
|
+
const resolvedReferences = await loadClaim(ref, defaults, patchClaim, loadInitializers, loadGlobals, loadOverrides, loadNormalizers, cwd, result);
|
|
287269
|
+
result = lodash_default().merge(result, resolvedReferences);
|
|
287281
287270
|
}
|
|
287282
287271
|
}
|
|
287272
|
+
return result;
|
|
287283
287273
|
}
|
|
287284
287274
|
const LoadedClaims = {};
|
|
287285
287275
|
const VisitedClaims = {};
|
|
@@ -293186,7 +293176,7 @@ async function runRenderer(globalsPath, initializersPath, claimsPath, crsPath, c
|
|
|
293186
293176
|
});
|
|
293187
293177
|
let claimRefsList = [];
|
|
293188
293178
|
if (claimRefs) {
|
|
293189
|
-
claimRefsList = claimRefs.replace(/\s
|
|
293179
|
+
claimRefsList = claimRefs.replace(/\s/g, '').split(',');
|
|
293190
293180
|
}
|
|
293191
293181
|
await renderer_render(catalogApp, firestartrApp, validateReferentialIntegrity === 'enabled' ? true : false, claimRefsList);
|
|
293192
293182
|
catalogApp.synth();
|
|
@@ -2,4 +2,4 @@ import { InitializerPatches } from '../initializers/base';
|
|
|
2
2
|
import { GlobalSection } from '../globals/base';
|
|
3
3
|
import { OverriderPatches } from '../overriders/base';
|
|
4
4
|
import { Normalizer } from '../normalizers/base';
|
|
5
|
-
export declare function loadClaim(claimRef: string, defaults: any, patchClaim: (claim: any, defaults: any) => any, loadInitializers: (claim: any) => Promise<InitializerPatches[]>, loadGlobals: (claim: any) => Promise<GlobalSection[]>, loadOverrides: (claim: any) => OverriderPatches[], loadNormalizers: (claim: any, path: string) => Promise<Normalizer[]>, cwd?: string): Promise<
|
|
5
|
+
export declare function loadClaim(claimRef: string, defaults: any, patchClaim: (claim: any, defaults: any) => any, loadInitializers: (claim: any) => Promise<InitializerPatches[]>, loadGlobals: (claim: any) => Promise<GlobalSection[]>, loadOverrides: (claim: any) => OverriderPatches[], loadNormalizers: (claim: any, path: string) => Promise<Normalizer[]>, cwd?: string, existingRefs?: any): Promise<any>;
|
|
@@ -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;
|