@rljson/io 0.0.30 → 0.0.32
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/dist/conformance-tests/goldens/dump/empty.json +105 -0
- package/dist/conformance-tests/goldens/dump/two-tables.json +165 -0
- package/dist/conformance-tests/goldens/dumpTable/table1.json +12 -0
- package/dist/conformance-tests/goldens/tableCfgs.json +99 -0
- package/dist/conformance-tests/io-conformance.setup.ts +30 -0
- package/dist/conformance-tests/io-conformance.spec.ts +891 -0
- package/dist/conformance-tests/scripts/install-conformance-tests.js +103 -0
- package/dist/io-test-setup.d.ts +1 -1
- package/dist/io.js +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_hash": "h9UNtoBx3lvHU4yzAyz10M",
|
|
3
|
+
"tableCfgs": {
|
|
4
|
+
"_data": [
|
|
5
|
+
{
|
|
6
|
+
"_hash": "oS4O57K1hbZY9hQzRID9nO",
|
|
7
|
+
"key": "tableCfgs",
|
|
8
|
+
"type": "ingredients",
|
|
9
|
+
"isHead": false,
|
|
10
|
+
"isRoot": false,
|
|
11
|
+
"isShared": true,
|
|
12
|
+
"previous": "",
|
|
13
|
+
"columns": [
|
|
14
|
+
{
|
|
15
|
+
"key": "_hash",
|
|
16
|
+
"type": "string",
|
|
17
|
+
"_hash": "df4oYftB-71Njv9FprRCeg"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"key": "key",
|
|
21
|
+
"type": "string",
|
|
22
|
+
"_hash": "tapEY-QdaJwWhz1PPZoG35"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"key": "type",
|
|
26
|
+
"type": "string",
|
|
27
|
+
"_hash": "zE7ALsNzu5JPgDD4AxeRCh"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"key": "isHead",
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"_hash": "ar8Hajt2UZDn-F21QLMyC_"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"key": "isRoot",
|
|
36
|
+
"type": "boolean",
|
|
37
|
+
"_hash": "hedsCm_HtiiTuzJyTeMqhm"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"key": "isShared",
|
|
41
|
+
"type": "boolean",
|
|
42
|
+
"_hash": "pxXOf3-3qCo9Z3FzC9JXSH"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"key": "previous",
|
|
46
|
+
"type": "string",
|
|
47
|
+
"_hash": "e0TEeDmSvJcLEMtrVxc0oW"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"key": "columns",
|
|
51
|
+
"type": "jsonArray",
|
|
52
|
+
"_hash": "aPmGTcNng9E1RvlEj1LtxB"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"key": "revisions",
|
|
58
|
+
"type": "ingredients",
|
|
59
|
+
"isHead": true,
|
|
60
|
+
"isRoot": true,
|
|
61
|
+
"isShared": false,
|
|
62
|
+
"columns": [
|
|
63
|
+
{
|
|
64
|
+
"key": "_hash",
|
|
65
|
+
"type": "string",
|
|
66
|
+
"_hash": "df4oYftB-71Njv9FprRCeg"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"key": "table",
|
|
70
|
+
"type": "string",
|
|
71
|
+
"_hash": "FmsYjsit04XJi02Sihdwl-"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"key": "predecessor",
|
|
75
|
+
"type": "string",
|
|
76
|
+
"_hash": "RlAk7Lj-lZf2KDlUk5fekZ"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"key": "successor",
|
|
80
|
+
"type": "string",
|
|
81
|
+
"_hash": "MJlFtQVty5oUJKVzzj5hyB"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"key": "timestamp",
|
|
85
|
+
"type": "number",
|
|
86
|
+
"_hash": "XpKYGh23thW6vONgQuoMHf"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"key": "id",
|
|
90
|
+
"type": "string",
|
|
91
|
+
"_hash": "eq2P3RIaSgy81i7PomNUvn"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"_hash": "CubBZQUGTMLa5wMqqzHLXz"
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"_tableCfg": "oS4O57K1hbZY9hQzRID9nO",
|
|
98
|
+
"_hash": "elFe1LT7JfBOyJnhHO1nm2"
|
|
99
|
+
},
|
|
100
|
+
"revisions": {
|
|
101
|
+
"_data": [],
|
|
102
|
+
"_tableCfg": "CubBZQUGTMLa5wMqqzHLXz",
|
|
103
|
+
"_hash": "dppr2oAzB9-npmA3E7ZLNI"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_hash": "h9UNtoBx3lvHU4yzAyz10M",
|
|
3
|
+
"tableCfgs": {
|
|
4
|
+
"_data": [
|
|
5
|
+
{
|
|
6
|
+
"_hash": "oS4O57K1hbZY9hQzRID9nO",
|
|
7
|
+
"key": "tableCfgs",
|
|
8
|
+
"type": "ingredients",
|
|
9
|
+
"isHead": false,
|
|
10
|
+
"isRoot": false,
|
|
11
|
+
"isShared": true,
|
|
12
|
+
"previous": "",
|
|
13
|
+
"columns": [
|
|
14
|
+
{
|
|
15
|
+
"key": "_hash",
|
|
16
|
+
"type": "string",
|
|
17
|
+
"_hash": "df4oYftB-71Njv9FprRCeg"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"key": "key",
|
|
21
|
+
"type": "string",
|
|
22
|
+
"_hash": "tapEY-QdaJwWhz1PPZoG35"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"key": "type",
|
|
26
|
+
"type": "string",
|
|
27
|
+
"_hash": "zE7ALsNzu5JPgDD4AxeRCh"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"key": "isHead",
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"_hash": "ar8Hajt2UZDn-F21QLMyC_"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"key": "isRoot",
|
|
36
|
+
"type": "boolean",
|
|
37
|
+
"_hash": "hedsCm_HtiiTuzJyTeMqhm"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"key": "isShared",
|
|
41
|
+
"type": "boolean",
|
|
42
|
+
"_hash": "pxXOf3-3qCo9Z3FzC9JXSH"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"key": "previous",
|
|
46
|
+
"type": "string",
|
|
47
|
+
"_hash": "e0TEeDmSvJcLEMtrVxc0oW"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"key": "columns",
|
|
51
|
+
"type": "jsonArray",
|
|
52
|
+
"_hash": "aPmGTcNng9E1RvlEj1LtxB"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"key": "revisions",
|
|
58
|
+
"type": "ingredients",
|
|
59
|
+
"isHead": true,
|
|
60
|
+
"isRoot": true,
|
|
61
|
+
"isShared": false,
|
|
62
|
+
"columns": [
|
|
63
|
+
{
|
|
64
|
+
"key": "_hash",
|
|
65
|
+
"type": "string",
|
|
66
|
+
"_hash": "df4oYftB-71Njv9FprRCeg"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"key": "table",
|
|
70
|
+
"type": "string",
|
|
71
|
+
"_hash": "FmsYjsit04XJi02Sihdwl-"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"key": "predecessor",
|
|
75
|
+
"type": "string",
|
|
76
|
+
"_hash": "RlAk7Lj-lZf2KDlUk5fekZ"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"key": "successor",
|
|
80
|
+
"type": "string",
|
|
81
|
+
"_hash": "MJlFtQVty5oUJKVzzj5hyB"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"key": "timestamp",
|
|
85
|
+
"type": "number",
|
|
86
|
+
"_hash": "XpKYGh23thW6vONgQuoMHf"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"key": "id",
|
|
90
|
+
"type": "string",
|
|
91
|
+
"_hash": "eq2P3RIaSgy81i7PomNUvn"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"_hash": "CubBZQUGTMLa5wMqqzHLXz"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"key": "table1",
|
|
98
|
+
"columns": [
|
|
99
|
+
{
|
|
100
|
+
"key": "_hash",
|
|
101
|
+
"type": "string",
|
|
102
|
+
"_hash": "df4oYftB-71Njv9FprRCeg"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"key": "a",
|
|
106
|
+
"type": "string",
|
|
107
|
+
"_hash": "4sOy83iAANZEj6_Lmlg0d3"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"key": "b",
|
|
111
|
+
"type": "number",
|
|
112
|
+
"_hash": "dHYaVsRiXeP_WY7Qrd5Y8J"
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"type": "ingredients",
|
|
116
|
+
"isHead": true,
|
|
117
|
+
"isRoot": true,
|
|
118
|
+
"isShared": false,
|
|
119
|
+
"_hash": "LM5fm8eNChH3kE3D38X0Fa"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"key": "table2",
|
|
123
|
+
"columns": [
|
|
124
|
+
{
|
|
125
|
+
"key": "_hash",
|
|
126
|
+
"type": "string",
|
|
127
|
+
"_hash": "df4oYftB-71Njv9FprRCeg"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"key": "a",
|
|
131
|
+
"type": "string",
|
|
132
|
+
"_hash": "4sOy83iAANZEj6_Lmlg0d3"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"key": "b",
|
|
136
|
+
"type": "number",
|
|
137
|
+
"_hash": "dHYaVsRiXeP_WY7Qrd5Y8J"
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
"type": "ingredients",
|
|
141
|
+
"isHead": true,
|
|
142
|
+
"isRoot": true,
|
|
143
|
+
"isShared": false,
|
|
144
|
+
"_hash": "GGPEyV5H-4C3fZr_emK8iC"
|
|
145
|
+
}
|
|
146
|
+
],
|
|
147
|
+
"_tableCfg": "oS4O57K1hbZY9hQzRID9nO",
|
|
148
|
+
"_hash": "elFe1LT7JfBOyJnhHO1nm2"
|
|
149
|
+
},
|
|
150
|
+
"revisions": {
|
|
151
|
+
"_data": [],
|
|
152
|
+
"_tableCfg": "CubBZQUGTMLa5wMqqzHLXz",
|
|
153
|
+
"_hash": "dppr2oAzB9-npmA3E7ZLNI"
|
|
154
|
+
},
|
|
155
|
+
"table1": {
|
|
156
|
+
"_data": [],
|
|
157
|
+
"_tableCfg": "LM5fm8eNChH3kE3D38X0Fa",
|
|
158
|
+
"_hash": "jpM5ZNlmmoojoYcdPN7htq"
|
|
159
|
+
},
|
|
160
|
+
"table2": {
|
|
161
|
+
"_data": [],
|
|
162
|
+
"_tableCfg": "GGPEyV5H-4C3fZr_emK8iC",
|
|
163
|
+
"_hash": "yCGKKwr92WWo7rdRSUzon9"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tableCfgs": {
|
|
3
|
+
"_data": [
|
|
4
|
+
{
|
|
5
|
+
"_hash": "oS4O57K1hbZY9hQzRID9nO",
|
|
6
|
+
"key": "tableCfgs",
|
|
7
|
+
"type": "ingredients",
|
|
8
|
+
"isHead": false,
|
|
9
|
+
"isRoot": false,
|
|
10
|
+
"isShared": true,
|
|
11
|
+
"previous": "",
|
|
12
|
+
"columns": [
|
|
13
|
+
{
|
|
14
|
+
"key": "_hash",
|
|
15
|
+
"type": "string",
|
|
16
|
+
"_hash": "df4oYftB-71Njv9FprRCeg"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"key": "key",
|
|
20
|
+
"type": "string",
|
|
21
|
+
"_hash": "tapEY-QdaJwWhz1PPZoG35"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"key": "type",
|
|
25
|
+
"type": "string",
|
|
26
|
+
"_hash": "zE7ALsNzu5JPgDD4AxeRCh"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"key": "isHead",
|
|
30
|
+
"type": "boolean",
|
|
31
|
+
"_hash": "ar8Hajt2UZDn-F21QLMyC_"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"key": "isRoot",
|
|
35
|
+
"type": "boolean",
|
|
36
|
+
"_hash": "hedsCm_HtiiTuzJyTeMqhm"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"key": "isShared",
|
|
40
|
+
"type": "boolean",
|
|
41
|
+
"_hash": "pxXOf3-3qCo9Z3FzC9JXSH"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"key": "previous",
|
|
45
|
+
"type": "string",
|
|
46
|
+
"_hash": "e0TEeDmSvJcLEMtrVxc0oW"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"key": "columns",
|
|
50
|
+
"type": "jsonArray",
|
|
51
|
+
"_hash": "aPmGTcNng9E1RvlEj1LtxB"
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"key": "revisions",
|
|
57
|
+
"type": "ingredients",
|
|
58
|
+
"isHead": true,
|
|
59
|
+
"isRoot": true,
|
|
60
|
+
"isShared": false,
|
|
61
|
+
"columns": [
|
|
62
|
+
{
|
|
63
|
+
"key": "_hash",
|
|
64
|
+
"type": "string",
|
|
65
|
+
"_hash": "df4oYftB-71Njv9FprRCeg"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"key": "table",
|
|
69
|
+
"type": "string",
|
|
70
|
+
"_hash": "FmsYjsit04XJi02Sihdwl-"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"key": "predecessor",
|
|
74
|
+
"type": "string",
|
|
75
|
+
"_hash": "RlAk7Lj-lZf2KDlUk5fekZ"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"key": "successor",
|
|
79
|
+
"type": "string",
|
|
80
|
+
"_hash": "MJlFtQVty5oUJKVzzj5hyB"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"key": "timestamp",
|
|
84
|
+
"type": "number",
|
|
85
|
+
"_hash": "XpKYGh23thW6vONgQuoMHf"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"key": "id",
|
|
89
|
+
"type": "string",
|
|
90
|
+
"_hash": "eq2P3RIaSgy81i7PomNUvn"
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"_hash": "CubBZQUGTMLa5wMqqzHLXz"
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"_tableCfg": "oS4O57K1hbZY9hQzRID9nO",
|
|
97
|
+
"_hash": "elFe1LT7JfBOyJnhHO1nm2"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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 init(): Promise<void> {
|
|
12
|
+
this._io = await IoMem.example();
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async tearDown(): Promise<void> {
|
|
16
|
+
await this.io.close();
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
get io(): Io {
|
|
20
|
+
if (!this._io) {
|
|
21
|
+
throw new Error('Call init() before accessing io');
|
|
22
|
+
}
|
|
23
|
+
return this._io;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
private _io: Io | null = null;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// .............................................................................
|
|
30
|
+
export const testSetup = () => new MyIoTestSetup();
|