@secure-exec/core 0.2.1 → 0.3.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (248) hide show
  1. package/README.md +5 -5
  2. package/dist/binary.d.ts +4 -0
  3. package/dist/binary.js +25 -0
  4. package/dist/bytes.d.ts +2 -0
  5. package/dist/bytes.js +6 -0
  6. package/dist/callbacks.d.ts +41 -0
  7. package/dist/callbacks.js +94 -0
  8. package/dist/cargo.d.ts +2 -0
  9. package/dist/cargo.js +142 -0
  10. package/dist/correlation.d.ts +10 -0
  11. package/dist/correlation.js +49 -0
  12. package/dist/descriptors.d.ts +34 -0
  13. package/dist/descriptors.js +37 -0
  14. package/dist/event-buffer.d.ts +90 -0
  15. package/dist/event-buffer.js +313 -0
  16. package/dist/ext.d.ts +7 -0
  17. package/dist/ext.js +13 -0
  18. package/dist/filesystem.d.ts +41 -0
  19. package/dist/filesystem.js +70 -0
  20. package/dist/frame-payload-codec.d.ts +8 -0
  21. package/dist/frame-payload-codec.js +14 -0
  22. package/dist/frame-rpc.d.ts +38 -0
  23. package/dist/frame-rpc.js +73 -0
  24. package/dist/frame-stream.d.ts +27 -0
  25. package/dist/frame-stream.js +99 -0
  26. package/dist/framing.d.ts +7 -0
  27. package/dist/framing.js +22 -0
  28. package/dist/generated/AcpLimitsConfig.d.ts +4 -0
  29. package/dist/generated/AcpLimitsConfig.js +2 -0
  30. package/dist/generated/CreateVmConfig.d.ts +19 -0
  31. package/dist/generated/FsPermissionRule.d.ts +6 -0
  32. package/dist/generated/FsPermissionRuleSet.d.ts +6 -0
  33. package/dist/generated/FsPermissionRuleSet.js +1 -0
  34. package/dist/generated/FsPermissionScope.d.ts +3 -0
  35. package/dist/generated/FsPermissionScope.js +1 -0
  36. package/dist/generated/HttpLimitsConfig.d.ts +3 -0
  37. package/dist/generated/HttpLimitsConfig.js +2 -0
  38. package/dist/generated/JsModuleResolution.d.ts +1 -0
  39. package/dist/generated/JsModuleResolution.js +2 -0
  40. package/dist/generated/JsRuntimeConfig.d.ts +26 -0
  41. package/dist/generated/JsRuntimeConfig.js +1 -0
  42. package/dist/generated/JsRuntimeLimitsConfig.d.ts +7 -0
  43. package/dist/generated/JsRuntimeLimitsConfig.js +2 -0
  44. package/dist/generated/JsRuntimePlatform.d.ts +1 -0
  45. package/dist/generated/JsRuntimePlatform.js +2 -0
  46. package/dist/generated/MountPluginDescriptor.d.ts +4 -0
  47. package/dist/generated/MountPluginDescriptor.js +2 -0
  48. package/dist/generated/NativeRootFilesystemConfig.d.ts +5 -0
  49. package/dist/generated/NativeRootFilesystemConfig.js +1 -0
  50. package/dist/generated/PatternPermissionRule.d.ts +6 -0
  51. package/dist/generated/PatternPermissionRule.js +1 -0
  52. package/dist/generated/PatternPermissionRuleSet.d.ts +6 -0
  53. package/dist/generated/PatternPermissionRuleSet.js +1 -0
  54. package/dist/generated/PatternPermissionScope.d.ts +3 -0
  55. package/dist/generated/PatternPermissionScope.js +1 -0
  56. package/dist/generated/PermissionMode.d.ts +1 -0
  57. package/dist/generated/PermissionMode.js +2 -0
  58. package/dist/generated/PermissionsPolicy.d.ts +10 -0
  59. package/dist/generated/PermissionsPolicy.js +1 -0
  60. package/dist/generated/PluginLimitsConfig.d.ts +4 -0
  61. package/dist/generated/PluginLimitsConfig.js +2 -0
  62. package/dist/generated/PythonLimitsConfig.d.ts +5 -0
  63. package/dist/generated/PythonLimitsConfig.js +2 -0
  64. package/dist/generated/ResourceLimitsConfig.d.ts +22 -0
  65. package/dist/generated/ResourceLimitsConfig.js +2 -0
  66. package/dist/generated/RootFilesystemConfig.d.ts +9 -0
  67. package/dist/generated/RootFilesystemConfig.js +1 -0
  68. package/dist/generated/RootFilesystemEntry.d.ts +13 -0
  69. package/dist/generated/RootFilesystemEntry.js +1 -0
  70. package/dist/generated/RootFilesystemEntryEncoding.d.ts +1 -0
  71. package/dist/generated/RootFilesystemEntryEncoding.js +2 -0
  72. package/dist/generated/RootFilesystemEntryKind.d.ts +1 -0
  73. package/dist/generated/RootFilesystemEntryKind.js +2 -0
  74. package/dist/generated/RootFilesystemLowerDescriptor.d.ts +7 -0
  75. package/dist/generated/RootFilesystemLowerDescriptor.js +1 -0
  76. package/dist/generated/RootFilesystemMode.d.ts +1 -0
  77. package/dist/generated/RootFilesystemMode.js +2 -0
  78. package/dist/generated/ToolLimitsConfig.d.ts +10 -0
  79. package/dist/generated/ToolLimitsConfig.js +2 -0
  80. package/dist/generated/VmDnsConfig.d.ts +6 -0
  81. package/dist/generated/VmDnsConfig.js +2 -0
  82. package/dist/generated/VmLimitsConfig.d.ts +18 -0
  83. package/dist/generated/VmLimitsConfig.js +1 -0
  84. package/dist/generated/VmListenPolicyConfig.d.ts +5 -0
  85. package/dist/generated/VmListenPolicyConfig.js +2 -0
  86. package/dist/generated/WasmLimitsConfig.d.ts +5 -0
  87. package/dist/generated/WasmLimitsConfig.js +2 -0
  88. package/dist/generated-protocol.d.ts +1037 -0
  89. package/dist/generated-protocol.js +2887 -0
  90. package/dist/index.d.ts +24 -62
  91. package/dist/index.js +24 -53
  92. package/dist/json.d.ts +2 -0
  93. package/dist/json.js +20 -0
  94. package/dist/kernel-proxy.d.ts +149 -0
  95. package/dist/kernel-proxy.js +1733 -0
  96. package/dist/native-client.d.ts +41 -0
  97. package/dist/native-client.js +124 -0
  98. package/dist/node-runtime.d.ts +443 -0
  99. package/dist/node-runtime.js +569 -0
  100. package/dist/numbers.d.ts +1 -0
  101. package/dist/numbers.js +8 -0
  102. package/dist/ownership.d.ts +18 -0
  103. package/dist/ownership.js +77 -0
  104. package/dist/permissions.d.ts +29 -0
  105. package/dist/permissions.js +68 -0
  106. package/dist/process.d.ts +35 -0
  107. package/dist/process.js +125 -0
  108. package/dist/protocol-client.d.ts +46 -0
  109. package/dist/protocol-client.js +180 -0
  110. package/dist/protocol-frames.d.ts +68 -0
  111. package/dist/protocol-frames.js +139 -0
  112. package/dist/protocol-maps.d.ts +28 -0
  113. package/dist/protocol-maps.js +217 -0
  114. package/dist/protocol-schema.d.ts +10 -0
  115. package/dist/protocol-schema.js +11 -0
  116. package/dist/request-payloads.d.ts +137 -0
  117. package/dist/request-payloads.js +210 -0
  118. package/dist/response-payloads.d.ts +107 -0
  119. package/dist/response-payloads.js +161 -0
  120. package/dist/sidecar-client.d.ts +242 -0
  121. package/dist/sidecar-client.js +797 -0
  122. package/dist/state.d.ts +40 -0
  123. package/dist/state.js +44 -0
  124. package/dist/test-runtime.d.ts +526 -0
  125. package/dist/test-runtime.js +2119 -0
  126. package/dist/vm-config.d.ts +31 -0
  127. package/dist/vm-config.js +1 -0
  128. package/fixtures/alpine-defaults.json +520 -0
  129. package/fixtures/base-filesystem.json +528 -0
  130. package/package.json +193 -115
  131. package/LICENSE +0 -191
  132. package/dist/bridge-setup.d.ts +0 -6
  133. package/dist/bridge-setup.js +0 -9
  134. package/dist/esm-compiler.d.ts +0 -18
  135. package/dist/esm-compiler.js +0 -72
  136. package/dist/fs-helpers.d.ts +0 -23
  137. package/dist/fs-helpers.js +0 -41
  138. package/dist/generated/isolate-runtime.d.ts +0 -19
  139. package/dist/generated/isolate-runtime.js +0 -21
  140. package/dist/generated/polyfills.d.ts +0 -82
  141. package/dist/generated/polyfills.js +0 -82
  142. package/dist/isolate-runtime/apply-custom-global-policy.js +0 -53
  143. package/dist/isolate-runtime/apply-timing-mitigation-freeze.js +0 -130
  144. package/dist/isolate-runtime/apply-timing-mitigation-off.js +0 -14
  145. package/dist/isolate-runtime/bridge-attach.js +0 -29
  146. package/dist/isolate-runtime/bridge-initial-globals.js +0 -385
  147. package/dist/isolate-runtime/eval-script-result.js +0 -8
  148. package/dist/isolate-runtime/global-exposure-helpers.js +0 -36
  149. package/dist/isolate-runtime/init-commonjs-module-globals.js +0 -28
  150. package/dist/isolate-runtime/override-process-cwd.js +0 -8
  151. package/dist/isolate-runtime/override-process-env.js +0 -8
  152. package/dist/isolate-runtime/require-setup.js +0 -4153
  153. package/dist/isolate-runtime/set-commonjs-file-globals.js +0 -36
  154. package/dist/isolate-runtime/set-stdin-data.js +0 -10
  155. package/dist/isolate-runtime/setup-dynamic-import.js +0 -123
  156. package/dist/isolate-runtime/setup-fs-facade.js +0 -87
  157. package/dist/kernel/command-registry.d.ts +0 -44
  158. package/dist/kernel/command-registry.js +0 -114
  159. package/dist/kernel/device-backend.d.ts +0 -14
  160. package/dist/kernel/device-backend.js +0 -251
  161. package/dist/kernel/device-layer.d.ts +0 -12
  162. package/dist/kernel/device-layer.js +0 -271
  163. package/dist/kernel/dns-cache.d.ts +0 -29
  164. package/dist/kernel/dns-cache.js +0 -52
  165. package/dist/kernel/fd-table.d.ts +0 -84
  166. package/dist/kernel/fd-table.js +0 -278
  167. package/dist/kernel/file-lock.d.ts +0 -34
  168. package/dist/kernel/file-lock.js +0 -122
  169. package/dist/kernel/host-adapter.d.ts +0 -50
  170. package/dist/kernel/host-adapter.js +0 -8
  171. package/dist/kernel/index.d.ts +0 -36
  172. package/dist/kernel/index.js +0 -34
  173. package/dist/kernel/kernel.d.ts +0 -9
  174. package/dist/kernel/kernel.js +0 -1415
  175. package/dist/kernel/mount-table.d.ts +0 -75
  176. package/dist/kernel/mount-table.js +0 -353
  177. package/dist/kernel/permissions.d.ts +0 -36
  178. package/dist/kernel/permissions.js +0 -150
  179. package/dist/kernel/pipe-manager.d.ts +0 -64
  180. package/dist/kernel/pipe-manager.js +0 -267
  181. package/dist/kernel/proc-backend.d.ts +0 -30
  182. package/dist/kernel/proc-backend.js +0 -428
  183. package/dist/kernel/proc-layer.d.ts +0 -11
  184. package/dist/kernel/proc-layer.js +0 -507
  185. package/dist/kernel/process-table.d.ts +0 -126
  186. package/dist/kernel/process-table.js +0 -651
  187. package/dist/kernel/pty.d.ts +0 -109
  188. package/dist/kernel/pty.js +0 -552
  189. package/dist/kernel/socket-table.d.ts +0 -312
  190. package/dist/kernel/socket-table.js +0 -1188
  191. package/dist/kernel/timer-table.d.ts +0 -54
  192. package/dist/kernel/timer-table.js +0 -108
  193. package/dist/kernel/types.d.ts +0 -541
  194. package/dist/kernel/types.js +0 -98
  195. package/dist/kernel/user.d.ts +0 -29
  196. package/dist/kernel/user.js +0 -35
  197. package/dist/kernel/vfs.d.ts +0 -82
  198. package/dist/kernel/vfs.js +0 -25
  199. package/dist/kernel/wait.d.ts +0 -45
  200. package/dist/kernel/wait.js +0 -112
  201. package/dist/kernel/wstatus.d.ts +0 -21
  202. package/dist/kernel/wstatus.js +0 -33
  203. package/dist/module-resolver.d.ts +0 -29
  204. package/dist/module-resolver.js +0 -314
  205. package/dist/package-bundler.d.ts +0 -41
  206. package/dist/package-bundler.js +0 -497
  207. package/dist/runtime-driver.d.ts +0 -66
  208. package/dist/shared/api-types.d.ts +0 -83
  209. package/dist/shared/bridge-contract.d.ts +0 -772
  210. package/dist/shared/bridge-contract.js +0 -169
  211. package/dist/shared/console-formatter.d.ts +0 -22
  212. package/dist/shared/console-formatter.js +0 -161
  213. package/dist/shared/constants.d.ts +0 -3
  214. package/dist/shared/constants.js +0 -3
  215. package/dist/shared/errors.d.ts +0 -16
  216. package/dist/shared/errors.js +0 -21
  217. package/dist/shared/esm-utils.d.ts +0 -28
  218. package/dist/shared/esm-utils.js +0 -97
  219. package/dist/shared/global-exposure.d.ts +0 -38
  220. package/dist/shared/global-exposure.js +0 -876
  221. package/dist/shared/in-memory-fs.d.ts +0 -16
  222. package/dist/shared/in-memory-fs.js +0 -115
  223. package/dist/shared/permissions.d.ts +0 -36
  224. package/dist/shared/permissions.js +0 -314
  225. package/dist/shared/require-setup.d.ts +0 -6
  226. package/dist/shared/require-setup.js +0 -9
  227. package/dist/test/block-store-conformance.d.ts +0 -34
  228. package/dist/test/block-store-conformance.js +0 -251
  229. package/dist/test/metadata-store-conformance.d.ts +0 -37
  230. package/dist/test/metadata-store-conformance.js +0 -646
  231. package/dist/test/vfs-conformance.d.ts +0 -65
  232. package/dist/test/vfs-conformance.js +0 -842
  233. package/dist/types.d.ts +0 -98
  234. package/dist/types.js +0 -6
  235. package/dist/vfs/chunked-vfs.d.ts +0 -66
  236. package/dist/vfs/chunked-vfs.js +0 -1290
  237. package/dist/vfs/host-block-store.d.ts +0 -19
  238. package/dist/vfs/host-block-store.js +0 -97
  239. package/dist/vfs/memory-block-store.d.ts +0 -16
  240. package/dist/vfs/memory-block-store.js +0 -45
  241. package/dist/vfs/memory-metadata.d.ts +0 -75
  242. package/dist/vfs/memory-metadata.js +0 -528
  243. package/dist/vfs/sqlite-metadata.d.ts +0 -91
  244. package/dist/vfs/sqlite-metadata.js +0 -582
  245. package/dist/vfs/types.d.ts +0 -210
  246. package/dist/vfs/types.js +0 -8
  247. /package/dist/{runtime-driver.js → generated/CreateVmConfig.js} +0 -0
  248. /package/dist/{shared/api-types.js → generated/FsPermissionRule.js} +0 -0
@@ -1,772 +0,0 @@
1
- /**
2
- * @deprecated Canonical source moved to @secure-exec/nodejs (US-002).
3
- * This copy is retained for backward compatibility during phased migration.
4
- * Will be removed in US-005 when kernel merges into core.
5
- *
6
- * Bridge contract: typed declarations for the globals shared between the
7
- * host (Node.js) and the isolate (sandbox V8 context).
8
- *
9
- * Two categories:
10
- * - Host bridge globals: set by the host before bridge code runs (fs refs, timers, etc.)
11
- * - Runtime bridge globals: installed by the bridge bundle itself (active handles, modules, etc.)
12
- *
13
- * The typed `Ref` aliases describe the bridge calling convention for each global.
14
- */
15
- export type ValueOf<T> = T[keyof T];
16
- /** Globals injected by the host before the bridge bundle executes. */
17
- export declare const HOST_BRIDGE_GLOBAL_KEYS: {
18
- readonly dynamicImport: "_dynamicImport";
19
- readonly loadPolyfill: "_loadPolyfill";
20
- readonly resolveModule: "_resolveModule";
21
- readonly loadFile: "_loadFile";
22
- readonly scheduleTimer: "_scheduleTimer";
23
- readonly cryptoRandomFill: "_cryptoRandomFill";
24
- readonly cryptoRandomUuid: "_cryptoRandomUUID";
25
- readonly cryptoHashDigest: "_cryptoHashDigest";
26
- readonly cryptoHmacDigest: "_cryptoHmacDigest";
27
- readonly cryptoPbkdf2: "_cryptoPbkdf2";
28
- readonly cryptoScrypt: "_cryptoScrypt";
29
- readonly cryptoCipheriv: "_cryptoCipheriv";
30
- readonly cryptoDecipheriv: "_cryptoDecipheriv";
31
- readonly cryptoCipherivCreate: "_cryptoCipherivCreate";
32
- readonly cryptoCipherivUpdate: "_cryptoCipherivUpdate";
33
- readonly cryptoCipherivFinal: "_cryptoCipherivFinal";
34
- readonly cryptoSign: "_cryptoSign";
35
- readonly cryptoVerify: "_cryptoVerify";
36
- readonly cryptoAsymmetricOp: "_cryptoAsymmetricOp";
37
- readonly cryptoCreateKeyObject: "_cryptoCreateKeyObject";
38
- readonly cryptoGenerateKeyPairSync: "_cryptoGenerateKeyPairSync";
39
- readonly cryptoGenerateKeySync: "_cryptoGenerateKeySync";
40
- readonly cryptoGeneratePrimeSync: "_cryptoGeneratePrimeSync";
41
- readonly cryptoDiffieHellman: "_cryptoDiffieHellman";
42
- readonly cryptoDiffieHellmanGroup: "_cryptoDiffieHellmanGroup";
43
- readonly cryptoDiffieHellmanSessionCreate: "_cryptoDiffieHellmanSessionCreate";
44
- readonly cryptoDiffieHellmanSessionCall: "_cryptoDiffieHellmanSessionCall";
45
- readonly cryptoSubtle: "_cryptoSubtle";
46
- readonly fsReadFile: "_fsReadFile";
47
- readonly fsWriteFile: "_fsWriteFile";
48
- readonly fsReadFileBinary: "_fsReadFileBinary";
49
- readonly fsWriteFileBinary: "_fsWriteFileBinary";
50
- readonly fsReadDir: "_fsReadDir";
51
- readonly fsMkdir: "_fsMkdir";
52
- readonly fsRmdir: "_fsRmdir";
53
- readonly fsExists: "_fsExists";
54
- readonly fsStat: "_fsStat";
55
- readonly fsUnlink: "_fsUnlink";
56
- readonly fsRename: "_fsRename";
57
- readonly fsChmod: "_fsChmod";
58
- readonly fsChown: "_fsChown";
59
- readonly fsLink: "_fsLink";
60
- readonly fsSymlink: "_fsSymlink";
61
- readonly fsReadlink: "_fsReadlink";
62
- readonly fsLstat: "_fsLstat";
63
- readonly fsTruncate: "_fsTruncate";
64
- readonly fsUtimes: "_fsUtimes";
65
- readonly childProcessSpawnStart: "_childProcessSpawnStart";
66
- readonly childProcessStdinWrite: "_childProcessStdinWrite";
67
- readonly childProcessStdinClose: "_childProcessStdinClose";
68
- readonly childProcessKill: "_childProcessKill";
69
- readonly childProcessSpawnSync: "_childProcessSpawnSync";
70
- readonly networkFetchRaw: "_networkFetchRaw";
71
- readonly networkDnsLookupRaw: "_networkDnsLookupRaw";
72
- readonly networkHttpRequestRaw: "_networkHttpRequestRaw";
73
- readonly networkHttpServerListenRaw: "_networkHttpServerListenRaw";
74
- readonly networkHttpServerCloseRaw: "_networkHttpServerCloseRaw";
75
- readonly networkHttpServerRespondRaw: "_networkHttpServerRespondRaw";
76
- readonly networkHttpServerWaitRaw: "_networkHttpServerWaitRaw";
77
- readonly networkHttp2ServerListenRaw: "_networkHttp2ServerListenRaw";
78
- readonly networkHttp2ServerCloseRaw: "_networkHttp2ServerCloseRaw";
79
- readonly networkHttp2ServerWaitRaw: "_networkHttp2ServerWaitRaw";
80
- readonly networkHttp2SessionConnectRaw: "_networkHttp2SessionConnectRaw";
81
- readonly networkHttp2SessionRequestRaw: "_networkHttp2SessionRequestRaw";
82
- readonly networkHttp2SessionSettingsRaw: "_networkHttp2SessionSettingsRaw";
83
- readonly networkHttp2SessionSetLocalWindowSizeRaw: "_networkHttp2SessionSetLocalWindowSizeRaw";
84
- readonly networkHttp2SessionGoawayRaw: "_networkHttp2SessionGoawayRaw";
85
- readonly networkHttp2SessionCloseRaw: "_networkHttp2SessionCloseRaw";
86
- readonly networkHttp2SessionDestroyRaw: "_networkHttp2SessionDestroyRaw";
87
- readonly networkHttp2SessionWaitRaw: "_networkHttp2SessionWaitRaw";
88
- readonly networkHttp2ServerPollRaw: "_networkHttp2ServerPollRaw";
89
- readonly networkHttp2SessionPollRaw: "_networkHttp2SessionPollRaw";
90
- readonly networkHttp2StreamRespondRaw: "_networkHttp2StreamRespondRaw";
91
- readonly networkHttp2StreamPushStreamRaw: "_networkHttp2StreamPushStreamRaw";
92
- readonly networkHttp2StreamWriteRaw: "_networkHttp2StreamWriteRaw";
93
- readonly networkHttp2StreamEndRaw: "_networkHttp2StreamEndRaw";
94
- readonly networkHttp2StreamCloseRaw: "_networkHttp2StreamCloseRaw";
95
- readonly networkHttp2StreamPauseRaw: "_networkHttp2StreamPauseRaw";
96
- readonly networkHttp2StreamResumeRaw: "_networkHttp2StreamResumeRaw";
97
- readonly networkHttp2StreamRespondWithFileRaw: "_networkHttp2StreamRespondWithFileRaw";
98
- readonly networkHttp2ServerRespondRaw: "_networkHttp2ServerRespondRaw";
99
- readonly upgradeSocketWriteRaw: "_upgradeSocketWriteRaw";
100
- readonly upgradeSocketEndRaw: "_upgradeSocketEndRaw";
101
- readonly upgradeSocketDestroyRaw: "_upgradeSocketDestroyRaw";
102
- readonly netSocketConnectRaw: "_netSocketConnectRaw";
103
- readonly netSocketWaitConnectRaw: "_netSocketWaitConnectRaw";
104
- readonly netSocketReadRaw: "_netSocketReadRaw";
105
- readonly netSocketSetNoDelayRaw: "_netSocketSetNoDelayRaw";
106
- readonly netSocketSetKeepAliveRaw: "_netSocketSetKeepAliveRaw";
107
- readonly netSocketWriteRaw: "_netSocketWriteRaw";
108
- readonly netSocketEndRaw: "_netSocketEndRaw";
109
- readonly netSocketDestroyRaw: "_netSocketDestroyRaw";
110
- readonly netSocketUpgradeTlsRaw: "_netSocketUpgradeTlsRaw";
111
- readonly netSocketGetTlsClientHelloRaw: "_netSocketGetTlsClientHelloRaw";
112
- readonly netSocketTlsQueryRaw: "_netSocketTlsQueryRaw";
113
- readonly tlsGetCiphersRaw: "_tlsGetCiphersRaw";
114
- readonly netServerListenRaw: "_netServerListenRaw";
115
- readonly netServerAcceptRaw: "_netServerAcceptRaw";
116
- readonly netServerCloseRaw: "_netServerCloseRaw";
117
- readonly dgramSocketCreateRaw: "_dgramSocketCreateRaw";
118
- readonly dgramSocketBindRaw: "_dgramSocketBindRaw";
119
- readonly dgramSocketRecvRaw: "_dgramSocketRecvRaw";
120
- readonly dgramSocketSendRaw: "_dgramSocketSendRaw";
121
- readonly dgramSocketCloseRaw: "_dgramSocketCloseRaw";
122
- readonly dgramSocketAddressRaw: "_dgramSocketAddressRaw";
123
- readonly dgramSocketSetBufferSizeRaw: "_dgramSocketSetBufferSizeRaw";
124
- readonly dgramSocketGetBufferSizeRaw: "_dgramSocketGetBufferSizeRaw";
125
- readonly resolveModuleSync: "_resolveModuleSync";
126
- readonly loadFileSync: "_loadFileSync";
127
- readonly ptySetRawMode: "_ptySetRawMode";
128
- readonly kernelStdinRead: "_kernelStdinRead";
129
- readonly processConfig: "_processConfig";
130
- readonly osConfig: "_osConfig";
131
- readonly log: "_log";
132
- readonly error: "_error";
133
- };
134
- /** Globals exposed by the bridge bundle and runtime scripts inside the isolate. */
135
- export declare const RUNTIME_BRIDGE_GLOBAL_KEYS: {
136
- readonly registerHandle: "_registerHandle";
137
- readonly unregisterHandle: "_unregisterHandle";
138
- readonly waitForActiveHandles: "_waitForActiveHandles";
139
- readonly getActiveHandles: "_getActiveHandles";
140
- readonly childProcessDispatch: "_childProcessDispatch";
141
- readonly childProcessModule: "_childProcessModule";
142
- readonly moduleModule: "_moduleModule";
143
- readonly osModule: "_osModule";
144
- readonly httpModule: "_httpModule";
145
- readonly httpsModule: "_httpsModule";
146
- readonly http2Module: "_http2Module";
147
- readonly dnsModule: "_dnsModule";
148
- readonly dgramModule: "_dgramModule";
149
- readonly httpServerDispatch: "_httpServerDispatch";
150
- readonly httpServerUpgradeDispatch: "_httpServerUpgradeDispatch";
151
- readonly httpServerConnectDispatch: "_httpServerConnectDispatch";
152
- readonly http2Dispatch: "_http2Dispatch";
153
- readonly timerDispatch: "_timerDispatch";
154
- readonly upgradeSocketData: "_upgradeSocketData";
155
- readonly upgradeSocketEnd: "_upgradeSocketEnd";
156
- readonly netSocketDispatch: "_netSocketDispatch";
157
- readonly fsFacade: "_fs";
158
- readonly requireFrom: "_requireFrom";
159
- readonly moduleCache: "_moduleCache";
160
- readonly processExitError: "ProcessExitError";
161
- };
162
- export type HostBridgeGlobalKey = ValueOf<typeof HOST_BRIDGE_GLOBAL_KEYS>;
163
- export type RuntimeBridgeGlobalKey = ValueOf<typeof RUNTIME_BRIDGE_GLOBAL_KEYS>;
164
- export type BridgeGlobalKey = HostBridgeGlobalKey | RuntimeBridgeGlobalKey;
165
- export declare const HOST_BRIDGE_GLOBAL_KEY_LIST: ValueOf<{
166
- readonly dynamicImport: "_dynamicImport";
167
- readonly loadPolyfill: "_loadPolyfill";
168
- readonly resolveModule: "_resolveModule";
169
- readonly loadFile: "_loadFile";
170
- readonly scheduleTimer: "_scheduleTimer";
171
- readonly cryptoRandomFill: "_cryptoRandomFill";
172
- readonly cryptoRandomUuid: "_cryptoRandomUUID";
173
- readonly cryptoHashDigest: "_cryptoHashDigest";
174
- readonly cryptoHmacDigest: "_cryptoHmacDigest";
175
- readonly cryptoPbkdf2: "_cryptoPbkdf2";
176
- readonly cryptoScrypt: "_cryptoScrypt";
177
- readonly cryptoCipheriv: "_cryptoCipheriv";
178
- readonly cryptoDecipheriv: "_cryptoDecipheriv";
179
- readonly cryptoCipherivCreate: "_cryptoCipherivCreate";
180
- readonly cryptoCipherivUpdate: "_cryptoCipherivUpdate";
181
- readonly cryptoCipherivFinal: "_cryptoCipherivFinal";
182
- readonly cryptoSign: "_cryptoSign";
183
- readonly cryptoVerify: "_cryptoVerify";
184
- readonly cryptoAsymmetricOp: "_cryptoAsymmetricOp";
185
- readonly cryptoCreateKeyObject: "_cryptoCreateKeyObject";
186
- readonly cryptoGenerateKeyPairSync: "_cryptoGenerateKeyPairSync";
187
- readonly cryptoGenerateKeySync: "_cryptoGenerateKeySync";
188
- readonly cryptoGeneratePrimeSync: "_cryptoGeneratePrimeSync";
189
- readonly cryptoDiffieHellman: "_cryptoDiffieHellman";
190
- readonly cryptoDiffieHellmanGroup: "_cryptoDiffieHellmanGroup";
191
- readonly cryptoDiffieHellmanSessionCreate: "_cryptoDiffieHellmanSessionCreate";
192
- readonly cryptoDiffieHellmanSessionCall: "_cryptoDiffieHellmanSessionCall";
193
- readonly cryptoSubtle: "_cryptoSubtle";
194
- readonly fsReadFile: "_fsReadFile";
195
- readonly fsWriteFile: "_fsWriteFile";
196
- readonly fsReadFileBinary: "_fsReadFileBinary";
197
- readonly fsWriteFileBinary: "_fsWriteFileBinary";
198
- readonly fsReadDir: "_fsReadDir";
199
- readonly fsMkdir: "_fsMkdir";
200
- readonly fsRmdir: "_fsRmdir";
201
- readonly fsExists: "_fsExists";
202
- readonly fsStat: "_fsStat";
203
- readonly fsUnlink: "_fsUnlink";
204
- readonly fsRename: "_fsRename";
205
- readonly fsChmod: "_fsChmod";
206
- readonly fsChown: "_fsChown";
207
- readonly fsLink: "_fsLink";
208
- readonly fsSymlink: "_fsSymlink";
209
- readonly fsReadlink: "_fsReadlink";
210
- readonly fsLstat: "_fsLstat";
211
- readonly fsTruncate: "_fsTruncate";
212
- readonly fsUtimes: "_fsUtimes";
213
- readonly childProcessSpawnStart: "_childProcessSpawnStart";
214
- readonly childProcessStdinWrite: "_childProcessStdinWrite";
215
- readonly childProcessStdinClose: "_childProcessStdinClose";
216
- readonly childProcessKill: "_childProcessKill";
217
- readonly childProcessSpawnSync: "_childProcessSpawnSync";
218
- readonly networkFetchRaw: "_networkFetchRaw";
219
- readonly networkDnsLookupRaw: "_networkDnsLookupRaw";
220
- readonly networkHttpRequestRaw: "_networkHttpRequestRaw";
221
- readonly networkHttpServerListenRaw: "_networkHttpServerListenRaw";
222
- readonly networkHttpServerCloseRaw: "_networkHttpServerCloseRaw";
223
- readonly networkHttpServerRespondRaw: "_networkHttpServerRespondRaw";
224
- readonly networkHttpServerWaitRaw: "_networkHttpServerWaitRaw";
225
- readonly networkHttp2ServerListenRaw: "_networkHttp2ServerListenRaw";
226
- readonly networkHttp2ServerCloseRaw: "_networkHttp2ServerCloseRaw";
227
- readonly networkHttp2ServerWaitRaw: "_networkHttp2ServerWaitRaw";
228
- readonly networkHttp2SessionConnectRaw: "_networkHttp2SessionConnectRaw";
229
- readonly networkHttp2SessionRequestRaw: "_networkHttp2SessionRequestRaw";
230
- readonly networkHttp2SessionSettingsRaw: "_networkHttp2SessionSettingsRaw";
231
- readonly networkHttp2SessionSetLocalWindowSizeRaw: "_networkHttp2SessionSetLocalWindowSizeRaw";
232
- readonly networkHttp2SessionGoawayRaw: "_networkHttp2SessionGoawayRaw";
233
- readonly networkHttp2SessionCloseRaw: "_networkHttp2SessionCloseRaw";
234
- readonly networkHttp2SessionDestroyRaw: "_networkHttp2SessionDestroyRaw";
235
- readonly networkHttp2SessionWaitRaw: "_networkHttp2SessionWaitRaw";
236
- readonly networkHttp2ServerPollRaw: "_networkHttp2ServerPollRaw";
237
- readonly networkHttp2SessionPollRaw: "_networkHttp2SessionPollRaw";
238
- readonly networkHttp2StreamRespondRaw: "_networkHttp2StreamRespondRaw";
239
- readonly networkHttp2StreamPushStreamRaw: "_networkHttp2StreamPushStreamRaw";
240
- readonly networkHttp2StreamWriteRaw: "_networkHttp2StreamWriteRaw";
241
- readonly networkHttp2StreamEndRaw: "_networkHttp2StreamEndRaw";
242
- readonly networkHttp2StreamCloseRaw: "_networkHttp2StreamCloseRaw";
243
- readonly networkHttp2StreamPauseRaw: "_networkHttp2StreamPauseRaw";
244
- readonly networkHttp2StreamResumeRaw: "_networkHttp2StreamResumeRaw";
245
- readonly networkHttp2StreamRespondWithFileRaw: "_networkHttp2StreamRespondWithFileRaw";
246
- readonly networkHttp2ServerRespondRaw: "_networkHttp2ServerRespondRaw";
247
- readonly upgradeSocketWriteRaw: "_upgradeSocketWriteRaw";
248
- readonly upgradeSocketEndRaw: "_upgradeSocketEndRaw";
249
- readonly upgradeSocketDestroyRaw: "_upgradeSocketDestroyRaw";
250
- readonly netSocketConnectRaw: "_netSocketConnectRaw";
251
- readonly netSocketWaitConnectRaw: "_netSocketWaitConnectRaw";
252
- readonly netSocketReadRaw: "_netSocketReadRaw";
253
- readonly netSocketSetNoDelayRaw: "_netSocketSetNoDelayRaw";
254
- readonly netSocketSetKeepAliveRaw: "_netSocketSetKeepAliveRaw";
255
- readonly netSocketWriteRaw: "_netSocketWriteRaw";
256
- readonly netSocketEndRaw: "_netSocketEndRaw";
257
- readonly netSocketDestroyRaw: "_netSocketDestroyRaw";
258
- readonly netSocketUpgradeTlsRaw: "_netSocketUpgradeTlsRaw";
259
- readonly netSocketGetTlsClientHelloRaw: "_netSocketGetTlsClientHelloRaw";
260
- readonly netSocketTlsQueryRaw: "_netSocketTlsQueryRaw";
261
- readonly tlsGetCiphersRaw: "_tlsGetCiphersRaw";
262
- readonly netServerListenRaw: "_netServerListenRaw";
263
- readonly netServerAcceptRaw: "_netServerAcceptRaw";
264
- readonly netServerCloseRaw: "_netServerCloseRaw";
265
- readonly dgramSocketCreateRaw: "_dgramSocketCreateRaw";
266
- readonly dgramSocketBindRaw: "_dgramSocketBindRaw";
267
- readonly dgramSocketRecvRaw: "_dgramSocketRecvRaw";
268
- readonly dgramSocketSendRaw: "_dgramSocketSendRaw";
269
- readonly dgramSocketCloseRaw: "_dgramSocketCloseRaw";
270
- readonly dgramSocketAddressRaw: "_dgramSocketAddressRaw";
271
- readonly dgramSocketSetBufferSizeRaw: "_dgramSocketSetBufferSizeRaw";
272
- readonly dgramSocketGetBufferSizeRaw: "_dgramSocketGetBufferSizeRaw";
273
- readonly resolveModuleSync: "_resolveModuleSync";
274
- readonly loadFileSync: "_loadFileSync";
275
- readonly ptySetRawMode: "_ptySetRawMode";
276
- readonly kernelStdinRead: "_kernelStdinRead";
277
- readonly processConfig: "_processConfig";
278
- readonly osConfig: "_osConfig";
279
- readonly log: "_log";
280
- readonly error: "_error";
281
- }>[];
282
- export declare const RUNTIME_BRIDGE_GLOBAL_KEY_LIST: ValueOf<{
283
- readonly registerHandle: "_registerHandle";
284
- readonly unregisterHandle: "_unregisterHandle";
285
- readonly waitForActiveHandles: "_waitForActiveHandles";
286
- readonly getActiveHandles: "_getActiveHandles";
287
- readonly childProcessDispatch: "_childProcessDispatch";
288
- readonly childProcessModule: "_childProcessModule";
289
- readonly moduleModule: "_moduleModule";
290
- readonly osModule: "_osModule";
291
- readonly httpModule: "_httpModule";
292
- readonly httpsModule: "_httpsModule";
293
- readonly http2Module: "_http2Module";
294
- readonly dnsModule: "_dnsModule";
295
- readonly dgramModule: "_dgramModule";
296
- readonly httpServerDispatch: "_httpServerDispatch";
297
- readonly httpServerUpgradeDispatch: "_httpServerUpgradeDispatch";
298
- readonly httpServerConnectDispatch: "_httpServerConnectDispatch";
299
- readonly http2Dispatch: "_http2Dispatch";
300
- readonly timerDispatch: "_timerDispatch";
301
- readonly upgradeSocketData: "_upgradeSocketData";
302
- readonly upgradeSocketEnd: "_upgradeSocketEnd";
303
- readonly netSocketDispatch: "_netSocketDispatch";
304
- readonly fsFacade: "_fs";
305
- readonly requireFrom: "_requireFrom";
306
- readonly moduleCache: "_moduleCache";
307
- readonly processExitError: "ProcessExitError";
308
- }>[];
309
- export declare const BRIDGE_GLOBAL_KEY_LIST: readonly (ValueOf<{
310
- readonly dynamicImport: "_dynamicImport";
311
- readonly loadPolyfill: "_loadPolyfill";
312
- readonly resolveModule: "_resolveModule";
313
- readonly loadFile: "_loadFile";
314
- readonly scheduleTimer: "_scheduleTimer";
315
- readonly cryptoRandomFill: "_cryptoRandomFill";
316
- readonly cryptoRandomUuid: "_cryptoRandomUUID";
317
- readonly cryptoHashDigest: "_cryptoHashDigest";
318
- readonly cryptoHmacDigest: "_cryptoHmacDigest";
319
- readonly cryptoPbkdf2: "_cryptoPbkdf2";
320
- readonly cryptoScrypt: "_cryptoScrypt";
321
- readonly cryptoCipheriv: "_cryptoCipheriv";
322
- readonly cryptoDecipheriv: "_cryptoDecipheriv";
323
- readonly cryptoCipherivCreate: "_cryptoCipherivCreate";
324
- readonly cryptoCipherivUpdate: "_cryptoCipherivUpdate";
325
- readonly cryptoCipherivFinal: "_cryptoCipherivFinal";
326
- readonly cryptoSign: "_cryptoSign";
327
- readonly cryptoVerify: "_cryptoVerify";
328
- readonly cryptoAsymmetricOp: "_cryptoAsymmetricOp";
329
- readonly cryptoCreateKeyObject: "_cryptoCreateKeyObject";
330
- readonly cryptoGenerateKeyPairSync: "_cryptoGenerateKeyPairSync";
331
- readonly cryptoGenerateKeySync: "_cryptoGenerateKeySync";
332
- readonly cryptoGeneratePrimeSync: "_cryptoGeneratePrimeSync";
333
- readonly cryptoDiffieHellman: "_cryptoDiffieHellman";
334
- readonly cryptoDiffieHellmanGroup: "_cryptoDiffieHellmanGroup";
335
- readonly cryptoDiffieHellmanSessionCreate: "_cryptoDiffieHellmanSessionCreate";
336
- readonly cryptoDiffieHellmanSessionCall: "_cryptoDiffieHellmanSessionCall";
337
- readonly cryptoSubtle: "_cryptoSubtle";
338
- readonly fsReadFile: "_fsReadFile";
339
- readonly fsWriteFile: "_fsWriteFile";
340
- readonly fsReadFileBinary: "_fsReadFileBinary";
341
- readonly fsWriteFileBinary: "_fsWriteFileBinary";
342
- readonly fsReadDir: "_fsReadDir";
343
- readonly fsMkdir: "_fsMkdir";
344
- readonly fsRmdir: "_fsRmdir";
345
- readonly fsExists: "_fsExists";
346
- readonly fsStat: "_fsStat";
347
- readonly fsUnlink: "_fsUnlink";
348
- readonly fsRename: "_fsRename";
349
- readonly fsChmod: "_fsChmod";
350
- readonly fsChown: "_fsChown";
351
- readonly fsLink: "_fsLink";
352
- readonly fsSymlink: "_fsSymlink";
353
- readonly fsReadlink: "_fsReadlink";
354
- readonly fsLstat: "_fsLstat";
355
- readonly fsTruncate: "_fsTruncate";
356
- readonly fsUtimes: "_fsUtimes";
357
- readonly childProcessSpawnStart: "_childProcessSpawnStart";
358
- readonly childProcessStdinWrite: "_childProcessStdinWrite";
359
- readonly childProcessStdinClose: "_childProcessStdinClose";
360
- readonly childProcessKill: "_childProcessKill";
361
- readonly childProcessSpawnSync: "_childProcessSpawnSync";
362
- readonly networkFetchRaw: "_networkFetchRaw";
363
- readonly networkDnsLookupRaw: "_networkDnsLookupRaw";
364
- readonly networkHttpRequestRaw: "_networkHttpRequestRaw";
365
- readonly networkHttpServerListenRaw: "_networkHttpServerListenRaw";
366
- readonly networkHttpServerCloseRaw: "_networkHttpServerCloseRaw";
367
- readonly networkHttpServerRespondRaw: "_networkHttpServerRespondRaw";
368
- readonly networkHttpServerWaitRaw: "_networkHttpServerWaitRaw";
369
- readonly networkHttp2ServerListenRaw: "_networkHttp2ServerListenRaw";
370
- readonly networkHttp2ServerCloseRaw: "_networkHttp2ServerCloseRaw";
371
- readonly networkHttp2ServerWaitRaw: "_networkHttp2ServerWaitRaw";
372
- readonly networkHttp2SessionConnectRaw: "_networkHttp2SessionConnectRaw";
373
- readonly networkHttp2SessionRequestRaw: "_networkHttp2SessionRequestRaw";
374
- readonly networkHttp2SessionSettingsRaw: "_networkHttp2SessionSettingsRaw";
375
- readonly networkHttp2SessionSetLocalWindowSizeRaw: "_networkHttp2SessionSetLocalWindowSizeRaw";
376
- readonly networkHttp2SessionGoawayRaw: "_networkHttp2SessionGoawayRaw";
377
- readonly networkHttp2SessionCloseRaw: "_networkHttp2SessionCloseRaw";
378
- readonly networkHttp2SessionDestroyRaw: "_networkHttp2SessionDestroyRaw";
379
- readonly networkHttp2SessionWaitRaw: "_networkHttp2SessionWaitRaw";
380
- readonly networkHttp2ServerPollRaw: "_networkHttp2ServerPollRaw";
381
- readonly networkHttp2SessionPollRaw: "_networkHttp2SessionPollRaw";
382
- readonly networkHttp2StreamRespondRaw: "_networkHttp2StreamRespondRaw";
383
- readonly networkHttp2StreamPushStreamRaw: "_networkHttp2StreamPushStreamRaw";
384
- readonly networkHttp2StreamWriteRaw: "_networkHttp2StreamWriteRaw";
385
- readonly networkHttp2StreamEndRaw: "_networkHttp2StreamEndRaw";
386
- readonly networkHttp2StreamCloseRaw: "_networkHttp2StreamCloseRaw";
387
- readonly networkHttp2StreamPauseRaw: "_networkHttp2StreamPauseRaw";
388
- readonly networkHttp2StreamResumeRaw: "_networkHttp2StreamResumeRaw";
389
- readonly networkHttp2StreamRespondWithFileRaw: "_networkHttp2StreamRespondWithFileRaw";
390
- readonly networkHttp2ServerRespondRaw: "_networkHttp2ServerRespondRaw";
391
- readonly upgradeSocketWriteRaw: "_upgradeSocketWriteRaw";
392
- readonly upgradeSocketEndRaw: "_upgradeSocketEndRaw";
393
- readonly upgradeSocketDestroyRaw: "_upgradeSocketDestroyRaw";
394
- readonly netSocketConnectRaw: "_netSocketConnectRaw";
395
- readonly netSocketWaitConnectRaw: "_netSocketWaitConnectRaw";
396
- readonly netSocketReadRaw: "_netSocketReadRaw";
397
- readonly netSocketSetNoDelayRaw: "_netSocketSetNoDelayRaw";
398
- readonly netSocketSetKeepAliveRaw: "_netSocketSetKeepAliveRaw";
399
- readonly netSocketWriteRaw: "_netSocketWriteRaw";
400
- readonly netSocketEndRaw: "_netSocketEndRaw";
401
- readonly netSocketDestroyRaw: "_netSocketDestroyRaw";
402
- readonly netSocketUpgradeTlsRaw: "_netSocketUpgradeTlsRaw";
403
- readonly netSocketGetTlsClientHelloRaw: "_netSocketGetTlsClientHelloRaw";
404
- readonly netSocketTlsQueryRaw: "_netSocketTlsQueryRaw";
405
- readonly tlsGetCiphersRaw: "_tlsGetCiphersRaw";
406
- readonly netServerListenRaw: "_netServerListenRaw";
407
- readonly netServerAcceptRaw: "_netServerAcceptRaw";
408
- readonly netServerCloseRaw: "_netServerCloseRaw";
409
- readonly dgramSocketCreateRaw: "_dgramSocketCreateRaw";
410
- readonly dgramSocketBindRaw: "_dgramSocketBindRaw";
411
- readonly dgramSocketRecvRaw: "_dgramSocketRecvRaw";
412
- readonly dgramSocketSendRaw: "_dgramSocketSendRaw";
413
- readonly dgramSocketCloseRaw: "_dgramSocketCloseRaw";
414
- readonly dgramSocketAddressRaw: "_dgramSocketAddressRaw";
415
- readonly dgramSocketSetBufferSizeRaw: "_dgramSocketSetBufferSizeRaw";
416
- readonly dgramSocketGetBufferSizeRaw: "_dgramSocketGetBufferSizeRaw";
417
- readonly resolveModuleSync: "_resolveModuleSync";
418
- readonly loadFileSync: "_loadFileSync";
419
- readonly ptySetRawMode: "_ptySetRawMode";
420
- readonly kernelStdinRead: "_kernelStdinRead";
421
- readonly processConfig: "_processConfig";
422
- readonly osConfig: "_osConfig";
423
- readonly log: "_log";
424
- readonly error: "_error";
425
- }> | ValueOf<{
426
- readonly registerHandle: "_registerHandle";
427
- readonly unregisterHandle: "_unregisterHandle";
428
- readonly waitForActiveHandles: "_waitForActiveHandles";
429
- readonly getActiveHandles: "_getActiveHandles";
430
- readonly childProcessDispatch: "_childProcessDispatch";
431
- readonly childProcessModule: "_childProcessModule";
432
- readonly moduleModule: "_moduleModule";
433
- readonly osModule: "_osModule";
434
- readonly httpModule: "_httpModule";
435
- readonly httpsModule: "_httpsModule";
436
- readonly http2Module: "_http2Module";
437
- readonly dnsModule: "_dnsModule";
438
- readonly dgramModule: "_dgramModule";
439
- readonly httpServerDispatch: "_httpServerDispatch";
440
- readonly httpServerUpgradeDispatch: "_httpServerUpgradeDispatch";
441
- readonly httpServerConnectDispatch: "_httpServerConnectDispatch";
442
- readonly http2Dispatch: "_http2Dispatch";
443
- readonly timerDispatch: "_timerDispatch";
444
- readonly upgradeSocketData: "_upgradeSocketData";
445
- readonly upgradeSocketEnd: "_upgradeSocketEnd";
446
- readonly netSocketDispatch: "_netSocketDispatch";
447
- readonly fsFacade: "_fs";
448
- readonly requireFrom: "_requireFrom";
449
- readonly moduleCache: "_moduleCache";
450
- readonly processExitError: "ProcessExitError";
451
- }>)[];
452
- /** A bridge Reference that resolves async via `{ result: { promise: true } }`. */
453
- export interface BridgeApplyRef<TArgs extends unknown[], TResult> {
454
- apply(ctx: undefined, args: TArgs, options: {
455
- result: {
456
- promise: true;
457
- };
458
- }): Promise<TResult>;
459
- }
460
- /** A bridge Reference called synchronously (blocks the isolate). */
461
- export interface BridgeApplySyncRef<TArgs extends unknown[], TResult> {
462
- applySync(ctx: undefined, args: TArgs): TResult;
463
- }
464
- /**
465
- * A bridge Reference that blocks the isolate while the host resolves
466
- * a Promise. Used for sync-looking APIs (require, readFileSync) that need
467
- * async host operations.
468
- */
469
- export interface BridgeApplySyncPromiseRef<TArgs extends unknown[], TResult> {
470
- applySyncPromise(ctx: undefined, args: TArgs): TResult;
471
- }
472
- export type ModuleLoadMode = "require" | "import";
473
- export type DynamicImportBridgeRef = BridgeApplyRef<[
474
- string,
475
- string
476
- ], Record<string, unknown> | null>;
477
- export type LoadPolyfillBridgeRef = BridgeApplyRef<[string], string | null>;
478
- export type ResolveModuleBridgeRef = BridgeApplySyncPromiseRef<[
479
- string,
480
- string
481
- ] | [string, string, ModuleLoadMode], string | null>;
482
- export type LoadFileBridgeRef = BridgeApplySyncPromiseRef<[
483
- string
484
- ] | [string, ModuleLoadMode], string | null>;
485
- export type RequireFromBridgeFn = (request: string, dirname: string) => unknown;
486
- export type ModuleCacheBridgeRecord = Record<string, unknown>;
487
- export type ProcessLogBridgeRef = BridgeApplySyncRef<[string], void>;
488
- export type ProcessErrorBridgeRef = BridgeApplySyncRef<[string], void>;
489
- export type ScheduleTimerBridgeRef = BridgeApplyRef<[number], void>;
490
- export type KernelStdinReadBridgeRef = BridgeApplyRef<[
491
- ], {
492
- done: boolean;
493
- dataBase64?: string;
494
- }>;
495
- export type CryptoRandomFillBridgeRef = BridgeApplySyncRef<[number], string>;
496
- export type CryptoRandomUuidBridgeRef = BridgeApplySyncRef<[], string>;
497
- export type CryptoHashDigestBridgeRef = BridgeApplySyncRef<[string, string], string>;
498
- export type CryptoHmacDigestBridgeRef = BridgeApplySyncRef<[string, string, string], string>;
499
- export type CryptoPbkdf2BridgeRef = BridgeApplySyncRef<[
500
- string,
501
- string,
502
- number,
503
- number,
504
- string
505
- ], string>;
506
- export type CryptoScryptBridgeRef = BridgeApplySyncRef<[
507
- string,
508
- string,
509
- number,
510
- string
511
- ], string>;
512
- export type CryptoCipherivBridgeRef = BridgeApplySyncRef<[
513
- string,
514
- string,
515
- string | null,
516
- string,
517
- string?
518
- ], string>;
519
- export type CryptoDecipherivBridgeRef = BridgeApplySyncRef<[
520
- string,
521
- string,
522
- string | null,
523
- string,
524
- string
525
- ], string>;
526
- export type CryptoCipherivCreateBridgeRef = BridgeApplySyncRef<[
527
- string,
528
- string,
529
- string,
530
- string | null,
531
- string
532
- ], number>;
533
- export type CryptoCipherivUpdateBridgeRef = BridgeApplySyncRef<[
534
- number,
535
- string
536
- ], string>;
537
- export type CryptoCipherivFinalBridgeRef = BridgeApplySyncRef<[
538
- number
539
- ], string>;
540
- export type CryptoSignBridgeRef = BridgeApplySyncRef<[
541
- string | null,
542
- string,
543
- string
544
- ], string>;
545
- export type CryptoVerifyBridgeRef = BridgeApplySyncRef<[
546
- string | null,
547
- string,
548
- string,
549
- string
550
- ], boolean>;
551
- export type CryptoAsymmetricOpBridgeRef = BridgeApplySyncRef<[
552
- string,
553
- string,
554
- string
555
- ], string>;
556
- export type CryptoCreateKeyObjectBridgeRef = BridgeApplySyncRef<[
557
- string,
558
- string
559
- ], string>;
560
- export type CryptoGenerateKeyPairSyncBridgeRef = BridgeApplySyncRef<[
561
- string,
562
- string
563
- ], string>;
564
- export type CryptoGenerateKeySyncBridgeRef = BridgeApplySyncRef<[
565
- string,
566
- string
567
- ], string>;
568
- export type CryptoGeneratePrimeSyncBridgeRef = BridgeApplySyncRef<[
569
- number,
570
- string
571
- ], string>;
572
- export type CryptoDiffieHellmanBridgeRef = BridgeApplySyncRef<[string], string>;
573
- export type CryptoDiffieHellmanGroupBridgeRef = BridgeApplySyncRef<[string], string>;
574
- export type CryptoDiffieHellmanSessionCreateBridgeRef = BridgeApplySyncRef<[string], number>;
575
- export type CryptoDiffieHellmanSessionCallBridgeRef = BridgeApplySyncRef<[
576
- number,
577
- string
578
- ], string>;
579
- export type CryptoSubtleBridgeRef = BridgeApplySyncRef<[string], string>;
580
- export type FsReadFileBridgeRef = BridgeApplySyncPromiseRef<[string], string>;
581
- export type FsWriteFileBridgeRef = BridgeApplySyncPromiseRef<[string, string], void>;
582
- export type FsReadFileBinaryBridgeRef = BridgeApplySyncPromiseRef<[string], string>;
583
- export type FsWriteFileBinaryBridgeRef = BridgeApplySyncPromiseRef<[
584
- string,
585
- string
586
- ], void>;
587
- export type FsReadDirBridgeRef = BridgeApplySyncPromiseRef<[string], string>;
588
- export type FsMkdirBridgeRef = BridgeApplySyncPromiseRef<[string, boolean], void>;
589
- export type FsRmdirBridgeRef = BridgeApplySyncPromiseRef<[string], void>;
590
- export type FsExistsBridgeRef = BridgeApplySyncPromiseRef<[string], boolean>;
591
- export type FsStatBridgeRef = BridgeApplySyncPromiseRef<[string], string>;
592
- export type FsUnlinkBridgeRef = BridgeApplySyncPromiseRef<[string], void>;
593
- export type FsRenameBridgeRef = BridgeApplySyncPromiseRef<[string, string], void>;
594
- export type FsChmodBridgeRef = BridgeApplySyncPromiseRef<[string, number], void>;
595
- export type FsChownBridgeRef = BridgeApplySyncPromiseRef<[string, number, number], void>;
596
- export type FsLinkBridgeRef = BridgeApplySyncPromiseRef<[string, string], void>;
597
- export type FsSymlinkBridgeRef = BridgeApplySyncPromiseRef<[string, string], void>;
598
- export type FsReadlinkBridgeRef = BridgeApplySyncPromiseRef<[string], string>;
599
- export type FsLstatBridgeRef = BridgeApplySyncPromiseRef<[string], string>;
600
- export type FsTruncateBridgeRef = BridgeApplySyncPromiseRef<[string, number], void>;
601
- export type FsUtimesBridgeRef = BridgeApplySyncPromiseRef<[string, number, number], void>;
602
- /** Combined filesystem bridge facade installed as `globalThis._fs` in the isolate. */
603
- export interface FsFacadeBridge {
604
- readFile: FsReadFileBridgeRef;
605
- writeFile: FsWriteFileBridgeRef;
606
- readFileBinary: FsReadFileBinaryBridgeRef;
607
- writeFileBinary: FsWriteFileBinaryBridgeRef;
608
- readDir: FsReadDirBridgeRef;
609
- mkdir: FsMkdirBridgeRef;
610
- rmdir: FsRmdirBridgeRef;
611
- exists: FsExistsBridgeRef;
612
- stat: FsStatBridgeRef;
613
- unlink: FsUnlinkBridgeRef;
614
- rename: FsRenameBridgeRef;
615
- chmod: FsChmodBridgeRef;
616
- chown: FsChownBridgeRef;
617
- link: FsLinkBridgeRef;
618
- symlink: FsSymlinkBridgeRef;
619
- readlink: FsReadlinkBridgeRef;
620
- lstat: FsLstatBridgeRef;
621
- truncate: FsTruncateBridgeRef;
622
- utimes: FsUtimesBridgeRef;
623
- }
624
- export type ChildProcessSpawnStartBridgeRef = BridgeApplySyncRef<[
625
- string,
626
- string,
627
- string
628
- ], number>;
629
- export type ChildProcessStdinWriteBridgeRef = BridgeApplySyncRef<[
630
- number,
631
- Uint8Array
632
- ], void>;
633
- export type ChildProcessStdinCloseBridgeRef = BridgeApplySyncRef<[number], void>;
634
- export type ChildProcessKillBridgeRef = BridgeApplySyncRef<[number, number], void>;
635
- export type ChildProcessSpawnSyncBridgeRef = BridgeApplySyncPromiseRef<[
636
- string,
637
- string,
638
- string
639
- ], string>;
640
- export type NetworkFetchRawBridgeRef = BridgeApplyRef<[string, string], string>;
641
- export type NetworkDnsLookupRawBridgeRef = BridgeApplyRef<[string], string>;
642
- export type NetworkHttpRequestRawBridgeRef = BridgeApplyRef<[string, string], string>;
643
- export type NetworkHttpServerListenRawBridgeRef = BridgeApplyRef<[string], string>;
644
- export type NetworkHttpServerCloseRawBridgeRef = BridgeApplyRef<[number], void>;
645
- export type NetworkHttpServerRespondRawBridgeRef = BridgeApplySyncRef<[
646
- number,
647
- number,
648
- string
649
- ], void>;
650
- export type NetworkHttpServerWaitRawBridgeRef = BridgeApplyRef<[number], void>;
651
- export type NetworkHttp2ServerListenRawBridgeRef = BridgeApplySyncPromiseRef<[
652
- string
653
- ], string>;
654
- export type NetworkHttp2ServerCloseRawBridgeRef = BridgeApplyRef<[number], void>;
655
- export type NetworkHttp2ServerWaitRawBridgeRef = BridgeApplyRef<[number], void>;
656
- export type NetworkHttp2SessionConnectRawBridgeRef = BridgeApplySyncPromiseRef<[
657
- string
658
- ], string>;
659
- export type NetworkHttp2SessionRequestRawBridgeRef = BridgeApplySyncRef<[
660
- number,
661
- string,
662
- string
663
- ], number>;
664
- export type NetworkHttp2SessionSettingsRawBridgeRef = BridgeApplySyncRef<[
665
- number,
666
- string
667
- ], void>;
668
- export type NetworkHttp2SessionSetLocalWindowSizeRawBridgeRef = BridgeApplySyncRef<[
669
- number,
670
- number
671
- ], string>;
672
- export type NetworkHttp2SessionGoawayRawBridgeRef = BridgeApplySyncRef<[
673
- number,
674
- number,
675
- number,
676
- string | null
677
- ], void>;
678
- export type NetworkHttp2SessionCloseRawBridgeRef = BridgeApplySyncRef<[
679
- number
680
- ], void>;
681
- export type NetworkHttp2SessionDestroyRawBridgeRef = BridgeApplySyncRef<[
682
- number
683
- ], void>;
684
- export type NetworkHttp2SessionWaitRawBridgeRef = BridgeApplyRef<[number], void>;
685
- export type NetworkHttp2ServerPollRawBridgeRef = BridgeApplySyncRef<[
686
- number
687
- ], string | null>;
688
- export type NetworkHttp2SessionPollRawBridgeRef = BridgeApplySyncRef<[
689
- number
690
- ], string | null>;
691
- export type NetworkHttp2StreamRespondRawBridgeRef = BridgeApplySyncRef<[
692
- number,
693
- string
694
- ], void>;
695
- export type NetworkHttp2StreamPushStreamRawBridgeRef = BridgeApplySyncRef<[
696
- number,
697
- string,
698
- string
699
- ], string>;
700
- export type NetworkHttp2StreamWriteRawBridgeRef = BridgeApplySyncRef<[
701
- number,
702
- string
703
- ], boolean>;
704
- export type NetworkHttp2StreamEndRawBridgeRef = BridgeApplySyncRef<[
705
- number,
706
- string | null
707
- ], void>;
708
- export type NetworkHttp2StreamCloseRawBridgeRef = BridgeApplySyncRef<[
709
- number,
710
- number | null
711
- ], void>;
712
- export type NetworkHttp2StreamPauseRawBridgeRef = BridgeApplySyncRef<[number], void>;
713
- export type NetworkHttp2StreamResumeRawBridgeRef = BridgeApplySyncRef<[number], void>;
714
- export type NetworkHttp2StreamRespondWithFileRawBridgeRef = BridgeApplySyncRef<[
715
- number,
716
- string,
717
- string,
718
- string
719
- ], void>;
720
- export type NetworkHttp2ServerRespondRawBridgeRef = BridgeApplySyncRef<[
721
- number,
722
- number,
723
- string
724
- ], void>;
725
- export type UpgradeSocketWriteRawBridgeRef = BridgeApplySyncRef<[number, string], void>;
726
- export type UpgradeSocketEndRawBridgeRef = BridgeApplySyncRef<[number], void>;
727
- export type UpgradeSocketDestroyRawBridgeRef = BridgeApplySyncRef<[number], void>;
728
- export type NetSocketConnectRawBridgeRef = BridgeApplySyncRef<[string], number>;
729
- export type NetSocketWaitConnectRawBridgeRef = BridgeApplyRef<[number], string>;
730
- export type NetSocketReadRawBridgeRef = BridgeApplySyncRef<[number], string | null>;
731
- export type NetSocketSetNoDelayRawBridgeRef = BridgeApplySyncRef<[number, boolean], void>;
732
- export type NetSocketSetKeepAliveRawBridgeRef = BridgeApplySyncRef<[number, boolean, number], void>;
733
- export type NetSocketWriteRawBridgeRef = BridgeApplySyncRef<[number, string], void>;
734
- export type NetSocketEndRawBridgeRef = BridgeApplySyncRef<[number], void>;
735
- export type NetSocketDestroyRawBridgeRef = BridgeApplySyncRef<[number], void>;
736
- export type NetSocketUpgradeTlsRawBridgeRef = BridgeApplySyncRef<[number, string], void>;
737
- export type NetSocketGetTlsClientHelloRawBridgeRef = BridgeApplySyncRef<[number], string>;
738
- export type NetSocketTlsQueryRawBridgeRef = BridgeApplySyncRef<[
739
- number,
740
- string,
741
- boolean?
742
- ], string>;
743
- export type TlsGetCiphersRawBridgeRef = BridgeApplySyncRef<[], string>;
744
- export type NetServerListenRawBridgeRef = BridgeApplyRef<[string], string>;
745
- export type NetServerAcceptRawBridgeRef = BridgeApplySyncRef<[number], string | null>;
746
- export type NetServerCloseRawBridgeRef = BridgeApplyRef<[number], void>;
747
- export type DgramSocketCreateRawBridgeRef = BridgeApplySyncRef<[string], number>;
748
- export type DgramSocketBindRawBridgeRef = BridgeApplySyncPromiseRef<[number, string], string>;
749
- export type DgramSocketRecvRawBridgeRef = BridgeApplySyncRef<[number], string | null>;
750
- export type DgramSocketSendRawBridgeRef = BridgeApplySyncPromiseRef<[number, string], number>;
751
- export type DgramSocketCloseRawBridgeRef = BridgeApplySyncPromiseRef<[number], void>;
752
- export type DgramSocketAddressRawBridgeRef = BridgeApplySyncRef<[number], string>;
753
- export type DgramSocketSetBufferSizeRawBridgeRef = BridgeApplySyncRef<[
754
- number,
755
- "recv" | "send",
756
- number
757
- ], void>;
758
- export type DgramSocketGetBufferSizeRawBridgeRef = BridgeApplySyncRef<[
759
- number,
760
- "recv" | "send"
761
- ], number>;
762
- export type ResolveModuleSyncBridgeRef = BridgeApplySyncRef<[
763
- string,
764
- string
765
- ], string | null>;
766
- export type LoadFileSyncBridgeRef = BridgeApplySyncRef<[string], string | null>;
767
- export type PtySetRawModeBridgeRef = BridgeApplySyncRef<[boolean], void>;
768
- export type RegisterHandleBridgeFn = (id: string, description: string) => void;
769
- export type UnregisterHandleBridgeFn = (id: string) => void;
770
- export type BatchResolveModulesBridgeRef = BridgeApplySyncPromiseRef<[
771
- string
772
- ], string>;