Skip to content

Commit f75ce6e

Browse files
feat: add wasabi configuration (#24)
1 parent d0aaad6 commit f75ce6e

File tree

4 files changed

+28
-1
lines changed

4 files changed

+28
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@ Currently the below providers are supported, but it could be used with other pro
1515
- CleverCloud
1616
- Hetzner Cloud
1717
- Synology C2
18+
- Wasabi
1819

1920
## Inputs
2021

2122
### `provider`
2223

23-
**Not Required** The s3 provider to use. Defaults to Linode. AWS, Linode, DigitalOcean, Scaleway, Cloudflare, Vultr, CleverCloud, Hetzner Cloud, Synology C2 are supported.
24+
**Not Required** The s3 provider to use. Defaults to Linode. AWS, Linode, DigitalOcean, Scaleway, Cloudflare, Vultr, CleverCloud, Hetzner Cloud, Synology C2, Wasabi are supported.
2425

2526
### `secret_key`
2627

dist/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24993,6 +24993,14 @@ const providers = {
2499324993
website_endpoint: '',
2499424994
access_key,
2499524995
secret_key,
24996+
}),
24997+
wasabi: ({ region = 'ap-southeast-1', access_key = '', secret_key = '' }) => ({
24998+
bucket_location: region,
24999+
host_base: `s3.${region}.wasabisys.com`,
25000+
host_bucket: `%(bucket)s.s3.${region}.wasabisys.com`,
25001+
website_endpoint: '',
25002+
access_key,
25003+
secret_key,
2499625004
})
2499725005
}
2499825006

src/providers.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,14 @@ const providers = {
7272
website_endpoint: '',
7373
access_key,
7474
secret_key,
75+
}),
76+
wasabi: ({ region = 'ap-southeast-1', access_key = '', secret_key = '' }) => ({
77+
bucket_location: region,
78+
host_base: `s3.${region}.wasabisys.com`,
79+
host_bucket: `%(bucket)s.s3.${region}.wasabisys.com`,
80+
website_endpoint: '',
81+
access_key,
82+
secret_key,
7583
})
7684
}
7785

src/test.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,13 @@ const synologyc2Conf = makeConf(providers.synologyc2({
8989
for (const line of synologyc2Conf) {
9090
synologyc2Writer.write(line + '\r\n')
9191
}
92+
93+
const wasabiWriter = createWriteStream('assets/test-results/wasabi')
94+
const wasabiConf = makeConf(providers.wasabi({
95+
access_key: 'top-secret',
96+
secret_key: 'more secret'
97+
}))
98+
99+
for (const line of wasabiConf) {
100+
wasabiWriter.write(line + '\r\n')
101+
}

0 commit comments

Comments
 (0)