@callidescope/cli 0.0.29 → 0.0.30
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.
|
@@ -3,12 +3,12 @@ import { ConsoleLogger as r, Global as i, Injectable as a, Module as o, Scope as
|
|
|
3
3
|
import { existsSync as c, mkdirSync as l } from "node:fs";
|
|
4
4
|
import u from "node:path";
|
|
5
5
|
import d from "pino";
|
|
6
|
-
import { CHECK_NAMES as f, ConfigurationModule as p, ConfigurationService as m, DEFAULT_JSON_INDENTATION as
|
|
7
|
-
import { ConfigModule as
|
|
8
|
-
import { DiscoveryModule as
|
|
9
|
-
import { z as
|
|
10
|
-
import { AddressDepthService as
|
|
11
|
-
import { AddressReportModule as
|
|
6
|
+
import { CHECK_NAMES as f, ConfigurationModule as p, ConfigurationPathRequiredError as ee, ConfigurationService as m, DEFAULT_JSON_INDENTATION as te, DEFAULT_PREVIEW_COUNT as ne, DEFAULT_RUN_HEADING as re, InputError as ie, ProjectConfigurationError as ae, ProjectConfigurationFieldNotPermittedError as oe } from "@callidescope/configuration";
|
|
7
|
+
import { ConfigModule as se } from "@nestjs/config";
|
|
8
|
+
import { DiscoveryModule as ce } from "@nestjs/core";
|
|
9
|
+
import { z as le } from "zod";
|
|
10
|
+
import { AddressDepthService as ue, AddressService as h, BreadthService as de, CallablesModule as g, CallablesService as _, ClassesModule as fe, ClassesService as pe, EdgesModule as me, EntriesModule as he, EntriesService as ge, ExternalService as v, FileFilterService as y, GraphAssemblyService as b, GraphModule as x, ProgramConfigurationError as _e, ProgramModule as ve, ProgramService as S, WorkspaceModule as ye, WorkspaceService as C } from "@callidescope/graph";
|
|
11
|
+
import { AddressReportModule as w, AddressReportService as T, MarkdownReportService as be, OutputJsonModule as xe, OutputJsonService as Se, OutputMarkdownModule as Ce, ProjectReportsModule as we, ProjectReportsService as E, ReportFindingsModule as Te, ReportFindingsService as D, ReportModule as Ee, WriteDestinationsModule as De, WriteDestinationsService as Oe } from "@callidescope/output";
|
|
12
12
|
//#region \0rolldown/runtime.js
|
|
13
13
|
var ke = Object.defineProperty, __name = (e, t) => ke(e, "name", {
|
|
14
14
|
value: t,
|
|
@@ -57,9 +57,9 @@ function __decorate(e, t, n, r) {
|
|
|
57
57
|
}
|
|
58
58
|
//#endregion
|
|
59
59
|
//#region projects/logging/src/modules/logger/logger.service.ts
|
|
60
|
-
var
|
|
60
|
+
var O, k = class LoggerService extends r {
|
|
61
61
|
static {
|
|
62
|
-
|
|
62
|
+
O = this;
|
|
63
63
|
}
|
|
64
64
|
constructor() {
|
|
65
65
|
super();
|
|
@@ -67,15 +67,15 @@ var D, O = class LoggerService extends r {
|
|
|
67
67
|
static isProduction = process.env.NODE_ENV === "production";
|
|
68
68
|
static rootLogger;
|
|
69
69
|
static writesToStandardError = !1;
|
|
70
|
-
child =
|
|
70
|
+
child = O.root;
|
|
71
71
|
static createRootLogger() {
|
|
72
72
|
let e = process.env.LOG_LEVEL ?? "info";
|
|
73
|
-
return
|
|
73
|
+
return O.isProduction ? O.writesToStandardError ? d({ level: e }, d.destination(2)) : d({ level: e }) : d({
|
|
74
74
|
level: e,
|
|
75
75
|
transport: {
|
|
76
76
|
options: {
|
|
77
77
|
colorize: !0,
|
|
78
|
-
destination:
|
|
78
|
+
destination: O.writesToStandardError ? 2 : 1,
|
|
79
79
|
ignore: "pid,hostname,emoji",
|
|
80
80
|
messageFormat: "{emoji} {msg}",
|
|
81
81
|
singleLine: !0
|
|
@@ -85,10 +85,10 @@ var D, O = class LoggerService extends r {
|
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
87
|
static logToStandardError() {
|
|
88
|
-
|
|
88
|
+
O.rootLogger === void 0 ? O.writesToStandardError = !0 : process.emitWarning("LoggerService.logToStandardError() was called after the first log line, so log lines still go to standard output and anything piping that stream will read them as data. Call it as the first statement of the application's bootstrap.");
|
|
89
89
|
}
|
|
90
90
|
assertConventionalMessage(e) {
|
|
91
|
-
if (
|
|
91
|
+
if (O.isProduction || this.shouldSkipConventionalMessageValidation(e.context)) return;
|
|
92
92
|
let t = this.getConventionalMessageViolation(e.parsed);
|
|
93
93
|
if (t !== void 0) throw Error(t);
|
|
94
94
|
}
|
|
@@ -99,7 +99,7 @@ var D, O = class LoggerService extends r {
|
|
|
99
99
|
}), {
|
|
100
100
|
...e.data,
|
|
101
101
|
context: e.context,
|
|
102
|
-
...
|
|
102
|
+
...O.isProduction ? {} : { emoji: e.parsed.emoji }
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
105
|
getConventionalMessageViolation(e) {
|
|
@@ -126,7 +126,7 @@ var D, O = class LoggerService extends r {
|
|
|
126
126
|
return e !== void 0 && Ne.has(e);
|
|
127
127
|
}
|
|
128
128
|
static get root() {
|
|
129
|
-
return
|
|
129
|
+
return O.rootLogger ??= O.createRootLogger(), O.rootLogger;
|
|
130
130
|
}
|
|
131
131
|
buildErrorLogEntry(e, t) {
|
|
132
132
|
let n = t instanceof Error ? t.stack || t.message : String(t);
|
|
@@ -170,7 +170,7 @@ var D, O = class LoggerService extends r {
|
|
|
170
170
|
this.info(e, t, n);
|
|
171
171
|
}
|
|
172
172
|
setContext(e) {
|
|
173
|
-
super.setContext(e), this.child =
|
|
173
|
+
super.setContext(e), this.child = O.root.child({ context: e });
|
|
174
174
|
}
|
|
175
175
|
verbose(e, t, n) {
|
|
176
176
|
let r = this.parseMessage(e);
|
|
@@ -189,19 +189,19 @@ var D, O = class LoggerService extends r {
|
|
|
189
189
|
}), r.text);
|
|
190
190
|
}
|
|
191
191
|
};
|
|
192
|
-
|
|
192
|
+
k = O = __decorate([a({ scope: s.TRANSIENT }), __decorateMetadata("design:paramtypes", [])], k);
|
|
193
193
|
//#endregion
|
|
194
194
|
//#region projects/logging/src/modules/logger/logger.module.ts
|
|
195
|
-
var
|
|
196
|
-
|
|
195
|
+
var A = class LoggerModule {};
|
|
196
|
+
A = __decorate([i(), o({
|
|
197
197
|
controllers: [],
|
|
198
|
-
exports: [
|
|
198
|
+
exports: [k],
|
|
199
199
|
imports: [],
|
|
200
|
-
providers: [
|
|
201
|
-
})],
|
|
200
|
+
providers: [k]
|
|
201
|
+
})], A);
|
|
202
202
|
//#endregion
|
|
203
203
|
//#region projects/ic-suite/callidescope/callidescope-cli/src/callidescope-cli.constants.ts
|
|
204
|
-
var Pe =
|
|
204
|
+
var Pe = le.object({}), j = "Check the file path and the qualified name callidescope prints for it in a stack.", M = "🔭 Rejected a callable address", isRefusedProjectConfiguration = (e) => e instanceof ae || e instanceof oe, N = "🔭 Rejected the command line", Fe = "🔭 Rejected a project it could not read", Ie = "🔭 Rejected a project configuration", buildUnknownCommandMessage = (e) => `${e} is not a callidescope command, and the trace takes no positional arguments. Run one of depth, breadth, or limits, or drop the argument to trace the workspace.`, readRefusalHeadline = (e) => e instanceof _e ? Fe : isRefusedProjectConfiguration(e) || e instanceof Le ? Ie : e instanceof ie || e instanceof ee ? N : void 0, Le = class UnresolvedEntryPointAddressError extends Error {
|
|
205
205
|
constructor(e) {
|
|
206
206
|
super(UnresolvedEntryPointAddressError.joinDescriptions(e)), this.name = "UnresolvedEntryPointAddressError";
|
|
207
207
|
}
|
|
@@ -393,17 +393,17 @@ var Pe = ce.object({}), A = "Check the file path and the qualified name callides
|
|
|
393
393
|
}
|
|
394
394
|
};
|
|
395
395
|
F = P = __decorate([a(), __decorateMetadata("design:paramtypes", [
|
|
396
|
-
de === void 0 ? Object : de,
|
|
397
|
-
pe === void 0 ? Object : pe,
|
|
398
396
|
_ === void 0 ? Object : _,
|
|
397
|
+
pe === void 0 ? Object : pe,
|
|
398
|
+
ge === void 0 ? Object : ge,
|
|
399
399
|
v === void 0 ? Object : v,
|
|
400
400
|
y === void 0 ? Object : y,
|
|
401
401
|
b === void 0 ? Object : b,
|
|
402
402
|
S === void 0 ? Object : S,
|
|
403
403
|
m === void 0 ? Object : m,
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
404
|
+
E === void 0 ? Object : E,
|
|
405
|
+
C === void 0 ? Object : C,
|
|
406
|
+
k === void 0 ? Object : k
|
|
407
407
|
])], F);
|
|
408
408
|
//#endregion
|
|
409
409
|
//#region projects/ic-suite/callidescope/callidescope-cli/src/modules/callidescope/callidescope.command.ts
|
|
@@ -421,7 +421,7 @@ var I, L = I = class CallidescopeCommand extends t {
|
|
|
421
421
|
}
|
|
422
422
|
describeUnresolvedAddress(e) {
|
|
423
423
|
let t = e.projectName ?? "the workspace configuration", { address: n, resolution: r } = e;
|
|
424
|
-
return r.kind === "not-found" ? `${t} declares an entryPoints.addresses entry that resolves to nothing: "${n}". ${
|
|
424
|
+
return r.kind === "not-found" ? `${t} declares an entryPoints.addresses entry that resolves to nothing: "${n}". ${j}` : r.kind === "invalid" ? `${t} declares an invalid entryPoints.addresses entry. ${r.reason}` : `${t} declares an entryPoints.addresses entry that matches more than one declaration: "${n}". ${this.addressService.describeCandidates({
|
|
425
425
|
address: n,
|
|
426
426
|
candidates: r.candidates
|
|
427
427
|
})}`;
|
|
@@ -433,15 +433,15 @@ var I, L = I = class CallidescopeCommand extends t {
|
|
|
433
433
|
let { json: t } = e.configuration.write;
|
|
434
434
|
e.format === "json" ? process.stdout.write(this.outputJsonService.buildReport({
|
|
435
435
|
destination: t ?? {
|
|
436
|
-
indentation:
|
|
436
|
+
indentation: te,
|
|
437
437
|
path: ""
|
|
438
438
|
},
|
|
439
439
|
result: e.result
|
|
440
440
|
})) : process.stdout.write(this.markdownReportService.renderRun({
|
|
441
441
|
description: void 0,
|
|
442
|
-
heading:
|
|
442
|
+
heading: re,
|
|
443
443
|
limits: e.projectLimits,
|
|
444
|
-
previewCount:
|
|
444
|
+
previewCount: ne,
|
|
445
445
|
rendering: e.format === "mermaid" ? "diagram" : "tree",
|
|
446
446
|
result: e.result
|
|
447
447
|
}));
|
|
@@ -449,7 +449,7 @@ var I, L = I = class CallidescopeCommand extends t {
|
|
|
449
449
|
async traceWorkspace(e) {
|
|
450
450
|
let t = await this.configurationService.resolveFormatOption(e), { errors: n, run: r } = await this.configurationService.prepareRun(t);
|
|
451
451
|
if (r === void 0) {
|
|
452
|
-
this.reject(
|
|
452
|
+
this.reject(N, { reasons: n });
|
|
453
453
|
return;
|
|
454
454
|
}
|
|
455
455
|
this.logger.debug("🔭 Starting a call-stack trace", void 0, {
|
|
@@ -464,7 +464,7 @@ var I, L = I = class CallidescopeCommand extends t {
|
|
|
464
464
|
limitOverrides: c,
|
|
465
465
|
workspaceRoot: u
|
|
466
466
|
});
|
|
467
|
-
if (d.unresolvedAddresses.length > 0) throw new
|
|
467
|
+
if (d.unresolvedAddresses.length > 0) throw new Le(d.unresolvedAddresses.map((e) => this.describeUnresolvedAddress(e)));
|
|
468
468
|
this.report({
|
|
469
469
|
configuration: a,
|
|
470
470
|
format: s,
|
|
@@ -493,7 +493,7 @@ var I, L = I = class CallidescopeCommand extends t {
|
|
|
493
493
|
return e;
|
|
494
494
|
}
|
|
495
495
|
parseConfig(e) {
|
|
496
|
-
return this.configurationService.
|
|
496
|
+
return this.configurationService.requireConfigurationPath(e, "--config");
|
|
497
497
|
}
|
|
498
498
|
parseDirectories(e) {
|
|
499
499
|
return this.configurationService.parseCommaDelimitedOption(e);
|
|
@@ -542,7 +542,7 @@ var I, L = I = class CallidescopeCommand extends t {
|
|
|
542
542
|
}
|
|
543
543
|
async run(e, t) {
|
|
544
544
|
let [n] = e;
|
|
545
|
-
if (n !== void 0) this.reject(
|
|
545
|
+
if (n !== void 0) this.reject(N, { reason: buildUnknownCommandMessage(n) });
|
|
546
546
|
else try {
|
|
547
547
|
await this.traceWorkspace(t);
|
|
548
548
|
} catch (e) {
|
|
@@ -562,12 +562,13 @@ __decorate([
|
|
|
562
562
|
__decorateMetadata("design:returntype", String)
|
|
563
563
|
], L.prototype, "parseCheck", null), __decorate([
|
|
564
564
|
n({
|
|
565
|
-
description: "Path to
|
|
566
|
-
flags: "--config
|
|
565
|
+
description: "Path to the workspace callidescope configuration file (required)",
|
|
566
|
+
flags: "--config <config>",
|
|
567
|
+
required: !0
|
|
567
568
|
}),
|
|
568
569
|
__decorateMetadata("design:type", Function),
|
|
569
570
|
__decorateMetadata("design:paramtypes", [Object]),
|
|
570
|
-
__decorateMetadata("design:returntype",
|
|
571
|
+
__decorateMetadata("design:returntype", String)
|
|
571
572
|
], L.prototype, "parseConfig", null), __decorate([
|
|
572
573
|
n({
|
|
573
574
|
description: "Comma-separated project directories to trace",
|
|
@@ -696,14 +697,14 @@ __decorate([
|
|
|
696
697
|
}),
|
|
697
698
|
a(),
|
|
698
699
|
__decorateMetadata("design:paramtypes", [
|
|
699
|
-
|
|
700
|
+
h === void 0 ? Object : h,
|
|
700
701
|
F === void 0 ? Object : F,
|
|
701
702
|
m === void 0 ? Object : m,
|
|
703
|
+
Se === void 0 ? Object : Se,
|
|
702
704
|
be === void 0 ? Object : be,
|
|
703
|
-
|
|
704
|
-
Te === void 0 ? Object : Te,
|
|
705
|
+
D === void 0 ? Object : D,
|
|
705
706
|
Oe === void 0 ? Object : Oe,
|
|
706
|
-
|
|
707
|
+
k === void 0 ? Object : k
|
|
707
708
|
])
|
|
708
709
|
], L);
|
|
709
710
|
//#endregion
|
|
@@ -713,20 +714,20 @@ R = __decorate([o({
|
|
|
713
714
|
controllers: [],
|
|
714
715
|
exports: [L, F],
|
|
715
716
|
imports: [
|
|
716
|
-
|
|
717
|
+
g,
|
|
717
718
|
p,
|
|
718
719
|
me,
|
|
719
720
|
he,
|
|
720
721
|
x,
|
|
721
722
|
fe,
|
|
722
|
-
|
|
723
|
-
ye,
|
|
723
|
+
A,
|
|
724
724
|
xe,
|
|
725
|
-
|
|
726
|
-
|
|
725
|
+
Ce,
|
|
726
|
+
ve,
|
|
727
727
|
we,
|
|
728
|
+
Te,
|
|
728
729
|
Ee,
|
|
729
|
-
|
|
730
|
+
ye,
|
|
730
731
|
De
|
|
731
732
|
],
|
|
732
733
|
providers: [L, F]
|
|
@@ -742,7 +743,7 @@ var z = class AddressLookupService {
|
|
|
742
743
|
}
|
|
743
744
|
describeProblem(e) {
|
|
744
745
|
let { resolution: t } = e;
|
|
745
|
-
if (t.kind !== "resolved") return t.kind === "invalid" ? t.reason : t.kind === "not-found" ? `No callable matches "${e.address}". ${
|
|
746
|
+
if (t.kind !== "resolved") return t.kind === "invalid" ? t.reason : t.kind === "not-found" ? `No callable matches "${e.address}". ${j}` : `"${e.address}" matches more than one declaration. ${this.addressService.describeCandidates({
|
|
746
747
|
address: e.address,
|
|
747
748
|
candidates: t.candidates
|
|
748
749
|
})}`;
|
|
@@ -774,7 +775,7 @@ var z = class AddressLookupService {
|
|
|
774
775
|
}
|
|
775
776
|
};
|
|
776
777
|
z = __decorate([a(), __decorateMetadata("design:paramtypes", [
|
|
777
|
-
|
|
778
|
+
h === void 0 ? Object : h,
|
|
778
779
|
F === void 0 ? Object : F,
|
|
779
780
|
m === void 0 ? Object : m
|
|
780
781
|
])], z);
|
|
@@ -785,7 +786,7 @@ B = __decorate([o({
|
|
|
785
786
|
controllers: [],
|
|
786
787
|
exports: [z],
|
|
787
788
|
imports: [
|
|
788
|
-
|
|
789
|
+
g,
|
|
789
790
|
R,
|
|
790
791
|
p
|
|
791
792
|
],
|
|
@@ -811,7 +812,7 @@ var V, H = V = class BreadthCommand extends t {
|
|
|
811
812
|
});
|
|
812
813
|
typeof i == "string" ? n.push(i) : t.push(i);
|
|
813
814
|
}
|
|
814
|
-
if (n.length > 0) this.reject(
|
|
815
|
+
if (n.length > 0) this.reject(M, { problems: n });
|
|
815
816
|
else return t;
|
|
816
817
|
}
|
|
817
818
|
describeAddress(e) {
|
|
@@ -861,7 +862,7 @@ var V, H = V = class BreadthCommand extends t {
|
|
|
861
862
|
return this.configurationService.parseCommaDelimitedOption(e);
|
|
862
863
|
}
|
|
863
864
|
parseConfig(e) {
|
|
864
|
-
return this.configurationService.
|
|
865
|
+
return this.configurationService.requireConfigurationPath(e, "--config");
|
|
865
866
|
}
|
|
866
867
|
parseDirectories(e) {
|
|
867
868
|
return this.configurationService.parseCommaDelimitedOption(e);
|
|
@@ -910,12 +911,13 @@ __decorate([
|
|
|
910
911
|
__decorateMetadata("design:returntype", Array)
|
|
911
912
|
], H.prototype, "parseAddresses", null), __decorate([
|
|
912
913
|
n({
|
|
913
|
-
description: "Path to
|
|
914
|
-
flags: "--config
|
|
914
|
+
description: "Path to the workspace callidescope configuration file (required)",
|
|
915
|
+
flags: "--config <config>",
|
|
916
|
+
required: !0
|
|
915
917
|
}),
|
|
916
918
|
__decorateMetadata("design:type", Function),
|
|
917
919
|
__decorateMetadata("design:paramtypes", [Object]),
|
|
918
|
-
__decorateMetadata("design:returntype",
|
|
920
|
+
__decorateMetadata("design:returntype", String)
|
|
919
921
|
], H.prototype, "parseConfig", null), __decorate([
|
|
920
922
|
n({
|
|
921
923
|
description: "Comma-separated project directories to trace",
|
|
@@ -996,10 +998,10 @@ __decorate([
|
|
|
996
998
|
a(),
|
|
997
999
|
__decorateMetadata("design:paramtypes", [
|
|
998
1000
|
z === void 0 ? Object : z,
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
+
T === void 0 ? Object : T,
|
|
1002
|
+
de === void 0 ? Object : de,
|
|
1001
1003
|
m === void 0 ? Object : m,
|
|
1002
|
-
|
|
1004
|
+
k === void 0 ? Object : k
|
|
1003
1005
|
])
|
|
1004
1006
|
], H);
|
|
1005
1007
|
//#endregion
|
|
@@ -1010,10 +1012,10 @@ U = __decorate([o({
|
|
|
1010
1012
|
exports: [H],
|
|
1011
1013
|
imports: [
|
|
1012
1014
|
B,
|
|
1013
|
-
|
|
1015
|
+
w,
|
|
1014
1016
|
x,
|
|
1015
1017
|
p,
|
|
1016
|
-
|
|
1018
|
+
A
|
|
1017
1019
|
],
|
|
1018
1020
|
providers: [H]
|
|
1019
1021
|
})], U);
|
|
@@ -1043,7 +1045,7 @@ var W, G = W = class DepthCommand extends t {
|
|
|
1043
1045
|
id: i.id
|
|
1044
1046
|
});
|
|
1045
1047
|
}
|
|
1046
|
-
if (n.length > 0) this.reject(
|
|
1048
|
+
if (n.length > 0) this.reject(M, { problems: n });
|
|
1047
1049
|
else return t;
|
|
1048
1050
|
}
|
|
1049
1051
|
async printDepth(e) {
|
|
@@ -1086,7 +1088,7 @@ var W, G = W = class DepthCommand extends t {
|
|
|
1086
1088
|
return this.configurationService.parseCommaDelimitedOption(e);
|
|
1087
1089
|
}
|
|
1088
1090
|
parseConfig(e) {
|
|
1089
|
-
return this.configurationService.
|
|
1091
|
+
return this.configurationService.requireConfigurationPath(e, "--config");
|
|
1090
1092
|
}
|
|
1091
1093
|
parseDirectories(e) {
|
|
1092
1094
|
return this.configurationService.parseCommaDelimitedOption(e);
|
|
@@ -1135,12 +1137,13 @@ __decorate([
|
|
|
1135
1137
|
__decorateMetadata("design:returntype", Array)
|
|
1136
1138
|
], G.prototype, "parseAddresses", null), __decorate([
|
|
1137
1139
|
n({
|
|
1138
|
-
description: "Path to
|
|
1139
|
-
flags: "--config
|
|
1140
|
+
description: "Path to the workspace callidescope configuration file (required)",
|
|
1141
|
+
flags: "--config <config>",
|
|
1142
|
+
required: !0
|
|
1140
1143
|
}),
|
|
1141
1144
|
__decorateMetadata("design:type", Function),
|
|
1142
1145
|
__decorateMetadata("design:paramtypes", [Object]),
|
|
1143
|
-
__decorateMetadata("design:returntype",
|
|
1146
|
+
__decorateMetadata("design:returntype", String)
|
|
1144
1147
|
], G.prototype, "parseConfig", null), __decorate([
|
|
1145
1148
|
n({
|
|
1146
1149
|
description: "Comma-separated project directories to trace",
|
|
@@ -1221,10 +1224,10 @@ __decorate([
|
|
|
1221
1224
|
a(),
|
|
1222
1225
|
__decorateMetadata("design:paramtypes", [
|
|
1223
1226
|
z === void 0 ? Object : z,
|
|
1224
|
-
|
|
1225
|
-
|
|
1227
|
+
T === void 0 ? Object : T,
|
|
1228
|
+
ue === void 0 ? Object : ue,
|
|
1226
1229
|
m === void 0 ? Object : m,
|
|
1227
|
-
|
|
1230
|
+
k === void 0 ? Object : k
|
|
1228
1231
|
])
|
|
1229
1232
|
], G);
|
|
1230
1233
|
//#endregion
|
|
@@ -1235,10 +1238,10 @@ K = __decorate([o({
|
|
|
1235
1238
|
exports: [G],
|
|
1236
1239
|
imports: [
|
|
1237
1240
|
B,
|
|
1238
|
-
|
|
1241
|
+
w,
|
|
1239
1242
|
x,
|
|
1240
1243
|
p,
|
|
1241
|
-
|
|
1244
|
+
A
|
|
1242
1245
|
],
|
|
1243
1246
|
providers: [G]
|
|
1244
1247
|
})], K);
|
|
@@ -1294,10 +1297,7 @@ var q, J = q = class LimitsService {
|
|
|
1294
1297
|
})];
|
|
1295
1298
|
}
|
|
1296
1299
|
async list(e) {
|
|
1297
|
-
let t = process.cwd(), { authored: n, configuration: r, path: i } = await this.configurationService.loadConfigurationFile({
|
|
1298
|
-
configurationPath: e.config,
|
|
1299
|
-
searchDirectory: t
|
|
1300
|
-
}), a = this.discoverProjects({
|
|
1300
|
+
let t = process.cwd(), { authored: n, configuration: r, path: i } = await this.configurationService.loadConfigurationFile({ configurationPath: e.config }), a = this.discoverProjects({
|
|
1301
1301
|
configuration: r,
|
|
1302
1302
|
workspaceRoot: t
|
|
1303
1303
|
}), o = await this.configurationService.loadProjectConfigurations({
|
|
@@ -1327,42 +1327,42 @@ var q, J = q = class LimitsService {
|
|
|
1327
1327
|
J = q = __decorate([a(), __decorateMetadata("design:paramtypes", [
|
|
1328
1328
|
m === void 0 ? Object : m,
|
|
1329
1329
|
y === void 0 ? Object : y,
|
|
1330
|
-
|
|
1331
|
-
|
|
1330
|
+
C === void 0 ? Object : C,
|
|
1331
|
+
k === void 0 ? Object : k
|
|
1332
1332
|
])], J);
|
|
1333
1333
|
//#endregion
|
|
1334
1334
|
//#region projects/ic-suite/callidescope/callidescope-cli/src/modules/limits/limits.constants.ts
|
|
1335
|
-
var
|
|
1335
|
+
var Re = [
|
|
1336
1336
|
"Project",
|
|
1337
1337
|
"Limit",
|
|
1338
1338
|
"Value",
|
|
1339
1339
|
"Declared in"
|
|
1340
|
-
],
|
|
1340
|
+
], ze = "# 🔭 Callidescope Limits", Be = "Every project in scope, what it is judged against, and the file each number is written in — which is that project's own `callidescope.config.ts`, every traced project declaring a complete one. The `workspace` row is the starting point those files spread, and the numbers the directory holding this configuration is itself judged by.", Ve = "none", He = "workspace", Y = class RenderLimitsService {
|
|
1341
1341
|
constructor() {}
|
|
1342
1342
|
renderProject(e) {
|
|
1343
|
-
return e === void 0 ?
|
|
1343
|
+
return e === void 0 ? He : e === "" ? "." : e;
|
|
1344
1344
|
}
|
|
1345
1345
|
renderRow(e) {
|
|
1346
1346
|
return `| ${e.join(" | ")} |`;
|
|
1347
1347
|
}
|
|
1348
1348
|
renderTable(e) {
|
|
1349
1349
|
return [
|
|
1350
|
-
this.renderRow(
|
|
1351
|
-
this.renderRow(
|
|
1350
|
+
this.renderRow(Re),
|
|
1351
|
+
this.renderRow(Re.map(() => "---")),
|
|
1352
1352
|
...e.map((e) => this.renderRow([
|
|
1353
1353
|
this.renderProject(e.project),
|
|
1354
1354
|
`\`${e.limit}\``,
|
|
1355
|
-
e.value === void 0 ?
|
|
1355
|
+
e.value === void 0 ? Ve : String(e.value),
|
|
1356
1356
|
e.path === void 0 ? "—" : `\`${e.path}\``
|
|
1357
1357
|
]))
|
|
1358
1358
|
].join("\n");
|
|
1359
1359
|
}
|
|
1360
1360
|
render(e) {
|
|
1361
1361
|
return [
|
|
1362
|
-
Re,
|
|
1363
|
-
"",
|
|
1364
1362
|
ze,
|
|
1365
1363
|
"",
|
|
1364
|
+
Be,
|
|
1365
|
+
"",
|
|
1366
1366
|
this.renderTable(e)
|
|
1367
1367
|
].join("\n");
|
|
1368
1368
|
}
|
|
@@ -1382,9 +1382,9 @@ var X, Z = X = class LimitsCommand extends t {
|
|
|
1382
1382
|
this.logger.error(e, void 0, t), process.exitCode = 1;
|
|
1383
1383
|
}
|
|
1384
1384
|
parseConfig(e) {
|
|
1385
|
-
return this.configurationService.
|
|
1385
|
+
return this.configurationService.requireConfigurationPath(e, "--config");
|
|
1386
1386
|
}
|
|
1387
|
-
async run(e, t
|
|
1387
|
+
async run(e, t) {
|
|
1388
1388
|
try {
|
|
1389
1389
|
let e = await this.limitsService.list(t);
|
|
1390
1390
|
process.stdout.write(`${this.renderLimitsService.render(e)}\n`);
|
|
@@ -1397,12 +1397,13 @@ var X, Z = X = class LimitsCommand extends t {
|
|
|
1397
1397
|
};
|
|
1398
1398
|
__decorate([
|
|
1399
1399
|
n({
|
|
1400
|
-
description: "Path to
|
|
1401
|
-
flags: "--config
|
|
1400
|
+
description: "Path to the workspace callidescope configuration file (required)",
|
|
1401
|
+
flags: "--config <config>",
|
|
1402
|
+
required: !0
|
|
1402
1403
|
}),
|
|
1403
1404
|
__decorateMetadata("design:type", Function),
|
|
1404
1405
|
__decorateMetadata("design:paramtypes", [Object]),
|
|
1405
|
-
__decorateMetadata("design:returntype",
|
|
1406
|
+
__decorateMetadata("design:returntype", String)
|
|
1406
1407
|
], Z.prototype, "parseConfig", null), Z = X = __decorate([
|
|
1407
1408
|
e({
|
|
1408
1409
|
description: "List every project's resolved depth and breadth limits, and the file each came from",
|
|
@@ -1413,7 +1414,7 @@ __decorate([
|
|
|
1413
1414
|
J === void 0 ? Object : J,
|
|
1414
1415
|
Y === void 0 ? Object : Y,
|
|
1415
1416
|
m === void 0 ? Object : m,
|
|
1416
|
-
|
|
1417
|
+
k === void 0 ? Object : k
|
|
1417
1418
|
])
|
|
1418
1419
|
], Z);
|
|
1419
1420
|
//#endregion
|
|
@@ -1424,8 +1425,8 @@ Q = __decorate([o({
|
|
|
1424
1425
|
exports: [Z, J],
|
|
1425
1426
|
imports: [
|
|
1426
1427
|
p,
|
|
1427
|
-
|
|
1428
|
-
|
|
1428
|
+
A,
|
|
1429
|
+
ye
|
|
1429
1430
|
],
|
|
1430
1431
|
providers: [
|
|
1431
1432
|
Z,
|
|
@@ -1437,13 +1438,13 @@ Q = __decorate([o({
|
|
|
1437
1438
|
//#region projects/ic-suite/callidescope/callidescope-cli/src/callidescope-cli.module.ts
|
|
1438
1439
|
var $ = class MainModule {};
|
|
1439
1440
|
$ = __decorate([o({ imports: [
|
|
1440
|
-
|
|
1441
|
+
se.forRoot({
|
|
1441
1442
|
envFilePath: ".env",
|
|
1442
1443
|
isGlobal: !0,
|
|
1443
1444
|
validate: (e) => Pe.parse(e)
|
|
1444
1445
|
}),
|
|
1445
|
-
|
|
1446
|
-
|
|
1446
|
+
ce,
|
|
1447
|
+
A,
|
|
1447
1448
|
U,
|
|
1448
1449
|
R,
|
|
1449
1450
|
K,
|
|
@@ -1451,4 +1452,4 @@ $ = __decorate([o({ imports: [
|
|
|
1451
1452
|
p
|
|
1452
1453
|
] })], $);
|
|
1453
1454
|
//#endregion
|
|
1454
|
-
export { F as a, R as i, B as n,
|
|
1455
|
+
export { F as a, R as i, B as n, k as o, z as r, __name as s, $ as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { o as e, t } from "../callidescope-cli.module-
|
|
2
|
+
import { o as e, t } from "../callidescope-cli.module-DSezkxJR.js";
|
|
3
3
|
import "reflect-metadata";
|
|
4
4
|
import { CommandFactory as n } from "nest-commander";
|
|
5
5
|
//#region projects/ic-suite/callidescope/callidescope-cli/src/callidescope-cli.main.ts
|
package/dist/src/index.d.ts
CHANGED
|
@@ -605,14 +605,14 @@ export declare interface TraceArguments {
|
|
|
605
605
|
readonly authoredLimits?: CallidescopeLimits | undefined;
|
|
606
606
|
readonly configuration: ResolvedCallidescopeConfiguration;
|
|
607
607
|
/**
|
|
608
|
-
* The file `configuration` was read from,
|
|
608
|
+
* The file `configuration` was read from, always the one `--config` named.
|
|
609
609
|
*
|
|
610
610
|
* Carried so the trace can skip it while resolving a configuration beside
|
|
611
611
|
* every project it reaches: one file holds one role per run, and a package
|
|
612
612
|
* whose task names its own file would otherwise have it read a second time
|
|
613
613
|
* as that package's project configuration.
|
|
614
614
|
*/
|
|
615
|
-
readonly configurationPath
|
|
615
|
+
readonly configurationPath: string;
|
|
616
616
|
/** Project directories to trace. Every project in the workspace when empty. */
|
|
617
617
|
readonly directories: readonly string[];
|
|
618
618
|
/**
|
package/dist/src/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as AddressLookupModule, r as AddressLookupService, i as CallidescopeModule, a as CallidescopeService, t as MainModule } from "../callidescope-cli.module-
|
|
1
|
+
export { n as AddressLookupModule, r as AddressLookupService, i as CallidescopeModule, a as CallidescopeService, t as MainModule } from "../callidescope-cli.module-DSezkxJR.js";
|
package/package.json
CHANGED
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
"url": "https://github.com/organizzolini/codebase/issues"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@callidescope/configuration": "0.0.
|
|
11
|
-
"@callidescope/core": "0.0.
|
|
12
|
-
"@callidescope/graph": "0.0.
|
|
13
|
-
"@callidescope/output": "0.0.
|
|
10
|
+
"@callidescope/configuration": "0.0.30",
|
|
11
|
+
"@callidescope/core": "0.0.29",
|
|
12
|
+
"@callidescope/graph": "0.0.29",
|
|
13
|
+
"@callidescope/output": "0.0.29",
|
|
14
14
|
"@nestjs/common": "^11.1.21 || ^12.0.1",
|
|
15
15
|
"@nestjs/config": "^12.0.0",
|
|
16
16
|
"@nestjs/core": "^11.1.21 || ^12.0.1",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"strict": true
|
|
78
78
|
},
|
|
79
79
|
"types": "./dist/src/index.d.ts",
|
|
80
|
-
"version": "0.0.
|
|
80
|
+
"version": "0.0.30"
|
|
81
81
|
}
|