@arcjet/analyze 1.0.0-alpha.11 → 1.0.0-alpha.13

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/index.js CHANGED
@@ -9,18 +9,25 @@ async function moduleFromPath(path) {
9
9
  return cachedModule;
10
10
  }
11
11
  if (process.env["NEXT_RUNTIME"] === "edge") {
12
+ const wasmPrefix = "arcjet_analyze_js_req.component";
12
13
  if (path === "arcjet_analyze_js_req.component.core.wasm") {
13
- const mod = await import('./wasm/arcjet_analyze_js_req.component.core.wasm?module');
14
+ const mod = await import(
15
+ /* @vite-ignore */
16
+ `./wasm/${wasmPrefix}.core.wasm?module`);
14
17
  wasmCache.set(path, mod.default);
15
18
  return mod.default;
16
19
  }
17
20
  if (path === "arcjet_analyze_js_req.component.core2.wasm") {
18
- const mod = await import('./wasm/arcjet_analyze_js_req.component.core2.wasm?module');
21
+ const mod = await import(
22
+ /* @vite-ignore */
23
+ `./wasm/${wasmPrefix}.core2.wasm?module`);
19
24
  wasmCache.set(path, mod.default);
20
25
  return mod.default;
21
26
  }
22
27
  if (path === "arcjet_analyze_js_req.component.core3.wasm") {
23
- const mod = await import('./wasm/arcjet_analyze_js_req.component.core3.wasm?module');
28
+ const mod = await import(
29
+ /* @vite-ignore */
30
+ `./wasm/${wasmPrefix}.core3.wasm?module`);
24
31
  wasmCache.set(path, mod.default);
25
32
  return mod.default;
26
33
  }
package/index.ts CHANGED
@@ -18,23 +18,27 @@ async function moduleFromPath(path: string): Promise<WebAssembly.Module> {
18
18
  }
19
19
 
20
20
  if (process.env["NEXT_RUNTIME"] === "edge") {
21
+ const wasmPrefix = "arcjet_analyze_js_req.component";
21
22
  if (path === "arcjet_analyze_js_req.component.core.wasm") {
22
23
  const mod = await import(
23
- "./wasm/arcjet_analyze_js_req.component.core.wasm?module"
24
+ /* @vite-ignore */
25
+ `./wasm/${wasmPrefix}.core.wasm?module`
24
26
  );
25
27
  wasmCache.set(path, mod.default);
26
28
  return mod.default;
27
29
  }
28
30
  if (path === "arcjet_analyze_js_req.component.core2.wasm") {
29
31
  const mod = await import(
30
- "./wasm/arcjet_analyze_js_req.component.core2.wasm?module"
32
+ /* @vite-ignore */
33
+ `./wasm/${wasmPrefix}.core2.wasm?module`
31
34
  );
32
35
  wasmCache.set(path, mod.default);
33
36
  return mod.default;
34
37
  }
35
38
  if (path === "arcjet_analyze_js_req.component.core3.wasm") {
36
39
  const mod = await import(
37
- "./wasm/arcjet_analyze_js_req.component.core3.wasm?module"
40
+ /* @vite-ignore */
41
+ `./wasm/${wasmPrefix}.core3.wasm?module`
38
42
  );
39
43
  wasmCache.set(path, mod.default);
40
44
  return mod.default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcjet/analyze",
3
- "version": "1.0.0-alpha.11",
3
+ "version": "1.0.0-alpha.13",
4
4
  "description": "Arcjet local analysis engine",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://arcjet.com",
@@ -46,18 +46,18 @@
46
46
  "./wasm/arcjet_analyze_js_req_bg.js"
47
47
  ],
48
48
  "dependencies": {
49
- "@arcjet/logger": "1.0.0-alpha.11"
49
+ "@arcjet/logger": "1.0.0-alpha.13"
50
50
  },
51
51
  "devDependencies": {
52
- "@arcjet/eslint-config": "1.0.0-alpha.11",
53
- "@arcjet/rollup-config": "1.0.0-alpha.11",
54
- "@arcjet/tsconfig": "1.0.0-alpha.11",
55
- "@bytecodealliance/jco": "1.1.1",
52
+ "@arcjet/eslint-config": "1.0.0-alpha.13",
53
+ "@arcjet/rollup-config": "1.0.0-alpha.13",
54
+ "@arcjet/tsconfig": "1.0.0-alpha.13",
55
+ "@bytecodealliance/jco": "1.2.4",
56
56
  "@jest/globals": "29.7.0",
57
- "@rollup/wasm-node": "4.14.1",
57
+ "@rollup/wasm-node": "4.17.2",
58
58
  "@types/node": "18.18.0",
59
59
  "jest": "29.7.0",
60
- "typescript": "5.4.4"
60
+ "typescript": "5.4.5"
61
61
  },
62
62
  "publishConfig": {
63
63
  "access": "public",
@@ -45,6 +45,7 @@ function utf8Encode(s, realloc, memory) {
45
45
  return ptr;
46
46
  }
47
47
 
48
+
48
49
  async function instantiate(getCoreModule, imports, instantiateCore = WebAssembly.instantiate) {
49
50
  const module0 = getCoreModule('arcjet_analyze_js_req.component.core.wasm');
50
51
  const module1 = getCoreModule('arcjet_analyze_js_req.component.core2.wasm');