@nudojs/service 5.0.0-beta.0 → 5.0.0-beta.1

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/dist/harvest.d.ts DELETED
@@ -1,254 +0,0 @@
1
- import { HarvestedEnv } from '@nudojs/harvester';
2
- import { Abs, AbsModuleExports } from '@nudojs/core';
3
-
4
- /**
5
- * Host:从 npm 包 / @types 收集 .d.ts → harvestDts。
6
- * 代数不碰 fs;这里只做「找到 dts 路径」这一层宿主职责。
7
- */
8
-
9
- /** 在 node_modules 中解析包根(含 @types/*) */
10
- declare function resolvePackageRoot(pkg: string, fromDir?: string): string | undefined;
11
- type PackageHarvest = {
12
- pkg: string;
13
- root: string;
14
- dtsFiles: string[];
15
- env: HarvestedEnv;
16
- };
17
- /**
18
- * 从入口 .d.ts 沿 reference path / 相对 import 做 BFS 收集。
19
- * 适合 @types 包(三斜线引用图);比整树 walk 更贴声明入口。
20
- */
21
- declare function collectDtsFromEntry(entry: string, maxFiles?: number): string[];
22
- /** harvest 一个 npm 包(或 @types 包) */
23
- declare function harvestPackage(pkg: string, fromDir?: string, maxFiles?: number): PackageHarvest | {
24
- error: string;
25
- };
26
- /** harvest 结果 → 人类可读导出表 */
27
- declare function formatHarvestSummary(h: PackageHarvest): string;
28
- /** 取某个导出的展示串(formatShape) */
29
- declare function lookupHarvested(h: PackageHarvest, moduleName: string, exportName: string): string | undefined;
30
-
31
- /**
32
- * harvest 自动化:源码裸 import → @types/package → env modules。
33
- * 手动 `nudo harvest` 仍保留;这里是分析路径上的按需注入。
34
- */
35
-
36
- /** 裸说明符 → 包名(含 scope);相对/绝对/node: 与裸 Node 内建返回 undefined */
37
- declare function barePackageName(spec: string): string | undefined;
38
- declare function collectBarePackages(source: string): string[];
39
- /** 测试/诊断:当前条目数(≤ HARVEST_CACHE_MAX) */
40
- declare function getHarvestCacheSize(): number;
41
- declare function harvestPackageCached(pkg: string, fromDir: string): PackageHarvest | null;
42
- declare function clearHarvestCache(): void;
43
- /**
44
- * 自动 harvest 源码中全部裸包(有 @types 或包内 dts 时)。
45
- * 返回可注入 setEnvModules 的 modules 表;无包可 harvest 时为空对象。
46
- */
47
- declare function autoHarvestModules(source: string, fromDir: string): Record<string, Record<string, Abs>>;
48
-
49
- /**
50
- * HarvestJson:L2 harvest 磁盘投影(design-persistent-cache)。
51
- * 纯 JSON 签名投影——不存 Abs 本体;读回 materialize 为 mock Abs 导出表。
52
- * fail-open:未知节点 / 损坏 JSON → undefined(miss,不 throw)。
53
- */
54
-
55
- /** 签名投影节点(可 JSON 化;足够 mock Abs 的 shape 面) */
56
- type HarvestSig = {
57
- k: "prim";
58
- type: string;
59
- } | {
60
- k: "unknown";
61
- } | {
62
- k: "any";
63
- } | {
64
- k: "never";
65
- } | {
66
- k: "lit";
67
- value: number | string | boolean | null;
68
- } | {
69
- k: "arr";
70
- element: HarvestSig;
71
- } | {
72
- k: "tuple";
73
- elements: HarvestSig[];
74
- } | {
75
- k: "obj";
76
- slots: Record<string, {
77
- v: HarvestSig;
78
- opt?: boolean;
79
- }>;
80
- } | {
81
- k: "fn";
82
- params: string[];
83
- paramTypes: HarvestSig[];
84
- returns: HarvestSig;
85
- } | {
86
- k: "sum";
87
- members: HarvestSig[];
88
- } | {
89
- k: "promise";
90
- value: HarvestSig;
91
- } | {
92
- k: "generator";
93
- value: HarvestSig;
94
- } | {
95
- k: "brand";
96
- name: string;
97
- shape: HarvestSig;
98
- }
99
- /** 泛型形参(T)——α 替换用 */
100
- | {
101
- k: "tvar";
102
- name: string;
103
- };
104
- type HarvestJson = {
105
- v: 1;
106
- pkg: string;
107
- pkgVersion?: string;
108
- /** harvest 旋钮(maxFiles 等)进键 */
109
- knobs: {
110
- maxFiles: number;
111
- abi: string;
112
- };
113
- /** 全部 dts 内容 sha256(不只入口) */
114
- dtsHash: string;
115
- modules: Record<string, Record<string, HarvestSig>>;
116
- globals: Record<string, HarvestSig>;
117
- stats: {
118
- files: number;
119
- symbols: number;
120
- skipped: number;
121
- };
122
- };
123
- /** Abs → 签名投影(丢 pred/conf;fn 只留参数名+类型面;保留泛型 α) */
124
- declare function absToHarvestSig(a: Abs): HarvestSig;
125
- /** 签名投影 → mock Abs(conf 合 mock) */
126
- declare function harvestSigToAbs(sig: HarvestSig): Abs;
127
- declare function serializeHarvestJson(pkg: string, env: HarvestedEnv, meta: {
128
- dtsHash: string;
129
- maxFiles: number;
130
- pkgVersion?: string;
131
- }): HarvestJson;
132
- /** HarvestJson → mock Abs 导出表(materialize);损坏/版本不符 → null */
133
- declare function materializeHarvestJson(j: unknown): HarvestedEnv | null;
134
- /** L2 键:pkg + version + knobs + dtsClosureHash(相对化;content-addressable) */
135
- declare function harvestCacheKey(pkg: string, meta: {
136
- dtsHash: string;
137
- maxFiles: number;
138
- pkgVersion?: string;
139
- }): string;
140
-
141
- /**
142
- * L2 harvest 磁盘层(design-persistent-cache):HarvestJson 跨会话复用。
143
- * 布局:`~/.cache/nudo/deps/`(或 NUDO_DEPS_CACHE_DIR)。
144
- * 键:harvestCacheKey(pkg, version, knobs, dtsClosureHash)。
145
- * fail-open:读写失败 → 回落进程内 harvest(L0)。
146
- */
147
-
148
- /** 依赖包层缓存根(跨项目);off/0 关闭 */
149
- declare function depsCacheRoot(): string | undefined;
150
- /** dts 闭包内容哈希(覆盖每个实际读到的文件,不只入口) */
151
- declare function dtsClosureHash(files: string[]): string;
152
- declare function readHarvestDisk(root: string, key: string): HarvestJson | undefined;
153
- declare function writeHarvestDisk(root: string, key: string, value: HarvestJson): void;
154
- /**
155
- * L2 + L0:**磁盘优先**(跳过 harvestDts 解析),miss 再 harvest 并写盘。
156
- */
157
- declare function harvestPackageWithDisk(pkg: string, fromDir: string, maxFiles?: number): PackageHarvest | null;
158
- /** 从磁盘 materialize(不跑 harvestDts);键需调用方自算 */
159
- declare function loadHarvestEnvFromDisk(pkg: string, meta: {
160
- dtsHash: string;
161
- maxFiles: number;
162
- pkgVersion?: string;
163
- }): HarvestedEnv | null;
164
-
165
- /**
166
- * Harvest Abs 导出 → AbsModuleExports(供 Abs 模块图注入)。
167
- * harvest 产物已是 Abs;fn 槽 apply 直接返回声明返回类型(conf=mock)。
168
- */
169
-
170
- /** 单个 Abs 导出 → 可调用 mock(fn 槽按 relation α 替换,或返回声明返回类型) */
171
- declare function harvestedValueToAbs(a: Abs): Abs;
172
- /**
173
- * 把 harvest 的 modules/globals 合成 AbsModuleExports。
174
- * 键同时登记:原始模块路径、包名、basename(path / @types/path)。
175
- */
176
- declare function harvestToAbsModules(pkg: string, fromDir: string): Record<string, AbsModuleExports>;
177
- declare function packageHarvestToAbsModules(pkg: string, h: PackageHarvest): Record<string, AbsModuleExports>;
178
- /** 裸说明符 → Abs 导出表(走 harvest 缓存) */
179
- declare function bareSpecToAbsModules(spec: string, fromFile: string): AbsModuleExports | undefined;
180
-
181
- /**
182
- * 预置 Node API env:从 @types/node 的 .d.ts harvest。
183
- * 与 packages/env 的手写 env 并行;此路径自动、可刷新。
184
- *
185
- * Productization (P0-B B2/B7):
186
- * - In-process cache keyed by package root + package.json mtime/size.
187
- * - **Disk cache** (HarvestJson under `~/.cache/nudo/deps`) — cross-session reuse.
188
- * - Terminal failures (`not-found`/`no-dts`/`failed`) also cache — no retry storm.
189
- * `disabled` is never cached (env var can flip mid-process).
190
- * - **Degrade chain**: harvest miss/fail → handwritten `@nudojs/env` node face
191
- * (`loadEnvs(["node"])`), flagged `degraded`. Handwritten still wins on overlap
192
- * via `mergeHarvestUnderEnv`.
193
- * - `clearNodeHarvestCache()` for tests / watch invalidation.
194
- * - `NUDO_HARVEST_NODE=off` disables harvest (explicit skip, not silent).
195
- * - Defaults stay IDE-budgeted: maxFiles=12, maxMs=2500.
196
- */
197
-
198
- /** IDE-startup budgets for @types/node harvest. Do not raise casually. */
199
- declare const HARVEST_NODE_DEFAULT_MAX_FILES = 12;
200
- declare const HARVEST_NODE_DEFAULT_MAX_MS = 2500;
201
- type HarvestNodeStats = {
202
- files: number;
203
- symbols: number;
204
- skipped: number;
205
- };
206
- type NodeEnvResult = {
207
- ok: true;
208
- env: HarvestedEnv;
209
- root: string;
210
- files: number;
211
- stats: HarvestNodeStats;
212
- /** true when this result came from the in-process cache */
213
- cached: boolean;
214
- /** true when this result is handwritten `@nudojs/env` fallback (harvest miss/fail) */
215
- degraded?: boolean;
216
- } | {
217
- ok: false;
218
- error: string;
219
- reason: "disabled" | "not-found" | "no-dts" | "failed";
220
- /** true when this failure came from the in-process cache */
221
- cached?: boolean;
222
- };
223
- /**
224
- * Clear the in-process @types/node harvest cache.
225
- * Drops **success and terminal-failure** entries (including `not-found`), so
226
- * a mid-session `@types/node` install becomes visible without process restart.
227
- * Tests, watch-mode dep-hash invalidation, and package-manager hooks should
228
- * call this when `node_modules/@types/node` changes underneath the process.
229
- */
230
- declare function clearNodeHarvestCache(): void;
231
- /** Number of cached harvest results (diagnostics / tests). */
232
- declare function getNodeHarvestCacheSize(): number;
233
- declare function isHarvestNodeDisabled(env?: NodeJS.ProcessEnv): boolean;
234
- /**
235
- * 手写 `@nudojs/env` node 面(B2 降级链):harvest 未命中/失败时仍给出
236
- * 可分析的 Node API 声明;与 harvest 重叠处由 mergeHarvestUnderEnv 让手写 wins。
237
- */
238
- declare function handwrittenNodeEnv(): HarvestedEnv | null;
239
- /**
240
- * harvest @types/node(限制文件数 + 时间预算,避免拖垮启动)。
241
- * Success **and** terminal failures (`not-found` / `no-dts` / `failed`) are
242
- * cached in-process so IDE analysis does not re-walk / re-timeout every file.
243
- * `disabled` is never cached — the env var can flip mid-process.
244
- * Call `clearNodeHarvestCache()` after `@types/node` changes.
245
- */
246
- declare function harvestNodeTypes(fromDir?: string, maxFiles?: number, maxMs?: number): NodeEnvResult;
247
- /** 把 harvest 结果压成「模块名 → 导出名列表」摘要,便于日志/测试 */
248
- declare function summarizeNodeEnv(env: HarvestedEnv): {
249
- modules: string[];
250
- globals: string[];
251
- symbolCount: number;
252
- };
253
-
254
- export { HARVEST_NODE_DEFAULT_MAX_FILES, HARVEST_NODE_DEFAULT_MAX_MS, type HarvestJson, type HarvestNodeStats, type HarvestSig, type NodeEnvResult, type PackageHarvest, absToHarvestSig, autoHarvestModules, barePackageName, bareSpecToAbsModules, clearHarvestCache, clearNodeHarvestCache, collectBarePackages, collectDtsFromEntry, depsCacheRoot, dtsClosureHash, formatHarvestSummary, getHarvestCacheSize, getNodeHarvestCacheSize, handwrittenNodeEnv, harvestCacheKey, harvestNodeTypes, harvestPackage, harvestPackageCached, harvestPackageWithDisk, harvestSigToAbs, harvestToAbsModules, harvestedValueToAbs, isHarvestNodeDisabled, loadHarvestEnvFromDisk, lookupHarvested, materializeHarvestJson, packageHarvestToAbsModules, readHarvestDisk, resolvePackageRoot, serializeHarvestJson, summarizeNodeEnv, writeHarvestDisk };
package/dist/harvest.js DELETED
@@ -1,75 +0,0 @@
1
- import {
2
- HARVEST_NODE_DEFAULT_MAX_FILES,
3
- HARVEST_NODE_DEFAULT_MAX_MS,
4
- clearNodeHarvestCache,
5
- getNodeHarvestCacheSize,
6
- handwrittenNodeEnv,
7
- harvestNodeTypes,
8
- isHarvestNodeDisabled,
9
- summarizeNodeEnv
10
- } from "./chunk-K3ZPOTP2.js";
11
- import {
12
- absToHarvestSig,
13
- autoHarvestModules,
14
- barePackageName,
15
- bareSpecToAbsModules,
16
- clearHarvestCache,
17
- collectBarePackages,
18
- collectDtsFromEntry,
19
- depsCacheRoot,
20
- dtsClosureHash,
21
- formatHarvestSummary,
22
- getHarvestCacheSize,
23
- harvestCacheKey,
24
- harvestPackage,
25
- harvestPackageCached,
26
- harvestPackageWithDisk,
27
- harvestSigToAbs,
28
- harvestToAbsModules,
29
- harvestedValueToAbs,
30
- loadHarvestEnvFromDisk,
31
- lookupHarvested,
32
- materializeHarvestJson,
33
- packageHarvestToAbsModules,
34
- readHarvestDisk,
35
- resolvePackageRoot,
36
- serializeHarvestJson,
37
- writeHarvestDisk
38
- } from "./chunk-U7JYTRIB.js";
39
- import "./chunk-PVJIMQRI.js";
40
- export {
41
- HARVEST_NODE_DEFAULT_MAX_FILES,
42
- HARVEST_NODE_DEFAULT_MAX_MS,
43
- absToHarvestSig,
44
- autoHarvestModules,
45
- barePackageName,
46
- bareSpecToAbsModules,
47
- clearHarvestCache,
48
- clearNodeHarvestCache,
49
- collectBarePackages,
50
- collectDtsFromEntry,
51
- depsCacheRoot,
52
- dtsClosureHash,
53
- formatHarvestSummary,
54
- getHarvestCacheSize,
55
- getNodeHarvestCacheSize,
56
- handwrittenNodeEnv,
57
- harvestCacheKey,
58
- harvestNodeTypes,
59
- harvestPackage,
60
- harvestPackageCached,
61
- harvestPackageWithDisk,
62
- harvestSigToAbs,
63
- harvestToAbsModules,
64
- harvestedValueToAbs,
65
- isHarvestNodeDisabled,
66
- loadHarvestEnvFromDisk,
67
- lookupHarvested,
68
- materializeHarvestJson,
69
- packageHarvestToAbsModules,
70
- readHarvestDisk,
71
- resolvePackageRoot,
72
- serializeHarvestJson,
73
- summarizeNodeEnv,
74
- writeHarvestDisk
75
- };
@@ -1,3 +0,0 @@
1
- export { C as ConstraintSourceExpr, D as DerivedExport, a as DerivedParam, b as DraftEvidence, E as EmitDerivedResult, c as EmitInterfaceOpts, d as EmitInterfaceResult, e as EmitInterfaceSkipReason, I as InterfaceDraftEntry, f as InterfaceDraftOpts, g as InterfaceDraftResult, h as InterfaceSurfaceEntry, i as InterfaceSurfaceOpts, R as RootDeriveOpts, j as RootDeriveResult, T as TypeBinding, W as WriteDraftResult, k as collectParamBodyAccesses, m as deriveFromRoot, n as draftInterface, o as emitDerivedFromRoot, p as emitInterface, q as extractFnConstraintSources, r as formatDerivedSection, s as formatDraftModule, t as formatDraftSummary, u as formatEmitSummary, v as formatInterfaceSurfaceLine, w as injectBindings, x as interfaceSurface, y as isDraftableEntry, z as sidecarDraftPath, A as typeExprToDirective, B as writeInterfaceDraft } from './interface-BGlP7aIk.js';
2
- import './call-record-CkyCFkT9.js';
3
- import '@nudojs/core';
package/dist/interface.js DELETED
@@ -1,43 +0,0 @@
1
- import {
2
- collectParamBodyAccesses,
3
- deriveFromRoot,
4
- draftInterface,
5
- emitDerivedFromRoot,
6
- emitInterface,
7
- extractFnConstraintSources,
8
- formatDerivedSection,
9
- formatDraftModule,
10
- formatDraftSummary,
11
- formatEmitSummary,
12
- formatInterfaceSurfaceLine,
13
- injectBindings,
14
- interfaceSurface,
15
- isDraftableEntry,
16
- sidecarDraftPath,
17
- typeExprToDirective,
18
- writeInterfaceDraft
19
- } from "./chunk-HEU4WON5.js";
20
- import "./chunk-YLVZMHWC.js";
21
- import "./chunk-QAFMPM2E.js";
22
- import "./chunk-U7JYTRIB.js";
23
- import "./chunk-YLALZXTZ.js";
24
- import "./chunk-PVJIMQRI.js";
25
- export {
26
- collectParamBodyAccesses,
27
- deriveFromRoot,
28
- draftInterface,
29
- emitDerivedFromRoot,
30
- emitInterface,
31
- extractFnConstraintSources,
32
- formatDerivedSection,
33
- formatDraftModule,
34
- formatDraftSummary,
35
- formatEmitSummary,
36
- formatInterfaceSurfaceLine,
37
- injectBindings,
38
- interfaceSurface,
39
- isDraftableEntry,
40
- sidecarDraftPath,
41
- typeExprToDirective,
42
- writeInterfaceDraft
43
- };
package/dist/lsp.d.ts DELETED
@@ -1,103 +0,0 @@
1
- import { InterfaceSource, Abs, InterfaceTierOpts } from '@nudojs/core';
2
- import { S as SourceLocation, c as CompletionItem } from './analyzer-types-JyJiCt8w.js';
3
- export { AbsInlay, collectAbsInlays } from '@nudojs/core/internal';
4
- import '@babel/types';
5
-
6
- type CaseInfo = {
7
- functionName: string;
8
- caseName: string;
9
- caseIndex: number;
10
- };
11
- declare function getCasesForFile(filePath: string, source: string): {
12
- functionName: string;
13
- cases: {
14
- name: string;
15
- index: number;
16
- }[];
17
- loc: SourceLocation;
18
- }[];
19
- /** Async entry to getTypeAtPosition with path-env preloading (see analyzeFileAsync). */
20
- declare function getTypeAtPositionAsync(filePath: string, source: string, line: number, column: number, activeCases?: Map<string, number>): Promise<Abs | null>;
21
- /** Async entry to getAbsAtPosition(与 getTypeAtPositionAsync 同预加载口径) */
22
- declare function getAbsAtPositionAsync(filePath: string, source: string, line: number, column: number, activeCases?: Map<string, number>): Promise<Abs | null>;
23
- /**
24
- * 光标处无损 Abs。B-path 节点表优先;用例函数体走 Abs 重放。
25
- */
26
- declare function getAbsAtPosition(filePath: string, source: string, line: number, column: number, activeCases?: Map<string, number>): Abs | null;
27
- /** 光标处类型(Abs)。B-path 节点表优先;用例函数体走 Abs 重放。 */
28
- declare function getTypeAtPosition(filePath: string, source: string, line: number, column: number, activeCases?: Map<string, number>): Abs | null;
29
- type HoverInfo = {
30
- /** 外延展示(formatShape / formatAbs) */
31
- typeText: string;
32
- /** 内涵签名(代数 generalize) */
33
- intension?: string;
34
- /** 无损 Abs 单行展示(shape / term / pred / conf) */
35
- abs?: string;
36
- /** 无损 Abs 多行展示 */
37
- absMultiline?: string;
38
- /** CodeLens `● interface` 同源档位(A7);仅本地 named export */
39
- interfaceSource?: InterfaceSource;
40
- /** 有效契约展示(handwritten/generated);implicit 为 undefined */
41
- interfaceDisplay?: string;
42
- };
43
- /** A7:hover/inlay 与 CodeLens interface 档同源(design-refine-derivation §8) */
44
- type HoverInterfaceOpts = InterfaceTierOpts;
45
- /**
46
- * LSP hover:优先无损 Abs(类型即计算本体)。
47
- * 节点表也是 Abs(collectAbsNodeTypes),不经 bridge。
48
- *
49
- * 函数名/调用 callee 位置(design-hof-relations §7):
50
- * intension 一律走 generalize/formatPoly(HOF fnRels 在这里);
51
- * typeText 仍落 B-path Abs(调用点显示结果类型,不是函数签名)。
52
- * 禁止用 B-path 的 arity-only fn Abs 冒充权威关系源。
53
- *
54
- * A7 default 档:函数名 hover 附带 interfaceTierOf 来源 + 契约展示,
55
- * 与 CodeLens `● interface / <source>` 同源;选 case 时 body 仍走
56
- * activeCases 重放,interface 档标注不变。
57
- */
58
- declare function getHoverAtPosition(filePath: string, source: string, line: number, column: number, activeCases?: Map<string, number>, opts?: HoverInterfaceOpts): HoverInfo | null;
59
- declare function getCompletionsAtPosition(filePath: string, source: string, line: number, column: number): CompletionItem[];
60
-
61
- /**
62
- * Semantic tokens 图例(tokenTypes 下标即 LSP 编码里的 tokenType 值)。
63
- * 与 LSP server capabilities 里声明的 legend 必须逐字对齐——server.ts 直接
64
- * 导入本常量注册,保证「提取端索引」与「客户端图例」单一来源。
65
- * 顺序沿用 lsp 包原 legend(function/variable/parameter/property 在前),
66
- * 末尾追加 method(对象字面量方法键)与 interface 档 modifier(A7),
67
- * 只追加不重排,客户端索引稳定。
68
- */
69
- declare const SEMANTIC_TOKEN_TYPES: readonly ["function", "variable", "parameter", "property", "type", "keyword", "string", "number", "comment", "decorator", "method"];
70
- declare const SEMANTIC_TOKEN_MODIFIERS: readonly ["declaration", "readonly", "deprecated", "unreachable", "contract", "generated", "derived"];
71
- type SemanticToken = {
72
- line: number;
73
- char: number;
74
- length: number;
75
- typeIndex: number;
76
- modifierBitmask: number;
77
- };
78
- /** LSP 标准相对五元组编码:deltaLine/deltaStartChar/length/tokenType/tokenModifiers。 */
79
- declare function encodeSemanticTokens(tokens: SemanticToken[]): number[];
80
- /** A7:interface 档 → semantic token modifier(与 CodeLens 同源) */
81
- declare function interfaceTierModifierBit(src: InterfaceSource): number;
82
- type BuildSemanticTokensOpts = InterfaceTierOpts & {
83
- loadModule?: (spec: string, fromFile: string) => string | undefined;
84
- };
85
- /**
86
- * 从源码提取 semantic tokens 并按 LSP 相对编码返回扁平 number[]。
87
- *
88
- * 上色范围(声明位优先,未解析的 token 一律不上色):
89
- * - 顶层 const/let/var 声明的绑定名:推断为函数绑定 → function,否则 variable
90
- * (函数体内部的声明不做 env 反查——外层同名绑定会串味,统一 variable);
91
- * - 函数声明/函数表达式的名字 → function;所有函数的参数 → parameter;
92
- * - 对象字面量的键:值为函数 → method,否则 property。
93
- *
94
- * A7:本地 named export 的函数绑定额外带 interface 档 modifier
95
- * (contract / generated / derived),与 CodeLens `● interface` 同源。
96
- * 非导出绑定只带 declaration,不假装进档。
97
- *
98
- * 推断优先 Abs 模块图绑定(TypeValue 退出主路径);失败时复用
99
- * evaluateProgram。解析失败返回 []。
100
- */
101
- declare function buildSemanticTokens(filePath: string, source: string, opts?: BuildSemanticTokensOpts): number[];
102
-
103
- export { type BuildSemanticTokensOpts, type CaseInfo, type HoverInfo, SEMANTIC_TOKEN_MODIFIERS, SEMANTIC_TOKEN_TYPES, type SemanticToken, buildSemanticTokens, encodeSemanticTokens, getAbsAtPosition, getAbsAtPositionAsync, getCasesForFile, getCompletionsAtPosition, getHoverAtPosition, getTypeAtPosition, getTypeAtPositionAsync, interfaceTierModifierBit };
package/dist/lsp.js DELETED
@@ -1,36 +0,0 @@
1
- import {
2
- SEMANTIC_TOKEN_MODIFIERS,
3
- SEMANTIC_TOKEN_TYPES,
4
- buildSemanticTokens,
5
- encodeSemanticTokens,
6
- getAbsAtPosition,
7
- getAbsAtPositionAsync,
8
- getCasesForFile,
9
- getCompletionsAtPosition,
10
- getHoverAtPosition,
11
- getTypeAtPosition,
12
- getTypeAtPositionAsync,
13
- interfaceTierModifierBit
14
- } from "./chunk-E4N4A4JV.js";
15
- import "./chunk-QAFMPM2E.js";
16
- import "./chunk-U7JYTRIB.js";
17
- import "./chunk-YLALZXTZ.js";
18
- import "./chunk-PVJIMQRI.js";
19
-
20
- // src/lsp.ts
21
- import { collectAbsInlays } from "@nudojs/core/internal";
22
- export {
23
- SEMANTIC_TOKEN_MODIFIERS,
24
- SEMANTIC_TOKEN_TYPES,
25
- buildSemanticTokens,
26
- collectAbsInlays,
27
- encodeSemanticTokens,
28
- getAbsAtPosition,
29
- getAbsAtPositionAsync,
30
- getCasesForFile,
31
- getCompletionsAtPosition,
32
- getHoverAtPosition,
33
- getTypeAtPosition,
34
- getTypeAtPositionAsync,
35
- interfaceTierModifierBit
36
- };