limina 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/LICENSE.md +1348 -0
- package/README.md +16 -373
- package/README.zh-CN.md +29 -0
- package/bin/limina.js +32 -21
- package/chunks/dep-BPK-6PAr.js +114 -0
- package/chunks/dep-COZNKoxO.js +15582 -0
- package/chunks/dep-Ce6cDHmw.js +4901 -0
- package/chunks/dep-esXeyN9I.js +194 -0
- package/cli.js +22266 -1125
- package/config.d.ts +300 -58
- package/config.js +2 -3
- package/index.d.ts +22 -2
- package/index.js +3 -4
- package/package.json +27 -13
- package/schemas/tsconfig-schema.json +42 -0
- package/chunks/dep-DzYrmtQJ.js +0 -360
- package/chunks/dep-ZRIm_-Zk.js +0 -2401
- package/chunks/dep-lkQg1P9Q.js +0 -3
package/config.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ type PipelineStep = string | {
|
|
|
23
23
|
*/
|
|
24
24
|
args?: string[];
|
|
25
25
|
/**
|
|
26
|
-
* Executable name, for example `pnpm`, `tsc`, or `vue-
|
|
26
|
+
* Executable name, for example `pnpm`, `tsc`, `tsgo`, `vue-tsc`, or `vue-tsgo`.
|
|
27
27
|
*
|
|
28
28
|
* The command runs from the inferred workspace root unless `cwd` is set.
|
|
29
29
|
*/
|
|
@@ -55,8 +55,8 @@ type PipelineStep = string | {
|
|
|
55
55
|
/**
|
|
56
56
|
* Built-in task names understood by Limina pipelines.
|
|
57
57
|
*/
|
|
58
|
-
type BuiltinTaskName = "checker:build" | "checker:typecheck" | "graph:check" | "package:check" | "proof:check" | "release:check" | "source:check";
|
|
59
|
-
type BuiltinCheckerPreset = "svelte-check" | "tsc" | "vue-tsc";
|
|
58
|
+
type BuiltinTaskName = "checker:build" | "checker:typecheck" | "graph:check" | "nx:check" | "package:check" | "proof:check" | "release:check" | "source:check";
|
|
59
|
+
type BuiltinCheckerPreset = "svelte-check" | "tsc" | "tsgo" | "vue-tsc" | "vue-tsgo";
|
|
60
60
|
type CheckerPreset = BuiltinCheckerPreset;
|
|
61
61
|
type CheckerExecutionKind = "build" | "typecheck";
|
|
62
62
|
/**
|
|
@@ -64,7 +64,7 @@ type CheckerExecutionKind = "build" | "typecheck";
|
|
|
64
64
|
*/
|
|
65
65
|
interface CheckerConfig {
|
|
66
66
|
/**
|
|
67
|
-
* Built-in checker preset, such as `tsc`, `vue-tsc`, or `svelte-check`.
|
|
67
|
+
* Built-in checker preset, such as `tsc`, `tsgo`, `vue-tsc`, `vue-tsgo`, or `svelte-check`.
|
|
68
68
|
*/
|
|
69
69
|
preset: CheckerPreset;
|
|
70
70
|
/**
|
|
@@ -79,90 +79,208 @@ interface ResolvedCheckerConfig {
|
|
|
79
79
|
preset: CheckerPreset;
|
|
80
80
|
}
|
|
81
81
|
/**
|
|
82
|
-
*
|
|
82
|
+
* Explicit exception for a declared workspace package dependency that is used
|
|
83
|
+
* through generated code, runtime strings, or another path that Knip
|
|
84
|
+
* dependency analysis cannot see.
|
|
85
|
+
*/
|
|
86
|
+
interface SourceKnipIgnoredDependencyConfig {
|
|
87
|
+
/**
|
|
88
|
+
* Declared workspace dependency package name.
|
|
89
|
+
*/
|
|
90
|
+
dep: string;
|
|
91
|
+
/**
|
|
92
|
+
* Why the dependency is safe to keep even when Knip cannot prove it is
|
|
93
|
+
* reachable from package entries, binaries, or scripts.
|
|
94
|
+
*/
|
|
95
|
+
reason: string;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Explicit exception for a source module that is owned by a package but is
|
|
99
|
+
* intentionally not reachable from Knip's package entry graph.
|
|
100
|
+
*/
|
|
101
|
+
interface SourceKnipIgnoredFileConfig {
|
|
102
|
+
/**
|
|
103
|
+
* Workspace-root-relative source module path.
|
|
104
|
+
*/
|
|
105
|
+
file: string;
|
|
106
|
+
/**
|
|
107
|
+
* Why the source module is safe to keep even when Knip cannot prove it is
|
|
108
|
+
* reachable from package entries, binaries, or scripts.
|
|
109
|
+
*/
|
|
110
|
+
reason: string;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Additional source module entries for Knip's source reachability graph.
|
|
114
|
+
*
|
|
115
|
+
* Default entries come from package exports, package binaries, package scripts,
|
|
116
|
+
* and Knip-supported plugin entries. Packages without package.json#exports are
|
|
117
|
+
* treated as application-style owners: Limina provides the full governed source
|
|
118
|
+
* module set as the entry surface and skips unused-file coverage for that
|
|
119
|
+
* package. Use this only for extra entry modules loaded by test runners, local
|
|
120
|
+
* tools, or build steps that should not become package exports.
|
|
121
|
+
*/
|
|
122
|
+
interface SourceKnipEntryConfig {
|
|
123
|
+
/**
|
|
124
|
+
* Workspace-root-relative file or glob patterns that Knip should treat as
|
|
125
|
+
* additional entries for the keyed package.
|
|
126
|
+
*/
|
|
127
|
+
files: string[];
|
|
128
|
+
/**
|
|
129
|
+
* Why these modules are legitimate entries even though they are not package
|
|
130
|
+
* exports, binaries, scripts, or plugin-discovered entries.
|
|
131
|
+
*/
|
|
132
|
+
reason: string;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Explicit exception for a source module whose nearest bare tsconfig.json
|
|
136
|
+
* cannot identify a unique ordinary typecheck owner.
|
|
137
|
+
*/
|
|
138
|
+
interface SourceTsconfigOwnershipIgnoreEntry {
|
|
139
|
+
/**
|
|
140
|
+
* Named package owner from package.json.
|
|
141
|
+
*/
|
|
142
|
+
owner: string;
|
|
143
|
+
/**
|
|
144
|
+
* Workspace-root-relative file or glob patterns inside the owner package.
|
|
145
|
+
*/
|
|
146
|
+
files: string[];
|
|
147
|
+
/**
|
|
148
|
+
* Why these modules may skip nearest-tsconfig ownership enforcement.
|
|
149
|
+
*/
|
|
150
|
+
reason: string;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Nearest bare tsconfig ownership settings.
|
|
154
|
+
*/
|
|
155
|
+
interface SourceTsconfigOwnershipConfig {
|
|
156
|
+
/**
|
|
157
|
+
* Package-owned source modules intentionally exempted from nearest bare
|
|
158
|
+
* tsconfig ownership enforcement.
|
|
159
|
+
*/
|
|
160
|
+
ignore?: SourceTsconfigOwnershipIgnoreEntry[];
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Package-level Knip source analysis config interpreted by Limina.
|
|
164
|
+
*/
|
|
165
|
+
interface SourceKnipWorkspaceConfig {
|
|
166
|
+
/**
|
|
167
|
+
* Additional package-owned source modules Knip should treat as reachable
|
|
168
|
+
* roots. Limina disables Knip's implicit index/main/cli entry guessing by
|
|
169
|
+
* default; package manifest entries, scripts, plugin-discovered entries, and
|
|
170
|
+
* Limina virtual entries remain enabled.
|
|
171
|
+
*/
|
|
172
|
+
entry?: SourceKnipEntryConfig[];
|
|
173
|
+
/**
|
|
174
|
+
* Declared workspace dependencies intentionally not visible through Knip's
|
|
175
|
+
* entry-reachable dependency graph.
|
|
176
|
+
*/
|
|
177
|
+
ignoreDependencies?: SourceKnipIgnoredDependencyConfig[];
|
|
178
|
+
/**
|
|
179
|
+
* Package-owned source modules intentionally not visible through Knip's
|
|
180
|
+
* entry-reachable file graph.
|
|
181
|
+
*/
|
|
182
|
+
ignoreFiles?: SourceKnipIgnoredFileConfig[];
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Knip-backed source analysis config interpreted by Limina.
|
|
186
|
+
*/
|
|
187
|
+
interface SourceKnipCheckConfig {
|
|
188
|
+
/**
|
|
189
|
+
* Package-specific Knip source analysis config keyed by workspace package
|
|
190
|
+
* name, such as "@example/app". Unknown package names fail source checks.
|
|
191
|
+
*/
|
|
192
|
+
workspaces?: Record<string, SourceKnipWorkspaceConfig>;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Source-owned dependency usage check settings.
|
|
196
|
+
*/
|
|
197
|
+
interface SourceCheckConfig {
|
|
198
|
+
/**
|
|
199
|
+
* Knip-backed unused dependency and unused source module analysis.
|
|
200
|
+
*
|
|
201
|
+
* `true` or omitted uses Limina's generated default config, `false` skips
|
|
202
|
+
* these Knip-backed checks, and an object configures Limina's semantic Knip
|
|
203
|
+
* source rules by workspace package name.
|
|
204
|
+
*
|
|
205
|
+
* @default true
|
|
206
|
+
*/
|
|
207
|
+
knip?: boolean | SourceKnipCheckConfig;
|
|
208
|
+
/**
|
|
209
|
+
* Exceptions for source modules whose nearest bare tsconfig.json cannot
|
|
210
|
+
* resolve a unique ordinary typecheck owner.
|
|
211
|
+
*/
|
|
212
|
+
tsconfigOwnership?: SourceTsconfigOwnershipConfig;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Global source boundary used by proof checks.
|
|
83
216
|
*/
|
|
84
217
|
interface SourceBoundaryConfig {
|
|
85
218
|
/**
|
|
86
|
-
* Glob patterns for source files that
|
|
219
|
+
* Glob patterns for source files that Limina should govern.
|
|
87
220
|
*
|
|
88
|
-
* When omitted, Limina
|
|
89
|
-
* extensions
|
|
221
|
+
* When omitted, Limina uses TypeScript/JSON source defaults and adds
|
|
222
|
+
* framework extensions from configured checkers, such as `.vue` or
|
|
223
|
+
* `.svelte`.
|
|
90
224
|
*/
|
|
91
225
|
include?: string[];
|
|
92
226
|
/**
|
|
93
|
-
* Glob patterns or directory shorthands to omit from
|
|
227
|
+
* Glob patterns or directory shorthands to omit from source governance.
|
|
228
|
+
*
|
|
229
|
+
* When omitted, Limina reads the workspace root `.gitignore` and combines it
|
|
230
|
+
* with the built-in excludes below.
|
|
94
231
|
*
|
|
95
232
|
* @default: [
|
|
96
|
-
* "
|
|
233
|
+
* "nx.json",
|
|
234
|
+
* "project.json",
|
|
235
|
+
* "tsconfig.json",
|
|
236
|
+
* "**\/tsconfig.*.json",
|
|
97
237
|
* "dist",
|
|
238
|
+
* ".nx",
|
|
98
239
|
* ".git",
|
|
99
240
|
* ".tsbuild",
|
|
100
241
|
* "coverage",
|
|
101
|
-
* "
|
|
102
|
-
* "**\/package.json",
|
|
103
|
-
* ".prettierrc.json",
|
|
104
|
-
* ".markdownlint.json",
|
|
105
|
-
* "vercel.json",
|
|
242
|
+
* "node_modules",
|
|
106
243
|
* ]
|
|
107
244
|
*/
|
|
108
245
|
exclude?: string[];
|
|
109
246
|
}
|
|
110
247
|
/**
|
|
111
|
-
* Shared project facts used by graph,
|
|
248
|
+
* Shared project facts used by graph, proof, and related checks.
|
|
112
249
|
*/
|
|
113
250
|
interface SharedLiminaConfig {
|
|
114
251
|
/**
|
|
115
|
-
* Checker capabilities shared by graph, proof,
|
|
252
|
+
* Checker capabilities shared by graph, proof, and tsc tasks.
|
|
116
253
|
*/
|
|
117
254
|
checkers?: Record<string, CheckerConfig>;
|
|
118
255
|
/**
|
|
119
|
-
*
|
|
256
|
+
* Global source file boundary used by proof checks.
|
|
120
257
|
*/
|
|
121
258
|
source?: SourceBoundaryConfig;
|
|
122
259
|
}
|
|
123
260
|
/**
|
|
124
|
-
*
|
|
261
|
+
* Declaration leaf boundary denied to projects with a matching Limina label.
|
|
125
262
|
*/
|
|
126
|
-
interface
|
|
127
|
-
/**
|
|
128
|
-
* Directory names treated as build artifacts when mapping package exports
|
|
129
|
-
* back to source files.
|
|
130
|
-
*/
|
|
131
|
-
artifactDirectories?: string[];
|
|
132
|
-
/**
|
|
133
|
-
* Export condition priority when resolving package exports.
|
|
134
|
-
*
|
|
135
|
-
* Put more specific conditions earlier when your package exports use several
|
|
136
|
-
* entries such as `types`, `import`, `node`, or `default`.
|
|
137
|
-
*/
|
|
138
|
-
conditionPriority?: string[];
|
|
139
|
-
/**
|
|
140
|
-
* File name used for generated path mapping configs.
|
|
141
|
-
*
|
|
142
|
-
* @default "tsconfig.dts.paths.generated.json"
|
|
143
|
-
*/
|
|
144
|
-
generatedFileName?: string;
|
|
263
|
+
interface GraphRuleRefDenyEntry {
|
|
145
264
|
/**
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
* Limina uses this to know which files it is allowed to refresh.
|
|
265
|
+
* Target `tsconfig*.dts.json` path, relative to the inferred workspace root.
|
|
149
266
|
*/
|
|
150
|
-
|
|
267
|
+
path: string;
|
|
151
268
|
/**
|
|
152
|
-
*
|
|
269
|
+
* Human-readable explanation shown when the rule fails.
|
|
153
270
|
*/
|
|
154
|
-
|
|
271
|
+
reason: string;
|
|
155
272
|
}
|
|
156
273
|
/**
|
|
157
|
-
* Declaration leaf boundary
|
|
274
|
+
* Declaration leaf boundary explicitly allowed for projects with a matching
|
|
275
|
+
* Limina graph rule when static import analysis cannot prove the edge.
|
|
158
276
|
*/
|
|
159
|
-
interface
|
|
277
|
+
interface GraphRuleRefAllowEntry {
|
|
160
278
|
/**
|
|
161
279
|
* Target `tsconfig*.dts.json` path, relative to the inferred workspace root.
|
|
162
280
|
*/
|
|
163
281
|
path: string;
|
|
164
282
|
/**
|
|
165
|
-
* Human-readable explanation
|
|
283
|
+
* Human-readable explanation documenting why this extra reference is safe.
|
|
166
284
|
*/
|
|
167
285
|
reason: string;
|
|
168
286
|
}
|
|
@@ -197,10 +315,24 @@ interface GraphRuleDenyConfig {
|
|
|
197
315
|
deps?: GraphRuleDepDenyEntry[];
|
|
198
316
|
}
|
|
199
317
|
/**
|
|
318
|
+
* Allow lists for a Limina graph label.
|
|
319
|
+
*/
|
|
320
|
+
interface GraphRuleAllowConfig {
|
|
321
|
+
/**
|
|
322
|
+
* Extra declaration leaf boundaries that matching projects may keep even
|
|
323
|
+
* when static import analysis cannot prove them.
|
|
324
|
+
*/
|
|
325
|
+
refs?: GraphRuleRefAllowEntry[];
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
200
328
|
* Package-level graph governance rule keyed by a label declared in
|
|
201
329
|
* `tsconfig*.dts.json`.
|
|
202
330
|
*/
|
|
203
331
|
interface GraphRule {
|
|
332
|
+
/**
|
|
333
|
+
* Allowed graph boundaries that static analysis cannot prove.
|
|
334
|
+
*/
|
|
335
|
+
allow?: GraphRuleAllowConfig;
|
|
204
336
|
/**
|
|
205
337
|
* Denied graph boundaries and workspace package dependencies.
|
|
206
338
|
*/
|
|
@@ -209,12 +341,31 @@ interface GraphRule {
|
|
|
209
341
|
/**
|
|
210
342
|
* TypeScript project graph policy.
|
|
211
343
|
*/
|
|
344
|
+
interface GraphConditionDomain {
|
|
345
|
+
/**
|
|
346
|
+
* Human-readable domain name used in graph check reports.
|
|
347
|
+
*/
|
|
348
|
+
name: string;
|
|
349
|
+
/**
|
|
350
|
+
* Domain entry `tsconfig*.dts.json` path, relative to the inferred workspace root.
|
|
351
|
+
*/
|
|
352
|
+
entry: string;
|
|
353
|
+
/**
|
|
354
|
+
* Bundler/package condition names expected for this declaration reference tree.
|
|
355
|
+
*/
|
|
356
|
+
customConditions: string[];
|
|
357
|
+
}
|
|
212
358
|
interface GraphConfig {
|
|
359
|
+
/**
|
|
360
|
+
* Real declaration resolution domains whose project references should share
|
|
361
|
+
* the configured custom conditions.
|
|
362
|
+
*/
|
|
363
|
+
conditionDomains?: GraphConditionDomain[];
|
|
213
364
|
/**
|
|
214
365
|
* Label-based package and build-boundary access rules.
|
|
215
366
|
*
|
|
216
|
-
* A `tsconfig*.dts.json` can opt into one
|
|
217
|
-
* `
|
|
367
|
+
* A `tsconfig*.dts.json` can opt into one or more rules by declaring
|
|
368
|
+
* `liminaOptions.graphRules`.
|
|
218
369
|
*/
|
|
219
370
|
rules?: Record<string, GraphRule>;
|
|
220
371
|
}
|
|
@@ -256,7 +407,12 @@ type PackageAttwProfile = "esm-only" | "node16" | "strict";
|
|
|
256
407
|
/**
|
|
257
408
|
* publint package check settings.
|
|
258
409
|
*/
|
|
410
|
+
type PackagePublintLevel = "error" | "suggestion" | "warning";
|
|
259
411
|
interface PackagePublintCheckConfig {
|
|
412
|
+
/**
|
|
413
|
+
* Minimum publint message level to report.
|
|
414
|
+
*/
|
|
415
|
+
level?: PackagePublintLevel;
|
|
260
416
|
/**
|
|
261
417
|
* Whether publint should run in strict mode.
|
|
262
418
|
*
|
|
@@ -267,7 +423,36 @@ interface PackagePublintCheckConfig {
|
|
|
267
423
|
/**
|
|
268
424
|
* Are The Types Wrong package check settings.
|
|
269
425
|
*/
|
|
426
|
+
type PackageAttwLevel = "error" | "warn";
|
|
427
|
+
type PackageAttwIgnoreRule = "cjs-only-exports-default" | "cjs-resolves-to-esm" | "fallback-condition" | "false-cjs" | "false-esm" | "false-export-default" | "internal-resolution-error" | "missing-export-equals" | "named-exports" | "no-resolution" | "unexpected-module-syntax" | "untyped-resolution" | (string & {});
|
|
270
428
|
interface PackageAttwCheckConfig {
|
|
429
|
+
/**
|
|
430
|
+
* Exhaustive list of package entrypoints to check. The package root is ".".
|
|
431
|
+
*/
|
|
432
|
+
entrypoints?: string[];
|
|
433
|
+
/**
|
|
434
|
+
* Whether ATTW should consider all published files as entrypoints when no
|
|
435
|
+
* other entrypoints are detected or configured.
|
|
436
|
+
*/
|
|
437
|
+
entrypointsLegacy?: boolean;
|
|
438
|
+
/**
|
|
439
|
+
* Entrypoints to exclude from checking.
|
|
440
|
+
*/
|
|
441
|
+
excludeEntrypoints?: (string | RegExp)[];
|
|
442
|
+
/**
|
|
443
|
+
* Problem rule names to ignore.
|
|
444
|
+
*/
|
|
445
|
+
ignoreRules?: PackageAttwIgnoreRule[];
|
|
446
|
+
/**
|
|
447
|
+
* Entrypoints to check in addition to automatically discovered ones.
|
|
448
|
+
*/
|
|
449
|
+
includeEntrypoints?: string[];
|
|
450
|
+
/**
|
|
451
|
+
* Whether ATTW findings fail the package check or are logged as warnings.
|
|
452
|
+
*
|
|
453
|
+
* @default "error"
|
|
454
|
+
*/
|
|
455
|
+
level?: PackageAttwLevel;
|
|
271
456
|
/**
|
|
272
457
|
* Problem profile to enforce.
|
|
273
458
|
*
|
|
@@ -315,11 +500,11 @@ interface PackageEntry {
|
|
|
315
500
|
/**
|
|
316
501
|
* publint settings for this package output.
|
|
317
502
|
*/
|
|
318
|
-
publint?: PackagePublintCheckConfig;
|
|
503
|
+
publint?: boolean | PackagePublintCheckConfig;
|
|
319
504
|
/**
|
|
320
505
|
* Are The Types Wrong settings for this package output.
|
|
321
506
|
*/
|
|
322
|
-
attw?: PackageAttwCheckConfig;
|
|
507
|
+
attw?: boolean | PackageAttwCheckConfig;
|
|
323
508
|
/**
|
|
324
509
|
* Built package import boundary settings.
|
|
325
510
|
*/
|
|
@@ -334,10 +519,62 @@ interface PackageConfig {
|
|
|
334
519
|
*/
|
|
335
520
|
entries?: PackageEntry[];
|
|
336
521
|
}
|
|
522
|
+
interface ReleaseContentHashConfigArgs {
|
|
523
|
+
/**
|
|
524
|
+
* Package currently being release-checked.
|
|
525
|
+
*/
|
|
526
|
+
importerName: string;
|
|
527
|
+
/**
|
|
528
|
+
* Workspace dependency package being compared against npm.
|
|
529
|
+
*/
|
|
530
|
+
dependencyName: string;
|
|
531
|
+
}
|
|
532
|
+
/**
|
|
533
|
+
* Release dependency artifact content hash settings.
|
|
534
|
+
*/
|
|
535
|
+
interface ReleaseContentHashConfig {
|
|
536
|
+
/**
|
|
537
|
+
* npm dist-tag used as the online baseline for dependency package output.
|
|
538
|
+
*
|
|
539
|
+
* @default "latest"
|
|
540
|
+
*/
|
|
541
|
+
baselineTag?: string | ((args: ReleaseContentHashConfigArgs) => string);
|
|
542
|
+
/**
|
|
543
|
+
* Use Limina's built-in dependency artifact ignore set as a fallback when
|
|
544
|
+
* `ignore` is omitted or returns `undefined`.
|
|
545
|
+
*
|
|
546
|
+
* @default false
|
|
547
|
+
*/
|
|
548
|
+
builtinIgnore?: boolean;
|
|
549
|
+
/**
|
|
550
|
+
* Additional package-relative glob patterns ignored by dependency artifact
|
|
551
|
+
* content hashes.
|
|
552
|
+
*/
|
|
553
|
+
ignore?: string[] | ((args: ReleaseContentHashConfigArgs) => string[] | undefined);
|
|
554
|
+
}
|
|
555
|
+
/**
|
|
556
|
+
* Release check settings.
|
|
557
|
+
*/
|
|
558
|
+
interface ReleaseConfig {
|
|
559
|
+
/**
|
|
560
|
+
* Dependency artifact content hash comparison settings.
|
|
561
|
+
*/
|
|
562
|
+
contentHash?: ReleaseContentHashConfig;
|
|
563
|
+
}
|
|
337
564
|
/**
|
|
338
565
|
* Limina user config.
|
|
339
566
|
*/
|
|
340
567
|
interface LiminaConfig {
|
|
568
|
+
/**
|
|
569
|
+
* Enable strict workspace modeling rules.
|
|
570
|
+
*
|
|
571
|
+
* Strict mode keeps the existing command surface but makes graph, proof,
|
|
572
|
+
* source, package, and release checks enforce the complete Limina workspace
|
|
573
|
+
* model.
|
|
574
|
+
*
|
|
575
|
+
* @default false
|
|
576
|
+
*/
|
|
577
|
+
strict?: boolean;
|
|
341
578
|
/**
|
|
342
579
|
* Shared project facts, such as checker entries and source boundary.
|
|
343
580
|
*/
|
|
@@ -351,10 +588,6 @@ interface LiminaConfig {
|
|
|
351
588
|
*/
|
|
352
589
|
package?: PackageConfig;
|
|
353
590
|
/**
|
|
354
|
-
* Options for generating TypeScript source `paths` compatibility files.
|
|
355
|
-
*/
|
|
356
|
-
paths?: PathsConfig;
|
|
357
|
-
/**
|
|
358
591
|
* Named command pipelines runnable through `limina check <name>`.
|
|
359
592
|
*/
|
|
360
593
|
pipelines?: Record<string, PipelineStep[]>;
|
|
@@ -362,17 +595,25 @@ interface LiminaConfig {
|
|
|
362
595
|
* Rules that prove source files are covered by graph or checker entries.
|
|
363
596
|
*/
|
|
364
597
|
proof?: ProofConfig;
|
|
598
|
+
/**
|
|
599
|
+
* Rules for release dependency artifact comparisons.
|
|
600
|
+
*/
|
|
601
|
+
release?: ReleaseConfig;
|
|
602
|
+
/**
|
|
603
|
+
* Rules for source-owned dependency usage checks.
|
|
604
|
+
*/
|
|
605
|
+
source?: SourceCheckConfig;
|
|
365
606
|
}
|
|
366
607
|
/**
|
|
367
608
|
* CLI command currently loading the config.
|
|
368
609
|
*/
|
|
369
|
-
type LiminaCommand = "check" | "graph" | "
|
|
610
|
+
type LiminaCommand = "check" | "graph" | "nx" | "package" | "proof" | "release" | "source" | (string & {});
|
|
370
611
|
/**
|
|
371
612
|
* Environment passed to function-style configs.
|
|
372
613
|
*/
|
|
373
614
|
interface LiminaConfigEnv {
|
|
374
615
|
/**
|
|
375
|
-
* CLI command family, such as `check`, `graph`, or `
|
|
616
|
+
* CLI command family, such as `check`, `graph`, or `package`.
|
|
376
617
|
*/
|
|
377
618
|
command: LiminaCommand;
|
|
378
619
|
/**
|
|
@@ -408,6 +649,7 @@ declare function defineConfig(config: LiminaConfigFnObject): LiminaConfigFnObjec
|
|
|
408
649
|
declare function defineConfig(config: LiminaConfigFnPromise): LiminaConfigFnPromise;
|
|
409
650
|
declare function defineConfig(config: LiminaConfigFn): LiminaConfigFn;
|
|
410
651
|
declare function validateLiminaConfig(config: LiminaConfig): void;
|
|
652
|
+
declare function isStrictConfig(config: Pick<LiminaConfig, "strict">): boolean;
|
|
411
653
|
declare function getActiveCheckers(config: LiminaConfig): ResolvedCheckerConfig[];
|
|
412
654
|
declare function getActiveCheckerExtensions(config: LiminaConfig): string[];
|
|
413
655
|
interface LoadConfigOptions {
|
|
@@ -438,4 +680,4 @@ interface LoadConfigOptions {
|
|
|
438
680
|
}
|
|
439
681
|
declare function loadConfig(options?: LoadConfigOptions): Promise<ResolvedLiminaConfig>;
|
|
440
682
|
//#endregion
|
|
441
|
-
export { BuiltinCheckerPreset, BuiltinTaskName, CheckerConfig, CheckerExecutionKind, CheckerPreset, GraphConfig, GraphRule, GraphRuleDenyConfig, GraphRuleDepDenyEntry, GraphRuleRefDenyEntry, LiminaCommand, LiminaConfig, LiminaConfigEnv, LiminaConfigExport, LiminaConfigFn, LiminaConfigFnObject, LiminaConfigFnPromise, LoadConfigOptions, PackageAttwCheckConfig, PackageAttwProfile, PackageBoundaryCheckConfig, PackageCheckTool, PackageCheckToolSelection, PackageConfig, PackageEntry, PackagePublintCheckConfig,
|
|
683
|
+
export { BuiltinCheckerPreset, BuiltinTaskName, CheckerConfig, CheckerExecutionKind, CheckerPreset, GraphConditionDomain, GraphConfig, GraphRule, GraphRuleAllowConfig, GraphRuleDenyConfig, GraphRuleDepDenyEntry, GraphRuleRefAllowEntry, GraphRuleRefDenyEntry, LiminaCommand, LiminaConfig, LiminaConfigEnv, LiminaConfigExport, LiminaConfigFn, LiminaConfigFnObject, LiminaConfigFnPromise, LoadConfigOptions, PackageAttwCheckConfig, PackageAttwIgnoreRule, PackageAttwLevel, PackageAttwProfile, PackageBoundaryCheckConfig, PackageCheckTool, PackageCheckToolSelection, PackageConfig, PackageEntry, PackagePublintCheckConfig, PackagePublintLevel, PipelineStep, ProofAllowlistEntry, ProofConfig, ReleaseConfig, ReleaseContentHashConfig, ReleaseContentHashConfigArgs, ResolvedCheckerConfig, ResolvedLiminaConfig, RuntimeEnvironment, SharedLiminaConfig, SourceBoundaryConfig, SourceCheckConfig, SourceKnipCheckConfig, SourceKnipEntryConfig, SourceKnipIgnoredDependencyConfig, SourceKnipIgnoredFileConfig, SourceKnipWorkspaceConfig, SourceTsconfigOwnershipConfig, SourceTsconfigOwnershipIgnoreEntry, defineConfig, getActiveCheckerExtensions, getActiveCheckers, isStrictConfig, loadConfig, validateLiminaConfig };
|
package/config.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import "./chunks/dep-
|
|
2
|
-
import { a as validateLiminaConfig, i as loadConfig, n as getActiveCheckerExtensions, r as getActiveCheckers, t as defineConfig } from "./chunks/dep-DzYrmtQJ.js";
|
|
1
|
+
import { a as loadConfig, i as isStrictConfig, n as getActiveCheckerExtensions, o as validateLiminaConfig, r as getActiveCheckers, t as defineConfig } from "./chunks/dep-Ce6cDHmw.js";
|
|
3
2
|
|
|
4
|
-
export { defineConfig, getActiveCheckerExtensions, getActiveCheckers, loadConfig, validateLiminaConfig };
|
|
3
|
+
export { defineConfig, getActiveCheckerExtensions, getActiveCheckers, isStrictConfig, loadConfig, validateLiminaConfig };
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuiltinCheckerPreset, BuiltinTaskName, CheckerConfig, CheckerExecutionKind, CheckerPreset, GraphConfig, GraphRule, GraphRuleDenyConfig, GraphRuleDepDenyEntry, GraphRuleRefDenyEntry, LiminaCommand, LiminaConfig, LiminaConfigEnv, LiminaConfigExport, LiminaConfigFn, LiminaConfigFnObject, LiminaConfigFnPromise, LoadConfigOptions, PackageAttwCheckConfig, PackageAttwProfile, PackageBoundaryCheckConfig, PackageCheckTool, PackageCheckToolSelection, PackageConfig, PackageEntry, PackagePublintCheckConfig,
|
|
1
|
+
import { BuiltinCheckerPreset, BuiltinTaskName, CheckerConfig, CheckerExecutionKind, CheckerPreset, GraphConditionDomain, GraphConfig, GraphRule, GraphRuleAllowConfig, GraphRuleDenyConfig, GraphRuleDepDenyEntry, GraphRuleRefAllowEntry, GraphRuleRefDenyEntry, LiminaCommand, LiminaConfig, LiminaConfigEnv, LiminaConfigExport, LiminaConfigFn, LiminaConfigFnObject, LiminaConfigFnPromise, LoadConfigOptions, PackageAttwCheckConfig, PackageAttwIgnoreRule, PackageAttwLevel, PackageAttwProfile, PackageBoundaryCheckConfig, PackageCheckTool, PackageCheckToolSelection, PackageConfig, PackageEntry, PackagePublintCheckConfig, PackagePublintLevel, PipelineStep, ProofAllowlistEntry, ProofConfig, ResolvedCheckerConfig, ResolvedLiminaConfig, RuntimeEnvironment, SharedLiminaConfig, SourceBoundaryConfig, SourceCheckConfig, SourceKnipCheckConfig, SourceKnipEntryConfig, SourceKnipIgnoredDependencyConfig, SourceKnipIgnoredFileConfig, SourceKnipWorkspaceConfig, defineConfig, getActiveCheckerExtensions, getActiveCheckers, loadConfig, validateLiminaConfig } from "./config.js";
|
|
2
2
|
//#region src/flow.d.ts
|
|
3
3
|
interface ClackLogAdapter {
|
|
4
4
|
error: (message: string) => void;
|
|
@@ -62,6 +62,26 @@ declare class LiminaFlowReporter {
|
|
|
62
62
|
}
|
|
63
63
|
declare function createLiminaFlowReporter(options?: LiminaFlowReporterOptions): LiminaFlowReporter;
|
|
64
64
|
//#endregion
|
|
65
|
+
//#region src/commands/graph.d.ts
|
|
66
|
+
interface RunGraphCheckOptions {
|
|
67
|
+
clearScreen?: boolean;
|
|
68
|
+
flow?: LiminaFlowReporter;
|
|
69
|
+
flowDepth?: number;
|
|
70
|
+
}
|
|
71
|
+
interface RunGraphSyncOptions {
|
|
72
|
+
clearScreen?: boolean;
|
|
73
|
+
cwd?: string;
|
|
74
|
+
entryPath?: string;
|
|
75
|
+
flow?: LiminaFlowReporter;
|
|
76
|
+
flowDepth?: number;
|
|
77
|
+
}
|
|
78
|
+
interface RunGraphSyncResult {
|
|
79
|
+
changed: boolean;
|
|
80
|
+
projectCount: number;
|
|
81
|
+
}
|
|
82
|
+
declare function runGraphCheck(config: ResolvedLiminaConfig, options?: RunGraphCheckOptions): Promise<boolean>;
|
|
83
|
+
declare function runGraphSync(config: ResolvedLiminaConfig, options?: RunGraphSyncOptions): Promise<RunGraphSyncResult>;
|
|
84
|
+
//#endregion
|
|
65
85
|
//#region src/commands/init.d.ts
|
|
66
86
|
interface RunInitOptions {
|
|
67
87
|
clearScreen?: boolean;
|
|
@@ -146,4 +166,4 @@ declare function runCheckerTypecheck(options: RunCheckerTypecheckOptions): Promi
|
|
|
146
166
|
//#region src/tsconfig.d.ts
|
|
147
167
|
declare function isOrdinaryTypecheckConfigPath(configPath: string): boolean;
|
|
148
168
|
//#endregion
|
|
149
|
-
export { type BuiltinCheckerPreset, type BuiltinTaskName, type CheckerConfig, type CheckerExecutionKind, type CheckerPreset, type GraphConfig, type GraphRule, type GraphRuleDenyConfig, type GraphRuleDepDenyEntry, type GraphRuleRefDenyEntry, type LiminaCommand, type LiminaConfig, type LiminaConfigEnv, type LiminaConfigExport, type LiminaConfigFn, type LiminaConfigFnObject, type LiminaConfigFnPromise, type LiminaFlowFailureOptions, type LiminaFlowMessageOptions, type LiminaFlowOutputOptions, LiminaFlowReporter, type LiminaFlowReporterOptions, type LiminaFlowTask, type LoadConfigOptions, type PackageAttwCheckConfig, type PackageAttwProfile, type PackageBoundaryCheckConfig, type PackageCheckTool, type PackageCheckToolSelection, type PackageConfig, type PackageEntry, type PackagePublintCheckConfig, type
|
|
169
|
+
export { type BuiltinCheckerPreset, type BuiltinTaskName, type CheckerConfig, type CheckerExecutionKind, type CheckerPreset, type GraphConditionDomain, type GraphConfig, type GraphRule, type GraphRuleAllowConfig, type GraphRuleDenyConfig, type GraphRuleDepDenyEntry, type GraphRuleRefAllowEntry, type GraphRuleRefDenyEntry, type LiminaCommand, type LiminaConfig, type LiminaConfigEnv, type LiminaConfigExport, type LiminaConfigFn, type LiminaConfigFnObject, type LiminaConfigFnPromise, type LiminaFlowFailureOptions, type LiminaFlowMessageOptions, type LiminaFlowOutputOptions, LiminaFlowReporter, type LiminaFlowReporterOptions, type LiminaFlowTask, type LoadConfigOptions, type PackageAttwCheckConfig, type PackageAttwIgnoreRule, type PackageAttwLevel, type PackageAttwProfile, type PackageBoundaryCheckConfig, type PackageCheckTool, type PackageCheckToolSelection, type PackageConfig, type PackageEntry, type PackagePublintCheckConfig, type PackagePublintLevel, type PipelineStep, type ProofAllowlistEntry, type ProofConfig, type ResolvedCheckerConfig, type ResolvedLiminaConfig, type RunCheckerBuildOptions, type RunCheckerBuildResult, type RunCheckerTypecheckOptions, type RunCheckerTypecheckResult, type RunGraphCheckOptions, type RunGraphSyncOptions, type RunGraphSyncResult, type RunInitOptions, type RunInitResult, type RunSourceCheckOptions, type RuntimeEnvironment, type SharedLiminaConfig, type SourceBoundaryConfig, type SourceCheckConfig, type SourceKnipCheckConfig, type SourceKnipEntryConfig, type SourceKnipIgnoredDependencyConfig, type SourceKnipIgnoredFileConfig, type SourceKnipWorkspaceConfig, type TypecheckRunner, type TypecheckTarget, type TypecheckTargetResult, createLiminaFlowReporter, defineConfig, getActiveCheckerExtensions, getActiveCheckers, isOrdinaryTypecheckConfigPath, loadConfig, runCheckerBuild, runCheckerTypecheck, runGraphCheck, runGraphSync, runInit, runSourceCheck, validateLiminaConfig };
|
package/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import "./chunks/dep-
|
|
2
|
-
import { a as
|
|
3
|
-
import { Y as isOrdinaryTypecheckConfigPath, a as runSourceCheck, i as runCheckerTypecheck, n as createLiminaFlowReporter, o as runInit, r as runCheckerBuild, t as LiminaFlowReporter } from "./chunks/dep-ZRIm_-Zk.js";
|
|
1
|
+
import { L as isOrdinaryTypecheckConfigPath, a as runCheckerTypecheck, c as runGraphCheck, i as runCheckerBuild, l as runGraphSync, n as createLiminaFlowReporter, o as runSourceCheck, s as runInit, t as LiminaFlowReporter } from "./chunks/dep-COZNKoxO.js";
|
|
2
|
+
import { a as loadConfig, n as getActiveCheckerExtensions, o as validateLiminaConfig, r as getActiveCheckers, t as defineConfig } from "./chunks/dep-Ce6cDHmw.js";
|
|
4
3
|
|
|
5
|
-
export { LiminaFlowReporter, createLiminaFlowReporter, defineConfig, getActiveCheckerExtensions, getActiveCheckers, isOrdinaryTypecheckConfigPath, loadConfig, runCheckerBuild, runCheckerTypecheck, runInit, runSourceCheck, validateLiminaConfig };
|
|
4
|
+
export { LiminaFlowReporter, createLiminaFlowReporter, defineConfig, getActiveCheckerExtensions, getActiveCheckers, isOrdinaryTypecheckConfigPath, loadConfig, runCheckerBuild, runCheckerTypecheck, runGraphCheck, runGraphSync, runInit, runSourceCheck, validateLiminaConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "limina",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Senao Xi",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"bugs": {
|
|
24
24
|
"url": "https://github.com/XiSenao/docs-islands/issues"
|
|
25
25
|
},
|
|
26
|
-
"homepage": "https://docs.senao.me/docs-islands",
|
|
26
|
+
"homepage": "https://docs.senao.me/docs-islands/limina",
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
@@ -31,28 +31,38 @@
|
|
|
31
31
|
"limina": "./bin/limina.js"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"
|
|
35
|
-
"@clack/prompts": "^1.4.0",
|
|
36
|
-
"logaria": "0.0.2",
|
|
37
|
-
"@publint/pack": "^0.1.4",
|
|
38
|
-
"cac": "^6.7.14",
|
|
39
|
-
"es-module-lexer": "^2.0.0",
|
|
40
|
-
"publint": "^0.3.17",
|
|
41
|
-
"semver": "^7.8.1",
|
|
34
|
+
"picomatch": "^4.0.4",
|
|
42
35
|
"tinyglobby": "^0.2.15",
|
|
43
|
-
"
|
|
44
|
-
"
|
|
36
|
+
"oxc-parser": "^0.133.0",
|
|
37
|
+
"oxc-resolver": "^11.20.0"
|
|
45
38
|
},
|
|
46
39
|
"peerDependencies": {
|
|
40
|
+
"@arethetypeswrong/core": "^0.18.2",
|
|
41
|
+
"@typescript/native-preview": "7.0.0-dev.20260527.1",
|
|
47
42
|
"@vue/compiler-sfc": "^3.5.28",
|
|
43
|
+
"knip": "^6.15.0",
|
|
44
|
+
"publint": "^0.3.17",
|
|
48
45
|
"svelte-check": "^4.4.7",
|
|
49
46
|
"typescript": "~5.9.3",
|
|
50
|
-
"vue-tsc": "~3.2.4"
|
|
47
|
+
"vue-tsc": "~3.2.4",
|
|
48
|
+
"vue-tsgo": "0.2.2"
|
|
51
49
|
},
|
|
52
50
|
"peerDependenciesMeta": {
|
|
51
|
+
"@arethetypeswrong/core": {
|
|
52
|
+
"optional": true
|
|
53
|
+
},
|
|
54
|
+
"@typescript/native-preview": {
|
|
55
|
+
"optional": true
|
|
56
|
+
},
|
|
53
57
|
"@vue/compiler-sfc": {
|
|
54
58
|
"optional": true
|
|
55
59
|
},
|
|
60
|
+
"knip": {
|
|
61
|
+
"optional": true
|
|
62
|
+
},
|
|
63
|
+
"publint": {
|
|
64
|
+
"optional": true
|
|
65
|
+
},
|
|
56
66
|
"svelte-check": {
|
|
57
67
|
"optional": true
|
|
58
68
|
},
|
|
@@ -61,12 +71,16 @@
|
|
|
61
71
|
},
|
|
62
72
|
"vue-tsc": {
|
|
63
73
|
"optional": true
|
|
74
|
+
},
|
|
75
|
+
"vue-tsgo": {
|
|
76
|
+
"optional": true
|
|
64
77
|
}
|
|
65
78
|
},
|
|
66
79
|
"types": "./index.d.ts",
|
|
67
80
|
"exports": {
|
|
68
81
|
".": "./index.js",
|
|
69
82
|
"./config": "./config.js",
|
|
83
|
+
"./schemas/tsconfig-schema.json": "./schemas/tsconfig-schema.json",
|
|
70
84
|
"./package.json": "./package.json"
|
|
71
85
|
},
|
|
72
86
|
"sideEffects": false
|