@conformetry/nx 0.0.29 → 0.0.30
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 +13 -0
- package/README.md +61 -52
- package/dist/{bootstrap.utilities-CYl9__Vf.js → bootstrap.utilities-SrW64gG2.js} +19 -22
- package/dist/{plugin-context.utilities-nggdWdJp.js → plugin-context.utilities-BKyER2ln.js} +35 -53
- package/dist/src/conformetry-nx.main.js +1 -1
- package/dist/src/executors/validate/executor.d.ts +6 -2
- package/dist/src/executors/validate/executor.js +2 -1
- package/dist/src/generators/sync/generator.d.ts +6 -2
- package/dist/src/generators/sync/generator.js +13 -12
- package/dist/src/index.d.ts +24 -21
- package/dist/src/index.js +2 -2
- package/package.json +5 -5
- package/src/executors/validate/schema.json +2 -2
- package/src/generators/sync/schema.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
## 0.0.30 (2026-10-15)
|
|
2
|
+
|
|
3
|
+
### 💅 Refactors
|
|
4
|
+
|
|
5
|
+
- **callidescope,codependix,codometer,conformetry:** ♻️ require --config on every ic-suite command line ([#1598](https://github.com/organizzolini/codebase/pull/1598))
|
|
6
|
+
|
|
7
|
+
### 🧱 Updated Dependencies
|
|
8
|
+
|
|
9
|
+
- Updated conformetry-configuration to 0.0.30
|
|
10
|
+
- Updated conformetry-generation to 0.0.30
|
|
11
|
+
- Updated conformetry-validation to 0.0.29
|
|
12
|
+
- Updated conformetry-output to 0.0.29
|
|
13
|
+
|
|
1
14
|
## 0.0.29 (2026-10-15)
|
|
2
15
|
|
|
3
16
|
### 💅 Refactors
|
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ Register the plugin in `nx.json` and wire the bootstrap into `postinstall`:
|
|
|
23
23
|
{
|
|
24
24
|
"plugin": "@conformetry/nx",
|
|
25
25
|
"options": {
|
|
26
|
-
"configurationPath": "configuration/conformetry.config.ts",
|
|
26
|
+
"configurationPath": "projects/configuration/conformetry.config.ts",
|
|
27
27
|
"validateTargetName": "conformetry-validate"
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -36,6 +36,13 @@ Register the plugin in `nx.json` and wire the bootstrap into `postinstall`:
|
|
|
36
36
|
{ "scripts": { "postinstall": "conformetry-nx-bootstrap-generators" } }
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
+
The `configurationPath` option is **required**: no default file is assumed and
|
|
40
|
+
no filename is searched for. A plugin entry without it fails with a
|
|
41
|
+
`ConfigurationPathRequiredError` from `@conformetry/configuration` naming the
|
|
42
|
+
option, and so does the bootstrap, which reads it from `nx.json`. The executor
|
|
43
|
+
and the `sync` generator take the same path as a `configuration` option, which
|
|
44
|
+
wins over the registration when both are set.
|
|
45
|
+
|
|
39
46
|
Then type your configuration as `ConformetryNxConfiguration` rather than
|
|
40
47
|
`ConformetryConfiguration`, so instance groups are checked against what Nx can
|
|
41
48
|
actually resolve:
|
|
@@ -97,7 +104,7 @@ nx affected --target=conformetry-validate --base=main
|
|
|
97
104
|
|
|
98
105
|
| Executor option | Purpose |
|
|
99
106
|
| --------------- | ------- |
|
|
100
|
-
| `
|
|
107
|
+
| `configuration` | Configuration file, workspace-root relative. Taken from the `configurationPath` plugin option in `nx.json` when omitted; one of the two is required |
|
|
101
108
|
| `languages` | Restrict the run to named validators; all run when omitted |
|
|
102
109
|
|
|
103
110
|
## Tag-scoped instances
|
|
@@ -152,13 +159,13 @@ Call stacks traced through `projects/ic-suite/conformetry/conformetry-nx`, deepe
|
|
|
152
159
|
|
|
153
160
|
| Measure | Value |
|
|
154
161
|
| --- | --- |
|
|
155
|
-
| Callables |
|
|
162
|
+
| Callables | 111 |
|
|
156
163
|
| Files | 47 |
|
|
157
|
-
| Calls traced |
|
|
164
|
+
| Calls traced | 140 |
|
|
158
165
|
| Call stacks | 8 |
|
|
159
166
|
| Deepest stack | 15 |
|
|
160
167
|
| Stacks through recursion | 0 |
|
|
161
|
-
| Unfollowable calls |
|
|
168
|
+
| Unfollowable calls | 0 |
|
|
162
169
|
|
|
163
170
|
### Limits
|
|
164
171
|
|
|
@@ -176,11 +183,11 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
176
183
|
```text
|
|
177
184
|
🚀 validateExecutor(…): Promise<{ success: boolean; }> [projects/ic-suite/conformetry/conformetry-nx/src/executors/validate/executor.ts:16]
|
|
178
185
|
↳ Validates one project's instances against their conformetry templates.
|
|
179
|
-
└─> PluginService.runValidation(args: RunValidationArguments): Promise<RunValidationResult> [projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:
|
|
186
|
+
└─> PluginService.runValidation(args: RunValidationArguments): Promise<RunValidationResult> [projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:399]
|
|
180
187
|
↳ Validates one project's instances and renders the report.
|
|
181
188
|
└─> ValidationService.validate(args: RunValidationArguments): RunValidationResult [projects/ic-suite/conformetry/conformetry-validation/src/modules/validation/validation.service.ts:194]
|
|
182
189
|
↳ Validates every instance and returns the differences found.
|
|
183
|
-
└─> ConfigurationService.matchInstances(…): ResolvedInstances [projects/ic-suite/conformetry/conformetry-configuration/src/modules/configuration/configuration.service.ts:
|
|
190
|
+
└─> ConfigurationService.matchInstances(…): ResolvedInstances [projects/ic-suite/conformetry/conformetry-configuration/src/modules/configuration/configuration.service.ts:264]
|
|
184
191
|
↳ Resolves every instance to the template, or templates, that explain it.
|
|
185
192
|
└─> InstanceDiscoveryService.matchInstances(…): ResolvedInstances [projects/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:123]
|
|
186
193
|
↳ Resolves every instance to the template, or templates, that explain it.
|
|
@@ -208,11 +215,11 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
208
215
|
```text
|
|
209
216
|
🚀 runConformetryGenerator(…): Promise<string[]> [projects/ic-suite/conformetry/conformetry-nx/src/index.ts:93]
|
|
210
217
|
↳ Runs one configured generator against an Nx tree.
|
|
211
|
-
└─> PluginService.runGenerator(args: RunGeneratorArguments): Promise<string[]> [projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:
|
|
218
|
+
└─> PluginService.runGenerator(args: RunGeneratorArguments): Promise<string[]> [projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:338]
|
|
212
219
|
↳ Runs one configured generator against an Nx tree.
|
|
213
|
-
└─> PluginService.assertPluginInSync(args: { configurationPath: string; workspaceRoot: string; }): Promise<void> [projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:
|
|
220
|
+
└─> PluginService.assertPluginInSync(args: { configurationPath: string; workspaceRoot: string; }): Promise<void> [projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:120]
|
|
214
221
|
↳ Fails fast when the plugin would run against a stale or broken setup.
|
|
215
|
-
└─> PluginService.assertEmittedPluginCurrent(args: { configurationPath: string; workspaceRoot: string; }): Promise<void> [projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:
|
|
222
|
+
└─> PluginService.assertEmittedPluginCurrent(args: { configurationPath: string; workspaceRoot: string; }): Promise<void> [projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:86]
|
|
216
223
|
↳ Fails when the emitted Nx plugin no longer matches the configuration. `generators.json` and its schemas are derived…
|
|
217
224
|
└─> GeneratorService.emitPlugin(args: EmitPluginArguments): Promise<EmittedFile[]> [projects/ic-suite/conformetry/conformetry-nx/src/modules/generator/generator.service.ts:212]
|
|
218
225
|
↳ Returns every file the consumer's generator plugin consists of.
|
|
@@ -227,7 +234,7 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
227
234
|
↳ Returns whether a group applies to a project.
|
|
228
235
|
└─> ScopeService.isProjectGroup(group: ConformetryInstanceGroup): boolean [projects/ic-suite/conformetry/conformetry-nx/src/modules/scope/scope.service.ts:39]
|
|
229
236
|
↳ Whether a group locates its instances by project tag.
|
|
230
|
-
└─> ConfigurationService.isProjectScoped(group: ConformetryInstanceGroup): boolean [projects/ic-suite/conformetry/conformetry-configuration/src/modules/configuration/configuration.service.ts:
|
|
237
|
+
└─> ConfigurationService.isProjectScoped(group: ConformetryInstanceGroup): boolean [projects/ic-suite/conformetry/conformetry-configuration/src/modules/configuration/configuration.service.ts:233]
|
|
231
238
|
↳ Whether a group locates its instances inside the hosts its tags select.
|
|
232
239
|
└─> InstanceGroupService.isProjectScoped(group: ConformetryInstanceGroup): boolean [projects/ic-suite/conformetry/conformetry-configuration/src/modules/instance-group/instance-group.service.ts:42]
|
|
233
240
|
↳ Whether a group locates its instances inside the hosts its tags select.
|
|
@@ -236,7 +243,7 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
236
243
|
**3. `runBootstrapCli`** — depth ≥ 12 · orphan-root
|
|
237
244
|
|
|
238
245
|
```text
|
|
239
|
-
🚀 runBootstrapCli(workspaceRoot: string): Promise<void> [projects/ic-suite/conformetry/conformetry-nx/src/modules/generator/bootstrap.utilities.ts:
|
|
246
|
+
🚀 runBootstrapCli(workspaceRoot: string): Promise<void> [projects/ic-suite/conformetry/conformetry-nx/src/modules/generator/bootstrap.utilities.ts:71]
|
|
240
247
|
↳ Bootstraps the plugin, warning rather than failing the install.
|
|
241
248
|
└─> bootstrapPlugin(workspaceRoot: string): Promise<EmittedFile[]> [projects/ic-suite/conformetry/conformetry-nx/src/modules/generator/bootstrap.utilities.ts:39]
|
|
242
249
|
↳ Emits the generator plugin and puts it where Nx will find it.
|
|
@@ -253,7 +260,7 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
253
260
|
↳ Returns whether a group applies to a project.
|
|
254
261
|
└─> ScopeService.isProjectGroup(group: ConformetryInstanceGroup): boolean [projects/ic-suite/conformetry/conformetry-nx/src/modules/scope/scope.service.ts:39]
|
|
255
262
|
↳ Whether a group locates its instances by project tag.
|
|
256
|
-
└─> ConfigurationService.isProjectScoped(group: ConformetryInstanceGroup): boolean [projects/ic-suite/conformetry/conformetry-configuration/src/modules/configuration/configuration.service.ts:
|
|
263
|
+
└─> ConfigurationService.isProjectScoped(group: ConformetryInstanceGroup): boolean [projects/ic-suite/conformetry/conformetry-configuration/src/modules/configuration/configuration.service.ts:233]
|
|
257
264
|
↳ Whether a group locates its instances inside the hosts its tags select.
|
|
258
265
|
└─> InstanceGroupService.isProjectScoped(group: ConformetryInstanceGroup): boolean [projects/ic-suite/conformetry/conformetry-configuration/src/modules/instance-group/instance-group.service.ts:42]
|
|
259
266
|
↳ Whether a group locates its instances inside the hosts its tags select.
|
|
@@ -266,12 +273,12 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
266
273
|
|
|
267
274
|
```text
|
|
268
275
|
🚀 anonymous(…): Promise<CreateNodesResultArray> [projects/ic-suite/conformetry/conformetry-nx/src/index.ts:49]
|
|
269
|
-
└─> PluginService.inferTargets(args: InferTargetsArguments): Promise<Map<string, InferredTargets>> [projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:
|
|
276
|
+
└─> PluginService.inferTargets(args: InferTargetsArguments): Promise<Map<string, InferredTargets>> [projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:273]
|
|
270
277
|
↳ Infers a validation target onto every project that holds at least one instance.
|
|
271
278
|
└─> InstancesService.findProjectInstances(args: FindProjectInstancesArguments): Promise<Instance[]> [projects/ic-suite/conformetry/conformetry-nx/src/modules/instances/instances.service.ts:68]
|
|
272
279
|
↳ Expands every instance group that applies to a project, keeping only the instances that live inside it.
|
|
273
280
|
└─> InstancesService.flatMap(…)(this: undefined, group: ConformetryInstanceGroup): Instance[] [projects/ic-suite/conformetry/conformetry-nx/src/modules/instances/instances.service.ts:84]
|
|
274
|
-
└─> ConfigurationService.findInstances(args: FindInstancesArguments): Instance[] [projects/ic-suite/conformetry/conformetry-configuration/src/modules/configuration/configuration.service.ts:
|
|
281
|
+
└─> ConfigurationService.findInstances(args: FindInstancesArguments): Instance[] [projects/ic-suite/conformetry/conformetry-configuration/src/modules/configuration/configuration.service.ts:223]
|
|
275
282
|
↳ Expands instance globs into the instances that exist.
|
|
276
283
|
└─> InstanceDiscoveryService.findInstances(args: FindInstancesArguments): Instance[] [projects/ic-suite/conformetry/conformetry-configuration/src/modules/instance-discovery/instance-discovery.service.ts:118]
|
|
277
284
|
↳ Expands instance globs into the instances that exist.
|
|
@@ -288,7 +295,7 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
288
295
|
**5. `syncGenerator`** — depth ≥ 11 · orphan-root
|
|
289
296
|
|
|
290
297
|
```text
|
|
291
|
-
🚀 syncGenerator(tree: Tree, options?: SyncGeneratorOptions): Promise<SyncGeneratorResult> [projects/ic-suite/conformetry/conformetry-nx/src/generators/sync/generator.ts:
|
|
298
|
+
🚀 syncGenerator(tree: Tree, options?: SyncGeneratorOptions): Promise<SyncGeneratorResult> [projects/ic-suite/conformetry/conformetry-nx/src/generators/sync/generator.ts:32]
|
|
292
299
|
↳ Regenerates the workspace's conformetry generator plugin.
|
|
293
300
|
└─> GeneratorService.emitPlugin(args: EmitPluginArguments): Promise<EmittedFile[]> [projects/ic-suite/conformetry/conformetry-nx/src/modules/generator/generator.service.ts:212]
|
|
294
301
|
↳ Returns every file the consumer's generator plugin consists of.
|
|
@@ -303,7 +310,7 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
303
310
|
↳ Returns whether a group applies to a project.
|
|
304
311
|
└─> ScopeService.isProjectGroup(group: ConformetryInstanceGroup): boolean [projects/ic-suite/conformetry/conformetry-nx/src/modules/scope/scope.service.ts:39]
|
|
305
312
|
↳ Whether a group locates its instances by project tag.
|
|
306
|
-
└─> ConfigurationService.isProjectScoped(group: ConformetryInstanceGroup): boolean [projects/ic-suite/conformetry/conformetry-configuration/src/modules/configuration/configuration.service.ts:
|
|
313
|
+
└─> ConfigurationService.isProjectScoped(group: ConformetryInstanceGroup): boolean [projects/ic-suite/conformetry/conformetry-configuration/src/modules/configuration/configuration.service.ts:233]
|
|
307
314
|
↳ Whether a group locates its instances inside the hosts its tags select.
|
|
308
315
|
└─> InstanceGroupService.isProjectScoped(group: ConformetryInstanceGroup): boolean [projects/ic-suite/conformetry/conformetry-configuration/src/modules/instance-group/instance-group.service.ts:42]
|
|
309
316
|
↳ Whether a group locates its instances inside the hosts its tags select.
|
|
@@ -343,9 +350,9 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
343
350
|
|
|
344
351
|
| Callable | Breadth | Calls directly | Location |
|
|
345
352
|
| --- | --- | --- | --- |
|
|
346
|
-
| `PluginService.runGenerator` | 9 | `PluginService.resolveOptions`, `PluginService.assertPluginInSync`, `ConfigurationService.loadConformetryConfiguration`, `PluginService.find(…)`, `PluginService.map(…)`, `AdapterService.createAdapters`, `OptionsService.resolveGeneratorInputs`, `GenerationService.runGenerator`, `PathsService.resolveGenerationPath` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:
|
|
353
|
+
| `PluginService.runGenerator` | 9 | `PluginService.resolveOptions`, `PluginService.assertPluginInSync`, `ConfigurationService.loadConformetryConfiguration`, `PluginService.find(…)`, `PluginService.map(…)`, `AdapterService.createAdapters`, `OptionsService.resolveGeneratorInputs`, `GenerationService.runGenerator`, `PathsService.resolveGenerationPath` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:338` |
|
|
347
354
|
| `bootstrapPlugin` | 9 | `resolveGeneratorService`, `resolveOptionsService`, `resolveProjectsService`, `GeneratorService.emitPlugin`, `OptionsService.resolveConfigurationPath`, `readNxConfiguration`, `ProjectsService.listWorkspaceProjects`, `writePlugin`, `linkPlugin` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/generator/bootstrap.utilities.ts:39` |
|
|
348
|
-
| `syncGenerator` | 8 | `resolveGeneratorService`, `resolveOptionsService`, `resolveProjectsService`, `GeneratorService.emitPlugin`, `OptionsService.resolveConfigurationPath`, `readNxConfiguration`, `ProjectsService.listWorkspaceProjects`, `assign(…)` | `projects/ic-suite/conformetry/conformetry-nx/src/generators/sync/generator.ts:
|
|
355
|
+
| `syncGenerator` | 8 | `resolveGeneratorService`, `resolveOptionsService`, `resolveProjectsService`, `GeneratorService.emitPlugin`, `OptionsService.resolveConfigurationPath`, `readNxConfiguration`, `ProjectsService.listWorkspaceProjects`, `assign(…)` | `projects/ic-suite/conformetry/conformetry-nx/src/generators/sync/generator.ts:32` |
|
|
349
356
|
|
|
350
357
|
<details>
|
|
351
358
|
<summary>55 more callables</summary>
|
|
@@ -354,29 +361,30 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
354
361
|
| --- | --- | --- | --- |
|
|
355
362
|
| `GeneratorService.emitPlugin` | 6 | `ConfigurationService.loadConformetryConfiguration`, `GeneratorService.toSorted(…)`, `GeneratorService.buildGeneratorsManifest`, `GeneratorService.map(…)`, `GeneratorService.map(…)`, `GeneratorService.stringify` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/generator/generator.service.ts:212` |
|
|
356
363
|
| `InstancesService.findProjectInstances` | 6 | `ConfigurationService.loadConformetryConfiguration`, `InstancesService.filter(…)`, `InstancesService.flatMap(…)`, `InstancesService.flatMap(…)`, `InstancesService.flatMap(…)`, `InstancesService.filter(…)` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/instances/instances.service.ts:68` |
|
|
357
|
-
| `PluginService.runValidation` | 6 | `PluginService.resolveOptions`, `PluginService.assertPluginInSync`, `ValidationService.validate`, `InstancesService.findProjectInstances`, `PluginService.resolveTemplates`, `ReportingService.formatReport` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:
|
|
364
|
+
| `PluginService.runValidation` | 6 | `PluginService.resolveOptions`, `PluginService.assertPluginInSync`, `ValidationService.validate`, `InstancesService.findProjectInstances`, `PluginService.resolveTemplates`, `ReportingService.formatReport` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:399` |
|
|
358
365
|
| `PathsService.resolveGenerationPath` | 5 | `PathsService.resolveNewProjectPath`, `InstancesService.findProjectInstances`, `PathsService.requireModulePath`, `PathsService.resolveScopedDirectory`, `PathsService.resolveModuleParentPath` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/paths/paths.service.ts:221` |
|
|
359
|
-
| `PluginService.inferTargets` | 5 | `PluginService.resolveOptions`, `PluginService.resolveTemplateInputs`, `PluginService.filter(…)`, `ProjectsService.readProjectScope`, `InstancesService.findProjectInstances` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:
|
|
366
|
+
| `PluginService.inferTargets` | 5 | `PluginService.resolveOptions`, `PluginService.resolveTemplateInputs`, `PluginService.filter(…)`, `ProjectsService.readProjectScope`, `InstancesService.findProjectInstances` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:273` |
|
|
360
367
|
| `ScopeService.resolveScopedProjectNames` | 4 | `ScopeService.filter(…)`, `ScopeService.toSorted(…)`, `ScopeService.map(…)`, `ScopeService.filter(…)` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/scope/scope.service.ts:135` |
|
|
361
368
|
| `ProjectsService.listWorkspaceProjects` | 4 | `ProjectsService.toSorted(…)`, `ProjectsService.map(…)`, `ProjectsService.listProjectConfigurationFiles`, `ProjectsService.readIgnoredPaths` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/projects/projects.service.ts:118` |
|
|
362
369
|
| `anonymous` | 4 | `resolvePluginService`, `PluginService.inferTargets`, `filter(…)`, `map(…)` | `projects/ic-suite/conformetry/conformetry-nx/src/index.ts:49` |
|
|
363
370
|
| `ScopeService.resolveGroup` | 3 | `ScopeService.matchesProject`, `ScopeService.isProjectGroup`, `ScopeService.map(…)` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/scope/scope.service.ts:75` |
|
|
364
371
|
| `AdapterService.listDirectory` | 3 | `AdapterService.resolveTreePath`, `AdapterService.map(…)`, `AdapterService.map(…)` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/adapter/adapter.service.ts:42` |
|
|
365
372
|
| `PathsService.resolveScopedDirectory` | 3 | `ConfigurationService.loadConformetryConfiguration`, `PathsService.find(…)`, `ScopeService.resolveScopedDirectory` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/paths/paths.service.ts:167` |
|
|
366
|
-
| `PluginService.resolveOptions` | 3 | `OptionsService.
|
|
367
|
-
| `PluginService.resolveTemplateInputs` | 3 | `ConfigurationService.loadConformetryConfiguration`, `PluginService.map(…)`, `PluginService.map(…)` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:
|
|
373
|
+
| `PluginService.resolveOptions` | 3 | `OptionsService.readRegisteredConfigurationPath`, `PluginService.readNxConfiguration`, `OptionsService.resolvePluginOptions` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:192` |
|
|
374
|
+
| `PluginService.resolveTemplateInputs` | 3 | `ConfigurationService.loadConformetryConfiguration`, `PluginService.map(…)`, `PluginService.map(…)` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:227` |
|
|
368
375
|
| `ScopeService.matchesProject` | 2 | `ScopeService.isProjectGroup`, `ScopeService.every(…)` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/scope/scope.service.ts:53` |
|
|
369
376
|
| `ScopeService.resolveScopedDirectory` | 2 | `ScopeService.find(…)`, `ScopeService.findIndex(…)` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/scope/scope.service.ts:109` |
|
|
370
377
|
| `GeneratorService.buildSchema` | 2 | `GeneratorService.stringify`, `GeneratorService.buildSchemaProperties` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/generator/generator.service.ts:122` |
|
|
371
378
|
| `GeneratorService.map(…)` | 2 | `GeneratorService.buildSchema`, `GeneratorService.resolveScopedProjectNames` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/generator/generator.service.ts:238` |
|
|
372
|
-
| `OptionsService.readRegisteredConfigurationPath` | 2 | `OptionsService.isUnknownArray`, `OptionsService.readString` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/options/options.service.ts:
|
|
373
|
-
| `OptionsService.resolveConfigurationPath` | 2 | `
|
|
379
|
+
| `OptionsService.readRegisteredConfigurationPath` | 2 | `OptionsService.isUnknownArray`, `OptionsService.readString` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/options/options.service.ts:51` |
|
|
380
|
+
| `OptionsService.resolveConfigurationPath` | 2 | `ConfigurationService.requireConfigurationPath`, `OptionsService.readRegisteredConfigurationPath` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/options/options.service.ts:98` |
|
|
381
|
+
| `OptionsService.resolvePluginOptions` | 2 | `ConfigurationService.requireConfigurationPath`, `OptionsService.readString` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/options/options.service.ts:145` |
|
|
374
382
|
| `PathsService.resolveNewProjectPath` | 2 | `missingDirectoryError`, `PathsService.resolveTypeDirectoryPath` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/paths/paths.service.ts:140` |
|
|
375
383
|
| `ProjectsService.readIgnoredPaths` | 2 | `ProjectsService.filter(…)`, `ProjectsService.map(…)` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/projects/projects.service.ts:97` |
|
|
376
384
|
| `ProjectsService.readProjectScope` | 2 | `ProjectsService.isUnknownArray`, `ProjectsService.filter(…)` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/projects/projects.service.ts:134` |
|
|
377
|
-
| `PluginService.assertEmittedPluginCurrent` | 2 | `GeneratorService.emitPlugin`, `ProjectsService.listWorkspaceProjects` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:
|
|
378
|
-
| `PluginService.assertPluginInSync` | 2 | `PluginService.assertTemplatesExist`, `PluginService.assertEmittedPluginCurrent` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:
|
|
379
|
-
| `PluginService.resolveTemplates` | 2 | `ConfigurationService.loadConformetryConfiguration`, `PluginService.map(…)` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:
|
|
385
|
+
| `PluginService.assertEmittedPluginCurrent` | 2 | `GeneratorService.emitPlugin`, `ProjectsService.listWorkspaceProjects` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:86` |
|
|
386
|
+
| `PluginService.assertPluginInSync` | 2 | `PluginService.assertTemplatesExist`, `PluginService.assertEmittedPluginCurrent` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:120` |
|
|
387
|
+
| `PluginService.resolveTemplates` | 2 | `ConfigurationService.loadConformetryConfiguration`, `PluginService.map(…)` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:244` |
|
|
380
388
|
| `runConformetryGenerator` | 2 | `resolvePluginService`, `PluginService.runGenerator` | `projects/ic-suite/conformetry/conformetry-nx/src/index.ts:93` |
|
|
381
389
|
| `validateExecutor` | 2 | `resolvePluginService`, `PluginService.runValidation` | `projects/ic-suite/conformetry/conformetry-nx/src/executors/validate/executor.ts:16` |
|
|
382
390
|
| `ScopeService.isProjectGroup` | 1 | `ConfigurationService.isProjectScoped` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/scope/scope.service.ts:39` |
|
|
@@ -394,19 +402,18 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
394
402
|
| `InstancesService.flatMap(…)` | 1 | `ScopeService.resolveGroup` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/instances/instances.service.ts:79` |
|
|
395
403
|
| `InstancesService.flatMap(…)` | 1 | `ConfigurationService.findInstances` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/instances/instances.service.ts:84` |
|
|
396
404
|
| `InstancesService.filter(…)` | 1 | `InstancesService.isInsideProject` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/instances/instances.service.ts:97` |
|
|
397
|
-
| `OptionsService.resolvePluginOptions` | 1 | `OptionsService.readString` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/options/options.service.ts:147` |
|
|
398
405
|
| `PathsService.requireModulePath` | 1 | `PathsService.resolveModulePath` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/paths/paths.service.ts:57` |
|
|
399
406
|
| `PathsService.resolveModuleParentPath` | 1 | `PathsService.toSorted(…)` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/paths/paths.service.ts:86` |
|
|
400
407
|
| `PathsService.resolveModulePath` | 1 | `PathsService.find(…)` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/paths/paths.service.ts:118` |
|
|
401
408
|
| `ProjectsService.map(…)` | 1 | `ProjectsService.readProjectScope` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/projects/projects.service.ts:124` |
|
|
402
|
-
| `PluginService.assertTemplatesExist` | 1 | `ConfigurationService.loadConformetryConfiguration` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:
|
|
403
|
-
| `PluginService.map(…)` | 1 | `ConfigurationService.collectTemplate` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:
|
|
409
|
+
| `PluginService.assertTemplatesExist` | 1 | `ConfigurationService.loadConformetryConfiguration` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:136` |
|
|
410
|
+
| `PluginService.map(…)` | 1 | `ConfigurationService.collectTemplate` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin.service.ts:253` |
|
|
404
411
|
| `resolveGeneratorService` | 1 | `resolvePluginContext` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin-context.utilities.ts:18` |
|
|
405
412
|
| `resolveOptionsService` | 1 | `resolvePluginContext` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin-context.utilities.ts:25` |
|
|
406
413
|
| `resolvePluginService` | 1 | `resolvePluginContext` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin-context.utilities.ts:32` |
|
|
407
414
|
| `resolveProjectsService` | 1 | `resolvePluginContext` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/plugin/plugin-context.utilities.ts:39` |
|
|
408
|
-
| `runBootstrapCli` | 1 | `bootstrapPlugin` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/generator/bootstrap.utilities.ts:
|
|
409
|
-
| `linkPlugin` | 1 | `leadsTo` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/generator/bootstrap.utilities.ts:
|
|
415
|
+
| `runBootstrapCli` | 1 | `bootstrapPlugin` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/generator/bootstrap.utilities.ts:71` |
|
|
416
|
+
| `linkPlugin` | 1 | `leadsTo` | `projects/ic-suite/conformetry/conformetry-nx/src/modules/generator/bootstrap.utilities.ts:113` |
|
|
410
417
|
|
|
411
418
|
</details>
|
|
412
419
|
<!-- callidescope:end -->
|
|
@@ -501,6 +508,7 @@ flowchart LR
|
|
|
501
508
|
MainModule --> GeneratorModule
|
|
502
509
|
MainModule --> PluginModule
|
|
503
510
|
MarkdownModule --> ScoringModule
|
|
511
|
+
OptionsModule --> ConfigurationModule
|
|
504
512
|
PathsModule --> ConfigurationModule
|
|
505
513
|
PathsModule --> InstancesModule
|
|
506
514
|
PathsModule --> ScopeModule
|
|
@@ -613,6 +621,7 @@ graph LR
|
|
|
613
621
|
file_src_generators_sync_generator_ts --> file_src_modules_options_options_constants_ts
|
|
614
622
|
file_src_generators_sync_generator_ts --> file_src_modules_plugin_plugin_context_utilities_ts
|
|
615
623
|
file_src_generators_sync_generator_unit_test_ts --> file_src_generators_sync_generator_ts
|
|
624
|
+
file_src_generators_sync_generator_unit_test_ts --> file_src_modules_options_options_constants_ts
|
|
616
625
|
file_src_generators_sync_generator_unit_test_ts --> file_src_modules_plugin_plugin_context_utilities_ts
|
|
617
626
|
file_src_index_ts --> file_src_modules_plugin_plugin_context_utilities_ts
|
|
618
627
|
file_src_index_ts --> file_src_modules_plugin_plugin_constants_ts
|
|
@@ -721,14 +730,14 @@ graph LR
|
|
|
721
730
|
|
|
722
731
|
### Project
|
|
723
732
|
|
|
724
|
-

|
|
734
|
+

|
|
726
735
|

|
|
727
736
|

|
|
728
737
|
|
|
729
738
|
### Measured Targets
|
|
730
739
|
|
|
731
|
-

|
|
732
741
|
|
|
733
742
|
### TypeScript
|
|
734
743
|
|
|
@@ -737,7 +746,7 @@ graph LR
|
|
|
737
746
|

|
|
738
747
|

|
|
739
748
|

|
|
740
|
-

|
|
741
750
|

|
|
742
751
|
|
|
743
752
|
### JavaScript
|
|
@@ -746,15 +755,15 @@ graph LR
|
|
|
746
755
|

|
|
747
756
|

|
|
748
757
|

|
|
749
|
-

|
|
759
|
+

|
|
751
760
|

|
|
752
|
-

|
|
762
|
+

|
|
763
|
+

|
|
764
|
+

|
|
765
|
+

|
|
766
|
+

|
|
758
767
|

|
|
759
768
|
|
|
760
769
|
### Python
|
|
@@ -910,20 +919,20 @@ graph LR
|
|
|
910
919
|
### Markdown
|
|
911
920
|
|
|
912
921
|

|
|
913
|
-

|
|
914
923
|

|
|
915
|
-

|
|
925
|
+

|
|
917
926
|

|
|
918
927
|

|
|
919
928
|

|
|
920
|
-

|
|
930
|
+

|
|
931
|
+

|
|
923
932
|

|
|
924
933
|

|
|
925
934
|

|
|
926
|
-

|
|
927
936
|

|
|
928
937
|

|
|
929
938
|

|
|
@@ -1,26 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as e, h as t, i as n, n as r, t as i, x as a } from "./plugin-context.utilities-BKyER2ln.js";
|
|
2
2
|
import { existsSync as o, lstatSync as s, mkdirSync as c, readFileSync as l, realpathSync as u, rmSync as d, symlinkSync as f, writeFileSync as p } from "node:fs";
|
|
3
3
|
import m from "node:path";
|
|
4
4
|
//#region projects/ic-suite/conformetry/conformetry-nx/src/modules/generator/bootstrap.utilities.ts
|
|
5
|
-
async function bootstrapPlugin(
|
|
6
|
-
let
|
|
7
|
-
configurationPath:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
outputPath: n,
|
|
12
|
-
packageName: t,
|
|
13
|
-
projects: l.listWorkspaceProjects(e)
|
|
5
|
+
async function bootstrapPlugin(a) {
|
|
6
|
+
let o = await i(), s = await r(), c = await n(), l = await o.emitPlugin({
|
|
7
|
+
configurationPath: s.resolveConfigurationPath({ nxConfiguration: readNxConfiguration(a) }),
|
|
8
|
+
outputPath: t,
|
|
9
|
+
packageName: e,
|
|
10
|
+
projects: c.listWorkspaceProjects(a)
|
|
14
11
|
});
|
|
15
12
|
return writePlugin({
|
|
16
|
-
files:
|
|
17
|
-
workspaceRoot:
|
|
18
|
-
}), linkPlugin(
|
|
13
|
+
files: l,
|
|
14
|
+
workspaceRoot: a
|
|
15
|
+
}), linkPlugin(a), l;
|
|
19
16
|
}
|
|
20
17
|
async function runBootstrapCli(e) {
|
|
21
18
|
try {
|
|
22
|
-
let
|
|
23
|
-
console.info(`👔 Emitted the conformetry generator plugin to ${
|
|
19
|
+
let n = await bootstrapPlugin(e);
|
|
20
|
+
console.info(`👔 Emitted the conformetry generator plugin to ${t}`, { count: n.length });
|
|
24
21
|
} catch (e) {
|
|
25
22
|
console.warn("👔 Skipped emitting the conformetry generator plugin"), console.warn(e instanceof Error ? e.message : e);
|
|
26
23
|
}
|
|
@@ -32,23 +29,23 @@ function leadsTo(e) {
|
|
|
32
29
|
return !o(e.linkPath);
|
|
33
30
|
}
|
|
34
31
|
}
|
|
35
|
-
function linkPlugin(
|
|
36
|
-
let r = m.resolve(
|
|
32
|
+
function linkPlugin(n) {
|
|
33
|
+
let r = m.resolve(n, "node_modules", e), i = m.resolve(n, t);
|
|
37
34
|
if (c(m.dirname(r), { recursive: !0 }), s(r, { throwIfNoEntry: !1 }) !== void 0 && !leadsTo({
|
|
38
35
|
linkPath: r,
|
|
39
36
|
outputPath: i
|
|
40
|
-
})) throw Error(`node_modules/${
|
|
37
|
+
})) throw Error(`node_modules/${e} is an installed package, not a link to ${t}. Rename the emitted plugin via the sync generator's packageName option.`);
|
|
41
38
|
d(r, {
|
|
42
39
|
force: !0,
|
|
43
40
|
recursive: !0
|
|
44
41
|
}), f(m.relative(m.dirname(r), i), r, "dir");
|
|
45
42
|
}
|
|
46
|
-
function readNxConfiguration(
|
|
47
|
-
let
|
|
48
|
-
if (o(
|
|
43
|
+
function readNxConfiguration(e) {
|
|
44
|
+
let t = m.resolve(e, a);
|
|
45
|
+
if (o(t)) return JSON.parse(l(t, "utf8"));
|
|
49
46
|
}
|
|
50
47
|
function writePlugin(e) {
|
|
51
|
-
d(m.resolve(e.workspaceRoot,
|
|
48
|
+
d(m.resolve(e.workspaceRoot, t, "src"), {
|
|
52
49
|
force: !0,
|
|
53
50
|
recursive: !0
|
|
54
51
|
});
|
|
@@ -8,29 +8,12 @@ import { ConfigurationModule as f, ConfigurationService as p, missingDirectoryEr
|
|
|
8
8
|
import { GenerationModule as m, GenerationService as h } from "@conformetry/generation";
|
|
9
9
|
import { ReportingModule as g, ReportingService as _ } from "@conformetry/output";
|
|
10
10
|
import { ValidationModule as v, ValidationService as y } from "@conformetry/validation";
|
|
11
|
-
import { formatFiles as ne, getProjects as b, readProjectConfiguration as
|
|
11
|
+
import { formatFiles as ne, getProjects as b, readProjectConfiguration as x } from "@nx/devkit";
|
|
12
12
|
//#region \0rolldown/runtime.js
|
|
13
|
-
var
|
|
13
|
+
var S = Object.defineProperty, __name = (e, t) => S(e, "name", {
|
|
14
14
|
value: t,
|
|
15
15
|
configurable: !0
|
|
16
|
-
}),
|
|
17
|
-
"conformetry.config.ts",
|
|
18
|
-
"conformetry.config.mts",
|
|
19
|
-
"conformetry.config.cts",
|
|
20
|
-
"conformetry.config.js",
|
|
21
|
-
"conformetry.config.mjs",
|
|
22
|
-
"conformetry.config.cjs",
|
|
23
|
-
"conformetry.config.json",
|
|
24
|
-
"conformetry.config.jsonc",
|
|
25
|
-
"conformetry.json",
|
|
26
|
-
"conformetry.jsonc",
|
|
27
|
-
".conformetryrc.ts",
|
|
28
|
-
".conformetryrc.js",
|
|
29
|
-
".conformetryrc.json",
|
|
30
|
-
"conformetryrc.ts",
|
|
31
|
-
"conformetryrc.js",
|
|
32
|
-
"conformetryrc.json"
|
|
33
|
-
], C = "nx.json", ae = "conformetry-validate", oe = ["configurationPath", "validateTargetName"], se = /^(\p{Extended_Pictographic}️?(?:\p{Extended_Pictographic}️?)*)\s+/u, w = /^([A-Za-z]+)/, T = /* @__PURE__ */ new Set([
|
|
16
|
+
}), re = "@conformetry/nx", C = "the \"configurationPath\" option of the @conformetry/nx plugin in nx.json", w = `the "configuration" option, or ${C},`, T = "nx.json", ie = ["configurationPath", "validateTargetName"], ae = /^(\p{Extended_Pictographic}️?(?:\p{Extended_Pictographic}️?)*)\s+/u, oe = /^([A-Za-z]+)/, se = /* @__PURE__ */ new Set([
|
|
34
17
|
"built",
|
|
35
18
|
"cut",
|
|
36
19
|
"found",
|
|
@@ -122,15 +105,15 @@ var D, O = class LoggerService extends s {
|
|
|
122
105
|
getConventionalMessageViolation(e) {
|
|
123
106
|
let t = e.emoji, n = e.text;
|
|
124
107
|
if (t === void 0) return `Log message must start with an emoji naming its subject, then a verb: "${n}"`;
|
|
125
|
-
let r =
|
|
108
|
+
let r = oe.exec(n)?.[1];
|
|
126
109
|
if (r === void 0 || !this.isConventionalVerb(r)) return `Log message must begin with a verb in present progressive or past tense, got "${r ?? ""}": "${t} ${n}"`;
|
|
127
110
|
}
|
|
128
111
|
isConventionalVerb(e) {
|
|
129
112
|
let t = e.toLowerCase();
|
|
130
|
-
return t.endsWith("ing") || t.endsWith("ed") ||
|
|
113
|
+
return t.endsWith("ing") || t.endsWith("ed") || se.has(t);
|
|
131
114
|
}
|
|
132
115
|
parseMessage(e) {
|
|
133
|
-
let t = String(e), n =
|
|
116
|
+
let t = String(e), n = ae.exec(t), r = n?.[1];
|
|
134
117
|
return r === void 0 ? {
|
|
135
118
|
emoji: void 0,
|
|
136
119
|
text: t
|
|
@@ -510,10 +493,17 @@ H = __decorate([u({
|
|
|
510
493
|
//#endregion
|
|
511
494
|
//#region projects/ic-suite/conformetry/conformetry-nx/src/modules/options/options.service.ts
|
|
512
495
|
var U = class OptionsService {
|
|
513
|
-
|
|
496
|
+
configurationService;
|
|
497
|
+
constructor(e) {
|
|
498
|
+
this.configurationService = e;
|
|
499
|
+
}
|
|
514
500
|
isUnknownArray(e) {
|
|
515
501
|
return Array.isArray(e);
|
|
516
502
|
}
|
|
503
|
+
readString(e) {
|
|
504
|
+
let t = e.options[e.key];
|
|
505
|
+
return typeof t == "string" && t !== "" ? t : void 0;
|
|
506
|
+
}
|
|
517
507
|
readRegisteredConfigurationPath(e) {
|
|
518
508
|
if (typeof e != "object" || !e) return;
|
|
519
509
|
let { plugins: t } = { ...e };
|
|
@@ -526,45 +516,37 @@ var U = class OptionsService {
|
|
|
526
516
|
}) : void 0;
|
|
527
517
|
}
|
|
528
518
|
}
|
|
529
|
-
readString(e) {
|
|
530
|
-
let t = e.options[e.key];
|
|
531
|
-
return typeof t == "string" && t !== "" ? t : void 0;
|
|
532
|
-
}
|
|
533
519
|
resolveConfigurationPath(e) {
|
|
534
|
-
return this.
|
|
520
|
+
return this.configurationService.requireConfigurationPath(e.configuration ?? this.readRegisteredConfigurationPath(e.nxConfiguration), e.surface ?? "the \"configurationPath\" option of the @conformetry/nx plugin in nx.json");
|
|
535
521
|
}
|
|
536
522
|
resolveGeneratorInputs(e) {
|
|
537
523
|
if (typeof e != "object" || !e) return {};
|
|
538
524
|
let t = {};
|
|
539
|
-
for (let [n, r] of Object.entries({ ...e }))
|
|
525
|
+
for (let [n, r] of Object.entries({ ...e })) ie.includes(n) || typeof r != "string" || (t[n] = r);
|
|
540
526
|
return t;
|
|
541
527
|
}
|
|
542
|
-
resolvePluginOptions(e) {
|
|
543
|
-
|
|
544
|
-
configurationPath: S[0],
|
|
545
|
-
validateTargetName: ae
|
|
546
|
-
};
|
|
547
|
-
let t = { ...e };
|
|
528
|
+
resolvePluginOptions(e, t = C) {
|
|
529
|
+
let n = typeof e == "object" && e ? { ...e } : {};
|
|
548
530
|
return {
|
|
549
|
-
configurationPath: this.readString({
|
|
531
|
+
configurationPath: this.configurationService.requireConfigurationPath(this.readString({
|
|
550
532
|
key: "configurationPath",
|
|
551
|
-
options:
|
|
552
|
-
})
|
|
533
|
+
options: n
|
|
534
|
+
}), t),
|
|
553
535
|
validateTargetName: this.readString({
|
|
554
536
|
key: "validateTargetName",
|
|
555
|
-
options:
|
|
537
|
+
options: n
|
|
556
538
|
}) ?? "conformetry-validate"
|
|
557
539
|
};
|
|
558
540
|
}
|
|
559
541
|
};
|
|
560
|
-
U = __decorate([l(), __decorateMetadata("design:paramtypes", [])], U);
|
|
542
|
+
U = __decorate([l(), __decorateMetadata("design:paramtypes", [p === void 0 ? Object : p])], U);
|
|
561
543
|
//#endregion
|
|
562
544
|
//#region projects/ic-suite/conformetry/conformetry-nx/src/modules/options/options.module.ts
|
|
563
545
|
var W = class OptionsModule {};
|
|
564
546
|
W = __decorate([u({
|
|
565
547
|
controllers: [],
|
|
566
548
|
exports: [U],
|
|
567
|
-
imports: [],
|
|
549
|
+
imports: [f],
|
|
568
550
|
providers: [U]
|
|
569
551
|
})], W);
|
|
570
552
|
//#endregion
|
|
@@ -627,7 +609,7 @@ var G = class PathsService {
|
|
|
627
609
|
type: e.inputs[le],
|
|
628
610
|
workspaceRoot: e.workspaceRoot
|
|
629
611
|
});
|
|
630
|
-
let r =
|
|
612
|
+
let r = x(e.tree, n), i = a.resolve(e.workspaceRoot, r.root), o = await this.instancesService.findProjectInstances({
|
|
631
613
|
configurationPath: e.configurationPath,
|
|
632
614
|
project: {
|
|
633
615
|
name: n,
|
|
@@ -767,18 +749,16 @@ var me = "**/{project.json,conformetry.config.*}", he = "project.json", Y = "__c
|
|
|
767
749
|
}
|
|
768
750
|
}
|
|
769
751
|
readNxConfiguration(e) {
|
|
770
|
-
let n = a.resolve(e,
|
|
752
|
+
let n = a.resolve(e, T);
|
|
771
753
|
if (t(n)) return JSON.parse(r(n, "utf8"));
|
|
772
754
|
}
|
|
773
755
|
resolveOptions(e) {
|
|
774
|
-
let
|
|
775
|
-
exists: (n) => t(a.resolve(e.workspaceRoot, n)),
|
|
776
|
-
nxConfiguration: this.readNxConfiguration(e.workspaceRoot)
|
|
777
|
-
}), r = typeof e.options == "object" && e.options !== null ? { ...e.options } : {};
|
|
756
|
+
let t = this.optionsService.readRegisteredConfigurationPath(this.readNxConfiguration(e.workspaceRoot)), n = typeof e.options == "object" && e.options !== null ? { ...e.options } : {};
|
|
778
757
|
return this.optionsService.resolvePluginOptions({
|
|
779
|
-
configurationPath:
|
|
780
|
-
...
|
|
781
|
-
|
|
758
|
+
...t === void 0 ? {} : { configurationPath: t },
|
|
759
|
+
...n,
|
|
760
|
+
...e.configuration === void 0 ? {} : { configurationPath: e.configuration }
|
|
761
|
+
}, e.surface ?? "the \"configurationPath\" option of the @conformetry/nx plugin in nx.json");
|
|
782
762
|
}
|
|
783
763
|
async resolveTemplateInputs(e) {
|
|
784
764
|
let t = await this.configurationService.loadConformetryConfiguration(e.configurationPath);
|
|
@@ -807,7 +787,7 @@ var me = "**/{project.json,conformetry.config.*}", he = "project.json", Y = "__c
|
|
|
807
787
|
workspaceRoot: e.workspaceRoot
|
|
808
788
|
})).length !== 0 && r.set(a.root, { [t.validateTargetName]: {
|
|
809
789
|
cache: !0,
|
|
810
|
-
executor: `${
|
|
790
|
+
executor: `${re}:validate`,
|
|
811
791
|
inputs: [
|
|
812
792
|
"default",
|
|
813
793
|
`{workspaceRoot}/${t.configurationPath}`,
|
|
@@ -856,7 +836,9 @@ var me = "**/{project.json,conformetry.config.*}", he = "project.json", Y = "__c
|
|
|
856
836
|
}
|
|
857
837
|
async runValidation(e) {
|
|
858
838
|
let t = this.resolveOptions({
|
|
839
|
+
...e.configuration === void 0 ? {} : { configuration: e.configuration },
|
|
859
840
|
options: e.options,
|
|
841
|
+
surface: w,
|
|
860
842
|
workspaceRoot: e.workspaceRoot
|
|
861
843
|
});
|
|
862
844
|
await this.assertPluginInSync({
|
|
@@ -970,4 +952,4 @@ async function resolvePluginContext() {
|
|
|
970
952
|
}), await e[Y];
|
|
971
953
|
}
|
|
972
954
|
//#endregion
|
|
973
|
-
export { P as _, $ as a,
|
|
955
|
+
export { __name as S, P as _, $ as a, w as b, me as c, H as d, V as f, F as g, N as h, resolveProjectsService as i, W as l, z as m, resolveOptionsService as n, Q as o, B as p, resolvePluginService as r, Z as s, resolveGeneratorService as t, U as u, j as v, T as x, A as y };
|
|
@@ -15,8 +15,12 @@ export default validateExecutor;
|
|
|
15
15
|
|
|
16
16
|
/** Options accepted by the conformetry validate executor. */
|
|
17
17
|
declare interface ValidateExecutorOptions {
|
|
18
|
-
/**
|
|
19
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Where the conformetry configuration lives, workspace-root relative.
|
|
20
|
+
*
|
|
21
|
+
* Falls back to the plugin registration in `nx.json`.
|
|
22
|
+
*/
|
|
23
|
+
readonly configuration?: string;
|
|
20
24
|
/** Language names to restrict the run to; every language when absent. */
|
|
21
25
|
readonly languages?: string[];
|
|
22
26
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as e } from "../../../plugin-context.utilities-
|
|
1
|
+
import { r as e } from "../../../plugin-context.utilities-BKyER2ln.js";
|
|
2
2
|
//#region projects/ic-suite/conformetry/conformetry-nx/src/executors/validate/executor.ts
|
|
3
3
|
async function validateExecutor(t, n) {
|
|
4
4
|
let r = n.projectName;
|
|
@@ -6,6 +6,7 @@ async function validateExecutor(t, n) {
|
|
|
6
6
|
let i = n.projectsConfigurations.projects[r];
|
|
7
7
|
if (i === void 0) throw Error(`Unknown project: ${r}.`);
|
|
8
8
|
let a = await (await e()).runValidation({
|
|
9
|
+
...t.configuration === void 0 ? {} : { configuration: t.configuration },
|
|
9
10
|
...t.languages === void 0 ? {} : { languageNames: t.languages },
|
|
10
11
|
options: t,
|
|
11
12
|
...t.threshold === void 0 ? {} : { threshold: t.threshold },
|
|
@@ -13,8 +13,12 @@ export default syncGenerator;
|
|
|
13
13
|
|
|
14
14
|
/** Options accepted by the conformetry sync generator. */
|
|
15
15
|
declare interface SyncGeneratorOptions {
|
|
16
|
-
/**
|
|
17
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Path to the conformetry configuration, relative to the workspace root.
|
|
18
|
+
*
|
|
19
|
+
* Falls back to the plugin registration in `nx.json`.
|
|
20
|
+
*/
|
|
21
|
+
readonly configuration?: string;
|
|
18
22
|
/** Directory the generator plugin is emitted into. */
|
|
19
23
|
readonly outputPath?: string;
|
|
20
24
|
/** Package name the emitted plugin is addressed by. */
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { _ as e, b as t, i as n, n as r, t as i } from "../../../plugin-context.utilities-
|
|
1
|
+
import { _ as e, b as t, i as n, n as r, t as i, x as a } from "../../../plugin-context.utilities-BKyER2ln.js";
|
|
2
2
|
//#region projects/ic-suite/conformetry/conformetry-nx/src/generators/sync/generator.ts
|
|
3
|
-
async function syncGenerator(
|
|
4
|
-
let
|
|
5
|
-
configurationPath:
|
|
6
|
-
|
|
7
|
-
nxConfiguration: readNxConfiguration(
|
|
3
|
+
async function syncGenerator(a, o) {
|
|
4
|
+
let s = await i(), c = await r(), l = await n(), u = await s.emitPlugin({
|
|
5
|
+
configurationPath: c.resolveConfigurationPath({
|
|
6
|
+
configuration: o?.configuration,
|
|
7
|
+
nxConfiguration: readNxConfiguration(a),
|
|
8
|
+
surface: t
|
|
8
9
|
}),
|
|
9
|
-
outputPath:
|
|
10
|
-
packageName:
|
|
11
|
-
projects:
|
|
10
|
+
outputPath: o?.outputPath ?? ".conformetry/nx-generators",
|
|
11
|
+
packageName: o?.packageName ?? "conformetry",
|
|
12
|
+
projects: l.listWorkspaceProjects(a.root)
|
|
12
13
|
});
|
|
13
|
-
for (let e of
|
|
14
|
+
for (let e of u) a.write(e.filePath, e.content);
|
|
14
15
|
return Object.assign(() => {}, { outOfSyncMessage: e });
|
|
15
16
|
}
|
|
16
17
|
function readNxConfiguration(e) {
|
|
17
|
-
let
|
|
18
|
-
if (
|
|
18
|
+
let t = e.read(a, "utf8");
|
|
19
|
+
if (t !== null) return JSON.parse(t);
|
|
19
20
|
}
|
|
20
21
|
//#endregion
|
|
21
22
|
export { syncGenerator as default };
|
package/dist/src/index.d.ts
CHANGED
|
@@ -661,30 +661,31 @@ export declare class OptionsModule {
|
|
|
661
661
|
* from being built.
|
|
662
662
|
*/
|
|
663
663
|
export declare class OptionsService {
|
|
664
|
-
|
|
664
|
+
private readonly configurationService;
|
|
665
|
+
constructor(configurationService: ConfigurationService);
|
|
665
666
|
/** Narrows an untrusted value to an array without widening it to `any`. */
|
|
666
667
|
private isUnknownArray;
|
|
667
|
-
/** Reads this plugin's `configurationPath` out of an `nx.json`, if it names one. */
|
|
668
|
-
private readRegisteredConfigurationPath;
|
|
669
668
|
/** Reads a string field from an untrusted record, or `undefined`. */
|
|
670
669
|
private readString;
|
|
670
|
+
/** Reads this plugin's `configurationPath` out of an `nx.json`, if it names one. */
|
|
671
|
+
readRegisteredConfigurationPath(nxConfiguration: unknown): string | undefined;
|
|
671
672
|
/**
|
|
672
|
-
*
|
|
673
|
+
* Reads the configuration path the run was given, or refuses.
|
|
674
|
+
*
|
|
675
|
+
* The `configuration` option, when the caller has one, wins over the
|
|
676
|
+
* workspace's registration. Whether a path is required, and what the refusal
|
|
677
|
+
* says, belongs to the configuration layer; this only says which option the
|
|
678
|
+
* person was meant to set.
|
|
673
679
|
*
|
|
674
680
|
* Nx passes plugin options to `createNodes` and to executors, but not to a
|
|
675
681
|
* global sync generator or to anything run outside Nx entirely, such as the
|
|
676
|
-
* install-time bootstrap. Those read the registration themselves
|
|
677
|
-
*
|
|
678
|
-
* other than the root is not silently read from nothing.
|
|
679
|
-
*
|
|
680
|
-
* With no registration, the conventional root filenames are tried in order.
|
|
681
|
-
* `exists` is supplied by the caller rather than reached for here, because
|
|
682
|
-
* the callers do not agree on what a filesystem is: two of them read disk
|
|
683
|
-
* and the sync generator reads an Nx `Tree`.
|
|
682
|
+
* install-time bootstrap. Those read the registration themselves. No path is
|
|
683
|
+
* assumed or searched for.
|
|
684
684
|
*/
|
|
685
685
|
resolveConfigurationPath(args: {
|
|
686
|
-
|
|
686
|
+
configuration?: string | undefined;
|
|
687
687
|
nxConfiguration: unknown;
|
|
688
|
+
surface?: string;
|
|
688
689
|
}): string;
|
|
689
690
|
/**
|
|
690
691
|
* Extracts the generator inputs from an Nx options object.
|
|
@@ -698,12 +699,11 @@ export declare class OptionsService {
|
|
|
698
699
|
/**
|
|
699
700
|
* Resolves the effective plugin options from an untrusted value.
|
|
700
701
|
*
|
|
701
|
-
*
|
|
702
|
-
*
|
|
703
|
-
*
|
|
704
|
-
* the result in.
|
|
702
|
+
* `configurationPath` is required and has no default; a missing one is
|
|
703
|
+
* refused by the configuration layer, naming `surface`. `validateTargetName`
|
|
704
|
+
* falls back to its default.
|
|
705
705
|
*/
|
|
706
|
-
resolvePluginOptions(options: unknown): ConformetryPluginOptions;
|
|
706
|
+
resolvePluginOptions(options: unknown, surface?: string): ConformetryPluginOptions;
|
|
707
707
|
}
|
|
708
708
|
|
|
709
709
|
/** A message split into the emoji the console shows and the prose telemetry stores. */
|
|
@@ -850,9 +850,10 @@ export declare class PluginService {
|
|
|
850
850
|
*
|
|
851
851
|
* Nx passes plugin options to `createNodes` but not to a generator or to an
|
|
852
852
|
* inferred target's executor, which see only what the caller typed. Reading
|
|
853
|
-
* `nx.json` here
|
|
854
|
-
*
|
|
855
|
-
*
|
|
853
|
+
* `nx.json` here is what supplies the path, which has no default: the
|
|
854
|
+
* registration is the base, anything Nx did pass wins over it, then the
|
|
855
|
+
* executor's `configuration` option wins over both. A path given by none is
|
|
856
|
+
* refused, by the configuration layer.
|
|
856
857
|
*/
|
|
857
858
|
private resolveOptions;
|
|
858
859
|
/**
|
|
@@ -998,6 +999,8 @@ declare interface RunGeneratorArguments {
|
|
|
998
999
|
|
|
999
1000
|
/** Arguments for validating one project. */
|
|
1000
1001
|
declare interface RunValidationArguments {
|
|
1002
|
+
/** The executor's `configuration` option, taking precedence over `nx.json`. */
|
|
1003
|
+
readonly configuration?: string;
|
|
1001
1004
|
readonly languageNames?: string[];
|
|
1002
1005
|
readonly options: unknown;
|
|
1003
1006
|
readonly project: ProjectScope;
|
package/dist/src/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, f as r, l as i, m as a, o, p as s, r as c, s as l, u, v as d, y as f } from "../plugin-context.utilities-
|
|
2
|
-
import { n as p, t as m } from "../bootstrap.utilities-
|
|
1
|
+
import { a as e, c as t, d as n, f as r, l as i, m as a, o, p as s, r as c, s as l, u, v as d, y as f } from "../plugin-context.utilities-BKyER2ln.js";
|
|
2
|
+
import { n as p, t as m } from "../bootstrap.utilities-SrW64gG2.js";
|
|
3
3
|
import h from "node:path";
|
|
4
4
|
//#region projects/ic-suite/conformetry/conformetry-nx/src/index.ts
|
|
5
5
|
var g = {
|
package/package.json
CHANGED
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
"url": "https://github.com/organizzolini/codebase/issues"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@conformetry/configuration": "0.0.
|
|
11
|
-
"@conformetry/generation": "0.0.
|
|
12
|
-
"@conformetry/output": "0.0.
|
|
13
|
-
"@conformetry/validation": "0.0.
|
|
10
|
+
"@conformetry/configuration": "0.0.30",
|
|
11
|
+
"@conformetry/generation": "0.0.30",
|
|
12
|
+
"@conformetry/output": "0.0.29",
|
|
13
|
+
"@conformetry/validation": "0.0.29",
|
|
14
14
|
"@nestjs/common": "^11.1.21 || ^12.0.1",
|
|
15
15
|
"@nestjs/core": "^11.1.21 || ^12.0.1",
|
|
16
16
|
"@nx/devkit": "^23.0.0",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"strict": true
|
|
85
85
|
},
|
|
86
86
|
"types": "./dist/src/index.d.ts",
|
|
87
|
-
"version": "0.0.
|
|
87
|
+
"version": "0.0.30"
|
|
88
88
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"$schema": "http://json-schema.org/schema",
|
|
3
3
|
"description": "Validate a project's conformetry instances against their templates.",
|
|
4
4
|
"properties": {
|
|
5
|
-
"
|
|
6
|
-
"description": "Path to the conformetry configuration file, relative to the workspace root.",
|
|
5
|
+
"configuration": {
|
|
6
|
+
"description": "Path to the conformetry configuration file, relative to the workspace root. Falls back to the configurationPath option of the @conformetry/nx plugin in nx.json.",
|
|
7
7
|
"type": "string"
|
|
8
8
|
},
|
|
9
9
|
"languages": {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"$schema": "http://json-schema.org/schema",
|
|
3
3
|
"description": "Regenerate the workspace's conformetry generator plugin from the conformetry configuration.",
|
|
4
4
|
"properties": {
|
|
5
|
-
"
|
|
6
|
-
"description": "Path to the conformetry configuration file, relative to the workspace root.",
|
|
5
|
+
"configuration": {
|
|
6
|
+
"description": "Path to the conformetry configuration file, relative to the workspace root. Falls back to the configurationPath option of the @conformetry/nx plugin in nx.json.",
|
|
7
7
|
"type": "string"
|
|
8
8
|
},
|
|
9
9
|
"outputPath": {
|