@yydb/yydb-unknown-wasm32 0.0.0 → 0.0.5
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 +27 -27
- package/package.json +24 -24
package/README.md
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
# `@yydb/yydb-unknown-wasm32`
|
|
2
|
-
|
|
3
|
-
Low-level wasm-pack artifacts for the YYDB browser core. **App authors should use
|
|
4
|
-
[`@yydb/yydb/wasm`](https://www.npmjs.com/package/@yydb/yydb)** instead of this package.
|
|
5
|
-
|
|
6
|
-
Import here only when you need the raw glue or bundled `.wasm` path. For durable reads and writes in production, prefer
|
|
7
|
-
[`@yydb/yydb-client`](https://www.npmjs.com/package/@yydb/yydb-client) against `yydb serve` until wasm persistence
|
|
8
|
-
lands.
|
|
9
|
-
|
|
10
|
-
## Example
|
|
11
|
-
|
|
12
|
-
```ts
|
|
13
|
-
import {initWasm, checkSchema, yydbVersion} from "@yydb/yydb/wasm";
|
|
14
|
-
|
|
15
|
-
await initWasm();
|
|
16
|
-
|
|
17
|
-
console.log(yydbVersion());
|
|
18
|
-
console.log(
|
|
19
|
-
checkSchema("table Setting { @@id: uuid, key: utf8 }"),
|
|
20
|
-
);
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Call `initWasm()` once before semantic methods. Omit `options.module` to load the bundled `lib/yydb_wasm_bg.wasm` asset.
|
|
24
|
-
|
|
25
|
-
Low-level glue: `@yydb/yydb-unknown-wasm32/wasm` (raw `.wasm` path).
|
|
26
|
-
|
|
27
|
-
[YYDB overview](https://github.com/yy-database/yydb.rs)
|
|
1
|
+
# `@yydb/yydb-unknown-wasm32`
|
|
2
|
+
|
|
3
|
+
Low-level wasm-pack artifacts for the YYDB browser core. **App authors should use
|
|
4
|
+
[`@yydb/yydb/wasm`](https://www.npmjs.com/package/@yydb/yydb)** instead of this package.
|
|
5
|
+
|
|
6
|
+
Import here only when you need the raw glue or bundled `.wasm` path. For durable reads and writes in production, prefer
|
|
7
|
+
[`@yydb/yydb-client`](https://www.npmjs.com/package/@yydb/yydb-client) against `yydb serve` until wasm persistence
|
|
8
|
+
lands.
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import {initWasm, checkSchema, yydbVersion} from "@yydb/yydb/wasm";
|
|
14
|
+
|
|
15
|
+
await initWasm();
|
|
16
|
+
|
|
17
|
+
console.log(yydbVersion());
|
|
18
|
+
console.log(
|
|
19
|
+
checkSchema("table Setting { @@id: uuid, key: utf8 }"),
|
|
20
|
+
);
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Call `initWasm()` once before semantic methods. Omit `options.module` to load the bundled `lib/yydb_wasm_bg.wasm` asset.
|
|
24
|
+
|
|
25
|
+
Low-level glue: `@yydb/yydb-unknown-wasm32/wasm` (raw `.wasm` path).
|
|
26
|
+
|
|
27
|
+
[YYDB overview](https://github.com/yy-database/yydb.rs)
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
},
|
|
2
|
+
"name": "@yydb/yydb-unknown-wasm32",
|
|
3
|
+
"version": "0.0.5",
|
|
5
4
|
"description": "Browser WebAssembly binary for `@yydb/yydb`",
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
"license": "MPL-2.0",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"sideEffects": [
|
|
8
|
+
"./lib/yydb_wasm.js"
|
|
9
|
+
],
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
|
-
"
|
|
12
|
+
"types": "./src/index.ts",
|
|
13
13
|
"import": "./src/index.ts",
|
|
14
|
-
"
|
|
14
|
+
"default": "./src/index.ts"
|
|
15
15
|
},
|
|
16
16
|
"./wasm": "./lib/yydb_wasm_bg.wasm"
|
|
17
17
|
},
|
|
@@ -20,24 +20,24 @@
|
|
|
20
20
|
"lib",
|
|
21
21
|
"README.md"
|
|
22
22
|
],
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"publishConfig": {
|
|
27
|
-
"access": "public"
|
|
23
|
+
"scripts": {
|
|
24
|
+
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
25
|
+
"test": "pnpm run typecheck"
|
|
28
26
|
},
|
|
29
27
|
"repository": {
|
|
30
|
-
"directory": "projects/packages/yydb-unknown-wasm32",
|
|
31
28
|
"type": "git",
|
|
32
|
-
"url": "git+https://github.com/yy-database/yydb.
|
|
29
|
+
"url": "git+https://github.com/yy-database/yydb.git",
|
|
30
|
+
"directory": "projects/packages/yydb-unknown-wasm32"
|
|
33
31
|
},
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
"
|
|
32
|
+
"homepage": "https://github.com/yy-database/yydb/tree/dev/projects/packages/yydb-unknown-wasm32#readme",
|
|
33
|
+
"bugs": {
|
|
34
|
+
"url": "https://github.com/yy-database/yydb/issues"
|
|
37
35
|
},
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@types/node": "^20.10.0",
|
|
41
|
+
"typescript": "~5.3.0"
|
|
42
|
+
}
|
|
43
43
|
}
|