@rljson/rljson 0.0.55 → 0.0.58
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/edit/edit.d.ts +23 -0
- package/dist/edit/route.d.ts +6 -0
- package/dist/example/bakery-example.d.ts +2 -0
- package/dist/example.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/rljson.d.ts +2 -1
- package/dist/rljson.js +550 -486
- package/dist/src/example.ts +25 -1
- package/dist/typedefs.d.ts +1 -1
- package/package.json +23 -15
package/dist/src/example.ts
CHANGED
|
@@ -52,6 +52,10 @@ export class Example {
|
|
|
52
52
|
isRoot: false,
|
|
53
53
|
isShared: true,
|
|
54
54
|
columns: [
|
|
55
|
+
{
|
|
56
|
+
key: '_hash',
|
|
57
|
+
type: 'string',
|
|
58
|
+
},
|
|
55
59
|
{
|
|
56
60
|
key: 'int',
|
|
57
61
|
type: 'number',
|
|
@@ -94,7 +98,7 @@ export class Example {
|
|
|
94
98
|
table: {
|
|
95
99
|
_tableCfg: tableCfgs._data[0]._hash as string,
|
|
96
100
|
_type: 'components',
|
|
97
|
-
_data: [exampleJsonObject()],
|
|
101
|
+
_data: [hip(exampleJsonObject())],
|
|
98
102
|
_hash: '',
|
|
99
103
|
},
|
|
100
104
|
};
|
|
@@ -177,6 +181,26 @@ export class Example {
|
|
|
177
181
|
} as ComponentsTable<Json>,
|
|
178
182
|
};
|
|
179
183
|
},
|
|
184
|
+
multiSliceIdRef: (): Rljson => {
|
|
185
|
+
return {
|
|
186
|
+
exampleSliceId: {
|
|
187
|
+
_type: 'sliceIds',
|
|
188
|
+
_data: [
|
|
189
|
+
{
|
|
190
|
+
add: ['id0', 'id1'],
|
|
191
|
+
},
|
|
192
|
+
],
|
|
193
|
+
} as SliceIdsTable,
|
|
194
|
+
exampleComponent: {
|
|
195
|
+
_type: 'components',
|
|
196
|
+
_data: [
|
|
197
|
+
{
|
|
198
|
+
exampleSliceId: ['id0', 'id1'],
|
|
199
|
+
},
|
|
200
|
+
],
|
|
201
|
+
} as ComponentsTable<Json>,
|
|
202
|
+
};
|
|
203
|
+
},
|
|
180
204
|
singleNamedRef: (): Rljson => {
|
|
181
205
|
return {
|
|
182
206
|
tableA: {
|
package/dist/typedefs.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export type ColumnKey = JsonKey;
|
|
|
26
26
|
* - `ids` Tables containing slice ids
|
|
27
27
|
* - `components` Tables containing slice components
|
|
28
28
|
*/
|
|
29
|
-
export declare const contentTypes: readonly ["buffets", "cakes", "layers", "sliceIds", "components", "revisions", "tableCfgs"];
|
|
29
|
+
export declare const contentTypes: readonly ["buffets", "cakes", "layers", "sliceIds", "components", "revisions", "tableCfgs", "edits"];
|
|
30
30
|
export type ContentType = (typeof contentTypes)[number];
|
|
31
31
|
/**
|
|
32
32
|
* An example object using the typedefs
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rljson/rljson",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.58",
|
|
4
|
+
"packageManager": "pnpm@10.11.0",
|
|
4
5
|
"description": "The RLJSON data format specification",
|
|
5
6
|
"homepage": "https://github.com/rljson/rljson",
|
|
6
7
|
"bugs": "https://github.com/rljson/rljson/issues",
|
|
@@ -19,21 +20,29 @@
|
|
|
19
20
|
"dist"
|
|
20
21
|
],
|
|
21
22
|
"type": "module",
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "npx vite build && tsc && cp README* dist && mkdir dist/src && cp src/example.ts dist/src",
|
|
25
|
+
"test": "npx vitest run --coverage && npm run lint",
|
|
26
|
+
"prebuild": "npm run test",
|
|
27
|
+
"prepublishOnly": "npm run build && npm run test",
|
|
28
|
+
"lint": "npx eslint",
|
|
29
|
+
"updateGoldens": "cross-env UPDATE_GOLDENS=true npm test"
|
|
30
|
+
},
|
|
22
31
|
"devDependencies": {
|
|
23
|
-
"@types/node": "^24.
|
|
24
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
25
|
-
"@typescript-eslint/parser": "^8.
|
|
32
|
+
"@types/node": "^24.5.2",
|
|
33
|
+
"@typescript-eslint/eslint-plugin": "^8.44.1",
|
|
34
|
+
"@typescript-eslint/parser": "^8.44.1",
|
|
26
35
|
"@vitest/coverage-v8": "^3.2.4",
|
|
27
36
|
"cross-env": "^10.0.0",
|
|
28
|
-
"eslint": "^9.
|
|
29
|
-
"eslint-plugin-jsdoc": "^
|
|
37
|
+
"eslint": "^9.36.0",
|
|
38
|
+
"eslint-plugin-jsdoc": "^60.3.1",
|
|
30
39
|
"eslint-plugin-tsdoc": "^0.4.0",
|
|
31
40
|
"globals": "^16.4.0",
|
|
32
41
|
"jsdoc": "^4.0.4",
|
|
33
42
|
"read-pkg": "^9.0.1",
|
|
34
43
|
"typescript": "~5.9.2",
|
|
35
|
-
"typescript-eslint": "^8.
|
|
36
|
-
"vite": "^7.1.
|
|
44
|
+
"typescript-eslint": "^8.44.1",
|
|
45
|
+
"vite": "^7.1.7",
|
|
37
46
|
"vite-node": "^3.2.4",
|
|
38
47
|
"vite-plugin-dts": "^4.5.4",
|
|
39
48
|
"vite-tsconfig-paths": "^5.1.4",
|
|
@@ -44,11 +53,10 @@
|
|
|
44
53
|
"@rljson/hash": "^0.0.16",
|
|
45
54
|
"@rljson/json": "^0.0.21"
|
|
46
55
|
},
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"
|
|
52
|
-
"updateGoldens": "cross-env UPDATE_GOLDENS=true npm test"
|
|
56
|
+
"pnpm": {
|
|
57
|
+
"onlyBuiltDependencies": [
|
|
58
|
+
"esbuild"
|
|
59
|
+
],
|
|
60
|
+
"overrides": {}
|
|
53
61
|
}
|
|
54
|
-
}
|
|
62
|
+
}
|