limina 0.0.4 → 0.0.5
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 +11 -0
- package/README.md +16 -372
- package/README.zh-CN.md +30 -0
- package/bin/limina.js +32 -21
- package/chunks/dep-CBKvJc4Y.js +846 -0
- package/chunks/dep-DTGmTTL7.js +4968 -0
- package/cli.js +1144 -802
- package/config.d.ts +202 -12
- package/config.js +2 -2
- package/index.d.ts +22 -2
- package/index.js +3 -3
- package/package.json +18 -3
- package/schemas/tsconfig-schema.json +42 -0
- package/chunks/dep-DzYrmtQJ.js +0 -360
- package/chunks/dep-ZRIm_-Zk.js +0 -2401
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,18 +79,118 @@ 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 SourceUnusedDependencyIgnoreEntry {
|
|
87
|
+
/**
|
|
88
|
+
* Importing package name from package.json.
|
|
89
|
+
*/
|
|
90
|
+
importer: string;
|
|
91
|
+
/**
|
|
92
|
+
* Declared workspace dependency package name.
|
|
93
|
+
*/
|
|
94
|
+
dependency: string;
|
|
95
|
+
/**
|
|
96
|
+
* Why the dependency is safe to keep even when Knip cannot prove it is
|
|
97
|
+
* reachable from package entries, binaries, or scripts.
|
|
98
|
+
*/
|
|
99
|
+
reason: string;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Source dependency usage settings.
|
|
103
|
+
*/
|
|
104
|
+
interface SourceUnusedDependenciesConfig {
|
|
105
|
+
/**
|
|
106
|
+
* Declared workspace dependencies intentionally not visible through Knip's
|
|
107
|
+
* entry-reachable dependency graph.
|
|
108
|
+
*/
|
|
109
|
+
ignore?: SourceUnusedDependencyIgnoreEntry[];
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Explicit exception for a source module that is owned by a package but is
|
|
113
|
+
* intentionally not reachable from Knip's package entry graph.
|
|
114
|
+
*/
|
|
115
|
+
interface SourceUnusedModuleIgnoreEntry {
|
|
116
|
+
/**
|
|
117
|
+
* Named package owner from package.json.
|
|
118
|
+
*/
|
|
119
|
+
owner: string;
|
|
120
|
+
/**
|
|
121
|
+
* Workspace-root-relative source module path.
|
|
122
|
+
*/
|
|
123
|
+
file: string;
|
|
124
|
+
/**
|
|
125
|
+
* Why the source module is safe to keep even when Knip cannot prove it is
|
|
126
|
+
* reachable from package entries, binaries, or scripts.
|
|
127
|
+
*/
|
|
128
|
+
reason: string;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Additional source module entries for Knip's strict-mode reachability graph.
|
|
132
|
+
*/
|
|
133
|
+
interface SourceUnusedModuleEntryConfig {
|
|
134
|
+
/**
|
|
135
|
+
* Named package owner from package.json.
|
|
136
|
+
*/
|
|
137
|
+
owner: string;
|
|
138
|
+
/**
|
|
139
|
+
* Workspace-root-relative file or glob patterns that Knip should treat as
|
|
140
|
+
* additional entries for this owner.
|
|
141
|
+
*/
|
|
142
|
+
files: string[];
|
|
143
|
+
/**
|
|
144
|
+
* Why these modules are legitimate entries even though they are not package
|
|
145
|
+
* exports, binaries, scripts, or plugin-discovered entries.
|
|
146
|
+
*/
|
|
147
|
+
reason: string;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Source module usage settings.
|
|
151
|
+
*/
|
|
152
|
+
interface SourceUnusedModulesConfig {
|
|
153
|
+
/**
|
|
154
|
+
* Additional entry globs for source modules loaded by test runners or local
|
|
155
|
+
* tooling rather than package exports.
|
|
156
|
+
*/
|
|
157
|
+
entries?: SourceUnusedModuleEntryConfig[];
|
|
158
|
+
/**
|
|
159
|
+
* Package-owned source modules intentionally not visible through Knip's
|
|
160
|
+
* entry-reachable file graph.
|
|
161
|
+
*/
|
|
162
|
+
ignore?: SourceUnusedModuleIgnoreEntry[];
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Source-owned dependency usage check settings.
|
|
166
|
+
*/
|
|
167
|
+
interface SourceCheckConfig {
|
|
168
|
+
/**
|
|
169
|
+
* Checks that workspace package dependencies declared in package.json are
|
|
170
|
+
* reachable from package entries, binaries, or scripts owned by that package.
|
|
171
|
+
*/
|
|
172
|
+
unusedDependencies?: SourceUnusedDependenciesConfig;
|
|
173
|
+
/**
|
|
174
|
+
* Strict-mode exceptions for package-owned source modules that are not
|
|
175
|
+
* reachable from package entries, binaries, or scripts owned by that package.
|
|
176
|
+
*
|
|
177
|
+
* There is no enabled switch: strict: true enables unused module checks.
|
|
178
|
+
*/
|
|
179
|
+
unusedModules?: SourceUnusedModulesConfig;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Global source boundary used by proof checks.
|
|
83
183
|
*/
|
|
84
184
|
interface SourceBoundaryConfig {
|
|
85
185
|
/**
|
|
86
|
-
* Glob patterns for source files that
|
|
186
|
+
* Glob patterns for source files that Limina should govern.
|
|
87
187
|
*
|
|
88
188
|
* When omitted, Limina derives the source boundary from configured checker
|
|
89
189
|
* extensions and then applies `exclude`.
|
|
90
190
|
*/
|
|
91
191
|
include?: string[];
|
|
92
192
|
/**
|
|
93
|
-
* Glob patterns or directory shorthands to omit from
|
|
193
|
+
* Glob patterns or directory shorthands to omit from source governance.
|
|
94
194
|
*
|
|
95
195
|
* @default: [
|
|
96
196
|
* "node_modules",
|
|
@@ -100,6 +200,7 @@ interface SourceBoundaryConfig {
|
|
|
100
200
|
* "coverage",
|
|
101
201
|
* "**\/tsconfig*.json",
|
|
102
202
|
* "**\/package.json",
|
|
203
|
+
* "**\/project.json",
|
|
103
204
|
* ".prettierrc.json",
|
|
104
205
|
* ".markdownlint.json",
|
|
105
206
|
* "vercel.json",
|
|
@@ -116,7 +217,7 @@ interface SharedLiminaConfig {
|
|
|
116
217
|
*/
|
|
117
218
|
checkers?: Record<string, CheckerConfig>;
|
|
118
219
|
/**
|
|
119
|
-
*
|
|
220
|
+
* Global source file boundary used by proof checks.
|
|
120
221
|
*/
|
|
121
222
|
source?: SourceBoundaryConfig;
|
|
122
223
|
}
|
|
@@ -167,6 +268,20 @@ interface GraphRuleRefDenyEntry {
|
|
|
167
268
|
reason: string;
|
|
168
269
|
}
|
|
169
270
|
/**
|
|
271
|
+
* Declaration leaf boundary explicitly allowed for projects with a matching
|
|
272
|
+
* Limina graph rule when static import analysis cannot prove the edge.
|
|
273
|
+
*/
|
|
274
|
+
interface GraphRuleRefAllowEntry {
|
|
275
|
+
/**
|
|
276
|
+
* Target `tsconfig*.dts.json` path, relative to the inferred workspace root.
|
|
277
|
+
*/
|
|
278
|
+
path: string;
|
|
279
|
+
/**
|
|
280
|
+
* Human-readable explanation documenting why this extra reference is safe.
|
|
281
|
+
*/
|
|
282
|
+
reason: string;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
170
285
|
* Dependency denied to projects with a matching Limina label.
|
|
171
286
|
*/
|
|
172
287
|
interface GraphRuleDepDenyEntry {
|
|
@@ -197,10 +312,24 @@ interface GraphRuleDenyConfig {
|
|
|
197
312
|
deps?: GraphRuleDepDenyEntry[];
|
|
198
313
|
}
|
|
199
314
|
/**
|
|
315
|
+
* Allow lists for a Limina graph label.
|
|
316
|
+
*/
|
|
317
|
+
interface GraphRuleAllowConfig {
|
|
318
|
+
/**
|
|
319
|
+
* Extra declaration leaf boundaries that matching projects may keep even
|
|
320
|
+
* when static import analysis cannot prove them.
|
|
321
|
+
*/
|
|
322
|
+
refs?: GraphRuleRefAllowEntry[];
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
200
325
|
* Package-level graph governance rule keyed by a label declared in
|
|
201
326
|
* `tsconfig*.dts.json`.
|
|
202
327
|
*/
|
|
203
328
|
interface GraphRule {
|
|
329
|
+
/**
|
|
330
|
+
* Allowed graph boundaries that static analysis cannot prove.
|
|
331
|
+
*/
|
|
332
|
+
allow?: GraphRuleAllowConfig;
|
|
204
333
|
/**
|
|
205
334
|
* Denied graph boundaries and workspace package dependencies.
|
|
206
335
|
*/
|
|
@@ -213,8 +342,8 @@ interface GraphConfig {
|
|
|
213
342
|
/**
|
|
214
343
|
* Label-based package and build-boundary access rules.
|
|
215
344
|
*
|
|
216
|
-
* A `tsconfig*.dts.json` can opt into one
|
|
217
|
-
* `
|
|
345
|
+
* A `tsconfig*.dts.json` can opt into one or more rules by declaring
|
|
346
|
+
* `liminaOptions.graphRules`.
|
|
218
347
|
*/
|
|
219
348
|
rules?: Record<string, GraphRule>;
|
|
220
349
|
}
|
|
@@ -334,10 +463,62 @@ interface PackageConfig {
|
|
|
334
463
|
*/
|
|
335
464
|
entries?: PackageEntry[];
|
|
336
465
|
}
|
|
466
|
+
interface ReleaseContentHashConfigArgs {
|
|
467
|
+
/**
|
|
468
|
+
* Package currently being release-checked.
|
|
469
|
+
*/
|
|
470
|
+
importerName: string;
|
|
471
|
+
/**
|
|
472
|
+
* Workspace dependency package being compared against npm.
|
|
473
|
+
*/
|
|
474
|
+
dependencyName: string;
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
477
|
+
* Release dependency artifact content hash settings.
|
|
478
|
+
*/
|
|
479
|
+
interface ReleaseContentHashConfig {
|
|
480
|
+
/**
|
|
481
|
+
* npm dist-tag used as the online baseline for dependency package output.
|
|
482
|
+
*
|
|
483
|
+
* @default "latest"
|
|
484
|
+
*/
|
|
485
|
+
baselineTag?: string | ((args: ReleaseContentHashConfigArgs) => string);
|
|
486
|
+
/**
|
|
487
|
+
* Use Limina's built-in dependency artifact ignore set as a fallback when
|
|
488
|
+
* `ignore` is omitted or returns `undefined`.
|
|
489
|
+
*
|
|
490
|
+
* @default false
|
|
491
|
+
*/
|
|
492
|
+
builtinIgnore?: boolean;
|
|
493
|
+
/**
|
|
494
|
+
* Additional package-relative glob patterns ignored by dependency artifact
|
|
495
|
+
* content hashes.
|
|
496
|
+
*/
|
|
497
|
+
ignore?: string[] | ((args: ReleaseContentHashConfigArgs) => string[] | undefined);
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* Release check settings.
|
|
501
|
+
*/
|
|
502
|
+
interface ReleaseConfig {
|
|
503
|
+
/**
|
|
504
|
+
* Dependency artifact content hash comparison settings.
|
|
505
|
+
*/
|
|
506
|
+
contentHash?: ReleaseContentHashConfig;
|
|
507
|
+
}
|
|
337
508
|
/**
|
|
338
509
|
* Limina user config.
|
|
339
510
|
*/
|
|
340
511
|
interface LiminaConfig {
|
|
512
|
+
/**
|
|
513
|
+
* Enable strict workspace modeling rules.
|
|
514
|
+
*
|
|
515
|
+
* Strict mode keeps the existing command surface but makes graph, proof,
|
|
516
|
+
* source, package, and release checks enforce the complete Limina workspace
|
|
517
|
+
* model.
|
|
518
|
+
*
|
|
519
|
+
* @default false
|
|
520
|
+
*/
|
|
521
|
+
strict?: boolean;
|
|
341
522
|
/**
|
|
342
523
|
* Shared project facts, such as checker entries and source boundary.
|
|
343
524
|
*/
|
|
@@ -362,11 +543,19 @@ interface LiminaConfig {
|
|
|
362
543
|
* Rules that prove source files are covered by graph or checker entries.
|
|
363
544
|
*/
|
|
364
545
|
proof?: ProofConfig;
|
|
546
|
+
/**
|
|
547
|
+
* Rules for release dependency artifact comparisons.
|
|
548
|
+
*/
|
|
549
|
+
release?: ReleaseConfig;
|
|
550
|
+
/**
|
|
551
|
+
* Rules for source-owned dependency usage checks.
|
|
552
|
+
*/
|
|
553
|
+
source?: SourceCheckConfig;
|
|
365
554
|
}
|
|
366
555
|
/**
|
|
367
556
|
* CLI command currently loading the config.
|
|
368
557
|
*/
|
|
369
|
-
type LiminaCommand = "check" | "graph" | "package" | "paths" | "proof" | "release" | "source" | (string & {});
|
|
558
|
+
type LiminaCommand = "check" | "graph" | "nx" | "package" | "paths" | "proof" | "release" | "source" | (string & {});
|
|
370
559
|
/**
|
|
371
560
|
* Environment passed to function-style configs.
|
|
372
561
|
*/
|
|
@@ -408,6 +597,7 @@ declare function defineConfig(config: LiminaConfigFnObject): LiminaConfigFnObjec
|
|
|
408
597
|
declare function defineConfig(config: LiminaConfigFnPromise): LiminaConfigFnPromise;
|
|
409
598
|
declare function defineConfig(config: LiminaConfigFn): LiminaConfigFn;
|
|
410
599
|
declare function validateLiminaConfig(config: LiminaConfig): void;
|
|
600
|
+
declare function isStrictConfig(config: Pick<LiminaConfig, "strict">): boolean;
|
|
411
601
|
declare function getActiveCheckers(config: LiminaConfig): ResolvedCheckerConfig[];
|
|
412
602
|
declare function getActiveCheckerExtensions(config: LiminaConfig): string[];
|
|
413
603
|
interface LoadConfigOptions {
|
|
@@ -438,4 +628,4 @@ interface LoadConfigOptions {
|
|
|
438
628
|
}
|
|
439
629
|
declare function loadConfig(options?: LoadConfigOptions): Promise<ResolvedLiminaConfig>;
|
|
440
630
|
//#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, PathsConfig, PipelineStep, ProofAllowlistEntry, ProofConfig, ResolvedCheckerConfig, ResolvedLiminaConfig, RuntimeEnvironment, SharedLiminaConfig, SourceBoundaryConfig, defineConfig, getActiveCheckerExtensions, getActiveCheckers, loadConfig, validateLiminaConfig };
|
|
631
|
+
export { BuiltinCheckerPreset, BuiltinTaskName, CheckerConfig, CheckerExecutionKind, CheckerPreset, GraphConfig, GraphRule, GraphRuleAllowConfig, GraphRuleDenyConfig, GraphRuleDepDenyEntry, GraphRuleRefAllowEntry, GraphRuleRefDenyEntry, LiminaCommand, LiminaConfig, LiminaConfigEnv, LiminaConfigExport, LiminaConfigFn, LiminaConfigFnObject, LiminaConfigFnPromise, LoadConfigOptions, PackageAttwCheckConfig, PackageAttwProfile, PackageBoundaryCheckConfig, PackageCheckTool, PackageCheckToolSelection, PackageConfig, PackageEntry, PackagePublintCheckConfig, PathsConfig, PipelineStep, ProofAllowlistEntry, ProofConfig, ReleaseConfig, ReleaseContentHashConfig, ReleaseContentHashConfigArgs, ResolvedCheckerConfig, ResolvedLiminaConfig, RuntimeEnvironment, SharedLiminaConfig, SourceBoundaryConfig, SourceCheckConfig, SourceUnusedDependenciesConfig, SourceUnusedDependencyIgnoreEntry, SourceUnusedModuleEntryConfig, SourceUnusedModuleIgnoreEntry, SourceUnusedModulesConfig, defineConfig, getActiveCheckerExtensions, getActiveCheckers, isStrictConfig, loadConfig, validateLiminaConfig };
|
package/config.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "./chunks/dep-lkQg1P9Q.js";
|
|
2
|
-
import { a as
|
|
2
|
+
import { a as loadConfig, i as isStrictConfig, n as getActiveCheckerExtensions, o as validateLiminaConfig, r as getActiveCheckers, t as defineConfig } from "./chunks/dep-CBKvJc4Y.js";
|
|
3
3
|
|
|
4
|
-
export { defineConfig, getActiveCheckerExtensions, getActiveCheckers, loadConfig, validateLiminaConfig };
|
|
4
|
+
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, PathsConfig, PipelineStep, ProofAllowlistEntry, ProofConfig, ResolvedCheckerConfig, ResolvedLiminaConfig, RuntimeEnvironment, SharedLiminaConfig, SourceBoundaryConfig, defineConfig, getActiveCheckerExtensions, getActiveCheckers, loadConfig, validateLiminaConfig } from "./config.js";
|
|
1
|
+
import { BuiltinCheckerPreset, BuiltinTaskName, CheckerConfig, CheckerExecutionKind, CheckerPreset, GraphConfig, GraphRule, GraphRuleAllowConfig, GraphRuleDenyConfig, GraphRuleDepDenyEntry, GraphRuleRefAllowEntry, GraphRuleRefDenyEntry, LiminaCommand, LiminaConfig, LiminaConfigEnv, LiminaConfigExport, LiminaConfigFn, LiminaConfigFnObject, LiminaConfigFnPromise, LoadConfigOptions, PackageAttwCheckConfig, PackageAttwProfile, PackageBoundaryCheckConfig, PackageCheckTool, PackageCheckToolSelection, PackageConfig, PackageEntry, PackagePublintCheckConfig, PathsConfig, PipelineStep, ProofAllowlistEntry, ProofConfig, ResolvedCheckerConfig, ResolvedLiminaConfig, RuntimeEnvironment, SharedLiminaConfig, SourceBoundaryConfig, SourceCheckConfig, SourceUnusedDependenciesConfig, SourceUnusedDependencyIgnoreEntry, 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 PathsConfig, type PipelineStep, type ProofAllowlistEntry, type ProofConfig, type ResolvedCheckerConfig, type ResolvedLiminaConfig, type RunCheckerBuildOptions, type RunCheckerBuildResult, type RunCheckerTypecheckOptions, type RunCheckerTypecheckResult, type RunInitOptions, type RunInitResult, type RunSourceCheckOptions, type RuntimeEnvironment, type SharedLiminaConfig, type SourceBoundaryConfig, type TypecheckRunner, type TypecheckTarget, type TypecheckTargetResult, createLiminaFlowReporter, defineConfig, getActiveCheckerExtensions, getActiveCheckers, isOrdinaryTypecheckConfigPath, loadConfig, runCheckerBuild, runCheckerTypecheck, runInit, runSourceCheck, validateLiminaConfig };
|
|
169
|
+
export { type BuiltinCheckerPreset, type BuiltinTaskName, type CheckerConfig, type CheckerExecutionKind, type CheckerPreset, 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 PackageAttwProfile, type PackageBoundaryCheckConfig, type PackageCheckTool, type PackageCheckToolSelection, type PackageConfig, type PackageEntry, type PackagePublintCheckConfig, type PathsConfig, 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 SourceUnusedDependenciesConfig, type SourceUnusedDependencyIgnoreEntry, 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,5 @@
|
|
|
1
1
|
import "./chunks/dep-lkQg1P9Q.js";
|
|
2
|
-
import { a as
|
|
3
|
-
import {
|
|
2
|
+
import { a as loadConfig, n as getActiveCheckerExtensions, o as validateLiminaConfig, r as getActiveCheckers, t as defineConfig } from "./chunks/dep-CBKvJc4Y.js";
|
|
3
|
+
import { V 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-DTGmTTL7.js";
|
|
4
4
|
|
|
5
|
-
export { LiminaFlowReporter, createLiminaFlowReporter, defineConfig, getActiveCheckerExtensions, getActiveCheckers, isOrdinaryTypecheckConfigPath, loadConfig, runCheckerBuild, runCheckerTypecheck, runInit, runSourceCheck, validateLiminaConfig };
|
|
5
|
+
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.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Senao Xi",
|
|
@@ -33,10 +33,16 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@arethetypeswrong/core": "^0.18.2",
|
|
35
35
|
"@clack/prompts": "^1.4.0",
|
|
36
|
-
"logaria": "0.0.
|
|
36
|
+
"logaria": "0.0.3",
|
|
37
37
|
"@publint/pack": "^0.1.4",
|
|
38
38
|
"cac": "^6.7.14",
|
|
39
39
|
"es-module-lexer": "^2.0.0",
|
|
40
|
+
"knip": "^6.15.0",
|
|
41
|
+
"npm-package-json-lint": "^9.1.0",
|
|
42
|
+
"oxc-parser": "^0.133.0",
|
|
43
|
+
"oxc-resolver": "^11.20.0",
|
|
44
|
+
"pathe": "^2.0.3",
|
|
45
|
+
"picomatch": "^4.0.4",
|
|
40
46
|
"publint": "^0.3.17",
|
|
41
47
|
"semver": "^7.8.1",
|
|
42
48
|
"tinyglobby": "^0.2.15",
|
|
@@ -44,12 +50,17 @@
|
|
|
44
50
|
"zod": "^4.3.6"
|
|
45
51
|
},
|
|
46
52
|
"peerDependencies": {
|
|
53
|
+
"@typescript/native-preview": "7.0.0-dev.20260527.1",
|
|
47
54
|
"@vue/compiler-sfc": "^3.5.28",
|
|
48
55
|
"svelte-check": "^4.4.7",
|
|
49
56
|
"typescript": "~5.9.3",
|
|
50
|
-
"vue-tsc": "~3.2.4"
|
|
57
|
+
"vue-tsc": "~3.2.4",
|
|
58
|
+
"vue-tsgo": "0.2.2"
|
|
51
59
|
},
|
|
52
60
|
"peerDependenciesMeta": {
|
|
61
|
+
"@typescript/native-preview": {
|
|
62
|
+
"optional": true
|
|
63
|
+
},
|
|
53
64
|
"@vue/compiler-sfc": {
|
|
54
65
|
"optional": true
|
|
55
66
|
},
|
|
@@ -61,12 +72,16 @@
|
|
|
61
72
|
},
|
|
62
73
|
"vue-tsc": {
|
|
63
74
|
"optional": true
|
|
75
|
+
},
|
|
76
|
+
"vue-tsgo": {
|
|
77
|
+
"optional": true
|
|
64
78
|
}
|
|
65
79
|
},
|
|
66
80
|
"types": "./index.d.ts",
|
|
67
81
|
"exports": {
|
|
68
82
|
".": "./index.js",
|
|
69
83
|
"./config": "./config.js",
|
|
84
|
+
"./schemas/tsconfig-schema.json": "./schemas/tsconfig-schema.json",
|
|
70
85
|
"./package.json": "./package.json"
|
|
71
86
|
},
|
|
72
87
|
"sideEffects": false
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
3
|
+
"id": "https://docs.senao.me/docs-islands/limina/schemas/tsconfig-schema.json",
|
|
4
|
+
"title": "Limina TypeScript Configuration",
|
|
5
|
+
"description": "TypeScript tsconfig.json with Limina graph governance options.",
|
|
6
|
+
"allowTrailingCommas": true,
|
|
7
|
+
"allOf": [
|
|
8
|
+
{
|
|
9
|
+
"$ref": "https://json.schemastore.org/tsconfig"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"type": "object",
|
|
13
|
+
"properties": {
|
|
14
|
+
"liminaOptions": {
|
|
15
|
+
"$ref": "#/definitions/liminaOptions"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"definitions": {
|
|
21
|
+
"nonEmptyString": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"minLength": 1,
|
|
24
|
+
"pattern": "\\S"
|
|
25
|
+
},
|
|
26
|
+
"liminaOptions": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"description": "Limina-specific options for this TypeScript project.",
|
|
29
|
+
"additionalProperties": true,
|
|
30
|
+
"properties": {
|
|
31
|
+
"graphRules": {
|
|
32
|
+
"type": "array",
|
|
33
|
+
"description": "Graph rule labels from limina.config.mjs#graph.rules that apply to this declaration leaf.",
|
|
34
|
+
"uniqueItems": true,
|
|
35
|
+
"items": {
|
|
36
|
+
"$ref": "#/definitions/nonEmptyString"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|