@conformetry/configuration 0.0.14 → 0.0.16

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,19 @@
1
+ ## 0.0.16 (2026-10-13)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - **caelundas,conformetry:** 🐛 require an explicit directory instead of defaulting the destination ([#1395](https://github.com/organizzolini/codebase/pull/1395))
6
+
7
+ ### 🧱 Updated Dependencies
8
+
9
+ - Updated conformetry-core to 0.0.15
10
+
11
+ ## 0.0.15 (2026-10-12)
12
+
13
+ ### 🧱 Updated Dependencies
14
+
15
+ - Updated conformetry-core to 0.0.14
16
+
1
17
  ## 0.0.14 (2026-10-12)
2
18
 
3
19
  ### 🧱 Updated Dependencies
package/README.md CHANGED
@@ -572,6 +572,7 @@ graph LR
572
572
  file_src_modules_input_input_schema_service_ts["src/modules/input/input-schema.service.ts"]
573
573
  file_src_modules_input_input_schema_service_unit_test_ts["src/modules/input/input-schema.service.unit.test.ts"]
574
574
  file_src_modules_input_input_constants_ts["src/modules/input/input.constants.ts"]
575
+ file_src_modules_input_input_constants_unit_test_ts["src/modules/input/input.constants.unit.test.ts"]
575
576
  file_src_modules_input_input_module_ts["src/modules/input/input.module.ts"]
576
577
  file_src_modules_input_input_service_ts["src/modules/input/input.service.ts"]
577
578
  file_src_modules_input_input_service_unit_test_ts["src/modules/input/input.service.unit.test.ts"]
@@ -651,6 +652,7 @@ graph LR
651
652
  file_src_modules_input_input_schema_service_ts --> file_src_modules_configuration_configuration_types_ts
652
653
  file_src_modules_input_input_schema_service_ts --> file_src_modules_input_input_types_ts
653
654
  file_src_modules_input_input_schema_service_unit_test_ts --> file_src_modules_input_input_schema_service_ts
655
+ file_src_modules_input_input_constants_unit_test_ts --> file_src_modules_input_input_constants_ts
654
656
  file_src_modules_input_input_module_ts --> file_src_modules_input_input_options_service_ts
655
657
  file_src_modules_input_input_module_ts --> file_src_modules_input_input_prompting_service_ts
656
658
  file_src_modules_input_input_module_ts --> file_src_modules_input_input_schema_service_ts
@@ -727,40 +729,40 @@ graph LR
727
729
 
728
730
  ### Project
729
731
 
730
- ![Lines of Code](https://img.shields.io/badge/Lines_of_Code-6684-22c55e?style=flat-square)
731
- ![Repository Size](https://img.shields.io/badge/Repository_Size-228.60_kB-6b7280?style=flat-square)
732
+ ![Lines of Code](https://img.shields.io/badge/Lines_of_Code-6627-22c55e?style=flat-square)
733
+ ![Repository Size](https://img.shields.io/badge/Repository_Size-227.53_kB-6b7280?style=flat-square)
732
734
  ![Folders](https://img.shields.io/badge/Folders-9-4a4a4a?style=flat-square)
733
- ![Source Files](https://img.shields.io/badge/Source_Files-54-3178c6?style=flat-square)
735
+ ![Source Files](https://img.shields.io/badge/Source_Files-55-3178c6?style=flat-square)
734
736
 
735
737
  ### Measured Targets
736
738
 
737
- ![Compiled JavaScript Size](https://img.shields.io/badge/Compiled_JavaScript_Size-8.11_kB_gzip-6b7280?style=flat-square)
739
+ ![Compiled JavaScript Size](https://img.shields.io/badge/Compiled_JavaScript_Size-8.10_kB_gzip-6b7280?style=flat-square)
738
740
 
739
741
  ### TypeScript
740
742
 
741
- ![TypeScript Files](https://img.shields.io/badge/TypeScript_Files-54-3178c6?style=flat-square)
743
+ ![TypeScript Files](https://img.shields.io/badge/TypeScript_Files-55-3178c6?style=flat-square)
742
744
  ![Interfaces](https://img.shields.io/badge/Interfaces-18-0ea5e9?style=flat-square)
743
745
  ![Generic Declarations](https://img.shields.io/badge/Generic_Declarations-2-0369a1?style=flat-square)
744
746
  ![Enums](https://img.shields.io/badge/Enums-0-f97316?style=flat-square)
745
747
  ![Decorators](https://img.shields.io/badge/Decorators-17-db2777?style=flat-square)
746
- ![Doc Comments](https://img.shields.io/badge/Doc_Comments-188-6366f1?style=flat-square)
748
+ ![Doc Comments](https://img.shields.io/badge/Doc_Comments-186-6366f1?style=flat-square)
747
749
  ![Static Methods](https://img.shields.io/badge/Static_Methods-0-166534?style=flat-square)
748
750
 
749
751
  ### JavaScript
750
752
 
751
753
  ![JavaScript Files](https://img.shields.io/badge/JavaScript_Files-0-f7df1e?style=flat-square)
752
- ![Test Files](https://img.shields.io/badge/Test_Files-14-10b981?style=flat-square)
754
+ ![Test Files](https://img.shields.io/badge/Test_Files-15-10b981?style=flat-square)
753
755
  ![External Packages](https://img.shields.io/badge/External_Packages-17-8b5cf6?style=flat-square)
754
756
  ![Classes](https://img.shields.io/badge/Classes-20-7c3aed?style=flat-square)
755
- ![Functions](https://img.shields.io/badge/Functions-354-16a34a?style=flat-square)
756
- ![Methods](https://img.shields.io/badge/Methods-147-15803d?style=flat-square)
757
- ![Sync Functions](https://img.shields.io/badge/Sync_Functions-403-4ade80?style=flat-square)
757
+ ![Functions](https://img.shields.io/badge/Functions-348-16a34a?style=flat-square)
758
+ ![Methods](https://img.shields.io/badge/Methods-146-15803d?style=flat-square)
759
+ ![Sync Functions](https://img.shields.io/badge/Sync_Functions-396-4ade80?style=flat-square)
758
760
  ![Async Functions](https://img.shields.io/badge/Async_Functions-98-059669?style=flat-square)
759
- ![Constants](https://img.shields.io/badge/Constants-328-dc2626?style=flat-square)
761
+ ![Constants](https://img.shields.io/badge/Constants-326-dc2626?style=flat-square)
760
762
  ![Imports](https://img.shields.io/badge/Imports-216-0284c7?style=flat-square)
761
- ![Exported Symbols](https://img.shields.io/badge/Exported_Symbols-66-ea580c?style=flat-square)
762
- ![Comments](https://img.shields.io/badge/Comments-340-64748b?style=flat-square)
763
- ![Comment Lines](https://img.shields.io/badge/Comment_Lines-924-475569?style=flat-square)
763
+ ![Exported Symbols](https://img.shields.io/badge/Exported_Symbols-65-ea580c?style=flat-square)
764
+ ![Comments](https://img.shields.io/badge/Comments-338-64748b?style=flat-square)
765
+ ![Comment Lines](https://img.shields.io/badge/Comment_Lines-922-475569?style=flat-square)
764
766
  ![TODO Comments](https://img.shields.io/badge/TODO_Comments-0-ca8a04?style=flat-square)
765
767
 
766
768
  ### Python
@@ -878,7 +880,7 @@ graph LR
878
880
  ![Types Files](https://img.shields.io/badge/Types_Files-6-db2777?style=flat-square)
879
881
  ![Utilities Files](https://img.shields.io/badge/Utilities_Files-2-0ea5e9?style=flat-square)
880
882
  ![TypeORM Entities](https://img.shields.io/badge/TypeORM_Entities-0-059669?style=flat-square)
881
- ![Unit Tests](https://img.shields.io/badge/Unit_Tests-14-ca8a04?style=flat-square)
883
+ ![Unit Tests](https://img.shields.io/badge/Unit_Tests-15-ca8a04?style=flat-square)
882
884
  ![Integration Tests](https://img.shields.io/badge/Integration_Tests-0-7c3aed?style=flat-square)
883
885
  ![End To End Tests](https://img.shields.io/badge/End_To_End_Tests-0-0284c7?style=flat-square)
884
886
  ![CSS Comment Budget](https://img.shields.io/badge/CSS_Comment_Budget-0-16a34a?style=flat-square)
@@ -916,20 +918,20 @@ graph LR
916
918
  ### Markdown
917
919
 
918
920
  ![Markdown Files](https://img.shields.io/badge/Markdown_Files-2-083fa1?style=flat-square)
919
- ![Markdown Lines](https://img.shields.io/badge/Markdown_Lines-289-1f6feb?style=flat-square)
921
+ ![Markdown Lines](https://img.shields.io/badge/Markdown_Lines-305-1f6feb?style=flat-square)
920
922
  ![H1](https://img.shields.io/badge/H1-1-7c3aed?style=flat-square)
921
- ![H2](https://img.shields.io/badge/H2-17-8b5cf6?style=flat-square)
922
- ![H3](https://img.shields.io/badge/H3-24-a78bfa?style=flat-square)
923
+ ![H2](https://img.shields.io/badge/H2-19-8b5cf6?style=flat-square)
924
+ ![H3](https://img.shields.io/badge/H3-27-a78bfa?style=flat-square)
923
925
  ![H4](https://img.shields.io/badge/H4-0-c4b5fd?style=flat-square)
924
926
  ![H5](https://img.shields.io/badge/H5-0-ddd6fe?style=flat-square)
925
927
  ![H6](https://img.shields.io/badge/H6-0-ede9fe?style=flat-square)
926
- ![Paragraphs](https://img.shields.io/badge/Paragraphs-57-64748b?style=flat-square)
927
- ![Lists](https://img.shields.io/badge/Lists-18-16a34a?style=flat-square)
928
- ![List Items](https://img.shields.io/badge/List_Items-37-22c55e?style=flat-square)
928
+ ![Paragraphs](https://img.shields.io/badge/Paragraphs-60-64748b?style=flat-square)
929
+ ![Lists](https://img.shields.io/badge/Lists-21-16a34a?style=flat-square)
930
+ ![List Items](https://img.shields.io/badge/List_Items-40-22c55e?style=flat-square)
929
931
  ![Task List Items](https://img.shields.io/badge/Task_List_Items-0-4ade80?style=flat-square)
930
932
  ![Tables](https://img.shields.io/badge/Tables-2-0284c7?style=flat-square)
931
933
  ![Table Rows](https://img.shields.io/badge/Table_Rows-10-0ea5e9?style=flat-square)
932
- ![Links](https://img.shields.io/badge/Links-11-059669?style=flat-square)
934
+ ![Links](https://img.shields.io/badge/Links-12-059669?style=flat-square)
933
935
  ![Images](https://img.shields.io/badge/Images-0-10b981?style=flat-square)
934
936
  ![Code Blocks](https://img.shields.io/badge/Code_Blocks-11-dc2626?style=flat-square)
935
937
  ![Inline Code](https://img.shields.io/badge/Inline_Code-73-ef4444?style=flat-square)
@@ -315,16 +315,6 @@ declare class InputOptionsService {
315
315
  }): Record<string, string>;
316
316
  /** Coerces mixed-typed runtime options into string inputs. */
317
317
  normalizeRuntimeOptions(options: Record<string, unknown>): Record<string, string | undefined>;
318
- /**
319
- * Resolves where generated files should land: an explicit output option, a
320
- * resolved project root, or a directory named after the generator.
321
- */
322
- resolveTargetDirectoryPath(args: {
323
- defaultGeneratedOutputDirectory?: string;
324
- generatorName: string;
325
- options: Record<string, unknown>;
326
- resolveProjectRootPath?: (projectName: string) => string | undefined;
327
- }): string;
328
318
  }
329
319
 
330
320
  /**
@@ -807,6 +797,21 @@ export declare interface MatchedInstance {
807
797
  readonly template: TemplateDefinition;
808
798
  }
809
799
 
800
+ /**
801
+ * A run that names no directory, and has nothing else to place its output by.
802
+ *
803
+ * Both hosts refuse this with the same words, which is why it lives here: the
804
+ * command-line host always needs `--directory`, and the Nx plugin needs it
805
+ * only when no `project` or `type` locates the output, so each decides when to
806
+ * raise it and neither words it. A silent fallback is what this replaces —
807
+ * output written somewhere the caller never chose, reported as success. The
808
+ * optional `hint` carries a remedy only one host has.
809
+ */
810
+ export declare const missingDirectoryError: (args: {
811
+ generatorName: string | undefined;
812
+ hint?: string;
813
+ }) => InputError;
814
+
810
815
  /**
811
816
  * A required input that cannot be asked for, because stdin is not a terminal.
812
817
  *
package/dist/src/index.js CHANGED
@@ -16,15 +16,11 @@ var h = /* @__PURE__ */ new Set([
16
16
  "help",
17
17
  "instancePath",
18
18
  "template"
19
- ]), g = "all", _ = [
20
- "instancePath",
21
- "directory",
22
- "outputPath"
23
- ], InputError = class extends Error {
19
+ ]), g = "all", InputError = class extends Error {
24
20
  constructor(e) {
25
21
  super(e), this.name = "InputError";
26
22
  }
27
- }, missingInputError = (e) => new InputError(`${e} is required, and stdin is not a terminal so it cannot be asked for. Pass --${e}.`);
23
+ }, missingInputError = (e) => new InputError(`${e} is required, and stdin is not a terminal so it cannot be asked for. Pass --${e}.`), missingDirectoryError = (e) => new InputError(`${e.generatorName === void 0 ? "This generator" : `Generator ${e.generatorName}`} cannot tell where to write its output. Pass --directory=<parent folder> (the folder the output is created inside).${e.hint === void 0 ? "" : ` ${e.hint}`}`);
28
24
  //#endregion
29
25
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/configuration/configuration.utilities.ts
30
26
  function assertNoCollisions(e, t) {
@@ -86,7 +82,7 @@ var UnknownConfigurationFileTypeError = class extends Error {
86
82
  constructor(e) {
87
83
  super(`Unsupported configuration file type: ${e}`), this.name = "UnknownConfigurationFileTypeError";
88
84
  }
89
- }, v = "pnpm-workspace.yaml", y = /* @__PURE__ */ new Set([
85
+ }, _ = "pnpm-workspace.yaml", v = /* @__PURE__ */ new Set([
90
86
  ".cjs",
91
87
  ".cts",
92
88
  ".js",
@@ -95,16 +91,16 @@ var UnknownConfigurationFileTypeError = class extends Error {
95
91
  ".mjs",
96
92
  ".mts",
97
93
  ".ts"
98
- ]), b = e.lazy(() => e.union([
94
+ ]), y = e.lazy(() => e.union([
99
95
  e.string(),
100
96
  e.number(),
101
97
  e.boolean(),
102
98
  e.null(),
103
- e.array(b),
104
- e.record(e.string(), b)
105
- ])), x = e.array(e.strictObject({
99
+ e.array(y),
100
+ e.record(e.string(), y)
101
+ ])), b = e.array(e.strictObject({
106
102
  description: e.string().optional(),
107
- inputs: e.record(e.string(), e.record(e.string(), b)).optional(),
103
+ inputs: e.record(e.string(), e.record(e.string(), y)).optional(),
108
104
  instances: e.array(e.object({
109
105
  exclude: e.array(e.string()).optional(),
110
106
  patterns: e.array(e.string()).optional(),
@@ -117,12 +113,12 @@ var UnknownConfigurationFileTypeError = class extends Error {
117
113
  threshold: e.number().min(0).max(1).optional()
118
114
  })).superRefine(assertNoCollisions);
119
115
  //#endregion
120
- //#region \0@oxc-project+runtime@0.151.0/helpers/esm/decorateMetadata.js
116
+ //#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorateMetadata.js
121
117
  function __decorateMetadata(e, t) {
122
118
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(e, t);
123
119
  }
124
120
  //#endregion
125
- //#region \0@oxc-project+runtime@0.151.0/helpers/esm/decorate.js
121
+ //#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorate.js
126
122
  function __decorate(e, t, n, r) {
127
123
  var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
128
124
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
@@ -131,7 +127,7 @@ function __decorate(e, t, n, r) {
131
127
  }
132
128
  //#endregion
133
129
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/input/input-options.service.ts
134
- var S = class InputOptionsService {
130
+ var x = class InputOptionsService {
135
131
  constructor() {}
136
132
  collectOneInput(e) {
137
133
  let t = e.commandArguments[e.argumentIndex];
@@ -172,23 +168,11 @@ var S = class InputOptionsService {
172
168
  for (let [n, r] of Object.entries(e)) t[n] = r === void 0 ? void 0 : typeof r == "string" ? r : typeof r == "number" || typeof r == "boolean" ? `${r}` : JSON.stringify(r);
173
169
  return t;
174
170
  }
175
- resolveTargetDirectoryPath(e) {
176
- for (let t of _) {
177
- let n = e.options[t];
178
- if (typeof n == "string") return n;
179
- }
180
- let n = e.options.projectName ?? e.options.project;
181
- if (typeof n == "string") {
182
- let t = e.resolveProjectRootPath?.(n);
183
- if (typeof t == "string") return t;
184
- }
185
- return t.join(e.defaultGeneratedOutputDirectory ?? "generated", e.generatorName);
186
- }
187
171
  };
188
- S = __decorate([n(), __decorateMetadata("design:paramtypes", [])], S);
172
+ x = __decorate([n(), __decorateMetadata("design:paramtypes", [])], x);
189
173
  //#endregion
190
174
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/input/input-schema.service.ts
191
- var C = class InputSchemaService {
175
+ var S = class InputSchemaService {
192
176
  constructor() {}
193
177
  readSchemaProperty(e, t) {
194
178
  if (typeof e == "object" && e) return Object.entries(e).find(([e]) => e === t)?.[1];
@@ -243,10 +227,10 @@ var C = class InputSchemaService {
243
227
  }) : r;
244
228
  }
245
229
  };
246
- C = __decorate([n(), __decorateMetadata("design:paramtypes", [])], C);
230
+ S = __decorate([n(), __decorateMetadata("design:paramtypes", [])], S);
247
231
  //#endregion
248
232
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/input/input-prompting.service.ts
249
- var w = class InputPromptingService {
233
+ var C = class InputPromptingService {
250
234
  inputSchemaService;
251
235
  constructor(e) {
252
236
  this.inputSchemaService = e;
@@ -309,10 +293,10 @@ var w = class InputPromptingService {
309
293
  return n.length === 0 ? void 0 : n;
310
294
  }
311
295
  };
312
- w = __decorate([n(), __decorateMetadata("design:paramtypes", [C === void 0 ? Object : C])], w);
296
+ C = __decorate([n(), __decorateMetadata("design:paramtypes", [S === void 0 ? Object : S])], C);
313
297
  //#endregion
314
298
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/input/input.service.ts
315
- var T = class InputService {
299
+ var w = class InputService {
316
300
  inputOptionsService;
317
301
  inputPromptingService;
318
302
  inputSchemaService;
@@ -393,55 +377,55 @@ var T = class InputService {
393
377
  });
394
378
  }
395
379
  };
396
- T = __decorate([n(), __decorateMetadata("design:paramtypes", [
397
- S === void 0 ? Object : S,
398
- w === void 0 ? Object : w,
399
- C === void 0 ? Object : C
400
- ])], T);
380
+ w = __decorate([n(), __decorateMetadata("design:paramtypes", [
381
+ x === void 0 ? Object : x,
382
+ C === void 0 ? Object : C,
383
+ S === void 0 ? Object : S
384
+ ])], w);
401
385
  //#endregion
402
386
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/input/input.module.ts
403
- var E = class InputModule {};
404
- E = __decorate([r({
387
+ var T = class InputModule {};
388
+ T = __decorate([r({
405
389
  controllers: [],
406
390
  exports: [
407
- S,
408
- w,
409
- T
391
+ x,
392
+ C,
393
+ w
410
394
  ],
411
395
  imports: [],
412
396
  providers: [
413
- S,
414
- w,
397
+ x,
415
398
  C,
416
- T
399
+ S,
400
+ w
417
401
  ]
418
- })], E);
402
+ })], T);
419
403
  //#endregion
420
404
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-group/instance-group.service.ts
421
- var D = class InstanceGroupService {
405
+ var E = class InstanceGroupService {
422
406
  constructor() {}
423
407
  isProjectScoped(e) {
424
408
  return e.tags !== void 0 && e.tags.length > 0;
425
409
  }
426
410
  };
427
- D = __decorate([n(), __decorateMetadata("design:paramtypes", [])], D);
411
+ E = __decorate([n(), __decorateMetadata("design:paramtypes", [])], E);
428
412
  //#endregion
429
413
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-group/instance-group.module.ts
430
- var O = class InstanceGroupModule {};
431
- O = __decorate([r({
414
+ var D = class InstanceGroupModule {};
415
+ D = __decorate([r({
432
416
  controllers: [],
433
- exports: [D],
417
+ exports: [E],
434
418
  imports: [],
435
- providers: [D]
436
- })], O);
419
+ providers: [E]
420
+ })], D);
437
421
  //#endregion
438
422
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/rendering/rendering.constants.ts
439
- var k = { escape: String }, MissingSubstitutionError = class extends Error {
423
+ var O = { escape: String }, MissingSubstitutionError = class extends Error {
440
424
  constructor(e) {
441
425
  let t = e.placeholders.map((e) => `{{${e}}}`).join(", ");
442
426
  super(`No value was supplied for ${t} while rendering ${e.subject}. Declare each one as an input of the generator, and in the matching instance group's substitutions.`), this.name = "MissingSubstitutionError";
443
427
  }
444
- }, A = /conformetry[0-9a-f]{32}/g, j = "conformetry", M = class RenderingService {
428
+ }, k = /conformetry[0-9a-f]{32}/g, A = "conformetry", j = class RenderingService {
445
429
  constructor() {}
446
430
  assertEverySubstitutionSupplied(e) {
447
431
  let t = this.collectInterpolatedNames(e.template).filter((t) => !Object.hasOwn(e.substitutions, t));
@@ -473,29 +457,29 @@ var k = { escape: String }, MissingSubstitutionError = class extends Error {
473
457
  subject: e.subject ?? "a template file",
474
458
  substitutions: e.substitutions,
475
459
  template: e.templateContent
476
- }), o.render(e.templateContent, e.substitutions, {}, k);
460
+ }), o.render(e.templateContent, e.substitutions, {}, O);
477
461
  }
478
462
  renderPath(e) {
479
463
  return this.assertEverySubstitutionSupplied({
480
464
  subject: e.subject ?? e.templatePath,
481
465
  substitutions: e.substitutions,
482
466
  template: e.templatePath
483
- }), o.render(e.templatePath, e.substitutions, {}, k);
467
+ }), o.render(e.templatePath, e.substitutions, {}, O);
484
468
  }
485
469
  };
486
- M = __decorate([n(), __decorateMetadata("design:paramtypes", [])], M);
470
+ j = __decorate([n(), __decorateMetadata("design:paramtypes", [])], j);
487
471
  //#endregion
488
472
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/rendering/rendering.module.ts
489
- var N = class RenderingModule {};
490
- N = __decorate([r({
473
+ var M = class RenderingModule {};
474
+ M = __decorate([r({
491
475
  controllers: [],
492
- exports: [M],
476
+ exports: [j],
493
477
  imports: [],
494
- providers: [M]
495
- })], N);
478
+ providers: [j]
479
+ })], M);
496
480
  //#endregion
497
481
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/template-discovery/template-discovery.service.ts
498
- var P = class TemplateDiscoveryService {
482
+ var N = class TemplateDiscoveryService {
499
483
  renderingService;
500
484
  constructor(e) {
501
485
  this.renderingService = e;
@@ -569,23 +553,23 @@ var P = class TemplateDiscoveryService {
569
553
  }));
570
554
  }
571
555
  };
572
- P = __decorate([n(), __decorateMetadata("design:paramtypes", [M === void 0 ? Object : M])], P);
556
+ N = __decorate([n(), __decorateMetadata("design:paramtypes", [j === void 0 ? Object : j])], N);
573
557
  //#endregion
574
558
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/template-discovery/template-discovery.module.ts
575
- var F = class TemplateDiscoveryModule {};
576
- F = __decorate([r({
559
+ var P = class TemplateDiscoveryModule {};
560
+ P = __decorate([r({
577
561
  controllers: [],
578
- exports: [P],
579
- imports: [N],
580
- providers: [P]
581
- })], F);
562
+ exports: [N],
563
+ imports: [M],
564
+ providers: [N]
565
+ })], P);
582
566
  //#endregion
583
567
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.constants.ts
584
- var I = /\.[^.]+$/u, L = [
568
+ var F = /\.[^.]+$/u, I = [
585
569
  "*",
586
570
  "?",
587
571
  "]"
588
- ], R = class InstanceDiscoveryLocatingService {
572
+ ], L = class InstanceDiscoveryLocatingService {
589
573
  constructor() {}
590
574
  deriveLocationSubstitutions(e) {
591
575
  let [n = ""] = t.relative(e.workingDirectory, t.join(e.instancePath, e.nameStem)).split(t.sep);
@@ -605,11 +589,11 @@ var I = /\.[^.]+$/u, L = [
605
589
  return (e.exclude ?? []).some((e) => t.matchesGlob(n, e));
606
590
  }
607
591
  resolveGlobSuffix(e) {
608
- let n = t.basename(e), r = Math.max(...L.map((e) => n.lastIndexOf(e)));
592
+ let n = t.basename(e), r = Math.max(...I.map((e) => n.lastIndexOf(e)));
609
593
  return r === -1 ? "" : n.slice(r + 1);
610
594
  }
611
595
  resolveNameStem(e) {
612
- return e.isDirectory ? e.entryName : e.suffix !== "" && e.entryName.endsWith(e.suffix) ? e.entryName.slice(0, -e.suffix.length) : e.entryName.replace(I, "");
596
+ return e.isDirectory ? e.entryName : e.suffix !== "" && e.entryName.endsWith(e.suffix) ? e.entryName.slice(0, -e.suffix.length) : e.entryName.replace(F, "");
613
597
  }
614
598
  findInstances(e) {
615
599
  let n = /* @__PURE__ */ new Map();
@@ -655,24 +639,24 @@ var I = /\.[^.]+$/u, L = [
655
639
  });
656
640
  }
657
641
  };
658
- R = __decorate([n(), __decorateMetadata("design:paramtypes", [])], R);
642
+ L = __decorate([n(), __decorateMetadata("design:paramtypes", [])], L);
659
643
  //#endregion
660
644
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/rendering/rendering.utilities.ts
661
645
  function capturePlaceholderValues(e) {
662
- let t = e.templateText.match(A) ?? [];
646
+ let t = e.templateText.match(k) ?? [];
663
647
  if (t.length === 0) return;
664
- let n = i.escapeRegExp(e.templateText).replaceAll(A, String.raw`([\s\S]+?)`), r = RegExp(`^${n}$`, "u").exec(e.instanceText);
648
+ let n = i.escapeRegExp(e.templateText).replaceAll(k, String.raw`([\s\S]+?)`), r = RegExp(`^${n}$`, "u").exec(e.instanceText);
665
649
  if (r === null) return;
666
650
  let a = {};
667
651
  for (let [e, n] of t.entries()) a[n] ??= r[e + 1] ?? "";
668
652
  return a;
669
653
  }
670
654
  function createPlaceholderValue() {
671
- return `${j}${l().replaceAll("-", "")}`;
655
+ return `${A}${l().replaceAll("-", "")}`;
672
656
  }
673
657
  //#endregion
674
658
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery-matching.service.ts
675
- var z = class InstanceDiscoveryMatchingService {
659
+ var R = class InstanceDiscoveryMatchingService {
676
660
  templateDiscoveryService;
677
661
  renderingService;
678
662
  constructor(e, t) {
@@ -715,15 +699,11 @@ var z = class InstanceDiscoveryMatchingService {
715
699
  continue;
716
700
  }
717
701
  let s = a.filter((e) => e.matchRatio === o.matchRatio && e.matchedFileCount === o.matchedFileCount);
718
- if (s.length > 1 && o.matchRatio < 1) {
719
- n.push({
720
- instance: r,
721
- reason: "ambiguous",
722
- tiedTemplateNames: s.map((e) => e.template.name)
723
- });
724
- continue;
725
- }
726
- t.push(...s.map((e) => ({
702
+ s.length > 1 && o.matchRatio < 1 ? n.push({
703
+ instance: r,
704
+ reason: "ambiguous",
705
+ tiedTemplateNames: s.map((e) => e.template.name)
706
+ }) : t.push(...s.map((e) => ({
727
707
  instance: r,
728
708
  matchedFileCount: e.matchedFileCount,
729
709
  placeholderValues: e.placeholderValues,
@@ -756,10 +736,10 @@ var z = class InstanceDiscoveryMatchingService {
756
736
  }).filter((e) => e.matchedFileCount > 0 && e.matchRatio > 0).toSorted((e, t) => this.compareMatches(e, t));
757
737
  }
758
738
  };
759
- z = __decorate([n(), __decorateMetadata("design:paramtypes", [P === void 0 ? Object : P, M === void 0 ? Object : M])], z);
739
+ R = __decorate([n(), __decorateMetadata("design:paramtypes", [N === void 0 ? Object : N, j === void 0 ? Object : j])], R);
760
740
  //#endregion
761
741
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts
762
- var B = class InstanceDiscoveryService {
742
+ var z = class InstanceDiscoveryService {
763
743
  instanceDiscoveryLocatingService;
764
744
  instanceDiscoveryMatchingService;
765
745
  instanceGroupService;
@@ -873,37 +853,37 @@ var B = class InstanceDiscoveryService {
873
853
  };
874
854
  }
875
855
  };
876
- B = __decorate([n(), __decorateMetadata("design:paramtypes", [
856
+ z = __decorate([n(), __decorateMetadata("design:paramtypes", [
857
+ L === void 0 ? Object : L,
877
858
  R === void 0 ? Object : R,
878
- z === void 0 ? Object : z,
879
- D === void 0 ? Object : D,
880
- P === void 0 ? Object : P
881
- ])], B);
859
+ E === void 0 ? Object : E,
860
+ N === void 0 ? Object : N
861
+ ])], z);
882
862
  //#endregion
883
863
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.module.ts
884
- var V = class InstanceDiscoveryModule {};
885
- V = __decorate([r({
864
+ var B = class InstanceDiscoveryModule {};
865
+ B = __decorate([r({
886
866
  controllers: [],
887
867
  exports: [
868
+ L,
888
869
  R,
889
870
  z,
890
- B,
891
- F
871
+ P
892
872
  ],
893
873
  imports: [
894
- O,
895
- N,
896
- F
874
+ D,
875
+ M,
876
+ P
897
877
  ],
898
878
  providers: [
879
+ L,
899
880
  R,
900
- z,
901
- B
881
+ z
902
882
  ]
903
- })], V);
883
+ })], B);
904
884
  //#endregion
905
885
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/configuration/configuration.service.ts
906
- var H = class ConfigurationService {
886
+ var V = class ConfigurationService {
907
887
  inputPromptingService;
908
888
  inputService;
909
889
  instanceDiscoveryService;
@@ -926,7 +906,7 @@ var H = class ConfigurationService {
926
906
  async findWorkspaceRoot() {
927
907
  let e = t.resolve(process.cwd());
928
908
  for (;;) try {
929
- return await u(t.join(e, v)), e;
909
+ return await u(t.join(e, _)), e;
930
910
  } catch {
931
911
  let n = t.dirname(e);
932
912
  if (n === e) return;
@@ -972,12 +952,12 @@ var H = class ConfigurationService {
972
952
  }
973
953
  async loadConformetryConfiguration(e) {
974
954
  let n = await this.resolveConfigurationPath(e), r = t.extname(n).toLowerCase();
975
- if (!y.has(r)) throw new UnknownConfigurationFileTypeError(n);
955
+ if (!v.has(r)) throw new UnknownConfigurationFileTypeError(n);
976
956
  let i = await this.loadConfigurationModule({
977
957
  configurationPath: n,
978
958
  extension: r
979
959
  });
980
- return x.parse(i).map((e) => this.applyGeneratorDefaults(e));
960
+ return b.parse(i).map((e) => this.applyGeneratorDefaults(e));
981
961
  }
982
962
  matchInstances(e) {
983
963
  return this.instanceDiscoveryService.matchInstances(e);
@@ -1022,28 +1002,28 @@ var H = class ConfigurationService {
1022
1002
  return this.instanceDiscoveryService.resolveInventoriedTemplates(e);
1023
1003
  }
1024
1004
  };
1025
- H = __decorate([n(), __decorateMetadata("design:paramtypes", [
1005
+ V = __decorate([n(), __decorateMetadata("design:paramtypes", [
1006
+ C === void 0 ? Object : C,
1026
1007
  w === void 0 ? Object : w,
1027
- T === void 0 ? Object : T,
1028
- B === void 0 ? Object : B,
1029
- D === void 0 ? Object : D,
1030
- M === void 0 ? Object : M,
1031
- P === void 0 ? Object : P
1032
- ])], H);
1008
+ z === void 0 ? Object : z,
1009
+ E === void 0 ? Object : E,
1010
+ j === void 0 ? Object : j,
1011
+ N === void 0 ? Object : N
1012
+ ])], V);
1033
1013
  //#endregion
1034
1014
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/configuration/configuration.module.ts
1035
- var U = class ConfigurationModule {};
1036
- U = __decorate([r({
1015
+ var H = class ConfigurationModule {};
1016
+ H = __decorate([r({
1037
1017
  controllers: [],
1038
- exports: [H],
1018
+ exports: [V],
1039
1019
  imports: [
1040
- E,
1041
- V,
1042
- O,
1043
- N,
1044
- F
1020
+ T,
1021
+ B,
1022
+ D,
1023
+ M,
1024
+ P
1045
1025
  ],
1046
- providers: [H]
1047
- })], U);
1026
+ providers: [V]
1027
+ })], H);
1048
1028
  //#endregion
1049
- export { g as ALL_TEMPLATES_SELECTION, U as ConfigurationModule, H as ConfigurationService, InputError, MissingSubstitutionError, UnknownConfigurationFileTypeError, capturePlaceholderValues, createPlaceholderValue, missingInputError };
1029
+ export { g as ALL_TEMPLATES_SELECTION, H as ConfigurationModule, V as ConfigurationService, InputError, MissingSubstitutionError, UnknownConfigurationFileTypeError, capturePlaceholderValues, createPlaceholderValue, missingDirectoryError, missingInputError };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "url": "https://github.com/organizzolini/codebase/issues"
5
5
  },
6
6
  "dependencies": {
7
- "@conformetry/core": "0.0.13",
7
+ "@conformetry/core": "0.0.15",
8
8
  "@nestjs/common": "^11.1.21 || ^12.0.1",
9
9
  "jiti": "^2.7.0",
10
10
  "jsonc-parser": "^3.3.1",
@@ -67,5 +67,5 @@
67
67
  "strict": true
68
68
  },
69
69
  "types": "./dist/src/index.d.ts",
70
- "version": "0.0.14"
70
+ "version": "0.0.16"
71
71
  }