@codependix/nx 0.0.14 β 0.0.15
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 +11 -0
- package/README.md +70 -59
- package/dist/{plugin-context.utilities-Co0pwFv0.js β plugin-context.utilities-oWfnrfib.js} +52 -53
- package/dist/src/executors/gate/executor.d.ts +1 -1
- package/dist/src/executors/gate/executor.js +1 -1
- package/dist/src/executors/gate/hasher.js +1 -1
- package/dist/src/index.d.ts +15 -14
- package/dist/src/index.js +24 -24
- package/package.json +3 -2
- package/src/executors/gate/schema.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## 0.0.15 (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 codependix-configuration to 0.0.30
|
|
10
|
+
- Updated codependix-cli to 0.0.30
|
|
11
|
+
|
|
1
12
|
## 0.0.14 (2026-10-15)
|
|
2
13
|
|
|
3
14
|
### π
Refactors
|
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ Register it in `nx.json`:
|
|
|
31
31
|
{
|
|
32
32
|
"plugin": "@codependix/nx",
|
|
33
33
|
"options": {
|
|
34
|
-
"configurationPath": "configuration/codependix.config.ts",
|
|
34
|
+
"configurationPath": "projects/configuration/codependix.config.ts",
|
|
35
35
|
"gateTargetName": "codependix-gate"
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -41,7 +41,7 @@ Register it in `nx.json`:
|
|
|
41
41
|
|
|
42
42
|
| Option | Meaning |
|
|
43
43
|
| ------ | ------- |
|
|
44
|
-
| `configurationPath` | Where the codependix configuration lives.
|
|
44
|
+
| `configurationPath` | **Required.** Where the codependix configuration lives. Registering the plugin without it fails inference, naming the option; there is no default path |
|
|
45
45
|
| `gateTargetName` | Name of the inferred gate target. `codependix-gate` when omitted |
|
|
46
46
|
|
|
47
47
|
The gate runs the command line under the `@swc-node/register` hooks, which
|
|
@@ -70,7 +70,7 @@ Each gate runs, from the workspace root:
|
|
|
70
70
|
|
|
71
71
|
```bash
|
|
72
72
|
node --import <file URL of @codependix/nx/loader> <@codependix/cli/main> \
|
|
73
|
-
map --directory <workspaceRoot> --config <
|
|
73
|
+
map --directory <workspaceRoot> --config <configuration> \
|
|
74
74
|
--check boundaries --projects <project>
|
|
75
75
|
```
|
|
76
76
|
|
|
@@ -179,12 +179,14 @@ nx run logging:codependix-gate --tags=type:package --dependencies=false
|
|
|
179
179
|
| `projects` | Nx project names to judge, replacing the target's own project |
|
|
180
180
|
| `tags` | Nx project tags, judging every project carrying **any** of them |
|
|
181
181
|
| `dependencies` | Build over the judged projects' Nx dependency closure. `true` by default; `false` builds over the judged projects alone |
|
|
182
|
-
| `
|
|
182
|
+
| `configuration` | Overrides the registered configuration path. Required if the registration names none; a blank value is refused |
|
|
183
183
|
|
|
184
184
|
Nx hands plugin options to inference and to nothing else, so a gate given no
|
|
185
|
-
`
|
|
186
|
-
|
|
187
|
-
|
|
185
|
+
`configuration` reads this plugin's `configurationPath` registration back out of
|
|
186
|
+
`nx.json`, so the file a gate reads is the file its cache inputs named. A gate
|
|
187
|
+
with neither fails, naming the option: no path is assumed. The executor option
|
|
188
|
+
is not Nx's own `--configuration` flag, which selects a target configuration
|
|
189
|
+
such as `check` or `write`.
|
|
188
190
|
|
|
189
191
|
## Packages
|
|
190
192
|
|
|
@@ -225,8 +227,10 @@ Dependency graphs exported by [codependix](https://github.com/Organizzolini/code
|
|
|
225
227
|
```mermaid
|
|
226
228
|
graph LR
|
|
227
229
|
codependix_cli["codependix-cli"]
|
|
230
|
+
codependix_configuration["codependix-configuration"]
|
|
228
231
|
codependix_nx["codependix-nx"]
|
|
229
232
|
codependix_nx --> codependix_cli
|
|
233
|
+
codependix_nx --> codependix_configuration
|
|
230
234
|
classDef subject fill:#7c3aed,color:#fff,stroke:#4c1d95,stroke-width:2px
|
|
231
235
|
class codependix_nx subject
|
|
232
236
|
```
|
|
@@ -237,12 +241,19 @@ graph LR
|
|
|
237
241
|
<!-- codependix:start name="codependix-nestjs-modules" -->
|
|
238
242
|
```mermaid
|
|
239
243
|
flowchart LR
|
|
244
|
+
ConfigurationModule
|
|
240
245
|
GateModule
|
|
246
|
+
InputModule
|
|
241
247
|
MainModule
|
|
248
|
+
OverrideResolutionModule
|
|
242
249
|
PluginModule
|
|
250
|
+
ConfigurationModule --> InputModule
|
|
251
|
+
ConfigurationModule --> OverrideResolutionModule
|
|
252
|
+
GateModule --> ConfigurationModule
|
|
243
253
|
GateModule --> PluginModule
|
|
244
254
|
MainModule --> GateModule
|
|
245
255
|
MainModule --> PluginModule
|
|
256
|
+
PluginModule --> ConfigurationModule
|
|
246
257
|
```
|
|
247
258
|
<!-- codependix:end name="codependix-nestjs-modules" -->
|
|
248
259
|
|
|
@@ -347,13 +358,13 @@ Call stacks traced through `projects/ic-suite/codependix/codependix-nx`, deepest
|
|
|
347
358
|
|
|
348
359
|
| Measure | Value |
|
|
349
360
|
| --- | --- |
|
|
350
|
-
| Callables |
|
|
361
|
+
| Callables | 74 |
|
|
351
362
|
| Files | 22 |
|
|
352
|
-
| Calls traced |
|
|
363
|
+
| Calls traced | 90 |
|
|
353
364
|
| Call stacks | 3 |
|
|
354
365
|
| Deepest stack | 6 |
|
|
355
366
|
| Stacks through recursion | 0 |
|
|
356
|
-
| Unfollowable calls |
|
|
367
|
+
| Unfollowable calls | 6 |
|
|
357
368
|
|
|
358
369
|
### Limits
|
|
359
370
|
|
|
@@ -387,15 +398,15 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
387
398
|
```text
|
|
388
399
|
π gateExecutor(β¦): Promise<{ success: boolean; }> [projects/ic-suite/codependix/codependix-nx/src/executors/gate/executor.ts:21]
|
|
389
400
|
β³ Fails one project's task when a codependix boundary finding is charged to it.
|
|
390
|
-
ββ> GateService.run(args: RunGateArguments): Promise<boolean> [projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:
|
|
401
|
+
ββ> GateService.run(args: RunGateArguments): Promise<boolean> [projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:293]
|
|
391
402
|
β³ Runs one gate, and settles on whether it passed.
|
|
392
|
-
ββ> GateService.resolveConfigurationPath(
|
|
403
|
+
ββ> GateService.resolveConfigurationPath(args: { configuration?: string | undefined; workspaceRoot: string; }): string [projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:246]
|
|
393
404
|
β³ Resolves the configuration path one gate runs with.
|
|
394
|
-
ββ> PluginService.
|
|
395
|
-
β³
|
|
396
|
-
ββ>
|
|
397
|
-
|
|
398
|
-
|
|
405
|
+
ββ> PluginService.resolvePluginOptions(args: ResolvePluginOptionsArguments): CodependixPluginOptions [projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin.service.ts:156]
|
|
406
|
+
β³ Resolves the effective plugin options from an untrusted value. `configurationPath` is required and never searched for:β¦
|
|
407
|
+
ββ> ConfigurationService.requireConfigurationPath(configurationPath: string | undefined, surface: string): string [projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:309]
|
|
408
|
+
β³ Returns the main configuration path, refusing one that is missing.
|
|
409
|
+
ββ> ConfigurationPathRequiredError.constructor(surface: string): ConfigurationPathRequiredError [projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.constants.ts:304]
|
|
399
410
|
```
|
|
400
411
|
|
|
401
412
|
**3. `gateHasher`** β depth 6 Β· orphan-root
|
|
@@ -403,15 +414,15 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
403
414
|
```text
|
|
404
415
|
π gateHasher(task: Task, context: GateHasherContext): Promise<Hash> [projects/ic-suite/codependix/codependix-nx/src/executors/gate/hasher.ts:17]
|
|
405
416
|
β³ Hashes one gate task for Nx's cache.
|
|
406
|
-
ββ> GateService.hashTask(args: HashGateTaskArguments): Promise<Hash> [projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:
|
|
417
|
+
ββ> GateService.hashTask(args: HashGateTaskArguments): Promise<Hash> [projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:220]
|
|
407
418
|
β³ Hashes one gate task for Nx's cache β or, when it judges any project but its own, gives it a hash no run shares, so itsβ¦
|
|
408
|
-
ββ> GateService.judgesOwnProject(args: HashGateTaskArguments): boolean [projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:
|
|
419
|
+
ββ> GateService.judgesOwnProject(args: HashGateTaskArguments): boolean [projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:60]
|
|
409
420
|
β³ Whether a gate task judges exactly the project it belongs to.
|
|
410
|
-
ββ> GateService.resolveSelection(β¦): GateSelection [projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:
|
|
421
|
+
ββ> GateService.resolveSelection(β¦): GateSelection [projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:272]
|
|
411
422
|
β³ Resolves which projects one gate judges.
|
|
412
|
-
ββ> GateService.readNameList(value: readonly string[] | undefined): string[] [projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:
|
|
423
|
+
ββ> GateService.readNameList(value: readonly string[] | undefined): string[] [projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:86]
|
|
413
424
|
β³ Reads a list of names out of an executor's options.
|
|
414
|
-
ββ> GateService.filter(β¦)(entry: string): boolean [projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:
|
|
425
|
+
ββ> GateService.filter(β¦)(entry: string): boolean [projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:90]
|
|
415
426
|
```
|
|
416
427
|
|
|
417
428
|
### Breadth
|
|
@@ -420,24 +431,24 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
420
431
|
| --- | --- | --- | --- |
|
|
421
432
|
| `resolveToolInputs` | 5 | `locatePackage`, `warnUnresolved`, `isInsideWorkspace`, `resolveWorkspaceInputs`, `resolveExternalInputs` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts:65` |
|
|
422
433
|
| `anonymous` | 5 | `resolvePluginService`, `PluginService.inferTargets`, `resolveToolInputs`, `resolveTsconfigInputs`, `flatMap(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/index.ts:45` |
|
|
423
|
-
| `PluginService.readRegisteredOptions` | 4 | `PluginService.toRecord`, `PluginService.isUnknownArray`, `PluginService.find(β¦)`, `PluginService.map(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin.service.ts:
|
|
434
|
+
| `PluginService.readRegisteredOptions` | 4 | `PluginService.toRecord`, `PluginService.isUnknownArray`, `PluginService.find(β¦)`, `PluginService.map(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin.service.ts:134` |
|
|
424
435
|
|
|
425
436
|
<details>
|
|
426
437
|
<summary>32 more callables</summary>
|
|
427
438
|
|
|
428
439
|
| Callable | Breadth | Calls directly | Location |
|
|
429
440
|
| --- | --- | --- | --- |
|
|
430
|
-
| `GateService.
|
|
441
|
+
| `GateService.resolveConfigurationPath` | 4 | `ConfigurationService.requireConfigurationPath`, `PluginService.resolvePluginOptions`, `PluginService.readRegisteredOptions`, `GateService.readNxConfiguration` | `projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:246` |
|
|
442
|
+
| `GateService.run` | 4 | `GateService.buildCommandArguments`, `GateService.resolveSelection`, `GateService.resolveConfigurationPath`, `GateService.spawnCommandLine` | `projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:293` |
|
|
431
443
|
| `collectWorkspacePackages` | 4 | `map(β¦)`, `filter(β¦)`, `readDependencies`, `locatePackage` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts:103` |
|
|
432
444
|
| `followExtendsChain` | 4 | `readRegistryDependencies`, `readExtends`, `resolveExtendedBase`, `warnSkipped` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-tsconfig.utilities.ts:89` |
|
|
433
445
|
| `resolveExtendedBase` | 4 | `resolvePathBase`, `resolvePackageBase`, `isInsideWorkspace`, `readInstalledPackageName` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-tsconfig.utilities.ts:204` |
|
|
434
446
|
| `PluginService.selectProjectRoots` | 3 | `PluginService.filter(β¦)`, `PluginService.map(β¦)`, `PluginService.filter(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin.service.ts:65` |
|
|
435
447
|
| `PluginService.inferTargets` | 3 | `PluginService.resolvePluginOptions`, `PluginService.map(β¦)`, `PluginService.selectProjectRoots` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin.service.ts:99` |
|
|
436
|
-
| `PluginService.resolvePluginOptions` | 3 | `PluginService.toRecord`, `
|
|
437
|
-
| `GateService.judgesOwnProject` | 3 | `GateService.readTaskOptions`, `GateService.resolveSelection`, `GateService.toNameList` | `projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:
|
|
438
|
-
| `GateService.readNameList` | 3 | `GateService.filter(β¦)`, `GateService.map(β¦)`, `GateService.flatMap(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:
|
|
439
|
-
| `GateService.anonymous` | 3 | `GateService.on(β¦)`, `GateService.on(β¦)`, `GateService.on(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:
|
|
440
|
-
| `GateService.resolveConfigurationPath` | 3 | `PluginService.resolvePluginOptions`, `PluginService.readRegisteredOptions`, `GateService.readNxConfiguration` | `projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:241` |
|
|
448
|
+
| `PluginService.resolvePluginOptions` | 3 | `PluginService.toRecord`, `ConfigurationService.requireConfigurationPath`, `PluginService.readString` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin.service.ts:156` |
|
|
449
|
+
| `GateService.judgesOwnProject` | 3 | `GateService.readTaskOptions`, `GateService.resolveSelection`, `GateService.toNameList` | `projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:60` |
|
|
450
|
+
| `GateService.readNameList` | 3 | `GateService.filter(β¦)`, `GateService.map(β¦)`, `GateService.flatMap(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:86` |
|
|
451
|
+
| `GateService.anonymous` | 3 | `GateService.on(β¦)`, `GateService.on(β¦)`, `GateService.on(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:148` |
|
|
441
452
|
| `resolveExternalInputs` | 3 | `filter(β¦)`, `map(β¦)`, `readDependencies` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts:197` |
|
|
442
453
|
| `resolveWorkspaceInputs` | 3 | `collectWorkspacePackages`, `warnUnresolved`, `flatMap(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts:209` |
|
|
443
454
|
| `readRegistryDependencies` | 3 | `map(β¦)`, `filter(β¦)`, `readDependencies` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-tsconfig.utilities.ts:180` |
|
|
@@ -445,12 +456,12 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
445
456
|
| `resolveTsconfigInputs` | 2 | `followExtendsChain`, `map(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-tsconfig.utilities.ts:42` |
|
|
446
457
|
| `gateExecutor` | 2 | `resolveGateService`, `GateService.run` | `projects/ic-suite/codependix/codependix-nx/src/executors/gate/executor.ts:21` |
|
|
447
458
|
| `gateHasher` | 2 | `resolveGateService`, `GateService.hashTask` | `projects/ic-suite/codependix/codependix-nx/src/executors/gate/hasher.ts:17` |
|
|
448
|
-
| `PluginService.map(β¦)` | 1 | `PluginService.toRecord` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin.service.ts:
|
|
449
|
-
| `GateService.readTaskOptions` | 1 | `GateService.toRecord` | `projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:
|
|
450
|
-
| `GateService.spawnCommandLine` | 1 | `GateService.anonymous` | `projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:
|
|
451
|
-
| `GateService.toNameList` | 1 | `GateService.filter(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:
|
|
452
|
-
| `GateService.hashTask` | 1 | `GateService.judgesOwnProject` | `projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:
|
|
453
|
-
| `GateService.resolveSelection` | 1 | `GateService.readNameList` | `projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:
|
|
459
|
+
| `PluginService.map(β¦)` | 1 | `PluginService.toRecord` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin.service.ts:142` |
|
|
460
|
+
| `GateService.readTaskOptions` | 1 | `GateService.toRecord` | `projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:116` |
|
|
461
|
+
| `GateService.spawnCommandLine` | 1 | `GateService.anonymous` | `projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:144` |
|
|
462
|
+
| `GateService.toNameList` | 1 | `GateService.filter(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:167` |
|
|
463
|
+
| `GateService.hashTask` | 1 | `GateService.judgesOwnProject` | `projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:220` |
|
|
464
|
+
| `GateService.resolveSelection` | 1 | `GateService.readNameList` | `projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:272` |
|
|
454
465
|
| `resolveGateService` | 1 | `resolvePluginContext` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-context.utilities.ts:16` |
|
|
455
466
|
| `resolvePluginService` | 1 | `resolvePluginContext` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-context.utilities.ts:23` |
|
|
456
467
|
| `locatePackage` | 1 | `readManifest` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts:145` |
|
|
@@ -469,8 +480,8 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
469
480
|
|
|
470
481
|
### Project
|
|
471
482
|
|
|
472
|
-

|
|
484
|
+

|
|
474
485
|

|
|
475
486
|

|
|
476
487
|
|
|
@@ -481,24 +492,24 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
481
492
|

|
|
482
493
|

|
|
483
494
|

|
|
484
|
-

|
|
485
496
|

|
|
486
497
|
|
|
487
498
|
### JavaScript
|
|
488
499
|
|
|
489
500
|

|
|
490
501
|

|
|
491
|
-

|
|
492
503
|

|
|
493
|
-

|
|
505
|
+

|
|
506
|
+

|
|
496
507
|

|
|
497
|
-

|
|
509
|
+

|
|
510
|
+

|
|
511
|
+

|
|
512
|
+

|
|
502
513
|

|
|
503
514
|
|
|
504
515
|
### Python
|
|
@@ -519,16 +530,16 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
519
530
|
### JSON
|
|
520
531
|
|
|
521
532
|

|
|
522
|
-

|
|
523
534
|

|
|
524
535
|

|
|
525
|
-

|
|
537
|
+

|
|
527
538
|

|
|
528
539
|

|
|
529
540
|

|
|
530
541
|

|
|
531
|
-

|
|
532
543
|

|
|
533
544
|
|
|
534
545
|
### YAML
|
|
@@ -654,23 +665,23 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
654
665
|
### Markdown
|
|
655
666
|
|
|
656
667
|

|
|
657
|
-

|
|
658
669
|

|
|
659
|
-

|
|
671
|
+

|
|
661
672
|

|
|
662
673
|

|
|
663
674
|

|
|
664
|
-

|
|
676
|
+

|
|
677
|
+

|
|
667
678
|

|
|
668
679
|

|
|
669
680
|

|
|
670
|
-

|
|
671
682
|

|
|
672
683
|

|
|
673
|
-

|
|
674
685
|

|
|
675
686
|

|
|
676
687
|
<!-- codometer:end -->
|
package/dist/{plugin-context.utilities-Co0pwFv0.js β plugin-context.utilities-oWfnrfib.js}
RENAMED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import "reflect-metadata";
|
|
2
2
|
import { NestFactory as e } from "@nestjs/core";
|
|
3
3
|
import { Injectable as t, Module as n } from "@nestjs/common";
|
|
4
|
-
import {
|
|
4
|
+
import { ConfigurationModule as r, ConfigurationService as i } from "@codependix/configuration";
|
|
5
5
|
import a from "node:path";
|
|
6
6
|
import { spawn as o } from "node:child_process";
|
|
7
7
|
import { randomUUID as s } from "node:crypto";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { readFileSync as c } from "node:fs";
|
|
9
|
+
import { createRequire as l } from "node:module";
|
|
10
|
+
import { pathToFileURL as u } from "node:url";
|
|
10
11
|
//#region \0rolldown/runtime.js
|
|
11
|
-
var
|
|
12
|
+
var d = Object.defineProperty, __name = (e, t) => d(e, "name", {
|
|
12
13
|
value: t,
|
|
13
14
|
configurable: !0
|
|
14
|
-
}),
|
|
15
|
+
}), f = "**/{project.json,codependix.config.*}", p = "project.json", m = "{projectRoot}/codependix.config.*", h = "__codependixPluginContext", g = "@codependix/nx", _ = "codependix-gate", v = "`configurationPath` option on the @codependix/nx plugin's entry in nx.json", y = "@codependix/cli", b = "workspace:", x = [
|
|
15
16
|
"file:",
|
|
16
17
|
"link:",
|
|
17
18
|
"portal:",
|
|
18
|
-
|
|
19
|
-
],
|
|
19
|
+
b
|
|
20
|
+
], S = ["package.json", "src/**/!(*.test.*|*.spec.*)"], C = "{workspaceRoot}/tsconfig.json", w = "tsconfig.json", T = {
|
|
20
21
|
outside: "it lies outside the workspace",
|
|
21
22
|
unresolved: "it resolves to no file"
|
|
22
23
|
};
|
|
@@ -35,8 +36,11 @@ function __decorate(e, t, n, r) {
|
|
|
35
36
|
}
|
|
36
37
|
//#endregion
|
|
37
38
|
//#region projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin.service.ts
|
|
38
|
-
var
|
|
39
|
-
|
|
39
|
+
var E = class PluginService {
|
|
40
|
+
configurationService;
|
|
41
|
+
constructor(e) {
|
|
42
|
+
this.configurationService = e;
|
|
43
|
+
}
|
|
40
44
|
isUnknownArray(e) {
|
|
41
45
|
return Array.isArray(e);
|
|
42
46
|
}
|
|
@@ -45,23 +49,20 @@ var T = class PluginService {
|
|
|
45
49
|
return typeof t == "string" && t !== "" ? t : void 0;
|
|
46
50
|
}
|
|
47
51
|
selectProjectRoots(e) {
|
|
48
|
-
return e.filter((e) => a.basename(e) ===
|
|
52
|
+
return e.filter((e) => a.basename(e) === p).map((e) => a.dirname(e)).filter((e) => e !== ".");
|
|
49
53
|
}
|
|
50
54
|
toRecord(e) {
|
|
51
55
|
return typeof e == "object" && e ? { ...e } : {};
|
|
52
56
|
}
|
|
53
57
|
inferTargets(e) {
|
|
54
|
-
let t = this.resolvePluginOptions({
|
|
55
|
-
exists: (t) => r(a.join(e.workspaceRoot, t)),
|
|
56
|
-
options: e.options
|
|
57
|
-
}), n = { [t.gateTargetName]: {
|
|
58
|
+
let t = this.resolvePluginOptions({ options: e.options }), n = { [t.gateTargetName]: {
|
|
58
59
|
cache: !0,
|
|
59
|
-
executor: `${
|
|
60
|
+
executor: `${g}:gate`,
|
|
60
61
|
inputs: [
|
|
61
62
|
"default",
|
|
62
63
|
"^default",
|
|
63
64
|
`{workspaceRoot}/${t.configurationPath}`,
|
|
64
|
-
|
|
65
|
+
m,
|
|
65
66
|
...e.toolInputs
|
|
66
67
|
],
|
|
67
68
|
options: {}
|
|
@@ -77,10 +78,10 @@ var T = class PluginService {
|
|
|
77
78
|
resolvePluginOptions(e) {
|
|
78
79
|
let t = this.toRecord(e.options);
|
|
79
80
|
return {
|
|
80
|
-
configurationPath: this.readString({
|
|
81
|
+
configurationPath: this.configurationService.requireConfigurationPath(this.readString({
|
|
81
82
|
key: "configurationPath",
|
|
82
83
|
record: t
|
|
83
|
-
})
|
|
84
|
+
}), v),
|
|
84
85
|
gateTargetName: this.readString({
|
|
85
86
|
key: "gateTargetName",
|
|
86
87
|
record: t
|
|
@@ -88,22 +89,23 @@ var T = class PluginService {
|
|
|
88
89
|
};
|
|
89
90
|
}
|
|
90
91
|
};
|
|
91
|
-
|
|
92
|
+
E = __decorate([t(), __decorateMetadata("design:paramtypes", [i === void 0 ? Object : i])], E);
|
|
92
93
|
//#endregion
|
|
93
94
|
//#region projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin.module.ts
|
|
94
|
-
var
|
|
95
|
-
|
|
95
|
+
var D = class PluginModule {};
|
|
96
|
+
D = __decorate([n({
|
|
96
97
|
controllers: [],
|
|
97
|
-
exports: [
|
|
98
|
-
imports: [],
|
|
99
|
-
providers: [
|
|
100
|
-
})],
|
|
98
|
+
exports: [E],
|
|
99
|
+
imports: [r],
|
|
100
|
+
providers: [E]
|
|
101
|
+
})], D);
|
|
101
102
|
//#endregion
|
|
102
103
|
//#region projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.constants.ts
|
|
103
|
-
var
|
|
104
|
+
var O = "@codependix/nx/loader", k = "@codependix/cli/main", A = "nx.json", j = "`configuration` executor option", M = class GateService {
|
|
105
|
+
configurationService;
|
|
104
106
|
pluginService;
|
|
105
|
-
constructor(e) {
|
|
106
|
-
this.pluginService =
|
|
107
|
+
constructor(e, t) {
|
|
108
|
+
this.configurationService = e, this.pluginService = t;
|
|
107
109
|
}
|
|
108
110
|
judgesOwnProject(e) {
|
|
109
111
|
let { project: t } = e.task.target, n = this.readTaskOptions(e), r = this.resolveSelection({
|
|
@@ -120,7 +122,7 @@ var D = "@codependix/nx/loader", O = "@codependix/cli/main", k = "nx.json", A =
|
|
|
120
122
|
}
|
|
121
123
|
readNxConfiguration(e) {
|
|
122
124
|
try {
|
|
123
|
-
return JSON.parse(
|
|
125
|
+
return JSON.parse(c(a.join(e, A), "utf8"));
|
|
124
126
|
} catch {
|
|
125
127
|
return;
|
|
126
128
|
}
|
|
@@ -181,10 +183,7 @@ var D = "@codependix/nx/loader", O = "@codependix/cli/main", k = "nx.json", A =
|
|
|
181
183
|
};
|
|
182
184
|
}
|
|
183
185
|
resolveConfigurationPath(e) {
|
|
184
|
-
return e.
|
|
185
|
-
exists: (t) => r(a.join(e.workspaceRoot, t)),
|
|
186
|
-
options: this.pluginService.readRegisteredOptions(this.readNxConfiguration(e.workspaceRoot))
|
|
187
|
-
}).configurationPath;
|
|
186
|
+
return e.configuration === void 0 ? this.pluginService.resolvePluginOptions({ options: this.pluginService.readRegisteredOptions(this.readNxConfiguration(e.workspaceRoot)) }).configurationPath : this.configurationService.requireConfigurationPath(e.configuration, j);
|
|
188
187
|
}
|
|
189
188
|
resolveSelection(e) {
|
|
190
189
|
let t = this.readNameList(e.options.projects), n = this.readNameList(e.options.tags);
|
|
@@ -201,13 +200,13 @@ var D = "@codependix/nx/loader", O = "@codependix/cli/main", k = "nx.json", A =
|
|
|
201
200
|
async run(e) {
|
|
202
201
|
let t = this.buildCommandArguments({
|
|
203
202
|
...this.resolveSelection(e),
|
|
204
|
-
cliEntryPath:
|
|
203
|
+
cliEntryPath: l(import.meta.url).resolve(k),
|
|
205
204
|
configurationPath: this.resolveConfigurationPath({
|
|
206
|
-
|
|
205
|
+
configuration: e.options.configuration,
|
|
207
206
|
workspaceRoot: e.workspaceRoot
|
|
208
207
|
}),
|
|
209
208
|
dependencies: e.options.dependencies !== !1,
|
|
210
|
-
loaderUrl: l(
|
|
209
|
+
loaderUrl: u(l(import.meta.url).resolve(O)).href,
|
|
211
210
|
workspaceRoot: e.workspaceRoot
|
|
212
211
|
});
|
|
213
212
|
return await this.spawnCommandLine({
|
|
@@ -216,39 +215,39 @@ var D = "@codependix/nx/loader", O = "@codependix/cli/main", k = "nx.json", A =
|
|
|
216
215
|
});
|
|
217
216
|
}
|
|
218
217
|
};
|
|
219
|
-
|
|
218
|
+
M = __decorate([t(), __decorateMetadata("design:paramtypes", [i === void 0 ? Object : i, E === void 0 ? Object : E])], M);
|
|
220
219
|
//#endregion
|
|
221
220
|
//#region projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.module.ts
|
|
222
|
-
var
|
|
223
|
-
|
|
221
|
+
var N = class GateModule {};
|
|
222
|
+
N = __decorate([n({
|
|
224
223
|
controllers: [],
|
|
225
|
-
exports: [
|
|
226
|
-
imports: [
|
|
227
|
-
providers: [
|
|
228
|
-
})],
|
|
224
|
+
exports: [M],
|
|
225
|
+
imports: [r, D],
|
|
226
|
+
providers: [M]
|
|
227
|
+
})], N);
|
|
229
228
|
//#endregion
|
|
230
229
|
//#region projects/ic-suite/codependix/codependix-nx/src/codependix-nx.module.ts
|
|
231
|
-
var
|
|
232
|
-
|
|
230
|
+
var P = class MainModule {};
|
|
231
|
+
P = __decorate([n({
|
|
233
232
|
controllers: [],
|
|
234
|
-
exports: [
|
|
235
|
-
imports: [
|
|
233
|
+
exports: [N, D],
|
|
234
|
+
imports: [N, D],
|
|
236
235
|
providers: []
|
|
237
|
-
})],
|
|
236
|
+
})], P);
|
|
238
237
|
//#endregion
|
|
239
238
|
//#region projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-context.utilities.ts
|
|
240
239
|
async function resolveGateService() {
|
|
241
|
-
return (await resolvePluginContext()).get(
|
|
240
|
+
return (await resolvePluginContext()).get(M);
|
|
242
241
|
}
|
|
243
242
|
async function resolvePluginService() {
|
|
244
|
-
return (await resolvePluginContext()).get(
|
|
243
|
+
return (await resolvePluginContext()).get(E);
|
|
245
244
|
}
|
|
246
245
|
async function resolvePluginContext() {
|
|
247
246
|
let t = globalThis;
|
|
248
|
-
return t[
|
|
247
|
+
return t[h] ??= e.createApplicationContext(P, {
|
|
249
248
|
abortOnError: !1,
|
|
250
249
|
logger: !1
|
|
251
|
-
}), await t[
|
|
250
|
+
}), await t[h];
|
|
252
251
|
}
|
|
253
252
|
//#endregion
|
|
254
|
-
export {
|
|
253
|
+
export { C as _, M as a, y as c, x as d, w as f, b as g, S as h, N as i, g as l, T as m, resolvePluginService as n, D as o, f as p, P as r, E as s, resolveGateService as t, _ as u, __name as v };
|
|
@@ -24,7 +24,7 @@ declare type GateExecutorOptions = GateOptions;
|
|
|
24
24
|
/** Options the gate executor accepts. */
|
|
25
25
|
declare interface GateOptions {
|
|
26
26
|
/** Workspace-relative configuration path; the registration's when omitted. */
|
|
27
|
-
readonly
|
|
27
|
+
readonly configuration?: string | undefined;
|
|
28
28
|
/** Build over the named projects' dependency closure. Defaults to true. */
|
|
29
29
|
readonly dependencies?: boolean | undefined;
|
|
30
30
|
/** Nx project names to judge, replacing the target's own project. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../../plugin-context.utilities-
|
|
1
|
+
import { t as e } from "../../../plugin-context.utilities-oWfnrfib.js";
|
|
2
2
|
//#region projects/ic-suite/codependix/codependix-nx/src/executors/gate/executor.ts
|
|
3
3
|
async function gateExecutor(t, n) {
|
|
4
4
|
return { success: await (await e()).run({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../../plugin-context.utilities-
|
|
1
|
+
import { t as e } from "../../../plugin-context.utilities-oWfnrfib.js";
|
|
2
2
|
//#region projects/ic-suite/codependix/codependix-nx/src/executors/gate/hasher.ts
|
|
3
3
|
async function gateHasher(t, n) {
|
|
4
4
|
return await (await e()).hashTask({
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ConfigurationService } from '@codependix/configuration';
|
|
1
2
|
import { CreateNodes } from '@nx/devkit';
|
|
2
3
|
import { Hash } from '@nx/devkit';
|
|
3
4
|
import { HasherContext } from '@nx/devkit';
|
|
@@ -25,7 +26,7 @@ export default codependixPlugin;
|
|
|
25
26
|
|
|
26
27
|
/** Options accepted from this plugin's `nx.json` registration. */
|
|
27
28
|
export declare interface CodependixPluginOptions {
|
|
28
|
-
/** Where the codependix configuration lives, workspace-root relative. */
|
|
29
|
+
/** Where the codependix configuration lives, workspace-root relative. Required. */
|
|
29
30
|
readonly configurationPath: string;
|
|
30
31
|
/** Name of the inferred per-project gate target. */
|
|
31
32
|
readonly gateTargetName: string;
|
|
@@ -56,7 +57,7 @@ export declare class GateModule {
|
|
|
56
57
|
/** Options the gate executor accepts. */
|
|
57
58
|
export declare interface GateOptions {
|
|
58
59
|
/** Workspace-relative configuration path; the registration's when omitted. */
|
|
59
|
-
readonly
|
|
60
|
+
readonly configuration?: string | undefined;
|
|
60
61
|
/** Build over the named projects' dependency closure. Defaults to true. */
|
|
61
62
|
readonly dependencies?: boolean | undefined;
|
|
62
63
|
/** Nx project names to judge, replacing the target's own project. */
|
|
@@ -81,8 +82,9 @@ export declare interface GateSelection {
|
|
|
81
82
|
* plugin under no such loader, so only a fresh `node --import` can provide it.
|
|
82
83
|
*/
|
|
83
84
|
export declare class GateService {
|
|
85
|
+
private readonly configurationService;
|
|
84
86
|
private readonly pluginService;
|
|
85
|
-
constructor(pluginService: PluginService);
|
|
87
|
+
constructor(configurationService: ConfigurationService, pluginService: PluginService);
|
|
86
88
|
/**
|
|
87
89
|
* Whether a gate task judges exactly the project it belongs to.
|
|
88
90
|
*
|
|
@@ -151,13 +153,13 @@ export declare class GateService {
|
|
|
151
153
|
/**
|
|
152
154
|
* Resolves the configuration path one gate runs with.
|
|
153
155
|
*
|
|
154
|
-
* A
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
156
|
+
* A `configuration` option the target was given wins, and is refused when
|
|
157
|
+
* blank. Otherwise the path this plugin was registered with is read back
|
|
158
|
+
* out of `nx.json`, so the file a gate reads is always the file its cache
|
|
159
|
+
* inputs named. A gate given neither throws: no default path is assumed.
|
|
158
160
|
*/
|
|
159
161
|
resolveConfigurationPath(args: {
|
|
160
|
-
|
|
162
|
+
configuration?: string | undefined;
|
|
161
163
|
workspaceRoot: string;
|
|
162
164
|
}): string;
|
|
163
165
|
/**
|
|
@@ -243,7 +245,8 @@ export declare class PluginModule {
|
|
|
243
245
|
* from being built.
|
|
244
246
|
*/
|
|
245
247
|
export declare class PluginService {
|
|
246
|
-
|
|
248
|
+
private readonly configurationService;
|
|
249
|
+
constructor(configurationService: ConfigurationService);
|
|
247
250
|
/** Narrows an untrusted value to an array without widening it to `any`. */
|
|
248
251
|
private isUnknownArray;
|
|
249
252
|
/** Reads a non-empty string field from an untrusted record. */
|
|
@@ -282,9 +285,9 @@ export declare class PluginService {
|
|
|
282
285
|
/**
|
|
283
286
|
* Resolves the effective plugin options from an untrusted value.
|
|
284
287
|
*
|
|
285
|
-
*
|
|
286
|
-
*
|
|
287
|
-
*
|
|
288
|
+
* `configurationPath` is required and never searched for: it becomes a cache
|
|
289
|
+
* input, and a guessed path naming a file that does not exist would leave
|
|
290
|
+
* every gate cached across an edit to the one that does.
|
|
288
291
|
*/
|
|
289
292
|
resolvePluginOptions(args: ResolvePluginOptionsArguments): CodependixPluginOptions;
|
|
290
293
|
}
|
|
@@ -294,8 +297,6 @@ export declare function resolveGateService(): Promise<GateService>;
|
|
|
294
297
|
|
|
295
298
|
/** Arguments for resolving the plugin options from an untrusted value. */
|
|
296
299
|
declare interface ResolvePluginOptionsArguments {
|
|
297
|
-
/** Whether a workspace-relative path exists, for the default search. */
|
|
298
|
-
readonly exists: (candidatePath: string) => boolean;
|
|
299
300
|
/** Whatever the `nx.json` registration holds, unvalidated. */
|
|
300
301
|
readonly options: unknown;
|
|
301
302
|
}
|
package/dist/src/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g } from "../plugin-context.utilities-
|
|
2
|
-
import
|
|
3
|
-
import x from "node:
|
|
1
|
+
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g } from "../plugin-context.utilities-oWfnrfib.js";
|
|
2
|
+
import _ from "node:path";
|
|
3
|
+
import { existsSync as v, readFileSync as y, realpathSync as b, statSync as x } from "node:fs";
|
|
4
4
|
import { createRequire as S } from "node:module";
|
|
5
5
|
import { logger as C, readJsonFile as w } from "@nx/devkit";
|
|
6
6
|
//#region projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts
|
|
7
7
|
function isInsideWorkspace(e) {
|
|
8
|
-
let t =
|
|
9
|
-
return !(t.startsWith("..") ||
|
|
8
|
+
let t = _.relative(b(e.workspaceRoot), e.directory);
|
|
9
|
+
return !(t.startsWith("..") || _.isAbsolute(t) || t.split(_.sep).includes("node_modules"));
|
|
10
10
|
}
|
|
11
11
|
function readDependencies(e) {
|
|
12
12
|
let t = readManifest(e);
|
|
@@ -41,7 +41,7 @@ function collectWorkspacePackages(e) {
|
|
|
41
41
|
let i = readDependencies(e).filter(([, e]) => String(e).startsWith(a)).map(([e]) => e);
|
|
42
42
|
for (let a of i) {
|
|
43
43
|
let i = locatePackage({
|
|
44
|
-
fromFile:
|
|
44
|
+
fromFile: _.join(e, "package.json"),
|
|
45
45
|
name: a
|
|
46
46
|
});
|
|
47
47
|
i === void 0 ? n.add(a) : t.has(i) || (t.add(i), r.push(i));
|
|
@@ -55,19 +55,19 @@ function collectWorkspacePackages(e) {
|
|
|
55
55
|
function locatePackage(e) {
|
|
56
56
|
let t;
|
|
57
57
|
try {
|
|
58
|
-
t =
|
|
58
|
+
t = _.dirname(b(S(e.fromFile).resolve(e.name)));
|
|
59
59
|
} catch {
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
|
-
for (;; t =
|
|
62
|
+
for (;; t = _.dirname(t)) {
|
|
63
63
|
if (readManifest(t).name === e.name) return t;
|
|
64
|
-
if (
|
|
64
|
+
if (_.dirname(t) === t) return;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
function readManifest(e) {
|
|
68
|
-
let t =
|
|
68
|
+
let t = _.join(e, "package.json");
|
|
69
69
|
try {
|
|
70
|
-
let e =
|
|
70
|
+
let e = v(t) ? JSON.parse(y(t, "utf8")) : void 0;
|
|
71
71
|
return typeof e == "object" && e ? { ...e } : {};
|
|
72
72
|
} catch {
|
|
73
73
|
return {};
|
|
@@ -78,11 +78,11 @@ function resolveExternalInputs(e) {
|
|
|
78
78
|
return [{ externalDependencies: [n, ...t].toSorted() }];
|
|
79
79
|
}
|
|
80
80
|
function resolveWorkspaceInputs(e) {
|
|
81
|
-
let t =
|
|
81
|
+
let t = b(e.workspaceRoot), { directories: n, unresolved: r } = collectWorkspacePackages(e.cliDirectory);
|
|
82
82
|
return r.length > 0 && warnUnresolved({
|
|
83
83
|
logger: e.logger,
|
|
84
84
|
names: r
|
|
85
|
-
}), [...n].flatMap((e) => o.map((n) => `{workspaceRoot}/${
|
|
85
|
+
}), [...n].flatMap((e) => o.map((n) => `{workspaceRoot}/${_.relative(t, e)}/${n}`)).toSorted();
|
|
86
86
|
}
|
|
87
87
|
function toRecord(e) {
|
|
88
88
|
return typeof e == "object" && e ? { ...e } : {};
|
|
@@ -94,10 +94,10 @@ function warnUnresolved(e) {
|
|
|
94
94
|
//#region projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-tsconfig.utilities.ts
|
|
95
95
|
function resolveTsconfigInputs(t) {
|
|
96
96
|
try {
|
|
97
|
-
let e =
|
|
97
|
+
let e = b(t.workspaceRoot), { files: n, packages: r } = followExtendsChain({
|
|
98
98
|
logger: t.logger,
|
|
99
99
|
workspaceRoot: e
|
|
100
|
-
}), i = [...n].map((t) => `{workspaceRoot}/${
|
|
100
|
+
}), i = [...n].map((t) => `{workspaceRoot}/${_.relative(e, t).split(_.sep).join("/")}`).toSorted();
|
|
101
101
|
return r.size === 0 ? i : [...i, { externalDependencies: [...r].toSorted() }];
|
|
102
102
|
} catch (n) {
|
|
103
103
|
return t.logger.warn(`πΈοΈ Skipped following the bases the root tsconfig.json extends, so a change to one will not invalidate a cached codependix gate: ${String(n)}`), [e];
|
|
@@ -107,7 +107,7 @@ function describeSkippedBase(e) {
|
|
|
107
107
|
return e.kind === "undeclared" ? `the root package.json does not declare ${e.name} from a registry` : l[e.kind];
|
|
108
108
|
}
|
|
109
109
|
function followExtendsChain(e) {
|
|
110
|
-
let t =
|
|
110
|
+
let t = _.join(e.workspaceRoot, "tsconfig.json"), n = readRegistryDependencies(e.workspaceRoot), r = /* @__PURE__ */ new Set([t]), i = /* @__PURE__ */ new Set(), a = v(t) ? [t] : [];
|
|
111
111
|
for (let t = a.pop(); t !== void 0; t = a.pop()) for (let o of readExtends({
|
|
112
112
|
...e,
|
|
113
113
|
file: t
|
|
@@ -134,18 +134,18 @@ function readExtends(e) {
|
|
|
134
134
|
try {
|
|
135
135
|
return [w(e.file, { expectComments: !0 }).extends].flat().filter((e) => typeof e == "string");
|
|
136
136
|
} catch (t) {
|
|
137
|
-
return e.logger.warn(`πΈοΈ Skipped the bases ${
|
|
137
|
+
return e.logger.warn(`πΈοΈ Skipped the bases ${_.relative(e.workspaceRoot, e.file)} extends, which could not be read, so a change to one will not invalidate a cached codependix gate: ${String(t)}`), [];
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
function readInstalledPackageName(e) {
|
|
141
|
-
let t = e.split(
|
|
141
|
+
let t = e.split(_.sep), n = t.lastIndexOf("node_modules") + 1, r = t[n];
|
|
142
142
|
if (n !== 0 && r !== void 0) return t.slice(n, r.startsWith("@") ? n + 2 : n + 1).join("/");
|
|
143
143
|
}
|
|
144
144
|
function readRegistryDependencies(e) {
|
|
145
145
|
return new Set(readDependencies(e).filter(([, e]) => !r.some((t) => String(e).startsWith(t))).map(([e]) => e));
|
|
146
146
|
}
|
|
147
147
|
function resolveExtendedBase(e) {
|
|
148
|
-
let t = e.specifier.replaceAll("\\", "/"), n =
|
|
148
|
+
let t = e.specifier.replaceAll("\\", "/"), n = _.isAbsolute(t) || t.startsWith("./") || t.startsWith("../") ? resolvePathBase({
|
|
149
149
|
file: e.file,
|
|
150
150
|
specifier: t
|
|
151
151
|
}) : resolvePackageBase({
|
|
@@ -172,7 +172,7 @@ function resolveExtendedBase(e) {
|
|
|
172
172
|
function resolvePackageBase(e) {
|
|
173
173
|
let { specifier: t } = e, n = t.split("/").length > (t.startsWith("@") ? 2 : 1) ? [t, `${t}.json`] : [`${t}/${i}`, t], r = S(e.file), [a] = n.flatMap((e) => {
|
|
174
174
|
try {
|
|
175
|
-
let t =
|
|
175
|
+
let t = b(r.resolve(e));
|
|
176
176
|
return t.endsWith(".json") ? [t] : [];
|
|
177
177
|
} catch {
|
|
178
178
|
return [];
|
|
@@ -181,11 +181,11 @@ function resolvePackageBase(e) {
|
|
|
181
181
|
return a;
|
|
182
182
|
}
|
|
183
183
|
function resolvePathBase(e) {
|
|
184
|
-
let t =
|
|
185
|
-
return
|
|
184
|
+
let t = _.resolve(_.dirname(e.file), e.specifier), n = x(t, { throwIfNoEntry: !1 })?.isFile() === !0 || t.endsWith(".json") ? t : `${t}.json`;
|
|
185
|
+
return v(n) ? b(n) : n;
|
|
186
186
|
}
|
|
187
187
|
function warnSkipped(e) {
|
|
188
|
-
e.logger.warn(`πΈοΈ Skipped the cache input of ${e.specifier}, which ${
|
|
188
|
+
e.logger.warn(`πΈοΈ Skipped the cache input of ${e.specifier}, which ${_.relative(e.workspaceRoot, e.file)} extends, because ${describeSkippedBase(e.base)}, so a change to it will not invalidate a cached codependix gate.`);
|
|
189
189
|
}
|
|
190
190
|
//#endregion
|
|
191
191
|
//#region projects/ic-suite/codependix/codependix-nx/src/index.ts
|
|
@@ -204,7 +204,7 @@ var T = {
|
|
|
204
204
|
workspaceRoot: n.workspaceRoot
|
|
205
205
|
});
|
|
206
206
|
return e.flatMap((e) => {
|
|
207
|
-
let t =
|
|
207
|
+
let t = _.dirname(e), n = r.get(t);
|
|
208
208
|
return n === void 0 ? [] : [[e, { projects: { [t]: { targets: n } } }]];
|
|
209
209
|
});
|
|
210
210
|
}],
|
package/package.json
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
"url": "https://github.com/organizzolini/codebase/issues"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@codependix/cli": "0.0.
|
|
7
|
+
"@codependix/cli": "0.0.30",
|
|
8
|
+
"@codependix/configuration": "0.0.30",
|
|
8
9
|
"@nestjs/common": "^11.1.21 || ^12.0.1",
|
|
9
10
|
"@nestjs/core": "^11.1.21 || ^12.0.1",
|
|
10
11
|
"@nx/devkit": "^23.0.0",
|
|
@@ -76,5 +77,5 @@
|
|
|
76
77
|
"strict": true
|
|
77
78
|
},
|
|
78
79
|
"types": "./dist/src/index.d.ts",
|
|
79
|
-
"version": "0.0.
|
|
80
|
+
"version": "0.0.15"
|
|
80
81
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"$schema": "http://json-schema.org/schema",
|
|
3
3
|
"description": "Fail a project whose dependency graphs break a codependix boundary rule charged to it, built over the project and its Nx dependencies.",
|
|
4
4
|
"properties": {
|
|
5
|
-
"
|
|
6
|
-
"description": "Path to the codependix configuration file, relative to the workspace root. The path this plugin is registered with in nx.json when omitted.",
|
|
5
|
+
"configuration": {
|
|
6
|
+
"description": "Path to the codependix configuration file, relative to the workspace root. The path this plugin is registered with in nx.json when omitted; required one way or the other, with no default.",
|
|
7
7
|
"type": "string"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|