@cortexkit/pi-magic-context 0.41.2 → 0.41.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/dist/historian-calibration-extension.js +0 -2
- package/dist/{index-q2vgz0j1.js → index-147qn1yq.js} +4 -1
- package/dist/{index-1yh8g550.js → index-22jkk6wg.js} +2 -15
- package/dist/index-b3eqj1g6.js +51 -0
- package/dist/{index-rgdqj8nj.js → index-e7vx3byk.js} +1 -1
- package/dist/{index-9xexf8s7.js → index-rn7gafjr.js} +1 -9
- package/dist/{index-ys39wb43.js → index-s0zw9ddk.js} +12903 -26334
- package/dist/index-v6t0tg85.js +13 -0
- package/dist/index.js +3258 -1642
- package/dist/{index-dynqfgx1.js → module-asyncify-2EFITU5U-rkqjhjxd.js} +69 -8
- package/dist/{prompt-context-3kjq9ejq.js → prompt-context-g3abnc66.js} +0 -2
- package/dist/rpc-notifications-jxy30tgz.js +8 -0
- package/dist/{safe-notification-target-hjcb423r.js → safe-notification-target-em2xnn1k.js} +1 -3
- package/dist/subagent-entry.js +12 -12
- package/dist/transformers-node-wasm.js +328 -328
- package/dist/transformers-web.js +72 -72
- package/dist/{transformers.node-b1wa0hgx.js → transformers.node-dpmf3wpx.js} +74 -74
- package/package.json +1 -1
- package/dist/emscripten-module-49k43zfy.js +0 -507
- package/dist/emscripten-module-ex4v0x4z.js +0 -606
- package/dist/emscripten-module-jfs3d1dq.js +0 -1536
- package/dist/emscripten-module-ss4g4spn.js +0 -4563
- package/dist/ffi-bbm9vkfa.js +0 -92
- package/dist/ffi-kb5r0x1j.js +0 -92
- package/dist/ffi-qnrt0y78.js +0 -80
- package/dist/ffi-yx2hpf4p.js +0 -80
- package/dist/index-hw34xmzk.js +0 -104
- package/dist/index-ss632za9.js +0 -77
- package/dist/index-y63nbvkk.js +0 -251
- package/dist/module-ES6BEMUI-1yjdz59c.js +0 -14
- package/dist/module-asyncify-2EFITU5U-fdkx4fhy.js +0 -9
- package/dist/rpc-notifications-gmhvmfpy.js +0 -17
package/dist/ffi-bbm9vkfa.js
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
assertSync
|
|
3
|
-
} from "./index-9xexf8s7.js";
|
|
4
|
-
import"./index-1yh8g550.js";
|
|
5
|
-
|
|
6
|
-
// ../../node_modules/.bun/@jitl+quickjs-wasmfile-debug-asyncify@0.32.0/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/ffi.mjs
|
|
7
|
-
var QuickJSAsyncFFI = class {
|
|
8
|
-
constructor(module) {
|
|
9
|
-
this.module = module;
|
|
10
|
-
this.DEBUG = true;
|
|
11
|
-
this.QTS_Throw = this.module.cwrap("QTS_Throw", "number", ["number", "number"]);
|
|
12
|
-
this.QTS_NewError = this.module.cwrap("QTS_NewError", "number", ["number"]);
|
|
13
|
-
this.QTS_RuntimeSetMemoryLimit = this.module.cwrap("QTS_RuntimeSetMemoryLimit", null, ["number", "number"]);
|
|
14
|
-
this.QTS_RuntimeComputeMemoryUsage = this.module.cwrap("QTS_RuntimeComputeMemoryUsage", "number", ["number", "number"]);
|
|
15
|
-
this.QTS_RuntimeDumpMemoryUsage = this.module.cwrap("QTS_RuntimeDumpMemoryUsage", "number", ["number"]);
|
|
16
|
-
this.QTS_RecoverableLeakCheck = this.module.cwrap("QTS_RecoverableLeakCheck", "number", []);
|
|
17
|
-
this.QTS_BuildIsSanitizeLeak = this.module.cwrap("QTS_BuildIsSanitizeLeak", "number", []);
|
|
18
|
-
this.QTS_RuntimeSetMaxStackSize = this.module.cwrap("QTS_RuntimeSetMaxStackSize", null, ["number", "number"]);
|
|
19
|
-
this.QTS_GetUndefined = this.module.cwrap("QTS_GetUndefined", "number", []);
|
|
20
|
-
this.QTS_GetNull = this.module.cwrap("QTS_GetNull", "number", []);
|
|
21
|
-
this.QTS_GetFalse = this.module.cwrap("QTS_GetFalse", "number", []);
|
|
22
|
-
this.QTS_GetTrue = this.module.cwrap("QTS_GetTrue", "number", []);
|
|
23
|
-
this.QTS_NewHostRef = this.module.cwrap("QTS_NewHostRef", "number", ["number", "number"]);
|
|
24
|
-
this.QTS_GetHostRefId = this.module.cwrap("QTS_GetHostRefId", "number", ["number"]);
|
|
25
|
-
this.QTS_NewRuntime = this.module.cwrap("QTS_NewRuntime", "number", []);
|
|
26
|
-
this.QTS_FreeRuntime = this.module.cwrap("QTS_FreeRuntime", null, ["number"]);
|
|
27
|
-
this.QTS_NewContext = this.module.cwrap("QTS_NewContext", "number", ["number", "number"]);
|
|
28
|
-
this.QTS_FreeContext = this.module.cwrap("QTS_FreeContext", null, ["number"]);
|
|
29
|
-
this.QTS_FreeValuePointer = this.module.cwrap("QTS_FreeValuePointer", null, ["number", "number"]);
|
|
30
|
-
this.QTS_FreeValuePointerRuntime = this.module.cwrap("QTS_FreeValuePointerRuntime", null, ["number", "number"]);
|
|
31
|
-
this.QTS_FreeVoidPointer = this.module.cwrap("QTS_FreeVoidPointer", null, ["number", "number"]);
|
|
32
|
-
this.QTS_FreeCString = this.module.cwrap("QTS_FreeCString", null, ["number", "number"]);
|
|
33
|
-
this.QTS_DupValuePointer = this.module.cwrap("QTS_DupValuePointer", "number", ["number", "number"]);
|
|
34
|
-
this.QTS_NewObject = this.module.cwrap("QTS_NewObject", "number", ["number"]);
|
|
35
|
-
this.QTS_NewObjectProto = this.module.cwrap("QTS_NewObjectProto", "number", ["number", "number"]);
|
|
36
|
-
this.QTS_NewArray = this.module.cwrap("QTS_NewArray", "number", ["number"]);
|
|
37
|
-
this.QTS_NewArrayBuffer = this.module.cwrap("QTS_NewArrayBuffer", "number", ["number", "number", "number"]);
|
|
38
|
-
this.QTS_NewFloat64 = this.module.cwrap("QTS_NewFloat64", "number", ["number", "number"]);
|
|
39
|
-
this.QTS_GetFloat64 = this.module.cwrap("QTS_GetFloat64", "number", ["number", "number"]);
|
|
40
|
-
this.QTS_NewString = this.module.cwrap("QTS_NewString", "number", ["number", "number"]);
|
|
41
|
-
this.QTS_GetString = this.module.cwrap("QTS_GetString", "number", ["number", "number"]);
|
|
42
|
-
this.QTS_GetArrayBuffer = this.module.cwrap("QTS_GetArrayBuffer", "number", ["number", "number"]);
|
|
43
|
-
this.QTS_GetArrayBufferLength = this.module.cwrap("QTS_GetArrayBufferLength", "number", ["number", "number"]);
|
|
44
|
-
this.QTS_NewSymbol = this.module.cwrap("QTS_NewSymbol", "number", ["number", "number", "number"]);
|
|
45
|
-
this.QTS_GetSymbolDescriptionOrKey = assertSync(this.module.cwrap("QTS_GetSymbolDescriptionOrKey", "number", ["number", "number"]));
|
|
46
|
-
this.QTS_GetSymbolDescriptionOrKey_MaybeAsync = this.module.cwrap("QTS_GetSymbolDescriptionOrKey", "number", ["number", "number"], { async: true });
|
|
47
|
-
this.QTS_IsGlobalSymbol = this.module.cwrap("QTS_IsGlobalSymbol", "number", ["number", "number"]);
|
|
48
|
-
this.QTS_IsJobPending = this.module.cwrap("QTS_IsJobPending", "number", ["number"]);
|
|
49
|
-
this.QTS_ExecutePendingJob = assertSync(this.module.cwrap("QTS_ExecutePendingJob", "number", ["number", "number", "number"]));
|
|
50
|
-
this.QTS_ExecutePendingJob_MaybeAsync = this.module.cwrap("QTS_ExecutePendingJob", "number", ["number", "number", "number"], { async: true });
|
|
51
|
-
this.QTS_GetProp = assertSync(this.module.cwrap("QTS_GetProp", "number", ["number", "number", "number"]));
|
|
52
|
-
this.QTS_GetProp_MaybeAsync = this.module.cwrap("QTS_GetProp", "number", ["number", "number", "number"], { async: true });
|
|
53
|
-
this.QTS_GetPropNumber = assertSync(this.module.cwrap("QTS_GetPropNumber", "number", ["number", "number", "number"]));
|
|
54
|
-
this.QTS_GetPropNumber_MaybeAsync = this.module.cwrap("QTS_GetPropNumber", "number", ["number", "number", "number"], { async: true });
|
|
55
|
-
this.QTS_SetProp = assertSync(this.module.cwrap("QTS_SetProp", null, ["number", "number", "number", "number"]));
|
|
56
|
-
this.QTS_SetProp_MaybeAsync = this.module.cwrap("QTS_SetProp", null, ["number", "number", "number", "number"], { async: true });
|
|
57
|
-
this.QTS_DefineProp = this.module.cwrap("QTS_DefineProp", null, ["number", "number", "number", "number", "number", "number", "boolean", "boolean", "boolean"]);
|
|
58
|
-
this.QTS_GetOwnPropertyNames = assertSync(this.module.cwrap("QTS_GetOwnPropertyNames", "number", ["number", "number", "number", "number", "number"]));
|
|
59
|
-
this.QTS_GetOwnPropertyNames_MaybeAsync = this.module.cwrap("QTS_GetOwnPropertyNames", "number", ["number", "number", "number", "number", "number"], { async: true });
|
|
60
|
-
this.QTS_Call = assertSync(this.module.cwrap("QTS_Call", "number", ["number", "number", "number", "number", "number"]));
|
|
61
|
-
this.QTS_Call_MaybeAsync = this.module.cwrap("QTS_Call", "number", ["number", "number", "number", "number", "number"], { async: true });
|
|
62
|
-
this.QTS_ResolveException = this.module.cwrap("QTS_ResolveException", "number", ["number", "number"]);
|
|
63
|
-
this.QTS_Dump = assertSync(this.module.cwrap("QTS_Dump", "number", ["number", "number"]));
|
|
64
|
-
this.QTS_Dump_MaybeAsync = this.module.cwrap("QTS_Dump", "number", ["number", "number"], { async: true });
|
|
65
|
-
this.QTS_Eval = assertSync(this.module.cwrap("QTS_Eval", "number", ["number", "number", "number", "string", "number", "number"]));
|
|
66
|
-
this.QTS_Eval_MaybeAsync = this.module.cwrap("QTS_Eval", "number", ["number", "number", "number", "string", "number", "number"], { async: true });
|
|
67
|
-
this.QTS_GetModuleNamespace = this.module.cwrap("QTS_GetModuleNamespace", "number", ["number", "number"]);
|
|
68
|
-
this.QTS_Typeof = this.module.cwrap("QTS_Typeof", "number", ["number", "number"]);
|
|
69
|
-
this.QTS_GetLength = this.module.cwrap("QTS_GetLength", "number", ["number", "number", "number"]);
|
|
70
|
-
this.QTS_IsEqual = this.module.cwrap("QTS_IsEqual", "number", ["number", "number", "number", "number"]);
|
|
71
|
-
this.QTS_GetGlobalObject = this.module.cwrap("QTS_GetGlobalObject", "number", ["number"]);
|
|
72
|
-
this.QTS_NewPromiseCapability = this.module.cwrap("QTS_NewPromiseCapability", "number", ["number", "number"]);
|
|
73
|
-
this.QTS_PromiseState = this.module.cwrap("QTS_PromiseState", "number", ["number", "number"]);
|
|
74
|
-
this.QTS_PromiseResult = this.module.cwrap("QTS_PromiseResult", "number", ["number", "number"]);
|
|
75
|
-
this.QTS_TestStringArg = this.module.cwrap("QTS_TestStringArg", null, ["string"]);
|
|
76
|
-
this.QTS_GetDebugLogEnabled = this.module.cwrap("QTS_GetDebugLogEnabled", "number", ["number"]);
|
|
77
|
-
this.QTS_SetDebugLogEnabled = this.module.cwrap("QTS_SetDebugLogEnabled", null, ["number", "number"]);
|
|
78
|
-
this.QTS_BuildIsDebug = this.module.cwrap("QTS_BuildIsDebug", "number", []);
|
|
79
|
-
this.QTS_BuildIsAsyncify = this.module.cwrap("QTS_BuildIsAsyncify", "number", []);
|
|
80
|
-
this.QTS_NewFunction = this.module.cwrap("QTS_NewFunction", "number", ["number", "string", "number", "boolean", "number"]);
|
|
81
|
-
this.QTS_ArgvGetJSValueConstPointer = this.module.cwrap("QTS_ArgvGetJSValueConstPointer", "number", ["number", "number"]);
|
|
82
|
-
this.QTS_RuntimeEnableInterruptHandler = this.module.cwrap("QTS_RuntimeEnableInterruptHandler", null, ["number"]);
|
|
83
|
-
this.QTS_RuntimeDisableInterruptHandler = this.module.cwrap("QTS_RuntimeDisableInterruptHandler", null, ["number"]);
|
|
84
|
-
this.QTS_RuntimeEnableModuleLoader = this.module.cwrap("QTS_RuntimeEnableModuleLoader", null, ["number", "number"]);
|
|
85
|
-
this.QTS_RuntimeDisableModuleLoader = this.module.cwrap("QTS_RuntimeDisableModuleLoader", null, ["number"]);
|
|
86
|
-
this.QTS_bjson_encode = this.module.cwrap("QTS_bjson_encode", "number", ["number", "number"]);
|
|
87
|
-
this.QTS_bjson_decode = this.module.cwrap("QTS_bjson_decode", "number", ["number", "number"]);
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
export {
|
|
91
|
-
QuickJSAsyncFFI
|
|
92
|
-
};
|
package/dist/ffi-kb5r0x1j.js
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
assertSync
|
|
3
|
-
} from "./index-9xexf8s7.js";
|
|
4
|
-
import"./index-1yh8g550.js";
|
|
5
|
-
|
|
6
|
-
// ../../node_modules/.bun/@jitl+quickjs-wasmfile-release-asyncify@0.32.0/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/ffi.mjs
|
|
7
|
-
var QuickJSAsyncFFI = class {
|
|
8
|
-
constructor(module) {
|
|
9
|
-
this.module = module;
|
|
10
|
-
this.DEBUG = false;
|
|
11
|
-
this.QTS_Throw = this.module.cwrap("QTS_Throw", "number", ["number", "number"]);
|
|
12
|
-
this.QTS_NewError = this.module.cwrap("QTS_NewError", "number", ["number"]);
|
|
13
|
-
this.QTS_RuntimeSetMemoryLimit = this.module.cwrap("QTS_RuntimeSetMemoryLimit", null, ["number", "number"]);
|
|
14
|
-
this.QTS_RuntimeComputeMemoryUsage = this.module.cwrap("QTS_RuntimeComputeMemoryUsage", "number", ["number", "number"]);
|
|
15
|
-
this.QTS_RuntimeDumpMemoryUsage = this.module.cwrap("QTS_RuntimeDumpMemoryUsage", "number", ["number"]);
|
|
16
|
-
this.QTS_RecoverableLeakCheck = this.module.cwrap("QTS_RecoverableLeakCheck", "number", []);
|
|
17
|
-
this.QTS_BuildIsSanitizeLeak = this.module.cwrap("QTS_BuildIsSanitizeLeak", "number", []);
|
|
18
|
-
this.QTS_RuntimeSetMaxStackSize = this.module.cwrap("QTS_RuntimeSetMaxStackSize", null, ["number", "number"]);
|
|
19
|
-
this.QTS_GetUndefined = this.module.cwrap("QTS_GetUndefined", "number", []);
|
|
20
|
-
this.QTS_GetNull = this.module.cwrap("QTS_GetNull", "number", []);
|
|
21
|
-
this.QTS_GetFalse = this.module.cwrap("QTS_GetFalse", "number", []);
|
|
22
|
-
this.QTS_GetTrue = this.module.cwrap("QTS_GetTrue", "number", []);
|
|
23
|
-
this.QTS_NewHostRef = this.module.cwrap("QTS_NewHostRef", "number", ["number", "number"]);
|
|
24
|
-
this.QTS_GetHostRefId = this.module.cwrap("QTS_GetHostRefId", "number", ["number"]);
|
|
25
|
-
this.QTS_NewRuntime = this.module.cwrap("QTS_NewRuntime", "number", []);
|
|
26
|
-
this.QTS_FreeRuntime = this.module.cwrap("QTS_FreeRuntime", null, ["number"]);
|
|
27
|
-
this.QTS_NewContext = this.module.cwrap("QTS_NewContext", "number", ["number", "number"]);
|
|
28
|
-
this.QTS_FreeContext = this.module.cwrap("QTS_FreeContext", null, ["number"]);
|
|
29
|
-
this.QTS_FreeValuePointer = this.module.cwrap("QTS_FreeValuePointer", null, ["number", "number"]);
|
|
30
|
-
this.QTS_FreeValuePointerRuntime = this.module.cwrap("QTS_FreeValuePointerRuntime", null, ["number", "number"]);
|
|
31
|
-
this.QTS_FreeVoidPointer = this.module.cwrap("QTS_FreeVoidPointer", null, ["number", "number"]);
|
|
32
|
-
this.QTS_FreeCString = this.module.cwrap("QTS_FreeCString", null, ["number", "number"]);
|
|
33
|
-
this.QTS_DupValuePointer = this.module.cwrap("QTS_DupValuePointer", "number", ["number", "number"]);
|
|
34
|
-
this.QTS_NewObject = this.module.cwrap("QTS_NewObject", "number", ["number"]);
|
|
35
|
-
this.QTS_NewObjectProto = this.module.cwrap("QTS_NewObjectProto", "number", ["number", "number"]);
|
|
36
|
-
this.QTS_NewArray = this.module.cwrap("QTS_NewArray", "number", ["number"]);
|
|
37
|
-
this.QTS_NewArrayBuffer = this.module.cwrap("QTS_NewArrayBuffer", "number", ["number", "number", "number"]);
|
|
38
|
-
this.QTS_NewFloat64 = this.module.cwrap("QTS_NewFloat64", "number", ["number", "number"]);
|
|
39
|
-
this.QTS_GetFloat64 = this.module.cwrap("QTS_GetFloat64", "number", ["number", "number"]);
|
|
40
|
-
this.QTS_NewString = this.module.cwrap("QTS_NewString", "number", ["number", "number"]);
|
|
41
|
-
this.QTS_GetString = this.module.cwrap("QTS_GetString", "number", ["number", "number"]);
|
|
42
|
-
this.QTS_GetArrayBuffer = this.module.cwrap("QTS_GetArrayBuffer", "number", ["number", "number"]);
|
|
43
|
-
this.QTS_GetArrayBufferLength = this.module.cwrap("QTS_GetArrayBufferLength", "number", ["number", "number"]);
|
|
44
|
-
this.QTS_NewSymbol = this.module.cwrap("QTS_NewSymbol", "number", ["number", "number", "number"]);
|
|
45
|
-
this.QTS_GetSymbolDescriptionOrKey = assertSync(this.module.cwrap("QTS_GetSymbolDescriptionOrKey", "number", ["number", "number"]));
|
|
46
|
-
this.QTS_GetSymbolDescriptionOrKey_MaybeAsync = this.module.cwrap("QTS_GetSymbolDescriptionOrKey", "number", ["number", "number"]);
|
|
47
|
-
this.QTS_IsGlobalSymbol = this.module.cwrap("QTS_IsGlobalSymbol", "number", ["number", "number"]);
|
|
48
|
-
this.QTS_IsJobPending = this.module.cwrap("QTS_IsJobPending", "number", ["number"]);
|
|
49
|
-
this.QTS_ExecutePendingJob = assertSync(this.module.cwrap("QTS_ExecutePendingJob", "number", ["number", "number", "number"]));
|
|
50
|
-
this.QTS_ExecutePendingJob_MaybeAsync = this.module.cwrap("QTS_ExecutePendingJob", "number", ["number", "number", "number"]);
|
|
51
|
-
this.QTS_GetProp = assertSync(this.module.cwrap("QTS_GetProp", "number", ["number", "number", "number"]));
|
|
52
|
-
this.QTS_GetProp_MaybeAsync = this.module.cwrap("QTS_GetProp", "number", ["number", "number", "number"]);
|
|
53
|
-
this.QTS_GetPropNumber = assertSync(this.module.cwrap("QTS_GetPropNumber", "number", ["number", "number", "number"]));
|
|
54
|
-
this.QTS_GetPropNumber_MaybeAsync = this.module.cwrap("QTS_GetPropNumber", "number", ["number", "number", "number"]);
|
|
55
|
-
this.QTS_SetProp = assertSync(this.module.cwrap("QTS_SetProp", null, ["number", "number", "number", "number"]));
|
|
56
|
-
this.QTS_SetProp_MaybeAsync = this.module.cwrap("QTS_SetProp", null, ["number", "number", "number", "number"]);
|
|
57
|
-
this.QTS_DefineProp = this.module.cwrap("QTS_DefineProp", null, ["number", "number", "number", "number", "number", "number", "boolean", "boolean", "boolean"]);
|
|
58
|
-
this.QTS_GetOwnPropertyNames = assertSync(this.module.cwrap("QTS_GetOwnPropertyNames", "number", ["number", "number", "number", "number", "number"]));
|
|
59
|
-
this.QTS_GetOwnPropertyNames_MaybeAsync = this.module.cwrap("QTS_GetOwnPropertyNames", "number", ["number", "number", "number", "number", "number"]);
|
|
60
|
-
this.QTS_Call = assertSync(this.module.cwrap("QTS_Call", "number", ["number", "number", "number", "number", "number"]));
|
|
61
|
-
this.QTS_Call_MaybeAsync = this.module.cwrap("QTS_Call", "number", ["number", "number", "number", "number", "number"]);
|
|
62
|
-
this.QTS_ResolveException = this.module.cwrap("QTS_ResolveException", "number", ["number", "number"]);
|
|
63
|
-
this.QTS_Dump = assertSync(this.module.cwrap("QTS_Dump", "number", ["number", "number"]));
|
|
64
|
-
this.QTS_Dump_MaybeAsync = this.module.cwrap("QTS_Dump", "number", ["number", "number"]);
|
|
65
|
-
this.QTS_Eval = assertSync(this.module.cwrap("QTS_Eval", "number", ["number", "number", "number", "string", "number", "number"]));
|
|
66
|
-
this.QTS_Eval_MaybeAsync = this.module.cwrap("QTS_Eval", "number", ["number", "number", "number", "string", "number", "number"]);
|
|
67
|
-
this.QTS_GetModuleNamespace = this.module.cwrap("QTS_GetModuleNamespace", "number", ["number", "number"]);
|
|
68
|
-
this.QTS_Typeof = this.module.cwrap("QTS_Typeof", "number", ["number", "number"]);
|
|
69
|
-
this.QTS_GetLength = this.module.cwrap("QTS_GetLength", "number", ["number", "number", "number"]);
|
|
70
|
-
this.QTS_IsEqual = this.module.cwrap("QTS_IsEqual", "number", ["number", "number", "number", "number"]);
|
|
71
|
-
this.QTS_GetGlobalObject = this.module.cwrap("QTS_GetGlobalObject", "number", ["number"]);
|
|
72
|
-
this.QTS_NewPromiseCapability = this.module.cwrap("QTS_NewPromiseCapability", "number", ["number", "number"]);
|
|
73
|
-
this.QTS_PromiseState = this.module.cwrap("QTS_PromiseState", "number", ["number", "number"]);
|
|
74
|
-
this.QTS_PromiseResult = this.module.cwrap("QTS_PromiseResult", "number", ["number", "number"]);
|
|
75
|
-
this.QTS_TestStringArg = this.module.cwrap("QTS_TestStringArg", null, ["string"]);
|
|
76
|
-
this.QTS_GetDebugLogEnabled = this.module.cwrap("QTS_GetDebugLogEnabled", "number", ["number"]);
|
|
77
|
-
this.QTS_SetDebugLogEnabled = this.module.cwrap("QTS_SetDebugLogEnabled", null, ["number", "number"]);
|
|
78
|
-
this.QTS_BuildIsDebug = this.module.cwrap("QTS_BuildIsDebug", "number", []);
|
|
79
|
-
this.QTS_BuildIsAsyncify = this.module.cwrap("QTS_BuildIsAsyncify", "number", []);
|
|
80
|
-
this.QTS_NewFunction = this.module.cwrap("QTS_NewFunction", "number", ["number", "string", "number", "boolean", "number"]);
|
|
81
|
-
this.QTS_ArgvGetJSValueConstPointer = this.module.cwrap("QTS_ArgvGetJSValueConstPointer", "number", ["number", "number"]);
|
|
82
|
-
this.QTS_RuntimeEnableInterruptHandler = this.module.cwrap("QTS_RuntimeEnableInterruptHandler", null, ["number"]);
|
|
83
|
-
this.QTS_RuntimeDisableInterruptHandler = this.module.cwrap("QTS_RuntimeDisableInterruptHandler", null, ["number"]);
|
|
84
|
-
this.QTS_RuntimeEnableModuleLoader = this.module.cwrap("QTS_RuntimeEnableModuleLoader", null, ["number", "number"]);
|
|
85
|
-
this.QTS_RuntimeDisableModuleLoader = this.module.cwrap("QTS_RuntimeDisableModuleLoader", null, ["number"]);
|
|
86
|
-
this.QTS_bjson_encode = this.module.cwrap("QTS_bjson_encode", "number", ["number", "number"]);
|
|
87
|
-
this.QTS_bjson_decode = this.module.cwrap("QTS_bjson_decode", "number", ["number", "number"]);
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
export {
|
|
91
|
-
QuickJSAsyncFFI
|
|
92
|
-
};
|
package/dist/ffi-qnrt0y78.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import"./index-1yh8g550.js";
|
|
2
|
-
|
|
3
|
-
// ../../node_modules/.bun/@jitl+quickjs-wasmfile-release-sync@0.32.0/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.mjs
|
|
4
|
-
var QuickJSFFI = class {
|
|
5
|
-
constructor(module) {
|
|
6
|
-
this.module = module;
|
|
7
|
-
this.DEBUG = false;
|
|
8
|
-
this.QTS_Throw = this.module.cwrap("QTS_Throw", "number", ["number", "number"]);
|
|
9
|
-
this.QTS_NewError = this.module.cwrap("QTS_NewError", "number", ["number"]);
|
|
10
|
-
this.QTS_RuntimeSetMemoryLimit = this.module.cwrap("QTS_RuntimeSetMemoryLimit", null, ["number", "number"]);
|
|
11
|
-
this.QTS_RuntimeComputeMemoryUsage = this.module.cwrap("QTS_RuntimeComputeMemoryUsage", "number", ["number", "number"]);
|
|
12
|
-
this.QTS_RuntimeDumpMemoryUsage = this.module.cwrap("QTS_RuntimeDumpMemoryUsage", "number", ["number"]);
|
|
13
|
-
this.QTS_RecoverableLeakCheck = this.module.cwrap("QTS_RecoverableLeakCheck", "number", []);
|
|
14
|
-
this.QTS_BuildIsSanitizeLeak = this.module.cwrap("QTS_BuildIsSanitizeLeak", "number", []);
|
|
15
|
-
this.QTS_RuntimeSetMaxStackSize = this.module.cwrap("QTS_RuntimeSetMaxStackSize", null, ["number", "number"]);
|
|
16
|
-
this.QTS_GetUndefined = this.module.cwrap("QTS_GetUndefined", "number", []);
|
|
17
|
-
this.QTS_GetNull = this.module.cwrap("QTS_GetNull", "number", []);
|
|
18
|
-
this.QTS_GetFalse = this.module.cwrap("QTS_GetFalse", "number", []);
|
|
19
|
-
this.QTS_GetTrue = this.module.cwrap("QTS_GetTrue", "number", []);
|
|
20
|
-
this.QTS_NewHostRef = this.module.cwrap("QTS_NewHostRef", "number", ["number", "number"]);
|
|
21
|
-
this.QTS_GetHostRefId = this.module.cwrap("QTS_GetHostRefId", "number", ["number"]);
|
|
22
|
-
this.QTS_NewRuntime = this.module.cwrap("QTS_NewRuntime", "number", []);
|
|
23
|
-
this.QTS_FreeRuntime = this.module.cwrap("QTS_FreeRuntime", null, ["number"]);
|
|
24
|
-
this.QTS_NewContext = this.module.cwrap("QTS_NewContext", "number", ["number", "number"]);
|
|
25
|
-
this.QTS_FreeContext = this.module.cwrap("QTS_FreeContext", null, ["number"]);
|
|
26
|
-
this.QTS_FreeValuePointer = this.module.cwrap("QTS_FreeValuePointer", null, ["number", "number"]);
|
|
27
|
-
this.QTS_FreeValuePointerRuntime = this.module.cwrap("QTS_FreeValuePointerRuntime", null, ["number", "number"]);
|
|
28
|
-
this.QTS_FreeVoidPointer = this.module.cwrap("QTS_FreeVoidPointer", null, ["number", "number"]);
|
|
29
|
-
this.QTS_FreeCString = this.module.cwrap("QTS_FreeCString", null, ["number", "number"]);
|
|
30
|
-
this.QTS_DupValuePointer = this.module.cwrap("QTS_DupValuePointer", "number", ["number", "number"]);
|
|
31
|
-
this.QTS_NewObject = this.module.cwrap("QTS_NewObject", "number", ["number"]);
|
|
32
|
-
this.QTS_NewObjectProto = this.module.cwrap("QTS_NewObjectProto", "number", ["number", "number"]);
|
|
33
|
-
this.QTS_NewArray = this.module.cwrap("QTS_NewArray", "number", ["number"]);
|
|
34
|
-
this.QTS_NewArrayBuffer = this.module.cwrap("QTS_NewArrayBuffer", "number", ["number", "number", "number"]);
|
|
35
|
-
this.QTS_NewFloat64 = this.module.cwrap("QTS_NewFloat64", "number", ["number", "number"]);
|
|
36
|
-
this.QTS_GetFloat64 = this.module.cwrap("QTS_GetFloat64", "number", ["number", "number"]);
|
|
37
|
-
this.QTS_NewString = this.module.cwrap("QTS_NewString", "number", ["number", "number"]);
|
|
38
|
-
this.QTS_GetString = this.module.cwrap("QTS_GetString", "number", ["number", "number"]);
|
|
39
|
-
this.QTS_GetArrayBuffer = this.module.cwrap("QTS_GetArrayBuffer", "number", ["number", "number"]);
|
|
40
|
-
this.QTS_GetArrayBufferLength = this.module.cwrap("QTS_GetArrayBufferLength", "number", ["number", "number"]);
|
|
41
|
-
this.QTS_NewSymbol = this.module.cwrap("QTS_NewSymbol", "number", ["number", "number", "number"]);
|
|
42
|
-
this.QTS_GetSymbolDescriptionOrKey = this.module.cwrap("QTS_GetSymbolDescriptionOrKey", "number", ["number", "number"]);
|
|
43
|
-
this.QTS_IsGlobalSymbol = this.module.cwrap("QTS_IsGlobalSymbol", "number", ["number", "number"]);
|
|
44
|
-
this.QTS_IsJobPending = this.module.cwrap("QTS_IsJobPending", "number", ["number"]);
|
|
45
|
-
this.QTS_ExecutePendingJob = this.module.cwrap("QTS_ExecutePendingJob", "number", ["number", "number", "number"]);
|
|
46
|
-
this.QTS_GetProp = this.module.cwrap("QTS_GetProp", "number", ["number", "number", "number"]);
|
|
47
|
-
this.QTS_GetPropNumber = this.module.cwrap("QTS_GetPropNumber", "number", ["number", "number", "number"]);
|
|
48
|
-
this.QTS_SetProp = this.module.cwrap("QTS_SetProp", null, ["number", "number", "number", "number"]);
|
|
49
|
-
this.QTS_DefineProp = this.module.cwrap("QTS_DefineProp", null, ["number", "number", "number", "number", "number", "number", "boolean", "boolean", "boolean"]);
|
|
50
|
-
this.QTS_GetOwnPropertyNames = this.module.cwrap("QTS_GetOwnPropertyNames", "number", ["number", "number", "number", "number", "number"]);
|
|
51
|
-
this.QTS_Call = this.module.cwrap("QTS_Call", "number", ["number", "number", "number", "number", "number"]);
|
|
52
|
-
this.QTS_ResolveException = this.module.cwrap("QTS_ResolveException", "number", ["number", "number"]);
|
|
53
|
-
this.QTS_Dump = this.module.cwrap("QTS_Dump", "number", ["number", "number"]);
|
|
54
|
-
this.QTS_Eval = this.module.cwrap("QTS_Eval", "number", ["number", "number", "number", "string", "number", "number"]);
|
|
55
|
-
this.QTS_GetModuleNamespace = this.module.cwrap("QTS_GetModuleNamespace", "number", ["number", "number"]);
|
|
56
|
-
this.QTS_Typeof = this.module.cwrap("QTS_Typeof", "number", ["number", "number"]);
|
|
57
|
-
this.QTS_GetLength = this.module.cwrap("QTS_GetLength", "number", ["number", "number", "number"]);
|
|
58
|
-
this.QTS_IsEqual = this.module.cwrap("QTS_IsEqual", "number", ["number", "number", "number", "number"]);
|
|
59
|
-
this.QTS_GetGlobalObject = this.module.cwrap("QTS_GetGlobalObject", "number", ["number"]);
|
|
60
|
-
this.QTS_NewPromiseCapability = this.module.cwrap("QTS_NewPromiseCapability", "number", ["number", "number"]);
|
|
61
|
-
this.QTS_PromiseState = this.module.cwrap("QTS_PromiseState", "number", ["number", "number"]);
|
|
62
|
-
this.QTS_PromiseResult = this.module.cwrap("QTS_PromiseResult", "number", ["number", "number"]);
|
|
63
|
-
this.QTS_TestStringArg = this.module.cwrap("QTS_TestStringArg", null, ["string"]);
|
|
64
|
-
this.QTS_GetDebugLogEnabled = this.module.cwrap("QTS_GetDebugLogEnabled", "number", ["number"]);
|
|
65
|
-
this.QTS_SetDebugLogEnabled = this.module.cwrap("QTS_SetDebugLogEnabled", null, ["number", "number"]);
|
|
66
|
-
this.QTS_BuildIsDebug = this.module.cwrap("QTS_BuildIsDebug", "number", []);
|
|
67
|
-
this.QTS_BuildIsAsyncify = this.module.cwrap("QTS_BuildIsAsyncify", "number", []);
|
|
68
|
-
this.QTS_NewFunction = this.module.cwrap("QTS_NewFunction", "number", ["number", "string", "number", "boolean", "number"]);
|
|
69
|
-
this.QTS_ArgvGetJSValueConstPointer = this.module.cwrap("QTS_ArgvGetJSValueConstPointer", "number", ["number", "number"]);
|
|
70
|
-
this.QTS_RuntimeEnableInterruptHandler = this.module.cwrap("QTS_RuntimeEnableInterruptHandler", null, ["number"]);
|
|
71
|
-
this.QTS_RuntimeDisableInterruptHandler = this.module.cwrap("QTS_RuntimeDisableInterruptHandler", null, ["number"]);
|
|
72
|
-
this.QTS_RuntimeEnableModuleLoader = this.module.cwrap("QTS_RuntimeEnableModuleLoader", null, ["number", "number"]);
|
|
73
|
-
this.QTS_RuntimeDisableModuleLoader = this.module.cwrap("QTS_RuntimeDisableModuleLoader", null, ["number"]);
|
|
74
|
-
this.QTS_bjson_encode = this.module.cwrap("QTS_bjson_encode", "number", ["number", "number"]);
|
|
75
|
-
this.QTS_bjson_decode = this.module.cwrap("QTS_bjson_decode", "number", ["number", "number"]);
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
export {
|
|
79
|
-
QuickJSFFI
|
|
80
|
-
};
|
package/dist/ffi-yx2hpf4p.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import"./index-1yh8g550.js";
|
|
2
|
-
|
|
3
|
-
// ../../node_modules/.bun/@jitl+quickjs-wasmfile-debug-sync@0.32.0/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/ffi.mjs
|
|
4
|
-
var QuickJSFFI = class {
|
|
5
|
-
constructor(module) {
|
|
6
|
-
this.module = module;
|
|
7
|
-
this.DEBUG = true;
|
|
8
|
-
this.QTS_Throw = this.module.cwrap("QTS_Throw", "number", ["number", "number"]);
|
|
9
|
-
this.QTS_NewError = this.module.cwrap("QTS_NewError", "number", ["number"]);
|
|
10
|
-
this.QTS_RuntimeSetMemoryLimit = this.module.cwrap("QTS_RuntimeSetMemoryLimit", null, ["number", "number"]);
|
|
11
|
-
this.QTS_RuntimeComputeMemoryUsage = this.module.cwrap("QTS_RuntimeComputeMemoryUsage", "number", ["number", "number"]);
|
|
12
|
-
this.QTS_RuntimeDumpMemoryUsage = this.module.cwrap("QTS_RuntimeDumpMemoryUsage", "number", ["number"]);
|
|
13
|
-
this.QTS_RecoverableLeakCheck = this.module.cwrap("QTS_RecoverableLeakCheck", "number", []);
|
|
14
|
-
this.QTS_BuildIsSanitizeLeak = this.module.cwrap("QTS_BuildIsSanitizeLeak", "number", []);
|
|
15
|
-
this.QTS_RuntimeSetMaxStackSize = this.module.cwrap("QTS_RuntimeSetMaxStackSize", null, ["number", "number"]);
|
|
16
|
-
this.QTS_GetUndefined = this.module.cwrap("QTS_GetUndefined", "number", []);
|
|
17
|
-
this.QTS_GetNull = this.module.cwrap("QTS_GetNull", "number", []);
|
|
18
|
-
this.QTS_GetFalse = this.module.cwrap("QTS_GetFalse", "number", []);
|
|
19
|
-
this.QTS_GetTrue = this.module.cwrap("QTS_GetTrue", "number", []);
|
|
20
|
-
this.QTS_NewHostRef = this.module.cwrap("QTS_NewHostRef", "number", ["number", "number"]);
|
|
21
|
-
this.QTS_GetHostRefId = this.module.cwrap("QTS_GetHostRefId", "number", ["number"]);
|
|
22
|
-
this.QTS_NewRuntime = this.module.cwrap("QTS_NewRuntime", "number", []);
|
|
23
|
-
this.QTS_FreeRuntime = this.module.cwrap("QTS_FreeRuntime", null, ["number"]);
|
|
24
|
-
this.QTS_NewContext = this.module.cwrap("QTS_NewContext", "number", ["number", "number"]);
|
|
25
|
-
this.QTS_FreeContext = this.module.cwrap("QTS_FreeContext", null, ["number"]);
|
|
26
|
-
this.QTS_FreeValuePointer = this.module.cwrap("QTS_FreeValuePointer", null, ["number", "number"]);
|
|
27
|
-
this.QTS_FreeValuePointerRuntime = this.module.cwrap("QTS_FreeValuePointerRuntime", null, ["number", "number"]);
|
|
28
|
-
this.QTS_FreeVoidPointer = this.module.cwrap("QTS_FreeVoidPointer", null, ["number", "number"]);
|
|
29
|
-
this.QTS_FreeCString = this.module.cwrap("QTS_FreeCString", null, ["number", "number"]);
|
|
30
|
-
this.QTS_DupValuePointer = this.module.cwrap("QTS_DupValuePointer", "number", ["number", "number"]);
|
|
31
|
-
this.QTS_NewObject = this.module.cwrap("QTS_NewObject", "number", ["number"]);
|
|
32
|
-
this.QTS_NewObjectProto = this.module.cwrap("QTS_NewObjectProto", "number", ["number", "number"]);
|
|
33
|
-
this.QTS_NewArray = this.module.cwrap("QTS_NewArray", "number", ["number"]);
|
|
34
|
-
this.QTS_NewArrayBuffer = this.module.cwrap("QTS_NewArrayBuffer", "number", ["number", "number", "number"]);
|
|
35
|
-
this.QTS_NewFloat64 = this.module.cwrap("QTS_NewFloat64", "number", ["number", "number"]);
|
|
36
|
-
this.QTS_GetFloat64 = this.module.cwrap("QTS_GetFloat64", "number", ["number", "number"]);
|
|
37
|
-
this.QTS_NewString = this.module.cwrap("QTS_NewString", "number", ["number", "number"]);
|
|
38
|
-
this.QTS_GetString = this.module.cwrap("QTS_GetString", "number", ["number", "number"]);
|
|
39
|
-
this.QTS_GetArrayBuffer = this.module.cwrap("QTS_GetArrayBuffer", "number", ["number", "number"]);
|
|
40
|
-
this.QTS_GetArrayBufferLength = this.module.cwrap("QTS_GetArrayBufferLength", "number", ["number", "number"]);
|
|
41
|
-
this.QTS_NewSymbol = this.module.cwrap("QTS_NewSymbol", "number", ["number", "number", "number"]);
|
|
42
|
-
this.QTS_GetSymbolDescriptionOrKey = this.module.cwrap("QTS_GetSymbolDescriptionOrKey", "number", ["number", "number"]);
|
|
43
|
-
this.QTS_IsGlobalSymbol = this.module.cwrap("QTS_IsGlobalSymbol", "number", ["number", "number"]);
|
|
44
|
-
this.QTS_IsJobPending = this.module.cwrap("QTS_IsJobPending", "number", ["number"]);
|
|
45
|
-
this.QTS_ExecutePendingJob = this.module.cwrap("QTS_ExecutePendingJob", "number", ["number", "number", "number"]);
|
|
46
|
-
this.QTS_GetProp = this.module.cwrap("QTS_GetProp", "number", ["number", "number", "number"]);
|
|
47
|
-
this.QTS_GetPropNumber = this.module.cwrap("QTS_GetPropNumber", "number", ["number", "number", "number"]);
|
|
48
|
-
this.QTS_SetProp = this.module.cwrap("QTS_SetProp", null, ["number", "number", "number", "number"]);
|
|
49
|
-
this.QTS_DefineProp = this.module.cwrap("QTS_DefineProp", null, ["number", "number", "number", "number", "number", "number", "boolean", "boolean", "boolean"]);
|
|
50
|
-
this.QTS_GetOwnPropertyNames = this.module.cwrap("QTS_GetOwnPropertyNames", "number", ["number", "number", "number", "number", "number"]);
|
|
51
|
-
this.QTS_Call = this.module.cwrap("QTS_Call", "number", ["number", "number", "number", "number", "number"]);
|
|
52
|
-
this.QTS_ResolveException = this.module.cwrap("QTS_ResolveException", "number", ["number", "number"]);
|
|
53
|
-
this.QTS_Dump = this.module.cwrap("QTS_Dump", "number", ["number", "number"]);
|
|
54
|
-
this.QTS_Eval = this.module.cwrap("QTS_Eval", "number", ["number", "number", "number", "string", "number", "number"]);
|
|
55
|
-
this.QTS_GetModuleNamespace = this.module.cwrap("QTS_GetModuleNamespace", "number", ["number", "number"]);
|
|
56
|
-
this.QTS_Typeof = this.module.cwrap("QTS_Typeof", "number", ["number", "number"]);
|
|
57
|
-
this.QTS_GetLength = this.module.cwrap("QTS_GetLength", "number", ["number", "number", "number"]);
|
|
58
|
-
this.QTS_IsEqual = this.module.cwrap("QTS_IsEqual", "number", ["number", "number", "number", "number"]);
|
|
59
|
-
this.QTS_GetGlobalObject = this.module.cwrap("QTS_GetGlobalObject", "number", ["number"]);
|
|
60
|
-
this.QTS_NewPromiseCapability = this.module.cwrap("QTS_NewPromiseCapability", "number", ["number", "number"]);
|
|
61
|
-
this.QTS_PromiseState = this.module.cwrap("QTS_PromiseState", "number", ["number", "number"]);
|
|
62
|
-
this.QTS_PromiseResult = this.module.cwrap("QTS_PromiseResult", "number", ["number", "number"]);
|
|
63
|
-
this.QTS_TestStringArg = this.module.cwrap("QTS_TestStringArg", null, ["string"]);
|
|
64
|
-
this.QTS_GetDebugLogEnabled = this.module.cwrap("QTS_GetDebugLogEnabled", "number", ["number"]);
|
|
65
|
-
this.QTS_SetDebugLogEnabled = this.module.cwrap("QTS_SetDebugLogEnabled", null, ["number", "number"]);
|
|
66
|
-
this.QTS_BuildIsDebug = this.module.cwrap("QTS_BuildIsDebug", "number", []);
|
|
67
|
-
this.QTS_BuildIsAsyncify = this.module.cwrap("QTS_BuildIsAsyncify", "number", []);
|
|
68
|
-
this.QTS_NewFunction = this.module.cwrap("QTS_NewFunction", "number", ["number", "string", "number", "boolean", "number"]);
|
|
69
|
-
this.QTS_ArgvGetJSValueConstPointer = this.module.cwrap("QTS_ArgvGetJSValueConstPointer", "number", ["number", "number"]);
|
|
70
|
-
this.QTS_RuntimeEnableInterruptHandler = this.module.cwrap("QTS_RuntimeEnableInterruptHandler", null, ["number"]);
|
|
71
|
-
this.QTS_RuntimeDisableInterruptHandler = this.module.cwrap("QTS_RuntimeDisableInterruptHandler", null, ["number"]);
|
|
72
|
-
this.QTS_RuntimeEnableModuleLoader = this.module.cwrap("QTS_RuntimeEnableModuleLoader", null, ["number", "number"]);
|
|
73
|
-
this.QTS_RuntimeDisableModuleLoader = this.module.cwrap("QTS_RuntimeDisableModuleLoader", null, ["number"]);
|
|
74
|
-
this.QTS_bjson_encode = this.module.cwrap("QTS_bjson_encode", "number", ["number", "number"]);
|
|
75
|
-
this.QTS_bjson_decode = this.module.cwrap("QTS_bjson_decode", "number", ["number", "number"]);
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
export {
|
|
79
|
-
QuickJSFFI
|
|
80
|
-
};
|
package/dist/index-hw34xmzk.js
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
// ../plugin/src/shared/rpc-notifications.ts
|
|
2
|
-
var queue = [];
|
|
3
|
-
var nextNotificationId = 1;
|
|
4
|
-
var sinks = new Set;
|
|
5
|
-
function registerNotificationSink(sink) {
|
|
6
|
-
sinks.add(sink);
|
|
7
|
-
return () => {
|
|
8
|
-
sinks.delete(sink);
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
function notificationMatchesSink(notification, sink) {
|
|
12
|
-
if (notification.sessionId === undefined)
|
|
13
|
-
return true;
|
|
14
|
-
if (sink.sessionId !== undefined)
|
|
15
|
-
return notification.sessionId === sink.sessionId;
|
|
16
|
-
return sink.protocol !== 2;
|
|
17
|
-
}
|
|
18
|
-
function pushNotification(type, payload, sessionId) {
|
|
19
|
-
const notification = { id: nextNotificationId++, type, payload, sessionId };
|
|
20
|
-
queue.push(notification);
|
|
21
|
-
for (const sink of sinks) {
|
|
22
|
-
if (!notificationMatchesSink(notification, sink))
|
|
23
|
-
continue;
|
|
24
|
-
try {
|
|
25
|
-
sink.send(notification);
|
|
26
|
-
} catch {}
|
|
27
|
-
}
|
|
28
|
-
if (queue.length > 100) {
|
|
29
|
-
const reservedIds = new Set;
|
|
30
|
-
const reservedScopes = new Set;
|
|
31
|
-
for (let i = queue.length - 1;i >= 0 && reservedScopes.size < 25; i -= 1) {
|
|
32
|
-
const candidate = queue[i];
|
|
33
|
-
const scope = candidate.sessionId ?? "\x00global";
|
|
34
|
-
if (reservedScopes.has(scope))
|
|
35
|
-
continue;
|
|
36
|
-
reservedScopes.add(scope);
|
|
37
|
-
reservedIds.add(candidate.id);
|
|
38
|
-
}
|
|
39
|
-
const evictionIndex = queue.findIndex((candidate) => !reservedIds.has(candidate.id));
|
|
40
|
-
queue.splice(evictionIndex >= 0 ? evictionIndex : 0, 1);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
function acknowledgeNotifications(ids) {
|
|
44
|
-
const acknowledged = new Set(ids.filter((id) => Number.isSafeInteger(id) && id > 0));
|
|
45
|
-
if (acknowledged.size === 0)
|
|
46
|
-
return;
|
|
47
|
-
queue = queue.filter((notification) => !acknowledged.has(notification.id));
|
|
48
|
-
}
|
|
49
|
-
function __resetNotificationStateForTests() {
|
|
50
|
-
queue = [];
|
|
51
|
-
nextNotificationId = 1;
|
|
52
|
-
sinks.clear();
|
|
53
|
-
}
|
|
54
|
-
function cursor(value) {
|
|
55
|
-
return typeof value === "number" && Number.isFinite(value) && value > 0 ? value : 0;
|
|
56
|
-
}
|
|
57
|
-
function drainNotifications(lastReceivedId = 0, sessionId, options = {}) {
|
|
58
|
-
const sessionCursor = cursor(lastReceivedId);
|
|
59
|
-
if (options.globalOnly) {
|
|
60
|
-
queue = queue.filter((notification) => notification.sessionId !== undefined || notification.id > sessionCursor);
|
|
61
|
-
return queue.filter((notification) => notification.sessionId === undefined && notification.id > sessionCursor);
|
|
62
|
-
}
|
|
63
|
-
if (options.sessionOnly) {
|
|
64
|
-
if (sessionId === undefined)
|
|
65
|
-
return [];
|
|
66
|
-
queue = queue.filter((notification) => notification.sessionId !== sessionId || notification.id > sessionCursor);
|
|
67
|
-
return queue.filter((notification) => notification.sessionId === sessionId && notification.id > sessionCursor);
|
|
68
|
-
}
|
|
69
|
-
if (sessionId !== undefined && options.globalLastReceivedId !== undefined) {
|
|
70
|
-
const globalCursor = cursor(options.globalLastReceivedId);
|
|
71
|
-
queue = queue.filter((notification) => {
|
|
72
|
-
if (notification.sessionId === undefined)
|
|
73
|
-
return notification.id > globalCursor;
|
|
74
|
-
if (notification.sessionId === sessionId)
|
|
75
|
-
return notification.id > sessionCursor;
|
|
76
|
-
return true;
|
|
77
|
-
});
|
|
78
|
-
return queue.filter((notification) => {
|
|
79
|
-
if (notification.sessionId === undefined)
|
|
80
|
-
return notification.id > globalCursor;
|
|
81
|
-
return notification.sessionId === sessionId && notification.id > sessionCursor;
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
const matchesClient = (notification) => sessionId === undefined || notification.sessionId === undefined || notification.sessionId === sessionId;
|
|
85
|
-
if (sessionCursor > 0) {
|
|
86
|
-
queue = queue.filter((notification) => !(notification.id <= sessionCursor && matchesClient(notification)));
|
|
87
|
-
}
|
|
88
|
-
return queue.filter((notification) => notification.id > sessionCursor && matchesClient(notification));
|
|
89
|
-
}
|
|
90
|
-
function isTuiConnected(sessionId) {
|
|
91
|
-
if (sinks.size === 0)
|
|
92
|
-
return false;
|
|
93
|
-
if (sessionId === undefined)
|
|
94
|
-
return true;
|
|
95
|
-
for (const sink of sinks) {
|
|
96
|
-
if (sink.sessionId === sessionId)
|
|
97
|
-
return true;
|
|
98
|
-
if (sink.sessionId === undefined && sink.protocol !== 2)
|
|
99
|
-
return true;
|
|
100
|
-
}
|
|
101
|
-
return false;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export { registerNotificationSink, pushNotification, acknowledgeNotifications, __resetNotificationStateForTests, drainNotifications, isTuiConnected };
|
package/dist/index-ss632za9.js
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Lifetime,
|
|
3
|
-
QuickJSContext,
|
|
4
|
-
QuickJSNotImplemented,
|
|
5
|
-
QuickJSRuntime,
|
|
6
|
-
QuickJSWASMModule,
|
|
7
|
-
Scope,
|
|
8
|
-
applyBaseRuntimeOptions,
|
|
9
|
-
applyModuleEvalRuntimeOptions,
|
|
10
|
-
evalOptionsToFlags,
|
|
11
|
-
intrinsicsToFlags
|
|
12
|
-
} from "./index-dynqfgx1.js";
|
|
13
|
-
|
|
14
|
-
// ../../node_modules/.bun/quickjs-emscripten-core@0.32.0/node_modules/quickjs-emscripten-core/dist/chunk-TAV5CUKK.mjs
|
|
15
|
-
var QuickJSAsyncContext = class extends QuickJSContext {
|
|
16
|
-
async evalCodeAsync(code, filename = "eval.js", options) {
|
|
17
|
-
let detectModule = options === undefined ? 1 : 0, flags = evalOptionsToFlags(options), resultPtr = 0;
|
|
18
|
-
try {
|
|
19
|
-
resultPtr = await this.memory.newHeapCharPointer(code).consume((charHandle) => this.ffi.QTS_Eval_MaybeAsync(this.ctx.value, charHandle.value.ptr, charHandle.value.strlen, filename, detectModule, flags));
|
|
20
|
-
} catch (error) {
|
|
21
|
-
throw this.runtime.debugLog("QTS_Eval_MaybeAsync threw", error), error;
|
|
22
|
-
}
|
|
23
|
-
let errorPtr = this.ffi.QTS_ResolveException(this.ctx.value, resultPtr);
|
|
24
|
-
return errorPtr ? (this.ffi.QTS_FreeValuePointer(this.ctx.value, resultPtr), this.fail(this.memory.heapValueHandle(errorPtr))) : this.success(this.memory.heapValueHandle(resultPtr));
|
|
25
|
-
}
|
|
26
|
-
newAsyncifiedFunction(name, fn) {
|
|
27
|
-
return this.newFunction(name, fn);
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
var QuickJSAsyncRuntime = class extends QuickJSRuntime {
|
|
31
|
-
constructor(args) {
|
|
32
|
-
super(args);
|
|
33
|
-
}
|
|
34
|
-
newContext(options = {}) {
|
|
35
|
-
let intrinsics = intrinsicsToFlags(options.intrinsics), ctx = new Lifetime(this.ffi.QTS_NewContext(this.rt.value, intrinsics), undefined, (ctx_ptr) => {
|
|
36
|
-
this.contextMap.delete(ctx_ptr), this.callbacks.deleteContext(ctx_ptr), this.ffi.QTS_FreeContext(ctx_ptr);
|
|
37
|
-
}), context = new QuickJSAsyncContext({ module: this.module, ctx, ffi: this.ffi, rt: this.rt, ownedLifetimes: [], runtime: this, callbacks: this.callbacks });
|
|
38
|
-
return this.contextMap.set(ctx.value, context), context;
|
|
39
|
-
}
|
|
40
|
-
setModuleLoader(moduleLoader, moduleNormalizer) {
|
|
41
|
-
super.setModuleLoader(moduleLoader, moduleNormalizer);
|
|
42
|
-
}
|
|
43
|
-
setMaxStackSize(stackSize) {
|
|
44
|
-
return super.setMaxStackSize(stackSize);
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
var QuickJSAsyncWASMModule = class extends QuickJSWASMModule {
|
|
48
|
-
constructor(module, ffi) {
|
|
49
|
-
super(module, ffi);
|
|
50
|
-
this.ffi = ffi, this.module = module;
|
|
51
|
-
}
|
|
52
|
-
newRuntime(options = {}) {
|
|
53
|
-
let rt = new Lifetime(this.ffi.QTS_NewRuntime(), undefined, (rt_ptr) => {
|
|
54
|
-
this.callbacks.deleteRuntime(rt_ptr), this.ffi.QTS_FreeRuntime(rt_ptr);
|
|
55
|
-
}), runtime = new QuickJSAsyncRuntime({ module: this.module, ffi: this.ffi, rt, callbacks: this.callbacks });
|
|
56
|
-
return applyBaseRuntimeOptions(runtime, options), options.moduleLoader && runtime.setModuleLoader(options.moduleLoader), runtime;
|
|
57
|
-
}
|
|
58
|
-
newContext(options = {}) {
|
|
59
|
-
let runtime = this.newRuntime(), lifetimes = options.ownedLifetimes ? options.ownedLifetimes.concat([runtime]) : [runtime], context = runtime.newContext({ ...options, ownedLifetimes: lifetimes });
|
|
60
|
-
return runtime.context = context, context;
|
|
61
|
-
}
|
|
62
|
-
evalCode() {
|
|
63
|
-
throw new QuickJSNotImplemented("QuickJSWASMModuleAsyncify.evalCode: use evalCodeAsync instead");
|
|
64
|
-
}
|
|
65
|
-
evalCodeAsync(code, options) {
|
|
66
|
-
return Scope.withScopeAsync(async (scope) => {
|
|
67
|
-
let vm = scope.manage(this.newContext());
|
|
68
|
-
applyModuleEvalRuntimeOptions(vm.runtime, options);
|
|
69
|
-
let result = await vm.evalCodeAsync(code, "eval.js");
|
|
70
|
-
if (options.memoryLimitBytes !== undefined && vm.runtime.setMemoryLimit(-1), result.error)
|
|
71
|
-
throw vm.dump(scope.manage(result.error));
|
|
72
|
-
return vm.dump(scope.manage(result.value));
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
export { QuickJSAsyncContext, QuickJSAsyncRuntime, QuickJSAsyncWASMModule };
|