@ricsam/quickjs-fs 0.0.1 → 0.2.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 (44) hide show
  1. package/README.md +70 -43
  2. package/dist/cjs/directory-handle.cjs +166 -0
  3. package/dist/cjs/directory-handle.cjs.map +10 -0
  4. package/dist/cjs/file-handle.cjs +125 -0
  5. package/dist/cjs/file-handle.cjs.map +10 -0
  6. package/dist/cjs/index.cjs +43 -0
  7. package/dist/cjs/index.cjs.map +10 -0
  8. package/dist/cjs/memory-adapter.cjs +269 -0
  9. package/dist/cjs/memory-adapter.cjs.map +10 -0
  10. package/dist/cjs/node-adapter.cjs +221 -0
  11. package/dist/cjs/node-adapter.cjs.map +10 -0
  12. package/dist/cjs/package.json +5 -0
  13. package/dist/cjs/setup.cjs +140 -0
  14. package/dist/cjs/setup.cjs.map +10 -0
  15. package/dist/cjs/types.cjs +26 -0
  16. package/dist/cjs/types.cjs.map +9 -0
  17. package/dist/cjs/writable-stream.cjs +119 -0
  18. package/dist/cjs/writable-stream.cjs.map +10 -0
  19. package/dist/mjs/directory-handle.mjs +135 -0
  20. package/dist/mjs/directory-handle.mjs.map +10 -0
  21. package/dist/mjs/file-handle.mjs +94 -0
  22. package/dist/mjs/file-handle.mjs.map +10 -0
  23. package/dist/mjs/index.mjs +12 -0
  24. package/dist/mjs/index.mjs.map +10 -0
  25. package/dist/mjs/memory-adapter.mjs +237 -0
  26. package/dist/mjs/memory-adapter.mjs.map +10 -0
  27. package/dist/mjs/node-adapter.mjs +189 -0
  28. package/dist/mjs/node-adapter.mjs.map +10 -0
  29. package/dist/mjs/package.json +5 -0
  30. package/dist/mjs/setup.mjs +112 -0
  31. package/dist/mjs/setup.mjs.map +10 -0
  32. package/dist/mjs/types.mjs +3 -0
  33. package/dist/mjs/types.mjs.map +9 -0
  34. package/dist/mjs/writable-stream.mjs +88 -0
  35. package/dist/mjs/writable-stream.mjs.map +10 -0
  36. package/dist/types/handles/directory-handle.d.ts +12 -0
  37. package/dist/types/handles/file-handle.d.ts +14 -0
  38. package/dist/types/handles/writable-stream.d.ts +6 -0
  39. package/dist/types/index.d.ts +4 -0
  40. package/dist/types/memory-adapter.d.ts +18 -0
  41. package/dist/types/node-adapter.d.ts +23 -0
  42. package/dist/types/setup.d.ts +56 -0
  43. package/dist/types/types.d.ts +85 -0
  44. package/package.json +51 -6
@@ -0,0 +1,88 @@
1
+ // @bun
2
+ // packages/fs/src/handles/writable-stream.ts
3
+ import { defineClass } from "@ricsam/quickjs-core";
4
+ import { pendingWritableStreams } from "./file-handle.ts";
5
+ function createFileSystemWritableFileStreamClass(context, stateMap) {
6
+ return defineClass(context, stateMap, {
7
+ name: "FileSystemWritableFileStream",
8
+ construct: (args) => {
9
+ const streamId = args[0];
10
+ const hostStream = pendingWritableStreams.get(streamId);
11
+ if (!hostStream) {
12
+ throw new Error(`No pending writable stream with ID ${streamId}`);
13
+ }
14
+ pendingWritableStreams.delete(streamId);
15
+ return {
16
+ hostStream,
17
+ closed: false
18
+ };
19
+ },
20
+ methods: {
21
+ async write(data) {
22
+ if (this.closed) {
23
+ throw new Error("Stream is closed");
24
+ }
25
+ if (data && typeof data === "object" && "type" in data) {
26
+ const params = data;
27
+ if (params.type === "seek" && params.position !== undefined) {
28
+ await this.hostStream.seek(params.position);
29
+ return;
30
+ }
31
+ if (params.type === "truncate" && params.size !== undefined) {
32
+ await this.hostStream.truncate(params.size);
33
+ return;
34
+ }
35
+ if (params.type === "write" && params.data !== undefined) {
36
+ await this.hostStream.write(params.data);
37
+ return;
38
+ }
39
+ }
40
+ if (typeof data === "string") {
41
+ await this.hostStream.write(data);
42
+ } else if (data instanceof ArrayBuffer) {
43
+ await this.hostStream.write(data);
44
+ } else if (data instanceof Uint8Array) {
45
+ await this.hostStream.write(data);
46
+ } else if (data && typeof data === "object" && "parts" in data) {
47
+ const parts = data.parts;
48
+ for (const part of parts) {
49
+ await this.hostStream.write(part);
50
+ }
51
+ } else {
52
+ await this.hostStream.write(String(data));
53
+ }
54
+ },
55
+ async seek(position) {
56
+ if (this.closed) {
57
+ throw new Error("Stream is closed");
58
+ }
59
+ await this.hostStream.seek(Number(position));
60
+ },
61
+ async truncate(size) {
62
+ if (this.closed) {
63
+ throw new Error("Stream is closed");
64
+ }
65
+ await this.hostStream.truncate(Number(size));
66
+ },
67
+ async close() {
68
+ if (this.closed) {
69
+ return;
70
+ }
71
+ this.closed = true;
72
+ await this.hostStream.close();
73
+ },
74
+ async abort(reason) {
75
+ if (this.closed) {
76
+ return;
77
+ }
78
+ this.closed = true;
79
+ await this.hostStream.abort(reason);
80
+ }
81
+ }
82
+ });
83
+ }
84
+ export {
85
+ createFileSystemWritableFileStreamClass
86
+ };
87
+
88
+ //# debugId=DEDE1A3875D7952464756E2164756E21
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/handles/writable-stream.ts"],
4
+ "sourcesContent": [
5
+ "import type { QuickJSContext, QuickJSHandle } from \"quickjs-emscripten\";\nimport type { StateMap } from \"@ricsam/quickjs-core\";\nimport { defineClass } from \"@ricsam/quickjs-core\";\nimport type {\n FileSystemWritableFileStreamState,\n WriteParams,\n HostWritableFileStream,\n} from \"../types.ts\";\nimport { pendingWritableStreams } from \"./file-handle.ts\";\n\n/**\n * Create the FileSystemWritableFileStream class for QuickJS\n */\nexport function createFileSystemWritableFileStreamClass(\n context: QuickJSContext,\n stateMap: StateMap\n): QuickJSHandle {\n return defineClass<FileSystemWritableFileStreamState>(context, stateMap, {\n name: \"FileSystemWritableFileStream\",\n construct: (args) => {\n const streamId = args[0] as number;\n const hostStream = pendingWritableStreams.get(streamId);\n if (!hostStream) {\n throw new Error(`No pending writable stream with ID ${streamId}`);\n }\n pendingWritableStreams.delete(streamId);\n return {\n hostStream,\n closed: false,\n };\n },\n methods: {\n async write(\n this: FileSystemWritableFileStreamState,\n data: unknown\n ): Promise<void> {\n if (this.closed) {\n throw new Error(\"Stream is closed\");\n }\n\n // Handle WriteParams\n if (data && typeof data === \"object\" && \"type\" in data) {\n const params = data as WriteParams;\n if (params.type === \"seek\" && params.position !== undefined) {\n await this.hostStream.seek(params.position);\n return;\n }\n if (params.type === \"truncate\" && params.size !== undefined) {\n await this.hostStream.truncate(params.size);\n return;\n }\n if (params.type === \"write\" && params.data !== undefined) {\n await this.hostStream.write(params.data);\n return;\n }\n }\n\n // Direct data write\n if (typeof data === \"string\") {\n await this.hostStream.write(data);\n } else if (data instanceof ArrayBuffer) {\n await this.hostStream.write(data);\n } else if (data instanceof Uint8Array) {\n await this.hostStream.write(data);\n } else if (data && typeof data === \"object\" && \"parts\" in data) {\n // Blob-like\n const parts = (data as { parts: Uint8Array[] }).parts;\n for (const part of parts) {\n await this.hostStream.write(part);\n }\n } else {\n await this.hostStream.write(String(data));\n }\n },\n async seek(\n this: FileSystemWritableFileStreamState,\n position: unknown\n ): Promise<void> {\n if (this.closed) {\n throw new Error(\"Stream is closed\");\n }\n await this.hostStream.seek(Number(position));\n },\n async truncate(\n this: FileSystemWritableFileStreamState,\n size: unknown\n ): Promise<void> {\n if (this.closed) {\n throw new Error(\"Stream is closed\");\n }\n await this.hostStream.truncate(Number(size));\n },\n async close(this: FileSystemWritableFileStreamState): Promise<void> {\n if (this.closed) {\n return;\n }\n this.closed = true;\n await this.hostStream.close();\n },\n async abort(\n this: FileSystemWritableFileStreamState,\n reason?: unknown\n ): Promise<void> {\n if (this.closed) {\n return;\n }\n this.closed = true;\n await this.hostStream.abort(reason);\n },\n },\n });\n}\n"
6
+ ],
7
+ "mappings": ";;AAEA;AAMA;AAKO,SAAS,uCAAuC,CACrD,SACA,UACe;AAAA,EACf,OAAO,YAA+C,SAAS,UAAU;AAAA,IACvE,MAAM;AAAA,IACN,WAAW,CAAC,SAAS;AAAA,MACnB,MAAM,WAAW,KAAK;AAAA,MACtB,MAAM,aAAa,uBAAuB,IAAI,QAAQ;AAAA,MACtD,IAAI,CAAC,YAAY;AAAA,QACf,MAAM,IAAI,MAAM,sCAAsC,UAAU;AAAA,MAClE;AAAA,MACA,uBAAuB,OAAO,QAAQ;AAAA,MACtC,OAAO;AAAA,QACL;AAAA,QACA,QAAQ;AAAA,MACV;AAAA;AAAA,IAEF,SAAS;AAAA,WACD,MAAK,CAET,MACe;AAAA,QACf,IAAI,KAAK,QAAQ;AAAA,UACf,MAAM,IAAI,MAAM,kBAAkB;AAAA,QACpC;AAAA,QAGA,IAAI,QAAQ,OAAO,SAAS,YAAY,UAAU,MAAM;AAAA,UACtD,MAAM,SAAS;AAAA,UACf,IAAI,OAAO,SAAS,UAAU,OAAO,aAAa,WAAW;AAAA,YAC3D,MAAM,KAAK,WAAW,KAAK,OAAO,QAAQ;AAAA,YAC1C;AAAA,UACF;AAAA,UACA,IAAI,OAAO,SAAS,cAAc,OAAO,SAAS,WAAW;AAAA,YAC3D,MAAM,KAAK,WAAW,SAAS,OAAO,IAAI;AAAA,YAC1C;AAAA,UACF;AAAA,UACA,IAAI,OAAO,SAAS,WAAW,OAAO,SAAS,WAAW;AAAA,YACxD,MAAM,KAAK,WAAW,MAAM,OAAO,IAAI;AAAA,YACvC;AAAA,UACF;AAAA,QACF;AAAA,QAGA,IAAI,OAAO,SAAS,UAAU;AAAA,UAC5B,MAAM,KAAK,WAAW,MAAM,IAAI;AAAA,QAClC,EAAO,SAAI,gBAAgB,aAAa;AAAA,UACtC,MAAM,KAAK,WAAW,MAAM,IAAI;AAAA,QAClC,EAAO,SAAI,gBAAgB,YAAY;AAAA,UACrC,MAAM,KAAK,WAAW,MAAM,IAAI;AAAA,QAClC,EAAO,SAAI,QAAQ,OAAO,SAAS,YAAY,WAAW,MAAM;AAAA,UAE9D,MAAM,QAAS,KAAiC;AAAA,UAChD,WAAW,QAAQ,OAAO;AAAA,YACxB,MAAM,KAAK,WAAW,MAAM,IAAI;AAAA,UAClC;AAAA,QACF,EAAO;AAAA,UACL,MAAM,KAAK,WAAW,MAAM,OAAO,IAAI,CAAC;AAAA;AAAA;AAAA,WAGtC,KAAI,CAER,UACe;AAAA,QACf,IAAI,KAAK,QAAQ;AAAA,UACf,MAAM,IAAI,MAAM,kBAAkB;AAAA,QACpC;AAAA,QACA,MAAM,KAAK,WAAW,KAAK,OAAO,QAAQ,CAAC;AAAA;AAAA,WAEvC,SAAQ,CAEZ,MACe;AAAA,QACf,IAAI,KAAK,QAAQ;AAAA,UACf,MAAM,IAAI,MAAM,kBAAkB;AAAA,QACpC;AAAA,QACA,MAAM,KAAK,WAAW,SAAS,OAAO,IAAI,CAAC;AAAA;AAAA,WAEvC,MAAK,GAAyD;AAAA,QAClE,IAAI,KAAK,QAAQ;AAAA,UACf;AAAA,QACF;AAAA,QACA,KAAK,SAAS;AAAA,QACd,MAAM,KAAK,WAAW,MAAM;AAAA;AAAA,WAExB,MAAK,CAET,QACe;AAAA,QACf,IAAI,KAAK,QAAQ;AAAA,UACf;AAAA,QACF;AAAA,QACA,KAAK,SAAS;AAAA,QACd,MAAM,KAAK,WAAW,MAAM,MAAM;AAAA;AAAA,IAEtC;AAAA,EACF,CAAC;AAAA;",
8
+ "debugId": "DEDE1A3875D7952464756E2164756E21",
9
+ "names": []
10
+ }
@@ -0,0 +1,12 @@
1
+ import type { StateMap } from "@ricsam/quickjs-core";
2
+ import type { QuickJSContext, QuickJSHandle } from "quickjs-emscripten";
3
+ import type { HostDirectoryHandle } from "../types.ts";
4
+ export declare const pendingHostHandles: Map<number, {
5
+ handle: HostDirectoryHandle;
6
+ name: string;
7
+ }>;
8
+ export declare function registerHostDirectoryHandle(handle: HostDirectoryHandle): number;
9
+ /**
10
+ * Create the FileSystemDirectoryHandle class for QuickJS
11
+ */
12
+ export declare function createFileSystemDirectoryHandleClass(context: QuickJSContext, stateMap: StateMap): QuickJSHandle;
@@ -0,0 +1,14 @@
1
+ import type { QuickJSContext, QuickJSHandle } from "quickjs-emscripten";
2
+ import type { StateMap } from "@ricsam/quickjs-core";
3
+ import type { HostFileHandle, HostWritableFileStream } from "../types.ts";
4
+ export declare const pendingFileHandles: Map<number, {
5
+ handle: HostFileHandle;
6
+ name: string;
7
+ }>;
8
+ export declare const pendingWritableStreams: Map<number, HostWritableFileStream>;
9
+ export declare function registerHostFileHandle(handle: HostFileHandle): number;
10
+ export declare function registerHostWritableStream(stream: HostWritableFileStream): number;
11
+ /**
12
+ * Create the FileSystemFileHandle class for QuickJS
13
+ */
14
+ export declare function createFileSystemFileHandleClass(context: QuickJSContext, stateMap: StateMap): QuickJSHandle;
@@ -0,0 +1,6 @@
1
+ import type { QuickJSContext, QuickJSHandle } from "quickjs-emscripten";
2
+ import type { StateMap } from "@ricsam/quickjs-core";
3
+ /**
4
+ * Create the FileSystemWritableFileStream class for QuickJS
5
+ */
6
+ export declare function createFileSystemWritableFileStreamClass(context: QuickJSContext, stateMap: StateMap): QuickJSHandle;
@@ -0,0 +1,4 @@
1
+ export { setupFs } from "./setup.ts";
2
+ export { createNodeDirectoryHandle } from "./node-adapter.ts";
3
+ export { createMemoryDirectoryHandle } from "./memory-adapter.ts";
4
+ export type { SetupFsOptions, FsHandle, HostDirectoryHandle, HostFileHandle, HostWritableFileStream, WriteParams, } from "./types.ts";
@@ -0,0 +1,18 @@
1
+ import type { HostDirectoryHandle } from "./types.ts";
2
+ /**
3
+ * Create an in-memory directory handle
4
+ * Useful for testing or fully sandboxed environments
5
+ *
6
+ * @example
7
+ * import { createMemoryDirectoryHandle } from "@ricsam/quickjs-fs";
8
+ *
9
+ * const memFs = createMemoryDirectoryHandle({
10
+ * "config.json": JSON.stringify({ debug: true }),
11
+ * "data/users.json": JSON.stringify([]),
12
+ * });
13
+ *
14
+ * const handle = setupFs(context, {
15
+ * getDirectory: async (path) => memFs
16
+ * });
17
+ */
18
+ export declare function createMemoryDirectoryHandle(initialFiles?: Record<string, string | Uint8Array>): HostDirectoryHandle;
@@ -0,0 +1,23 @@
1
+ import type { HostDirectoryHandle } from "./types.ts";
2
+ /**
3
+ * Create a directory handle backed by Node.js/Bun fs
4
+ * Useful for server-side implementations
5
+ *
6
+ * @param rootPath - Absolute path to the directory on disk
7
+ * @returns A HostDirectoryHandle implementation
8
+ *
9
+ * @example
10
+ * import { createNodeDirectoryHandle } from "@ricsam/quickjs-fs";
11
+ *
12
+ * const handle = setupFs(context, {
13
+ * getDirectory: async (path) => {
14
+ * // Only allow access to /sandbox
15
+ * if (!path.startsWith("/sandbox")) {
16
+ * throw new Error("Access denied");
17
+ * }
18
+ * const realPath = path.replace("/sandbox", "/var/app/sandbox");
19
+ * return createNodeDirectoryHandle(realPath);
20
+ * }
21
+ * });
22
+ */
23
+ export declare function createNodeDirectoryHandle(rootPath: string): HostDirectoryHandle;
@@ -0,0 +1,56 @@
1
+ import type { QuickJSContext } from "quickjs-emscripten";
2
+ import type { SetupFsOptions, FsHandle } from "./types.ts";
3
+ /**
4
+ * Setup File System API in a QuickJS context
5
+ *
6
+ * Injects the following globals:
7
+ * - fs.getDirectory(path) - Server-compatible entry point
8
+ * - FileSystemFileHandle
9
+ * - FileSystemDirectoryHandle
10
+ * - FileSystemWritableFileStream
11
+ *
12
+ * **Private globals (internal use):**
13
+ * - `__FileSystemFileHandle__` - For creating file handle instances from wrapper code
14
+ * - `__FileSystemDirectoryHandle__` - For creating directory handle instances
15
+ * - `__FileSystemWritableFileStream__` - For creating writable stream instances
16
+ *
17
+ * These private globals follow the `__Name__` convention and are required for the
18
+ * wrapper pattern: public methods call internal methods that return IDs, then use
19
+ * evalCode with private constructors to create properly-typed class instances.
20
+ * See PATTERNS.md sections 2 and 5 for details.
21
+ *
22
+ * **Wrapper pattern example:**
23
+ * ```typescript
24
+ * // Public method (added via evalCode)
25
+ * FileSystemFileHandle.prototype.createWritable = async function(options) {
26
+ * const result = await this._createWritableInternal(options);
27
+ * return new __FileSystemWritableFileStream__(result.__writableStreamId);
28
+ * };
29
+ * ```
30
+ *
31
+ * @example
32
+ * import { setupFs, createNodeDirectoryHandle } from "@ricsam/quickjs-fs";
33
+ *
34
+ * const handle = setupFs(context, {
35
+ * getDirectory: async (path) => {
36
+ * // Validate and resolve path
37
+ * const resolvedPath = resolveSandboxPath(path);
38
+ * return createNodeDirectoryHandle(resolvedPath);
39
+ * }
40
+ * });
41
+ *
42
+ * context.evalCode(`
43
+ * const root = await fs.getDirectory("/data");
44
+ * const configHandle = await root.getFileHandle("config.json");
45
+ * const file = await configHandle.getFile();
46
+ * const text = await file.text();
47
+ * console.log(JSON.parse(text));
48
+ *
49
+ * // Write a new file
50
+ * const outputHandle = await root.getFileHandle("output.txt", { create: true });
51
+ * const writable = await outputHandle.createWritable();
52
+ * await writable.write("Hello, World!");
53
+ * await writable.close();
54
+ * `);
55
+ */
56
+ export declare function setupFs(context: QuickJSContext, options: SetupFsOptions): FsHandle;
@@ -0,0 +1,85 @@
1
+ import type { StateMap, CoreHandle } from "@ricsam/quickjs-core";
2
+ export type { StateMap, CoreHandle };
3
+ /**
4
+ * Host-side directory handle interface
5
+ * Implement this to provide file system access to QuickJS
6
+ */
7
+ export interface HostDirectoryHandle {
8
+ readonly kind: "directory";
9
+ readonly name: string;
10
+ getFileHandle(name: string, options?: {
11
+ create?: boolean;
12
+ }): Promise<HostFileHandle>;
13
+ getDirectoryHandle(name: string, options?: {
14
+ create?: boolean;
15
+ }): Promise<HostDirectoryHandle>;
16
+ removeEntry(name: string, options?: {
17
+ recursive?: boolean;
18
+ }): Promise<void>;
19
+ resolve(possibleDescendant: HostFileHandle | HostDirectoryHandle): Promise<string[] | null>;
20
+ entries(): AsyncIterable<[string, HostFileHandle | HostDirectoryHandle]>;
21
+ keys(): AsyncIterable<string>;
22
+ values(): AsyncIterable<HostFileHandle | HostDirectoryHandle>;
23
+ }
24
+ /**
25
+ * Host-side file handle interface
26
+ */
27
+ export interface HostFileHandle {
28
+ readonly kind: "file";
29
+ readonly name: string;
30
+ getFile(): Promise<File>;
31
+ createWritable(options?: {
32
+ keepExistingData?: boolean;
33
+ }): Promise<HostWritableFileStream>;
34
+ }
35
+ /**
36
+ * Host-side writable file stream interface
37
+ */
38
+ export interface HostWritableFileStream {
39
+ write(data: string | ArrayBuffer | Uint8Array | Blob | WriteParams): Promise<void>;
40
+ seek(position: number): Promise<void>;
41
+ truncate(size: number): Promise<void>;
42
+ close(): Promise<void>;
43
+ abort(reason?: unknown): Promise<void>;
44
+ }
45
+ export interface WriteParams {
46
+ type: "write" | "seek" | "truncate";
47
+ data?: string | ArrayBuffer | Uint8Array | Blob;
48
+ position?: number;
49
+ size?: number;
50
+ }
51
+ export interface SetupFsOptions {
52
+ /**
53
+ * Handler to resolve paths to directory handles
54
+ * This is the server-side entry point for file system access
55
+ *
56
+ * @param path - The path requested by QuickJS code
57
+ * @returns A directory handle rooted at this path
58
+ * @throws If the path is not allowed or doesn't exist
59
+ */
60
+ getDirectory: (path: string) => Promise<HostDirectoryHandle>;
61
+ /** Existing state map */
62
+ stateMap?: StateMap;
63
+ /** Existing core handle */
64
+ coreHandle?: CoreHandle;
65
+ }
66
+ export interface FsHandle {
67
+ /** State map containing internal states */
68
+ readonly stateMap: StateMap;
69
+ /** Dispose all handles */
70
+ dispose(): void;
71
+ }
72
+ export interface FileSystemFileHandleState {
73
+ kind: "file";
74
+ name: string;
75
+ hostHandle: HostFileHandle;
76
+ }
77
+ export interface FileSystemDirectoryHandleState {
78
+ kind: "directory";
79
+ name: string;
80
+ hostHandle: HostDirectoryHandle;
81
+ }
82
+ export interface FileSystemWritableFileStreamState {
83
+ hostStream: HostWritableFileStream;
84
+ closed: boolean;
85
+ }
package/package.json CHANGED
@@ -1,10 +1,55 @@
1
1
  {
2
2
  "name": "@ricsam/quickjs-fs",
3
- "version": "0.0.1",
4
- "description": "OIDC trusted publishing setup package for @ricsam/quickjs-fs",
3
+ "version": "0.2.1",
4
+ "main": "./dist/cjs/index.cjs",
5
+ "types": "./dist/types/index.d.ts",
6
+ "exports": {
7
+ ".": {
8
+ "types": "./dist/types/index.d.ts",
9
+ "require": "./dist/cjs/index.cjs",
10
+ "import": "./dist/mjs/index.mjs"
11
+ }
12
+ },
13
+ "scripts": {
14
+ "build": "bun build ./src/index.ts --outdir ./dist --target bun",
15
+ "test": "bun test",
16
+ "typecheck": "tsc --noEmit"
17
+ },
18
+ "dependencies": {
19
+ "@ricsam/quickjs-core": "^0.2.1",
20
+ "quickjs-emscripten": "^0.31.0"
21
+ },
22
+ "peerDependencies": {
23
+ "quickjs-emscripten": "^0.31.0"
24
+ },
25
+ "author": "Richard Samuelsson",
26
+ "license": "MIT",
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git+https://github.com/ricsam/richie-qjs.git"
30
+ },
31
+ "bugs": {
32
+ "url": "https://github.com/ricsam/richie-qjs/issues"
33
+ },
34
+ "homepage": "https://github.com/ricsam/richie-qjs#readme",
5
35
  "keywords": [
6
- "oidc",
7
- "trusted-publishing",
8
- "setup"
36
+ "quickjs",
37
+ "sandbox",
38
+ "javascript",
39
+ "runtime",
40
+ "fetch",
41
+ "filesystem",
42
+ "streams",
43
+ "wasm",
44
+ "emscripten"
45
+ ],
46
+ "description": "File system API implementation for QuickJS runtime",
47
+ "module": "./dist/mjs/index.mjs",
48
+ "publishConfig": {
49
+ "access": "public"
50
+ },
51
+ "files": [
52
+ "dist",
53
+ "README.md"
9
54
  ]
10
- }
55
+ }