@codependix/nx 0.0.34 β†’ 0.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 0.0.35 (2026-10-24)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - **codependix:** πŸ› replace the gate's custom hasher with a cache check ([#1819](https://github.com/organizzolini/codebase/pull/1819))
6
+
1
7
  ## 0.0.34 (2026-10-23)
2
8
 
3
9
  ### 🧱 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 project
160
- is never replayed from the cache.** Its inputs cover its own project and that project's dependencies,
161
- not the projects such a run judges, so a hash built from them could replay a
162
- pass after an edit to the very project that now fails. The executor's hasher
163
- gives such a run a hash no other run shares, whether the selection came from
164
- the command line, the target's options, or a configuration; a gate judging
165
- only its own project β€” including one whose `projects` names exactly that
166
- project β€” is hashed from its inputs exactly as Nx would hash it. Because
167
- the target has a hasher, `nx show target inputs` prints a custom-hasher
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
- ![Lines of Code](https://img.shields.io/badge/Lines_of_Code-3927-22c55e?style=flat-square)
484
- ![Repository Size](https://img.shields.io/badge/Repository_Size-145.66_kB-6b7280?style=flat-square)
350
+ ![Lines of Code](https://img.shields.io/badge/Lines_of_Code-3734-22c55e?style=flat-square)
351
+ ![Repository Size](https://img.shields.io/badge/Repository_Size-138.74_kB-6b7280?style=flat-square)
485
352
  ![Folders](https://img.shields.io/badge/Folders-7-4a4a4a?style=flat-square)
486
- ![Source Files](https://img.shields.io/badge/Source_Files-35-3178c6?style=flat-square)
353
+ ![Source Files](https://img.shields.io/badge/Source_Files-33-3178c6?style=flat-square)
487
354
 
488
355
  ### TypeScript
489
356
 
490
- ![TypeScript Files](https://img.shields.io/badge/TypeScript_Files-34-3178c6?style=flat-square)
491
- ![Interfaces](https://img.shields.io/badge/Interfaces-14-0ea5e9?style=flat-square)
357
+ ![TypeScript Files](https://img.shields.io/badge/TypeScript_Files-32-3178c6?style=flat-square)
358
+ ![Interfaces](https://img.shields.io/badge/Interfaces-13-0ea5e9?style=flat-square)
492
359
  ![Generic Declarations](https://img.shields.io/badge/Generic_Declarations-0-0369a1?style=flat-square)
493
360
  ![Enums](https://img.shields.io/badge/Enums-0-f97316?style=flat-square)
494
361
  ![Decorators](https://img.shields.io/badge/Decorators-5-db2777?style=flat-square)
495
- ![Doc Comments](https://img.shields.io/badge/Doc_Comments-118-6366f1?style=flat-square)
362
+ ![Doc Comments](https://img.shields.io/badge/Doc_Comments-112-6366f1?style=flat-square)
496
363
  ![Static Methods](https://img.shields.io/badge/Static_Methods-0-166534?style=flat-square)
497
364
 
498
365
  ### JavaScript
499
366
 
500
367
  ![JavaScript Files](https://img.shields.io/badge/JavaScript_Files-1-f7df1e?style=flat-square)
501
- ![Test Files](https://img.shields.io/badge/Test_Files-10-10b981?style=flat-square)
502
- ![External Packages](https://img.shields.io/badge/External_Packages-15-8b5cf6?style=flat-square)
368
+ ![Test Files](https://img.shields.io/badge/Test_Files-9-10b981?style=flat-square)
369
+ ![External Packages](https://img.shields.io/badge/External_Packages-14-8b5cf6?style=flat-square)
503
370
  ![Classes](https://img.shields.io/badge/Classes-5-7c3aed?style=flat-square)
504
- ![Functions](https://img.shields.io/badge/Functions-206-16a34a?style=flat-square)
505
- ![Methods](https://img.shields.io/badge/Methods-33-15803d?style=flat-square)
506
- ![Sync Functions](https://img.shields.io/badge/Sync_Functions-194-4ade80?style=flat-square)
507
- ![Async Functions](https://img.shields.io/badge/Async_Functions-45-059669?style=flat-square)
508
- ![Constants](https://img.shields.io/badge/Constants-164-dc2626?style=flat-square)
509
- ![Imports](https://img.shields.io/badge/Imports-136-0284c7?style=flat-square)
510
- ![Exported Symbols](https://img.shields.io/badge/Exported_Symbols-54-ea580c?style=flat-square)
511
- ![Comments](https://img.shields.io/badge/Comments-210-64748b?style=flat-square)
512
- ![Comment Lines](https://img.shields.io/badge/Comment_Lines-508-475569?style=flat-square)
371
+ ![Functions](https://img.shields.io/badge/Functions-199-16a34a?style=flat-square)
372
+ ![Methods](https://img.shields.io/badge/Methods-28-15803d?style=flat-square)
373
+ ![Sync Functions](https://img.shields.io/badge/Sync_Functions-185-4ade80?style=flat-square)
374
+ ![Async Functions](https://img.shields.io/badge/Async_Functions-42-059669?style=flat-square)
375
+ ![Constants](https://img.shields.io/badge/Constants-145-dc2626?style=flat-square)
376
+ ![Imports](https://img.shields.io/badge/Imports-121-0284c7?style=flat-square)
377
+ ![Exported Symbols](https://img.shields.io/badge/Exported_Symbols-51-ea580c?style=flat-square)
378
+ ![Comments](https://img.shields.io/badge/Comments-199-64748b?style=flat-square)
379
+ ![Comment Lines](https://img.shields.io/badge/Comment_Lines-487-475569?style=flat-square)
513
380
  ![TODO Comments](https://img.shields.io/badge/TODO_Comments-0-ca8a04?style=flat-square)
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
  ![JSON Files](https://img.shields.io/badge/JSON_Files-6-a16207?style=flat-square)
533
- ![JSON Lines](https://img.shields.io/badge/JSON_Lines-228-ca8a04?style=flat-square)
400
+ ![JSON Lines](https://img.shields.io/badge/JSON_Lines-227-ca8a04?style=flat-square)
534
401
  ![JSON Objects](https://img.shields.io/badge/JSON_Objects-52-7c3aed?style=flat-square)
535
402
  ![JSON Arrays](https://img.shields.io/badge/JSON_Arrays-15-8b5cf6?style=flat-square)
536
- ![JSON Properties](https://img.shields.io/badge/JSON_Properties-149-0284c7?style=flat-square)
537
- ![JSON Strings](https://img.shields.io/badge/JSON_Strings-127-16a34a?style=flat-square)
403
+ ![JSON Properties](https://img.shields.io/badge/JSON_Properties-148-0284c7?style=flat-square)
404
+ ![JSON Strings](https://img.shields.io/badge/JSON_Strings-126-16a34a?style=flat-square)
538
405
  ![JSON Numbers](https://img.shields.io/badge/JSON_Numbers-1-059669?style=flat-square)
539
406
  ![JSON Booleans](https://img.shields.io/badge/JSON_Booleans-8-0ea5e9?style=flat-square)
540
407
  ![JSON Nulls](https://img.shields.io/badge/JSON_Nulls-0-64748b?style=flat-square)
541
408
  ![JSON Items](https://img.shields.io/badge/JSON_Items-48-475569?style=flat-square)
542
- ![JSON Nodes](https://img.shields.io/badge/JSON_Nodes-203-dc2626?style=flat-square)
409
+ ![JSON Nodes](https://img.shields.io/badge/JSON_Nodes-202-dc2626?style=flat-square)
543
410
  ![JSON Max Depth](https://img.shields.io/badge/JSON_Max_Depth-5-ea580c?style=flat-square)
544
411
 
545
412
  ### YAML
@@ -627,7 +494,7 @@ What this project is judged against, as declared in its own `callidescope.config
627
494
  ![Types Files](https://img.shields.io/badge/Types_Files-3-db2777?style=flat-square)
628
495
  ![Utilities Files](https://img.shields.io/badge/Utilities_Files-3-0ea5e9?style=flat-square)
629
496
  ![TypeORM Entities](https://img.shields.io/badge/TypeORM_Entities-0-059669?style=flat-square)
630
- ![Unit Tests](https://img.shields.io/badge/Unit_Tests-9-ca8a04?style=flat-square)
497
+ ![Unit Tests](https://img.shields.io/badge/Unit_Tests-8-ca8a04?style=flat-square)
631
498
  ![Integration Tests](https://img.shields.io/badge/Integration_Tests-1-7c3aed?style=flat-square)
632
499
  ![End To End Tests](https://img.shields.io/badge/End_To_End_Tests-0-0284c7?style=flat-square)
633
500
  ![CSS Comment Budget](https://img.shields.io/badge/CSS_Comment_Budget-0-16a34a?style=flat-square)
@@ -665,23 +532,126 @@ What this project is judged against, as declared in its own `callidescope.config
665
532
  ### Markdown
666
533
 
667
534
  ![Markdown Files](https://img.shields.io/badge/Markdown_Files-2-083fa1?style=flat-square)
668
- ![Markdown Lines](https://img.shields.io/badge/Markdown_Lines-406-1f6feb?style=flat-square)
535
+ ![Markdown Lines](https://img.shields.io/badge/Markdown_Lines-409-1f6feb?style=flat-square)
669
536
  ![H1](https://img.shields.io/badge/H1-1-7c3aed?style=flat-square)
670
- ![H2](https://img.shields.io/badge/H2-38-8b5cf6?style=flat-square)
671
- ![H3](https://img.shields.io/badge/H3-47-a78bfa?style=flat-square)
537
+ ![H2](https://img.shields.io/badge/H2-39-8b5cf6?style=flat-square)
538
+ ![H3](https://img.shields.io/badge/H3-48-a78bfa?style=flat-square)
672
539
  ![H4](https://img.shields.io/badge/H4-0-c4b5fd?style=flat-square)
673
540
  ![H5](https://img.shields.io/badge/H5-0-ddd6fe?style=flat-square)
674
541
  ![H6](https://img.shields.io/badge/H6-0-ede9fe?style=flat-square)
675
- ![Paragraphs](https://img.shields.io/badge/Paragraphs-86-64748b?style=flat-square)
676
- ![Lists](https://img.shields.io/badge/Lists-44-16a34a?style=flat-square)
677
- ![List Items](https://img.shields.io/badge/List_Items-75-22c55e?style=flat-square)
542
+ ![Paragraphs](https://img.shields.io/badge/Paragraphs-87-64748b?style=flat-square)
543
+ ![Lists](https://img.shields.io/badge/Lists-45-16a34a?style=flat-square)
544
+ ![List Items](https://img.shields.io/badge/List_Items-76-22c55e?style=flat-square)
678
545
  ![Task List Items](https://img.shields.io/badge/Task_List_Items-0-4ade80?style=flat-square)
679
546
  ![Tables](https://img.shields.io/badge/Tables-0-0284c7?style=flat-square)
680
547
  ![Table Rows](https://img.shields.io/badge/Table_Rows-0-0ea5e9?style=flat-square)
681
- ![Links](https://img.shields.io/badge/Links-20-059669?style=flat-square)
548
+ ![Links](https://img.shields.io/badge/Links-21-059669?style=flat-square)
682
549
  ![Images](https://img.shields.io/badge/Images-0-10b981?style=flat-square)
683
550
  ![Code Blocks](https://img.shields.io/badge/Code_Blocks-4-dc2626?style=flat-square)
684
- ![Inline Code](https://img.shields.io/badge/Inline_Code-52-ef4444?style=flat-square)
551
+ ![Inline Code](https://img.shields.io/badge/Inline_Code-53-ef4444?style=flat-square)
685
552
  ![Block Quotes](https://img.shields.io/badge/Block_Quotes-0-ca8a04?style=flat-square)
686
553
  ![Thematic Breaks](https://img.shields.io/badge/Thematic_Breaks-0-a16207?style=flat-square)
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 -->
@@ -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 { randomUUID as s } from "node:crypto";
8
- import { readFileSync as c } from "node:fs";
9
- import { createRequire as l } from "node:module";
10
- import { pathToFileURL as u } from "node:url";
11
- //#region \0rolldown/runtime.js
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
- }), 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 = [
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
- b
20
- ], S = ["package.json", "src/**/!(*.test.*|*.spec.*)"], C = "{workspaceRoot}/tsconfig.json", w = "tsconfig.json", T = {
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
- //#endregion
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
- //#endregion
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
- //#endregion
38
- //#region projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin.service.ts
39
- var E = class PluginService {
34
+ // projects/ic-suite/codependix/codependix-nx/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) === p).map((e) => a.dirname(e)).filter((e) => 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: `${g}:gate`,
56
+ executor: `${h}:gate`,
61
57
  inputs: [
62
58
  "default",
63
59
  "^default",
64
60
  `{workspaceRoot}/${t.configurationPath}`,
65
- m,
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
- }), v),
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
- E = __decorate([t(), __decorateMetadata("design:paramtypes", [i === void 0 ? Object : i])], E);
93
- //#endregion
94
- //#region projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin.module.ts
95
- var D = class PluginModule {};
96
- D = __decorate([n({
88
+ T = __decorate([t(), __decorateMetadata("design:paramtypes", [i === void 0 ? Object : i])], T);
89
+ // projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin.module.ts
90
+ var E = class PluginModule {};
91
+ E = __decorate([n({
97
92
  controllers: [],
98
- exports: [E],
93
+ exports: [T],
99
94
  imports: [r],
100
- providers: [E]
101
- })], D);
102
- //#endregion
103
- //#region projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.constants.ts
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
+ // projects/ic-suite/codependix/codependix-nx/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
- let { project: t } = e.task.target, n = this.readTaskOptions(e), r = this.resolveSelection({
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(c(a.join(e, A), "utf8"));
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, j);
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.buildCommandArguments({
202
- ...this.resolveSelection(e),
203
- cliEntryPath: l(import.meta.url).resolve(k),
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: u(l(import.meta.url).resolve(O)).href,
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: t,
182
+ argv: n,
214
183
  workspaceRoot: e.workspaceRoot
215
184
  });
216
185
  }
217
186
  };
218
- M = __decorate([t(), __decorateMetadata("design:paramtypes", [i === void 0 ? Object : i, E === void 0 ? Object : E])], M);
219
- //#endregion
220
- //#region projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.module.ts
221
- var N = class GateModule {};
222
- N = __decorate([n({
187
+ j = __decorate([t(), __decorateMetadata("design:paramtypes", [i === void 0 ? Object : i, T === void 0 ? Object : T])], j);
188
+ // projects/ic-suite/codependix/codependix-nx/src/modules/gate/gate.module.ts
189
+ var M = class GateModule {};
190
+ M = __decorate([n({
223
191
  controllers: [],
224
- exports: [M],
225
- imports: [r, D],
226
- providers: [M]
227
- })], N);
228
- //#endregion
229
- //#region projects/ic-suite/codependix/codependix-nx/src/codependix-nx.module.ts
230
- var P = class MainModule {};
231
- P = __decorate([n({
192
+ exports: [j],
193
+ imports: [r, E],
194
+ providers: [j]
195
+ })], M);
196
+ // projects/ic-suite/codependix/codependix-nx/src/codependix-nx.module.ts
197
+ var N = class MainModule {};
198
+ N = __decorate([n({
232
199
  controllers: [],
233
- exports: [N, D],
234
- imports: [N, D],
200
+ exports: [M, E],
201
+ imports: [M, E],
235
202
  providers: []
236
- })], P);
237
- //#endregion
238
- //#region projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-context.utilities.ts
203
+ })], N);
204
+ // projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-context.utilities.ts
239
205
  async function resolveGateService() {
240
- return (await resolvePluginContext()).get(M);
206
+ return (await resolvePluginContext()).get(j);
241
207
  }
242
208
  async function resolvePluginService() {
243
- return (await resolvePluginContext()).get(E);
209
+ return (await resolvePluginContext()).get(T);
244
210
  }
245
211
  async function resolvePluginContext() {
246
212
  let t = globalThis;
247
- return t[h] ??= e.createApplicationContext(P, {
213
+ return t[m] ??= e.createApplicationContext(N, {
248
214
  abortOnError: !1,
249
215
  logger: !1
250
- }), await t[h];
216
+ }), await t[m];
251
217
  }
252
- //#endregion
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-oWfnrfib.js";
2
- //#region projects/ic-suite/codependix/codependix-nx/src/executors/gate/executor.ts
1
+ import { t as e } from "../../../plugin-context.utilities-B3qWOwIT.js";
2
+ // projects/ic-suite/codependix/codependix-nx/src/executors/gate/executor.ts
3
3
  async function gateExecutor(t, n) {
4
- return { success: await (await e()).run({
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 };
@@ -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
- /** Runs one gate, and settles on whether it passed. */
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-oWfnrfib.js";
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-B3qWOwIT.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
- //#region projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-inputs.utilities.ts
6
+ // projects/ic-suite/codependix/codependix-nx/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
- //#endregion
94
- //#region projects/ic-suite/codependix/codependix-nx/src/modules/plugin/plugin-tsconfig.utilities.ts
93
+ // projects/ic-suite/codependix/codependix-nx/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
- //#endregion
191
- //#region projects/ic-suite/codependix/codependix-nx/src/index.ts
189
+ // projects/ic-suite/codependix/codependix-nx/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
@@ -77,5 +77,5 @@
77
77
  "strict": true
78
78
  },
79
79
  "types": "./dist/src/index.d.ts",
80
- "version": "0.0.34"
80
+ "version": "0.0.35"
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 };