@ttsc/wasm 0.30.3 → 0.31.0
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 +3 -3
- package/build/build-wasm.cjs +5 -4
- package/build/go-build-cache.cjs +347 -0
- package/build/pack-prepare.cjs +3 -2
- package/cmd/ttsc-wasm/main.go +22 -10
- package/cmd/ttsc-wasm/main_wasm.go +2 -2
- package/dist/.ttsc-wasm-build.json +138 -58
- package/dist/go.mod +7 -5
- package/dist/ttsc.wasm +2 -2
- package/go.mod +7 -5
- package/go.sum +10 -10
- package/host/api.go +34 -41
- package/host/doc.go +7 -6
- package/host/expose.go +42 -0
- package/host/fountain.go +192 -22
- package/host/host.go +10 -25
- package/host/host_native.go +3 -5
- package/host/invoke.go +133 -0
- package/host/plugin.go +37 -72
- package/host/result.go +108 -0
- package/lib/src/BootTtscWorkerTerminationError.d.ts +20 -0
- package/lib/src/BootTtscWorkerTerminationError.js +20 -0
- package/lib/src/BootTtscWorkerTerminationError.js.map +1 -1
- package/lib/src/MemFSError.d.ts +21 -2
- package/lib/src/MemFSError.js +25 -2
- package/lib/src/MemFSError.js.map +1 -1
- package/lib/src/bootTtsc.d.ts +49 -2
- package/lib/src/bootTtsc.js +89 -23
- package/lib/src/bootTtsc.js.map +1 -1
- package/lib/src/createMemFS.d.ts +45 -0
- package/lib/src/createMemFS.js +269 -66
- package/lib/src/createMemFS.js.map +1 -1
- package/lib/src/parseResult.d.ts +19 -0
- package/lib/src/parseResult.js +19 -0
- package/lib/src/parseResult.js.map +1 -1
- package/lib/src/structures/IBootResult.d.ts +20 -2
- package/lib/src/structures/IBootTtscOptions.d.ts +28 -6
- package/lib/src/structures/IFileStats.d.ts +51 -0
- package/lib/src/structures/IMemFSHost.d.ts +89 -0
- package/lib/src/structures/ITtscApi.d.ts +154 -9
- package/lib/src/structures/ITtscBuildOpts.d.ts +18 -1
- package/lib/src/structures/ITtscCompileResult.d.ts +20 -2
- package/lib/src/structures/ITtscDiagnostic.d.ts +25 -1
- package/lib/src/structures/ITtscFileQuery.d.ts +19 -1
- package/lib/src/structures/ITtscFountainDiagnosticsResult.d.ts +20 -1
- package/lib/src/structures/ITtscNodeAtPositionResult.d.ts +18 -1
- package/lib/src/structures/ITtscNodeInfo.d.ts +23 -2
- package/lib/src/structures/ITtscPluginOpts.d.ts +24 -3
- package/lib/src/structures/ITtscPositionQuery.d.ts +21 -4
- package/lib/src/structures/ITtscReleaseSnapshotResult.d.ts +22 -2
- package/lib/src/structures/ITtscResult.d.ts +31 -5
- package/lib/src/structures/ITtscSnapshotHandle.d.ts +19 -1
- package/lib/src/structures/ITtscSnapshotResult.d.ts +22 -1
- package/lib/src/structures/ITtscSnapshotsResult.d.ts +19 -1
- package/lib/src/structures/ITtscSourceFileTextResult.d.ts +19 -1
- package/lib/src/structures/ITtscSourceFilesResult.d.ts +23 -2
- package/lib/src/structures/ITtscSymbolAtPositionResult.d.ts +18 -1
- package/lib/src/structures/ITtscSymbolDeclaration.d.ts +25 -2
- package/lib/src/structures/ITtscSymbolInfo.d.ts +19 -1
- package/lib/src/structures/ITtscTransformResult.d.ts +21 -3
- package/lib/src/structures/ITtscTypeAtPositionResult.d.ts +18 -1
- package/lib/src/structures/ITtscTypeInfo.d.ts +19 -1
- package/lib/src/structures/ITtscVersion.d.ts +28 -1
- package/lib/src/structures/IWasmExecFS.d.ts +310 -0
- package/package.json +4 -2
- package/shim-vendor/shim/ast/enums_gen.go +4 -2
- package/shim-vendor/shim/ast/go.mod +5 -5
- package/shim-vendor/shim/ast/go.sum +10 -10
- package/shim-vendor/shim/ast/lint.go +1088 -20
- package/shim-vendor/shim/ast/parent.go +38 -22
- package/shim-vendor/shim/ast/safe_text.go +48 -26
- package/shim-vendor/shim/ast/shim.go +1307 -20
- package/shim-vendor/shim/ast/test/next_jsdoc_comment_location_reaches_variable_statement_test.go +51 -0
- package/shim-vendor/shim/ast/test/node_text_joins_multi_hop_qualified_name_test.go +24 -9
- package/shim-vendor/shim/ast/test/node_text_joins_one_hop_qualified_name_test.go +9 -5
- package/shim-vendor/shim/ast/test/node_text_returns_empty_for_nil_test.go +13 -5
- package/shim-vendor/shim/ast/test/node_text_returns_identifier_text_test.go +12 -5
- package/shim-vendor/shim/ast/test/node_text_skips_empty_qualified_left_test.go +35 -5
- package/shim-vendor/shim/astnav/go.mod +5 -5
- package/shim-vendor/shim/astnav/go.sum +12 -10
- package/shim-vendor/shim/astnav/shim.go +9 -0
- package/shim-vendor/shim/bundled/go.mod +7 -1
- package/shim-vendor/shim/bundled/go.sum +12 -0
- package/shim-vendor/shim/checker/enums_gen.go +4 -2
- package/shim-vendor/shim/checker/extra-shim.json +6 -0
- package/shim-vendor/shim/checker/go.mod +5 -5
- package/shim-vendor/shim/checker/go.sum +10 -10
- package/shim-vendor/shim/checker/node_builder_fields_gen.go +19 -0
- package/shim-vendor/shim/checker/shim.go +827 -114
- package/shim-vendor/shim/compiler/emit_sourcemap.go +68 -29
- package/shim-vendor/shim/compiler/emitassemble.go +36 -2
- package/shim-vendor/shim/compiler/emithook.go +13 -3
- package/shim-vendor/shim/compiler/go.mod +5 -5
- package/shim-vendor/shim/compiler/go.sum +10 -10
- package/shim-vendor/shim/compiler/incremental.go +56 -20
- package/shim-vendor/shim/compiler/resolution.go +92 -9
- package/shim-vendor/shim/core/enums_gen.go +2 -2
- package/shim-vendor/shim/core/go.mod +6 -1
- package/shim-vendor/shim/core/go.sum +10 -0
- package/shim-vendor/shim/core/modulekind.go +9 -0
- package/shim-vendor/shim/core/shim.go +157 -6
- package/shim-vendor/shim/diagnosticwriter/go.mod +10 -1
- package/shim-vendor/shim/diagnosticwriter/go.sum +20 -0
- package/shim-vendor/shim/diagnosticwriter/lint.go +188 -10
- package/shim-vendor/shim/diagnosticwriter/shim.go +14 -0
- package/shim-vendor/shim/lsp/go.mod +5 -5
- package/shim-vendor/shim/lsp/go.sum +10 -10
- package/shim-vendor/shim/lsp/shim.go +78 -2
- package/shim-vendor/shim/parser/go.mod +10 -1
- package/shim-vendor/shim/parser/go.sum +22 -0
- package/shim-vendor/shim/printer/emithost.go +46 -1
- package/shim-vendor/shim/printer/go.mod +5 -5
- package/shim-vendor/shim/printer/go.sum +10 -10
- package/shim-vendor/shim/printer/shim.go +114 -7
- package/shim-vendor/shim/printer/sourcemap.go +55 -0
- package/shim-vendor/shim/scanner/go.mod +10 -1
- package/shim-vendor/shim/scanner/go.sum +20 -0
- package/shim-vendor/shim/scanner/regexp.go +19 -4
- package/shim-vendor/shim/scanner/shim.go +3 -0
- package/shim-vendor/shim/stringutil/extra-shim.json +1 -0
- package/shim-vendor/shim/stringutil/go.mod +5 -0
- package/shim-vendor/shim/stringutil/go.sum +2 -0
- package/shim-vendor/shim/stringutil/shim.go +119 -0
- package/shim-vendor/shim/transformers/go.mod +5 -5
- package/shim-vendor/shim/transformers/go.sum +12 -10
- package/shim-vendor/shim/transformers/shim.go +12 -3
- package/shim-vendor/shim/tsoptions/command_line_raw.go +44 -0
- package/shim-vendor/shim/tsoptions/go.mod +10 -1
- package/shim-vendor/shim/tsoptions/go.sum +22 -0
- package/shim-vendor/shim/tsoptions/shim.go +1 -1
- package/shim-vendor/shim/tspath/go.mod +1 -1
- package/shim-vendor/shim/tspath/go.sum +6 -0
- package/shim-vendor/shim/vfs/cachedvfs/go.mod +3 -1
- package/shim-vendor/shim/vfs/cachedvfs/go.sum +12 -0
- package/shim-vendor/shim/vfs/decode.go +26 -0
- package/shim-vendor/shim/vfs/decode_test.go +42 -0
- package/shim-vendor/shim/vfs/go.mod +7 -1
- package/shim-vendor/shim/vfs/go.sum +12 -0
- package/shim-vendor/shim/vfs/osvfs/go.mod +7 -1
- package/shim-vendor/shim/vfs/osvfs/go.sum +12 -0
- package/src/BootTtscWorkerTerminationError.ts +22 -0
- package/src/MemFSError.ts +29 -2
- package/src/bootTtsc.ts +104 -28
- package/src/createMemFS.ts +291 -64
- package/src/parseResult.ts +19 -0
- package/src/structures/IBootResult.ts +21 -2
- package/src/structures/IBootTtscOptions.ts +32 -6
- package/src/structures/IFileStats.ts +65 -0
- package/src/structures/IMemFSHost.ts +97 -0
- package/src/structures/ITtscApi.ts +154 -9
- package/src/structures/ITtscBuildOpts.ts +19 -1
- package/src/structures/ITtscCompileResult.ts +21 -2
- package/src/structures/ITtscDiagnostic.ts +32 -1
- package/src/structures/ITtscFileQuery.ts +19 -1
- package/src/structures/ITtscFountainDiagnosticsResult.ts +20 -1
- package/src/structures/ITtscNodeAtPositionResult.ts +18 -1
- package/src/structures/ITtscNodeInfo.ts +27 -2
- package/src/structures/ITtscPluginOpts.ts +28 -3
- package/src/structures/ITtscPositionQuery.ts +21 -4
- package/src/structures/ITtscReleaseSnapshotResult.ts +22 -2
- package/src/structures/ITtscResult.ts +34 -5
- package/src/structures/ITtscSnapshotHandle.ts +19 -1
- package/src/structures/ITtscSnapshotResult.ts +22 -1
- package/src/structures/ITtscSnapshotsResult.ts +19 -1
- package/src/structures/ITtscSourceFileTextResult.ts +19 -1
- package/src/structures/ITtscSourceFilesResult.ts +23 -2
- package/src/structures/ITtscSymbolAtPositionResult.ts +18 -1
- package/src/structures/ITtscSymbolDeclaration.ts +27 -2
- package/src/structures/ITtscSymbolInfo.ts +23 -1
- package/src/structures/ITtscTransformResult.ts +22 -3
- package/src/structures/ITtscTypeAtPositionResult.ts +18 -1
- package/src/structures/ITtscTypeInfo.ts +20 -1
- package/src/structures/ITtscVersion.ts +33 -1
- package/src/structures/IWasmExecFS.ts +336 -0
|
@@ -7,33 +7,335 @@ import type { IFileStats } from "./IFileStats";
|
|
|
7
7
|
* implementation fulfils this interface. Only the operations that
|
|
8
8
|
* typescript-go's compiler exercises are required; the rest are no-ops or
|
|
9
9
|
* return `EPERM`/`EINVAL`.
|
|
10
|
+
*
|
|
11
|
+
* @evidence contracts/common.md#principled-implementation
|
|
12
|
+
* Node-style callback signatures and open flags adapt Go's js/wasm filesystem
|
|
13
|
+
* bridge. The declared capability is virtual files/directories, not full POSIX.
|
|
14
|
+
* @evidence contracts/common.md#clear-and-simple-design
|
|
15
|
+
* Node-shaped verbs are the Go runtime's existing extension boundary. The
|
|
16
|
+
* interface separates seekable files, captured streams and unsupported links
|
|
17
|
+
* without introducing another protocol between the runtime and its host.
|
|
18
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts
|
|
19
|
+
* Unsupported links remain explicit errors; permission/ownership/time setters
|
|
20
|
+
* are documented no-ops rather than hidden claims of native filesystem support.
|
|
21
|
+
* @evidence contracts/common.md#meaningful-documentation
|
|
22
|
+
* Native JSDoc names bridge scope, callback conventions and capability limits,
|
|
23
|
+
* following the documentation skill's context and failure guidance.
|
|
24
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources IWasmExecFS only groups the virtual-filesystem members and acquires no handle, task or retained state.
|
|
25
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms IWasmExecFS only groups the virtual-filesystem members and chooses no algorithm.
|
|
26
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work IWasmExecFS only groups the virtual-filesystem members and coordinates no computation.
|
|
10
27
|
*/
|
|
11
28
|
export interface IWasmExecFS {
|
|
29
|
+
/** Virtual open-flag values consumed by the Go bridge. */
|
|
12
30
|
constants: Record<string, number>;
|
|
31
|
+
/**
|
|
32
|
+
* Write all supplied bytes at a file cursor or to captured fd 1/2.
|
|
33
|
+
*
|
|
34
|
+
* @evidence contracts/common.md#principled-implementation Synchronous writes mirror the bridge's byte-buffer operation.
|
|
35
|
+
* @evidence contracts/common.md#clear-and-simple-design The synchronous whole-buffer write is distinct from callback byte-slice writes because wasm_exec uses both call shapes.
|
|
36
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Unknown descriptors throw rather than diverting writes to a diagnostic stream.
|
|
37
|
+
* @evidence contracts/common.md#meaningful-documentation JSDoc states descriptor and stream roles under the documentation skill's context guidance.
|
|
38
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources writeSync is a signature only; the lifetime of what it touches belongs to createMemFS.
|
|
39
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms writeSync is a signature only; its algorithm and cost belong to createMemFS.
|
|
40
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work writeSync is a signature only; sharing of repeated work belongs to createMemFS.
|
|
41
|
+
*/
|
|
13
42
|
writeSync(fd: number, buf: Uint8Array): number;
|
|
43
|
+
/**
|
|
44
|
+
* Write a byte slice; null position uses the cursor, while append uses EOF.
|
|
45
|
+
*
|
|
46
|
+
* @evidence contracts/common.md#principled-implementation The Node callback operation separates buffer offsets from seek position.
|
|
47
|
+
* @evidence contracts/common.md#clear-and-simple-design Byte slice, descriptor position and completion stay explicit instead of overloading one offset parameter.
|
|
48
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Access mode and stream identity own dispatch, without guessing a destination from payload bytes.
|
|
49
|
+
* @evidence contracts/common.md#meaningful-documentation JSDoc states position and append meaning under the documentation skill's units guidance.
|
|
50
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources write is a signature only; the lifetime of what it touches belongs to createMemFS.
|
|
51
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms write is a signature only; its algorithm and cost belong to createMemFS.
|
|
52
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work write is a signature only; sharing of repeated work belongs to createMemFS.
|
|
53
|
+
*/
|
|
14
54
|
write(fd: number, buf: Uint8Array, offset: number, length: number, position: number | null, callback: (err: NodeJS.ErrnoException | null, n: number) => void): void;
|
|
55
|
+
/**
|
|
56
|
+
* Open a virtual path with bridge flags; low-level creation requires its
|
|
57
|
+
* parent.
|
|
58
|
+
*
|
|
59
|
+
* @evidence contracts/common.md#principled-implementation Node-shaped flags select file access and the returned descriptor owns its cursor.
|
|
60
|
+
* @evidence contracts/common.md#clear-and-simple-design One open boundary captures access flags and descriptor identity; recursive seeding remains outside this low-level operation.
|
|
61
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Parent creation stays in writeFile/mkdirp instead of silently changing low-level open semantics.
|
|
62
|
+
* @evidence contracts/common.md#meaningful-documentation JSDoc explains parent and descriptor ownership under the documentation skill's context guidance.
|
|
63
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources open is a signature only; the lifetime of what it touches belongs to createMemFS.
|
|
64
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms open is a signature only; its algorithm and cost belong to createMemFS.
|
|
65
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work open is a signature only; sharing of repeated work belongs to createMemFS.
|
|
66
|
+
*/
|
|
15
67
|
open(path: string, flags: number, mode: number, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
|
|
68
|
+
/**
|
|
69
|
+
* Release an open descriptor; closing a pipe write end signals EOF to
|
|
70
|
+
* readers.
|
|
71
|
+
*
|
|
72
|
+
* @evidence contracts/common.md#principled-implementation Explicit close follows descriptor ownership and the virtual pipe's endpoint lifecycle.
|
|
73
|
+
* @evidence contracts/common.md#clear-and-simple-design Descriptor release is one operation; file nodes and the two pipe endpoint roles keep their separate lifetimes.
|
|
74
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Unknown descriptors remain errors rather than guessed already-closed successes.
|
|
75
|
+
* @evidence contracts/common.md#meaningful-documentation JSDoc explains release and EOF effects under the documentation skill's ownership guidance.
|
|
76
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources close is a signature only; the lifetime of what it touches belongs to createMemFS.
|
|
77
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms close is a signature only; its algorithm and cost belong to createMemFS.
|
|
78
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work close is a signature only; sharing of repeated work belongs to createMemFS.
|
|
79
|
+
*/
|
|
16
80
|
close(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
81
|
+
/**
|
|
82
|
+
* Read a byte slice; null position advances the file cursor by bytes read.
|
|
83
|
+
*
|
|
84
|
+
* @evidence contracts/common.md#principled-implementation Node callback arguments distinguish destination-buffer offsets from file position.
|
|
85
|
+
* @evidence contracts/common.md#clear-and-simple-design Explicit slice and seek parameters preserve the bridge contract without exposing internal cursor or queue objects.
|
|
86
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Descriptor access mode owns reads; EOF does not rewind a cursor past the current file length.
|
|
87
|
+
* @evidence contracts/common.md#meaningful-documentation JSDoc states byte units and cursor movement under the documentation skill's units guidance.
|
|
88
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources read is a signature only; the lifetime of what it touches belongs to createMemFS.
|
|
89
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms read is a signature only; its algorithm and cost belong to createMemFS.
|
|
90
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work read is a signature only; sharing of repeated work belongs to createMemFS.
|
|
91
|
+
*/
|
|
17
92
|
read(fd: number, buffer: Uint8Array, offset: number, length: number, position: number | null, callback: (err: NodeJS.ErrnoException | null, n: number) => void): void;
|
|
93
|
+
/**
|
|
94
|
+
* Return sorted immediate child names of a virtual directory.
|
|
95
|
+
*
|
|
96
|
+
* @evidence contracts/common.md#principled-implementation A Node-style names array exposes directory membership independently from stat data.
|
|
97
|
+
* @evidence contracts/common.md#clear-and-simple-design Listing returns immediate names only, leaving metadata and recursion to their existing separate operations.
|
|
98
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Entries come from the owned tree rather than expected source-file names.
|
|
99
|
+
* @evidence contracts/common.md#meaningful-documentation JSDoc states depth and order under the documentation skill's context guidance.
|
|
100
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources readdir is a signature only; the lifetime of what it touches belongs to createMemFS.
|
|
101
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms readdir is a signature only; its algorithm and cost belong to createMemFS.
|
|
102
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work readdir is a signature only; sharing of repeated work belongs to createMemFS.
|
|
103
|
+
*/
|
|
18
104
|
readdir(path: string, callback: (err: NodeJS.ErrnoException | null, entries: string[]) => void): void;
|
|
105
|
+
/**
|
|
106
|
+
* Create one directory with an existing parent; virtual permissions are
|
|
107
|
+
* fixed.
|
|
108
|
+
*
|
|
109
|
+
* @evidence contracts/common.md#principled-implementation Single-directory creation remains distinct from the host's recursive seeding API.
|
|
110
|
+
* @evidence contracts/common.md#clear-and-simple-design One-directory creation keeps bridge semantics visible rather than silently creating missing ancestor chains.
|
|
111
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Existing nodes and missing parents remain errors instead of being rewritten to fit a requested path.
|
|
112
|
+
* @evidence contracts/common.md#meaningful-documentation JSDoc explains creation depth and permission capability under the documentation skill's context guidance.
|
|
113
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources mkdir is a signature only; the lifetime of what it touches belongs to createMemFS.
|
|
114
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms mkdir is a signature only; its algorithm and cost belong to createMemFS.
|
|
115
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work mkdir is a signature only; sharing of repeated work belongs to createMemFS.
|
|
116
|
+
*/
|
|
19
117
|
mkdir(path: string, perm: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
118
|
+
/**
|
|
119
|
+
* Sample virtual file/directory metadata. Inspect err first; stats is absent
|
|
120
|
+
* on error and valid only after a successful callback.
|
|
121
|
+
*
|
|
122
|
+
* @evidence contracts/common.md#principled-implementation Node-shaped metadata adapts the Go bridge's stat consumer.
|
|
123
|
+
* @evidence contracts/common.md#clear-and-simple-design Path lookup projects one stats snapshot through the bridge's err-first callback, without another metadata cache contract.
|
|
124
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Missing paths produce errors rather than synthetic existing-file metadata.
|
|
125
|
+
* @evidence contracts/common.md#meaningful-documentation JSDoc states virtual provenance and error absence under the documentation skill's context guidance.
|
|
126
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources stat is a signature only; the lifetime of what it touches belongs to createMemFS.
|
|
127
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms stat is a signature only; its algorithm and cost belong to createMemFS.
|
|
128
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work stat is a signature only; sharing of repeated work belongs to createMemFS.
|
|
129
|
+
*/
|
|
20
130
|
stat(path: string, callback: (err: NodeJS.ErrnoException | null, stats: IFileStats) => void): void;
|
|
131
|
+
/**
|
|
132
|
+
* Sample path metadata; equivalent to stat because MemFS has no symlinks.
|
|
133
|
+
*
|
|
134
|
+
* @evidence contracts/common.md#principled-implementation Delegating to stat reuses the same metadata projection within the declared virtual capability.
|
|
135
|
+
* @evidence contracts/common.md#clear-and-simple-design The required bridge alias delegates to stat because no supported node can be a symlink.
|
|
136
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The no-symlink capability is explicit rather than pretending to resolve arbitrary link targets.
|
|
137
|
+
* @evidence contracts/common.md#meaningful-documentation JSDoc explains equivalence and its reason under the documentation skill's rationale guidance.
|
|
138
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources lstat is a signature only; the lifetime of what it touches belongs to createMemFS.
|
|
139
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms lstat is a signature only; its algorithm and cost belong to createMemFS.
|
|
140
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work lstat is a signature only; sharing of repeated work belongs to createMemFS.
|
|
141
|
+
*/
|
|
21
142
|
lstat(path: string, callback: (err: NodeJS.ErrnoException | null, stats: IFileStats) => void): void;
|
|
143
|
+
/**
|
|
144
|
+
* Sample the inode retained by a descriptor, or synthetic pipe-end metadata.
|
|
145
|
+
* Inspect err before using stats, which is absent on error.
|
|
146
|
+
*
|
|
147
|
+
* @evidence contracts/common.md#principled-implementation Open-node identity supplies stats even after the path is removed or replaced.
|
|
148
|
+
* @evidence contracts/common.md#clear-and-simple-design Descriptor stats resolve retained identity directly rather than adding a path-to-descriptor translation layer.
|
|
149
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Descriptor metadata does not silently re-resolve a path to a different inode.
|
|
150
|
+
* @evidence contracts/common.md#meaningful-documentation JSDoc states retained-node and pipe roles under the documentation skill's ownership guidance.
|
|
151
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources fstat is a signature only; the lifetime of what it touches belongs to createMemFS.
|
|
152
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms fstat is a signature only; its algorithm and cost belong to createMemFS.
|
|
153
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work fstat is a signature only; sharing of repeated work belongs to createMemFS.
|
|
154
|
+
*/
|
|
22
155
|
fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: IFileStats) => void): void;
|
|
156
|
+
/**
|
|
157
|
+
* Acknowledge an in-memory flush; MemFS provides no durable backing store.
|
|
158
|
+
*
|
|
159
|
+
* @evidence contracts/common.md#principled-implementation The callback-shaped operation adapts the bridge to an entirely memory-backed store.
|
|
160
|
+
* @evidence contracts/common.md#clear-and-simple-design The required flush callback is explicit while persistence remains outside this memory-only filesystem's capabilities.
|
|
161
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Success does not claim disk durability or mutate foreign storage APIs.
|
|
162
|
+
* @evidence contracts/common.md#meaningful-documentation JSDoc states the durability limit under the documentation skill's capability guidance.
|
|
163
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources fsync is a signature only; the lifetime of what it touches belongs to createMemFS.
|
|
164
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms fsync is a signature only; its algorithm and cost belong to createMemFS.
|
|
165
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work fsync is a signature only; sharing of repeated work belongs to createMemFS.
|
|
166
|
+
*/
|
|
23
167
|
fsync(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
168
|
+
/**
|
|
169
|
+
* Remove a file path; open descriptors retain its node until closed.
|
|
170
|
+
*
|
|
171
|
+
* @evidence contracts/common.md#principled-implementation Path removal and open-node lifetime follow separate ownership identities.
|
|
172
|
+
* @evidence contracts/common.md#clear-and-simple-design File unlink owns path removal; directory removal and descriptor close retain their separate named responsibilities.
|
|
173
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Directories are rejected rather than orphaning descendants through file removal.
|
|
174
|
+
* @evidence contracts/common.md#meaningful-documentation JSDoc explains path versus descriptor lifetime under the documentation skill's ownership guidance.
|
|
175
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources unlink is a signature only; the lifetime of what it touches belongs to createMemFS.
|
|
176
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms unlink is a signature only; its algorithm and cost belong to createMemFS.
|
|
177
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work unlink is a signature only; sharing of repeated work belongs to createMemFS.
|
|
178
|
+
*/
|
|
24
179
|
unlink(path: string, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
180
|
+
/**
|
|
181
|
+
* Move a file or directory subtree after validating destination
|
|
182
|
+
* compatibility.
|
|
183
|
+
*
|
|
184
|
+
* @evidence contracts/common.md#principled-implementation Tree mutation preserves node identity and moves descendant paths as one operation.
|
|
185
|
+
* @evidence contracts/common.md#clear-and-simple-design A single subtree move owns validation and rebasing instead of composing public delete and recreate operations.
|
|
186
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts A rejected destination does not trigger partial moves or type coercion to force success.
|
|
187
|
+
* @evidence contracts/common.md#meaningful-documentation JSDoc states subtree scope and validation ownership under the documentation skill's failure guidance.
|
|
188
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources rename is a signature only; the lifetime of what it touches belongs to createMemFS.
|
|
189
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms rename is a signature only; its algorithm and cost belong to createMemFS.
|
|
190
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work rename is a signature only; sharing of repeated work belongs to createMemFS.
|
|
191
|
+
*/
|
|
25
192
|
rename(from: string, to: string, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
193
|
+
/**
|
|
194
|
+
* Remove an empty virtual directory; root remains owned by the host.
|
|
195
|
+
*
|
|
196
|
+
* @evidence contracts/common.md#principled-implementation Directory removal validates kind and emptiness separately from file unlink.
|
|
197
|
+
* @evidence contracts/common.md#clear-and-simple-design Empty-directory removal has a focused boundary and leaves recursive deletion outside the bridge contract.
|
|
198
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Nonempty directories are not recursively erased to satisfy a single rmdir request.
|
|
199
|
+
* @evidence contracts/common.md#meaningful-documentation JSDoc explains empty-only and root boundaries under the documentation skill's context guidance.
|
|
200
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources rmdir is a signature only; the lifetime of what it touches belongs to createMemFS.
|
|
201
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms rmdir is a signature only; its algorithm and cost belong to createMemFS.
|
|
202
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work rmdir is a signature only; sharing of repeated work belongs to createMemFS.
|
|
203
|
+
*/
|
|
26
204
|
rmdir(path: string, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
205
|
+
/**
|
|
206
|
+
* Compatibility no-op: virtual file permissions cannot be changed.
|
|
207
|
+
*
|
|
208
|
+
* @evidence contracts/common.md#principled-implementation The bridge signature is retained within the documented fixed-permission capability.
|
|
209
|
+
* @evidence contracts/common.md#clear-and-simple-design The required path-permission verb documents its no-op capability without creating unused permission state.
|
|
210
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The no-op is explicit rather than claimed as native permission enforcement.
|
|
211
|
+
* @evidence contracts/common.md#meaningful-documentation JSDoc identifies the absent capability under the documentation skill's context guidance.
|
|
212
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources chmod is a signature only; the lifetime of what it touches belongs to createMemFS.
|
|
213
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms chmod is a signature only; its algorithm and cost belong to createMemFS.
|
|
214
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work chmod is a signature only; sharing of repeated work belongs to createMemFS.
|
|
215
|
+
*/
|
|
27
216
|
chmod(path: string, mode: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
217
|
+
/**
|
|
218
|
+
* Descriptor form of the fixed-permission compatibility no-op.
|
|
219
|
+
*
|
|
220
|
+
* @evidence contracts/common.md#principled-implementation The descriptor signature preserves the Go bridge's permission API shape.
|
|
221
|
+
* @evidence contracts/common.md#clear-and-simple-design The required descriptor variant preserves bridge call shape without a separate mutable permission model.
|
|
222
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Descriptor acceptance does not claim an actual permission change.
|
|
223
|
+
* @evidence contracts/common.md#meaningful-documentation JSDoc states the same capability limit under the documentation skill's clarity guidance.
|
|
224
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources fchmod is a signature only; the lifetime of what it touches belongs to createMemFS.
|
|
225
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms fchmod is a signature only; its algorithm and cost belong to createMemFS.
|
|
226
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work fchmod is a signature only; sharing of repeated work belongs to createMemFS.
|
|
227
|
+
*/
|
|
28
228
|
fchmod(fd: number, mode: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
229
|
+
/**
|
|
230
|
+
* Compatibility no-op: MemFS ownership metadata is synthetic.
|
|
231
|
+
*
|
|
232
|
+
* @evidence contracts/common.md#principled-implementation The Node signature adapts a store without native users or groups.
|
|
233
|
+
* @evidence contracts/common.md#clear-and-simple-design The required path-ownership verb is explicit, with no user/group database this virtual store does not support.
|
|
234
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Synthetic ownership is documented rather than inferred from the browser host.
|
|
235
|
+
* @evidence contracts/common.md#meaningful-documentation JSDoc explains ownership capability under the documentation skill's context guidance.
|
|
236
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources chown is a signature only; the lifetime of what it touches belongs to createMemFS.
|
|
237
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms chown is a signature only; its algorithm and cost belong to createMemFS.
|
|
238
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work chown is a signature only; sharing of repeated work belongs to createMemFS.
|
|
239
|
+
*/
|
|
29
240
|
chown(path: string, uid: number, gid: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
241
|
+
/**
|
|
242
|
+
* Descriptor form of the synthetic-ownership compatibility no-op.
|
|
243
|
+
*
|
|
244
|
+
* @evidence contracts/common.md#principled-implementation The descriptor API preserves the Go bridge's ownership operation shape.
|
|
245
|
+
* @evidence contracts/common.md#clear-and-simple-design The descriptor ownership variant shares the same absent capability instead of introducing descriptor-specific ownership state.
|
|
246
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Success does not claim user/group mutation on an open virtual file.
|
|
247
|
+
* @evidence contracts/common.md#meaningful-documentation JSDoc names the descriptor scope and limit under the documentation skill's clarity guidance.
|
|
248
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources fchown is a signature only; the lifetime of what it touches belongs to createMemFS.
|
|
249
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms fchown is a signature only; its algorithm and cost belong to createMemFS.
|
|
250
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work fchown is a signature only; sharing of repeated work belongs to createMemFS.
|
|
251
|
+
*/
|
|
30
252
|
fchown(fd: number, uid: number, gid: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
253
|
+
/**
|
|
254
|
+
* Path ownership compatibility no-op; MemFS has no symbolic links.
|
|
255
|
+
*
|
|
256
|
+
* @evidence contracts/common.md#principled-implementation The bridge shape exists despite the store's fixed ownership and absent link capability.
|
|
257
|
+
* @evidence contracts/common.md#clear-and-simple-design The required link-ownership alias makes its limits explicit without adding unsupported symlink machinery.
|
|
258
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The no-link limit is explicit rather than simulating a link-specific ownership model.
|
|
259
|
+
* @evidence contracts/common.md#meaningful-documentation JSDoc states both capability boundaries under the documentation skill's context guidance.
|
|
260
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources lchown is a signature only; the lifetime of what it touches belongs to createMemFS.
|
|
261
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms lchown is a signature only; its algorithm and cost belong to createMemFS.
|
|
262
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work lchown is a signature only; sharing of repeated work belongs to createMemFS.
|
|
263
|
+
*/
|
|
31
264
|
lchown(path: string, uid: number, gid: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
265
|
+
/**
|
|
266
|
+
* Compatibility no-op: timestamps change with mutations, not caller setters.
|
|
267
|
+
*
|
|
268
|
+
* @evidence contracts/common.md#principled-implementation The bridge signature adapts MemFS's mutation-owned timestamp projection.
|
|
269
|
+
* @evidence contracts/common.md#clear-and-simple-design Caller timestamp setting remains an explicit no-op; byte/tree mutations retain ownership of projected timestamps.
|
|
270
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Caller timestamps are not falsely reported as installed metadata.
|
|
271
|
+
* @evidence contracts/common.md#meaningful-documentation JSDoc explains the timestamp owner under the documentation skill's rationale guidance.
|
|
272
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources utimes is a signature only; the lifetime of what it touches belongs to createMemFS.
|
|
273
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms utimes is a signature only; its algorithm and cost belong to createMemFS.
|
|
274
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work utimes is a signature only; sharing of repeated work belongs to createMemFS.
|
|
275
|
+
*/
|
|
32
276
|
utimes(path: string, atime: number, mtime: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
277
|
+
/**
|
|
278
|
+
* Reject hard-link creation with EPERM; aliases are not a MemFS capability.
|
|
279
|
+
*
|
|
280
|
+
* @evidence contracts/common.md#principled-implementation An explicit callback error marks an unsupported bridge operation.
|
|
281
|
+
* @evidence contracts/common.md#clear-and-simple-design One rejection boundary keeps unsupported inode aliasing out of the node tree and descriptor model.
|
|
282
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts A copied file is not presented as a shared-inode hard link.
|
|
283
|
+
* @evidence contracts/common.md#meaningful-documentation JSDoc names the absent capability and error under the documentation skill's failure guidance.
|
|
284
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources link is a signature only; the lifetime of what it touches belongs to createMemFS.
|
|
285
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms link is a signature only; its algorithm and cost belong to createMemFS.
|
|
286
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work link is a signature only; sharing of repeated work belongs to createMemFS.
|
|
287
|
+
*/
|
|
33
288
|
link(path: string, link: string, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
289
|
+
/**
|
|
290
|
+
* Reject symbolic-link creation with EPERM.
|
|
291
|
+
*
|
|
292
|
+
* @evidence contracts/common.md#principled-implementation The bridge reports its absent symbolic-link capability explicitly.
|
|
293
|
+
* @evidence contracts/common.md#clear-and-simple-design An explicit unsupported operation avoids a second path-resolution model with no supported symlink nodes.
|
|
294
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Link creation is not approximated by storing target text as an ordinary file.
|
|
295
|
+
* @evidence contracts/common.md#meaningful-documentation JSDoc names the rejection under the documentation skill's failure guidance.
|
|
296
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources symlink is a signature only; the lifetime of what it touches belongs to createMemFS.
|
|
297
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms symlink is a signature only; its algorithm and cost belong to createMemFS.
|
|
298
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work symlink is a signature only; sharing of repeated work belongs to createMemFS.
|
|
299
|
+
*/
|
|
34
300
|
symlink(path: string, link: string, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
301
|
+
/**
|
|
302
|
+
* Reject link-target lookup with EINVAL because MemFS has no symbolic links.
|
|
303
|
+
*
|
|
304
|
+
* @evidence contracts/common.md#principled-implementation Explicit unsupported lookup matches the virtual store's declared node kinds.
|
|
305
|
+
* @evidence contracts/common.md#clear-and-simple-design Link-target lookup remains a focused rejection instead of overloading ordinary file text as link state.
|
|
306
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No guessed path is returned as a fabricated link target.
|
|
307
|
+
* @evidence contracts/common.md#meaningful-documentation JSDoc states the reason and error under the documentation skill's rationale guidance.
|
|
308
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources readlink is a signature only; the lifetime of what it touches belongs to createMemFS.
|
|
309
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms readlink is a signature only; its algorithm and cost belong to createMemFS.
|
|
310
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work readlink is a signature only; sharing of repeated work belongs to createMemFS.
|
|
311
|
+
*/
|
|
35
312
|
readlink(path: string, callback: (err: NodeJS.ErrnoException | null, link: string) => void): void;
|
|
313
|
+
/**
|
|
314
|
+
* Resize a file to a nonnegative integer byte length, zero-filling
|
|
315
|
+
* extensions. A length the engine cannot allocate reports `EFBIG` and changes
|
|
316
|
+
* nothing.
|
|
317
|
+
*
|
|
318
|
+
* @evidence contracts/common.md#principled-implementation Path-based resize operates on the stored node and preserves open-descriptor identity.
|
|
319
|
+
* @evidence contracts/common.md#clear-and-simple-design The path variant resolves a node then uses shared resize semantics rather than composing reads and writes.
|
|
320
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Invalid lengths and directories remain errors rather than coerced file mutations.
|
|
321
|
+
* @evidence contracts/common.md#meaningful-documentation JSDoc explains units, validation and extension under the documentation skill's context guidance.
|
|
322
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources truncate is a signature only; the lifetime of what it touches belongs to createMemFS.
|
|
323
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms truncate is a signature only; its algorithm and cost belong to createMemFS.
|
|
324
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work truncate is a signature only; sharing of repeated work belongs to createMemFS.
|
|
325
|
+
*/
|
|
36
326
|
truncate(path: string, length: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
327
|
+
/**
|
|
328
|
+
* Resize a writable open file without changing its descriptor cursor. A
|
|
329
|
+
* length the engine cannot allocate reports `EFBIG` and changes nothing.
|
|
330
|
+
*
|
|
331
|
+
* @evidence contracts/common.md#principled-implementation Descriptor resize uses retained inode identity and its access grant.
|
|
332
|
+
* @evidence contracts/common.md#clear-and-simple-design Descriptor validation is separate from the shared byte resize; cursor ownership remains with read/write operations.
|
|
333
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Pipe ends and captured streams are not coerced into truncatable files.
|
|
334
|
+
* @evidence contracts/common.md#meaningful-documentation JSDoc states permission and cursor behavior under the documentation skill's ownership guidance.
|
|
335
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources ftruncate is a signature only; the lifetime of what it touches belongs to createMemFS.
|
|
336
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms ftruncate is a signature only; its algorithm and cost belong to createMemFS.
|
|
337
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work ftruncate is a signature only; sharing of repeated work belongs to createMemFS.
|
|
338
|
+
*/
|
|
37
339
|
ftruncate(fd: number, length: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
38
340
|
/**
|
|
39
341
|
* JavaScript-only pipe emulation. Returns two fds: a read end and a write
|
|
@@ -50,6 +352,14 @@ export interface IWasmExecFS {
|
|
|
50
352
|
* and fd 2 land in `stdout.buffer` and `stderr.buffer` through `writeSync`,
|
|
51
353
|
* and a plugin's output is collected by the Go-side `host.InvokePlugin` into
|
|
52
354
|
* invocation-owned in-process buffers.
|
|
355
|
+
*
|
|
356
|
+
* @evidence contracts/common.md#principled-implementation Two virtual descriptors expose JavaScript queue endpoints without claiming a Go syscall extension.
|
|
357
|
+
* @evidence contracts/common.md#clear-and-simple-design Two endpoint identities share one queue state; the JavaScript-only capability is kept distinct from native Go pipes.
|
|
358
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The unreachable Go os.Pipe capability is explicit rather than hidden behind a monkey-patched syscall claim.
|
|
359
|
+
* @evidence contracts/common.md#meaningful-documentation Separate paragraphs explain endpoint shape, Go limits and actual output capture under the documentation skill.
|
|
360
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources pipe2 is a signature only; the lifetime of what it touches belongs to createMemFS.
|
|
361
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms pipe2 is a signature only; its algorithm and cost belong to createMemFS.
|
|
362
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work pipe2 is a signature only; sharing of repeated work belongs to createMemFS.
|
|
53
363
|
*/
|
|
54
364
|
pipe2(flags: number, callback: (err: NodeJS.ErrnoException | null, fds: [number, number]) => void): void;
|
|
55
365
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttsc/wasm",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"description": "Build in-browser ttsc playgrounds. Compose ttsc + typescript-go with your own plugins via the Go host helper.",
|
|
5
5
|
"main": "lib/src/index.js",
|
|
6
6
|
"types": "lib/src/index.d.ts",
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"homepage": "https://ttsc.dev",
|
|
39
39
|
"devDependencies": {
|
|
40
|
+
"@wrtnlabs/evidence": "^0.3.1",
|
|
40
41
|
"@types/node": "^25.3.0",
|
|
41
42
|
"rimraf": "^6.1.2",
|
|
42
43
|
"typescript": "^7.0.2"
|
|
@@ -44,6 +45,7 @@
|
|
|
44
45
|
"scripts": {
|
|
45
46
|
"build": "node build/build-wasm.cjs && rimraf lib && tsc -p .",
|
|
46
47
|
"build:wasm": "node build/build-wasm.cjs",
|
|
47
|
-
"build:ts": "rimraf lib && tsc -p ."
|
|
48
|
+
"build:ts": "rimraf lib && tsc -p .",
|
|
49
|
+
"evidence": "evidence"
|
|
48
50
|
}
|
|
49
51
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
//
|
|
3
3
|
// Completes every exposed enum family: re-exports each member not already
|
|
4
4
|
// re-exported elsewhere in the shim package, so a plugin that can name the
|
|
5
|
-
// enum type can name all of its values. Prevents
|
|
6
|
-
// const silently missing). Regenerate after a typescript-go bump with
|
|
5
|
+
// enum type can name all of its values. Prevents a partially re-exported
|
|
6
|
+
// family (a sibling const silently missing). Regenerate after a typescript-go bump with
|
|
7
7
|
// `pnpm --filter ttsc shim:audit -fix`.
|
|
8
8
|
|
|
9
9
|
package ast
|
|
@@ -61,10 +61,12 @@ const (
|
|
|
61
61
|
NodeFlagsHasImplicitReturn = innerast.NodeFlagsHasImplicitReturn
|
|
62
62
|
NodeFlagsHasJSDoc = innerast.NodeFlagsHasJSDoc
|
|
63
63
|
NodeFlagsIdentifierHasExtendedUnicodeEscape = innerast.NodeFlagsIdentifierHasExtendedUnicodeEscape
|
|
64
|
+
NodeFlagsIdentifierIsInJSDocNamespace = innerast.NodeFlagsIdentifierIsInJSDocNamespace
|
|
64
65
|
NodeFlagsInWithStatement = innerast.NodeFlagsInWithStatement
|
|
65
66
|
NodeFlagsJSDoc = innerast.NodeFlagsJSDoc
|
|
66
67
|
NodeFlagsJavaScriptFile = innerast.NodeFlagsJavaScriptFile
|
|
67
68
|
NodeFlagsJsonFile = innerast.NodeFlagsJsonFile
|
|
69
|
+
NodeFlagsNestedNamespace = innerast.NodeFlagsNestedNamespace
|
|
68
70
|
NodeFlagsPermanentlySetIncrementalFlags = innerast.NodeFlagsPermanentlySetIncrementalFlags
|
|
69
71
|
NodeFlagsPossiblyContainsDeprecatedTag = innerast.NodeFlagsPossiblyContainsDeprecatedTag
|
|
70
72
|
NodeFlagsPossiblyContainsDynamicImport = innerast.NodeFlagsPossiblyContainsDynamicImport
|
|
@@ -2,13 +2,13 @@ module github.com/microsoft/typescript-go/shim/ast
|
|
|
2
2
|
|
|
3
3
|
go 1.26
|
|
4
4
|
|
|
5
|
-
require github.com/microsoft/typescript-go v0.0.0-
|
|
5
|
+
require github.com/microsoft/typescript-go v0.0.0-20260610182825-7fc57c005063
|
|
6
6
|
|
|
7
7
|
require (
|
|
8
|
-
github.com/go-json-experiment/json v0.0.0-
|
|
8
|
+
github.com/go-json-experiment/json v0.0.0-20260601182631-00ed12fed2a6 // indirect
|
|
9
9
|
github.com/klauspost/cpuid/v2 v2.2.10 // indirect
|
|
10
10
|
github.com/zeebo/xxh3 v1.1.0 // indirect
|
|
11
|
-
golang.org/x/sync v0.
|
|
12
|
-
golang.org/x/sys v0.
|
|
13
|
-
golang.org/x/text v0.
|
|
11
|
+
golang.org/x/sync v0.21.0 // indirect
|
|
12
|
+
golang.org/x/sys v0.46.0 // indirect
|
|
13
|
+
golang.org/x/text v0.38.0 // indirect
|
|
14
14
|
)
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
github.com/go-json-experiment/json v0.0.0-
|
|
2
|
-
github.com/go-json-experiment/json v0.0.0-
|
|
1
|
+
github.com/go-json-experiment/json v0.0.0-20260601182631-00ed12fed2a6 h1:nxP4pPoyqOAgX8lYDFCfl3DyKeXErCvSvhcyzwGV9CE=
|
|
2
|
+
github.com/go-json-experiment/json v0.0.0-20260601182631-00ed12fed2a6/go.mod h1:tphK2c80bpPhMOI4v6bIc2xWywPfbqi1Z06+RcrMkDg=
|
|
3
3
|
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
|
4
4
|
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
|
5
5
|
github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE=
|
|
6
6
|
github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
|
|
7
|
-
github.com/microsoft/typescript-go v0.0.0-
|
|
8
|
-
github.com/microsoft/typescript-go v0.0.0-
|
|
7
|
+
github.com/microsoft/typescript-go v0.0.0-20260610182825-7fc57c005063 h1:UUVrjTrD+7nkVvkJTjxwA5+SaZ5n1uyAffm2zX2gn+o=
|
|
8
|
+
github.com/microsoft/typescript-go v0.0.0-20260610182825-7fc57c005063/go.mod h1:s3yhRRZ7nzSZaiKicku520Tj9Mvewr9y2UtrvpwOmDE=
|
|
9
9
|
github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ=
|
|
10
10
|
github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0=
|
|
11
11
|
github.com/zeebo/xxh3 v1.1.0 h1:s7DLGDK45Dyfg7++yxI0khrfwq9661w9EN78eP/UZVs=
|
|
12
12
|
github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F5s=
|
|
13
|
-
golang.org/x/sync v0.
|
|
14
|
-
golang.org/x/sync v0.
|
|
15
|
-
golang.org/x/sys v0.
|
|
16
|
-
golang.org/x/sys v0.
|
|
17
|
-
golang.org/x/text v0.
|
|
18
|
-
golang.org/x/text v0.
|
|
13
|
+
golang.org/x/sync v0.21.0 h1:HLII4xRRTtCRkxYp4HNFF0Js/Og6q2i++KXbg0gHCwM=
|
|
14
|
+
golang.org/x/sync v0.21.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
|
|
15
|
+
golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw=
|
|
16
|
+
golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
|
|
17
|
+
golang.org/x/text v0.38.0 h1:sXmwo9DwP3OK9EZ7PqAdaooSGozfl/3a6/xJcbzPRhE=
|
|
18
|
+
golang.org/x/text v0.38.0/go.mod h1:YXZt3QhHUKYT53r2lLKFIVi6Ao1jdzrTR/KQ09qyxF4=
|
|
19
19
|
gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q=
|
|
20
20
|
gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA=
|