Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
trilium backup container: drop the short name of the container format
Adorian Doranfcb726400e85
diff --git a/packages/trilium-backup-container/package.json b/packages/trilium-backup-container/package.jsonindex 6e1be9bc44..53142a86ef 100644--- a/packages/trilium-backup-container/package.json+++ b/packages/trilium-backup-container/package.json@@ -1,6 +1,6 @@{"name": "@triliumnext/backup-container",- "description": "Reader and writer for the Trilium `.tbak` backup container format: a SQLite database wrapped with optional gzip compression and optional AES-256-GCM encryption.",+ "description": "Reader and writer for the Trilium backup container format: a SQLite database wrapped with optional gzip compression and optional AES-256-GCM encryption.","license": "MIT","version": "1.0.0","type": "module",diff --git a/packages/trilium-backup-container/src/errors.ts b/packages/trilium-backup-container/src/errors.tsindex aa4ede958a..4d987c9ecf 100644--- a/packages/trilium-backup-container/src/errors.ts+++ b/packages/trilium-backup-container/src/errors.ts@@ -5,7 +5,7 @@* be selected from this reason instead, so that the module carries no translations.*/export type BackupContainerErrorReason =- /** The first bytes are not the container magic, i.e. this is not a `.tbak` file at all. */+ /** The first bytes are not the container magic, i.e. this is not a backup container at all. */| "not-a-container"/** Written by a newer version of the format than this reader implements. */| "unsupported-version"diff --git a/packages/trilium-backup-container/src/file-destination.spec.ts b/packages/trilium-backup-container/src/file-destination.spec.tsindex ee2e867fc8..d4322d03a3 100644--- a/packages/trilium-backup-container/src/file-destination.spec.ts+++ b/packages/trilium-backup-container/src/file-destination.spec.ts@@ -13,7 +13,7 @@ describe("file destination", () => {let directory = "";beforeAll(async () => {- directory = await mkdtemp(join(tmpdir(), "tbak-"));+ directory = await mkdtemp(join(tmpdir(), "backup-container-"));});afterAll(async () => {@@ -23,8 +23,8 @@ describe("file destination", () => {it("writes to a file, patches the digest, and reads back byte for byte", async () => {const database = fakeDatabase(3 * 1024 * 1024);const source = join(directory, "document.db");- const partial = join(directory, "backup.tbak.part");- const container = join(directory, "backup.tbak");+ const partial = join(directory, "backup.part");+ const container = join(directory, "backup");const restored = join(directory, "restored.db");await writeFile(source, database);diff --git a/packages/trilium-backup-container/src/index.ts b/packages/trilium-backup-container/src/index.tsindex 3a00b5874a..a7380e940a 100644--- a/packages/trilium-backup-container/src/index.ts+++ b/packages/trilium-backup-container/src/index.ts@@ -1,5 +1,5 @@/**- * Reader and writer for the Trilium `.tbak` backup container: one SQLite database wrapped with+ * Reader and writer for the Trilium backup container: one SQLite database wrapped with* optional gzip compression and optional AES-256-GCM encryption.** The module depends on nothing outside the Node standard library, carries no translated strings, and