@codometer/measurement 0.0.9 → 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 CHANGED
@@ -1,3 +1,11 @@
1
+ ## 0.0.10 (2026-10-08)
2
+
3
+ ### 🧱 Updated Dependencies
4
+
5
+ - Updated codometer-configuration to 0.0.10
6
+ - Updated codometer-languages to 0.0.10
7
+ - Updated codometer-core to 0.0.10
8
+
1
9
  ## 0.0.9 (2026-10-08)
2
10
 
3
11
  ### 🧱 Updated Dependencies
package/README.md CHANGED
@@ -346,13 +346,13 @@ None.
346
346
  ### Project
347
347
 
348
348
  ![Lines of Code](https://img.shields.io/badge/Lines_of_Code-6275-22c55e?style=flat-square)
349
- ![Repository Size](https://img.shields.io/badge/Repository_Size-205.71_kB-6b7280?style=flat-square)
349
+ ![Repository Size](https://img.shields.io/badge/Repository_Size-205.88_kB-6b7280?style=flat-square)
350
350
  ![Folders](https://img.shields.io/badge/Folders-9-4a4a4a?style=flat-square)
351
351
  ![Source Files](https://img.shields.io/badge/Source_Files-53-3178c6?style=flat-square)
352
352
 
353
353
  ### Measured Targets
354
354
 
355
- ![Compiled JavaScript Size](https://img.shields.io/badge/Compiled_JavaScript_Size-8.85_kB_gzip-6b7280?style=flat-square)
355
+ ![Compiled JavaScript Size](https://img.shields.io/badge/Compiled_JavaScript_Size-8.93_kB_gzip-6b7280?style=flat-square)
356
356
 
357
357
  ### TypeScript
358
358
 
@@ -534,16 +534,16 @@ None.
534
534
  ### Markdown
535
535
 
536
536
  ![Markdown Files](https://img.shields.io/badge/Markdown_Files-2-083fa1?style=flat-square)
537
- ![Markdown Lines](https://img.shields.io/badge/Markdown_Lines-265-1f6feb?style=flat-square)
537
+ ![Markdown Lines](https://img.shields.io/badge/Markdown_Lines-273-1f6feb?style=flat-square)
538
538
  ![H1](https://img.shields.io/badge/H1-1-7c3aed?style=flat-square)
539
- ![H2](https://img.shields.io/badge/H2-12-8b5cf6?style=flat-square)
540
- ![H3](https://img.shields.io/badge/H3-18-a78bfa?style=flat-square)
539
+ ![H2](https://img.shields.io/badge/H2-13-8b5cf6?style=flat-square)
540
+ ![H3](https://img.shields.io/badge/H3-19-a78bfa?style=flat-square)
541
541
  ![H4](https://img.shields.io/badge/H4-0-c4b5fd?style=flat-square)
542
542
  ![H5](https://img.shields.io/badge/H5-0-ddd6fe?style=flat-square)
543
543
  ![H6](https://img.shields.io/badge/H6-0-ede9fe?style=flat-square)
544
- ![Paragraphs](https://img.shields.io/badge/Paragraphs-61-64748b?style=flat-square)
545
- ![Lists](https://img.shields.io/badge/Lists-12-16a34a?style=flat-square)
546
- ![List Items](https://img.shields.io/badge/List_Items-41-22c55e?style=flat-square)
544
+ ![Paragraphs](https://img.shields.io/badge/Paragraphs-64-64748b?style=flat-square)
545
+ ![Lists](https://img.shields.io/badge/Lists-13-16a34a?style=flat-square)
546
+ ![List Items](https://img.shields.io/badge/List_Items-44-22c55e?style=flat-square)
547
547
  ![Task List Items](https://img.shields.io/badge/Task_List_Items-0-4ade80?style=flat-square)
548
548
  ![Tables](https://img.shields.io/badge/Tables-2-0284c7?style=flat-square)
549
549
  ![Table Rows](https://img.shields.io/badge/Table_Rows-10-0ea5e9?style=flat-square)
package/dist/src/index.js CHANGED
@@ -5,14 +5,15 @@ import d from "pino";
5
5
  import f from "ignore";
6
6
  import { ConfigurationModule as p, DEFAULT_INPUT_NAME as m, REPOSITORY_ROOT_MARKERS as ee } from "@codometer/configuration";
7
7
  import { LanguagesModule as te, LanguagesService as h } from "@codometer/languages";
8
- import { brotliCompressSync as g, constants as _, gzipSync as v } from "node:zlib";
8
+ import { brotliCompressSync as ne, constants as re, gzipSync as g } from "node:zlib";
9
+ //#endregion
9
10
  //#region \0@oxc-project+runtime@0.151.0/helpers/esm/decorateMetadata.js
10
- function y(e, t) {
11
+ function __decorateMetadata(e, t) {
11
12
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(e, t);
12
13
  }
13
14
  //#endregion
14
15
  //#region \0@oxc-project+runtime@0.151.0/helpers/esm/decorate.js
15
- function b(e, t, n, r) {
16
+ function __decorate(e, t, n, r) {
16
17
  var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
17
18
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
18
19
  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);
@@ -20,7 +21,7 @@ function b(e, t, n, r) {
20
21
  }
21
22
  //#endregion
22
23
  //#region packages/ic-suite/codometer/codometer-measurement/src/modules/customization/customization.service.ts
23
- var x = class {
24
+ var _ = class CustomizationService {
24
25
  constructor() {}
25
26
  buildCommentResult(e, t) {
26
27
  let n = (t[e.label] ?? []).filter((e) => e.breached);
@@ -74,19 +75,19 @@ var x = class {
74
75
  }]);
75
76
  }
76
77
  };
77
- x = b([n(), y("design:paramtypes", [])], x);
78
+ _ = __decorate([n(), __decorateMetadata("design:paramtypes", [])], _);
78
79
  //#endregion
79
80
  //#region packages/ic-suite/codometer/codometer-measurement/src/modules/customization/customization.module.ts
80
- var S = class {};
81
- S = b([r({
81
+ var v = class CustomizationModule {};
82
+ v = __decorate([r({
82
83
  controllers: [],
83
- exports: [x],
84
+ exports: [_],
84
85
  imports: [],
85
- providers: [x]
86
- })], S);
86
+ providers: [_]
87
+ })], v);
87
88
  //#endregion
88
89
  //#region packages/logging/src/modules/logger/logger.constants.ts
89
- var ne = /^(\p{Extended_Pictographic}️?(?:‍\p{Extended_Pictographic}️?)*)\s+/u, re = /^([A-Za-z]+)/, ie = /* @__PURE__ */ new Set([
90
+ var y = /^(\p{Extended_Pictographic}️?(?:‍\p{Extended_Pictographic}️?)*)\s+/u, b = /^([A-Za-z]+)/, ie = /* @__PURE__ */ new Set([
90
91
  "built",
91
92
  "cut",
92
93
  "found",
@@ -114,9 +115,9 @@ var ne = /^(\p{Extended_Pictographic}️?(?:‍\p{Extended_Pictographic}️?)*)\
114
115
  "RouterExplorer",
115
116
  "RoutesResolver",
116
117
  "TypeOrmModule"
117
- ]), C, w = class extends e {
118
+ ]), x, S = class LoggerService extends e {
118
119
  static {
119
- C = this;
120
+ x = this;
120
121
  }
121
122
  constructor() {
122
123
  super();
@@ -124,15 +125,15 @@ var ne = /^(\p{Extended_Pictographic}️?(?:‍\p{Extended_Pictographic}️?)*)\
124
125
  static isProduction = process.env.NODE_ENV === "production";
125
126
  static rootLogger;
126
127
  static writesToStandardError = !1;
127
- child = C.root;
128
+ child = x.root;
128
129
  static createRootLogger() {
129
130
  let e = process.env.LOG_LEVEL ?? "info";
130
- return C.isProduction ? C.writesToStandardError ? d({ level: e }, d.destination(2)) : d({ level: e }) : d({
131
+ return x.isProduction ? x.writesToStandardError ? d({ level: e }, d.destination(2)) : d({ level: e }) : d({
131
132
  level: e,
132
133
  transport: {
133
134
  options: {
134
135
  colorize: !0,
135
- destination: C.writesToStandardError ? 2 : 1,
136
+ destination: x.writesToStandardError ? 2 : 1,
136
137
  ignore: "pid,hostname,emoji",
137
138
  messageFormat: "{emoji} {msg}",
138
139
  singleLine: !0
@@ -142,14 +143,14 @@ var ne = /^(\p{Extended_Pictographic}️?(?:‍\p{Extended_Pictographic}️?)*)\
142
143
  });
143
144
  }
144
145
  static logToStandardError() {
145
- if (C.rootLogger !== void 0) {
146
+ if (x.rootLogger !== void 0) {
146
147
  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.");
147
148
  return;
148
149
  }
149
- C.writesToStandardError = !0;
150
+ x.writesToStandardError = !0;
150
151
  }
151
152
  assertConventionalMessage(e) {
152
- if (C.isProduction || this.shouldSkipConventionalMessageValidation(e.context)) return;
153
+ if (x.isProduction || this.shouldSkipConventionalMessageValidation(e.context)) return;
153
154
  let t = this.getConventionalMessageViolation(e.parsed);
154
155
  if (t !== void 0) throw Error(t);
155
156
  }
@@ -160,13 +161,13 @@ var ne = /^(\p{Extended_Pictographic}️?(?:‍\p{Extended_Pictographic}️?)*)\
160
161
  }), {
161
162
  ...e.data,
162
163
  context: e.context,
163
- ...C.isProduction ? {} : { emoji: e.parsed.emoji }
164
+ ...x.isProduction ? {} : { emoji: e.parsed.emoji }
164
165
  };
165
166
  }
166
167
  getConventionalMessageViolation(e) {
167
168
  let t = e.emoji, n = e.text;
168
169
  if (t === void 0) return `Log message must start with an emoji naming its subject, then a verb: "${n}"`;
169
- let r = re.exec(n)?.[1];
170
+ let r = b.exec(n)?.[1];
170
171
  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}"`;
171
172
  }
172
173
  isConventionalVerb(e) {
@@ -174,7 +175,7 @@ var ne = /^(\p{Extended_Pictographic}️?(?:‍\p{Extended_Pictographic}️?)*)\
174
175
  return t.endsWith("ing") || t.endsWith("ed") || ie.has(t);
175
176
  }
176
177
  parseMessage(e) {
177
- let t = String(e), n = ne.exec(t), r = n?.[1];
178
+ let t = String(e), n = y.exec(t), r = n?.[1];
178
179
  return r === void 0 ? {
179
180
  emoji: void 0,
180
181
  text: t
@@ -187,7 +188,7 @@ var ne = /^(\p{Extended_Pictographic}️?(?:‍\p{Extended_Pictographic}️?)*)\
187
188
  return e !== void 0 && ae.has(e);
188
189
  }
189
190
  static get root() {
190
- return C.rootLogger ??= C.createRootLogger(), C.rootLogger;
191
+ return x.rootLogger ??= x.createRootLogger(), x.rootLogger;
191
192
  }
192
193
  buildErrorLogEntry(e, t) {
193
194
  let n = t instanceof Error ? t.stack || t.message : String(t);
@@ -231,7 +232,7 @@ var ne = /^(\p{Extended_Pictographic}️?(?:‍\p{Extended_Pictographic}️?)*)\
231
232
  this.info(e, t, n);
232
233
  }
233
234
  setContext(e) {
234
- super.setContext(e), this.child = C.root.child({ context: e });
235
+ super.setContext(e), this.child = x.root.child({ context: e });
235
236
  }
236
237
  verbose(e, t, n) {
237
238
  let r = this.parseMessage(e);
@@ -250,43 +251,43 @@ var ne = /^(\p{Extended_Pictographic}️?(?:‍\p{Extended_Pictographic}️?)*)\
250
251
  }), r.text);
251
252
  }
252
253
  };
253
- w = C = b([n({ scope: i.TRANSIENT }), y("design:paramtypes", [])], w);
254
+ S = x = __decorate([n({ scope: i.TRANSIENT }), __decorateMetadata("design:paramtypes", [])], S);
254
255
  //#endregion
255
256
  //#region packages/logging/src/modules/logger/logger.module.ts
256
- var T = class {};
257
- T = b([t(), r({
257
+ var C = class LoggerModule {};
258
+ C = __decorate([t(), r({
258
259
  controllers: [],
259
- exports: [w],
260
+ exports: [S],
260
261
  imports: [],
261
- providers: [w]
262
- })], T);
263
- var oe = ".gitignore", E = /* @__PURE__ */ new Set([
262
+ providers: [S]
263
+ })], C);
264
+ var w = ".gitignore", T = /* @__PURE__ */ new Set([
264
265
  ".cts",
265
266
  ".mts",
266
267
  ".ts",
267
268
  ".tsx"
268
- ]), D = /* @__PURE__ */ new Set([
269
+ ]), E = /* @__PURE__ */ new Set([
269
270
  ".cjs",
270
271
  ".js",
271
272
  ".jsx",
272
273
  ".mjs"
273
- ]), O = /* @__PURE__ */ new Set([
274
+ ]), oe = /* @__PURE__ */ new Set([
274
275
  ".markdown",
275
276
  ".md",
276
277
  ".mdx"
277
- ]), k = /* @__PURE__ */ new Set([
278
+ ]), se = /* @__PURE__ */ new Set([
278
279
  ".json",
279
280
  ".jsonc",
280
281
  ".jsonl"
281
- ]), A = /* @__PURE__ */ new Set([".css"]), se = /* @__PURE__ */ new Set([
282
+ ]), D = /* @__PURE__ */ new Set([".css"]), O = /* @__PURE__ */ new Set([
282
283
  ".hcl",
283
284
  ".tf",
284
285
  ".tfvars"
285
- ]), ce = /* @__PURE__ */ new Set([
286
+ ]), k = /* @__PURE__ */ new Set([
286
287
  ".bash",
287
288
  ".sh",
288
289
  ".zsh"
289
- ]), le = /* @__PURE__ */ new Set([".sql"]), ue = /* @__PURE__ */ new Set([".toml"]), j = /* @__PURE__ */ new Set([".yaml", ".yml"]), M = /* @__PURE__ */ new Set([".ipynb"]), N = /\.(test|spec|unit\.test|integration\.test|end-to-end\.test)\.[cm]?[jt]sx?$/, P = class {
290
+ ]), A = /* @__PURE__ */ new Set([".sql"]), j = /* @__PURE__ */ new Set([".toml"]), M = /* @__PURE__ */ new Set([".yaml", ".yml"]), N = /* @__PURE__ */ new Set([".ipynb"]), P = /\.(test|spec|unit\.test|integration\.test|end-to-end\.test)\.[cm]?[jt]sx?$/, F = class IgnoreRulesService {
290
291
  constructor() {}
291
292
  toScopedPath(e, t) {
292
293
  if (e.directory === "") return t;
@@ -316,19 +317,19 @@ var oe = ".gitignore", E = /* @__PURE__ */ new Set([
316
317
  });
317
318
  }
318
319
  };
319
- P = b([n(), y("design:paramtypes", [])], P);
320
+ F = __decorate([n(), __decorateMetadata("design:paramtypes", [])], F);
320
321
  //#endregion
321
322
  //#region packages/ic-suite/codometer/codometer-measurement/src/modules/discovery/discovery.service.ts
322
- var F, I = F = class {
323
+ var I, L = I = class DiscoveryService {
323
324
  ignoreRulesService;
324
325
  logger;
325
326
  constructor(e, t) {
326
- this.ignoreRulesService = e, this.logger = t, this.logger.setContext(F.name);
327
+ this.ignoreRulesService = e, this.logger = t, this.logger.setContext(I.name);
327
328
  }
328
329
  applyDirectoryIgnoreFile(e) {
329
330
  let t = this.ignoreRulesService.readScope({
330
331
  directory: e.relativeDirectory,
331
- filePath: a.join(e.absoluteDirectory, oe)
332
+ filePath: a.join(e.absoluteDirectory, w)
332
333
  });
333
334
  return t === void 0 ? e : {
334
335
  ...e,
@@ -402,46 +403,46 @@ var F, I = F = class {
402
403
  });
403
404
  }
404
405
  categorize(e) {
405
- let t = /* @__PURE__ */ new Set([...E, ...D]), n = e.filter((e) => t.has(a.extname(e)));
406
+ let t = /* @__PURE__ */ new Set([...T, ...E]), n = e.filter((e) => t.has(a.extname(e)));
406
407
  return {
407
- cssFiles: this.filterByExtension(e, A),
408
+ cssFiles: this.filterByExtension(e, D),
408
409
  files: e,
409
- hclFiles: this.filterByExtension(e, se),
410
- jsFiles: n.filter((e) => D.has(a.extname(e))),
411
- jsonFiles: this.filterByExtension(e, k),
412
- markdownFiles: this.filterByExtension(e, O),
413
- notebookFiles: this.filterByExtension(e, M),
410
+ hclFiles: this.filterByExtension(e, O),
411
+ jsFiles: n.filter((e) => E.has(a.extname(e))),
412
+ jsonFiles: this.filterByExtension(e, se),
413
+ markdownFiles: this.filterByExtension(e, oe),
414
+ notebookFiles: this.filterByExtension(e, N),
414
415
  pyFiles: e.filter((e) => a.extname(e) === ".py"),
415
- shellFiles: this.filterByExtension(e, ce),
416
+ shellFiles: this.filterByExtension(e, k),
416
417
  sourceFiles: n,
417
- sqlFiles: this.filterByExtension(e, le),
418
- testFiles: n.filter((e) => N.test(e)),
419
- tomlFiles: this.filterByExtension(e, ue),
420
- tsFiles: n.filter((e) => E.has(a.extname(e))),
421
- yamlFiles: this.filterByExtension(e, j)
418
+ sqlFiles: this.filterByExtension(e, A),
419
+ testFiles: n.filter((e) => P.test(e)),
420
+ tomlFiles: this.filterByExtension(e, j),
421
+ tsFiles: n.filter((e) => T.has(a.extname(e))),
422
+ yamlFiles: this.filterByExtension(e, M)
422
423
  };
423
424
  }
424
425
  discoverFiles(e) {
425
426
  return this.categorize(this.listDiscoveredFiles(e));
426
427
  }
427
428
  };
428
- I = F = b([n(), y("design:paramtypes", [P === void 0 ? Object : P, w === void 0 ? Object : w])], I);
429
+ L = I = __decorate([n(), __decorateMetadata("design:paramtypes", [F === void 0 ? Object : F, S === void 0 ? Object : S])], L);
429
430
  //#endregion
430
431
  //#region packages/ic-suite/codometer/codometer-measurement/src/modules/discovery/discovery.module.ts
431
- var L = class {};
432
- L = b([r({
432
+ var R = class DiscoveryModule {};
433
+ R = __decorate([r({
433
434
  controllers: [],
434
- exports: [I],
435
- imports: [T],
436
- providers: [I, P]
437
- })], L);
435
+ exports: [L],
436
+ imports: [C],
437
+ providers: [L, F]
438
+ })], R);
438
439
  //#endregion
439
440
  //#region packages/ic-suite/codometer/codometer-measurement/src/modules/inputs/inputs.constants.ts
440
- var R = /[!*+?@[\]{}()]/, z = class extends Error {
441
+ var z = /[!*+?@[\]{}()]/, InputOutsideRepositoryError = class extends Error {
441
442
  constructor(e, t, n) {
442
443
  super(`Input "${e}" starts at ${t}, which is outside ${n}. An input may reach out of the measured folder but not out of the repository holding it — write its directory relative to something inside.`), this.name = "InputOutsideRepositoryError";
443
444
  }
444
- }, B, V = B = class {
445
+ }, B, V = B = class InputsService {
445
446
  logger;
446
447
  constructor(e) {
447
448
  this.logger = e, this.logger.setContext(B.name);
@@ -504,7 +505,7 @@ var R = /[!*+?@[\]{}()]/, z = class extends Error {
504
505
  toIncludeBase(e) {
505
506
  let t = [];
506
507
  for (let n of e.split("/")) {
507
- if (R.test(n)) break;
508
+ if (z.test(n)) break;
508
509
  t.push(n);
509
510
  }
510
511
  return t.join("/");
@@ -523,7 +524,7 @@ var R = /[!*+?@[\]{}()]/, z = class extends Error {
523
524
  }
524
525
  matchFiles(e) {
525
526
  let t = a.resolve(e.workingDirectory, e.input.directory), n = this.findBoundary(e.workingDirectory);
526
- if (!this.sitsInsideBoundary(n, t)) throw new z(e.input.name, t, n);
527
+ if (!this.sitsInsideBoundary(n, t)) throw new InputOutsideRepositoryError(e.input.name, t, n);
527
528
  let r = this.readInputPrefix(t, e.workingDirectory), i = this.walk({
528
529
  absoluteDirectory: t,
529
530
  includeBases: e.input.include.map((e) => this.toIncludeBase(e)),
@@ -533,30 +534,30 @@ var R = /[!*+?@[\]{}()]/, z = class extends Error {
533
534
  return r === "" ? i : i.map((e) => `${r}/${e}`);
534
535
  }
535
536
  };
536
- V = B = b([n(), y("design:paramtypes", [w === void 0 ? Object : w])], V);
537
+ V = B = __decorate([n(), __decorateMetadata("design:paramtypes", [S === void 0 ? Object : S])], V);
537
538
  //#endregion
538
539
  //#region packages/ic-suite/codometer/codometer-measurement/src/modules/inputs/inputs.module.ts
539
- var H = class {};
540
- H = b([r({
540
+ var H = class InputsModule {};
541
+ H = __decorate([r({
541
542
  controllers: [],
542
543
  exports: [V],
543
- imports: [T],
544
+ imports: [C],
544
545
  providers: [V]
545
546
  })], H);
546
547
  //#endregion
547
548
  //#region packages/ic-suite/codometer/codometer-measurement/src/modules/limits/limits.constants.ts
548
- var de = "files", fe = "custom", pe = "size", U = class extends Error {
549
+ var U = "files", W = "custom", G = "size", EmptyTargetError = class extends Error {
549
550
  constructor(e, t) {
550
551
  super(`Input "${e}" matched no files, and a limit is written against its "${t}" metric. A limit says the files are there, so an empty match is a glob that stopped matching or a build that never ran — not a measurement of zero.`), this.name = "EmptyTargetError";
551
552
  }
552
- }, W = class extends Error {
553
+ }, UnboundMetricError = class extends Error {
553
554
  constructor(e, t) {
554
555
  super(`Cannot bind the limit written against "${e}": ${t}`), this.name = "UnboundMetricError";
555
556
  }
556
- }, G = class {
557
+ }, K = class LimitsService {
557
558
  constructor() {}
558
559
  bind(e) {
559
- if (e.index.ambiguous.has(e.metricPath)) throw new W(e.path, `the "${e.target}" target measured more than one metric called "${e.metricPath}". Two configured statistics sharing a label is how that happens — rename one of them.`);
560
+ if (e.index.ambiguous.has(e.metricPath)) throw new UnboundMetricError(e.path, `the "${e.target}" target measured more than one metric called "${e.metricPath}". Two configured statistics sharing a label is how that happens — rename one of them.`);
560
561
  let t = e.index.metrics.get(e.metricPath);
561
562
  return t === void 0 ? void 0 : {
562
563
  files: e.index.files,
@@ -593,7 +594,7 @@ var de = "files", fe = "custom", pe = "size", U = class extends Error {
593
594
  findDefaultCandidate(e) {
594
595
  if (e.defaultInput === void 0) return;
595
596
  let t = e.indexes.get(e.defaultInput);
596
- if (t === void 0) throw new W(e.path, `the configured default input "${e.defaultInput}" was never measured. Measured targets: ${this.describeTargets(e.indexes)}.`);
597
+ if (t === void 0) throw new UnboundMetricError(e.path, `the configured default input "${e.defaultInput}" was never measured. Measured targets: ${this.describeTargets(e.indexes)}.`);
597
598
  return this.bind({
598
599
  index: t,
599
600
  metricPath: e.path,
@@ -603,12 +604,12 @@ var de = "files", fe = "custom", pe = "size", U = class extends Error {
603
604
  }
604
605
  resolve(e) {
605
606
  let t = this.findCandidates(e), [n] = t;
606
- if (n === void 0) throw new W(e.path, `nothing measured answers to it. Measured targets: ${this.describeTargets(e.indexes)}. Write the target's name in front of the metric path, or configure a default input.`);
607
+ if (n === void 0) throw new UnboundMetricError(e.path, `nothing measured answers to it. Measured targets: ${this.describeTargets(e.indexes)}. Write the target's name in front of the metric path, or configure a default input.`);
607
608
  if (t.length > 1) {
608
609
  let n = t.map((e) => this.describeBinding(e)).join(", or ");
609
- throw new W(e.path, `it could be ${n}. Write the target's name in front of the one it means.`);
610
+ throw new UnboundMetricError(e.path, `it could be ${n}. Write the target's name in front of the one it means.`);
610
611
  }
611
- if (n.files === 0) throw new U(n.target, n.metric);
612
+ if (n.files === 0) throw new EmptyTargetError(n.target, n.metric);
612
613
  return n;
613
614
  }
614
615
  evaluate(e) {
@@ -640,10 +641,10 @@ var de = "files", fe = "custom", pe = "size", U = class extends Error {
640
641
  };
641
642
  }
642
643
  };
643
- G = b([n(), y("design:paramtypes", [])], G);
644
+ K = __decorate([n(), __decorateMetadata("design:paramtypes", [])], K);
644
645
  //#endregion
645
646
  //#region packages/ic-suite/codometer/codometer-measurement/src/modules/limits/metric-index.service.ts
646
- var K = class {
647
+ var q = class MetricIndexService {
647
648
  constructor() {}
648
649
  addMetric(e) {
649
650
  if (e.index.metrics.has(e.metricPath)) {
@@ -661,11 +662,11 @@ var K = class {
661
662
  };
662
663
  return this.addMetric({
663
664
  index: t,
664
- metricPath: de,
665
+ metricPath: U,
665
666
  value: e.files
666
667
  }), e.size !== void 0 && this.addMetric({
667
668
  index: t,
668
- metricPath: pe,
669
+ metricPath: G,
669
670
  value: e.size.bytes
670
671
  }), e.language !== void 0 && this.indexLanguage(t, e.language), t;
671
672
  }
@@ -691,7 +692,7 @@ var K = class {
691
692
  for (let t of n) this.addMetric({
692
693
  index: e,
693
694
  instances: t.instances,
694
- metricPath: `${fe}.${t.label}`,
695
+ metricPath: `${W}.${t.label}`,
695
696
  value: t.count
696
697
  });
697
698
  }
@@ -713,29 +714,29 @@ var K = class {
713
714
  };
714
715
  }
715
716
  };
716
- K = b([n(), y("design:paramtypes", [])], K);
717
+ q = __decorate([n(), __decorateMetadata("design:paramtypes", [])], q);
717
718
  //#endregion
718
719
  //#region packages/ic-suite/codometer/codometer-measurement/src/modules/limits/limits.module.ts
719
- var q = class {};
720
- q = b([r({
720
+ var J = class LimitsModule {};
721
+ J = __decorate([r({
721
722
  controllers: [],
722
- exports: [G, K],
723
+ exports: [K, q],
723
724
  imports: [],
724
- providers: [G, K]
725
- })], q);
726
- var me = { params: { [_.BROTLI_PARAM_QUALITY]: 11 } }, J = class extends Error {
725
+ providers: [K, q]
726
+ })], J);
727
+ var ce = { params: { [re.BROTLI_PARAM_QUALITY]: 11 } }, UnreadableTargetFileError = class extends Error {
727
728
  constructor(e, t) {
728
729
  super(`Cannot measure ${e}: ${t}`), this.name = "UnreadableTargetFileError";
729
730
  }
730
- }, Y, X = Y = class {
731
+ }, Y, X = Y = class SizeService {
731
732
  logger;
732
733
  constructor(e) {
733
734
  this.logger = e, this.logger.setContext(Y.name);
734
735
  }
735
736
  compress(e, t) {
736
737
  return {
737
- brotli: () => g(e, me).length,
738
- gzip: () => v(e, { level: 9 }).length,
738
+ brotli: () => ne(e, ce).length,
739
+ gzip: () => g(e, { level: 9 }).length,
739
740
  none: () => e.length
740
741
  }[t]();
741
742
  }
@@ -746,7 +747,7 @@ var me = { params: { [_.BROTLI_PARAM_QUALITY]: 11 } }, J = class extends Error {
746
747
  throw this.logger.error("🗜️ Failed to measure a target file", void 0, {
747
748
  path: e,
748
749
  reason: t instanceof Error ? t.message : String(t)
749
- }), new J(e, String(t));
750
+ }), new UnreadableTargetFileError(e, String(t));
750
751
  }
751
752
  }
752
753
  analyze(e) {
@@ -759,19 +760,19 @@ var me = { params: { [_.BROTLI_PARAM_QUALITY]: 11 } }, J = class extends Error {
759
760
  };
760
761
  }
761
762
  };
762
- X = Y = b([n(), y("design:paramtypes", [w === void 0 ? Object : w])], X);
763
+ X = Y = __decorate([n(), __decorateMetadata("design:paramtypes", [S === void 0 ? Object : S])], X);
763
764
  //#endregion
764
765
  //#region packages/ic-suite/codometer/codometer-measurement/src/modules/size/size.module.ts
765
- var Z = class {};
766
- Z = b([r({
766
+ var Z = class SizeModule {};
767
+ Z = __decorate([r({
767
768
  controllers: [],
768
769
  exports: [X],
769
- imports: [T],
770
+ imports: [C],
770
771
  providers: [X]
771
772
  })], Z);
772
773
  //#endregion
773
774
  //#region packages/ic-suite/codometer/codometer-measurement/src/modules/measure/measure.constants.ts
774
- var he = {
775
+ var le = {
775
776
  css: {
776
777
  atRules: 0,
777
778
  comments: 0,
@@ -943,7 +944,7 @@ var he = {
943
944
  scalars: 0,
944
945
  sequences: 0
945
946
  }
946
- }, Q = class {
947
+ }, Q = class MeasureService {
947
948
  discoveryService;
948
949
  languagesService;
949
950
  customizationService;
@@ -1115,36 +1116,36 @@ var he = {
1115
1116
  indexes: s,
1116
1117
  inputs: a,
1117
1118
  limits: c.limits,
1118
- statistics: l?.language ?? he
1119
+ statistics: l?.language ?? le
1119
1120
  };
1120
1121
  }
1121
1122
  };
1122
- Q = b([n(), y("design:paramtypes", [
1123
- I === void 0 ? Object : I,
1123
+ Q = __decorate([n(), __decorateMetadata("design:paramtypes", [
1124
+ L === void 0 ? Object : L,
1124
1125
  h === void 0 ? Object : h,
1125
- x === void 0 ? Object : x,
1126
+ _ === void 0 ? Object : _,
1126
1127
  V === void 0 ? Object : V,
1127
1128
  X === void 0 ? Object : X,
1128
- G === void 0 ? Object : G,
1129
- K === void 0 ? Object : K
1129
+ K === void 0 ? Object : K,
1130
+ q === void 0 ? Object : q
1130
1131
  ])], Q);
1131
1132
  //#endregion
1132
1133
  //#region packages/ic-suite/codometer/codometer-measurement/src/modules/measure/measure.module.ts
1133
- var $ = class {};
1134
- $ = b([r({
1134
+ var $ = class MeasureModule {};
1135
+ $ = __decorate([r({
1135
1136
  controllers: [],
1136
1137
  exports: [Q],
1137
1138
  imports: [
1138
1139
  p,
1139
- S,
1140
- L,
1140
+ v,
1141
+ R,
1141
1142
  H,
1142
1143
  te,
1143
- q,
1144
- T,
1144
+ J,
1145
+ C,
1145
1146
  Z
1146
1147
  ],
1147
1148
  providers: [Q]
1148
1149
  })], $);
1149
1150
  //#endregion
1150
- export { S as CustomizationModule, x as CustomizationService, L as DiscoveryModule, I as DiscoveryService, U as EmptyTargetError, z as InputOutsideRepositoryError, H as InputsModule, V as InputsService, q as LimitsModule, G as LimitsService, $ as MeasureModule, Q as MeasureService, K as MetricIndexService, Z as SizeModule, X as SizeService, W as UnboundMetricError, J as UnreadableTargetFileError };
1151
+ export { v as CustomizationModule, _ as CustomizationService, R as DiscoveryModule, L as DiscoveryService, EmptyTargetError, InputOutsideRepositoryError, H as InputsModule, V as InputsService, J as LimitsModule, K as LimitsService, $ as MeasureModule, Q as MeasureService, q as MetricIndexService, Z as SizeModule, X as SizeService, UnboundMetricError, UnreadableTargetFileError };
package/package.json CHANGED
@@ -4,9 +4,9 @@
4
4
  "url": "https://github.com/organizzolini/codebase/issues"
5
5
  },
6
6
  "dependencies": {
7
- "@codometer/configuration": "0.0.9",
8
- "@codometer/core": "0.0.9",
9
- "@codometer/languages": "0.0.9",
7
+ "@codometer/configuration": "0.0.10",
8
+ "@codometer/core": "0.0.10",
9
+ "@codometer/languages": "0.0.10",
10
10
  "@nestjs/common": "^11.1.21 || ^12.0.1",
11
11
  "ignore": "7.0.12",
12
12
  "pino": "^10.3.1",
@@ -63,5 +63,5 @@
63
63
  "strict": true
64
64
  },
65
65
  "types": "./dist/src/index.d.ts",
66
- "version": "0.0.9"
66
+ "version": "0.0.10"
67
67
  }