@conformetry/cli 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,13 @@
1
+ ## 0.0.10 (2026-10-08)
2
+
3
+ ### 🧱 Updated Dependencies
4
+
5
+ - Updated conformetry-configuration to 0.0.11
6
+ - Updated conformetry-generation to 0.0.11
7
+ - Updated conformetry-validation to 0.0.10
8
+ - Updated conformetry-output to 0.0.10
9
+ - Updated conformetry-core to 0.0.10
10
+
1
11
  ## 0.0.9 (2026-10-08)
2
12
 
3
13
  ### 🧱 Updated Dependencies
package/README.md CHANGED
@@ -1095,13 +1095,13 @@ graph LR
1095
1095
  ### Project
1096
1096
 
1097
1097
  ![Lines of Code](https://img.shields.io/badge/Lines_of_Code-3241-22c55e?style=flat-square)
1098
- ![Repository Size](https://img.shields.io/badge/Repository_Size-121.39_kB-6b7280?style=flat-square)
1098
+ ![Repository Size](https://img.shields.io/badge/Repository_Size-121.66_kB-6b7280?style=flat-square)
1099
1099
  ![Folders](https://img.shields.io/badge/Folders-7-4a4a4a?style=flat-square)
1100
1100
  ![Source Files](https://img.shields.io/badge/Source_Files-37-3178c6?style=flat-square)
1101
1101
 
1102
1102
  ### Measured Targets
1103
1103
 
1104
- ![Compiled JavaScript Size](https://img.shields.io/badge/Compiled_JavaScript_Size-6.33_kB_gzip-6b7280?style=flat-square)
1104
+ ![Compiled JavaScript Size](https://img.shields.io/badge/Compiled_JavaScript_Size-6.47_kB_gzip-6b7280?style=flat-square)
1105
1105
 
1106
1106
  ### TypeScript
1107
1107
 
@@ -1283,16 +1283,16 @@ graph LR
1283
1283
  ### Markdown
1284
1284
 
1285
1285
  ![Markdown Files](https://img.shields.io/badge/Markdown_Files-2-083fa1?style=flat-square)
1286
- ![Markdown Lines](https://img.shields.io/badge/Markdown_Lines-304-1f6feb?style=flat-square)
1286
+ ![Markdown Lines](https://img.shields.io/badge/Markdown_Lines-314-1f6feb?style=flat-square)
1287
1287
  ![H1](https://img.shields.io/badge/H1-1-7c3aed?style=flat-square)
1288
- ![H2](https://img.shields.io/badge/H2-12-8b5cf6?style=flat-square)
1289
- ![H3](https://img.shields.io/badge/H3-21-a78bfa?style=flat-square)
1288
+ ![H2](https://img.shields.io/badge/H2-13-8b5cf6?style=flat-square)
1289
+ ![H3](https://img.shields.io/badge/H3-22-a78bfa?style=flat-square)
1290
1290
  ![H4](https://img.shields.io/badge/H4-0-c4b5fd?style=flat-square)
1291
1291
  ![H5](https://img.shields.io/badge/H5-0-ddd6fe?style=flat-square)
1292
1292
  ![H6](https://img.shields.io/badge/H6-0-ede9fe?style=flat-square)
1293
- ![Paragraphs](https://img.shields.io/badge/Paragraphs-76-64748b?style=flat-square)
1294
- ![Lists](https://img.shields.io/badge/Lists-13-16a34a?style=flat-square)
1295
- ![List Items](https://img.shields.io/badge/List_Items-55-22c55e?style=flat-square)
1293
+ ![Paragraphs](https://img.shields.io/badge/Paragraphs-81-64748b?style=flat-square)
1294
+ ![Lists](https://img.shields.io/badge/Lists-14-16a34a?style=flat-square)
1295
+ ![List Items](https://img.shields.io/badge/List_Items-60-22c55e?style=flat-square)
1296
1296
  ![Task List Items](https://img.shields.io/badge/Task_List_Items-0-4ade80?style=flat-square)
1297
1297
  ![Tables](https://img.shields.io/badge/Tables-2-0284c7?style=flat-square)
1298
1298
  ![Table Rows](https://img.shields.io/badge/Table_Rows-10-0ea5e9?style=flat-square)
@@ -4,14 +4,17 @@ import { DiscoveryModule as o } from "@nestjs/core";
4
4
  import { existsSync as s, mkdirSync as c } from "node:fs";
5
5
  import l from "node:path";
6
6
  import u from "pino";
7
- import { z as ee } from "zod";
8
- import { ALL_TEMPLATES_SELECTION as d, ConfigurationModule as f, ConfigurationService as p, InputError as m } from "@conformetry/configuration";
9
- import { GenerationModule as h, GenerationService as g } from "@conformetry/generation";
10
- import { Command as _, CommandRunner as v, Option as y } from "nest-commander";
11
- import { InventoryModule as b, InventoryService as x, ReportingModule as te, ReportingService as S } from "@conformetry/output";
12
- import { ValidationModule as C, ValidationService as w } from "@conformetry/validation";
13
- //#region packages/logging/src/modules/logger/logger.constants.ts
14
- var T = /^(\p{Extended_Pictographic}️?(?:‍\p{Extended_Pictographic}️?)*)\s+/u, E = /^([A-Za-z]+)/, D = /* @__PURE__ */ new Set([
7
+ import { z as d } from "zod";
8
+ import { ALL_TEMPLATES_SELECTION as f, ConfigurationModule as p, ConfigurationService as m, InputError as h } from "@conformetry/configuration";
9
+ import { GenerationModule as g, GenerationService as _ } from "@conformetry/generation";
10
+ import { Command as v, CommandRunner as y, Option as b } from "nest-commander";
11
+ import { InventoryModule as x, InventoryService as S, ReportingModule as C, ReportingService as w } from "@conformetry/output";
12
+ import { ValidationModule as T, ValidationService as E } from "@conformetry/validation";
13
+ //#region \0rolldown/runtime.js
14
+ var D = Object.defineProperty, __name = (e, t) => D(e, "name", {
15
+ value: t,
16
+ configurable: !0
17
+ }), O = /^(\p{Extended_Pictographic}️?(?:‍\p{Extended_Pictographic}️?)*)\s+/u, k = /^([A-Za-z]+)/, A = /* @__PURE__ */ new Set([
15
18
  "built",
16
19
  "cut",
17
20
  "found",
@@ -29,7 +32,7 @@ var T = /^(\p{Extended_Pictographic}️?(?:‍\p{Extended_Pictographic}️?)*)\s
29
32
  "split",
30
33
  "took",
31
34
  "wrote"
32
- ]), O = /* @__PURE__ */ new Set([
35
+ ]), j = /* @__PURE__ */ new Set([
33
36
  "CommandFactory",
34
37
  "ExceptionHandler",
35
38
  "GraphQLModule",
@@ -42,12 +45,12 @@ var T = /^(\p{Extended_Pictographic}️?(?:‍\p{Extended_Pictographic}️?)*)\s
42
45
  ]);
43
46
  //#endregion
44
47
  //#region \0@oxc-project+runtime@0.151.0/helpers/esm/decorateMetadata.js
45
- function k(e, t) {
48
+ function __decorateMetadata(e, t) {
46
49
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(e, t);
47
50
  }
48
51
  //#endregion
49
52
  //#region \0@oxc-project+runtime@0.151.0/helpers/esm/decorate.js
50
- function A(e, t, n, r) {
53
+ function __decorate(e, t, n, r) {
51
54
  var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
52
55
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
53
56
  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);
@@ -55,9 +58,9 @@ function A(e, t, n, r) {
55
58
  }
56
59
  //#endregion
57
60
  //#region packages/logging/src/modules/logger/logger.service.ts
58
- var j, M = class extends e {
61
+ var M, N = class LoggerService extends e {
59
62
  static {
60
- j = this;
63
+ M = this;
61
64
  }
62
65
  constructor() {
63
66
  super();
@@ -65,15 +68,15 @@ var j, M = class extends e {
65
68
  static isProduction = process.env.NODE_ENV === "production";
66
69
  static rootLogger;
67
70
  static writesToStandardError = !1;
68
- child = j.root;
71
+ child = M.root;
69
72
  static createRootLogger() {
70
73
  let e = process.env.LOG_LEVEL ?? "info";
71
- return j.isProduction ? j.writesToStandardError ? u({ level: e }, u.destination(2)) : u({ level: e }) : u({
74
+ return M.isProduction ? M.writesToStandardError ? u({ level: e }, u.destination(2)) : u({ level: e }) : u({
72
75
  level: e,
73
76
  transport: {
74
77
  options: {
75
78
  colorize: !0,
76
- destination: j.writesToStandardError ? 2 : 1,
79
+ destination: M.writesToStandardError ? 2 : 1,
77
80
  ignore: "pid,hostname,emoji",
78
81
  messageFormat: "{emoji} {msg}",
79
82
  singleLine: !0
@@ -83,14 +86,14 @@ var j, M = class extends e {
83
86
  });
84
87
  }
85
88
  static logToStandardError() {
86
- if (j.rootLogger !== void 0) {
89
+ if (M.rootLogger !== void 0) {
87
90
  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.");
88
91
  return;
89
92
  }
90
- j.writesToStandardError = !0;
93
+ M.writesToStandardError = !0;
91
94
  }
92
95
  assertConventionalMessage(e) {
93
- if (j.isProduction || this.shouldSkipConventionalMessageValidation(e.context)) return;
96
+ if (M.isProduction || this.shouldSkipConventionalMessageValidation(e.context)) return;
94
97
  let t = this.getConventionalMessageViolation(e.parsed);
95
98
  if (t !== void 0) throw Error(t);
96
99
  }
@@ -101,21 +104,21 @@ var j, M = class extends e {
101
104
  }), {
102
105
  ...e.data,
103
106
  context: e.context,
104
- ...j.isProduction ? {} : { emoji: e.parsed.emoji }
107
+ ...M.isProduction ? {} : { emoji: e.parsed.emoji }
105
108
  };
106
109
  }
107
110
  getConventionalMessageViolation(e) {
108
111
  let t = e.emoji, n = e.text;
109
112
  if (t === void 0) return `Log message must start with an emoji naming its subject, then a verb: "${n}"`;
110
- let r = E.exec(n)?.[1];
113
+ let r = k.exec(n)?.[1];
111
114
  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}"`;
112
115
  }
113
116
  isConventionalVerb(e) {
114
117
  let t = e.toLowerCase();
115
- return t.endsWith("ing") || t.endsWith("ed") || D.has(t);
118
+ return t.endsWith("ing") || t.endsWith("ed") || A.has(t);
116
119
  }
117
120
  parseMessage(e) {
118
- let t = String(e), n = T.exec(t), r = n?.[1];
121
+ let t = String(e), n = O.exec(t), r = n?.[1];
119
122
  return r === void 0 ? {
120
123
  emoji: void 0,
121
124
  text: t
@@ -125,10 +128,10 @@ var j, M = class extends e {
125
128
  };
126
129
  }
127
130
  shouldSkipConventionalMessageValidation(e) {
128
- return e !== void 0 && O.has(e);
131
+ return e !== void 0 && j.has(e);
129
132
  }
130
133
  static get root() {
131
- return j.rootLogger ??= j.createRootLogger(), j.rootLogger;
134
+ return M.rootLogger ??= M.createRootLogger(), M.rootLogger;
132
135
  }
133
136
  buildErrorLogEntry(e, t) {
134
137
  let n = t instanceof Error ? t.stack || t.message : String(t);
@@ -172,7 +175,7 @@ var j, M = class extends e {
172
175
  this.info(e, t, n);
173
176
  }
174
177
  setContext(e) {
175
- super.setContext(e), this.child = j.root.child({ context: e });
178
+ super.setContext(e), this.child = M.root.child({ context: e });
176
179
  }
177
180
  verbose(e, t, n) {
178
181
  let r = this.parseMessage(e);
@@ -191,22 +194,22 @@ var j, M = class extends e {
191
194
  }), r.text);
192
195
  }
193
196
  };
194
- M = j = A([n({ scope: i.TRANSIENT }), k("design:paramtypes", [])], M);
197
+ N = M = __decorate([n({ scope: i.TRANSIENT }), __decorateMetadata("design:paramtypes", [])], N);
195
198
  //#endregion
196
199
  //#region packages/logging/src/modules/logger/logger.module.ts
197
- var N = class {};
198
- N = A([t(), r({
200
+ var P = class LoggerModule {};
201
+ P = __decorate([t(), r({
199
202
  controllers: [],
200
- exports: [M],
203
+ exports: [N],
201
204
  imports: [],
202
- providers: [M]
203
- })], N);
204
- var P = (e) => /* @__PURE__ */ Error(`Unknown template "${e.templateName}". Available: ${e.availableTemplateNames.join(", ")}`), F = () => /* @__PURE__ */ Error("--generator was removed. Pass --template instead: it is the word the configuration, the templates command, and the conformance report already use."), I = ee.object({}), L = (e) => new m(`No template was selected. Pass --template. Available: ${e.join(", ")}`), R, z = R = class extends v {
205
+ providers: [N]
206
+ })], P);
207
+ var unknownTemplateError = (e) => /* @__PURE__ */ Error(`Unknown template "${e.templateName}". Available: ${e.availableTemplateNames.join(", ")}`), removedGeneratorOptionError = () => /* @__PURE__ */ Error("--generator was removed. Pass --template instead: it is the word the configuration, the templates command, and the conformance report already use."), F = d.object({}), missingTemplateError = (e) => new h(`No template was selected. Pass --template. Available: ${e.join(", ")}`), I, L = I = class GenerateCommand extends y {
205
208
  configurationService;
206
209
  generationService;
207
210
  logger;
208
211
  constructor(e, t, n) {
209
- super(), this.configurationService = e, this.generationService = t, this.logger = n, this.logger.setContext(R.name);
212
+ super(), this.configurationService = e, this.generationService = t, this.logger = n, this.logger.setContext(I.name);
210
213
  }
211
214
  async generate(e, t) {
212
215
  let n = [...e, ...process.argv.slice(2)];
@@ -217,7 +220,7 @@ var P = (e) => /* @__PURE__ */ Error(`Unknown template "${e.templateName}". Avai
217
220
  });
218
221
  this.logger.debug("🏗 Generating a conformetry instance", void 0, { template: i });
219
222
  let a = r.find((e) => e.name === i);
220
- if (a === void 0) throw this.logger.error("🚫 Rejected an unknown template", void 0, { template: i }), P({
223
+ if (a === void 0) throw this.logger.error("🚫 Rejected an unknown template", void 0, { template: i }), unknownTemplateError({
221
224
  availableTemplateNames: r.map((e) => e.name),
222
225
  templateName: i
223
226
  });
@@ -244,14 +247,14 @@ var P = (e) => /* @__PURE__ */ Error(`Unknown template "${e.templateName}". Avai
244
247
  this.logger.error("🚫 Rejected the command line", void 0, { reason: e.message }), process.exitCode = 1;
245
248
  }
246
249
  rejectRemovedGeneratorOption(e) {
247
- if (e.some((e) => e === "--generator" || e.startsWith("--generator="))) throw this.logger.error("🚫 Rejected a removed option", void 0, { option: "--generator" }), F();
250
+ if (e.some((e) => e === "--generator" || e.startsWith("--generator="))) throw this.logger.error("🚫 Rejected a removed option", void 0, { option: "--generator" }), removedGeneratorOptionError();
248
251
  }
249
252
  async resolveTemplateName(e) {
250
253
  if (e.templateName !== void 0) return e.templateName;
251
254
  let t = e.configuration.map((e) => e.name);
252
- if (!this.configurationService.isAtTerminal()) throw L(t);
255
+ if (!this.configurationService.isAtTerminal()) throw missingTemplateError(t);
253
256
  let n = await this.configurationService.promptForTemplate(e.configuration);
254
- if (n === void 0) throw L(t);
257
+ if (n === void 0) throw missingTemplateError(t);
255
258
  return n;
256
259
  }
257
260
  parseConfig(e) {
@@ -267,69 +270,69 @@ var P = (e) => /* @__PURE__ */ Error(`Unknown template "${e.templateName}". Avai
267
270
  try {
268
271
  await this.generate(e, t);
269
272
  } catch (e) {
270
- if (!(e instanceof m)) throw e;
273
+ if (!(e instanceof h)) throw e;
271
274
  this.rejectCommandLine(e);
272
275
  }
273
276
  }
274
277
  };
275
- A([
276
- y({
278
+ __decorate([
279
+ b({
277
280
  description: "Path to the conformetry configuration file",
278
281
  flags: "--config [path]"
279
282
  }),
280
- k("design:type", Function),
281
- k("design:paramtypes", [Object]),
282
- k("design:returntype", Object)
283
- ], z.prototype, "parseConfig", null), A([
284
- y({
283
+ __decorateMetadata("design:type", Function),
284
+ __decorateMetadata("design:paramtypes", [Object]),
285
+ __decorateMetadata("design:returntype", Object)
286
+ ], L.prototype, "parseConfig", null), __decorate([
287
+ b({
285
288
  description: "Directory to write generated files into",
286
289
  flags: "--directory [path]"
287
290
  }),
288
- k("design:type", Function),
289
- k("design:paramtypes", [Object]),
290
- k("design:returntype", Object)
291
- ], z.prototype, "parseDirectory", null), A([
292
- y({
291
+ __decorateMetadata("design:type", Function),
292
+ __decorateMetadata("design:paramtypes", [Object]),
293
+ __decorateMetadata("design:returntype", Object)
294
+ ], L.prototype, "parseDirectory", null), __decorate([
295
+ b({
293
296
  description: "Name of the template to render",
294
297
  flags: "--template [name]"
295
298
  }),
296
- k("design:type", Function),
297
- k("design:paramtypes", [Object]),
298
- k("design:returntype", Object)
299
- ], z.prototype, "parseTemplate", null), z = R = A([
300
- _({
299
+ __decorateMetadata("design:type", Function),
300
+ __decorateMetadata("design:paramtypes", [Object]),
301
+ __decorateMetadata("design:returntype", Object)
302
+ ], L.prototype, "parseTemplate", null), L = I = __decorate([
303
+ v({
301
304
  allowUnknownOptions: !0,
302
305
  description: "Render a template into a new instance",
303
306
  name: "generate"
304
307
  }),
305
308
  n(),
306
- k("design:paramtypes", [
307
- p === void 0 ? Object : p,
308
- g === void 0 ? Object : g,
309
- M === void 0 ? Object : M
309
+ __decorateMetadata("design:paramtypes", [
310
+ m === void 0 ? Object : m,
311
+ _ === void 0 ? Object : _,
312
+ N === void 0 ? Object : N
310
313
  ])
311
- ], z);
314
+ ], L);
312
315
  //#endregion
313
316
  //#region packages/ic-suite/conformetry/conformetry-cli/src/modules/generate/generate.module.ts
314
- var B = class {};
315
- B = A([r({
317
+ var R = class GenerateModule {};
318
+ R = __decorate([r({
316
319
  controllers: [],
317
- exports: [z],
320
+ exports: [L],
318
321
  imports: [
319
- f,
320
- h,
321
- N
322
+ p,
323
+ g,
324
+ P
322
325
  ],
323
- providers: [z]
324
- })], B);
326
+ providers: [L]
327
+ })], R);
325
328
  //#endregion
326
329
  //#region packages/ic-suite/conformetry/conformetry-cli/src/modules/instances/instances.constants.ts
327
- var ne = "No instances were found. Check the instance globs in the configuration.", V = "No instance is explained by those templates.", H, U = H = class extends v {
330
+ var z = "No instances were found. Check the instance globs in the configuration.", B = "No instance is explained by those templates.", V, H = V = class InstancesCommand extends y {
328
331
  configurationService;
329
332
  inventoryService;
330
333
  logger;
331
334
  constructor(e, t, n) {
332
- super(), this.configurationService = e, this.inventoryService = t, this.logger = n, this.logger.setContext(H.name);
335
+ super(), this.configurationService = e, this.inventoryService = t, this.logger = n, this.logger.setContext(V.name);
333
336
  }
334
337
  parseConfig(e) {
335
338
  return this.configurationService.parseOptionalOption(e);
@@ -355,69 +358,69 @@ var ne = "No instances were found. Check the instance globs in the configuration
355
358
  return;
356
359
  }
357
360
  if (i.length === 0) {
358
- console.info(t.templates === void 0 ? ne : V);
361
+ console.info(t.templates === void 0 ? z : B);
359
362
  return;
360
363
  }
361
364
  console.info(this.inventoryService.describeInstances(i).join("\n"));
362
365
  }
363
366
  };
364
- A([
365
- y({
367
+ __decorate([
368
+ b({
366
369
  description: "Path to the conformetry configuration file",
367
370
  flags: "--config [path]"
368
371
  }),
369
- k("design:type", Function),
370
- k("design:paramtypes", [Object]),
371
- k("design:returntype", Object)
372
- ], U.prototype, "parseConfig", null), A([
373
- y({
372
+ __decorateMetadata("design:type", Function),
373
+ __decorateMetadata("design:paramtypes", [Object]),
374
+ __decorateMetadata("design:returntype", Object)
375
+ ], H.prototype, "parseConfig", null), __decorate([
376
+ b({
374
377
  description: "Write the listing as JSON",
375
378
  flags: "--json"
376
379
  }),
377
- k("design:type", Function),
378
- k("design:paramtypes", []),
379
- k("design:returntype", Boolean)
380
- ], U.prototype, "parseJson", null), A([
381
- y({
380
+ __decorateMetadata("design:type", Function),
381
+ __decorateMetadata("design:paramtypes", []),
382
+ __decorateMetadata("design:returntype", Boolean)
383
+ ], H.prototype, "parseJson", null), __decorate([
384
+ b({
382
385
  description: "Comma-separated template names; report only the instances they explain",
383
386
  flags: "--templates [names]"
384
387
  }),
385
- k("design:type", Function),
386
- k("design:paramtypes", [Object]),
387
- k("design:returntype", Object)
388
- ], U.prototype, "parseTemplates", null), U = H = A([
389
- _({
388
+ __decorateMetadata("design:type", Function),
389
+ __decorateMetadata("design:paramtypes", [Object]),
390
+ __decorateMetadata("design:returntype", Object)
391
+ ], H.prototype, "parseTemplates", null), H = V = __decorate([
392
+ v({
390
393
  description: "List the generated code the configuration finds, and what explains it",
391
394
  name: "instances"
392
395
  }),
393
396
  n(),
394
- k("design:paramtypes", [
395
- p === void 0 ? Object : p,
396
- x === void 0 ? Object : x,
397
- M === void 0 ? Object : M
397
+ __decorateMetadata("design:paramtypes", [
398
+ m === void 0 ? Object : m,
399
+ S === void 0 ? Object : S,
400
+ N === void 0 ? Object : N
398
401
  ])
399
- ], U);
402
+ ], H);
400
403
  //#endregion
401
404
  //#region packages/ic-suite/conformetry/conformetry-cli/src/modules/instances/instances.module.ts
402
- var W = class {};
403
- W = A([r({
405
+ var U = class InstancesModule {};
406
+ U = __decorate([r({
404
407
  controllers: [],
405
- exports: [U],
408
+ exports: [H],
406
409
  imports: [
407
- f,
408
- b,
409
- N
410
+ p,
411
+ x,
412
+ P
410
413
  ],
411
- providers: [U]
412
- })], W);
414
+ providers: [H]
415
+ })], U);
413
416
  //#endregion
414
417
  //#region packages/ic-suite/conformetry/conformetry-cli/src/modules/templates/templates.constants.ts
415
- var G = "No templates are declared in the configuration.", K = "No template explains those paths. Either they are not generated code, or they have drifted past recognition.", q, J = q = class extends v {
418
+ var W = "No templates are declared in the configuration.", G = "No template explains those paths. Either they are not generated code, or they have drifted past recognition.", K, q = K = class TemplatesCommand extends y {
416
419
  configurationService;
417
420
  inventoryService;
418
421
  logger;
419
422
  constructor(e, t, n) {
420
- super(), this.configurationService = e, this.inventoryService = t, this.logger = n, this.logger.setContext(q.name);
423
+ super(), this.configurationService = e, this.inventoryService = t, this.logger = n, this.logger.setContext(K.name);
421
424
  }
422
425
  parseConfig(e) {
423
426
  return this.configurationService.parseOptionalOption(e);
@@ -443,7 +446,7 @@ var G = "No templates are declared in the configuration.", K = "No template expl
443
446
  return;
444
447
  }
445
448
  if (i.length === 0) {
446
- console.info(t.instances === void 0 ? G : K);
449
+ console.info(t.instances === void 0 ? W : G);
447
450
  return;
448
451
  }
449
452
  console.info(this.inventoryService.describeTemplates({
@@ -452,64 +455,64 @@ var G = "No templates are declared in the configuration.", K = "No template expl
452
455
  }).join("\n"));
453
456
  }
454
457
  };
455
- A([
456
- y({
458
+ __decorate([
459
+ b({
457
460
  description: "Path to the conformetry configuration file",
458
461
  flags: "--config [path]"
459
462
  }),
460
- k("design:type", Function),
461
- k("design:paramtypes", [Object]),
462
- k("design:returntype", Object)
463
- ], J.prototype, "parseConfig", null), A([
464
- y({
463
+ __decorateMetadata("design:type", Function),
464
+ __decorateMetadata("design:paramtypes", [Object]),
465
+ __decorateMetadata("design:returntype", Object)
466
+ ], q.prototype, "parseConfig", null), __decorate([
467
+ b({
465
468
  description: "Comma-separated paths or globs; report only the templates that explain them",
466
469
  flags: "--instances [globs]"
467
470
  }),
468
- k("design:type", Function),
469
- k("design:paramtypes", [Object]),
470
- k("design:returntype", Object)
471
- ], J.prototype, "parseInstances", null), A([
472
- y({
471
+ __decorateMetadata("design:type", Function),
472
+ __decorateMetadata("design:paramtypes", [Object]),
473
+ __decorateMetadata("design:returntype", Object)
474
+ ], q.prototype, "parseInstances", null), __decorate([
475
+ b({
473
476
  description: "Write the listing as JSON",
474
477
  flags: "--json"
475
478
  }),
476
- k("design:type", Function),
477
- k("design:paramtypes", []),
478
- k("design:returntype", Boolean)
479
- ], J.prototype, "parseJson", null), J = q = A([
480
- _({
479
+ __decorateMetadata("design:type", Function),
480
+ __decorateMetadata("design:paramtypes", []),
481
+ __decorateMetadata("design:returntype", Boolean)
482
+ ], q.prototype, "parseJson", null), q = K = __decorate([
483
+ v({
481
484
  description: "Name the templates the configuration declares, or which ones explain a path",
482
485
  name: "templates"
483
486
  }),
484
487
  n(),
485
- k("design:paramtypes", [
486
- p === void 0 ? Object : p,
487
- x === void 0 ? Object : x,
488
- M === void 0 ? Object : M
488
+ __decorateMetadata("design:paramtypes", [
489
+ m === void 0 ? Object : m,
490
+ S === void 0 ? Object : S,
491
+ N === void 0 ? Object : N
489
492
  ])
490
- ], J);
493
+ ], q);
491
494
  //#endregion
492
495
  //#region packages/ic-suite/conformetry/conformetry-cli/src/modules/templates/templates.module.ts
493
- var Y = class {};
494
- Y = A([r({
496
+ var J = class TemplatesModule {};
497
+ J = __decorate([r({
495
498
  controllers: [],
496
- exports: [J],
499
+ exports: [q],
497
500
  imports: [
498
- f,
499
- b,
500
- N
501
+ p,
502
+ x,
503
+ P
501
504
  ],
502
- providers: [J]
503
- })], Y);
505
+ providers: [q]
506
+ })], J);
504
507
  //#endregion
505
508
  //#region packages/ic-suite/conformetry/conformetry-cli/src/modules/validate/validate.command.ts
506
- var X, Z = X = class extends v {
509
+ var Y, X = Y = class ValidateCommand extends y {
507
510
  configurationService;
508
511
  reportingService;
509
512
  validationService;
510
513
  logger;
511
514
  constructor(e, t, n, r) {
512
- super(), this.configurationService = e, this.reportingService = t, this.validationService = n, this.logger = r, this.logger.setContext(X.name);
515
+ super(), this.configurationService = e, this.reportingService = t, this.validationService = n, this.logger = r, this.logger.setContext(Y.name);
513
516
  }
514
517
  describeFailure(e) {
515
518
  return `Validation failed: ${[...e.scores.filter((e) => !e.ok).map((e) => `${e.instancePath} scored ${this.reportingService.formatPercentage(e.score)} against ${e.templateName} (threshold ${this.reportingService.formatPercentage(e.threshold)})`), ...e.unmatched.length === 0 ? [] : [`${String(e.unmatched.length)} instance(s) matched no template`]].join("; ")}.`;
@@ -569,9 +572,9 @@ var X, Z = X = class extends v {
569
572
  }
570
573
  async selectTemplates(e) {
571
574
  let t = e.templateNames ?? await this.promptForTemplateNames(e.configuration);
572
- if (!(t === void 0 || t.includes(d))) return t.map((t) => {
575
+ if (!(t === void 0 || t.includes(f))) return t.map((t) => {
573
576
  let n = e.configuration.find((e) => e.name === t);
574
- if (n === void 0) throw this.logger.error("🚫 Rejected an unknown template", void 0, { template: t }), P({
577
+ if (n === void 0) throw this.logger.error("🚫 Rejected an unknown template", void 0, { template: t }), unknownTemplateError({
575
578
  availableTemplateNames: e.configuration.map((e) => e.name),
576
579
  templateName: t
577
580
  });
@@ -623,88 +626,88 @@ var X, Z = X = class extends v {
623
626
  });
624
627
  }
625
628
  };
626
- A([
627
- y({
629
+ __decorate([
630
+ b({
628
631
  description: "Path to the conformetry configuration file",
629
632
  flags: "--config [path]"
630
633
  }),
631
- k("design:type", Function),
632
- k("design:paramtypes", [Object]),
633
- k("design:returntype", Object)
634
- ], Z.prototype, "parseConfig", null), A([
635
- y({
634
+ __decorateMetadata("design:type", Function),
635
+ __decorateMetadata("design:paramtypes", [Object]),
636
+ __decorateMetadata("design:returntype", Object)
637
+ ], X.prototype, "parseConfig", null), __decorate([
638
+ b({
636
639
  description: "Comma-separated glob patterns to validate, overriding the configuration",
637
640
  flags: "--instances [globs]"
638
641
  }),
639
- k("design:type", Function),
640
- k("design:paramtypes", [Object]),
641
- k("design:returntype", Object)
642
- ], Z.prototype, "parseInstances", null), A([
643
- y({
642
+ __decorateMetadata("design:type", Function),
643
+ __decorateMetadata("design:paramtypes", [Object]),
644
+ __decorateMetadata("design:returntype", Object)
645
+ ], X.prototype, "parseInstances", null), __decorate([
646
+ b({
644
647
  description: "Comma-separated language names to run",
645
648
  flags: "--languages [languages]"
646
649
  }),
647
- k("design:type", Function),
648
- k("design:paramtypes", [Object]),
649
- k("design:returntype", Object)
650
- ], Z.prototype, "parseLanguages", null), A([
651
- y({
652
- description: `Comma-separated template names to validate, or "${d}" for every one`,
650
+ __decorateMetadata("design:type", Function),
651
+ __decorateMetadata("design:paramtypes", [Object]),
652
+ __decorateMetadata("design:returntype", Object)
653
+ ], X.prototype, "parseLanguages", null), __decorate([
654
+ b({
655
+ description: `Comma-separated template names to validate, or "${f}" for every one`,
653
656
  flags: "--templates [names]"
654
657
  }),
655
- k("design:type", Function),
656
- k("design:paramtypes", [Object]),
657
- k("design:returntype", Object)
658
- ], Z.prototype, "parseTemplates", null), A([
659
- y({
658
+ __decorateMetadata("design:type", Function),
659
+ __decorateMetadata("design:paramtypes", [Object]),
660
+ __decorateMetadata("design:returntype", Object)
661
+ ], X.prototype, "parseTemplates", null), __decorate([
662
+ b({
660
663
  description: "Lowest conformance score an instance may have, from 0 to 1. Overridden by a generator's own threshold and by an instance group's",
661
664
  flags: "--threshold [ratio]"
662
665
  }),
663
- k("design:type", Function),
664
- k("design:paramtypes", [Object]),
665
- k("design:returntype", Object)
666
- ], Z.prototype, "parseThreshold", null), Z = X = A([
667
- _({
666
+ __decorateMetadata("design:type", Function),
667
+ __decorateMetadata("design:paramtypes", [Object]),
668
+ __decorateMetadata("design:returntype", Object)
669
+ ], X.prototype, "parseThreshold", null), X = Y = __decorate([
670
+ v({
668
671
  description: "Measure instances against their templates and report every difference",
669
672
  name: "validate"
670
673
  }),
671
674
  n(),
672
- k("design:paramtypes", [
673
- p === void 0 ? Object : p,
674
- S === void 0 ? Object : S,
675
+ __decorateMetadata("design:paramtypes", [
676
+ m === void 0 ? Object : m,
675
677
  w === void 0 ? Object : w,
676
- M === void 0 ? Object : M
678
+ E === void 0 ? Object : E,
679
+ N === void 0 ? Object : N
677
680
  ])
678
- ], Z);
681
+ ], X);
679
682
  //#endregion
680
683
  //#region packages/ic-suite/conformetry/conformetry-cli/src/modules/validate/validate.module.ts
681
- var Q = class {};
682
- Q = A([r({
684
+ var Z = class ValidateModule {};
685
+ Z = __decorate([r({
683
686
  controllers: [],
684
- exports: [Z],
687
+ exports: [X],
685
688
  imports: [
686
- f,
687
- N,
688
- te,
689
- C
689
+ p,
690
+ P,
691
+ C,
692
+ T
690
693
  ],
691
- providers: [Z]
692
- })], Q);
694
+ providers: [X]
695
+ })], Z);
693
696
  //#endregion
694
697
  //#region packages/ic-suite/conformetry/conformetry-cli/src/main.module.ts
695
- var $ = class {};
696
- $ = A([r({ imports: [
698
+ var Q = class MainModule {};
699
+ Q = __decorate([r({ imports: [
697
700
  a.forRoot({
698
701
  envFilePath: ".env",
699
702
  isGlobal: !0,
700
- validate: (e) => I.parse(e)
703
+ validate: (e) => F.parse(e)
701
704
  }),
702
705
  o,
703
- N,
704
- B,
705
- W,
706
- Y,
707
- Q
708
- ] })], $);
706
+ P,
707
+ R,
708
+ U,
709
+ J,
710
+ Z
711
+ ] })], Q);
709
712
  //#endregion
710
- export { J as a, B as c, Y as i, z as l, Q as n, W as o, Z as r, U as s, $ as t, M as u };
713
+ export { q as a, R as c, __name as d, J as i, L as l, Z as n, U as o, X as r, H as s, Q as t, N as u };
package/dist/src/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "../main.module-rxiDQ87q.js";
1
+ import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "../main.module-D7s1s-1a.js";
2
2
  export { r as GenerateCommand, t as GenerateModule, s as InstancesCommand, a as InstancesModule, c as MainModule, e as TemplatesCommand, n as TemplatesModule, o as ValidateCommand, i as ValidateModule };
package/dist/src/main.js CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import { t as e, u as t } from "../main.module-rxiDQ87q.js";
2
+ import { t as e, u as t } from "../main.module-D7s1s-1a.js";
3
3
  import { CommandFactory as n } from "nest-commander";
4
4
  import "reflect-metadata";
5
5
  //#region packages/ic-suite/conformetry/conformetry-cli/src/main.ts
6
- async function r() {
6
+ async function main() {
7
7
  let r = new t();
8
8
  r.setContext("CommandFactory"), await n.run(e, {
9
9
  bufferLogs: !0,
@@ -16,5 +16,5 @@ async function r() {
16
16
  }
17
17
  });
18
18
  }
19
- r();
19
+ main();
20
20
  //#endregion
package/package.json CHANGED
@@ -7,10 +7,10 @@
7
7
  "url": "https://github.com/organizzolini/codebase/issues"
8
8
  },
9
9
  "dependencies": {
10
- "@conformetry/configuration": "0.0.10",
11
- "@conformetry/generation": "0.0.10",
12
- "@conformetry/output": "0.0.9",
13
- "@conformetry/validation": "0.0.9",
10
+ "@conformetry/configuration": "0.0.11",
11
+ "@conformetry/generation": "0.0.11",
12
+ "@conformetry/output": "0.0.10",
13
+ "@conformetry/validation": "0.0.10",
14
14
  "@nestjs/common": "^11.1.21 || ^12.0.1",
15
15
  "@nestjs/config": "^12.0.0",
16
16
  "@nestjs/core": "^11.1.21 || ^12.0.1",
@@ -23,7 +23,7 @@
23
23
  "description": "Command-line toolchain for scaffolding code from templates and holding implementations to them",
24
24
  "devDependencies": {
25
25
  "@codebase/logging": "0.0.1",
26
- "@conformetry/core": "0.0.9",
26
+ "@conformetry/core": "0.0.10",
27
27
  "@golevelup/ts-vitest": "^4.0.0",
28
28
  "@nestjs/testing": "^12.0.1",
29
29
  "@nx/eslint-plugin": "^23.0.0",
@@ -75,5 +75,5 @@
75
75
  "strict": true
76
76
  },
77
77
  "types": "./dist/src/index.d.ts",
78
- "version": "0.0.9"
78
+ "version": "0.0.10"
79
79
  }