@hazae41/stdbob 0.0.14 → 0.0.16

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.
@@ -0,0 +1,4 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: [hazae41]
4
+ patreon: hazae41
@@ -0,0 +1,19 @@
1
+ on:
2
+ push:
3
+ tags:
4
+ - "*"
5
+
6
+ name: release
7
+
8
+ jobs:
9
+ compare:
10
+ name: compare
11
+ runs-on: ubuntu-24.04
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - uses: actions/setup-node@v6
15
+ with:
16
+ node-version: latest
17
+ - run: "npm ci && npm run prepack"
18
+ - run: "npm diff --diff=$(jq -r '.name' package.json)@$(jq -r '.version' package.json)"
19
+ - run: "[[ -z $(npm diff --diff=$(jq -r '.name' package.json)@$(jq -r '.version' package.json)) ]]"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@hazae41/stdbob",
4
- "version": "0.0.14",
4
+ "version": "0.0.16",
5
5
  "description": "Standard libraries for Bobine WebAssembly VM",
6
6
  "repository": "github:hazae41/stdbob",
7
7
  "author": "hazae41",
@@ -64,4 +64,12 @@ export namespace blobs {
64
64
  @external("blobs", "to_base64")
65
65
  export declare function toBase64(blob: blobref): textref
66
66
 
67
+ // @ts-ignore: decorator
68
+ @external("blobs", "encode")
69
+ export declare function encode<T>(value: T): blobref
70
+
71
+ // @ts-ignore: decorator
72
+ @external("blobs", "decode")
73
+ export declare function decode<T>(blob: blobref): T
74
+
67
75
  }
@@ -1,4 +1,4 @@
1
- import { blobref } from "../blobs/mod";
1
+ import { textref } from "../mod";
2
2
 
3
3
  export namespace env {
4
4
 
@@ -8,10 +8,6 @@ export namespace env {
8
8
 
9
9
  // @ts-ignore: decorator
10
10
  @external("env", "uuid")
11
- export declare function uuid(): blobref
12
-
13
- // @ts-ignore: decorator
14
- @external("env", "test")
15
- export declare function test(x: blobref): void
11
+ export declare function uuid(): textref
16
12
 
17
13
  }
@@ -1,22 +1,23 @@
1
1
  import { blobref } from "../blobs/mod";
2
2
  import { packref } from "../packs/mod";
3
+ import { textref } from "../texts/mod";
3
4
 
4
5
  export namespace modules {
5
6
 
7
+ // @ts-ignore: decorator
8
+ @external("modules", "self")
9
+ export declare function self(): textref
10
+
6
11
  // @ts-ignore: decorator
7
12
  @external("modules", "load")
8
- export declare function load(module: blobref): blobref
13
+ export declare function load(module: textref): blobref
9
14
 
10
15
  // @ts-ignore: decorator
11
16
  @external("modules", "call")
12
- export declare function call<T>(module: blobref, method: blobref, params: packref): T
17
+ export declare function call<T>(module: textref, method: textref, params: packref): T
13
18
 
14
19
  // @ts-ignore: decorator
15
20
  @external("modules", "create")
16
- export declare function create(code: blobref, salt: blobref): blobref
17
-
18
- // @ts-ignore: decorator
19
- @external("modules", "self")
20
- export declare function self(): blobref
21
+ export declare function create(code: blobref, salt: blobref): textref
21
22
 
22
23
  }