@rljson/rljson 0.0.64 → 0.0.65
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/example/bakery-example.d.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/{edit → insert}/insert.d.ts +1 -0
- package/dist/rljson.d.ts +1 -1
- package/dist/rljson.js +11 -9
- package/package.json +5 -5
- /package/dist/{edit → history}/history.d.ts +0 -0
- /package/dist/{edit → insert}/insert-validator.d.ts +0 -0
|
@@ -4,7 +4,7 @@ import { CakesTable } from '../content/cake.ts';
|
|
|
4
4
|
import { ComponentsTable } from '../content/components.ts';
|
|
5
5
|
import { LayersTable } from '../content/layer.ts';
|
|
6
6
|
import { SliceIdsTable } from '../content/slice-ids.ts';
|
|
7
|
-
import { History } from '../
|
|
7
|
+
import { History } from '../history/history.ts';
|
|
8
8
|
import { Rljson } from '../rljson.ts';
|
|
9
9
|
import { Ref } from '../typedefs.ts';
|
|
10
10
|
export interface Ingredient extends Json {
|
package/dist/index.d.ts
CHANGED
|
@@ -5,11 +5,11 @@ export * from './content/layer.ts';
|
|
|
5
5
|
export * from './content/revision.ts';
|
|
6
6
|
export * from './content/slice-ids.ts';
|
|
7
7
|
export * from './content/table-cfg.ts';
|
|
8
|
-
export * from './edit/history.ts';
|
|
9
|
-
export * from './edit/insert-validator.ts';
|
|
10
|
-
export * from './edit/insert.ts';
|
|
11
8
|
export * from './example.ts';
|
|
12
9
|
export * from './example/bakery-example.ts';
|
|
10
|
+
export * from './history/history.ts';
|
|
11
|
+
export * from './insert/insert-validator.ts';
|
|
12
|
+
export * from './insert/insert.ts';
|
|
13
13
|
export * from './rljson.ts';
|
|
14
14
|
export * from './route/route.ts';
|
|
15
15
|
export * from './tools/remove-duplicates.ts';
|
package/dist/rljson.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { LayersTable } from './content/layer.ts';
|
|
|
6
6
|
import { RevisionsTable } from './content/revision.ts';
|
|
7
7
|
import { SliceIdsTable } from './content/slice-ids.ts';
|
|
8
8
|
import { TableCfgRef, TablesCfgTable } from './content/table-cfg.ts';
|
|
9
|
-
import { History } from './
|
|
9
|
+
import { History } from './history/history.ts';
|
|
10
10
|
import { ContentType, Ref, TableKey } from './typedefs.ts';
|
|
11
11
|
export declare const reservedFieldNames: string[];
|
|
12
12
|
export declare const reservedTableKeys: string[];
|
package/dist/rljson.js
CHANGED
|
@@ -131,6 +131,7 @@ class Route {
|
|
|
131
131
|
const refKey = Object.keys(segment).find(
|
|
132
132
|
(k) => k.endsWith("Ref") && k !== "tableKey"
|
|
133
133
|
);
|
|
134
|
+
/* v8 ignore next -- @preserve */
|
|
134
135
|
if (refKey) {
|
|
135
136
|
return segment[refKey];
|
|
136
137
|
}
|
|
@@ -1244,6 +1245,12 @@ const validateInsert = (insert) => {
|
|
|
1244
1245
|
return InsertValidator.create(insert).validate();
|
|
1245
1246
|
};
|
|
1246
1247
|
// @license
|
|
1248
|
+
const exampleInsert = () => ({
|
|
1249
|
+
route: "a/b/c",
|
|
1250
|
+
command: "add",
|
|
1251
|
+
value: { x: { y: { z: true } } }
|
|
1252
|
+
});
|
|
1253
|
+
// @license
|
|
1247
1254
|
const reservedFieldNames = ["_data"];
|
|
1248
1255
|
const reservedTableKeys = [
|
|
1249
1256
|
"_hash",
|
|
@@ -1488,15 +1495,9 @@ class _BaseValidator {
|
|
|
1488
1495
|
throwOnWrongHashes: true
|
|
1489
1496
|
});
|
|
1490
1497
|
} catch (error) {
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
};
|
|
1495
|
-
} else {
|
|
1496
|
-
this.errors.hashesNotValid = {
|
|
1497
|
-
error: "Unknown error"
|
|
1498
|
-
};
|
|
1499
|
-
}
|
|
1498
|
+
this.errors.hashesNotValid = {
|
|
1499
|
+
error: error.message
|
|
1500
|
+
};
|
|
1500
1501
|
}
|
|
1501
1502
|
}
|
|
1502
1503
|
// ...........................................................................
|
|
@@ -2219,6 +2220,7 @@ export {
|
|
|
2219
2220
|
exampleCakesTable,
|
|
2220
2221
|
exampleComponentsTable,
|
|
2221
2222
|
exampleHistoryTable,
|
|
2223
|
+
exampleInsert,
|
|
2222
2224
|
exampleLayersTable,
|
|
2223
2225
|
exampleRevision,
|
|
2224
2226
|
exampleRljson,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rljson/rljson",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.65",
|
|
4
4
|
"description": "The RLJSON data format specification",
|
|
5
5
|
"homepage": "https://github.com/rljson/rljson",
|
|
6
6
|
"bugs": "https://github.com/rljson/rljson/issues",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@types/node": "^24.9.1",
|
|
24
24
|
"@typescript-eslint/eslint-plugin": "^8.46.2",
|
|
25
25
|
"@typescript-eslint/parser": "^8.46.2",
|
|
26
|
-
"@vitest/coverage-v8": "^
|
|
26
|
+
"@vitest/coverage-v8": "^4.0.1",
|
|
27
27
|
"cross-env": "^10.1.0",
|
|
28
28
|
"eslint": "^9.38.0",
|
|
29
29
|
"eslint-plugin-jsdoc": "^61.1.5",
|
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
"read-pkg": "^9.0.1",
|
|
34
34
|
"typescript": "~5.9.3",
|
|
35
35
|
"typescript-eslint": "^8.46.2",
|
|
36
|
-
"vite": "^7.1.
|
|
36
|
+
"vite": "^7.1.12",
|
|
37
37
|
"vite-node": "^3.2.4",
|
|
38
38
|
"vite-plugin-dts": "^4.5.4",
|
|
39
39
|
"vite-tsconfig-paths": "^5.1.4",
|
|
40
|
-
"vitest": "^
|
|
40
|
+
"vitest": "^4.0.1",
|
|
41
41
|
"vitest-dom": "^0.1.1"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@rljson/hash": "^0.0.
|
|
44
|
+
"@rljson/hash": "^0.0.17",
|
|
45
45
|
"@rljson/json": "^0.0.22",
|
|
46
46
|
"nanoid": "^5.1.6"
|
|
47
47
|
},
|
|
File without changes
|
|
File without changes
|