@wirecat/cli-core 0.720.0 → 0.721.0
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/CHANGELOG.md +36 -0
- package/dist/background/daily-archive-timer.d.ts +1 -1
- package/dist/cli/config-command.js +8 -2
- package/dist/cli/config-issues.d.ts +3 -1
- package/dist/cli/config-issues.js +9 -2
- package/dist/cli/documents/file-conflicts.d.ts +25 -0
- package/dist/cli/documents/file-conflicts.js +102 -0
- package/dist/cli/documents/file-edit.d.ts +29 -0
- package/dist/cli/documents/file-edit.js +352 -0
- package/dist/cli/documents/file-update.d.ts +43 -0
- package/dist/cli/documents/file-update.js +95 -0
- package/dist/cli/documents/history.d.ts +34 -0
- package/dist/cli/documents/history.js +89 -0
- package/dist/cli/documents/index.d.ts +9 -2
- package/dist/cli/documents/index.js +9 -2
- package/dist/cli/documents/library.js +10 -0
- package/dist/cli/permission-keys.d.ts +6 -0
- package/dist/cli/permission-keys.js +15 -3
- package/dist/cli/service-api.d.ts +1 -1
- package/dist/cli/service-api.js +16 -34
- package/dist/documents/file-mirror-model.d.ts +18 -1
- package/dist/documents/index.d.ts +7 -4
- package/dist/documents/index.js +4 -1
- package/dist/documents/model.d.ts +16 -1
- package/dist/errors/reasons.js +4 -0
- package/dist/services/documents/block-diff.d.ts +13 -3
- package/dist/services/documents/block-diff.js +13 -7
- package/dist/services/documents/ingestion.d.ts +21 -2
- package/dist/services/documents/ingestion.js +29 -2
- package/dist/services/documents/plan.js +16 -7
- package/dist/services/documents/ports.d.ts +2 -0
- package/dist/services/documents/sync.d.ts +1 -0
- package/dist/services/documents/sync.js +9 -4
- package/dist/services/files/conflicts.d.ts +78 -0
- package/dist/services/files/conflicts.js +183 -0
- package/dist/services/files/guarded-write.d.ts +34 -0
- package/dist/services/files/guarded-write.js +42 -0
- package/dist/services/files/listing.d.ts +8 -0
- package/dist/services/files/listing.js +1 -1
- package/dist/services/files/local-files.d.ts +54 -0
- package/dist/services/files/local-files.js +143 -0
- package/dist/services/files/mirror-state.d.ts +14 -0
- package/dist/services/files/mirror-state.js +65 -0
- package/dist/services/files/mirror.d.ts +3 -13
- package/dist/services/files/mirror.js +163 -204
- package/dist/services/files/text-merge.d.ts +27 -0
- package/dist/services/files/text-merge.js +134 -0
- package/dist/services/files/versions.d.ts +36 -9
- package/dist/services/files/versions.js +40 -12
- package/dist/services/metadata.d.ts +1 -1
- package/dist/store/index.d.ts +1 -0
- package/dist/store/index.js +1 -0
- package/dist/store/sqlite/document-history.d.ts +84 -0
- package/dist/store/sqlite/document-history.js +158 -0
- package/dist/store/sqlite/manifest.js +2 -0
- package/dist/store/sqlite/migrations.generated.js +17 -0
- package/dist/store/sqlite/notes.d.ts +9 -10
- package/dist/store/sqlite/notes.js +33 -21
- package/dist/store/sqlite/schema/document-changes.d.ts +136 -0
- package/dist/store/sqlite/schema/document-changes.js +11 -0
- package/dist/store/sqlite/schema.d.ts +65 -0
- package/dist/store/sqlite/schema.js +5 -0
- package/package.json +2 -2
|
@@ -9,6 +9,7 @@ import { assertMayWithdraw } from "../decisions.js";
|
|
|
9
9
|
import { fold } from "../normalize.js";
|
|
10
10
|
import { ulid } from "../ulid.js";
|
|
11
11
|
import { ownerPerson } from "./actors.js";
|
|
12
|
+
import { documentHistoryOver, keepRevision, logDocumentChange, removeDocument } from "./document-history.js";
|
|
12
13
|
import { encodeDocumentMetadata, languageOf } from "./document-metadata.js";
|
|
13
14
|
import { deleteDocumentRow, forgetEvidenceToRow } from "./evidence-signature.js";
|
|
14
15
|
import { fileNoteRow } from "./file-note.js";
|
|
@@ -33,13 +34,7 @@ const iso = (value) => new Date(Number(value)).toISOString();
|
|
|
33
34
|
const optionalIso = (value) => (value == null ? null : iso(value));
|
|
34
35
|
/** What a link's written target is matched by: case, accents and a leading `@` do not count. */
|
|
35
36
|
export const targetKey = (text) => fold(text).trim().replace(/^@/, "");
|
|
36
|
-
|
|
37
|
-
* Keeps a document's text under its current revision before the caller writes the new text with `revision + 1`, so
|
|
38
|
-
* a citation reads back the words it cited and the source check sees the change.
|
|
39
|
-
*/
|
|
40
|
-
export const keepRevision = (database, row, at) => database
|
|
41
|
-
.prepare("INSERT INTO document_revisions (document_id, body, revision, created_at) VALUES (?, ?, ?, ?)")
|
|
42
|
-
.run(Number(row.id), String(row.body ?? ""), Number(row.revision), at);
|
|
37
|
+
export { keepRevision };
|
|
43
38
|
export const documentOf = (row) => ({
|
|
44
39
|
id: String(row.id),
|
|
45
40
|
ref: `document:${row.id}`,
|
|
@@ -345,6 +340,7 @@ export const notesStoreOver = (context) => {
|
|
|
345
340
|
path,
|
|
346
341
|
});
|
|
347
342
|
return {
|
|
343
|
+
...documentHistoryOver(context),
|
|
348
344
|
addFolder: async ({ name, format = "obsidian" }) => {
|
|
349
345
|
const at = now();
|
|
350
346
|
const checked = oneOf(format, NOTE_FORMATS, "a folder's format");
|
|
@@ -394,10 +390,12 @@ export const notesStoreOver = (context) => {
|
|
|
394
390
|
if (candidates.length === 1) {
|
|
395
391
|
const id = candidates[0];
|
|
396
392
|
const joined = documentRow(String(id));
|
|
397
|
-
if (joined.deleted_at != null)
|
|
393
|
+
if (joined.deleted_at != null) {
|
|
398
394
|
database
|
|
399
|
-
.prepare("UPDATE documents SET deleted_at = NULL, body = ?, updated_at = ? WHERE id = ?")
|
|
395
|
+
.prepare("UPDATE documents SET deleted_at = NULL, removal = NULL, body = ?, updated_at = ? WHERE id = ?")
|
|
400
396
|
.run(text, at, id);
|
|
397
|
+
logDocumentChange(database, id, "restored", at);
|
|
398
|
+
}
|
|
401
399
|
syncFile(database, at, id, { place: here, method: "content-hash" });
|
|
402
400
|
followPreferred(id, at);
|
|
403
401
|
return { note: noteAt(id, folder, path), changed: true };
|
|
@@ -415,6 +413,7 @@ export const notesStoreOver = (context) => {
|
|
|
415
413
|
"VALUES (?, ?, 'file', ?, ?, ?, ?, 'local', ?, ?, ?, 'text', ?, ?, 1, ?, ?) RETURNING id")
|
|
416
414
|
.get(folder, path, title, location, fileName, extension, hash, frontMatter, text, metadata, language, at, at);
|
|
417
415
|
const id = Number(row?.id);
|
|
416
|
+
logDocumentChange(database, id, "added", at);
|
|
418
417
|
const file = syncFile(database, at, id);
|
|
419
418
|
if (candidates.length > 1 && file)
|
|
420
419
|
reviewLink(database, { type: "file", id: file.id }, "document", candidates, "content-hash", at);
|
|
@@ -432,12 +431,25 @@ export const notesStoreOver = (context) => {
|
|
|
432
431
|
(found.content_hash ?? null) === hash &&
|
|
433
432
|
found.deleted_at == null;
|
|
434
433
|
if (!same) {
|
|
435
|
-
|
|
434
|
+
const back = found.deleted_at != null;
|
|
435
|
+
// A catalog entry has no text until its first read: that read adds the document.
|
|
436
|
+
const unread = found.body == null;
|
|
437
|
+
const revised = (found.body ?? "") !== text ||
|
|
438
|
+
(found.title ?? null) !== title ||
|
|
439
|
+
(found.front_matter ?? null) !== keptFrontMatter;
|
|
440
|
+
// A removed document whose last text was already kept holds only a blank body.
|
|
441
|
+
if (revised && !unread && !(back && (found.body ?? "") === ""))
|
|
436
442
|
keepRevision(database, found, at);
|
|
437
443
|
database
|
|
438
444
|
.prepare("UPDATE documents SET title = ?, body = ?, front_matter = ?, content_hash = ?, metadata = ?, language = ?, " +
|
|
439
|
-
"revision = revision + ?, updated_at = ?, deleted_at = NULL WHERE id = ?")
|
|
440
|
-
.run(title, text, keptFrontMatter, hash, keptMetadata, language,
|
|
445
|
+
"revision = revision + ?, updated_at = ?, deleted_at = NULL, removal = NULL WHERE id = ?")
|
|
446
|
+
.run(title, text, keptFrontMatter, hash, keptMetadata, language, revised && !unread ? 1 : 0, at, id);
|
|
447
|
+
if (back)
|
|
448
|
+
logDocumentChange(database, id, "restored", at);
|
|
449
|
+
else if (unread)
|
|
450
|
+
logDocumentChange(database, id, "added", at);
|
|
451
|
+
else if (revised)
|
|
452
|
+
logDocumentChange(database, id, "changed", at);
|
|
441
453
|
}
|
|
442
454
|
syncFile(database, at, id, own ? {} : { place: here });
|
|
443
455
|
if (!same)
|
|
@@ -491,19 +503,21 @@ export const notesStoreOver = (context) => {
|
|
|
491
503
|
return noteAt(id, folder, target);
|
|
492
504
|
}),
|
|
493
505
|
dateFileNotes: async (folderId, dates) => write(database, () => dateFileNotes(database, Number(folderRow(folderId, true).id), dates)),
|
|
494
|
-
deleteFileNotes: async (folderId, paths) => write(database, () => {
|
|
506
|
+
deleteFileNotes: async (folderId, paths, reason = "deleted") => write(database, () => {
|
|
495
507
|
const folder = Number(folderRow(folderId, true).id);
|
|
496
508
|
let deleted = 0;
|
|
497
509
|
for (const path of paths) {
|
|
498
510
|
const at = now();
|
|
499
511
|
const place = fileAt(folder, path, true);
|
|
500
512
|
if (!place) {
|
|
501
|
-
const
|
|
502
|
-
.prepare("
|
|
503
|
-
.all(
|
|
504
|
-
for (const row of
|
|
513
|
+
const live = database
|
|
514
|
+
.prepare("SELECT id FROM documents WHERE account_id = ? AND external_id = ? AND deleted_at IS NULL")
|
|
515
|
+
.all(folder, path);
|
|
516
|
+
for (const row of live) {
|
|
517
|
+
removeDocument(database, Number(row.id), at, reason);
|
|
505
518
|
syncFile(database, at, Number(row.id), { seen: false });
|
|
506
|
-
|
|
519
|
+
}
|
|
520
|
+
deleted += live.length;
|
|
507
521
|
continue;
|
|
508
522
|
}
|
|
509
523
|
database.prepare("UPDATE files SET deleted_at = ?, updated_at = ? WHERE id = ?").run(at, at, Number(place.id));
|
|
@@ -518,9 +532,7 @@ export const notesStoreOver = (context) => {
|
|
|
518
532
|
if (elsewhere)
|
|
519
533
|
followPreferred(id, at);
|
|
520
534
|
else
|
|
521
|
-
database
|
|
522
|
-
.prepare("UPDATE documents SET deleted_at = ?, body = '' WHERE id = ? AND deleted_at IS NULL")
|
|
523
|
-
.run(at, id);
|
|
535
|
+
removeDocument(database, id, at, reason);
|
|
524
536
|
}
|
|
525
537
|
return deleted;
|
|
526
538
|
}),
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
export declare const documentChanges: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
2
|
+
name: "document_changes";
|
|
3
|
+
schema: undefined;
|
|
4
|
+
columns: {
|
|
5
|
+
id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
6
|
+
name: string;
|
|
7
|
+
tableName: "document_changes";
|
|
8
|
+
dataType: "number int53";
|
|
9
|
+
data: number;
|
|
10
|
+
driverParam: number;
|
|
11
|
+
notNull: true;
|
|
12
|
+
hasDefault: true;
|
|
13
|
+
isPrimaryKey: true;
|
|
14
|
+
isAutoincrement: false;
|
|
15
|
+
hasRuntimeDefault: false;
|
|
16
|
+
enumValues: undefined;
|
|
17
|
+
baseColumn: never;
|
|
18
|
+
identity: undefined;
|
|
19
|
+
generated: undefined;
|
|
20
|
+
}, {}>;
|
|
21
|
+
accountId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
22
|
+
name: string;
|
|
23
|
+
tableName: "document_changes";
|
|
24
|
+
dataType: "number int53";
|
|
25
|
+
data: number;
|
|
26
|
+
driverParam: number;
|
|
27
|
+
notNull: true;
|
|
28
|
+
hasDefault: false;
|
|
29
|
+
isPrimaryKey: false;
|
|
30
|
+
isAutoincrement: false;
|
|
31
|
+
hasRuntimeDefault: false;
|
|
32
|
+
enumValues: undefined;
|
|
33
|
+
baseColumn: never;
|
|
34
|
+
identity: undefined;
|
|
35
|
+
generated: undefined;
|
|
36
|
+
}, {}>;
|
|
37
|
+
documentId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
38
|
+
name: string;
|
|
39
|
+
tableName: "document_changes";
|
|
40
|
+
dataType: "number int53";
|
|
41
|
+
data: number;
|
|
42
|
+
driverParam: number;
|
|
43
|
+
notNull: true;
|
|
44
|
+
hasDefault: false;
|
|
45
|
+
isPrimaryKey: false;
|
|
46
|
+
isAutoincrement: false;
|
|
47
|
+
hasRuntimeDefault: false;
|
|
48
|
+
enumValues: undefined;
|
|
49
|
+
baseColumn: never;
|
|
50
|
+
identity: undefined;
|
|
51
|
+
generated: undefined;
|
|
52
|
+
}, {}>;
|
|
53
|
+
path: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
54
|
+
name: string;
|
|
55
|
+
tableName: "document_changes";
|
|
56
|
+
dataType: "string";
|
|
57
|
+
data: string;
|
|
58
|
+
driverParam: string;
|
|
59
|
+
notNull: true;
|
|
60
|
+
hasDefault: false;
|
|
61
|
+
isPrimaryKey: false;
|
|
62
|
+
isAutoincrement: false;
|
|
63
|
+
hasRuntimeDefault: false;
|
|
64
|
+
enumValues: [string, ...string[]];
|
|
65
|
+
baseColumn: never;
|
|
66
|
+
identity: undefined;
|
|
67
|
+
generated: undefined;
|
|
68
|
+
}, {}>;
|
|
69
|
+
title: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
70
|
+
name: string;
|
|
71
|
+
tableName: "document_changes";
|
|
72
|
+
dataType: "string";
|
|
73
|
+
data: string;
|
|
74
|
+
driverParam: string;
|
|
75
|
+
notNull: false;
|
|
76
|
+
hasDefault: false;
|
|
77
|
+
isPrimaryKey: false;
|
|
78
|
+
isAutoincrement: false;
|
|
79
|
+
hasRuntimeDefault: false;
|
|
80
|
+
enumValues: [string, ...string[]];
|
|
81
|
+
baseColumn: never;
|
|
82
|
+
identity: undefined;
|
|
83
|
+
generated: undefined;
|
|
84
|
+
}, {}>;
|
|
85
|
+
event: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
86
|
+
name: string;
|
|
87
|
+
tableName: "document_changes";
|
|
88
|
+
dataType: "string";
|
|
89
|
+
data: string;
|
|
90
|
+
driverParam: string;
|
|
91
|
+
notNull: true;
|
|
92
|
+
hasDefault: false;
|
|
93
|
+
isPrimaryKey: false;
|
|
94
|
+
isAutoincrement: false;
|
|
95
|
+
hasRuntimeDefault: false;
|
|
96
|
+
enumValues: [string, ...string[]];
|
|
97
|
+
baseColumn: never;
|
|
98
|
+
identity: undefined;
|
|
99
|
+
generated: undefined;
|
|
100
|
+
}, {}>;
|
|
101
|
+
revision: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
102
|
+
name: string;
|
|
103
|
+
tableName: "document_changes";
|
|
104
|
+
dataType: "number int53";
|
|
105
|
+
data: number;
|
|
106
|
+
driverParam: number;
|
|
107
|
+
notNull: true;
|
|
108
|
+
hasDefault: false;
|
|
109
|
+
isPrimaryKey: false;
|
|
110
|
+
isAutoincrement: false;
|
|
111
|
+
hasRuntimeDefault: false;
|
|
112
|
+
enumValues: undefined;
|
|
113
|
+
baseColumn: never;
|
|
114
|
+
identity: undefined;
|
|
115
|
+
generated: undefined;
|
|
116
|
+
}, {}>;
|
|
117
|
+
at: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
118
|
+
name: string;
|
|
119
|
+
tableName: "document_changes";
|
|
120
|
+
dataType: "number int53";
|
|
121
|
+
data: number;
|
|
122
|
+
driverParam: number;
|
|
123
|
+
notNull: true;
|
|
124
|
+
hasDefault: false;
|
|
125
|
+
isPrimaryKey: false;
|
|
126
|
+
isAutoincrement: false;
|
|
127
|
+
hasRuntimeDefault: false;
|
|
128
|
+
enumValues: undefined;
|
|
129
|
+
baseColumn: never;
|
|
130
|
+
identity: undefined;
|
|
131
|
+
generated: undefined;
|
|
132
|
+
}, {}>;
|
|
133
|
+
};
|
|
134
|
+
dialect: 'sqlite';
|
|
135
|
+
isAlias: false;
|
|
136
|
+
}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { index, integer, sqliteTable, text } from "../drizzle/core.js";
|
|
2
|
+
export const documentChanges = sqliteTable("document_changes", {
|
|
3
|
+
id: integer("id").primaryKey(),
|
|
4
|
+
accountId: integer("account_id").notNull(),
|
|
5
|
+
documentId: integer("document_id").notNull(),
|
|
6
|
+
path: text("path").notNull(),
|
|
7
|
+
title: text("title"),
|
|
8
|
+
event: text("event").notNull(),
|
|
9
|
+
revision: integer("revision").notNull(),
|
|
10
|
+
at: integer("at").notNull(),
|
|
11
|
+
}, (table) => [index("document_changes_by_account_id_at").on(table.accountId, table.at)]);
|
|
@@ -7330,6 +7330,22 @@ export declare const documents: import("drizzle-orm/sqlite-core").SQLiteTableWit
|
|
|
7330
7330
|
identity: undefined;
|
|
7331
7331
|
generated: undefined;
|
|
7332
7332
|
}, {}>;
|
|
7333
|
+
removal: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
7334
|
+
name: string;
|
|
7335
|
+
tableName: "documents";
|
|
7336
|
+
dataType: "string";
|
|
7337
|
+
data: string;
|
|
7338
|
+
driverParam: string;
|
|
7339
|
+
notNull: false;
|
|
7340
|
+
hasDefault: false;
|
|
7341
|
+
isPrimaryKey: false;
|
|
7342
|
+
isAutoincrement: false;
|
|
7343
|
+
hasRuntimeDefault: false;
|
|
7344
|
+
enumValues: [string, ...string[]];
|
|
7345
|
+
baseColumn: never;
|
|
7346
|
+
identity: undefined;
|
|
7347
|
+
generated: undefined;
|
|
7348
|
+
}, {}>;
|
|
7333
7349
|
};
|
|
7334
7350
|
dialect: 'sqlite';
|
|
7335
7351
|
isAlias: false;
|
|
@@ -7746,10 +7762,59 @@ export declare const documentRevisions: import("drizzle-orm/sqlite-core").SQLite
|
|
|
7746
7762
|
identity: undefined;
|
|
7747
7763
|
generated: undefined;
|
|
7748
7764
|
}, {}>;
|
|
7765
|
+
title: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
7766
|
+
name: string;
|
|
7767
|
+
tableName: "document_revisions";
|
|
7768
|
+
dataType: "string";
|
|
7769
|
+
data: string;
|
|
7770
|
+
driverParam: string;
|
|
7771
|
+
notNull: false;
|
|
7772
|
+
hasDefault: false;
|
|
7773
|
+
isPrimaryKey: false;
|
|
7774
|
+
isAutoincrement: false;
|
|
7775
|
+
hasRuntimeDefault: false;
|
|
7776
|
+
enumValues: [string, ...string[]];
|
|
7777
|
+
baseColumn: never;
|
|
7778
|
+
identity: undefined;
|
|
7779
|
+
generated: undefined;
|
|
7780
|
+
}, {}>;
|
|
7781
|
+
frontMatter: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
7782
|
+
name: string;
|
|
7783
|
+
tableName: "document_revisions";
|
|
7784
|
+
dataType: "string";
|
|
7785
|
+
data: string;
|
|
7786
|
+
driverParam: string;
|
|
7787
|
+
notNull: false;
|
|
7788
|
+
hasDefault: false;
|
|
7789
|
+
isPrimaryKey: false;
|
|
7790
|
+
isAutoincrement: false;
|
|
7791
|
+
hasRuntimeDefault: false;
|
|
7792
|
+
enumValues: [string, ...string[]];
|
|
7793
|
+
baseColumn: never;
|
|
7794
|
+
identity: undefined;
|
|
7795
|
+
generated: undefined;
|
|
7796
|
+
}, {}>;
|
|
7797
|
+
reason: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
7798
|
+
name: string;
|
|
7799
|
+
tableName: "document_revisions";
|
|
7800
|
+
dataType: "string";
|
|
7801
|
+
data: string;
|
|
7802
|
+
driverParam: string;
|
|
7803
|
+
notNull: false;
|
|
7804
|
+
hasDefault: false;
|
|
7805
|
+
isPrimaryKey: false;
|
|
7806
|
+
isAutoincrement: false;
|
|
7807
|
+
hasRuntimeDefault: false;
|
|
7808
|
+
enumValues: [string, ...string[]];
|
|
7809
|
+
baseColumn: never;
|
|
7810
|
+
identity: undefined;
|
|
7811
|
+
generated: undefined;
|
|
7812
|
+
}, {}>;
|
|
7749
7813
|
};
|
|
7750
7814
|
dialect: 'sqlite';
|
|
7751
7815
|
isAlias: false;
|
|
7752
7816
|
}>;
|
|
7817
|
+
export { documentChanges } from "./schema/document-changes.js";
|
|
7753
7818
|
export { documentIndexPending } from "./schema/document-index-pending.js";
|
|
7754
7819
|
export declare const notes: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
7755
7820
|
name: "notes";
|
|
@@ -797,6 +797,7 @@ export const documents = sqliteTable("documents", {
|
|
|
797
797
|
updatedAt: integer("updated_at").notNull(),
|
|
798
798
|
deletedAt: integer("deleted_at"),
|
|
799
799
|
pinnedFileId: integer("pinned_file_id"),
|
|
800
|
+
removal: text("removal"),
|
|
800
801
|
}, (table) => [unique().on(table.accountId, table.externalId)]);
|
|
801
802
|
export const files = sqliteTable("files", {
|
|
802
803
|
id: integer("id").primaryKey(),
|
|
@@ -836,7 +837,11 @@ export const documentRevisions = sqliteTable("document_revisions", {
|
|
|
836
837
|
body: text("body").notNull(),
|
|
837
838
|
revision: integer("revision").notNull(),
|
|
838
839
|
createdAt: integer("created_at").notNull(),
|
|
840
|
+
title: text("title"),
|
|
841
|
+
frontMatter: text("front_matter"),
|
|
842
|
+
reason: text("reason"),
|
|
839
843
|
}, (table) => [index("document_revisions_by_document_id").on(table.documentId)]);
|
|
844
|
+
export { documentChanges } from "./schema/document-changes.js";
|
|
840
845
|
export { documentIndexPending } from "./schema/document-index-pending.js";
|
|
841
846
|
export const notes = sqliteTable("notes", {
|
|
842
847
|
id: integer("id").primaryKey(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/cli-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.721.0",
|
|
4
4
|
"description": "The messenger-neutral half of a messaging CLI: domain model, message locators, rendering, name resolution, the SQLite seam, the command skeleton and shared read commands, the send guard, run records and the message store",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Viacheslav Ptsarev",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"type": "module",
|
|
16
16
|
"wirecat": {
|
|
17
17
|
"store": {
|
|
18
|
-
"speaks":
|
|
18
|
+
"speaks": 72,
|
|
19
19
|
"minCompatible": 56
|
|
20
20
|
}
|
|
21
21
|
},
|