From cbfdf1e9aaeae485a6934e52ace168ada1e3c4a8 Mon Sep 17 00:00:00 2001 From: BluJ Date: Mon, 16 Jan 2023 15:38:24 -0700 Subject: [PATCH 1/2] chore: Use the latest backup. --- .gitignore | 3 +- manifest.json | 55 ++++++-------------------------- scripts/deps.ts | 4 +-- scripts/embassy.ts | 4 +-- scripts/procedures/backups.ts | 3 ++ scripts/procedures/migrations.ts | 1 + 6 files changed, 19 insertions(+), 51 deletions(-) create mode 100644 scripts/procedures/backups.ts diff --git a/.gitignore b/.gitignore index 3411820..4b539df 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ vaultwarden.s9pk scripts/*.js scripts/generated/manifest.ts .vscode/ -docker-images \ No newline at end of file +docker-images +vaultwarden/ \ No newline at end of file diff --git a/manifest.json b/manifest.json index e8fdb4d..03d390a 100644 --- a/manifest.json +++ b/manifest.json @@ -1,17 +1,15 @@ { "id": "vaultwarden", "title": "Vaultwarden", - "version": "1.27.0", - "release-notes": "* Update upstream to v1.27.0, official release notes: https://github.com/dani-garcia/vaultwarden/releases/tag/1.27.0 \n * Fix a bug with client connections", + "version": "1.27.0.1", + "release-notes": "* Using js for the backups instead of emulated python", "license": "GPL-3.0", "wrapper-repo": "https://github.com/Start9Labs/vaultwarden-wrapper", "upstream-repo": "https://github.com/dani-garcia/vaultwarden", "support-site": "https://vaultwarden.discourse.group/", "marketing-site": "https://github.com/dani-garcia/vaultwarden/", "donation-url": "https://www.paypal.com/paypalme/DaniGG", - "build": [ - "make" - ], + "build": ["make"], "description": { "short": "Secure password management", "long": "Vaultwarden is a lightweight and secure password manager for storing and auto-filling sensitive information such as usernames and passwords, credit cards, identities, and notes. It is an alternative implementation of the Bitwarden server API written in Rust and compatible with upstream Bitwarden clients. All data is stored in an encrypted vault on your Embassy.\n" @@ -77,64 +75,29 @@ } }, "ui": true, - "protocols": [ - "tcp", - "http" - ] + "protocols": ["tcp", "http"] } }, "backup": { "create": { - "type": "docker", - "image": "compat", - "system": true, - "entrypoint": "compat", - "args": [ - "duplicity", - "create", - "/mnt/backup", - "/data" - ], - "mounts": { - "BACKUP": "/mnt/backup", - "main": "/data" - }, - "io-format": "yaml" + "type": "script" }, "restore": { - "type": "docker", - "image": "compat", - "system": true, - "entrypoint": "compat", - "args": [ - "duplicity", - "restore", - "/mnt/backup", - "/data" - ], - "mounts": { - "BACKUP": "/mnt/backup", - "main": "/data" - }, - "io-format": "yaml" + "type": "script" } }, "migrations": { "from": { "*": { "type": "script", - "args": [ - "from" - ] + "args": ["from"] } }, "to": { "*": { "type": "script", - "args": [ - "to" - ] + "args": ["to"] } } } -} \ No newline at end of file +} diff --git a/scripts/deps.ts b/scripts/deps.ts index ee0acbe..c4fe146 100644 --- a/scripts/deps.ts +++ b/scripts/deps.ts @@ -1,2 +1,2 @@ -export * from "https://deno.land/x/embassyd_sdk@v0.3.3.0.4/mod.ts"; -export * from "https://deno.land/x/embassyd_sdk@v0.3.3.0.4/healthUtil.ts"; +export * from "https://deno.land/x/embassyd_sdk@v0.3.3.0.7/mod.ts"; +export * from "https://deno.land/x/embassyd_sdk@v0.3.3.0.7/healthUtil.ts"; diff --git a/scripts/embassy.ts b/scripts/embassy.ts index 437be72..a08e731 100644 --- a/scripts/embassy.ts +++ b/scripts/embassy.ts @@ -2,5 +2,5 @@ export { setConfig } from "./procedures/setConfig.ts"; export { getConfig } from "./procedures/getConfig.ts"; export { health } from "./procedures/health.ts"; export { properties } from "./procedures/properties.ts"; - -export { migration } from "./procedures/migrations.ts"; \ No newline at end of file +export { createBackup, restoreBackup } from "./procedures/backups.ts"; +export { migration } from "./procedures/migrations.ts"; diff --git a/scripts/procedures/backups.ts b/scripts/procedures/backups.ts new file mode 100644 index 0000000..d9ca2bd --- /dev/null +++ b/scripts/procedures/backups.ts @@ -0,0 +1,3 @@ +import { Backups } from "../deps.ts"; + +export const { createBackup, restoreBackup } = Backups.volumes("main").build(); diff --git a/scripts/procedures/migrations.ts b/scripts/procedures/migrations.ts index 51f2608..98da684 100644 --- a/scripts/procedures/migrations.ts +++ b/scripts/procedures/migrations.ts @@ -4,6 +4,7 @@ import { manifest } from "../generated/manifest.ts"; export const migration: T.ExpectedExports.migration = migrations.fromMapping( { // 1.22.2 No migration needed + // 1.30.0 No migration needed }, manifest.version, ); From e5a03dc362ca6add9fedc64af666734e402202df Mon Sep 17 00:00:00 2001 From: J M <2364004+Blu-J@users.noreply.github.com> Date: Tue, 17 Jan 2023 09:18:38 -0700 Subject: [PATCH 2/2] Update manifest.json Co-authored-by: Lucy C <12953208+elvece@users.noreply.github.com> --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 03d390a..24edc49 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "id": "vaultwarden", "title": "Vaultwarden", "version": "1.27.0.1", - "release-notes": "* Using js for the backups instead of emulated python", + "release-notes": "* Use new eOS APIs for backups", "license": "GPL-3.0", "wrapper-repo": "https://github.com/Start9Labs/vaultwarden-wrapper", "upstream-repo": "https://github.com/dani-garcia/vaultwarden",