@coinagerie/nx 0.0.4 โ†’ 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ## 0.0.6 (2026-11-06)
2
+
3
+ ### ๐Ÿงฑ Updated Dependencies
4
+
5
+ - Updated coinagerie-configuration to 0.0.6
6
+
7
+ ## 0.0.5 (2026-11-06)
8
+
9
+ ### ๐Ÿ”ฅ Performance
10
+
11
+ - **coinagerie:** โšก๏ธ judge every project's glossary from one batched command-line run ([#2115](https://github.com/organizzolini/codebase/pull/2115))
12
+
13
+ ### ๐Ÿงฑ Updated Dependencies
14
+
15
+ - Updated coinagerie-configuration to 0.0.5
16
+
1
17
  ## 0.0.4 (2026-11-04)
2
18
 
3
19
  ### ๐Ÿงฑ Updated Dependencies
package/README.md CHANGED
@@ -68,13 +68,9 @@ This project was generated from the [nestjs-service-project](../../configuration
68
68
 
69
69
  The words this package uses that the root glossary does not define, regenerated with `nx run coinagerie-nx:coinagerie-check:write`.
70
70
 
71
- - **abort**: The NestJS option abortOnError, set false so a failed plugin bootstrap does not kill the Nx daemon's process.
72
- - **beta**: A fixture package name in the plugin's unit tests, standing for a project that holds a coinagerie configuration.
71
+ - **batch**: Group of coinagerie-check tasks Nx hands to one executor call, which starts the command line once and names every project to it.
73
72
  - **breadth**: The maximumBreadth limit in this package's callidescope.config.ts, set to four callees per callable.
74
73
  - **gamma**: A fixture package name in the plugin's unit tests, standing for a project with a project.json but no configuration.
75
- - **mj**: The module-extension fragment of .mjs configuration file names that the plugin matches as coinagerie config variants.
76
- - **posix**: Node's path module, the forward-slash variant used to derive a project root from a configuration file path.
77
- - **sample**: A fixture folder name in the plugin's unit tests, holding a coinagerie.config.ts that the inference reads.
78
74
 
79
75
  <!-- coinagerie:end -->
80
76
 
@@ -86,10 +82,10 @@ Call stacks traced through `projects/ic-suite/coinagerie/coinagerie-nx`, deepest
86
82
 
87
83
  | Measure | Value |
88
84
  | --- | --- |
89
- | Callables | 17 |
90
- | Files | 18 |
91
- | Calls traced | 15 |
92
- | Call stacks | 1 |
85
+ | Callables | 35 |
86
+ | Files | 22 |
87
+ | Calls traced | 32 |
88
+ | Call stacks | 3 |
93
89
  | Deepest stack | 6 |
94
90
  | Stacks through recursion | 0 |
95
91
  | Unfollowable calls | 0 |
@@ -109,7 +105,7 @@ What this project is judged against, as declared in its own `callidescope.config
109
105
 
110
106
  ```text
111
107
  ๐Ÿš€ anonymous(โ€ฆ): Promise<CreateNodesResultArray> [projects/ic-suite/coinagerie/coinagerie-nx/src/index.ts:40]
112
- โ””โ”€> PluginService.inferTargets(args: InferTargetsArguments): Map<string, InferredTargets> [projects/ic-suite/coinagerie/coinagerie-nx/src/modules/plugin/plugin.service.ts:115]
108
+ โ””โ”€> PluginService.inferTargets(args: InferTargetsArguments): Map<string, InferredTargets> [projects/ic-suite/coinagerie/coinagerie-nx/src/modules/plugin/plugin.service.ts:112]
113
109
  โ†ณ Infers a check target onto every project that holds a configuration.
114
110
  โ””โ”€> OptionsService.resolvePluginOptions(options: unknown): CoinageriePluginOptions [projects/ic-suite/coinagerie/coinagerie-nx/src/modules/options/options.service.ts:82]
115
111
  โ†ณ Resolves the effective plugin options from an untrusted value.
@@ -120,24 +116,64 @@ What this project is judged against, as declared in its own `callidescope.config
120
116
  โ†ณ Narrows an untrusted value to an Nx input object, such as `{ env }`.
121
117
  ```
122
118
 
119
+ **2. `checkBatchExecutor`** โ€” depth 6 ยท orphan-root
120
+
121
+ ```text
122
+ ๐Ÿš€ checkBatchExecutor(โ€ฆ): Promise<Record<string, CheckBatchTaskResult>> [projects/ic-suite/coinagerie/coinagerie-nx/src/executors/check/batch-executor.ts:19]
123
+ โ†ณ Judges every task Nx batched for this executor from one command-line process.
124
+ โ””โ”€> runBatch(โ€ฆ): Promise<Record<string, CheckBatchTaskResult>> [projects/ic-suite/coinagerie/coinagerie-nx/src/executors/check/executor.utilities.ts:58]
125
+ โ†ณ Judges every task of a batch, one process per group, each task by its own verdict.
126
+ โ””โ”€> runGroup(โ€ฆ): Promise<Record<string, CheckBatchTaskResult>> [projects/ic-suite/coinagerie/coinagerie-nx/src/executors/check/executor.utilities.ts:78]
127
+ โ†ณ Judges every task of a group from one process, giving each its own verdict.
128
+ โ””โ”€> parseVerdicts(output: ProcessOutput): CheckVerdictRecord[] [projects/ic-suite/coinagerie/coinagerie-nx/src/executors/check/executor.utilities.ts:154]
129
+ โ†ณ Reads the verdicts a process printed.
130
+ โ””โ”€> isVerdictList(value: unknown): value is CheckVerdictRecord[] [projects/ic-suite/coinagerie/coinagerie-nx/src/executors/check/executor.utilities.ts:120]
131
+ โ†ณ Whether a parsed value is a list of verdicts, as the `batch` command prints them.
132
+ โ””โ”€> isVerdictRecord(value: unknown): value is CheckVerdictRecord [projects/ic-suite/coinagerie/coinagerie-nx/src/executors/check/executor.utilities.ts:135]
133
+ โ†ณ Whether a parsed value is one verdict as the `batch` command prints it.
134
+ ```
135
+
136
+ **3. `checkExecutor`** โ€” depth 5 ยท orphan-root
137
+
138
+ ```text
139
+ ๐Ÿš€ checkExecutor(โ€ฆ): Promise<{ success: boolean; }> [projects/ic-suite/coinagerie/coinagerie-nx/src/executors/check/executor.ts:18]
140
+ โ†ณ Judges one project's glossaries against the words its code uses.
141
+ โ””โ”€> runGroup(โ€ฆ): Promise<Record<string, CheckBatchTaskResult>> [projects/ic-suite/coinagerie/coinagerie-nx/src/executors/check/executor.utilities.ts:78]
142
+ โ†ณ Judges every task of a group from one process, giving each its own verdict.
143
+ โ””โ”€> parseVerdicts(output: ProcessOutput): CheckVerdictRecord[] [projects/ic-suite/coinagerie/coinagerie-nx/src/executors/check/executor.utilities.ts:154]
144
+ โ†ณ Reads the verdicts a process printed.
145
+ โ””โ”€> isVerdictList(value: unknown): value is CheckVerdictRecord[] [projects/ic-suite/coinagerie/coinagerie-nx/src/executors/check/executor.utilities.ts:120]
146
+ โ†ณ Whether a parsed value is a list of verdicts, as the `batch` command prints them.
147
+ โ””โ”€> isVerdictRecord(value: unknown): value is CheckVerdictRecord [projects/ic-suite/coinagerie/coinagerie-nx/src/executors/check/executor.utilities.ts:135]
148
+ โ†ณ Whether a parsed value is one verdict as the `batch` command prints it.
149
+ ```
150
+
123
151
  ### Breadth
124
152
 
125
153
  | Callable | Breadth | Calls directly | Location |
126
154
  | --- | --- | --- | --- |
127
- | `PluginService.inferTargets` | 3 | `OptionsService.resolvePluginOptions`, `PluginService.isProject`, `PluginService.buildCheckTarget` | `projects/ic-suite/coinagerie/coinagerie-nx/src/modules/plugin/plugin.service.ts:115` |
155
+ | `runProcess` | 4 | `buildCommand`, `on(โ€ฆ)`, `on(โ€ฆ)`, `anonymous` | `projects/ic-suite/coinagerie/coinagerie-nx/src/executors/check/executor.utilities.ts:182` |
156
+ | `PluginService.inferTargets` | 3 | `OptionsService.resolvePluginOptions`, `PluginService.isProject`, `PluginService.buildCheckTarget` | `projects/ic-suite/coinagerie/coinagerie-nx/src/modules/plugin/plugin.service.ts:112` |
128
157
  | `anonymous` | 3 | `resolvePluginService`, `PluginService.inferTargets`, `flatMap(โ€ฆ)` | `projects/ic-suite/coinagerie/coinagerie-nx/src/index.ts:40` |
129
- | `OptionsService.readInputs` | 2 | `OptionsService.isUnknownArray`, `OptionsService.flatMap(โ€ฆ)` | `projects/ic-suite/coinagerie/coinagerie-nx/src/modules/options/options.service.ts:49` |
130
158
 
131
159
  <details>
132
- <summary>5 more callables</summary>
160
+ <summary>13 more callables</summary>
133
161
 
134
162
  | Callable | Breadth | Calls directly | Location |
135
163
  | --- | --- | --- | --- |
164
+ | `runGroup` | 3 | `parseVerdicts`, `runProcess`, `find(โ€ฆ)` | `projects/ic-suite/coinagerie/coinagerie-nx/src/executors/check/executor.utilities.ts:78` |
165
+ | `checkExecutor` | 3 | `runGroup`, `map(โ€ฆ)`, `every(โ€ฆ)` | `projects/ic-suite/coinagerie/coinagerie-nx/src/executors/check/executor.ts:18` |
166
+ | `OptionsService.readInputs` | 2 | `OptionsService.isUnknownArray`, `OptionsService.flatMap(โ€ฆ)` | `projects/ic-suite/coinagerie/coinagerie-nx/src/modules/options/options.service.ts:49` |
136
167
  | `OptionsService.resolvePluginOptions` | 2 | `OptionsService.readString`, `OptionsService.readInputs` | `projects/ic-suite/coinagerie/coinagerie-nx/src/modules/options/options.service.ts:82` |
168
+ | `runBatch` | 2 | `groupTasks`, `runGroup` | `projects/ic-suite/coinagerie/coinagerie-nx/src/executors/check/executor.utilities.ts:58` |
169
+ | `checkBatchExecutor` | 2 | `runBatch`, `printFailures` | `projects/ic-suite/coinagerie/coinagerie-nx/src/executors/check/batch-executor.ts:19` |
137
170
  | `OptionsService.flatMap(โ€ฆ)` | 1 | `OptionsService.isInputObject` | `projects/ic-suite/coinagerie/coinagerie-nx/src/modules/options/options.service.ts:56` |
138
171
  | `PluginService.buildCheckTarget` | 1 | `PluginService.map(โ€ฆ)` | `projects/ic-suite/coinagerie/coinagerie-nx/src/modules/plugin/plugin.service.ts:49` |
139
- | `PluginService.isProject` | 1 | `PluginService.isNamedPackage` | `projects/ic-suite/coinagerie/coinagerie-nx/src/modules/plugin/plugin.service.ts:93` |
172
+ | `PluginService.isProject` | 1 | `PluginService.isNamedPackage` | `projects/ic-suite/coinagerie/coinagerie-nx/src/modules/plugin/plugin.service.ts:90` |
140
173
  | `resolvePluginService` | 1 | `resolvePluginContext` | `projects/ic-suite/coinagerie/coinagerie-nx/src/modules/plugin/plugin-context.utilities.ts:15` |
174
+ | `buildCommand` | 1 | `quote` | `projects/ic-suite/coinagerie/coinagerie-nx/src/executors/check/executor.utilities.ts:108` |
175
+ | `isVerdictList` | 1 | `isVerdictRecord` | `projects/ic-suite/coinagerie/coinagerie-nx/src/executors/check/executor.utilities.ts:120` |
176
+ | `parseVerdicts` | 1 | `isVerdictList` | `projects/ic-suite/coinagerie/coinagerie-nx/src/executors/check/executor.utilities.ts:154` |
141
177
 
142
178
  </details>
143
179
  <!-- callidescope:end -->
@@ -184,6 +220,12 @@ graph LR
184
220
  file_eslint_config_ts["eslint.config.ts"]
185
221
  file_src_coinagerie_nx_module_ts["src/coinagerie-nx.module.ts"]
186
222
  file_src_coinagerie_nx_module_unit_test_ts["src/coinagerie-nx.module.unit.test.ts"]
223
+ file_src_executors_check_batch_executor_ts["src/executors/check/batch-executor.ts"]
224
+ file_src_executors_check_batch_executor_unit_test_ts["src/executors/check/batch-executor.unit.test.ts"]
225
+ file_src_executors_check_executor_ts["src/executors/check/executor.ts"]
226
+ file_src_executors_check_executor_types_ts["src/executors/check/executor.types.ts"]
227
+ file_src_executors_check_executor_unit_test_ts["src/executors/check/executor.unit.test.ts"]
228
+ file_src_executors_check_executor_utilities_ts["src/executors/check/executor.utilities.ts"]
187
229
  file_src_index_ts["src/index.ts"]
188
230
  file_src_index_unit_test_ts["src/index.unit.test.ts"]
189
231
  file_src_modules_options_options_constants_ts["src/modules/options/options.constants.ts"]
@@ -198,6 +240,7 @@ graph LR
198
240
  file_src_modules_plugin_plugin_service_ts["src/modules/plugin/plugin.service.ts"]
199
241
  file_src_modules_plugin_plugin_service_unit_test_ts["src/modules/plugin/plugin.service.unit.test.ts"]
200
242
  file_src_modules_plugin_plugin_types_ts["src/modules/plugin/plugin.types.ts"]
243
+ file_testing_fake_command_line_ts["testing/fake-command-line.ts"]
201
244
  file_testing_fake_workspace_ts["testing/fake-workspace.ts"]
202
245
  file_testing_mocks_ts["testing/mocks.ts"]
203
246
  file_testing_setup_ts["testing/setup.ts"]
@@ -205,6 +248,17 @@ graph LR
205
248
  file_vitest_config_ts["vitest.config.ts"]
206
249
  file_src_coinagerie_nx_module_ts --> file_src_modules_plugin_plugin_module_ts
207
250
  file_src_coinagerie_nx_module_unit_test_ts --> file_src_coinagerie_nx_module_ts
251
+ file_src_executors_check_batch_executor_ts --> file_src_executors_check_executor_types_ts
252
+ file_src_executors_check_batch_executor_ts --> file_src_executors_check_executor_utilities_ts
253
+ file_src_executors_check_batch_executor_unit_test_ts --> file_src_executors_check_batch_executor_ts
254
+ file_src_executors_check_batch_executor_unit_test_ts --> file_src_executors_check_executor_types_ts
255
+ file_src_executors_check_batch_executor_unit_test_ts --> file_testing_fake_command_line_ts
256
+ file_src_executors_check_executor_ts --> file_src_executors_check_executor_types_ts
257
+ file_src_executors_check_executor_ts --> file_src_executors_check_executor_utilities_ts
258
+ file_src_executors_check_executor_unit_test_ts --> file_src_executors_check_executor_ts
259
+ file_src_executors_check_executor_unit_test_ts --> file_src_executors_check_executor_types_ts
260
+ file_src_executors_check_executor_unit_test_ts --> file_testing_fake_command_line_ts
261
+ file_src_executors_check_executor_utilities_ts --> file_src_executors_check_executor_types_ts
208
262
  file_src_index_ts --> file_src_modules_options_options_constants_ts
209
263
  file_src_index_ts --> file_src_modules_plugin_plugin_context_utilities_ts
210
264
  file_src_index_ts --> file_src_modules_plugin_plugin_constants_ts
@@ -240,36 +294,36 @@ graph LR
240
294
 
241
295
  ### Project
242
296
 
243
- ![Lines of Code](https://img.shields.io/badge/Lines_of_Code-1268-22c55e?style=flat-square)
244
- ![Repository Size](https://img.shields.io/badge/Repository_Size-51.23_kB-6b7280?style=flat-square)
245
- ![Folders](https://img.shields.io/badge/Folders-5-4a4a4a?style=flat-square)
246
- ![Source Files](https://img.shields.io/badge/Source_Files-26-3178c6?style=flat-square)
297
+ ![Lines of Code](https://img.shields.io/badge/Lines_of_Code-1960-22c55e?style=flat-square)
298
+ ![Repository Size](https://img.shields.io/badge/Repository_Size-73.91_kB-6b7280?style=flat-square)
299
+ ![Folders](https://img.shields.io/badge/Folders-7-4a4a4a?style=flat-square)
300
+ ![Source Files](https://img.shields.io/badge/Source_Files-33-3178c6?style=flat-square)
247
301
 
248
302
  ### TypeScript
249
303
 
250
- ![TypeScript Files](https://img.shields.io/badge/TypeScript_Files-26-3178c6?style=flat-square)
251
- ![Interfaces](https://img.shields.io/badge/Interfaces-4-0ea5e9?style=flat-square)
304
+ ![TypeScript Files](https://img.shields.io/badge/TypeScript_Files-33-3178c6?style=flat-square)
305
+ ![Interfaces](https://img.shields.io/badge/Interfaces-13-0ea5e9?style=flat-square)
252
306
  ![Generic Declarations](https://img.shields.io/badge/Generic_Declarations-0-0369a1?style=flat-square)
253
307
  ![Enums](https://img.shields.io/badge/Enums-0-f97316?style=flat-square)
254
308
  ![Decorators](https://img.shields.io/badge/Decorators-5-db2777?style=flat-square)
255
- ![Doc Comments](https://img.shields.io/badge/Doc_Comments-39-6366f1?style=flat-square)
309
+ ![Doc Comments](https://img.shields.io/badge/Doc_Comments-61-6366f1?style=flat-square)
256
310
  ![Static Methods](https://img.shields.io/badge/Static_Methods-0-166534?style=flat-square)
257
311
 
258
312
  ### JavaScript
259
313
 
260
314
  ![JavaScript Files](https://img.shields.io/badge/JavaScript_Files-0-f7df1e?style=flat-square)
261
- ![Test Files](https://img.shields.io/badge/Test_Files-5-10b981?style=flat-square)
262
- ![External Packages](https://img.shields.io/badge/External_Packages-11-8b5cf6?style=flat-square)
315
+ ![Test Files](https://img.shields.io/badge/Test_Files-7-10b981?style=flat-square)
316
+ ![External Packages](https://img.shields.io/badge/External_Packages-12-8b5cf6?style=flat-square)
263
317
  ![Classes](https://img.shields.io/badge/Classes-5-7c3aed?style=flat-square)
264
- ![Functions](https://img.shields.io/badge/Functions-53-16a34a?style=flat-square)
318
+ ![Functions](https://img.shields.io/badge/Functions-95-16a34a?style=flat-square)
265
319
  ![Methods](https://img.shields.io/badge/Methods-11-15803d?style=flat-square)
266
- ![Sync Functions](https://img.shields.io/badge/Sync_Functions-51-4ade80?style=flat-square)
267
- ![Async Functions](https://img.shields.io/badge/Async_Functions-13-059669?style=flat-square)
268
- ![Constants](https://img.shields.io/badge/Constants-53-dc2626?style=flat-square)
269
- ![Imports](https://img.shields.io/badge/Imports-72-0284c7?style=flat-square)
270
- ![Exported Symbols](https://img.shields.io/badge/Exported_Symbols-24-ea580c?style=flat-square)
271
- ![Comments](https://img.shields.io/badge/Comments-62-64748b?style=flat-square)
272
- ![Comment Lines](https://img.shields.io/badge/Comment_Lines-166-475569?style=flat-square)
320
+ ![Sync Functions](https://img.shields.io/badge/Sync_Functions-75-4ade80?style=flat-square)
321
+ ![Async Functions](https://img.shields.io/badge/Async_Functions-31-059669?style=flat-square)
322
+ ![Constants](https://img.shields.io/badge/Constants-88-dc2626?style=flat-square)
323
+ ![Imports](https://img.shields.io/badge/Imports-92-0284c7?style=flat-square)
324
+ ![Exported Symbols](https://img.shields.io/badge/Exported_Symbols-40-ea580c?style=flat-square)
325
+ ![Comments](https://img.shields.io/badge/Comments-88-64748b?style=flat-square)
326
+ ![Comment Lines](https://img.shields.io/badge/Comment_Lines-241-475569?style=flat-square)
273
327
  ![TODO Comments](https://img.shields.io/badge/TODO_Comments-0-ca8a04?style=flat-square)
274
328
 
275
329
  ### Python
@@ -289,17 +343,17 @@ graph LR
289
343
 
290
344
  ### JSON
291
345
 
292
- ![JSON Files](https://img.shields.io/badge/JSON_Files-4-a16207?style=flat-square)
293
- ![JSON Lines](https://img.shields.io/badge/JSON_Lines-157-ca8a04?style=flat-square)
294
- ![JSON Objects](https://img.shields.io/badge/JSON_Objects-37-7c3aed?style=flat-square)
295
- ![JSON Arrays](https://img.shields.io/badge/JSON_Arrays-12-8b5cf6?style=flat-square)
296
- ![JSON Properties](https://img.shields.io/badge/JSON_Properties-95-0284c7?style=flat-square)
297
- ![JSON Strings](https://img.shields.io/badge/JSON_Strings-86-16a34a?style=flat-square)
346
+ ![JSON Files](https://img.shields.io/badge/JSON_Files-6-a16207?style=flat-square)
347
+ ![JSON Lines](https://img.shields.io/badge/JSON_Lines-197-ca8a04?style=flat-square)
348
+ ![JSON Objects](https://img.shields.io/badge/JSON_Objects-45-7c3aed?style=flat-square)
349
+ ![JSON Arrays](https://img.shields.io/badge/JSON_Arrays-13-8b5cf6?style=flat-square)
350
+ ![JSON Properties](https://img.shields.io/badge/JSON_Properties-123-0284c7?style=flat-square)
351
+ ![JSON Strings](https://img.shields.io/badge/JSON_Strings-108-16a34a?style=flat-square)
298
352
  ![JSON Numbers](https://img.shields.io/badge/JSON_Numbers-1-059669?style=flat-square)
299
- ![JSON Booleans](https://img.shields.io/badge/JSON_Booleans-6-0ea5e9?style=flat-square)
353
+ ![JSON Booleans](https://img.shields.io/badge/JSON_Booleans-8-0ea5e9?style=flat-square)
300
354
  ![JSON Nulls](https://img.shields.io/badge/JSON_Nulls-0-64748b?style=flat-square)
301
- ![JSON Items](https://img.shields.io/badge/JSON_Items-43-475569?style=flat-square)
302
- ![JSON Nodes](https://img.shields.io/badge/JSON_Nodes-142-dc2626?style=flat-square)
355
+ ![JSON Items](https://img.shields.io/badge/JSON_Items-46-475569?style=flat-square)
356
+ ![JSON Nodes](https://img.shields.io/badge/JSON_Nodes-175-dc2626?style=flat-square)
303
357
  ![JSON Max Depth](https://img.shields.io/badge/JSON_Max_Depth-5-ea580c?style=flat-square)
304
358
 
305
359
  ### YAML
@@ -384,10 +438,10 @@ graph LR
384
438
  ![Service Files](https://img.shields.io/badge/Service_Files-2-0284c7?style=flat-square)
385
439
  ![Command Files](https://img.shields.io/badge/Command_Files-0-16a34a?style=flat-square)
386
440
  ![Constants Files](https://img.shields.io/badge/Constants_Files-2-ea580c?style=flat-square)
387
- ![Types Files](https://img.shields.io/badge/Types_Files-2-db2777?style=flat-square)
388
- ![Utilities Files](https://img.shields.io/badge/Utilities_Files-1-0ea5e9?style=flat-square)
441
+ ![Types Files](https://img.shields.io/badge/Types_Files-3-db2777?style=flat-square)
442
+ ![Utilities Files](https://img.shields.io/badge/Utilities_Files-2-0ea5e9?style=flat-square)
389
443
  ![TypeORM Entities](https://img.shields.io/badge/TypeORM_Entities-0-059669?style=flat-square)
390
- ![Unit Tests](https://img.shields.io/badge/Unit_Tests-5-ca8a04?style=flat-square)
444
+ ![Unit Tests](https://img.shields.io/badge/Unit_Tests-7-ca8a04?style=flat-square)
391
445
  ![Integration Tests](https://img.shields.io/badge/Integration_Tests-0-7c3aed?style=flat-square)
392
446
  ![End To End Tests](https://img.shields.io/badge/End_To_End_Tests-0-0284c7?style=flat-square)
393
447
  ![CSS Comment Budget](https://img.shields.io/badge/CSS_Comment_Budget-0-16a34a?style=flat-square)
@@ -425,20 +479,20 @@ graph LR
425
479
  ### Markdown
426
480
 
427
481
  ![Markdown Files](https://img.shields.io/badge/Markdown_Files-2-083fa1?style=flat-square)
428
- ![Markdown Lines](https://img.shields.io/badge/Markdown_Lines-251-1f6feb?style=flat-square)
482
+ ![Markdown Lines](https://img.shields.io/badge/Markdown_Lines-267-1f6feb?style=flat-square)
429
483
  ![H1](https://img.shields.io/badge/H1-1-7c3aed?style=flat-square)
430
- ![H2](https://img.shields.io/badge/H2-11-8b5cf6?style=flat-square)
431
- ![H3](https://img.shields.io/badge/H3-17-a78bfa?style=flat-square)
484
+ ![H2](https://img.shields.io/badge/H2-13-8b5cf6?style=flat-square)
485
+ ![H3](https://img.shields.io/badge/H3-20-a78bfa?style=flat-square)
432
486
  ![H4](https://img.shields.io/badge/H4-0-c4b5fd?style=flat-square)
433
487
  ![H5](https://img.shields.io/badge/H5-0-ddd6fe?style=flat-square)
434
488
  ![H6](https://img.shields.io/badge/H6-0-ede9fe?style=flat-square)
435
- ![Paragraphs](https://img.shields.io/badge/Paragraphs-52-64748b?style=flat-square)
436
- ![Lists](https://img.shields.io/badge/Lists-11-16a34a?style=flat-square)
437
- ![List Items](https://img.shields.io/badge/List_Items-32-22c55e?style=flat-square)
489
+ ![Paragraphs](https://img.shields.io/badge/Paragraphs-55-64748b?style=flat-square)
490
+ ![Lists](https://img.shields.io/badge/Lists-14-16a34a?style=flat-square)
491
+ ![List Items](https://img.shields.io/badge/List_Items-35-22c55e?style=flat-square)
438
492
  ![Task List Items](https://img.shields.io/badge/Task_List_Items-0-4ade80?style=flat-square)
439
493
  ![Tables](https://img.shields.io/badge/Tables-2-0284c7?style=flat-square)
440
494
  ![Table Rows](https://img.shields.io/badge/Table_Rows-10-0ea5e9?style=flat-square)
441
- ![Links](https://img.shields.io/badge/Links-15-059669?style=flat-square)
495
+ ![Links](https://img.shields.io/badge/Links-16-059669?style=flat-square)
442
496
  ![Images](https://img.shields.io/badge/Images-0-10b981?style=flat-square)
443
497
  ![Code Blocks](https://img.shields.io/badge/Code_Blocks-11-dc2626?style=flat-square)
444
498
  ![Inline Code](https://img.shields.io/badge/Inline_Code-72-ef4444?style=flat-square)
@@ -0,0 +1,104 @@
1
+ import "./rolldown-runtime-CNE2giL2.js";
2
+ import { spawn as e } from "node:child_process";
3
+ // src/executors/check/executor.utilities.ts
4
+ function groupTasks(...[e, t, n, r]) {
5
+ let i = {}, a = /* @__PURE__ */ new Map();
6
+ for (let [o, s] of Object.entries(e.tasks)) {
7
+ let e = r.projectGraph.nodes[s.target.project]?.data.root, { command: c, write: l } = t[o] ?? n;
8
+ if (e === void 0) {
9
+ i[o] = {
10
+ success: !1,
11
+ terminalOutput: `Unknown project: ${s.target.project}.`
12
+ };
13
+ continue;
14
+ }
15
+ let u = l === !0 ? "write" : "check", d = `${u}\0${c}`, f = a.get(d) ?? {
16
+ command: c,
17
+ mode: u,
18
+ tasks: []
19
+ };
20
+ f.tasks.push({
21
+ directory: e,
22
+ id: o
23
+ }), a.set(d, f);
24
+ }
25
+ return {
26
+ failures: i,
27
+ groups: [...a.values()]
28
+ };
29
+ }
30
+ async function runBatch(...e) {
31
+ let { failures: t, groups: n } = groupTasks(...e), r = { ...t };
32
+ for (let t of n) Object.assign(r, await runGroup({
33
+ group: t,
34
+ root: e[3].root
35
+ }));
36
+ return r;
37
+ }
38
+ async function runGroup(e) {
39
+ let t = {};
40
+ try {
41
+ let n = parseVerdicts(await runProcess(e));
42
+ for (let { directory: r, id: i } of e.group.tasks) {
43
+ let e = n.find((e) => e.directory === r);
44
+ t[i] = e === void 0 ? {
45
+ success: !1,
46
+ terminalOutput: `No verdict for ${r}.`
47
+ } : {
48
+ success: e.ok,
49
+ terminalOutput: e.report
50
+ };
51
+ }
52
+ } catch (n) {
53
+ for (let { id: r } of e.group.tasks) t[r] = {
54
+ success: !1,
55
+ terminalOutput: n instanceof Error ? n.message : String(n)
56
+ };
57
+ }
58
+ return t;
59
+ }
60
+ function buildCommand(e) {
61
+ let t = e.mode === "write" ? " --write" : "", n = "";
62
+ for (let { directory: t } of e.tasks) n += ` ${quote(t)}`;
63
+ return `${e.command} batch${t}${n}`;
64
+ }
65
+ function isVerdictList(e) {
66
+ if (!Array.isArray(e)) return !1;
67
+ for (let t of e) if (!isVerdictRecord(t)) return !1;
68
+ return !0;
69
+ }
70
+ function isVerdictRecord(e) {
71
+ return typeof e == "object" && !!e && "directory" in e && typeof e.directory == "string" && "ok" in e && typeof e.ok == "boolean" && "report" in e && typeof e.report == "string";
72
+ }
73
+ function parseVerdicts(e) {
74
+ try {
75
+ let t = JSON.parse(e.stdout);
76
+ if (isVerdictList(t)) return t;
77
+ } catch {}
78
+ throw Error(`The coinagerie command line exited ${String(e.status)} without a verdict.\n${e.stderr}${e.stdout}`);
79
+ }
80
+ function quote(e) {
81
+ return `'${e.replaceAll("'", String.raw`'\''`)}'`;
82
+ }
83
+ async function runProcess(t) {
84
+ let n = e(buildCommand(t.group), {
85
+ cwd: t.root,
86
+ env: {
87
+ ...process.env,
88
+ NX_WORKSPACE_ROOT: t.root
89
+ },
90
+ shell: !0
91
+ }), r = "", i = "";
92
+ return n.stdout.on("data", (e) => {
93
+ r += e.toString();
94
+ }), n.stderr.on("data", (e) => {
95
+ i += e.toString();
96
+ }), {
97
+ status: await new Promise((e, t) => {
98
+ n.on("error", t), n.on("close", e);
99
+ }),
100
+ stderr: i,
101
+ stdout: r
102
+ };
103
+ }
104
+ export { runGroup as n, runBatch as t };
@@ -0,0 +1,6 @@
1
+ // \0rolldown/runtime.js
2
+ var e = Object.defineProperty, __name = (t, n) => e(t, "name", {
3
+ value: n,
4
+ configurable: !0
5
+ });
6
+ export { __name as t };
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Judges every task Nx batched for this executor from one command-line process.
3
+ *
4
+ * One `coinagerie-check` task per project used to start its own `node`, load
5
+ * a transpiler, and boot a NestJS container โ€” about eight seconds to read one
6
+ * project's words in about half of one. A batch starts the command line once
7
+ * and names every project to it, so each still passes or fails alone and is
8
+ * still cached alone: Nx hashes and replays batched tasks one by one.
9
+ */
10
+ declare function checkBatchExecutor(...args: CheckBatchExecutorArguments): Promise<Record<string, CheckBatchTaskResult>>;
11
+ export default checkBatchExecutor;
12
+
13
+ /**
14
+ * The four arguments Nx calls a batch executor with, in the order it passes them.
15
+ *
16
+ * A tuple rather than four parameters because Nx fixes that signature and the
17
+ * workspace holds a function to three: the task graph, each task's resolved
18
+ * options by task id, the overrides of the whole run, and the context.
19
+ */
20
+ declare type CheckBatchExecutorArguments = [
21
+ taskGraph: CheckBatchTaskGraph,
22
+ options: Record<string, CheckExecutorOptions>,
23
+ overrides: CheckExecutorOptions,
24
+ context: CheckBatchExecutorContext
25
+ ];
26
+
27
+ /** What a batch reads of Nx's context: the project graph's roots and the workspace root. */
28
+ declare interface CheckBatchExecutorContext {
29
+ readonly projectGraph: {
30
+ readonly nodes: Record<string, {
31
+ readonly data: {
32
+ readonly root: string;
33
+ };
34
+ }>;
35
+ };
36
+ readonly root: string;
37
+ }
38
+
39
+ /** What a batch reads of Nx's task graph: each task's id and its project. */
40
+ declare interface CheckBatchTaskGraph {
41
+ readonly tasks: Record<string, {
42
+ readonly target: {
43
+ readonly project: string;
44
+ };
45
+ }>;
46
+ }
47
+
48
+ /**
49
+ * What one task of a check batch settled on.
50
+ *
51
+ * Nx's own type for a batch executor's result is not exported through
52
+ * `@nx/devkit`, so this states the shape Nx reads back: whether the task
53
+ * passed, and the output to show and to store with it in the cache.
54
+ */
55
+ declare interface CheckBatchTaskResult {
56
+ readonly success: boolean;
57
+ readonly terminalOutput: string;
58
+ }
59
+
60
+ /** Options the check executor accepts. */
61
+ declare interface CheckExecutorOptions {
62
+ /** The shell command that starts the `coinagerie` command line. */
63
+ readonly command: string;
64
+ /** Rewrite each glossary to hold the code's words instead of judging it. */
65
+ readonly write?: boolean | undefined;
66
+ }
67
+
68
+ export { }
@@ -0,0 +1,11 @@
1
+ import "../../../rolldown-runtime-CNE2giL2.js";
2
+ import { t as e } from "../../../executor.utilities-CUgE7Mg2.js";
3
+ // src/executors/check/batch-executor.ts
4
+ async function checkBatchExecutor(...t) {
5
+ let n = await e(...t);
6
+ return printFailures(n), n;
7
+ }
8
+ function printFailures(e) {
9
+ for (let [t, n] of Object.entries(e)) n.success || process.stdout.write(`\n> ${t}\n${n.terminalOutput}\n`);
10
+ }
11
+ export { checkBatchExecutor as default };
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Judges one project's glossaries against the words its code uses.
3
+ *
4
+ * Inferred onto every project holding a coinagerie configuration, so
5
+ * `nx affected -t coinagerie-check` judges only the projects a branch touched.
6
+ * With `write` it rewrites the glossaries instead of failing on one. It is the
7
+ * batch of one: the same command line, asked about a single project.
8
+ */
9
+ declare function checkExecutor(options: CheckExecutorOptions, context: CheckExecutorContext): Promise<{
10
+ success: boolean;
11
+ }>;
12
+ export default checkExecutor;
13
+
14
+ /** What a single run reads of Nx's context: its project, that project's root, and the workspace root. */
15
+ declare interface CheckExecutorContext {
16
+ readonly projectName?: string | undefined;
17
+ readonly projectsConfigurations: {
18
+ readonly projects: Record<string, undefined | {
19
+ readonly root: string;
20
+ }>;
21
+ };
22
+ readonly root: string;
23
+ }
24
+
25
+ /** Options the check executor accepts. */
26
+ declare interface CheckExecutorOptions {
27
+ /** The shell command that starts the `coinagerie` command line. */
28
+ readonly command: string;
29
+ /** Rewrite each glossary to hold the code's words instead of judging it. */
30
+ readonly write?: boolean | undefined;
31
+ }
32
+
33
+ export { }
@@ -0,0 +1,22 @@
1
+ import "../../../rolldown-runtime-CNE2giL2.js";
2
+ import { n as e } from "../../../executor.utilities-CUgE7Mg2.js";
3
+ // src/executors/check/executor.ts
4
+ async function checkExecutor(t, n) {
5
+ let r = n.projectName;
6
+ if (r === void 0) throw Error("The coinagerie check executor must be run against a project.");
7
+ let i = n.projectsConfigurations.projects[r];
8
+ if (i === void 0) throw Error(`Unknown project: ${r}.`);
9
+ let a = Object.values(await e({
10
+ group: {
11
+ command: t.command,
12
+ mode: t.write === !0 ? "write" : "check",
13
+ tasks: [{
14
+ directory: i.root,
15
+ id: r
16
+ }]
17
+ },
18
+ root: n.root
19
+ }));
20
+ return process.stdout.write(`${a.map(({ terminalOutput: e }) => e).join("\n")}\n`), { success: a.every(({ success: e }) => e) };
21
+ }
22
+ export { checkExecutor as default };
package/dist/src/index.js CHANGED
@@ -1,10 +1,11 @@
1
+ import "../rolldown-runtime-CNE2giL2.js";
1
2
  import e from "node:path";
2
3
  import "reflect-metadata";
3
4
  import { NestFactory as t } from "@nestjs/core";
4
5
  import { Injectable as n, Module as r } from "@nestjs/common";
5
6
  import { existsSync as i, readFileSync as a } from "node:fs";
6
7
  import { CONFIGURATION_FILE_NAMES as o } from "@coinagerie/configuration";
7
- // \0rolldown/runtime.js
8
+ // src/modules/options/options.constants.ts
8
9
  var s = "@coinagerie/nx", c = "coinagerie-check", l = "coinagerie";
9
10
  // \0@oxc-project+runtime@0.155.0/helpers/esm/decorateMetadata.js
10
11
  function __decorateMetadata(e, t) {
@@ -71,16 +72,13 @@ var f = `**/{${o.join(",")}}`, p = "{projectRoot}/**/*", m = "__coinageriePlugin
71
72
  buildCheckTarget(e) {
72
73
  return { [e.checkTargetName]: {
73
74
  cache: !0,
74
- executor: "nx:run-commands",
75
+ executor: "@coinagerie/nx:check",
75
76
  inputs: [
76
77
  ...o.map((e) => `{projectRoot}/${e}`),
77
78
  p,
78
79
  ...e.inputs
79
80
  ],
80
- options: {
81
- command: `${e.command} --check`,
82
- cwd: "{projectRoot}"
83
- }
81
+ options: { command: e.command }
84
82
  } };
85
83
  }
86
84
  isNamedPackage(e) {
package/executors.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "../../../../node_modules/nx/schemas/executors.json",
3
+ "executors": {
4
+ "check": {
5
+ "batchImplementation": "@coinagerie/nx/src/executors/check/batch-executor",
6
+ "description": "Judge a project's glossaries against the words its code uses, or rewrite them.",
7
+ "implementation": "@coinagerie/nx/src/executors/check/executor",
8
+ "preferBatch": true,
9
+ "schema": "./src/executors/check/schema.json"
10
+ }
11
+ }
12
+ }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "url": "https://github.com/organizzolini/codebase/issues"
5
5
  },
6
6
  "dependencies": {
7
- "@coinagerie/configuration": "0.0.4",
7
+ "@coinagerie/configuration": "0.0.6",
8
8
  "@nestjs/common": "^11.1.21 || ^12.0.1",
9
9
  "@nestjs/core": "^11.1.21 || ^12.0.1",
10
10
  "@nx/devkit": "^24.0.0",
@@ -20,18 +20,23 @@
20
20
  "@vitest/coverage-v8": "^5.0.0",
21
21
  "vitest": "^5.0.0"
22
22
  },
23
+ "executors": "./executors.json",
23
24
  "exports": {
24
25
  ".": {
25
26
  "types": "./dist/src/index.d.ts",
26
27
  "default": "./dist/src/index.js"
27
28
  },
28
- "./package.json": "./package.json"
29
+ "./executors.json": "./executors.json",
30
+ "./package.json": "./package.json",
31
+ "./src/executors/*": "./dist/src/executors/*.js"
29
32
  },
30
33
  "files": [
31
34
  "CHANGELOG.md",
32
35
  "dist",
36
+ "executors.json",
33
37
  "LICENSE",
34
- "README.md"
38
+ "README.md",
39
+ "src/executors/*/schema.json"
35
40
  ],
36
41
  "homepage": "https://github.com/organizzolini/codebase/tree/main/projects/ic-suite/coinagerie/coinagerie-nx#readme",
37
42
  "keywords": [
@@ -44,6 +49,9 @@
44
49
  "license": "MIT",
45
50
  "main": "./dist/src/index.js",
46
51
  "name": "@coinagerie/nx",
52
+ "nx": {
53
+ "executors": "./executors.json"
54
+ },
47
55
  "publishConfig": {
48
56
  "access": "public",
49
57
  "registry": "https://registry.npmjs.org"
@@ -59,5 +67,5 @@
59
67
  "strict": true
60
68
  },
61
69
  "types": "./dist/src/index.d.ts",
62
- "version": "0.0.4"
70
+ "version": "0.0.6"
63
71
  }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "description": "Judge a project's glossaries against the words its code uses, or rewrite them.",
4
+ "properties": {
5
+ "command": {
6
+ "description": "Required. The shell command that starts the coinagerie command line, to which the batch command and its project folders are appended.",
7
+ "type": "string"
8
+ },
9
+ "write": {
10
+ "default": false,
11
+ "description": "Rewrite each glossary to hold exactly the code's words, keeping definitions, instead of failing when one disagrees.",
12
+ "type": "boolean"
13
+ }
14
+ },
15
+ "required": ["command"],
16
+ "title": "Coinagerie check",
17
+ "type": "object"
18
+ }