@hazae41/stdbob 0.0.13 → 0.0.15
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,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
package/src/mods/blobs/mod.ts
CHANGED
|
@@ -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
|
}
|
package/src/mods/modules/mod.ts
CHANGED
|
@@ -9,7 +9,7 @@ export namespace modules {
|
|
|
9
9
|
|
|
10
10
|
// @ts-ignore: decorator
|
|
11
11
|
@external("modules", "call")
|
|
12
|
-
export declare function call(module: blobref, method: blobref, params: packref):
|
|
12
|
+
export declare function call<T>(module: blobref, method: blobref, params: packref): T
|
|
13
13
|
|
|
14
14
|
// @ts-ignore: decorator
|
|
15
15
|
@external("modules", "create")
|
package/src/mods/packs/mod.ts
CHANGED
|
@@ -1,17 +1,8 @@
|
|
|
1
|
-
import { blobref } from "../blobs/mod";
|
|
2
1
|
|
|
3
2
|
export type packref = externref
|
|
4
3
|
|
|
5
4
|
export namespace packs {
|
|
6
5
|
|
|
7
|
-
// @ts-ignore: decorator
|
|
8
|
-
@external("packs", "decode")
|
|
9
|
-
export declare function decode(blob: blobref): packref
|
|
10
|
-
|
|
11
|
-
// @ts-ignore: decorator
|
|
12
|
-
@external("packs", "encode")
|
|
13
|
-
export declare function encode(pack: packref): blobref
|
|
14
|
-
|
|
15
6
|
// @ts-ignore: decorator
|
|
16
7
|
@external("packs", "concat")
|
|
17
8
|
export declare function concat(left: packref, right: packref): packref
|
package/src/mods/storage/mod.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { textref } from "../mod";
|
|
2
2
|
|
|
3
3
|
export namespace storage {
|
|
4
4
|
|
|
5
5
|
// @ts-ignore: decorator
|
|
6
6
|
@external("storage", "get")
|
|
7
|
-
export declare function get(key: textref):
|
|
7
|
+
export declare function get<T>(key: textref): T;
|
|
8
8
|
|
|
9
9
|
// @ts-ignore: decorator
|
|
10
10
|
@external("storage", "set")
|
|
11
|
-
export declare function set(key: textref, value:
|
|
11
|
+
export declare function set<T>(key: textref, value: T): void;
|
|
12
12
|
|
|
13
13
|
}
|