@codependix/configuration 0.0.28 β 0.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +52 -49
- package/dist/src/index.d.ts +42 -27
- package/dist/src/index.js +11 -16
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
## 0.0.30 (2026-10-15)
|
|
2
|
+
|
|
3
|
+
### π
Refactors
|
|
4
|
+
|
|
5
|
+
- **callidescope,codependix,codometer,conformetry:** β»οΈ require --config on every ic-suite command line ([#1598](https://github.com/organizzolini/codebase/pull/1598))
|
|
6
|
+
|
|
7
|
+
### π§± Updated Dependencies
|
|
8
|
+
|
|
9
|
+
- Updated codependix-core to 0.0.28
|
|
10
|
+
|
|
11
|
+
## 0.0.29 (2026-10-15)
|
|
12
|
+
|
|
13
|
+
### π
Refactors
|
|
14
|
+
|
|
15
|
+
- **configuration,documentation:** β»οΈ move the configuration folder into an nx project ([#1509](https://github.com/organizzolini/codebase/pull/1509))
|
|
16
|
+
|
|
17
|
+
### π§± Updated Dependencies
|
|
18
|
+
|
|
19
|
+
- Updated codependix-core to 0.0.27
|
|
20
|
+
|
|
1
21
|
## 0.0.28 (2026-10-15)
|
|
2
22
|
|
|
3
23
|
### π§± Updated Dependencies
|
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ nx run codependix-configuration:vitest
|
|
|
12
12
|
|
|
13
13
|
## πΈοΈ Codependix
|
|
14
14
|
|
|
15
|
-
Dependency graphs exported by [codependix](https://github.com/Organizzolini/codebase/tree/main/projects/ic-suite/codependix/codependix-cli), regenerated by `nx run
|
|
15
|
+
Dependency graphs exported by [codependix](https://github.com/Organizzolini/codebase/tree/main/projects/ic-suite/codependix/codependix-cli), regenerated by `nx run configuration:codependix:write`.
|
|
16
16
|
|
|
17
17
|
### Nx Neighborhood
|
|
18
18
|
|
|
@@ -24,11 +24,13 @@ graph LR
|
|
|
24
24
|
codependix_configuration["codependix-configuration"]
|
|
25
25
|
codependix_core["codependix-core"]
|
|
26
26
|
codependix_examples["codependix-examples"]
|
|
27
|
+
codependix_nx["codependix-nx"]
|
|
27
28
|
codependix_output["codependix-output"]
|
|
28
29
|
codependix_boundaries --> codependix_configuration
|
|
29
30
|
codependix_cli --> codependix_configuration
|
|
30
31
|
codependix_configuration --> codependix_core
|
|
31
32
|
codependix_examples --> codependix_configuration
|
|
33
|
+
codependix_nx --> codependix_configuration
|
|
32
34
|
codependix_output --> codependix_configuration
|
|
33
35
|
classDef subject fill:#7c3aed,color:#fff,stroke:#4c1d95,stroke-width:2px
|
|
34
36
|
class codependix_configuration subject
|
|
@@ -146,13 +148,13 @@ Call stacks traced through `projects/ic-suite/codependix/codependix-configuratio
|
|
|
146
148
|
|
|
147
149
|
| Measure | Value |
|
|
148
150
|
| --- | --- |
|
|
149
|
-
| Callables |
|
|
151
|
+
| Callables | 69 |
|
|
150
152
|
| Files | 22 |
|
|
151
153
|
| Calls traced | 64 |
|
|
152
154
|
| Call stacks | 1 |
|
|
153
155
|
| Deepest stack | 2 |
|
|
154
156
|
| Stacks through recursion | 0 |
|
|
155
|
-
| Unfollowable calls |
|
|
157
|
+
| Unfollowable calls | 4 |
|
|
156
158
|
|
|
157
159
|
### Limits
|
|
158
160
|
|
|
@@ -168,8 +170,8 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
168
170
|
**1. `refine(β¦)`** β depth 2 Β· orphan-root
|
|
169
171
|
|
|
170
172
|
```text
|
|
171
|
-
π refine(β¦)(β¦): boolean [projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.constants.ts:
|
|
172
|
-
ββ> some(β¦)(value: string[] | undefined): value is string[] [projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.constants.ts:
|
|
173
|
+
π refine(β¦)(β¦): boolean [projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.constants.ts:104]
|
|
174
|
+
ββ> some(β¦)(value: string[] | undefined): value is string[] [projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.constants.ts:104]
|
|
173
175
|
```
|
|
174
176
|
|
|
175
177
|
### Breadth
|
|
@@ -178,47 +180,48 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
178
180
|
| --- | --- | --- | --- |
|
|
179
181
|
| `InputService.promptForSelect` | 4 | `InputService.assertCanPrompt`, `InputService.map(β¦)`, `promptCancelledError`, `InputService.find(β¦)` | `projects/ic-suite/codependix/codependix-configuration/src/modules/input/input.service.ts:92` |
|
|
180
182
|
| `FlagResolutionService.readCheckNames` | 4 | `FlagResolutionService.filter(β¦)`, `FlagResolutionService.map(β¦)`, `FlagResolutionService.describeAcceptedCheckNames`, `FlagResolutionService.validateCheckNames` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/flag-resolution.service.ts:84` |
|
|
181
|
-
| `
|
|
183
|
+
| `FlagResolutionService.selectMode` | 3 | `FlagResolutionService.readCheckNames`, `FlagResolutionService.emptyMode`, `FlagResolutionService.promptForMode` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/flag-resolution.service.ts:139` |
|
|
182
184
|
|
|
183
185
|
<details>
|
|
184
|
-
<summary>
|
|
186
|
+
<summary>35 more callables</summary>
|
|
185
187
|
|
|
186
188
|
| Callable | Breadth | Calls directly | Location |
|
|
187
189
|
| --- | --- | --- | --- |
|
|
188
|
-
| `FlagResolutionService.selectMode` | 3 | `FlagResolutionService.readCheckNames`, `FlagResolutionService.emptyMode`, `FlagResolutionService.promptForMode` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/flag-resolution.service.ts:139` |
|
|
189
190
|
| `ConfigurationService.loadConfiguration` | 3 | `ConfigurationLoaderService.readAuthoredConfiguration`, `OverrideResolutionService.applyOverrides`, `ConfigurationService.resolveConfiguration` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:224` |
|
|
190
|
-
| `ConfigurationService.loadProjectConfiguration` | 3 | `ConfigurationLoaderService.findProjectConfigurationFile`, `UnknownConfigurationFileTypeError.constructor`, `ConfigurationLoaderService.loadConfigurationModule` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:
|
|
191
|
+
| `ConfigurationService.loadProjectConfiguration` | 3 | `ConfigurationLoaderService.findProjectConfigurationFile`, `UnknownConfigurationFileTypeError.constructor`, `ConfigurationLoaderService.loadConfigurationModule` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:247` |
|
|
191
192
|
| `OverrideResolutionService.resolveOverride` | 2 | `InputError.constructor`, `buildUndeclaredOverrideMessage` | `projects/ic-suite/codependix/codependix-configuration/src/modules/override-resolution/override-resolution.service.ts:48` |
|
|
192
|
-
| `ConfigurationLoaderService.parseConfigurationFile` | 2 | `UnknownConfigurationFileTypeError.constructor`, `ConfigurationLoaderService.loadConfigurationModule` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration-loader.service.ts:
|
|
193
|
-
| `ConfigurationLoaderService.
|
|
194
|
-
| `
|
|
195
|
-
| `ConfigurationService.
|
|
196
|
-
| `ConfigurationService.
|
|
197
|
-
| `ConfigurationService.
|
|
198
|
-
| `ConfigurationService.
|
|
199
|
-
| `
|
|
193
|
+
| `ConfigurationLoaderService.parseConfigurationFile` | 2 | `UnknownConfigurationFileTypeError.constructor`, `ConfigurationLoaderService.loadConfigurationModule` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration-loader.service.ts:122` |
|
|
194
|
+
| `ConfigurationLoaderService.readAuthoredConfiguration` | 2 | `ConfigurationLoaderService.parseConfigurationFile`, `ConfigurationLoaderService.resolveConfigurationPath` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration-loader.service.ts:145` |
|
|
195
|
+
| `ConfigurationLoaderService.resolveConfigurationPath` | 2 | `ConfigurationLoaderService.findWorkspaceRoot`, `ConfigurationFileNotFoundError.constructor` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration-loader.service.ts:154` |
|
|
196
|
+
| `ConfigurationService.isProjectNamedOnCommandLine` | 2 | `ConfigurationService.matchesAnyName`, `ConfigurationService.some(β¦)` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:70` |
|
|
197
|
+
| `ConfigurationService.splitSelectionArgument` | 2 | `ConfigurationService.filter(β¦)`, `ConfigurationService.map(β¦)` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:162` |
|
|
198
|
+
| `ConfigurationService.isProjectIncluded` | 2 | `ConfigurationService.matchesAnyName`, `ConfigurationService.isProjectNamedOnCommandLine` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:182` |
|
|
199
|
+
| `ConfigurationService.resolveConfiguration` | 2 | `ConfigurationService.resolveBoundaries`, `ConfigurationService.resolveSelection` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:327` |
|
|
200
|
+
| `ConfigurationService.resolveForProject` | 2 | `ConfigurationService.isProjectIncluded`, `ConfigurationService.resolveGraphOutput` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:356` |
|
|
201
|
+
| `refine(β¦)` | 1 | `some(β¦)` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.constants.ts:104` |
|
|
200
202
|
| `missingInputError` | 1 | `InputError.constructor` | `projects/ic-suite/codependix/codependix-configuration/src/modules/input/input.constants.ts:29` |
|
|
201
203
|
| `promptCancelledError` | 1 | `InputError.constructor` | `projects/ic-suite/codependix/codependix-configuration/src/modules/input/input.constants.ts:41` |
|
|
202
204
|
| `InputService.assertCanPrompt` | 1 | `missingInputError` | `projects/ic-suite/codependix/codependix-configuration/src/modules/input/input.service.ts:38` |
|
|
203
205
|
| `InputService.parseCommaDelimitedOption` | 1 | `InputService.map(β¦)` | `projects/ic-suite/codependix/codependix-configuration/src/modules/input/input.service.ts:54` |
|
|
204
206
|
| `InputService.parsePathOption` | 1 | `InputService.parseOptionalOption` | `projects/ic-suite/codependix/codependix-configuration/src/modules/input/input.service.ts:87` |
|
|
205
207
|
| `OverrideResolutionService.applyOverrides` | 1 | `OverrideResolutionService.resolveOverride` | `projects/ic-suite/codependix/codependix-configuration/src/modules/override-resolution/override-resolution.service.ts:74` |
|
|
206
|
-
| `ConfigurationLoaderService.findWorkspaceRoot` | 1 | `ConfigurationLoaderService.some(β¦)` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration-loader.service.ts:
|
|
207
|
-
| `ConfigurationLoaderService.loadConfigurationModule` | 1 | `ConfigurationLoaderService.readDefaultExport` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration-loader.service.ts:
|
|
208
|
+
| `ConfigurationLoaderService.findWorkspaceRoot` | 1 | `ConfigurationLoaderService.some(β¦)` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration-loader.service.ts:82` |
|
|
209
|
+
| `ConfigurationLoaderService.loadConfigurationModule` | 1 | `ConfigurationLoaderService.readDefaultExport` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration-loader.service.ts:106` |
|
|
208
210
|
| `FlagResolutionService.describeAcceptedCheckNames` | 1 | `FlagResolutionService.map(β¦)` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/flag-resolution.service.ts:41` |
|
|
209
211
|
| `FlagResolutionService.promptForMode` | 1 | `InputService.promptForSelect` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/flag-resolution.service.ts:57` |
|
|
210
212
|
| `FlagResolutionService.validateCheckNames` | 1 | `FlagResolutionService.describeAcceptedCheckNames` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/flag-resolution.service.ts:109` |
|
|
211
|
-
| `ConfigurationService.matchesAnyGlob` | 1 | `ConfigurationService.some(β¦)` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:
|
|
212
|
-
| `ConfigurationService.matchesAnyName` | 1 | `ConfigurationService.matchesAnyGlob` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:
|
|
213
|
-
| `ConfigurationService.resolveSelection` | 1 | `ConfigurationService.splitSelectionArgument` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:
|
|
214
|
-
| `ConfigurationService.isProjectSelected` | 1 | `ConfigurationService.isProjectNamedOnCommandLine` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:
|
|
215
|
-
| `ConfigurationService.parseCommaDelimitedOption` | 1 | `InputService.parseCommaDelimitedOption` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:
|
|
216
|
-
| `ConfigurationService.parseFlagOption` | 1 | `InputService.parseFlagOption` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:
|
|
217
|
-
| `ConfigurationService.parseOptionalOption` | 1 | `InputService.parseOptionalOption` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:
|
|
218
|
-
| `ConfigurationService.parsePathOption` | 1 | `InputService.parsePathOption` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:
|
|
219
|
-
| `ConfigurationService.
|
|
220
|
-
| `ConfigurationService.
|
|
221
|
-
| `ConfigurationService.
|
|
213
|
+
| `ConfigurationService.matchesAnyGlob` | 1 | `ConfigurationService.some(β¦)` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:85` |
|
|
214
|
+
| `ConfigurationService.matchesAnyName` | 1 | `ConfigurationService.matchesAnyGlob` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:90` |
|
|
215
|
+
| `ConfigurationService.resolveSelection` | 1 | `ConfigurationService.splitSelectionArgument` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:151` |
|
|
216
|
+
| `ConfigurationService.isProjectSelected` | 1 | `ConfigurationService.isProjectNamedOnCommandLine` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:207` |
|
|
217
|
+
| `ConfigurationService.parseCommaDelimitedOption` | 1 | `InputService.parseCommaDelimitedOption` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:282` |
|
|
218
|
+
| `ConfigurationService.parseFlagOption` | 1 | `InputService.parseFlagOption` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:287` |
|
|
219
|
+
| `ConfigurationService.parseOptionalOption` | 1 | `InputService.parseOptionalOption` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:292` |
|
|
220
|
+
| `ConfigurationService.parsePathOption` | 1 | `InputService.parsePathOption` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:297` |
|
|
221
|
+
| `ConfigurationService.requireConfigurationPath` | 1 | `ConfigurationPathRequiredError.constructor` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:309` |
|
|
222
|
+
| `ConfigurationService.resolveForWorkspace` | 1 | `ConfigurationService.resolveGraphOutput` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:398` |
|
|
223
|
+
| `ConfigurationService.selectMode` | 1 | `FlagResolutionService.selectMode` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:411` |
|
|
224
|
+
| `ConfigurationService.touchesFiles` | 1 | `FlagResolutionService.touchesFiles` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:418` |
|
|
222
225
|
|
|
223
226
|
</details>
|
|
224
227
|
<!-- callidescope:end -->
|
|
@@ -229,14 +232,14 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
229
232
|
|
|
230
233
|
### Project
|
|
231
234
|
|
|
232
|
-

|
|
236
|
+

|
|
234
237
|

|
|
235
238
|

|
|
236
239
|
|
|
237
240
|
### Measured Targets
|
|
238
241
|
|
|
239
|
-

|
|
240
243
|
|
|
241
244
|
### TypeScript
|
|
242
245
|
|
|
@@ -245,7 +248,7 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
245
248
|

|
|
246
249
|

|
|
247
250
|

|
|
248
|
-

|
|
249
252
|

|
|
250
253
|
|
|
251
254
|
### JavaScript
|
|
@@ -253,16 +256,16 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
253
256
|

|
|
254
257
|

|
|
255
258
|

|
|
256
|
-

|
|
260
|
+

|
|
258
261
|

|
|
259
|
-

|
|
263
|
+

|
|
264
|
+

|
|
262
265
|

|
|
263
|
-

|
|
267
|
+

|
|
268
|
+

|
|
266
269
|

|
|
267
270
|
|
|
268
271
|
### Python
|
|
@@ -418,20 +421,20 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
418
421
|
### Markdown
|
|
419
422
|
|
|
420
423
|

|
|
421
|
-

|
|
422
425
|

|
|
423
|
-

|
|
427
|
+

|
|
425
428
|

|
|
426
429
|

|
|
427
430
|

|
|
428
|
-

|
|
432
|
+

|
|
433
|
+

|
|
431
434
|

|
|
432
435
|

|
|
433
436
|

|
|
434
|
-

|
|
435
438
|

|
|
436
439
|

|
|
437
440
|

|
package/dist/src/index.d.ts
CHANGED
|
@@ -618,10 +618,11 @@ export declare interface CodependixWorkspaceConfiguration {
|
|
|
618
618
|
}
|
|
619
619
|
|
|
620
620
|
/**
|
|
621
|
-
* File names
|
|
621
|
+
* File names a project's own configuration may take, beside its root.
|
|
622
622
|
*
|
|
623
|
-
* Searched in order, so a
|
|
624
|
-
* configuration file gets the TypeScript one.
|
|
623
|
+
* Searched in order, so a project carrying both a TypeScript and a JSON
|
|
624
|
+
* configuration file gets the TypeScript one. The main configuration is never
|
|
625
|
+
* searched for: its path is always named.
|
|
625
626
|
*/
|
|
626
627
|
export declare const CONFIGURATION_FILE_NAMES: readonly ["codependix.config.ts", "codependix.config.mts", "codependix.config.cts", "codependix.config.js", "codependix.config.mjs", "codependix.config.cjs", "codependix.config.json"];
|
|
627
628
|
|
|
@@ -631,7 +632,7 @@ export declare class ConfigurationFileNotFoundError extends Error {
|
|
|
631
632
|
}
|
|
632
633
|
|
|
633
634
|
/**
|
|
634
|
-
*
|
|
635
|
+
* Reads and parses codependix configuration files from disk.
|
|
635
636
|
*
|
|
636
637
|
* Kept apart from `ConfigurationService`, which resolves what a loaded
|
|
637
638
|
* configuration means for a project or a workspace: this service only ever
|
|
@@ -641,21 +642,13 @@ declare class ConfigurationLoaderService {
|
|
|
641
642
|
constructor();
|
|
642
643
|
/** Reads what a configuration module exported, through either interop shape. */
|
|
643
644
|
private readDefaultExport;
|
|
644
|
-
/**
|
|
645
|
-
* Walks upward from a directory looking for a configuration file.
|
|
646
|
-
*
|
|
647
|
-
* Returns `undefined` when the search reaches the filesystem root without
|
|
648
|
-
* finding one: a workspace that never wrote a configuration file resolves
|
|
649
|
-
* every graph to `target: "none"` rather than being told to write one.
|
|
650
|
-
*/
|
|
651
|
-
findConfigurationFile(searchDirectory: string): string | undefined;
|
|
652
645
|
/**
|
|
653
646
|
* Looks for a project's own configuration file, exactly at its root.
|
|
654
647
|
*
|
|
655
|
-
*
|
|
656
|
-
*
|
|
657
|
-
*
|
|
658
|
-
*
|
|
648
|
+
* This never walks upward: a project's own file must be colocated with it,
|
|
649
|
+
* and walking upward would find the workspace root's configuration β or
|
|
650
|
+
* another project's, in a nested layout β instead of correctly reporting
|
|
651
|
+
* that this project has none.
|
|
659
652
|
*/
|
|
660
653
|
findProjectConfigurationFile(projectRoot: string): string | undefined;
|
|
661
654
|
/**
|
|
@@ -674,10 +667,14 @@ declare class ConfigurationLoaderService {
|
|
|
674
667
|
}): Promise<unknown>;
|
|
675
668
|
/** Loads and validates one configuration file at a resolved path. */
|
|
676
669
|
parseConfigurationFile(resolvedPath: string): Promise<CodependixConfiguration>;
|
|
677
|
-
/**
|
|
670
|
+
/**
|
|
671
|
+
* Reads the main configuration file at the path it was told to.
|
|
672
|
+
*
|
|
673
|
+
* The path is required: nothing searches for a file, and no file is not a
|
|
674
|
+
* configuration that resolves every graph to `target: "none"`.
|
|
675
|
+
*/
|
|
678
676
|
readAuthoredConfiguration(args: {
|
|
679
|
-
configurationPath
|
|
680
|
-
searchDirectory?: string | undefined;
|
|
677
|
+
configurationPath: string;
|
|
681
678
|
}): Promise<CodependixConfiguration>;
|
|
682
679
|
/** Resolves a configuration path against the cwd, then the workspace root. */
|
|
683
680
|
resolveConfigurationPath(configurationPath: string): string;
|
|
@@ -696,6 +693,17 @@ declare class ConfigurationLoaderService {
|
|
|
696
693
|
export declare class ConfigurationModule {
|
|
697
694
|
}
|
|
698
695
|
|
|
696
|
+
/**
|
|
697
|
+
* Raised when no main configuration path was given.
|
|
698
|
+
*
|
|
699
|
+
* Names the surface the path should have come through β the command-line
|
|
700
|
+
* flag, the executor option, or the plugin option β so the message tells the
|
|
701
|
+
* caller which setting to fix rather than only that one is missing.
|
|
702
|
+
*/
|
|
703
|
+
export declare class ConfigurationPathRequiredError extends Error {
|
|
704
|
+
constructor(surface: string);
|
|
705
|
+
}
|
|
706
|
+
|
|
699
707
|
/**
|
|
700
708
|
* Loads, validates, and resolves codependix configuration files.
|
|
701
709
|
*
|
|
@@ -768,20 +776,18 @@ export declare class ConfigurationService {
|
|
|
768
776
|
/**
|
|
769
777
|
* Loads and validates a codependix configuration file.
|
|
770
778
|
*
|
|
771
|
-
*
|
|
779
|
+
* The path is required and must exist β a typo in a task runner's
|
|
772
780
|
* arguments should fail rather than quietly resolving every graph to
|
|
773
|
-
* `target: "none"`.
|
|
774
|
-
* search directory upward, and its absence is legal.
|
|
781
|
+
* `target: "none"`. Nothing is searched for.
|
|
775
782
|
*/
|
|
776
|
-
loadConfiguration(args
|
|
783
|
+
loadConfiguration(args: LoadConfigurationArguments): Promise<ResolvedCodependixConfiguration>;
|
|
777
784
|
/**
|
|
778
785
|
* Loads and validates one project's own `codependix.config.ts`, or
|
|
779
786
|
* `undefined` when it has none.
|
|
780
787
|
*
|
|
781
788
|
* Searched for exactly at `projectRoot` β see
|
|
782
789
|
* `ConfigurationLoaderService.findProjectConfigurationFile` β rather than
|
|
783
|
-
* the
|
|
784
|
-
* own file: a project's file is either colocated with it or it does not
|
|
790
|
+
* named by a path the way `loadConfiguration`'s file is: a project's file is either colocated with it or it does not
|
|
785
791
|
* exist, and a project with none produces no per-project output rather than
|
|
786
792
|
* inheriting one from a parent directory.
|
|
787
793
|
*/
|
|
@@ -802,6 +808,15 @@ export declare class ConfigurationService {
|
|
|
802
808
|
parseOptionalOption(value: string | undefined): string | undefined;
|
|
803
809
|
/** Parses a path option that falls back to the working directory. */
|
|
804
810
|
parsePathOption(value: string | undefined): string;
|
|
811
|
+
/**
|
|
812
|
+
* Returns the main configuration path, refusing one that is missing.
|
|
813
|
+
*
|
|
814
|
+
* No file is searched for, so every host β the command line, the Nx
|
|
815
|
+
* executor, the Nx plugin β must be handed a path. `surface` names the
|
|
816
|
+
* setting the caller took it from (for example "`--config` flag"), which is
|
|
817
|
+
* what the refusal tells the user to fix. Absent and blank are the same.
|
|
818
|
+
*/
|
|
819
|
+
requireConfigurationPath(configurationPath: string | undefined, surface: string): string;
|
|
805
820
|
/**
|
|
806
821
|
* Fills in every field a configuration file may leave out.
|
|
807
822
|
*
|
|
@@ -997,10 +1012,10 @@ declare class InputService {
|
|
|
997
1012
|
|
|
998
1013
|
/** Arguments accepted when loading a configuration file. */
|
|
999
1014
|
export declare interface LoadConfigurationArguments {
|
|
1000
|
-
|
|
1015
|
+
/** The main configuration file, resolved against the cwd then the workspace root. */
|
|
1016
|
+
configurationPath: string;
|
|
1001
1017
|
/** Strict per-field CLI overrides, applied after the file is resolved. */
|
|
1002
1018
|
overrides?: CodependixConfigurationOverrides | undefined;
|
|
1003
|
-
searchDirectory?: string | undefined;
|
|
1004
1019
|
/** Command-line project selection, unparsed β see `CodependixSelectionArguments`. */
|
|
1005
1020
|
selection?: CodependixSelectionArguments | undefined;
|
|
1006
1021
|
}
|
package/dist/src/index.js
CHANGED
|
@@ -105,6 +105,10 @@ var UnknownConfigurationFileTypeError = class extends Error {
|
|
|
105
105
|
constructor(e) {
|
|
106
106
|
super(`Configuration file not found: ${e}`), this.name = "ConfigurationFileNotFoundError";
|
|
107
107
|
}
|
|
108
|
+
}, ConfigurationPathRequiredError = class extends Error {
|
|
109
|
+
constructor(e) {
|
|
110
|
+
super(`A configuration path is required, but the ${e} named none: give it the path of the codependix configuration file.`), this.name = "ConfigurationPathRequiredError";
|
|
111
|
+
}
|
|
108
112
|
}, InputError = class extends Error {
|
|
109
113
|
constructor(e) {
|
|
110
114
|
super(e), this.name = "InputError";
|
|
@@ -224,18 +228,6 @@ var L = class ConfigurationLoaderService {
|
|
|
224
228
|
let t = e.default;
|
|
225
229
|
return typeof t == "object" && t ? t : e;
|
|
226
230
|
}
|
|
227
|
-
findConfigurationFile(e) {
|
|
228
|
-
let t = o.resolve(e);
|
|
229
|
-
for (;;) {
|
|
230
|
-
for (let e of f) {
|
|
231
|
-
let n = o.join(t, e);
|
|
232
|
-
if (i(n)) return n;
|
|
233
|
-
}
|
|
234
|
-
let e = o.dirname(t);
|
|
235
|
-
if (e === t) return;
|
|
236
|
-
t = e;
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
231
|
findProjectConfigurationFile(e) {
|
|
240
232
|
for (let t of f) {
|
|
241
233
|
let n = o.join(e, t);
|
|
@@ -267,8 +259,7 @@ var L = class ConfigurationLoaderService {
|
|
|
267
259
|
return E.parse(n);
|
|
268
260
|
}
|
|
269
261
|
async readAuthoredConfiguration(e) {
|
|
270
|
-
|
|
271
|
-
return n === void 0 ? {} : this.parseConfigurationFile(n);
|
|
262
|
+
return this.parseConfigurationFile(this.resolveConfigurationPath(e.configurationPath));
|
|
272
263
|
}
|
|
273
264
|
resolveConfigurationPath(e) {
|
|
274
265
|
let t = o.resolve(e);
|
|
@@ -401,7 +392,7 @@ var z = class ConfigurationService {
|
|
|
401
392
|
let { selection: t } = e.configuration;
|
|
402
393
|
return t.projects.length === 0 && t.tags.length === 0 || this.isProjectNamedOnCommandLine(e);
|
|
403
394
|
}
|
|
404
|
-
async loadConfiguration(e
|
|
395
|
+
async loadConfiguration(e) {
|
|
405
396
|
let t = await this.configurationLoaderService.readAuthoredConfiguration(e);
|
|
406
397
|
return this.overrideResolutionService.applyOverrides({
|
|
407
398
|
authored: t,
|
|
@@ -432,6 +423,10 @@ var z = class ConfigurationService {
|
|
|
432
423
|
parsePathOption(e) {
|
|
433
424
|
return this.inputService.parsePathOption(e);
|
|
434
425
|
}
|
|
426
|
+
requireConfigurationPath(e, t) {
|
|
427
|
+
if (e === void 0 || e.trim() === "") throw new ConfigurationPathRequiredError(t);
|
|
428
|
+
return e;
|
|
429
|
+
}
|
|
435
430
|
resolveConfiguration(e, t) {
|
|
436
431
|
return {
|
|
437
432
|
boundaries: this.resolveBoundaries(e.boundaries),
|
|
@@ -486,4 +481,4 @@ B = __decorate([n({
|
|
|
486
481
|
]
|
|
487
482
|
})], B);
|
|
488
483
|
//#endregion
|
|
489
|
-
export { D as CHECK_BOUNDARIES, k as CHECK_NAMES, O as CHECK_REPORTS, A as CHECK_SEPARATOR, u as CODEPENDIX_EXPORT_TARGETS, l as CODEPENDIX_GRAPH_TYPES, f as CONFIGURATION_FILE_NAMES, ConfigurationFileNotFoundError, B as ConfigurationModule, z as ConfigurationService, p as DEFAULT_EXPORT_TARGET, h as DEFAULT_INCLUDE_GLOBS, m as DEFAULT_MARKDOWN_PATH, InputError, g as REPOSITORY_ROOT_MARKERS, j as RUN_MODE_CHOICES, M as RUN_MODE_SUBJECT, UnknownConfigurationFileTypeError, E as codependixConfigurationSchema, C as codependixProjectConfigurationSchema, missingInputError, promptCancelledError };
|
|
484
|
+
export { D as CHECK_BOUNDARIES, k as CHECK_NAMES, O as CHECK_REPORTS, A as CHECK_SEPARATOR, u as CODEPENDIX_EXPORT_TARGETS, l as CODEPENDIX_GRAPH_TYPES, f as CONFIGURATION_FILE_NAMES, ConfigurationFileNotFoundError, B as ConfigurationModule, ConfigurationPathRequiredError, z as ConfigurationService, p as DEFAULT_EXPORT_TARGET, h as DEFAULT_INCLUDE_GLOBS, m as DEFAULT_MARKDOWN_PATH, InputError, g as REPOSITORY_ROOT_MARKERS, j as RUN_MODE_CHOICES, M as RUN_MODE_SUBJECT, UnknownConfigurationFileTypeError, E as codependixConfigurationSchema, C as codependixProjectConfigurationSchema, missingInputError, promptCancelledError };
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"url": "https://github.com/organizzolini/codebase/issues"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@codependix/core": "0.0.
|
|
7
|
+
"@codependix/core": "0.0.28",
|
|
8
8
|
"@nestjs/common": "^11.1.21 || ^12.0.1",
|
|
9
9
|
"jiti": "^2.7.0",
|
|
10
10
|
"prompts": "^2.4.2",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"strict": true
|
|
63
63
|
},
|
|
64
64
|
"types": "./dist/src/index.d.ts",
|
|
65
|
-
"version": "0.0.
|
|
65
|
+
"version": "0.0.30"
|
|
66
66
|
}
|