@ricsam/quickjs-test-utils 1.0.0 → 1.0.2

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 (39) hide show
  1. package/dist/cjs/context.cjs +86 -0
  2. package/dist/cjs/context.cjs.map +10 -0
  3. package/dist/cjs/eval.cjs +69 -0
  4. package/dist/cjs/eval.cjs.map +10 -0
  5. package/dist/cjs/fetch-context.cjs +89 -0
  6. package/dist/cjs/fetch-context.cjs.map +10 -0
  7. package/dist/cjs/fs-context.cjs +54 -0
  8. package/dist/cjs/fs-context.cjs.map +10 -0
  9. package/dist/cjs/index.cjs +7 -7
  10. package/dist/cjs/index.cjs.map +2 -2
  11. package/dist/cjs/integration-server.cjs +137 -0
  12. package/dist/cjs/integration-server.cjs.map +10 -0
  13. package/dist/cjs/package.json +1 -1
  14. package/dist/cjs/quickjs-types.cjs +700 -0
  15. package/dist/cjs/quickjs-types.cjs.map +10 -0
  16. package/dist/cjs/runtime-context.cjs +55 -0
  17. package/dist/cjs/runtime-context.cjs.map +10 -0
  18. package/dist/cjs/typecheck.cjs +108 -0
  19. package/dist/cjs/typecheck.cjs.map +10 -0
  20. package/dist/mjs/context.mjs +61 -0
  21. package/dist/mjs/context.mjs.map +10 -0
  22. package/dist/mjs/eval.mjs +38 -0
  23. package/dist/mjs/eval.mjs.map +10 -0
  24. package/dist/mjs/fetch-context.mjs +61 -0
  25. package/dist/mjs/fetch-context.mjs.map +10 -0
  26. package/dist/mjs/fs-context.mjs +29 -0
  27. package/dist/mjs/fs-context.mjs.map +10 -0
  28. package/dist/mjs/index.mjs +7 -7
  29. package/dist/mjs/index.mjs.map +2 -2
  30. package/dist/mjs/integration-server.mjs +106 -0
  31. package/dist/mjs/integration-server.mjs.map +10 -0
  32. package/dist/mjs/package.json +1 -1
  33. package/dist/mjs/quickjs-types.mjs +669 -0
  34. package/dist/mjs/quickjs-types.mjs.map +10 -0
  35. package/dist/mjs/runtime-context.mjs +26 -0
  36. package/dist/mjs/runtime-context.mjs.map +10 -0
  37. package/dist/mjs/typecheck.mjs +77 -0
  38. package/dist/mjs/typecheck.mjs.map +10 -0
  39. package/package.json +5 -5
@@ -0,0 +1,86 @@
1
+ // @bun @bun-cjs
2
+ (function(exports, require, module, __filename, __dirname) {var __defProp = Object.defineProperty;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __moduleCache = /* @__PURE__ */ new WeakMap;
7
+ var __toCommonJS = (from) => {
8
+ var entry = __moduleCache.get(from), desc;
9
+ if (entry)
10
+ return entry;
11
+ entry = __defProp({}, "__esModule", { value: true });
12
+ if (from && typeof from === "object" || typeof from === "function")
13
+ __getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
14
+ get: () => from[key],
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ }));
17
+ __moduleCache.set(from, entry);
18
+ return entry;
19
+ };
20
+ var __export = (target, all) => {
21
+ for (var name in all)
22
+ __defProp(target, name, {
23
+ get: all[name],
24
+ enumerable: true,
25
+ configurable: true,
26
+ set: (newValue) => all[name] = () => newValue
27
+ });
28
+ };
29
+
30
+ // packages/test-utils/src/context.ts
31
+ var exports_context = {};
32
+ __export(exports_context, {
33
+ useTestContext: () => useTestContext,
34
+ disposeTestContext: () => disposeTestContext,
35
+ createTestContext: () => createTestContext
36
+ });
37
+ module.exports = __toCommonJS(exports_context);
38
+ var import_quickjs_emscripten = require("quickjs-emscripten");
39
+ var import_quickjs_core = require("@ricsam/quickjs-core");
40
+ async function createTestContext() {
41
+ const QuickJS = await import_quickjs_emscripten.getQuickJS();
42
+ const runtime = QuickJS.newRuntime();
43
+ const context = runtime.newContext();
44
+ const coreHandle = import_quickjs_core.setupCore(context);
45
+ import_quickjs_core.clearAllInstanceState();
46
+ return { runtime, context, coreHandle };
47
+ }
48
+ function disposeTestContext(ctx) {
49
+ import_quickjs_core.cleanupUnmarshaledHandles(ctx.context);
50
+ ctx.coreHandle.dispose();
51
+ ctx.context.dispose();
52
+ ctx.runtime.dispose();
53
+ }
54
+ function useTestContext() {
55
+ let ctx;
56
+ return {
57
+ async setup() {
58
+ ctx = await createTestContext();
59
+ return ctx;
60
+ },
61
+ teardown() {
62
+ if (ctx) {
63
+ disposeTestContext(ctx);
64
+ ctx = undefined;
65
+ }
66
+ },
67
+ get context() {
68
+ if (!ctx)
69
+ throw new Error("TestContext not initialized. Call setup() first.");
70
+ return ctx.context;
71
+ },
72
+ get runtime() {
73
+ if (!ctx)
74
+ throw new Error("TestContext not initialized. Call setup() first.");
75
+ return ctx.runtime;
76
+ },
77
+ get coreHandle() {
78
+ if (!ctx)
79
+ throw new Error("TestContext not initialized. Call setup() first.");
80
+ return ctx.coreHandle;
81
+ }
82
+ };
83
+ }
84
+ })
85
+
86
+ //# debugId=1E24A404C4F7A24364756E2164756E21
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/context.ts"],
4
+ "sourcesContent": [
5
+ "import {\n getQuickJS,\n type QuickJSContext,\n type QuickJSRuntime,\n} from \"quickjs-emscripten\";\nimport {\n setupCore,\n clearAllInstanceState,\n cleanupUnmarshaledHandles,\n type CoreHandle,\n} from \"@ricsam/quickjs-core\";\n\nexport interface TestContext {\n runtime: QuickJSRuntime;\n context: QuickJSContext;\n coreHandle: CoreHandle;\n}\n\nexport async function createTestContext(): Promise<TestContext> {\n const QuickJS = await getQuickJS();\n const runtime = QuickJS.newRuntime();\n const context = runtime.newContext();\n const coreHandle = setupCore(context);\n clearAllInstanceState();\n\n return { runtime, context, coreHandle };\n}\n\nexport function disposeTestContext(ctx: TestContext): void {\n // Clean up duped handles from unmarshal before disposing context\n cleanupUnmarshaledHandles(ctx.context);\n ctx.coreHandle.dispose();\n ctx.context.dispose();\n ctx.runtime.dispose();\n}\n\n/**\n * Helper for use with beforeEach/afterEach\n *\n * @example\n * const testCtx = useTestContext();\n *\n * beforeEach(async () => {\n * await testCtx.setup();\n * });\n *\n * afterEach(() => {\n * testCtx.teardown();\n * });\n *\n * test(\"my test\", () => {\n * const result = evalCode(testCtx.context, `1 + 1`);\n * expect(result).toBe(2);\n * });\n */\nexport function useTestContext() {\n let ctx: TestContext | undefined;\n\n return {\n async setup() {\n ctx = await createTestContext();\n return ctx;\n },\n teardown() {\n if (ctx) {\n disposeTestContext(ctx);\n ctx = undefined;\n }\n },\n get context(): QuickJSContext {\n if (!ctx) throw new Error(\"TestContext not initialized. Call setup() first.\");\n return ctx.context;\n },\n get runtime(): QuickJSRuntime {\n if (!ctx) throw new Error(\"TestContext not initialized. Call setup() first.\");\n return ctx.runtime;\n },\n get coreHandle(): CoreHandle {\n if (!ctx) throw new Error(\"TestContext not initialized. Call setup() first.\");\n return ctx.coreHandle;\n },\n };\n}\n"
6
+ ],
7
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIO,IAJP;AAUO,IALP;AAaA,eAAsB,iBAAiB,GAAyB;AAAA,EAC9D,MAAM,UAAU,MAAM,qCAAW;AAAA,EACjC,MAAM,UAAU,QAAQ,WAAW;AAAA,EACnC,MAAM,UAAU,QAAQ,WAAW;AAAA,EACnC,MAAM,aAAa,8BAAU,OAAO;AAAA,EACpC,0CAAsB;AAAA,EAEtB,OAAO,EAAE,SAAS,SAAS,WAAW;AAAA;AAGjC,SAAS,kBAAkB,CAAC,KAAwB;AAAA,EAEzD,8CAA0B,IAAI,OAAO;AAAA,EACrC,IAAI,WAAW,QAAQ;AAAA,EACvB,IAAI,QAAQ,QAAQ;AAAA,EACpB,IAAI,QAAQ,QAAQ;AAAA;AAsBf,SAAS,cAAc,GAAG;AAAA,EAC/B,IAAI;AAAA,EAEJ,OAAO;AAAA,SACC,MAAK,GAAG;AAAA,MACZ,MAAM,MAAM,kBAAkB;AAAA,MAC9B,OAAO;AAAA;AAAA,IAET,QAAQ,GAAG;AAAA,MACT,IAAI,KAAK;AAAA,QACP,mBAAmB,GAAG;AAAA,QACtB,MAAM;AAAA,MACR;AAAA;AAAA,QAEE,OAAO,GAAmB;AAAA,MAC5B,IAAI,CAAC;AAAA,QAAK,MAAM,IAAI,MAAM,kDAAkD;AAAA,MAC5E,OAAO,IAAI;AAAA;AAAA,QAET,OAAO,GAAmB;AAAA,MAC5B,IAAI,CAAC;AAAA,QAAK,MAAM,IAAI,MAAM,kDAAkD;AAAA,MAC5E,OAAO,IAAI;AAAA;AAAA,QAET,UAAU,GAAe;AAAA,MAC3B,IAAI,CAAC;AAAA,QAAK,MAAM,IAAI,MAAM,kDAAkD;AAAA,MAC5E,OAAO,IAAI;AAAA;AAAA,EAEf;AAAA;",
8
+ "debugId": "1E24A404C4F7A24364756E2164756E21",
9
+ "names": []
10
+ }
@@ -0,0 +1,69 @@
1
+ // @bun @bun-cjs
2
+ (function(exports, require, module, __filename, __dirname) {var __defProp = Object.defineProperty;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __moduleCache = /* @__PURE__ */ new WeakMap;
7
+ var __toCommonJS = (from) => {
8
+ var entry = __moduleCache.get(from), desc;
9
+ if (entry)
10
+ return entry;
11
+ entry = __defProp({}, "__esModule", { value: true });
12
+ if (from && typeof from === "object" || typeof from === "function")
13
+ __getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
14
+ get: () => from[key],
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ }));
17
+ __moduleCache.set(from, entry);
18
+ return entry;
19
+ };
20
+ var __export = (target, all) => {
21
+ for (var name in all)
22
+ __defProp(target, name, {
23
+ get: all[name],
24
+ enumerable: true,
25
+ configurable: true,
26
+ set: (newValue) => all[name] = () => newValue
27
+ });
28
+ };
29
+
30
+ // packages/test-utils/src/eval.ts
31
+ var exports_eval = {};
32
+ __export(exports_eval, {
33
+ evalCodeAsync: () => evalCodeAsync,
34
+ evalCode: () => evalCode
35
+ });
36
+ module.exports = __toCommonJS(exports_eval);
37
+ function evalCode(context, code) {
38
+ const result = context.evalCode(code);
39
+ if (result.error) {
40
+ const err = context.dump(result.error);
41
+ result.error.dispose();
42
+ throw new Error(`Eval failed: ${JSON.stringify(err)}`);
43
+ }
44
+ const value = context.dump(result.value);
45
+ result.value.dispose();
46
+ return value;
47
+ }
48
+ async function evalCodeAsync(context, code) {
49
+ const result = context.evalCode(code);
50
+ if (result.error) {
51
+ const err = context.dump(result.error);
52
+ result.error.dispose();
53
+ throw new Error(`Eval failed: ${JSON.stringify(err)}`);
54
+ }
55
+ const promiseResult = await context.resolvePromise(result.value);
56
+ result.value.dispose();
57
+ context.runtime.executePendingJobs();
58
+ if (promiseResult.error) {
59
+ const err = context.dump(promiseResult.error);
60
+ promiseResult.error.dispose();
61
+ throw new Error(`Promise rejected: ${JSON.stringify(err)}`);
62
+ }
63
+ const value = context.dump(promiseResult.value);
64
+ promiseResult.value.dispose();
65
+ return value;
66
+ }
67
+ })
68
+
69
+ //# debugId=632BB0CC96B641FB64756E2164756E21
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/eval.ts"],
4
+ "sourcesContent": [
5
+ "import type { QuickJSContext } from \"quickjs-emscripten\";\n\n/**\n * Evaluate code synchronously and return the result\n *\n * Handles error checking and handle disposal automatically.\n *\n * @example\n * const result = evalCode<number>(context, `1 + 1`);\n * expect(result).toBe(2);\n *\n * @example\n * const obj = evalCode<{ name: string }>(context, `({ name: \"test\" })`);\n * expect(obj.name).toBe(\"test\");\n */\nexport function evalCode<T>(context: QuickJSContext, code: string): T {\n const result = context.evalCode(code);\n\n if (result.error) {\n const err = context.dump(result.error);\n result.error.dispose();\n throw new Error(`Eval failed: ${JSON.stringify(err)}`);\n }\n\n const value = context.dump(result.value) as T;\n result.value.dispose();\n return value;\n}\n\n/**\n * Evaluate async code and return the resolved result\n *\n * Handles promise resolution, error checking, and handle disposal automatically.\n * Also executes pending jobs after resolution.\n *\n * @example\n * const result = await evalCodeAsync<string>(context, `\n * (async () => {\n * const blob = new Blob([\"hello\"]);\n * return await blob.text();\n * })()\n * `);\n * expect(result).toBe(\"hello\");\n */\nexport async function evalCodeAsync<T>(\n context: QuickJSContext,\n code: string\n): Promise<T> {\n const result = context.evalCode(code);\n\n if (result.error) {\n const err = context.dump(result.error);\n result.error.dispose();\n throw new Error(`Eval failed: ${JSON.stringify(err)}`);\n }\n\n const promiseResult = await context.resolvePromise(result.value);\n result.value.dispose();\n\n // Execute any pending jobs\n context.runtime.executePendingJobs();\n\n if (promiseResult.error) {\n const err = context.dump(promiseResult.error);\n promiseResult.error.dispose();\n throw new Error(`Promise rejected: ${JSON.stringify(err)}`);\n }\n\n const value = context.dump(promiseResult.value) as T;\n promiseResult.value.dispose();\n return value;\n}\n"
6
+ ],
7
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeO,SAAS,QAAW,CAAC,SAAyB,MAAiB;AAAA,EACpE,MAAM,SAAS,QAAQ,SAAS,IAAI;AAAA,EAEpC,IAAI,OAAO,OAAO;AAAA,IAChB,MAAM,MAAM,QAAQ,KAAK,OAAO,KAAK;AAAA,IACrC,OAAO,MAAM,QAAQ;AAAA,IACrB,MAAM,IAAI,MAAM,gBAAgB,KAAK,UAAU,GAAG,GAAG;AAAA,EACvD;AAAA,EAEA,MAAM,QAAQ,QAAQ,KAAK,OAAO,KAAK;AAAA,EACvC,OAAO,MAAM,QAAQ;AAAA,EACrB,OAAO;AAAA;AAkBT,eAAsB,aAAgB,CACpC,SACA,MACY;AAAA,EACZ,MAAM,SAAS,QAAQ,SAAS,IAAI;AAAA,EAEpC,IAAI,OAAO,OAAO;AAAA,IAChB,MAAM,MAAM,QAAQ,KAAK,OAAO,KAAK;AAAA,IACrC,OAAO,MAAM,QAAQ;AAAA,IACrB,MAAM,IAAI,MAAM,gBAAgB,KAAK,UAAU,GAAG,GAAG;AAAA,EACvD;AAAA,EAEA,MAAM,gBAAgB,MAAM,QAAQ,eAAe,OAAO,KAAK;AAAA,EAC/D,OAAO,MAAM,QAAQ;AAAA,EAGrB,QAAQ,QAAQ,mBAAmB;AAAA,EAEnC,IAAI,cAAc,OAAO;AAAA,IACvB,MAAM,MAAM,QAAQ,KAAK,cAAc,KAAK;AAAA,IAC5C,cAAc,MAAM,QAAQ;AAAA,IAC5B,MAAM,IAAI,MAAM,qBAAqB,KAAK,UAAU,GAAG,GAAG;AAAA,EAC5D;AAAA,EAEA,MAAM,QAAQ,QAAQ,KAAK,cAAc,KAAK;AAAA,EAC9C,cAAc,MAAM,QAAQ;AAAA,EAC5B,OAAO;AAAA;",
8
+ "debugId": "632BB0CC96B641FB64756E2164756E21",
9
+ "names": []
10
+ }
@@ -0,0 +1,89 @@
1
+ // @bun @bun-cjs
2
+ (function(exports, require, module, __filename, __dirname) {var __defProp = Object.defineProperty;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __moduleCache = /* @__PURE__ */ new WeakMap;
7
+ var __toCommonJS = (from) => {
8
+ var entry = __moduleCache.get(from), desc;
9
+ if (entry)
10
+ return entry;
11
+ entry = __defProp({}, "__esModule", { value: true });
12
+ if (from && typeof from === "object" || typeof from === "function")
13
+ __getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
14
+ get: () => from[key],
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ }));
17
+ __moduleCache.set(from, entry);
18
+ return entry;
19
+ };
20
+ var __export = (target, all) => {
21
+ for (var name in all)
22
+ __defProp(target, name, {
23
+ get: all[name],
24
+ enumerable: true,
25
+ configurable: true,
26
+ set: (newValue) => all[name] = () => newValue
27
+ });
28
+ };
29
+
30
+ // packages/test-utils/src/fetch-context.ts
31
+ var exports_fetch_context = {};
32
+ __export(exports_fetch_context, {
33
+ useFetchTestContext: () => useFetchTestContext,
34
+ disposeFetchTestContext: () => disposeFetchTestContext,
35
+ createFetchTestContext: () => createFetchTestContext
36
+ });
37
+ module.exports = __toCommonJS(exports_fetch_context);
38
+ var import_quickjs_fetch = require("@ricsam/quickjs-fetch");
39
+ var import_context = require("./context.cjs");
40
+ async function createFetchTestContext(options) {
41
+ const base = await import_context.createTestContext();
42
+ const fetchHandle = import_quickjs_fetch.setupFetch(base.context, {
43
+ coreHandle: base.coreHandle,
44
+ onFetch: options?.onFetch
45
+ });
46
+ return { ...base, fetchHandle };
47
+ }
48
+ function disposeFetchTestContext(ctx) {
49
+ ctx.fetchHandle.dispose();
50
+ import_context.disposeTestContext(ctx);
51
+ }
52
+ function useFetchTestContext() {
53
+ let ctx;
54
+ return {
55
+ async setup() {
56
+ ctx = await createFetchTestContext();
57
+ return ctx;
58
+ },
59
+ teardown() {
60
+ if (ctx) {
61
+ disposeFetchTestContext(ctx);
62
+ ctx = undefined;
63
+ }
64
+ },
65
+ get context() {
66
+ if (!ctx)
67
+ throw new Error("FetchTestContext not initialized. Call setup() first.");
68
+ return ctx.context;
69
+ },
70
+ get runtime() {
71
+ if (!ctx)
72
+ throw new Error("FetchTestContext not initialized. Call setup() first.");
73
+ return ctx.runtime;
74
+ },
75
+ get coreHandle() {
76
+ if (!ctx)
77
+ throw new Error("FetchTestContext not initialized. Call setup() first.");
78
+ return ctx.coreHandle;
79
+ },
80
+ get fetchHandle() {
81
+ if (!ctx)
82
+ throw new Error("FetchTestContext not initialized. Call setup() first.");
83
+ return ctx.fetchHandle;
84
+ }
85
+ };
86
+ }
87
+ })
88
+
89
+ //# debugId=FA850BE027AB3DDF64756E2164756E21
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/fetch-context.ts"],
4
+ "sourcesContent": [
5
+ "import { setupFetch, type FetchHandle, type SetupFetchOptions } from \"@ricsam/quickjs-fetch\";\nimport {\n createTestContext,\n disposeTestContext,\n type TestContext,\n} from \"./context.cjs\";\n\nexport interface FetchTestContext extends TestContext {\n fetchHandle: FetchHandle;\n}\n\nexport interface CreateFetchTestContextOptions {\n /** Handler for outbound fetch() calls from QuickJS */\n onFetch?: SetupFetchOptions[\"onFetch\"];\n}\n\nexport async function createFetchTestContext(\n options?: CreateFetchTestContextOptions\n): Promise<FetchTestContext> {\n const base = await createTestContext();\n const fetchHandle = setupFetch(base.context, {\n coreHandle: base.coreHandle,\n onFetch: options?.onFetch,\n });\n\n return { ...base, fetchHandle };\n}\n\nexport function disposeFetchTestContext(ctx: FetchTestContext): void {\n ctx.fetchHandle.dispose();\n disposeTestContext(ctx);\n}\n\n/**\n * Helper for use with beforeEach/afterEach for fetch tests\n *\n * @example\n * const testCtx = useFetchTestContext();\n *\n * beforeEach(async () => {\n * await testCtx.setup();\n * });\n *\n * afterEach(() => {\n * testCtx.teardown();\n * });\n *\n * test(\"headers test\", () => {\n * const result = evalCode(testCtx.context, `\n * const headers = new Headers({ \"Content-Type\": \"application/json\" });\n * headers.get(\"content-type\");\n * `);\n * expect(result).toBe(\"application/json\");\n * });\n */\nexport function useFetchTestContext() {\n let ctx: FetchTestContext | undefined;\n\n return {\n async setup() {\n ctx = await createFetchTestContext();\n return ctx;\n },\n teardown() {\n if (ctx) {\n disposeFetchTestContext(ctx);\n ctx = undefined;\n }\n },\n get context() {\n if (!ctx) throw new Error(\"FetchTestContext not initialized. Call setup() first.\");\n return ctx.context;\n },\n get runtime() {\n if (!ctx) throw new Error(\"FetchTestContext not initialized. Call setup() first.\");\n return ctx.runtime;\n },\n get coreHandle() {\n if (!ctx) throw new Error(\"FetchTestContext not initialized. Call setup() first.\");\n return ctx.coreHandle;\n },\n get fetchHandle() {\n if (!ctx) throw new Error(\"FetchTestContext not initialized. Call setup() first.\");\n return ctx.fetchHandle;\n },\n };\n}\n"
6
+ ],
7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-cjs
2
+ (function(exports, require, module, __filename, __dirname) {var __defProp = Object.defineProperty;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __moduleCache = /* @__PURE__ */ new WeakMap;
7
+ var __toCommonJS = (from) => {
8
+ var entry = __moduleCache.get(from), desc;
9
+ if (entry)
10
+ return entry;
11
+ entry = __defProp({}, "__esModule", { value: true });
12
+ if (from && typeof from === "object" || typeof from === "function")
13
+ __getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
14
+ get: () => from[key],
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ }));
17
+ __moduleCache.set(from, entry);
18
+ return entry;
19
+ };
20
+ var __export = (target, all) => {
21
+ for (var name in all)
22
+ __defProp(target, name, {
23
+ get: all[name],
24
+ enumerable: true,
25
+ configurable: true,
26
+ set: (newValue) => all[name] = () => newValue
27
+ });
28
+ };
29
+
30
+ // packages/test-utils/src/fs-context.ts
31
+ var exports_fs_context = {};
32
+ __export(exports_fs_context, {
33
+ disposeFsTestContext: () => disposeFsTestContext,
34
+ createFsTestContext: () => createFsTestContext
35
+ });
36
+ module.exports = __toCommonJS(exports_fs_context);
37
+ var import_quickjs_fs = require("@ricsam/quickjs-fs");
38
+ var import_context = require("./context.cjs");
39
+ async function createFsTestContext(options) {
40
+ const base = await import_context.createTestContext();
41
+ const memFs = import_quickjs_fs.createMemoryDirectoryHandle(options?.initialFiles);
42
+ const fsHandle = import_quickjs_fs.setupFs(base.context, {
43
+ coreHandle: base.coreHandle,
44
+ getDirectory: async () => memFs
45
+ });
46
+ return { ...base, fsHandle, memFs };
47
+ }
48
+ function disposeFsTestContext(ctx) {
49
+ ctx.fsHandle.dispose();
50
+ import_context.disposeTestContext(ctx);
51
+ }
52
+ })
53
+
54
+ //# debugId=B6652A8E376AF31D64756E2164756E21
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/fs-context.ts"],
4
+ "sourcesContent": [
5
+ "import {\n setupFs,\n createMemoryDirectoryHandle,\n type FsHandle,\n type HostDirectoryHandle,\n} from \"@ricsam/quickjs-fs\";\nimport {\n createTestContext,\n disposeTestContext,\n type TestContext,\n} from \"./context.cjs\";\n\nexport interface FsTestContext extends TestContext {\n fsHandle: FsHandle;\n memFs: HostDirectoryHandle;\n}\n\nexport interface CreateFsTestContextOptions {\n /** Initial files to populate the in-memory filesystem */\n initialFiles?: Record<string, string | Uint8Array>;\n}\n\nexport async function createFsTestContext(\n options?: CreateFsTestContextOptions\n): Promise<FsTestContext> {\n const base = await createTestContext();\n const memFs = createMemoryDirectoryHandle(options?.initialFiles);\n const fsHandle = setupFs(base.context, {\n coreHandle: base.coreHandle,\n getDirectory: async () => memFs,\n });\n\n return { ...base, fsHandle, memFs };\n}\n\nexport function disposeFsTestContext(ctx: FsTestContext): void {\n ctx.fsHandle.dispose();\n disposeTestContext(ctx);\n}\n"
6
+ ],
7
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKO,IALP;AAUO,IAJP;AAgBA,eAAsB,mBAAmB,CACvC,SACwB;AAAA,EACxB,MAAM,OAAO,MAAM,iCAAkB;AAAA,EACrC,MAAM,QAAQ,8CAA4B,SAAS,YAAY;AAAA,EAC/D,MAAM,WAAW,0BAAQ,KAAK,SAAS;AAAA,IACrC,YAAY,KAAK;AAAA,IACjB,cAAc,YAAY;AAAA,EAC5B,CAAC;AAAA,EAED,OAAO,KAAK,MAAM,UAAU,MAAM;AAAA;AAG7B,SAAS,oBAAoB,CAAC,KAA0B;AAAA,EAC7D,IAAI,SAAS,QAAQ;AAAA,EACrB,kCAAmB,GAAG;AAAA;",
8
+ "debugId": "B6652A8E376AF31D64756E2164756E21",
9
+ "names": []
10
+ }
@@ -47,12 +47,12 @@ __export(exports_src, {
47
47
  CORE_TYPES: () => import_quickjs_types.CORE_TYPES
48
48
  });
49
49
  module.exports = __toCommonJS(exports_src);
50
- var import_context = require("./context.ts");
51
- var import_fetch_context = require("./fetch-context.ts");
52
- var import_eval = require("./eval.ts");
53
- var import_integration_server = require("./integration-server.ts");
54
- var import_typecheck = require("./typecheck.ts");
55
- var import_quickjs_types = require("./quickjs-types.ts");
50
+ var import_context = require("./context.cjs");
51
+ var import_fetch_context = require("./fetch-context.cjs");
52
+ var import_eval = require("./eval.cjs");
53
+ var import_integration_server = require("./integration-server.cjs");
54
+ var import_typecheck = require("./typecheck.cjs");
55
+ var import_quickjs_types = require("./quickjs-types.cjs");
56
56
  })
57
57
 
58
- //# debugId=6163F5C604565B7564756E2164756E21
58
+ //# debugId=58D73AEF6D5595F264756E2164756E21
@@ -2,9 +2,9 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts"],
4
4
  "sourcesContent": [
5
- "export {\n createTestContext,\n disposeTestContext,\n useTestContext,\n type TestContext,\n} from \"./context.ts\";\n\nexport {\n createFetchTestContext,\n disposeFetchTestContext,\n useFetchTestContext,\n type FetchTestContext,\n type CreateFetchTestContextOptions,\n} from \"./fetch-context.ts\";\n\nexport { evalCode, evalCodeAsync } from \"./eval.ts\";\n\nexport {\n startIntegrationServer,\n type IntegrationTestServer,\n type StartIntegrationServerOptions,\n} from \"./integration-server.ts\";\n\nexport {\n typecheckQuickJSCode,\n formatTypecheckErrors,\n type TypecheckResult,\n type TypecheckError,\n type TypecheckOptions,\n} from \"./typecheck.ts\";\n\nexport {\n CORE_TYPES,\n FETCH_TYPES,\n FS_TYPES,\n TYPE_DEFINITIONS,\n type TypeDefinitionKey,\n} from \"./quickjs-types.ts\";\n\n// For fs and runtime contexts, import from subpaths:\n// import { createFsTestContext } from \"@ricsam/quickjs-test-utils/fs\";\n// import { createRuntimeTestContext } from \"@ricsam/quickjs-test-utils/runtime\";\n"
5
+ "export {\n createTestContext,\n disposeTestContext,\n useTestContext,\n type TestContext,\n} from \"./context.cjs\";\n\nexport {\n createFetchTestContext,\n disposeFetchTestContext,\n useFetchTestContext,\n type FetchTestContext,\n type CreateFetchTestContextOptions,\n} from \"./fetch-context.cjs\";\n\nexport { evalCode, evalCodeAsync } from \"./eval.cjs\";\n\nexport {\n startIntegrationServer,\n type IntegrationTestServer,\n type StartIntegrationServerOptions,\n} from \"./integration-server.cjs\";\n\nexport {\n typecheckQuickJSCode,\n formatTypecheckErrors,\n type TypecheckResult,\n type TypecheckError,\n type TypecheckOptions,\n} from \"./typecheck.cjs\";\n\nexport {\n CORE_TYPES,\n FETCH_TYPES,\n FS_TYPES,\n TYPE_DEFINITIONS,\n type TypeDefinitionKey,\n} from \"./quickjs-types.cjs\";\n\n// For fs and runtime contexts, import from subpaths:\n// import { createFsTestContext } from \"@ricsam/quickjs-test-utils/fs\";\n// import { createRuntimeTestContext } from \"@ricsam/quickjs-test-utils/runtime\";\n"
6
6
  ],
7
7
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKO,IALP;AAaO,IANP;AAQwC,IAAxC;AAMO,IAJP;AAYO,IANP;AAcO,IANP;",
8
- "debugId": "6163F5C604565B7564756E2164756E21",
8
+ "debugId": "58D73AEF6D5595F264756E2164756E21",
9
9
  "names": []
10
10
  }
@@ -0,0 +1,137 @@
1
+ // @bun @bun-cjs
2
+ (function(exports, require, module, __filename, __dirname) {var __defProp = Object.defineProperty;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __moduleCache = /* @__PURE__ */ new WeakMap;
7
+ var __toCommonJS = (from) => {
8
+ var entry = __moduleCache.get(from), desc;
9
+ if (entry)
10
+ return entry;
11
+ entry = __defProp({}, "__esModule", { value: true });
12
+ if (from && typeof from === "object" || typeof from === "function")
13
+ __getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
14
+ get: () => from[key],
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ }));
17
+ __moduleCache.set(from, entry);
18
+ return entry;
19
+ };
20
+ var __export = (target, all) => {
21
+ for (var name in all)
22
+ __defProp(target, name, {
23
+ get: all[name],
24
+ enumerable: true,
25
+ configurable: true,
26
+ set: (newValue) => all[name] = () => newValue
27
+ });
28
+ };
29
+
30
+ // packages/test-utils/src/integration-server.ts
31
+ var exports_integration_server = {};
32
+ __export(exports_integration_server, {
33
+ startIntegrationServer: () => startIntegrationServer
34
+ });
35
+ module.exports = __toCommonJS(exports_integration_server);
36
+ var import_quickjs_emscripten = require("quickjs-emscripten");
37
+ var import_quickjs_fetch = require("@ricsam/quickjs-fetch");
38
+ var import_quickjs_core = require("@ricsam/quickjs-core");
39
+ async function startIntegrationServer(quickJSCode, options) {
40
+ const QuickJS = await import_quickjs_emscripten.getQuickJS();
41
+ const runtime = QuickJS.newRuntime();
42
+ const context = runtime.newContext();
43
+ const coreHandle = import_quickjs_core.setupCore(context);
44
+ const fetchHandle = import_quickjs_fetch.setupFetch(context, {
45
+ coreHandle,
46
+ onFetch: options?.onFetch
47
+ });
48
+ const wsConnections = new Map;
49
+ fetchHandle.onWebSocketCommand((cmd) => {
50
+ const ws = wsConnections.get(cmd.connectionId);
51
+ if (!ws)
52
+ return;
53
+ if (cmd.type === "message") {
54
+ ws.send(cmd.data);
55
+ } else if (cmd.type === "close") {
56
+ ws.close(cmd.code, cmd.reason);
57
+ }
58
+ });
59
+ const result = context.evalCode(quickJSCode);
60
+ if (result.error) {
61
+ const error = context.dump(result.error);
62
+ result.error.dispose();
63
+ fetchHandle.dispose();
64
+ coreHandle.dispose();
65
+ context.dispose();
66
+ runtime.dispose();
67
+ throw new Error(`Failed to evaluate QuickJS code: ${JSON.stringify(error)}`);
68
+ }
69
+ result.value.dispose();
70
+ const server = Bun.serve({
71
+ port: 0,
72
+ async fetch(req, server2) {
73
+ try {
74
+ const response = await fetchHandle.dispatchRequest(req);
75
+ const upgrade = fetchHandle.getUpgradeRequest();
76
+ if (upgrade?.requested) {
77
+ const connectionId = crypto.randomUUID();
78
+ const success = server2.upgrade(req, {
79
+ data: { connectionId, userData: upgrade.data }
80
+ });
81
+ if (success) {
82
+ return;
83
+ }
84
+ return new Response("WebSocket upgrade failed", { status: 500 });
85
+ }
86
+ return response;
87
+ } catch (error) {
88
+ console.error("Integration test request failed:", error);
89
+ return new Response("Internal Server Error", { status: 500 });
90
+ }
91
+ },
92
+ websocket: {
93
+ open(ws) {
94
+ const { connectionId, userData } = ws.data;
95
+ wsConnections.set(connectionId, ws);
96
+ fetchHandle.dispatchWebSocketOpen(connectionId, userData);
97
+ },
98
+ message(ws, message) {
99
+ const msg = typeof message === "string" ? message : message.buffer;
100
+ fetchHandle.dispatchWebSocketMessage(ws.data.connectionId, msg);
101
+ },
102
+ close(ws, code, reason) {
103
+ fetchHandle.dispatchWebSocketClose(ws.data.connectionId, code, reason);
104
+ wsConnections.delete(ws.data.connectionId);
105
+ }
106
+ }
107
+ });
108
+ const port = server.port;
109
+ if (port === undefined) {
110
+ throw new Error("Server failed to get port");
111
+ }
112
+ const baseURL = `http://localhost:${port}`;
113
+ const wsURL = `ws://localhost:${port}`;
114
+ return {
115
+ baseURL,
116
+ wsURL,
117
+ port,
118
+ fetchHandle,
119
+ context,
120
+ runtime,
121
+ coreHandle,
122
+ async stop() {
123
+ for (const ws of wsConnections.values()) {
124
+ ws.close(1000, "Server stopping");
125
+ }
126
+ wsConnections.clear();
127
+ server.stop(true);
128
+ fetchHandle.dispose();
129
+ coreHandle.dispose();
130
+ context.dispose();
131
+ runtime.dispose();
132
+ }
133
+ };
134
+ }
135
+ })
136
+
137
+ //# debugId=8E0EF1121CF76A5764756E2164756E21
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/integration-server.ts"],
4
+ "sourcesContent": [
5
+ "import { getQuickJS, type QuickJSContext, type QuickJSRuntime } from \"quickjs-emscripten\";\nimport { setupFetch, type FetchHandle, type WebSocketCommand, type SetupFetchOptions } from \"@ricsam/quickjs-fetch\";\nimport { setupCore, type CoreHandle } from \"@ricsam/quickjs-core\";\nimport type { Server, ServerWebSocket } from \"bun\";\n\ninterface WsData {\n connectionId: string;\n userData: unknown;\n}\n\nexport interface IntegrationTestServer {\n baseURL: string;\n wsURL: string;\n port: number;\n fetchHandle: FetchHandle;\n context: QuickJSContext;\n runtime: QuickJSRuntime;\n coreHandle: CoreHandle;\n stop(): Promise<void>;\n}\n\nexport interface StartIntegrationServerOptions {\n /** Handler for outbound fetch() calls from QuickJS */\n onFetch?: SetupFetchOptions[\"onFetch\"];\n}\n\n/**\n * Start a real HTTP server that dispatches requests to a QuickJS serve() handler.\n *\n * @param quickJSCode - JavaScript code to run in QuickJS, should call serve()\n * @param options - Optional configuration\n * @returns Server info including baseURL, wsURL, and stop function\n *\n * @example\n * const server = await startIntegrationServer(`\n * serve({\n * fetch(request) {\n * return new Response(\"Hello!\");\n * }\n * });\n * `);\n *\n * const response = await fetch(\\`\\${server.baseURL}/test\\`);\n * expect(await response.text()).toBe(\"Hello!\");\n *\n * await server.stop();\n */\nexport async function startIntegrationServer(\n quickJSCode: string,\n options?: StartIntegrationServerOptions\n): Promise<IntegrationTestServer> {\n const QuickJS = await getQuickJS();\n const runtime = QuickJS.newRuntime();\n const context = runtime.newContext();\n\n // Setup core and fetch APIs\n const coreHandle = setupCore(context);\n const fetchHandle = setupFetch(context, {\n coreHandle,\n onFetch: options?.onFetch,\n });\n\n // Track WebSocket connections\n const wsConnections = new Map<string, ServerWebSocket<WsData>>();\n\n // Handle outgoing WebSocket commands from QuickJS\n fetchHandle.onWebSocketCommand((cmd: WebSocketCommand) => {\n const ws = wsConnections.get(cmd.connectionId);\n if (!ws) return;\n\n if (cmd.type === \"message\") {\n ws.send(cmd.data);\n } else if (cmd.type === \"close\") {\n ws.close(cmd.code, cmd.reason);\n }\n });\n\n // Run the user's QuickJS code\n const result = context.evalCode(quickJSCode);\n if (result.error) {\n const error = context.dump(result.error);\n result.error.dispose();\n fetchHandle.dispose();\n coreHandle.dispose();\n context.dispose();\n runtime.dispose();\n throw new Error(`Failed to evaluate QuickJS code: ${JSON.stringify(error)}`);\n }\n result.value.dispose();\n\n // Start Bun server with port 0 for dynamic assignment\n const server: Server<WsData> = Bun.serve<WsData>({\n port: 0,\n async fetch(req, server) {\n try {\n // Dispatch to QuickJS handler\n const response = await fetchHandle.dispatchRequest(req);\n\n // Check if QuickJS requested a WebSocket upgrade\n const upgrade = fetchHandle.getUpgradeRequest();\n if (upgrade?.requested) {\n const connectionId = crypto.randomUUID();\n const success = server.upgrade(req, {\n data: { connectionId, userData: upgrade.data },\n });\n if (success) {\n return undefined;\n }\n return new Response(\"WebSocket upgrade failed\", { status: 500 });\n }\n\n return response;\n } catch (error) {\n console.error(\"Integration test request failed:\", error);\n return new Response(\"Internal Server Error\", { status: 500 });\n }\n },\n websocket: {\n open(ws) {\n const { connectionId, userData } = ws.data;\n wsConnections.set(connectionId, ws);\n fetchHandle.dispatchWebSocketOpen(connectionId, userData);\n },\n message(ws, message) {\n const msg = typeof message === \"string\" ? message : message.buffer;\n fetchHandle.dispatchWebSocketMessage(ws.data.connectionId, msg as string | ArrayBuffer);\n },\n close(ws, code, reason) {\n fetchHandle.dispatchWebSocketClose(ws.data.connectionId, code, reason);\n wsConnections.delete(ws.data.connectionId);\n },\n },\n });\n\n const port = server.port;\n if (port === undefined) {\n throw new Error(\"Server failed to get port\");\n }\n const baseURL = `http://localhost:${port}`;\n const wsURL = `ws://localhost:${port}`;\n\n return {\n baseURL,\n wsURL,\n port,\n fetchHandle,\n context,\n runtime,\n coreHandle,\n async stop() {\n // Close all WebSocket connections\n for (const ws of wsConnections.values()) {\n ws.close(1000, \"Server stopping\");\n }\n wsConnections.clear();\n\n // Stop the server\n server.stop(true);\n\n // Dispose QuickJS resources\n fetchHandle.dispose();\n coreHandle.dispose();\n context.dispose();\n runtime.dispose();\n },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