-
Notifications
You must be signed in to change notification settings - Fork 514
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6f0af6b
commit cfadf6e
Showing
5 changed files
with
51 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,18 +47,36 @@ | |
}, | ||
s3: { | ||
code: ` | ||
import { S3Client } from "https://deno.land/x/[email protected]/mod.ts"; | ||
import * as wmill from "windmill-client" | ||
type S3 = object | ||
export async function main(s3: S3) { | ||
const s3client = new S3Client(s3); | ||
for await (const obj of s3client.listObjects({ prefix: "/" })) { | ||
console.log(obj); | ||
} | ||
return fetch(process.env["BASE_URL"] + '/api/settings/test_object_storage_config', { | ||
method: 'POST', | ||
headers: { | ||
'Content-Type': 'application/json', | ||
Authorization: 'Bearer ' + process.env["WM_TOKEN"], | ||
}, | ||
body: JSON.stringify({ | ||
type: "S3", | ||
bucket: s3.bucket, | ||
endpoint: s3.endPoint, | ||
port: s3.port, | ||
allow_http: !s3.useSSL, | ||
access_key: s3.accessKey, | ||
secret_key: s3.secretKey, | ||
path_style: s3.pathStyle, | ||
}), | ||
}).then(async (res) => { | ||
if (!res.ok) { | ||
throw new Error(await res.text()) | ||
} | ||
return res.text() | ||
}) | ||
} | ||
`, | ||
lang: 'deno', | ||
lang: 'bun', | ||
argName: 's3' | ||
}, | ||
graphql: { | ||
|