@rljson/io 0.0.41 → 0.0.42
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 -21
- package/README.architecture.md +9 -9
- package/README.blog.md +3 -3
- package/README.contributors.md +32 -32
- package/README.md +18 -18
- package/README.public.md +7 -7
- package/README.trouble.md +36 -36
- package/dist/README.architecture.md +9 -9
- package/dist/README.blog.md +3 -3
- package/dist/README.contributors.md +32 -32
- package/dist/README.md +18 -18
- package/dist/README.public.md +7 -7
- package/dist/README.trouble.md +36 -36
- package/dist/conformance-tests/goldens/dump/empty.json +106 -104
- package/dist/conformance-tests/goldens/dump/two-tables.json +168 -164
- package/dist/conformance-tests/goldens/dumpTable/table1.json +12 -11
- package/dist/conformance-tests/goldens/tableCfgs-1.json +122 -122
- package/dist/conformance-tests/goldens/tableCfgs.json +99 -98
- package/dist/conformance-tests/io-conformance.setup.ts +38 -38
- package/dist/conformance-tests/io-conformance.spec.ts +942 -920
- package/dist/conformance-tests/scripts/install-conformance-tests.js +103 -103
- package/dist/io.js +70 -76
- package/dist/src/example.ts +10 -10
- package/package.json +57 -65
|
@@ -1,123 +1,123 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"key": "revisions",
|
|
4
|
-
"type": "
|
|
5
|
-
"isHead": true,
|
|
6
|
-
"isRoot": true,
|
|
7
|
-
"isShared": false,
|
|
8
|
-
"columns": [
|
|
9
|
-
{
|
|
10
|
-
"key": "_hash",
|
|
11
|
-
"type": "string",
|
|
12
|
-
"_hash": "df4oYftB-71Njv9FprRCeg"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"key": "table",
|
|
16
|
-
"type": "string",
|
|
17
|
-
"_hash": "FmsYjsit04XJi02Sihdwl-"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"key": "predecessor",
|
|
21
|
-
"type": "string",
|
|
22
|
-
"_hash": "RlAk7Lj-lZf2KDlUk5fekZ"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"key": "successor",
|
|
26
|
-
"type": "string",
|
|
27
|
-
"_hash": "MJlFtQVty5oUJKVzzj5hyB"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"key": "timestamp",
|
|
31
|
-
"type": "number",
|
|
32
|
-
"_hash": "XpKYGh23thW6vONgQuoMHf"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"key": "id",
|
|
36
|
-
"type": "string",
|
|
37
|
-
"_hash": "eq2P3RIaSgy81i7PomNUvn"
|
|
38
|
-
}
|
|
39
|
-
],
|
|
40
|
-
"_hash": "
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"key": "table0",
|
|
44
|
-
"type": "
|
|
45
|
-
"isHead": false,
|
|
46
|
-
"isRoot": false,
|
|
47
|
-
"isShared": true,
|
|
48
|
-
"columns": [
|
|
49
|
-
{
|
|
50
|
-
"key": "_hash",
|
|
51
|
-
"type": "string",
|
|
52
|
-
"_hash": "df4oYftB-71Njv9FprRCeg"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"key": "col0",
|
|
56
|
-
"type": "string",
|
|
57
|
-
"_hash": "LyqWPAOnRnSAofi4I1aMIv"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"key": "col1",
|
|
61
|
-
"type": "string",
|
|
62
|
-
"_hash": "aD2OJziZ76JeLyPuV4ioKe"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"key": "col2",
|
|
66
|
-
"type": "string",
|
|
67
|
-
"_hash": "yd4AdprM2Z0vqKieWOibX5"
|
|
68
|
-
}
|
|
69
|
-
],
|
|
70
|
-
"_hash": "
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"_hash": "
|
|
74
|
-
"key": "tableCfgs",
|
|
75
|
-
"type": "
|
|
76
|
-
"isHead": false,
|
|
77
|
-
"isRoot": false,
|
|
78
|
-
"isShared": true,
|
|
79
|
-
"previous": "",
|
|
80
|
-
"columns": [
|
|
81
|
-
{
|
|
82
|
-
"key": "_hash",
|
|
83
|
-
"type": "string",
|
|
84
|
-
"_hash": "df4oYftB-71Njv9FprRCeg"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
"key": "key",
|
|
88
|
-
"type": "string",
|
|
89
|
-
"_hash": "tapEY-QdaJwWhz1PPZoG35"
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"key": "type",
|
|
93
|
-
"type": "string",
|
|
94
|
-
"_hash": "zE7ALsNzu5JPgDD4AxeRCh"
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"key": "isHead",
|
|
98
|
-
"type": "boolean",
|
|
99
|
-
"_hash": "ar8Hajt2UZDn-F21QLMyC_"
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"key": "isRoot",
|
|
103
|
-
"type": "boolean",
|
|
104
|
-
"_hash": "hedsCm_HtiiTuzJyTeMqhm"
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"key": "isShared",
|
|
108
|
-
"type": "boolean",
|
|
109
|
-
"_hash": "pxXOf3-3qCo9Z3FzC9JXSH"
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
"key": "previous",
|
|
113
|
-
"type": "string",
|
|
114
|
-
"_hash": "e0TEeDmSvJcLEMtrVxc0oW"
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
"key": "columns",
|
|
118
|
-
"type": "jsonArray",
|
|
119
|
-
"_hash": "aPmGTcNng9E1RvlEj1LtxB"
|
|
120
|
-
}
|
|
121
|
-
]
|
|
122
|
-
}
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"key": "revisions",
|
|
4
|
+
"type": "revisions",
|
|
5
|
+
"isHead": true,
|
|
6
|
+
"isRoot": true,
|
|
7
|
+
"isShared": false,
|
|
8
|
+
"columns": [
|
|
9
|
+
{
|
|
10
|
+
"key": "_hash",
|
|
11
|
+
"type": "string",
|
|
12
|
+
"_hash": "df4oYftB-71Njv9FprRCeg"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"key": "table",
|
|
16
|
+
"type": "string",
|
|
17
|
+
"_hash": "FmsYjsit04XJi02Sihdwl-"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"key": "predecessor",
|
|
21
|
+
"type": "string",
|
|
22
|
+
"_hash": "RlAk7Lj-lZf2KDlUk5fekZ"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"key": "successor",
|
|
26
|
+
"type": "string",
|
|
27
|
+
"_hash": "MJlFtQVty5oUJKVzzj5hyB"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"key": "timestamp",
|
|
31
|
+
"type": "number",
|
|
32
|
+
"_hash": "XpKYGh23thW6vONgQuoMHf"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"key": "id",
|
|
36
|
+
"type": "string",
|
|
37
|
+
"_hash": "eq2P3RIaSgy81i7PomNUvn"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"_hash": "2ztQLyMtsFFIs0z_rvT6UL"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"key": "table0",
|
|
44
|
+
"type": "components",
|
|
45
|
+
"isHead": false,
|
|
46
|
+
"isRoot": false,
|
|
47
|
+
"isShared": true,
|
|
48
|
+
"columns": [
|
|
49
|
+
{
|
|
50
|
+
"key": "_hash",
|
|
51
|
+
"type": "string",
|
|
52
|
+
"_hash": "df4oYftB-71Njv9FprRCeg"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"key": "col0",
|
|
56
|
+
"type": "string",
|
|
57
|
+
"_hash": "LyqWPAOnRnSAofi4I1aMIv"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"key": "col1",
|
|
61
|
+
"type": "string",
|
|
62
|
+
"_hash": "aD2OJziZ76JeLyPuV4ioKe"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"key": "col2",
|
|
66
|
+
"type": "string",
|
|
67
|
+
"_hash": "yd4AdprM2Z0vqKieWOibX5"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"_hash": "wfRMrOPA2C9ogANQmzsI7K"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"_hash": "er5aXXmEqihTA7Y1glILb4",
|
|
74
|
+
"key": "tableCfgs",
|
|
75
|
+
"type": "tableCfgs",
|
|
76
|
+
"isHead": false,
|
|
77
|
+
"isRoot": false,
|
|
78
|
+
"isShared": true,
|
|
79
|
+
"previous": "",
|
|
80
|
+
"columns": [
|
|
81
|
+
{
|
|
82
|
+
"key": "_hash",
|
|
83
|
+
"type": "string",
|
|
84
|
+
"_hash": "df4oYftB-71Njv9FprRCeg"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"key": "key",
|
|
88
|
+
"type": "string",
|
|
89
|
+
"_hash": "tapEY-QdaJwWhz1PPZoG35"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"key": "type",
|
|
93
|
+
"type": "string",
|
|
94
|
+
"_hash": "zE7ALsNzu5JPgDD4AxeRCh"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"key": "isHead",
|
|
98
|
+
"type": "boolean",
|
|
99
|
+
"_hash": "ar8Hajt2UZDn-F21QLMyC_"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"key": "isRoot",
|
|
103
|
+
"type": "boolean",
|
|
104
|
+
"_hash": "hedsCm_HtiiTuzJyTeMqhm"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"key": "isShared",
|
|
108
|
+
"type": "boolean",
|
|
109
|
+
"_hash": "pxXOf3-3qCo9Z3FzC9JXSH"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"key": "previous",
|
|
113
|
+
"type": "string",
|
|
114
|
+
"_hash": "e0TEeDmSvJcLEMtrVxc0oW"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"key": "columns",
|
|
118
|
+
"type": "jsonArray",
|
|
119
|
+
"_hash": "aPmGTcNng9E1RvlEj1LtxB"
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
123
|
]
|
|
@@ -1,99 +1,100 @@
|
|
|
1
|
-
{
|
|
2
|
-
"tableCfgs": {
|
|
3
|
-
"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
"
|
|
98
|
-
|
|
1
|
+
{
|
|
2
|
+
"tableCfgs": {
|
|
3
|
+
"_type": "tableCfgs",
|
|
4
|
+
"_data": [
|
|
5
|
+
{
|
|
6
|
+
"key": "revisions",
|
|
7
|
+
"type": "revisions",
|
|
8
|
+
"isHead": true,
|
|
9
|
+
"isRoot": true,
|
|
10
|
+
"isShared": false,
|
|
11
|
+
"columns": [
|
|
12
|
+
{
|
|
13
|
+
"key": "_hash",
|
|
14
|
+
"type": "string",
|
|
15
|
+
"_hash": "df4oYftB-71Njv9FprRCeg"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"key": "table",
|
|
19
|
+
"type": "string",
|
|
20
|
+
"_hash": "FmsYjsit04XJi02Sihdwl-"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"key": "predecessor",
|
|
24
|
+
"type": "string",
|
|
25
|
+
"_hash": "RlAk7Lj-lZf2KDlUk5fekZ"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"key": "successor",
|
|
29
|
+
"type": "string",
|
|
30
|
+
"_hash": "MJlFtQVty5oUJKVzzj5hyB"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"key": "timestamp",
|
|
34
|
+
"type": "number",
|
|
35
|
+
"_hash": "XpKYGh23thW6vONgQuoMHf"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"key": "id",
|
|
39
|
+
"type": "string",
|
|
40
|
+
"_hash": "eq2P3RIaSgy81i7PomNUvn"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"_hash": "2ztQLyMtsFFIs0z_rvT6UL"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"_hash": "er5aXXmEqihTA7Y1glILb4",
|
|
47
|
+
"key": "tableCfgs",
|
|
48
|
+
"type": "tableCfgs",
|
|
49
|
+
"isHead": false,
|
|
50
|
+
"isRoot": false,
|
|
51
|
+
"isShared": true,
|
|
52
|
+
"previous": "",
|
|
53
|
+
"columns": [
|
|
54
|
+
{
|
|
55
|
+
"key": "_hash",
|
|
56
|
+
"type": "string",
|
|
57
|
+
"_hash": "df4oYftB-71Njv9FprRCeg"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"key": "key",
|
|
61
|
+
"type": "string",
|
|
62
|
+
"_hash": "tapEY-QdaJwWhz1PPZoG35"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"key": "type",
|
|
66
|
+
"type": "string",
|
|
67
|
+
"_hash": "zE7ALsNzu5JPgDD4AxeRCh"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"key": "isHead",
|
|
71
|
+
"type": "boolean",
|
|
72
|
+
"_hash": "ar8Hajt2UZDn-F21QLMyC_"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"key": "isRoot",
|
|
76
|
+
"type": "boolean",
|
|
77
|
+
"_hash": "hedsCm_HtiiTuzJyTeMqhm"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"key": "isShared",
|
|
81
|
+
"type": "boolean",
|
|
82
|
+
"_hash": "pxXOf3-3qCo9Z3FzC9JXSH"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"key": "previous",
|
|
86
|
+
"type": "string",
|
|
87
|
+
"_hash": "e0TEeDmSvJcLEMtrVxc0oW"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"key": "columns",
|
|
91
|
+
"type": "jsonArray",
|
|
92
|
+
"_hash": "aPmGTcNng9E1RvlEj1LtxB"
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"_tableCfg": "er5aXXmEqihTA7Y1glILb4",
|
|
98
|
+
"_hash": "_u8EEswMCQtr4EKdi4F2Ti"
|
|
99
|
+
}
|
|
99
100
|
}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
// @license
|
|
2
|
-
// Copyright (c) 2025 Rljson
|
|
3
|
-
//
|
|
4
|
-
// Use of this source code is governed by terms that can be
|
|
5
|
-
// found in the LICENSE file in the root of this package.
|
|
6
|
-
|
|
7
|
-
import { Io, IoMem, IoTestSetup } from '@rljson/io';
|
|
8
|
-
|
|
9
|
-
// ..............................................................................
|
|
10
|
-
class MyIoTestSetup implements IoTestSetup {
|
|
11
|
-
async beforeAll(): Promise<void> {
|
|
12
|
-
// This method can be used for any additional setup required before init.
|
|
13
|
-
// Currently, it does nothing.
|
|
14
|
-
}
|
|
15
|
-
async beforeEach(): Promise<void> {
|
|
16
|
-
this._io = await IoMem.example();
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
async afterEach(): Promise<void> {
|
|
20
|
-
await this.io.close();
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
async afterAll(): Promise<void> {
|
|
24
|
-
// This method can be used for any additional cleanup after afterEach.
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
get io(): Io {
|
|
28
|
-
if (!this._io) {
|
|
29
|
-
throw new Error('Call init() before accessing io');
|
|
30
|
-
}
|
|
31
|
-
return this._io;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
private _io: Io | null = null;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// .............................................................................
|
|
38
|
-
export const testSetup = () => new MyIoTestSetup();
|
|
1
|
+
// @license
|
|
2
|
+
// Copyright (c) 2025 Rljson
|
|
3
|
+
//
|
|
4
|
+
// Use of this source code is governed by terms that can be
|
|
5
|
+
// found in the LICENSE file in the root of this package.
|
|
6
|
+
|
|
7
|
+
import { Io, IoMem, IoTestSetup } from '@rljson/io';
|
|
8
|
+
|
|
9
|
+
// ..............................................................................
|
|
10
|
+
class MyIoTestSetup implements IoTestSetup {
|
|
11
|
+
async beforeAll(): Promise<void> {
|
|
12
|
+
// This method can be used for any additional setup required before init.
|
|
13
|
+
// Currently, it does nothing.
|
|
14
|
+
}
|
|
15
|
+
async beforeEach(): Promise<void> {
|
|
16
|
+
this._io = await IoMem.example();
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
async afterEach(): Promise<void> {
|
|
20
|
+
await this.io.close();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
async afterAll(): Promise<void> {
|
|
24
|
+
// This method can be used for any additional cleanup after afterEach.
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
get io(): Io {
|
|
28
|
+
if (!this._io) {
|
|
29
|
+
throw new Error('Call init() before accessing io');
|
|
30
|
+
}
|
|
31
|
+
return this._io;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
private _io: Io | null = null;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// .............................................................................
|
|
38
|
+
export const testSetup = () => new MyIoTestSetup();
|