parsanol 1.5.26 → 1.5.28
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/README.md
CHANGED
|
@@ -104,6 +104,19 @@ synchronous constructor requires initialization first. Pass original artifact
|
|
|
104
104
|
and binding JSON text unchanged; parsing and reserializing checksum-bound
|
|
105
105
|
resources can change their numeric representations.
|
|
106
106
|
|
|
107
|
+
A Cloudflare Worker cannot fetch the WASM relative to the module. Import it as
|
|
108
|
+
a WASM module through the `parsanol/wasm` subpath (wrangler/esbuild resolve it
|
|
109
|
+
through the `exports` map) and pass the module to `initialize`:
|
|
110
|
+
|
|
111
|
+
```ts
|
|
112
|
+
import wasm from "parsanol/wasm";
|
|
113
|
+
import initialize, { PargRuntime } from "parsanol/browser";
|
|
114
|
+
await initialize(wasm);
|
|
115
|
+
const parser = new PargRuntime(artifactJson);
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Build scripts can locate the same file with `require.resolve("parsanol/wasm")`.
|
|
119
|
+
|
|
107
120
|
The browser entry has HTTP `fromURL` instead of Node filesystem helpers. Its
|
|
108
121
|
`compiledFrom(source)` uses asynchronous WebCrypto: `await` its result. The
|
|
109
122
|
Node entry retains its synchronous API. Browser-aware package resolution also
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "parsanol",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.28",
|
|
4
4
|
"description": "PARG artifact runtime for TypeScript \u2014 checksum-verified artifact load, wasm parse, bindings, schema-driven materialization",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/runtime.js",
|
|
@@ -18,12 +18,17 @@
|
|
|
18
18
|
"./browser": {
|
|
19
19
|
"types": "./dist/browser.d.ts",
|
|
20
20
|
"default": "./dist/browser.js"
|
|
21
|
+
},
|
|
22
|
+
"./wasm": {
|
|
23
|
+
"types": "./wasm.d.ts",
|
|
24
|
+
"default": "./vendor/parsanol-web/parsanol_bg.wasm"
|
|
21
25
|
}
|
|
22
26
|
},
|
|
23
27
|
"files": [
|
|
24
28
|
"dist/",
|
|
25
29
|
"vendor/parsanol-wasm/",
|
|
26
|
-
"vendor/parsanol-web/"
|
|
30
|
+
"vendor/parsanol-web/",
|
|
31
|
+
"wasm.d.ts"
|
|
27
32
|
],
|
|
28
33
|
"scripts": {
|
|
29
34
|
"build": "tsc -p tsconfig.json",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"repository": "https://github.com/parsanol/parsanol-rs",
|
|
3
3
|
"upstream_base": "0985ab5a647a87f347da51529ea4ee47adbf9324",
|
|
4
|
-
"source_commit": "
|
|
5
|
-
"built_source_commit": "
|
|
4
|
+
"source_commit": "6ea40e1946c263ef9cececafb5817552f450fe20",
|
|
5
|
+
"built_source_commit": "6ea40e1946c263ef9cececafb5817552f450fe20",
|
|
6
6
|
"source_tree": "140ed1ded3bbda04174357867fb8cbea94dfec3f",
|
|
7
7
|
"built_source_tree_equal": true,
|
|
8
|
-
"crate_version": "1.5.
|
|
8
|
+
"crate_version": "1.5.26",
|
|
9
9
|
"unreleased_candidate": false,
|
|
10
10
|
"target": "nodejs",
|
|
11
11
|
"profile": "release",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"wasm_vm_atom_calls": 1024
|
|
18
18
|
},
|
|
19
19
|
"lockfile": "scripts/wasm-build/Cargo.lock",
|
|
20
|
-
"lockfile_sha256": "
|
|
20
|
+
"lockfile_sha256": "738bdf4966221252ae7bb78fd9f78c1b7f17baa5df1a374b126aaf81d4524660",
|
|
21
21
|
"files": {
|
|
22
|
-
"parsanol_bg.wasm": "
|
|
22
|
+
"parsanol_bg.wasm": "7eabd71ef80917080fc2c1f349c67e61ca0a60c484ee4280dabd8d46712f43c0",
|
|
23
23
|
"parsanol.d.ts": "6ab38f3e1b965e02ed5f5c2c325a9c053e01a5ebab81d7edc47bae310d5af7c9",
|
|
24
24
|
"LICENSE": "47f4778bc0bfbeb3614d173dd1ec09ddd8cab994039193e2d3de2edcd7886c7e",
|
|
25
25
|
"parsanol.cjs": "3d648a22e5490babba584ea069ea3dfc72f853358494daedacaa16a12e145eba",
|
|
Binary file
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "@parsanol/wasm",
|
|
3
3
|
"version": "1.5.4",
|
|
4
|
-
"crate_version": "1.5.
|
|
4
|
+
"crate_version": "1.5.26",
|
|
5
5
|
"target": "web",
|
|
6
6
|
"repository": "https://github.com/parsanol/parsanol-rs",
|
|
7
7
|
"tarball": "https://registry.npmjs.org/@parsanol/wasm/-/wasm-1.5.4.tgz",
|
|
8
8
|
"integrity": "sha512-oeYj52TYg6DomXRIP4iyY5Yj3NwdljcMUok/LQlozO4OlMqyYfvrReaihf2ox9oqqk5aLi0UcQrEYuEfOFRtmw==",
|
|
9
9
|
"tarball_sha256": "6f9ea6f9277776f9ac96e7423df54693aa5dcce8cf1c7abef85b39fa724b3b3c",
|
|
10
10
|
"files": {
|
|
11
|
-
"parsanol_bg.wasm": "
|
|
11
|
+
"parsanol_bg.wasm": "7eabd71ef80917080fc2c1f349c67e61ca0a60c484ee4280dabd8d46712f43c0",
|
|
12
12
|
"parsanol.d.ts": "f4ffbf833368dffe1ecb9c611e7f172920ef383d26e6de23daee151de9b3eabb",
|
|
13
13
|
"LICENSE": "47f4778bc0bfbeb3614d173dd1ec09ddd8cab994039193e2d3de2edcd7886c7e",
|
|
14
14
|
"parsanol.js": "32f1dec81b386a00db016bea5816a7de8bc7f1ae9fe0f48c59570311cf931e61",
|
|
15
15
|
"parsanol_bg.wasm.d.ts": "628aeab600cac0fffb121c2d8d9133376e04cf13726e8d366ca4687c4a22aad7",
|
|
16
16
|
"README.md": "577c2d75ac98c331379a50698624b68c773eb4603648108f80f4399fde33d339"
|
|
17
17
|
},
|
|
18
|
-
"source_commit": "
|
|
19
|
-
"lockfile_sha256": "
|
|
20
|
-
"built_source_commit": "
|
|
18
|
+
"source_commit": "6ea40e1946c263ef9cececafb5817552f450fe20",
|
|
19
|
+
"lockfile_sha256": "738bdf4966221252ae7bb78fd9f78c1b7f17baa5df1a374b126aaf81d4524660",
|
|
20
|
+
"built_source_commit": "6ea40e1946c263ef9cececafb5817552f450fe20",
|
|
21
21
|
"built_source_tree_equal": true,
|
|
22
22
|
"upstream_base": "0985ab5a647a87f347da51529ea4ee47adbf9324",
|
|
23
23
|
"unreleased_candidate": false
|
|
Binary file
|
package/wasm.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Types for the `parsanol/wasm` subpath: the web-target engine binary.
|
|
2
|
+
// A bundler that imports wasm as a module (wrangler/esbuild in a Cloudflare
|
|
3
|
+
// Worker) gives the compiled module as the default import; pass it to
|
|
4
|
+
// `initialize` from `parsanol/browser`.
|
|
5
|
+
declare const wasm: WebAssembly.Module;
|
|
6
|
+
export default wasm;
|