@loro-dev/flock 1.0.0
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/LICENSE +21 -0
- package/README.md +133 -0
- package/dist/index.d.mts +145 -0
- package/dist/index.d.ts +145 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +54 -0
- package/src/_moon_flock.d.ts +84 -0
- package/src/_moon_flock.ts +13156 -0
- package/src/index.ts +758 -0
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@loro-dev/flock",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "TypeScript bindings for the Flock CRDT with mergeable export/import utilities.",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"import": "./dist/index.mjs",
|
|
9
|
+
"require": "./dist/index.cjs",
|
|
10
|
+
"default": "./dist/index.mjs"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"main": "./dist/index.cjs",
|
|
14
|
+
"module": "./dist/index.mjs",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"sideEffects": false,
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"src",
|
|
20
|
+
"README.md",
|
|
21
|
+
"LICENSE"
|
|
22
|
+
],
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=18"
|
|
25
|
+
},
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"crdt",
|
|
31
|
+
"replication",
|
|
32
|
+
"collaboration",
|
|
33
|
+
"loro",
|
|
34
|
+
"flock"
|
|
35
|
+
],
|
|
36
|
+
"author": "Loro contributors",
|
|
37
|
+
"license": "MIT",
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "git+https://github.com/loro-dev/flock.git"
|
|
41
|
+
},
|
|
42
|
+
"bugs": {
|
|
43
|
+
"url": "https://github.com/loro-dev/flock/issues"
|
|
44
|
+
},
|
|
45
|
+
"homepage": "https://github.com/loro-dev/flock/tree/main/ts",
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build": "tsdown",
|
|
48
|
+
"dev": "tsdown --watch",
|
|
49
|
+
"test": "vitest run",
|
|
50
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
51
|
+
"check": "pnpm typecheck && pnpm test",
|
|
52
|
+
"coverage": "vitest run --coverage"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type * as MoonBit from "./moonbit.d.ts";
|
|
2
|
+
|
|
3
|
+
export function subscribe_ffi(self: any,
|
|
4
|
+
listener: any): any;
|
|
5
|
+
|
|
6
|
+
export function scan_ffi(self: any,
|
|
7
|
+
start: any,
|
|
8
|
+
end: any,
|
|
9
|
+
prefix: any): any;
|
|
10
|
+
|
|
11
|
+
export function from_json_ffi(json: any,
|
|
12
|
+
peer_id: any): any;
|
|
13
|
+
|
|
14
|
+
export function get_mvr_ffi(self: any,
|
|
15
|
+
key: any): any;
|
|
16
|
+
|
|
17
|
+
export function put_mvr_ffi(self: any,
|
|
18
|
+
key: any,
|
|
19
|
+
value: any,
|
|
20
|
+
now: any): MoonBit.Unit;
|
|
21
|
+
|
|
22
|
+
export function digest_hex_ffi(self: any): any;
|
|
23
|
+
|
|
24
|
+
export function kv_to_json_ffi(self: any): any;
|
|
25
|
+
|
|
26
|
+
export function peer_id_ffi(self: any): any;
|
|
27
|
+
|
|
28
|
+
export function get_max_physical_time_ffi(self: any): any;
|
|
29
|
+
|
|
30
|
+
export function delete_ffi(self: any,
|
|
31
|
+
key: any,
|
|
32
|
+
now: any): MoonBit.Unit;
|
|
33
|
+
|
|
34
|
+
export function put_with_meta_ffi(self: any,
|
|
35
|
+
key: any,
|
|
36
|
+
value: any,
|
|
37
|
+
metadata: any,
|
|
38
|
+
now: any): MoonBit.Unit;
|
|
39
|
+
|
|
40
|
+
export function put_json_ffi(self: any,
|
|
41
|
+
key: any,
|
|
42
|
+
value: any,
|
|
43
|
+
now: any): MoonBit.Unit;
|
|
44
|
+
|
|
45
|
+
export function check_invariants_ffi(self: any): MoonBit.Unit;
|
|
46
|
+
|
|
47
|
+
export function check_consistency_ffi(a: any,
|
|
48
|
+
b: any): MoonBit.Bool;
|
|
49
|
+
|
|
50
|
+
export function version_ffi(self: any): any;
|
|
51
|
+
|
|
52
|
+
export function import_json_ffi(self: any,
|
|
53
|
+
json: any): any;
|
|
54
|
+
|
|
55
|
+
export function export_json_ffi(self: any,
|
|
56
|
+
from: any): any;
|
|
57
|
+
|
|
58
|
+
export function get_ffi(self: any,
|
|
59
|
+
key: any): any;
|
|
60
|
+
|
|
61
|
+
export function put_ffi(self: any,
|
|
62
|
+
key: any,
|
|
63
|
+
value: any,
|
|
64
|
+
now: MoonBit.Double): MoonBit.Unit;
|
|
65
|
+
|
|
66
|
+
export function newFlock(peer_id: MoonBit.Bytes): any;
|
|
67
|
+
|
|
68
|
+
export function from_json(json: any,
|
|
69
|
+
peer_id: MoonBit.Bytes): MoonBit.Result<any, any>;
|
|
70
|
+
|
|
71
|
+
export function merge(self: any,
|
|
72
|
+
other: any): MoonBit.Unit;
|
|
73
|
+
|
|
74
|
+
export function import_json(self: any,
|
|
75
|
+
json: any,
|
|
76
|
+
hooks$46$opt: any): MoonBit.Result<any, any>;
|
|
77
|
+
|
|
78
|
+
export function export_json(self: any,
|
|
79
|
+
from: MoonBit.UnboxedOption<any>): any;
|
|
80
|
+
|
|
81
|
+
export function version(self: any): any;
|
|
82
|
+
|
|
83
|
+
export function set_peer_id(self: any,
|
|
84
|
+
peer_id: MoonBit.Bytes): MoonBit.Unit;
|