hyperdb-wasm 0.0.26301-dev.wasm.g560c2cb5 → 0.0.26305-dev.wasm.gdf59cd37

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/dist/browser.js CHANGED
@@ -13,7 +13,7 @@ var __export = (target, all) => {
13
13
  __defProp(target, name, { get: all[name], enumerable: true });
14
14
  };
15
15
 
16
- // ../../../../../../../hyper-cache/bazel/bazel_user_root/18bf2c17ab56269933d5cfcb90730d2f/execroot/_main/hyper/wasm/npm/src/protocol.ts
16
+ // src/protocol.ts
17
17
  function isRecord(value) {
18
18
  return typeof value === "object" && value !== null;
19
19
  }
@@ -54,15 +54,15 @@ function isWorkerEvent(message) {
54
54
  }
55
55
  }
56
56
  var init_protocol = __esm({
57
- "../../../../../../../hyper-cache/bazel/bazel_user_root/18bf2c17ab56269933d5cfcb90730d2f/execroot/_main/hyper/wasm/npm/src/protocol.ts"() {
57
+ "src/protocol.ts"() {
58
58
  "use strict";
59
59
  }
60
60
  });
61
61
 
62
- // ../../../../../../../hyper-cache/bazel/bazel_user_root/18bf2c17ab56269933d5cfcb90730d2f/execroot/_main/hyper/wasm/npm/src/client.ts
62
+ // src/client.ts
63
63
  var HyperDBEngineClient;
64
64
  var init_client = __esm({
65
- "../../../../../../../hyper-cache/bazel/bazel_user_root/18bf2c17ab56269933d5cfcb90730d2f/execroot/_main/hyper/wasm/npm/src/client.ts"() {
65
+ "src/client.ts"() {
66
66
  "use strict";
67
67
  init_protocol();
68
68
  HyperDBEngineClient = class {
@@ -185,7 +185,7 @@ var init_client = __esm({
185
185
  }
186
186
  });
187
187
 
188
- // ../../../../../../../hyper-cache/bazel/bazel_user_root/18bf2c17ab56269933d5cfcb90730d2f/execroot/_main/hyper/wasm/npm/src/browser.ts
188
+ // src/browser.ts
189
189
  var browser_exports = {};
190
190
  __export(browser_exports, {
191
191
  BrowserWorker: () => BrowserWorker,
@@ -204,7 +204,7 @@ function createBrowserClient(options = {}) {
204
204
  }
205
205
  var BrowserWorker;
206
206
  var init_browser = __esm({
207
- "../../../../../../../hyper-cache/bazel/bazel_user_root/18bf2c17ab56269933d5cfcb90730d2f/execroot/_main/hyper/wasm/npm/src/browser.ts"() {
207
+ "src/browser.ts"() {
208
208
  "use strict";
209
209
  init_client();
210
210
  BrowserWorker = class {
@@ -12076,7 +12076,7 @@ RecordBatchWriter["throughDOM"] = recordBatchWriterThroughDOMStream;
12076
12076
  RecordBatchFileWriter["throughDOM"] = recordBatchWriterThroughDOMStream;
12077
12077
  RecordBatchStreamWriter["throughDOM"] = recordBatchWriterThroughDOMStream;
12078
12078
 
12079
- // ../../../../../../../hyper-cache/bazel/bazel_user_root/18bf2c17ab56269933d5cfcb90730d2f/execroot/_main/hyper/wasm/npm/src/api.ts
12079
+ // src/api.ts
12080
12080
  function normalizeArrowInsertOptions(options) {
12081
12081
  if (!options.name) throw new Error("Arrow insert table name must not be empty");
12082
12082
  return { name: options.name, schema: options.schema ?? null, create: options.create ?? true };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  (() => {
3
- // ../../../../../../../hyper-cache/bazel/bazel_user_root/18bf2c17ab56269933d5cfcb90730d2f/execroot/_main/hyper/wasm/npm/src/wasm_bindings.ts
3
+ // src/wasm_bindings.ts
4
4
  var resultStates = ["ok", "pending", "chunk", "done", "error", "busy"];
5
5
  function safeInteger(value, name) {
6
6
  const number = typeof value === "bigint" && value <= BigInt(Number.MAX_SAFE_INTEGER) ? Number(value) : value;
@@ -144,7 +144,7 @@
144
144
  }
145
145
  };
146
146
 
147
- // ../../../../../../../hyper-cache/bazel/bazel_user_root/18bf2c17ab56269933d5cfcb90730d2f/execroot/_main/hyper/wasm/npm/src/protocol.ts
147
+ // src/protocol.ts
148
148
  function isRecord(value) {
149
149
  return typeof value === "object" && value !== null;
150
150
  }
@@ -190,7 +190,7 @@
190
190
  }
191
191
  }
192
192
 
193
- // ../../../../../../../hyper-cache/bazel/bazel_user_root/18bf2c17ab56269933d5cfcb90730d2f/execroot/_main/hyper/wasm/npm/src/worker_setup.ts
193
+ // src/worker_setup.ts
194
194
  function errorText(error) {
195
195
  return error instanceof Error ? error.message : String(error);
196
196
  }
@@ -260,6 +260,7 @@
260
260
  }
261
261
  try {
262
262
  const result = bindings.handle(request);
263
+ if (request.type === "shutdown" && result.response.result.state === "ok") module.PThread.terminateAllThreads();
263
264
  transport.postMessage(result.response, result.transfer);
264
265
  } catch (error) {
265
266
  transport.postMessage({ id: request.id, type: "response", result: { state: "error", error: errorText(error) } });
@@ -284,7 +285,7 @@
284
285
  module.onAbort = (reason) => transport.postMessage({ type: "fatal", error: `engine aborted: ${String(reason)}` });
285
286
  }
286
287
 
287
- // ../../../../../../../hyper-cache/bazel/bazel_user_root/18bf2c17ab56269933d5cfcb90730d2f/execroot/_main/hyper/wasm/npm/src/browser_worker.ts
288
+ // src/browser_worker.ts
288
289
  var configuredEngineUrl = new URL(self.location.href).searchParams.get("engineUrl");
289
290
  var engineUrl = self.HYPERDB_WASM_ENGINE_URL ?? configuredEngineUrl ?? "hyperdb-wasm.js";
290
291
  var resolvedEngineUrl = new URL(engineUrl, self.location.href);