feat(sync): s3 backend (#112)

* feat(s3): create bucket interactively during auth when unconfigured

Problem: when a user runs `:Pending s3 auth` with no bucket configured,
auth succeeds but offers no way to create the bucket. The user must
manually run `aws s3api create-bucket` and update their config.

Solution: add `util.input()` coroutine-aware prompt wrapper and a
`create_bucket()` flow in `s3.lua` that prompts for bucket name and
region, handles the `us-east-1` LocationConstraint quirk, and logs a
config snippet on success. Called automatically from `auth()` when
`sync.s3.bucket` is absent.

* ci: typing
This commit is contained in:
Barrett Ruth 2026-03-08 20:20:16 -04:00 committed by GitHub
parent ee75e6844e
commit 7640241cf2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 303 additions and 1 deletions

View file

@ -80,7 +80,6 @@ describe('sync util', function()
vim.g.pending = { data_path = tmpdir .. '/tasks.json' }
config.reset()
package.loaded['pending'] = nil
local pending = require('pending')
local s = store_mod.new(tmpdir .. '/tasks.json')
s:load()