@rrule-rust/lib-wasm32-wasi 3.0.0-next.7 → 3.0.0-next.9

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/package.json CHANGED
@@ -1,9 +1,6 @@
1
1
  {
2
2
  "name": "@rrule-rust/lib-wasm32-wasi",
3
- "version": "3.0.0-next.7",
4
- "cpu": [
5
- "wasm32"
6
- ],
3
+ "version": "3.0.0-next.9",
7
4
  "main": "rrule-rust.wasi.cjs",
8
5
  "files": [
9
6
  "rrule-rust.wasm32-wasi.wasm",
@@ -34,15 +34,17 @@ const __sharedMemory = new WebAssembly.Memory({
34
34
 
35
35
  let __wasmFilePath = __nodePath.join(__dirname, 'rrule-rust.wasm32-wasi.wasm')
36
36
  const __wasmDebugFilePath = __nodePath.join(__dirname, 'rrule-rust.wasm32-wasi.debug.wasm')
37
+ const __wasmPackageFilePath = __nodePath.resolve('node_modules/@rrule-rust/lib-wasm32-wasi/rrule-rust.wasm32-wasi.wasm')
38
+ const __wasmPackageDebugFilePath = __nodePath.resolve('node_modules/@rrule-rust/lib-wasm32-wasi/rrule-rust.wasm32-wasi.debug.wasm')
37
39
 
38
40
  if (__nodeFs.existsSync(__wasmDebugFilePath)) {
39
41
  __wasmFilePath = __wasmDebugFilePath
40
- } else if (!__nodeFs.existsSync(__wasmFilePath)) {
41
- try {
42
- __wasmFilePath = __nodePath.resolve('@rrule-rust/lib-wasm32-wasi')
43
- } catch {
44
- throw new Error('Cannot find rrule-rust.wasm32-wasi.wasm file, and @rrule-rust/lib-wasm32-wasi package is not installed.')
45
- }
42
+ } else if (__nodeFs.existsSync(__wasmFilePath)) {
43
+ // already set
44
+ } else if (__nodeFs.existsSync(__wasmPackageDebugFilePath)) {
45
+ __wasmFilePath = __wasmPackageDebugFilePath
46
+ } else if (__nodeFs.existsSync(__wasmPackageFilePath)) {
47
+ __wasmFilePath = __wasmPackageFilePath
46
48
  }
47
49
 
48
50
  const { instance: __napiInstance, module: __wasiModule, napiModule: __napiModule } = __emnapiInstantiateNapiModuleSync(__nodeFs.readFileSync(__wasmFilePath), {
Binary file