@rljson/rljson 0.0.69 → 0.0.70
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-history.d.ts +12 -0
- package/dist/edit/edit.d.ts +16 -0
- package/dist/edit/multi-edit.d.ts +10 -0
- package/dist/rljson.d.ts +3 -1
- package/dist/rljson.js +1 -2
- package/dist/typedefs.d.ts +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Json } from '@rljson/json';
|
|
2
|
+
import { TableCfg } from '../content/table-cfg.ts';
|
|
3
|
+
import { RljsonTable } from '../rljson.ts';
|
|
4
|
+
export interface EditHistory extends Json {
|
|
5
|
+
timeId: string;
|
|
6
|
+
multiEditRef: string;
|
|
7
|
+
dataRef: string;
|
|
8
|
+
previous: string[];
|
|
9
|
+
_hash: string;
|
|
10
|
+
}
|
|
11
|
+
export type EditHistoryTable = RljsonTable<EditHistory, 'editHistory'>;
|
|
12
|
+
export declare const createEditHistoryTableCfg: (cakeKey: string) => TableCfg;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Json } from '@rljson/json';
|
|
2
|
+
import { TableCfg } from '../content/table-cfg.ts';
|
|
3
|
+
import { RljsonTable } from '../rljson.ts';
|
|
4
|
+
export interface EditAction extends Json {
|
|
5
|
+
name: string;
|
|
6
|
+
type: string;
|
|
7
|
+
data: Json;
|
|
8
|
+
_hash: string;
|
|
9
|
+
}
|
|
10
|
+
export interface Edit extends Json {
|
|
11
|
+
name: string;
|
|
12
|
+
action: EditAction;
|
|
13
|
+
_hash: string;
|
|
14
|
+
}
|
|
15
|
+
export type EditsTable = RljsonTable<Edit, 'edits'>;
|
|
16
|
+
export declare const createEditTableCfg: (cakeKey: string) => TableCfg;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Json } from '@rljson/json';
|
|
2
|
+
import { TableCfg } from '../content/table-cfg.ts';
|
|
3
|
+
import { RljsonTable } from '../rljson.ts';
|
|
4
|
+
export interface MultiEdit extends Json {
|
|
5
|
+
previous: string | null;
|
|
6
|
+
edit: string;
|
|
7
|
+
_hash: string;
|
|
8
|
+
}
|
|
9
|
+
export type MultiEditsTable = RljsonTable<MultiEdit, 'multiEdits'>;
|
|
10
|
+
export declare const createMultiEditTableCfg: (cakeKey: string) => TableCfg;
|
package/dist/rljson.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ 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 { EditsTable } from './edit/edit.ts';
|
|
10
|
+
import { MultiEditsTable } from './edit/multi-edit.ts';
|
|
9
11
|
import { InsertHistory } from './insertHistory/insertHistory.ts';
|
|
10
12
|
import { ContentType, Ref, TableKey } from './typedefs.ts';
|
|
11
13
|
export declare const reservedFieldNames: string[];
|
|
@@ -13,7 +15,7 @@ export declare const reservedTableKeys: string[];
|
|
|
13
15
|
/**
|
|
14
16
|
* One of the supported Rljson table types
|
|
15
17
|
*/
|
|
16
|
-
export type TableType = BuffetsTable | ComponentsTable<any> | LayersTable | SliceIdsTable | CakesTable | RevisionsTable | TablesCfgTable | InsertHistory<any
|
|
18
|
+
export type TableType = BuffetsTable | ComponentsTable<any> | LayersTable | SliceIdsTable | CakesTable | RevisionsTable | TablesCfgTable | InsertHistory<any> | EditsTable | MultiEditsTable;
|
|
17
19
|
/** The rljson data format */
|
|
18
20
|
export interface Rljson extends Json {
|
|
19
21
|
[tableId: TableKey]: TableType;
|
package/dist/rljson.js
CHANGED
|
@@ -1663,10 +1663,9 @@ const contentTypes = [
|
|
|
1663
1663
|
"revisions",
|
|
1664
1664
|
"tableCfgs",
|
|
1665
1665
|
"insertHistory",
|
|
1666
|
-
// Additional types for edits, implemented in DB
|
|
1667
1666
|
"edits",
|
|
1668
1667
|
"multiEdits",
|
|
1669
|
-
"
|
|
1668
|
+
"editHistory"
|
|
1670
1669
|
];
|
|
1671
1670
|
const exampleTypedefs = () => {
|
|
1672
1671
|
return {
|
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", "insertHistory", "edits", "multiEdits", "
|
|
29
|
+
export declare const contentTypes: readonly ["buffets", "cakes", "layers", "sliceIds", "components", "revisions", "tableCfgs", "insertHistory", "edits", "multiEdits", "editHistory"];
|
|
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,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rljson/rljson",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.70",
|
|
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,10 +23,10 @@
|
|
|
23
23
|
"@types/node": "^24.10.1",
|
|
24
24
|
"@typescript-eslint/eslint-plugin": "^8.46.4",
|
|
25
25
|
"@typescript-eslint/parser": "^8.46.4",
|
|
26
|
-
"@vitest/coverage-v8": "^4.0.
|
|
26
|
+
"@vitest/coverage-v8": "^4.0.9",
|
|
27
27
|
"cross-env": "^10.1.0",
|
|
28
28
|
"eslint": "^9.39.1",
|
|
29
|
-
"eslint-plugin-jsdoc": "^61.1
|
|
29
|
+
"eslint-plugin-jsdoc": "^61.2.1",
|
|
30
30
|
"eslint-plugin-tsdoc": "^0.5.0",
|
|
31
31
|
"globals": "^16.5.0",
|
|
32
32
|
"jsdoc": "^4.0.5",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"typescript": "~5.9.3",
|
|
35
35
|
"typescript-eslint": "^8.46.4",
|
|
36
36
|
"vite": "^7.2.2",
|
|
37
|
-
"vite-node": "^5.
|
|
37
|
+
"vite-node": "^5.1.0",
|
|
38
38
|
"vite-plugin-dts": "^4.5.4",
|
|
39
39
|
"vite-tsconfig-paths": "^5.1.4",
|
|
40
|
-
"vitest": "^4.0.
|
|
40
|
+
"vitest": "^4.0.9",
|
|
41
41
|
"vitest-dom": "^0.1.1"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|