limina 0.0.1 → 0.0.3
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 +21 -0
- package/README.md +383 -0
- package/bin/limina.js +0 -0
- package/chunks/{dep-jgc7X0zw.js → dep-DzYrmtQJ.js} +32 -49
- package/chunks/{dep-DoSHsBSP.js → dep-UWxsul2A.js} +827 -453
- package/cli.js +667 -229
- package/config.d.ts +8 -48
- package/config.js +1 -1
- package/index.d.ts +25 -20
- package/index.js +3 -3
- package/package.json +19 -2
package/config.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ type PipelineStep = string | {
|
|
|
57
57
|
*/
|
|
58
58
|
type BuiltinTaskName = "checker:build" | "checker:typecheck" | "graph:check" | "package:check" | "proof:check" | "source:check";
|
|
59
59
|
type BuiltinCheckerPreset = "svelte-check" | "tsc" | "vue-tsc";
|
|
60
|
-
type CheckerPreset = BuiltinCheckerPreset
|
|
60
|
+
type CheckerPreset = BuiltinCheckerPreset;
|
|
61
61
|
type CheckerExecutionKind = "build" | "typecheck";
|
|
62
62
|
/**
|
|
63
63
|
* Checker capability for one source module family.
|
|
@@ -71,12 +71,6 @@ interface CheckerConfig {
|
|
|
71
71
|
* Checker entry project used by both build and typecheck execution modes.
|
|
72
72
|
*/
|
|
73
73
|
entry: string;
|
|
74
|
-
/**
|
|
75
|
-
* Source file suffixes covered by this checker.
|
|
76
|
-
*
|
|
77
|
-
* Built-in presets may omit this and use their default suffixes.
|
|
78
|
-
*/
|
|
79
|
-
extensions?: string[];
|
|
80
74
|
}
|
|
81
75
|
interface ResolvedCheckerConfig {
|
|
82
76
|
entry: string;
|
|
@@ -173,39 +167,14 @@ interface GraphRuleRefDenyEntry {
|
|
|
173
167
|
reason: string;
|
|
174
168
|
}
|
|
175
169
|
/**
|
|
176
|
-
*
|
|
170
|
+
* Dependency denied to projects with a matching Limina label.
|
|
177
171
|
*/
|
|
178
172
|
interface GraphRuleDepDenyEntry {
|
|
179
173
|
/**
|
|
180
|
-
* Target
|
|
174
|
+
* Target package root, package.json imports specifier, or Node builtin name.
|
|
181
175
|
*
|
|
182
|
-
*
|
|
183
|
-
|
|
184
|
-
name: string;
|
|
185
|
-
/**
|
|
186
|
-
* Human-readable explanation shown when the rule fails.
|
|
187
|
-
*/
|
|
188
|
-
reason: string;
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* Workspace package dependency denied to projects with a matching Limina label.
|
|
192
|
-
*/
|
|
193
|
-
interface GraphRuleWorkspaceDepDenyEntry {
|
|
194
|
-
/**
|
|
195
|
-
* Target workspace package name.
|
|
196
|
-
*/
|
|
197
|
-
name: string;
|
|
198
|
-
/**
|
|
199
|
-
* Human-readable explanation shown when the rule fails.
|
|
200
|
-
*/
|
|
201
|
-
reason: string;
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* Node builtin denied to source files with a matching Limina label.
|
|
205
|
-
*/
|
|
206
|
-
interface GraphRuleNodeBuiltinDenyEntry {
|
|
207
|
-
/**
|
|
208
|
-
* Target Node builtin name, such as `fs`, `node:fs`, or `node:*`.
|
|
176
|
+
* Examples: `@acme/internal`, `zod`, `#internal/*`, `fs`, `node:fs`,
|
|
177
|
+
* or `node:*`.
|
|
209
178
|
*/
|
|
210
179
|
name: string;
|
|
211
180
|
/**
|
|
@@ -222,19 +191,10 @@ interface GraphRuleDenyConfig {
|
|
|
222
191
|
*/
|
|
223
192
|
refs?: GraphRuleRefDenyEntry[];
|
|
224
193
|
/**
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
* @deprecated Use `workspaceDeps` for new configs.
|
|
194
|
+
* Packages, package imports, and Node builtins that matching projects must
|
|
195
|
+
* not reference or import.
|
|
228
196
|
*/
|
|
229
197
|
deps?: GraphRuleDepDenyEntry[];
|
|
230
|
-
/**
|
|
231
|
-
* Node builtins that matching projects must not import.
|
|
232
|
-
*/
|
|
233
|
-
nodeBuiltins?: GraphRuleNodeBuiltinDenyEntry[];
|
|
234
|
-
/**
|
|
235
|
-
* Workspace packages that matching projects must not reference or import.
|
|
236
|
-
*/
|
|
237
|
-
workspaceDeps?: GraphRuleWorkspaceDepDenyEntry[];
|
|
238
198
|
}
|
|
239
199
|
/**
|
|
240
200
|
* Package-level graph governance rule keyed by a label declared in
|
|
@@ -480,4 +440,4 @@ interface LoadConfigOptions {
|
|
|
480
440
|
}
|
|
481
441
|
declare function loadConfig(options?: LoadConfigOptions): Promise<ResolvedLiminaConfig>;
|
|
482
442
|
//#endregion
|
|
483
|
-
export { BuiltinCheckerPreset, BuiltinTaskName, CheckerConfig, CheckerExecutionKind, CheckerPreset, GraphConfig, GraphRule, GraphRuleDenyConfig, GraphRuleDepDenyEntry,
|
|
443
|
+
export { BuiltinCheckerPreset, BuiltinTaskName, CheckerConfig, CheckerExecutionKind, CheckerPreset, GraphConfig, GraphRule, GraphRuleDenyConfig, GraphRuleDepDenyEntry, GraphRuleRefDenyEntry, LiminaCommand, LiminaConfig, LiminaConfigEnv, LiminaConfigExport, LiminaConfigFn, LiminaConfigFnObject, LiminaConfigFnPromise, LoadConfigOptions, PackageAttwCheckConfig, PackageAttwProfile, PackageBoundaryCheckConfig, PackageCheckTarget, PackageCheckTool, PackageCheckToolSelection, PackageChecksConfig, PackagePublintCheckConfig, PathsConfig, PipelineStep, ProofAllowlistEntry, ProofConfig, ResolvedCheckerConfig, ResolvedLiminaConfig, RuntimeEnvironment, SharedLiminaConfig, SourceBoundaryConfig, defineConfig, getActiveCheckerExtensions, getActiveCheckers, loadConfig, validateLiminaConfig };
|
package/config.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "./chunks/dep-lkQg1P9Q.js";
|
|
2
|
-
import { a as validateLiminaConfig, i as loadConfig, n as getActiveCheckerExtensions, r as getActiveCheckers, t as defineConfig } from "./chunks/dep-
|
|
2
|
+
import { a as validateLiminaConfig, i as loadConfig, n as getActiveCheckerExtensions, r as getActiveCheckers, t as defineConfig } from "./chunks/dep-DzYrmtQJ.js";
|
|
3
3
|
|
|
4
4
|
export { defineConfig, getActiveCheckerExtensions, getActiveCheckers, loadConfig, validateLiminaConfig };
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuiltinCheckerPreset, BuiltinTaskName, CheckerConfig, CheckerExecutionKind, CheckerPreset, GraphConfig, GraphRule, GraphRuleDenyConfig, GraphRuleDepDenyEntry,
|
|
1
|
+
import { BuiltinCheckerPreset, BuiltinTaskName, CheckerConfig, CheckerExecutionKind, CheckerPreset, GraphConfig, GraphRule, GraphRuleDenyConfig, GraphRuleDepDenyEntry, GraphRuleRefDenyEntry, LiminaCommand, LiminaConfig, LiminaConfigEnv, LiminaConfigExport, LiminaConfigFn, LiminaConfigFnObject, LiminaConfigFnPromise, LoadConfigOptions, PackageAttwCheckConfig, PackageAttwProfile, PackageBoundaryCheckConfig, PackageCheckTarget, PackageCheckTool, PackageCheckToolSelection, PackageChecksConfig, PackagePublintCheckConfig, PathsConfig, PipelineStep, ProofAllowlistEntry, ProofConfig, ResolvedCheckerConfig, ResolvedLiminaConfig, RuntimeEnvironment, SharedLiminaConfig, SourceBoundaryConfig, 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,24 @@ declare class LiminaFlowReporter {
|
|
|
62
62
|
}
|
|
63
63
|
declare function createLiminaFlowReporter(options?: LiminaFlowReporterOptions): LiminaFlowReporter;
|
|
64
64
|
//#endregion
|
|
65
|
+
//#region src/commands/init.d.ts
|
|
66
|
+
interface RunInitOptions {
|
|
67
|
+
clearScreen?: boolean;
|
|
68
|
+
cwd?: string;
|
|
69
|
+
flow?: LiminaFlowReporter;
|
|
70
|
+
flowDepth?: number;
|
|
71
|
+
yes?: boolean;
|
|
72
|
+
}
|
|
73
|
+
interface RunInitResult {
|
|
74
|
+
checkCommand: string;
|
|
75
|
+
installRequired: boolean;
|
|
76
|
+
rootDir: string;
|
|
77
|
+
skippedFiles: string[];
|
|
78
|
+
workspacePackageCount: number;
|
|
79
|
+
writtenFiles: string[];
|
|
80
|
+
}
|
|
81
|
+
declare function runInit(options?: RunInitOptions): Promise<RunInitResult>;
|
|
82
|
+
//#endregion
|
|
65
83
|
//#region src/commands/source.d.ts
|
|
66
84
|
interface RunSourceCheckOptions {
|
|
67
85
|
clearScreen?: boolean;
|
|
@@ -92,10 +110,9 @@ interface TypecheckTargetResult {
|
|
|
92
110
|
status: number;
|
|
93
111
|
}
|
|
94
112
|
type TypecheckRunner = (target: TypecheckTarget) => Promise<TypecheckTargetResult> | TypecheckTargetResult;
|
|
95
|
-
interface
|
|
113
|
+
interface RunCheckerBuildOptions {
|
|
96
114
|
clearScreen?: boolean;
|
|
97
115
|
config: ResolvedLiminaConfig;
|
|
98
|
-
concurrency?: number;
|
|
99
116
|
cwd?: string;
|
|
100
117
|
flow?: LiminaFlowReporter;
|
|
101
118
|
flowDepth?: number;
|
|
@@ -103,15 +120,12 @@ interface RunCheckerTypecheckOptions {
|
|
|
103
120
|
runner?: TypecheckRunner;
|
|
104
121
|
tscCommand?: string;
|
|
105
122
|
}
|
|
106
|
-
interface
|
|
123
|
+
interface RunCheckerBuildResult {
|
|
107
124
|
passed: boolean;
|
|
108
125
|
projectRootDir: string;
|
|
109
|
-
results: TypecheckTargetResult[];
|
|
110
126
|
rootConfigPaths: string[];
|
|
111
|
-
targetProjectPaths: string[];
|
|
112
127
|
}
|
|
113
|
-
|
|
114
|
-
interface RunCheckerBuildOptions {
|
|
128
|
+
interface RunCheckerTypecheckOptions {
|
|
115
129
|
clearScreen?: boolean;
|
|
116
130
|
config: ResolvedLiminaConfig;
|
|
117
131
|
cwd?: string;
|
|
@@ -121,24 +135,15 @@ interface RunCheckerBuildOptions {
|
|
|
121
135
|
runner?: TypecheckRunner;
|
|
122
136
|
tscCommand?: string;
|
|
123
137
|
}
|
|
124
|
-
interface
|
|
138
|
+
interface RunCheckerTypecheckResult {
|
|
125
139
|
passed: boolean;
|
|
126
140
|
projectRootDir: string;
|
|
127
141
|
rootConfigPaths: string[];
|
|
128
142
|
}
|
|
129
143
|
declare function runCheckerBuild(options: RunCheckerBuildOptions): Promise<RunCheckerBuildResult>;
|
|
144
|
+
declare function runCheckerTypecheck(options: RunCheckerTypecheckOptions): Promise<RunCheckerTypecheckResult>;
|
|
130
145
|
//#endregion
|
|
131
146
|
//#region src/tsconfig.d.ts
|
|
132
|
-
interface CollectTypecheckTargetProjectPathsOptions {
|
|
133
|
-
rootConfigPath: string;
|
|
134
|
-
rootDir: string;
|
|
135
|
-
}
|
|
136
|
-
interface CollectTypecheckTargetProjectPathsResult {
|
|
137
|
-
problems: string[];
|
|
138
|
-
projectPaths: string[];
|
|
139
|
-
targetProjectPaths: string[];
|
|
140
|
-
}
|
|
141
147
|
declare function isOrdinaryTypecheckConfigPath(configPath: string): boolean;
|
|
142
|
-
declare function collectTypecheckTargetProjectPaths(options: CollectTypecheckTargetProjectPathsOptions): CollectTypecheckTargetProjectPathsResult;
|
|
143
148
|
//#endregion
|
|
144
|
-
export { type BuiltinCheckerPreset, type BuiltinTaskName, type CheckerConfig, type CheckerExecutionKind, type CheckerPreset, type
|
|
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 PackageCheckTarget, type PackageCheckTool, type PackageCheckToolSelection, type PackageChecksConfig, 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 };
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./chunks/dep-lkQg1P9Q.js";
|
|
2
|
-
import { a as validateLiminaConfig, i as loadConfig, n as getActiveCheckerExtensions, r as getActiveCheckers, t as defineConfig } from "./chunks/dep-
|
|
3
|
-
import {
|
|
2
|
+
import { a as validateLiminaConfig, i as loadConfig, n as getActiveCheckerExtensions, r as getActiveCheckers, t as defineConfig } from "./chunks/dep-DzYrmtQJ.js";
|
|
3
|
+
import { J as isOrdinaryTypecheckConfigPath, a as runSourceCheck, i as runCheckerTypecheck, n as createLiminaFlowReporter, o as runInit, r as runCheckerBuild, t as LiminaFlowReporter } from "./chunks/dep-UWxsul2A.js";
|
|
4
4
|
|
|
5
|
-
export { LiminaFlowReporter,
|
|
5
|
+
export { LiminaFlowReporter, createLiminaFlowReporter, defineConfig, getActiveCheckerExtensions, getActiveCheckers, isOrdinaryTypecheckConfigPath, loadConfig, runCheckerBuild, runCheckerTypecheck, 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.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Senao Xi",
|
|
@@ -15,27 +15,44 @@
|
|
|
15
15
|
"engines": {
|
|
16
16
|
"node": "^20.19.0 || >=22.12.0"
|
|
17
17
|
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/XiSenao/docs-islands.git",
|
|
21
|
+
"directory": "packages/limina"
|
|
22
|
+
},
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/XiSenao/docs-islands/issues"
|
|
25
|
+
},
|
|
26
|
+
"homepage": "https://docs.senao.me/docs-islands",
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public"
|
|
29
|
+
},
|
|
18
30
|
"bin": {
|
|
19
31
|
"limina": "./bin/limina.js"
|
|
20
32
|
},
|
|
21
33
|
"dependencies": {
|
|
22
34
|
"@arethetypeswrong/core": "^0.18.2",
|
|
23
35
|
"@clack/prompts": "^1.4.0",
|
|
24
|
-
"
|
|
36
|
+
"logaria": "0.0.2",
|
|
25
37
|
"@publint/pack": "^0.1.4",
|
|
26
38
|
"cac": "^6.7.14",
|
|
27
39
|
"es-module-lexer": "^2.0.0",
|
|
28
40
|
"publint": "^0.3.17",
|
|
41
|
+
"semver": "^7.8.1",
|
|
29
42
|
"tinyglobby": "^0.2.15",
|
|
30
43
|
"yaml": "^2.8.3",
|
|
31
44
|
"zod": "^4.3.6"
|
|
32
45
|
},
|
|
33
46
|
"peerDependencies": {
|
|
47
|
+
"@vue/compiler-sfc": "^3.5.28",
|
|
34
48
|
"svelte-check": "^4.4.7",
|
|
35
49
|
"typescript": "~5.9.3",
|
|
36
50
|
"vue-tsc": "~3.2.4"
|
|
37
51
|
},
|
|
38
52
|
"peerDependenciesMeta": {
|
|
53
|
+
"@vue/compiler-sfc": {
|
|
54
|
+
"optional": true
|
|
55
|
+
},
|
|
39
56
|
"svelte-check": {
|
|
40
57
|
"optional": true
|
|
41
58
|
},
|