@fossil-lang/wasm 0.3.0-alpha.12 → 0.3.0-alpha.14
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/README.md +8 -8
- package/dist/client.d.ts +5 -5
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +6 -6
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +8 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/load.d.ts +1 -1
- package/dist/load.js +1 -1
- package/dist/program.d.ts +2 -2
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +3 -3
- package/dist/program.js.map +1 -1
- package/package.json +6 -6
- package/pkg/fossil_wasm.d.ts +27 -27
- package/pkg/fossil_wasm.js +34 -34
- package/pkg/fossil_wasm_bg.wasm +0 -0
- package/pkg/fossil_wasm_bg.wasm.d.ts +16 -16
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ JS/TS wrapper around the `fossil-wasm` Rust crate's wasm-bindgen artefacts. Prov
|
|
|
9
9
|
- `tokenize(text)` — calls the Rust lexer, returns `TokenRow[]`. The Rust lexer
|
|
10
10
|
is the only lexer: no host reimplements one and drifts from the grammar.
|
|
11
11
|
- `semanticLegend()` — returns the LSP semantic-tokens legend.
|
|
12
|
-
- `
|
|
12
|
+
- `FossilWorkspace` — the Workspace API class for LSP + compile. `fossil-lsp`
|
|
13
13
|
itself is native-only (stdio over crossbeam), so the browser gets this
|
|
14
14
|
equivalent dispatch surface over the same `fossil-ide` functions.
|
|
15
15
|
|
|
@@ -33,7 +33,7 @@ and every one that answers about the program takes the text and pushes it
|
|
|
33
33
|
first, comparing against what it last pushed so the common case costs a string
|
|
34
34
|
comparison. `check` and `sources` also run `resolveDocuments`, which reads
|
|
35
35
|
nothing when nothing is missing. That is the whole protocol an editor host used
|
|
36
|
-
to write by hand; `workspace` is the `
|
|
36
|
+
to write by hand; `workspace` is the `FossilWorkspace` underneath, for a
|
|
37
37
|
question this surface does not ask, and `close()` frees it.
|
|
38
38
|
|
|
39
39
|
## Documents and sources: fossil resolves, the host reads
|
|
@@ -50,10 +50,10 @@ A host that already holds a document's text calls `registerDocument` itself.
|
|
|
50
50
|
```typescript
|
|
51
51
|
import { resolveDocuments } from '@fossil-lang/storage';
|
|
52
52
|
|
|
53
|
-
const
|
|
54
|
-
const h =
|
|
55
|
-
const { unread } = await resolveDocuments(
|
|
56
|
-
const rows =
|
|
53
|
+
const ws = new FossilWorkspace();
|
|
54
|
+
const h = ws.openFile('prog.fossil', text); // edited buffers only
|
|
55
|
+
const { unread } = await resolveDocuments(ws.workspace(h), host); // sets the connections too
|
|
56
|
+
const rows = ws.check();
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
- `missingDocuments(h)` — `{ key, locator, connection? }` rows. The key is what
|
|
@@ -97,8 +97,8 @@ the URL then answers with `index.html`. Keep the three packages out of it —
|
|
|
97
97
|
export default { optimizeDeps: { exclude: ['@fossil-lang/wasm', '@fossil-lang/executor', '@fossil-lang/corpus'] } };
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
-
A workspace-linked package is never pre-bundled, which is why
|
|
101
|
-
no such line. Next.js needs none in either `next dev` or `next build`, webpack or
|
|
100
|
+
A workspace-linked package is never pre-bundled, which is why a host inside this
|
|
101
|
+
repository would need no such line. Next.js needs none in either `next dev` or `next build`, webpack or
|
|
102
102
|
Turbopack.
|
|
103
103
|
|
|
104
104
|
`--target bundler` was rejected because it emits `import … from '*.wasm'` (the
|
package/dist/client.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ import type { CheckRow, CompletionRow, DefinitionRow, HoverRow, InferredDescript
|
|
|
30
30
|
*/
|
|
31
31
|
export declare function start_lsp_worker(): void;
|
|
32
32
|
/**
|
|
33
|
-
* Opaque file-handle returned by {@link
|
|
33
|
+
* Opaque file-handle returned by {@link FossilWorkspace.openFile}. Pass it
|
|
34
34
|
* back into the matching `updateFile` / `closeFile` / `diagnosticsFor`
|
|
35
35
|
* calls. JS code cannot construct one directly (the wasm-bindgen class has a
|
|
36
36
|
* private constructor) — handles are minted only by `openFile` on the Rust
|
|
@@ -95,7 +95,7 @@ export declare function refs(program: string): SourceRefInfo[];
|
|
|
95
95
|
export declare function providers(): ProviderInfo[];
|
|
96
96
|
/**
|
|
97
97
|
* Workspace API class. Thin TS wrapper around the wasm-bindgen
|
|
98
|
-
* `
|
|
98
|
+
* `FossilWorkspace` that exposes camelCase method names for JS idiom + better
|
|
99
99
|
* TS inference (the raw bindings use snake_case from the Rust impl block).
|
|
100
100
|
*
|
|
101
101
|
* One instance per browser tab / Node process — the instance owns the Salsa
|
|
@@ -104,11 +104,11 @@ export declare function providers(): ProviderInfo[];
|
|
|
104
104
|
* NOTE: {@link FileHandle} is opaque — JS cannot construct one. Callers receive
|
|
105
105
|
* a handle from `openFile` and pass it back to subsequent operations.
|
|
106
106
|
*/
|
|
107
|
-
export declare class
|
|
107
|
+
export declare class FossilWorkspace {
|
|
108
108
|
private _inner;
|
|
109
109
|
constructor();
|
|
110
110
|
/**
|
|
111
|
-
* Free the underlying WASM-side Salsa store. Call when the
|
|
111
|
+
* Free the underlying WASM-side Salsa store. Call when the workspace is no
|
|
112
112
|
* longer needed (e.g. component unmount).
|
|
113
113
|
*/
|
|
114
114
|
free(): void;
|
|
@@ -150,7 +150,7 @@ export declare class FossilPlayground {
|
|
|
150
150
|
sources(handle: FileHandle): ProgramSource[];
|
|
151
151
|
/**
|
|
152
152
|
* The file at `handle` as a {@link DocumentWorkspace}, for
|
|
153
|
-
* `resolveDocuments(
|
|
153
|
+
* `resolveDocuments(workspace.workspace(handle), host)`.
|
|
154
154
|
*/
|
|
155
155
|
workspace(handle: FileHandle): DocumentWorkspace;
|
|
156
156
|
/**
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;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AU,GAAG,iBAAiB;IAQhD;;;OAGG;IACH,KAAK,IAAI,QAAQ,EAAE;IAInB;;;OAGG;IACH,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,QAAQ,EAAE;IAI9C;;;;;;;;;;;;;;;;;;OAkBG;IACH,KAAK,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI;IAM3E;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,aAAa,EAAE;IAIjF;;;;;;;OAOG;IACH,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,aAAa,EAAE;IAIpF;;;;;;;;;;;OAWG;IACH,0BAA0B,CAAC,UAAU,EAAE,sBAAsB,GAAG,IAAI;CAKrE"}
|
package/dist/client.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* seen when the codemirror tokenizer calls `tokenize` on the main thread).
|
|
12
12
|
* Mirrors `@fossil-lang/corpus`'s `client.ts` split, the known-good shape.
|
|
13
13
|
*/
|
|
14
|
-
import {
|
|
14
|
+
import { FossilWorkspace as RawFossilWorkspace, FileHandle as RawFileHandle, tokenize as rawTokenize, semantic_legend as rawSemanticLegend, tokenKinds as rawTokenKinds, start_lsp_worker as rawStartLspWorker, refs as rawRefs, providers as rawProviders, } from '../pkg/fossil_wasm.js';
|
|
15
15
|
/**
|
|
16
16
|
* Install the LSP-over-postMessage dispatcher on the current Worker scope.
|
|
17
17
|
*
|
|
@@ -101,7 +101,7 @@ export function providers() {
|
|
|
101
101
|
}
|
|
102
102
|
/**
|
|
103
103
|
* Workspace API class. Thin TS wrapper around the wasm-bindgen
|
|
104
|
-
* `
|
|
104
|
+
* `FossilWorkspace` that exposes camelCase method names for JS idiom + better
|
|
105
105
|
* TS inference (the raw bindings use snake_case from the Rust impl block).
|
|
106
106
|
*
|
|
107
107
|
* One instance per browser tab / Node process — the instance owns the Salsa
|
|
@@ -110,13 +110,13 @@ export function providers() {
|
|
|
110
110
|
* NOTE: {@link FileHandle} is opaque — JS cannot construct one. Callers receive
|
|
111
111
|
* a handle from `openFile` and pass it back to subsequent operations.
|
|
112
112
|
*/
|
|
113
|
-
export class
|
|
113
|
+
export class FossilWorkspace {
|
|
114
114
|
_inner;
|
|
115
115
|
constructor() {
|
|
116
|
-
this._inner = new
|
|
116
|
+
this._inner = new RawFossilWorkspace();
|
|
117
117
|
}
|
|
118
118
|
/**
|
|
119
|
-
* Free the underlying WASM-side Salsa store. Call when the
|
|
119
|
+
* Free the underlying WASM-side Salsa store. Call when the workspace is no
|
|
120
120
|
* longer needed (e.g. component unmount).
|
|
121
121
|
*/
|
|
122
122
|
free() {
|
|
@@ -174,7 +174,7 @@ export class FossilPlayground {
|
|
|
174
174
|
}
|
|
175
175
|
/**
|
|
176
176
|
* The file at `handle` as a {@link DocumentWorkspace}, for
|
|
177
|
-
* `resolveDocuments(
|
|
177
|
+
* `resolveDocuments(workspace.workspace(handle), host)`.
|
|
178
178
|
*/
|
|
179
179
|
workspace(handle) {
|
|
180
180
|
return {
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EACL,eAAe,IAAI,kBAAkB,EACrC,UAAU,IAAI,aAAa,EAC3B,QAAQ,IAAI,WAAW,EACvB,eAAe,IAAI,iBAAiB,EACpC,UAAU,IAAI,aAAa,EAC3B,gBAAgB,IAAI,iBAAiB,EACrC,IAAI,IAAI,OAAO,EACf,SAAS,I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OAAQ,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,SAAS,CAAiC,IAAI,IAAI,CAAC;IAC7F,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,MAAkB,EAAE,IAAY,EAAE,SAAiB;QAC7D,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE,SAAS,CAAoB,CAAC;IAC7E,CAAC;IAED;;;;;;;OAOG;IACH,cAAc,CAAC,MAAkB,EAAE,IAAY,EAAE,SAAiB;QAChE,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,SAAS,CAAoB,CAAC;IAChF,CAAC;IAED;;;;;;;;;;;OAWG;IACH,0BAA0B,CAAC,UAAkC;QAC3D,4EAA4E;QAC5E,uBAAuB;QACvB,IAAI,CAAC,MAAM,CAAC,0BAA0B,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;IACrE,CAAC;CACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* - {@link openProgram} — one program open for an editor: the workspace, the push-before-ask
|
|
11
11
|
* discipline and the document resolution a host would otherwise write, shaped to spread into
|
|
12
12
|
* `@fossil-lang/codemirror-fossil`'s `fossil()`. What a host with one editor calls.
|
|
13
|
-
* - {@link
|
|
13
|
+
* - {@link FossilWorkspace} — Workspace API class: open / update / close,
|
|
14
14
|
* `check`, the three position queries (`hover`, `completions`,
|
|
15
15
|
* `gotoDefinition`) an editor draws its IDE surface from, and the documents
|
|
16
16
|
* and sources a program reads (`missingDocuments`, `registerDocument`,
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
*/
|
|
27
27
|
export { initFossilWasm } from './load.js';
|
|
28
28
|
export type { InitInput } from './load.js';
|
|
29
|
-
export { start_lsp_worker, tokenize, tokenKinds, semanticLegend,
|
|
29
|
+
export { start_lsp_worker, tokenize, tokenKinds, semanticLegend, FossilWorkspace, refs, providers, } from './client.js';
|
|
30
30
|
export type { FileHandle } from './client.js';
|
|
31
31
|
export { openProgram } from './program.js';
|
|
32
32
|
export type { FossilProgram, OpenProgramOptions } from './program.js';
|
|
@@ -48,8 +48,8 @@ export interface ProviderInfo {
|
|
|
48
48
|
extensions: string[];
|
|
49
49
|
kind: 'schema' | 'data' | 'both';
|
|
50
50
|
}
|
|
51
|
-
/** Diagnostic row returned by {@link
|
|
52
|
-
* {@link
|
|
51
|
+
/** Diagnostic row returned by {@link FossilWorkspace.check} and
|
|
52
|
+
* {@link FossilWorkspace.diagnosticsFor} — mirrors `fossil-wasm`'s
|
|
53
53
|
* `CheckRow` JSON shape (the LSP `Diagnostic` projected through
|
|
54
54
|
* `fossil_ide::LineIndex` for UTF-16 ranges).
|
|
55
55
|
*/
|
|
@@ -72,7 +72,7 @@ export interface LspRange {
|
|
|
72
72
|
character: number;
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
|
-
/** What {@link
|
|
75
|
+
/** What {@link FossilWorkspace.hover} found: the rendered Markdown — a
|
|
76
76
|
* ` ```fossil ` fence, the type of what you wrote and where it came from, and
|
|
77
77
|
* a second block with the type the target shape demands of that predicate when
|
|
78
78
|
* the shape resolves — and the range it applies to. */
|
|
@@ -80,7 +80,7 @@ export interface HoverRow {
|
|
|
80
80
|
markdown: string;
|
|
81
81
|
range: LspRange;
|
|
82
82
|
}
|
|
83
|
-
/** One candidate from {@link
|
|
83
|
+
/** One candidate from {@link FossilWorkspace.completions}.
|
|
84
84
|
*
|
|
85
85
|
* `kind` is the LSP `CompletionItemKind` **by name**, lowercased —
|
|
86
86
|
* `"function"`, `"field"`, `"enum_member"` — and `""` when the item carries
|
|
@@ -100,7 +100,7 @@ export interface CompletionRow {
|
|
|
100
100
|
kind: string;
|
|
101
101
|
detail: string;
|
|
102
102
|
}
|
|
103
|
-
/** One place {@link
|
|
103
|
+
/** One place {@link FossilWorkspace.gotoDefinition} found a definition.
|
|
104
104
|
*
|
|
105
105
|
* `uri` is the key the buffer was opened under, VERBATIM — matching
|
|
106
106
|
* {@link CheckRow.uri}, and not a `file://` URI. Two of the four positions
|
|
@@ -137,7 +137,7 @@ export interface InferredColumnJson {
|
|
|
137
137
|
* read as CSV introspects to a single column named `[`.
|
|
138
138
|
*
|
|
139
139
|
* Consumed by the Rust compiler via
|
|
140
|
-
* {@link
|
|
140
|
+
* {@link FossilWorkspace.registerInferredDescriptor}. There is no metadata
|
|
141
141
|
* sidecar for the user to write and keep in sync: the host introspects the
|
|
142
142
|
* real file and feeds the compiler ahead of `compile()`.
|
|
143
143
|
*/
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAQH,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,YAAY,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,cAAc,EACd,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAQH,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,YAAY,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,cAAc,EACd,eAAe,EACf,IAAI,EACJ,SAAS,GACV,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEtE;;;;4EAI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AAEd,kDAAkD;AAClD,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,iBAAiB,CAAC;CAC9B;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ,2EAA2E;IAC3E,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B;;;;;;OAMG;IACH,eAAe,EAAE,MAAM,CAAC;CACzB;AAKD,YAAY,EACV,QAAQ,EACR,oBAAoB,EACpB,IAAI,EACJ,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,aAAa,GACd,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* - {@link openProgram} — one program open for an editor: the workspace, the push-before-ask
|
|
11
11
|
* discipline and the document resolution a host would otherwise write, shaped to spread into
|
|
12
12
|
* `@fossil-lang/codemirror-fossil`'s `fossil()`. What a host with one editor calls.
|
|
13
|
-
* - {@link
|
|
13
|
+
* - {@link FossilWorkspace} — Workspace API class: open / update / close,
|
|
14
14
|
* `check`, the three position queries (`hover`, `completions`,
|
|
15
15
|
* `gotoDefinition`) an editor draws its IDE surface from, and the documents
|
|
16
16
|
* and sources a program reads (`missingDocuments`, `registerDocument`,
|
|
@@ -31,6 +31,6 @@
|
|
|
31
31
|
// `init()`'s wasm instance from the one the functions use (the crash the
|
|
32
32
|
// codemirror tokenizer hit on the main thread). This entry only re-exports.
|
|
33
33
|
export { initFossilWasm } from './load.js';
|
|
34
|
-
export { start_lsp_worker, tokenize, tokenKinds, semanticLegend,
|
|
34
|
+
export { start_lsp_worker, tokenize, tokenKinds, semanticLegend, FossilWorkspace, refs, providers, } from './client.js';
|
|
35
35
|
export { openProgram } from './program.js';
|
|
36
36
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,6EAA6E;AAC7E,iFAAiF;AACjF,iFAAiF;AACjF,2EAA2E;AAC3E,yEAAyE;AACzE,4EAA4E;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAG3C,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,cAAc,EACd,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,6EAA6E;AAC7E,iFAAiF;AACjF,iFAAiF;AACjF,2EAA2E;AAC3E,yEAAyE;AACzE,4EAA4E;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAG3C,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,cAAc,EACd,eAAe,EACf,IAAI,EACJ,SAAS,GACV,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/load.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export type { InitInput };
|
|
|
3
3
|
/**
|
|
4
4
|
* Boot the fossil-wasm module. MUST be awaited before calling any of
|
|
5
5
|
* {@link tokenize}, {@link semanticLegend}, or instantiating
|
|
6
|
-
* {@link
|
|
6
|
+
* {@link FossilWorkspace}. Memoised — subsequent calls return the same promise.
|
|
7
7
|
*
|
|
8
8
|
* **Called with nothing, the module finds its own `.wasm`.** The glue resolves
|
|
9
9
|
* `new URL('fossil_wasm_bg.wasm', import.meta.url)`, which is the pattern Vite,
|
package/dist/load.js
CHANGED
|
@@ -6,7 +6,7 @@ let _initPromise = null;
|
|
|
6
6
|
/**
|
|
7
7
|
* Boot the fossil-wasm module. MUST be awaited before calling any of
|
|
8
8
|
* {@link tokenize}, {@link semanticLegend}, or instantiating
|
|
9
|
-
* {@link
|
|
9
|
+
* {@link FossilWorkspace}. Memoised — subsequent calls return the same promise.
|
|
10
10
|
*
|
|
11
11
|
* **Called with nothing, the module finds its own `.wasm`.** The glue resolves
|
|
12
12
|
* `new URL('fossil_wasm_bg.wasm', import.meta.url)`, which is the pattern Vite,
|
package/dist/program.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Host, ProgramSource } from '@fossil-lang/types';
|
|
2
|
-
import {
|
|
2
|
+
import { FossilWorkspace, tokenize, tokenKinds } from './client.js';
|
|
3
3
|
import type { CheckRow, CompletionRow, DefinitionRow, HoverRow, InferredDescriptorJson } from './index.js';
|
|
4
4
|
import { type InitInput } from './load.js';
|
|
5
5
|
/** What {@link openProgram} takes beside the key. */
|
|
@@ -45,7 +45,7 @@ export interface FossilProgram {
|
|
|
45
45
|
*/
|
|
46
46
|
registerDescriptor(descriptor: InferredDescriptorJson): void;
|
|
47
47
|
/** The workspace underneath, for the rare question this surface does not ask. */
|
|
48
|
-
readonly workspace:
|
|
48
|
+
readonly workspace: FossilWorkspace;
|
|
49
49
|
/** Free the workspace. Every member fails after it. */
|
|
50
50
|
close(): void;
|
|
51
51
|
}
|
package/dist/program.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"program.d.ts","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,KAAK,EACV,QAAQ,EACR,aAAa,EACb,aAAa,EACb,QAAQ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AAK,IAAI,IAAI,CAAC;CACf;AAED;;;;;GAKG;AACH,wBAAsB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,aAAa,CAAC,CAoDlG"}
|
package/dist/program.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* One program, open in a workspace, answering an editor — what every host of the checker wrote by
|
|
3
3
|
* hand before this existed.
|
|
4
4
|
*
|
|
5
|
-
* `
|
|
5
|
+
* `FossilWorkspace` is the workspace and it is right that it stays general: it holds any number
|
|
6
6
|
* of files and answers about each. What a host with ONE program in ONE editor needs on top of it
|
|
7
7
|
* is always the same protocol, and two copies of it had already diverged in their comments:
|
|
8
8
|
*
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
* check rather than poisoning it.
|
|
33
33
|
*/
|
|
34
34
|
import { resolveDocuments } from '@fossil-lang/storage';
|
|
35
|
-
import {
|
|
35
|
+
import { FossilWorkspace, tokenize, tokenKinds } from './client.js';
|
|
36
36
|
import { initFossilWasm } from './load.js';
|
|
37
37
|
/**
|
|
38
38
|
* Boot the module, open `uri` in a fresh workspace, and read the documents its text names.
|
|
@@ -43,7 +43,7 @@ import { initFossilWasm } from './load.js';
|
|
|
43
43
|
export async function openProgram(uri, options) {
|
|
44
44
|
const { host, text = '', wasm } = options;
|
|
45
45
|
await initFossilWasm(wasm);
|
|
46
|
-
const workspace = new
|
|
46
|
+
const workspace = new FossilWorkspace();
|
|
47
47
|
const handle = workspace.openFile(uri, text);
|
|
48
48
|
let pushed = text;
|
|
49
49
|
const sync = (next) => {
|
package/dist/program.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"program.js","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAGxD,OAAO,EAAE,
|
|
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AAO,SAAS,CAAC,KAAK,EAAE,CAAC;QAC3B,CAAC;QACD,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS;YACzB,IAAI,CAAC,IAAI,CAAC,CAAC;YACX,OAAO,SAAS,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;QAClD,CAAC;QACD,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS;YAC5B,IAAI,CAAC,IAAI,CAAC,CAAC;YACX,OAAO,SAAS,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;QACxD,CAAC;QACD,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS;YAC9B,IAAI,CAAC,IAAI,CAAC,CAAC;YACX,OAAO,SAAS,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;QAC3D,CAAC;QACD,KAAK,CAAC,OAAO,CAAC,IAAI;YAChB,MAAM,MAAM,CAAC,IAAI,CAAC,CAAC;YACnB,OAAO,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACnC,CAAC;QACD,kBAAkB,CAAC,UAAU;YAC3B,SAAS,CAAC,0BAA0B,CAAC,UAAU,CAAC,CAAC;QACnD,CAAC;QACD,SAAS;QACT,KAAK;YACH,SAAS,CAAC,IAAI,EAAE,CAAC;QACnB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fossil-lang/wasm",
|
|
3
|
-
"version": "0.3.0-alpha.
|
|
4
|
-
"description": "JS/TS wrapper around the fossil-wasm wasm-bindgen artifacts (--target web). Exposes initFossilWasm + tokenize + semanticLegend +
|
|
3
|
+
"version": "0.3.0-alpha.14",
|
|
4
|
+
"description": "JS/TS wrapper around the fossil-wasm wasm-bindgen artifacts (--target web). Exposes initFossilWasm + tokenize + semanticLegend + FossilWorkspace class for downstream @fossil-lang/* packages.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "https://github.com/
|
|
8
|
+
"url": "git+https://github.com/Kanzo-Tech/fossil-lang.git",
|
|
9
9
|
"directory": "packages/wasm"
|
|
10
10
|
},
|
|
11
11
|
"publishConfig": {
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
],
|
|
34
34
|
"sideEffects": false,
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@fossil-lang/storage": "0.3.0-alpha.
|
|
37
|
-
"@fossil-lang/types": "0.3.0-alpha.
|
|
36
|
+
"@fossil-lang/storage": "0.3.0-alpha.14",
|
|
37
|
+
"@fossil-lang/types": "0.3.0-alpha.14"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"typescript": "^5.6.0",
|
|
41
|
-
"vitest": "^
|
|
41
|
+
"vitest": "^4.1.11"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build:wasm": "bash scripts/build-wasm.sh",
|
package/pkg/fossil_wasm.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export class FileHandle {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
* The JS-facing workspace — `
|
|
36
|
+
* The JS-facing workspace — `FossilWorkspace` on the JS side, and a
|
|
37
37
|
* `RefCell` around the Rust one.
|
|
38
38
|
*
|
|
39
39
|
* # Why the interior `RefCell`, and it is not a style choice
|
|
@@ -47,9 +47,9 @@ export class FileHandle {
|
|
|
47
47
|
* later call on that object fails the same way for the life of the module.**
|
|
48
48
|
* One bad call poisons the workspace permanently.
|
|
49
49
|
*
|
|
50
|
-
* That is a real defect and it was reachable from correct host code:
|
|
51
|
-
*
|
|
52
|
-
* debounce, and
|
|
50
|
+
* That is a real defect and it was reachable from correct host code: an
|
|
51
|
+
* editor reproduced it by typing sixteen characters faster than its
|
|
52
|
+
* debounce, and had to carry a `busy` flag and a 120 ms coalesce to stay
|
|
53
53
|
* out of it. A mitigation a host has to remember is not a fix — and an editor
|
|
54
54
|
* is precisely the workload that forgets.
|
|
55
55
|
*
|
|
@@ -61,17 +61,17 @@ export class FileHandle {
|
|
|
61
61
|
* **the workspace is still usable afterwards**, because a returned `Err` drops
|
|
62
62
|
* its guard where a panic did not.
|
|
63
63
|
*
|
|
64
|
-
* The Rust-side [`
|
|
64
|
+
* The Rust-side [`FossilWorkspace`] keeps its `&mut self` signatures
|
|
65
65
|
* untouched: `lsp_worker` already owns it inside an `Rc<RefCell<…>>`, and the
|
|
66
66
|
* native tests drive it directly. Only the JS boundary changed.
|
|
67
67
|
*/
|
|
68
|
-
export class
|
|
68
|
+
export class FossilWorkspace {
|
|
69
69
|
free(): void;
|
|
70
70
|
[Symbol.dispose](): void;
|
|
71
71
|
/**
|
|
72
72
|
* Every open **program**'s diagnostics as a flat JS array of
|
|
73
73
|
* `{ uri, range, severity, message }` rows keyed by file URI — the
|
|
74
|
-
*
|
|
74
|
+
* diagnostics panel's view. It is NOT what the LSP Worker publishes; see
|
|
75
75
|
* [`CheckRow`], and `lsp_worker::publish_diagnostics` for the wire.
|
|
76
76
|
*
|
|
77
77
|
* A buffer the installed provider catalogue claims — a `.shex` being
|
|
@@ -158,7 +158,7 @@ export class FossilPlayground {
|
|
|
158
158
|
*
|
|
159
159
|
* Returns a JS error if the workspace is busy, or if the result fails to
|
|
160
160
|
* serialize to `JsValue`. An unknown handle is `null`, not an error —
|
|
161
|
-
* see [`
|
|
161
|
+
* see [`FossilWorkspace::hover_row`].
|
|
162
162
|
*/
|
|
163
163
|
hover(handle: FileHandle, line: number, character: number): any;
|
|
164
164
|
/**
|
|
@@ -172,7 +172,7 @@ export class FossilPlayground {
|
|
|
172
172
|
*/
|
|
173
173
|
missingDocuments(handle: FileHandle): any;
|
|
174
174
|
/**
|
|
175
|
-
* Construct a new
|
|
175
|
+
* Construct a new workspace.
|
|
176
176
|
*
|
|
177
177
|
* Installs `console_error_panic_hook` (idempotent) so any panic inside
|
|
178
178
|
* compiler-core surfaces as a `console.error` stack trace in the host
|
|
@@ -190,7 +190,7 @@ export class FossilPlayground {
|
|
|
190
190
|
* # Errors
|
|
191
191
|
*
|
|
192
192
|
* Returns a JS error if the workspace is already inside another call —
|
|
193
|
-
* see the type-level note on [`
|
|
193
|
+
* see the type-level note on [`WasmWorkspace`].
|
|
194
194
|
*/
|
|
195
195
|
open_file(path: string, contents: string): FileHandle;
|
|
196
196
|
/**
|
|
@@ -253,7 +253,7 @@ export class FossilPlayground {
|
|
|
253
253
|
*
|
|
254
254
|
* Returns a JS error if `handle` was never opened or was already closed,
|
|
255
255
|
* or if the workspace is already inside another call — see the type-level
|
|
256
|
-
* note on [`
|
|
256
|
+
* note on [`WasmWorkspace`]. **Neither leaves the workspace unusable**,
|
|
257
257
|
* which is the whole reason this method takes `&self`.
|
|
258
258
|
*/
|
|
259
259
|
update_file(handle: FileHandle, contents: string): void;
|
|
@@ -357,24 +357,24 @@ export interface InitOutput {
|
|
|
357
357
|
readonly semantic_legend: () => [number, number, number];
|
|
358
358
|
readonly tokenKinds: () => [number, number, number];
|
|
359
359
|
readonly __wbg_filehandle_free: (a: number, b: number) => void;
|
|
360
|
-
readonly
|
|
361
|
-
readonly
|
|
362
|
-
readonly
|
|
363
|
-
readonly
|
|
364
|
-
readonly
|
|
365
|
-
readonly
|
|
366
|
-
readonly
|
|
367
|
-
readonly
|
|
368
|
-
readonly
|
|
369
|
-
readonly
|
|
370
|
-
readonly
|
|
371
|
-
readonly
|
|
372
|
-
readonly
|
|
373
|
-
readonly
|
|
374
|
-
readonly
|
|
360
|
+
readonly __wbg_fossilworkspace_free: (a: number, b: number) => void;
|
|
361
|
+
readonly fossilworkspace_new: () => number;
|
|
362
|
+
readonly fossilworkspace_open_file: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
363
|
+
readonly fossilworkspace_update_file: (a: number, b: number, c: number, d: number) => [number, number];
|
|
364
|
+
readonly fossilworkspace_close_file: (a: number, b: number) => [number, number];
|
|
365
|
+
readonly fossilworkspace_check: (a: number) => [number, number, number];
|
|
366
|
+
readonly fossilworkspace_diagnostics_for: (a: number, b: number) => [number, number, number];
|
|
367
|
+
readonly fossilworkspace_setConnections: (a: number, b: any) => [number, number];
|
|
368
|
+
readonly fossilworkspace_missingDocuments: (a: number, b: number) => [number, number, number];
|
|
369
|
+
readonly fossilworkspace_registerDocument: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
370
|
+
readonly fossilworkspace_sources: (a: number, b: number) => [number, number, number];
|
|
371
|
+
readonly fossilworkspace_hover: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
372
|
+
readonly fossilworkspace_completions: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
373
|
+
readonly fossilworkspace_gotoDefinition: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
374
|
+
readonly fossilworkspace_registerInferredDescriptor: (a: number, b: number, c: number) => [number, number];
|
|
375
375
|
readonly providers: () => [number, number, number];
|
|
376
376
|
readonly refs: (a: number, b: number) => [number, number, number];
|
|
377
|
-
readonly
|
|
377
|
+
readonly wasm_bindgen__convert__closures_____invoke__h29c63f9c3d28c112: (a: number, b: number, c: any) => void;
|
|
378
378
|
readonly __wbindgen_malloc_command_export: (a: number, b: number) => number;
|
|
379
379
|
readonly __wbindgen_realloc_command_export: (a: number, b: number, c: number, d: number) => number;
|
|
380
380
|
readonly __wbindgen_exn_store_command_export: (a: number) => void;
|
package/pkg/fossil_wasm.js
CHANGED
|
@@ -46,7 +46,7 @@ export class FileHandle {
|
|
|
46
46
|
if (Symbol.dispose) FileHandle.prototype[Symbol.dispose] = FileHandle.prototype.free;
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
|
-
* The JS-facing workspace — `
|
|
49
|
+
* The JS-facing workspace — `FossilWorkspace` on the JS side, and a
|
|
50
50
|
* `RefCell` around the Rust one.
|
|
51
51
|
*
|
|
52
52
|
* # Why the interior `RefCell`, and it is not a style choice
|
|
@@ -60,9 +60,9 @@ if (Symbol.dispose) FileHandle.prototype[Symbol.dispose] = FileHandle.prototype.
|
|
|
60
60
|
* later call on that object fails the same way for the life of the module.**
|
|
61
61
|
* One bad call poisons the workspace permanently.
|
|
62
62
|
*
|
|
63
|
-
* That is a real defect and it was reachable from correct host code:
|
|
64
|
-
*
|
|
65
|
-
* debounce, and
|
|
63
|
+
* That is a real defect and it was reachable from correct host code: an
|
|
64
|
+
* editor reproduced it by typing sixteen characters faster than its
|
|
65
|
+
* debounce, and had to carry a `busy` flag and a 120 ms coalesce to stay
|
|
66
66
|
* out of it. A mitigation a host has to remember is not a fix — and an editor
|
|
67
67
|
* is precisely the workload that forgets.
|
|
68
68
|
*
|
|
@@ -74,25 +74,25 @@ if (Symbol.dispose) FileHandle.prototype[Symbol.dispose] = FileHandle.prototype.
|
|
|
74
74
|
* **the workspace is still usable afterwards**, because a returned `Err` drops
|
|
75
75
|
* its guard where a panic did not.
|
|
76
76
|
*
|
|
77
|
-
* The Rust-side [`
|
|
77
|
+
* The Rust-side [`FossilWorkspace`] keeps its `&mut self` signatures
|
|
78
78
|
* untouched: `lsp_worker` already owns it inside an `Rc<RefCell<…>>`, and the
|
|
79
79
|
* native tests drive it directly. Only the JS boundary changed.
|
|
80
80
|
*/
|
|
81
|
-
export class
|
|
81
|
+
export class FossilWorkspace {
|
|
82
82
|
__destroy_into_raw() {
|
|
83
83
|
const ptr = this.__wbg_ptr;
|
|
84
84
|
this.__wbg_ptr = 0;
|
|
85
|
-
|
|
85
|
+
FossilWorkspaceFinalization.unregister(this);
|
|
86
86
|
return ptr;
|
|
87
87
|
}
|
|
88
88
|
free() {
|
|
89
89
|
const ptr = this.__destroy_into_raw();
|
|
90
|
-
wasm.
|
|
90
|
+
wasm.__wbg_fossilworkspace_free(ptr, 0);
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
93
93
|
* Every open **program**'s diagnostics as a flat JS array of
|
|
94
94
|
* `{ uri, range, severity, message }` rows keyed by file URI — the
|
|
95
|
-
*
|
|
95
|
+
* diagnostics panel's view. It is NOT what the LSP Worker publishes; see
|
|
96
96
|
* [`CheckRow`], and `lsp_worker::publish_diagnostics` for the wire.
|
|
97
97
|
*
|
|
98
98
|
* A buffer the installed provider catalogue claims — a `.shex` being
|
|
@@ -113,7 +113,7 @@ export class FossilPlayground {
|
|
|
113
113
|
* @returns {any}
|
|
114
114
|
*/
|
|
115
115
|
check() {
|
|
116
|
-
const ret = wasm.
|
|
116
|
+
const ret = wasm.fossilworkspace_check(this.__wbg_ptr);
|
|
117
117
|
if (ret[2]) {
|
|
118
118
|
throw takeFromExternrefTable0(ret[1]);
|
|
119
119
|
}
|
|
@@ -132,7 +132,7 @@ export class FossilPlayground {
|
|
|
132
132
|
*/
|
|
133
133
|
close_file(handle) {
|
|
134
134
|
_assertClass(handle, FileHandle);
|
|
135
|
-
const ret = wasm.
|
|
135
|
+
const ret = wasm.fossilworkspace_close_file(this.__wbg_ptr, handle.__wbg_ptr);
|
|
136
136
|
if (ret[1]) {
|
|
137
137
|
throw takeFromExternrefTable0(ret[0]);
|
|
138
138
|
}
|
|
@@ -158,7 +158,7 @@ export class FossilPlayground {
|
|
|
158
158
|
*/
|
|
159
159
|
completions(handle, line, character) {
|
|
160
160
|
_assertClass(handle, FileHandle);
|
|
161
|
-
const ret = wasm.
|
|
161
|
+
const ret = wasm.fossilworkspace_completions(this.__wbg_ptr, handle.__wbg_ptr, line, character);
|
|
162
162
|
if (ret[2]) {
|
|
163
163
|
throw takeFromExternrefTable0(ret[1]);
|
|
164
164
|
}
|
|
@@ -180,7 +180,7 @@ export class FossilPlayground {
|
|
|
180
180
|
*/
|
|
181
181
|
diagnostics_for(handle) {
|
|
182
182
|
_assertClass(handle, FileHandle);
|
|
183
|
-
const ret = wasm.
|
|
183
|
+
const ret = wasm.fossilworkspace_diagnostics_for(this.__wbg_ptr, handle.__wbg_ptr);
|
|
184
184
|
if (ret[2]) {
|
|
185
185
|
throw takeFromExternrefTable0(ret[1]);
|
|
186
186
|
}
|
|
@@ -205,7 +205,7 @@ export class FossilPlayground {
|
|
|
205
205
|
*/
|
|
206
206
|
gotoDefinition(handle, line, character) {
|
|
207
207
|
_assertClass(handle, FileHandle);
|
|
208
|
-
const ret = wasm.
|
|
208
|
+
const ret = wasm.fossilworkspace_gotoDefinition(this.__wbg_ptr, handle.__wbg_ptr, line, character);
|
|
209
209
|
if (ret[2]) {
|
|
210
210
|
throw takeFromExternrefTable0(ret[1]);
|
|
211
211
|
}
|
|
@@ -224,7 +224,7 @@ export class FossilPlayground {
|
|
|
224
224
|
*
|
|
225
225
|
* Returns a JS error if the workspace is busy, or if the result fails to
|
|
226
226
|
* serialize to `JsValue`. An unknown handle is `null`, not an error —
|
|
227
|
-
* see [`
|
|
227
|
+
* see [`FossilWorkspace::hover_row`].
|
|
228
228
|
* @param {FileHandle} handle
|
|
229
229
|
* @param {number} line
|
|
230
230
|
* @param {number} character
|
|
@@ -232,7 +232,7 @@ export class FossilPlayground {
|
|
|
232
232
|
*/
|
|
233
233
|
hover(handle, line, character) {
|
|
234
234
|
_assertClass(handle, FileHandle);
|
|
235
|
-
const ret = wasm.
|
|
235
|
+
const ret = wasm.fossilworkspace_hover(this.__wbg_ptr, handle.__wbg_ptr, line, character);
|
|
236
236
|
if (ret[2]) {
|
|
237
237
|
throw takeFromExternrefTable0(ret[1]);
|
|
238
238
|
}
|
|
@@ -251,23 +251,23 @@ export class FossilPlayground {
|
|
|
251
251
|
*/
|
|
252
252
|
missingDocuments(handle) {
|
|
253
253
|
_assertClass(handle, FileHandle);
|
|
254
|
-
const ret = wasm.
|
|
254
|
+
const ret = wasm.fossilworkspace_missingDocuments(this.__wbg_ptr, handle.__wbg_ptr);
|
|
255
255
|
if (ret[2]) {
|
|
256
256
|
throw takeFromExternrefTable0(ret[1]);
|
|
257
257
|
}
|
|
258
258
|
return takeFromExternrefTable0(ret[0]);
|
|
259
259
|
}
|
|
260
260
|
/**
|
|
261
|
-
* Construct a new
|
|
261
|
+
* Construct a new workspace.
|
|
262
262
|
*
|
|
263
263
|
* Installs `console_error_panic_hook` (idempotent) so any panic inside
|
|
264
264
|
* compiler-core surfaces as a `console.error` stack trace in the host
|
|
265
265
|
* (browser `DevTools` or Node).
|
|
266
266
|
*/
|
|
267
267
|
constructor() {
|
|
268
|
-
const ret = wasm.
|
|
268
|
+
const ret = wasm.fossilworkspace_new();
|
|
269
269
|
this.__wbg_ptr = ret;
|
|
270
|
-
|
|
270
|
+
FossilWorkspaceFinalization.register(this, this.__wbg_ptr, this);
|
|
271
271
|
return this;
|
|
272
272
|
}
|
|
273
273
|
/**
|
|
@@ -281,7 +281,7 @@ export class FossilPlayground {
|
|
|
281
281
|
* # Errors
|
|
282
282
|
*
|
|
283
283
|
* Returns a JS error if the workspace is already inside another call —
|
|
284
|
-
* see the type-level note on [`
|
|
284
|
+
* see the type-level note on [`WasmWorkspace`].
|
|
285
285
|
* @param {string} path
|
|
286
286
|
* @param {string} contents
|
|
287
287
|
* @returns {FileHandle}
|
|
@@ -291,7 +291,7 @@ export class FossilPlayground {
|
|
|
291
291
|
const len0 = WASM_VECTOR_LEN;
|
|
292
292
|
const ptr1 = passStringToWasm0(contents, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
|
|
293
293
|
const len1 = WASM_VECTOR_LEN;
|
|
294
|
-
const ret = wasm.
|
|
294
|
+
const ret = wasm.fossilworkspace_open_file(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
295
295
|
if (ret[2]) {
|
|
296
296
|
throw takeFromExternrefTable0(ret[1]);
|
|
297
297
|
}
|
|
@@ -312,7 +312,7 @@ export class FossilPlayground {
|
|
|
312
312
|
const len0 = WASM_VECTOR_LEN;
|
|
313
313
|
const ptr1 = passStringToWasm0(text, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
|
|
314
314
|
const len1 = WASM_VECTOR_LEN;
|
|
315
|
-
const ret = wasm.
|
|
315
|
+
const ret = wasm.fossilworkspace_registerDocument(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
316
316
|
if (ret[1]) {
|
|
317
317
|
throw takeFromExternrefTable0(ret[0]);
|
|
318
318
|
}
|
|
@@ -337,7 +337,7 @@ export class FossilPlayground {
|
|
|
337
337
|
registerInferredDescriptor(descriptor_json) {
|
|
338
338
|
const ptr0 = passStringToWasm0(descriptor_json, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
|
|
339
339
|
const len0 = WASM_VECTOR_LEN;
|
|
340
|
-
const ret = wasm.
|
|
340
|
+
const ret = wasm.fossilworkspace_registerInferredDescriptor(this.__wbg_ptr, ptr0, len0);
|
|
341
341
|
if (ret[1]) {
|
|
342
342
|
throw takeFromExternrefTable0(ret[0]);
|
|
343
343
|
}
|
|
@@ -353,7 +353,7 @@ export class FossilPlayground {
|
|
|
353
353
|
* @param {any} connections
|
|
354
354
|
*/
|
|
355
355
|
setConnections(connections) {
|
|
356
|
-
const ret = wasm.
|
|
356
|
+
const ret = wasm.fossilworkspace_setConnections(this.__wbg_ptr, connections);
|
|
357
357
|
if (ret[1]) {
|
|
358
358
|
throw takeFromExternrefTable0(ret[0]);
|
|
359
359
|
}
|
|
@@ -371,7 +371,7 @@ export class FossilPlayground {
|
|
|
371
371
|
*/
|
|
372
372
|
sources(handle) {
|
|
373
373
|
_assertClass(handle, FileHandle);
|
|
374
|
-
const ret = wasm.
|
|
374
|
+
const ret = wasm.fossilworkspace_sources(this.__wbg_ptr, handle.__wbg_ptr);
|
|
375
375
|
if (ret[2]) {
|
|
376
376
|
throw takeFromExternrefTable0(ret[1]);
|
|
377
377
|
}
|
|
@@ -391,7 +391,7 @@ export class FossilPlayground {
|
|
|
391
391
|
*
|
|
392
392
|
* Returns a JS error if `handle` was never opened or was already closed,
|
|
393
393
|
* or if the workspace is already inside another call — see the type-level
|
|
394
|
-
* note on [`
|
|
394
|
+
* note on [`WasmWorkspace`]. **Neither leaves the workspace unusable**,
|
|
395
395
|
* which is the whole reason this method takes `&self`.
|
|
396
396
|
* @param {FileHandle} handle
|
|
397
397
|
* @param {string} contents
|
|
@@ -400,13 +400,13 @@ export class FossilPlayground {
|
|
|
400
400
|
_assertClass(handle, FileHandle);
|
|
401
401
|
const ptr0 = passStringToWasm0(contents, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
|
|
402
402
|
const len0 = WASM_VECTOR_LEN;
|
|
403
|
-
const ret = wasm.
|
|
403
|
+
const ret = wasm.fossilworkspace_update_file(this.__wbg_ptr, handle.__wbg_ptr, ptr0, len0);
|
|
404
404
|
if (ret[1]) {
|
|
405
405
|
throw takeFromExternrefTable0(ret[0]);
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
|
-
if (Symbol.dispose)
|
|
409
|
+
if (Symbol.dispose) FossilWorkspace.prototype[Symbol.dispose] = FossilWorkspace.prototype.free;
|
|
410
410
|
|
|
411
411
|
/**
|
|
412
412
|
* The providers this host installs (`io.csv`, `io.rdf`, `io.shex`, …) as a JS
|
|
@@ -806,7 +806,7 @@ function __wbg_get_imports() {
|
|
|
806
806
|
},
|
|
807
807
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
808
808
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 6, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
809
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
809
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h29c63f9c3d28c112);
|
|
810
810
|
return ret;
|
|
811
811
|
},
|
|
812
812
|
__wbindgen_cast_0000000000000002: function(arg0) {
|
|
@@ -845,16 +845,16 @@ function __wbg_get_imports() {
|
|
|
845
845
|
};
|
|
846
846
|
}
|
|
847
847
|
|
|
848
|
-
function
|
|
849
|
-
wasm.
|
|
848
|
+
function wasm_bindgen__convert__closures_____invoke__h29c63f9c3d28c112(arg0, arg1, arg2) {
|
|
849
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h29c63f9c3d28c112(arg0, arg1, arg2);
|
|
850
850
|
}
|
|
851
851
|
|
|
852
852
|
const FileHandleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
853
853
|
? { register: () => {}, unregister: () => {} }
|
|
854
854
|
: new FinalizationRegistry(ptr => wasm.__wbg_filehandle_free(ptr, 1));
|
|
855
|
-
const
|
|
855
|
+
const FossilWorkspaceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
856
856
|
? { register: () => {}, unregister: () => {} }
|
|
857
|
-
: new FinalizationRegistry(ptr => wasm.
|
|
857
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_fossilworkspace_free(ptr, 1));
|
|
858
858
|
|
|
859
859
|
function addToExternrefTable0(obj) {
|
|
860
860
|
const idx = wasm.__externref_table_alloc_command_export();
|
package/pkg/fossil_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -6,24 +6,24 @@ export const tokenize: (a: number, b: number) => [number, number, number];
|
|
|
6
6
|
export const semantic_legend: () => [number, number, number];
|
|
7
7
|
export const tokenKinds: () => [number, number, number];
|
|
8
8
|
export const __wbg_filehandle_free: (a: number, b: number) => void;
|
|
9
|
-
export const
|
|
10
|
-
export const
|
|
11
|
-
export const
|
|
12
|
-
export const
|
|
13
|
-
export const
|
|
14
|
-
export const
|
|
15
|
-
export const
|
|
16
|
-
export const
|
|
17
|
-
export const
|
|
18
|
-
export const
|
|
19
|
-
export const
|
|
20
|
-
export const
|
|
21
|
-
export const
|
|
22
|
-
export const
|
|
23
|
-
export const
|
|
9
|
+
export const __wbg_fossilworkspace_free: (a: number, b: number) => void;
|
|
10
|
+
export const fossilworkspace_new: () => number;
|
|
11
|
+
export const fossilworkspace_open_file: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
12
|
+
export const fossilworkspace_update_file: (a: number, b: number, c: number, d: number) => [number, number];
|
|
13
|
+
export const fossilworkspace_close_file: (a: number, b: number) => [number, number];
|
|
14
|
+
export const fossilworkspace_check: (a: number) => [number, number, number];
|
|
15
|
+
export const fossilworkspace_diagnostics_for: (a: number, b: number) => [number, number, number];
|
|
16
|
+
export const fossilworkspace_setConnections: (a: number, b: any) => [number, number];
|
|
17
|
+
export const fossilworkspace_missingDocuments: (a: number, b: number) => [number, number, number];
|
|
18
|
+
export const fossilworkspace_registerDocument: (a: number, b: number, c: number, d: number, e: number) => [number, number];
|
|
19
|
+
export const fossilworkspace_sources: (a: number, b: number) => [number, number, number];
|
|
20
|
+
export const fossilworkspace_hover: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
21
|
+
export const fossilworkspace_completions: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
22
|
+
export const fossilworkspace_gotoDefinition: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
23
|
+
export const fossilworkspace_registerInferredDescriptor: (a: number, b: number, c: number) => [number, number];
|
|
24
24
|
export const providers: () => [number, number, number];
|
|
25
25
|
export const refs: (a: number, b: number) => [number, number, number];
|
|
26
|
-
export const
|
|
26
|
+
export const wasm_bindgen__convert__closures_____invoke__h29c63f9c3d28c112: (a: number, b: number, c: any) => void;
|
|
27
27
|
export const __wbindgen_malloc_command_export: (a: number, b: number) => number;
|
|
28
28
|
export const __wbindgen_realloc_command_export: (a: number, b: number, c: number, d: number) => number;
|
|
29
29
|
export const __wbindgen_exn_store_command_export: (a: number) => void;
|