@lucid-evolution/uplc 0.5.0 → 0.5.1

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.
Binary file
@@ -91,11 +91,10 @@ export const eval_program_raw: (
91
91
  k: number,
92
92
  ) => [number, number, number];
93
93
  export const uplc_build_info: () => [number, number];
94
- export const __wbg_set_evalprogramresult_cpu: (a: number, b: bigint) => void;
95
- export const __wbg_set_evalprogramresult_mem: (a: number, b: bigint) => void;
96
94
  export const __wbg_get_evalprogramresult_cpu: (a: number) => bigint;
97
95
  export const __wbg_get_evalprogramresult_mem: (a: number) => bigint;
98
- export const __wbindgen_export_0: WebAssembly.Table;
96
+ export const __wbg_set_evalprogramresult_cpu: (a: number, b: bigint) => void;
97
+ export const __wbg_set_evalprogramresult_mem: (a: number, b: bigint) => void;
99
98
  export const __wbindgen_malloc: (a: number, b: number) => number;
100
99
  export const __wbindgen_realloc: (
101
100
  a: number,
@@ -103,8 +102,9 @@ export const __wbindgen_realloc: (
103
102
  c: number,
104
103
  d: number,
105
104
  ) => number;
106
- export const __externref_table_alloc: () => number;
105
+ export const __wbindgen_externrefs: WebAssembly.Table;
107
106
  export const __externref_table_dealloc: (a: number) => void;
108
- export const __externref_drop_slice: (a: number, b: number) => void;
109
107
  export const __wbindgen_free: (a: number, b: number, c: number) => void;
108
+ export const __externref_table_alloc: () => number;
109
+ export const __externref_drop_slice: (a: number, b: number) => void;
110
110
  export const __wbindgen_start: () => void;
@@ -0,0 +1,11 @@
1
+ export {
2
+ apply_params_to_script,
3
+ eval_builtin_raw,
4
+ eval_phase_two_raw,
5
+ eval_program_raw,
6
+ uplc_build_info,
7
+ BuiltinErrorKind,
8
+ BuiltinValueKind,
9
+ EvalBuiltinResult,
10
+ EvalProgramResult,
11
+ } from "./node/uplc_tx.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ // The Node.js entry: the bindings in ./node, recovering from a wasm trap (see
4
+ // ../recover-from-trap.js). Each export is assigned by name so that ES module
5
+ // imports of this CommonJS file see it.
6
+ const bindings = require("./node/uplc_tx.js");
7
+ const recovering = require("../recover-from-trap.js")(bindings);
8
+
9
+ exports.apply_params_to_script = recovering(bindings.apply_params_to_script);
10
+ exports.eval_builtin_raw = recovering(bindings.eval_builtin_raw);
11
+ exports.eval_phase_two_raw = recovering(bindings.eval_phase_two_raw);
12
+ exports.eval_program_raw = recovering(bindings.eval_program_raw);
13
+ exports.uplc_build_info = recovering(bindings.uplc_build_info);
14
+ exports.BuiltinErrorKind = bindings.BuiltinErrorKind;
15
+ exports.BuiltinValueKind = bindings.BuiltinValueKind;
16
+ exports.EvalBuiltinResult = bindings.EvalBuiltinResult;
17
+ exports.EvalProgramResult = bindings.EvalProgramResult;
package/package.json CHANGED
@@ -1,33 +1,33 @@
1
1
  {
2
2
  "name": "@lucid-evolution/uplc",
3
- "version": "0.5.0",
4
- "main": "./dist/speed/node/uplc_tx.js",
3
+ "version": "0.5.1",
4
+ "main": "./dist/speed/node.js",
5
5
  "browser": "./dist/size/browser/uplc_tx.js",
6
- "types": "./dist/speed/node/uplc_tx.d.ts",
6
+ "types": "./dist/speed/node.d.ts",
7
7
  "exports": {
8
8
  ".": {
9
- "types": "./dist/speed/node/uplc_tx.d.ts",
9
+ "types": "./dist/speed/node.d.ts",
10
10
  "workerd": "./dist/size/browser/uplc_tx.js",
11
11
  "edge-light": "./dist/size/browser/uplc_tx.js",
12
12
  "worker": "./dist/size/browser/uplc_tx.js",
13
13
  "browser": "./dist/size/browser/uplc_tx.js",
14
- "default": "./dist/speed/node/uplc_tx.js"
14
+ "default": "./dist/speed/node.js"
15
15
  },
16
16
  "./speed": {
17
- "types": "./dist/speed/node/uplc_tx.d.ts",
17
+ "types": "./dist/speed/node.d.ts",
18
18
  "workerd": "./dist/speed/browser/uplc_tx.js",
19
19
  "edge-light": "./dist/speed/browser/uplc_tx.js",
20
20
  "worker": "./dist/speed/browser/uplc_tx.js",
21
21
  "browser": "./dist/speed/browser/uplc_tx.js",
22
- "default": "./dist/speed/node/uplc_tx.js"
22
+ "default": "./dist/speed/node.js"
23
23
  },
24
24
  "./size": {
25
- "types": "./dist/size/node/uplc_tx.d.ts",
25
+ "types": "./dist/size/node.d.ts",
26
26
  "workerd": "./dist/size/browser/uplc_tx.js",
27
27
  "edge-light": "./dist/size/browser/uplc_tx.js",
28
28
  "worker": "./dist/size/browser/uplc_tx.js",
29
29
  "browser": "./dist/size/browser/uplc_tx.js",
30
- "default": "./dist/size/node/uplc_tx.js"
30
+ "default": "./dist/size/node.js"
31
31
  },
32
32
  "./dist/*": "./dist/*",
33
33
  "./package.json": "./package.json"
@@ -35,10 +35,10 @@
35
35
  "typesVersions": {
36
36
  "*": {
37
37
  "speed": [
38
- "./dist/speed/node/uplc_tx.d.ts"
38
+ "./dist/speed/node.d.ts"
39
39
  ],
40
40
  "size": [
41
- "./dist/size/node/uplc_tx.d.ts"
41
+ "./dist/size/node.d.ts"
42
42
  ]
43
43
  }
44
44
  },
@@ -52,7 +52,7 @@
52
52
  "vitest": "^2.1.8"
53
53
  },
54
54
  "scripts": {
55
- "build-local": "rm -rf dist && cd rust && wasm-pack build --target bundler --out-dir ../src/speed/browser && wasm-pack build --target nodejs --out-dir ../src/speed/node && wasm-pack build --profile release-size --target bundler --out-dir ../src/size/browser && wasm-pack build --profile release-size --target nodejs --out-dir ../src/size/node && cd .. && pnpm clean-garbage",
55
+ "build-local": "rm -rf dist && cd rust && wasm-pack build --target bundler --out-dir ../src/speed/browser && wasm-pack build --profile release-size --target bundler --out-dir ../src/size/browser && cd .. && scripts/build-node.sh && pnpm clean-garbage",
56
56
  "build": "cp -r src dist",
57
57
  "clean-garbage": "for d in speed/browser speed/node size/browser size/node; do rm -f src/$d/.gitignore src/$d/package.json; done",
58
58
  "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",