@conformetry/configuration 0.0.5 โ†’ 0.0.7

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.7 (2026-10-08)
2
+
3
+ ### ๐Ÿงฑ Updated Dependencies
4
+
5
+ - Updated conformetry-core to 0.0.7
6
+
7
+ ## 0.0.6 (2026-10-08)
8
+
9
+ ### ๐Ÿš€ Features
10
+
11
+ - **conformetry,lexico:** โœจ add frontend conformetry templates and infer validation inputs ([#1301](https://github.com/organizzolini/codebase/pull/1301))
12
+
13
+ ### ๐Ÿงฑ Updated Dependencies
14
+
15
+ - Updated conformetry-core to 0.0.6
16
+
1
17
  ## 0.0.5 (2026-10-06)
2
18
 
3
19
  ### ๐Ÿ’… Refactors
package/README.md CHANGED
@@ -98,6 +98,7 @@ instances: [
98
98
 
99
99
  | Field | Purpose |
100
100
  | ----- | ------- |
101
+ | `exclude` | Workspace-relative globs naming paths that are never instances, applied with or without `tags` |
101
102
  | `patterns` | Globs locating this group's instances, workspace-relative |
102
103
  | `substitutions` | Values the template's placeholders are rendered with for this group |
103
104
  | `tags` | Labels selecting which hosts the group applies to, carried uninterpreted |
@@ -107,12 +108,23 @@ Groups exist so substitutions can differ per glob. `type` is `packages` for one
107
108
  set of paths and `applications` for another, and no generic rule can tell them
108
109
  apart.
109
110
 
110
- > **Every placeholder a template uses must be supplied here.** A missing entry
111
- > fails the run with `MissingSubstitutionError` rather than rendering as an
112
- > empty string โ€” see
113
- > [`@conformetry/generation`](../conformetry-generation/README.md) for why that
114
- > is an error and not a finding, and for the section syntax a template uses to
115
- > make a placeholder genuinely optional.
111
+ > **A placeholder these substitutions leave out is read from the instance.**
112
+ > Validation renders a random stand-in for it, captures the text the instance
113
+ > holds where the template's first use of it aligns, renders the template again
114
+ > with that text, and compares as usual โ€” so a later use holding different text
115
+ > is an ordinary difference. When nothing aligns, the instance fails with
116
+ > `Could not infer {{โ€ฆ}}`. `name` and its variants always come from the
117
+ > instance path, and a value supplied here always wins. Generation has no
118
+ > instance to read, so there a placeholder nobody supplied still raises
119
+ > `MissingSubstitutionError` โ€” see
120
+ > [`@conformetry/generation`](../conformetry-generation/README.md) for why, and
121
+ > for the section syntax a template uses to make a placeholder optional.
122
+
123
+ `exclude` drops any instance whose own path โ€” the directory a pattern found, or
124
+ the files of a file instance โ€” matches one of its globs, whether or not the
125
+ group has `tags`. It is how vendored or generated code living beside real
126
+ instances, such as shadcn's component output, is left out of validation:
127
+ `exclude: ["applications/lexico/src/components/ui/**"]`.
116
128
 
117
129
  `tags` is carried through untouched by this package, which has no notion of a
118
130
  host to match labels against. [`@conformetry/nx`](../conformetry-nx/README.md)
@@ -271,9 +283,9 @@ Call stacks traced through `packages/ic-suite/conformetry/conformetry-configurat
271
283
 
272
284
  | Measure | Value |
273
285
  | --- | --- |
274
- | Callables | 167 |
275
- | Files | 37 |
276
- | Calls traced | 151 |
286
+ | Callables | 181 |
287
+ | Files | 38 |
288
+ | Calls traced | 165 |
277
289
  | Call stacks | 5 |
278
290
  | Deepest stack | 10 |
279
291
  | Stacks through recursion | 0 |
@@ -293,23 +305,23 @@ What this project is judged against, as declared in its own `callidescope.config
293
305
  **1. `InstanceDiscoveryService.matchTemplates`** โ€” depth โ‰ฅ 10 ยท orphan-root
294
306
 
295
307
  ```text
296
- ๐Ÿš€ InstanceDiscoveryService.matchTemplates(โ€ฆ): TemplateMatch[] [packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:103]
308
+ ๐Ÿš€ InstanceDiscoveryService.matchTemplates(โ€ฆ): TemplateMatch[] [packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:131]
297
309
  โ†ณ Ranks every template that shares a file with one instance, best first.
298
- โ””โ”€> InstanceDiscoveryMatchingService.matchTemplates(โ€ฆ): TemplateMatch[] [packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery-matching.service.ts:154]
310
+ โ””โ”€> InstanceDiscoveryMatchingService.matchTemplates(โ€ฆ): TemplateMatch[] [packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery-matching.service.ts:180]
299
311
  โ†ณ Weighs every template that shares at least one file with the instance, best-first.
300
- โ””โ”€> InstanceDiscoveryMatchingService.map(โ€ฆ)(โ€ฆ): { matchedFileCount: number; matchRatio: number; template: TemplateDefinition; } [packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery-matching.service.ts:160]
301
- โ””โ”€> TemplateDiscoveryService.countMatchingFiles(โ€ฆ): number [packages/ic-suite/conformetry/conformetry-configuration/src/modules/template-discovery/template-discovery.service.ts:121]
312
+ โ””โ”€> InstanceDiscoveryMatchingService.map(โ€ฆ)(โ€ฆ): { matchedFileCount: number; matchRatio: number; template: TemplateDefinition; placeholderValues: Substitutions; substitutions: Substitutions; } [packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery-matching.service.ts:186]
313
+ โ””โ”€> TemplateDiscoveryService.countMatchingFiles(โ€ฆ): number [packages/ic-suite/conformetry/conformetry-configuration/src/modules/template-discovery/template-discovery.service.ts:146]
302
314
  โ†ณ Counts how many of a template's files the instance path already has.
303
- โ””โ”€> TemplateDiscoveryService.filter(โ€ฆ)(templateFilePath: string): boolean [packages/ic-suite/conformetry/conformetry-configuration/src/modules/template-discovery/template-discovery.service.ts:130]
304
- โ””โ”€> TemplateDiscoveryService.resolveInstanceFilePath(โ€ฆ): string [packages/ic-suite/conformetry/conformetry-configuration/src/modules/template-discovery/template-discovery.service.ts:179]
315
+ โ””โ”€> TemplateDiscoveryService.filter(โ€ฆ)(templateFilePath: string): boolean [packages/ic-suite/conformetry/conformetry-configuration/src/modules/template-discovery/template-discovery.service.ts:155]
316
+ โ””โ”€> TemplateDiscoveryService.resolveInstanceFilePath(โ€ฆ): string [packages/ic-suite/conformetry/conformetry-configuration/src/modules/template-discovery/template-discovery.service.ts:204]
305
317
  โ†ณ Maps a template file path to the instance file path it governs.
306
318
  โ””โ”€> RenderingService.renderPath(โ€ฆ): string [packages/ic-suite/conformetry/conformetry-configuration/src/modules/rendering/rendering.service.ts:142]
307
319
  โ†ณ Renders a template path with mustache, the same way contents are rendered.
308
320
  โ””โ”€> RenderingService.assertEverySubstitutionSupplied(โ€ฆ): void [packages/ic-suite/conformetry/conformetry-configuration/src/modules/rendering/rendering.service.ts:35]
309
321
  โ†ณ Refuses to render a template asking for a value nobody supplied.
310
- โ””โ”€> RenderingService.collectInterpolatedNames(template: string): string[] [packages/ic-suite/conformetry/conformetry-configuration/src/modules/rendering/rendering.service.ts:61]
322
+ โ””โ”€> RenderingService.collectInterpolatedNames(template: string): string[] [packages/ic-suite/conformetry/conformetry-configuration/src/modules/rendering/rendering.service.ts:80]
311
323
  โ†ณ Every placeholder a template interpolates, deduplicated.
312
- โ””โ”€> RenderingService.walk(spans: TemplateSpans): void [packages/ic-suite/conformetry/conformetry-configuration/src/modules/rendering/rendering.service.ts:63]
324
+ โ””โ”€> RenderingService.walk(spans: TemplateSpans): void [packages/ic-suite/conformetry/conformetry-configuration/src/modules/rendering/rendering.service.ts:82]
313
325
  ```
314
326
 
315
327
  **2. `InputService.resolveInputsFromValues`** โ€” depth โ‰ฅ 8 ยท orphan-root
@@ -363,11 +375,11 @@ What this project is judged against, as declared in its own `callidescope.config
363
375
  **5. `InstanceDiscoveryService.buildSubstitutions`** โ€” depth 3 ยท orphan-root
364
376
 
365
377
  ```text
366
- ๐Ÿš€ InstanceDiscoveryService.buildSubstitutions(โ€ฆ): Substitutions [packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:83]
378
+ ๐Ÿš€ InstanceDiscoveryService.buildSubstitutions(โ€ฆ): Substitutions [packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:111]
367
379
  โ†ณ Builds the substitutions an instance's template is rendered with.
368
- โ””โ”€> InstanceDiscoveryMatchingService.buildSubstitutions(instance: Instance): Substitutions [packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery-matching.service.ts:72]
380
+ โ””โ”€> InstanceDiscoveryMatchingService.buildSubstitutions(instance: Instance): Substitutions [packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery-matching.service.ts:97]
369
381
  โ†ณ Builds the substitutions an instance's template is rendered with.
370
- โ””โ”€> RenderingService.buildNameSubstitutions(name: string): Substitutions [packages/ic-suite/conformetry/conformetry-configuration/src/modules/rendering/rendering.service.ts:94]
382
+ โ””โ”€> RenderingService.buildNameSubstitutions(name: string): Substitutions [packages/ic-suite/conformetry/conformetry-configuration/src/modules/rendering/rendering.service.ts:60]
371
383
  โ†ณ Derives the case variants every template can reference from one name.
372
384
  ```
373
385
 
@@ -377,20 +389,20 @@ What this project is judged against, as declared in its own `callidescope.config
377
389
 
378
390
  | Callable | Breadth | Calls directly | Location |
379
391
  | --- | --- | --- | --- |
380
- | `InstanceDiscoveryMatchingService.matchInstances` | 5 | `InstanceDiscoveryMatchingService.buildSubstitutions`, `InstanceDiscoveryMatchingService.matchTemplates`, `InstanceDiscoveryMatchingService.filter(โ€ฆ)`, `InstanceDiscoveryMatchingService.map(โ€ฆ)`, `InstanceDiscoveryMatchingService.map(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery-matching.service.ts:93` |
392
+ | `InstanceDiscoveryLocatingService.findInstances` | 5 | `InstanceDiscoveryLocatingService.resolveGlobSuffix`, `InstanceDiscoveryLocatingService.globEntries`, `InstanceDiscoveryLocatingService.resolveNameStem`, `InstanceDiscoveryLocatingService.map(โ€ฆ)`, `InstanceDiscoveryLocatingService.toSorted(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery-locating.service.ts:156` |
393
+ | `InstanceDiscoveryMatchingService.matchInstances` | 5 | `InstanceDiscoveryMatchingService.buildSubstitutions`, `InstanceDiscoveryMatchingService.matchTemplates`, `InstanceDiscoveryMatchingService.filter(โ€ฆ)`, `InstanceDiscoveryMatchingService.map(โ€ฆ)`, `InstanceDiscoveryMatchingService.map(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery-matching.service.ts:118` |
381
394
  | `InputPromptingService.promptForInput` | 4 | `InputPromptingService.assertCanPrompt`, `InputSchemaService.readEnumValues`, `InputPromptingService.map(โ€ฆ)`, `InputSchemaService.readPromptMessage` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/input/input-prompting.service.ts:90` |
382
- | `InputService.resolveInputs` | 4 | `InputSchemaService.readPropertyNames`, `InputSchemaService.describeInput`, `InputService.acceptProvidedValue`, `InputService.resolveMissingValue` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/input/input.service.ts:53` |
383
395
 
384
396
  <details>
385
- <summary>91 more callables</summary>
397
+ <summary>100 more callables</summary>
386
398
 
387
399
  | Callable | Breadth | Calls directly | Location |
388
400
  | --- | --- | --- | --- |
401
+ | `InputService.resolveInputs` | 4 | `InputSchemaService.readPropertyNames`, `InputSchemaService.describeInput`, `InputService.acceptProvidedValue`, `InputService.resolveMissingValue` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/input/input.service.ts:53` |
389
402
  | `InputService.resolveMissingValue` | 4 | `InputPromptingService.isAtTerminal`, `missingInputError`, `InputPromptingService.promptForInput`, `InputSchemaService.validateValue` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/input/input.service.ts:94` |
390
- | `InstanceDiscoveryLocatingService.findInstances` | 4 | `InstanceDiscoveryLocatingService.resolveGlobSuffix`, `InstanceDiscoveryLocatingService.resolveNameStem`, `InstanceDiscoveryLocatingService.map(โ€ฆ)`, `InstanceDiscoveryLocatingService.toSorted(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery-locating.service.ts:121` |
391
- | `InstanceDiscoveryService.resolveInventoriedInstances` | 4 | `InstanceDiscoveryService.takeInventory`, `InstanceDiscoveryService.map(โ€ฆ)`, `InstanceDiscoveryService.filter(โ€ฆ)`, `InstanceDiscoveryService.map(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:191` |
392
- | `InstanceDiscoveryService.resolveInventoriedTemplates` | 4 | `InstanceDiscoveryService.takeInventory`, `InstanceDiscoveryService.filter(โ€ฆ)`, `InstanceDiscoveryService.map(โ€ฆ)`, `InstanceDiscoveryService.filter(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:216` |
393
- | `InstanceDiscoveryService.takeInventory` | 4 | `TemplateDiscoveryService.collectTemplates`, `InstanceDiscoveryService.flatMap(โ€ฆ)`, `InstanceDiscoveryService.findInstances`, `InstanceDiscoveryService.map(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:255` |
403
+ | `InstanceDiscoveryService.resolveInventoriedInstances` | 4 | `InstanceDiscoveryService.takeInventory`, `InstanceDiscoveryService.map(โ€ฆ)`, `InstanceDiscoveryService.filter(โ€ฆ)`, `InstanceDiscoveryService.map(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:219` |
404
+ | `InstanceDiscoveryService.resolveInventoriedTemplates` | 4 | `InstanceDiscoveryService.takeInventory`, `InstanceDiscoveryService.filter(โ€ฆ)`, `InstanceDiscoveryService.map(โ€ฆ)`, `InstanceDiscoveryService.filter(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:244` |
405
+ | `InstanceDiscoveryService.takeInventory` | 4 | `TemplateDiscoveryService.collectTemplates`, `InstanceDiscoveryService.findInstances`, `InstanceDiscoveryService.readInventoryGlobs`, `InstanceDiscoveryService.map(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:283` |
394
406
  | `ConfigurationService.loadConformetryConfiguration` | 4 | `ConfigurationService.resolveConfigurationPath`, `UnknownConfigurationFileTypeError.constructor`, `ConfigurationService.loadConfigurationModule`, `ConfigurationService.map(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/configuration/configuration.service.ts:243` |
395
407
  | `assertNoCollisions` | 3 | `findDuplicates`, `findUnusableNames`, `findReservedNames` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/configuration/configuration.utilities.ts:28` |
396
408
  | `findReservedNames` | 3 | `map(โ€ฆ)`, `filter(โ€ฆ)`, `map(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/configuration/configuration.utilities.ts:97` |
@@ -398,17 +410,20 @@ What this project is judged against, as declared in its own `callidescope.config
398
410
  | `InputOptionsService.collectOneInput` | 3 | `InputOptionsService.readOptionName`, `InputOptionsService.resolvePropertyName`, `InputOptionsService.readOptionValue` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/input/input-options.service.ts:38` |
399
411
  | `InputSchemaService.validateValue` | 3 | `InputSchemaService.validateEnum`, `InputSchemaService.validateLength`, `InputSchemaService.validatePattern` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/input/input-schema.service.ts:158` |
400
412
  | `RenderingService.assertEverySubstitutionSupplied` | 3 | `RenderingService.filter(โ€ฆ)`, `RenderingService.collectInterpolatedNames`, `MissingSubstitutionError.constructor` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/rendering/rendering.service.ts:35` |
401
- | `InstanceDiscoveryMatchingService.matchTemplates` | 3 | `InstanceDiscoveryMatchingService.toSorted(โ€ฆ)`, `InstanceDiscoveryMatchingService.filter(โ€ฆ)`, `InstanceDiscoveryMatchingService.map(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery-matching.service.ts:154` |
402
- | `InstanceDiscoveryService.weighInstance` | 3 | `InstanceDiscoveryService.map(โ€ฆ)`, `InstanceDiscoveryMatchingService.matchTemplates`, `InstanceDiscoveryMatchingService.buildSubstitutions` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:56` |
403
- | `InstanceDiscoveryService.map(โ€ฆ)` | 3 | `InstanceDiscoveryService.filter(โ€ฆ)`, `InstanceDiscoveryService.map(โ€ฆ)`, `InstanceDiscoveryService.filter(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:118` |
413
+ | `InstanceDiscoveryMatchingService.matchTemplates` | 3 | `InstanceDiscoveryMatchingService.toSorted(โ€ฆ)`, `InstanceDiscoveryMatchingService.filter(โ€ฆ)`, `InstanceDiscoveryMatchingService.map(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery-matching.service.ts:180` |
414
+ | `InstanceDiscoveryService.readInventoryGlobs` | 3 | `InstanceDiscoveryService.flatMap(โ€ฆ)`, `InstanceDiscoveryService.flatMap(โ€ฆ)`, `InstanceDiscoveryService.flatMap(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:62` |
415
+ | `InstanceDiscoveryService.weighInstance` | 3 | `InstanceDiscoveryService.map(โ€ฆ)`, `InstanceDiscoveryMatchingService.matchTemplates`, `InstanceDiscoveryMatchingService.buildSubstitutions` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:84` |
416
+ | `InstanceDiscoveryService.map(โ€ฆ)` | 3 | `InstanceDiscoveryService.filter(โ€ฆ)`, `InstanceDiscoveryService.map(โ€ฆ)`, `InstanceDiscoveryService.filter(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:146` |
404
417
  | `findDuplicates` | 2 | `map(โ€ฆ)`, `filter(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/configuration/configuration.utilities.ts:62` |
405
418
  | `InputSchemaService.readEnumValues` | 2 | `InputSchemaService.readSchemaProperty`, `InputSchemaService.filter(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/input/input-schema.service.ts:123` |
406
419
  | `InputPromptingService.assertCanPrompt` | 2 | `InputPromptingService.isAtTerminal`, `missingInputError` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/input/input-prompting.service.ts:50` |
407
420
  | `InputPromptingService.promptForTemplates` | 2 | `InputPromptingService.map(โ€ฆ)`, `InputPromptingService.filter(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/input/input-prompting.service.ts:144` |
408
421
  | `InputService.parseCommaDelimitedOption` | 2 | `InputService.filter(โ€ฆ)`, `InputService.map(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/input/input.service.ts:118` |
409
422
  | `InputService.resolveGeneratorInputs` | 2 | `InputOptionsService.collectGeneratorInputs`, `InputService.resolveInputs` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/input/input.service.ts:180` |
410
- | `TemplateDiscoveryService.prepareDocument` | 2 | `TemplateDiscoveryService.resolveInstanceFilePath`, `RenderingService.renderContent` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/template-discovery/template-discovery.service.ts:153` |
411
- | `InstanceDiscoveryService.flatMap(โ€ฆ)` | 2 | `InstanceDiscoveryService.flatMap(โ€ฆ)`, `InstanceDiscoveryService.readWorkspaceGroups` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:265` |
423
+ | `TemplateDiscoveryService.collectTemplate` | 2 | `TemplateDiscoveryService.collectFilePaths`, `TemplateDiscoveryService.collectPlaceholderNames` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/template-discovery/template-discovery.service.ts:97` |
424
+ | `TemplateDiscoveryService.prepareDocument` | 2 | `TemplateDiscoveryService.resolveInstanceFilePath`, `RenderingService.renderContent` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/template-discovery/template-discovery.service.ts:178` |
425
+ | `InstanceDiscoveryMatchingService.fillPlaceholders` | 2 | `InstanceDiscoveryMatchingService.map(โ€ฆ)`, `InstanceDiscoveryMatchingService.filter(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery-matching.service.ts:73` |
426
+ | `InstanceDiscoveryMatchingService.map(โ€ฆ)` | 2 | `InstanceDiscoveryMatchingService.fillPlaceholders`, `TemplateDiscoveryService.countMatchingFiles` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery-matching.service.ts:186` |
412
427
  | `missingInputError` | 1 | `InputError.constructor` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/input/input.constants.ts:65` |
413
428
  | `InputOptionsService.resolvePropertyName` | 1 | `InputOptionsService.find(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/input/input-options.service.ts:104` |
414
429
  | `InputOptionsService.collectGeneratorInputs` | 1 | `InputOptionsService.collectOneInput` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/input/input-options.service.ts:124` |
@@ -425,35 +440,41 @@ What this project is judged against, as declared in its own `callidescope.config
425
440
  | `InputService.parseThresholdOption` | 1 | `InputService.parseOptionalOption` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/input/input.service.ts:161` |
426
441
  | `InputService.resolveInputsFromValues` | 1 | `InputService.resolveInputs` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/input/input.service.ts:195` |
427
442
  | `MissingSubstitutionError.constructor` | 1 | `MissingSubstitutionError.map(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/rendering/rendering.constants.ts:31` |
428
- | `RenderingService.collectInterpolatedNames` | 1 | `RenderingService.walk` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/rendering/rendering.service.ts:61` |
443
+ | `RenderingService.collectInterpolatedNames` | 1 | `RenderingService.walk` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/rendering/rendering.service.ts:80` |
429
444
  | `RenderingService.renderContent` | 1 | `RenderingService.assertEverySubstitutionSupplied` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/rendering/rendering.service.ts:115` |
430
445
  | `RenderingService.renderPath` | 1 | `RenderingService.assertEverySubstitutionSupplied` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/rendering/rendering.service.ts:142` |
431
- | `TemplateDiscoveryService.collectTemplate` | 1 | `TemplateDiscoveryService.collectFilePaths` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/template-discovery/template-discovery.service.ts:78` |
432
- | `TemplateDiscoveryService.collectTemplates` | 1 | `TemplateDiscoveryService.map(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/template-discovery/template-discovery.service.ts:98` |
433
- | `TemplateDiscoveryService.map(โ€ฆ)` | 1 | `TemplateDiscoveryService.collectTemplate` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/template-discovery/template-discovery.service.ts:102` |
434
- | `TemplateDiscoveryService.countMatchingFiles` | 1 | `TemplateDiscoveryService.filter(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/template-discovery/template-discovery.service.ts:121` |
435
- | `TemplateDiscoveryService.filter(โ€ฆ)` | 1 | `TemplateDiscoveryService.resolveInstanceFilePath` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/template-discovery/template-discovery.service.ts:130` |
436
- | `TemplateDiscoveryService.resolveInstanceFilePath` | 1 | `RenderingService.renderPath` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/template-discovery/template-discovery.service.ts:179` |
437
- | `InstanceDiscoveryLocatingService.resolveGlobSuffix` | 1 | `InstanceDiscoveryLocatingService.map(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery-locating.service.ts:73` |
438
- | `InstanceDiscoveryLocatingService.map(โ€ฆ)` | 1 | `InstanceDiscoveryLocatingService.deriveLocationSubstitutions` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery-locating.service.ts:162` |
439
- | `InstanceDiscoveryMatchingService.buildSubstitutions` | 1 | `RenderingService.buildNameSubstitutions` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery-matching.service.ts:72` |
440
- | `InstanceDiscoveryMatchingService.map(โ€ฆ)` | 1 | `TemplateDiscoveryService.countMatchingFiles` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery-matching.service.ts:160` |
441
- | `InstanceDiscoveryMatchingService.toSorted(โ€ฆ)` | 1 | `InstanceDiscoveryMatchingService.compareMatches` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery-matching.service.ts:180` |
442
- | `InstanceDiscoveryService.buildSubstitutions` | 1 | `InstanceDiscoveryMatchingService.buildSubstitutions` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:83` |
443
- | `InstanceDiscoveryService.findInstances` | 1 | `InstanceDiscoveryLocatingService.findInstances` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:90` |
444
- | `InstanceDiscoveryService.matchInstances` | 1 | `InstanceDiscoveryMatchingService.matchInstances` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:95` |
445
- | `InstanceDiscoveryService.matchTemplates` | 1 | `InstanceDiscoveryMatchingService.matchTemplates` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:103` |
446
- | `InstanceDiscoveryService.prepareDocuments` | 1 | `InstanceDiscoveryService.map(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:113` |
447
- | `InstanceDiscoveryService.map(โ€ฆ)` | 1 | `TemplateDiscoveryService.prepareDocument` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:124` |
448
- | `InstanceDiscoveryService.readWorkspaceGroups` | 1 | `InstanceDiscoveryService.filter(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:158` |
449
- | `InstanceDiscoveryService.filter(โ€ฆ)` | 1 | `InstanceGroupService.isProjectScoped` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:161` |
450
- | `InstanceDiscoveryService.resolveInstanceFiles` | 1 | `InstanceDiscoveryService.flatMap(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:167` |
451
- | `InstanceDiscoveryService.flatMap(โ€ฆ)` | 1 | `InstanceDiscoveryService.map(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:168` |
452
- | `InstanceDiscoveryService.map(โ€ฆ)` | 1 | `TemplateDiscoveryService.resolveInstanceFilePath` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:169` |
453
- | `InstanceDiscoveryService.map(โ€ฆ)` | 1 | `InstanceDiscoveryService.filter(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:200` |
454
- | `InstanceDiscoveryService.map(โ€ฆ)` | 1 | `InstanceDiscoveryService.flatMap(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:228` |
455
- | `InstanceDiscoveryService.flatMap(โ€ฆ)` | 1 | `InstanceDiscoveryService.find(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:229` |
456
- | `InstanceDiscoveryService.map(โ€ฆ)` | 1 | `InstanceDiscoveryService.weighInstance` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:277` |
446
+ | `TemplateDiscoveryService.collectPlaceholderNames` | 1 | `TemplateDiscoveryService.flatMap(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/template-discovery/template-discovery.service.ts:71` |
447
+ | `TemplateDiscoveryService.flatMap(โ€ฆ)` | 1 | `TemplateDiscoveryService.flatMap(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/template-discovery/template-discovery.service.ts:77` |
448
+ | `TemplateDiscoveryService.flatMap(โ€ฆ)` | 1 | `RenderingService.collectInterpolatedNames` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/template-discovery/template-discovery.service.ts:81` |
449
+ | `TemplateDiscoveryService.collectTemplates` | 1 | `TemplateDiscoveryService.map(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/template-discovery/template-discovery.service.ts:123` |
450
+ | `TemplateDiscoveryService.map(โ€ฆ)` | 1 | `TemplateDiscoveryService.collectTemplate` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/template-discovery/template-discovery.service.ts:127` |
451
+ | `TemplateDiscoveryService.countMatchingFiles` | 1 | `TemplateDiscoveryService.filter(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/template-discovery/template-discovery.service.ts:146` |
452
+ | `TemplateDiscoveryService.filter(โ€ฆ)` | 1 | `TemplateDiscoveryService.resolveInstanceFilePath` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/template-discovery/template-discovery.service.ts:155` |
453
+ | `TemplateDiscoveryService.resolveInstanceFilePath` | 1 | `RenderingService.renderPath` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/template-discovery/template-discovery.service.ts:204` |
454
+ | `InstanceDiscoveryLocatingService.globEntries` | 1 | `InstanceDiscoveryLocatingService.filter(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery-locating.service.ts:66` |
455
+ | `InstanceDiscoveryLocatingService.filter(โ€ฆ)` | 1 | `InstanceDiscoveryLocatingService.isExcluded` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery-locating.service.ts:76` |
456
+ | `InstanceDiscoveryLocatingService.isExcluded` | 1 | `InstanceDiscoveryLocatingService.some(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery-locating.service.ts:85` |
457
+ | `InstanceDiscoveryLocatingService.resolveGlobSuffix` | 1 | `InstanceDiscoveryLocatingService.map(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery-locating.service.ts:108` |
458
+ | `InstanceDiscoveryLocatingService.map(โ€ฆ)` | 1 | `InstanceDiscoveryLocatingService.deriveLocationSubstitutions` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery-locating.service.ts:195` |
459
+ | `InstanceDiscoveryMatchingService.map(โ€ฆ)` | 1 | `createPlaceholderValue` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery-matching.service.ts:80` |
460
+ | `InstanceDiscoveryMatchingService.buildSubstitutions` | 1 | `RenderingService.buildNameSubstitutions` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery-matching.service.ts:97` |
461
+ | `InstanceDiscoveryMatchingService.toSorted(โ€ฆ)` | 1 | `InstanceDiscoveryMatchingService.compareMatches` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery-matching.service.ts:211` |
462
+ | `InstanceDiscoveryService.flatMap(โ€ฆ)` | 1 | `InstanceDiscoveryService.readWorkspaceGroups` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:72` |
463
+ | `InstanceDiscoveryService.buildSubstitutions` | 1 | `InstanceDiscoveryMatchingService.buildSubstitutions` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:111` |
464
+ | `InstanceDiscoveryService.findInstances` | 1 | `InstanceDiscoveryLocatingService.findInstances` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:118` |
465
+ | `InstanceDiscoveryService.matchInstances` | 1 | `InstanceDiscoveryMatchingService.matchInstances` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:123` |
466
+ | `InstanceDiscoveryService.matchTemplates` | 1 | `InstanceDiscoveryMatchingService.matchTemplates` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:131` |
467
+ | `InstanceDiscoveryService.prepareDocuments` | 1 | `InstanceDiscoveryService.map(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:141` |
468
+ | `InstanceDiscoveryService.map(โ€ฆ)` | 1 | `TemplateDiscoveryService.prepareDocument` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:152` |
469
+ | `InstanceDiscoveryService.readWorkspaceGroups` | 1 | `InstanceDiscoveryService.filter(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:186` |
470
+ | `InstanceDiscoveryService.filter(โ€ฆ)` | 1 | `InstanceGroupService.isProjectScoped` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:189` |
471
+ | `InstanceDiscoveryService.resolveInstanceFiles` | 1 | `InstanceDiscoveryService.flatMap(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:195` |
472
+ | `InstanceDiscoveryService.flatMap(โ€ฆ)` | 1 | `InstanceDiscoveryService.map(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:196` |
473
+ | `InstanceDiscoveryService.map(โ€ฆ)` | 1 | `TemplateDiscoveryService.resolveInstanceFilePath` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:197` |
474
+ | `InstanceDiscoveryService.map(โ€ฆ)` | 1 | `InstanceDiscoveryService.filter(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:228` |
475
+ | `InstanceDiscoveryService.map(โ€ฆ)` | 1 | `InstanceDiscoveryService.flatMap(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:256` |
476
+ | `InstanceDiscoveryService.flatMap(โ€ฆ)` | 1 | `InstanceDiscoveryService.find(โ€ฆ)` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:257` |
477
+ | `InstanceDiscoveryService.map(โ€ฆ)` | 1 | `InstanceDiscoveryService.weighInstance` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:295` |
457
478
  | `ConfigurationService.loadConfigurationModule` | 1 | `ConfigurationService.loadJsonConfiguration` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/configuration/configuration.service.ts:135` |
458
479
  | `ConfigurationService.resolveConfigurationPath` | 1 | `ConfigurationService.findWorkspaceRoot` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/configuration/configuration.service.ts:174` |
459
480
  | `ConfigurationService.buildNameSubstitutions` | 1 | `RenderingService.buildNameSubstitutions` | `packages/ic-suite/conformetry/conformetry-configuration/src/modules/configuration/configuration.service.ts:202` |
@@ -583,6 +604,8 @@ graph LR
583
604
  file_src_modules_rendering_rendering_service_ts["src/modules/rendering/rendering.service.ts"]
584
605
  file_src_modules_rendering_rendering_service_unit_test_ts["src/modules/rendering/rendering.service.unit.test.ts"]
585
606
  file_src_modules_rendering_rendering_types_ts["src/modules/rendering/rendering.types.ts"]
607
+ file_src_modules_rendering_rendering_utilities_ts["src/modules/rendering/rendering.utilities.ts"]
608
+ file_src_modules_rendering_rendering_utilities_unit_test_ts["src/modules/rendering/rendering.utilities.unit.test.ts"]
586
609
  file_src_modules_template_discovery_template_discovery_constants_ts["src/modules/template-discovery/template-discovery.constants.ts"]
587
610
  file_src_modules_template_discovery_template_discovery_module_ts["src/modules/template-discovery/template-discovery.module.ts"]
588
611
  file_src_modules_template_discovery_template_discovery_service_ts["src/modules/template-discovery/template-discovery.service.ts"]
@@ -658,6 +681,7 @@ graph LR
658
681
  file_src_modules_instance_discovery_instance_discovery_matching_service_ts --> file_src_modules_instance_discovery_instance_discovery_types_ts
659
682
  file_src_modules_instance_discovery_instance_discovery_matching_service_ts --> file_src_modules_rendering_rendering_service_ts
660
683
  file_src_modules_instance_discovery_instance_discovery_matching_service_ts --> file_src_modules_rendering_rendering_types_ts
684
+ file_src_modules_instance_discovery_instance_discovery_matching_service_ts --> file_src_modules_rendering_rendering_utilities_ts
661
685
  file_src_modules_instance_discovery_instance_discovery_matching_service_ts --> file_src_modules_template_discovery_template_discovery_service_ts
662
686
  file_src_modules_instance_discovery_instance_discovery_matching_service_ts --> file_src_modules_template_discovery_template_discovery_types_ts
663
687
  file_src_modules_instance_discovery_instance_discovery_matching_service_unit_test_ts --> file_src_modules_instance_discovery_instance_discovery_matching_service_ts
@@ -692,6 +716,8 @@ graph LR
692
716
  file_src_modules_rendering_rendering_service_ts --> file_src_modules_rendering_rendering_types_ts
693
717
  file_src_modules_rendering_rendering_service_unit_test_ts --> file_src_modules_rendering_rendering_constants_ts
694
718
  file_src_modules_rendering_rendering_service_unit_test_ts --> file_src_modules_rendering_rendering_service_ts
719
+ file_src_modules_rendering_rendering_utilities_ts --> file_src_modules_rendering_rendering_constants_ts
720
+ file_src_modules_rendering_rendering_utilities_unit_test_ts --> file_src_modules_rendering_rendering_utilities_ts
695
721
  file_src_modules_template_discovery_template_discovery_module_ts --> file_src_modules_rendering_rendering_module_ts
696
722
  file_src_modules_template_discovery_template_discovery_module_ts --> file_src_modules_template_discovery_template_discovery_service_ts
697
723
  file_src_modules_template_discovery_template_discovery_service_ts --> file_src_modules_configuration_configuration_types_ts
@@ -710,40 +736,40 @@ graph LR
710
736
 
711
737
  ### Project
712
738
 
713
- ![Lines of Code](https://img.shields.io/badge/Lines_of_Code-6347-22c55e?style=flat-square)
714
- ![Repository Size](https://img.shields.io/badge/Repository_Size-216.59_kB-6b7280?style=flat-square)
739
+ ![Lines of Code](https://img.shields.io/badge/Lines_of_Code-6684-22c55e?style=flat-square)
740
+ ![Repository Size](https://img.shields.io/badge/Repository_Size-227.96_kB-6b7280?style=flat-square)
715
741
  ![Folders](https://img.shields.io/badge/Folders-9-4a4a4a?style=flat-square)
716
- ![Source Files](https://img.shields.io/badge/Source_Files-52-3178c6?style=flat-square)
742
+ ![Source Files](https://img.shields.io/badge/Source_Files-54-3178c6?style=flat-square)
717
743
 
718
744
  ### Measured Targets
719
745
 
720
- ![Compiled JavaScript Size](https://img.shields.io/badge/Compiled_JavaScript_Size-7.47_kB_gzip-6b7280?style=flat-square)
746
+ ![Compiled JavaScript Size](https://img.shields.io/badge/Compiled_JavaScript_Size-8.01_kB_gzip-6b7280?style=flat-square)
721
747
 
722
748
  ### TypeScript
723
749
 
724
- ![TypeScript Files](https://img.shields.io/badge/TypeScript_Files-52-3178c6?style=flat-square)
750
+ ![TypeScript Files](https://img.shields.io/badge/TypeScript_Files-54-3178c6?style=flat-square)
725
751
  ![Interfaces](https://img.shields.io/badge/Interfaces-18-0ea5e9?style=flat-square)
726
752
  ![Generic Declarations](https://img.shields.io/badge/Generic_Declarations-2-0369a1?style=flat-square)
727
753
  ![Enums](https://img.shields.io/badge/Enums-0-f97316?style=flat-square)
728
754
  ![Decorators](https://img.shields.io/badge/Decorators-17-db2777?style=flat-square)
729
- ![Doc Comments](https://img.shields.io/badge/Doc_Comments-173-6366f1?style=flat-square)
755
+ ![Doc Comments](https://img.shields.io/badge/Doc_Comments-188-6366f1?style=flat-square)
730
756
  ![Static Methods](https://img.shields.io/badge/Static_Methods-0-166534?style=flat-square)
731
757
 
732
758
  ### JavaScript
733
759
 
734
760
  ![JavaScript Files](https://img.shields.io/badge/JavaScript_Files-0-f7df1e?style=flat-square)
735
- ![Test Files](https://img.shields.io/badge/Test_Files-13-10b981?style=flat-square)
736
- ![External Packages](https://img.shields.io/badge/External_Packages-16-8b5cf6?style=flat-square)
761
+ ![Test Files](https://img.shields.io/badge/Test_Files-14-10b981?style=flat-square)
762
+ ![External Packages](https://img.shields.io/badge/External_Packages-17-8b5cf6?style=flat-square)
737
763
  ![Classes](https://img.shields.io/badge/Classes-20-7c3aed?style=flat-square)
738
- ![Functions](https://img.shields.io/badge/Functions-339-16a34a?style=flat-square)
739
- ![Methods](https://img.shields.io/badge/Methods-135-15803d?style=flat-square)
740
- ![Sync Functions](https://img.shields.io/badge/Sync_Functions-377-4ade80?style=flat-square)
741
- ![Async Functions](https://img.shields.io/badge/Async_Functions-97-059669?style=flat-square)
742
- ![Constants](https://img.shields.io/badge/Constants-310-dc2626?style=flat-square)
743
- ![Imports](https://img.shields.io/badge/Imports-210-0284c7?style=flat-square)
744
- ![Exported Symbols](https://img.shields.io/badge/Exported_Symbols-62-ea580c?style=flat-square)
745
- ![Comments](https://img.shields.io/badge/Comments-322-64748b?style=flat-square)
746
- ![Comment Lines](https://img.shields.io/badge/Comment_Lines-872-475569?style=flat-square)
764
+ ![Functions](https://img.shields.io/badge/Functions-354-16a34a?style=flat-square)
765
+ ![Methods](https://img.shields.io/badge/Methods-147-15803d?style=flat-square)
766
+ ![Sync Functions](https://img.shields.io/badge/Sync_Functions-403-4ade80?style=flat-square)
767
+ ![Async Functions](https://img.shields.io/badge/Async_Functions-98-059669?style=flat-square)
768
+ ![Constants](https://img.shields.io/badge/Constants-328-dc2626?style=flat-square)
769
+ ![Imports](https://img.shields.io/badge/Imports-216-0284c7?style=flat-square)
770
+ ![Exported Symbols](https://img.shields.io/badge/Exported_Symbols-66-ea580c?style=flat-square)
771
+ ![Comments](https://img.shields.io/badge/Comments-340-64748b?style=flat-square)
772
+ ![Comment Lines](https://img.shields.io/badge/Comment_Lines-924-475569?style=flat-square)
747
773
  ![TODO Comments](https://img.shields.io/badge/TODO_Comments-0-ca8a04?style=flat-square)
748
774
 
749
775
  ### Python
@@ -859,9 +885,9 @@ graph LR
859
885
  ![Command Files](https://img.shields.io/badge/Command_Files-0-16a34a?style=flat-square)
860
886
  ![Constants Files](https://img.shields.io/badge/Constants_Files-6-ea580c?style=flat-square)
861
887
  ![Types Files](https://img.shields.io/badge/Types_Files-6-db2777?style=flat-square)
862
- ![Utilities Files](https://img.shields.io/badge/Utilities_Files-1-0ea5e9?style=flat-square)
888
+ ![Utilities Files](https://img.shields.io/badge/Utilities_Files-2-0ea5e9?style=flat-square)
863
889
  ![TypeORM Entities](https://img.shields.io/badge/TypeORM_Entities-0-059669?style=flat-square)
864
- ![Unit Tests](https://img.shields.io/badge/Unit_Tests-13-ca8a04?style=flat-square)
890
+ ![Unit Tests](https://img.shields.io/badge/Unit_Tests-14-ca8a04?style=flat-square)
865
891
  ![Integration Tests](https://img.shields.io/badge/Integration_Tests-0-7c3aed?style=flat-square)
866
892
  ![End To End Tests](https://img.shields.io/badge/End_To_End_Tests-0-0284c7?style=flat-square)
867
893
  ![CSS Comment Budget](https://img.shields.io/badge/CSS_Comment_Budget-0-16a34a?style=flat-square)
@@ -899,20 +925,20 @@ graph LR
899
925
  ### Markdown
900
926
 
901
927
  ![Markdown Files](https://img.shields.io/badge/Markdown_Files-2-083fa1?style=flat-square)
902
- ![Markdown Lines](https://img.shields.io/badge/Markdown_Lines-231-1f6feb?style=flat-square)
928
+ ![Markdown Lines](https://img.shields.io/badge/Markdown_Lines-247-1f6feb?style=flat-square)
903
929
  ![H1](https://img.shields.io/badge/H1-1-7c3aed?style=flat-square)
904
- ![H2](https://img.shields.io/badge/H2-8-8b5cf6?style=flat-square)
905
- ![H3](https://img.shields.io/badge/H3-14-a78bfa?style=flat-square)
930
+ ![H2](https://img.shields.io/badge/H2-10-8b5cf6?style=flat-square)
931
+ ![H3](https://img.shields.io/badge/H3-17-a78bfa?style=flat-square)
906
932
  ![H4](https://img.shields.io/badge/H4-0-c4b5fd?style=flat-square)
907
933
  ![H5](https://img.shields.io/badge/H5-0-ddd6fe?style=flat-square)
908
934
  ![H6](https://img.shields.io/badge/H6-0-ede9fe?style=flat-square)
909
- ![Paragraphs](https://img.shields.io/badge/Paragraphs-47-64748b?style=flat-square)
910
- ![Lists](https://img.shields.io/badge/Lists-8-16a34a?style=flat-square)
911
- ![List Items](https://img.shields.io/badge/List_Items-27-22c55e?style=flat-square)
935
+ ![Paragraphs](https://img.shields.io/badge/Paragraphs-50-64748b?style=flat-square)
936
+ ![Lists](https://img.shields.io/badge/Lists-11-16a34a?style=flat-square)
937
+ ![List Items](https://img.shields.io/badge/List_Items-30-22c55e?style=flat-square)
912
938
  ![Task List Items](https://img.shields.io/badge/Task_List_Items-0-4ade80?style=flat-square)
913
939
  ![Tables](https://img.shields.io/badge/Tables-2-0284c7?style=flat-square)
914
940
  ![Table Rows](https://img.shields.io/badge/Table_Rows-10-0ea5e9?style=flat-square)
915
- ![Links](https://img.shields.io/badge/Links-10-059669?style=flat-square)
941
+ ![Links](https://img.shields.io/badge/Links-11-059669?style=flat-square)
916
942
  ![Images](https://img.shields.io/badge/Images-0-10b981?style=flat-square)
917
943
  ![Code Blocks](https://img.shields.io/badge/Code_Blocks-11-dc2626?style=flat-square)
918
944
  ![Inline Code](https://img.shields.io/badge/Inline_Code-73-ef4444?style=flat-square)
@@ -15,6 +15,20 @@ import { PreparedValidationDocument } from '@conformetry/core';
15
15
  */
16
16
  export declare const ALL_TEMPLATES_SELECTION = "all";
17
17
 
18
+ /**
19
+ * Reads what each placeholder value in `templateText` stands for in
20
+ * `instanceText`.
21
+ *
22
+ * The template text is a pattern: its literal parts must match exactly and
23
+ * each placeholder value captures a non-empty run of text. Returns `undefined`
24
+ * when the template text holds no placeholder value or the instance text does
25
+ * not fit the pattern, so a caller keeps its own equality check as it was.
26
+ */
27
+ export declare function capturePlaceholderValues(args: {
28
+ instanceText: string;
29
+ templateText: string;
30
+ }): Record<string, string> | undefined;
31
+
18
32
  /**
19
33
  * Provides the configuration layer's one public service.
20
34
  *
@@ -182,6 +196,13 @@ export declare type ConformetryGeneratorInputDefinition = Record<string, unknown
182
196
  * `Instance.path`.
183
197
  */
184
198
  export declare interface ConformetryInstanceGroup {
199
+ /**
200
+ * Workspace-relative globs naming paths that are never instances, applied
201
+ * whether or not the group has tags. A directory or file the patterns found
202
+ * is dropped when one of these matches it โ€” how vendored or generated code,
203
+ * such as shadcn components, is left out of validation.
204
+ */
205
+ exclude?: string[] | undefined;
185
206
  /**
186
207
  * Globs locating this group's instances.
187
208
  *
@@ -217,8 +238,22 @@ export declare interface ConformetryInstanceGroup {
217
238
  threshold?: number | undefined;
218
239
  }
219
240
 
241
+ /**
242
+ * Creates a random stand-in for a placeholder nothing supplied.
243
+ *
244
+ * Validation renders it in place of the missing value, so the comparison can
245
+ * find where the instance holds the real one and capture it.
246
+ */
247
+ export declare function createPlaceholderValue(): string;
248
+
220
249
  /** Arguments for expanding instance globs into instances. */
221
250
  export declare interface FindInstancesArguments {
251
+ /**
252
+ * Globs, relative to the working directory, naming paths that are never
253
+ * instances: a directory or file a pattern found is dropped when one of
254
+ * these matches it.
255
+ */
256
+ readonly exclude?: string[] | undefined;
222
257
  /** Glob patterns, resolved against the working directory. */
223
258
  readonly patterns: string[];
224
259
  /**
@@ -514,6 +549,10 @@ declare class InstanceDiscoveryLocatingService {
514
549
  * projects deeper needs.
515
550
  */
516
551
  private deriveLocationSubstitutions;
552
+ /** Expands one pattern, leaving out every path an exclude glob matches. */
553
+ private globEntries;
554
+ /** Whether an exclude glob matches a found path, workspace-relative. */
555
+ private isExcluded;
517
556
  /**
518
557
  * Returns the literal filename suffix a pattern ends with, such as
519
558
  * `.service.ts` for `**\/*.service.ts`, or `""` when the pattern's last
@@ -568,6 +607,15 @@ declare class InstanceDiscoveryMatchingService {
568
607
  * deterministic.
569
608
  */
570
609
  private compareMatches;
610
+ /**
611
+ * Gives every placeholder the substitutions leave out a random stand-in.
612
+ *
613
+ * Only validation matches instances, and there a missing value is something
614
+ * to infer from the instance rather than an error: generation renders
615
+ * without this and still refuses a placeholder nobody supplied. `name` and its
616
+ * variants are always supplied, so they are never stood in for.
617
+ */
618
+ private fillPlaceholders;
571
619
  /**
572
620
  * Builds the substitutions an instance's template is rendered with.
573
621
  *
@@ -623,6 +671,14 @@ declare class InstanceDiscoveryService {
623
671
  private readonly instanceGroupService;
624
672
  private readonly templateDiscoveryService;
625
673
  constructor(instanceDiscoveryLocatingService: InstanceDiscoveryLocatingService, instanceDiscoveryMatchingService: InstanceDiscoveryMatchingService, instanceGroupService: InstanceGroupService, templateDiscoveryService: TemplateDiscoveryService);
674
+ /**
675
+ * The globs an inventory expands: the configured groups' patterns and
676
+ * exclusions, or an explicit pattern list replacing both.
677
+ *
678
+ * One expansion rather than one per group, so an instance two groups locate
679
+ * is listed once; every group's exclusions therefore apply to all of them.
680
+ */
681
+ private readInventoryGlobs;
626
682
  /** Weighs one instance against every template, best fit first. */
627
683
  private weighInstance;
628
684
  /** Builds the substitutions an instance's template is rendered with. */
@@ -740,6 +796,13 @@ export declare interface MatchedInstance {
740
796
  readonly instance: Instance;
741
797
  /** How many of the template's files the instance already has. */
742
798
  readonly matchedFileCount: number;
799
+ /**
800
+ * The random stand-in rendered for each placeholder nothing supplied, keyed
801
+ * by placeholder. Validation replaces each with the text the instance holds
802
+ * there. Absent or empty when every placeholder was supplied.
803
+ */
804
+ readonly placeholderValues?: Substitutions;
805
+ /** Every value the template renders with, stand-ins included. */
743
806
  readonly substitutions: Substitutions;
744
807
  readonly template: TemplateDefinition;
745
808
  }
@@ -796,6 +859,13 @@ declare class RenderingService {
796
859
  constructor();
797
860
  /** Refuses to render a template asking for a value nobody supplied. */
798
861
  private assertEverySubstitutionSupplied;
862
+ /**
863
+ * Derives the case variants every template can reference from one name.
864
+ *
865
+ * Callers merge their own inputs over this result, so an explicit input of
866
+ * the same key always wins over the derived variant.
867
+ */
868
+ buildNameSubstitutions(name: string): Substitutions;
799
869
  /**
800
870
  * Every placeholder a template interpolates, deduplicated.
801
871
  *
@@ -805,14 +875,7 @@ declare class RenderingService {
805
875
  * `{{^field}}` are conditionals, so absence is an answer there โ€” as is the
806
876
  * implicit iterator `{{.}}`, which names no field.
807
877
  */
808
- private collectInterpolatedNames;
809
- /**
810
- * Derives the case variants every template can reference from one name.
811
- *
812
- * Callers merge their own inputs over this result, so an explicit input of
813
- * the same key always wins over the derived variant.
814
- */
815
- buildNameSubstitutions(name: string): Substitutions;
878
+ collectInterpolatedNames(template: string): string[];
816
879
  /**
817
880
  * Renders template contents with mustache.
818
881
  *
@@ -912,6 +975,12 @@ export declare interface TemplateDefinition {
912
975
  readonly filePaths: string[];
913
976
  /** The template's directory name, used to identify it. */
914
977
  readonly name: string;
978
+ /**
979
+ * Every placeholder the template's files and file paths interpolate. Read
980
+ * once here so validation knows which ones nothing supplied without
981
+ * reading the template again per instance. Absent means none.
982
+ */
983
+ readonly placeholderNames?: string[];
915
984
  /**
916
985
  * Lowest conformance score an instance of this template may have, from the
917
986
  * generator that owns it. Undefined when the generator sets none.
@@ -937,6 +1006,8 @@ declare class TemplateDiscoveryService {
937
1006
  constructor(renderingService: RenderingService);
938
1007
  /** Lists every file under a directory, recursively and sorted. */
939
1008
  private collectFilePaths;
1009
+ /** Every placeholder a template's file contents and paths interpolate. */
1010
+ private collectPlaceholderNames;
940
1011
  /**
941
1012
  * Reads one template folder.
942
1013
  *
@@ -1006,6 +1077,10 @@ export declare interface TemplateMatch {
1006
1077
  readonly matchedFileCount: number;
1007
1078
  /** Share of the template's files the instance already has, 0 to 1. */
1008
1079
  readonly matchRatio: number;
1080
+ /** The stand-ins this template needed โ€” see `MatchedInstance`. */
1081
+ readonly placeholderValues: Substitutions;
1082
+ /** The instance's substitutions with those stand-ins added. */
1083
+ readonly substitutions: Substitutions;
1009
1084
  readonly template: TemplateDefinition;
1010
1085
  }
1011
1086
 
package/dist/src/index.js CHANGED
@@ -5,7 +5,8 @@ import i from "lodash";
5
5
  import a from "prompts";
6
6
  import o from "mustache";
7
7
  import s, { existsSync as c } from "node:fs";
8
- import { access as l, readFile as u } from "node:fs/promises";
8
+ import { randomUUID as l } from "node:crypto";
9
+ import { access as u, readFile as ee } from "node:fs/promises";
9
10
  import { fileURLToPath as d } from "node:url";
10
11
  import { createJiti as f } from "jiti";
11
12
  import { parse as p } from "jsonc-parser";
@@ -38,8 +39,8 @@ function y(e, t) {
38
39
  describe: (e, t) => `${e} is the template of more than one generator: ${t.join(", ")}. Validation cannot tell which one a matching instance belongs to.`,
39
40
  keysOf: (e) => [e.templatePath]
40
41
  }),
41
- ...S(e),
42
- ...x(e)
42
+ ...x(e),
43
+ ...te(e)
43
44
  ];
44
45
  for (let e of n) t.addIssue({
45
46
  code: "custom",
@@ -61,7 +62,7 @@ function b(e) {
61
62
  path: [n.lastIndex]
62
63
  }));
63
64
  }
64
- function x(e) {
65
+ function te(e) {
65
66
  return e.map((e, t) => ({
66
67
  index: t,
67
68
  name: e.name
@@ -70,7 +71,7 @@ function x(e) {
70
71
  path: [e]
71
72
  }));
72
73
  }
73
- function S(e) {
74
+ function x(e) {
74
75
  return e.map((e, t) => ({
75
76
  index: t,
76
77
  name: e.name
@@ -81,11 +82,11 @@ function S(e) {
81
82
  }
82
83
  //#endregion
83
84
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/configuration/configuration.constants.ts
84
- var C = class extends Error {
85
+ var S = class extends Error {
85
86
  constructor(e) {
86
87
  super(`Unsupported configuration file type: ${e}`), this.name = "UnknownConfigurationFileTypeError";
87
88
  }
88
- }, w = "pnpm-workspace.yaml", T = /* @__PURE__ */ new Set([
89
+ }, C = "pnpm-workspace.yaml", w = /* @__PURE__ */ new Set([
89
90
  ".cjs",
90
91
  ".cts",
91
92
  ".js",
@@ -94,17 +95,18 @@ var C = class extends Error {
94
95
  ".mjs",
95
96
  ".mts",
96
97
  ".ts"
97
- ]), E = e.lazy(() => e.union([
98
+ ]), T = e.lazy(() => e.union([
98
99
  e.string(),
99
100
  e.number(),
100
101
  e.boolean(),
101
102
  e.null(),
102
- e.array(E),
103
- e.record(e.string(), E)
104
- ])), D = e.array(e.strictObject({
103
+ e.array(T),
104
+ e.record(e.string(), T)
105
+ ])), E = e.array(e.strictObject({
105
106
  description: e.string().optional(),
106
- inputs: e.record(e.string(), e.record(e.string(), E)).optional(),
107
+ inputs: e.record(e.string(), e.record(e.string(), T)).optional(),
107
108
  instances: e.array(e.object({
109
+ exclude: e.array(e.string()).optional(),
108
110
  patterns: e.array(e.string()).optional(),
109
111
  substitutions: e.record(e.string(), e.string()).optional(),
110
112
  tags: e.array(e.string()).optional(),
@@ -116,12 +118,12 @@ var C = class extends Error {
116
118
  })).superRefine(y);
117
119
  //#endregion
118
120
  //#region \0@oxc-project+runtime@0.151.0/helpers/esm/decorateMetadata.js
119
- function O(e, t) {
121
+ function D(e, t) {
120
122
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(e, t);
121
123
  }
122
124
  //#endregion
123
125
  //#region \0@oxc-project+runtime@0.151.0/helpers/esm/decorate.js
124
- function k(e, t, n, r) {
126
+ function O(e, t, n, r) {
125
127
  var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
126
128
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
127
129
  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);
@@ -129,7 +131,7 @@ function k(e, t, n, r) {
129
131
  }
130
132
  //#endregion
131
133
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/input/input-options.service.ts
132
- var A = class {
134
+ var k = class {
133
135
  constructor() {}
134
136
  collectOneInput(e) {
135
137
  let t = e.commandArguments[e.argumentIndex];
@@ -183,10 +185,10 @@ var A = class {
183
185
  return t.join(e.defaultGeneratedOutputDirectory ?? "generated", e.generatorName);
184
186
  }
185
187
  };
186
- A = k([n(), O("design:paramtypes", [])], A);
188
+ k = O([n(), D("design:paramtypes", [])], k);
187
189
  //#endregion
188
190
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/input/input-schema.service.ts
189
- var j = class {
191
+ var A = class {
190
192
  constructor() {}
191
193
  readSchemaProperty(e, t) {
192
194
  if (typeof e == "object" && e) return Object.entries(e).find(([e]) => e === t)?.[1];
@@ -241,10 +243,10 @@ var j = class {
241
243
  }) : r;
242
244
  }
243
245
  };
244
- j = k([n(), O("design:paramtypes", [])], j);
246
+ A = O([n(), D("design:paramtypes", [])], A);
245
247
  //#endregion
246
248
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/input/input-prompting.service.ts
247
- var M = class {
249
+ var j = class {
248
250
  inputSchemaService;
249
251
  constructor(e) {
250
252
  this.inputSchemaService = e;
@@ -307,10 +309,10 @@ var M = class {
307
309
  return n.length === 0 ? void 0 : n;
308
310
  }
309
311
  };
310
- M = k([n(), O("design:paramtypes", [j === void 0 ? Object : j])], M);
312
+ j = O([n(), D("design:paramtypes", [A === void 0 ? Object : A])], j);
311
313
  //#endregion
312
314
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/input/input.service.ts
313
- var N = class {
315
+ var M = class {
314
316
  inputOptionsService;
315
317
  inputPromptingService;
316
318
  inputSchemaService;
@@ -391,72 +393,63 @@ var N = class {
391
393
  });
392
394
  }
393
395
  };
394
- N = k([n(), O("design:paramtypes", [
395
- A === void 0 ? Object : A,
396
- M === void 0 ? Object : M,
397
- j === void 0 ? Object : j
398
- ])], N);
396
+ M = O([n(), D("design:paramtypes", [
397
+ k === void 0 ? Object : k,
398
+ j === void 0 ? Object : j,
399
+ A === void 0 ? Object : A
400
+ ])], M);
399
401
  //#endregion
400
402
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/input/input.module.ts
401
- var P = class {};
402
- P = k([r({
403
+ var N = class {};
404
+ N = O([r({
403
405
  controllers: [],
404
406
  exports: [
405
- A,
406
- M,
407
- N
407
+ k,
408
+ j,
409
+ M
408
410
  ],
409
411
  imports: [],
410
412
  providers: [
411
- A,
412
- M,
413
+ k,
413
414
  j,
414
- N
415
+ A,
416
+ M
415
417
  ]
416
- })], P);
418
+ })], N);
417
419
  //#endregion
418
420
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-group/instance-group.service.ts
419
- var F = class {
421
+ var P = class {
420
422
  constructor() {}
421
423
  isProjectScoped(e) {
422
424
  return e.tags !== void 0 && e.tags.length > 0;
423
425
  }
424
426
  };
425
- F = k([n(), O("design:paramtypes", [])], F);
427
+ P = O([n(), D("design:paramtypes", [])], P);
426
428
  //#endregion
427
429
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-group/instance-group.module.ts
428
- var I = class {};
429
- I = k([r({
430
+ var F = class {};
431
+ F = O([r({
430
432
  controllers: [],
431
- exports: [F],
433
+ exports: [P],
432
434
  imports: [],
433
- providers: [F]
434
- })], I);
435
+ providers: [P]
436
+ })], F);
435
437
  //#endregion
436
438
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/rendering/rendering.constants.ts
437
- var L = { escape: String }, R = class extends Error {
439
+ var I = { escape: String }, L = class extends Error {
438
440
  constructor(e) {
439
441
  let t = e.placeholders.map((e) => `{{${e}}}`).join(", ");
440
442
  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";
441
443
  }
442
- }, z = class {
444
+ }, R = /conformetry[0-9a-f]{32}/g, z = "conformetry", B = class {
443
445
  constructor() {}
444
446
  assertEverySubstitutionSupplied(e) {
445
447
  let t = this.collectInterpolatedNames(e.template).filter((t) => !Object.hasOwn(e.substitutions, t));
446
- if (t.length > 0) throw new R({
448
+ if (t.length > 0) throw new L({
447
449
  placeholders: t,
448
450
  subject: e.subject
449
451
  });
450
452
  }
451
- collectInterpolatedNames(e) {
452
- let t = /* @__PURE__ */ new Set(), n = (e) => {
453
- for (let r of e) {
454
- let e = r[0], i = r[1], a = r[4];
455
- (e === "name" || e === "&") && i !== "." && t.add(i), Array.isArray(a) && n(a);
456
- }
457
- };
458
- return n(o.parse(e)), [...t];
459
- }
460
453
  buildNameSubstitutions(e) {
461
454
  let t = i.camelCase(e);
462
455
  return {
@@ -466,34 +459,43 @@ var L = { escape: String }, R = class extends Error {
466
459
  nameSnakeCase: i.snakeCase(e)
467
460
  };
468
461
  }
462
+ collectInterpolatedNames(e) {
463
+ let t = /* @__PURE__ */ new Set(), n = (e) => {
464
+ for (let r of e) {
465
+ let e = r[0], i = r[1], a = r[4];
466
+ (e === "name" || e === "&") && i !== "." && t.add(i), Array.isArray(a) && n(a);
467
+ }
468
+ };
469
+ return n(o.parse(e)), [...t];
470
+ }
469
471
  renderContent(e) {
470
472
  return this.assertEverySubstitutionSupplied({
471
473
  subject: e.subject ?? "a template file",
472
474
  substitutions: e.substitutions,
473
475
  template: e.templateContent
474
- }), o.render(e.templateContent, e.substitutions, {}, L);
476
+ }), o.render(e.templateContent, e.substitutions, {}, I);
475
477
  }
476
478
  renderPath(e) {
477
479
  return this.assertEverySubstitutionSupplied({
478
480
  subject: e.subject ?? e.templatePath,
479
481
  substitutions: e.substitutions,
480
482
  template: e.templatePath
481
- }), o.render(e.templatePath, e.substitutions, {}, L);
483
+ }), o.render(e.templatePath, e.substitutions, {}, I);
482
484
  }
483
485
  };
484
- z = k([n(), O("design:paramtypes", [])], z);
486
+ B = O([n(), D("design:paramtypes", [])], B);
485
487
  //#endregion
486
488
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/rendering/rendering.module.ts
487
- var B = class {};
488
- B = k([r({
489
+ var V = class {};
490
+ V = O([r({
489
491
  controllers: [],
490
- exports: [z],
492
+ exports: [B],
491
493
  imports: [],
492
- providers: [z]
493
- })], B);
494
+ providers: [B]
495
+ })], V);
494
496
  //#endregion
495
497
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/template-discovery/template-discovery.service.ts
496
- var V = class {
498
+ var H = class {
497
499
  renderingService;
498
500
  constructor(e) {
499
501
  this.renderingService = e;
@@ -510,11 +512,19 @@ var V = class {
510
512
  }
511
513
  return n.toSorted();
512
514
  }
515
+ collectPlaceholderNames(e) {
516
+ return [...new Set(e.filePaths.flatMap((n) => [t.relative(e.directoryPath, n), s.readFileSync(n, "utf8")].flatMap((e) => this.renderingService.collectInterpolatedNames(e))))];
517
+ }
513
518
  collectTemplate(e) {
519
+ let t = this.collectFilePaths(e.templatePath);
514
520
  return {
515
521
  directoryPath: e.templatePath,
516
- filePaths: this.collectFilePaths(e.templatePath),
522
+ filePaths: t,
517
523
  name: e.name,
524
+ placeholderNames: this.collectPlaceholderNames({
525
+ directoryPath: e.templatePath,
526
+ filePaths: t
527
+ }),
518
528
  ...e.threshold === void 0 ? {} : { threshold: e.threshold }
519
529
  };
520
530
  }
@@ -559,42 +569,55 @@ var V = class {
559
569
  }));
560
570
  }
561
571
  };
562
- V = k([n(), O("design:paramtypes", [z === void 0 ? Object : z])], V);
572
+ H = O([n(), D("design:paramtypes", [B === void 0 ? Object : B])], H);
563
573
  //#endregion
564
574
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/template-discovery/template-discovery.module.ts
565
- var H = class {};
566
- H = k([r({
575
+ var U = class {};
576
+ U = O([r({
567
577
  controllers: [],
568
- exports: [V],
569
- imports: [B],
570
- providers: [V]
571
- })], H);
578
+ exports: [H],
579
+ imports: [V],
580
+ providers: [H]
581
+ })], U);
572
582
  //#endregion
573
583
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.constants.ts
574
- var U = /\.[^.]+$/u, W = [
584
+ var W = /\.[^.]+$/u, G = [
575
585
  "*",
576
586
  "?",
577
587
  "]"
578
- ], G = class {
588
+ ], K = class {
579
589
  constructor() {}
580
590
  deriveLocationSubstitutions(e) {
581
591
  let [n = ""] = t.relative(e.workingDirectory, t.join(e.instancePath, e.nameStem)).split(t.sep);
582
592
  return n === "" || n === ".." ? {} : { type: n };
583
593
  }
594
+ globEntries(e) {
595
+ return s.globSync(e.pattern, {
596
+ cwd: e.workingDirectory,
597
+ withFileTypes: !0
598
+ }).filter((n) => !this.isExcluded({
599
+ ...e,
600
+ entryPath: t.join(n.parentPath, n.name)
601
+ }));
602
+ }
603
+ isExcluded(e) {
604
+ let n = t.relative(e.workingDirectory, t.resolve(e.workingDirectory, e.entryPath));
605
+ return (e.exclude ?? []).some((e) => t.matchesGlob(n, e));
606
+ }
584
607
  resolveGlobSuffix(e) {
585
- let n = t.basename(e), r = Math.max(...W.map((e) => n.lastIndexOf(e)));
608
+ let n = t.basename(e), r = Math.max(...G.map((e) => n.lastIndexOf(e)));
586
609
  return r === -1 ? "" : n.slice(r + 1);
587
610
  }
588
611
  resolveNameStem(e) {
589
- return e.isDirectory ? e.entryName : e.suffix !== "" && e.entryName.endsWith(e.suffix) ? e.entryName.slice(0, -e.suffix.length) : e.entryName.replace(U, "");
612
+ return e.isDirectory ? e.entryName : e.suffix !== "" && e.entryName.endsWith(e.suffix) ? e.entryName.slice(0, -e.suffix.length) : e.entryName.replace(W, "");
590
613
  }
591
614
  findInstances(e) {
592
615
  let n = /* @__PURE__ */ new Map();
593
616
  for (let r of e.patterns) {
594
617
  let i = this.resolveGlobSuffix(r);
595
- for (let a of s.globSync(r, {
596
- cwd: e.workingDirectory,
597
- withFileTypes: !0
618
+ for (let a of this.globEntries({
619
+ ...e,
620
+ pattern: r
598
621
  })) {
599
622
  let e = a.isDirectory(), r = t.join(a.parentPath, a.name), o = [
600
623
  a.parentPath,
@@ -632,10 +655,24 @@ var U = /\.[^.]+$/u, W = [
632
655
  });
633
656
  }
634
657
  };
635
- G = k([n(), O("design:paramtypes", [])], G);
658
+ K = O([n(), D("design:paramtypes", [])], K);
659
+ //#endregion
660
+ //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/rendering/rendering.utilities.ts
661
+ function q(e) {
662
+ let t = e.templateText.match(R) ?? [];
663
+ if (t.length === 0) return;
664
+ let n = i.escapeRegExp(e.templateText).replaceAll(R, String.raw`([\s\S]+?)`), r = RegExp(`^${n}$`, "u").exec(e.instanceText);
665
+ if (r === null) return;
666
+ let a = {};
667
+ for (let [e, n] of t.entries()) a[n] ??= r[e + 1] ?? "";
668
+ return a;
669
+ }
670
+ function J() {
671
+ return `${z}${l().replaceAll("-", "")}`;
672
+ }
636
673
  //#endregion
637
674
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery-matching.service.ts
638
- var K = class {
675
+ var Y = class {
639
676
  templateDiscoveryService;
640
677
  renderingService;
641
678
  constructor(e, t) {
@@ -644,6 +681,16 @@ var K = class {
644
681
  compareMatches(e, t) {
645
682
  return e.matchRatio === t.matchRatio ? e.matchedFileCount === t.matchedFileCount ? e.template.name.localeCompare(t.template.name) : t.matchedFileCount - e.matchedFileCount : t.matchRatio - e.matchRatio;
646
683
  }
684
+ fillPlaceholders(e) {
685
+ let t = Object.fromEntries((e.template.placeholderNames ?? []).filter((t) => !Object.hasOwn(e.substitutions, t)).map((e) => [e, J()]));
686
+ return {
687
+ placeholderValues: t,
688
+ substitutions: {
689
+ ...t,
690
+ ...e.substitutions
691
+ }
692
+ };
693
+ }
647
694
  buildSubstitutions(e) {
648
695
  return {
649
696
  ...this.renderingService.buildNameSubstitutions(e.nameStem),
@@ -679,7 +726,8 @@ var K = class {
679
726
  t.push(...s.map((e) => ({
680
727
  instance: r,
681
728
  matchedFileCount: e.matchedFileCount,
682
- substitutions: i,
729
+ placeholderValues: e.placeholderValues,
730
+ substitutions: e.substitutions,
683
731
  template: e.template
684
732
  })));
685
733
  }
@@ -690,24 +738,28 @@ var K = class {
690
738
  }
691
739
  matchTemplates(e) {
692
740
  return e.templates.map((t) => {
693
- let n = this.templateDiscoveryService.countMatchingFiles({
741
+ let n = this.fillPlaceholders({
742
+ substitutions: e.substitutions,
743
+ template: t
744
+ }), r = this.templateDiscoveryService.countMatchingFiles({
694
745
  fileScope: e.instance.fileScope,
695
746
  instancePath: e.instance.path,
696
- substitutions: e.substitutions,
747
+ substitutions: n.substitutions,
697
748
  template: t
698
749
  });
699
750
  return {
700
- matchedFileCount: n,
701
- matchRatio: n / t.filePaths.length,
751
+ ...n,
752
+ matchedFileCount: r,
753
+ matchRatio: r / t.filePaths.length,
702
754
  template: t
703
755
  };
704
756
  }).filter((e) => e.matchedFileCount > 0 && e.matchRatio > 0).toSorted((e, t) => this.compareMatches(e, t));
705
757
  }
706
758
  };
707
- K = k([n(), O("design:paramtypes", [V === void 0 ? Object : V, z === void 0 ? Object : z])], K);
759
+ Y = O([n(), D("design:paramtypes", [H === void 0 ? Object : H, B === void 0 ? Object : B])], Y);
708
760
  //#endregion
709
761
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts
710
- var q = class {
762
+ var X = class {
711
763
  instanceDiscoveryLocatingService;
712
764
  instanceDiscoveryMatchingService;
713
765
  instanceGroupService;
@@ -715,6 +767,18 @@ var q = class {
715
767
  constructor(e, t, n, r) {
716
768
  this.instanceDiscoveryLocatingService = e, this.instanceDiscoveryMatchingService = t, this.instanceGroupService = n, this.templateDiscoveryService = r;
717
769
  }
770
+ readInventoryGlobs(e) {
771
+ if (e.instancePatterns !== void 0) return {
772
+ patterns: e.instancePatterns,
773
+ workingDirectory: e.workingDirectory
774
+ };
775
+ let t = e.configuration.flatMap((e) => this.readWorkspaceGroups(e.instances));
776
+ return {
777
+ exclude: t.flatMap((e) => e.exclude ?? []),
778
+ patterns: t.flatMap((e) => e.patterns ?? []),
779
+ workingDirectory: e.workingDirectory
780
+ };
781
+ }
718
782
  weighInstance(e) {
719
783
  let t = this.instanceDiscoveryMatchingService.matchTemplates({
720
784
  instance: e.instance,
@@ -799,50 +863,47 @@ var q = class {
799
863
  let t = this.templateDiscoveryService.collectTemplates({
800
864
  configuration: e.configuration,
801
865
  workingDirectory: e.workingDirectory
802
- }), n = e.instancePatterns ?? e.configuration.flatMap((e) => this.readWorkspaceGroups(e.instances).flatMap((e) => e.patterns ?? []));
866
+ });
803
867
  return {
804
868
  templates: t,
805
- weighed: this.findInstances({
806
- patterns: n,
807
- workingDirectory: e.workingDirectory
808
- }).map((e) => this.weighInstance({
869
+ weighed: this.findInstances(this.readInventoryGlobs(e)).map((e) => this.weighInstance({
809
870
  instance: e,
810
871
  templates: t
811
872
  }))
812
873
  };
813
874
  }
814
875
  };
815
- q = k([n(), O("design:paramtypes", [
816
- G === void 0 ? Object : G,
876
+ X = O([n(), D("design:paramtypes", [
817
877
  K === void 0 ? Object : K,
818
- F === void 0 ? Object : F,
819
- V === void 0 ? Object : V
820
- ])], q);
878
+ Y === void 0 ? Object : Y,
879
+ P === void 0 ? Object : P,
880
+ H === void 0 ? Object : H
881
+ ])], X);
821
882
  //#endregion
822
883
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.module.ts
823
- var J = class {};
824
- J = k([r({
884
+ var Z = class {};
885
+ Z = O([r({
825
886
  controllers: [],
826
887
  exports: [
827
- G,
828
888
  K,
829
- q,
830
- H
889
+ Y,
890
+ X,
891
+ U
831
892
  ],
832
893
  imports: [
833
- I,
834
- B,
835
- H
894
+ F,
895
+ V,
896
+ U
836
897
  ],
837
898
  providers: [
838
- G,
839
899
  K,
840
- q
900
+ Y,
901
+ X
841
902
  ]
842
- })], J);
903
+ })], Z);
843
904
  //#endregion
844
905
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/configuration/configuration.service.ts
845
- var Y = class {
906
+ var Q = class {
846
907
  inputPromptingService;
847
908
  inputService;
848
909
  instanceDiscoveryService;
@@ -865,7 +926,7 @@ var Y = class {
865
926
  async findWorkspaceRoot() {
866
927
  let e = t.resolve(process.cwd());
867
928
  for (;;) try {
868
- return await l(t.join(e, w)), e;
929
+ return await u(t.join(e, C)), e;
869
930
  } catch {
870
931
  let n = t.dirname(e);
871
932
  if (n === e) return;
@@ -880,7 +941,7 @@ var Y = class {
880
941
  return typeof n == "object" && n ? n : t;
881
942
  }
882
943
  async loadJsonConfiguration(e) {
883
- let t = await u(e.configurationPath, "utf8");
944
+ let t = await ee(e.configurationPath, "utf8");
884
945
  return e.extension === ".jsonc" ? p(t) : JSON.parse(t);
885
946
  }
886
947
  async resolveConfigurationPath(e) {
@@ -911,12 +972,12 @@ var Y = class {
911
972
  }
912
973
  async loadConformetryConfiguration(e) {
913
974
  let n = await this.resolveConfigurationPath(e), r = t.extname(n).toLowerCase();
914
- if (!T.has(r)) throw new C(n);
975
+ if (!w.has(r)) throw new S(n);
915
976
  let i = await this.loadConfigurationModule({
916
977
  configurationPath: n,
917
978
  extension: r
918
979
  });
919
- return D.parse(i).map((e) => this.applyGeneratorDefaults(e));
980
+ return E.parse(i).map((e) => this.applyGeneratorDefaults(e));
920
981
  }
921
982
  matchInstances(e) {
922
983
  return this.instanceDiscoveryService.matchInstances(e);
@@ -961,28 +1022,28 @@ var Y = class {
961
1022
  return this.instanceDiscoveryService.resolveInventoriedTemplates(e);
962
1023
  }
963
1024
  };
964
- Y = k([n(), O("design:paramtypes", [
1025
+ Q = O([n(), D("design:paramtypes", [
1026
+ j === void 0 ? Object : j,
965
1027
  M === void 0 ? Object : M,
966
- N === void 0 ? Object : N,
967
- q === void 0 ? Object : q,
968
- F === void 0 ? Object : F,
969
- z === void 0 ? Object : z,
970
- V === void 0 ? Object : V
971
- ])], Y);
1028
+ X === void 0 ? Object : X,
1029
+ P === void 0 ? Object : P,
1030
+ B === void 0 ? Object : B,
1031
+ H === void 0 ? Object : H
1032
+ ])], Q);
972
1033
  //#endregion
973
1034
  //#region packages/ic-suite/conformetry/conformetry-configuration/src/modules/configuration/configuration.module.ts
974
- var X = class {};
975
- X = k([r({
1035
+ var $ = class {};
1036
+ $ = O([r({
976
1037
  controllers: [],
977
- exports: [Y],
1038
+ exports: [Q],
978
1039
  imports: [
979
- P,
980
- J,
981
- I,
982
- B,
983
- H
1040
+ N,
1041
+ Z,
1042
+ F,
1043
+ V,
1044
+ U
984
1045
  ],
985
- providers: [Y]
986
- })], X);
1046
+ providers: [Q]
1047
+ })], $);
987
1048
  //#endregion
988
- export { h as ALL_TEMPLATES_SELECTION, X as ConfigurationModule, Y as ConfigurationService, _ as InputError, R as MissingSubstitutionError, C as UnknownConfigurationFileTypeError, v as missingInputError };
1049
+ export { h as ALL_TEMPLATES_SELECTION, $ as ConfigurationModule, Q as ConfigurationService, _ as InputError, L as MissingSubstitutionError, S as UnknownConfigurationFileTypeError, q as capturePlaceholderValues, J as createPlaceholderValue, v as 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.5",
7
+ "@conformetry/core": "0.0.7",
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.5"
70
+ "version": "0.0.7"
71
71
  }