From 50984f67719067aefcf120854e1eaf40cef70569 Mon Sep 17 00:00:00 2001 From: Alex Kretzschmar Date: Tue, 31 Aug 2021 18:35:11 -0400 Subject: [PATCH 01/95] typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0ac158a..39ff481 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ ### 💭 Why / What? -Autorestic is a wrapper around the amazing [restic](https://restic.net/). While being amazing the restic cli can be a bit overwhelming and difficult to manage if you have many different location that you want to backup to multiple locations. This utility is aimed at making this easier 🙂 +Autorestic is a wrapper around the amazing [restic](https://restic.net/). While being amazing the restic cli can be a bit overwhelming and difficult to manage if you have many different locations that you want to backup to multiple locations. This utility is aimed at making this easier 🙂. ### 🌈 Features From 959d19cbdb40c4f3cc45a0ac313c5774c4ce206e Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Wed, 6 Oct 2021 15:50:23 +0200 Subject: [PATCH 02/95] add XDG_CONFIG_HOME to config --- cmd/root.go | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index 3201aac..a37adfe 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -2,6 +2,7 @@ package cmd import ( "os" + "path/filepath" "github.com/cupcakearmy/autorestic/internal" "github.com/cupcakearmy/autorestic/internal/colors" @@ -50,11 +51,24 @@ func initConfig() { if cfgFile != "" { viper.SetConfigFile(cfgFile) } else { - home, err := homedir.Dir() - CheckErr(err) - viper.AddConfigPath(".") - viper.AddConfigPath(home) + + // Home + if home, err := homedir.Dir(); err != nil { + viper.AddConfigPath(home) + } + + // XDG_CONFIG_HOME + { + prefix, found := os.LookupEnv("XDG_CONFIG_HOME") + if !found { + if home, err := homedir.Dir(); err != nil { + prefix = filepath.Join(home, ".config") + } + } + viper.AddConfigPath(filepath.Join(prefix, "autorestic")) + } + viper.SetConfigName(".autorestic") } viper.AutomaticEnv() From 7a8830cb2ff3882c3e20247821da7718a58fb9fe Mon Sep 17 00:00:00 2001 From: Fuzzy Date: Wed, 6 Oct 2021 13:24:40 -0400 Subject: [PATCH 03/95] Add third ansible role to community docs --- docs/markdown/community.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/markdown/community.md b/docs/markdown/community.md index 0c876fe..702b6db 100644 --- a/docs/markdown/community.md +++ b/docs/markdown/community.md @@ -6,5 +6,6 @@ A list of community driven projects. (No official affiliation) - Docker image: https://github.com/pascaliske/docker-autorestic - Ansible Role: https://github.com/adsanz/ansible-restic-role - Ansible Role: https://github.com/ItsNotGoodName/ansible-role-autorestic +- Ansible Role: https://github.com/FuzzyMistborn/ansible-role-autorestic > :ToCPrevNext From 56f82ae65605566de8efa85ef81a7faa87c3fe8e Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Fri, 22 Oct 2021 17:57:43 +0200 Subject: [PATCH 04/95] pnpm & typo --- docs/markdown/backend/available.md | 6 +- docs/package-lock.json | 1122 ---------------------------- docs/pnpm-lock.yaml | 436 +++++++++++ 3 files changed, 439 insertions(+), 1125 deletions(-) delete mode 100644 docs/package-lock.json create mode 100644 docs/pnpm-lock.yaml diff --git a/docs/markdown/backend/available.md b/docs/markdown/backend/available.md index 296e434..88bccf0 100644 --- a/docs/markdown/backend/available.md +++ b/docs/markdown/backend/available.md @@ -19,9 +19,9 @@ backends: backends: name-of-backend: type: b2 - path: 'backblaze_bucketID' + path: 'bucket_name' # Or With a path - # path: 'backblaze_bucketID:/some/path' + # path: 'bucket_name:/some/path' env: B2_ACCOUNT_ID: 'backblaze_keyID' B2_ACCOUNT_KEY: 'backblaze_applicationKey' @@ -29,7 +29,7 @@ backends: #### API Keys gotcha -If you use a _File name prefix_ when making the application key, do not include a leading slash. Make sure to include this prefix in the path (e.g. `path: 'backblaze_bucketID:my/path'`). +If you use a _File name prefix_ when making the application key, do not include a leading slash. Make sure to include this prefix in the path (e.g. `path: 'bucket_name:my/path'`). ## S3 / Minio diff --git a/docs/package-lock.json b/docs/package-lock.json deleted file mode 100644 index 1db3eee..0000000 --- a/docs/package-lock.json +++ /dev/null @@ -1,1122 +0,0 @@ -{ - "name": "docs", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "dependencies": { - "@codedoc/cli": "^0.2.8" - } - }, - "node_modules/@codedoc/cli": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/@codedoc/cli/-/cli-0.2.8.tgz", - "integrity": "sha512-WLZ/i/AkNy8j4d2QLvMn5AZga/CVpP0eKzZ6+Wh6lSvPzDxG1bNeAVOe4sN6fj5tkznbjoo3/R+Emxu0/CLzFg==", - "dependencies": { - "chalk": "^4.0.0", - "shelljs": "^0.8.3", - "ts-node": "^8.8.2", - "ts-node-dev": "^1.0.0-pre.44", - "typescript": "^3.8.3" - }, - "bin": { - "codedoc": "src/index.js" - } - }, - "node_modules/@types/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-FKjsOVbC6B7bdSB5CuzyHCkK69I=" - }, - "node_modules/@types/strip-json-comments": { - "version": "0.0.30", - "resolved": "https://registry.npmjs.org/@types/strip-json-comments/-/strip-json-comments-0.0.30.tgz", - "integrity": "sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ==" - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "engines": { - "node": ">=8" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chokidar": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", - "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" - }, - "node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/dynamic-dedupe": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/dynamic-dedupe/-/dynamic-dedupe-0.3.0.tgz", - "integrity": "sha1-BuRMIj9eTpTXjvnbI6ZRXOL5YqE=", - "dependencies": { - "xtend": "^4.0.0" - } - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "node_modules/glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-core-module": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.5.0.tgz", - "integrity": "sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg==", - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" - }, - "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" - }, - "node_modules/picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "dependencies": { - "resolve": "^1.1.6" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", - "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, - "node_modules/shelljs": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", - "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", - "dependencies": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - }, - "bin": { - "shjs": "bin/shjs" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "engines": { - "node": ">=4" - } - }, - "node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/tree-kill": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", - "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", - "bin": { - "tree-kill": "cli.js" - } - }, - "node_modules/ts-node": { - "version": "8.10.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz", - "integrity": "sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==", - "dependencies": { - "arg": "^4.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "source-map-support": "^0.5.17", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "engines": { - "node": ">=6.0.0" - }, - "peerDependencies": { - "typescript": ">=2.7" - } - }, - "node_modules/ts-node-dev": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/ts-node-dev/-/ts-node-dev-1.1.8.tgz", - "integrity": "sha512-Q/m3vEwzYwLZKmV6/0VlFxcZzVV/xcgOt+Tx/VjaaRHyiBcFlV0541yrT09QjzzCxlDZ34OzKjrFAynlmtflEg==", - "dependencies": { - "chokidar": "^3.5.1", - "dynamic-dedupe": "^0.3.0", - "minimist": "^1.2.5", - "mkdirp": "^1.0.4", - "resolve": "^1.0.0", - "rimraf": "^2.6.1", - "source-map-support": "^0.5.12", - "tree-kill": "^1.2.2", - "ts-node": "^9.0.0", - "tsconfig": "^7.0.0" - }, - "bin": { - "ts-node-dev": "lib/bin.js", - "tsnd": "lib/bin.js" - }, - "engines": { - "node": ">=0.8.0" - }, - "peerDependencies": { - "node-notifier": "*", - "typescript": "*" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/ts-node-dev/node_modules/ts-node": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.1.tgz", - "integrity": "sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==", - "dependencies": { - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "source-map-support": "^0.5.17", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "typescript": ">=2.7" - } - }, - "node_modules/tsconfig": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-7.0.0.tgz", - "integrity": "sha512-vZXmzPrL+EmC4T/4rVlT2jNVMWCi/O4DIiSj3UHg1OE5kCKbk4mfrXc6dZksLgRM/TZlKnousKH9bbTazUWRRw==", - "dependencies": { - "@types/strip-bom": "^3.0.0", - "@types/strip-json-comments": "0.0.30", - "strip-bom": "^3.0.0", - "strip-json-comments": "^2.0.0" - } - }, - "node_modules/typescript": { - "version": "3.9.10", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", - "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "engines": { - "node": ">=0.4" - } - }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "engines": { - "node": ">=6" - } - } - }, - "dependencies": { - "@codedoc/cli": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/@codedoc/cli/-/cli-0.2.8.tgz", - "integrity": "sha512-WLZ/i/AkNy8j4d2QLvMn5AZga/CVpP0eKzZ6+Wh6lSvPzDxG1bNeAVOe4sN6fj5tkznbjoo3/R+Emxu0/CLzFg==", - "requires": { - "chalk": "^4.0.0", - "shelljs": "^0.8.3", - "ts-node": "^8.8.2", - "ts-node-dev": "^1.0.0-pre.44", - "typescript": "^3.8.3" - } - }, - "@types/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-FKjsOVbC6B7bdSB5CuzyHCkK69I=" - }, - "@types/strip-json-comments": { - "version": "0.0.30", - "resolved": "https://registry.npmjs.org/@types/strip-json-comments/-/strip-json-comments-0.0.30.tgz", - "integrity": "sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ==" - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "requires": { - "fill-range": "^7.0.1" - } - }, - "buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "chokidar": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", - "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" - }, - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" - }, - "dynamic-dedupe": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/dynamic-dedupe/-/dynamic-dedupe-0.3.0.tgz", - "integrity": "sha1-BuRMIj9eTpTXjvnbI6ZRXOL5YqE=", - "requires": { - "xtend": "^4.0.0" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "optional": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "requires": { - "is-glob": "^4.0.1" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-core-module": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.5.0.tgz", - "integrity": "sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg==", - "requires": { - "has": "^1.0.3" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" - }, - "make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" - }, - "picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==" - }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "requires": { - "picomatch": "^2.2.1" - } - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "requires": { - "resolve": "^1.1.6" - } - }, - "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", - "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - } - }, - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "requires": { - "glob": "^7.1.3" - } - }, - "shelljs": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", - "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", - "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "requires": { - "has-flag": "^4.0.0" - } - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "requires": { - "is-number": "^7.0.0" - } - }, - "tree-kill": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", - "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==" - }, - "ts-node": { - "version": "8.10.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz", - "integrity": "sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==", - "requires": { - "arg": "^4.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "source-map-support": "^0.5.17", - "yn": "3.1.1" - } - }, - "ts-node-dev": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/ts-node-dev/-/ts-node-dev-1.1.8.tgz", - "integrity": "sha512-Q/m3vEwzYwLZKmV6/0VlFxcZzVV/xcgOt+Tx/VjaaRHyiBcFlV0541yrT09QjzzCxlDZ34OzKjrFAynlmtflEg==", - "requires": { - "chokidar": "^3.5.1", - "dynamic-dedupe": "^0.3.0", - "minimist": "^1.2.5", - "mkdirp": "^1.0.4", - "resolve": "^1.0.0", - "rimraf": "^2.6.1", - "source-map-support": "^0.5.12", - "tree-kill": "^1.2.2", - "ts-node": "^9.0.0", - "tsconfig": "^7.0.0" - }, - "dependencies": { - "ts-node": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.1.tgz", - "integrity": "sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==", - "requires": { - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "source-map-support": "^0.5.17", - "yn": "3.1.1" - } - } - } - }, - "tsconfig": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-7.0.0.tgz", - "integrity": "sha512-vZXmzPrL+EmC4T/4rVlT2jNVMWCi/O4DIiSj3UHg1OE5kCKbk4mfrXc6dZksLgRM/TZlKnousKH9bbTazUWRRw==", - "requires": { - "@types/strip-bom": "^3.0.0", - "@types/strip-json-comments": "0.0.30", - "strip-bom": "^3.0.0", - "strip-json-comments": "^2.0.0" - } - }, - "typescript": { - "version": "3.9.10", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", - "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==" - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" - }, - "yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==" - } - } -} diff --git a/docs/pnpm-lock.yaml b/docs/pnpm-lock.yaml new file mode 100644 index 0000000..b20f91a --- /dev/null +++ b/docs/pnpm-lock.yaml @@ -0,0 +1,436 @@ +lockfileVersion: 5.3 + +specifiers: + '@codedoc/cli': ^0.2.8 + +dependencies: + '@codedoc/cli': 0.2.8 + +packages: + + /@codedoc/cli/0.2.8: + resolution: {integrity: sha512-WLZ/i/AkNy8j4d2QLvMn5AZga/CVpP0eKzZ6+Wh6lSvPzDxG1bNeAVOe4sN6fj5tkznbjoo3/R+Emxu0/CLzFg==} + hasBin: true + dependencies: + chalk: 4.1.2 + shelljs: 0.8.4 + ts-node: 8.10.2_typescript@3.9.10 + ts-node-dev: 1.1.8_typescript@3.9.10 + typescript: 3.9.10 + transitivePeerDependencies: + - node-notifier + dev: false + + /@types/strip-bom/3.0.0: + resolution: {integrity: sha1-FKjsOVbC6B7bdSB5CuzyHCkK69I=} + dev: false + + /@types/strip-json-comments/0.0.30: + resolution: {integrity: sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ==} + dev: false + + /ansi-styles/4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + dependencies: + color-convert: 2.0.1 + dev: false + + /anymatch/3.1.2: + resolution: {integrity: sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==} + engines: {node: '>= 8'} + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.0 + dev: false + + /arg/4.1.3: + resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} + dev: false + + /balanced-match/1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + dev: false + + /binary-extensions/2.2.0: + resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} + engines: {node: '>=8'} + dev: false + + /brace-expansion/1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + dev: false + + /braces/3.0.2: + resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} + engines: {node: '>=8'} + dependencies: + fill-range: 7.0.1 + dev: false + + /buffer-from/1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + dev: false + + /chalk/4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + dev: false + + /chokidar/3.5.2: + resolution: {integrity: sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==} + engines: {node: '>= 8.10.0'} + dependencies: + anymatch: 3.1.2 + braces: 3.0.2 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.2 + dev: false + + /color-convert/2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + dependencies: + color-name: 1.1.4 + dev: false + + /color-name/1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + dev: false + + /concat-map/0.0.1: + resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} + dev: false + + /create-require/1.1.1: + resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} + dev: false + + /diff/4.0.2: + resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} + engines: {node: '>=0.3.1'} + dev: false + + /dynamic-dedupe/0.3.0: + resolution: {integrity: sha1-BuRMIj9eTpTXjvnbI6ZRXOL5YqE=} + dependencies: + xtend: 4.0.2 + dev: false + + /fill-range/7.0.1: + resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} + engines: {node: '>=8'} + dependencies: + to-regex-range: 5.0.1 + dev: false + + /fs.realpath/1.0.0: + resolution: {integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8=} + dev: false + + /fsevents/2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: false + optional: true + + /function-bind/1.1.1: + resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} + dev: false + + /glob-parent/5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + dependencies: + is-glob: 4.0.3 + dev: false + + /glob/7.2.0: + resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.0.4 + once: 1.4.0 + path-is-absolute: 1.0.1 + dev: false + + /has-flag/4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + dev: false + + /has/1.0.3: + resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} + engines: {node: '>= 0.4.0'} + dependencies: + function-bind: 1.1.1 + dev: false + + /inflight/1.0.6: + resolution: {integrity: sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=} + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + dev: false + + /inherits/2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + dev: false + + /interpret/1.4.0: + resolution: {integrity: sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==} + engines: {node: '>= 0.10'} + dev: false + + /is-binary-path/2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} + dependencies: + binary-extensions: 2.2.0 + dev: false + + /is-core-module/2.8.0: + resolution: {integrity: sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==} + dependencies: + has: 1.0.3 + dev: false + + /is-extglob/2.1.1: + resolution: {integrity: sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=} + engines: {node: '>=0.10.0'} + dev: false + + /is-glob/4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + dependencies: + is-extglob: 2.1.1 + dev: false + + /is-number/7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + dev: false + + /make-error/1.3.6: + resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + dev: false + + /minimatch/3.0.4: + resolution: {integrity: sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==} + dependencies: + brace-expansion: 1.1.11 + dev: false + + /minimist/1.2.5: + resolution: {integrity: sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==} + dev: false + + /mkdirp/1.0.4: + resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} + engines: {node: '>=10'} + hasBin: true + dev: false + + /normalize-path/3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + dev: false + + /once/1.4.0: + resolution: {integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E=} + dependencies: + wrappy: 1.0.2 + dev: false + + /path-is-absolute/1.0.1: + resolution: {integrity: sha1-F0uSaHNVNP+8es5r9TpanhtcX18=} + engines: {node: '>=0.10.0'} + dev: false + + /path-parse/1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + dev: false + + /picomatch/2.3.0: + resolution: {integrity: sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==} + engines: {node: '>=8.6'} + dev: false + + /readdirp/3.6.0: + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + engines: {node: '>=8.10.0'} + dependencies: + picomatch: 2.3.0 + dev: false + + /rechoir/0.6.2: + resolution: {integrity: sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=} + engines: {node: '>= 0.10'} + dependencies: + resolve: 1.20.0 + dev: false + + /resolve/1.20.0: + resolution: {integrity: sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==} + dependencies: + is-core-module: 2.8.0 + path-parse: 1.0.7 + dev: false + + /rimraf/2.7.1: + resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} + hasBin: true + dependencies: + glob: 7.2.0 + dev: false + + /shelljs/0.8.4: + resolution: {integrity: sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==} + engines: {node: '>=4'} + hasBin: true + dependencies: + glob: 7.2.0 + interpret: 1.4.0 + rechoir: 0.6.2 + dev: false + + /source-map-support/0.5.20: + resolution: {integrity: sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==} + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + dev: false + + /source-map/0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + dev: false + + /strip-bom/3.0.0: + resolution: {integrity: sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=} + engines: {node: '>=4'} + dev: false + + /strip-json-comments/2.0.1: + resolution: {integrity: sha1-PFMZQukIwml8DsNEhYwobHygpgo=} + engines: {node: '>=0.10.0'} + dev: false + + /supports-color/7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + dependencies: + has-flag: 4.0.0 + dev: false + + /to-regex-range/5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + dependencies: + is-number: 7.0.0 + dev: false + + /tree-kill/1.2.2: + resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} + hasBin: true + dev: false + + /ts-node-dev/1.1.8_typescript@3.9.10: + resolution: {integrity: sha512-Q/m3vEwzYwLZKmV6/0VlFxcZzVV/xcgOt+Tx/VjaaRHyiBcFlV0541yrT09QjzzCxlDZ34OzKjrFAynlmtflEg==} + engines: {node: '>=0.8.0'} + hasBin: true + peerDependencies: + node-notifier: '*' + typescript: '*' + peerDependenciesMeta: + node-notifier: + optional: true + dependencies: + chokidar: 3.5.2 + dynamic-dedupe: 0.3.0 + minimist: 1.2.5 + mkdirp: 1.0.4 + resolve: 1.20.0 + rimraf: 2.7.1 + source-map-support: 0.5.20 + tree-kill: 1.2.2 + ts-node: 9.1.1_typescript@3.9.10 + tsconfig: 7.0.0 + typescript: 3.9.10 + dev: false + + /ts-node/8.10.2_typescript@3.9.10: + resolution: {integrity: sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==} + engines: {node: '>=6.0.0'} + hasBin: true + peerDependencies: + typescript: '>=2.7' + dependencies: + arg: 4.1.3 + diff: 4.0.2 + make-error: 1.3.6 + source-map-support: 0.5.20 + typescript: 3.9.10 + yn: 3.1.1 + dev: false + + /ts-node/9.1.1_typescript@3.9.10: + resolution: {integrity: sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==} + engines: {node: '>=10.0.0'} + hasBin: true + peerDependencies: + typescript: '>=2.7' + dependencies: + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + source-map-support: 0.5.20 + typescript: 3.9.10 + yn: 3.1.1 + dev: false + + /tsconfig/7.0.0: + resolution: {integrity: sha512-vZXmzPrL+EmC4T/4rVlT2jNVMWCi/O4DIiSj3UHg1OE5kCKbk4mfrXc6dZksLgRM/TZlKnousKH9bbTazUWRRw==} + dependencies: + '@types/strip-bom': 3.0.0 + '@types/strip-json-comments': 0.0.30 + strip-bom: 3.0.0 + strip-json-comments: 2.0.1 + dev: false + + /typescript/3.9.10: + resolution: {integrity: sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: false + + /wrappy/1.0.2: + resolution: {integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=} + dev: false + + /xtend/4.0.2: + resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} + engines: {node: '>=0.4'} + dev: false + + /yn/3.1.1: + resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} + engines: {node: '>=6'} + dev: false From a1abe13a3904d1d06a2a0ca11a19d13fb015cf0d Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Mon, 25 Oct 2021 17:07:29 +0200 Subject: [PATCH 05/95] docs on cron --- docs/markdown/location/cron.md | 8 +- docs/package-lock.json | 1122 ++++++++++++++++++++++++++++++++ docs/pnpm-lock.yaml | 436 ------------- 3 files changed, 1129 insertions(+), 437 deletions(-) create mode 100644 docs/package-lock.json delete mode 100644 docs/pnpm-lock.yaml diff --git a/docs/markdown/location/cron.md b/docs/markdown/location/cron.md index 695b395..cd7a850 100644 --- a/docs/markdown/location/cron.md +++ b/docs/markdown/location/cron.md @@ -37,11 +37,17 @@ Then paste this at the bottom of the file and save it. Note that in this specifi PATH="/usr/local/bin:/usr/bin:/bin" # Example running every 5 minutes -*/5 * * * * autorestic --ci cron +*/5 * * * * autorestic -c /path/to/my/.autorestic.yml --ci cron ``` > The `--ci` option is not required, but recommended +To debug a cron job you can use + +```bash +*/5 * * * * autorestic -c /path/to/my/.autorestic.yml --ci cron > /tmp/autorestic.log 2>&1 +``` + Now you can add as many `cron` attributes as you wish in the config file ⏱ > Also note that manually triggered backups with `autorestic backup` will not influence the cron timeline, they are willingly not linked. diff --git a/docs/package-lock.json b/docs/package-lock.json new file mode 100644 index 0000000..0096e70 --- /dev/null +++ b/docs/package-lock.json @@ -0,0 +1,1122 @@ +{ + "name": "docs", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "dependencies": { + "@codedoc/cli": "^0.2.8" + } + }, + "node_modules/@codedoc/cli": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/@codedoc/cli/-/cli-0.2.8.tgz", + "integrity": "sha512-WLZ/i/AkNy8j4d2QLvMn5AZga/CVpP0eKzZ6+Wh6lSvPzDxG1bNeAVOe4sN6fj5tkznbjoo3/R+Emxu0/CLzFg==", + "dependencies": { + "chalk": "^4.0.0", + "shelljs": "^0.8.3", + "ts-node": "^8.8.2", + "ts-node-dev": "^1.0.0-pre.44", + "typescript": "^3.8.3" + }, + "bin": { + "codedoc": "src/index.js" + } + }, + "node_modules/@types/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-FKjsOVbC6B7bdSB5CuzyHCkK69I=" + }, + "node_modules/@types/strip-json-comments": { + "version": "0.0.30", + "resolved": "https://registry.npmjs.org/@types/strip-json-comments/-/strip-json-comments-0.0.30.tgz", + "integrity": "sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ==" + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chokidar": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", + "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dynamic-dedupe": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/dynamic-dedupe/-/dynamic-dedupe-0.3.0.tgz", + "integrity": "sha1-BuRMIj9eTpTXjvnbI6ZRXOL5YqE=", + "dependencies": { + "xtend": "^4.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz", + "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==", + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "node_modules/picomatch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dependencies": { + "resolve": "^1.1.6" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "dependencies": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/shelljs": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", + "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", + "dependencies": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + }, + "bin": { + "shjs": "bin/shjs" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.20", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz", + "integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/ts-node": { + "version": "8.10.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz", + "integrity": "sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==", + "dependencies": { + "arg": "^4.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "source-map-support": "^0.5.17", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "engines": { + "node": ">=6.0.0" + }, + "peerDependencies": { + "typescript": ">=2.7" + } + }, + "node_modules/ts-node-dev": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/ts-node-dev/-/ts-node-dev-1.1.8.tgz", + "integrity": "sha512-Q/m3vEwzYwLZKmV6/0VlFxcZzVV/xcgOt+Tx/VjaaRHyiBcFlV0541yrT09QjzzCxlDZ34OzKjrFAynlmtflEg==", + "dependencies": { + "chokidar": "^3.5.1", + "dynamic-dedupe": "^0.3.0", + "minimist": "^1.2.5", + "mkdirp": "^1.0.4", + "resolve": "^1.0.0", + "rimraf": "^2.6.1", + "source-map-support": "^0.5.12", + "tree-kill": "^1.2.2", + "ts-node": "^9.0.0", + "tsconfig": "^7.0.0" + }, + "bin": { + "ts-node-dev": "lib/bin.js", + "tsnd": "lib/bin.js" + }, + "engines": { + "node": ">=0.8.0" + }, + "peerDependencies": { + "node-notifier": "*", + "typescript": "*" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/ts-node-dev/node_modules/ts-node": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.1.tgz", + "integrity": "sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==", + "dependencies": { + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "source-map-support": "^0.5.17", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "typescript": ">=2.7" + } + }, + "node_modules/tsconfig": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-7.0.0.tgz", + "integrity": "sha512-vZXmzPrL+EmC4T/4rVlT2jNVMWCi/O4DIiSj3UHg1OE5kCKbk4mfrXc6dZksLgRM/TZlKnousKH9bbTazUWRRw==", + "dependencies": { + "@types/strip-bom": "^3.0.0", + "@types/strip-json-comments": "0.0.30", + "strip-bom": "^3.0.0", + "strip-json-comments": "^2.0.0" + } + }, + "node_modules/typescript": { + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", + "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "engines": { + "node": ">=6" + } + } + }, + "dependencies": { + "@codedoc/cli": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/@codedoc/cli/-/cli-0.2.8.tgz", + "integrity": "sha512-WLZ/i/AkNy8j4d2QLvMn5AZga/CVpP0eKzZ6+Wh6lSvPzDxG1bNeAVOe4sN6fj5tkznbjoo3/R+Emxu0/CLzFg==", + "requires": { + "chalk": "^4.0.0", + "shelljs": "^0.8.3", + "ts-node": "^8.8.2", + "ts-node-dev": "^1.0.0-pre.44", + "typescript": "^3.8.3" + } + }, + "@types/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-FKjsOVbC6B7bdSB5CuzyHCkK69I=" + }, + "@types/strip-json-comments": { + "version": "0.0.30", + "resolved": "https://registry.npmjs.org/@types/strip-json-comments/-/strip-json-comments-0.0.30.tgz", + "integrity": "sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ==" + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "requires": { + "fill-range": "^7.0.1" + } + }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "chokidar": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", + "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" + }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" + }, + "dynamic-dedupe": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/dynamic-dedupe/-/dynamic-dedupe-0.3.0.tgz", + "integrity": "sha1-BuRMIj9eTpTXjvnbI6ZRXOL5YqE=", + "requires": { + "xtend": "^4.0.0" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "requires": { + "is-glob": "^4.0.1" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-core-module": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz", + "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==", + "requires": { + "has": "^1.0.3" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "picomatch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==" + }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "requires": { + "picomatch": "^2.2.1" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "requires": { + "resolve": "^1.1.6" + } + }, + "resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "requires": { + "glob": "^7.1.3" + } + }, + "shelljs": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", + "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "source-map-support": { + "version": "0.5.20", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz", + "integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==", + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "requires": { + "is-number": "^7.0.0" + } + }, + "tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==" + }, + "ts-node": { + "version": "8.10.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz", + "integrity": "sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==", + "requires": { + "arg": "^4.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "source-map-support": "^0.5.17", + "yn": "3.1.1" + } + }, + "ts-node-dev": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/ts-node-dev/-/ts-node-dev-1.1.8.tgz", + "integrity": "sha512-Q/m3vEwzYwLZKmV6/0VlFxcZzVV/xcgOt+Tx/VjaaRHyiBcFlV0541yrT09QjzzCxlDZ34OzKjrFAynlmtflEg==", + "requires": { + "chokidar": "^3.5.1", + "dynamic-dedupe": "^0.3.0", + "minimist": "^1.2.5", + "mkdirp": "^1.0.4", + "resolve": "^1.0.0", + "rimraf": "^2.6.1", + "source-map-support": "^0.5.12", + "tree-kill": "^1.2.2", + "ts-node": "^9.0.0", + "tsconfig": "^7.0.0" + }, + "dependencies": { + "ts-node": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.1.tgz", + "integrity": "sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==", + "requires": { + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "source-map-support": "^0.5.17", + "yn": "3.1.1" + } + } + } + }, + "tsconfig": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-7.0.0.tgz", + "integrity": "sha512-vZXmzPrL+EmC4T/4rVlT2jNVMWCi/O4DIiSj3UHg1OE5kCKbk4mfrXc6dZksLgRM/TZlKnousKH9bbTazUWRRw==", + "requires": { + "@types/strip-bom": "^3.0.0", + "@types/strip-json-comments": "0.0.30", + "strip-bom": "^3.0.0", + "strip-json-comments": "^2.0.0" + } + }, + "typescript": { + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", + "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==" + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==" + } + } +} diff --git a/docs/pnpm-lock.yaml b/docs/pnpm-lock.yaml deleted file mode 100644 index b20f91a..0000000 --- a/docs/pnpm-lock.yaml +++ /dev/null @@ -1,436 +0,0 @@ -lockfileVersion: 5.3 - -specifiers: - '@codedoc/cli': ^0.2.8 - -dependencies: - '@codedoc/cli': 0.2.8 - -packages: - - /@codedoc/cli/0.2.8: - resolution: {integrity: sha512-WLZ/i/AkNy8j4d2QLvMn5AZga/CVpP0eKzZ6+Wh6lSvPzDxG1bNeAVOe4sN6fj5tkznbjoo3/R+Emxu0/CLzFg==} - hasBin: true - dependencies: - chalk: 4.1.2 - shelljs: 0.8.4 - ts-node: 8.10.2_typescript@3.9.10 - ts-node-dev: 1.1.8_typescript@3.9.10 - typescript: 3.9.10 - transitivePeerDependencies: - - node-notifier - dev: false - - /@types/strip-bom/3.0.0: - resolution: {integrity: sha1-FKjsOVbC6B7bdSB5CuzyHCkK69I=} - dev: false - - /@types/strip-json-comments/0.0.30: - resolution: {integrity: sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ==} - dev: false - - /ansi-styles/4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} - dependencies: - color-convert: 2.0.1 - dev: false - - /anymatch/3.1.2: - resolution: {integrity: sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==} - engines: {node: '>= 8'} - dependencies: - normalize-path: 3.0.0 - picomatch: 2.3.0 - dev: false - - /arg/4.1.3: - resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} - dev: false - - /balanced-match/1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - dev: false - - /binary-extensions/2.2.0: - resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} - engines: {node: '>=8'} - dev: false - - /brace-expansion/1.1.11: - resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} - dependencies: - balanced-match: 1.0.2 - concat-map: 0.0.1 - dev: false - - /braces/3.0.2: - resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} - engines: {node: '>=8'} - dependencies: - fill-range: 7.0.1 - dev: false - - /buffer-from/1.1.2: - resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - dev: false - - /chalk/4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - dev: false - - /chokidar/3.5.2: - resolution: {integrity: sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==} - engines: {node: '>= 8.10.0'} - dependencies: - anymatch: 3.1.2 - braces: 3.0.2 - glob-parent: 5.1.2 - is-binary-path: 2.1.0 - is-glob: 4.0.3 - normalize-path: 3.0.0 - readdirp: 3.6.0 - optionalDependencies: - fsevents: 2.3.2 - dev: false - - /color-convert/2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - dependencies: - color-name: 1.1.4 - dev: false - - /color-name/1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - dev: false - - /concat-map/0.0.1: - resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} - dev: false - - /create-require/1.1.1: - resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} - dev: false - - /diff/4.0.2: - resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} - engines: {node: '>=0.3.1'} - dev: false - - /dynamic-dedupe/0.3.0: - resolution: {integrity: sha1-BuRMIj9eTpTXjvnbI6ZRXOL5YqE=} - dependencies: - xtend: 4.0.2 - dev: false - - /fill-range/7.0.1: - resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} - engines: {node: '>=8'} - dependencies: - to-regex-range: 5.0.1 - dev: false - - /fs.realpath/1.0.0: - resolution: {integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8=} - dev: false - - /fsevents/2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - requiresBuild: true - dev: false - optional: true - - /function-bind/1.1.1: - resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} - dev: false - - /glob-parent/5.1.2: - resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} - engines: {node: '>= 6'} - dependencies: - is-glob: 4.0.3 - dev: false - - /glob/7.2.0: - resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==} - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.0.4 - once: 1.4.0 - path-is-absolute: 1.0.1 - dev: false - - /has-flag/4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - dev: false - - /has/1.0.3: - resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} - engines: {node: '>= 0.4.0'} - dependencies: - function-bind: 1.1.1 - dev: false - - /inflight/1.0.6: - resolution: {integrity: sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=} - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - dev: false - - /inherits/2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - dev: false - - /interpret/1.4.0: - resolution: {integrity: sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==} - engines: {node: '>= 0.10'} - dev: false - - /is-binary-path/2.1.0: - resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} - engines: {node: '>=8'} - dependencies: - binary-extensions: 2.2.0 - dev: false - - /is-core-module/2.8.0: - resolution: {integrity: sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==} - dependencies: - has: 1.0.3 - dev: false - - /is-extglob/2.1.1: - resolution: {integrity: sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=} - engines: {node: '>=0.10.0'} - dev: false - - /is-glob/4.0.3: - resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} - engines: {node: '>=0.10.0'} - dependencies: - is-extglob: 2.1.1 - dev: false - - /is-number/7.0.0: - resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} - engines: {node: '>=0.12.0'} - dev: false - - /make-error/1.3.6: - resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} - dev: false - - /minimatch/3.0.4: - resolution: {integrity: sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==} - dependencies: - brace-expansion: 1.1.11 - dev: false - - /minimist/1.2.5: - resolution: {integrity: sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==} - dev: false - - /mkdirp/1.0.4: - resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} - engines: {node: '>=10'} - hasBin: true - dev: false - - /normalize-path/3.0.0: - resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} - engines: {node: '>=0.10.0'} - dev: false - - /once/1.4.0: - resolution: {integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E=} - dependencies: - wrappy: 1.0.2 - dev: false - - /path-is-absolute/1.0.1: - resolution: {integrity: sha1-F0uSaHNVNP+8es5r9TpanhtcX18=} - engines: {node: '>=0.10.0'} - dev: false - - /path-parse/1.0.7: - resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - dev: false - - /picomatch/2.3.0: - resolution: {integrity: sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==} - engines: {node: '>=8.6'} - dev: false - - /readdirp/3.6.0: - resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} - engines: {node: '>=8.10.0'} - dependencies: - picomatch: 2.3.0 - dev: false - - /rechoir/0.6.2: - resolution: {integrity: sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=} - engines: {node: '>= 0.10'} - dependencies: - resolve: 1.20.0 - dev: false - - /resolve/1.20.0: - resolution: {integrity: sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==} - dependencies: - is-core-module: 2.8.0 - path-parse: 1.0.7 - dev: false - - /rimraf/2.7.1: - resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} - hasBin: true - dependencies: - glob: 7.2.0 - dev: false - - /shelljs/0.8.4: - resolution: {integrity: sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==} - engines: {node: '>=4'} - hasBin: true - dependencies: - glob: 7.2.0 - interpret: 1.4.0 - rechoir: 0.6.2 - dev: false - - /source-map-support/0.5.20: - resolution: {integrity: sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==} - dependencies: - buffer-from: 1.1.2 - source-map: 0.6.1 - dev: false - - /source-map/0.6.1: - resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} - engines: {node: '>=0.10.0'} - dev: false - - /strip-bom/3.0.0: - resolution: {integrity: sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=} - engines: {node: '>=4'} - dev: false - - /strip-json-comments/2.0.1: - resolution: {integrity: sha1-PFMZQukIwml8DsNEhYwobHygpgo=} - engines: {node: '>=0.10.0'} - dev: false - - /supports-color/7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} - dependencies: - has-flag: 4.0.0 - dev: false - - /to-regex-range/5.0.1: - resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} - engines: {node: '>=8.0'} - dependencies: - is-number: 7.0.0 - dev: false - - /tree-kill/1.2.2: - resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} - hasBin: true - dev: false - - /ts-node-dev/1.1.8_typescript@3.9.10: - resolution: {integrity: sha512-Q/m3vEwzYwLZKmV6/0VlFxcZzVV/xcgOt+Tx/VjaaRHyiBcFlV0541yrT09QjzzCxlDZ34OzKjrFAynlmtflEg==} - engines: {node: '>=0.8.0'} - hasBin: true - peerDependencies: - node-notifier: '*' - typescript: '*' - peerDependenciesMeta: - node-notifier: - optional: true - dependencies: - chokidar: 3.5.2 - dynamic-dedupe: 0.3.0 - minimist: 1.2.5 - mkdirp: 1.0.4 - resolve: 1.20.0 - rimraf: 2.7.1 - source-map-support: 0.5.20 - tree-kill: 1.2.2 - ts-node: 9.1.1_typescript@3.9.10 - tsconfig: 7.0.0 - typescript: 3.9.10 - dev: false - - /ts-node/8.10.2_typescript@3.9.10: - resolution: {integrity: sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==} - engines: {node: '>=6.0.0'} - hasBin: true - peerDependencies: - typescript: '>=2.7' - dependencies: - arg: 4.1.3 - diff: 4.0.2 - make-error: 1.3.6 - source-map-support: 0.5.20 - typescript: 3.9.10 - yn: 3.1.1 - dev: false - - /ts-node/9.1.1_typescript@3.9.10: - resolution: {integrity: sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==} - engines: {node: '>=10.0.0'} - hasBin: true - peerDependencies: - typescript: '>=2.7' - dependencies: - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.2 - make-error: 1.3.6 - source-map-support: 0.5.20 - typescript: 3.9.10 - yn: 3.1.1 - dev: false - - /tsconfig/7.0.0: - resolution: {integrity: sha512-vZXmzPrL+EmC4T/4rVlT2jNVMWCi/O4DIiSj3UHg1OE5kCKbk4mfrXc6dZksLgRM/TZlKnousKH9bbTazUWRRw==} - dependencies: - '@types/strip-bom': 3.0.0 - '@types/strip-json-comments': 0.0.30 - strip-bom: 3.0.0 - strip-json-comments: 2.0.1 - dev: false - - /typescript/3.9.10: - resolution: {integrity: sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==} - engines: {node: '>=4.2.0'} - hasBin: true - dev: false - - /wrappy/1.0.2: - resolution: {integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=} - dev: false - - /xtend/4.0.2: - resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} - engines: {node: '>=0.4'} - dev: false - - /yn/3.1.1: - resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} - engines: {node: '>=6'} - dev: false From 02a8e461d435e53fe16f3aef9db0e436da176b49 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Mon, 25 Oct 2021 17:36:06 +0200 Subject: [PATCH 06/95] ability to use keys from envs --- go.mod | 1 + go.sum | 2 ++ internal/backend.go | 40 +++++++++++++++++++++++++++++++--------- internal/config.go | 9 ++++++++- 4 files changed, 42 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index 9354fba..038ed53 100644 --- a/go.mod +++ b/go.mod @@ -6,6 +6,7 @@ require ( github.com/blang/semver/v4 v4.0.0 github.com/buger/goterm v1.0.0 github.com/fatih/color v1.10.0 + github.com/joho/godotenv v1.4.0 github.com/mitchellh/go-homedir v1.1.0 github.com/robfig/cron v1.2.0 github.com/spf13/cobra v1.1.3 diff --git a/go.sum b/go.sum index 86b9403..d0c3565 100644 --- a/go.sum +++ b/go.sum @@ -101,6 +101,8 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg= +github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= diff --git a/internal/backend.go b/internal/backend.go index 18b635e..a091357 100644 --- a/internal/backend.go +++ b/internal/backend.go @@ -58,7 +58,15 @@ func (b Backend) generateRepo() (string, error) { func (b Backend) getEnv() (map[string]string, error) { env := make(map[string]string) - env["RESTIC_PASSWORD"] = b.Key + if b.Key != "" { + env["RESTIC_PASSWORD"] = b.Key + } else { + key, err := b.getKey() + if err != nil { + return nil, err + } + env["RESTIC_PASSWORD"] = key + } repo, err := b.generateRepo() env["RESTIC_REPOSITORY"] = repo for key, value := range b.Env { @@ -77,6 +85,16 @@ func generateRandomKey() string { return key } +func (b Backend) getKey() (string, error) { + if b.Key != "" { + return b.Key, nil + } + if key, found := os.LookupEnv("AUTORESTIC_KEY_" + strings.ToUpper(b.name)); found { + return key, nil + } + return "", fmt.Errorf("no key found for backend \"%s\"", b.name) +} + func (b Backend) validate() error { if b.Type == "" { return fmt.Errorf(`Backend "%s" has no "type"`, b.name) @@ -85,14 +103,18 @@ func (b Backend) validate() error { return fmt.Errorf(`Backend "%s" has no "path"`, b.name) } if b.Key == "" { - key := generateRandomKey() - b.Key = key - c := GetConfig() - tmp := c.Backends[b.name] - tmp.Key = key - c.Backends[b.name] = tmp - if err := c.SaveConfig(); err != nil { - return err + // Check if key is set in environment + if _, err := b.getKey(); err != nil { + // If not generate a new one + key := generateRandomKey() + b.Key = key + c := GetConfig() + tmp := c.Backends[b.name] + tmp.Key = key + c.Backends[b.name] = tmp + if err := c.SaveConfig(); err != nil { + return err + } } } env, err := b.getEnv() diff --git a/internal/config.go b/internal/config.go index b4e353b..1c548cf 100644 --- a/internal/config.go +++ b/internal/config.go @@ -10,6 +10,7 @@ import ( "github.com/cupcakearmy/autorestic/internal/colors" "github.com/cupcakearmy/autorestic/internal/lock" + "github.com/joho/godotenv" "github.com/mitchellh/go-homedir" "github.com/spf13/cobra" "github.com/spf13/viper" @@ -36,7 +37,13 @@ func GetConfig() *Config { if err := viper.ReadInConfig(); err == nil { if !CRON_LEAN { absConfig, _ := filepath.Abs(viper.ConfigFileUsed()) - colors.Faint.Println("Using config file:", absConfig) + colors.Faint.Println("Using config: \t", absConfig) + // Load env file + envFile := filepath.Join(filepath.Dir(absConfig), ".autorestic.env") + err = godotenv.Load(envFile) + if err == nil { + colors.Faint.Println("Using env:\t", envFile) + } } } else { return From 048a5ffed8e321a9dfe6cd5eeba28b2caf57d34e Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Mon, 25 Oct 2021 18:02:45 +0200 Subject: [PATCH 07/95] renamed env --- internal/backend.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/backend.go b/internal/backend.go index a091357..8116d44 100644 --- a/internal/backend.go +++ b/internal/backend.go @@ -89,7 +89,8 @@ func (b Backend) getKey() (string, error) { if b.Key != "" { return b.Key, nil } - if key, found := os.LookupEnv("AUTORESTIC_KEY_" + strings.ToUpper(b.name)); found { + keyName := "AUTORESTIC_" + strings.ToUpper(b.name) + "_KEY" + if key, found := os.LookupEnv(keyName); found { return key, nil } return "", fmt.Errorf("no key found for backend \"%s\"", b.name) From b87381cd3b3a968a9fc7650ab1c069d8d99fbc86 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Mon, 25 Oct 2021 18:02:51 +0200 Subject: [PATCH 08/95] docs for envs --- docs/markdown/backend/env.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 docs/markdown/backend/env.md diff --git a/docs/markdown/backend/env.md b/docs/markdown/backend/env.md new file mode 100644 index 0000000..4831c13 --- /dev/null +++ b/docs/markdown/backend/env.md @@ -0,0 +1,36 @@ +# Environment + +> ⚠ Available since version `v1.3.0` + +Sometimes it's favorable not having the encryption keys in the config files. +For that `autorestic` allows passing the backend keys as `ENV` variables, or through an env file. + +The syntax for the `ENV` variables is as follows: `AUTORESTIC_[BACKEND NAME]_KEY`. + +```yaml | autorestic.yaml +backend: + foo: + type: ... + path: ... + key: secret123 # => AUTORESTIC_FOO_KEY=secret123 +``` + +## Example + +This means we could remove `key: secret123` from `.autorestic.yaml` and execute as follows: + +```bash +AUTORESTIC_FOO_KEY=secret123 autorestic backup ... +``` + +## Env file + +Alternatively `autorestic` can load an env file, located next to `autorestic.yml` called `.autorestic.env`. + +```| .autorestic.env +AUTORESTIC_FOO_KEY=secret123 +``` + +after that you can simply use `autorestic` as your are used to. + +> :ToCPrevNext From 2789502c892f6f72b238529e0f41f1190866c7fb Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Mon, 25 Oct 2021 18:02:56 +0200 Subject: [PATCH 09/95] toc --- docs/markdown/_toc.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/markdown/_toc.md b/docs/markdown/_toc.md index 514034b..600055a 100644 --- a/docs/markdown/_toc.md +++ b/docs/markdown/_toc.md @@ -23,6 +23,7 @@ > [Overview](/backend/overview) > [Available Backends](/backend/available) > [Options](/backend/options) +> [Environment](/backend/env) > :Collapse label=CLI > From 6137e31c3b48321940ea6578837703bda117fc98 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Mon, 25 Oct 2021 18:29:59 +0200 Subject: [PATCH 10/95] allow argumentless flags --- docs/markdown/backend/options.md | 4 +++- docs/markdown/location/options.md | 2 ++ internal/config.go | 13 ++++++++++++- internal/location.go | 2 +- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/docs/markdown/backend/options.md b/docs/markdown/backend/options.md index 10c4561..2a49a56 100644 --- a/docs/markdown/backend/options.md +++ b/docs/markdown/backend/options.md @@ -18,6 +18,8 @@ backend: In this example, whenever `autorestic` runs `restic backup` it will append a `--tag abc --tag` to the native command. -For more detail see the [location docs](/location/options) for options, as they are the same +For more detail see the [location docs](/location/options) for options, as they are the same. + +> For flags without arguments you can set them to `true`. They will be handled accordingly. > :ToCPrevNext diff --git a/docs/markdown/location/options.md b/docs/markdown/location/options.md index e0bd0f9..7ac90c6 100644 --- a/docs/markdown/location/options.md +++ b/docs/markdown/location/options.md @@ -18,4 +18,6 @@ locations: In this example, whenever `autorestic` runs `restic backup` it will append a `--tag abc --tag` to the native command. +> For flags without arguments you can set them to `true`. They will be handled accordingly. + > :ToCPrevNext diff --git a/internal/config.go b/internal/config.go index 1c548cf..61502ad 100644 --- a/internal/config.go +++ b/internal/config.go @@ -239,7 +239,18 @@ func getOptions(options Options, key string) []string { var selected []string for k, values := range options[key] { for _, value := range values { - selected = append(selected, fmt.Sprintf("--%s", k), value) + // Bool + asBool, ok := value.(bool) + if ok && asBool { + selected = append(selected, fmt.Sprintf("--%s", k)) + continue + } + // String + asString, ok := value.(string) + if ok { + selected = append(selected, fmt.Sprintf("--%s", k), asString) + continue + } } } return selected diff --git a/internal/location.go b/internal/location.go index aaac32f..7c669a5 100644 --- a/internal/location.go +++ b/internal/location.go @@ -30,7 +30,7 @@ type Hooks struct { Failure HookArray `yaml:"failure,omitempty"` } -type Options map[string]map[string][]string +type Options map[string]map[string][]interface{} type Location struct { name string `yaml:",omitempty"` From 8cd759105fa7efa6713b10e860830486242c8494 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Tue, 26 Oct 2021 15:57:40 +0200 Subject: [PATCH 11/95] env for hooks --- internal/location.go | 13 ++++- internal/metadata/extractor_added.go | 22 ++++++++ internal/metadata/extractor_changeset.go | 57 +++++++++++++++++++ internal/metadata/extractor_parent.go | 22 ++++++++ internal/metadata/extractor_processed.go | 32 +++++++++++ internal/metadata/extractor_snapshot.go | 22 ++++++++ internal/metadata/metadata.go | 72 ++++++++++++++++++++++++ 7 files changed, 239 insertions(+), 1 deletion(-) create mode 100644 internal/metadata/extractor_added.go create mode 100644 internal/metadata/extractor_changeset.go create mode 100644 internal/metadata/extractor_parent.go create mode 100644 internal/metadata/extractor_processed.go create mode 100644 internal/metadata/extractor_snapshot.go create mode 100644 internal/metadata/metadata.go diff --git a/internal/location.go b/internal/location.go index 7c669a5..79f9bce 100644 --- a/internal/location.go +++ b/internal/location.go @@ -10,6 +10,7 @@ import ( "github.com/cupcakearmy/autorestic/internal/colors" "github.com/cupcakearmy/autorestic/internal/lock" + "github.com/cupcakearmy/autorestic/internal/metadata" "github.com/robfig/cron" ) @@ -130,6 +131,9 @@ func (l Location) Backup(cron bool) []error { t := l.getType() options := ExecuteOptions{ Command: "bash", + Envs: map[string]string{ + "AUTORESTIC_LOCATION": l.name, + }, } if err := l.validate(); err != nil { @@ -151,7 +155,7 @@ func (l Location) Backup(cron bool) []error { } // Backup - for _, to := range l.To { + for i, to := range l.To { backend, _ := GetBackend(to) colors.Secondary.Printf("Backend: %s\n", backend.name) env, err := backend.getEnv() @@ -187,6 +191,13 @@ func (l Location) Backup(cron bool) []error { errors = append(errors, err) continue } + + md := metadata.ExtractMetadataFromBackupLog(out) + mdEnv := metadata.MakeEnvFromMetadata(&md) + for k, v := range mdEnv { + options.Envs[k+"_"+fmt.Sprint(i)] = v + options.Envs[k+"_"+strings.ToUpper(backend.name)] = v + } if VERBOSE { colors.Faint.Println(out) } diff --git a/internal/metadata/extractor_added.go b/internal/metadata/extractor_added.go new file mode 100644 index 0000000..2e9a638 --- /dev/null +++ b/internal/metadata/extractor_added.go @@ -0,0 +1,22 @@ +package metadata + +import ( + "regexp" + "strings" +) + +type addedExtractor struct { + re *regexp.Regexp +} + +func (e addedExtractor) Matches(line string) bool { + return e.re.MatchString(line) +} +func (e addedExtractor) Extract(metadata *BackupLogMetadata, line string) { + // Sample line: "Added to the repo: 0 B" + metadata.AddedSize = strings.TrimSpace(e.re.ReplaceAllString(line, "")) +} + +func NewAddedExtractor() MetadatExtractor { + return addedExtractor{regexp.MustCompile(`(?i)^Added to the repo:`)} +} diff --git a/internal/metadata/extractor_changeset.go b/internal/metadata/extractor_changeset.go new file mode 100644 index 0000000..6fe67fa --- /dev/null +++ b/internal/metadata/extractor_changeset.go @@ -0,0 +1,57 @@ +package metadata + +import ( + "regexp" + "strings" +) + +type ChangeSetExtractor struct { + re *regexp.Regexp + cleaner *regexp.Regexp + saver changeSetSaver +} + +func (e ChangeSetExtractor) Matches(line string) bool { + return e.re.MatchString(line) +} +func (e ChangeSetExtractor) Extract(metadata *BackupLogMetadata, line string) { + // Sample line: "Files: 0 new, 0 changed, 2 unmodified" + trimmed := strings.TrimSpace(e.re.ReplaceAllString(line, "")) + splitted := strings.Split(trimmed, ",") + var changeset BackupLogMetadataChangeset = BackupLogMetadataChangeset{} + changeset.Added = e.cleaner.ReplaceAllString(splitted[0], "") + changeset.Changed = e.cleaner.ReplaceAllString(splitted[1], "") + changeset.Unmodified = e.cleaner.ReplaceAllString(splitted[2], "") + e.saver.Save(metadata, changeset) +} + +type changeSetSaver interface { + Save(metadata *BackupLogMetadata, changeset BackupLogMetadataChangeset) +} + +type fileSaver struct{} + +func (f fileSaver) Save(metadata *BackupLogMetadata, changeset BackupLogMetadataChangeset) { + metadata.Files = changeset +} + +type dirsSaver struct{} + +func (d dirsSaver) Save(metadata *BackupLogMetadata, changeset BackupLogMetadataChangeset) { + metadata.Dirs = changeset +} + +func NewFilesExtractor() MetadatExtractor { + return ChangeSetExtractor{ + re: regexp.MustCompile(`(?i)^Files:`), + cleaner: regexp.MustCompile(`[^\d]`), + saver: fileSaver{}, + } +} +func NewDirsExtractor() MetadatExtractor { + return ChangeSetExtractor{ + re: regexp.MustCompile(`(?i)^Dirs:`), + cleaner: regexp.MustCompile(`[^\d]`), + saver: dirsSaver{}, + } +} diff --git a/internal/metadata/extractor_parent.go b/internal/metadata/extractor_parent.go new file mode 100644 index 0000000..d2b3f7d --- /dev/null +++ b/internal/metadata/extractor_parent.go @@ -0,0 +1,22 @@ +package metadata + +import ( + "regexp" + "strings" +) + +type parentSnapshotIDExtractor struct { + re *regexp.Regexp +} + +func (e parentSnapshotIDExtractor) Matches(line string) bool { + return e.re.MatchString(line) +} +func (e parentSnapshotIDExtractor) Extract(metadata *BackupLogMetadata, line string) { + // Sample line: "using parent snapshot c65d9310" + metadata.ParentSnapshotID = strings.TrimSpace(e.re.ReplaceAllString(line, "")) +} + +func NewParentSnapshotIDExtractor() MetadatExtractor { + return parentSnapshotIDExtractor{regexp.MustCompile(`(?i)^using parent snapshot`)} +} diff --git a/internal/metadata/extractor_processed.go b/internal/metadata/extractor_processed.go new file mode 100644 index 0000000..c76b0ec --- /dev/null +++ b/internal/metadata/extractor_processed.go @@ -0,0 +1,32 @@ +package metadata + +import ( + "regexp" + "strings" +) + +type processedExtractor struct { + re *regexp.Regexp + cleaner *regexp.Regexp +} + +func (e processedExtractor) Matches(line string) bool { + return e.re.MatchString(line) +} +func (e processedExtractor) Extract(metadata *BackupLogMetadata, line string) { + // Sample line: "processed 2 files, 24 B in 0:00" + var processed = BackupLogMetadataProcessed{} + split := strings.Split(line, "in") + processed.Duration = strings.TrimSpace(split[1]) + split = strings.Split(split[0], ",") + processed.Files = e.cleaner.ReplaceAllString(split[0], "") + processed.Size = strings.TrimSpace(split[1]) + metadata.Processed = processed +} + +func NewProcessedExtractor() MetadatExtractor { + return processedExtractor{ + regexp.MustCompile(`(?i)^processed \d* files`), + regexp.MustCompile(`(?i)[^\d]`), + } +} diff --git a/internal/metadata/extractor_snapshot.go b/internal/metadata/extractor_snapshot.go new file mode 100644 index 0000000..3099a56 --- /dev/null +++ b/internal/metadata/extractor_snapshot.go @@ -0,0 +1,22 @@ +package metadata + +import ( + "regexp" + "strings" +) + +type snapshotExtractor struct { + re *regexp.Regexp +} + +func (e snapshotExtractor) Matches(line string) bool { + return e.re.MatchString(line) +} +func (e snapshotExtractor) Extract(metadata *BackupLogMetadata, line string) { + // Sample line: "snapshot 917c7691 saved" + metadata.SnapshotID = strings.Split(line, " ")[1] +} + +func NewSnapshotExtractor() MetadatExtractor { + return snapshotExtractor{regexp.MustCompile(`(?i)^snapshot \w+ saved`)} +} diff --git a/internal/metadata/metadata.go b/internal/metadata/metadata.go new file mode 100644 index 0000000..228cf22 --- /dev/null +++ b/internal/metadata/metadata.go @@ -0,0 +1,72 @@ +package metadata + +import ( + "strings" +) + +type BackupLogMetadataChangeset struct { + Added string + Changed string + Unmodified string +} +type BackupLogMetadataProcessed struct { + Files string + Size string + Duration string +} +type BackupLogMetadata struct { + ParentSnapshotID string + Files BackupLogMetadataChangeset + Dirs BackupLogMetadataChangeset + AddedSize string + Processed BackupLogMetadataProcessed + SnapshotID string +} + +type MetadatExtractor interface { + Matches(line string) bool + Extract(metadata *BackupLogMetadata, line string) +} + +var extractors = []MetadatExtractor{ + NewParentSnapshotIDExtractor(), + NewFilesExtractor(), + NewDirsExtractor(), + NewAddedExtractor(), + NewProcessedExtractor(), + NewSnapshotExtractor(), +} + +func ExtractMetadataFromBackupLog(log string) BackupLogMetadata { + var md BackupLogMetadata + for _, line := range strings.Split(log, "\n") { + line = strings.TrimSpace(line) + for _, extractor := range extractors { + if extractor.Matches(line) { + extractor.Extract(&md, line) + continue + } + } + } + return md +} + +func MakeEnvFromMetadata(metadata *BackupLogMetadata) map[string]string { + env := make(map[string]string) + var prefix = "AUTORESTIC_" + + env[prefix+"SNAPSHOT_ID"] = metadata.SnapshotID + env[prefix+"PARENT_SNAPSHOT_ID"] = metadata.ParentSnapshotID + env[prefix+"FILES_ADDED"] = metadata.Files.Added + env[prefix+"FILES_CHANGED"] = metadata.Files.Changed + env[prefix+"FILES_UNMODIFIED"] = metadata.Files.Unmodified + env[prefix+"DIRS_ADDED"] = metadata.Dirs.Added + env[prefix+"DIRS_CHANGED"] = metadata.Dirs.Changed + env[prefix+"DIRS_UNMODIFIED"] = metadata.Dirs.Unmodified + env[prefix+"ADDED_SIZE"] = metadata.AddedSize + env[prefix+"PROCESSED_FILES"] = metadata.Processed.Files + env[prefix+"PROCESSED_SIZE"] = metadata.Processed.Size + env[prefix+"PROCESSED_DURATION"] = metadata.Processed.Duration + + return env +} From 88198c4fcb3f64930fd535d746524939b9ce1334 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Tue, 26 Oct 2021 15:57:47 +0200 Subject: [PATCH 12/95] docs for hook envs --- docs/markdown/location/hooks.md | 40 ++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/docs/markdown/location/hooks.md b/docs/markdown/location/hooks.md index ed152e1..a2bcf45 100644 --- a/docs/markdown/location/hooks.md +++ b/docs/markdown/location/hooks.md @@ -35,8 +35,46 @@ locations: 2. Run backup 3. `after` hook 4. - `success` hook if no errors were found - - `failure` hook if at least error was encountered + - `failure` hook if at least one error was encountered If the `before` hook encounters errors the backup and `after` hooks will be skipped and only the `failed` hooks will run. +## Environment variables + +All hooks are exposed to the `AUTORESTIC_LOCATION` environment variable, which contains the location name. + +The `after` and `success` hooks have access to additional information with the following syntax: + +```bash +AUTORESTIC_[TYPE]_[I] +AUTORESTIC_[TYPE]_[BACKEND_NAME] +``` + +Every type of metadata is appended with both the name of the backend associated with and the number in which the backends where executed. + +### Available Metadata Types + +- `SNAPSHOT_ID` +- `PARENT_SNAPSHOT_ID` +- `FILES_ADDED` +- `FILES_CHANGED` +- `FILES_UNMODIFIED` +- `DIRS_ADDED` +- `DIRS_CHANGED` +- `DIRS_UNMODIFIED` +- `ADDED_SIZE` +- `PROCESSED_FILES` +- `PROCESSED_SIZE` +- `PROCESSED_DURATION` + +#### Example + +Assuming you have a location `bar` that backs up to a single backend named `foo` you could expect the following env variables: + +```bash +AUTORESTIC_LOCATION=bar +AUTORESTIC_FILES_ADDED_0=42 +AUTORESTIC_FILES_ADDED_FOO=42 +``` + > :ToCPrevNext From 0b5f4017e477a8eb939bda85d9434fceb4fbf799 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Tue, 26 Oct 2021 15:59:49 +0200 Subject: [PATCH 13/95] version bump --- internal/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/config.go b/internal/config.go index 61502ad..f63b351 100644 --- a/internal/config.go +++ b/internal/config.go @@ -16,7 +16,7 @@ import ( "github.com/spf13/viper" ) -const VERSION = "1.2.0" +const VERSION = "1.3.0" var CI bool = false var VERBOSE bool = false From 7874512ec08b9585a9d51f5bacd57e9a3a98c56d Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Tue, 26 Oct 2021 16:02:30 +0200 Subject: [PATCH 14/95] changelog --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 869e692..bf2ecb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.3.0] - 2021-10-26 + +### Added + +- Pass restic backup metadata as ENV to hooks +- Support for `XDG_CONFIG_HOME` and `${HOME}/.config` as default locations for `.autorestic.yaml` file. +- Binary restic flags are now supported +- Pass encryption keys from env variables or files. + ## [1.2.0] - 2021-08-05 ### Added From 83905d2993fc41a61d5a9537df4a7d668d27dc95 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Thu, 28 Oct 2021 17:29:32 +0200 Subject: [PATCH 15/95] specific location --- cmd/backup.go | 10 ++++++++-- internal/config.go | 18 ++++++++---------- internal/location.go | 20 +++++++++++++++++--- 3 files changed, 33 insertions(+), 15 deletions(-) diff --git a/cmd/backup.go b/cmd/backup.go index 53c875d..e33af34 100644 --- a/cmd/backup.go +++ b/cmd/backup.go @@ -2,6 +2,7 @@ package cmd import ( "fmt" + "strings" "github.com/cupcakearmy/autorestic/internal" "github.com/cupcakearmy/autorestic/internal/colors" @@ -22,8 +23,13 @@ var backupCmd = &cobra.Command{ CheckErr(err) errors := 0 for _, name := range selected { - location, _ := internal.GetLocation(name) - errs := location.Backup(false) + var splitted = strings.Split(name, "@") + var specificBackend = "" + if len(splitted) > 1 { + specificBackend = splitted[1] + } + location, _ := internal.GetLocation(splitted[0]) + errs := location.Backup(false, specificBackend) for err := range errs { colors.Error.Println(err) errors++ diff --git a/internal/config.go b/internal/config.go index f63b351..c3c1054 100644 --- a/internal/config.go +++ b/internal/config.go @@ -185,20 +185,18 @@ func GetAllOrSelected(cmd *cobra.Command, backends bool) ([]string, error) { selected, _ = cmd.Flags().GetStringSlice("location") } for _, s := range selected { - found := false + var splitted = strings.Split(s, "@") for _, l := range list { - if l == s { - found = true - break + if l == splitted[0] { + goto found } } - if !found { - if backends { - return nil, fmt.Errorf("invalid backend \"%s\"", s) - } else { - return nil, fmt.Errorf("invalid location \"%s\"", s) - } + if backends { + return nil, fmt.Errorf("invalid backend \"%s\"", s) + } else { + return nil, fmt.Errorf("invalid location \"%s\"", s) } + found: } if len(selected) == 0 { diff --git a/internal/location.go b/internal/location.go index 79f9bce..343b582 100644 --- a/internal/location.go +++ b/internal/location.go @@ -125,8 +125,9 @@ func (l Location) getPath() (string, error) { return "", fmt.Errorf("could not get path for location \"%s\"", l.name) } -func (l Location) Backup(cron bool) []error { +func (l Location) Backup(cron bool, specificBackend string) []error { var errors []error + var backends []string colors.PrimaryPrint(" Backing up location \"%s\" ", l.name) t := l.getType() options := ExecuteOptions{ @@ -155,7 +156,20 @@ func (l Location) Backup(cron bool) []error { } // Backup - for i, to := range l.To { + if specificBackend == "" { + backends = l.To + } else { + for _, b := range l.To { + if b == specificBackend { + backends = []string{b} + goto backup + } + } + errors = append(errors, fmt.Errorf("backup location \"%s\" has no backend \"%s\"", l.name, specificBackend)) + return errors + } +backup: + for i, to := range backends { backend, _ := GetBackend(to) colors.Secondary.Printf("Backend: %s\n", backend.name) env, err := backend.getEnv() @@ -338,7 +352,7 @@ func (l Location) RunCron() error { now := time.Now() if now.After(next) { lock.SetCron(l.name, now.Unix()) - l.Backup(true) + l.Backup(true, "") } else { if !CRON_LEAN { colors.Body.Printf("Skipping \"%s\", not due yet.\n", l.name) From 1628384e1f553a82331afc5374d4f4ad01ba16d6 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Thu, 28 Oct 2021 17:35:51 +0200 Subject: [PATCH 16/95] docs --- docs/markdown/cli/backup.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/markdown/cli/backup.md b/docs/markdown/cli/backup.md index ddbdd0e..f260fcb 100644 --- a/docs/markdown/cli/backup.md +++ b/docs/markdown/cli/backup.md @@ -14,4 +14,12 @@ autorestic backup -a autorestic backup -l foo -l bar ``` +## Specific location + +`autorestic` also allows selecting specific backends for a location with the `location@backend` syntax. + +```bash +autorestic backup -l location@backend +``` + > :ToCPrevNext From fb6217d868be29964b8d42bfa5afa1621d246288 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Thu, 28 Oct 2021 18:09:38 +0200 Subject: [PATCH 17/95] docs for global flags --- docs/markdown/backend/options.md | 8 +----- docs/markdown/location/options.md | 46 ++++++++++++++++++++++++++++--- 2 files changed, 43 insertions(+), 11 deletions(-) diff --git a/docs/markdown/backend/options.md b/docs/markdown/backend/options.md index 2a49a56..63227dc 100644 --- a/docs/markdown/backend/options.md +++ b/docs/markdown/backend/options.md @@ -1,8 +1,6 @@ # Options -For the `backup` and `forget` commands you can pass any native flags to `restic`. - -> It is also possible to set options for an [a specific location](/location/options). +> ℹ️ For more detail see the [location docs](/location/options) for options, as they are the same. ```yaml backend: @@ -18,8 +16,4 @@ backend: In this example, whenever `autorestic` runs `restic backup` it will append a `--tag abc --tag` to the native command. -For more detail see the [location docs](/location/options) for options, as they are the same. - -> For flags without arguments you can set them to `true`. They will be handled accordingly. - > :ToCPrevNext diff --git a/docs/markdown/location/options.md b/docs/markdown/location/options.md index 7ac90c6..16d0260 100644 --- a/docs/markdown/location/options.md +++ b/docs/markdown/location/options.md @@ -1,8 +1,32 @@ # Options -For the `backup` and `forget` commands you can pass any native flags to `restic`. +For the `backup` and `forget` commands you can pass any native flags to `restic`. In addition you can specify flags for every command with `all`. -> It is also possible to set options for an [entire backend](/backend/options). +If flags don't start with `-` they will get prefixed with `--`. + +Flags without arguments can be set to `true`. They will be handled accordingly. + +> ℹ️ It is also possible to set options for an [entire backend](/backend/options) or globally (see below). + +```yaml +locations: + foo: + # ... + options: + all: + some-flag: 123 + # Equivalent to + --some-flag: 123 + backup: + boolean-flag: true + tag: + - foo + - bar +``` + +## Example + +In this example, whenever `autorestic` runs `restic backup` it will append a `--tag abc --tag` to the native command. ```yaml locations: @@ -16,8 +40,22 @@ locations: - bar ``` -In this example, whenever `autorestic` runs `restic backup` it will append a `--tag abc --tag` to the native command. +## Global Options -> For flags without arguments you can set them to `true`. They will be handled accordingly. +It is possible to specify global flags that will be run every time restic is invoked. To do so specify them under `global` in your config file. + +```yaml +global: + all: + cache-dir: ~/restic + backup: + tag: + - foo + +backends: + # ... +locations: + # ... +``` > :ToCPrevNext From 440609220cc313402ff84bbe6a482cba5b8e4d4f Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Thu, 28 Oct 2021 18:10:14 +0200 Subject: [PATCH 18/95] support for global flags --- internal/config.go | 31 ++++++++++++++++++++++++++----- internal/location.go | 2 -- internal/utils.go | 3 +++ 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/internal/config.go b/internal/config.go index c3c1054..1e34d31 100644 --- a/internal/config.go +++ b/internal/config.go @@ -22,10 +22,14 @@ var CI bool = false var VERBOSE bool = false var CRON_LEAN bool = false +type OptionMap map[string][]interface{} +type Options map[string]OptionMap + type Config struct { Extras interface{} `yaml:"extras"` Locations map[string]Location `yaml:"locations"` Backends map[string]Backend `yaml:"backends"` + Global Options `yaml:"global"` } var once sync.Once @@ -233,23 +237,40 @@ func (c *Config) SaveConfig() error { return viper.WriteConfig() } -func getOptions(options Options, key string) []string { - var selected []string - for k, values := range options[key] { +func optionToString(option string) string { + if !strings.HasPrefix(option, "-") { + return "--" + option + } + return option +} + +func appendOptionsToSlice(str *[]string, options OptionMap) { + for key, values := range options { for _, value := range values { // Bool asBool, ok := value.(bool) if ok && asBool { - selected = append(selected, fmt.Sprintf("--%s", k)) + *str = append(*str, optionToString(key)) continue } // String asString, ok := value.(string) if ok { - selected = append(selected, fmt.Sprintf("--%s", k), asString) + *str = append(*str, optionToString(key), asString) continue } } } +} + +func getOptions(options Options, key string) []string { + var selected []string + var keys = []string{"all"} + if key != "" { + keys = append(keys, key) + } + for _, key := range keys { + appendOptionsToSlice(&selected, options[key]) + } return selected } diff --git a/internal/location.go b/internal/location.go index 343b582..7881e72 100644 --- a/internal/location.go +++ b/internal/location.go @@ -31,8 +31,6 @@ type Hooks struct { Failure HookArray `yaml:"failure,omitempty"` } -type Options map[string]map[string][]interface{} - type Location struct { name string `yaml:",omitempty"` From string `yaml:"from,omitempty"` diff --git a/internal/utils.go b/internal/utils.go index 9a73a05..7756677 100644 --- a/internal/utils.go +++ b/internal/utils.go @@ -53,6 +53,9 @@ func ExecuteCommand(options ExecuteOptions, args ...string) (string, error) { func ExecuteResticCommand(options ExecuteOptions, args ...string) (string, error) { options.Command = RESTIC_BIN + var c = GetConfig() + var optionsAsString = getOptions(c.Global, "") + args = append(optionsAsString, args...) return ExecuteCommand(options, args...) } From efd4a7dfea53314b6c176a720398f7c5570c33b5 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Thu, 28 Oct 2021 18:10:33 +0200 Subject: [PATCH 19/95] version bump --- internal/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/config.go b/internal/config.go index 1e34d31..3cf5cca 100644 --- a/internal/config.go +++ b/internal/config.go @@ -16,7 +16,7 @@ import ( "github.com/spf13/viper" ) -const VERSION = "1.3.0" +const VERSION = "1.4.0" var CI bool = false var VERBOSE bool = false From 6be0a80b29ed8d69463532b7603eca63b7b6fe2b Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Fri, 29 Oct 2021 18:35:21 +0200 Subject: [PATCH 20/95] use built in function --- internal/location.go | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/internal/location.go b/internal/location.go index 7881e72..cf75ce1 100644 --- a/internal/location.go +++ b/internal/location.go @@ -157,16 +157,13 @@ func (l Location) Backup(cron bool, specificBackend string) []error { if specificBackend == "" { backends = l.To } else { - for _, b := range l.To { - if b == specificBackend { - backends = []string{b} - goto backup - } + if l.hasBackend(specificBackend) { + backends = []string{specificBackend} + } else { + errors = append(errors, fmt.Errorf("backup location \"%s\" has no backend \"%s\"", l.name, specificBackend)) + return errors } - errors = append(errors, fmt.Errorf("backup location \"%s\" has no backend \"%s\"", l.name, specificBackend)) - return errors } -backup: for i, to := range backends { backend, _ := GetBackend(to) colors.Secondary.Printf("Backend: %s\n", backend.name) From 4055ebf8e8779fd137aaafcde19a06716402ceda Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Fri, 29 Oct 2021 18:35:24 +0200 Subject: [PATCH 21/95] changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf2ecb0..900a8fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.4.0] + +- Allow specify to specify a backend for location backup +- Global restic flags + ## [1.3.0] - 2021-10-26 ### Added From c2f9ed920427de77f3621b7212f40485d51ed991 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sat, 30 Oct 2021 13:01:31 +0200 Subject: [PATCH 22/95] multiple paths --- internal/config.go | 3 ++- internal/location.go | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/internal/config.go b/internal/config.go index 3cf5cca..a1733c9 100644 --- a/internal/config.go +++ b/internal/config.go @@ -81,7 +81,8 @@ func (c *Config) Describe() { var tmp string colors.PrimaryPrint(`Location: "%s"`, name) - colors.PrintDescription("From", l.From) + // TODO: Add more info + // colors.PrintDescription("From", l.From) tmp = "" for _, to := range l.To { diff --git a/internal/location.go b/internal/location.go index cf75ce1..a786b66 100644 --- a/internal/location.go +++ b/internal/location.go @@ -20,6 +20,7 @@ const ( TypeLocal LocationType = "local" TypeVolume LocationType = "volume" VolumePrefix string = "volume:" + TagPrefix string = "ar:" ) type HookArray = []string @@ -33,7 +34,7 @@ type Hooks struct { type Location struct { name string `yaml:",omitempty"` - From string `yaml:"from,omitempty"` + From []string `yaml:"from,omitempty"` To []string `yaml:"to,omitempty"` Hooks Hooks `yaml:"hooks,omitempty"` Cron string `yaml:"cron,omitempty"` @@ -179,8 +180,9 @@ func (l Location) Backup(cron bool, specificBackend string) []error { cmd = append(cmd, lFlags...) cmd = append(cmd, bFlags...) if cron { - cmd = append(cmd, "--tag", "cron") + cmd = append(cmd, "--tag", TagPrefix+"cron") } + cmd = append(cmd, "--tag", TagPrefix+"location:"+l.name) cmd = append(cmd, ".") backupOptions := ExecuteOptions{ Dir: options.Dir, From 246e6fc0d807e966512ccdf81ee0e923ab66f115 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sat, 30 Oct 2021 13:48:44 +0200 Subject: [PATCH 23/95] enable generic env variables --- docs/markdown/backend/available.md | 2 ++ docs/markdown/backend/env.md | 57 +++++++++++++++++++++++------- internal/backend.go | 35 +++++++++--------- 3 files changed, 62 insertions(+), 32 deletions(-) diff --git a/docs/markdown/backend/available.md b/docs/markdown/backend/available.md index 88bccf0..cf692c4 100644 --- a/docs/markdown/backend/available.md +++ b/docs/markdown/backend/available.md @@ -4,6 +4,8 @@ In theory [all the restic backends](https://restic.readthedocs.io/en/stable/030_ Those tested are the following: +> ℹ️ You can also [specify the `env` variables in a config file](/backend/env) to separate them from the config file. + ## Local ```yaml diff --git a/docs/markdown/backend/env.md b/docs/markdown/backend/env.md index 4831c13..f66784e 100644 --- a/docs/markdown/backend/env.md +++ b/docs/markdown/backend/env.md @@ -1,36 +1,67 @@ # Environment -> ⚠ Available since version `v1.3.0` +> ⚠ Available since version `v1.4.0` Sometimes it's favorable not having the encryption keys in the config files. -For that `autorestic` allows passing the backend keys as `ENV` variables, or through an env file. +For that `autorestic` allows passing the env variables to backend password as `ENV` variables, or through an env file. +You can also pass whatever `env` variable to restic by prefixing it with `AUTORESTIC_[BACKEND NAME]_`. -The syntax for the `ENV` variables is as follows: `AUTORESTIC_[BACKEND NAME]_KEY`. +> ℹ️ Env variables and file overwrite the config file in the following order: +> +> Env Variables > Env File (`.autorestic.env`) > Config file (`.autorestic.yaml`) + +## Env file + +Alternatively `autorestic` can load an env file, located next to `.autorestic.yml` called `.autorestic.env`. + +``` +AUTORESTIC_FOO_RESTIC_PASSWORD=secret123 +``` + +### Example with repository password + +The syntax for the `ENV` variables is as follows: `AUTORESTIC_[BACKEND NAME]_RESTIC_PASSWORD`. ```yaml | autorestic.yaml backend: foo: type: ... path: ... - key: secret123 # => AUTORESTIC_FOO_KEY=secret123 + key: secret123 # => AUTORESTIC_FOO_RESTIC_PASSWORD=secret123 ``` -## Example - This means we could remove `key: secret123` from `.autorestic.yaml` and execute as follows: ```bash -AUTORESTIC_FOO_KEY=secret123 autorestic backup ... +AUTORESTIC_FOO_RESTIC_PASSWORD=secret123 autorestic backup ... ``` -## Env file +### Example with Backblaze B2 -Alternatively `autorestic` can load an env file, located next to `autorestic.yml` called `.autorestic.env`. - -```| .autorestic.env -AUTORESTIC_FOO_KEY=secret123 +```yaml | autorestic.yaml +backends: + bb: + type: b2 + path: myBucket + key: myPassword + env: + B2_ACCOUNT_ID: 123 + B2_ACCOUNT_KEY: 456 ``` -after that you can simply use `autorestic` as your are used to. +You could create an `.autorestic.env` or pass the following `ENV` variables to autorestic: + +``` +AUTORESTIC_BB_RESTIC_PASSWORD=myPassword +AUTORESTIC_BB_B2_ACCOUNT_ID=123 +AUTORESTIC_BB_B2_ACCOUNT_KEY=456 +``` + +```yaml | autorestic.yaml +backends: + bb: + type: b2 + path: myBucket +``` > :ToCPrevNext diff --git a/internal/backend.go b/internal/backend.go index 8116d44..e60c709 100644 --- a/internal/backend.go +++ b/internal/backend.go @@ -58,20 +58,27 @@ func (b Backend) generateRepo() (string, error) { func (b Backend) getEnv() (map[string]string, error) { env := make(map[string]string) + // Key if b.Key != "" { env["RESTIC_PASSWORD"] = b.Key - } else { - key, err := b.getKey() - if err != nil { - return nil, err - } - env["RESTIC_PASSWORD"] = key } + + // From config file repo, err := b.generateRepo() env["RESTIC_REPOSITORY"] = repo for key, value := range b.Env { env[strings.ToUpper(key)] = value } + + // From Envfile and passed as env + var prefix = "AUTORESTIC_" + strings.ToUpper(b.name) + "_" + for _, variable := range os.Environ() { + var splitted = strings.SplitN(variable, "=", 2) + if strings.HasPrefix(splitted[0], prefix) { + env[strings.TrimPrefix(splitted[0], prefix)] = splitted[1] + } + } + return env, err } @@ -85,17 +92,6 @@ func generateRandomKey() string { return key } -func (b Backend) getKey() (string, error) { - if b.Key != "" { - return b.Key, nil - } - keyName := "AUTORESTIC_" + strings.ToUpper(b.name) + "_KEY" - if key, found := os.LookupEnv(keyName); found { - return key, nil - } - return "", fmt.Errorf("no key found for backend \"%s\"", b.name) -} - func (b Backend) validate() error { if b.Type == "" { return fmt.Errorf(`Backend "%s" has no "type"`, b.name) @@ -105,8 +101,9 @@ func (b Backend) validate() error { } if b.Key == "" { // Check if key is set in environment - if _, err := b.getKey(); err != nil { - // If not generate a new one + env, _ := b.getEnv() + if _, found := env["RESTIC_PASSWORD"]; !found { + // No key set in config file or env => generate random key and save file key := generateRandomKey() b.Key = key c := GetConfig() From 3b99e301e9dcf0d2ebff2449abcd21525f26367f Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sat, 30 Oct 2021 14:30:53 +0200 Subject: [PATCH 24/95] only use wget --- docs/markdown/installation.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/markdown/installation.md b/docs/markdown/installation.md index 7f7e3fc..a6a9a2a 100644 --- a/docs/markdown/installation.md +++ b/docs/markdown/installation.md @@ -2,10 +2,10 @@ Linux & macOS. Windows is not supported. If you have problems installing please open an issue :) -Autorestic requires `curl`, `wget` and `bzip2` to be installed. For most systems these should be already installed. +Autorestic requires `bash`, `wget` and `bzip2` to be installed. For most systems these should be already installed. ```bash -curl -s https://raw.githubusercontent.com/CupCakeArmy/autorestic/master/install.sh | bash +wget -qO - https://raw.githubusercontent.com/CupCakeArmy/autorestic/master/install.sh | bash ``` ## Alternatives From a7944aed1f95a2df8c655d33f0a9becdf560fd15 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sat, 30 Oct 2021 14:36:16 +0200 Subject: [PATCH 25/95] don't install restic as default --- cmd/uninstall.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/uninstall.go b/cmd/uninstall.go index 50f774c..e3e955f 100644 --- a/cmd/uninstall.go +++ b/cmd/uninstall.go @@ -9,12 +9,12 @@ var uninstallCmd = &cobra.Command{ Use: "uninstall", Short: "Uninstall restic and autorestic", Run: func(cmd *cobra.Command, args []string) { - noRestic, _ := cmd.Flags().GetBool("no-restic") - bins.Uninstall(!noRestic) + restic, _ := cmd.Flags().GetBool("restic") + bins.Uninstall(restic) }, } func init() { rootCmd.AddCommand(uninstallCmd) - uninstallCmd.Flags().Bool("no-restic", false, "do not uninstall restic.") + uninstallCmd.Flags().Bool("restic", false, "also uninstall restic.") } From 92b1577634fef2a4609431009a8d33a4a9e9cc0b Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sat, 30 Oct 2021 14:36:25 +0200 Subject: [PATCH 26/95] use wget --- docs/markdown/quick.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/markdown/quick.md b/docs/markdown/quick.md index 231d184..574bc03 100644 --- a/docs/markdown/quick.md +++ b/docs/markdown/quick.md @@ -3,7 +3,7 @@ ## Installation ```bash -curl -s https://raw.githubusercontent.com/CupCakeArmy/autorestic/master/install.sh | bash +wget -qO - https://raw.githubusercontent.com/CupCakeArmy/autorestic/master/install.sh | bash ``` See [installation](/installation) for alternative options. From 11d1da746840ec2884a0c89bf4dc77fb092a0dc4 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sat, 30 Oct 2021 14:38:53 +0200 Subject: [PATCH 27/95] use wget --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index de473a4..2638498 100755 --- a/install.sh +++ b/install.sh @@ -31,7 +31,7 @@ else fi echo $ARCH -curl -s https://api.github.com/repos/cupcakearmy/autorestic/releases/latest \ +wget -qO - https://api.github.com/repos/cupcakearmy/autorestic/releases/latest \ | grep "browser_download_url.*_${OS}_${ARCH}" \ | cut -d : -f 2,3 \ | tr -d \" \ From 8c30134f7c18cc08693d95d776354da1447453e2 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sat, 30 Oct 2021 14:50:27 +0200 Subject: [PATCH 28/95] error handling for upgrade and uninstall --- cmd/upgrade.go | 6 +++--- internal/bins/bins.go | 24 ++++++++++++++++-------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/cmd/upgrade.go b/cmd/upgrade.go index f2a0dc7..b6bc15e 100644 --- a/cmd/upgrade.go +++ b/cmd/upgrade.go @@ -9,13 +9,13 @@ var upgradeCmd = &cobra.Command{ Use: "upgrade", Short: "Upgrade autorestic and restic", Run: func(cmd *cobra.Command, args []string) { - noRestic, _ := cmd.Flags().GetBool("no-restic") - err := bins.Upgrade(!noRestic) + restic, _ := cmd.Flags().GetBool("restic") + err := bins.Upgrade(restic) CheckErr(err) }, } func init() { rootCmd.AddCommand(upgradeCmd) - upgradeCmd.Flags().Bool("no-restic", false, "also update restic") + upgradeCmd.Flags().Bool("restic", true, "also update restic") } diff --git a/internal/bins/bins.go b/internal/bins/bins.go index 87e9488..27c640c 100644 --- a/internal/bins/bins.go +++ b/internal/bins/bins.go @@ -47,11 +47,11 @@ func dlJSON(url string) (GithubRelease, error) { func Uninstall(restic bool) error { if err := os.Remove(path.Join(INSTALL_PATH, "autorestic")); err != nil { - colors.Error.Println(err) + return err } if restic { if err := os.Remove(path.Join(INSTALL_PATH, "restic")); err != nil { - colors.Error.Println(err) + return err } } return nil @@ -79,11 +79,15 @@ func downloadAndInstallAsset(body GithubRelease, name string) error { return err } defer tmp.Close() - tmp.Chmod(0755) - io.Copy(tmp, bz) + if err := tmp.Chmod(0755); err != nil { + return err + } + if _, err := io.Copy(tmp, bz); err != nil { + return err + } to := path.Join(INSTALL_PATH, name) - os.Remove(to) // Delete if current, ignore error if file does not exits. + defer os.Remove(to) // Delete if current, ignore error if file does not exits. if err := os.Rename(tmp.Name(), to); err != nil { return nil } @@ -121,9 +125,11 @@ func Upgrade(restic bool) error { // Upgrade restic if restic { if err := InstallRestic(); err != nil { - colors.Error.Println(err) + return err + } + if err := upgradeRestic(); err != nil { + return err } - upgradeRestic() } // Upgrade self @@ -140,7 +146,9 @@ func Upgrade(restic bool) error { return err } if current.LT(latest) { - downloadAndInstallAsset(body, "autorestic") + if err := downloadAndInstallAsset(body, "autorestic"); err != nil { + return err + } colors.Success.Println("Updated autorestic") } else { colors.Body.Println("Already up to date") From 439076d7ab5196b76f8c7401b785a65296d61923 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sat, 30 Oct 2021 14:54:41 +0200 Subject: [PATCH 29/95] chengelog --- CHANGELOG.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 900a8fa..9341c44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,22 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [1.4.0] +## [1.4.0] - 2021-10-30 + +### Added - Allow specify to specify a backend for location backup - Global restic flags +- Generic ENV support for backends + +### Changed + +- Install now only requires `wget` +- Env variable for the `KEY` has been renamed from `AUTORESTIC_[BACKEND NAME]_KEY` -> `AUTORESTIC_[BACKEND NAME]_RESTIC_PASSWORD` + +### Fixed + +- Error handling during upgrade & uninstall ## [1.3.0] - 2021-10-26 From d78fbb66502bdbdcc14c1e3e4b3dd1f416780580 Mon Sep 17 00:00:00 2001 From: n <67550725+n194@users.noreply.github.com> Date: Sun, 31 Oct 2021 19:40:53 +0900 Subject: [PATCH 30/95] Remove credit from AUR --- docs/markdown/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/markdown/installation.md b/docs/markdown/installation.md index a6a9a2a..044147e 100644 --- a/docs/markdown/installation.md +++ b/docs/markdown/installation.md @@ -20,6 +20,6 @@ If you are on macOS you can install through brew: `brew install autorestic`. ### AUR -If you are on Arch there is an [AUR Package](https://aur.archlinux.org/packages/autorestic-bin/) by @n194. +If you are on Arch there is an [AUR Package](https://aur.archlinux.org/packages/autorestic-bin/) (looking for maintainers). > :ToCPrevNext From ac756dfbde3a92cfc1ef836d0b98fafd270e05b6 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 31 Oct 2021 22:31:31 +0100 Subject: [PATCH 31/95] bug not showing error messages --- cmd/backup.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/backup.go b/cmd/backup.go index e33af34..38d3fe1 100644 --- a/cmd/backup.go +++ b/cmd/backup.go @@ -30,7 +30,7 @@ var backupCmd = &cobra.Command{ } location, _ := internal.GetLocation(splitted[0]) errs := location.Backup(false, specificBackend) - for err := range errs { + for _, err := range errs { colors.Error.Println(err) errors++ } From 2c46f0da0c65c5437bb8c957b4a2952916e0f869 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 31 Oct 2021 22:31:47 +0100 Subject: [PATCH 32/95] restore arg help --- cmd/restore.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cmd/restore.go b/cmd/restore.go index 8237199..f22a1dd 100644 --- a/cmd/restore.go +++ b/cmd/restore.go @@ -9,8 +9,9 @@ import ( ) var restoreCmd = &cobra.Command{ - Use: "restore", + Use: "restore [snapshot id]", Short: "Restore backup for location", + Args: cobra.MaximumNArgs(1), Run: func(cmd *cobra.Command, args []string) { err := lock.Lock() CheckErr(err) @@ -24,7 +25,11 @@ var restoreCmd = &cobra.Command{ target, _ := cmd.Flags().GetString("to") from, _ := cmd.Flags().GetString("from") force, _ := cmd.Flags().GetBool("force") - err = l.Restore(target, from, force) + snapshot := "" + if len(args) > 0 { + snapshot = args[0] + } + err = l.Restore(target, from, force, snapshot) CheckErr(err) }, } From 6817f494ef758e4b273e994a55dedf03c9df70bc Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 31 Oct 2021 22:32:01 +0100 Subject: [PATCH 33/95] util to check if volume exists --- internal/utils.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/utils.go b/internal/utils.go index 7756677..52172c8 100644 --- a/internal/utils.go +++ b/internal/utils.go @@ -77,3 +77,9 @@ func CopyFile(from, to string) error { } return nil } + +func CheckIfVolumeExists(volume string) bool { + out, err := ExecuteCommand(ExecuteOptions{Command: "docker"}, "volume", "inspect", volume) + fmt.Println(out) + return err == nil +} From bcfc734cd1d47ec2fac923baf64dd6041bc074c7 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 31 Oct 2021 22:32:30 +0100 Subject: [PATCH 34/95] describe multiple sources --- internal/config.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/internal/config.go b/internal/config.go index a1733c9..b6ea2e0 100644 --- a/internal/config.go +++ b/internal/config.go @@ -81,8 +81,11 @@ func (c *Config) Describe() { var tmp string colors.PrimaryPrint(`Location: "%s"`, name) - // TODO: Add more info - // colors.PrintDescription("From", l.From) + tmp = "" + for _, path := range l.From { + tmp += fmt.Sprintf("\t%s %s\n", colors.Success.Sprint("←"), path) + } + colors.PrintDescription("From", tmp) tmp = "" for _, to := range l.To { From 14dd41d60df72a52ca3820557d6b4131ff6074db Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 31 Oct 2021 22:32:34 +0100 Subject: [PATCH 35/95] docs --- docs/markdown/cli/restore.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/markdown/cli/restore.md b/docs/markdown/cli/restore.md index 2bd1008..17d2bc9 100644 --- a/docs/markdown/cli/restore.md +++ b/docs/markdown/cli/restore.md @@ -1,12 +1,12 @@ # Restore ```bash -autorestic restore [-l, --location] [--from backend] [--to ] [-f, --force] +autorestic restore [-l, --location] [--from backend] [--to ] [-f, --force] [snapshot] ``` -This will restore all the locations to the selected target. If for one location there are more than one backends specified autorestic will take the first one. +This will restore the location to the selected target. If for one location there are more than one backends specified autorestic will take the first one. If no specific snapshot is specified `autorestic` will use `latest`. -The `--to` path has to be empty as no data will be overwritten by default. If you are sure you can pass the `-f, --force` flag and the data will be overwritten in the destination. However note that this will overwrite all the data existent in the backup, not only the 1 file that is missing e.g. +If you are sure you can pass the `-f, --force` flag and the data will be overwritten in the destination. However note that this will overwrite all the data existent in the backup, not only the 1 file that is missing e.g. ## Example From d0b1b86fdd183bd8462531b559f1fe473173a5e6 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 31 Oct 2021 22:32:55 +0100 Subject: [PATCH 36/95] docker runner --- internal/backend.go | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/internal/backend.go b/internal/backend.go index e60c709..7327e0d 100644 --- a/internal/backend.go +++ b/internal/backend.go @@ -157,25 +157,32 @@ func (b Backend) ExecDocker(l Location, args []string) (string, error) { if err != nil { return "", err } - volume := l.getVolumeName() - path, _ := l.getPath() + volume := l.From[0] options := ExecuteOptions{ Command: "docker", Envs: env, } + dir := "/data" docker := []string{ "run", "--rm", "--entrypoint", "ash", - "--workdir", path, - "--volume", volume + ":" + path, + "--workdir", dir, + "--volume", volume + ":" + dir, } + // Use of docker host, not the container host if hostname, err := os.Hostname(); err == nil { docker = append(docker, "--hostname", hostname) } - if b.Type == "local" { + switch b.Type { + case "local": actual := env["RESTIC_REPOSITORY"] docker = append(docker, "--volume", actual+":"+"/repo") env["RESTIC_REPOSITORY"] = "/repo" + case "b2": + case "s3": + // No additional setup needed + default: + return "", fmt.Errorf("Backend type \"%s\" is not supported as volume endpoint", b.Type) } for key, value := range env { docker = append(docker, "--env", key+"="+value) From 4fe241e6f3b955bd7e08301f295790ec098d4918 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 31 Oct 2021 22:33:02 +0100 Subject: [PATCH 37/95] support for multiple sources --- internal/location.go | 155 ++++++++++++++++++++++++------------------- 1 file changed, 88 insertions(+), 67 deletions(-) diff --git a/internal/location.go b/internal/location.go index a786b66..0151802 100644 --- a/internal/location.go +++ b/internal/location.go @@ -17,15 +17,14 @@ import ( type LocationType string const ( - TypeLocal LocationType = "local" - TypeVolume LocationType = "volume" - VolumePrefix string = "volume:" - TagPrefix string = "ar:" + TypeLocal LocationType = "local" + TypeVolume LocationType = "volume" ) type HookArray = []string type Hooks struct { + Dir string `yaml:"dir"` Before HookArray `yaml:"before,omitempty"` After HookArray `yaml:"after,omitempty"` Success HookArray `yaml:"success,omitempty"` @@ -35,6 +34,7 @@ type Hooks struct { type Location struct { name string `yaml:",omitempty"` From []string `yaml:"from,omitempty"` + Type string `yaml:"type,omitempty"` To []string `yaml:"to,omitempty"` Hooks Hooks `yaml:"hooks,omitempty"` Cron string `yaml:"cron,omitempty"` @@ -48,21 +48,32 @@ func GetLocation(name string) (Location, bool) { } func (l Location) validate() error { - if l.From == "" { + if len(l.From) == 0 { return fmt.Errorf(`Location "%s" is missing "from" key`, l.name) } - if l.getType() == TypeLocal { - if from, err := GetPathRelativeToConfig(l.From); err != nil { - return err - } else { - if stat, err := os.Stat(from); err != nil { + t, err := l.getType() + if err != nil { + return err + } + switch t { + case TypeLocal: + for _, path := range l.From { + if from, err := GetPathRelativeToConfig(path); err != nil { return err } else { - if !stat.IsDir() { - return fmt.Errorf("\"%s\" is not valid directory for location \"%s\"", from, l.name) + if stat, err := os.Stat(from); err != nil { + return err + } else { + if !stat.IsDir() { + return fmt.Errorf("\"%s\" is not valid directory for location \"%s\"", from, l.name) + } } } } + case TypeVolume: + if len(l.From) > 1 { + return fmt.Errorf(`location "%s" has more than one docker volume`, l.name) + } } if len(l.To) == 0 { @@ -78,10 +89,17 @@ func (l Location) validate() error { return nil } -func ExecuteHooks(commands []string, options ExecuteOptions) error { +func (l Location) ExecuteHooks(commands []string, options ExecuteOptions) error { if len(commands) == 0 { return nil } + if l.Hooks.Dir != "" { + if dir, err := GetPathRelativeToConfig(l.Hooks.Dir); err != nil { + return err + } else { + options.Dir = dir + } + } colors.Secondary.Println("\nRunning hooks") for _, command := range commands { colors.Body.Println("> " + command) @@ -98,39 +116,38 @@ func ExecuteHooks(commands []string, options ExecuteOptions) error { return nil } -func (l Location) getType() LocationType { - if strings.HasPrefix(l.From, VolumePrefix) { - return TypeVolume +func (l Location) getType() (LocationType, error) { + t := strings.ToLower(l.Type) + if t == "" || t == "local" { + return TypeLocal, nil + } else if t == "volume" { + return TypeVolume, nil } - return TypeLocal + return "", fmt.Errorf("invalid location type \"%s\"", l.Type) } -func (l Location) getVolumeName() string { - return strings.TrimPrefix(l.From, VolumePrefix) +func (l Location) getTag(parts ...string) string { + parts = append([]string{"ar"}, parts...) + return strings.Join(parts, ":") } -func (l Location) getPath() (string, error) { - t := l.getType() - switch t { - case TypeLocal: - if path, err := GetPathRelativeToConfig(l.From); err != nil { - return "", err - } else { - return path, nil - } - case TypeVolume: - return "/volume/" + l.name + "/" + l.getVolumeName(), nil - } - return "", fmt.Errorf("could not get path for location \"%s\"", l.name) +func (l Location) getLocationTag() string { + return l.getTag("location", l.name) } func (l Location) Backup(cron bool, specificBackend string) []error { var errors []error var backends []string colors.PrimaryPrint(" Backing up location \"%s\" ", l.name) - t := l.getType() + t, err := l.getType() + if err != nil { + errors = append(errors, err) + return errors + } + cwd, _ := GetPathRelativeToConfig(".") options := ExecuteOptions{ Command: "bash", + Dir: cwd, Envs: map[string]string{ "AUTORESTIC_LOCATION": l.name, }, @@ -138,18 +155,11 @@ func (l Location) Backup(cron bool, specificBackend string) []error { if err := l.validate(); err != nil { errors = append(errors, err) - colors.Error.Print(err) goto after } - if t == TypeLocal { - dir, _ := GetPathRelativeToConfig(l.From) - colors.Faint.Printf("Executing under: \"%s\"\n", dir) - options.Dir = dir - } - // Hooks - if err := ExecuteHooks(l.Hooks.Before, options); err != nil { + if err := l.ExecuteHooks(l.Hooks.Before, options); err != nil { errors = append(errors, err) goto after } @@ -180,25 +190,35 @@ func (l Location) Backup(cron bool, specificBackend string) []error { cmd = append(cmd, lFlags...) cmd = append(cmd, bFlags...) if cron { - cmd = append(cmd, "--tag", TagPrefix+"cron") + cmd = append(cmd, "--tag", l.getTag("cron")) } - cmd = append(cmd, "--tag", TagPrefix+"location:"+l.name) - cmd = append(cmd, ".") + cmd = append(cmd, "--tag", l.getLocationTag()) backupOptions := ExecuteOptions{ - Dir: options.Dir, Envs: env, } var out string - switch t { case TypeLocal: + for _, from := range l.From { + path, err := GetPathRelativeToConfig(from) + if err != nil { + errors = append(errors, err) + goto after + } + cmd = append(cmd, path) + } out, err = ExecuteResticCommand(backupOptions, cmd...) case TypeVolume: + ok := CheckIfVolumeExists(l.From[0]) + if !ok { + errors = append(errors, fmt.Errorf("volume \"%s\" does not exist", l.From[0])) + continue + } + cmd = append(cmd, "/data") out, err = backend.ExecDocker(l, cmd) } if err != nil { - colors.Error.Println(out) errors = append(errors, err) continue } @@ -215,7 +235,7 @@ func (l Location) Backup(cron bool, specificBackend string) []error { } // After hooks - if err := ExecuteHooks(l.Hooks.After, options); err != nil { + if err := l.ExecuteHooks(l.Hooks.After, options); err != nil { errors = append(errors, err) } @@ -226,22 +246,19 @@ after: } else { commands = l.Hooks.Success } - if err := ExecuteHooks(commands, options); err != nil { + if err := l.ExecuteHooks(commands, options); err != nil { errors = append(errors, err) } - colors.Success.Println("Done") + if len(errors) == 0 { + colors.Success.Println("Done") + } return errors } func (l Location) Forget(prune bool, dry bool) error { colors.PrimaryPrint("Forgetting for location \"%s\"", l.name) - path, err := l.getPath() - if err != nil { - return err - } - for _, to := range l.To { backend, _ := GetBackend(to) colors.Secondary.Printf("For backend \"%s\"\n", backend.name) @@ -254,7 +271,7 @@ func (l Location) Forget(prune bool, dry bool) error { } lFlags := getOptions(l.Options, "forget") bFlags := getOptions(backend.Options, "forget") - cmd := []string{"forget", "--path", path} + cmd := []string{"forget", "--tag", l.getLocationTag()} if prune { cmd = append(cmd, "--prune") } @@ -284,7 +301,7 @@ func (l Location) hasBackend(backend string) bool { return false } -func (l Location) Restore(to, from string, force bool) error { +func (l Location) Restore(to, from string, force bool, snapshot string) error { if from == "" { from = l.To[0] } else if !l.hasBackend(from) { @@ -295,16 +312,20 @@ func (l Location) Restore(to, from string, force bool) error { if err != nil { return err } - colors.PrimaryPrint("Restoring location \"%s\"", l.name) - backend, _ := GetBackend(from) - path, err := l.getPath() - if err != nil { - return nil + if snapshot == "" { + snapshot = "latest" } - colors.Secondary.Println("Restoring lastest snapshot") - colors.Body.Printf("%s → %s.\n", from, path) - switch l.getType() { + + colors.PrimaryPrint("Restoring location \"%s\"", l.name) + backend, _ := GetBackend(from) + colors.Secondary.Printf("Restoring %s@%s → %s\n", snapshot, backend.name, to) + + t, err := l.getType() + if err != nil { + return err + } + switch t { case TypeLocal: // Check if target is empty if !force { @@ -324,9 +345,9 @@ func (l Location) Restore(to, from string, force bool) error { } } } - err = backend.Exec([]string{"restore", "--target", to, "--path", path, "latest"}) + err = backend.Exec([]string{"restore", "--target", to, "--tag", l.getLocationTag(), snapshot}) case TypeVolume: - _, err = backend.ExecDocker(l, []string{"restore", "--target", ".", "--path", path, "latest"}) + _, err = backend.ExecDocker(l, []string{"restore", "--target", "/", "--tag", l.getLocationTag(), snapshot}) } if err != nil { return err From 2826f9586d63f002cb891e3cbf17ee6b520c7bba Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 31 Oct 2021 22:45:03 +0100 Subject: [PATCH 38/95] allow all values from envs --- internal/config.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/internal/config.go b/internal/config.go index 3cf5cca..083f7d2 100644 --- a/internal/config.go +++ b/internal/config.go @@ -253,12 +253,7 @@ func appendOptionsToSlice(str *[]string, options OptionMap) { *str = append(*str, optionToString(key)) continue } - // String - asString, ok := value.(string) - if ok { - *str = append(*str, optionToString(key), asString) - continue - } + *str = append(*str, optionToString(key), fmt.Sprint(value)) } } } From 05c3458a9544ba0c60d0055f397aa4a548f09171 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 31 Oct 2021 22:45:54 +0100 Subject: [PATCH 39/95] version bump --- internal/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/config.go b/internal/config.go index 083f7d2..c51bb79 100644 --- a/internal/config.go +++ b/internal/config.go @@ -16,7 +16,7 @@ import ( "github.com/spf13/viper" ) -const VERSION = "1.4.0" +const VERSION = "1.4.1" var CI bool = false var VERBOSE bool = false From 09cfa4a98e6c7324dfd23d82733300a6b7b83151 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 31 Oct 2021 22:46:37 +0100 Subject: [PATCH 40/95] changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9341c44..1029273 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.4.1] - 2021-10-31 + +### Fixes + +- Numeric values from config files not being passed to env. + ## [1.4.0] - 2021-10-30 ### Added From a68e3e426efcf3f9c3b0ff0c41d2b063199c7408 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 31 Oct 2021 23:07:12 +0100 Subject: [PATCH 41/95] simplify options handling --- internal/config.go | 13 +++++++++++++ internal/location.go | 10 ++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/internal/config.go b/internal/config.go index dce9331..be7118d 100644 --- a/internal/config.go +++ b/internal/config.go @@ -55,6 +55,7 @@ func GetConfig() *Config { config = &Config{} if err := viper.UnmarshalExact(config); err != nil { + colors.Error.Println(err) colors.Error.Println("Could not parse config file!") lock.Unlock() os.Exit(1) @@ -273,3 +274,15 @@ func getOptions(options Options, key string) []string { } return selected } + +func combineOptions(key string, l Location, b Backend) []string { + // Priority: location > backend > global + var options []string + gFlags := getOptions(GetConfig().Global, key) + bFlags := getOptions(b.Options, key) + lFlags := getOptions(l.Options, key) + options = append(options, gFlags...) + options = append(options, bFlags...) + options = append(options, lFlags...) + return options +} diff --git a/internal/location.go b/internal/location.go index 0151802..024252e 100644 --- a/internal/location.go +++ b/internal/location.go @@ -184,11 +184,8 @@ func (l Location) Backup(cron bool, specificBackend string) []error { continue } - lFlags := getOptions(l.Options, "backup") - bFlags := getOptions(backend.Options, "backup") cmd := []string{"backup"} - cmd = append(cmd, lFlags...) - cmd = append(cmd, bFlags...) + cmd = append(cmd, combineOptions("backup", l, backend)...) if cron { cmd = append(cmd, "--tag", l.getTag("cron")) } @@ -269,8 +266,6 @@ func (l Location) Forget(prune bool, dry bool) error { options := ExecuteOptions{ Envs: env, } - lFlags := getOptions(l.Options, "forget") - bFlags := getOptions(backend.Options, "forget") cmd := []string{"forget", "--tag", l.getLocationTag()} if prune { cmd = append(cmd, "--prune") @@ -278,8 +273,7 @@ func (l Location) Forget(prune bool, dry bool) error { if dry { cmd = append(cmd, "--dry-run") } - cmd = append(cmd, lFlags...) - cmd = append(cmd, bFlags...) + cmd = append(cmd, combineOptions("forget", l, backend)...) out, err := ExecuteResticCommand(options, cmd...) if VERBOSE { colors.Faint.Println(out) From cf92d400c2c97d9f8f166d4fdeb16f0a74179db3 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 31 Oct 2021 23:11:06 +0100 Subject: [PATCH 42/95] changelog --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9341c44..aacb2aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.5.0] - 2021-11 + +### Added + +- Support for multiple paths +- Improved error handling + +## [1.4.1] - 2021-10-31 + +### Fixes + +- Numeric values from config files not being passed to env. + ## [1.4.0] - 2021-10-30 ### Added From 0ae374cd450a387aaf3f7088456ba268e43829d9 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 31 Oct 2021 23:35:46 +0100 Subject: [PATCH 43/95] docs --- docs/markdown/_toc.md | 5 +++ docs/markdown/location/docker.md | 12 ++---- .../{upgrade.md => migration/0.x_1.0.md} | 4 +- docs/markdown/migration/1.4_1.5.md | 39 +++++++++++++++++++ 4 files changed, 49 insertions(+), 11 deletions(-) rename docs/markdown/{upgrade.md => migration/0.x_1.0.md} (94%) create mode 100644 docs/markdown/migration/1.4_1.5.md diff --git a/docs/markdown/_toc.md b/docs/markdown/_toc.md index 600055a..bd4e321 100644 --- a/docs/markdown/_toc.md +++ b/docs/markdown/_toc.md @@ -40,6 +40,11 @@ > [Uninstall](/cli/uninstall) > [Upgrade](/cli/upgrade) +> :Collapse label=Migration +> +> [0.x → 1.0](/migration/0.x_1.0) +> [1.4 → 1.5](/migration/1.4_1.5) + [Examples](/examples) [QA](/qa) [Community](/community) diff --git a/docs/markdown/location/docker.md b/docs/markdown/location/docker.md index 3223779..5498dd0 100644 --- a/docs/markdown/location/docker.md +++ b/docs/markdown/location/docker.md @@ -3,7 +3,7 @@ autorestic supports docker volumes directly, without needing them to be mounted to the host filesystem. ```yaml | docker-compose.yml -version: '3.7' +version: '3.8' volumes: data: @@ -18,13 +18,9 @@ services: ```yaml | .autorestic.yml locations: - - name: hello - from: volume:my-data - to: - - remote - -backends: - - name: remote + foo: + from: my-data + type: volume # ... ``` diff --git a/docs/markdown/upgrade.md b/docs/markdown/migration/0.x_1.0.md similarity index 94% rename from docs/markdown/upgrade.md rename to docs/markdown/migration/0.x_1.0.md index 72d79ab..252922d 100644 --- a/docs/markdown/upgrade.md +++ b/docs/markdown/migration/0.x_1.0.md @@ -1,6 +1,4 @@ -# Upgrade - -## From `0.x` to `1.0` +# From `0.x` to `1.0` Most of the config file is remained compatible, however to clean up the backends custom environment variables were moved from the root object to an `env` object. diff --git a/docs/markdown/migration/1.4_1.5.md b/docs/markdown/migration/1.4_1.5.md new file mode 100644 index 0000000..dd74424 --- /dev/null +++ b/docs/markdown/migration/1.4_1.5.md @@ -0,0 +1,39 @@ +# Migration from `1.4` to `1.5` + +## Hooks + +Since `1.5` multiple sources for a location are possible. +For this reason, while before hooks where executed in the folder of the source, now they are executed in the directory of the config `.autorestic.yaml`. + +You can overwrite this behavior with the new `dir` option in the hook section of the config. + +```yaml +locations: + l1: + # ... + from: /foo/bar + hooks: + dir: /foo/bar + before: pwd +``` + +## Docker volumes + +The syntax with docker volumes has changed and needs to be adjusted. + +```yaml +# Before +locations: + foo: + from: volume:my-data +``` + +```yaml +# After +locations: + foo: + from: my-data + type: volume +``` + +> :ToCPrevNext From 90914d2078f881618b70bab58c4e002e066784f6 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 31 Oct 2021 23:35:52 +0100 Subject: [PATCH 44/95] changelog --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1029273..9c4058c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.5.0] - 2021-11 + +### Added + +- Support for multiple paths +- Improved error handling +- Allow for specific snapshot to be restored + +### Changed + +- [Breaking Change] Declaration of docker volumes. See: https://autorestic.vercel.app/migration/1.4_1.5 +- [Breaking Change] Hooks default executing directory now defaults to the config file directory. See: https://autorestic.vercel.app/migration/1.4_1.5 + ## [1.4.1] - 2021-10-31 ### Fixes From 59035da46a1eafcfc9be2a97bf5b999d93446101 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 31 Oct 2021 23:58:08 +0100 Subject: [PATCH 45/95] remove output --- internal/utils.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/utils.go b/internal/utils.go index 52172c8..1bc2b36 100644 --- a/internal/utils.go +++ b/internal/utils.go @@ -79,7 +79,6 @@ func CopyFile(from, to string) error { } func CheckIfVolumeExists(volume string) bool { - out, err := ExecuteCommand(ExecuteOptions{Command: "docker"}, "volume", "inspect", volume) - fmt.Println(out) + _, err := ExecuteCommand(ExecuteOptions{Command: "docker"}, "volume", "inspect", volume) return err == nil } From 3dd3956d644071b7c6aa4e88f329e3fad0d342ab Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Mon, 1 Nov 2021 00:16:54 +0100 Subject: [PATCH 46/95] support for rclone --- internal/backend.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/internal/backend.go b/internal/backend.go index 7327e0d..cf71f75 100644 --- a/internal/backend.go +++ b/internal/backend.go @@ -163,8 +163,10 @@ func (b Backend) ExecDocker(l Location, args []string) (string, error) { Envs: env, } dir := "/data" + args = append([]string{"restic"}, args...) docker := []string{ "run", "--rm", + "--pull", "always", "--entrypoint", "ash", "--workdir", dir, "--volume", volume + ":" + dir, @@ -181,13 +183,23 @@ func (b Backend) ExecDocker(l Location, args []string) (string, error) { case "b2": case "s3": // No additional setup needed + case "rclone": + // Read host rclone config and mount it into the container + configFile, err := ExecuteCommand(ExecuteOptions{Command: "rclone"}, "config", "file") + if err != nil { + return "", err + } + splitted := strings.Split(strings.TrimSpace(configFile), "\n") + configFilePath := splitted[len(splitted)-1] + docker = append(docker, "--volume", configFilePath+":"+"/root/.config/rclone/rclone.conf:ro") + args = append([]string{"apk", "add", "rclone", "&&"}, args...) default: return "", fmt.Errorf("Backend type \"%s\" is not supported as volume endpoint", b.Type) } for key, value := range env { docker = append(docker, "--env", key+"="+value) } - docker = append(docker, "restic/restic", "-c", "restic "+strings.Join(args, " ")) + docker = append(docker, "restic/restic", "-c", strings.Join(args, " ")) out, err := ExecuteCommand(options, docker...) return out, err } From cd7a5cbc137f4b4b3f083f6db62196fcc82a5dcf Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Mon, 1 Nov 2021 00:19:32 +0100 Subject: [PATCH 47/95] also enable azure and google cloud --- internal/backend.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/backend.go b/internal/backend.go index cf71f75..0eb8773 100644 --- a/internal/backend.go +++ b/internal/backend.go @@ -182,6 +182,8 @@ func (b Backend) ExecDocker(l Location, args []string) (string, error) { env["RESTIC_REPOSITORY"] = "/repo" case "b2": case "s3": + case "azure": + case "gs": // No additional setup needed case "rclone": // Read host rclone config and mount it into the container @@ -192,6 +194,7 @@ func (b Backend) ExecDocker(l Location, args []string) (string, error) { splitted := strings.Split(strings.TrimSpace(configFile), "\n") configFilePath := splitted[len(splitted)-1] docker = append(docker, "--volume", configFilePath+":"+"/root/.config/rclone/rclone.conf:ro") + // Install rclone in the container args = append([]string{"apk", "add", "rclone", "&&"}, args...) default: return "", fmt.Errorf("Backend type \"%s\" is not supported as volume endpoint", b.Type) From d3b4915d258209a85cc6a7323fcd4cadacf749b1 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Mon, 1 Nov 2021 09:09:29 +0100 Subject: [PATCH 48/95] deprecation notion --- docs/markdown/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/markdown/installation.md b/docs/markdown/installation.md index 044147e..4f6d0e2 100644 --- a/docs/markdown/installation.md +++ b/docs/markdown/installation.md @@ -20,6 +20,6 @@ If you are on macOS you can install through brew: `brew install autorestic`. ### AUR -If you are on Arch there is an [AUR Package](https://aur.archlinux.org/packages/autorestic-bin/) (looking for maintainers). +~~If you are on Arch there is an [AUR Package](https://aur.archlinux.org/packages/autorestic-bin/) (looking for maintainers).~~ - Deprecated > :ToCPrevNext From c250391f6756db21598530ac1d26f7ac892adbd0 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Mon, 1 Nov 2021 11:19:27 +0100 Subject: [PATCH 49/95] docs --- docs/markdown/location/options.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/markdown/location/options.md b/docs/markdown/location/options.md index 16d0260..af35269 100644 --- a/docs/markdown/location/options.md +++ b/docs/markdown/location/options.md @@ -26,7 +26,7 @@ locations: ## Example -In this example, whenever `autorestic` runs `restic backup` it will append a `--tag abc --tag` to the native command. +In this example, whenever `autorestic` runs `restic backup` it will append a `--tag foo --tag bar` to the native command. ```yaml locations: @@ -40,6 +40,12 @@ locations: - bar ``` +## Priority + +Options can be set globally, on the backends or on the locations. + +The priority is as follows: `location > backend > global`. + ## Global Options It is possible to specify global flags that will be run every time restic is invoked. To do so specify them under `global` in your config file. From 113a97c283fde02a9d4b8f56ccad1514296ebafe Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sat, 6 Nov 2021 22:00:44 +0100 Subject: [PATCH 50/95] add config version to ensure compatibility --- CHANGELOG.md | 6 +++++- docs/markdown/migration/1.4_1.5.md | 8 ++++++++ internal/config.go | 33 ++++++++++++++++++++++++++---- 3 files changed, 42 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c4058c..a179ef3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improved error handling - Allow for specific snapshot to be restored +### Fixed + +- rclone in docker volumes + ### Changed - [Breaking Change] Declaration of docker volumes. See: https://autorestic.vercel.app/migration/1.4_1.5 @@ -20,7 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [1.4.1] - 2021-10-31 -### Fixes +### Fixed - Numeric values from config files not being passed to env. diff --git a/docs/markdown/migration/1.4_1.5.md b/docs/markdown/migration/1.4_1.5.md index dd74424..a94b435 100644 --- a/docs/markdown/migration/1.4_1.5.md +++ b/docs/markdown/migration/1.4_1.5.md @@ -1,5 +1,13 @@ # Migration from `1.4` to `1.5` +## Config files + +- The config file now required to have a version number. This has to be added with `version: 2` at the root. +- Hooks now optionally support `dir: /some/dir` in the [options object](https://pkg.go.dev/github.com/cupcakearmy/autorestic/internal#Hooks). +- Docker volumes don't get prefixed with `volume:` anymore, rather you have to set the `type: volume` in the [location config](https://pkg.go.dev/github.com/cupcakearmy/autorestic/internal#Hooks). + +See detailed instructions below. + ## Hooks Since `1.5` multiple sources for a location are possible. diff --git a/internal/config.go b/internal/config.go index be7118d..82d4a9b 100644 --- a/internal/config.go +++ b/internal/config.go @@ -26,6 +26,7 @@ type OptionMap map[string][]interface{} type Options map[string]OptionMap type Config struct { + Version string `yaml:"version"` Extras interface{} `yaml:"extras"` Locations map[string]Location `yaml:"locations"` Backends map[string]Backend `yaml:"backends"` @@ -35,7 +36,19 @@ type Config struct { var once sync.Once var config *Config +func exitConfig(err error, msg string) { + if err != nil { + colors.Error.Println(err) + } + if msg != "" { + colors.Error.Println(msg) + } + lock.Unlock() + os.Exit(1) +} + func GetConfig() *Config { + if config == nil { once.Do(func() { if err := viper.ReadInConfig(); err == nil { @@ -53,12 +66,24 @@ func GetConfig() *Config { return } + var versionConfig interface{} + viper.UnmarshalKey("version", &versionConfig) + if versionConfig == nil { + exitConfig(nil, "no version specified in config file. please see docs on how to migrate") + } + version, ok := versionConfig.(int) + if !ok { + exitConfig(nil, "version specified in config file is not an int") + } else { + // Check for version + if version != 2 { + exitConfig(nil, "unsupported version number. please check the docs") + } + } + config = &Config{} if err := viper.UnmarshalExact(config); err != nil { - colors.Error.Println(err) - colors.Error.Println("Could not parse config file!") - lock.Unlock() - os.Exit(1) + exitConfig(err, "Could not parse config file!") } }) } From 4126436f7f11607ea274390e91bcc633e44458cf Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 7 Nov 2021 11:42:45 +0100 Subject: [PATCH 51/95] migration docs --- docs/markdown/migration/1.4_1.5.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/markdown/migration/1.4_1.5.md b/docs/markdown/migration/1.4_1.5.md index a94b435..349bc40 100644 --- a/docs/markdown/migration/1.4_1.5.md +++ b/docs/markdown/migration/1.4_1.5.md @@ -1,5 +1,9 @@ # Migration from `1.4` to `1.5` +## ⚠️ Important notes + +The way snapshots are referenced in the `restore` and `prune` commands has been changed. Before they were referenced by the path. Now every backup is tagged and those tags are then referenced in the cli. This means that when running restore and forget commands old backups are not taken into account anymore. + ## Config files - The config file now required to have a version number. This has to be added with `version: 2` at the root. @@ -8,6 +12,15 @@ See detailed instructions below. +## Config Version + +```yaml +version: 2 # Added + +backends: + # ... +``` + ## Hooks Since `1.5` multiple sources for a location are possible. From 170bdb81ad525614d709d99cb9b2f13efffafca0 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 7 Nov 2021 11:48:03 +0100 Subject: [PATCH 52/95] tags --- internal/location.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/location.go b/internal/location.go index 024252e..2b2e4a3 100644 --- a/internal/location.go +++ b/internal/location.go @@ -126,13 +126,13 @@ func (l Location) getType() (LocationType, error) { return "", fmt.Errorf("invalid location type \"%s\"", l.Type) } -func (l Location) getTag(parts ...string) string { +func buildTag(parts ...string) string { parts = append([]string{"ar"}, parts...) return strings.Join(parts, ":") } -func (l Location) getLocationTag() string { - return l.getTag("location", l.name) +func (l Location) getLocationTags() string { + return buildTag("location", l.name) } func (l Location) Backup(cron bool, specificBackend string) []error { @@ -187,9 +187,9 @@ func (l Location) Backup(cron bool, specificBackend string) []error { cmd := []string{"backup"} cmd = append(cmd, combineOptions("backup", l, backend)...) if cron { - cmd = append(cmd, "--tag", l.getTag("cron")) + cmd = append(cmd, "--tag", buildTag("cron")) } - cmd = append(cmd, "--tag", l.getLocationTag()) + cmd = append(cmd, "--tag", l.getLocationTags()) backupOptions := ExecuteOptions{ Envs: env, } @@ -266,7 +266,7 @@ func (l Location) Forget(prune bool, dry bool) error { options := ExecuteOptions{ Envs: env, } - cmd := []string{"forget", "--tag", l.getLocationTag()} + cmd := []string{"forget", "--tag", l.getLocationTags()} if prune { cmd = append(cmd, "--prune") } @@ -339,9 +339,9 @@ func (l Location) Restore(to, from string, force bool, snapshot string) error { } } } - err = backend.Exec([]string{"restore", "--target", to, "--tag", l.getLocationTag(), snapshot}) + err = backend.Exec([]string{"restore", "--target", to, "--tag", l.getLocationTags(), snapshot}) case TypeVolume: - _, err = backend.ExecDocker(l, []string{"restore", "--target", "/", "--tag", l.getLocationTag(), snapshot}) + _, err = backend.ExecDocker(l, []string{"restore", "--target", "/", "--tag", l.getLocationTags(), snapshot}) } if err != nil { return err From c55e91b8ff0bea3db8b32538dff3f9d8526a2727 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sat, 20 Nov 2021 16:55:20 +0100 Subject: [PATCH 53/95] version bump --- internal/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/config.go b/internal/config.go index 82d4a9b..108bd00 100644 --- a/internal/config.go +++ b/internal/config.go @@ -16,7 +16,7 @@ import ( "github.com/spf13/viper" ) -const VERSION = "1.4.1" +const VERSION = "1.5.0" var CI bool = false var VERBOSE bool = false From e94e7030fcf94e9759cf65c52283588169f22e4a Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sat, 20 Nov 2021 16:59:13 +0100 Subject: [PATCH 54/95] docker image --- .dockerignore | 6 ++++++ .github/workflows/build.yml | 36 ++++++++++++++++++++++++++++++++---- Dockerfile | 12 ++++++++++++ 3 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..6d57110 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +* +!**/*.go +!build +!cmd +!internal +!go.* diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4027577..e82998f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,16 +3,44 @@ name: Main on: push: tags: - - 'v*.*.*' + - "v*.*.*" jobs: - build: + docker: + runs-on: ubuntu-latest + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Docker Labels + id: meta + uses: crazy-max/ghaction-docker-meta@v2 + with: + images: cupcakearmy/autorestic + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v2 + with: + platforms: linux/amd64,linux/arm64 + push: true + tags: ${{ steps.meta.outputs.tags }} + + release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: - go-version: '^1.16.3' + go-version: "^1.16.3" - name: Build run: go run build/build.go @@ -25,4 +53,4 @@ jobs: with: files: dist/* env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..65fae81 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM golang:1.16-alpine as builder + +WORKDIR /app +COPY go.* . +RUN go mod download +COPY . . +RUN go build + +FROM alpine +RUN apk add --no-cache restic rclone +COPY --from=builder /app/autorestic /usr/bin/autorestic +CMD [ "autorestic" ] From 8802b74b47a127d8920396528e4251ee6dee76c6 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sat, 20 Nov 2021 17:03:54 +0100 Subject: [PATCH 55/95] changelog and docs --- CHANGELOG.md | 3 ++- docs/markdown/installation.md | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a179ef3..5b5d899 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,13 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [1.5.0] - 2021-11 +## [1.5.0] - 2021-11-20 ### Added - Support for multiple paths - Improved error handling - Allow for specific snapshot to be restored +- Docker image ### Fixed diff --git a/docs/markdown/installation.md b/docs/markdown/installation.md index 4f6d0e2..071e9c5 100644 --- a/docs/markdown/installation.md +++ b/docs/markdown/installation.md @@ -10,6 +10,10 @@ wget -qO - https://raw.githubusercontent.com/CupCakeArmy/autorestic/master/insta ## Alternatives +### Docker + +There is an official docker image over at [cupcakearmy/autorestic](https://hub.docker.com/r/cupcakearmy/autorestic). + ### Manual You can download the right binary from the release page and simply copy it to `/usr/local/bin` or whatever path you prefer. Autoupdates will still work. From ed3c17d678b27925287c0b71f31917abaf19e17f Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sat, 20 Nov 2021 17:09:42 +0100 Subject: [PATCH 56/95] migration docs --- docs/markdown/migration/index.md | 4 ++++ internal/config.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 docs/markdown/migration/index.md diff --git a/docs/markdown/migration/index.md b/docs/markdown/migration/index.md new file mode 100644 index 0000000..624561d --- /dev/null +++ b/docs/markdown/migration/index.md @@ -0,0 +1,4 @@ +# Migration + +- [From 0.x to 1.0](/migration/0.x_1.0) +- [From 1.4 to 1.5](/migration/1.4_1.5) diff --git a/internal/config.go b/internal/config.go index 108bd00..9d5c253 100644 --- a/internal/config.go +++ b/internal/config.go @@ -77,7 +77,7 @@ func GetConfig() *Config { } else { // Check for version if version != 2 { - exitConfig(nil, "unsupported version number. please check the docs") + exitConfig(nil, "unsupported config version number. please check the docs for migration\nhttps://autorestic.vercel.app/migration/") } } From 389f7c25dd3ddd8a530eaa61ef7c333fb4e5d6cf Mon Sep 17 00:00:00 2001 From: Gavin Chappell <2798739+g-a-c@users.noreply.github.com> Date: Sat, 20 Nov 2021 19:30:46 +0000 Subject: [PATCH 57/95] refactor downloading of binaries * If `/tmp` is a `tmpfs` or somehow not the same filesystem, `os.Rename()` will fail so use `io.Copy()` instead * don't defer cleanup of `to` as this removes the newly-created file if the operation is successful, making `install` and `upgrade` _functionally_ `uninstall` * defer cleanup of the temporary file since it will still be in place if `os.Rename()` fails Fixes: #130 --- internal/bins/bins.go | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/internal/bins/bins.go b/internal/bins/bins.go index 27c640c..2d90667 100644 --- a/internal/bins/bins.go +++ b/internal/bins/bins.go @@ -87,9 +87,23 @@ func downloadAndInstallAsset(body GithubRelease, name string) error { } to := path.Join(INSTALL_PATH, name) - defer os.Remove(to) // Delete if current, ignore error if file does not exits. + defer os.Remove(tmp.Name()) // Cleanup temporary file after thread exits if err := os.Rename(tmp.Name(), to); err != nil { - return nil + colors.Error.Printf("os.Rename() failed (%v), retrying with io.Copy()\n", err.Error()) + var src *os.File + var dst *os.File + if src, err = os.Open(tmp.Name()); err != nil { + return err + } + if dst, err = os.Create(to); err != nil { + return err + } + if _, err := io.Copy(dst, src); err != nil { + return err + } + if err := os.Chmod(to, 0755); err != nil { + return err + } } colors.Success.Printf("Successfully installed '%s' under %s\n", name, INSTALL_PATH) From 3029259d8208af283c0f08d72b76ee64808ee5f8 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 21 Nov 2021 21:06:25 +0100 Subject: [PATCH 58/95] docs --- docs/markdown/backend/overview.md | 2 ++ docs/markdown/config.md | 4 ++++ docs/markdown/location/forget.md | 15 +++++++++++++++ docs/markdown/location/overview.md | 8 +++++++- docs/markdown/quick.md | 8 +++++++- 5 files changed, 35 insertions(+), 2 deletions(-) diff --git a/docs/markdown/backend/overview.md b/docs/markdown/backend/overview.md index e0d4aae..0c2092a 100644 --- a/docs/markdown/backend/overview.md +++ b/docs/markdown/backend/overview.md @@ -3,6 +3,8 @@ Backends are the outputs of the backup process. Each location needs at least one. ```yaml | .autorestic.yml +version: 2 + backends: name-of-backend: type: local diff --git a/docs/markdown/config.md b/docs/markdown/config.md index f0761bf..ee4e285 100644 --- a/docs/markdown/config.md +++ b/docs/markdown/config.md @@ -16,6 +16,8 @@ You can also specify a custom file with the `-c path/to/some/config.yml` ## Example configuration ```yaml | .autorestic.yml +version: 2 + locations: home: from: /home/me @@ -49,6 +51,8 @@ Aliases allow to reuse snippets of config throughout the same file. The following example shows how the locations `a` and `b` share the same hooks and forget policies. ```yaml | .autorestic.yml +version: 2 + extras: hooks: &foo before: diff --git a/docs/markdown/location/forget.md b/docs/markdown/location/forget.md index ad17c2c..db4ed84 100644 --- a/docs/markdown/location/forget.md +++ b/docs/markdown/location/forget.md @@ -7,6 +7,8 @@ This is based on [Restic's snapshots policies](https://restic.readthedocs.io/en/ > **Note** This is a full example, of course you also can specify only one of them ```yaml | .autorestic.yml +version: 2 + locations: etc: from: /etc @@ -22,4 +24,17 @@ locations: keep-within: '2w' # keep snapshots from the last 2 weeks ``` +## Globally + +You can specify global forget policies that would be applied to all locations: + +```yaml | .autorestic.yml +version: 2 + +global: + forget: + keep-daily: 30 + keep-weekly: 52 +``` + > :ToCPrevNext diff --git a/docs/markdown/location/overview.md b/docs/markdown/location/overview.md index c92a7e0..1b3dd96 100644 --- a/docs/markdown/location/overview.md +++ b/docs/markdown/location/overview.md @@ -4,9 +4,15 @@ Locations can be seen as the input to the backup process. Generally this is simp The paths can be relative from the config file. A location can have multiple backends, so that the data is secured across multiple servers. ```yaml | .autorestic.yml +version: 2 + locations: my-location-name: from: path/to/backup + # Or multiple + # from: + # - /a + # - /b to: - name-of-backend - also-backup-to-this-backend @@ -14,7 +20,7 @@ locations: ## `from` -This is the source of the location. +This is the source of the location. Can be an `array` for multiple sources. #### How are paths resolved? diff --git a/docs/markdown/quick.md b/docs/markdown/quick.md index 574bc03..37e776e 100644 --- a/docs/markdown/quick.md +++ b/docs/markdown/quick.md @@ -25,9 +25,15 @@ For a quick overview: > Note that the data is automatically encrypted on the server. The key will be generated and added to your config file. Every backend will have a separate key. **You should keep a copy of the keys or config file somewhere in case your server dies**. Otherwise DATA IS LOST! ```yaml | .autorestic.yml +version: 2 + locations: home: - from: /home/me + from: /home + # Or multiple + # from: + # - /foo + # - /bar to: remote important: From 0c71bea93ee92a2cc474de9252abf07f8b573159 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 21 Nov 2021 21:10:32 +0100 Subject: [PATCH 59/95] use own docker image --- CHANGELOG.md | 6 ++++++ internal/backend.go | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b5d899..1fac099 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.5.1] - 2021-11-21 + +### Changed + +- use official docker image instead of installing rclone every time docker is used. + ## [1.5.0] - 2021-11-20 ### Added diff --git a/internal/backend.go b/internal/backend.go index 0eb8773..089b48c 100644 --- a/internal/backend.go +++ b/internal/backend.go @@ -194,15 +194,13 @@ func (b Backend) ExecDocker(l Location, args []string) (string, error) { splitted := strings.Split(strings.TrimSpace(configFile), "\n") configFilePath := splitted[len(splitted)-1] docker = append(docker, "--volume", configFilePath+":"+"/root/.config/rclone/rclone.conf:ro") - // Install rclone in the container - args = append([]string{"apk", "add", "rclone", "&&"}, args...) default: return "", fmt.Errorf("Backend type \"%s\" is not supported as volume endpoint", b.Type) } for key, value := range env { docker = append(docker, "--env", key+"="+value) } - docker = append(docker, "restic/restic", "-c", strings.Join(args, " ")) + docker = append(docker, "cupcakearmy/autorestic", "-c", strings.Join(args, " ")) out, err := ExecuteCommand(options, docker...) return out, err } From 26de4385ea3cd3fd04f3d3172e3b096abe8c8c82 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Tue, 23 Nov 2021 12:32:22 +0100 Subject: [PATCH 60/95] version bump --- internal/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/config.go b/internal/config.go index 9d5c253..5909df8 100644 --- a/internal/config.go +++ b/internal/config.go @@ -16,7 +16,7 @@ import ( "github.com/spf13/viper" ) -const VERSION = "1.5.0" +const VERSION = "1.5.1" var CI bool = false var VERBOSE bool = false From 252968e15e0272b2b8c9d7f28501e3016dc9d131 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Tue, 23 Nov 2021 12:32:35 +0100 Subject: [PATCH 61/95] ensure config is loaded before lock --- CHANGELOG.md | 60 +++++++++++++++++++++++-------------------- cmd/check.go | 1 + cmd/cron.go | 1 + cmd/restore.go | 1 + internal/lock/lock.go | 10 ++++++-- 5 files changed, 43 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fac099..6563732 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,23 +11,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - use official docker image instead of installing rclone every time docker is used. +### Fixed + +- lock file not always next to the config file. + ## [1.5.0] - 2021-11-20 ### Added -- Support for multiple paths -- Improved error handling -- Allow for specific snapshot to be restored -- Docker image +- Support for multiple paths. +- Improved error handling. +- Allow for specific snapshot to be restored. +- Docker image. ### Fixed -- rclone in docker volumes +- rclone in docker volumes. ### Changed -- [Breaking Change] Declaration of docker volumes. See: https://autorestic.vercel.app/migration/1.4_1.5 -- [Breaking Change] Hooks default executing directory now defaults to the config file directory. See: https://autorestic.vercel.app/migration/1.4_1.5 +- [Breaking Change] Declaration of docker volumes. See: https://autorestic.vercel.app/migration/1.4_1.5. +- [Breaking Change] Hooks default executing directory now defaults to the config file directory. See: https://autorestic.vercel.app/migration/1.4_1.5. ## [1.4.1] - 2021-10-31 @@ -39,26 +43,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -- Allow specify to specify a backend for location backup -- Global restic flags -- Generic ENV support for backends +- Allow specify to specify a backend for location backup. +- Global restic flags. +- Generic ENV support for backends. ### Changed -- Install now only requires `wget` -- Env variable for the `KEY` has been renamed from `AUTORESTIC_[BACKEND NAME]_KEY` -> `AUTORESTIC_[BACKEND NAME]_RESTIC_PASSWORD` +- Install now only requires `wget`. +- Env variable for the `KEY` has been renamed from `AUTORESTIC_[BACKEND NAME]_KEY` -> `AUTORESTIC_[BACKEND NAME]_RESTIC_PASSWORD`. ### Fixed -- Error handling during upgrade & uninstall +- Error handling during upgrade & uninstall. ## [1.3.0] - 2021-10-26 ### Added -- Pass restic backup metadata as ENV to hooks +- Pass restic backup metadata as ENV to hooks. - Support for `XDG_CONFIG_HOME` and `${HOME}/.config` as default locations for `.autorestic.yaml` file. -- Binary restic flags are now supported +- Binary restic flags are now supported. - Pass encryption keys from env variables or files. ## [1.2.0] - 2021-08-05 @@ -66,12 +70,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Community page -- Support for yaml references and aliases +- Support for yaml references and aliases. ### Fixed -- Better verbose output for hooks -- Better error message for bad formatted configs +- Better verbose output for hooks. +- Better error message for bad formatted configs. ## [1.1.2] - 2021-07-11 @@ -83,24 +87,24 @@ Don't check all backend when running `forget` or `exec` commands. ### Added -- Options for backends +- Options for backends. ## [1.1.0] - 2021-05-06 ### Added -- use custom restic binary -- success & failure hooks +- use custom restic binary. +- success & failure hooks. ### Fixed -- don't skip other locations on failure +- don't skip other locations on failure. ## [1.0.9] - 2021-05-01 ### Fixed -- Validation for docker volumes +- Validation for docker volumes. ## [1.0.8] - 2021-04-28 @@ -123,7 +127,7 @@ Don't check all backend when running `forget` or `exec` commands. ### Added -- Support for rclone +- Support for rclone. ## [1.0.5] - 2021-04-24 @@ -136,17 +140,17 @@ Don't check all backend when running `forget` or `exec` commands. ### Added -- Options to add rest username and password in config +- Options to add rest username and password in config. ### Fixed -- Don't add empty strings when saving config +- Don't add empty strings when saving config. ## [1.0.3] - 2021-04-20 ### Fixed -- Auto upgrade script was not working on linux as linux does not support writing to the binary that is being executed +- Auto upgrade script was not working on linux as linux does not support writing to the binary that is being executed. ## [1.0.2] - 2021-04-20 @@ -162,7 +166,7 @@ Don't check all backend when running `forget` or `exec` commands. ### Added -- Completion command for various shells +- Completion command for various shells. ## [1.0.0] - 2021-04-17 diff --git a/cmd/check.go b/cmd/check.go index 2ff9485..159f341 100644 --- a/cmd/check.go +++ b/cmd/check.go @@ -11,6 +11,7 @@ var checkCmd = &cobra.Command{ Use: "check", Short: "Check if everything is setup", Run: func(cmd *cobra.Command, args []string) { + internal.GetConfig() err := lock.Lock() CheckErr(err) defer lock.Unlock() diff --git a/cmd/cron.go b/cmd/cron.go index 2f80bf7..5ea0c7f 100644 --- a/cmd/cron.go +++ b/cmd/cron.go @@ -11,6 +11,7 @@ var cronCmd = &cobra.Command{ Short: "Run cron job for automated backups", Long: `Intended to be mainly triggered by an automated system like systemd or crontab. For each location checks if a cron backup is due and runs it.`, Run: func(cmd *cobra.Command, args []string) { + internal.GetConfig() internal.CRON_LEAN, _ = cmd.Flags().GetBool("lean") err := lock.Lock() CheckErr(err) diff --git a/cmd/restore.go b/cmd/restore.go index f22a1dd..38df5e0 100644 --- a/cmd/restore.go +++ b/cmd/restore.go @@ -13,6 +13,7 @@ var restoreCmd = &cobra.Command{ Short: "Restore backup for location", Args: cobra.MaximumNArgs(1), Run: func(cmd *cobra.Command, args []string) { + internal.GetConfig() err := lock.Lock() CheckErr(err) defer lock.Unlock() diff --git a/internal/lock/lock.go b/internal/lock/lock.go index 0265142..4cae533 100644 --- a/internal/lock/lock.go +++ b/internal/lock/lock.go @@ -19,8 +19,14 @@ func getLock() *viper.Viper { once.Do(func() { lock = viper.New() lock.SetDefault("running", false) - p := path.Dir(viper.ConfigFileUsed()) - file = path.Join(p, ".autorestic.lock.yml") + p := viper.ConfigFileUsed() + colors.Primary.Println(p) + if p == "" { + colors.Error.Println("cannot lock before reading config location") + os.Exit(1) + } + file = path.Join(path.Dir(p), ".autorestic.lock.yml") + colors.Faint.Println("Using lock:\t", file) lock.SetConfigFile(file) lock.SetConfigType("yml") lock.ReadInConfig() From 2b14e6b1af5ddea396082a29966cb5c2bb6b3112 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Wed, 24 Nov 2021 09:35:31 +0100 Subject: [PATCH 62/95] remove print --- internal/lock/lock.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/lock/lock.go b/internal/lock/lock.go index 4cae533..b07727b 100644 --- a/internal/lock/lock.go +++ b/internal/lock/lock.go @@ -20,7 +20,6 @@ func getLock() *viper.Viper { lock = viper.New() lock.SetDefault("running", false) p := viper.ConfigFileUsed() - colors.Primary.Println(p) if p == "" { colors.Error.Println("cannot lock before reading config location") os.Exit(1) From e0b2c99ccd3dd7026c4cfbc827d05a1a0f50946b Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Wed, 24 Nov 2021 09:45:19 +0100 Subject: [PATCH 63/95] contrib --- docs/markdown/contrib.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/markdown/contrib.md b/docs/markdown/contrib.md index aa1043d..e159051 100644 --- a/docs/markdown/contrib.md +++ b/docs/markdown/contrib.md @@ -3,6 +3,7 @@ This amazing people helped the project! - @agateblue - Docs, Pruning, S3 +- @g-a-c - Update/Install bugs. - @david-boles - Docs - @SebDanielsson - Brew - @n194 - AUR Package From 3b541665ae240b534de58595e69389536ce45dcc Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Wed, 24 Nov 2021 09:45:23 +0100 Subject: [PATCH 64/95] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6563732..4c16274 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - lock file not always next to the config file. +- update / install bugs. ## [1.5.0] - 2021-11-20 From e3c378f2a1c01cd8902bdebb676c8e1a63fcd6d3 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Wed, 24 Nov 2021 09:57:10 +0100 Subject: [PATCH 65/95] release day --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c16274..182df9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [1.5.1] - 2021-11-21 +## [1.5.1] - 2021-11-24 ### Changed From 0c37af5588c5c1273c84807de3f9806be0abc336 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Mon, 6 Dec 2021 11:59:58 +0100 Subject: [PATCH 66/95] #140 Docker version pinning --- internal/backend.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/backend.go b/internal/backend.go index 089b48c..69cd5f8 100644 --- a/internal/backend.go +++ b/internal/backend.go @@ -200,7 +200,7 @@ func (b Backend) ExecDocker(l Location, args []string) (string, error) { for key, value := range env { docker = append(docker, "--env", key+"="+value) } - docker = append(docker, "cupcakearmy/autorestic", "-c", strings.Join(args, " ")) + docker = append(docker, "cupcakearmy/autorestic:"+VERSION, "-c", strings.Join(args, " ")) out, err := ExecuteCommand(options, docker...) return out, err } From 982f9e0b5cc1c77b918b959879f0a0f83c9793ab Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Mon, 6 Dec 2021 12:13:18 +0100 Subject: [PATCH 67/95] better error handling --- cmd/backup.go | 2 +- internal/location.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/backup.go b/cmd/backup.go index 38d3fe1..a575220 100644 --- a/cmd/backup.go +++ b/cmd/backup.go @@ -31,7 +31,7 @@ var backupCmd = &cobra.Command{ location, _ := internal.GetLocation(splitted[0]) errs := location.Backup(false, specificBackend) for _, err := range errs { - colors.Error.Println(err) + colors.Error.Printf("%s\n\n", err) errors++ } } diff --git a/internal/location.go b/internal/location.go index 2b2e4a3..b94b916 100644 --- a/internal/location.go +++ b/internal/location.go @@ -216,7 +216,8 @@ func (l Location) Backup(cron bool, specificBackend string) []error { out, err = backend.ExecDocker(l, cmd) } if err != nil { - errors = append(errors, err) + colors.Error.Println(out) + errors = append(errors, fmt.Errorf("%s@%s:\n%s%s", l.name, backend.name, out, err)) continue } From 21b83b4c89abecc18463e36e9b46743f5891873e Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Mon, 6 Dec 2021 17:20:06 +0100 Subject: [PATCH 68/95] docker docs --- docs/markdown/_toc.md | 1 + docs/markdown/docker.md | 28 ++++++++++++++++++++++++++++ docs/markdown/installation.md | 2 ++ 3 files changed, 31 insertions(+) create mode 100644 docs/markdown/docker.md diff --git a/docs/markdown/_toc.md b/docs/markdown/_toc.md index bd4e321..9024e0c 100644 --- a/docs/markdown/_toc.md +++ b/docs/markdown/_toc.md @@ -46,6 +46,7 @@ > [1.4 → 1.5](/migration/1.4_1.5) [Examples](/examples) +[Docker](/docker) [QA](/qa) [Community](/community) [Contributors](/contrib) diff --git a/docs/markdown/docker.md b/docs/markdown/docker.md new file mode 100644 index 0000000..32636d2 --- /dev/null +++ b/docs/markdown/docker.md @@ -0,0 +1,28 @@ +# 🐳 Docker + +The docker image is build with rclone and restic already included. It's ment more as a utility image. + +## Remote hosts + +For remote backups (S3, B2, GCS, etc.) it's quite easy, as you only need to mount the config file and the data to backup. + +```bash +docker run --rm \\ + -v $(pwd):/data \\ + cupcakearmy/autorestic \\ + autorestic backup -va +``` + +## Rclone + +For rclone you will have to also mount the rclone config file to `/root/.config/rclone/rclone.conf`. + +To check where it is located you can run the following command: `rclone config file`. + +**Example** + +```bash +docker run \\ + -v /home/user/.config/rclone/rclone.conf:/root/.config/rclone/rclone.conf:ro \\ + ... +``` diff --git a/docs/markdown/installation.md b/docs/markdown/installation.md index 071e9c5..e932d44 100644 --- a/docs/markdown/installation.md +++ b/docs/markdown/installation.md @@ -14,6 +14,8 @@ wget -qO - https://raw.githubusercontent.com/CupCakeArmy/autorestic/master/insta There is an official docker image over at [cupcakearmy/autorestic](https://hub.docker.com/r/cupcakearmy/autorestic). +For some examples see [here](/docker). + ### Manual You can download the right binary from the release page and simply copy it to `/usr/local/bin` or whatever path you prefer. Autoupdates will still work. From bbdae05199c4817cb98d20820803d3b9eaf8c8dc Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Mon, 6 Dec 2021 17:27:59 +0100 Subject: [PATCH 69/95] changelog --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 182df9d..207e676 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,16 +5,19 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [1.5.1] - 2021-11-24 +## [1.5.1] - 2021-12-06 ### Changed - use official docker image instead of installing rclone every time docker is used. +- docker docs ### Fixed - lock file not always next to the config file. - update / install bugs. +- lock docker image tag to the current autorestic version +- better error logging ## [1.5.0] - 2021-11-20 From 27758a03fa78982de3522a343f2fc32d1ab8c602 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Wed, 22 Dec 2021 14:45:04 +0100 Subject: [PATCH 70/95] add help message --- CHANGELOG.md | 6 ++++++ cmd/root.go | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 207e676..d061a28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.5.2] + +### Added + +- Add support link in help command + ## [1.5.1] - 2021-12-06 ### Changed diff --git a/cmd/root.go b/cmd/root.go index a37adfe..8b766ea 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -27,7 +27,7 @@ var rootCmd = &cobra.Command{ Version: internal.VERSION, Use: "autorestic", Short: "CLI Wrapper for restic", - Long: "Documentation: https://autorestic.vercel.app", + Long: "Documentation:\thttps://autorestic.vercel.app\nSupport:\thttps://discord.gg/wS7RpYTYd2", } func Execute() { From 6bf49530031d3694d0c5e8c59e96a5f70257975f Mon Sep 17 00:00:00 2001 From: Jan Date: Wed, 9 Feb 2022 09:07:01 +0100 Subject: [PATCH 71/95] Add error handling to reading config file. --- cmd/root.go | 36 ++++++++++++++++++++++++++++++------ docs/markdown/docker.md | 2 +- 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index 8b766ea..dd21124 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -1,8 +1,10 @@ package cmd import ( + "fmt" "os" "path/filepath" + "strings" "github.com/cupcakearmy/autorestic/internal" "github.com/cupcakearmy/autorestic/internal/colors" @@ -49,13 +51,21 @@ func initConfig() { } if cfgFile != "" { + if internal.VERBOSE { + colors.Faint.Printf("> Using config file: %s\n", cfgFile) + } viper.SetConfigFile(cfgFile) + viper.AutomaticEnv() + if viper.ConfigFileUsed() == "" { + colors.Error.Println("cannot read config file %s\n", cfgFile) + os.Exit(1) + } } else { - viper.AddConfigPath(".") + configPaths := []string{"."} // Home if home, err := homedir.Dir(); err != nil { - viper.AddConfigPath(home) + configPaths = append(configPaths, home) } // XDG_CONFIG_HOME @@ -66,10 +76,24 @@ func initConfig() { prefix = filepath.Join(home, ".config") } } - viper.AddConfigPath(filepath.Join(prefix, "autorestic")) + xdgConfig := filepath.Join(prefix, "autorestic") + configPaths = append(configPaths, xdgConfig) + } + for _, cfgPath := range configPaths { + if internal.VERBOSE { + colors.Faint.Printf("> Adding config path: '%s'\n", cfgPath) + } + viper.AddConfigPath(cfgPath) + } + cfgFileName := ".autorestic" + viper.SetConfigName(cfgFileName) + viper.AutomaticEnv() + if viper.ConfigFileUsed() == "" { + colors.Error.Println( + fmt.Sprintf( + "cannot find configuration file '%s.yml' or '%s.yaml' in config paths: ['%s']", + cfgFileName, cfgFileName, strings.Join(configPaths, "', '"))) + os.Exit(1) } - - viper.SetConfigName(".autorestic") } - viper.AutomaticEnv() } diff --git a/docs/markdown/docker.md b/docs/markdown/docker.md index 32636d2..86f17b6 100644 --- a/docs/markdown/docker.md +++ b/docs/markdown/docker.md @@ -10,7 +10,7 @@ For remote backups (S3, B2, GCS, etc.) it's quite easy, as you only need to moun docker run --rm \\ -v $(pwd):/data \\ cupcakearmy/autorestic \\ - autorestic backup -va + autorestic backup -va -c /data/.autorestic.yaml ``` ## Rclone From 65ba1f6ac13118369bdb280a2a0915decb7a6796 Mon Sep 17 00:00:00 2001 From: Jan Date: Wed, 9 Feb 2022 20:35:29 +0100 Subject: [PATCH 72/95] Make a copy of config before overriding it --- internal/config.go | 2 +- internal/utils.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/config.go b/internal/config.go index 5909df8..f50aa5b 100644 --- a/internal/config.go +++ b/internal/config.go @@ -259,7 +259,7 @@ func (c *Config) SaveConfig() error { if err := CopyFile(file, file+".old"); err != nil { return err } - colors.Secondary.Println("Saved a backup copy of your file next the the original.") + colors.Secondary.Println("Saved a backup copy of your file next to the original.") viper.Set("backends", c.Backends) viper.Set("locations", c.Locations) diff --git a/internal/utils.go b/internal/utils.go index 1bc2b36..302df2e 100644 --- a/internal/utils.go +++ b/internal/utils.go @@ -60,13 +60,13 @@ func ExecuteResticCommand(options ExecuteOptions, args ...string) (string, error } func CopyFile(from, to string) error { - original, err := os.Open("original.txt") + original, err := os.Open(from) if err != nil { return nil } defer original.Close() - new, err := os.Create("new.txt") + new, err := os.Create(to) if err != nil { return nil } From ec9e2aebcd46adbf7302a698fd630db0f9d51484 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 13 Feb 2022 16:25:09 +0100 Subject: [PATCH 73/95] 1.5.2 --- CHANGELOG.md | 7 ++++--- internal/config.go | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d061a28..bff21cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,11 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [1.5.2] +## [1.5.2] - 2022-02-13 -### Added +### Fixed -- Add support link in help command +- Config loading @jjromannet +- Making a backup of the file @jjromannet ## [1.5.1] - 2021-12-06 diff --git a/internal/config.go b/internal/config.go index f50aa5b..e9acace 100644 --- a/internal/config.go +++ b/internal/config.go @@ -16,7 +16,7 @@ import ( "github.com/spf13/viper" ) -const VERSION = "1.5.1" +const VERSION = "1.5.2" var CI bool = false var VERBOSE bool = false From a373c07fb038aa2e3608e7899def6c4f0c82666a Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 13 Feb 2022 16:25:51 +0100 Subject: [PATCH 74/95] contrib --- docs/markdown/contrib.md | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/docs/markdown/contrib.md b/docs/markdown/contrib.md index e159051..e7fddb7 100644 --- a/docs/markdown/contrib.md +++ b/docs/markdown/contrib.md @@ -2,17 +2,18 @@ This amazing people helped the project! -- @agateblue - Docs, Pruning, S3 +- @agateblue - Docs, Pruning, S3. - @g-a-c - Update/Install bugs. -- @david-boles - Docs -- @SebDanielsson - Brew -- @n194 - AUR Package -- @jin-park-dev - Typos -- @sumnerboy12 - Typos -- @FuzzyMistborn - Typos -- @ChanceM - Typos -- @TheForcer - Typos -- @themorlan - Typos -- @somebox - Typos +- @jjromannet - Bug fixes. +- @david-boles - Docs. +- @SebDanielsson - Brew. +- @n194 - AUR Package. +- @jin-park-dev - Typos. +- @sumnerboy12 - Typos. +- @FuzzyMistborn - Typos. +- @ChanceM - Typos. +- @TheForcer - Typos. +- @themorlan - Typos. +- @somebox - Typos. > :ToCPrevNext From 2a7e233cdbd38bcbcf45e15a379bd91b4dea6e45 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Wed, 16 Feb 2022 21:22:42 +0100 Subject: [PATCH 75/95] only check on config if it is getting used --- cmd/root.go | 9 --------- internal/config.go | 7 ++++++- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index dd21124..0a49060 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -1,10 +1,8 @@ package cmd import ( - "fmt" "os" "path/filepath" - "strings" "github.com/cupcakearmy/autorestic/internal" "github.com/cupcakearmy/autorestic/internal/colors" @@ -88,12 +86,5 @@ func initConfig() { cfgFileName := ".autorestic" viper.SetConfigName(cfgFileName) viper.AutomaticEnv() - if viper.ConfigFileUsed() == "" { - colors.Error.Println( - fmt.Sprintf( - "cannot find configuration file '%s.yml' or '%s.yaml' in config paths: ['%s']", - cfgFileName, cfgFileName, strings.Join(configPaths, "', '"))) - os.Exit(1) - } } } diff --git a/internal/config.go b/internal/config.go index e9acace..7ed54f1 100644 --- a/internal/config.go +++ b/internal/config.go @@ -63,7 +63,12 @@ func GetConfig() *Config { } } } else { - return + cfgFileName := ".autorestic" + colors.Error.Println( + fmt.Sprintf( + "cannot find configuration file '%s.yml' or '%s.yaml'.", + cfgFileName, cfgFileName)) + os.Exit(1) } var versionConfig interface{} From 92feaef5bb11643e19e456b311841638d81de643 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Wed, 16 Feb 2022 21:28:13 +0100 Subject: [PATCH 76/95] version bump --- CHANGELOG.md | 6 ++++++ cmd/root.go | 7 ++++--- internal/config.go | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bff21cc..f2c7fc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.5.3] - 2022-02-13 + +### Fixed + +- Error throwing not finding config even it's not being used. + ## [1.5.2] - 2022-02-13 ### Fixed diff --git a/cmd/root.go b/cmd/root.go index 0a49060..c6f9b41 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -3,6 +3,7 @@ package cmd import ( "os" "path/filepath" + "strings" "github.com/cupcakearmy/autorestic/internal" "github.com/cupcakearmy/autorestic/internal/colors" @@ -78,11 +79,11 @@ func initConfig() { configPaths = append(configPaths, xdgConfig) } for _, cfgPath := range configPaths { - if internal.VERBOSE { - colors.Faint.Printf("> Adding config path: '%s'\n", cfgPath) - } viper.AddConfigPath(cfgPath) } + if internal.VERBOSE { + colors.Faint.Printf("Using config paths: %s\n", strings.Join(configPaths, " ")) + } cfgFileName := ".autorestic" viper.SetConfigName(cfgFileName) viper.AutomaticEnv() diff --git a/internal/config.go b/internal/config.go index 7ed54f1..f7b25b4 100644 --- a/internal/config.go +++ b/internal/config.go @@ -16,7 +16,7 @@ import ( "github.com/spf13/viper" ) -const VERSION = "1.5.2" +const VERSION = "1.5.3" var CI bool = false var VERBOSE bool = false From db9f5dea66e04046340c086e37163f67650c9b0b Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Wed, 16 Feb 2022 21:42:54 +0100 Subject: [PATCH 77/95] 1.5.4 --- CHANGELOG.md | 8 +++++++- cmd/cron.go | 3 ++- cmd/root.go | 12 +++++------- internal/backend.go | 5 +++-- internal/config.go | 23 ++++++++++------------- internal/flags/flags.go | 5 +++++ internal/location.go | 9 +++++---- internal/lock/lock.go | 5 ++++- internal/utils.go | 3 ++- 9 files changed, 43 insertions(+), 30 deletions(-) create mode 100644 internal/flags/flags.go diff --git a/CHANGELOG.md b/CHANGELOG.md index f2c7fc0..91e613e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [1.5.3] - 2022-02-13 +## [1.5.4] - 2022-02-16 + +### Fixed + +- Lean flag not omitting all output. + +## [1.5.3] - 2022-02-16 ### Fixed diff --git a/cmd/cron.go b/cmd/cron.go index 5ea0c7f..269a70b 100644 --- a/cmd/cron.go +++ b/cmd/cron.go @@ -2,6 +2,7 @@ package cmd import ( "github.com/cupcakearmy/autorestic/internal" + "github.com/cupcakearmy/autorestic/internal/flags" "github.com/cupcakearmy/autorestic/internal/lock" "github.com/spf13/cobra" ) @@ -12,7 +13,7 @@ var cronCmd = &cobra.Command{ Long: `Intended to be mainly triggered by an automated system like systemd or crontab. For each location checks if a cron backup is due and runs it.`, Run: func(cmd *cobra.Command, args []string) { internal.GetConfig() - internal.CRON_LEAN, _ = cmd.Flags().GetBool("lean") + flags.CRON_LEAN, _ = cmd.Flags().GetBool("lean") err := lock.Lock() CheckErr(err) defer lock.Unlock() diff --git a/cmd/root.go b/cmd/root.go index c6f9b41..ae73f52 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -7,6 +7,7 @@ import ( "github.com/cupcakearmy/autorestic/internal" "github.com/cupcakearmy/autorestic/internal/colors" + "github.com/cupcakearmy/autorestic/internal/flags" "github.com/cupcakearmy/autorestic/internal/lock" "github.com/spf13/cobra" @@ -37,8 +38,8 @@ func Execute() { func init() { rootCmd.PersistentFlags().StringVarP(&cfgFile, "config", "c", "", "config file (default is $HOME/.autorestic.yml or ./.autorestic.yml)") - rootCmd.PersistentFlags().BoolVar(&internal.CI, "ci", false, "CI mode disabled interactive mode and colors and enables verbosity") - rootCmd.PersistentFlags().BoolVarP(&internal.VERBOSE, "verbose", "v", false, "verbose mode") + rootCmd.PersistentFlags().BoolVar(&flags.CI, "ci", false, "CI mode disabled interactive mode and colors and enables verbosity") + rootCmd.PersistentFlags().BoolVarP(&flags.VERBOSE, "verbose", "v", false, "verbose mode") rootCmd.PersistentFlags().StringVar(&internal.RESTIC_BIN, "restic-bin", "restic", "specify custom restic binary") cobra.OnInitialize(initConfig) } @@ -46,13 +47,10 @@ func init() { func initConfig() { if ci, _ := rootCmd.Flags().GetBool("ci"); ci { colors.DisableColors(true) - internal.VERBOSE = true + flags.VERBOSE = true } if cfgFile != "" { - if internal.VERBOSE { - colors.Faint.Printf("> Using config file: %s\n", cfgFile) - } viper.SetConfigFile(cfgFile) viper.AutomaticEnv() if viper.ConfigFileUsed() == "" { @@ -81,7 +79,7 @@ func initConfig() { for _, cfgPath := range configPaths { viper.AddConfigPath(cfgPath) } - if internal.VERBOSE { + if flags.VERBOSE { colors.Faint.Printf("Using config paths: %s\n", strings.Join(configPaths, " ")) } cfgFileName := ".autorestic" diff --git a/internal/backend.go b/internal/backend.go index 69cd5f8..ebb004d 100644 --- a/internal/backend.go +++ b/internal/backend.go @@ -9,6 +9,7 @@ import ( "strings" "github.com/cupcakearmy/autorestic/internal/colors" + "github.com/cupcakearmy/autorestic/internal/flags" ) type BackendRest struct { @@ -128,7 +129,7 @@ func (b Backend) validate() error { // If not initialize colors.Body.Printf("Initializing backend \"%s\"...\n", b.name) out, err := ExecuteResticCommand(options, "init") - if VERBOSE { + if flags.VERBOSE { colors.Faint.Println(out) } return err @@ -146,7 +147,7 @@ func (b Backend) Exec(args []string) error { colors.Error.Println(out) return err } - if VERBOSE { + if flags.VERBOSE { colors.Faint.Println(out) } return nil diff --git a/internal/config.go b/internal/config.go index f7b25b4..c4a8f00 100644 --- a/internal/config.go +++ b/internal/config.go @@ -9,6 +9,7 @@ import ( "sync" "github.com/cupcakearmy/autorestic/internal/colors" + "github.com/cupcakearmy/autorestic/internal/flags" "github.com/cupcakearmy/autorestic/internal/lock" "github.com/joho/godotenv" "github.com/mitchellh/go-homedir" @@ -16,11 +17,7 @@ import ( "github.com/spf13/viper" ) -const VERSION = "1.5.3" - -var CI bool = false -var VERBOSE bool = false -var CRON_LEAN bool = false +const VERSION = "1.5.4" type OptionMap map[string][]interface{} type Options map[string]OptionMap @@ -52,15 +49,15 @@ func GetConfig() *Config { if config == nil { once.Do(func() { if err := viper.ReadInConfig(); err == nil { - if !CRON_LEAN { - absConfig, _ := filepath.Abs(viper.ConfigFileUsed()) + absConfig, _ := filepath.Abs(viper.ConfigFileUsed()) + if !flags.CRON_LEAN { colors.Faint.Println("Using config: \t", absConfig) - // Load env file - envFile := filepath.Join(filepath.Dir(absConfig), ".autorestic.env") - err = godotenv.Load(envFile) - if err == nil { - colors.Faint.Println("Using env:\t", envFile) - } + } + // Load env file + envFile := filepath.Join(filepath.Dir(absConfig), ".autorestic.env") + err = godotenv.Load(envFile) + if err == nil { + colors.Faint.Println("Using env:\t", envFile) } } else { cfgFileName := ".autorestic" diff --git a/internal/flags/flags.go b/internal/flags/flags.go new file mode 100644 index 0000000..ac7fc3a --- /dev/null +++ b/internal/flags/flags.go @@ -0,0 +1,5 @@ +package flags + +var CI bool = false +var VERBOSE bool = false +var CRON_LEAN bool = false diff --git a/internal/location.go b/internal/location.go index b94b916..45af39c 100644 --- a/internal/location.go +++ b/internal/location.go @@ -9,6 +9,7 @@ import ( "time" "github.com/cupcakearmy/autorestic/internal/colors" + "github.com/cupcakearmy/autorestic/internal/flags" "github.com/cupcakearmy/autorestic/internal/lock" "github.com/cupcakearmy/autorestic/internal/metadata" "github.com/robfig/cron" @@ -108,7 +109,7 @@ func (l Location) ExecuteHooks(commands []string, options ExecuteOptions) error colors.Error.Println(out) return err } - if VERBOSE { + if flags.VERBOSE { colors.Faint.Println(out) } } @@ -227,7 +228,7 @@ func (l Location) Backup(cron bool, specificBackend string) []error { options.Envs[k+"_"+fmt.Sprint(i)] = v options.Envs[k+"_"+strings.ToUpper(backend.name)] = v } - if VERBOSE { + if flags.VERBOSE { colors.Faint.Println(out) } } @@ -276,7 +277,7 @@ func (l Location) Forget(prune bool, dry bool) error { } cmd = append(cmd, combineOptions("forget", l, backend)...) out, err := ExecuteResticCommand(options, cmd...) - if VERBOSE { + if flags.VERBOSE { colors.Faint.Println(out) } if err != nil { @@ -367,7 +368,7 @@ func (l Location) RunCron() error { lock.SetCron(l.name, now.Unix()) l.Backup(true, "") } else { - if !CRON_LEAN { + if !flags.CRON_LEAN { colors.Body.Printf("Skipping \"%s\", not due yet.\n", l.name) } } diff --git a/internal/lock/lock.go b/internal/lock/lock.go index b07727b..4667cb1 100644 --- a/internal/lock/lock.go +++ b/internal/lock/lock.go @@ -6,6 +6,7 @@ import ( "sync" "github.com/cupcakearmy/autorestic/internal/colors" + "github.com/cupcakearmy/autorestic/internal/flags" "github.com/spf13/viper" ) @@ -25,7 +26,9 @@ func getLock() *viper.Viper { os.Exit(1) } file = path.Join(path.Dir(p), ".autorestic.lock.yml") - colors.Faint.Println("Using lock:\t", file) + if !flags.CRON_LEAN { + colors.Faint.Println("Using lock:\t", file) + } lock.SetConfigFile(file) lock.SetConfigType("yml") lock.ReadInConfig() diff --git a/internal/utils.go b/internal/utils.go index 302df2e..de6b167 100644 --- a/internal/utils.go +++ b/internal/utils.go @@ -8,6 +8,7 @@ import ( "os/exec" "github.com/cupcakearmy/autorestic/internal/colors" + "github.com/cupcakearmy/autorestic/internal/flags" ) var RESTIC_BIN string @@ -36,7 +37,7 @@ func ExecuteCommand(options ExecuteOptions, args ...string) (string, error) { cmd.Env = env cmd.Dir = options.Dir - if VERBOSE { + if flags.VERBOSE { colors.Faint.Printf("> Executing: %s\n", cmd) } From 1f69a7974ae6a68edb2c66addc2d6bcf3135945e Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Wed, 16 Feb 2022 21:52:12 +0100 Subject: [PATCH 78/95] bump go version --- Dockerfile | 2 +- go.mod | 22 +++++++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 65fae81..0cb6bb2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.16-alpine as builder +FROM golang:1.17-alpine as builder WORKDIR /app COPY go.* . diff --git a/go.mod b/go.mod index 038ed53..819e488 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/cupcakearmy/autorestic -go 1.16 +go 1.17 require ( github.com/blang/semver/v4 v4.0.0 @@ -12,3 +12,23 @@ require ( github.com/spf13/cobra v1.1.3 github.com/spf13/viper v1.7.1 ) + +require ( + github.com/fsnotify/fsnotify v1.4.7 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/magiconair/properties v1.8.1 // indirect + github.com/mattn/go-colorable v0.1.8 // indirect + github.com/mattn/go-isatty v0.0.12 // indirect + github.com/mitchellh/mapstructure v1.1.2 // indirect + github.com/pelletier/go-toml v1.2.0 // indirect + github.com/spf13/afero v1.1.2 // indirect + github.com/spf13/cast v1.3.0 // indirect + github.com/spf13/jwalterweatherman v1.0.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/subosito/gotenv v1.2.0 // indirect + golang.org/x/sys v0.0.0-20210331175145-43e1dd70ce54 // indirect + golang.org/x/text v0.3.2 // indirect + gopkg.in/ini.v1 v1.51.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect +) From d85470459f4ada7dc265c1af7666af9d8a3cf1ad Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Wed, 16 Feb 2022 21:58:09 +0100 Subject: [PATCH 79/95] fix home directory --- CHANGELOG.md | 10 ++++++++++ cmd/root.go | 2 +- internal/config.go | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91e613e..f19b329 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.5.5] - 2022-02-16 + +### Changed + +- Go version was updated from `1.16` to `1.17` + +### Fixed + +- Home directory was not being taken into account for loading configs. + ## [1.5.4] - 2022-02-16 ### Fixed diff --git a/cmd/root.go b/cmd/root.go index ae73f52..8e18712 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -61,7 +61,7 @@ func initConfig() { configPaths := []string{"."} // Home - if home, err := homedir.Dir(); err != nil { + if home, err := homedir.Dir(); err == nil { configPaths = append(configPaths, home) } diff --git a/internal/config.go b/internal/config.go index c4a8f00..4fd8dde 100644 --- a/internal/config.go +++ b/internal/config.go @@ -17,7 +17,7 @@ import ( "github.com/spf13/viper" ) -const VERSION = "1.5.4" +const VERSION = "1.5.5" type OptionMap map[string][]interface{} type Options map[string]OptionMap From 05def0477034f42a840760d47ad0f72b2868e1fa Mon Sep 17 00:00:00 2001 From: FarisZR <35614734+fariszr@users.noreply.github.com> Date: Thu, 10 Mar 2022 18:28:46 +0300 Subject: [PATCH 80/95] Fix #166 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0cb6bb2..5c7219e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,6 @@ COPY . . RUN go build FROM alpine -RUN apk add --no-cache restic rclone +RUN apk add --no-cache restic rclone bash COPY --from=builder /app/autorestic /usr/bin/autorestic CMD [ "autorestic" ] From 5afad86e37afb38ec745e463efa7ff977b642c31 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Thu, 10 Mar 2022 16:36:26 +0100 Subject: [PATCH 81/95] 1.5.6 --- CHANGELOG.md | 6 ++++++ docs/markdown/contrib.md | 1 + internal/config.go | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f19b329..0243cb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.5.6] - 2022-03-10 + +### Fixed + +- Add bash in docker image for hooks. @fariszr + ## [1.5.5] - 2022-02-16 ### Changed diff --git a/docs/markdown/contrib.md b/docs/markdown/contrib.md index e7fddb7..a5569e5 100644 --- a/docs/markdown/contrib.md +++ b/docs/markdown/contrib.md @@ -5,6 +5,7 @@ This amazing people helped the project! - @agateblue - Docs, Pruning, S3. - @g-a-c - Update/Install bugs. - @jjromannet - Bug fixes. +- @fariszr - Bug fixes. - @david-boles - Docs. - @SebDanielsson - Brew. - @n194 - AUR Package. diff --git a/internal/config.go b/internal/config.go index 4fd8dde..234598e 100644 --- a/internal/config.go +++ b/internal/config.go @@ -17,7 +17,7 @@ import ( "github.com/spf13/viper" ) -const VERSION = "1.5.5" +const VERSION = "1.5.6" type OptionMap map[string][]interface{} type Options map[string]OptionMap From 85d3f06b79f2a2741b4e97866b396202ba6037e5 Mon Sep 17 00:00:00 2001 From: FarisZR <35614734+fariszr@users.noreply.github.com> Date: Fri, 11 Mar 2022 22:34:33 +0300 Subject: [PATCH 82/95] fix #169 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5c7219e..3b10f71 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,6 @@ COPY . . RUN go build FROM alpine -RUN apk add --no-cache restic rclone bash +RUN apk add --no-cache restic rclone bash openssh COPY --from=builder /app/autorestic /usr/bin/autorestic CMD [ "autorestic" ] From 8a713e497d5482ef3c6b7297359b6d0766bcc015 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sat, 12 Mar 2022 14:13:29 +0100 Subject: [PATCH 83/95] add ssh & update deps --- CHANGELOG.md | 10 ++ docs/markdown/contrib.md | 2 +- go.mod | 30 ++-- go.sum | 322 +++++++++++++++++++++++++++++++++++++++ internal/config.go | 2 +- 5 files changed, 349 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0243cb2..f72ccb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.5.7] - 2022-03-11 + +### Added + +- SSH in docker image. @fariszr + +### Security + +- Updated dependencies + ## [1.5.6] - 2022-03-10 ### Fixed diff --git a/docs/markdown/contrib.md b/docs/markdown/contrib.md index a5569e5..c478f64 100644 --- a/docs/markdown/contrib.md +++ b/docs/markdown/contrib.md @@ -5,7 +5,7 @@ This amazing people helped the project! - @agateblue - Docs, Pruning, S3. - @g-a-c - Update/Install bugs. - @jjromannet - Bug fixes. -- @fariszr - Bug fixes. +- @fariszr - Docker image improvements. - @david-boles - Docs. - @SebDanielsson - Brew. - @n194 - AUR Package. diff --git a/go.mod b/go.mod index 819e488..e8cf4a2 100644 --- a/go.mod +++ b/go.mod @@ -5,30 +5,30 @@ go 1.17 require ( github.com/blang/semver/v4 v4.0.0 github.com/buger/goterm v1.0.0 - github.com/fatih/color v1.10.0 + github.com/fatih/color v1.13.0 github.com/joho/godotenv v1.4.0 github.com/mitchellh/go-homedir v1.1.0 github.com/robfig/cron v1.2.0 - github.com/spf13/cobra v1.1.3 - github.com/spf13/viper v1.7.1 + github.com/spf13/cobra v1.4.0 + github.com/spf13/viper v1.10.1 ) require ( - github.com/fsnotify/fsnotify v1.4.7 // indirect + github.com/fsnotify/fsnotify v1.5.1 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect - github.com/magiconair/properties v1.8.1 // indirect - github.com/mattn/go-colorable v0.1.8 // indirect - github.com/mattn/go-isatty v0.0.12 // indirect - github.com/mitchellh/mapstructure v1.1.2 // indirect - github.com/pelletier/go-toml v1.2.0 // indirect - github.com/spf13/afero v1.1.2 // indirect - github.com/spf13/cast v1.3.0 // indirect - github.com/spf13/jwalterweatherman v1.0.0 // indirect + github.com/magiconair/properties v1.8.6 // indirect + github.com/mattn/go-colorable v0.1.12 // indirect + github.com/mattn/go-isatty v0.0.14 // indirect + github.com/mitchellh/mapstructure v1.4.3 // indirect + github.com/pelletier/go-toml v1.9.4 // indirect + github.com/spf13/afero v1.8.2 // indirect + github.com/spf13/cast v1.4.1 // indirect + github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/subosito/gotenv v1.2.0 // indirect - golang.org/x/sys v0.0.0-20210331175145-43e1dd70ce54 // indirect - golang.org/x/text v0.3.2 // indirect - gopkg.in/ini.v1 v1.51.0 // indirect + golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5 // indirect + golang.org/x/text v0.3.7 // indirect + gopkg.in/ini.v1 v1.66.4 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) diff --git a/go.sum b/go.sum index d0c3565..6815b5e 100644 --- a/go.sum +++ b/go.sum @@ -3,13 +3,39 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -28,26 +54,46 @@ github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/buger/goterm v1.0.0 h1:ZB6uUlY8+sjJyFGzz2WpRqX2XYPeXVgtZAOJMwOsTWM= github.com/buger/goterm v1.0.0/go.mod h1:16STi3LquiscTIHA8SXUNKEa/Cnu4ZHBH8NsCaWgso0= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= +github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= @@ -56,22 +102,59 @@ github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -99,6 +182,8 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg= @@ -106,12 +191,14 @@ github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwA github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -120,12 +207,19 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= +github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= @@ -138,6 +232,8 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= +github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -145,8 +241,12 @@ github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= +github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= @@ -154,6 +254,7 @@ github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXP github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -164,6 +265,7 @@ github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfm github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= @@ -176,30 +278,51 @@ github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4k github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= +github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= +github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= +github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= +github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spf13/viper v1.10.1 h1:nuJZuYpG7gTj/XqiUwg8bA0cp1+M2mC3J4g5luUYBKk= +github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= @@ -208,11 +331,20 @@ golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -222,10 +354,20 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -240,14 +382,46 @@ golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -261,16 +435,52 @@ golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210331175145-43e1dd70ce54 h1:rF3Ohx8DRyl8h2zw9qojyLHLhrJpEMgyPOImREEryf0= golang.org/x/sys v0.0.0-20210331175145-43e1dd70ce54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5 h1:y/woIyUBFbpQGKS0u1aHF/40WUDnek3fPOyD08H5Vng= +golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -281,6 +491,7 @@ golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= @@ -288,16 +499,68 @@ golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -307,9 +570,59 @@ google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= @@ -317,14 +630,23 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= +gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/internal/config.go b/internal/config.go index 234598e..6d45c4d 100644 --- a/internal/config.go +++ b/internal/config.go @@ -17,7 +17,7 @@ import ( "github.com/spf13/viper" ) -const VERSION = "1.5.6" +const VERSION = "1.5.7" type OptionMap map[string][]interface{} type Options map[string]OptionMap From 8b74a98836a39819bcb763ef81787391383aa973 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Fri, 18 Mar 2022 13:06:19 +0100 Subject: [PATCH 84/95] better error handling --- CHANGELOG.md | 6 ++++++ internal/config.go | 17 +++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f72ccb1..c689f60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.5.8] - 2022-03-18 + +### Fixed + +- Better error handling for bad config files. + ## [1.5.7] - 2022-03-11 ### Added diff --git a/internal/config.go b/internal/config.go index 6d45c4d..d290c7f 100644 --- a/internal/config.go +++ b/internal/config.go @@ -17,7 +17,7 @@ import ( "github.com/spf13/viper" ) -const VERSION = "1.5.7" +const VERSION = "1.5.8" type OptionMap map[string][]interface{} type Options map[string]OptionMap @@ -60,11 +60,16 @@ func GetConfig() *Config { colors.Faint.Println("Using env:\t", envFile) } } else { - cfgFileName := ".autorestic" - colors.Error.Println( - fmt.Sprintf( - "cannot find configuration file '%s.yml' or '%s.yaml'.", - cfgFileName, cfgFileName)) + text := err.Error() + if strings.Contains(text, "no such file or directory") { + cfgFileName := ".autorestic" + colors.Error.Println( + fmt.Sprintf( + "cannot find configuration file '%s.yml' or '%s.yaml'.", + cfgFileName, cfgFileName)) + } else { + colors.Error.Println("could not load config file\n" + text) + } os.Exit(1) } From 79164e3de0c3d52f3b821b2d6493a0f39e855f06 Mon Sep 17 00:00:00 2001 From: ninjabenji <76439609+ninjabenji@users.noreply.github.com> Date: Wed, 6 Apr 2022 21:28:25 +0100 Subject: [PATCH 85/95] Add lower case warning for backend name If uppercase characters are used in a backend name a check (and I assume other actions) will fail. --- docs/markdown/backend/overview.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/markdown/backend/overview.md b/docs/markdown/backend/overview.md index 0c2092a..ca7de86 100644 --- a/docs/markdown/backend/overview.md +++ b/docs/markdown/backend/overview.md @@ -1,6 +1,7 @@ # 💽 Backends Backends are the outputs of the backup process. Each location needs at least one. +Note: names of backends MUST be lower case! ```yaml | .autorestic.yml version: 2 From a3e539b0b7d69df7d4b3f4dbc299b46baaafd292 Mon Sep 17 00:00:00 2001 From: ninjabenji <76439609+ninjabenji@users.noreply.github.com> Date: Thu, 7 Apr 2022 10:00:28 +0100 Subject: [PATCH 86/95] Add line break in documentation --- docs/markdown/backend/overview.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/markdown/backend/overview.md b/docs/markdown/backend/overview.md index ca7de86..35714cc 100644 --- a/docs/markdown/backend/overview.md +++ b/docs/markdown/backend/overview.md @@ -1,6 +1,7 @@ # 💽 Backends Backends are the outputs of the backup process. Each location needs at least one. + Note: names of backends MUST be lower case! ```yaml | .autorestic.yml From b4cc0f0ab1dc5d106f4cce80275286f8e1f3307e Mon Sep 17 00:00:00 2001 From: ninjabenji <76439609+ninjabenji@users.noreply.github.com> Date: Thu, 7 Apr 2022 10:32:17 +0100 Subject: [PATCH 87/95] Add warning about location names. Location names need to be lower case in order to work properly. --- docs/markdown/location/overview.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/markdown/location/overview.md b/docs/markdown/location/overview.md index 1b3dd96..ccde261 100644 --- a/docs/markdown/location/overview.md +++ b/docs/markdown/location/overview.md @@ -3,6 +3,7 @@ Locations can be seen as the input to the backup process. Generally this is simply a folder. The paths can be relative from the config file. A location can have multiple backends, so that the data is secured across multiple servers. +Note: names of locations MUST be lower case! ```yaml | .autorestic.yml version: 2 From 1e62f6cb050c6cdcb46b6f80cbe74821c4e68e88 Mon Sep 17 00:00:00 2001 From: ninjabenji <76439609+ninjabenji@users.noreply.github.com> Date: Fri, 8 Apr 2022 10:31:42 +0100 Subject: [PATCH 88/95] DOC - Note on config filename extension Seems the config file can be located wherever needed but not using an extension or using an extension other than .yml causes the following error could not load config file Unsupported Config Type "" --- docs/markdown/cli/general.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/markdown/cli/general.md b/docs/markdown/cli/general.md index 748c7bc..2dca58d 100644 --- a/docs/markdown/cli/general.md +++ b/docs/markdown/cli/general.md @@ -2,7 +2,7 @@ ## `-c, --config` -Specify the config file to be used. +Specify the config file to be used (must use .yml as an extension). If omitted `autorestic` will search for for a `.autorestic.yml` in the current directory and your home directory. ```bash From 0f6c34dc6bae36edaecce71d53288436fab71d50 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Tue, 12 Apr 2022 23:59:12 +0200 Subject: [PATCH 89/95] healthcheck example --- docs/markdown/contrib.md | 1 + docs/markdown/examples.md | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/docs/markdown/contrib.md b/docs/markdown/contrib.md index c478f64..810399f 100644 --- a/docs/markdown/contrib.md +++ b/docs/markdown/contrib.md @@ -9,6 +9,7 @@ This amazing people helped the project! - @david-boles - Docs. - @SebDanielsson - Brew. - @n194 - AUR Package. +- @Zottelchen - Healthchecks example. - @jin-park-dev - Typos. - @sumnerboy12 - Typos. - @FuzzyMistborn - Typos. diff --git a/docs/markdown/examples.md b/docs/markdown/examples.md index 4de828e..2f8ca17 100644 --- a/docs/markdown/examples.md +++ b/docs/markdown/examples.md @@ -14,4 +14,27 @@ This can come in handy if a backup process crashed or if it was accidentally can autorestic exec -b my-backend -- unlock ``` +## Use hooks to integrate with [healthchecks](https://healthchecks.io/) + +> Thanks to @Zottelchen for providing it ❤️ + +```yaml +extras: + healthchecks: &healthchecks + hooks: + before: + - 'curl -m 10 --retry 5 -X POST -H "Content-Type: text/plain" --data "Starting backup for location: ${AUTORESTIC_LOCATION}" https:///ping//start' + failure: + - 'curl -m 10 --retry 5 -X POST -H "Content-Type: text/plain" --data "Backup failed for location: ${AUTORESTIC_LOCATION}" https:///ping//fail' + success: + - 'curl -m 10 --retry 5 -X POST -H "Content-Type: text/plain" --data "Backup successful for location: ${AUTORESTIC_LOCATION}" https:///ping/' + +locations: + something: + <<: *healthchecks + from: /somewhere + to: + - somewhere-else +``` + > :ToCPrevNext From 2da440a1cd1c8ed0ae39619cc7bd08f3b938a256 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Wed, 13 Apr 2022 08:55:53 +0200 Subject: [PATCH 90/95] richtiattribution --- docs/markdown/contrib.md | 2 +- docs/markdown/examples.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/markdown/contrib.md b/docs/markdown/contrib.md index 810399f..a904d87 100644 --- a/docs/markdown/contrib.md +++ b/docs/markdown/contrib.md @@ -9,7 +9,7 @@ This amazing people helped the project! - @david-boles - Docs. - @SebDanielsson - Brew. - @n194 - AUR Package. -- @Zottelchen - Healthchecks example. +- @olofvndrhr - Healthchecks example. - @jin-park-dev - Typos. - @sumnerboy12 - Typos. - @FuzzyMistborn - Typos. diff --git a/docs/markdown/examples.md b/docs/markdown/examples.md index 2f8ca17..9243bc9 100644 --- a/docs/markdown/examples.md +++ b/docs/markdown/examples.md @@ -16,7 +16,7 @@ autorestic exec -b my-backend -- unlock ## Use hooks to integrate with [healthchecks](https://healthchecks.io/) -> Thanks to @Zottelchen for providing it ❤️ +> Thanks to @olofvndrhr for providing it ❤️ ```yaml extras: From 434862ed4e564b698ca00d6a7ada2ad8ec888a94 Mon Sep 17 00:00:00 2001 From: Nicco Date: Thu, 14 Apr 2022 11:51:32 +0200 Subject: [PATCH 91/95] 1.6.0 (#180) * fix for #178 * restore options * error codes * update docs * forget docs * add option to auto forget * add copy option * update go version to enable generics * copy docs * changelog & version bump --- CHANGELOG.md | 13 +++ cmd/restore.go | 20 +++- docs/.codedoc/package-lock.json | 30 +++--- docs/.codedoc/package.json | 2 +- docs/markdown/_toc.md | 1 + docs/markdown/location/copy.md | 31 ++++++ docs/markdown/location/forget.md | 17 +++ docs/package-lock.json | 131 +++++++++++++---------- go.mod | 8 +- go.sum | 171 ++----------------------------- internal/backend.go | 35 +++---- internal/bins/bins.go | 2 +- internal/config.go | 14 +-- internal/location.go | 150 +++++++++++++++++++++------ internal/metadata/metadata.go | 2 + internal/utils.go | 23 ++++- 16 files changed, 352 insertions(+), 298 deletions(-) create mode 100644 docs/markdown/location/copy.md diff --git a/CHANGELOG.md b/CHANGELOG.md index c689f60..66c1afa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.6.0] - 2022-04-14 + +### Added + +- support for copy command #145 +- partial restore with `--include`, `--exclude`, `--iinclude`, `--iexclude` flags #161 +- run forget automatically after backup #158 +- exit codes to hooks as env variable #142 + +### Fixed + +- Lean flag not removing all output #178 + ## [1.5.8] - 2022-03-18 ### Fixed diff --git a/cmd/restore.go b/cmd/restore.go index 38df5e0..8faf4a7 100644 --- a/cmd/restore.go +++ b/cmd/restore.go @@ -30,7 +30,19 @@ var restoreCmd = &cobra.Command{ if len(args) > 0 { snapshot = args[0] } - err = l.Restore(target, from, force, snapshot) + + // Get optional flags + optional := []string{} + for _, flag := range []string{"include", "exclude", "iinclude", "iexclude"} { + values, err := cmd.Flags().GetStringSlice(flag) + if err == nil { + for _, value := range values { + optional = append(optional, "--"+flag, value) + } + } + } + + err = l.Restore(target, from, force, snapshot, optional) CheckErr(err) }, } @@ -42,4 +54,10 @@ func init() { restoreCmd.Flags().String("to", "", "Where to restore the data") restoreCmd.Flags().StringP("location", "l", "", "Location to be restored") restoreCmd.MarkFlagRequired("location") + + // Passed on flags + restoreCmd.Flags().StringSliceP("include", "i", []string{}, "Include a pattern") + restoreCmd.Flags().StringSliceP("exclude", "e", []string{}, "Exclude a pattern") + restoreCmd.Flags().StringSlice("iinclude", []string{}, "Include a pattern, case insensitive") + restoreCmd.Flags().StringSlice("iexclude", []string{}, "Exclude a pattern, case insensitive") } diff --git a/docs/.codedoc/package-lock.json b/docs/.codedoc/package-lock.json index 22073df..98cf40e 100644 --- a/docs/.codedoc/package-lock.json +++ b/docs/.codedoc/package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@codedoc/core": "^0.2.23" + "@codedoc/core": "^0.2.24" } }, "node_modules/@babel/runtime": { @@ -17,9 +17,9 @@ } }, "node_modules/@codedoc/core": { - "version": "0.2.23", - "resolved": "https://registry.npmjs.org/@codedoc/core/-/core-0.2.23.tgz", - "integrity": "sha512-dp1ku5YkvV/AbCGHVwBVX2Mo85MeAOOxdvc3Q9VNe1OUcX6RKGWZLkBafo/bVfeBg0HVTwSWdDiYauCINon9kQ==", + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@codedoc/core/-/core-0.2.24.tgz", + "integrity": "sha512-5qJ+I9St+OV2Cql0IurPdQEqwlkWarAzouZniv70WLei50jJ+zMg36NpEvqEdOlZKTa3gR2M3IcVqeEG5UmTCw==", "dependencies": { "@connectv/html": "^0.2.6", "@connectv/jss-theme": "^0.2.0", @@ -30,7 +30,7 @@ "@types/express-ws": "^3.0.0", "@types/katex": "^0.11.0", "@types/prismjs": "^1.16.0", - "ansi_up": "^4.0.4", + "ansi_up": "^5.0.0", "chalk": "^4.0.0", "color": "^3.1.2", "express": "^4.17.1", @@ -576,9 +576,9 @@ } }, "node_modules/ansi_up": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/ansi_up/-/ansi_up-4.0.4.tgz", - "integrity": "sha512-vRxC8q6QY918MbehO869biJW4tiunJdjOhi5fpY6NLOliBQlZhOkKgABJKJqH+JZfb/WfjvjN1chLWI6tODerw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ansi_up/-/ansi_up-5.1.0.tgz", + "integrity": "sha512-3wwu+nJCKBVBwOCurm0uv91lMoVkhFB+3qZQz3U11AmAdDJ4tkw1sNPWJQcVxMVYwe0pGEALOjSBOxdxNc+pNQ==", "engines": { "node": "*" } @@ -5932,9 +5932,9 @@ } }, "@codedoc/core": { - "version": "0.2.23", - "resolved": "https://registry.npmjs.org/@codedoc/core/-/core-0.2.23.tgz", - "integrity": "sha512-dp1ku5YkvV/AbCGHVwBVX2Mo85MeAOOxdvc3Q9VNe1OUcX6RKGWZLkBafo/bVfeBg0HVTwSWdDiYauCINon9kQ==", + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@codedoc/core/-/core-0.2.24.tgz", + "integrity": "sha512-5qJ+I9St+OV2Cql0IurPdQEqwlkWarAzouZniv70WLei50jJ+zMg36NpEvqEdOlZKTa3gR2M3IcVqeEG5UmTCw==", "requires": { "@connectv/html": "^0.2.6", "@connectv/jss-theme": "^0.2.0", @@ -5945,7 +5945,7 @@ "@types/express-ws": "^3.0.0", "@types/katex": "^0.11.0", "@types/prismjs": "^1.16.0", - "ansi_up": "^4.0.4", + "ansi_up": "^5.0.0", "chalk": "^4.0.0", "color": "^3.1.2", "express": "^4.17.1", @@ -6463,9 +6463,9 @@ "requires": {} }, "ansi_up": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/ansi_up/-/ansi_up-4.0.4.tgz", - "integrity": "sha512-vRxC8q6QY918MbehO869biJW4tiunJdjOhi5fpY6NLOliBQlZhOkKgABJKJqH+JZfb/WfjvjN1chLWI6tODerw==" + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ansi_up/-/ansi_up-5.1.0.tgz", + "integrity": "sha512-3wwu+nJCKBVBwOCurm0uv91lMoVkhFB+3qZQz3U11AmAdDJ4tkw1sNPWJQcVxMVYwe0pGEALOjSBOxdxNc+pNQ==" }, "ansi-styles": { "version": "4.3.0", diff --git a/docs/.codedoc/package.json b/docs/.codedoc/package.json index 45a020c..800bf90 100644 --- a/docs/.codedoc/package.json +++ b/docs/.codedoc/package.json @@ -1,5 +1,5 @@ { "dependencies": { - "@codedoc/core": "^0.2.23" + "@codedoc/core": "^0.2.24" } } diff --git a/docs/markdown/_toc.md b/docs/markdown/_toc.md index 9024e0c..c50dc14 100644 --- a/docs/markdown/_toc.md +++ b/docs/markdown/_toc.md @@ -14,6 +14,7 @@ > > [Overview](/location/options) > > [Excluding Files](/location/exclude) > > [Forget Policy](/location/forget) +> > [Copy](/location/copy) > > [Cron](/location/cron) > [Docker Volumes](/location/docker) diff --git a/docs/markdown/location/copy.md b/docs/markdown/location/copy.md new file mode 100644 index 0000000..60e238c --- /dev/null +++ b/docs/markdown/location/copy.md @@ -0,0 +1,31 @@ +# Copy + +Instead of specifying multiple `to` backends for a given `location` you can also use the `copy` option. Instead of recalculating the backup multiple times, you can copy the freshly copied snapshot from one backend to the other, avoiding recomputation. + +###### Example + +```yaml | .autorestic.yml +locations: + my-location: + from: /data + to: + - a #Fast + - b #Fast + - c #Slow +``` + +Becomes + +```yaml | .autorestic.yml +locations: + my-location: + from: /data + to: + - a + - b + copy: + a: + - c +``` + +Instead of backing up to each backend separately, you can choose that the snapshot created to `a` will be copied over to `c`, avoiding heavy computation on `c`. diff --git a/docs/markdown/location/forget.md b/docs/markdown/location/forget.md index db4ed84..37e6e8f 100644 --- a/docs/markdown/location/forget.md +++ b/docs/markdown/location/forget.md @@ -37,4 +37,21 @@ global: keep-weekly: 52 ``` +## Automatically forget after backup + +You can also configure `autorestic` to automatically run the forget command for you after every backup. You can do that by specifying the `forget` option. + +```yaml | .autorestic.yml +version: 2 + +locations: + etc: + from: /etc + to: local + forget: prune # Or only "yes" if you don't want to prune + options: + forget: + keep-last: 5 +``` + > :ToCPrevNext diff --git a/docs/package-lock.json b/docs/package-lock.json index 0096e70..ba716bc 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -118,9 +118,15 @@ } }, "node_modules/chokidar": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", - "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -296,9 +302,9 @@ } }, "node_modules/is-core-module": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz", - "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", + "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", "dependencies": { "has": "^1.0.3" }, @@ -339,9 +345,9 @@ "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" }, "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -350,9 +356,9 @@ } }, "node_modules/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" }, "node_modules/mkdirp": { "version": "1.0.4", @@ -395,9 +401,9 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "node_modules/picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "engines": { "node": ">=8.6" }, @@ -428,12 +434,16 @@ } }, "node_modules/resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", + "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.8.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -451,9 +461,9 @@ } }, "node_modules/shelljs": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", - "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", "dependencies": { "glob": "^7.0.0", "interpret": "^1.0.0", @@ -475,9 +485,9 @@ } }, "node_modules/source-map-support": { - "version": "0.5.20", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz", - "integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==", + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -510,6 +520,17 @@ "node": ">=8" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -743,9 +764,9 @@ } }, "chokidar": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", - "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "requires": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -879,9 +900,9 @@ } }, "is-core-module": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz", - "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", + "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", "requires": { "has": "^1.0.3" } @@ -910,17 +931,17 @@ "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" }, "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" }, "mkdirp": { "version": "1.0.4", @@ -951,9 +972,9 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" }, "readdirp": { "version": "3.6.0", @@ -972,12 +993,13 @@ } }, "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz", + "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==", "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.8.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" } }, "rimraf": { @@ -989,9 +1011,9 @@ } }, "shelljs": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", - "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", "requires": { "glob": "^7.0.0", "interpret": "^1.0.0", @@ -1004,9 +1026,9 @@ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, "source-map-support": { - "version": "0.5.20", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz", - "integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==", + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -1030,6 +1052,11 @@ "has-flag": "^4.0.0" } }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" + }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", diff --git a/go.mod b/go.mod index e8cf4a2..e97a142 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/cupcakearmy/autorestic -go 1.17 +go 1.18 require ( github.com/blang/semver/v4 v4.0.0 @@ -10,7 +10,7 @@ require ( github.com/mitchellh/go-homedir v1.1.0 github.com/robfig/cron v1.2.0 github.com/spf13/cobra v1.4.0 - github.com/spf13/viper v1.10.1 + github.com/spf13/viper v1.11.0 ) require ( @@ -22,13 +22,15 @@ require ( github.com/mattn/go-isatty v0.0.14 // indirect github.com/mitchellh/mapstructure v1.4.3 // indirect github.com/pelletier/go-toml v1.9.4 // indirect + github.com/pelletier/go-toml/v2 v2.0.0-beta.8 // indirect github.com/spf13/afero v1.8.2 // indirect github.com/spf13/cast v1.4.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/subosito/gotenv v1.2.0 // indirect - golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5 // indirect + golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect golang.org/x/text v0.3.7 // indirect gopkg.in/ini.v1 v1.66.4 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) diff --git a/go.sum b/go.sum index 6815b5e..7b32213 100644 --- a/go.sum +++ b/go.sum @@ -25,7 +25,6 @@ cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4g cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -37,25 +36,13 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/buger/goterm v1.0.0 h1:ZB6uUlY8+sjJyFGzz2WpRqX2XYPeXVgtZAOJMwOsTWM= github.com/buger/goterm v1.0.0/go.mod h1:16STi3LquiscTIHA8SXUNKEa/Cnu4ZHBH8NsCaWgso0= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= @@ -63,45 +50,24 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg= -github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -155,179 +121,81 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg= github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pelletier/go-toml/v2 v2.0.0-beta.8 h1:dy81yyLYJDwMTifq24Oi/IslOslRrDSb3jwDggjz3Z0= +github.com/pelletier/go-toml/v2 v2.0.0-beta.8/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ= github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= -github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M= -github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= -github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= -github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.10.1 h1:nuJZuYpG7gTj/XqiUwg8bA0cp1+M2mC3J4g5luUYBKk= -github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU= +github.com/spf13/viper v1.11.0 h1:7OX/1FS6n7jHD1zGrZTM7WtY13ZELRyosK4k93oPr44= +github.com/spf13/viper v1.11.0/go.mod h1:djo0X/bA5+tYVoCn+C7cAYJGcVn/qYLFTG8gdUsX7Zk= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -370,10 +238,6 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -422,12 +286,7 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -460,19 +319,17 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210331175145-43e1dd70ce54 h1:rF3Ohx8DRyl8h2zw9qojyLHLhrJpEMgyPOImREEryf0= golang.org/x/sys v0.0.0-20210331175145-43e1dd70ce54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5 h1:y/woIyUBFbpQGKS0u1aHF/40WUDnek3fPOyD08H5Vng= -golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -481,14 +338,12 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -498,7 +353,6 @@ golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -623,23 +477,18 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4= gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/internal/backend.go b/internal/backend.go index ebb004d..745b800 100644 --- a/internal/backend.go +++ b/internal/backend.go @@ -13,18 +13,18 @@ import ( ) type BackendRest struct { - User string `yaml:"user,omitempty"` - Password string `yaml:"password,omitempty"` + User string `mapstructure:"user,omitempty"` + Password string `mapstructure:"password,omitempty"` } type Backend struct { name string - Type string `yaml:"type,omitempty"` - Path string `yaml:"path,omitempty"` - Key string `yaml:"key,omitempty"` - Env map[string]string `yaml:"env,omitempty"` - Rest BackendRest `yaml:"rest,omitempty"` - Options Options `yaml:"options,omitempty"` + Type string `mapstructure:"type,omitempty"` + Path string `mapstructure:"path,omitempty"` + Key string `mapstructure:"key,omitempty"` + Env map[string]string `mapstructure:"env,omitempty"` + Rest BackendRest `mapstructure:"rest,omitempty"` + Options Options `mapstructure:"options,omitempty"` } func GetBackend(name string) (Backend, bool) { @@ -122,13 +122,13 @@ func (b Backend) validate() error { } options := ExecuteOptions{Envs: env} // Check if already initialized - _, err = ExecuteResticCommand(options, "snapshots") + _, _, err = ExecuteResticCommand(options, "snapshots") if err == nil { return nil } else { // If not initialize colors.Body.Printf("Initializing backend \"%s\"...\n", b.name) - out, err := ExecuteResticCommand(options, "init") + _, out, err := ExecuteResticCommand(options, "init") if flags.VERBOSE { colors.Faint.Println(out) } @@ -142,7 +142,7 @@ func (b Backend) Exec(args []string) error { return err } options := ExecuteOptions{Envs: env} - out, err := ExecuteResticCommand(options, args...) + _, out, err := ExecuteResticCommand(options, args...) if err != nil { colors.Error.Println(out) return err @@ -153,10 +153,10 @@ func (b Backend) Exec(args []string) error { return nil } -func (b Backend) ExecDocker(l Location, args []string) (string, error) { +func (b Backend) ExecDocker(l Location, args []string) (int, string, error) { env, err := b.getEnv() if err != nil { - return "", err + return -1, "", err } volume := l.From[0] options := ExecuteOptions{ @@ -188,20 +188,19 @@ func (b Backend) ExecDocker(l Location, args []string) (string, error) { // No additional setup needed case "rclone": // Read host rclone config and mount it into the container - configFile, err := ExecuteCommand(ExecuteOptions{Command: "rclone"}, "config", "file") + code, configFile, err := ExecuteCommand(ExecuteOptions{Command: "rclone"}, "config", "file") if err != nil { - return "", err + return code, "", err } splitted := strings.Split(strings.TrimSpace(configFile), "\n") configFilePath := splitted[len(splitted)-1] docker = append(docker, "--volume", configFilePath+":"+"/root/.config/rclone/rclone.conf:ro") default: - return "", fmt.Errorf("Backend type \"%s\" is not supported as volume endpoint", b.Type) + return -1, "", fmt.Errorf("Backend type \"%s\" is not supported as volume endpoint", b.Type) } for key, value := range env { docker = append(docker, "--env", key+"="+value) } docker = append(docker, "cupcakearmy/autorestic:"+VERSION, "-c", strings.Join(args, " ")) - out, err := ExecuteCommand(options, docker...) - return out, err + return ExecuteCommand(options, docker...) } diff --git a/internal/bins/bins.go b/internal/bins/bins.go index 2d90667..104efcb 100644 --- a/internal/bins/bins.go +++ b/internal/bins/bins.go @@ -128,7 +128,7 @@ func InstallRestic() error { } func upgradeRestic() error { - out, err := internal.ExecuteCommand(internal.ExecuteOptions{ + _, out, err := internal.ExecuteCommand(internal.ExecuteOptions{ Command: "restic", }, "self-update") colors.Faint.Println(out) diff --git a/internal/config.go b/internal/config.go index d290c7f..8ce08fe 100644 --- a/internal/config.go +++ b/internal/config.go @@ -17,17 +17,17 @@ import ( "github.com/spf13/viper" ) -const VERSION = "1.5.8" +const VERSION = "1.6.0" type OptionMap map[string][]interface{} type Options map[string]OptionMap type Config struct { - Version string `yaml:"version"` - Extras interface{} `yaml:"extras"` - Locations map[string]Location `yaml:"locations"` - Backends map[string]Backend `yaml:"backends"` - Global Options `yaml:"global"` + Version string `mapstructure:"version"` + Extras interface{} `mapstructure:"extras"` + Locations map[string]Location `mapstructure:"locations"` + Backends map[string]Backend `mapstructure:"backends"` + Global Options `mapstructure:"global"` } var once sync.Once @@ -56,7 +56,7 @@ func GetConfig() *Config { // Load env file envFile := filepath.Join(filepath.Dir(absConfig), ".autorestic.env") err = godotenv.Load(envFile) - if err == nil { + if err == nil && !flags.CRON_LEAN { colors.Faint.Println("Using env:\t", envFile) } } else { diff --git a/internal/location.go b/internal/location.go index 45af39c..b715105 100644 --- a/internal/location.go +++ b/internal/location.go @@ -24,22 +24,34 @@ const ( type HookArray = []string +type LocationForgetOption string + +const ( + LocationForgetYes LocationForgetOption = "yes" + LocationForgetNo LocationForgetOption = "no" + LocationForgetPrune LocationForgetOption = "prune" +) + type Hooks struct { - Dir string `yaml:"dir"` - Before HookArray `yaml:"before,omitempty"` - After HookArray `yaml:"after,omitempty"` - Success HookArray `yaml:"success,omitempty"` - Failure HookArray `yaml:"failure,omitempty"` + Dir string `mapstructure:"dir"` + Before HookArray `mapstructure:"before,omitempty"` + After HookArray `mapstructure:"after,omitempty"` + Success HookArray `mapstructure:"success,omitempty"` + Failure HookArray `mapstructure:"failure,omitempty"` } +type LocationCopy = map[string][]string + type Location struct { - name string `yaml:",omitempty"` - From []string `yaml:"from,omitempty"` - Type string `yaml:"type,omitempty"` - To []string `yaml:"to,omitempty"` - Hooks Hooks `yaml:"hooks,omitempty"` - Cron string `yaml:"cron,omitempty"` - Options Options `yaml:"options,omitempty"` + name string `mapstructure:",omitempty"` + From []string `mapstructure:"from,omitempty"` + Type string `mapstructure:"type,omitempty"` + To []string `mapstructure:"to,omitempty"` + Hooks Hooks `mapstructure:"hooks,omitempty"` + Cron string `mapstructure:"cron,omitempty"` + Options Options `mapstructure:"options,omitempty"` + ForgetOption LocationForgetOption `mapstructure:"forget,omitempty"` + CopyOption LocationCopy `mapstructure:"copy,omitempty"` } func GetLocation(name string) (Location, bool) { @@ -78,13 +90,38 @@ func (l Location) validate() error { } if len(l.To) == 0 { - return fmt.Errorf(`Location "%s" has no "to" targets`, l.name) + return fmt.Errorf(`location "%s" has no "to" targets`, l.name) } // Check if backends are all valid for _, to := range l.To { _, ok := GetBackend(to) if !ok { - return fmt.Errorf("invalid backend `%s`", to) + return fmt.Errorf(`location "%s" has an invalid backend "%s"`, l.name, to) + } + } + + // Check copy option + for copyFrom, copyTo := range l.CopyOption { + if _, ok := GetBackend(copyFrom); !ok { + return fmt.Errorf(`location "%s" has an invalid backend "%s" in copy option`, l.name, copyFrom) + } + if !ArrayContains(l.To, copyFrom) { + return fmt.Errorf(`location "%s" has an invalid copy from "%s"`, l.name, copyFrom) + } + for _, copyToTarget := range copyTo { + if _, ok := GetBackend(copyToTarget); !ok { + return fmt.Errorf(`location "%s" has an invalid backend "%s" in copy option`, l.name, copyToTarget) + } + if ArrayContains(l.To, copyToTarget) { + return fmt.Errorf(`location "%s" cannot copy to "%s" as it's already a target`, l.name, copyToTarget) + } + } + } + + // Check if forget type is correct + if l.ForgetOption != "" { + if l.ForgetOption != LocationForgetYes && l.ForgetOption != LocationForgetNo && l.ForgetOption != LocationForgetPrune { + return fmt.Errorf("invalid value for forget option: %s", l.ForgetOption) } } return nil @@ -104,7 +141,7 @@ func (l Location) ExecuteHooks(commands []string, options ExecuteOptions) error colors.Secondary.Println("\nRunning hooks") for _, command := range commands { colors.Body.Println("> " + command) - out, err := ExecuteCommand(options, "-c", command) + _, out, err := ExecuteCommand(options, "-c", command) if err != nil { colors.Error.Println(out) return err @@ -195,6 +232,7 @@ func (l Location) Backup(cron bool, specificBackend string) []error { Envs: env, } + var code int = 0 var out string switch t { case TypeLocal: @@ -206,7 +244,7 @@ func (l Location) Backup(cron bool, specificBackend string) []error { } cmd = append(cmd, path) } - out, err = ExecuteResticCommand(backupOptions, cmd...) + code, out, err = ExecuteResticCommand(backupOptions, cmd...) case TypeVolume: ok := CheckIfVolumeExists(l.From[0]) if !ok { @@ -214,20 +252,53 @@ func (l Location) Backup(cron bool, specificBackend string) []error { continue } cmd = append(cmd, "/data") - out, err = backend.ExecDocker(l, cmd) + code, out, err = backend.ExecDocker(l, cmd) } + + // Extract metadata + md := metadata.ExtractMetadataFromBackupLog(out) + md.ExitCode = fmt.Sprint(code) + mdEnv := metadata.MakeEnvFromMetadata(&md) + for k, v := range mdEnv { + options.Envs[k+"_"+fmt.Sprint(i)] = v + options.Envs[k+"_"+strings.ToUpper(backend.name)] = v + } + + // If error save it and continue if err != nil { colors.Error.Println(out) errors = append(errors, fmt.Errorf("%s@%s:\n%s%s", l.name, backend.name, out, err)) continue } - md := metadata.ExtractMetadataFromBackupLog(out) - mdEnv := metadata.MakeEnvFromMetadata(&md) - for k, v := range mdEnv { - options.Envs[k+"_"+fmt.Sprint(i)] = v - options.Envs[k+"_"+strings.ToUpper(backend.name)] = v + // Copy + if md.SnapshotID != "" { + for copyFrom, copyTo := range l.CopyOption { + b1, _ := GetBackend(copyFrom) + for _, copyToTarget := range copyTo { + b2, _ := GetBackend(copyToTarget) + colors.Secondary.Println("Copying " + copyFrom + " → " + copyToTarget) + env, _ := b1.getEnv() + env2, _ := b2.getEnv() + // Add the second repo to the env with a "2" suffix + for k, v := range env2 { + env[k+"2"] = v + } + _, out, err := ExecuteResticCommand(ExecuteOptions{ + Envs: env, + }, "copy", md.SnapshotID) + + if flags.VERBOSE { + colors.Faint.Println(out) + } + + if err != nil { + errors = append(errors, err) + } + } + } } + if flags.VERBOSE { colors.Faint.Println(out) } @@ -240,15 +311,21 @@ func (l Location) Backup(cron bool, specificBackend string) []error { after: var commands []string - if len(errors) > 0 { - commands = l.Hooks.Failure - } else { + var isSuccess = len(errors) == 0 + if isSuccess { commands = l.Hooks.Success + } else { + commands = l.Hooks.Failure } if err := l.ExecuteHooks(commands, options); err != nil { errors = append(errors, err) } + // Forget and optionally prune + if isSuccess && l.ForgetOption != "" && l.ForgetOption != LocationForgetNo { + l.Forget(l.ForgetOption == LocationForgetPrune, false) + } + if len(errors) == 0 { colors.Success.Println("Done") } @@ -276,7 +353,7 @@ func (l Location) Forget(prune bool, dry bool) error { cmd = append(cmd, "--dry-run") } cmd = append(cmd, combineOptions("forget", l, backend)...) - out, err := ExecuteResticCommand(options, cmd...) + _, out, err := ExecuteResticCommand(options, cmd...) if flags.VERBOSE { colors.Faint.Println(out) } @@ -297,18 +374,19 @@ func (l Location) hasBackend(backend string) bool { return false } -func (l Location) Restore(to, from string, force bool, snapshot string) error { +func buildRestoreCommand(l Location, to string, snapshot string, options []string) []string { + base := []string{"restore", "--target", to, "--tag", l.getLocationTags(), snapshot} + base = append(base, options...) + return base +} + +func (l Location) Restore(to, from string, force bool, snapshot string, options []string) error { if from == "" { from = l.To[0] } else if !l.hasBackend(from) { return fmt.Errorf("invalid backend: \"%s\"", from) } - to, err := filepath.Abs(to) - if err != nil { - return err - } - if snapshot == "" { snapshot = "latest" } @@ -323,6 +401,10 @@ func (l Location) Restore(to, from string, force bool, snapshot string) error { } switch t { case TypeLocal: + to, err = filepath.Abs(to) + if err != nil { + return err + } // Check if target is empty if !force { notEmptyError := fmt.Errorf("target %s is not empty", to) @@ -341,9 +423,9 @@ func (l Location) Restore(to, from string, force bool, snapshot string) error { } } } - err = backend.Exec([]string{"restore", "--target", to, "--tag", l.getLocationTags(), snapshot}) + err = backend.Exec(buildRestoreCommand(l, to, snapshot, options)) case TypeVolume: - _, err = backend.ExecDocker(l, []string{"restore", "--target", "/", "--tag", l.getLocationTags(), snapshot}) + _, _, err = backend.ExecDocker(l, buildRestoreCommand(l, "/", snapshot, options)) } if err != nil { return err diff --git a/internal/metadata/metadata.go b/internal/metadata/metadata.go index 228cf22..308058c 100644 --- a/internal/metadata/metadata.go +++ b/internal/metadata/metadata.go @@ -21,6 +21,7 @@ type BackupLogMetadata struct { AddedSize string Processed BackupLogMetadataProcessed SnapshotID string + ExitCode string } type MetadatExtractor interface { @@ -67,6 +68,7 @@ func MakeEnvFromMetadata(metadata *BackupLogMetadata) map[string]string { env[prefix+"PROCESSED_FILES"] = metadata.Processed.Files env[prefix+"PROCESSED_SIZE"] = metadata.Processed.Size env[prefix+"PROCESSED_DURATION"] = metadata.Processed.Duration + env[prefix+"EXIT_CODE"] = metadata.ExitCode return env } diff --git a/internal/utils.go b/internal/utils.go index de6b167..42389f1 100644 --- a/internal/utils.go +++ b/internal/utils.go @@ -28,7 +28,7 @@ type ExecuteOptions struct { Dir string } -func ExecuteCommand(options ExecuteOptions, args ...string) (string, error) { +func ExecuteCommand(options ExecuteOptions, args ...string) (int, string, error) { cmd := exec.Command(options.Command, args...) env := os.Environ() for k, v := range options.Envs { @@ -47,12 +47,16 @@ func ExecuteCommand(options ExecuteOptions, args ...string) (string, error) { cmd.Stderr = &error err := cmd.Run() if err != nil { - return error.String(), err + if exitError, ok := err.(*exec.ExitError); ok { + return exitError.ExitCode(), error.String(), err + } else { + return -1, error.String(), err + } } - return out.String(), nil + return 0, out.String(), nil } -func ExecuteResticCommand(options ExecuteOptions, args ...string) (string, error) { +func ExecuteResticCommand(options ExecuteOptions, args ...string) (int, string, error) { options.Command = RESTIC_BIN var c = GetConfig() var optionsAsString = getOptions(c.Global, "") @@ -80,6 +84,15 @@ func CopyFile(from, to string) error { } func CheckIfVolumeExists(volume string) bool { - _, err := ExecuteCommand(ExecuteOptions{Command: "docker"}, "volume", "inspect", volume) + _, _, err := ExecuteCommand(ExecuteOptions{Command: "docker"}, "volume", "inspect", volume) return err == nil } + +func ArrayContains[T comparable](arr []T, needle T) bool { + for _, item := range arr { + if item == needle { + return true + } + } + return false +} From 2e6764223d0dba0eb4898d872589c326f86da3bd Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Thu, 14 Apr 2022 12:05:19 +0200 Subject: [PATCH 92/95] bump go version in docker --- CHANGELOG.md | 6 ++++++ Dockerfile | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66c1afa..0d026c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.6.1] - 2022-04-14 + +### Fixed + +- Bump go version in docker file to 18. + ## [1.6.0] - 2022-04-14 ### Added diff --git a/Dockerfile b/Dockerfile index 3b10f71..9a4ff5e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.17-alpine as builder +FROM golang:1.18-alpine as builder WORKDIR /app COPY go.* . From ff2e3714d1538c656c1a352f5adb42b8b664dbc3 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Thu, 14 Apr 2022 17:44:54 +0200 Subject: [PATCH 93/95] 1.6.2 --- CHANGELOG.md | 6 ++++++ internal/config.go | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d026c1..a8d8355 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.6.2] - 2022-04-14 + +### Fixed + +- Version bump in code + ## [1.6.1] - 2022-04-14 ### Fixed diff --git a/internal/config.go b/internal/config.go index 8ce08fe..5d11b49 100644 --- a/internal/config.go +++ b/internal/config.go @@ -17,7 +17,7 @@ import ( "github.com/spf13/viper" ) -const VERSION = "1.6.0" +const VERSION = "1.6.2" type OptionMap map[string][]interface{} type Options map[string]OptionMap From 5bcf5c921740434311a427180fbcb1a9de2d8443 Mon Sep 17 00:00:00 2001 From: Nicco Date: Wed, 27 Apr 2022 00:48:52 +0200 Subject: [PATCH 94/95] 1.7.0 (#188) * stream the output (#186) * dont duplicate global flags (#187) * docs for tagging * fix self update path (#190) * version bump & changelog --- CHANGELOG.md | 14 ++++++++++- cmd/root.go | 2 +- docs/markdown/migration/1.4_1.5.md | 8 +++++++ internal/backend.go | 13 +++------- internal/bins/bins.go | 6 ++--- internal/config.go | 16 +++++-------- internal/flags/flags.go | 9 ++++--- internal/location.go | 18 ++------------ internal/utils.go | 38 +++++++++++++++++++++++------- 9 files changed, 71 insertions(+), 53 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a8d8355..fbac014 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,11 +5,23 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.7.0] - 2022-04-27 + +### Changed + +- #147 Stream output instead of buffering. + +### Fixed + +- #184 duplicate global options. +- #154 add docs for migration. +- #182 fix bug with upgrading custom restic with custom path. + ## [1.6.2] - 2022-04-14 ### Fixed -- Version bump in code +- Version bump in code. ## [1.6.1] - 2022-04-14 diff --git a/cmd/root.go b/cmd/root.go index 8e18712..a9ea49b 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -40,7 +40,7 @@ func init() { rootCmd.PersistentFlags().StringVarP(&cfgFile, "config", "c", "", "config file (default is $HOME/.autorestic.yml or ./.autorestic.yml)") rootCmd.PersistentFlags().BoolVar(&flags.CI, "ci", false, "CI mode disabled interactive mode and colors and enables verbosity") rootCmd.PersistentFlags().BoolVarP(&flags.VERBOSE, "verbose", "v", false, "verbose mode") - rootCmd.PersistentFlags().StringVar(&internal.RESTIC_BIN, "restic-bin", "restic", "specify custom restic binary") + rootCmd.PersistentFlags().StringVar(&flags.RESTIC_BIN, "restic-bin", "restic", "specify custom restic binary") cobra.OnInitialize(initConfig) } diff --git a/docs/markdown/migration/1.4_1.5.md b/docs/markdown/migration/1.4_1.5.md index 349bc40..c402004 100644 --- a/docs/markdown/migration/1.4_1.5.md +++ b/docs/markdown/migration/1.4_1.5.md @@ -57,4 +57,12 @@ locations: type: volume ``` +## Tagging + +Autorestic changed the way backups are referenced. Before we took the paths as the identifying information. Now autorestic uses native restic tags to reference them. This means that old backups are not referenced. You can the old snapshots manually. An example can be shown below. + +```bash +autorestic exec -va -- tag --add ar:location:LOCATION_NAME # Only if you have only one location +``` + > :ToCPrevNext diff --git a/internal/backend.go b/internal/backend.go index 745b800..40bb9d6 100644 --- a/internal/backend.go +++ b/internal/backend.go @@ -9,7 +9,6 @@ import ( "strings" "github.com/cupcakearmy/autorestic/internal/colors" - "github.com/cupcakearmy/autorestic/internal/flags" ) type BackendRest struct { @@ -120,18 +119,15 @@ func (b Backend) validate() error { if err != nil { return err } - options := ExecuteOptions{Envs: env} + options := ExecuteOptions{Envs: env, Silent: true} // Check if already initialized - _, _, err = ExecuteResticCommand(options, "snapshots") + _, _, err = ExecuteResticCommand(options, "check") if err == nil { return nil } else { // If not initialize colors.Body.Printf("Initializing backend \"%s\"...\n", b.name) - _, out, err := ExecuteResticCommand(options, "init") - if flags.VERBOSE { - colors.Faint.Println(out) - } + _, _, err := ExecuteResticCommand(options, "init") return err } } @@ -147,9 +143,6 @@ func (b Backend) Exec(args []string) error { colors.Error.Println(out) return err } - if flags.VERBOSE { - colors.Faint.Println(out) - } return nil } diff --git a/internal/bins/bins.go b/internal/bins/bins.go index 104efcb..111df3a 100644 --- a/internal/bins/bins.go +++ b/internal/bins/bins.go @@ -16,6 +16,7 @@ import ( "github.com/blang/semver/v4" "github.com/cupcakearmy/autorestic/internal" "github.com/cupcakearmy/autorestic/internal/colors" + "github.com/cupcakearmy/autorestic/internal/flags" ) const INSTALL_PATH = "/usr/local/bin" @@ -128,10 +129,9 @@ func InstallRestic() error { } func upgradeRestic() error { - _, out, err := internal.ExecuteCommand(internal.ExecuteOptions{ - Command: "restic", + _, _, err := internal.ExecuteCommand(internal.ExecuteOptions{ + Command: flags.RESTIC_BIN, }, "self-update") - colors.Faint.Println(out) return err } diff --git a/internal/config.go b/internal/config.go index 5d11b49..0c0b38d 100644 --- a/internal/config.go +++ b/internal/config.go @@ -17,7 +17,7 @@ import ( "github.com/spf13/viper" ) -const VERSION = "1.6.2" +const VERSION = "1.7.0" type OptionMap map[string][]interface{} type Options map[string]OptionMap @@ -185,7 +185,7 @@ func CheckConfig() error { return fmt.Errorf("config could not be loaded/found") } if !CheckIfResticIsCallable() { - return fmt.Errorf(`%s was not found. Install either with "autorestic install" or manually`, RESTIC_BIN) + return fmt.Errorf(`%s was not found. Install either with "autorestic install" or manually`, flags.RESTIC_BIN) } for name, backend := range c.Backends { backend.name = name @@ -295,12 +295,8 @@ func appendOptionsToSlice(str *[]string, options OptionMap) { } } -func getOptions(options Options, key string) []string { +func getOptions(options Options, keys []string) []string { var selected []string - var keys = []string{"all"} - if key != "" { - keys = append(keys, key) - } for _, key := range keys { appendOptionsToSlice(&selected, options[key]) } @@ -310,9 +306,9 @@ func getOptions(options Options, key string) []string { func combineOptions(key string, l Location, b Backend) []string { // Priority: location > backend > global var options []string - gFlags := getOptions(GetConfig().Global, key) - bFlags := getOptions(b.Options, key) - lFlags := getOptions(l.Options, key) + gFlags := getOptions(GetConfig().Global, []string{key}) + bFlags := getOptions(b.Options, []string{"all", key}) + lFlags := getOptions(l.Options, []string{"all", key}) options = append(options, gFlags...) options = append(options, bFlags...) options = append(options, lFlags...) diff --git a/internal/flags/flags.go b/internal/flags/flags.go index ac7fc3a..8d32124 100644 --- a/internal/flags/flags.go +++ b/internal/flags/flags.go @@ -1,5 +1,8 @@ package flags -var CI bool = false -var VERBOSE bool = false -var CRON_LEAN bool = false +var ( + CI bool = false + VERBOSE bool = false + CRON_LEAN bool = false + RESTIC_BIN string +) diff --git a/internal/location.go b/internal/location.go index b715105..0bfb853 100644 --- a/internal/location.go +++ b/internal/location.go @@ -146,9 +146,6 @@ func (l Location) ExecuteHooks(commands []string, options ExecuteOptions) error colors.Error.Println(out) return err } - if flags.VERBOSE { - colors.Faint.Println(out) - } } colors.Body.Println("") return nil @@ -284,24 +281,16 @@ func (l Location) Backup(cron bool, specificBackend string) []error { for k, v := range env2 { env[k+"2"] = v } - _, out, err := ExecuteResticCommand(ExecuteOptions{ + _, _, err := ExecuteResticCommand(ExecuteOptions{ Envs: env, }, "copy", md.SnapshotID) - if flags.VERBOSE { - colors.Faint.Println(out) - } - if err != nil { errors = append(errors, err) } } } } - - if flags.VERBOSE { - colors.Faint.Println(out) - } } // After hooks @@ -353,10 +342,7 @@ func (l Location) Forget(prune bool, dry bool) error { cmd = append(cmd, "--dry-run") } cmd = append(cmd, combineOptions("forget", l, backend)...) - _, out, err := ExecuteResticCommand(options, cmd...) - if flags.VERBOSE { - colors.Faint.Println(out) - } + _, _, err = ExecuteResticCommand(options, cmd...) if err != nil { return err } diff --git a/internal/utils.go b/internal/utils.go index 42389f1..c8bf799 100644 --- a/internal/utils.go +++ b/internal/utils.go @@ -9,23 +9,34 @@ import ( "github.com/cupcakearmy/autorestic/internal/colors" "github.com/cupcakearmy/autorestic/internal/flags" + "github.com/fatih/color" ) -var RESTIC_BIN string - func CheckIfCommandIsCallable(cmd string) bool { _, err := exec.LookPath(cmd) return err == nil } func CheckIfResticIsCallable() bool { - return CheckIfCommandIsCallable(RESTIC_BIN) + return CheckIfCommandIsCallable(flags.RESTIC_BIN) } type ExecuteOptions struct { Command string Envs map[string]string Dir string + Silent bool +} + +type ColoredWriter struct { + target io.Writer + color *color.Color +} + +func (w ColoredWriter) Write(p []byte) (n int, err error) { + colored := []byte(w.color.Sprint(string(p))) + w.target.Write(colored) + return len(p), nil } func ExecuteCommand(options ExecuteOptions, args ...string) (int, string, error) { @@ -43,23 +54,32 @@ func ExecuteCommand(options ExecuteOptions, args ...string) (int, string, error) var out bytes.Buffer var error bytes.Buffer - cmd.Stdout = &out + if flags.VERBOSE && !options.Silent { + var colored ColoredWriter = ColoredWriter{ + target: os.Stdout, + color: colors.Faint, + } + mw := io.MultiWriter(colored, &out) + cmd.Stdout = mw + } else { + cmd.Stdout = &out + } cmd.Stderr = &error err := cmd.Run() if err != nil { + code := -1 if exitError, ok := err.(*exec.ExitError); ok { - return exitError.ExitCode(), error.String(), err - } else { - return -1, error.String(), err + code = exitError.ExitCode() } + return code, error.String(), err } return 0, out.String(), nil } func ExecuteResticCommand(options ExecuteOptions, args ...string) (int, string, error) { - options.Command = RESTIC_BIN + options.Command = flags.RESTIC_BIN var c = GetConfig() - var optionsAsString = getOptions(c.Global, "") + var optionsAsString = getOptions(c.Global, []string{"all"}) args = append(optionsAsString, args...) return ExecuteCommand(options, args...) } From 3bc091f826704d0a95d4d500d60083bddd3dee74 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Wed, 27 Apr 2022 00:55:31 +0200 Subject: [PATCH 95/95] lean flag --- CHANGELOG.md | 6 ++++++ cmd/cron.go | 3 +-- internal/config.go | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fbac014..d8ead68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.7.1] - 2022-04-27 + +### Fixed + +- #178 Lean flag not working properly. + ## [1.7.0] - 2022-04-27 ### Changed diff --git a/cmd/cron.go b/cmd/cron.go index 269a70b..175ae13 100644 --- a/cmd/cron.go +++ b/cmd/cron.go @@ -13,7 +13,6 @@ var cronCmd = &cobra.Command{ Long: `Intended to be mainly triggered by an automated system like systemd or crontab. For each location checks if a cron backup is due and runs it.`, Run: func(cmd *cobra.Command, args []string) { internal.GetConfig() - flags.CRON_LEAN, _ = cmd.Flags().GetBool("lean") err := lock.Lock() CheckErr(err) defer lock.Unlock() @@ -25,5 +24,5 @@ var cronCmd = &cobra.Command{ func init() { rootCmd.AddCommand(cronCmd) - cronCmd.Flags().Bool("lean", false, "only output information about actual backups") + cronCmd.Flags().BoolVar(&flags.CRON_LEAN, "lean", false, "only output information about actual backups") } diff --git a/internal/config.go b/internal/config.go index 0c0b38d..691b4f7 100644 --- a/internal/config.go +++ b/internal/config.go @@ -17,7 +17,7 @@ import ( "github.com/spf13/viper" ) -const VERSION = "1.7.0" +const VERSION = "1.7.1" type OptionMap map[string][]interface{} type Options map[string]OptionMap