@living-architecture/riviere-cli 0.8.11 → 0.8.13
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/dist/bin.js +89 -67
- package/dist/index.js +88 -66
- package/package.json +6 -6
package/dist/bin.js
CHANGED
|
@@ -28853,50 +28853,48 @@ function traceNonComponent(project, componentIndex, source, typeName, calledMeth
|
|
|
28853
28853
|
}
|
|
28854
28854
|
|
|
28855
28855
|
// ../riviere-extract-ts/dist/features/extraction/domain/connection-detection/async-detection/detect-publish-connections.js
|
|
28856
|
-
function detectPublishConnections(
|
|
28856
|
+
function detectPublishConnections(components, options) {
|
|
28857
28857
|
const publishers = components.filter((c) => c.type === "eventPublisher");
|
|
28858
28858
|
const events = components.filter((c) => c.type === "event");
|
|
28859
28859
|
const repository = options.repository;
|
|
28860
|
-
return publishers.flatMap((publisher) =>
|
|
28861
|
-
|
|
28862
|
-
function extractPublisherLinks(project, publisher, events, options, repository) {
|
|
28863
|
-
const publishedEventType = publisher.metadata["publishedEventType"];
|
|
28864
|
-
if (typeof publishedEventType === "string") {
|
|
28860
|
+
return publishers.flatMap((publisher) => {
|
|
28861
|
+
const publishedEventType = publisher.metadata["publishedEventType"];
|
|
28865
28862
|
const sourceLocation = {
|
|
28866
28863
|
repository,
|
|
28867
28864
|
filePath: publisher.location.file,
|
|
28868
28865
|
lineNumber: publisher.location.line
|
|
28869
28866
|
};
|
|
28870
|
-
|
|
28871
|
-
|
|
28872
|
-
const classDecl = findClassInProject(project, publisher);
|
|
28873
|
-
if (classDecl === void 0) {
|
|
28874
|
-
return [];
|
|
28875
|
-
}
|
|
28876
|
-
const methods = classDecl.getMethods();
|
|
28877
|
-
return methods.flatMap((method) => {
|
|
28878
|
-
const firstParam = method.getParameters()[0];
|
|
28879
|
-
if (firstParam === void 0) {
|
|
28880
|
-
return [];
|
|
28867
|
+
if (typeof publishedEventType !== "string") {
|
|
28868
|
+
return [handleMissingMetadata(publisher, options, sourceLocation)];
|
|
28881
28869
|
}
|
|
28882
|
-
|
|
28883
|
-
const paramTypeName = stripGenericArgs(paramType.getText(firstParam));
|
|
28884
|
-
const sourceLocation = {
|
|
28885
|
-
repository,
|
|
28886
|
-
filePath: publisher.location.file,
|
|
28887
|
-
lineNumber: method.getStartLineNumber()
|
|
28888
|
-
};
|
|
28889
|
-
return resolvePublishTarget(publisher, paramTypeName, events, options, sourceLocation);
|
|
28870
|
+
return resolvePublishTarget(publisher, publishedEventType, events, options, sourceLocation);
|
|
28890
28871
|
});
|
|
28891
28872
|
}
|
|
28892
|
-
function
|
|
28893
|
-
|
|
28873
|
+
function handleMissingMetadata(publisher, options, sourceLocation) {
|
|
28874
|
+
if (options.strict) {
|
|
28875
|
+
throw new ConnectionDetectionError({
|
|
28876
|
+
file: sourceLocation.filePath,
|
|
28877
|
+
line: sourceLocation.lineNumber,
|
|
28878
|
+
typeName: publisher.name,
|
|
28879
|
+
reason: 'eventPublisher is missing required "publishedEventType" metadata'
|
|
28880
|
+
});
|
|
28881
|
+
}
|
|
28882
|
+
return {
|
|
28883
|
+
source: componentIdentity(publisher),
|
|
28884
|
+
target: "_unresolved",
|
|
28885
|
+
type: "async",
|
|
28886
|
+
sourceLocation,
|
|
28887
|
+
_uncertain: `eventPublisher "${publisher.name}" is missing required "publishedEventType" metadata`
|
|
28888
|
+
};
|
|
28889
|
+
}
|
|
28890
|
+
function resolvePublishTarget(publisher, publishedEventType, events, options, sourceLocation) {
|
|
28891
|
+
const matchingEvents = events.filter((e) => e.metadata["eventName"] === publishedEventType);
|
|
28894
28892
|
if (matchingEvents.length === 0) {
|
|
28895
|
-
return [handleNoMatch(publisher,
|
|
28893
|
+
return [handleNoMatch(publisher, publishedEventType, options, sourceLocation)];
|
|
28896
28894
|
}
|
|
28897
28895
|
if (matchingEvents.length > 1) {
|
|
28898
28896
|
return [
|
|
28899
|
-
handleAmbiguousMatch(publisher,
|
|
28897
|
+
handleAmbiguousMatch(publisher, publishedEventType, matchingEvents.length, options, sourceLocation)
|
|
28900
28898
|
];
|
|
28901
28899
|
}
|
|
28902
28900
|
return matchingEvents.map((event) => ({
|
|
@@ -28906,13 +28904,13 @@ function resolvePublishTarget(publisher, paramTypeName, events, options, sourceL
|
|
|
28906
28904
|
sourceLocation
|
|
28907
28905
|
}));
|
|
28908
28906
|
}
|
|
28909
|
-
function handleAmbiguousMatch(publisher,
|
|
28907
|
+
function handleAmbiguousMatch(publisher, publishedEventType, matchCount, options, sourceLocation) {
|
|
28910
28908
|
if (options.strict) {
|
|
28911
28909
|
throw new ConnectionDetectionError({
|
|
28912
28910
|
file: sourceLocation.filePath,
|
|
28913
28911
|
line: sourceLocation.lineNumber,
|
|
28914
28912
|
typeName: publisher.name,
|
|
28915
|
-
reason: `
|
|
28913
|
+
reason: `publishedEventType "${publishedEventType}" matches ${matchCount} Event components (ambiguous)`
|
|
28916
28914
|
});
|
|
28917
28915
|
}
|
|
28918
28916
|
return {
|
|
@@ -28920,16 +28918,16 @@ function handleAmbiguousMatch(publisher, paramTypeName, matchCount, options, sou
|
|
|
28920
28918
|
target: "_unresolved",
|
|
28921
28919
|
type: "async",
|
|
28922
28920
|
sourceLocation,
|
|
28923
|
-
_uncertain: `ambiguous: ${matchCount} events match
|
|
28921
|
+
_uncertain: `ambiguous: ${matchCount} events match publishedEventType: ${publishedEventType}`
|
|
28924
28922
|
};
|
|
28925
28923
|
}
|
|
28926
|
-
function handleNoMatch(publisher,
|
|
28924
|
+
function handleNoMatch(publisher, publishedEventType, options, sourceLocation) {
|
|
28927
28925
|
if (options.strict) {
|
|
28928
28926
|
throw new ConnectionDetectionError({
|
|
28929
28927
|
file: sourceLocation.filePath,
|
|
28930
28928
|
line: sourceLocation.lineNumber,
|
|
28931
28929
|
typeName: publisher.name,
|
|
28932
|
-
reason: `
|
|
28930
|
+
reason: `publishedEventType "${publishedEventType}" does not match any Event component`
|
|
28933
28931
|
});
|
|
28934
28932
|
}
|
|
28935
28933
|
return {
|
|
@@ -28937,7 +28935,7 @@ function handleNoMatch(publisher, paramTypeName, options, sourceLocation) {
|
|
|
28937
28935
|
target: "_unresolved",
|
|
28938
28936
|
type: "async",
|
|
28939
28937
|
sourceLocation,
|
|
28940
|
-
_uncertain: `no event found for
|
|
28938
|
+
_uncertain: `no event found for publishedEventType: ${publishedEventType}`
|
|
28941
28939
|
};
|
|
28942
28940
|
}
|
|
28943
28941
|
|
|
@@ -29246,8 +29244,7 @@ function deduplicateCrossStrategy(links) {
|
|
|
29246
29244
|
}
|
|
29247
29245
|
return [...seen.values()];
|
|
29248
29246
|
}
|
|
29249
|
-
function
|
|
29250
|
-
const totalStart = performance.now();
|
|
29247
|
+
function detectPerModuleConnections(project, components, options, globMatcher) {
|
|
29251
29248
|
const setupStart = performance.now();
|
|
29252
29249
|
const componentIndex = new ComponentIndex(components);
|
|
29253
29250
|
const sourceFilePaths = computeFilteredFilePaths(project, options.moduleGlobs, globMatcher);
|
|
@@ -29261,43 +29258,50 @@ function detectConnections(project, components, options, globMatcher) {
|
|
|
29261
29258
|
repository
|
|
29262
29259
|
});
|
|
29263
29260
|
const callGraphMs = performance.now() - callGraphStart;
|
|
29261
|
+
const patterns = options.patterns ?? [];
|
|
29262
|
+
const { configurableLinks, configurableMs } = runConfigurableDetection(project, patterns, components, componentIndex, strict, repository);
|
|
29263
|
+
return {
|
|
29264
|
+
links: [...syncLinks, ...configurableLinks],
|
|
29265
|
+
timings: {
|
|
29266
|
+
callGraphMs,
|
|
29267
|
+
configurableMs,
|
|
29268
|
+
setupMs
|
|
29269
|
+
}
|
|
29270
|
+
};
|
|
29271
|
+
}
|
|
29272
|
+
function detectCrossModuleConnections(allComponents, options) {
|
|
29273
|
+
const strict = options.allowIncomplete !== true;
|
|
29274
|
+
const repository = options.repository;
|
|
29264
29275
|
const asyncStart = performance.now();
|
|
29265
|
-
const publishLinks = detectPublishConnections(
|
|
29276
|
+
const publishLinks = detectPublishConnections(allComponents, {
|
|
29266
29277
|
strict,
|
|
29267
29278
|
repository
|
|
29268
29279
|
});
|
|
29269
|
-
const subscribeLinks = detectSubscribeConnections(
|
|
29280
|
+
const subscribeLinks = detectSubscribeConnections(allComponents, {
|
|
29270
29281
|
strict,
|
|
29271
29282
|
repository
|
|
29272
29283
|
});
|
|
29273
29284
|
const asyncDetectionMs = performance.now() - asyncStart;
|
|
29274
|
-
|
|
29275
|
-
|
|
29276
|
-
|
|
29277
|
-
|
|
29278
|
-
|
|
29279
|
-
|
|
29280
|
-
|
|
29285
|
+
return {
|
|
29286
|
+
links: [...publishLinks, ...subscribeLinks],
|
|
29287
|
+
timings: { asyncDetectionMs }
|
|
29288
|
+
};
|
|
29289
|
+
}
|
|
29290
|
+
function runConfigurableDetection(project, patterns, components, componentIndex, strict, repository) {
|
|
29291
|
+
if (patterns.length === 0) {
|
|
29281
29292
|
return {
|
|
29282
|
-
configurableLinks:
|
|
29283
|
-
configurableMs:
|
|
29293
|
+
configurableLinks: [],
|
|
29294
|
+
configurableMs: 0
|
|
29284
29295
|
};
|
|
29285
|
-
}
|
|
29286
|
-
|
|
29287
|
-
|
|
29288
|
-
|
|
29289
|
-
|
|
29290
|
-
|
|
29291
|
-
const deduplicatedLinks = deduplicateCrossStrategy(allLinks);
|
|
29296
|
+
}
|
|
29297
|
+
const configurableStart = performance.now();
|
|
29298
|
+
const links = detectConfigurableConnections(project, patterns, components, componentIndex, {
|
|
29299
|
+
strict,
|
|
29300
|
+
repository
|
|
29301
|
+
});
|
|
29292
29302
|
return {
|
|
29293
|
-
|
|
29294
|
-
|
|
29295
|
-
callGraphMs,
|
|
29296
|
-
asyncDetectionMs,
|
|
29297
|
-
configurableMs,
|
|
29298
|
-
setupMs,
|
|
29299
|
-
totalMs
|
|
29300
|
-
}
|
|
29303
|
+
configurableLinks: links,
|
|
29304
|
+
configurableMs: performance.now() - configurableStart
|
|
29301
29305
|
};
|
|
29302
29306
|
}
|
|
29303
29307
|
|
|
@@ -30159,7 +30163,7 @@ function detectConnectionsPerModule(moduleContexts, enrichedComponents, reposito
|
|
|
30159
30163
|
if (moduleComponents.length === 0) {
|
|
30160
30164
|
continue;
|
|
30161
30165
|
}
|
|
30162
|
-
const result =
|
|
30166
|
+
const result = detectPerModuleConnections(
|
|
30163
30167
|
ctx.project,
|
|
30164
30168
|
moduleComponents,
|
|
30165
30169
|
{
|
|
@@ -30170,10 +30174,28 @@ function detectConnectionsPerModule(moduleContexts, enrichedComponents, reposito
|
|
|
30170
30174
|
matchesGlob
|
|
30171
30175
|
);
|
|
30172
30176
|
links.push(...result.links);
|
|
30173
|
-
timings.push(
|
|
30177
|
+
timings.push({
|
|
30178
|
+
callGraphMs: result.timings.callGraphMs,
|
|
30179
|
+
asyncDetectionMs: 0,
|
|
30180
|
+
configurableMs: result.timings.configurableMs,
|
|
30181
|
+
setupMs: result.timings.setupMs,
|
|
30182
|
+
totalMs: result.timings.callGraphMs + result.timings.configurableMs + result.timings.setupMs
|
|
30183
|
+
});
|
|
30174
30184
|
}
|
|
30185
|
+
const crossResult = detectCrossModuleConnections(enrichedComponents, {
|
|
30186
|
+
allowIncomplete,
|
|
30187
|
+
repository: repositoryName
|
|
30188
|
+
});
|
|
30189
|
+
links.push(...crossResult.links);
|
|
30190
|
+
timings.push({
|
|
30191
|
+
callGraphMs: 0,
|
|
30192
|
+
asyncDetectionMs: crossResult.timings.asyncDetectionMs,
|
|
30193
|
+
configurableMs: 0,
|
|
30194
|
+
setupMs: 0,
|
|
30195
|
+
totalMs: crossResult.timings.asyncDetectionMs
|
|
30196
|
+
});
|
|
30175
30197
|
return {
|
|
30176
|
-
links,
|
|
30198
|
+
links: deduplicateCrossStrategy(links),
|
|
30177
30199
|
timings
|
|
30178
30200
|
};
|
|
30179
30201
|
}
|
|
@@ -30421,7 +30443,7 @@ function parsePackageJson(pkg) {
|
|
|
30421
30443
|
}
|
|
30422
30444
|
function loadPackageJson() {
|
|
30423
30445
|
if (true) {
|
|
30424
|
-
return { version: "0.8.
|
|
30446
|
+
return { version: "0.8.12" };
|
|
30425
30447
|
}
|
|
30426
30448
|
const require2 = createRequire2(import.meta.url);
|
|
30427
30449
|
return parsePackageJson(require2("../../package.json"));
|
package/dist/index.js
CHANGED
|
@@ -28877,50 +28877,48 @@ function traceNonComponent(project, componentIndex, source, typeName, calledMeth
|
|
|
28877
28877
|
}
|
|
28878
28878
|
|
|
28879
28879
|
// ../riviere-extract-ts/dist/features/extraction/domain/connection-detection/async-detection/detect-publish-connections.js
|
|
28880
|
-
function detectPublishConnections(
|
|
28880
|
+
function detectPublishConnections(components, options) {
|
|
28881
28881
|
const publishers = components.filter((c) => c.type === "eventPublisher");
|
|
28882
28882
|
const events = components.filter((c) => c.type === "event");
|
|
28883
28883
|
const repository = options.repository;
|
|
28884
|
-
return publishers.flatMap((publisher) =>
|
|
28885
|
-
|
|
28886
|
-
function extractPublisherLinks(project, publisher, events, options, repository) {
|
|
28887
|
-
const publishedEventType = publisher.metadata["publishedEventType"];
|
|
28888
|
-
if (typeof publishedEventType === "string") {
|
|
28884
|
+
return publishers.flatMap((publisher) => {
|
|
28885
|
+
const publishedEventType = publisher.metadata["publishedEventType"];
|
|
28889
28886
|
const sourceLocation = {
|
|
28890
28887
|
repository,
|
|
28891
28888
|
filePath: publisher.location.file,
|
|
28892
28889
|
lineNumber: publisher.location.line
|
|
28893
28890
|
};
|
|
28894
|
-
|
|
28895
|
-
|
|
28896
|
-
const classDecl = findClassInProject(project, publisher);
|
|
28897
|
-
if (classDecl === void 0) {
|
|
28898
|
-
return [];
|
|
28899
|
-
}
|
|
28900
|
-
const methods = classDecl.getMethods();
|
|
28901
|
-
return methods.flatMap((method) => {
|
|
28902
|
-
const firstParam = method.getParameters()[0];
|
|
28903
|
-
if (firstParam === void 0) {
|
|
28904
|
-
return [];
|
|
28891
|
+
if (typeof publishedEventType !== "string") {
|
|
28892
|
+
return [handleMissingMetadata(publisher, options, sourceLocation)];
|
|
28905
28893
|
}
|
|
28906
|
-
|
|
28907
|
-
const paramTypeName = stripGenericArgs(paramType.getText(firstParam));
|
|
28908
|
-
const sourceLocation = {
|
|
28909
|
-
repository,
|
|
28910
|
-
filePath: publisher.location.file,
|
|
28911
|
-
lineNumber: method.getStartLineNumber()
|
|
28912
|
-
};
|
|
28913
|
-
return resolvePublishTarget(publisher, paramTypeName, events, options, sourceLocation);
|
|
28894
|
+
return resolvePublishTarget(publisher, publishedEventType, events, options, sourceLocation);
|
|
28914
28895
|
});
|
|
28915
28896
|
}
|
|
28916
|
-
function
|
|
28917
|
-
|
|
28897
|
+
function handleMissingMetadata(publisher, options, sourceLocation) {
|
|
28898
|
+
if (options.strict) {
|
|
28899
|
+
throw new ConnectionDetectionError({
|
|
28900
|
+
file: sourceLocation.filePath,
|
|
28901
|
+
line: sourceLocation.lineNumber,
|
|
28902
|
+
typeName: publisher.name,
|
|
28903
|
+
reason: 'eventPublisher is missing required "publishedEventType" metadata'
|
|
28904
|
+
});
|
|
28905
|
+
}
|
|
28906
|
+
return {
|
|
28907
|
+
source: componentIdentity(publisher),
|
|
28908
|
+
target: "_unresolved",
|
|
28909
|
+
type: "async",
|
|
28910
|
+
sourceLocation,
|
|
28911
|
+
_uncertain: `eventPublisher "${publisher.name}" is missing required "publishedEventType" metadata`
|
|
28912
|
+
};
|
|
28913
|
+
}
|
|
28914
|
+
function resolvePublishTarget(publisher, publishedEventType, events, options, sourceLocation) {
|
|
28915
|
+
const matchingEvents = events.filter((e) => e.metadata["eventName"] === publishedEventType);
|
|
28918
28916
|
if (matchingEvents.length === 0) {
|
|
28919
|
-
return [handleNoMatch(publisher,
|
|
28917
|
+
return [handleNoMatch(publisher, publishedEventType, options, sourceLocation)];
|
|
28920
28918
|
}
|
|
28921
28919
|
if (matchingEvents.length > 1) {
|
|
28922
28920
|
return [
|
|
28923
|
-
handleAmbiguousMatch(publisher,
|
|
28921
|
+
handleAmbiguousMatch(publisher, publishedEventType, matchingEvents.length, options, sourceLocation)
|
|
28924
28922
|
];
|
|
28925
28923
|
}
|
|
28926
28924
|
return matchingEvents.map((event) => ({
|
|
@@ -28930,13 +28928,13 @@ function resolvePublishTarget(publisher, paramTypeName, events, options, sourceL
|
|
|
28930
28928
|
sourceLocation
|
|
28931
28929
|
}));
|
|
28932
28930
|
}
|
|
28933
|
-
function handleAmbiguousMatch(publisher,
|
|
28931
|
+
function handleAmbiguousMatch(publisher, publishedEventType, matchCount, options, sourceLocation) {
|
|
28934
28932
|
if (options.strict) {
|
|
28935
28933
|
throw new ConnectionDetectionError({
|
|
28936
28934
|
file: sourceLocation.filePath,
|
|
28937
28935
|
line: sourceLocation.lineNumber,
|
|
28938
28936
|
typeName: publisher.name,
|
|
28939
|
-
reason: `
|
|
28937
|
+
reason: `publishedEventType "${publishedEventType}" matches ${matchCount} Event components (ambiguous)`
|
|
28940
28938
|
});
|
|
28941
28939
|
}
|
|
28942
28940
|
return {
|
|
@@ -28944,16 +28942,16 @@ function handleAmbiguousMatch(publisher, paramTypeName, matchCount, options, sou
|
|
|
28944
28942
|
target: "_unresolved",
|
|
28945
28943
|
type: "async",
|
|
28946
28944
|
sourceLocation,
|
|
28947
|
-
_uncertain: `ambiguous: ${matchCount} events match
|
|
28945
|
+
_uncertain: `ambiguous: ${matchCount} events match publishedEventType: ${publishedEventType}`
|
|
28948
28946
|
};
|
|
28949
28947
|
}
|
|
28950
|
-
function handleNoMatch(publisher,
|
|
28948
|
+
function handleNoMatch(publisher, publishedEventType, options, sourceLocation) {
|
|
28951
28949
|
if (options.strict) {
|
|
28952
28950
|
throw new ConnectionDetectionError({
|
|
28953
28951
|
file: sourceLocation.filePath,
|
|
28954
28952
|
line: sourceLocation.lineNumber,
|
|
28955
28953
|
typeName: publisher.name,
|
|
28956
|
-
reason: `
|
|
28954
|
+
reason: `publishedEventType "${publishedEventType}" does not match any Event component`
|
|
28957
28955
|
});
|
|
28958
28956
|
}
|
|
28959
28957
|
return {
|
|
@@ -28961,7 +28959,7 @@ function handleNoMatch(publisher, paramTypeName, options, sourceLocation) {
|
|
|
28961
28959
|
target: "_unresolved",
|
|
28962
28960
|
type: "async",
|
|
28963
28961
|
sourceLocation,
|
|
28964
|
-
_uncertain: `no event found for
|
|
28962
|
+
_uncertain: `no event found for publishedEventType: ${publishedEventType}`
|
|
28965
28963
|
};
|
|
28966
28964
|
}
|
|
28967
28965
|
|
|
@@ -29270,8 +29268,7 @@ function deduplicateCrossStrategy(links) {
|
|
|
29270
29268
|
}
|
|
29271
29269
|
return [...seen.values()];
|
|
29272
29270
|
}
|
|
29273
|
-
function
|
|
29274
|
-
const totalStart = performance.now();
|
|
29271
|
+
function detectPerModuleConnections(project, components, options, globMatcher) {
|
|
29275
29272
|
const setupStart = performance.now();
|
|
29276
29273
|
const componentIndex = new ComponentIndex(components);
|
|
29277
29274
|
const sourceFilePaths = computeFilteredFilePaths(project, options.moduleGlobs, globMatcher);
|
|
@@ -29285,43 +29282,50 @@ function detectConnections(project, components, options, globMatcher) {
|
|
|
29285
29282
|
repository
|
|
29286
29283
|
});
|
|
29287
29284
|
const callGraphMs = performance.now() - callGraphStart;
|
|
29285
|
+
const patterns = options.patterns ?? [];
|
|
29286
|
+
const { configurableLinks, configurableMs } = runConfigurableDetection(project, patterns, components, componentIndex, strict, repository);
|
|
29287
|
+
return {
|
|
29288
|
+
links: [...syncLinks, ...configurableLinks],
|
|
29289
|
+
timings: {
|
|
29290
|
+
callGraphMs,
|
|
29291
|
+
configurableMs,
|
|
29292
|
+
setupMs
|
|
29293
|
+
}
|
|
29294
|
+
};
|
|
29295
|
+
}
|
|
29296
|
+
function detectCrossModuleConnections(allComponents, options) {
|
|
29297
|
+
const strict = options.allowIncomplete !== true;
|
|
29298
|
+
const repository = options.repository;
|
|
29288
29299
|
const asyncStart = performance.now();
|
|
29289
|
-
const publishLinks = detectPublishConnections(
|
|
29300
|
+
const publishLinks = detectPublishConnections(allComponents, {
|
|
29290
29301
|
strict,
|
|
29291
29302
|
repository
|
|
29292
29303
|
});
|
|
29293
|
-
const subscribeLinks = detectSubscribeConnections(
|
|
29304
|
+
const subscribeLinks = detectSubscribeConnections(allComponents, {
|
|
29294
29305
|
strict,
|
|
29295
29306
|
repository
|
|
29296
29307
|
});
|
|
29297
29308
|
const asyncDetectionMs = performance.now() - asyncStart;
|
|
29298
|
-
|
|
29299
|
-
|
|
29300
|
-
|
|
29301
|
-
|
|
29302
|
-
|
|
29303
|
-
|
|
29304
|
-
|
|
29309
|
+
return {
|
|
29310
|
+
links: [...publishLinks, ...subscribeLinks],
|
|
29311
|
+
timings: { asyncDetectionMs }
|
|
29312
|
+
};
|
|
29313
|
+
}
|
|
29314
|
+
function runConfigurableDetection(project, patterns, components, componentIndex, strict, repository) {
|
|
29315
|
+
if (patterns.length === 0) {
|
|
29305
29316
|
return {
|
|
29306
|
-
configurableLinks:
|
|
29307
|
-
configurableMs:
|
|
29317
|
+
configurableLinks: [],
|
|
29318
|
+
configurableMs: 0
|
|
29308
29319
|
};
|
|
29309
|
-
}
|
|
29310
|
-
|
|
29311
|
-
|
|
29312
|
-
|
|
29313
|
-
|
|
29314
|
-
|
|
29315
|
-
const deduplicatedLinks = deduplicateCrossStrategy(allLinks);
|
|
29320
|
+
}
|
|
29321
|
+
const configurableStart = performance.now();
|
|
29322
|
+
const links = detectConfigurableConnections(project, patterns, components, componentIndex, {
|
|
29323
|
+
strict,
|
|
29324
|
+
repository
|
|
29325
|
+
});
|
|
29316
29326
|
return {
|
|
29317
|
-
|
|
29318
|
-
|
|
29319
|
-
callGraphMs,
|
|
29320
|
-
asyncDetectionMs,
|
|
29321
|
-
configurableMs,
|
|
29322
|
-
setupMs,
|
|
29323
|
-
totalMs
|
|
29324
|
-
}
|
|
29327
|
+
configurableLinks: links,
|
|
29328
|
+
configurableMs: performance.now() - configurableStart
|
|
29325
29329
|
};
|
|
29326
29330
|
}
|
|
29327
29331
|
|
|
@@ -30183,7 +30187,7 @@ function detectConnectionsPerModule(moduleContexts, enrichedComponents, reposito
|
|
|
30183
30187
|
if (moduleComponents.length === 0) {
|
|
30184
30188
|
continue;
|
|
30185
30189
|
}
|
|
30186
|
-
const result =
|
|
30190
|
+
const result = detectPerModuleConnections(
|
|
30187
30191
|
ctx.project,
|
|
30188
30192
|
moduleComponents,
|
|
30189
30193
|
{
|
|
@@ -30194,10 +30198,28 @@ function detectConnectionsPerModule(moduleContexts, enrichedComponents, reposito
|
|
|
30194
30198
|
matchesGlob
|
|
30195
30199
|
);
|
|
30196
30200
|
links.push(...result.links);
|
|
30197
|
-
timings.push(
|
|
30201
|
+
timings.push({
|
|
30202
|
+
callGraphMs: result.timings.callGraphMs,
|
|
30203
|
+
asyncDetectionMs: 0,
|
|
30204
|
+
configurableMs: result.timings.configurableMs,
|
|
30205
|
+
setupMs: result.timings.setupMs,
|
|
30206
|
+
totalMs: result.timings.callGraphMs + result.timings.configurableMs + result.timings.setupMs
|
|
30207
|
+
});
|
|
30198
30208
|
}
|
|
30209
|
+
const crossResult = detectCrossModuleConnections(enrichedComponents, {
|
|
30210
|
+
allowIncomplete,
|
|
30211
|
+
repository: repositoryName
|
|
30212
|
+
});
|
|
30213
|
+
links.push(...crossResult.links);
|
|
30214
|
+
timings.push({
|
|
30215
|
+
callGraphMs: 0,
|
|
30216
|
+
asyncDetectionMs: crossResult.timings.asyncDetectionMs,
|
|
30217
|
+
configurableMs: 0,
|
|
30218
|
+
setupMs: 0,
|
|
30219
|
+
totalMs: crossResult.timings.asyncDetectionMs
|
|
30220
|
+
});
|
|
30199
30221
|
return {
|
|
30200
|
-
links,
|
|
30222
|
+
links: deduplicateCrossStrategy(links),
|
|
30201
30223
|
timings
|
|
30202
30224
|
};
|
|
30203
30225
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@living-architecture/riviere-cli",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.13",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"glob": "^11.0.2",
|
|
33
33
|
"ts-morph": "^24.0.0",
|
|
34
34
|
"yaml": "^2.7.0",
|
|
35
|
-
"@living-architecture/riviere-builder": "0.6.
|
|
36
|
-
"@living-architecture/riviere-extract-ts": "0.2.
|
|
37
|
-
"@living-architecture/riviere-
|
|
38
|
-
"@living-architecture/riviere-
|
|
39
|
-
"@living-architecture/riviere-
|
|
35
|
+
"@living-architecture/riviere-builder": "0.6.6",
|
|
36
|
+
"@living-architecture/riviere-extract-ts": "0.2.12",
|
|
37
|
+
"@living-architecture/riviere-schema": "0.5.6",
|
|
38
|
+
"@living-architecture/riviere-query": "0.5.6",
|
|
39
|
+
"@living-architecture/riviere-extract-config": "0.4.6"
|
|
40
40
|
}
|
|
41
41
|
}
|