@codependix/output 0.0.10 → 0.0.12
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/CHANGELOG.md +28 -0
- package/README.md +36 -32
- package/dist/src/index.d.ts +38 -11
- package/dist/src/index.js +255 -230
- package/package.json +7 -7
package/dist/src/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { ConsoleLogger as e, Global as t, Injectable as n, Module as r, Scope as i } from "@nestjs/common";
|
|
2
|
-
import {
|
|
3
|
-
import l from "node:
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import h from "
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
2
|
+
import { BoundaryCheckModule as a, BoundaryOutcomeReportService as o, BoundaryReportService as s } from "@codependix/boundaries";
|
|
3
|
+
import { existsSync as c, mkdirSync as l, readFileSync as u, writeFileSync as d } from "node:fs";
|
|
4
|
+
import f from "node:path";
|
|
5
|
+
import { CODEPENDIX_GRAPH_TYPES as p, ConfigurationModule as ee, ConfigurationService as m, InputError as te } from "@codependix/configuration";
|
|
6
|
+
import { NeighborhoodModule as ne, NeighborhoodService as h, WorkspaceGraphModule as re, WorkspaceGraphService as g } from "@codependix/nx-projects";
|
|
7
|
+
import _ from "pino";
|
|
8
|
+
import { FileImportsWorkspaceGraphModule as ie, FileImportsWorkspaceGraphService as v, PythonModule as y, PythonService as b, TypescriptModule as x, TypescriptService as S } from "@codependix/file-imports";
|
|
9
|
+
import { ModuleGraphModule as C, ModuleGraphService as w, NestjsModulesWorkspaceGraphModule as ae, NestjsModulesWorkspaceGraphService as T, NestjsProjectModule as E, NestjsProjectService as D } from "@codependix/nestjs-modules";
|
|
10
10
|
//#region \0rolldown/runtime.js
|
|
11
|
-
var buildStartMarker = (e) => `<!-- codependix:start name="${e}" -->`, buildEndMarker = (e) => `<!-- codependix:end name="${e}" -->`,
|
|
11
|
+
var buildStartMarker = (e) => `<!-- codependix:start name="${e}" -->`, buildEndMarker = (e) => `<!-- codependix:end name="${e}" -->`, O = "## 🕸️ Codependix", AnchorNotFoundError = class extends Error {
|
|
12
12
|
constructor(e, t) {
|
|
13
13
|
super(`Anchor "${e}" not found in ${t}`), this.name = "AnchorNotFoundError";
|
|
14
14
|
}
|
|
@@ -28,11 +28,11 @@ function __decorate(e, t, n, r) {
|
|
|
28
28
|
}
|
|
29
29
|
//#endregion
|
|
30
30
|
//#region packages/ic-suite/codependix/codependix-output/src/modules/anchors/anchors.service.ts
|
|
31
|
-
var
|
|
31
|
+
var k = class AnchorsService {
|
|
32
32
|
constructor() {}
|
|
33
33
|
appendCodependixSection(e) {
|
|
34
34
|
let t = e.fileContent.trimEnd();
|
|
35
|
-
return `${t.length === 0 ? "" : `${t}\n\n`}${
|
|
35
|
+
return `${t.length === 0 ? "" : `${t}\n\n`}${O}\n\n${e.introLine}\n\n${e.subsectionBlock}\n`;
|
|
36
36
|
}
|
|
37
37
|
buildAnchorPattern(e) {
|
|
38
38
|
let t = this.escapeForPattern(buildStartMarker(e)), n = this.escapeForPattern(buildEndMarker(e));
|
|
@@ -61,7 +61,7 @@ var D = class AnchorsService {
|
|
|
61
61
|
return this.buildAnchorPattern(e.anchorName).test(e.fileContent);
|
|
62
62
|
}
|
|
63
63
|
insertAnchorSection(e) {
|
|
64
|
-
let t = this.wrapInAnchors(e.anchorName, e.content), n = e.subheading === void 0 ? t : `### ${e.subheading}\n\n${t}`, r = RegExp(`^${this.escapeForPattern(
|
|
64
|
+
let t = this.wrapInAnchors(e.anchorName, e.content), n = e.subheading === void 0 ? t : `### ${e.subheading}\n\n${t}`, r = RegExp(`^${this.escapeForPattern(O)}$`, "mu").exec(e.fileContent);
|
|
65
65
|
return r === null ? this.appendCodependixSection({
|
|
66
66
|
fileContent: e.fileContent,
|
|
67
67
|
introLine: e.introLine,
|
|
@@ -85,73 +85,80 @@ var D = class AnchorsService {
|
|
|
85
85
|
].join("\n");
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
|
-
|
|
88
|
+
k = __decorate([n(), __decorateMetadata("design:paramtypes", [])], k);
|
|
89
89
|
//#endregion
|
|
90
90
|
//#region packages/ic-suite/codependix/codependix-output/src/modules/anchors/anchors.module.ts
|
|
91
|
-
var
|
|
92
|
-
|
|
91
|
+
var A = class AnchorsModule {};
|
|
92
|
+
A = __decorate([r({
|
|
93
93
|
controllers: [],
|
|
94
|
-
exports: [
|
|
94
|
+
exports: [k],
|
|
95
95
|
imports: [],
|
|
96
|
-
providers: [
|
|
97
|
-
})],
|
|
96
|
+
providers: [k]
|
|
97
|
+
})], A);
|
|
98
98
|
//#endregion
|
|
99
99
|
//#region packages/ic-suite/codependix/codependix-output/src/modules/graph-run/graph-run.constants.ts
|
|
100
|
-
var
|
|
100
|
+
var oe = Object.freeze({
|
|
101
101
|
failures: [],
|
|
102
102
|
results: []
|
|
103
|
-
}),
|
|
103
|
+
}), se = Object.freeze({
|
|
104
104
|
failures: [],
|
|
105
105
|
results: [],
|
|
106
106
|
workspaceEntry: void 0
|
|
107
|
-
}),
|
|
108
|
-
fileImports:
|
|
109
|
-
nestjsModules:
|
|
110
|
-
nxProjects:
|
|
111
|
-
},
|
|
107
|
+
}), ce = "fileImports", j = "File Imports", M = "Dependency graphs exported by [codependix](https://github.com/Organizzolini/codebase/tree/main/packages/ic-suite/codependix/codependix-cli), regenerated by `nx run codebase:codependix:write`.", le = "nestjsModules", N = "NestJS Module Graph", ue = "nxProjects", de = "Nx Neighborhood", fe = "Python File Imports", P = "workspace", pe = "boundaries", me = "Boundaries", F = "json", I = "markdown", L = [F, I], he = {
|
|
108
|
+
fileImports: j,
|
|
109
|
+
nestjsModules: N,
|
|
110
|
+
nxProjects: de
|
|
111
|
+
}, R = class CombinedOutputService {
|
|
112
112
|
anchorsService;
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
boundaryOutcomeReportService;
|
|
114
|
+
constructor(e, t) {
|
|
115
|
+
this.anchorsService = e, this.boundaryOutcomeReportService = t;
|
|
115
116
|
}
|
|
116
117
|
printConsole(e) {
|
|
117
|
-
let t = e.format === "json" ? this.renderJson(e
|
|
118
|
+
let t = e.format === "json" ? this.renderJson(e) : this.renderMarkdown(e);
|
|
118
119
|
process.stdout.write(`${t}\n`);
|
|
119
120
|
}
|
|
120
121
|
renderJson(e) {
|
|
121
122
|
let t = {};
|
|
122
|
-
for (let n of
|
|
123
|
-
let r = e[n];
|
|
123
|
+
for (let n of p) {
|
|
124
|
+
let r = e.graphs[n];
|
|
124
125
|
r !== void 0 && (t[n] = r.json);
|
|
125
126
|
}
|
|
126
|
-
return JSON.stringify(t, null, 2);
|
|
127
|
+
return e.boundaries !== void 0 && (t[pe] = this.boundaryOutcomeReportService.buildReport(e.boundaries)), JSON.stringify(t, null, 2);
|
|
127
128
|
}
|
|
128
129
|
renderMarkdown(e) {
|
|
129
130
|
let t = "";
|
|
130
|
-
for (let n of
|
|
131
|
-
let r = e[n];
|
|
131
|
+
for (let n of p) {
|
|
132
|
+
let r = e.graphs[n];
|
|
132
133
|
r !== void 0 && (t = this.anchorsService.insertAnchorSection({
|
|
133
134
|
anchorName: n,
|
|
134
135
|
content: r.markdown,
|
|
135
136
|
fileContent: t,
|
|
136
|
-
introLine:
|
|
137
|
-
subheading:
|
|
137
|
+
introLine: M,
|
|
138
|
+
subheading: he[n]
|
|
138
139
|
}));
|
|
139
140
|
}
|
|
140
|
-
return t
|
|
141
|
+
return e.boundaries === void 0 ? t : this.anchorsService.insertAnchorSection({
|
|
142
|
+
anchorName: pe,
|
|
143
|
+
content: this.boundaryOutcomeReportService.renderMarkdown(this.boundaryOutcomeReportService.buildReport(e.boundaries)),
|
|
144
|
+
fileContent: t,
|
|
145
|
+
introLine: M,
|
|
146
|
+
subheading: me
|
|
147
|
+
});
|
|
141
148
|
}
|
|
142
149
|
writeFile(e) {
|
|
143
|
-
let t =
|
|
144
|
-
|
|
150
|
+
let t = f.resolve(e.workingDirectory, e.path);
|
|
151
|
+
l(f.dirname(t), { recursive: !0 }), d(t, `${e.content}\n`, "utf8");
|
|
145
152
|
}
|
|
146
153
|
resolveFormat(e) {
|
|
147
154
|
if (e === void 0) return {
|
|
148
155
|
errors: [],
|
|
149
|
-
format:
|
|
156
|
+
format: I
|
|
150
157
|
};
|
|
151
|
-
let t =
|
|
158
|
+
let t = L.find((t) => t === e);
|
|
152
159
|
return t === void 0 ? {
|
|
153
|
-
errors: [`--format does not accept "${e}". It takes one of ${
|
|
154
|
-
format:
|
|
160
|
+
errors: [`--format does not accept "${e}". It takes one of ${L.map((e) => `"${e}"`).join(" and ")}, as in "--format ${I}".`],
|
|
161
|
+
format: I
|
|
155
162
|
} : {
|
|
156
163
|
errors: [],
|
|
157
164
|
format: t
|
|
@@ -159,37 +166,37 @@ var se = Object.freeze({
|
|
|
159
166
|
}
|
|
160
167
|
run(e) {
|
|
161
168
|
this.printConsole(e), e.jsonOutputPath !== void 0 && this.writeFile({
|
|
162
|
-
content: this.renderJson(e
|
|
169
|
+
content: this.renderJson(e),
|
|
163
170
|
path: e.jsonOutputPath,
|
|
164
171
|
workingDirectory: e.workingDirectory
|
|
165
172
|
}), e.markdownOutputPath !== void 0 && this.writeFile({
|
|
166
|
-
content: this.renderMarkdown(e
|
|
173
|
+
content: this.renderMarkdown(e),
|
|
167
174
|
path: e.markdownOutputPath,
|
|
168
175
|
workingDirectory: e.workingDirectory
|
|
169
176
|
});
|
|
170
177
|
}
|
|
171
178
|
};
|
|
172
|
-
|
|
179
|
+
R = __decorate([n(), __decorateMetadata("design:paramtypes", [k === void 0 ? Object : k, o === void 0 ? Object : o])], R);
|
|
173
180
|
//#endregion
|
|
174
181
|
//#region packages/ic-suite/codependix/codependix-output/src/modules/combined-output/combined-output.module.ts
|
|
175
|
-
var
|
|
176
|
-
|
|
182
|
+
var z = class CombinedOutputModule {};
|
|
183
|
+
z = __decorate([r({
|
|
177
184
|
controllers: [],
|
|
178
|
-
exports: [
|
|
179
|
-
imports: [
|
|
180
|
-
providers: [
|
|
181
|
-
})],
|
|
185
|
+
exports: [R],
|
|
186
|
+
imports: [A, a],
|
|
187
|
+
providers: [R]
|
|
188
|
+
})], z);
|
|
182
189
|
//#endregion
|
|
183
190
|
//#region packages/ic-suite/codependix/codependix-output/src/modules/delivery/delivery.service.ts
|
|
184
|
-
var
|
|
191
|
+
var B = class DeliveryService {
|
|
185
192
|
anchorsService;
|
|
186
193
|
constructor(e) {
|
|
187
194
|
this.anchorsService = e;
|
|
188
195
|
}
|
|
189
196
|
checkAnchoredMarkdown(e) {
|
|
190
|
-
let t =
|
|
191
|
-
if (!
|
|
192
|
-
let n =
|
|
197
|
+
let t = f.resolve(e.absoluteRoot, e.path);
|
|
198
|
+
if (!c(t)) throw new AnchorNotFoundError(e.anchorName, t);
|
|
199
|
+
let n = u(t, "utf8");
|
|
193
200
|
if (!this.anchorsService.hasAnchor({
|
|
194
201
|
anchorName: e.anchorName,
|
|
195
202
|
fileContent: n,
|
|
@@ -228,7 +235,7 @@ var R = class DeliveryService {
|
|
|
228
235
|
return r === t.replaceAll(/\s+/gu, " ").trim() && r.length > 0 ? "formatting" : "graph";
|
|
229
236
|
}
|
|
230
237
|
deliverJson(e) {
|
|
231
|
-
let t =
|
|
238
|
+
let t = f.resolve(e.absoluteRoot, e.path);
|
|
232
239
|
if (e.mode === "check") {
|
|
233
240
|
let n = this.readFileOrEmpty(t);
|
|
234
241
|
n !== e.content && (e.stalePaths.push(e.path), e.staleExports.push({
|
|
@@ -238,11 +245,11 @@ var R = class DeliveryService {
|
|
|
238
245
|
}));
|
|
239
246
|
return;
|
|
240
247
|
}
|
|
241
|
-
|
|
248
|
+
l(f.dirname(t), { recursive: !0 }), d(t, e.content, "utf8");
|
|
242
249
|
}
|
|
243
250
|
deliverMarkdown(e) {
|
|
244
251
|
if (e.anchor === void 0) {
|
|
245
|
-
let t =
|
|
252
|
+
let t = f.resolve(e.absoluteRoot, e.path), n = `${e.content}\n`;
|
|
246
253
|
if (e.mode === "check") {
|
|
247
254
|
let r = this.readFileOrEmpty(t);
|
|
248
255
|
r !== n && (e.stalePaths.push(e.path), e.staleExports.push({
|
|
@@ -252,7 +259,7 @@ var R = class DeliveryService {
|
|
|
252
259
|
}));
|
|
253
260
|
return;
|
|
254
261
|
}
|
|
255
|
-
|
|
262
|
+
l(f.dirname(t), { recursive: !0 }), d(t, n, "utf8");
|
|
256
263
|
return;
|
|
257
264
|
}
|
|
258
265
|
if (e.mode === "check") {
|
|
@@ -276,7 +283,7 @@ var R = class DeliveryService {
|
|
|
276
283
|
}
|
|
277
284
|
readFileOrEmpty(e) {
|
|
278
285
|
try {
|
|
279
|
-
return
|
|
286
|
+
return u(e, "utf8");
|
|
280
287
|
} catch {
|
|
281
288
|
return "";
|
|
282
289
|
}
|
|
@@ -297,9 +304,9 @@ var R = class DeliveryService {
|
|
|
297
304
|
};
|
|
298
305
|
}
|
|
299
306
|
writeAnchoredMarkdown(e) {
|
|
300
|
-
let t =
|
|
301
|
-
if (!
|
|
302
|
-
let n =
|
|
307
|
+
let t = f.resolve(e.absoluteRoot, e.path);
|
|
308
|
+
if (!c(t)) throw new AnchorNotFoundError(e.anchorName, t);
|
|
309
|
+
let n = u(t, "utf8");
|
|
303
310
|
if (!this.anchorsService.hasAnchor({
|
|
304
311
|
anchorName: e.anchorName,
|
|
305
312
|
fileContent: n,
|
|
@@ -320,7 +327,7 @@ var R = class DeliveryService {
|
|
|
320
327
|
filePath: t,
|
|
321
328
|
newContent: e.content
|
|
322
329
|
});
|
|
323
|
-
r !== n &&
|
|
330
|
+
r !== n && d(t, r, "utf8");
|
|
324
331
|
}
|
|
325
332
|
writeAutoCreatedAnchorSection(e) {
|
|
326
333
|
if (e.markdownSection === void 0) throw new AnchorNotFoundError(e.anchorName, e.resolvedPath);
|
|
@@ -331,7 +338,7 @@ var R = class DeliveryService {
|
|
|
331
338
|
introLine: e.markdownSection.introLine,
|
|
332
339
|
subheading: e.markdownSection.subheading
|
|
333
340
|
});
|
|
334
|
-
return
|
|
341
|
+
return d(e.resolvedPath, t, "utf8"), !0;
|
|
335
342
|
}
|
|
336
343
|
deliverGraphOutput(e) {
|
|
337
344
|
let { markdownSection: t, mode: n, project: r } = e, i = [], a = [], o = this.resolveJsonDelivery(e), s = this.resolveMarkdownDelivery(e);
|
|
@@ -362,19 +369,19 @@ var R = class DeliveryService {
|
|
|
362
369
|
return `${JSON.stringify(e, null, 2)}\n`;
|
|
363
370
|
}
|
|
364
371
|
};
|
|
365
|
-
|
|
372
|
+
B = __decorate([n(), __decorateMetadata("design:paramtypes", [k === void 0 ? Object : k])], B);
|
|
366
373
|
//#endregion
|
|
367
374
|
//#region packages/ic-suite/codependix/codependix-output/src/modules/delivery/delivery.module.ts
|
|
368
|
-
var
|
|
369
|
-
|
|
375
|
+
var V = class DeliveryModule {};
|
|
376
|
+
V = __decorate([r({
|
|
370
377
|
controllers: [],
|
|
371
|
-
exports: [
|
|
372
|
-
imports: [
|
|
373
|
-
providers: [
|
|
374
|
-
})],
|
|
378
|
+
exports: [B],
|
|
379
|
+
imports: [A],
|
|
380
|
+
providers: [B]
|
|
381
|
+
})], V);
|
|
375
382
|
//#endregion
|
|
376
383
|
//#region packages/logging/src/modules/logger/logger.constants.ts
|
|
377
|
-
var
|
|
384
|
+
var ge = /^(\p{Extended_Pictographic}️?(?:\p{Extended_Pictographic}️?)*)\s+/u, _e = /^([A-Za-z]+)/, ve = /* @__PURE__ */ new Set([
|
|
378
385
|
"built",
|
|
379
386
|
"cut",
|
|
380
387
|
"found",
|
|
@@ -392,7 +399,7 @@ var he = /^(\p{Extended_Pictographic}️?(?:\p{Extended_Pictographic}️?)*)\
|
|
|
392
399
|
"split",
|
|
393
400
|
"took",
|
|
394
401
|
"wrote"
|
|
395
|
-
]),
|
|
402
|
+
]), ye = /* @__PURE__ */ new Set([
|
|
396
403
|
"CommandFactory",
|
|
397
404
|
"ExceptionHandler",
|
|
398
405
|
"GraphQLModule",
|
|
@@ -402,9 +409,9 @@ var he = /^(\p{Extended_Pictographic}️?(?:\p{Extended_Pictographic}️?)*)\
|
|
|
402
409
|
"RouterExplorer",
|
|
403
410
|
"RoutesResolver",
|
|
404
411
|
"TypeOrmModule"
|
|
405
|
-
]),
|
|
412
|
+
]), H, U = class LoggerService extends e {
|
|
406
413
|
static {
|
|
407
|
-
|
|
414
|
+
H = this;
|
|
408
415
|
}
|
|
409
416
|
constructor() {
|
|
410
417
|
super();
|
|
@@ -412,15 +419,15 @@ var he = /^(\p{Extended_Pictographic}️?(?:\p{Extended_Pictographic}️?)*)\
|
|
|
412
419
|
static isProduction = process.env.NODE_ENV === "production";
|
|
413
420
|
static rootLogger;
|
|
414
421
|
static writesToStandardError = !1;
|
|
415
|
-
child =
|
|
422
|
+
child = H.root;
|
|
416
423
|
static createRootLogger() {
|
|
417
424
|
let e = process.env.LOG_LEVEL ?? "info";
|
|
418
|
-
return
|
|
425
|
+
return H.isProduction ? H.writesToStandardError ? _({ level: e }, _.destination(2)) : _({ level: e }) : _({
|
|
419
426
|
level: e,
|
|
420
427
|
transport: {
|
|
421
428
|
options: {
|
|
422
429
|
colorize: !0,
|
|
423
|
-
destination:
|
|
430
|
+
destination: H.writesToStandardError ? 2 : 1,
|
|
424
431
|
ignore: "pid,hostname,emoji",
|
|
425
432
|
messageFormat: "{emoji} {msg}",
|
|
426
433
|
singleLine: !0
|
|
@@ -430,14 +437,14 @@ var he = /^(\p{Extended_Pictographic}️?(?:\p{Extended_Pictographic}️?)*)\
|
|
|
430
437
|
});
|
|
431
438
|
}
|
|
432
439
|
static logToStandardError() {
|
|
433
|
-
if (
|
|
440
|
+
if (H.rootLogger !== void 0) {
|
|
434
441
|
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.");
|
|
435
442
|
return;
|
|
436
443
|
}
|
|
437
|
-
|
|
444
|
+
H.writesToStandardError = !0;
|
|
438
445
|
}
|
|
439
446
|
assertConventionalMessage(e) {
|
|
440
|
-
if (
|
|
447
|
+
if (H.isProduction || this.shouldSkipConventionalMessageValidation(e.context)) return;
|
|
441
448
|
let t = this.getConventionalMessageViolation(e.parsed);
|
|
442
449
|
if (t !== void 0) throw Error(t);
|
|
443
450
|
}
|
|
@@ -448,21 +455,21 @@ var he = /^(\p{Extended_Pictographic}️?(?:\p{Extended_Pictographic}️?)*)\
|
|
|
448
455
|
}), {
|
|
449
456
|
...e.data,
|
|
450
457
|
context: e.context,
|
|
451
|
-
...
|
|
458
|
+
...H.isProduction ? {} : { emoji: e.parsed.emoji }
|
|
452
459
|
};
|
|
453
460
|
}
|
|
454
461
|
getConventionalMessageViolation(e) {
|
|
455
462
|
let t = e.emoji, n = e.text;
|
|
456
463
|
if (t === void 0) return `Log message must start with an emoji naming its subject, then a verb: "${n}"`;
|
|
457
|
-
let r =
|
|
464
|
+
let r = _e.exec(n)?.[1];
|
|
458
465
|
if (r === void 0 || !this.isConventionalVerb(r)) return `Log message must begin with a verb in present progressive or past tense, got "${r ?? ""}": "${t} ${n}"`;
|
|
459
466
|
}
|
|
460
467
|
isConventionalVerb(e) {
|
|
461
468
|
let t = e.toLowerCase();
|
|
462
|
-
return t.endsWith("ing") || t.endsWith("ed") ||
|
|
469
|
+
return t.endsWith("ing") || t.endsWith("ed") || ve.has(t);
|
|
463
470
|
}
|
|
464
471
|
parseMessage(e) {
|
|
465
|
-
let t = String(e), n =
|
|
472
|
+
let t = String(e), n = ge.exec(t), r = n?.[1];
|
|
466
473
|
return r === void 0 ? {
|
|
467
474
|
emoji: void 0,
|
|
468
475
|
text: t
|
|
@@ -472,10 +479,10 @@ var he = /^(\p{Extended_Pictographic}️?(?:\p{Extended_Pictographic}️?)*)\
|
|
|
472
479
|
};
|
|
473
480
|
}
|
|
474
481
|
shouldSkipConventionalMessageValidation(e) {
|
|
475
|
-
return e !== void 0 &&
|
|
482
|
+
return e !== void 0 && ye.has(e);
|
|
476
483
|
}
|
|
477
484
|
static get root() {
|
|
478
|
-
return
|
|
485
|
+
return H.rootLogger ??= H.createRootLogger(), H.rootLogger;
|
|
479
486
|
}
|
|
480
487
|
buildErrorLogEntry(e, t) {
|
|
481
488
|
let n = t instanceof Error ? t.stack || t.message : String(t);
|
|
@@ -485,8 +492,8 @@ var he = /^(\p{Extended_Pictographic}️?(?:\p{Extended_Pictographic}️?)*)\
|
|
|
485
492
|
};
|
|
486
493
|
}
|
|
487
494
|
createTimestampedOutputLogFilePath(e) {
|
|
488
|
-
let t =
|
|
489
|
-
return
|
|
495
|
+
let t = f.join(process.cwd(), "output");
|
|
496
|
+
return c(t) || l(t, { recursive: !0 }), f.join(t, `${e}-${(/* @__PURE__ */ new Date()).toISOString().replaceAll(/[:.]/g, "-")}.log`);
|
|
490
497
|
}
|
|
491
498
|
debug(e, t, n) {
|
|
492
499
|
let r = this.parseMessage(e);
|
|
@@ -519,7 +526,7 @@ var he = /^(\p{Extended_Pictographic}️?(?:\p{Extended_Pictographic}️?)*)\
|
|
|
519
526
|
this.info(e, t, n);
|
|
520
527
|
}
|
|
521
528
|
setContext(e) {
|
|
522
|
-
super.setContext(e), this.child =
|
|
529
|
+
super.setContext(e), this.child = H.root.child({ context: e });
|
|
523
530
|
}
|
|
524
531
|
verbose(e, t, n) {
|
|
525
532
|
let r = this.parseMessage(e);
|
|
@@ -538,19 +545,19 @@ var he = /^(\p{Extended_Pictographic}️?(?:\p{Extended_Pictographic}️?)*)\
|
|
|
538
545
|
}), r.text);
|
|
539
546
|
}
|
|
540
547
|
};
|
|
541
|
-
|
|
548
|
+
U = H = __decorate([n({ scope: i.TRANSIENT }), __decorateMetadata("design:paramtypes", [])], U);
|
|
542
549
|
//#endregion
|
|
543
550
|
//#region packages/logging/src/modules/logger/logger.module.ts
|
|
544
|
-
var
|
|
545
|
-
|
|
551
|
+
var W = class LoggerModule {};
|
|
552
|
+
W = __decorate([t(), r({
|
|
546
553
|
controllers: [],
|
|
547
|
-
exports: [
|
|
554
|
+
exports: [U],
|
|
548
555
|
imports: [],
|
|
549
|
-
providers: [
|
|
550
|
-
})],
|
|
556
|
+
providers: [U]
|
|
557
|
+
})], W);
|
|
551
558
|
//#endregion
|
|
552
559
|
//#region packages/ic-suite/codependix/codependix-output/src/modules/project-graphs/project-graphs.service.ts
|
|
553
|
-
var
|
|
560
|
+
var G = class ProjectGraphsService {
|
|
554
561
|
configurationService;
|
|
555
562
|
deliveryService;
|
|
556
563
|
moduleGraphService;
|
|
@@ -562,7 +569,7 @@ var U = class ProjectGraphsService {
|
|
|
562
569
|
}
|
|
563
570
|
buildMarkdownSection(e) {
|
|
564
571
|
return {
|
|
565
|
-
introLine:
|
|
572
|
+
introLine: M,
|
|
566
573
|
subheading: e
|
|
567
574
|
};
|
|
568
575
|
}
|
|
@@ -587,7 +594,7 @@ var U = class ProjectGraphsService {
|
|
|
587
594
|
graphType: n,
|
|
588
595
|
projectConfiguration: t.projectConfigurations.get(r.name),
|
|
589
596
|
projectName: r.name,
|
|
590
|
-
projectRoot:
|
|
597
|
+
projectRoot: f.relative(t.workingDirectory, r.absoluteRoot),
|
|
591
598
|
projectTags: t.projects.find((e) => e.name === r.name)?.tags
|
|
592
599
|
});
|
|
593
600
|
}
|
|
@@ -596,7 +603,7 @@ var U = class ProjectGraphsService {
|
|
|
596
603
|
return this.deliveryService.deliverGraphOutput({
|
|
597
604
|
jsonContent: r.json === void 0 ? void 0 : this.deliveryService.renderJson(o),
|
|
598
605
|
markdownContent: r.markdown === void 0 ? void 0 : this.typescriptService.renderMermaid(a),
|
|
599
|
-
markdownSection: this.buildMarkdownSection(
|
|
606
|
+
markdownSection: this.buildMarkdownSection(j),
|
|
600
607
|
mode: t,
|
|
601
608
|
project: n,
|
|
602
609
|
resolvedOutput: r
|
|
@@ -607,7 +614,7 @@ var U = class ProjectGraphsService {
|
|
|
607
614
|
return this.deliveryService.deliverGraphOutput({
|
|
608
615
|
jsonContent: r.json === void 0 ? void 0 : this.deliveryService.renderJson(o),
|
|
609
616
|
markdownContent: r.markdown === void 0 ? void 0 : this.moduleGraphService.renderMermaid(a),
|
|
610
|
-
markdownSection: this.buildMarkdownSection(
|
|
617
|
+
markdownSection: this.buildMarkdownSection(N),
|
|
611
618
|
mode: t,
|
|
612
619
|
project: n,
|
|
613
620
|
resolvedOutput: r
|
|
@@ -618,7 +625,7 @@ var U = class ProjectGraphsService {
|
|
|
618
625
|
return this.deliveryService.deliverGraphOutput({
|
|
619
626
|
jsonContent: i.json === void 0 ? void 0 : this.deliveryService.renderJson(this.buildNeighborhoodJsonExport(n)),
|
|
620
627
|
markdownContent: i.markdown === void 0 ? void 0 : this.neighborhoodService.renderMermaid(n),
|
|
621
|
-
markdownSection: this.buildMarkdownSection(
|
|
628
|
+
markdownSection: this.buildMarkdownSection(de),
|
|
622
629
|
mode: t,
|
|
623
630
|
project: r,
|
|
624
631
|
resolvedOutput: i
|
|
@@ -629,7 +636,7 @@ var U = class ProjectGraphsService {
|
|
|
629
636
|
for (let i of t) {
|
|
630
637
|
let t = this.resolveProjectOutput({
|
|
631
638
|
context: e,
|
|
632
|
-
graphType:
|
|
639
|
+
graphType: ce,
|
|
633
640
|
project: i
|
|
634
641
|
});
|
|
635
642
|
if (t.target !== "none") try {
|
|
@@ -652,7 +659,7 @@ var U = class ProjectGraphsService {
|
|
|
652
659
|
for (let i of t) {
|
|
653
660
|
let t = this.resolveProjectOutput({
|
|
654
661
|
context: e,
|
|
655
|
-
graphType:
|
|
662
|
+
graphType: le,
|
|
656
663
|
project: i
|
|
657
664
|
});
|
|
658
665
|
if (t.target !== "none") try {
|
|
@@ -675,7 +682,7 @@ var U = class ProjectGraphsService {
|
|
|
675
682
|
for (let e of t.projects) {
|
|
676
683
|
let a = n.get(e.name), o = this.resolveProjectOutput({
|
|
677
684
|
context: t,
|
|
678
|
-
graphType:
|
|
685
|
+
graphType: ue,
|
|
679
686
|
project: e
|
|
680
687
|
});
|
|
681
688
|
if (a !== void 0 && o.target !== "none") try {
|
|
@@ -695,33 +702,33 @@ var U = class ProjectGraphsService {
|
|
|
695
702
|
};
|
|
696
703
|
}
|
|
697
704
|
};
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
])],
|
|
705
|
+
G = __decorate([n(), __decorateMetadata("design:paramtypes", [
|
|
706
|
+
m === void 0 ? Object : m,
|
|
707
|
+
B === void 0 ? Object : B,
|
|
708
|
+
w === void 0 ? Object : w,
|
|
709
|
+
h === void 0 ? Object : h,
|
|
710
|
+
D === void 0 ? Object : D,
|
|
711
|
+
S === void 0 ? Object : S
|
|
712
|
+
])], G);
|
|
706
713
|
//#endregion
|
|
707
714
|
//#region packages/ic-suite/codependix/codependix-output/src/modules/project-graphs/project-graphs.module.ts
|
|
708
|
-
var
|
|
709
|
-
|
|
715
|
+
var K = class ProjectGraphsModule {};
|
|
716
|
+
K = __decorate([r({
|
|
710
717
|
controllers: [],
|
|
711
|
-
exports: [
|
|
718
|
+
exports: [G],
|
|
712
719
|
imports: [
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
720
|
+
ee,
|
|
721
|
+
V,
|
|
722
|
+
C,
|
|
723
|
+
ne,
|
|
724
|
+
E,
|
|
725
|
+
x
|
|
719
726
|
],
|
|
720
|
-
providers: [
|
|
721
|
-
})],
|
|
727
|
+
providers: [G]
|
|
728
|
+
})], K);
|
|
722
729
|
//#endregion
|
|
723
730
|
//#region packages/ic-suite/codependix/codependix-output/src/modules/python-imports/python-imports.service.ts
|
|
724
|
-
var
|
|
731
|
+
var q = class PythonImportsService {
|
|
725
732
|
configurationService;
|
|
726
733
|
deliveryService;
|
|
727
734
|
pythonService;
|
|
@@ -730,8 +737,8 @@ var G = class PythonImportsService {
|
|
|
730
737
|
}
|
|
731
738
|
buildMarkdownSection() {
|
|
732
739
|
return {
|
|
733
|
-
introLine:
|
|
734
|
-
subheading:
|
|
740
|
+
introLine: M,
|
|
741
|
+
subheading: fe
|
|
735
742
|
};
|
|
736
743
|
}
|
|
737
744
|
collectProjectFailure(e, t) {
|
|
@@ -744,10 +751,10 @@ var G = class PythonImportsService {
|
|
|
744
751
|
let { context: t, project: n } = e;
|
|
745
752
|
return this.configurationService.resolveForProject({
|
|
746
753
|
configuration: t.configuration,
|
|
747
|
-
graphType:
|
|
754
|
+
graphType: ce,
|
|
748
755
|
projectConfiguration: t.projectConfigurations.get(n.name),
|
|
749
756
|
projectName: n.name,
|
|
750
|
-
projectRoot:
|
|
757
|
+
projectRoot: f.relative(t.workingDirectory, n.absoluteRoot),
|
|
751
758
|
projectTags: t.projects.find((e) => e.name === n.name)?.tags
|
|
752
759
|
});
|
|
753
760
|
}
|
|
@@ -785,27 +792,27 @@ var G = class PythonImportsService {
|
|
|
785
792
|
};
|
|
786
793
|
}
|
|
787
794
|
};
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
])],
|
|
795
|
+
q = __decorate([n(), __decorateMetadata("design:paramtypes", [
|
|
796
|
+
m === void 0 ? Object : m,
|
|
797
|
+
B === void 0 ? Object : B,
|
|
798
|
+
b === void 0 ? Object : b
|
|
799
|
+
])], q);
|
|
793
800
|
//#endregion
|
|
794
801
|
//#region packages/ic-suite/codependix/codependix-output/src/modules/python-imports/python-imports.module.ts
|
|
795
|
-
var
|
|
796
|
-
|
|
802
|
+
var J = class PythonImportsModule {};
|
|
803
|
+
J = __decorate([r({
|
|
797
804
|
controllers: [],
|
|
798
|
-
exports: [
|
|
805
|
+
exports: [q],
|
|
799
806
|
imports: [
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
807
|
+
ee,
|
|
808
|
+
V,
|
|
809
|
+
y
|
|
803
810
|
],
|
|
804
|
-
providers: [
|
|
805
|
-
})],
|
|
811
|
+
providers: [q]
|
|
812
|
+
})], J);
|
|
806
813
|
//#endregion
|
|
807
814
|
//#region packages/ic-suite/codependix/codependix-output/src/modules/workspace-graphs/workspace-graphs.service.ts
|
|
808
|
-
var
|
|
815
|
+
var Y = class WorkspaceGraphsService {
|
|
809
816
|
configurationService;
|
|
810
817
|
deliveryService;
|
|
811
818
|
fileImportsWorkspaceGraphService;
|
|
@@ -820,7 +827,7 @@ var q = class WorkspaceGraphsService {
|
|
|
820
827
|
}
|
|
821
828
|
buildMarkdownSection(e) {
|
|
822
829
|
return {
|
|
823
|
-
introLine:
|
|
830
|
+
introLine: M,
|
|
824
831
|
subheading: e
|
|
825
832
|
};
|
|
826
833
|
}
|
|
@@ -843,13 +850,13 @@ var q = class WorkspaceGraphsService {
|
|
|
843
850
|
mode: e.mode,
|
|
844
851
|
project: {
|
|
845
852
|
absoluteRoot: e.workingDirectory,
|
|
846
|
-
name:
|
|
853
|
+
name: P
|
|
847
854
|
},
|
|
848
855
|
resolvedOutput: e.resolvedOutput
|
|
849
856
|
});
|
|
850
857
|
}
|
|
851
858
|
runFileImportsWorkspaceGraph(e) {
|
|
852
|
-
let { configuration: t, mode: n, workingDirectory: r } = e, i = this.configurationService.resolveForWorkspace(t,
|
|
859
|
+
let { configuration: t, mode: n, workingDirectory: r } = e, i = this.configurationService.resolveForWorkspace(t, ce);
|
|
853
860
|
if (i.target === "none") return {
|
|
854
861
|
entry: void 0,
|
|
855
862
|
result: void 0
|
|
@@ -866,7 +873,7 @@ var q = class WorkspaceGraphsService {
|
|
|
866
873
|
result: this.deliverWorkspaceGraph({
|
|
867
874
|
jsonExport: c,
|
|
868
875
|
markdownContent: l,
|
|
869
|
-
markdownSubheading:
|
|
876
|
+
markdownSubheading: j,
|
|
870
877
|
mode: n,
|
|
871
878
|
resolvedOutput: i,
|
|
872
879
|
workingDirectory: r
|
|
@@ -874,7 +881,7 @@ var q = class WorkspaceGraphsService {
|
|
|
874
881
|
};
|
|
875
882
|
}
|
|
876
883
|
async runNestjsModulesWorkspaceGraph(e) {
|
|
877
|
-
let { configuration: t, mode: n, workingDirectory: r } = e, i = this.configurationService.resolveForWorkspace(t,
|
|
884
|
+
let { configuration: t, mode: n, workingDirectory: r } = e, i = this.configurationService.resolveForWorkspace(t, le);
|
|
878
885
|
if (i.target === "none") return {
|
|
879
886
|
entry: void 0,
|
|
880
887
|
result: void 0
|
|
@@ -888,7 +895,7 @@ var q = class WorkspaceGraphsService {
|
|
|
888
895
|
result: this.deliverWorkspaceGraph({
|
|
889
896
|
jsonExport: s,
|
|
890
897
|
markdownContent: c,
|
|
891
|
-
markdownSubheading:
|
|
898
|
+
markdownSubheading: N,
|
|
892
899
|
mode: n,
|
|
893
900
|
resolvedOutput: i,
|
|
894
901
|
workingDirectory: r
|
|
@@ -896,7 +903,7 @@ var q = class WorkspaceGraphsService {
|
|
|
896
903
|
};
|
|
897
904
|
}
|
|
898
905
|
runNxWorkspaceGraph(e) {
|
|
899
|
-
let { configuration: t, graph: n, mode: r, workingDirectory: i } = e, a = this.configurationService.resolveForWorkspace(t,
|
|
906
|
+
let { configuration: t, graph: n, mode: r, workingDirectory: i } = e, a = this.configurationService.resolveForWorkspace(t, ue);
|
|
900
907
|
if (a.target === "none") return {
|
|
901
908
|
entry: void 0,
|
|
902
909
|
result: void 0
|
|
@@ -918,46 +925,46 @@ var q = class WorkspaceGraphsService {
|
|
|
918
925
|
};
|
|
919
926
|
}
|
|
920
927
|
};
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
g === void 0 ? Object : g,
|
|
925
|
-
S === void 0 ? Object : S,
|
|
926
|
-
C === void 0 ? Object : C,
|
|
927
|
-
T === void 0 ? Object : T,
|
|
928
|
+
Y = __decorate([n(), __decorateMetadata("design:paramtypes", [
|
|
929
|
+
m === void 0 ? Object : m,
|
|
930
|
+
B === void 0 ? Object : B,
|
|
928
931
|
v === void 0 ? Object : v,
|
|
932
|
+
w === void 0 ? Object : w,
|
|
933
|
+
T === void 0 ? Object : T,
|
|
934
|
+
D === void 0 ? Object : D,
|
|
929
935
|
b === void 0 ? Object : b,
|
|
930
|
-
|
|
931
|
-
|
|
936
|
+
S === void 0 ? Object : S,
|
|
937
|
+
g === void 0 ? Object : g
|
|
938
|
+
])], Y);
|
|
932
939
|
//#endregion
|
|
933
940
|
//#region packages/ic-suite/codependix/codependix-output/src/modules/workspace-graphs/workspace-graphs.module.ts
|
|
934
|
-
var
|
|
935
|
-
|
|
941
|
+
var X = class WorkspaceGraphsModule {};
|
|
942
|
+
X = __decorate([r({
|
|
936
943
|
controllers: [],
|
|
937
|
-
exports: [
|
|
944
|
+
exports: [Y],
|
|
938
945
|
imports: [
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
re,
|
|
942
|
-
x,
|
|
946
|
+
ee,
|
|
947
|
+
V,
|
|
943
948
|
ie,
|
|
944
|
-
|
|
945
|
-
|
|
949
|
+
C,
|
|
950
|
+
ae,
|
|
951
|
+
E,
|
|
946
952
|
y,
|
|
947
|
-
|
|
953
|
+
x,
|
|
954
|
+
re
|
|
948
955
|
],
|
|
949
|
-
providers: [
|
|
950
|
-
})],
|
|
956
|
+
providers: [Y]
|
|
957
|
+
})], X);
|
|
951
958
|
//#endregion
|
|
952
959
|
//#region packages/ic-suite/codependix/codependix-output/src/modules/graph-run/graph-run.service.ts
|
|
953
|
-
var
|
|
960
|
+
var be, Z = be = class GraphRunService {
|
|
954
961
|
logger;
|
|
955
962
|
neighborhoodService;
|
|
956
963
|
projectGraphsService;
|
|
957
964
|
pythonImportsService;
|
|
958
965
|
workspaceGraphsService;
|
|
959
966
|
constructor(e, t, n, r, i) {
|
|
960
|
-
this.logger = e, this.neighborhoodService = t, this.projectGraphsService = n, this.pythonImportsService = r, this.workspaceGraphsService = i, this.logger.setContext(
|
|
967
|
+
this.logger = e, this.neighborhoodService = t, this.projectGraphsService = n, this.pythonImportsService = r, this.workspaceGraphsService = i, this.logger.setContext(be.name);
|
|
961
968
|
}
|
|
962
969
|
collectCombinedGraphs(e) {
|
|
963
970
|
let { importsOutcome: t, nestjsOutcome: n, nxOutcome: r } = e, i = {};
|
|
@@ -974,12 +981,12 @@ var Y, X = Y = class GraphRunService {
|
|
|
974
981
|
let t = e.build();
|
|
975
982
|
return t.result !== void 0 && e.results.push(t.result), t.entry;
|
|
976
983
|
} catch (t) {
|
|
977
|
-
e.failures.push(this.collectProjectFailure(
|
|
984
|
+
e.failures.push(this.collectProjectFailure(P, t));
|
|
978
985
|
return;
|
|
979
986
|
}
|
|
980
987
|
}
|
|
981
988
|
async run(e) {
|
|
982
|
-
let { enabledGraphTypes: t } = e, n = t.has("nxProjects") ? this.runNxGraphs(e) :
|
|
989
|
+
let { enabledGraphTypes: t } = e, n = t.has("nxProjects") ? this.runNxGraphs(e) : se, r = t.has("nestjsModules") ? await this.runNestjsGraphs(e) : se, i = t.has("fileImports") ? this.runImportGraphs(e) : se, a = t.has("fileImports") ? this.runPythonImportGraphs(e) : oe;
|
|
983
990
|
return {
|
|
984
991
|
combinedGraphs: this.collectCombinedGraphs({
|
|
985
992
|
importsOutcome: i,
|
|
@@ -1020,7 +1027,7 @@ var Y, X = Y = class GraphRunService {
|
|
|
1020
1027
|
let t = await this.workspaceGraphsService.runNestjsModulesWorkspaceGraph(e);
|
|
1021
1028
|
r = t.entry, t.result !== void 0 && n.push(t.result);
|
|
1022
1029
|
} catch (e) {
|
|
1023
|
-
t.push(this.collectProjectFailure(
|
|
1030
|
+
t.push(this.collectProjectFailure(P, e));
|
|
1024
1031
|
}
|
|
1025
1032
|
return {
|
|
1026
1033
|
failures: t,
|
|
@@ -1047,35 +1054,35 @@ var Y, X = Y = class GraphRunService {
|
|
|
1047
1054
|
return this.pythonImportsService.runGraphs(e);
|
|
1048
1055
|
}
|
|
1049
1056
|
};
|
|
1050
|
-
|
|
1051
|
-
V === void 0 ? Object : V,
|
|
1052
|
-
p === void 0 ? Object : p,
|
|
1057
|
+
Z = be = __decorate([n(), __decorateMetadata("design:paramtypes", [
|
|
1053
1058
|
U === void 0 ? Object : U,
|
|
1059
|
+
h === void 0 ? Object : h,
|
|
1054
1060
|
G === void 0 ? Object : G,
|
|
1055
|
-
q === void 0 ? Object : q
|
|
1056
|
-
|
|
1061
|
+
q === void 0 ? Object : q,
|
|
1062
|
+
Y === void 0 ? Object : Y
|
|
1063
|
+
])], Z);
|
|
1057
1064
|
//#endregion
|
|
1058
1065
|
//#region packages/ic-suite/codependix/codependix-output/src/modules/graph-run/graph-run.module.ts
|
|
1059
|
-
var
|
|
1060
|
-
|
|
1066
|
+
var xe = class GraphRunModule {};
|
|
1067
|
+
xe = __decorate([r({
|
|
1061
1068
|
controllers: [],
|
|
1062
|
-
exports: [
|
|
1069
|
+
exports: [Z],
|
|
1063
1070
|
imports: [
|
|
1064
|
-
H,
|
|
1065
|
-
te,
|
|
1066
1071
|
W,
|
|
1072
|
+
ne,
|
|
1067
1073
|
K,
|
|
1068
|
-
J
|
|
1074
|
+
J,
|
|
1075
|
+
X
|
|
1069
1076
|
],
|
|
1070
|
-
providers: [
|
|
1071
|
-
})],
|
|
1077
|
+
providers: [Z]
|
|
1078
|
+
})], xe);
|
|
1072
1079
|
//#endregion
|
|
1073
1080
|
//#region packages/ic-suite/codependix/codependix-output/src/modules/path-query/path-query.constants.ts
|
|
1074
|
-
var
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
],
|
|
1081
|
+
var Se = " → ", Ce = "mermaid", we = [
|
|
1082
|
+
F,
|
|
1083
|
+
I,
|
|
1084
|
+
Ce
|
|
1085
|
+
], Te = "graph LR", buildNoPathMessage = (e, t) => `_No path connects "${e}" to "${t}"._`, Q = class PathQueryService {
|
|
1079
1086
|
fileImportsWorkspaceGraphService;
|
|
1080
1087
|
moduleGraphService;
|
|
1081
1088
|
nestjsModulesWorkspaceGraphService;
|
|
@@ -1138,17 +1145,17 @@ var ye = " → ", be = "mermaid", xe = [
|
|
|
1138
1145
|
}
|
|
1139
1146
|
renderMarkdown(e) {
|
|
1140
1147
|
let t = [];
|
|
1141
|
-
for (let n of
|
|
1148
|
+
for (let n of p) {
|
|
1142
1149
|
let r = e[n];
|
|
1143
1150
|
if (r === void 0) continue;
|
|
1144
|
-
let i = `### ${
|
|
1151
|
+
let i = `### ${he[n]}`, a = r.path === null || r.path.length === 0 ? buildNoPathMessage(r.from, r.to) : r.path.map((e) => `\`${e}\``).join(Se);
|
|
1145
1152
|
t.push(`${i}\n\n${a}`);
|
|
1146
1153
|
}
|
|
1147
1154
|
return t.join("\n\n");
|
|
1148
1155
|
}
|
|
1149
1156
|
renderMermaid(e) {
|
|
1150
1157
|
let t = [];
|
|
1151
|
-
for (let n of
|
|
1158
|
+
for (let n of p) {
|
|
1152
1159
|
let r = e[n];
|
|
1153
1160
|
r !== void 0 && t.push(this.renderMermaidSection(r));
|
|
1154
1161
|
}
|
|
@@ -1159,7 +1166,7 @@ var ye = " → ", be = "mermaid", xe = [
|
|
|
1159
1166
|
if (t === null || t.length === 0) return buildNoPathMessage(e.from, e.to);
|
|
1160
1167
|
let n = [
|
|
1161
1168
|
"```mermaid",
|
|
1162
|
-
|
|
1169
|
+
Te,
|
|
1163
1170
|
...t.map((e) => ` ${this.toMermaidId(e)}["${e}"]`)
|
|
1164
1171
|
];
|
|
1165
1172
|
for (let e = 0; e + 1 < t.length; e++) {
|
|
@@ -1207,12 +1214,12 @@ var ye = " → ", be = "mermaid", xe = [
|
|
|
1207
1214
|
resolveFormat(e) {
|
|
1208
1215
|
if (e === void 0) return {
|
|
1209
1216
|
errors: [],
|
|
1210
|
-
format:
|
|
1217
|
+
format: I
|
|
1211
1218
|
};
|
|
1212
|
-
let t =
|
|
1219
|
+
let t = we.find((t) => t === e);
|
|
1213
1220
|
return t === void 0 ? {
|
|
1214
|
-
errors: [`--format does not accept "${e}". It takes one of ${
|
|
1215
|
-
format:
|
|
1221
|
+
errors: [`--format does not accept "${e}". It takes one of ${we.map((e) => `"${e}"`).join(" and ")}, as in "--format ${I}".`],
|
|
1222
|
+
format: I
|
|
1216
1223
|
} : {
|
|
1217
1224
|
errors: [],
|
|
1218
1225
|
format: t
|
|
@@ -1220,50 +1227,64 @@ var ye = " → ", be = "mermaid", xe = [
|
|
|
1220
1227
|
}
|
|
1221
1228
|
};
|
|
1222
1229
|
Q = __decorate([n(), __decorateMetadata("design:paramtypes", [
|
|
1223
|
-
g === void 0 ? Object : g,
|
|
1224
|
-
S === void 0 ? Object : S,
|
|
1225
|
-
C === void 0 ? Object : C,
|
|
1226
|
-
T === void 0 ? Object : T,
|
|
1227
1230
|
v === void 0 ? Object : v,
|
|
1231
|
+
w === void 0 ? Object : w,
|
|
1232
|
+
T === void 0 ? Object : T,
|
|
1233
|
+
D === void 0 ? Object : D,
|
|
1228
1234
|
b === void 0 ? Object : b,
|
|
1229
|
-
|
|
1235
|
+
S === void 0 ? Object : S,
|
|
1236
|
+
g === void 0 ? Object : g
|
|
1230
1237
|
])], Q);
|
|
1231
1238
|
//#endregion
|
|
1232
1239
|
//#region packages/ic-suite/codependix/codependix-output/src/modules/path-query/path-query.module.ts
|
|
1233
|
-
var
|
|
1234
|
-
|
|
1240
|
+
var Ee = class PathQueryModule {};
|
|
1241
|
+
Ee = __decorate([r({
|
|
1235
1242
|
controllers: [],
|
|
1236
1243
|
exports: [Q],
|
|
1237
1244
|
imports: [
|
|
1238
|
-
re,
|
|
1239
|
-
x,
|
|
1240
1245
|
ie,
|
|
1241
|
-
|
|
1242
|
-
|
|
1246
|
+
C,
|
|
1247
|
+
ae,
|
|
1248
|
+
E,
|
|
1243
1249
|
y,
|
|
1244
|
-
|
|
1250
|
+
x,
|
|
1251
|
+
re
|
|
1245
1252
|
],
|
|
1246
1253
|
providers: [Q]
|
|
1247
|
-
})],
|
|
1254
|
+
})], Ee);
|
|
1248
1255
|
//#endregion
|
|
1249
1256
|
//#region packages/ic-suite/codependix/codependix-output/src/modules/reporting/reporting.service.ts
|
|
1250
|
-
var
|
|
1257
|
+
var De, $ = De = class ReportingService {
|
|
1258
|
+
boundaryOutcomeReportService;
|
|
1251
1259
|
boundaryReportService;
|
|
1252
1260
|
logger;
|
|
1253
|
-
constructor(e, t) {
|
|
1254
|
-
this.
|
|
1261
|
+
constructor(e, t, n) {
|
|
1262
|
+
this.boundaryOutcomeReportService = e, this.boundaryReportService = t, this.logger = n, this.logger.setContext(De.name);
|
|
1263
|
+
}
|
|
1264
|
+
filterVerdict(e, t) {
|
|
1265
|
+
return {
|
|
1266
|
+
failures: e.failures.filter((e) => e.verdict === t),
|
|
1267
|
+
violations: e.violations.filter((e) => e.verdict === t)
|
|
1268
|
+
};
|
|
1269
|
+
}
|
|
1270
|
+
reportBoundaryNotes(e) {
|
|
1271
|
+
(e.failures.length !== 0 || e.violations.length !== 0) && this.logger.warn("🕸️ Found codependix boundary findings in dependencies, not failing", void 0, {
|
|
1272
|
+
failures: this.boundaryOutcomeReportService.renderFailures(e.failures),
|
|
1273
|
+
violations: this.boundaryReportService.renderNotes(e.violations)
|
|
1274
|
+
});
|
|
1255
1275
|
}
|
|
1256
1276
|
reportBoundaries(e) {
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1277
|
+
let t = this.filterVerdict(e, "fail");
|
|
1278
|
+
return t.failures.length > 0 && this.logger.error("💥 Failed running codependix", void 0, { failures: this.boundaryOutcomeReportService.renderFailures(t.failures) }), t.violations.length > 0 && this.logger.error("🕸️ Found codependix boundary violations", void 0, {
|
|
1279
|
+
summary: this.boundaryReportService.renderSummary(t.violations),
|
|
1280
|
+
violations: this.boundaryReportService.renderViolations(t.violations)
|
|
1281
|
+
}), this.reportBoundaryNotes(this.filterVerdict(e, "note")), t.failures.length === 0 && t.violations.length === 0;
|
|
1261
1282
|
}
|
|
1262
1283
|
reportEmptySelection(e) {
|
|
1263
1284
|
e > 0 || this.logger.warn("🕸️ Selected no project to export", void 0, { hint: "name the projects that participate in the configuration's include list" });
|
|
1264
1285
|
}
|
|
1265
1286
|
reportFailure(e) {
|
|
1266
|
-
this.logger.error(e instanceof
|
|
1287
|
+
this.logger.error(e instanceof te ? "🕸️ Rejected the command line" : "💥 Failed running codependix", void 0, { reason: e instanceof Error ? e.message : String(e) }), process.exitCode = 1;
|
|
1267
1288
|
}
|
|
1268
1289
|
reportOutcome(e) {
|
|
1269
1290
|
let t = e.results.filter((e) => !e.isCurrent), n = [...new Set(t.map((e) => e.projectName))];
|
|
@@ -1289,15 +1310,19 @@ var we, $ = we = class ReportingService {
|
|
|
1289
1310
|
e.exportOutcome !== void 0 && this.logger.info("🕸️ Verified every configured codependix export is current", void 0, { projects: e.exportOutcome.results.length }), e.boundaryOutcome !== void 0 && this.logger.info("🕸️ Verified every declared codependix boundary holds");
|
|
1290
1311
|
}
|
|
1291
1312
|
};
|
|
1292
|
-
$ =
|
|
1313
|
+
$ = De = __decorate([n(), __decorateMetadata("design:paramtypes", [
|
|
1314
|
+
o === void 0 ? Object : o,
|
|
1315
|
+
s === void 0 ? Object : s,
|
|
1316
|
+
U === void 0 ? Object : U
|
|
1317
|
+
])], $);
|
|
1293
1318
|
//#endregion
|
|
1294
1319
|
//#region packages/ic-suite/codependix/codependix-output/src/modules/reporting/reporting.module.ts
|
|
1295
|
-
var
|
|
1296
|
-
|
|
1320
|
+
var Oe = class ReportingModule {};
|
|
1321
|
+
Oe = __decorate([r({
|
|
1297
1322
|
controllers: [],
|
|
1298
1323
|
exports: [$],
|
|
1299
|
-
imports: [
|
|
1324
|
+
imports: [a, W],
|
|
1300
1325
|
providers: [$]
|
|
1301
|
-
})],
|
|
1326
|
+
})], Oe);
|
|
1302
1327
|
//#endregion
|
|
1303
|
-
export { AnchorNotFoundError,
|
|
1328
|
+
export { AnchorNotFoundError, A as AnchorsModule, k as AnchorsService, O as CODEPENDIX_SECTION_HEADING, z as CombinedOutputModule, R as CombinedOutputService, V as DeliveryModule, B as DeliveryService, F as FORMAT_JSON, I as FORMAT_MARKDOWN, Ce as FORMAT_MERMAID, L as FORMAT_NAMES, xe as GraphRunModule, Z as GraphRunService, M as MARKDOWN_SECTION_INTRO_LINE, Se as PATH_ARROW, we as PATH_FORMAT_NAMES, Te as PATH_MERMAID_HEADER, Ee as PathQueryModule, Q as PathQueryService, Oe as ReportingModule, $ as ReportingService, buildEndMarker, buildNoPathMessage, buildStartMarker };
|