@codometer/output 0.0.8 → 0.0.10
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 +16 -0
- package/README.md +8 -8
- package/dist/src/index.js +374 -374
- package/package.json +4 -4
package/dist/src/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { z as e } from "zod";
|
|
2
2
|
import { ConsoleLogger as t, Global as n, Injectable as r, Module as i, Scope as a } from "@nestjs/common";
|
|
3
|
-
import { existsSync as o, globSync as s, mkdirSync as c, readFileSync as l, writeFileSync as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { CONFIGURATION_FILE_NAMES as
|
|
7
|
-
import { DiscoveryModule as
|
|
8
|
-
import { readFile as
|
|
9
|
-
//#region
|
|
10
|
-
var
|
|
3
|
+
import { existsSync as o, globSync as s, mkdirSync as c, readFileSync as l, writeFileSync as u } from "node:fs";
|
|
4
|
+
import d from "node:path";
|
|
5
|
+
import f from "pino";
|
|
6
|
+
import { CONFIGURATION_FILE_NAMES as ee, ConfigurationModule as te, ConfigurationService as p, DEFAULT_EXCLUDE_GLOBS as ne, DEFAULT_JSON_INDENTATION as m, DEFAULT_MARKDOWN_END_MARKER as h, DEFAULT_MARKDOWN_START_MARKER as g, REPOSITORY_ROOT_MARKERS as re } from "@codometer/configuration";
|
|
7
|
+
import { DiscoveryModule as ie, DiscoveryService as _ } from "@codometer/measurement";
|
|
8
|
+
import { readFile as ae, writeFile as v } from "node:fs/promises";
|
|
9
|
+
//#region \0rolldown/runtime.js
|
|
10
|
+
var y = [
|
|
11
11
|
"codometer-report.json",
|
|
12
12
|
"applications/*/codometer-report.json",
|
|
13
13
|
"packages/*/codometer-report.json",
|
|
14
14
|
"packages/*/*/*/codometer-report.json",
|
|
15
15
|
"tools/*/codometer-report.json"
|
|
16
|
-
],
|
|
16
|
+
], b = e.object({
|
|
17
17
|
failures: e.array(e.object({
|
|
18
18
|
kind: e.enum(["limit", "target"]),
|
|
19
19
|
reason: e.string(),
|
|
@@ -34,7 +34,7 @@ var h = [
|
|
|
34
34
|
})),
|
|
35
35
|
name: e.string()
|
|
36
36
|
}))
|
|
37
|
-
}),
|
|
37
|
+
}), oe = /^(\p{Extended_Pictographic}️?(?:\p{Extended_Pictographic}️?)*)\s+/u, x = /^([A-Za-z]+)/, se = /* @__PURE__ */ new Set([
|
|
38
38
|
"built",
|
|
39
39
|
"cut",
|
|
40
40
|
"found",
|
|
@@ -52,7 +52,7 @@ var h = [
|
|
|
52
52
|
"split",
|
|
53
53
|
"took",
|
|
54
54
|
"wrote"
|
|
55
|
-
]),
|
|
55
|
+
]), ce = /* @__PURE__ */ new Set([
|
|
56
56
|
"CommandFactory",
|
|
57
57
|
"ExceptionHandler",
|
|
58
58
|
"GraphQLModule",
|
|
@@ -65,12 +65,12 @@ var h = [
|
|
|
65
65
|
]);
|
|
66
66
|
//#endregion
|
|
67
67
|
//#region \0@oxc-project+runtime@0.151.0/helpers/esm/decorateMetadata.js
|
|
68
|
-
function
|
|
68
|
+
function __decorateMetadata(e, t) {
|
|
69
69
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(e, t);
|
|
70
70
|
}
|
|
71
71
|
//#endregion
|
|
72
72
|
//#region \0@oxc-project+runtime@0.151.0/helpers/esm/decorate.js
|
|
73
|
-
function
|
|
73
|
+
function __decorate(e, t, n, r) {
|
|
74
74
|
var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
|
|
75
75
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
|
|
76
76
|
else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
|
|
@@ -78,9 +78,9 @@ function v(e, t, n, r) {
|
|
|
78
78
|
}
|
|
79
79
|
//#endregion
|
|
80
80
|
//#region packages/logging/src/modules/logger/logger.service.ts
|
|
81
|
-
var
|
|
81
|
+
var S, C = class LoggerService extends t {
|
|
82
82
|
static {
|
|
83
|
-
|
|
83
|
+
S = this;
|
|
84
84
|
}
|
|
85
85
|
constructor() {
|
|
86
86
|
super();
|
|
@@ -88,15 +88,15 @@ var y, b = class extends t {
|
|
|
88
88
|
static isProduction = process.env.NODE_ENV === "production";
|
|
89
89
|
static rootLogger;
|
|
90
90
|
static writesToStandardError = !1;
|
|
91
|
-
child =
|
|
91
|
+
child = S.root;
|
|
92
92
|
static createRootLogger() {
|
|
93
93
|
let e = process.env.LOG_LEVEL ?? "info";
|
|
94
|
-
return
|
|
94
|
+
return S.isProduction ? S.writesToStandardError ? f({ level: e }, f.destination(2)) : f({ level: e }) : f({
|
|
95
95
|
level: e,
|
|
96
96
|
transport: {
|
|
97
97
|
options: {
|
|
98
98
|
colorize: !0,
|
|
99
|
-
destination:
|
|
99
|
+
destination: S.writesToStandardError ? 2 : 1,
|
|
100
100
|
ignore: "pid,hostname,emoji",
|
|
101
101
|
messageFormat: "{emoji} {msg}",
|
|
102
102
|
singleLine: !0
|
|
@@ -106,14 +106,14 @@ var y, b = class extends t {
|
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
108
|
static logToStandardError() {
|
|
109
|
-
if (
|
|
109
|
+
if (S.rootLogger !== void 0) {
|
|
110
110
|
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.");
|
|
111
111
|
return;
|
|
112
112
|
}
|
|
113
|
-
|
|
113
|
+
S.writesToStandardError = !0;
|
|
114
114
|
}
|
|
115
115
|
assertConventionalMessage(e) {
|
|
116
|
-
if (
|
|
116
|
+
if (S.isProduction || this.shouldSkipConventionalMessageValidation(e.context)) return;
|
|
117
117
|
let t = this.getConventionalMessageViolation(e.parsed);
|
|
118
118
|
if (t !== void 0) throw Error(t);
|
|
119
119
|
}
|
|
@@ -124,21 +124,21 @@ var y, b = class extends t {
|
|
|
124
124
|
}), {
|
|
125
125
|
...e.data,
|
|
126
126
|
context: e.context,
|
|
127
|
-
...
|
|
127
|
+
...S.isProduction ? {} : { emoji: e.parsed.emoji }
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
130
|
getConventionalMessageViolation(e) {
|
|
131
131
|
let t = e.emoji, n = e.text;
|
|
132
132
|
if (t === void 0) return `Log message must start with an emoji naming its subject, then a verb: "${n}"`;
|
|
133
|
-
let r =
|
|
133
|
+
let r = x.exec(n)?.[1];
|
|
134
134
|
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}"`;
|
|
135
135
|
}
|
|
136
136
|
isConventionalVerb(e) {
|
|
137
137
|
let t = e.toLowerCase();
|
|
138
|
-
return t.endsWith("ing") || t.endsWith("ed") ||
|
|
138
|
+
return t.endsWith("ing") || t.endsWith("ed") || se.has(t);
|
|
139
139
|
}
|
|
140
140
|
parseMessage(e) {
|
|
141
|
-
let t = String(e), n =
|
|
141
|
+
let t = String(e), n = oe.exec(t), r = n?.[1];
|
|
142
142
|
return r === void 0 ? {
|
|
143
143
|
emoji: void 0,
|
|
144
144
|
text: t
|
|
@@ -148,10 +148,10 @@ var y, b = class extends t {
|
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
150
|
shouldSkipConventionalMessageValidation(e) {
|
|
151
|
-
return e !== void 0 &&
|
|
151
|
+
return e !== void 0 && ce.has(e);
|
|
152
152
|
}
|
|
153
153
|
static get root() {
|
|
154
|
-
return
|
|
154
|
+
return S.rootLogger ??= S.createRootLogger(), S.rootLogger;
|
|
155
155
|
}
|
|
156
156
|
buildErrorLogEntry(e, t) {
|
|
157
157
|
let n = t instanceof Error ? t.stack || t.message : String(t);
|
|
@@ -161,8 +161,8 @@ var y, b = class extends t {
|
|
|
161
161
|
};
|
|
162
162
|
}
|
|
163
163
|
createTimestampedOutputLogFilePath(e) {
|
|
164
|
-
let t =
|
|
165
|
-
return o(t) || c(t, { recursive: !0 }),
|
|
164
|
+
let t = d.join(process.cwd(), "output");
|
|
165
|
+
return o(t) || c(t, { recursive: !0 }), d.join(t, `${e}-${(/* @__PURE__ */ new Date()).toISOString().replaceAll(/[:.]/g, "-")}.log`);
|
|
166
166
|
}
|
|
167
167
|
debug(e, t, n) {
|
|
168
168
|
let r = this.parseMessage(e);
|
|
@@ -195,7 +195,7 @@ var y, b = class extends t {
|
|
|
195
195
|
this.info(e, t, n);
|
|
196
196
|
}
|
|
197
197
|
setContext(e) {
|
|
198
|
-
super.setContext(e), this.child =
|
|
198
|
+
super.setContext(e), this.child = S.root.child({ context: e });
|
|
199
199
|
}
|
|
200
200
|
verbose(e, t, n) {
|
|
201
201
|
let r = this.parseMessage(e);
|
|
@@ -214,22 +214,22 @@ var y, b = class extends t {
|
|
|
214
214
|
}), r.text);
|
|
215
215
|
}
|
|
216
216
|
};
|
|
217
|
-
|
|
217
|
+
C = S = __decorate([r({ scope: a.TRANSIENT }), __decorateMetadata("design:paramtypes", [])], C);
|
|
218
218
|
//#endregion
|
|
219
219
|
//#region packages/logging/src/modules/logger/logger.module.ts
|
|
220
|
-
var
|
|
221
|
-
|
|
220
|
+
var w = class LoggerModule {};
|
|
221
|
+
w = __decorate([n(), i({
|
|
222
222
|
controllers: [],
|
|
223
|
-
exports: [
|
|
223
|
+
exports: [C],
|
|
224
224
|
imports: [],
|
|
225
|
-
providers: [
|
|
226
|
-
})],
|
|
225
|
+
providers: [C]
|
|
226
|
+
})], w);
|
|
227
227
|
//#endregion
|
|
228
228
|
//#region packages/ic-suite/codometer/codometer-output/src/modules/changes/changes.service.ts
|
|
229
|
-
var
|
|
229
|
+
var T, E = T = class ChangesService {
|
|
230
230
|
logger;
|
|
231
231
|
constructor(e) {
|
|
232
|
-
this.logger = e, this.logger.setContext(
|
|
232
|
+
this.logger = e, this.logger.setContext(T.name);
|
|
233
233
|
}
|
|
234
234
|
buildBaselineRow(e, t, n) {
|
|
235
235
|
return {
|
|
@@ -265,7 +265,7 @@ var S, C = S = class {
|
|
|
265
265
|
}
|
|
266
266
|
parseReport(e, t) {
|
|
267
267
|
try {
|
|
268
|
-
let n =
|
|
268
|
+
let n = b.safeParse(JSON.parse(l(d.join(e, t), "utf8")));
|
|
269
269
|
return n.success ? n.data : void 0;
|
|
270
270
|
} catch {
|
|
271
271
|
return;
|
|
@@ -273,7 +273,7 @@ var S, C = S = class {
|
|
|
273
273
|
}
|
|
274
274
|
readBaseline(e) {
|
|
275
275
|
if (e.baselineDirectory === void 0) return /* @__PURE__ */ new Map();
|
|
276
|
-
let { metrics: t } = this.readReport(e.workingDirectory,
|
|
276
|
+
let { metrics: t } = this.readReport(e.workingDirectory, d.join(e.baselineDirectory, e.reportPath));
|
|
277
277
|
return new Map(t.map((e) => [e.name, e]));
|
|
278
278
|
}
|
|
279
279
|
readBreach(e) {
|
|
@@ -299,8 +299,8 @@ var S, C = S = class {
|
|
|
299
299
|
}));
|
|
300
300
|
}
|
|
301
301
|
readProjectName(e) {
|
|
302
|
-
let t =
|
|
303
|
-
return t === "." || t === "" ? "codebase" :
|
|
302
|
+
let t = d.dirname(e);
|
|
303
|
+
return t === "." || t === "" ? "codebase" : d.basename(t);
|
|
304
304
|
}
|
|
305
305
|
readReport(e, t) {
|
|
306
306
|
let n = this.parseReport(e, t);
|
|
@@ -316,7 +316,7 @@ var S, C = S = class {
|
|
|
316
316
|
};
|
|
317
317
|
}
|
|
318
318
|
readReportPaths(e) {
|
|
319
|
-
let { baselineDirectory: t, workingDirectory: n } = e, r =
|
|
319
|
+
let { baselineDirectory: t, workingDirectory: n } = e, r = y.flatMap((e) => s(e, { cwd: n })), i = t === void 0 ? [] : y.flatMap((e) => s(d.join(t, e), { cwd: n })).map((e) => d.relative(t, e));
|
|
320
320
|
return this.logger.debug("📂 Found the codometer reports", void 0, {
|
|
321
321
|
baseline: i.length,
|
|
322
322
|
current: r.length
|
|
@@ -333,59 +333,59 @@ var S, C = S = class {
|
|
|
333
333
|
};
|
|
334
334
|
}
|
|
335
335
|
};
|
|
336
|
-
|
|
336
|
+
E = T = __decorate([r(), __decorateMetadata("design:paramtypes", [C === void 0 ? Object : C])], E);
|
|
337
337
|
//#endregion
|
|
338
338
|
//#region packages/ic-suite/codometer/codometer-output/src/modules/changes/changes.module.ts
|
|
339
|
-
var
|
|
340
|
-
|
|
339
|
+
var D = class ChangesModule {};
|
|
340
|
+
D = __decorate([i({
|
|
341
341
|
controllers: [],
|
|
342
|
-
exports: [
|
|
343
|
-
imports: [
|
|
344
|
-
providers: [
|
|
345
|
-
})],
|
|
342
|
+
exports: [E],
|
|
343
|
+
imports: [w],
|
|
344
|
+
providers: [E]
|
|
345
|
+
})], D);
|
|
346
346
|
//#endregion
|
|
347
347
|
//#region packages/ic-suite/codometer/codometer-output/src/modules/configuration-listing/configuration-listing.constants.ts
|
|
348
|
-
var
|
|
348
|
+
var le = "—", O = "# 🔧 Codometer Configuration", k = [
|
|
349
349
|
"Directory",
|
|
350
350
|
"Metric",
|
|
351
351
|
"Label",
|
|
352
352
|
"Severity",
|
|
353
353
|
"Value",
|
|
354
354
|
"Declared in"
|
|
355
|
-
],
|
|
355
|
+
], ue = ".size";
|
|
356
356
|
//#endregion
|
|
357
357
|
//#region packages/ic-suite/codometer/codometer-output/src/modules/render/render.utilities.ts
|
|
358
|
-
function
|
|
358
|
+
function formatBytes(e) {
|
|
359
359
|
return Math.abs(e) >= 1e6 ? `${(e / 1e6).toFixed(2)} MB` : `${(e / 1e3).toFixed(2)} kB`;
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function formatCount(e) {
|
|
362
362
|
return e.toLocaleString();
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function formatDelta(e, t) {
|
|
365
365
|
if (e === void 0) return "—";
|
|
366
|
-
let n =
|
|
366
|
+
let n = formatValue(e, t);
|
|
367
367
|
return e >= 0 ? `+${n}` : n;
|
|
368
368
|
}
|
|
369
|
-
function
|
|
370
|
-
return t === "bytes" ?
|
|
369
|
+
function formatValue(e, t) {
|
|
370
|
+
return t === "bytes" ? formatBytes(e) : formatCount(e);
|
|
371
371
|
}
|
|
372
|
-
function
|
|
372
|
+
function hasChanged(e) {
|
|
373
373
|
return e.breach === void 0 ? e.baseValue === void 0 ? e.value !== 0 || e.empty : e.value !== e.baseValue : !0;
|
|
374
374
|
}
|
|
375
375
|
//#endregion
|
|
376
376
|
//#region packages/ic-suite/codometer/codometer-output/src/modules/configuration-listing/configuration-listing.service.ts
|
|
377
|
-
var A = class {
|
|
377
|
+
var A = class ConfigurationListingService {
|
|
378
378
|
configurationService;
|
|
379
379
|
discoveryService;
|
|
380
380
|
constructor(e, t) {
|
|
381
381
|
this.configurationService = e, this.discoveryService = t;
|
|
382
382
|
}
|
|
383
|
-
configurationFileNames = new Set(
|
|
383
|
+
configurationFileNames = new Set(ee);
|
|
384
384
|
async describeConfiguration(e) {
|
|
385
385
|
try {
|
|
386
386
|
let { configuration: t } = await this.configurationService.loadConfigurationFile({
|
|
387
|
-
configurationPath:
|
|
388
|
-
searchDirectory:
|
|
387
|
+
configurationPath: d.resolve(e.workingDirectory, e.file),
|
|
388
|
+
searchDirectory: d.resolve(e.workingDirectory, e.directory)
|
|
389
389
|
});
|
|
390
390
|
return {
|
|
391
391
|
configuration: t,
|
|
@@ -403,7 +403,7 @@ var A = class {
|
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
405
|
formatLimitValue(e, t) {
|
|
406
|
-
return e.endsWith(".size") ?
|
|
406
|
+
return e.endsWith(".size") ? formatBytes(t) : formatCount(t);
|
|
407
407
|
}
|
|
408
408
|
async resolveWalkExclusions(e) {
|
|
409
409
|
try {
|
|
@@ -419,7 +419,7 @@ var A = class {
|
|
|
419
419
|
} catch (e) {
|
|
420
420
|
return {
|
|
421
421
|
error: e instanceof Error ? e.message : String(e),
|
|
422
|
-
exclude: [...
|
|
422
|
+
exclude: [...ne],
|
|
423
423
|
excludeFrom: []
|
|
424
424
|
};
|
|
425
425
|
}
|
|
@@ -427,7 +427,7 @@ var A = class {
|
|
|
427
427
|
async describeConfigurations(e) {
|
|
428
428
|
let { files: t, rootError: n } = await this.findConfigurationFiles(e), r = [];
|
|
429
429
|
for (let n of t) r.push(await this.describeConfiguration({
|
|
430
|
-
directory:
|
|
430
|
+
directory: d.dirname(n),
|
|
431
431
|
file: n,
|
|
432
432
|
workingDirectory: e.workingDirectory
|
|
433
433
|
}));
|
|
@@ -443,7 +443,7 @@ var A = class {
|
|
|
443
443
|
workingDirectory: e.workingDirectory
|
|
444
444
|
});
|
|
445
445
|
return {
|
|
446
|
-
files: n.filter((e) => this.configurationFileNames.has(
|
|
446
|
+
files: n.filter((e) => this.configurationFileNames.has(d.basename(e))).toSorted((e, t) => e.localeCompare(t)),
|
|
447
447
|
rootError: t.error
|
|
448
448
|
};
|
|
449
449
|
}
|
|
@@ -458,10 +458,10 @@ var A = class {
|
|
|
458
458
|
})));
|
|
459
459
|
}
|
|
460
460
|
};
|
|
461
|
-
A =
|
|
461
|
+
A = __decorate([r(), __decorateMetadata("design:paramtypes", [p === void 0 ? Object : p, _ === void 0 ? Object : _])], A);
|
|
462
462
|
//#endregion
|
|
463
463
|
//#region packages/ic-suite/codometer/codometer-output/src/modules/configuration-listing/render-configuration.service.ts
|
|
464
|
-
var j = class {
|
|
464
|
+
var j = class RenderConfigurationService {
|
|
465
465
|
constructor() {}
|
|
466
466
|
renderDirectory(e) {
|
|
467
467
|
let { configuration: t } = e;
|
|
@@ -486,8 +486,8 @@ var j = class {
|
|
|
486
486
|
}
|
|
487
487
|
renderLimitsTable(e) {
|
|
488
488
|
return e.length === 0 ? "No limits are configured." : [
|
|
489
|
-
this.renderRow(
|
|
490
|
-
this.renderRow(
|
|
489
|
+
this.renderRow(k),
|
|
490
|
+
this.renderRow(k.map(() => "---")),
|
|
491
491
|
...e.map((e) => this.renderRow([
|
|
492
492
|
e.directory,
|
|
493
493
|
`\`${e.metric}\``,
|
|
@@ -515,42 +515,42 @@ var j = class {
|
|
|
515
515
|
configurations: e.described,
|
|
516
516
|
rootError: e.rootError ?? null
|
|
517
517
|
}, void 0, 2) : e.limitsOnly ? [
|
|
518
|
-
`${
|
|
518
|
+
`${O}: Limits`,
|
|
519
519
|
"",
|
|
520
520
|
...this.renderRootError(e.rootError),
|
|
521
521
|
this.renderLimitsTable(e.limitRows)
|
|
522
522
|
].join("\n") : [
|
|
523
|
-
|
|
523
|
+
O,
|
|
524
524
|
"",
|
|
525
525
|
...this.renderRootError(e.rootError),
|
|
526
526
|
...e.described.map((e) => this.renderDirectory(e)),
|
|
527
527
|
"",
|
|
528
|
-
`${
|
|
528
|
+
`${O}: Limits`.replace("# 🔧", "## 🔧"),
|
|
529
529
|
"",
|
|
530
530
|
this.renderLimitsTable(e.limitRows)
|
|
531
531
|
].join("\n");
|
|
532
532
|
}
|
|
533
533
|
};
|
|
534
|
-
j =
|
|
534
|
+
j = __decorate([r(), __decorateMetadata("design:paramtypes", [])], j);
|
|
535
535
|
//#endregion
|
|
536
536
|
//#region packages/ic-suite/codometer/codometer-output/src/modules/configuration-listing/configuration-listing.module.ts
|
|
537
|
-
var M = class {};
|
|
538
|
-
M =
|
|
537
|
+
var M = class ConfigurationListingModule {};
|
|
538
|
+
M = __decorate([i({
|
|
539
539
|
controllers: [],
|
|
540
540
|
exports: [A, j],
|
|
541
|
-
imports: [
|
|
541
|
+
imports: [te, ie],
|
|
542
542
|
providers: [A, j]
|
|
543
543
|
})], M);
|
|
544
544
|
//#endregion
|
|
545
545
|
//#region packages/ic-suite/codometer/codometer-output/src/modules/json/json.service.ts
|
|
546
|
-
var N, P = N = class {
|
|
546
|
+
var N, P = N = class JsonService {
|
|
547
547
|
logger;
|
|
548
548
|
constructor(e) {
|
|
549
549
|
this.logger = e, this.logger.setContext(N.name);
|
|
550
550
|
}
|
|
551
551
|
readExisting(e) {
|
|
552
552
|
try {
|
|
553
|
-
return l(
|
|
553
|
+
return l(d.resolve(e), "utf8");
|
|
554
554
|
} catch {
|
|
555
555
|
return "";
|
|
556
556
|
}
|
|
@@ -559,286 +559,286 @@ var N, P = N = class {
|
|
|
559
559
|
return `${JSON.stringify(e.report, null, e.indentation)}\n`;
|
|
560
560
|
}
|
|
561
561
|
sync(e) {
|
|
562
|
-
let t =
|
|
563
|
-
return e.check ? this.readExisting(t) === n : (c(
|
|
562
|
+
let t = d.resolve(e.path), n = this.render(e);
|
|
563
|
+
return e.check ? this.readExisting(t) === n : (c(d.dirname(t), { recursive: !0 }), u(t, n, "utf8"), this.logger.info("📝 Wrote the JSON report", void 0, { path: t }), !0);
|
|
564
564
|
}
|
|
565
565
|
};
|
|
566
|
-
P = N =
|
|
566
|
+
P = N = __decorate([r(), __decorateMetadata("design:paramtypes", [C === void 0 ? Object : C])], P);
|
|
567
567
|
//#endregion
|
|
568
568
|
//#region packages/ic-suite/codometer/codometer-output/src/modules/json/json.module.ts
|
|
569
|
-
var F = class {};
|
|
570
|
-
F =
|
|
569
|
+
var F = class JsonModule {};
|
|
570
|
+
F = __decorate([i({
|
|
571
571
|
controllers: [],
|
|
572
572
|
exports: [P],
|
|
573
|
-
imports: [
|
|
573
|
+
imports: [w],
|
|
574
574
|
providers: [P]
|
|
575
575
|
})], F);
|
|
576
576
|
//#endregion
|
|
577
577
|
//#region packages/ic-suite/codometer/codometer-output/src/modules/markdown/markdown.constants.ts
|
|
578
|
-
var
|
|
578
|
+
var I = "## ⏲️ Codometer", de = /[.*+?^${}()|[\]\\]/g, fe = /\n+$/, MissingMarkdownPathError = class extends Error {
|
|
579
579
|
constructor() {
|
|
580
580
|
super("No markdown path to write to. Set output.markdown.path, pass --markdown, or give syncAnchoredBlock a path of its own."), this.name = "MissingMarkdownPathError";
|
|
581
581
|
}
|
|
582
582
|
};
|
|
583
583
|
//#endregion
|
|
584
584
|
//#region packages/ic-suite/codometer/codometer-output/src/modules/markdown/markdown.utilities.ts
|
|
585
|
-
function
|
|
586
|
-
return ` {
|
|
586
|
+
return `}-${encodeValue(t)}-${n}?style=flat-square)`;
|
|
587
587
|
}
|
|
588
|
-
function
|
|
588
|
+
function buildCssGroup(e) {
|
|
589
589
|
let { css: t } = e;
|
|
590
|
-
return
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
...
|
|
590
|
+
return buildGroup("CSS", [
|
|
591
|
+
buildBadge("CSS Files", t.files, "264de4"),
|
|
592
|
+
buildBadge("CSS Lines", t.lines, "2965f1"),
|
|
593
|
+
buildBadge("CSS Rules", t.rules, "7c3aed"),
|
|
594
|
+
buildBadge("CSS Selectors", t.selectors, "8b5cf6"),
|
|
595
|
+
buildBadge("CSS Declarations", t.declarations, "0284c7"),
|
|
596
|
+
buildBadge("CSS At Rules", t.atRules, "f97316"),
|
|
597
|
+
buildBadge("CSS Media Queries", t.mediaQueries, "ea580c"),
|
|
598
|
+
buildBadge("CSS Custom Properties", t.customProperties, "16a34a"),
|
|
599
|
+
buildBadge("CSS Comments", t.comments, "64748b"),
|
|
600
|
+
...buildCustomBadges(e, "css")
|
|
601
601
|
]);
|
|
602
602
|
}
|
|
603
|
-
function
|
|
604
|
-
return e.custom.filter((e) => e.group === t).map((e) =>
|
|
603
|
+
function buildCustomBadges(e, t) {
|
|
604
|
+
return e.custom.filter((e) => e.group === t).map((e) => buildBadge(e.label, e.count, e.color));
|
|
605
605
|
}
|
|
606
|
-
function
|
|
607
|
-
let t =
|
|
608
|
-
return t.length === 0 ? "" :
|
|
606
|
+
function buildCustomGroup(e) {
|
|
607
|
+
let t = buildCustomBadges(e, "conventions");
|
|
608
|
+
return t.length === 0 ? "" : buildGroup("Conventions", t);
|
|
609
609
|
}
|
|
610
|
-
function
|
|
610
|
+
function buildCustomStatisticInstancesSection(e) {
|
|
611
611
|
return e.custom.filter((e) => (e.instances?.length ?? 0) > 0).map((e) => {
|
|
612
612
|
let t = (e.instances ?? []).map((e) => `- \`${e.file}:${e.line}\` — measured ${e.measured}`);
|
|
613
|
-
return
|
|
613
|
+
return buildGroup(`📝 ${e.label}`, t);
|
|
614
614
|
}).join("\n\n");
|
|
615
615
|
}
|
|
616
|
-
function
|
|
616
|
+
function buildGroup(e, t) {
|
|
617
617
|
return `### ${e}\n\n${t.join("\n")}`;
|
|
618
618
|
}
|
|
619
|
-
function
|
|
619
|
+
function buildHclGroup(e) {
|
|
620
620
|
let { hcl: t } = e;
|
|
621
|
-
return
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
...
|
|
621
|
+
return buildGroup("HCL", [
|
|
622
|
+
buildBadge("HCL Files", t.files, "844fba"),
|
|
623
|
+
buildBadge("HCL Lines", t.lines, "a78bfa"),
|
|
624
|
+
buildBadge("HCL Blocks", t.blocks, "7c3aed"),
|
|
625
|
+
buildBadge("HCL Resources", t.resources, "0284c7"),
|
|
626
|
+
buildBadge("HCL Variables", t.variables, "16a34a"),
|
|
627
|
+
buildBadge("HCL Outputs", t.outputs, "059669"),
|
|
628
|
+
buildBadge("HCL Attributes", t.attributes, "0ea5e9"),
|
|
629
|
+
buildBadge("HCL Interpolations", t.interpolations, "db2777"),
|
|
630
|
+
buildBadge("HCL Comments", t.comments, "64748b"),
|
|
631
|
+
...buildCustomBadges(e, "hcl")
|
|
632
632
|
]);
|
|
633
633
|
}
|
|
634
|
-
function
|
|
634
|
+
function buildJavascriptGroup(e) {
|
|
635
635
|
let { javascript: t } = e;
|
|
636
|
-
return
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
636
|
+
return buildGroup("JavaScript", [
|
|
637
|
+
buildBadge("JavaScript Files", t.files, "f7df1e"),
|
|
638
|
+
buildBadge("Test Files", t.testFiles, "10b981"),
|
|
639
|
+
buildBadge("External Packages", t.externalPackages, "8b5cf6"),
|
|
640
|
+
buildBadge("Classes", t.classes, "7c3aed"),
|
|
641
|
+
buildBadge("Functions", t.functions, "16a34a"),
|
|
642
|
+
buildBadge("Methods", t.methods, "15803d"),
|
|
643
|
+
buildBadge("Sync Functions", t.syncFunctions, "4ade80"),
|
|
644
|
+
buildBadge("Async Functions", t.asyncFunctions, "059669"),
|
|
645
|
+
buildBadge("Constants", t.constants, "dc2626"),
|
|
646
|
+
buildBadge("Imports", t.imports, "0284c7"),
|
|
647
|
+
buildBadge("Exported Symbols", t.exported, "ea580c"),
|
|
648
|
+
buildBadge("Comments", t.comments, "64748b"),
|
|
649
|
+
buildBadge("Comment Lines", t.commentLines, "475569"),
|
|
650
|
+
buildBadge("TODO Comments", t.todos, "ca8a04")
|
|
651
651
|
]);
|
|
652
652
|
}
|
|
653
|
-
function
|
|
653
|
+
function buildJsonGroup(e) {
|
|
654
654
|
let { json: t } = e;
|
|
655
|
-
return
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
...
|
|
655
|
+
return buildGroup("JSON", [
|
|
656
|
+
buildBadge("JSON Files", t.files, "a16207"),
|
|
657
|
+
buildBadge("JSON Lines", t.lines, "ca8a04"),
|
|
658
|
+
buildBadge("JSON Objects", t.objects, "7c3aed"),
|
|
659
|
+
buildBadge("JSON Arrays", t.arrays, "8b5cf6"),
|
|
660
|
+
buildBadge("JSON Properties", t.properties, "0284c7"),
|
|
661
|
+
buildBadge("JSON Strings", t.strings, "16a34a"),
|
|
662
|
+
buildBadge("JSON Numbers", t.numbers, "059669"),
|
|
663
|
+
buildBadge("JSON Booleans", t.booleans, "0ea5e9"),
|
|
664
|
+
buildBadge("JSON Nulls", t.nulls, "64748b"),
|
|
665
|
+
buildBadge("JSON Items", t.items, "475569"),
|
|
666
|
+
buildBadge("JSON Nodes", t.totalNodes, "dc2626"),
|
|
667
|
+
buildBadge("JSON Max Depth", t.maxDepth, "ea580c"),
|
|
668
|
+
...buildCustomBadges(e, "json")
|
|
669
669
|
]);
|
|
670
670
|
}
|
|
671
|
-
function
|
|
671
|
+
function buildJupyterGroup(e) {
|
|
672
672
|
let { jupyter: t } = e;
|
|
673
|
-
return
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
...
|
|
673
|
+
return buildGroup("Jupyter", [
|
|
674
|
+
buildBadge("Notebooks", t.files, "f37626"),
|
|
675
|
+
buildBadge("Notebook Cells", t.cells, "e8a33d"),
|
|
676
|
+
buildBadge("Code Cells", t.codeCells, "3776ab"),
|
|
677
|
+
buildBadge("Markdown Cells", t.markdownCells, "083fa1"),
|
|
678
|
+
buildBadge("Raw Cells", t.rawCells, "9ca3af"),
|
|
679
|
+
buildBadge("Executed Cells", t.executedCells, "16a34a"),
|
|
680
|
+
buildBadge("Cell Outputs", t.outputs, "059669"),
|
|
681
|
+
buildBadge("Notebook Code Lines", t.codeLines, "4b8bbe"),
|
|
682
|
+
buildBadge("Notebook Classes", t.classes, "7c3aed"),
|
|
683
|
+
buildBadge("Notebook Functions", t.functions, "22c55e"),
|
|
684
|
+
buildBadge("Notebook Imports", t.imports, "0284c7"),
|
|
685
|
+
buildBadge("Notebook Decorators", t.decorators, "db2777"),
|
|
686
|
+
buildBadge("Notebook Prose Lines", t.markdownLines, "1f6feb"),
|
|
687
|
+
buildBadge("Notebook Headings", t.headings, "a78bfa"),
|
|
688
|
+
buildBadge("Notebook Links", t.links, "10b981"),
|
|
689
|
+
buildBadge("Notebook Images", t.images, "34d399"),
|
|
690
|
+
buildBadge("Notebook Code Blocks", t.codeBlocks, "dc2626"),
|
|
691
|
+
buildBadge("Notebook Properties", t.properties, "ca8a04"),
|
|
692
|
+
buildBadge("Notebook Nodes", t.totalNodes, "a16207"),
|
|
693
|
+
buildBadge("Notebook Max Depth", t.maxDepth, "ea580c"),
|
|
694
|
+
...buildCustomBadges(e, "jupyter")
|
|
695
695
|
]);
|
|
696
696
|
}
|
|
697
|
-
function
|
|
697
|
+
function buildMarkdownGroup(e) {
|
|
698
698
|
let { markdown: t } = e;
|
|
699
|
-
return
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
...
|
|
699
|
+
return buildGroup("Markdown", [
|
|
700
|
+
buildBadge("Markdown Files", t.files, "083fa1"),
|
|
701
|
+
buildBadge("Markdown Lines", t.lines, "1f6feb"),
|
|
702
|
+
buildBadge("H1", t.headingLevel1, "7c3aed"),
|
|
703
|
+
buildBadge("H2", t.headingLevel2, "8b5cf6"),
|
|
704
|
+
buildBadge("H3", t.headingLevel3, "a78bfa"),
|
|
705
|
+
buildBadge("H4", t.headingLevel4, "c4b5fd"),
|
|
706
|
+
buildBadge("H5", t.headingLevel5, "ddd6fe"),
|
|
707
|
+
buildBadge("H6", t.headingLevel6, "ede9fe"),
|
|
708
|
+
buildBadge("Paragraphs", t.paragraphs, "64748b"),
|
|
709
|
+
buildBadge("Lists", t.lists, "16a34a"),
|
|
710
|
+
buildBadge("List Items", t.listItems, "22c55e"),
|
|
711
|
+
buildBadge("Task List Items", t.taskListItems, "4ade80"),
|
|
712
|
+
buildBadge("Tables", t.tables, "0284c7"),
|
|
713
|
+
buildBadge("Table Rows", t.tableRows, "0ea5e9"),
|
|
714
|
+
buildBadge("Links", t.links, "059669"),
|
|
715
|
+
buildBadge("Images", t.images, "10b981"),
|
|
716
|
+
buildBadge("Code Blocks", t.codeBlocks, "dc2626"),
|
|
717
|
+
buildBadge("Inline Code", t.inlineCode, "ef4444"),
|
|
718
|
+
buildBadge("Block Quotes", t.blockQuotes, "ca8a04"),
|
|
719
|
+
buildBadge("Thematic Breaks", t.thematicBreaks, "a16207"),
|
|
720
|
+
...buildCustomBadges(e, "markdown")
|
|
721
721
|
]);
|
|
722
722
|
}
|
|
723
|
-
function
|
|
723
|
+
function buildPythonGroup(e) {
|
|
724
724
|
let { python: t } = e;
|
|
725
|
-
return
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
...
|
|
725
|
+
return buildGroup("Python", [
|
|
726
|
+
buildBadge("Python Files", t.files, "3776ab"),
|
|
727
|
+
buildBadge("Python Lines", t.lines, "4b8bbe"),
|
|
728
|
+
buildBadge("Python Classes", t.classes, "7c3aed"),
|
|
729
|
+
buildBadge("Python Functions", t.functions, "16a34a"),
|
|
730
|
+
buildBadge("Python Protocols", t.protocols, "0ea5e9"),
|
|
731
|
+
buildBadge("Python Constants", t.constants, "dc2626"),
|
|
732
|
+
buildBadge("Python Imports", t.imports, "0284c7"),
|
|
733
|
+
buildBadge("Python Decorators", t.decorators, "db2777"),
|
|
734
|
+
buildBadge("Docstrings", t.docstrings, "6366f1"),
|
|
735
|
+
buildBadge("Docstring Lines", t.docstringLines, "818cf8"),
|
|
736
|
+
buildBadge("Python Comments", t.comments, "64748b"),
|
|
737
|
+
buildBadge("Python Comment Lines", t.commentLines, "475569"),
|
|
738
|
+
...buildCustomBadges(e, "python")
|
|
739
739
|
]);
|
|
740
740
|
}
|
|
741
|
-
function
|
|
742
|
-
return
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
...
|
|
741
|
+
function buildRepositoryGroup(e, t) {
|
|
742
|
+
return buildGroup(t === "repository" ? "Repository" : "Project", [
|
|
743
|
+
buildBadge("Lines of Code", e.linesOfCode, "22c55e"),
|
|
744
|
+
buildBadge("Repository Size", formatBytes(e.repositoryBytes), "6b7280"),
|
|
745
|
+
buildBadge("Folders", e.folders, "4a4a4a"),
|
|
746
|
+
buildBadge("Source Files", e.sourceFiles, "3178c6"),
|
|
747
|
+
...buildCustomBadges(e, "repository")
|
|
748
748
|
]);
|
|
749
749
|
}
|
|
750
|
-
function
|
|
750
|
+
function buildShellGroup(e) {
|
|
751
751
|
let { shell: t } = e;
|
|
752
|
-
return
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
...
|
|
752
|
+
return buildGroup("Shell", [
|
|
753
|
+
buildBadge("Shell Files", t.files, "89e051"),
|
|
754
|
+
buildBadge("Shell Lines", t.lines, "4eaa25"),
|
|
755
|
+
buildBadge("Shell Functions", t.functions, "16a34a"),
|
|
756
|
+
buildBadge("Shell Variables", t.variables, "0284c7"),
|
|
757
|
+
buildBadge("Shell Exports", t.exports, "ea580c"),
|
|
758
|
+
buildBadge("Shell Conditionals", t.conditionals, "7c3aed"),
|
|
759
|
+
buildBadge("Shell Loops", t.loops, "8b5cf6"),
|
|
760
|
+
buildBadge("Shell Pipelines", t.pipelines, "059669"),
|
|
761
|
+
buildBadge("Shebangs", t.shebangs, "6b7280"),
|
|
762
|
+
buildBadge("Shell Comments", t.comments, "64748b"),
|
|
763
|
+
buildBadge("Shell Comment Lines", t.commentLines, "475569"),
|
|
764
|
+
...buildCustomBadges(e, "shell")
|
|
765
765
|
]);
|
|
766
766
|
}
|
|
767
|
-
function
|
|
767
|
+
function buildSqlGroup(e) {
|
|
768
768
|
let { sql: t } = e;
|
|
769
|
-
return
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
...
|
|
769
|
+
return buildGroup("SQL", [
|
|
770
|
+
buildBadge("SQL Files", t.files, "e38c00"),
|
|
771
|
+
buildBadge("SQL Lines", t.lines, "f29111"),
|
|
772
|
+
buildBadge("SQL Statements", t.statements, "7c3aed"),
|
|
773
|
+
buildBadge("SQL Selects", t.selects, "16a34a"),
|
|
774
|
+
buildBadge("SQL Inserts", t.inserts, "22c55e"),
|
|
775
|
+
buildBadge("SQL Updates", t.updates, "0ea5e9"),
|
|
776
|
+
buildBadge("SQL Deletes", t.deletes, "dc2626"),
|
|
777
|
+
buildBadge("SQL Creates", t.creates, "0284c7"),
|
|
778
|
+
buildBadge("SQL Joins", t.joins, "8b5cf6"),
|
|
779
|
+
buildBadge("SQL CTEs", t.commonTableExpressions, "059669"),
|
|
780
|
+
buildBadge("SQL Comments", t.comments, "64748b"),
|
|
781
|
+
...buildCustomBadges(e, "sql")
|
|
782
782
|
]);
|
|
783
783
|
}
|
|
784
|
-
function
|
|
785
|
-
return e.length === 0 ? "" :
|
|
784
|
+
function buildTargetsGroup(e) {
|
|
785
|
+
return e.length === 0 ? "" : buildGroup("Measured Targets", e.map((e) => buildBadge(`${e.name} Size`, formatTargetSize(e), "6b7280")));
|
|
786
786
|
}
|
|
787
|
-
function
|
|
787
|
+
function buildTomlGroup(e) {
|
|
788
788
|
let { toml: t } = e;
|
|
789
|
-
return
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
...
|
|
789
|
+
return buildGroup("TOML", [
|
|
790
|
+
buildBadge("TOML Files", t.files, "9c4221"),
|
|
791
|
+
buildBadge("TOML Lines", t.lines, "b45309"),
|
|
792
|
+
buildBadge("TOML Tables", t.tables, "7c3aed"),
|
|
793
|
+
buildBadge("TOML Array Tables", t.arrayTables, "8b5cf6"),
|
|
794
|
+
buildBadge("TOML Keys", t.keys, "0284c7"),
|
|
795
|
+
buildBadge("TOML Arrays", t.arrays, "16a34a"),
|
|
796
|
+
buildBadge("TOML Comments", t.comments, "64748b"),
|
|
797
|
+
...buildCustomBadges(e, "toml")
|
|
798
798
|
]);
|
|
799
799
|
}
|
|
800
|
-
function
|
|
800
|
+
function buildTypescriptGroup(e) {
|
|
801
801
|
let { typescript: t } = e;
|
|
802
|
-
return
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
...
|
|
802
|
+
return buildGroup("TypeScript", [
|
|
803
|
+
buildBadge("TypeScript Files", t.files, "3178c6"),
|
|
804
|
+
buildBadge("Interfaces", t.interfaces, "0ea5e9"),
|
|
805
|
+
buildBadge("Generic Declarations", t.genericDeclarations, "0369a1"),
|
|
806
|
+
buildBadge("Enums", t.enums, "f97316"),
|
|
807
|
+
buildBadge("Decorators", t.decorators, "db2777"),
|
|
808
|
+
buildBadge("Doc Comments", t.docComments, "6366f1"),
|
|
809
|
+
...buildCustomBadges(e, "typescript")
|
|
810
810
|
]);
|
|
811
811
|
}
|
|
812
|
-
function
|
|
812
|
+
function buildYamlGroup(e) {
|
|
813
813
|
let { yaml: t } = e;
|
|
814
|
-
return
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
...
|
|
814
|
+
return buildGroup("YAML", [
|
|
815
|
+
buildBadge("YAML Files", t.files, "cb171e"),
|
|
816
|
+
buildBadge("YAML Lines", t.lines, "e34c26"),
|
|
817
|
+
buildBadge("YAML Documents", t.documents, "f97316"),
|
|
818
|
+
buildBadge("YAML Mappings", t.mappings, "7c3aed"),
|
|
819
|
+
buildBadge("YAML Sequences", t.sequences, "8b5cf6"),
|
|
820
|
+
buildBadge("YAML Keys", t.keys, "0284c7"),
|
|
821
|
+
buildBadge("YAML Scalars", t.scalars, "16a34a"),
|
|
822
|
+
buildBadge("YAML Anchors", t.anchors, "059669"),
|
|
823
|
+
buildBadge("YAML Aliases", t.aliases, "10b981"),
|
|
824
|
+
buildBadge("YAML Comments", t.comments, "64748b"),
|
|
825
|
+
buildBadge("YAML Max Depth", t.maxDepth, "ea580c"),
|
|
826
|
+
...buildCustomBadges(e, "yaml")
|
|
827
827
|
]);
|
|
828
828
|
}
|
|
829
|
-
function
|
|
829
|
+
function encodeValue(e) {
|
|
830
830
|
return String(e).replaceAll("-", "--").replaceAll("_", "__").replaceAll(" ", "_");
|
|
831
831
|
}
|
|
832
|
-
function
|
|
833
|
-
let t =
|
|
832
|
+
function formatTargetSize(e) {
|
|
833
|
+
let t = formatBytes(e.bytes);
|
|
834
834
|
return e.compression === "none" ? t : `${t} ${e.compression}`;
|
|
835
835
|
}
|
|
836
836
|
//#endregion
|
|
837
837
|
//#region packages/ic-suite/codometer/codometer-output/src/modules/markdown/markdown.service.ts
|
|
838
|
-
var
|
|
838
|
+
var L, R = L = class MarkdownService {
|
|
839
839
|
logger;
|
|
840
840
|
constructor(e) {
|
|
841
|
-
this.logger = e, this.logger.setContext(
|
|
841
|
+
this.logger = e, this.logger.setContext(L.name);
|
|
842
842
|
}
|
|
843
843
|
buildAnchorHelpers(e) {
|
|
844
844
|
return {
|
|
@@ -859,32 +859,32 @@ var B, V = B = class {
|
|
|
859
859
|
buildBadgeGroups(e) {
|
|
860
860
|
let { statistics: t } = e;
|
|
861
861
|
return [
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
862
|
+
buildRepositoryGroup(t, e.scope),
|
|
863
|
+
buildTargetsGroup(e.targets),
|
|
864
|
+
buildTypescriptGroup(t),
|
|
865
|
+
buildJavascriptGroup(t),
|
|
866
|
+
buildPythonGroup(t),
|
|
867
|
+
buildJsonGroup(t),
|
|
868
|
+
buildYamlGroup(t),
|
|
869
|
+
buildTomlGroup(t),
|
|
870
|
+
buildShellGroup(t),
|
|
871
|
+
buildSqlGroup(t),
|
|
872
|
+
buildHclGroup(t),
|
|
873
|
+
buildCssGroup(t),
|
|
874
|
+
buildCustomGroup(t),
|
|
875
|
+
buildJupyterGroup(t),
|
|
876
|
+
buildMarkdownGroup(t)
|
|
877
877
|
].filter((e) => e !== "").join("\n\n");
|
|
878
878
|
}
|
|
879
879
|
buildBlockRegex(e) {
|
|
880
880
|
return new RegExp(String.raw`${this.escapeRegex(e.startMarker)}[\s\S]*?${this.escapeRegex(e.endMarker)}`);
|
|
881
881
|
}
|
|
882
882
|
escapeRegex(e) {
|
|
883
|
-
return e.replaceAll(
|
|
883
|
+
return e.replaceAll(de, String.raw`\$&`);
|
|
884
884
|
}
|
|
885
885
|
readExisting(e) {
|
|
886
886
|
try {
|
|
887
|
-
return l(
|
|
887
|
+
return l(d.resolve(e), "utf8");
|
|
888
888
|
} catch {
|
|
889
889
|
return "";
|
|
890
890
|
}
|
|
@@ -897,11 +897,11 @@ var B, V = B = class {
|
|
|
897
897
|
};
|
|
898
898
|
}
|
|
899
899
|
syncAnchoredBlock(e) {
|
|
900
|
-
if (e.path === void 0) throw new
|
|
901
|
-
let t =
|
|
900
|
+
if (e.path === void 0) throw new MissingMarkdownPathError();
|
|
901
|
+
let t = d.resolve(e.path), n = this.readExisting(t), r = this.wrapInAnchors(e), i = this.buildBlockRegex(e.destination), a = i.exec(n)?.[0];
|
|
902
902
|
if (e.check) return a === r;
|
|
903
903
|
if (!n.includes(e.destination.startMarker)) {
|
|
904
|
-
let e = n === "" ? "" : `${n.replace(
|
|
904
|
+
let e = n === "" ? "" : `${n.replace(fe, "")}\n\n`;
|
|
905
905
|
return this.writeMarkdownFile(t, `${e}${r}\n`), !0;
|
|
906
906
|
}
|
|
907
907
|
return this.writeMarkdownFile(t, n.replace(i, () => r)), !0;
|
|
@@ -910,7 +910,7 @@ var B, V = B = class {
|
|
|
910
910
|
return `${e.destination.startMarker}\n\n${e.content}\n${e.destination.endMarker}`;
|
|
911
911
|
}
|
|
912
912
|
writeMarkdownFile(e, t) {
|
|
913
|
-
c(
|
|
913
|
+
c(d.dirname(e), { recursive: !0 }), u(e, t, "utf8"), this.logger.info("📝 Wrote the markdown badges", void 0, { path: e });
|
|
914
914
|
}
|
|
915
915
|
renderBadges(e) {
|
|
916
916
|
return this.renderDocument({
|
|
@@ -927,9 +927,9 @@ var B, V = B = class {
|
|
|
927
927
|
});
|
|
928
928
|
}
|
|
929
929
|
renderDocument(e) {
|
|
930
|
-
let t = [
|
|
930
|
+
let t = [I];
|
|
931
931
|
e.description !== void 0 && t.push(e.description), t.push(this.buildBadgeGroups(e));
|
|
932
|
-
let n =
|
|
932
|
+
let n = buildCustomStatisticInstancesSection(e.statistics);
|
|
933
933
|
return n !== "" && t.push(n), t.join("\n\n");
|
|
934
934
|
}
|
|
935
935
|
sync(e) {
|
|
@@ -953,27 +953,27 @@ var B, V = B = class {
|
|
|
953
953
|
});
|
|
954
954
|
}
|
|
955
955
|
};
|
|
956
|
-
|
|
956
|
+
R = L = __decorate([r(), __decorateMetadata("design:paramtypes", [C === void 0 ? Object : C])], R);
|
|
957
957
|
//#endregion
|
|
958
958
|
//#region packages/ic-suite/codometer/codometer-output/src/modules/markdown/markdown.module.ts
|
|
959
|
-
var
|
|
960
|
-
|
|
959
|
+
var z = class MarkdownModule {};
|
|
960
|
+
z = __decorate([i({
|
|
961
961
|
controllers: [],
|
|
962
|
-
exports: [
|
|
963
|
-
imports: [
|
|
964
|
-
providers: [
|
|
965
|
-
})],
|
|
962
|
+
exports: [R],
|
|
963
|
+
imports: [w],
|
|
964
|
+
providers: [R]
|
|
965
|
+
})], z);
|
|
966
966
|
//#endregion
|
|
967
967
|
//#region packages/ic-suite/codometer/codometer-output/src/modules/delivery/delivery.constants.ts
|
|
968
|
-
var
|
|
968
|
+
var B = {
|
|
969
969
|
custom: [],
|
|
970
970
|
description: void 0,
|
|
971
|
-
endMarker:
|
|
971
|
+
endMarker: h,
|
|
972
972
|
path: void 0,
|
|
973
|
-
startMarker:
|
|
973
|
+
startMarker: g,
|
|
974
974
|
type: "markdown",
|
|
975
975
|
write: void 0
|
|
976
|
-
},
|
|
976
|
+
}, V = class DeliveryService {
|
|
977
977
|
jsonService;
|
|
978
978
|
markdownService;
|
|
979
979
|
constructor(e, t) {
|
|
@@ -983,13 +983,13 @@ var ze = {
|
|
|
983
983
|
if (e.format === void 0) return;
|
|
984
984
|
if (e.format === "json") {
|
|
985
985
|
process.stdout.write(this.jsonService.render({
|
|
986
|
-
indentation: e.destinations.json?.indentation ??
|
|
986
|
+
indentation: e.destinations.json?.indentation ?? m,
|
|
987
987
|
report: e.report
|
|
988
988
|
}));
|
|
989
989
|
return;
|
|
990
990
|
}
|
|
991
991
|
let t = this.markdownService.renderBlock({
|
|
992
|
-
destination: e.consoleMarkdown ??
|
|
992
|
+
destination: e.consoleMarkdown ?? B,
|
|
993
993
|
scope: e.scope,
|
|
994
994
|
statistics: e.measurement.statistics,
|
|
995
995
|
targets: this.readTargetSizes(e.measurement)
|
|
@@ -1030,19 +1030,19 @@ var ze = {
|
|
|
1030
1030
|
return this.deliverConsole(e), this.deliverJson(e, t), this.deliverMarkdown(e, t), t;
|
|
1031
1031
|
}
|
|
1032
1032
|
};
|
|
1033
|
-
|
|
1033
|
+
V = __decorate([r(), __decorateMetadata("design:paramtypes", [P === void 0 ? Object : P, R === void 0 ? Object : R])], V);
|
|
1034
1034
|
//#endregion
|
|
1035
1035
|
//#region packages/ic-suite/codometer/codometer-output/src/modules/delivery/delivery.module.ts
|
|
1036
|
-
var
|
|
1037
|
-
|
|
1036
|
+
var H = class DeliveryModule {};
|
|
1037
|
+
H = __decorate([i({
|
|
1038
1038
|
controllers: [],
|
|
1039
|
-
exports: [
|
|
1040
|
-
imports: [F,
|
|
1041
|
-
providers: [
|
|
1042
|
-
})],
|
|
1039
|
+
exports: [V],
|
|
1040
|
+
imports: [F, z],
|
|
1041
|
+
providers: [V]
|
|
1042
|
+
})], H);
|
|
1043
1043
|
//#endregion
|
|
1044
1044
|
//#region packages/ic-suite/codometer/codometer-output/src/modules/destinations/destinations.service.ts
|
|
1045
|
-
var
|
|
1045
|
+
var U = class DestinationsService {
|
|
1046
1046
|
constructor() {}
|
|
1047
1047
|
findConfiguredOutput(e, t) {
|
|
1048
1048
|
return e.find((e) => e.type === t);
|
|
@@ -1053,8 +1053,8 @@ var G = class {
|
|
|
1053
1053
|
let i = this.findConfiguredOutput(e.configuration.outputs, "json");
|
|
1054
1054
|
if (typeof r == "string") return {
|
|
1055
1055
|
custom: i?.custom ?? [],
|
|
1056
|
-
indentation: i?.indentation ??
|
|
1057
|
-
path:
|
|
1056
|
+
indentation: i?.indentation ?? m,
|
|
1057
|
+
path: d.resolve(e.workingDirectory, r)
|
|
1058
1058
|
};
|
|
1059
1059
|
if (i === void 0) {
|
|
1060
1060
|
r === !0 && n.push("--output-json needs a path, or a \"json\" entry in the configuration's \"outputs\" to resolve one from: neither was found, so there is nowhere to write it. Pass --output-json <path>, or declare a \"json\" output.");
|
|
@@ -1063,7 +1063,7 @@ var G = class {
|
|
|
1063
1063
|
return {
|
|
1064
1064
|
custom: i.custom,
|
|
1065
1065
|
indentation: i.indentation,
|
|
1066
|
-
path:
|
|
1066
|
+
path: d.resolve(e.workingDirectory, i.path)
|
|
1067
1067
|
};
|
|
1068
1068
|
}
|
|
1069
1069
|
resolveMarkdown(e, t, n) {
|
|
@@ -1073,9 +1073,9 @@ var G = class {
|
|
|
1073
1073
|
if (typeof r == "string") return {
|
|
1074
1074
|
custom: i?.custom ?? [],
|
|
1075
1075
|
description: i?.description,
|
|
1076
|
-
endMarker: i?.endMarker ??
|
|
1076
|
+
endMarker: i?.endMarker ?? h,
|
|
1077
1077
|
path: this.resolvePath(e.workingDirectory, r),
|
|
1078
|
-
startMarker: i?.startMarker ??
|
|
1078
|
+
startMarker: i?.startMarker ?? g,
|
|
1079
1079
|
type: "markdown",
|
|
1080
1080
|
write: i?.write
|
|
1081
1081
|
};
|
|
@@ -1094,10 +1094,10 @@ var G = class {
|
|
|
1094
1094
|
};
|
|
1095
1095
|
}
|
|
1096
1096
|
resolvePath(e, t) {
|
|
1097
|
-
return t === void 0 ? void 0 :
|
|
1097
|
+
return t === void 0 ? void 0 : d.resolve(e, t);
|
|
1098
1098
|
}
|
|
1099
1099
|
listOutputPaths(e) {
|
|
1100
|
-
return [e.destinations.json?.path, e.destinations.markdown?.path].filter((e) => e !== void 0).map((t) =>
|
|
1100
|
+
return [e.destinations.json?.path, e.destinations.markdown?.path].filter((e) => e !== void 0).map((t) => d.relative(e.workingDirectory, t).split(d.sep).join("/"));
|
|
1101
1101
|
}
|
|
1102
1102
|
resolveConsoleMarkdown(e) {
|
|
1103
1103
|
return this.resolveMarkdown(e, !1, []);
|
|
@@ -1113,41 +1113,41 @@ var G = class {
|
|
|
1113
1113
|
};
|
|
1114
1114
|
}
|
|
1115
1115
|
selectScope(e) {
|
|
1116
|
-
return
|
|
1116
|
+
return re.some((t) => o(d.join(e, t))) ? "repository" : "project";
|
|
1117
1117
|
}
|
|
1118
1118
|
};
|
|
1119
|
-
|
|
1119
|
+
U = __decorate([r(), __decorateMetadata("design:paramtypes", [])], U);
|
|
1120
1120
|
//#endregion
|
|
1121
1121
|
//#region packages/ic-suite/codometer/codometer-output/src/modules/destinations/destinations.module.ts
|
|
1122
|
-
var
|
|
1123
|
-
|
|
1122
|
+
var W = class DestinationsModule {};
|
|
1123
|
+
W = __decorate([i({
|
|
1124
1124
|
controllers: [],
|
|
1125
|
-
exports: [
|
|
1125
|
+
exports: [U],
|
|
1126
1126
|
imports: [],
|
|
1127
|
-
providers: [
|
|
1128
|
-
})],
|
|
1127
|
+
providers: [U]
|
|
1128
|
+
})], W);
|
|
1129
1129
|
//#endregion
|
|
1130
1130
|
//#region packages/ic-suite/codometer/codometer-output/src/modules/documents/documents.service.ts
|
|
1131
|
-
var
|
|
1131
|
+
var G, K = G = class DocumentsService {
|
|
1132
1132
|
logger;
|
|
1133
1133
|
constructor(e) {
|
|
1134
|
-
this.logger = e, this.logger.setContext(
|
|
1134
|
+
this.logger = e, this.logger.setContext(G.name);
|
|
1135
1135
|
}
|
|
1136
1136
|
async readDocument(e) {
|
|
1137
1137
|
try {
|
|
1138
|
-
return (await
|
|
1138
|
+
return (await ae(e, "utf8")).trimEnd();
|
|
1139
1139
|
} catch {
|
|
1140
1140
|
return "";
|
|
1141
1141
|
}
|
|
1142
1142
|
}
|
|
1143
1143
|
async emit(e) {
|
|
1144
1144
|
let { body: t, destination: n, label: r, markers: i } = e, a = this.wrap(t, i);
|
|
1145
|
-
if (n.output !== void 0 && (await
|
|
1145
|
+
if (n.output !== void 0 && (await v(n.output, `${a}\n`, "utf8"), this.logger.info("📝 Wrote a report", void 0, {
|
|
1146
1146
|
label: r,
|
|
1147
1147
|
path: n.output
|
|
1148
1148
|
})), n.markdown !== void 0) {
|
|
1149
1149
|
let e = await this.readDocument(n.markdown), t = this.splice(e, a, i);
|
|
1150
|
-
await
|
|
1150
|
+
await v(n.markdown, `${t}\n`, "utf8"), this.logger.info("📝 Spliced a report", void 0, {
|
|
1151
1151
|
label: r,
|
|
1152
1152
|
path: n.markdown
|
|
1153
1153
|
});
|
|
@@ -1170,22 +1170,22 @@ var q, J = q = class {
|
|
|
1170
1170
|
].join("\n");
|
|
1171
1171
|
}
|
|
1172
1172
|
};
|
|
1173
|
-
|
|
1173
|
+
K = G = __decorate([r(), __decorateMetadata("design:paramtypes", [C === void 0 ? Object : C])], K);
|
|
1174
1174
|
//#endregion
|
|
1175
1175
|
//#region packages/ic-suite/codometer/codometer-output/src/modules/documents/documents.module.ts
|
|
1176
|
-
var
|
|
1177
|
-
|
|
1176
|
+
var q = class DocumentsModule {};
|
|
1177
|
+
q = __decorate([i({
|
|
1178
1178
|
controllers: [],
|
|
1179
|
-
exports: [
|
|
1180
|
-
imports: [
|
|
1181
|
-
providers: [
|
|
1182
|
-
})],
|
|
1179
|
+
exports: [K],
|
|
1180
|
+
imports: [w],
|
|
1181
|
+
providers: [K]
|
|
1182
|
+
})], q);
|
|
1183
1183
|
//#endregion
|
|
1184
1184
|
//#region packages/ic-suite/codometer/codometer-output/src/modules/render/render.constants.ts
|
|
1185
|
-
var
|
|
1185
|
+
var J = "## ⏲️ Codometer", pe = {
|
|
1186
1186
|
end: "<!-- codometer-changes:end -->",
|
|
1187
1187
|
start: "<!-- codometer-changes:start -->"
|
|
1188
|
-
},
|
|
1188
|
+
}, Y = ["| | Metric | Value | `main` | Change |", "|--|--------|-------|--------|--------|"], X = class RenderService {
|
|
1189
1189
|
constructor() {}
|
|
1190
1190
|
groupByProject(e, t) {
|
|
1191
1191
|
let n = /* @__PURE__ */ new Map();
|
|
@@ -1219,7 +1219,7 @@ var Be = "## ⏲️ Codometer", Ve = {
|
|
|
1219
1219
|
];
|
|
1220
1220
|
}
|
|
1221
1221
|
renderProject(e, t, n) {
|
|
1222
|
-
let r = t.filter((e) =>
|
|
1222
|
+
let r = t.filter((e) => hasChanged(e));
|
|
1223
1223
|
if (r.length === 0 && n.length === 0) return [];
|
|
1224
1224
|
let i = this.readIsOpen(r, n) ? " open" : "", a = r.length === 0 ? `\`${e}\`` : `\`${e}\` — ${r.length} changed`;
|
|
1225
1225
|
return [
|
|
@@ -1227,7 +1227,7 @@ var Be = "## ⏲️ Codometer", Ve = {
|
|
|
1227
1227
|
`<summary>${a}</summary>`,
|
|
1228
1228
|
"",
|
|
1229
1229
|
...this.renderFailures(n),
|
|
1230
|
-
...r.length === 0 ? [] : [...
|
|
1230
|
+
...r.length === 0 ? [] : [...Y, ...r.map((e) => this.renderRow(e))],
|
|
1231
1231
|
"</details>",
|
|
1232
1232
|
""
|
|
1233
1233
|
];
|
|
@@ -1237,15 +1237,15 @@ var Be = "## ⏲️ Codometer", Ve = {
|
|
|
1237
1237
|
return `| ${[
|
|
1238
1238
|
this.readStatus(e),
|
|
1239
1239
|
e.removed ? `~~${e.label}~~` : e.label,
|
|
1240
|
-
e.removed ? "—" :
|
|
1241
|
-
e.baseValue === void 0 ? "—" :
|
|
1242
|
-
|
|
1240
|
+
e.removed ? "—" : formatValue(e.value, e.unit),
|
|
1241
|
+
e.baseValue === void 0 ? "—" : formatValue(e.baseValue, e.unit),
|
|
1242
|
+
formatDelta(t, e.unit)
|
|
1243
1243
|
].join(" | ")} |`;
|
|
1244
1244
|
}
|
|
1245
1245
|
renderSection(e) {
|
|
1246
1246
|
let t = this.groupByProject(e.rows, (e) => e.project), n = this.groupByProject(e.failures, (e) => e.project), r = this.readProjects(e).flatMap((e) => this.renderProject(e, t.get(e) ?? [], n.get(e) ?? [])), i = this.renderComparison(e.baselineUrl);
|
|
1247
1247
|
return [
|
|
1248
|
-
|
|
1248
|
+
J,
|
|
1249
1249
|
"",
|
|
1250
1250
|
...r.length === 0 ? [...i, "No codometer changes to report for this pull request."] : [
|
|
1251
1251
|
...i,
|
|
@@ -1255,11 +1255,11 @@ var Be = "## ⏲️ Codometer", Ve = {
|
|
|
1255
1255
|
].join("\n");
|
|
1256
1256
|
}
|
|
1257
1257
|
};
|
|
1258
|
-
X =
|
|
1258
|
+
X = __decorate([r(), __decorateMetadata("design:paramtypes", [])], X);
|
|
1259
1259
|
//#endregion
|
|
1260
1260
|
//#region packages/ic-suite/codometer/codometer-output/src/modules/render/render.module.ts
|
|
1261
|
-
var Z = class {};
|
|
1262
|
-
Z =
|
|
1261
|
+
var Z = class RenderModule {};
|
|
1262
|
+
Z = __decorate([i({
|
|
1263
1263
|
controllers: [],
|
|
1264
1264
|
exports: [X],
|
|
1265
1265
|
imports: [],
|
|
@@ -1267,7 +1267,7 @@ Z = v([i({
|
|
|
1267
1267
|
})], Z);
|
|
1268
1268
|
//#endregion
|
|
1269
1269
|
//#region packages/ic-suite/codometer/codometer-output/src/modules/report/report.service.ts
|
|
1270
|
-
var Q = class {
|
|
1270
|
+
var Q = class ReportService {
|
|
1271
1271
|
constructor() {}
|
|
1272
1272
|
buildLimit(e) {
|
|
1273
1273
|
return {
|
|
@@ -1324,15 +1324,15 @@ var Q = class {
|
|
|
1324
1324
|
};
|
|
1325
1325
|
}
|
|
1326
1326
|
};
|
|
1327
|
-
Q =
|
|
1327
|
+
Q = __decorate([r(), __decorateMetadata("design:paramtypes", [])], Q);
|
|
1328
1328
|
//#endregion
|
|
1329
1329
|
//#region packages/ic-suite/codometer/codometer-output/src/modules/report/report.module.ts
|
|
1330
|
-
var $ = class {};
|
|
1331
|
-
$ =
|
|
1330
|
+
var $ = class ReportModule {};
|
|
1331
|
+
$ = __decorate([i({
|
|
1332
1332
|
controllers: [],
|
|
1333
1333
|
exports: [Q],
|
|
1334
1334
|
imports: [],
|
|
1335
1335
|
providers: [Q]
|
|
1336
1336
|
})], $);
|
|
1337
1337
|
//#endregion
|
|
1338
|
-
export {
|
|
1338
|
+
export { le as ABSENT_LABEL, pe as CODOMETER_MARKERS, O as CONFIGURATION_HEADING, D as ChangesModule, E as ChangesService, M as ConfigurationListingModule, A as ConfigurationListingService, H as DeliveryModule, V as DeliveryService, W as DestinationsModule, U as DestinationsService, q as DocumentsModule, K as DocumentsService, J as HEADING, F as JsonModule, P as JsonService, k as LIMIT_TABLE_COLUMNS, z as MarkdownModule, R as MarkdownService, MissingMarkdownPathError, y as REPORT_GLOBS, j as RenderConfigurationService, Z as RenderModule, X as RenderService, $ as ReportModule, Q as ReportService, ue as SIZE_METRIC_SUFFIX, Y as TABLE_HEADER, b as codometerReportSchema, formatBytes, formatCount, formatDelta, formatValue, hasChanged };
|