@flaxia/node 0.1.0 → 0.1.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.
@@ -1,4 +1,4 @@
1
- import { env as f, pipeline as m, TextStreamer as _ } from "./transformers.web-LTn1FtAY.js";
1
+ import { env as f, pipeline as m, TextStreamer as _ } from "./transformers.web.js";
2
2
  const d = [
3
3
  "text-classification",
4
4
  "token-classification",
@@ -2,7 +2,7 @@ let e = null;
2
2
  async function m(n) {
3
3
  const t = performance.now();
4
4
  if (!e) {
5
- const { pipeline: r } = await import("./transformers.web-LTn1FtAY.js");
5
+ const { pipeline: r } = await import("./transformers.web.js");
6
6
  e = await r(
7
7
  "feature-extraction",
8
8
  "onnx-community/Qwen3-Embedding-0.6B-ONNX",
@@ -1,4 +1,4 @@
1
- import { V as t } from "./VectorStoreEngine-DWDjxlGl.js";
1
+ import { V as t } from "./VectorStoreEngine.js";
2
2
  let n = null;
3
3
  async function i() {
4
4
  return n || (n = new t(), await n.initialize()), n;
@@ -1,4 +1,4 @@
1
- import { V as i } from "./VectorStoreEngine-DWDjxlGl.js";
1
+ import { V as i } from "./VectorStoreEngine.js";
2
2
  let n = null;
3
3
  async function a() {
4
4
  return n || (n = new i(), await n.initialize()), n;
package/dist/index.js CHANGED
@@ -53,7 +53,7 @@ const p = "flaxia_consent_granted", u = "flaxia_consent_expiry", S = 30 * 24 * 6
53
53
  localStorage.setItem(p, "true"), localStorage.setItem(u, String(Date.now() + S));
54
54
  };
55
55
  class T {
56
- constructor(e, r = 12e4) {
56
+ constructor(e, r = 3e5) {
57
57
  this.worker = null, this.workerUrl = e || "/worker.js", this.defaultTimeoutMs = r, this.initWorker();
58
58
  }
59
59
  initWorker() {
package/dist/worker.js CHANGED
@@ -9,27 +9,27 @@ self.onmessage = async (n) => {
9
9
  };
10
10
  switch (o) {
11
11
  case "ai-inference":
12
- const { handleAiInference: r } = await import("./assets/ai-inference-CRbNHBmj.js");
12
+ const { handleAiInference: r } = await import("./assets/ai-inference.js");
13
13
  e = await r(a, c);
14
14
  break;
15
15
  case "image-process":
16
- const { handleImageProcess: i } = await import("./assets/image-process-CFSjI3n4.js");
16
+ const { handleImageProcess: i } = await import("./assets/image-process.js");
17
17
  e = await i(a);
18
18
  break;
19
19
  case "container":
20
- const { handleContainer: l } = await import("./assets/container-DUJbyE2u.js");
20
+ const { handleContainer: l } = await import("./assets/container.js");
21
21
  e = await l(a);
22
22
  break;
23
23
  case "vector-embed":
24
- const { handleVectorEmbed: w } = await import("./assets/vector-embed-CWTe0WgU.js");
24
+ const { handleVectorEmbed: w } = await import("./assets/vector-embed.js");
25
25
  e = await w(a);
26
26
  break;
27
27
  case "vector-store":
28
- const { handleVectorStore: p } = await import("./assets/vector-store-Q3bfrenv.js");
28
+ const { handleVectorStore: p } = await import("./assets/vector-store.js");
29
29
  e = await p(a);
30
30
  break;
31
31
  case "vector-query":
32
- const { handleVectorQuery: d } = await import("./assets/vector-query-Bazb2ZNi.js");
32
+ const { handleVectorQuery: d } = await import("./assets/vector-query.js");
33
33
  e = await d(a);
34
34
  break;
35
35
  default:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flaxia/node",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -20,9 +20,10 @@
20
20
  "test": "vitest"
21
21
  },
22
22
  "dependencies": {
23
- "@flaxia/sdk": "^0.1.0",
24
23
  "@bjorn3/browser_wasi_shim": "^0.4.2",
25
- "@huggingface/transformers": "^4.2.0"
24
+ "@flaxia/sdk": "^0.1.0",
25
+ "@huggingface/transformers": "^4.2.0",
26
+ "rollup": "^4.61.0"
26
27
  },
27
28
  "devDependencies": {
28
29
  "@testing-library/dom": "^10.4.1",