bun-types 1.3.3-canary.20251112T140644 → 1.3.3-canary.20251114T140703
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bun.d.ts +25 -1
- package/docs/bundler/css.mdx +2 -2
- package/docs/bundler/esbuild.mdx +52 -8
- package/docs/bundler/executables.mdx +1 -1
- package/docs/bundler/html-static.mdx +17 -3
- package/docs/bundler/index.mdx +19 -1
- package/docs/bundler/loaders.mdx +108 -13
- package/docs/bundler/minifier.mdx +343 -363
- package/docs/bundler/plugins.mdx +15 -1
- package/docs/guides/deployment/google-cloud-run.mdx +2 -5
- package/docs/guides/ecosystem/{edgedb.mdx → gel.mdx} +42 -38
- package/docs/guides/test/snapshot.mdx +2 -2
- package/docs/pm/cli/pm.mdx +1 -1
- package/docs/pm/workspaces.mdx +1 -2
- package/docs/quickstart.mdx +199 -193
- package/docs/runtime/bunfig.mdx +1 -0
- package/docs/runtime/file-types.mdx +84 -3
- package/docs/runtime/module-resolution.mdx +11 -2
- package/docs/runtime/plugins.mdx +15 -1
- package/docs/runtime/s3.mdx +1 -1
- package/package.json +1 -1
package/docs/quickstart.mdx
CHANGED
|
@@ -12,198 +12,204 @@ Build a minimal HTTP server with `Bun.serve`, run it locally, then evolve it by
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
<Steps>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
15
|
+
<Step title="Step 1">
|
|
16
|
+
|
|
17
|
+
Initialize a new project with `bun init`.
|
|
18
|
+
|
|
19
|
+
```bash terminal icon="terminal"
|
|
20
|
+
bun init my-app
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
It'll prompt you to pick a template, either `Blank`, `React`, or `Library`. For this guide, we'll pick `Blank`.
|
|
24
|
+
|
|
25
|
+
```bash terminal icon="terminal"
|
|
26
|
+
bun init my-app
|
|
27
|
+
```
|
|
28
|
+
```txt
|
|
29
|
+
✓ Select a project template: Blank
|
|
30
|
+
|
|
31
|
+
- .gitignore
|
|
32
|
+
- CLAUDE.md
|
|
33
|
+
- .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc -> CLAUDE.md
|
|
34
|
+
- index.ts
|
|
35
|
+
- tsconfig.json (for editor autocomplete)
|
|
36
|
+
- README.md
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
This automatically creates a `my-app` directory with a basic Bun app.
|
|
40
|
+
|
|
41
|
+
</Step>
|
|
42
|
+
<Step title="Step 2">
|
|
43
|
+
|
|
44
|
+
Run the `index.ts` file using `bun run index.ts`.
|
|
45
|
+
|
|
46
|
+
```bash terminal icon="terminal"
|
|
47
|
+
cd my-app
|
|
48
|
+
bun run index.ts
|
|
49
|
+
```
|
|
50
|
+
```txt
|
|
51
|
+
Hello via Bun!
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
You should see a console output saying `"Hello via Bun!"`.
|
|
55
|
+
|
|
56
|
+
</Step>
|
|
57
|
+
<Step title="Step 3">
|
|
58
|
+
|
|
59
|
+
Replace the contents of `index.ts` with the following code:
|
|
60
|
+
|
|
61
|
+
```ts index.ts icon="/icons/typescript.svg"
|
|
62
|
+
const server = Bun.serve({
|
|
63
|
+
port: 3000,
|
|
64
|
+
routes: {
|
|
65
|
+
"/": () => new Response('Bun!'),
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
console.log(`Listening on ${server.url}`);
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Run the `index.ts` file again using `bun run index.ts`.
|
|
73
|
+
|
|
74
|
+
```bash terminal icon="terminal"
|
|
75
|
+
bun run index.ts
|
|
76
|
+
```
|
|
77
|
+
```txt
|
|
78
|
+
Listening on http://localhost:3000
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Visit [`http://localhost:3000`](http://localhost:3000) to test the server. You should see a simple page that says `"Bun!"`.
|
|
82
|
+
|
|
83
|
+
<Accordion title="Seeing TypeScript errors on Bun?">
|
|
84
|
+
|
|
85
|
+
If you used `bun init`, Bun will have automatically installed Bun's TypeScript declarations and configured your `tsconfig.json`. If you're trying out Bun in an existing project, you may see a type error on the `Bun` global.
|
|
86
|
+
|
|
87
|
+
To fix this, first install `@types/bun` as a dev dependency.
|
|
88
|
+
|
|
89
|
+
```bash terminal icon="terminal"
|
|
90
|
+
bun add -d @types/bun
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Then add the following to your `compilerOptions` in `tsconfig.json`:
|
|
94
|
+
|
|
95
|
+
```json tsconfig.json icon="file-code"
|
|
96
|
+
{
|
|
97
|
+
"compilerOptions": {
|
|
98
|
+
"lib": ["ESNext"],
|
|
99
|
+
"target": "ESNext",
|
|
100
|
+
"module": "Preserve",
|
|
101
|
+
"moduleDetection": "force",
|
|
102
|
+
"moduleResolution": "bundler",
|
|
103
|
+
"allowImportingTsExtensions": true,
|
|
104
|
+
"verbatimModuleSyntax": true,
|
|
105
|
+
"noEmit": true
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
</Accordion>
|
|
111
|
+
|
|
112
|
+
</Step>
|
|
113
|
+
<Step title="Step 4">
|
|
114
|
+
|
|
115
|
+
Install the `figlet` package and its type declarations. Figlet is a utility for converting strings into ASCII art.
|
|
116
|
+
|
|
117
|
+
```bash terminal icon="terminal"
|
|
118
|
+
bun add figlet
|
|
119
|
+
bun add -d @types/figlet # TypeScript users only
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Update `index.ts` to use `figlet` in `routes`.
|
|
123
|
+
|
|
124
|
+
```ts index.ts icon="/icons/typescript.svg"
|
|
125
|
+
import figlet from 'figlet'; // [!code ++]
|
|
126
|
+
|
|
127
|
+
const server = Bun.serve({
|
|
128
|
+
port: 3000,
|
|
129
|
+
routes: {
|
|
130
|
+
"/": () => new Response('Bun!'),
|
|
131
|
+
"/figlet": () => { // [!code ++]
|
|
132
|
+
const body = figlet.textSync('Bun!'); // [!code ++]
|
|
133
|
+
return new Response(body); // [!code ++]
|
|
134
|
+
} // [!code ++]
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
console.log(`Listening on ${server.url}`);
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Run the `index.ts` file again using `bun run index.ts`.
|
|
142
|
+
|
|
143
|
+
```bash terminal icon="terminal"
|
|
144
|
+
bun run index.ts
|
|
145
|
+
```
|
|
146
|
+
```txt
|
|
147
|
+
Listening on http://localhost:3000
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Visit [`http://localhost:3000/figlet`](http://localhost:3000/figlet) to test the server. You should see a simple page that says `"Bun!"` in ASCII art.
|
|
151
|
+
|
|
152
|
+
```txt
|
|
153
|
+
____ _
|
|
154
|
+
| __ ) _ _ _ __ | |
|
|
155
|
+
| _ \| | | | '_ \| |
|
|
156
|
+
| |_) | |_| | | | |_|
|
|
157
|
+
|____/ \__,_|_| |_(_)
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
</Step>
|
|
161
|
+
<Step title="Step 5">
|
|
162
|
+
|
|
163
|
+
Let's add some HTML. Create a new file called `index.html` and add the following code:
|
|
164
|
+
|
|
165
|
+
```html index.html icon="file-code"
|
|
166
|
+
<!DOCTYPE html>
|
|
167
|
+
<html lang="en">
|
|
168
|
+
<head>
|
|
169
|
+
<meta charset="UTF-8">
|
|
170
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
171
|
+
<title>Bun</title>
|
|
172
|
+
</head>
|
|
173
|
+
<body>
|
|
174
|
+
<h1>Bun!</h1>
|
|
175
|
+
</body>
|
|
176
|
+
</html>
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Then, import this file in `index.ts` and serve it from the root `/` route.
|
|
180
|
+
|
|
181
|
+
```ts index.ts icon="/icons/typescript.svg"
|
|
182
|
+
import figlet from 'figlet';
|
|
183
|
+
import index from './index.html'; // [!code ++]
|
|
184
|
+
|
|
185
|
+
const server = Bun.serve({
|
|
186
|
+
port: 3000,
|
|
187
|
+
routes: {
|
|
188
|
+
"/": index, // [!code ++]
|
|
189
|
+
"/figlet": () => {
|
|
190
|
+
const body = figlet.textSync('Bun!');
|
|
191
|
+
return new Response(body);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
console.log(`Listening on ${server.url}`);
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Run the `index.ts` file again using `bun run index.ts`.
|
|
200
|
+
|
|
201
|
+
```bash terminal icon="terminal"
|
|
202
|
+
bun run index.ts
|
|
203
|
+
```
|
|
204
|
+
```txt
|
|
205
|
+
Listening on http://localhost:3000
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Visit [`http://localhost:3000`](http://localhost:3000) to test the server. You should see the static HTML page.
|
|
209
|
+
|
|
210
|
+
</Step>
|
|
211
|
+
|
|
212
|
+
</Steps>
|
|
207
213
|
|
|
208
214
|
🎉 Congratulations! You've built a simple HTTP server with Bun and installed a package.
|
|
209
215
|
|
|
@@ -234,7 +240,7 @@ bun run start
|
|
|
234
240
|
```
|
|
235
241
|
|
|
236
242
|
```txt
|
|
237
|
-
|
|
243
|
+
Listening on http://localhost:3000
|
|
238
244
|
```
|
|
239
245
|
|
|
240
246
|
<Note>⚡️ **Performance** — `bun run` is roughly 28x faster than `npm run` (6ms vs 170ms of overhead).</Note>
|
package/docs/runtime/bunfig.mdx
CHANGED
|
@@ -5,14 +5,16 @@ description: "File types and loaders supported by Bun's bundler and runtime"
|
|
|
5
5
|
|
|
6
6
|
The Bun bundler implements a set of default loaders out of the box. As a rule of thumb, the bundler and the runtime both support the same set of file types out of the box.
|
|
7
7
|
|
|
8
|
-
`.js` `.cjs` `.mjs` `.mts` `.cts` `.ts` `.tsx` `.jsx` `.
|
|
8
|
+
`.js` `.cjs` `.mjs` `.mts` `.cts` `.ts` `.tsx` `.jsx` `.css` `.json` `.jsonc` `.toml` `.yaml` `.yml` `.txt` `.wasm` `.node` `.html` `.sh`
|
|
9
9
|
|
|
10
10
|
Bun uses the file extension to determine which built-in _loader_ should be used to parse the file. Every loader has a name, such as `js`, `tsx`, or `json`. These names are used when building [plugins](/bundler/plugins) that extend Bun with custom loaders.
|
|
11
11
|
|
|
12
|
-
You can explicitly specify which loader to use using the '
|
|
12
|
+
You can explicitly specify which loader to use using the `'type'` import attribute.
|
|
13
13
|
|
|
14
14
|
```ts
|
|
15
|
-
import my_toml from "./my_file" with {
|
|
15
|
+
import my_toml from "./my_file" with { type: "toml" };
|
|
16
|
+
// or with dynamic imports
|
|
17
|
+
const { default: my_toml } = await import("./my_file", { with: { type: "toml" } });
|
|
16
18
|
```
|
|
17
19
|
|
|
18
20
|
---
|
|
@@ -84,6 +86,29 @@ export default {
|
|
|
84
86
|
|
|
85
87
|
</CodeGroup>
|
|
86
88
|
|
|
89
|
+
### `jsonc`
|
|
90
|
+
|
|
91
|
+
**JSON with Comments loader**. Default for `.jsonc`.
|
|
92
|
+
|
|
93
|
+
JSONC (JSON with Comments) files can be directly imported. Bun will parse them, stripping out comments and trailing commas.
|
|
94
|
+
|
|
95
|
+
```ts
|
|
96
|
+
import config from "./config.jsonc";
|
|
97
|
+
console.log(config);
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
During bundling, the parsed JSONC is inlined into the bundle as a JavaScript object, identical to the `json` loader.
|
|
101
|
+
|
|
102
|
+
```ts
|
|
103
|
+
var config = {
|
|
104
|
+
option: "value",
|
|
105
|
+
};
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
<Note>
|
|
109
|
+
Bun automatically uses the `jsonc` loader for `tsconfig.json`, `jsconfig.json`, `package.json`, and `bun.lock` files.
|
|
110
|
+
</Note>
|
|
111
|
+
|
|
87
112
|
### `toml`
|
|
88
113
|
|
|
89
114
|
**TOML loader**. Default for `.toml`.
|
|
@@ -128,6 +153,50 @@ export default {
|
|
|
128
153
|
|
|
129
154
|
</CodeGroup>
|
|
130
155
|
|
|
156
|
+
### `yaml`
|
|
157
|
+
|
|
158
|
+
**YAML loader**. Default for `.yaml` and `.yml`.
|
|
159
|
+
|
|
160
|
+
YAML files can be directly imported. Bun will parse them with its fast native YAML parser.
|
|
161
|
+
|
|
162
|
+
```ts
|
|
163
|
+
import config from "./config.yaml";
|
|
164
|
+
console.log(config);
|
|
165
|
+
|
|
166
|
+
// via import attribute:
|
|
167
|
+
import data from "./data.txt" with { type: "yaml" };
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
During bundling, the parsed YAML is inlined into the bundle as a JavaScript object.
|
|
171
|
+
|
|
172
|
+
```ts
|
|
173
|
+
var config = {
|
|
174
|
+
name: "my-app",
|
|
175
|
+
version: "1.0.0",
|
|
176
|
+
// ...other fields
|
|
177
|
+
};
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
If a `.yaml` or `.yml` file is passed as an entrypoint, it will be converted to a `.js` module that `export default`s the parsed object.
|
|
181
|
+
|
|
182
|
+
<CodeGroup>
|
|
183
|
+
|
|
184
|
+
```yaml Input
|
|
185
|
+
name: John Doe
|
|
186
|
+
age: 35
|
|
187
|
+
email: johndoe@example.com
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
```ts Output
|
|
191
|
+
export default {
|
|
192
|
+
name: "John Doe",
|
|
193
|
+
age: 35,
|
|
194
|
+
email: "johndoe@example.com",
|
|
195
|
+
};
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
</CodeGroup>
|
|
199
|
+
|
|
131
200
|
### `text`
|
|
132
201
|
|
|
133
202
|
**Text loader**. Default for `.txt`.
|
|
@@ -283,6 +352,18 @@ The `html` loader behaves differently depending on how it's used:
|
|
|
283
352
|
|
|
284
353
|
</Note>
|
|
285
354
|
|
|
355
|
+
### `css`
|
|
356
|
+
|
|
357
|
+
**CSS loader**. Default for `.css`.
|
|
358
|
+
|
|
359
|
+
CSS files can be directly imported. This is primarily useful for [full-stack applications](/bundler/html-static) where CSS is bundled alongside HTML.
|
|
360
|
+
|
|
361
|
+
```ts
|
|
362
|
+
import "./styles.css";
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
There isn't any value returned from the import, it's only used for side effects.
|
|
366
|
+
|
|
286
367
|
### `sh` loader
|
|
287
368
|
|
|
288
369
|
**Bun Shell loader**. Default for `.sh` files
|
|
@@ -276,7 +276,7 @@ await Bun.build({
|
|
|
276
276
|
|
|
277
277
|
## Path re-mapping
|
|
278
278
|
|
|
279
|
-
|
|
279
|
+
Bun supports import path re-mapping through TypeScript's [`compilerOptions.paths`](https://www.typescriptlang.org/tsconfig#paths) in `tsconfig.json`, which works well with editors. If you aren't a TypeScript user, you can achieve the same behavior by using a [`jsconfig.json`](https://code.visualstudio.com/docs/languages/jsconfig) in your project root.
|
|
280
280
|
|
|
281
281
|
```json tsconfig.json icon="file-json"
|
|
282
282
|
{
|
|
@@ -289,7 +289,16 @@ In the spirit of treating TypeScript as a first-class citizen, the Bun runtime w
|
|
|
289
289
|
}
|
|
290
290
|
```
|
|
291
291
|
|
|
292
|
-
|
|
292
|
+
Bun also supports [Node.js-style subpath imports](https://nodejs.org/api/packages.html#subpath-imports) in `package.json`, where mapped paths must start with `#`. This approach doesn’t work as well with editors, but both options can be used together.
|
|
293
|
+
|
|
294
|
+
```json package.json icon="file-json"
|
|
295
|
+
{
|
|
296
|
+
"imports": {
|
|
297
|
+
"#config": "./config.ts", // map specifier to file
|
|
298
|
+
"#components/*": "./components/*" // wildcard matching
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
```
|
|
293
302
|
|
|
294
303
|
<Accordion title="Low-level details of CommonJS interop in Bun">
|
|
295
304
|
|
package/docs/runtime/plugins.mdx
CHANGED
|
@@ -42,7 +42,21 @@ type PluginBuilder = {
|
|
|
42
42
|
config: BuildConfig;
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
type Loader =
|
|
45
|
+
type Loader =
|
|
46
|
+
| "js"
|
|
47
|
+
| "jsx"
|
|
48
|
+
| "ts"
|
|
49
|
+
| "tsx"
|
|
50
|
+
| "json"
|
|
51
|
+
| "jsonc"
|
|
52
|
+
| "toml"
|
|
53
|
+
| "yaml"
|
|
54
|
+
| "file"
|
|
55
|
+
| "napi"
|
|
56
|
+
| "wasm"
|
|
57
|
+
| "text"
|
|
58
|
+
| "css"
|
|
59
|
+
| "html";
|
|
46
60
|
```
|
|
47
61
|
|
|
48
62
|
## Usage
|
package/docs/runtime/s3.mdx
CHANGED
|
@@ -697,7 +697,7 @@ To list some or all (up to 1,000) objects in a bucket, you can use the `S3Client
|
|
|
697
697
|
```ts s3.ts icon="/icons/typescript.svg" highlight={12, 15-20, 24-29}
|
|
698
698
|
import { S3Client } from "bun";
|
|
699
699
|
|
|
700
|
-
const credentials = {
|
|
700
|
+
const credentials = {
|
|
701
701
|
accessKeyId: "your-access-key",
|
|
702
702
|
secretAccessKey: "your-secret-key",
|
|
703
703
|
bucket: "my-bucket",
|
package/package.json
CHANGED