@codependix/nx 0.0.34 β 0.0.36
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 +17 -0
- package/README.md +146 -176
- package/dist/{plugin-context.utilities-oWfnrfib.js β plugin-context.utilities-BP_5JXUo.js} +58 -93
- package/dist/src/executors/gate/executor.js +5 -4
- package/dist/src/index.d.ts +11 -48
- package/dist/src/index.js +4 -7
- package/executors.json +0 -1
- package/package.json +3 -3
- package/dist/src/executors/gate/hasher.d.ts +0 -25
- package/dist/src/executors/gate/hasher.js +0 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
## 0.0.36 (2026-10-24)
|
|
2
|
+
|
|
3
|
+
### π¦ Build
|
|
4
|
+
|
|
5
|
+
- **ic-suite,presentation:** π· infer the vite build target instead of @nx/vite:build ([#1823](https://github.com/organizzolini/codebase/pull/1823))
|
|
6
|
+
|
|
7
|
+
### π§± Updated Dependencies
|
|
8
|
+
|
|
9
|
+
- Updated codependix-configuration to 0.0.49
|
|
10
|
+
- Updated codependix-cli to 0.0.50
|
|
11
|
+
|
|
12
|
+
## 0.0.35 (2026-10-24)
|
|
13
|
+
|
|
14
|
+
### π©Ή Fixes
|
|
15
|
+
|
|
16
|
+
- **codependix:** π replace the gate's custom hasher with a cache check ([#1819](https://github.com/organizzolini/codebase/pull/1819))
|
|
17
|
+
|
|
1
18
|
## 0.0.34 (2026-10-23)
|
|
2
19
|
|
|
3
20
|
### π§± Updated Dependencies
|
package/README.md
CHANGED
|
@@ -156,16 +156,15 @@ keeps the other's inputs. The
|
|
|
156
156
|
target declares no `configurations`, so an aggregator run with
|
|
157
157
|
`--configuration=check` falls through to the defaults.
|
|
158
158
|
|
|
159
|
-
**A gate whose `projects` or `tags` select anything other than its own
|
|
160
|
-
is
|
|
161
|
-
not the projects such a run judges, so
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
project β
|
|
167
|
-
|
|
168
|
-
warning instead of a file list β the inputs above still decide the hash.
|
|
159
|
+
**A cached gate whose `projects` or `tags` select anything other than its own
|
|
160
|
+
project is refused.** Its inputs cover its own project and that project's
|
|
161
|
+
dependencies, not the projects such a run judges, so Nx could replay a pass
|
|
162
|
+
after an edit to the very project that now fails. Nx fixes `cache` per target,
|
|
163
|
+
so a target that sets `projects` or `tags` must also set `cache: false`; the
|
|
164
|
+
executor throws a message saying so, whether the selection came from the
|
|
165
|
+
command line, the target's options, or a configuration. A gate judging only
|
|
166
|
+
its own project β including one whose `projects` names exactly that project β
|
|
167
|
+
stays cached.
|
|
169
168
|
|
|
170
169
|
### Executor options
|
|
171
170
|
|
|
@@ -271,8 +270,6 @@ graph LR
|
|
|
271
270
|
file_src_executors_gate_executor_ts["src/executors/gate/executor.ts"]
|
|
272
271
|
file_src_executors_gate_executor_types_ts["src/executors/gate/executor.types.ts"]
|
|
273
272
|
file_src_executors_gate_executor_unit_test_ts["src/executors/gate/executor.unit.test.ts"]
|
|
274
|
-
file_src_executors_gate_hasher_ts["src/executors/gate/hasher.ts"]
|
|
275
|
-
file_src_executors_gate_hasher_unit_test_ts["src/executors/gate/hasher.unit.test.ts"]
|
|
276
273
|
file_src_executors_gate_loader_unit_test_ts["src/executors/gate/loader.unit.test.ts"]
|
|
277
274
|
file_src_index_ts["src/index.ts"]
|
|
278
275
|
file_src_index_unit_test_ts["src/index.unit.test.ts"]
|
|
@@ -305,11 +302,6 @@ graph LR
|
|
|
305
302
|
file_src_executors_gate_executor_types_ts --> file_src_modules_gate_gate_types_ts
|
|
306
303
|
file_src_executors_gate_executor_unit_test_ts --> file_src_executors_gate_executor_ts
|
|
307
304
|
file_src_executors_gate_executor_unit_test_ts --> file_src_modules_gate_gate_service_ts
|
|
308
|
-
file_src_executors_gate_hasher_ts --> file_src_modules_gate_gate_types_ts
|
|
309
|
-
file_src_executors_gate_hasher_ts --> file_src_modules_plugin_plugin_context_utilities_ts
|
|
310
|
-
file_src_executors_gate_hasher_unit_test_ts --> file_src_executors_gate_hasher_ts
|
|
311
|
-
file_src_executors_gate_hasher_unit_test_ts --> file_src_modules_gate_gate_service_ts
|
|
312
|
-
file_src_executors_gate_hasher_unit_test_ts --> file_src_modules_gate_gate_types_ts
|
|
313
305
|
file_src_index_ts --> file_src_modules_plugin_plugin_context_utilities_ts
|
|
314
306
|
file_src_index_ts --> file_src_modules_plugin_plugin_inputs_utilities_ts
|
|
315
307
|
file_src_index_ts --> file_src_modules_plugin_plugin_tsconfig_utilities_ts
|
|
@@ -323,7 +315,6 @@ graph LR
|
|
|
323
315
|
file_src_modules_gate_gate_service_ts --> file_src_modules_gate_gate_types_ts
|
|
324
316
|
file_src_modules_gate_gate_service_ts --> file_src_modules_plugin_plugin_service_ts
|
|
325
317
|
file_src_modules_gate_gate_service_unit_test_ts --> file_src_modules_gate_gate_service_ts
|
|
326
|
-
file_src_modules_gate_gate_service_unit_test_ts --> file_src_modules_gate_gate_types_ts
|
|
327
318
|
file_src_modules_gate_gate_service_unit_test_ts --> file_src_modules_plugin_plugin_service_ts
|
|
328
319
|
file_src_modules_plugin_plugin_context_utilities_ts --> file_src_codependix_nx_module_ts
|
|
329
320
|
file_src_modules_plugin_plugin_context_utilities_ts --> file_src_modules_gate_gate_service_ts
|
|
@@ -350,166 +341,42 @@ graph LR
|
|
|
350
341
|
```
|
|
351
342
|
<!-- codependix:end name="codependix-file-imports" -->
|
|
352
343
|
|
|
353
|
-
<!-- callidescope:start -->
|
|
354
|
-
|
|
355
|
-
## π Callidescope
|
|
356
|
-
|
|
357
|
-
Call stacks traced through `projects/ic-suite/codependix/codependix-nx`, deepest first. Each frame shows what it takes, what it returns, and what its documentation says.
|
|
358
|
-
|
|
359
|
-
| Measure | Value |
|
|
360
|
-
| --- | --- |
|
|
361
|
-
| Callables | 74 |
|
|
362
|
-
| Files | 22 |
|
|
363
|
-
| Calls traced | 90 |
|
|
364
|
-
| Call stacks | 3 |
|
|
365
|
-
| Deepest stack | 6 |
|
|
366
|
-
| Stacks through recursion | 0 |
|
|
367
|
-
| Unfollowable calls | 6 |
|
|
368
|
-
|
|
369
|
-
### Limits
|
|
370
|
-
|
|
371
|
-
What this project is judged against, as declared in its own `callidescope.config.ts`.
|
|
372
|
-
|
|
373
|
-
| Limit | Value |
|
|
374
|
-
| --- | --- |
|
|
375
|
-
| `maximumDepth` | 6 |
|
|
376
|
-
| `maximumBreadth` | 5 |
|
|
377
|
-
|
|
378
|
-
### Call stacks (depth)
|
|
379
|
-
|
|
380
|
-
**1. `anonymous`** β depth β₯ 6 Β· orphan-root
|
|
381
|
-
|
|
382
|
-
```text
|
|
383
|
-
π anonymous(β¦): Promise<CreateNodesResultArray> [projects/ic-suite/codependix/codependix-nx/src/index.ts:45]
|
|
384
|
-
ββ> resolveToolInputs(args: ResolveToolInputsArguments): InferredInput[] [projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts:65]
|
|
385
|
-
β³ The cache inputs that tie a gate to the codependix command line it runs.
|
|
386
|
-
ββ> resolveWorkspaceInputs(β¦): InferredInput[] [projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts:209]
|
|
387
|
-
β³ Globs over the sources and manifest of the command line and of every workspace package it reaches, sorted so the cacheβ¦
|
|
388
|
-
ββ> collectWorkspacePackages(cliDirectory: string): WorkspacePackages [projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts:103]
|
|
389
|
-
β³ Collects a workspace package and every workspace package it reaches, development dependencies included: a package thisβ¦
|
|
390
|
-
ββ> readDependencies(directory: string): [string, unknown][] [projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts:41]
|
|
391
|
-
β³ Every dependency a package's manifest declares, in either map.
|
|
392
|
-
ββ> readManifest(directory: string): Record<string, unknown> [projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts:173]
|
|
393
|
-
β³ Reads a package directory's manifest, or an empty one when there is none or it cannot be parsed β which leaves thatβ¦
|
|
394
|
-
```
|
|
395
|
-
|
|
396
|
-
**2. `gateExecutor`** β depth β₯ 6 Β· orphan-root
|
|
397
|
-
|
|
398
|
-
```text
|
|
399
|
-
π gateExecutor(β¦): Promise<{ success: boolean; }> [projects/ic-suite/codependix/codependix-nx/src/executors/gate/executor.ts:21]
|
|
400
|
-
β³ Fails one project's task when a codependix boundary finding is charged to it.
|
|
401
|
-
ββ> GateService.run(args: RunGateArguments): Promise<boolean> [projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:293]
|
|
402
|
-
β³ Runs one gate, and settles on whether it passed.
|
|
403
|
-
ββ> GateService.resolveConfigurationPath(args: { configuration?: string | undefined; workspaceRoot: string; }): string [projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:246]
|
|
404
|
-
β³ Resolves the configuration path one gate runs with.
|
|
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]
|
|
410
|
-
```
|
|
411
|
-
|
|
412
|
-
**3. `gateHasher`** β depth 6 Β· orphan-root
|
|
413
|
-
|
|
414
|
-
```text
|
|
415
|
-
π gateHasher(task: Task, context: GateHasherContext): Promise<Hash> [projects/ic-suite/codependix/codependix-nx/src/executors/gate/hasher.ts:17]
|
|
416
|
-
β³ Hashes one gate task for Nx's cache.
|
|
417
|
-
ββ> GateService.hashTask(args: HashGateTaskArguments): Promise<Hash> [projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:220]
|
|
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β¦
|
|
419
|
-
ββ> GateService.judgesOwnProject(args: HashGateTaskArguments): boolean [projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:60]
|
|
420
|
-
β³ Whether a gate task judges exactly the project it belongs to.
|
|
421
|
-
ββ> GateService.resolveSelection(β¦): GateSelection [projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:272]
|
|
422
|
-
β³ Resolves which projects one gate judges.
|
|
423
|
-
ββ> GateService.readNameList(value: readonly string[] | undefined): string[] [projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:86]
|
|
424
|
-
β³ Reads a list of names out of an executor's options.
|
|
425
|
-
ββ> GateService.filter(β¦)(entry: string): boolean [projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:90]
|
|
426
|
-
```
|
|
427
|
-
|
|
428
|
-
### Breadth
|
|
429
|
-
|
|
430
|
-
| Callable | Breadth | Calls directly | Location |
|
|
431
|
-
| --- | --- | --- | --- |
|
|
432
|
-
| `resolveToolInputs` | 5 | `locatePackage`, `warnUnresolved`, `isInsideWorkspace`, `resolveWorkspaceInputs`, `resolveExternalInputs` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts:65` |
|
|
433
|
-
| `anonymous` | 5 | `resolvePluginService`, `PluginService.inferTargets`, `resolveToolInputs`, `resolveTsconfigInputs`, `flatMap(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/index.ts:45` |
|
|
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` |
|
|
435
|
-
|
|
436
|
-
<details>
|
|
437
|
-
<summary>32 more callables</summary>
|
|
438
|
-
|
|
439
|
-
| Callable | Breadth | Calls directly | Location |
|
|
440
|
-
| --- | --- | --- | --- |
|
|
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` |
|
|
443
|
-
| `collectWorkspacePackages` | 4 | `map(β¦)`, `filter(β¦)`, `readDependencies`, `locatePackage` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts:103` |
|
|
444
|
-
| `followExtendsChain` | 4 | `readRegistryDependencies`, `readExtends`, `resolveExtendedBase`, `warnSkipped` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-tsconfig.utilities.ts:89` |
|
|
445
|
-
| `resolveExtendedBase` | 4 | `resolvePathBase`, `resolvePackageBase`, `isInsideWorkspace`, `readInstalledPackageName` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-tsconfig.utilities.ts:204` |
|
|
446
|
-
| `PluginService.selectProjectRoots` | 3 | `PluginService.filter(β¦)`, `PluginService.map(β¦)`, `PluginService.filter(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin.service.ts:65` |
|
|
447
|
-
| `PluginService.inferTargets` | 3 | `PluginService.resolvePluginOptions`, `PluginService.map(β¦)`, `PluginService.selectProjectRoots` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin.service.ts:99` |
|
|
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` |
|
|
452
|
-
| `resolveExternalInputs` | 3 | `filter(β¦)`, `map(β¦)`, `readDependencies` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts:197` |
|
|
453
|
-
| `resolveWorkspaceInputs` | 3 | `collectWorkspacePackages`, `warnUnresolved`, `flatMap(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts:209` |
|
|
454
|
-
| `readRegistryDependencies` | 3 | `map(β¦)`, `filter(β¦)`, `readDependencies` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-tsconfig.utilities.ts:180` |
|
|
455
|
-
| `readDependencies` | 2 | `readManifest`, `toRecord` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts:41` |
|
|
456
|
-
| `resolveTsconfigInputs` | 2 | `followExtendsChain`, `map(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-tsconfig.utilities.ts:42` |
|
|
457
|
-
| `gateExecutor` | 2 | `resolveGateService`, `GateService.run` | `projects/ic-suite/codependix/codependix-nx/src/executors/gate/executor.ts:21` |
|
|
458
|
-
| `gateHasher` | 2 | `resolveGateService`, `GateService.hashTask` | `projects/ic-suite/codependix/codependix-nx/src/executors/gate/hasher.ts:17` |
|
|
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` |
|
|
465
|
-
| `resolveGateService` | 1 | `resolvePluginContext` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-context.utilities.ts:16` |
|
|
466
|
-
| `resolvePluginService` | 1 | `resolvePluginContext` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-context.utilities.ts:23` |
|
|
467
|
-
| `locatePackage` | 1 | `readManifest` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts:145` |
|
|
468
|
-
| `flatMap(β¦)` | 1 | `map(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts:224` |
|
|
469
|
-
| `readExtends` | 1 | `filter(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-tsconfig.utilities.ts:133` |
|
|
470
|
-
| `filter(β¦)` | 1 | `some(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-tsconfig.utilities.ts:184` |
|
|
471
|
-
| `resolvePackageBase` | 1 | `flatMap(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-tsconfig.utilities.ts:247` |
|
|
472
|
-
| `warnSkipped` | 1 | `describeSkippedBase` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-tsconfig.utilities.ts:291` |
|
|
473
|
-
|
|
474
|
-
</details>
|
|
475
|
-
<!-- callidescope:end -->
|
|
476
|
-
|
|
477
344
|
<!-- codometer:start -->
|
|
478
345
|
|
|
479
346
|
## β²οΈ Codometer
|
|
480
347
|
|
|
481
348
|
### Project
|
|
482
349
|
|
|
483
|
-

|
|
351
|
+

|
|
485
352
|

|
|
486
|
-

|
|
487
354
|
|
|
488
355
|
### TypeScript
|
|
489
356
|
|
|
490
|
-

|
|
358
|
+

|
|
492
359
|

|
|
493
360
|

|
|
494
361
|

|
|
495
|
-

|
|
496
363
|

|
|
497
364
|
|
|
498
365
|
### JavaScript
|
|
499
366
|
|
|
500
367
|

|
|
501
|
-

|
|
369
|
+

|
|
503
370
|

|
|
504
|
-

|
|
372
|
+

|
|
373
|
+

|
|
374
|
+

|
|
375
|
+

|
|
376
|
+

|
|
377
|
+

|
|
378
|
+

|
|
379
|
+

|
|
513
380
|

|
|
514
381
|
|
|
515
382
|
### Python
|
|
@@ -530,16 +397,16 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
530
397
|
### JSON
|
|
531
398
|
|
|
532
399
|

|
|
533
|
-

|
|
401
|
+

|
|
402
|
+

|
|
403
|
+

|
|
404
|
+

|
|
538
405
|

|
|
539
|
-

|
|
540
407
|

|
|
541
|
-

|
|
409
|
+

|
|
543
410
|

|
|
544
411
|
|
|
545
412
|
### YAML
|
|
@@ -627,7 +494,7 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
627
494
|

|
|
628
495
|

|
|
629
496
|

|
|
630
|
-

|
|
631
498
|

|
|
632
499
|

|
|
633
500
|

|
|
@@ -665,23 +532,126 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
665
532
|
### Markdown
|
|
666
533
|
|
|
667
534
|

|
|
668
|
-

|
|
669
536
|

|
|
670
|
-

|
|
538
|
+

|
|
672
539
|

|
|
673
540
|

|
|
674
541
|

|
|
675
|
-

|
|
543
|
+

|
|
544
|
+

|
|
678
545
|

|
|
679
546
|

|
|
680
547
|

|
|
681
|
-

|
|
682
549
|

|
|
683
550
|

|
|
684
|
-

|
|
685
552
|

|
|
686
553
|

|
|
687
554
|
<!-- codometer:end -->
|
|
555
|
+
|
|
556
|
+
<!-- callidescope:start -->
|
|
557
|
+
|
|
558
|
+
## π Callidescope
|
|
559
|
+
|
|
560
|
+
Call stacks traced through `projects/ic-suite/codependix/codependix-nx`, deepest first. Each frame shows what it takes, what it returns, and what its documentation says.
|
|
561
|
+
|
|
562
|
+
| Measure | Value |
|
|
563
|
+
| --- | --- |
|
|
564
|
+
| Callables | 68 |
|
|
565
|
+
| Files | 21 |
|
|
566
|
+
| Calls traced | 79 |
|
|
567
|
+
| Call stacks | 2 |
|
|
568
|
+
| Deepest stack | 6 |
|
|
569
|
+
| Stacks through recursion | 0 |
|
|
570
|
+
| Unfollowable calls | 6 |
|
|
571
|
+
|
|
572
|
+
### Limits
|
|
573
|
+
|
|
574
|
+
What this project is judged against, as declared in its own `callidescope.config.ts`.
|
|
575
|
+
|
|
576
|
+
| Limit | Value |
|
|
577
|
+
| --- | --- |
|
|
578
|
+
| `maximumDepth` | 6 |
|
|
579
|
+
| `maximumBreadth` | 5 |
|
|
580
|
+
|
|
581
|
+
### Call stacks (depth)
|
|
582
|
+
|
|
583
|
+
**1. `anonymous`** β depth β₯ 6 Β· orphan-root
|
|
584
|
+
|
|
585
|
+
```text
|
|
586
|
+
π anonymous(β¦): Promise<CreateNodesResultArray> [projects/ic-suite/codependix/codependix-nx/src/index.ts:45]
|
|
587
|
+
ββ> resolveToolInputs(args: ResolveToolInputsArguments): InferredInput[] [projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts:65]
|
|
588
|
+
β³ The cache inputs that tie a gate to the codependix command line it runs.
|
|
589
|
+
ββ> resolveWorkspaceInputs(β¦): InferredInput[] [projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts:209]
|
|
590
|
+
β³ Globs over the sources and manifest of the command line and of every workspace package it reaches, sorted so the cacheβ¦
|
|
591
|
+
ββ> collectWorkspacePackages(cliDirectory: string): WorkspacePackages [projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts:103]
|
|
592
|
+
β³ Collects a workspace package and every workspace package it reaches, development dependencies included: a package thisβ¦
|
|
593
|
+
ββ> readDependencies(directory: string): [string, unknown][] [projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts:41]
|
|
594
|
+
β³ Every dependency a package's manifest declares, in either map.
|
|
595
|
+
ββ> readManifest(directory: string): Record<string, unknown> [projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts:173]
|
|
596
|
+
β³ Reads a package directory's manifest, or an empty one when there is none or it cannot be parsed β which leaves thatβ¦
|
|
597
|
+
```
|
|
598
|
+
|
|
599
|
+
**2. `gateExecutor`** β depth β₯ 6 Β· orphan-root
|
|
600
|
+
|
|
601
|
+
```text
|
|
602
|
+
π gateExecutor(β¦): Promise<{ success: boolean; }> [projects/ic-suite/codependix/codependix-nx/src/executors/gate/executor.ts:21]
|
|
603
|
+
β³ Fails one project's task when a codependix boundary finding is charged to it.
|
|
604
|
+
ββ> GateService.run(args: RunGateArguments): Promise<boolean> [projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:215]
|
|
605
|
+
β³ Runs one gate, and settles on whether it passed.
|
|
606
|
+
ββ> GateService.resolveConfigurationPath(args: { configuration?: string | undefined; workspaceRoot: string; }): string [projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:161]
|
|
607
|
+
β³ Resolves the configuration path one gate runs with.
|
|
608
|
+
ββ> PluginService.resolvePluginOptions(args: ResolvePluginOptionsArguments): CodependixPluginOptions [projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin.service.ts:156]
|
|
609
|
+
β³ Resolves the effective plugin options from an untrusted value. `configurationPath` is required and never searched for:β¦
|
|
610
|
+
ββ> ConfigurationService.requireConfigurationPath(configurationPath: string | undefined, surface: string): string [projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:309]
|
|
611
|
+
β³ Returns the main configuration path, refusing one that is missing.
|
|
612
|
+
ββ> ConfigurationPathRequiredError.constructor(surface: string): ConfigurationPathRequiredError [projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.constants.ts:304]
|
|
613
|
+
```
|
|
614
|
+
|
|
615
|
+
### Breadth
|
|
616
|
+
|
|
617
|
+
| Callable | Breadth | Calls directly | Location |
|
|
618
|
+
| --- | --- | --- | --- |
|
|
619
|
+
| `GateService.run` | 5 | `GateService.resolveSelection`, `GateService.judgesOwnProject`, `GateService.buildCommandArguments`, `GateService.resolveConfigurationPath`, `GateService.spawnCommandLine` | `projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:215` |
|
|
620
|
+
| `resolveToolInputs` | 5 | `locatePackage`, `warnUnresolved`, `isInsideWorkspace`, `resolveWorkspaceInputs`, `resolveExternalInputs` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts:65` |
|
|
621
|
+
| `anonymous` | 5 | `resolvePluginService`, `PluginService.inferTargets`, `resolveToolInputs`, `resolveTsconfigInputs`, `flatMap(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/index.ts:45` |
|
|
622
|
+
|
|
623
|
+
<details>
|
|
624
|
+
<summary>27 more callables</summary>
|
|
625
|
+
|
|
626
|
+
| Callable | Breadth | Calls directly | Location |
|
|
627
|
+
| --- | --- | --- | --- |
|
|
628
|
+
| `PluginService.readRegisteredOptions` | 4 | `PluginService.toRecord`, `PluginService.isUnknownArray`, `PluginService.find(β¦)`, `PluginService.map(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin.service.ts:134` |
|
|
629
|
+
| `GateService.resolveConfigurationPath` | 4 | `ConfigurationService.requireConfigurationPath`, `PluginService.resolvePluginOptions`, `PluginService.readRegisteredOptions`, `GateService.readNxConfiguration` | `projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:161` |
|
|
630
|
+
| `collectWorkspacePackages` | 4 | `map(β¦)`, `filter(β¦)`, `readDependencies`, `locatePackage` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts:103` |
|
|
631
|
+
| `followExtendsChain` | 4 | `readRegistryDependencies`, `readExtends`, `resolveExtendedBase`, `warnSkipped` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-tsconfig.utilities.ts:89` |
|
|
632
|
+
| `resolveExtendedBase` | 4 | `resolvePathBase`, `resolvePackageBase`, `isInsideWorkspace`, `readInstalledPackageName` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-tsconfig.utilities.ts:204` |
|
|
633
|
+
| `PluginService.selectProjectRoots` | 3 | `PluginService.filter(β¦)`, `PluginService.map(β¦)`, `PluginService.filter(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin.service.ts:65` |
|
|
634
|
+
| `PluginService.inferTargets` | 3 | `PluginService.resolvePluginOptions`, `PluginService.map(β¦)`, `PluginService.selectProjectRoots` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin.service.ts:99` |
|
|
635
|
+
| `PluginService.resolvePluginOptions` | 3 | `PluginService.toRecord`, `ConfigurationService.requireConfigurationPath`, `PluginService.readString` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin.service.ts:156` |
|
|
636
|
+
| `GateService.readNameList` | 3 | `GateService.filter(β¦)`, `GateService.map(β¦)`, `GateService.flatMap(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:70` |
|
|
637
|
+
| `GateService.anonymous` | 3 | `GateService.on(β¦)`, `GateService.on(β¦)`, `GateService.on(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:108` |
|
|
638
|
+
| `resolveExternalInputs` | 3 | `filter(β¦)`, `map(β¦)`, `readDependencies` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts:197` |
|
|
639
|
+
| `resolveWorkspaceInputs` | 3 | `collectWorkspacePackages`, `warnUnresolved`, `flatMap(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts:209` |
|
|
640
|
+
| `readRegistryDependencies` | 3 | `map(β¦)`, `filter(β¦)`, `readDependencies` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-tsconfig.utilities.ts:180` |
|
|
641
|
+
| `readDependencies` | 2 | `readManifest`, `toRecord` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts:41` |
|
|
642
|
+
| `resolveTsconfigInputs` | 2 | `followExtendsChain`, `map(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-tsconfig.utilities.ts:42` |
|
|
643
|
+
| `gateExecutor` | 2 | `resolveGateService`, `GateService.run` | `projects/ic-suite/codependix/codependix-nx/src/executors/gate/executor.ts:21` |
|
|
644
|
+
| `PluginService.map(β¦)` | 1 | `PluginService.toRecord` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin.service.ts:142` |
|
|
645
|
+
| `GateService.spawnCommandLine` | 1 | `GateService.anonymous` | `projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:104` |
|
|
646
|
+
| `GateService.resolveSelection` | 1 | `GateService.readNameList` | `projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.service.ts:187` |
|
|
647
|
+
| `resolveGateService` | 1 | `resolvePluginContext` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-context.utilities.ts:16` |
|
|
648
|
+
| `resolvePluginService` | 1 | `resolvePluginContext` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-context.utilities.ts:23` |
|
|
649
|
+
| `locatePackage` | 1 | `readManifest` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts:145` |
|
|
650
|
+
| `flatMap(β¦)` | 1 | `map(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts:224` |
|
|
651
|
+
| `readExtends` | 1 | `filter(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-tsconfig.utilities.ts:133` |
|
|
652
|
+
| `filter(β¦)` | 1 | `some(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-tsconfig.utilities.ts:184` |
|
|
653
|
+
| `resolvePackageBase` | 1 | `flatMap(β¦)` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-tsconfig.utilities.ts:247` |
|
|
654
|
+
| `warnSkipped` | 1 | `describeSkippedBase` | `projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-tsconfig.utilities.ts:291` |
|
|
655
|
+
|
|
656
|
+
</details>
|
|
657
|
+
<!-- callidescope:end -->
|
package/dist/{plugin-context.utilities-oWfnrfib.js β plugin-context.utilities-BP_5JXUo.js}
RENAMED
|
@@ -4,39 +4,35 @@ import { Injectable as t, Module as n } from "@nestjs/common";
|
|
|
4
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
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var d = Object.defineProperty, __name = (e, t) => d(e, "name", {
|
|
7
|
+
import { readFileSync as s } from "node:fs";
|
|
8
|
+
import { createRequire as c } from "node:module";
|
|
9
|
+
import { pathToFileURL as l } from "node:url";
|
|
10
|
+
// \0rolldown/runtime.js
|
|
11
|
+
var u = Object.defineProperty, __name = (e, t) => u(e, "name", {
|
|
13
12
|
value: t,
|
|
14
13
|
configurable: !0
|
|
15
|
-
}),
|
|
14
|
+
}), d = "**/{project.json,codependix.config.*}", f = "project.json", p = "{projectRoot}/codependix.config.*", m = "__codependixPluginContext", h = "@codependix/nx", g = "codependix-gate", _ = "`configurationPath` option on the @codependix/nx plugin's entry in nx.json", v = "@codependix/cli", y = "workspace:", b = [
|
|
16
15
|
"file:",
|
|
17
16
|
"link:",
|
|
18
17
|
"portal:",
|
|
19
|
-
|
|
20
|
-
],
|
|
18
|
+
y
|
|
19
|
+
], x = ["package.json", "src/**/!(*.test.*|*.spec.*)"], S = "{workspaceRoot}/tsconfig.json", C = "tsconfig.json", w = {
|
|
21
20
|
outside: "it lies outside the workspace",
|
|
22
21
|
unresolved: "it resolves to no file"
|
|
23
22
|
};
|
|
24
|
-
|
|
25
|
-
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorateMetadata.js
|
|
23
|
+
// \0@oxc-project+runtime@0.155.0/helpers/esm/decorateMetadata.js
|
|
26
24
|
function __decorateMetadata(e, t) {
|
|
27
25
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(e, t);
|
|
28
26
|
}
|
|
29
|
-
|
|
30
|
-
//#region \0@oxc-project+runtime@0.153.0/helpers/esm/decorate.js
|
|
27
|
+
// \0@oxc-project+runtime@0.155.0/helpers/esm/decorate.js
|
|
31
28
|
function __decorate(e, t, n, r) {
|
|
32
29
|
var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
|
|
33
30
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
|
|
34
31
|
else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
|
|
35
32
|
return i > 3 && a && Object.defineProperty(t, n, a), a;
|
|
36
33
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
var E = class PluginService {
|
|
34
|
+
// src/modules/plugin/plugin.service.ts
|
|
35
|
+
var T = class PluginService {
|
|
40
36
|
configurationService;
|
|
41
37
|
constructor(e) {
|
|
42
38
|
this.configurationService = e;
|
|
@@ -49,7 +45,7 @@ var E = class PluginService {
|
|
|
49
45
|
return typeof t == "string" && t !== "" ? t : void 0;
|
|
50
46
|
}
|
|
51
47
|
selectProjectRoots(e) {
|
|
52
|
-
return e.filter((e) => a.basename(e) ===
|
|
48
|
+
return e.filter((e) => a.basename(e) === f).map((e) => a.dirname(e)).filter((e) => e !== ".");
|
|
53
49
|
}
|
|
54
50
|
toRecord(e) {
|
|
55
51
|
return typeof e == "object" && e ? { ...e } : {};
|
|
@@ -57,12 +53,12 @@ var E = class PluginService {
|
|
|
57
53
|
inferTargets(e) {
|
|
58
54
|
let t = this.resolvePluginOptions({ options: e.options }), n = { [t.gateTargetName]: {
|
|
59
55
|
cache: !0,
|
|
60
|
-
executor: `${
|
|
56
|
+
executor: `${h}:gate`,
|
|
61
57
|
inputs: [
|
|
62
58
|
"default",
|
|
63
59
|
"^default",
|
|
64
60
|
`{workspaceRoot}/${t.configurationPath}`,
|
|
65
|
-
|
|
61
|
+
p,
|
|
66
62
|
...e.toolInputs
|
|
67
63
|
],
|
|
68
64
|
options: {}
|
|
@@ -81,7 +77,7 @@ var E = class PluginService {
|
|
|
81
77
|
configurationPath: this.configurationService.requireConfigurationPath(this.readString({
|
|
82
78
|
key: "configurationPath",
|
|
83
79
|
record: t
|
|
84
|
-
}),
|
|
80
|
+
}), _),
|
|
85
81
|
gateTargetName: this.readString({
|
|
86
82
|
key: "gateTargetName",
|
|
87
83
|
record: t
|
|
@@ -89,52 +85,35 @@ var E = class PluginService {
|
|
|
89
85
|
};
|
|
90
86
|
}
|
|
91
87
|
};
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
D = __decorate([n({
|
|
88
|
+
T = __decorate([t(), __decorateMetadata("design:paramtypes", [i === void 0 ? Object : i])], T);
|
|
89
|
+
// src/modules/plugin/plugin.module.ts
|
|
90
|
+
var E = class PluginModule {};
|
|
91
|
+
E = __decorate([n({
|
|
97
92
|
controllers: [],
|
|
98
|
-
exports: [
|
|
93
|
+
exports: [T],
|
|
99
94
|
imports: [r],
|
|
100
|
-
providers: [
|
|
101
|
-
})],
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
var O = "@codependix/nx/loader", k = "@codependix/cli/main", A = "nx.json", j = "`configuration` executor option", M = class GateService {
|
|
95
|
+
providers: [T]
|
|
96
|
+
})], E);
|
|
97
|
+
// src/modules/gate/gate.constants.ts
|
|
98
|
+
var D = "@codependix/nx/loader", O = "@codependix/cli/main", k = "nx.json", A = "`configuration` executor option", j = class GateService {
|
|
105
99
|
configurationService;
|
|
106
100
|
pluginService;
|
|
107
101
|
constructor(e, t) {
|
|
108
102
|
this.configurationService = e, this.pluginService = t;
|
|
109
103
|
}
|
|
110
104
|
judgesOwnProject(e) {
|
|
111
|
-
|
|
112
|
-
options: {
|
|
113
|
-
projects: this.toNameList(n.projects),
|
|
114
|
-
tags: this.toNameList(n.tags)
|
|
115
|
-
},
|
|
116
|
-
projectName: t
|
|
117
|
-
});
|
|
118
|
-
return r.tags.length === 0 && r.projects.length === 1 && r.projects[0] === t;
|
|
105
|
+
return e.selection.tags.length === 0 && e.selection.projects.length === 1 && e.selection.projects[0] === e.projectName;
|
|
119
106
|
}
|
|
120
107
|
readNameList(e) {
|
|
121
108
|
return (e ?? []).flatMap((e) => e.split(",")).map((e) => e.trim()).filter((e) => e !== "");
|
|
122
109
|
}
|
|
123
110
|
readNxConfiguration(e) {
|
|
124
111
|
try {
|
|
125
|
-
return JSON.parse(
|
|
112
|
+
return JSON.parse(s(a.join(e, k), "utf8"));
|
|
126
113
|
} catch {
|
|
127
114
|
return;
|
|
128
115
|
}
|
|
129
116
|
}
|
|
130
|
-
readTaskOptions(e) {
|
|
131
|
-
let { configuration: t, project: n, target: r } = e.task.target, i = this.toRecord(e.context.projectsConfigurations.projects[n]?.targets?.[r]), a = this.toRecord(i.configurations);
|
|
132
|
-
return {
|
|
133
|
-
...this.toRecord(i.options),
|
|
134
|
-
...this.toRecord(t === void 0 ? void 0 : a[t]),
|
|
135
|
-
...e.task.overrides
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
117
|
async spawnCommandLine(e) {
|
|
139
118
|
return await new Promise((t, n) => {
|
|
140
119
|
let r = o(process.execPath, e.argv, {
|
|
@@ -150,12 +129,6 @@ var O = "@codependix/nx/loader", k = "@codependix/cli/main", A = "nx.json", j =
|
|
|
150
129
|
});
|
|
151
130
|
});
|
|
152
131
|
}
|
|
153
|
-
toNameList(e) {
|
|
154
|
-
return (Array.isArray(e) ? e : [e]).filter((e) => typeof e == "string" || typeof e == "number").map(String);
|
|
155
|
-
}
|
|
156
|
-
toRecord(e) {
|
|
157
|
-
return typeof e == "object" && e ? { ...e } : {};
|
|
158
|
-
}
|
|
159
132
|
buildCommandArguments(e) {
|
|
160
133
|
return [
|
|
161
134
|
"--import",
|
|
@@ -173,17 +146,8 @@ var O = "@codependix/nx/loader", k = "@codependix/cli/main", A = "nx.json", j =
|
|
|
173
146
|
...e.dependencies ? [] : ["--no-dependencies"]
|
|
174
147
|
];
|
|
175
148
|
}
|
|
176
|
-
async hashTask(e) {
|
|
177
|
-
return this.judgesOwnProject(e) ? await e.context.hasher.hashTask(e.task, e.context.taskGraph, e.context.env ?? process.env) : {
|
|
178
|
-
details: {
|
|
179
|
-
command: `${e.task.id} judges projects its inputs do not cover`,
|
|
180
|
-
nodes: {}
|
|
181
|
-
},
|
|
182
|
-
value: s()
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
149
|
resolveConfigurationPath(e) {
|
|
186
|
-
return e.configuration === void 0 ? this.pluginService.resolvePluginOptions({ options: this.pluginService.readRegisteredOptions(this.readNxConfiguration(e.workspaceRoot)) }).configurationPath : this.configurationService.requireConfigurationPath(e.configuration,
|
|
150
|
+
return e.configuration === void 0 ? this.pluginService.resolvePluginOptions({ options: this.pluginService.readRegisteredOptions(this.readNxConfiguration(e.workspaceRoot)) }).configurationPath : this.configurationService.requireConfigurationPath(e.configuration, A);
|
|
187
151
|
}
|
|
188
152
|
resolveSelection(e) {
|
|
189
153
|
let t = this.readNameList(e.options.projects), n = this.readNameList(e.options.tags);
|
|
@@ -198,56 +162,57 @@ var O = "@codependix/nx/loader", k = "@codependix/cli/main", A = "nx.json", j =
|
|
|
198
162
|
};
|
|
199
163
|
}
|
|
200
164
|
async run(e) {
|
|
201
|
-
let t = this.
|
|
202
|
-
|
|
203
|
-
|
|
165
|
+
let t = this.resolveSelection(e);
|
|
166
|
+
if (e.cached && !this.judgesOwnProject({
|
|
167
|
+
...e,
|
|
168
|
+
selection: t
|
|
169
|
+
})) throw Error("The codependix gate target judges projects its cache inputs do not cover, so it must set `cache: false`.");
|
|
170
|
+
let n = this.buildCommandArguments({
|
|
171
|
+
...t,
|
|
172
|
+
cliEntryPath: c(import.meta.url).resolve(O),
|
|
204
173
|
configurationPath: this.resolveConfigurationPath({
|
|
205
174
|
configuration: e.options.configuration,
|
|
206
175
|
workspaceRoot: e.workspaceRoot
|
|
207
176
|
}),
|
|
208
177
|
dependencies: e.options.dependencies !== !1,
|
|
209
|
-
loaderUrl:
|
|
178
|
+
loaderUrl: l(c(import.meta.url).resolve(D)).href,
|
|
210
179
|
workspaceRoot: e.workspaceRoot
|
|
211
180
|
});
|
|
212
181
|
return await this.spawnCommandLine({
|
|
213
|
-
argv:
|
|
182
|
+
argv: n,
|
|
214
183
|
workspaceRoot: e.workspaceRoot
|
|
215
184
|
});
|
|
216
185
|
}
|
|
217
186
|
};
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
N = __decorate([n({
|
|
187
|
+
j = __decorate([t(), __decorateMetadata("design:paramtypes", [i === void 0 ? Object : i, T === void 0 ? Object : T])], j);
|
|
188
|
+
// src/modules/gate/gate.module.ts
|
|
189
|
+
var M = class GateModule {};
|
|
190
|
+
M = __decorate([n({
|
|
223
191
|
controllers: [],
|
|
224
|
-
exports: [
|
|
225
|
-
imports: [r,
|
|
226
|
-
providers: [
|
|
227
|
-
})],
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
P = __decorate([n({
|
|
192
|
+
exports: [j],
|
|
193
|
+
imports: [r, E],
|
|
194
|
+
providers: [j]
|
|
195
|
+
})], M);
|
|
196
|
+
// src/codependix-nx.module.ts
|
|
197
|
+
var N = class MainModule {};
|
|
198
|
+
N = __decorate([n({
|
|
232
199
|
controllers: [],
|
|
233
|
-
exports: [
|
|
234
|
-
imports: [
|
|
200
|
+
exports: [M, E],
|
|
201
|
+
imports: [M, E],
|
|
235
202
|
providers: []
|
|
236
|
-
})],
|
|
237
|
-
|
|
238
|
-
//#region projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-context.utilities.ts
|
|
203
|
+
})], N);
|
|
204
|
+
// src/modules/plugin/plugin-context.utilities.ts
|
|
239
205
|
async function resolveGateService() {
|
|
240
|
-
return (await resolvePluginContext()).get(
|
|
206
|
+
return (await resolvePluginContext()).get(j);
|
|
241
207
|
}
|
|
242
208
|
async function resolvePluginService() {
|
|
243
|
-
return (await resolvePluginContext()).get(
|
|
209
|
+
return (await resolvePluginContext()).get(T);
|
|
244
210
|
}
|
|
245
211
|
async function resolvePluginContext() {
|
|
246
212
|
let t = globalThis;
|
|
247
|
-
return t[
|
|
213
|
+
return t[m] ??= e.createApplicationContext(N, {
|
|
248
214
|
abortOnError: !1,
|
|
249
215
|
logger: !1
|
|
250
|
-
}), await t[
|
|
216
|
+
}), await t[m];
|
|
251
217
|
}
|
|
252
|
-
|
|
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 };
|
|
218
|
+
export { S as _, j as a, v as c, b as d, C as f, y as g, x as h, M as i, h as l, w as m, resolvePluginService as n, E as o, d as p, N as r, T as s, resolveGateService as t, g as u, __name as v };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { t as e } from "../../../plugin-context.utilities-
|
|
2
|
-
|
|
1
|
+
import { t as e } from "../../../plugin-context.utilities-BP_5JXUo.js";
|
|
2
|
+
// src/executors/gate/executor.ts
|
|
3
3
|
async function gateExecutor(t, n) {
|
|
4
|
-
|
|
4
|
+
let r = await e(), i = n.projectName === void 0 || n.targetName === void 0 ? void 0 : n.projectGraph.nodes[n.projectName]?.data.targets?.[n.targetName];
|
|
5
|
+
return { success: await r.run({
|
|
6
|
+
cached: i?.cache === !0,
|
|
5
7
|
options: t,
|
|
6
8
|
projectName: n.projectName,
|
|
7
9
|
workspaceRoot: n.root
|
|
8
10
|
}) };
|
|
9
11
|
}
|
|
10
|
-
//#endregion
|
|
11
12
|
export { gateExecutor as default };
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { ConfigurationService } from '@codependix/configuration';
|
|
2
2
|
import { CreateNodes } from '@nx/devkit';
|
|
3
|
-
import { Hash } from '@nx/devkit';
|
|
4
|
-
import { HasherContext } from '@nx/devkit';
|
|
5
|
-
import { Task } from '@nx/devkit';
|
|
6
3
|
|
|
7
4
|
/** Arguments for building the command line one gate runs. */
|
|
8
5
|
declare interface BuildCommandArguments extends GateSelection {
|
|
@@ -42,14 +39,6 @@ export declare interface CodependixPluginOptions {
|
|
|
42
39
|
*/
|
|
43
40
|
export declare const DEFAULT_GATE_TARGET_NAME = "codependix-gate";
|
|
44
41
|
|
|
45
|
-
/**
|
|
46
|
-
* What Nx hands an executor's hasher: its declared context, plus the task's
|
|
47
|
-
* own environment, which it passes without declaring.
|
|
48
|
-
*/
|
|
49
|
-
declare type GateHasherContext = HasherContext & {
|
|
50
|
-
readonly env?: NodeJS.ProcessEnv | undefined;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
42
|
/** Provides the run behind the gate executor. */
|
|
54
43
|
export declare class GateModule {
|
|
55
44
|
}
|
|
@@ -85,13 +74,7 @@ export declare class GateService {
|
|
|
85
74
|
private readonly configurationService;
|
|
86
75
|
private readonly pluginService;
|
|
87
76
|
constructor(configurationService: ConfigurationService, pluginService: PluginService);
|
|
88
|
-
/**
|
|
89
|
-
* Whether a gate task judges exactly the project it belongs to.
|
|
90
|
-
*
|
|
91
|
-
* Read from the options the executor will actually run with β the target's
|
|
92
|
-
* own, then the configuration's, then the command line's β through the
|
|
93
|
-
* same selection the run makes, so the two can never disagree.
|
|
94
|
-
*/
|
|
77
|
+
/** Whether a selection names exactly the project the target belongs to. */
|
|
95
78
|
private judgesOwnProject;
|
|
96
79
|
/**
|
|
97
80
|
* Reads a list of names out of an executor's options.
|
|
@@ -109,11 +92,6 @@ export declare class GateService {
|
|
|
109
92
|
* conventional paths, which a workspace with no registration gets anyway.
|
|
110
93
|
*/
|
|
111
94
|
private readNxConfiguration;
|
|
112
|
-
/**
|
|
113
|
-
* The options one gate task runs with, merged as Nx merges them: the
|
|
114
|
-
* target's, then the named configuration's, then the command line's.
|
|
115
|
-
*/
|
|
116
|
-
private readTaskOptions;
|
|
117
95
|
/**
|
|
118
96
|
* Starts the command line and settles on whether it exited zero.
|
|
119
97
|
*
|
|
@@ -123,13 +101,6 @@ export declare class GateService {
|
|
|
123
101
|
* verdict was reached, so none may be recorded as a pass.
|
|
124
102
|
*/
|
|
125
103
|
private spawnCommandLine;
|
|
126
|
-
/**
|
|
127
|
-
* Reads a name list from an untrusted option: a list from configuration,
|
|
128
|
-
* or the single string, or number, a command line parses it into.
|
|
129
|
-
*/
|
|
130
|
-
private toNameList;
|
|
131
|
-
/** Copies an untrusted value into a record, or an empty one. */
|
|
132
|
-
private toRecord;
|
|
133
104
|
/**
|
|
134
105
|
* Builds the `node` arguments one gate runs.
|
|
135
106
|
*
|
|
@@ -139,17 +110,6 @@ export declare class GateService {
|
|
|
139
110
|
* dependency's own gate rather than every gate downstream of it.
|
|
140
111
|
*/
|
|
141
112
|
buildCommandArguments(args: BuildCommandArguments): string[];
|
|
142
|
-
/**
|
|
143
|
-
* Hashes one gate task for Nx's cache β or, when it judges any project but
|
|
144
|
-
* its own, gives it a hash no run shares, so its verdict is never replayed.
|
|
145
|
-
*
|
|
146
|
-
* A gate's inputs cover its own project and that project's dependencies.
|
|
147
|
-
* One handed `projects` or `tags` judges projects those inputs need not
|
|
148
|
-
* reach, so a hash built from them could replay a pass after an edit to
|
|
149
|
-
* the very project that now fails. A gate judging its own project is
|
|
150
|
-
* hashed exactly as Nx would hash it without this hasher.
|
|
151
|
-
*/
|
|
152
|
-
hashTask(args: HashGateTaskArguments): Promise<Hash>;
|
|
153
113
|
/**
|
|
154
114
|
* Resolves the configuration path one gate runs with.
|
|
155
115
|
*
|
|
@@ -174,16 +134,17 @@ export declare class GateService {
|
|
|
174
134
|
options: GateOptions;
|
|
175
135
|
projectName: string | undefined;
|
|
176
136
|
}): GateSelection;
|
|
177
|
-
/**
|
|
137
|
+
/**
|
|
138
|
+
* Runs one gate, and settles on whether it passed.
|
|
139
|
+
*
|
|
140
|
+
* Refuses a cached target that judges any project but its own. The target's
|
|
141
|
+
* inputs cover only its own project and that project's dependencies, so Nx
|
|
142
|
+
* could replay a pass after an edit to a project the run judges and they do
|
|
143
|
+
* not reach. `cache` is fixed per target, so the target must opt out of it.
|
|
144
|
+
*/
|
|
178
145
|
run(args: RunGateArguments): Promise<boolean>;
|
|
179
146
|
}
|
|
180
147
|
|
|
181
|
-
/** Arguments for hashing one gate task. */
|
|
182
|
-
declare interface HashGateTaskArguments {
|
|
183
|
-
readonly context: GateHasherContext;
|
|
184
|
-
readonly task: Task;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
148
|
/**
|
|
188
149
|
* One cache input of an inferred target: a file glob, or the npm packages an
|
|
189
150
|
* installed command line is versioned by.
|
|
@@ -306,6 +267,8 @@ export declare function resolvePluginService(): Promise<PluginService>;
|
|
|
306
267
|
|
|
307
268
|
/** Arguments for one gate run. */
|
|
308
269
|
declare interface RunGateArguments {
|
|
270
|
+
/** Whether Nx caches the target this gate runs as. */
|
|
271
|
+
readonly cached: boolean;
|
|
309
272
|
readonly options: GateOptions;
|
|
310
273
|
/** The project the target belongs to, absent when run against none. */
|
|
311
274
|
readonly projectName: string | undefined;
|
package/dist/src/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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-
|
|
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-BP_5JXUo.js";
|
|
2
2
|
import _ from "node:path";
|
|
3
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
|
+
// src/modules/plugin/plugin-inputs.utilities.ts
|
|
7
7
|
function isInsideWorkspace(e) {
|
|
8
8
|
let t = _.relative(b(e.workspaceRoot), e.directory);
|
|
9
9
|
return !(t.startsWith("..") || _.isAbsolute(t) || t.split(_.sep).includes("node_modules"));
|
|
@@ -90,8 +90,7 @@ function toRecord(e) {
|
|
|
90
90
|
function warnUnresolved(e) {
|
|
91
91
|
e.logger.warn(`πΈοΈ Skipped the cache inputs of ${e.names.join(", ")}, which could not be resolved, so a change to ${e.names.length === 1 ? "it" : "them"} will not invalidate a cached codependix gate.`);
|
|
92
92
|
}
|
|
93
|
-
|
|
94
|
-
//#region projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-tsconfig.utilities.ts
|
|
93
|
+
// src/modules/plugin/plugin-tsconfig.utilities.ts
|
|
95
94
|
function resolveTsconfigInputs(t) {
|
|
96
95
|
try {
|
|
97
96
|
let e = b(t.workspaceRoot), { files: n, packages: r } = followExtendsChain({
|
|
@@ -187,8 +186,7 @@ function resolvePathBase(e) {
|
|
|
187
186
|
function warnSkipped(e) {
|
|
188
187
|
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
188
|
}
|
|
190
|
-
|
|
191
|
-
//#region projects/ic-suite/codependix/codependix-nx/src/index.ts
|
|
189
|
+
// src/index.ts
|
|
192
190
|
var T = {
|
|
193
191
|
createNodes: [f, async (e, t, n) => {
|
|
194
192
|
let r = (await u()).inferTargets({
|
|
@@ -210,5 +208,4 @@ var T = {
|
|
|
210
208
|
}],
|
|
211
209
|
name: "@codependix/nx"
|
|
212
210
|
};
|
|
213
|
-
//#endregion
|
|
214
211
|
export { c as CODEPENDIX_NX_PLUGIN_NAME, g as DEFAULT_GATE_TARGET_NAME, s as GateModule, t as GateService, p as MainModule, d as PluginModule, m as PluginService, T as default, h as resolveGateService, u as resolvePluginService };
|
package/executors.json
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
"executors": {
|
|
4
4
|
"gate": {
|
|
5
5
|
"description": "Fail a project whose dependency graphs break a codependix boundary rule charged to it, built over the project and its Nx dependencies.",
|
|
6
|
-
"hasher": "@codependix/nx/src/executors/gate/hasher",
|
|
7
6
|
"implementation": "@codependix/nx/src/executors/gate/executor",
|
|
8
7
|
"schema": "./src/executors/gate/schema.json"
|
|
9
8
|
}
|
package/package.json
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"url": "https://github.com/organizzolini/codebase/issues"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@codependix/cli": "0.0.
|
|
8
|
-
"@codependix/configuration": "0.0.
|
|
7
|
+
"@codependix/cli": "0.0.50",
|
|
8
|
+
"@codependix/configuration": "0.0.49",
|
|
9
9
|
"@nestjs/common": "^11.1.21 || ^12.0.1",
|
|
10
10
|
"@nestjs/core": "^11.1.21 || ^12.0.1",
|
|
11
11
|
"@nx/devkit": "^23.3.0",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"strict": true
|
|
78
78
|
},
|
|
79
79
|
"types": "./dist/src/index.d.ts",
|
|
80
|
-
"version": "0.0.
|
|
80
|
+
"version": "0.0.36"
|
|
81
81
|
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Hash } from '@nx/devkit';
|
|
2
|
-
import { HasherContext } from '@nx/devkit';
|
|
3
|
-
import { Task } from '@nx/devkit';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Hashes one gate task for Nx's cache.
|
|
7
|
-
*
|
|
8
|
-
* Nx consults an executor's hasher instead of hashing the target's inputs
|
|
9
|
-
* itself, which is the one place a run's own options can change whether it
|
|
10
|
-
* is cacheable at all: `cache` is fixed per target, before any option is
|
|
11
|
-
* read. A gate judging its own project is hashed exactly as Nx would; one
|
|
12
|
-
* whose `projects` or `tags` select any other project is never replayed.
|
|
13
|
-
*/
|
|
14
|
-
declare function gateHasher(task: Task, context: GateHasherContext): Promise<Hash>;
|
|
15
|
-
export default gateHasher;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* What Nx hands an executor's hasher: its declared context, plus the task's
|
|
19
|
-
* own environment, which it passes without declaring.
|
|
20
|
-
*/
|
|
21
|
-
declare type GateHasherContext = HasherContext & {
|
|
22
|
-
readonly env?: NodeJS.ProcessEnv | undefined;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export { }
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { t as e } from "../../../plugin-context.utilities-oWfnrfib.js";
|
|
2
|
-
//#region projects/ic-suite/codependix/codependix-nx/src/executors/gate/hasher.ts
|
|
3
|
-
async function gateHasher(t, n) {
|
|
4
|
-
return await (await e()).hashTask({
|
|
5
|
-
context: n,
|
|
6
|
-
task: t
|
|
7
|
-
});
|
|
8
|
-
}
|
|
9
|
-
//#endregion
|
|
10
|
-
export { gateHasher as default };
|