@codependix/configuration 0.0.26 → 0.0.28
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 +16 -0
- package/README.md +46 -42
- package/dist/src/index.d.ts +36 -0
- package/dist/src/index.js +52 -47
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## 0.0.28 (2026-10-15)
|
|
2
|
+
|
|
3
|
+
### 🧱 Updated Dependencies
|
|
4
|
+
|
|
5
|
+
- Updated codependix-core to 0.0.26
|
|
6
|
+
|
|
7
|
+
## 0.0.27 (2026-10-15)
|
|
8
|
+
|
|
9
|
+
### 🚀 Features
|
|
10
|
+
|
|
11
|
+
- **ic-suite,configuration:** ✨ name root files after their project and declare root modules ([#1588](https://github.com/organizzolini/codebase/pull/1588), [#1480](https://github.com/organizzolini/codebase/issues/1480))
|
|
12
|
+
|
|
13
|
+
### 🧱 Updated Dependencies
|
|
14
|
+
|
|
15
|
+
- Updated codependix-core to 0.0.25
|
|
16
|
+
|
|
1
17
|
## 0.0.26 (2026-10-15)
|
|
2
18
|
|
|
3
19
|
### 🧱 Updated Dependencies
|
package/README.md
CHANGED
|
@@ -59,6 +59,7 @@ graph LR
|
|
|
59
59
|
file_eslint_config_ts["eslint.config.ts"]
|
|
60
60
|
file_src_index_ts["src/index.ts"]
|
|
61
61
|
file_src_index_unit_test_ts["src/index.unit.test.ts"]
|
|
62
|
+
file_src_modules_configuration_configuration_boundaries_types_ts["src/modules/configuration/configuration-boundaries.types.ts"]
|
|
62
63
|
file_src_modules_configuration_configuration_loader_service_ts["src/modules/configuration/configuration-loader.service.ts"]
|
|
63
64
|
file_src_modules_configuration_configuration_loader_service_unit_test_ts["src/modules/configuration/configuration-loader.service.unit.test.ts"]
|
|
64
65
|
file_src_modules_configuration_configuration_constants_ts["src/modules/configuration/configuration.constants.ts"]
|
|
@@ -96,12 +97,14 @@ graph LR
|
|
|
96
97
|
file_src_modules_configuration_configuration_module_ts --> file_src_modules_override_resolution_override_resolution_module_ts
|
|
97
98
|
file_src_modules_configuration_configuration_module_unit_test_ts --> file_src_modules_configuration_configuration_module_ts
|
|
98
99
|
file_src_modules_configuration_configuration_module_unit_test_ts --> file_src_modules_configuration_configuration_service_ts
|
|
100
|
+
file_src_modules_configuration_configuration_service_ts --> file_src_modules_configuration_configuration_boundaries_types_ts
|
|
99
101
|
file_src_modules_configuration_configuration_service_ts --> file_src_modules_configuration_configuration_loader_service_ts
|
|
100
102
|
file_src_modules_configuration_configuration_service_ts --> file_src_modules_configuration_configuration_constants_ts
|
|
101
103
|
file_src_modules_configuration_configuration_service_ts --> file_src_modules_configuration_configuration_types_ts
|
|
102
104
|
file_src_modules_configuration_configuration_service_ts --> file_src_modules_configuration_flag_resolution_service_ts
|
|
103
105
|
file_src_modules_configuration_configuration_service_ts --> file_src_modules_input_input_service_ts
|
|
104
106
|
file_src_modules_configuration_configuration_service_ts --> file_src_modules_override_resolution_override_resolution_service_ts
|
|
107
|
+
file_src_modules_configuration_configuration_service_unit_test_ts --> file_src_modules_configuration_configuration_boundaries_types_ts
|
|
105
108
|
file_src_modules_configuration_configuration_service_unit_test_ts --> file_src_modules_configuration_configuration_loader_service_ts
|
|
106
109
|
file_src_modules_configuration_configuration_service_unit_test_ts --> file_src_modules_configuration_configuration_constants_ts
|
|
107
110
|
file_src_modules_configuration_configuration_service_unit_test_ts --> file_src_modules_configuration_configuration_service_ts
|
|
@@ -109,6 +112,7 @@ graph LR
|
|
|
109
112
|
file_src_modules_configuration_configuration_service_unit_test_ts --> file_src_modules_configuration_flag_resolution_service_ts
|
|
110
113
|
file_src_modules_configuration_configuration_service_unit_test_ts --> file_src_modules_input_input_service_ts
|
|
111
114
|
file_src_modules_configuration_configuration_service_unit_test_ts --> file_src_modules_override_resolution_override_resolution_service_ts
|
|
115
|
+
file_src_modules_configuration_configuration_types_ts --> file_src_modules_configuration_configuration_boundaries_types_ts
|
|
112
116
|
file_src_modules_configuration_flag_resolution_service_ts --> file_src_modules_configuration_configuration_constants_ts
|
|
113
117
|
file_src_modules_configuration_flag_resolution_service_ts --> file_src_modules_configuration_configuration_types_ts
|
|
114
118
|
file_src_modules_configuration_flag_resolution_service_ts --> file_src_modules_input_input_service_ts
|
|
@@ -143,7 +147,7 @@ Call stacks traced through `projects/ic-suite/codependix/codependix-configuratio
|
|
|
143
147
|
| Measure | Value |
|
|
144
148
|
| --- | --- |
|
|
145
149
|
| Callables | 68 |
|
|
146
|
-
| Files |
|
|
150
|
+
| Files | 22 |
|
|
147
151
|
| Calls traced | 64 |
|
|
148
152
|
| Call stacks | 1 |
|
|
149
153
|
| Deepest stack | 2 |
|
|
@@ -182,16 +186,16 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
182
186
|
| Callable | Breadth | Calls directly | Location |
|
|
183
187
|
| --- | --- | --- | --- |
|
|
184
188
|
| `FlagResolutionService.selectMode` | 3 | `FlagResolutionService.readCheckNames`, `FlagResolutionService.emptyMode`, `FlagResolutionService.promptForMode` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/flag-resolution.service.ts:139` |
|
|
185
|
-
| `ConfigurationService.loadConfiguration` | 3 | `ConfigurationLoaderService.readAuthoredConfiguration`, `OverrideResolutionService.applyOverrides`, `ConfigurationService.resolveConfiguration` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:
|
|
186
|
-
| `ConfigurationService.loadProjectConfiguration` | 3 | `ConfigurationLoaderService.findProjectConfigurationFile`, `UnknownConfigurationFileTypeError.constructor`, `ConfigurationLoaderService.loadConfigurationModule` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:
|
|
189
|
+
| `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:248` |
|
|
187
191
|
| `OverrideResolutionService.resolveOverride` | 2 | `InputError.constructor`, `buildUndeclaredOverrideMessage` | `projects/ic-suite/codependix/codependix-configuration/src/modules/override-resolution/override-resolution.service.ts:48` |
|
|
188
192
|
| `ConfigurationLoaderService.parseConfigurationFile` | 2 | `UnknownConfigurationFileTypeError.constructor`, `ConfigurationLoaderService.loadConfigurationModule` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration-loader.service.ts:151` |
|
|
189
193
|
| `ConfigurationLoaderService.resolveConfigurationPath` | 2 | `ConfigurationLoaderService.findWorkspaceRoot`, `ConfigurationFileNotFoundError.constructor` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration-loader.service.ts:187` |
|
|
190
|
-
| `ConfigurationService.isProjectNamedOnCommandLine` | 2 | `ConfigurationService.matchesAnyName`, `ConfigurationService.some(…)` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:
|
|
191
|
-
| `ConfigurationService.splitSelectionArgument` | 2 | `ConfigurationService.filter(…)`, `ConfigurationService.map(…)` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:
|
|
192
|
-
| `ConfigurationService.isProjectIncluded` | 2 | `ConfigurationService.matchesAnyName`, `ConfigurationService.isProjectNamedOnCommandLine` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:
|
|
193
|
-
| `ConfigurationService.resolveConfiguration` | 2 | `ConfigurationService.resolveBoundaries`, `ConfigurationService.resolveSelection` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:
|
|
194
|
-
| `ConfigurationService.resolveForProject` | 2 | `ConfigurationService.isProjectIncluded`, `ConfigurationService.resolveGraphOutput` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:
|
|
194
|
+
| `ConfigurationService.isProjectNamedOnCommandLine` | 2 | `ConfigurationService.matchesAnyName`, `ConfigurationService.some(…)` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:69` |
|
|
195
|
+
| `ConfigurationService.splitSelectionArgument` | 2 | `ConfigurationService.filter(…)`, `ConfigurationService.map(…)` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:161` |
|
|
196
|
+
| `ConfigurationService.isProjectIncluded` | 2 | `ConfigurationService.matchesAnyName`, `ConfigurationService.isProjectNamedOnCommandLine` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:181` |
|
|
197
|
+
| `ConfigurationService.resolveConfiguration` | 2 | `ConfigurationService.resolveBoundaries`, `ConfigurationService.resolveSelection` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:309` |
|
|
198
|
+
| `ConfigurationService.resolveForProject` | 2 | `ConfigurationService.isProjectIncluded`, `ConfigurationService.resolveGraphOutput` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:338` |
|
|
195
199
|
| `refine(…)` | 1 | `some(…)` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.constants.ts:103` |
|
|
196
200
|
| `missingInputError` | 1 | `InputError.constructor` | `projects/ic-suite/codependix/codependix-configuration/src/modules/input/input.constants.ts:29` |
|
|
197
201
|
| `promptCancelledError` | 1 | `InputError.constructor` | `projects/ic-suite/codependix/codependix-configuration/src/modules/input/input.constants.ts:41` |
|
|
@@ -204,17 +208,17 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
204
208
|
| `FlagResolutionService.describeAcceptedCheckNames` | 1 | `FlagResolutionService.map(…)` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/flag-resolution.service.ts:41` |
|
|
205
209
|
| `FlagResolutionService.promptForMode` | 1 | `InputService.promptForSelect` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/flag-resolution.service.ts:57` |
|
|
206
210
|
| `FlagResolutionService.validateCheckNames` | 1 | `FlagResolutionService.describeAcceptedCheckNames` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/flag-resolution.service.ts:109` |
|
|
207
|
-
| `ConfigurationService.matchesAnyGlob` | 1 | `ConfigurationService.some(…)` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:
|
|
208
|
-
| `ConfigurationService.matchesAnyName` | 1 | `ConfigurationService.matchesAnyGlob` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:
|
|
209
|
-
| `ConfigurationService.resolveSelection` | 1 | `ConfigurationService.splitSelectionArgument` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:
|
|
210
|
-
| `ConfigurationService.isProjectSelected` | 1 | `ConfigurationService.isProjectNamedOnCommandLine` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:
|
|
211
|
-
| `ConfigurationService.parseCommaDelimitedOption` | 1 | `InputService.parseCommaDelimitedOption` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:
|
|
212
|
-
| `ConfigurationService.parseFlagOption` | 1 | `InputService.parseFlagOption` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:
|
|
213
|
-
| `ConfigurationService.parseOptionalOption` | 1 | `InputService.parseOptionalOption` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:
|
|
214
|
-
| `ConfigurationService.parsePathOption` | 1 | `InputService.parsePathOption` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:
|
|
215
|
-
| `ConfigurationService.resolveForWorkspace` | 1 | `ConfigurationService.resolveGraphOutput` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:
|
|
216
|
-
| `ConfigurationService.selectMode` | 1 | `FlagResolutionService.selectMode` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:
|
|
217
|
-
| `ConfigurationService.touchesFiles` | 1 | `FlagResolutionService.touchesFiles` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:
|
|
211
|
+
| `ConfigurationService.matchesAnyGlob` | 1 | `ConfigurationService.some(…)` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:84` |
|
|
212
|
+
| `ConfigurationService.matchesAnyName` | 1 | `ConfigurationService.matchesAnyGlob` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:89` |
|
|
213
|
+
| `ConfigurationService.resolveSelection` | 1 | `ConfigurationService.splitSelectionArgument` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:150` |
|
|
214
|
+
| `ConfigurationService.isProjectSelected` | 1 | `ConfigurationService.isProjectNamedOnCommandLine` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:206` |
|
|
215
|
+
| `ConfigurationService.parseCommaDelimitedOption` | 1 | `InputService.parseCommaDelimitedOption` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:283` |
|
|
216
|
+
| `ConfigurationService.parseFlagOption` | 1 | `InputService.parseFlagOption` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:288` |
|
|
217
|
+
| `ConfigurationService.parseOptionalOption` | 1 | `InputService.parseOptionalOption` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:293` |
|
|
218
|
+
| `ConfigurationService.parsePathOption` | 1 | `InputService.parsePathOption` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:298` |
|
|
219
|
+
| `ConfigurationService.resolveForWorkspace` | 1 | `ConfigurationService.resolveGraphOutput` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:380` |
|
|
220
|
+
| `ConfigurationService.selectMode` | 1 | `FlagResolutionService.selectMode` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:393` |
|
|
221
|
+
| `ConfigurationService.touchesFiles` | 1 | `FlagResolutionService.touchesFiles` | `projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts:400` |
|
|
218
222
|
|
|
219
223
|
</details>
|
|
220
224
|
<!-- callidescope:end -->
|
|
@@ -225,23 +229,23 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
225
229
|
|
|
226
230
|
### Project
|
|
227
231
|
|
|
228
|
-

|
|
233
|
+

|
|
230
234
|

|
|
231
|
-

|
|
232
236
|
|
|
233
237
|
### Measured Targets
|
|
234
238
|
|
|
235
|
-

|
|
236
240
|
|
|
237
241
|
### TypeScript
|
|
238
242
|
|
|
239
|
-

|
|
244
|
+

|
|
241
245
|

|
|
242
246
|

|
|
243
247
|

|
|
244
|
-

|
|
245
249
|

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

|
|
251
255
|

|
|
252
256
|

|
|
253
|
-

|
|
254
258
|

|
|
255
|
-

|
|
256
260
|

|
|
257
|
-

|
|
262
|
+

|
|
263
|
+

|
|
264
|
+

|
|
265
|
+

|
|
262
266
|

|
|
263
267
|
|
|
264
268
|
### Python
|
|
@@ -373,7 +377,7 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
373
377
|

|
|
374
378
|

|
|
375
379
|

|
|
376
|
-

|
|
377
381
|

|
|
378
382
|

|
|
379
383
|

|
|
@@ -414,23 +418,23 @@ What this project is judged against, as declared in its own `callidescope.config
|
|
|
414
418
|
### Markdown
|
|
415
419
|
|
|
416
420
|

|
|
417
|
-

|
|
418
422
|

|
|
419
|
-

|
|
424
|
+

|
|
421
425
|

|
|
422
426
|

|
|
423
427
|

|
|
424
|
-

|
|
429
|
+

|
|
430
|
+

|
|
427
431
|

|
|
428
432
|

|
|
429
433
|

|
|
430
|
-

|
|
431
435
|

|
|
432
436
|

|
|
433
|
-

|
|
434
438
|

|
|
435
439
|

|
|
436
440
|
<!-- codometer:end -->
|
package/dist/src/index.d.ts
CHANGED
|
@@ -194,6 +194,13 @@ export declare interface CodependixConfiguration {
|
|
|
194
194
|
exclude?: string[] | undefined;
|
|
195
195
|
/** Project names or roots participating in graph export, as globs. */
|
|
196
196
|
include?: string[] | undefined;
|
|
197
|
+
/**
|
|
198
|
+
* How `nestjsModules` finds each application's container.
|
|
199
|
+
*
|
|
200
|
+
* Nothing about where an application's root module lives is assumed: a
|
|
201
|
+
* project this does not name is treated as a library.
|
|
202
|
+
*/
|
|
203
|
+
nestjsModules?: CodependixNestjsModulesConfiguration | undefined;
|
|
197
204
|
/**
|
|
198
205
|
* A project graph to read instead of resolving the working directory's.
|
|
199
206
|
*
|
|
@@ -384,6 +391,12 @@ export declare const codependixConfigurationSchema: z.ZodObject<{
|
|
|
384
391
|
}, z.core.$strip>>;
|
|
385
392
|
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
386
393
|
include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
394
|
+
nestjsModules: z.ZodOptional<z.ZodObject<{
|
|
395
|
+
rootModules: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
396
|
+
export: z.ZodString;
|
|
397
|
+
file: z.ZodString;
|
|
398
|
+
}, z.core.$strip>>>;
|
|
399
|
+
}, z.core.$strip>>;
|
|
387
400
|
projectGraph: z.ZodOptional<z.ZodString>;
|
|
388
401
|
workspace: z.ZodOptional<z.ZodObject<{
|
|
389
402
|
fileImports: z.ZodOptional<z.ZodObject<{
|
|
@@ -485,6 +498,27 @@ export declare interface CodependixMarkdownOutput {
|
|
|
485
498
|
path?: string | undefined;
|
|
486
499
|
}
|
|
487
500
|
|
|
501
|
+
/** How the NestJS module graph finds the applications it explores. */
|
|
502
|
+
export declare interface CodependixNestjsModulesConfiguration {
|
|
503
|
+
/**
|
|
504
|
+
* The root module each NestJS application boots from, keyed by Nx project
|
|
505
|
+
* name.
|
|
506
|
+
*
|
|
507
|
+
* A project named here is an application, and its container is rooted in
|
|
508
|
+
* this module. A `framework:nestjs` project not named here is a library, and
|
|
509
|
+
* gets a synthetic root built from every module it defines instead.
|
|
510
|
+
*/
|
|
511
|
+
rootModules?: Record<string, CodependixNestjsRootModule> | undefined;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
/** Where one NestJS application's root module lives. */
|
|
515
|
+
export declare interface CodependixNestjsRootModule {
|
|
516
|
+
/** Name of the class the file exports. */
|
|
517
|
+
export: string;
|
|
518
|
+
/** Path of the root module file, relative to the project root. */
|
|
519
|
+
file: string;
|
|
520
|
+
}
|
|
521
|
+
|
|
488
522
|
/**
|
|
489
523
|
* A project's export configuration, keyed by graph type.
|
|
490
524
|
*
|
|
@@ -1155,6 +1189,8 @@ export declare interface ResolvedCodependixConfiguration {
|
|
|
1155
1189
|
boundaries: ResolvedCodependixBoundariesConfiguration;
|
|
1156
1190
|
exclude: string[];
|
|
1157
1191
|
include: string[];
|
|
1192
|
+
/** The root module of each NestJS application, keyed by Nx project name. */
|
|
1193
|
+
nestjsRootModules: Record<string, CodependixNestjsRootModule>;
|
|
1158
1194
|
/** A project graph to read instead of the working directory's, if named. */
|
|
1159
1195
|
projectGraph: string | undefined;
|
|
1160
1196
|
/**
|
package/dist/src/index.js
CHANGED
|
@@ -87,17 +87,21 @@ var UnknownConfigurationFileTypeError = class extends Error {
|
|
|
87
87
|
fileImports: S.optional(),
|
|
88
88
|
nestjsModules: S.optional(),
|
|
89
89
|
nxProjects: S.optional()
|
|
90
|
-
}), T = e.object({
|
|
90
|
+
}), T = e.object({ rootModules: e.record(e.string(), e.object({
|
|
91
|
+
export: e.string(),
|
|
92
|
+
file: e.string()
|
|
93
|
+
})).optional() }), E = e.object({
|
|
91
94
|
boundaries: x.optional(),
|
|
92
95
|
exclude: e.array(e.string()).optional(),
|
|
93
96
|
include: e.array(e.string()).optional(),
|
|
97
|
+
nestjsModules: T.optional(),
|
|
94
98
|
projectGraph: e.string().optional(),
|
|
95
99
|
workspace: w.optional()
|
|
96
|
-
}),
|
|
97
|
-
E,
|
|
100
|
+
}), D = "boundaries", O = "reports", k = [D, O], A = ",", j = [
|
|
98
101
|
D,
|
|
102
|
+
O,
|
|
99
103
|
"write"
|
|
100
|
-
],
|
|
104
|
+
], M = "A run mode (--check or --write)", ConfigurationFileNotFoundError = class extends Error {
|
|
101
105
|
constructor(e) {
|
|
102
106
|
super(`Configuration file not found: ${e}`), this.name = "ConfigurationFileNotFoundError";
|
|
103
107
|
}
|
|
@@ -121,7 +125,7 @@ function __decorate(e, t, n, r) {
|
|
|
121
125
|
}
|
|
122
126
|
//#endregion
|
|
123
127
|
//#region projects/ic-suite/codependix/codependix-configuration/src/modules/input/input.service.ts
|
|
124
|
-
var
|
|
128
|
+
var N = class InputService {
|
|
125
129
|
constructor() {}
|
|
126
130
|
promptRunner = r;
|
|
127
131
|
assertCanPrompt(e) {
|
|
@@ -157,19 +161,19 @@ var M = class InputService {
|
|
|
157
161
|
return n;
|
|
158
162
|
}
|
|
159
163
|
};
|
|
160
|
-
|
|
164
|
+
N = __decorate([t(), __decorateMetadata("design:paramtypes", [])], N);
|
|
161
165
|
//#endregion
|
|
162
166
|
//#region projects/ic-suite/codependix/codependix-configuration/src/modules/input/input.module.ts
|
|
163
|
-
var
|
|
164
|
-
|
|
167
|
+
var P = class InputModule {};
|
|
168
|
+
P = __decorate([n({
|
|
165
169
|
controllers: [],
|
|
166
|
-
exports: [
|
|
170
|
+
exports: [N],
|
|
167
171
|
imports: [],
|
|
168
|
-
providers: [
|
|
169
|
-
})],
|
|
172
|
+
providers: [N]
|
|
173
|
+
})], P);
|
|
170
174
|
//#endregion
|
|
171
175
|
//#region projects/ic-suite/codependix/codependix-configuration/src/modules/override-resolution/override-resolution.constants.ts
|
|
172
|
-
var buildUndeclaredOverrideMessage = (e) => `${e.flag} overrides a value the configuration does not declare. Add \`${e.field}\` to the configuration this run reads, then use ${e.flag} to change it.`,
|
|
176
|
+
var buildUndeclaredOverrideMessage = (e) => `${e.flag} overrides a value the configuration does not declare. Add \`${e.field}\` to the configuration this run reads, then use ${e.flag} to change it.`, F = class OverrideResolutionService {
|
|
173
177
|
constructor() {}
|
|
174
178
|
resolveOverride(e) {
|
|
175
179
|
let { authored: t, configured: n, field: r, flag: i, override: a } = e;
|
|
@@ -201,19 +205,19 @@ var buildUndeclaredOverrideMessage = (e) => `${e.flag} overrides a value the con
|
|
|
201
205
|
};
|
|
202
206
|
}
|
|
203
207
|
};
|
|
204
|
-
|
|
208
|
+
F = __decorate([t(), __decorateMetadata("design:paramtypes", [])], F);
|
|
205
209
|
//#endregion
|
|
206
210
|
//#region projects/ic-suite/codependix/codependix-configuration/src/modules/override-resolution/override-resolution.module.ts
|
|
207
|
-
var
|
|
208
|
-
|
|
211
|
+
var I = class OverrideResolutionModule {};
|
|
212
|
+
I = __decorate([n({
|
|
209
213
|
controllers: [],
|
|
210
|
-
exports: [
|
|
214
|
+
exports: [F],
|
|
211
215
|
imports: [],
|
|
212
|
-
providers: [
|
|
213
|
-
})],
|
|
216
|
+
providers: [F]
|
|
217
|
+
})], I);
|
|
214
218
|
//#endregion
|
|
215
219
|
//#region projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration-loader.service.ts
|
|
216
|
-
var
|
|
220
|
+
var L = class ConfigurationLoaderService {
|
|
217
221
|
constructor() {}
|
|
218
222
|
readDefaultExport(e) {
|
|
219
223
|
if (typeof e != "object" || !e) return {};
|
|
@@ -260,7 +264,7 @@ var I = class ConfigurationLoaderService {
|
|
|
260
264
|
configurationPath: e,
|
|
261
265
|
extension: t
|
|
262
266
|
});
|
|
263
|
-
return
|
|
267
|
+
return E.parse(n);
|
|
264
268
|
}
|
|
265
269
|
async readAuthoredConfiguration(e) {
|
|
266
270
|
let t = o.resolve(e.searchDirectory ?? process.cwd()), n = e.configurationPath === void 0 ? this.findConfigurationFile(t) : this.resolveConfigurationPath(e.configurationPath);
|
|
@@ -276,16 +280,16 @@ var I = class ConfigurationLoaderService {
|
|
|
276
280
|
return r;
|
|
277
281
|
}
|
|
278
282
|
};
|
|
279
|
-
|
|
283
|
+
L = __decorate([t(), __decorateMetadata("design:paramtypes", [])], L);
|
|
280
284
|
//#endregion
|
|
281
285
|
//#region projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/flag-resolution.service.ts
|
|
282
|
-
var
|
|
286
|
+
var R = class FlagResolutionService {
|
|
283
287
|
inputService;
|
|
284
288
|
constructor(e) {
|
|
285
289
|
this.inputService = e;
|
|
286
290
|
}
|
|
287
291
|
describeAcceptedCheckNames(e) {
|
|
288
|
-
return `${e}. It takes a comma-separated set drawn from ${
|
|
292
|
+
return `${e}. It takes a comma-separated set drawn from ${k.map((e) => `"${e}"`).join(" and ")}, as in "--check ${k.join(",")}".`;
|
|
289
293
|
}
|
|
290
294
|
emptyMode() {
|
|
291
295
|
return {
|
|
@@ -296,15 +300,15 @@ var L = class FlagResolutionService {
|
|
|
296
300
|
}
|
|
297
301
|
async promptForMode() {
|
|
298
302
|
let e = await this.inputService.promptForSelect({
|
|
299
|
-
choices:
|
|
303
|
+
choices: j,
|
|
300
304
|
message: "Check declared boundaries, check every configured export is current, or write them?",
|
|
301
|
-
subject:
|
|
305
|
+
subject: M
|
|
302
306
|
});
|
|
303
307
|
return {
|
|
304
308
|
errors: [],
|
|
305
309
|
mode: {
|
|
306
|
-
checksBoundaries: e ===
|
|
307
|
-
checksReports: e ===
|
|
310
|
+
checksBoundaries: e === D,
|
|
311
|
+
checksReports: e === O,
|
|
308
312
|
writes: e === "write"
|
|
309
313
|
}
|
|
310
314
|
};
|
|
@@ -316,7 +320,7 @@ var L = class FlagResolutionService {
|
|
|
316
320
|
}
|
|
317
321
|
validateCheckNames(e, t) {
|
|
318
322
|
let n = /* @__PURE__ */ new Set();
|
|
319
|
-
for (let r of e)
|
|
323
|
+
for (let r of e) k.includes(r) ? n.add(r) : t.push(this.describeAcceptedCheckNames(`--check does not accept "${r}"`));
|
|
320
324
|
return n;
|
|
321
325
|
}
|
|
322
326
|
async selectMode(e) {
|
|
@@ -324,11 +328,11 @@ var L = class FlagResolutionService {
|
|
|
324
328
|
return t.length > 0 ? {
|
|
325
329
|
errors: t,
|
|
326
330
|
mode: this.emptyMode()
|
|
327
|
-
} : n.size === 0 && !r ? this.promptForMode() : (r && n.has("reports") && t.push(`--write cannot be combined with --check ${
|
|
331
|
+
} : n.size === 0 && !r ? this.promptForMode() : (r && n.has("reports") && t.push(`--write cannot be combined with --check ${O}: an export cannot be stale in the run that just wrote it. Drop one of them, or run --write and --check ${O} separately.`), {
|
|
328
332
|
errors: t,
|
|
329
333
|
mode: {
|
|
330
|
-
checksBoundaries: n.has(
|
|
331
|
-
checksReports: n.has(
|
|
334
|
+
checksBoundaries: n.has(D),
|
|
335
|
+
checksReports: n.has(O),
|
|
332
336
|
writes: r
|
|
333
337
|
}
|
|
334
338
|
});
|
|
@@ -337,10 +341,10 @@ var L = class FlagResolutionService {
|
|
|
337
341
|
return e.checksReports || e.writes;
|
|
338
342
|
}
|
|
339
343
|
};
|
|
340
|
-
|
|
344
|
+
R = __decorate([t(), __decorateMetadata("design:paramtypes", [N === void 0 ? Object : N])], R);
|
|
341
345
|
//#endregion
|
|
342
346
|
//#region projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.service.ts
|
|
343
|
-
var
|
|
347
|
+
var z = class ConfigurationService {
|
|
344
348
|
configurationLoaderService;
|
|
345
349
|
flagResolutionService;
|
|
346
350
|
inputService;
|
|
@@ -433,6 +437,7 @@ var R = class ConfigurationService {
|
|
|
433
437
|
boundaries: this.resolveBoundaries(e.boundaries),
|
|
434
438
|
exclude: e.exclude ?? [],
|
|
435
439
|
include: e.include ?? [...h],
|
|
440
|
+
nestjsRootModules: e.nestjsModules?.rootModules ?? {},
|
|
436
441
|
projectGraph: e.projectGraph,
|
|
437
442
|
selection: this.resolveSelection(t),
|
|
438
443
|
workspace: e.workspace ?? {}
|
|
@@ -461,24 +466,24 @@ var R = class ConfigurationService {
|
|
|
461
466
|
return this.flagResolutionService.touchesFiles(e);
|
|
462
467
|
}
|
|
463
468
|
};
|
|
464
|
-
|
|
465
|
-
I === void 0 ? Object : I,
|
|
469
|
+
z = __decorate([t(), __decorateMetadata("design:paramtypes", [
|
|
466
470
|
L === void 0 ? Object : L,
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
471
|
+
R === void 0 ? Object : R,
|
|
472
|
+
N === void 0 ? Object : N,
|
|
473
|
+
F === void 0 ? Object : F
|
|
474
|
+
])], z);
|
|
470
475
|
//#endregion
|
|
471
476
|
//#region projects/ic-suite/codependix/codependix-configuration/src/modules/configuration/configuration.module.ts
|
|
472
|
-
var
|
|
473
|
-
|
|
477
|
+
var B = class ConfigurationModule {};
|
|
478
|
+
B = __decorate([n({
|
|
474
479
|
controllers: [],
|
|
475
|
-
exports: [
|
|
476
|
-
imports: [
|
|
480
|
+
exports: [z],
|
|
481
|
+
imports: [P, I],
|
|
477
482
|
providers: [
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
483
|
+
L,
|
|
484
|
+
z,
|
|
485
|
+
R
|
|
481
486
|
]
|
|
482
|
-
})],
|
|
487
|
+
})], B);
|
|
483
488
|
//#endregion
|
|
484
|
-
export {
|
|
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 };
|
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.26",
|
|
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.28"
|
|
66
66
|
}
|