sandboxedjs 0.1.71 → 0.1.73

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/runtime/rolldown-wasi-worker.ts"],"names":["require"],"mappings":";;;;;AAiCA,IAAM,OAAA,GAAW,cAAc,EAAC;AAChC,IAAMA,QAAAA,GAAU,aAAA,CAAc,OAAA,CAAQ,aAAA,IAAiB,YAAY,GAAG,CAAA;AAEtE,IAAM;AAAA,EACJ,yBAAA;AAAA,EACA,cAAA;AAAA,EACA,IAAA;AAAA,EACA,aAAA;AAAA,EACA,qBAAA;AAAA,EACA;AACF,CAAA,GAAIA,SAAQ,uBAAuB,CAAA;AAInC,IAAM,EAAE,aAAA,EAAc,GAAI,MAAM;AAAA;AAAA;AAAA,EAAoD,OAAA,CAAQ;AAAA,CAAA;AAU5F,MAAA,CAAO,OAAO,UAAA,EAAY;AAAA,EACxB,IAAA,EAAM,UAAA;AAAA,EACN,OAAA,EAAAA,QAAAA;AAAA,EACA,MAAA;AAAA,EACA,cAAc,IAAA,EAAc;AAC1B,IAAA,IAAI,MAAM,CAAA,EAAG,YAAA,CAAa,MAAM,MAAM,CAAC,CAAA,cAAA,EAAiB,IAAI,CAAA,CAAE,CAAA;AAAA,EAChE,CAAA;AAAA,EACA,YAAY,OAAA,EAAkB;AAC5B,IAAA,UAAA,EAAY,YAAY,OAAO,CAAA;AAAA,EACjC;AACF,CAAC,CAAA;AAED,IAAI,UAAA,EAAY;AACd,EAAA,UAAA,CAAW,EAAA,CAAG,SAAA,EAAW,CAAC,IAAA,KAAS;AACjC,IAAC,UAAA,CAAmB,SAAA,GAAY,EAAE,IAAA,EAAM,CAAA;AAAA,EAC1C,CAAC,CAAA;AACH;AAEA,IAAM,eAA4B,EAAC;AAEnC,IAAM,OAAA,GAAU,IAAI,cAAA,CAAe;AAAA,EACjC,MAAA,CAAO,EAAE,UAAA,EAAY,UAAA,EAAW,E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's npm package ships two of these. The browser one builds its\n * filesystem from an in-memory volume proxied back to the main thread; the\n * Node one calls `node:wasi` with `preopens: { \"/\": \"/\" }` and reads the real\n * disk. Neither is usable as-is here: the browser file wants browser worker\n * globals, and the Node file wants the host's filesystem — which is precisely\n * the thing a container must not hand to the code running inside it.\n *\n * So this is the crossing of the two: Node's worker plumbing around the\n * browser's filesystem. Every path Rolldown opens on this thread is forwarded\n * to the main thread and served out of the memory volume the container mirrors\n * itself into, so the bundler and the rest of the container see one filesystem.\n *\n * Bundled as its own entry point, because a worker is fetched as its own\n * module graph rather than through the main bundle.\n */\n\nimport { createRequire } from \"node:module\";\nimport { readFileSync } from \"node:fs\";\nimport { parentPort, workerData, Worker } from \"node:worker_threads\";\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * Resolved against the binding's own location, not this file's.\n *\n * `@napi-rs/wasm-runtime` arrives as a dependency of the Rolldown binding,\n * which an installer is free to place anywhere — nested, hoisted, in a store\n * behind a symlink. Anchoring the lookup to the package that actually depends\n * on it is what keeps this working under npm, pnpm and Yarn alike.\n */\nconst options = (workerData ?? {}) as { runtimeAnchor?: string; fsModuleUrl?: string };\nconst require = createRequire(options.runtimeAnchor ?? import.meta.url);\n\nconst {\n instantiateNapiModuleSync,\n MessageHandler,\n WASI,\n createFsProxy,\n emnapiAsyncWorkPlugin,\n emnapiTSFNPlugin,\n} = require(\"@napi-rs/wasm-runtime\");\n/* Passed in as a resolved URL: the runtime publishes `./fs` to `import` only,\n * so it cannot be required, and resolving it from here would assume the\n * installer hoisted the package next to this worker. */\nconst { memfsExported } = await import(/* @vite-ignore */ /* webpackIgnore: true */ options.fsModuleUrl!);\n\n/**\n * The browser worker globals `MessageHandler` is written against.\n *\n * emnapi decides how to talk to a thread from the environment it finds, and\n * the handler itself is written for a browser worker: it is handed events and\n * replies with a bare `postMessage`. Node's port is bridged onto those names\n * rather than the handler being rewritten.\n */\nObject.assign(globalThis, {\n self: globalThis,\n require,\n Worker,\n importScripts(file: string) {\n (0, eval)(`${readFileSync(file, \"utf8\")}//# sourceURL=${file}`);\n },\n postMessage(message: unknown) {\n parentPort?.postMessage(message);\n },\n});\n\nif (parentPort) {\n parentPort.on(\"message\", (data) => {\n (globalThis as any).onmessage?.({ data });\n });\n}\n\nconst errorOutputs: unknown[][] = [];\n\nconst handler = new MessageHandler({\n onLoad({ wasmModule, wasmMemory }: { wasmModule: WebAssembly.Module; wasmMemory: WebAssembly.Memory }) {\n const wasi = new WASI({\n /* The proxy is the whole point: every syscall goes to the main thread,\n * which answers from the volume the container keeps in step. */\n fs: createFsProxy(memfsExported),\n preopens: { \"/\": \"/\" },\n print: (...args: unknown[]) => console.log(...args),\n printErr: (...args: unknown[]) => {\n console.error(...args);\n errorOutputs.push(args);\n },\n });\n\n return instantiateNapiModuleSync(wasmModule, {\n childThread: true,\n wasi,\n /* The wasm links a \"basic\" emnapi archive with no C implementations of\n * async work or threadsafe functions, so every thread has to bring the\n * JavaScript ones. */\n plugins: [emnapiAsyncWorkPlugin, emnapiTSFNPlugin],\n overwriteImports(importObject: any) {\n importObject.env = {\n ...importObject.env,\n ...importObject.napi,\n ...importObject.emnapi,\n memory: wasmMemory,\n };\n },\n });\n },\n onError(error: unknown) {\n (globalThis as any).postMessage({ type: \"error\", error, errorOutputs: [...errorOutputs] });\n errorOutputs.length = 0;\n },\n});\n\n(globalThis as any).onmessage = (event: unknown) => handler.handle(event);\n"]}
1
+ {"version":3,"sources":["../src/tools/rolldown-wasi-worker.ts"],"names":["require"],"mappings":";;;;;AAiCA,IAAM,OAAA,GAAW,cAAc,EAAC;AAChC,IAAMA,QAAAA,GAAU,aAAA,CAAc,OAAA,CAAQ,aAAA,IAAiB,YAAY,GAAG,CAAA;AAEtE,IAAM;AAAA,EACJ,yBAAA;AAAA,EACA,cAAA;AAAA,EACA,IAAA;AAAA,EACA,aAAA;AAAA,EACA,qBAAA;AAAA,EACA;AACF,CAAA,GAAIA,SAAQ,uBAAuB,CAAA;AAInC,IAA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,WAAA,EAAa,IAAA;AAAA,MACb,IAAA;AAAA;AAAA;AAAA;AAAA,MAIA,OAAA,EAAS,CAAC,qBAAA,EAAuB,gBAAgB,CAAA;AAAA,MACjD,iBAAiB,YAAA,EAAmB;AAClC,QAAA,YAAA,CAAa,GAAA,GAAM;AAAA,UACjB,GAAG,YAAA,CAAa,GAAA;AAAA,UAChB,GAAG,YAAA,CAAa,IAAA;AAAA,UAChB,GAAG,YAAA,CAAa,MAAA;AAAA,UAChB,MAAA,EAAQ;AAAA,SACV;AAAA,MACF;AAAA,KACD,CAAA;AAAA,EACH,CAAA;AAAA,EACA,QAAQ,KAAA,EAAgB;AACtB,IAAC,UAAA,CAAmB,WAAA,CAAY,EAAE,IAAA,EAAM,OAAA,EAAS,KAAA,EAAO,YAAA,EAAc,CAAC,GAAG,YAAY,CAAA,EAAG,CAAA;AACzF,IAAA,YAAA,CAAa,MAAA,GAAS,CAAA;AAAA,EACxB;AACF,CAAC,CAAA;AAEA,UAAA,CAAmB,SAAA,GAAY,CAAC,KAAA,KAAmB,OAAA,CAAQ,OAAO,KAAK,CAAA","file":"rolldown-wasi-worker.js","sourcesContent":["/**\n * A Rolldown WASI worker thread whose filesystem is the container's.\n *\n * Rolldown's npm package ships two of these. The browser one builds its\n * filesystem from an in-memory volume proxied back to the main thread; the\n * Node one calls `node:wasi` with `preopens: { \"/\": \"/\" }` and reads the real\n * disk. Neither is usable as-is here: the browser file wants browser worker\n * globals, and the Node file wants the host's filesystem — which is precisely\n * the thing a container must not hand to the code running inside it.\n *\n * So this is the crossing of the two: Node's worker plumbing around the\n * browser's filesystem. Every path Rolldown opens on this thread is forwarded\n * to the main thread and served out of the memory volume the container mirrors\n * itself into, so the bundler and the rest of the container see one filesystem.\n *\n * Bundled as its own entry point, because a worker is fetched as its own\n * module graph rather than through the main bundle.\n */\n\nimport { createRequire } from \"node:module\";\nimport { readFileSync } from \"node:fs\";\nimport { parentPort, workerData, Worker } from \"node:worker_threads\";\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * Resolved against the binding's own location, not this file's.\n *\n * `@napi-rs/wasm-runtime` arrives as a dependency of the Rolldown binding,\n * which an installer is free to place anywhere — nested, hoisted, in a store\n * behind a symlink. Anchoring the lookup to the package that actually depends\n * on it is what keeps this working under npm, pnpm and Yarn alike.\n */\nconst options = (workerData ?? {}) as { runtimeAnchor?: string; fsModuleUrl?: string };\nconst require = createRequire(options.runtimeAnchor ?? import.meta.url);\n\nconst {\n instantiateNapiModuleSync,\n MessageHandler,\n WASI,\n createFsProxy,\n emnapiAsyncWorkPlugin,\n emnapiTSFNPlugin,\n} = require(\"@napi-rs/wasm-runtime\");\n/* Passed in as a resolved URL: the runtime publishes `./fs` to `import` only,\n * so it cannot be required, and resolving it from here would assume the\n * installer hoisted the package next to this worker. */\nconst { memfsExported } = await import(/* @vite-ignore */ /* webpackIgnore: true */ options.fsModuleUrl!);\n\n/**\n * The browser worker globals `MessageHandler` is written against.\n *\n * emnapi decides how to talk to a thread from the environment it finds, and\n * the handler itself is written for a browser worker: it is handed events and\n * replies with a bare `postMessage`. Node's port is bridged onto those names\n * rather than the handler being rewritten.\n */\nObject.assign(globalThis, {\n self: globalThis,\n require,\n Worker,\n importScripts(file: string) {\n (0, eval)(`${readFileSync(file, \"utf8\")}//# sourceURL=${file}`);\n },\n postMessage(message: unknown) {\n parentPort?.postMessage(message);\n },\n});\n\nif (parentPort) {\n parentPort.on(\"message\", (data) => {\n (globalThis as any).onmessage?.({ data });\n });\n}\n\nconst errorOutputs: unknown[][] = [];\n\nconst handler = new MessageHandler({\n onLoad({ wasmModule, wasmMemory }: { wasmModule: WebAssembly.Module; wasmMemory: WebAssembly.Memory }) {\n const wasi = new WASI({\n /* The proxy is the whole point: every syscall goes to the main thread,\n * which answers from the volume the container keeps in step. */\n fs: createFsProxy(memfsExported),\n preopens: { \"/\": \"/\" },\n print: (...args: unknown[]) => console.log(...args),\n printErr: (...args: unknown[]) => {\n console.error(...args);\n errorOutputs.push(args);\n },\n });\n\n return instantiateNapiModuleSync(wasmModule, {\n childThread: true,\n wasi,\n /* The wasm links a \"basic\" emnapi archive with no C implementations of\n * async work or threadsafe functions, so every thread has to bring the\n * JavaScript ones. */\n plugins: [emnapiAsyncWorkPlugin, emnapiTSFNPlugin],\n overwriteImports(importObject: any) {\n importObject.env = {\n ...importObject.env,\n ...importObject.napi,\n ...importObject.emnapi,\n memory: wasmMemory,\n };\n },\n });\n },\n onError(error: unknown) {\n (globalThis as any).postMessage({ type: \"error\", error, errorOutputs: [...errorOutputs] });\n errorOutputs.length = 0;\n },\n});\n\n(globalThis as any).onmessage = (event: unknown) => handler.handle(event);\n"]}
@@ -21214,7 +21214,7 @@ function parse3(input, options) {
21214
21214
  return Parser.parse(input, options);
21215
21215
  }
21216
21216
 
21217
- // src/runtime/esm-transform.ts
21217
+ // src/node/esm-transform.ts
21218
21218
  var import_acorn_jsx = __toESM(require_acorn_jsx());
21219
21219
  var HELPERS = {
21220
21220
  /** Import a specifier and return an ES-module-shaped namespace. */
@@ -21667,7 +21667,7 @@ function f(e2, r2, t2) {
21667
21667
  if (e2.imports) return n(e2.name, e2.imports, r2, t2);
21668
21668
  }
21669
21669
 
21670
- // src/runtime/commonjs-engine.ts
21670
+ // src/node/commonjs-engine.ts
21671
21671
  var EXTENSIONS = [".js", ".mjs", ".cjs", ".json", ".node"];
21672
21672
  var CONDITION_SETS = {
21673
21673
  import: [["node", "import", "module", "default"], ["node", "require", "default"], ["default"]],
@@ -22124,7 +22124,7 @@ function splitSpecifier(specifier) {
22124
22124
  return { name: parts.slice(0, size).join("/"), subpath: parts.slice(size).join("/") };
22125
22125
  }
22126
22126
 
22127
- // src/runtime/buffer-module.ts
22127
+ // src/node/buffer-module.ts
22128
22128
  var import_buffer = __toESM(require_buffer());
22129
22129
  var platformBuffer = globalThis.Buffer;
22130
22130
  var Buffer2 = platformBuffer ?? addBase64UrlSupport(import_buffer.Buffer);
@@ -22155,12 +22155,12 @@ function normalizeEncoding(value) {
22155
22155
  return typeof value === "string" && value.toLowerCase() === "base64url" ? "base64" : value;
22156
22156
  }
22157
22157
 
22158
- // src/runtime/core-modules.ts
22158
+ // src/node/core-modules.ts
22159
22159
  var import_events4 = __toESM(require_events());
22160
22160
  var import_path_browserify = __toESM(require_path_browserify());
22161
22161
  var import_stream_browserify4 = __toESM(require_stream_browserify());
22162
22162
 
22163
- // src/runtime/readable-from.ts
22163
+ // src/node/readable-from.ts
22164
22164
  function createReadableFrom(Readable) {
22165
22165
  return function from(source, options = {}) {
22166
22166
  if (source && typeof source.pipe === "function") return source;
@@ -22209,7 +22209,7 @@ function installReadableFrom(streamModule5) {
22209
22209
  streamModule5.Readable.from = createReadableFrom(streamModule5.Readable);
22210
22210
  }
22211
22211
 
22212
- // src/runtime/util-module.ts
22212
+ // src/node/util-module.ts
22213
22213
  var customInspect = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
22214
22214
  var promisifyCustom = /* @__PURE__ */ Symbol.for("nodejs.util.promisify.custom");
22215
22215
  var BREAK_LENGTH = 72;
@@ -22583,7 +22583,7 @@ var utilModule = {
22583
22583
  };
22584
22584
  var util_module_default = utilModule;
22585
22585
 
22586
- // src/runtime/assert-module.ts
22586
+ // src/node/assert-module.ts
22587
22587
  var AssertionError = class extends Error {
22588
22588
  actual;
22589
22589
  expected;
@@ -22748,10 +22748,10 @@ var assertModule = Object.assign(ok, base, {
22748
22748
  });
22749
22749
  var assert_module_default = assertModule;
22750
22750
 
22751
- // src/runtime/core-modules.ts
22751
+ // src/node/core-modules.ts
22752
22752
  var import_browser = __toESM(require_browser2());
22753
22753
 
22754
- // src/runtime/zlib-module.ts
22754
+ // src/node/zlib-module.ts
22755
22755
  var import_stream_browserify = __toESM(require_stream_browserify());
22756
22756
 
22757
22757
  // node_modules/pako/dist/pako.esm.mjs
@@ -26950,7 +26950,7 @@ var inflate_1 = inflate;
26950
26950
  var inflateRaw_1 = inflateRaw;
26951
26951
  var ungzip_1 = ungzip;
26952
26952
 
26953
- // src/runtime/zlib-module.ts
26953
+ // src/node/zlib-module.ts
26954
26954
  var bytes = (data2) => {
26955
26955
  if (typeof data2 === "string") return new Uint8Array(Buffer2.from(data2, "utf8"));
26956
26956
  if (data2 instanceof ArrayBuffer) return new Uint8Array(data2);
@@ -27074,12 +27074,12 @@ var zlibModule = {
27074
27074
  };
27075
27075
  var zlib_module_default = zlibModule;
27076
27076
 
27077
- // src/runtime/core-modules.ts
27077
+ // src/node/core-modules.ts
27078
27078
  var import_querystring_es3 = __toESM(require_querystring_es3());
27079
27079
  var import_string_decoder = __toESM(require_string_decoder());
27080
27080
  var import_timers_browserify = __toESM(require_main());
27081
27081
 
27082
- // src/runtime/url-module.ts
27082
+ // src/node/url-module.ts
27083
27083
  var import_url = __toESM(require_url());
27084
27084
  function fileURLToPath(url) {
27085
27085
  const value = typeof url === "string" ? new URL(url) : url;
@@ -27129,7 +27129,7 @@ var urlModule = {
27129
27129
  };
27130
27130
  var url_module_default = urlModule;
27131
27131
 
27132
- // src/runtime/virtual-http.ts
27132
+ // src/node/virtual-http.ts
27133
27133
  var import_events = __toESM(require_events());
27134
27134
  var import_stream_browserify2 = __toESM(require_stream_browserify());
27135
27135
  var VirtualIncomingMessage = class extends import_stream_browserify2.default.Readable {
@@ -28621,7 +28621,7 @@ var HMAC = class extends Hash {
28621
28621
  var hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();
28622
28622
  hmac.create = (hash, key) => new HMAC(hash, key);
28623
28623
 
28624
- // src/runtime/crypto-module.ts
28624
+ // src/node/crypto-module.ts
28625
28625
  var hashes = { md5, sha1, "sha-1": sha1, sha224: sha2242, "sha-224": sha2242, sha256: sha2562, "sha-256": sha2562, sha384: sha3842, "sha-384": sha3842, sha512: sha5122, "sha-512": sha5122 };
28626
28626
  function createCryptoModule() {
28627
28627
  const cryptoObject = globalThis.crypto;
@@ -28716,7 +28716,7 @@ function toBytes2(data2, encoding) {
28716
28716
  return typeof data2 === "string" ? Buffer2.from(data2, encoding) : data2;
28717
28717
  }
28718
28718
 
28719
- // src/runtime/sync-channel.ts
28719
+ // src/worker/sync-channel.ts
28720
28720
  var STATE = 0;
28721
28721
  var LENGTH2 = 1;
28722
28722
  var MORE = 2;
@@ -28812,7 +28812,7 @@ var SyncChannelClient = class {
28812
28812
  }
28813
28813
  };
28814
28814
 
28815
- // src/runtime/child-process-module.ts
28815
+ // src/node/child-process-module.ts
28816
28816
  var import_events2 = __toESM(require_events());
28817
28817
  var import_stream_browserify3 = __toESM(require_stream_browserify());
28818
28818
  var ChildProcess = class extends import_events2.default {
@@ -29070,7 +29070,7 @@ Object.fromEntries(
29070
29070
  Object.entries(SIGNALS).map(([name, num]) => [num, name])
29071
29071
  );
29072
29072
 
29073
- // src/runtime/readline-module.ts
29073
+ // src/node/readline-module.ts
29074
29074
  var import_events3 = __toESM(require_events());
29075
29075
  var CSI_KEYS = {
29076
29076
  "[A": "up",
@@ -29481,7 +29481,7 @@ function createReadlineModule(defaultInput, defaultOutput = () => void 0) {
29481
29481
  var KERNEL_RELEASE = "5.10.0";
29482
29482
  var KERNEL_VERSION = `Linux version ${KERNEL_RELEASE} (sandboxedjs@sandbox) (gcc version 12.2.0) #1 SMP PREEMPT_DYNAMIC`;
29483
29483
 
29484
- // src/runtime/core-modules.ts
29484
+ // src/node/core-modules.ts
29485
29485
  installReadableFrom(import_stream_browserify4.default);
29486
29486
  var Dirent = class {
29487
29487
  /** Node 20+ exposes the containing directory, and `fs.glob` consumers read it. */
@@ -30649,7 +30649,7 @@ var builtinNames = [
30649
30649
  ...stubNames
30650
30650
  ];
30651
30651
 
30652
- // src/runtime/remote-volume.ts
30652
+ // src/fs/remote-volume.ts
30653
30653
  var encoder = new TextEncoder();
30654
30654
  var decoder = new TextDecoder();
30655
30655
  function encodeFrame(header, body) {
@@ -30762,7 +30762,7 @@ var RemoteVolume = class {
30762
30762
  }
30763
30763
  };
30764
30764
 
30765
- // src/runtime/sync-syscalls.ts
30765
+ // src/worker/sync-syscalls.ts
30766
30766
  var SPAWN_OP = "spawnSync";
30767
30767
  function spawnSyncOverChannel(channel, request) {
30768
30768
  const frame = channel.call(encodeFrame({ op: SPAWN_OP, args: [request] }));
@@ -30782,7 +30782,7 @@ function spawnSyncOverChannel(channel, request) {
30782
30782
  return header.value;
30783
30783
  }
30784
30784
 
30785
- // src/runtime/global-process.ts
30785
+ // src/node/global-process.ts
30786
30786
  var import_browser2 = __toESM(require_browser2());
30787
30787
  var installed = false;
30788
30788
  function ensureProcessGlobal() {
@@ -30796,7 +30796,7 @@ function ensureProcessGlobal() {
30796
30796
  });
30797
30797
  }
30798
30798
 
30799
- // src/runtime/worker-entry.ts
30799
+ // src/worker/worker-entry.ts
30800
30800
  var DRAIN_TURNS = 8;
30801
30801
  var ProcessExit = class extends Error {
30802
30802
  constructor(code) {