bun-types 1.2.21-canary.20250821T140634 → 1.2.21-canary.20250822T140708
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/docs/api/fetch.md +1 -1
- package/docs/api/spawn.md +1 -1
- package/docs/cli/pm.md +1 -1
- package/docs/cli/publish.md +1 -1
- package/docs/guides/ecosystem/nuxt.md +1 -1
- package/docs/guides/install/add-peer.md +2 -2
- package/docs/guides/install/from-npm-install-to-bun-install.md +1 -1
- package/docs/guides/test/run-tests.md +3 -3
- package/docs/guides/test/snapshot.md +3 -3
- package/docs/guides/test/update-snapshots.md +1 -1
- package/docs/guides/util/version.md +1 -1
- package/docs/install/security-scanner-api.md +81 -0
- package/docs/installation.md +4 -4
- package/docs/runtime/bunfig.md +26 -0
- package/docs/runtime/debugger.md +3 -3
- package/docs/test/dom.md +1 -1
- package/index.d.ts +1 -0
- package/package.json +1 -1
- package/security.d.ts +101 -0
- package/sql.d.ts +15 -11
package/docs/api/fetch.md
CHANGED
|
@@ -336,7 +336,7 @@ This will print the request and response headers to your terminal:
|
|
|
336
336
|
```sh
|
|
337
337
|
[fetch] > HTTP/1.1 GET http://example.com/
|
|
338
338
|
[fetch] > Connection: keep-alive
|
|
339
|
-
[fetch] > User-Agent: Bun/1.2.21-canary.
|
|
339
|
+
[fetch] > User-Agent: Bun/1.2.21-canary.20250822T140708
|
|
340
340
|
[fetch] > Accept: */*
|
|
341
341
|
[fetch] > Host: example.com
|
|
342
342
|
[fetch] > Accept-Encoding: gzip, deflate, br
|
package/docs/api/spawn.md
CHANGED
|
@@ -140,7 +140,7 @@ You can read results from the subprocess via the `stdout` and `stderr` propertie
|
|
|
140
140
|
```ts
|
|
141
141
|
const proc = Bun.spawn(["bun", "--version"]);
|
|
142
142
|
const text = await proc.stdout.text();
|
|
143
|
-
console.log(text); // => "1.2.21-canary.
|
|
143
|
+
console.log(text); // => "1.2.21-canary.20250822T140708\n"
|
|
144
144
|
```
|
|
145
145
|
|
|
146
146
|
Configure the output stream by passing one of the following values to `stdout/stderr`:
|
package/docs/cli/pm.md
CHANGED
|
@@ -213,7 +213,7 @@ To display current package version and help:
|
|
|
213
213
|
|
|
214
214
|
```bash
|
|
215
215
|
$ bun pm version
|
|
216
|
-
bun pm version v1.2.21-canary.
|
|
216
|
+
bun pm version v1.2.21-canary.20250822T140708 (ca7428e9)
|
|
217
217
|
Current package version: v1.0.0
|
|
218
218
|
|
|
219
219
|
Increment:
|
package/docs/cli/publish.md
CHANGED
|
@@ -9,7 +9,7 @@ $ bunx nuxi init my-nuxt-app
|
|
|
9
9
|
✔ Which package manager would you like to use?
|
|
10
10
|
bun
|
|
11
11
|
◐ Installing dependencies...
|
|
12
|
-
bun install v1.2.21-canary.
|
|
12
|
+
bun install v1.2.21-canary.20250822T140708 (16b4bf34)
|
|
13
13
|
+ @nuxt/devtools@0.8.2
|
|
14
14
|
+ nuxt@3.7.0
|
|
15
15
|
785 packages installed [2.67s]
|
|
@@ -15,7 +15,7 @@ This will add the package to `peerDependencies` in `package.json`.
|
|
|
15
15
|
```json-diff
|
|
16
16
|
{
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
+ "@types/bun": "^1.2.21-canary.
|
|
18
|
+
+ "@types/bun": "^1.2.21-canary.20250822T140708"
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
```
|
|
@@ -27,7 +27,7 @@ Running `bun install` will install peer dependencies by default, unless marked o
|
|
|
27
27
|
```json-diff
|
|
28
28
|
{
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@types/bun": "^1.2.21-canary.
|
|
30
|
+
"@types/bun": "^1.2.21-canary.20250822T140708"
|
|
31
31
|
},
|
|
32
32
|
"peerDependenciesMeta": {
|
|
33
33
|
+ "@types/bun": {
|
|
@@ -97,7 +97,7 @@ $ bun update
|
|
|
97
97
|
$ bun update @types/bun --latest
|
|
98
98
|
|
|
99
99
|
# Update a dependency to a specific version
|
|
100
|
-
$ bun update @types/bun@1.2.21-canary.
|
|
100
|
+
$ bun update @types/bun@1.2.21-canary.20250822T140708
|
|
101
101
|
|
|
102
102
|
# Update all dependencies to the latest versions
|
|
103
103
|
$ bun update --latest
|
|
@@ -21,7 +21,7 @@ Here's what the output of a typical test run looks like. In this case, there are
|
|
|
21
21
|
|
|
22
22
|
```sh
|
|
23
23
|
$ bun test
|
|
24
|
-
bun test v1.2.21-canary.
|
|
24
|
+
bun test v1.2.21-canary.20250822T140708 (9c68abdb)
|
|
25
25
|
|
|
26
26
|
test.test.js:
|
|
27
27
|
✓ add [0.87ms]
|
|
@@ -47,7 +47,7 @@ To only run certain test files, pass a positional argument to `bun test`. The ru
|
|
|
47
47
|
|
|
48
48
|
```sh
|
|
49
49
|
$ bun test test3
|
|
50
|
-
bun test v1.2.21-canary.
|
|
50
|
+
bun test v1.2.21-canary.20250822T140708 (9c68abdb)
|
|
51
51
|
|
|
52
52
|
test3.test.js:
|
|
53
53
|
✓ add [1.40ms]
|
|
@@ -85,7 +85,7 @@ Adding `-t add` will only run tests with "add" in the name. This works with test
|
|
|
85
85
|
|
|
86
86
|
```sh
|
|
87
87
|
$ bun test -t add
|
|
88
|
-
bun test v1.2.21-canary.
|
|
88
|
+
bun test v1.2.21-canary.20250822T140708 (9c68abdb)
|
|
89
89
|
|
|
90
90
|
test.test.js:
|
|
91
91
|
✓ add [1.79ms]
|
|
@@ -18,7 +18,7 @@ The first time this test is executed, Bun will evaluate the value passed into `e
|
|
|
18
18
|
|
|
19
19
|
```sh
|
|
20
20
|
$ bun test test/snap
|
|
21
|
-
bun test v1.2.21-canary.
|
|
21
|
+
bun test v1.2.21-canary.20250822T140708 (9c68abdb)
|
|
22
22
|
|
|
23
23
|
test/snap.test.ts:
|
|
24
24
|
✓ snapshot [1.48ms]
|
|
@@ -61,7 +61,7 @@ Later, when this test file is executed again, Bun will read the snapshot file an
|
|
|
61
61
|
|
|
62
62
|
```sh
|
|
63
63
|
$ bun test
|
|
64
|
-
bun test v1.2.21-canary.
|
|
64
|
+
bun test v1.2.21-canary.20250822T140708 (9c68abdb)
|
|
65
65
|
|
|
66
66
|
test/snap.test.ts:
|
|
67
67
|
✓ snapshot [1.05ms]
|
|
@@ -78,7 +78,7 @@ To update snapshots, use the `--update-snapshots` flag.
|
|
|
78
78
|
|
|
79
79
|
```sh
|
|
80
80
|
$ bun test --update-snapshots
|
|
81
|
-
bun test v1.2.21-canary.
|
|
81
|
+
bun test v1.2.21-canary.20250822T140708 (9c68abdb)
|
|
82
82
|
|
|
83
83
|
test/snap.test.ts:
|
|
84
84
|
✓ snapshot [0.86ms]
|
|
@@ -29,7 +29,7 @@ To regenerate snapshots, use the `--update-snapshots` flag.
|
|
|
29
29
|
|
|
30
30
|
```sh
|
|
31
31
|
$ bun test --update-snapshots
|
|
32
|
-
bun test v1.2.21-canary.
|
|
32
|
+
bun test v1.2.21-canary.20250822T140708 (9c68abdb)
|
|
33
33
|
|
|
34
34
|
test/snap.test.ts:
|
|
35
35
|
✓ snapshot [0.86ms]
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
Bun's package manager can scan packages for security vulnerabilities before installation, helping protect your applications from supply chain attacks and known vulnerabilities.
|
|
2
|
+
|
|
3
|
+
## Quick Start
|
|
4
|
+
|
|
5
|
+
Configure a security scanner in your `bunfig.toml`:
|
|
6
|
+
|
|
7
|
+
```toml
|
|
8
|
+
[install.security]
|
|
9
|
+
scanner = "@acme/bun-security-scanner"
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
When configured, Bun will:
|
|
13
|
+
|
|
14
|
+
- Scan all packages before installation
|
|
15
|
+
- Display security warnings and advisories
|
|
16
|
+
- Cancel installation if critical vulnerabilities are found
|
|
17
|
+
- Automatically disable auto-install for security
|
|
18
|
+
|
|
19
|
+
## How It Works
|
|
20
|
+
|
|
21
|
+
Security scanners analyze packages during `bun install`, `bun add`, and other package operations. They can detect:
|
|
22
|
+
|
|
23
|
+
- Known security vulnerabilities (CVEs)
|
|
24
|
+
- Malicious packages
|
|
25
|
+
- License compliance issues
|
|
26
|
+
- ...and more!
|
|
27
|
+
|
|
28
|
+
### Security Levels
|
|
29
|
+
|
|
30
|
+
Scanners report issues at two severity levels:
|
|
31
|
+
|
|
32
|
+
- **`fatal`** - Installation stops immediately, exits with non-zero code
|
|
33
|
+
- **`warn`** - In interactive terminals, prompts to continue; in CI, exits immediately
|
|
34
|
+
|
|
35
|
+
## Using Pre-built Scanners
|
|
36
|
+
|
|
37
|
+
Many security companies publish Bun security scanners as npm packages that you can install and use immediately.
|
|
38
|
+
|
|
39
|
+
### Installing a Scanner
|
|
40
|
+
|
|
41
|
+
Install a security scanner from npm:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
$ bun add -d @acme/bun-security-scanner
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
> **Note:** Consult your security scanner's documentation for their specific package name and installation instructions. Most scanners will be installed with `bun add`.
|
|
48
|
+
|
|
49
|
+
### Configuring the Scanner
|
|
50
|
+
|
|
51
|
+
After installation, configure it in your `bunfig.toml`:
|
|
52
|
+
|
|
53
|
+
```toml
|
|
54
|
+
[install.security]
|
|
55
|
+
scanner = "@acme/bun-security-scanner"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Enterprise Configuration
|
|
59
|
+
|
|
60
|
+
Some enterprise scanners might support authentication and/or configuration through environment variables:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# This might go in ~/.bashrc, for example
|
|
64
|
+
export SECURITY_API_KEY="your-api-key"
|
|
65
|
+
|
|
66
|
+
# The scanner will now use these credentials automatically
|
|
67
|
+
bun install
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Consult your security scanner's documentation to learn which environment variables to set and if any additional configuration is required.
|
|
71
|
+
|
|
72
|
+
### Authoring your own scanner
|
|
73
|
+
|
|
74
|
+
For a complete example with tests and CI setup, see the official template:
|
|
75
|
+
[github.com/oven-sh/security-scanner-template](https://github.com/oven-sh/security-scanner-template)
|
|
76
|
+
|
|
77
|
+
## Related
|
|
78
|
+
|
|
79
|
+
- [Configuration (bunfig.toml)](/docs/runtime/bunfig#installsecurityscanner)
|
|
80
|
+
- [Package Manager](/docs/install)
|
|
81
|
+
- [Security Scanner Template](https://github.com/oven-sh/security-scanner-template)
|
package/docs/installation.md
CHANGED
|
@@ -14,7 +14,7 @@ Kernel version 5.6 or higher is strongly recommended, but the minimum is 5.1. Us
|
|
|
14
14
|
```bash#macOS/Linux_(curl)
|
|
15
15
|
$ curl -fsSL https://bun.com/install | bash # for macOS, Linux, and WSL
|
|
16
16
|
# to install a specific version
|
|
17
|
-
$ curl -fsSL https://bun.com/install | bash -s "bun-v1.2.21-canary.
|
|
17
|
+
$ curl -fsSL https://bun.com/install | bash -s "bun-v1.2.21-canary.20250822T140708"
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
```bash#npm
|
|
@@ -189,10 +189,10 @@ Since Bun is a single binary, you can install older versions of Bun by re-runnin
|
|
|
189
189
|
|
|
190
190
|
### Installing a specific version of Bun on Linux/Mac
|
|
191
191
|
|
|
192
|
-
To install a specific version of Bun, you can pass the git tag of the version you want to install to the install script, such as `bun-v1.2.0` or `bun-v1.2.21-canary.
|
|
192
|
+
To install a specific version of Bun, you can pass the git tag of the version you want to install to the install script, such as `bun-v1.2.0` or `bun-v1.2.21-canary.20250822T140708`.
|
|
193
193
|
|
|
194
194
|
```sh
|
|
195
|
-
$ curl -fsSL https://bun.com/install | bash -s "bun-v1.2.21-canary.
|
|
195
|
+
$ curl -fsSL https://bun.com/install | bash -s "bun-v1.2.21-canary.20250822T140708"
|
|
196
196
|
```
|
|
197
197
|
|
|
198
198
|
### Installing a specific version of Bun on Windows
|
|
@@ -201,7 +201,7 @@ On Windows, you can install a specific version of Bun by passing the version num
|
|
|
201
201
|
|
|
202
202
|
```sh
|
|
203
203
|
# PowerShell:
|
|
204
|
-
$ iex "& {$(irm https://bun.com/install.ps1)} -Version 1.2.21-canary.
|
|
204
|
+
$ iex "& {$(irm https://bun.com/install.ps1)} -Version 1.2.21-canary.20250822T140708"
|
|
205
205
|
```
|
|
206
206
|
|
|
207
207
|
## Downloading Bun binaries directly
|
package/docs/runtime/bunfig.md
CHANGED
|
@@ -496,6 +496,32 @@ Whether to generate a non-Bun lockfile alongside `bun.lock`. (A `bun.lock` will
|
|
|
496
496
|
print = "yarn"
|
|
497
497
|
```
|
|
498
498
|
|
|
499
|
+
### `install.security.scanner`
|
|
500
|
+
|
|
501
|
+
Configure a security scanner to scan packages for vulnerabilities before installation.
|
|
502
|
+
|
|
503
|
+
First, install a security scanner from npm:
|
|
504
|
+
|
|
505
|
+
```bash
|
|
506
|
+
$ bun add -d @acme/bun-security-scanner
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
Then configure it in your `bunfig.toml`:
|
|
510
|
+
|
|
511
|
+
```toml
|
|
512
|
+
[install.security]
|
|
513
|
+
scanner = "@acme/bun-security-scanner"
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
When a security scanner is configured:
|
|
517
|
+
|
|
518
|
+
- Auto-install is automatically disabled for security
|
|
519
|
+
- Packages are scanned before installation
|
|
520
|
+
- Installation is cancelled if fatal issues are found
|
|
521
|
+
- Security warnings are displayed during installation
|
|
522
|
+
|
|
523
|
+
Learn more about [using and writing security scanners](/docs/install/security).
|
|
524
|
+
|
|
499
525
|
### `install.linker`
|
|
500
526
|
|
|
501
527
|
Configure the default linker strategy. Default `"hoisted"`.
|
package/docs/runtime/debugger.md
CHANGED
|
@@ -124,11 +124,11 @@ await fetch("https://example.com", {
|
|
|
124
124
|
This prints the `fetch` request as a single-line `curl` command to let you copy-paste into your terminal to replicate the request.
|
|
125
125
|
|
|
126
126
|
```sh
|
|
127
|
-
[fetch] $ curl --http1.1 "https://example.com/" -X POST -H "content-type: application/json" -H "Connection: keep-alive" -H "User-Agent: Bun/1.2.21-canary.
|
|
127
|
+
[fetch] $ curl --http1.1 "https://example.com/" -X POST -H "content-type: application/json" -H "Connection: keep-alive" -H "User-Agent: Bun/1.2.21-canary.20250822T140708" -H "Accept: */*" -H "Host: example.com" -H "Accept-Encoding: gzip, deflate, br" --compressed -H "Content-Length: 13" --data-raw "{\"foo\":\"bar\"}"
|
|
128
128
|
[fetch] > HTTP/1.1 POST https://example.com/
|
|
129
129
|
[fetch] > content-type: application/json
|
|
130
130
|
[fetch] > Connection: keep-alive
|
|
131
|
-
[fetch] > User-Agent: Bun/1.2.21-canary.
|
|
131
|
+
[fetch] > User-Agent: Bun/1.2.21-canary.20250822T140708
|
|
132
132
|
[fetch] > Accept: */*
|
|
133
133
|
[fetch] > Host: example.com
|
|
134
134
|
[fetch] > Accept-Encoding: gzip, deflate, br
|
|
@@ -170,7 +170,7 @@ This prints the following to the console:
|
|
|
170
170
|
[fetch] > HTTP/1.1 POST https://example.com/
|
|
171
171
|
[fetch] > content-type: application/json
|
|
172
172
|
[fetch] > Connection: keep-alive
|
|
173
|
-
[fetch] > User-Agent: Bun/1.2.21-canary.
|
|
173
|
+
[fetch] > User-Agent: Bun/1.2.21-canary.20250822T140708
|
|
174
174
|
[fetch] > Accept: */*
|
|
175
175
|
[fetch] > Host: example.com
|
|
176
176
|
[fetch] > Accept-Encoding: gzip, deflate, br
|
package/docs/test/dom.md
CHANGED
package/index.d.ts
CHANGED
package/package.json
CHANGED
package/security.d.ts
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
declare module "bun" {
|
|
2
|
+
/**
|
|
3
|
+
* `bun install` security related declarations
|
|
4
|
+
*/
|
|
5
|
+
export namespace Security {
|
|
6
|
+
export interface Package {
|
|
7
|
+
/**
|
|
8
|
+
* The name of the package
|
|
9
|
+
*/
|
|
10
|
+
name: string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The resolved version to be installed that matches the requested range.
|
|
14
|
+
*
|
|
15
|
+
* This is the exact version string, **not** a range.
|
|
16
|
+
*/
|
|
17
|
+
version: string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The URL of the tgz of this package that Bun will download
|
|
21
|
+
*/
|
|
22
|
+
tarball: string;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The range that was requested by the command
|
|
26
|
+
*
|
|
27
|
+
* This could be a tag like `beta` or a semver range like `>=4.0.0`
|
|
28
|
+
*/
|
|
29
|
+
requestedRange: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Advisory represents the result of a security scan result of a package
|
|
34
|
+
*/
|
|
35
|
+
export interface Advisory {
|
|
36
|
+
/**
|
|
37
|
+
* Level represents the degree of danger for a security advisory
|
|
38
|
+
*
|
|
39
|
+
* Bun behaves differently depending on the values returned from the
|
|
40
|
+
* {@link Scanner.scan `scan()`} hook:
|
|
41
|
+
*
|
|
42
|
+
* > In any case, Bun *always* pretty prints *all* the advisories,
|
|
43
|
+
* > but...
|
|
44
|
+
* >
|
|
45
|
+
* > → if any **fatal**, Bun will immediately cancel the installation
|
|
46
|
+
* > and quit with a non-zero exit code
|
|
47
|
+
* >
|
|
48
|
+
* > → else if any **warn**, Bun will either ask the user if they'd like
|
|
49
|
+
* > to continue with the install if in a TTY environment, or
|
|
50
|
+
* > immediately exit if not.
|
|
51
|
+
*/
|
|
52
|
+
level: "fatal" | "warn";
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The name of the package attempting to be installed.
|
|
56
|
+
*/
|
|
57
|
+
package: string;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* If available, this is a url linking to a CVE or report online so
|
|
61
|
+
* users can learn more about the advisory.
|
|
62
|
+
*/
|
|
63
|
+
url: string | null;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* If available, this is a brief description of the advisory that Bun
|
|
67
|
+
* will print to the user.
|
|
68
|
+
*/
|
|
69
|
+
description: string | null;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface Scanner {
|
|
73
|
+
/**
|
|
74
|
+
* This is the version of the scanner implementation. It may change in
|
|
75
|
+
* future versions, so we will use this version to discriminate between
|
|
76
|
+
* such versions. It's entirely possible this API changes in the future
|
|
77
|
+
* so much that version 1 would no longer be supported.
|
|
78
|
+
*
|
|
79
|
+
* The version is required because third-party scanner package versions
|
|
80
|
+
* are inherently unrelated to Bun versions
|
|
81
|
+
*/
|
|
82
|
+
version: "1";
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Perform an advisory check when a user ran `bun add <package>
|
|
86
|
+
* [...packages]` or other related/similar commands.
|
|
87
|
+
*
|
|
88
|
+
* If this function throws an error, Bun will immediately stop the
|
|
89
|
+
* install process and print the error to the user.
|
|
90
|
+
*
|
|
91
|
+
* @param info An object containing an array of packages to be added.
|
|
92
|
+
* The package array will contain all proposed dependencies, including
|
|
93
|
+
* transitive ones. More simply, that means it will include dependencies
|
|
94
|
+
* of the packages the user wants to add.
|
|
95
|
+
*
|
|
96
|
+
* @returns A list of advisories.
|
|
97
|
+
*/
|
|
98
|
+
scan: (info: { packages: Package[] }) => Promise<Advisory[]>;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
package/sql.d.ts
CHANGED
|
@@ -82,6 +82,13 @@ declare module "bun" {
|
|
|
82
82
|
);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
class MySQLError extends SQLError {
|
|
86
|
+
public readonly code: string;
|
|
87
|
+
public readonly errno: number | undefined;
|
|
88
|
+
public readonly sqlState: string | undefined;
|
|
89
|
+
constructor(message: string, options: { code: string; errno: number | undefined; sqlState: string | undefined });
|
|
90
|
+
}
|
|
91
|
+
|
|
85
92
|
class SQLiteError extends SQLError {
|
|
86
93
|
public readonly code: string;
|
|
87
94
|
public readonly errno: number;
|
|
@@ -128,7 +135,7 @@ declare module "bun" {
|
|
|
128
135
|
onclose?: ((err: Error | null) => void) | undefined;
|
|
129
136
|
}
|
|
130
137
|
|
|
131
|
-
interface
|
|
138
|
+
interface PostgresOrMySQLOptions {
|
|
132
139
|
/**
|
|
133
140
|
* Connection URL (can be string or URL object)
|
|
134
141
|
*/
|
|
@@ -196,7 +203,7 @@ declare module "bun" {
|
|
|
196
203
|
* Database adapter/driver to use
|
|
197
204
|
* @default "postgres"
|
|
198
205
|
*/
|
|
199
|
-
adapter?: "postgres";
|
|
206
|
+
adapter?: "postgres" | "mysql" | "mariadb";
|
|
200
207
|
|
|
201
208
|
/**
|
|
202
209
|
* Maximum time in seconds to wait for connection to become available
|
|
@@ -265,14 +272,11 @@ declare module "bun" {
|
|
|
265
272
|
*/
|
|
266
273
|
ssl?: TLSOptions | boolean | undefined;
|
|
267
274
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
// * @default ""
|
|
274
|
-
// */
|
|
275
|
-
// path?: string | undefined;
|
|
275
|
+
/**
|
|
276
|
+
* Unix domain socket path for connection
|
|
277
|
+
* @default undefined
|
|
278
|
+
*/
|
|
279
|
+
path?: string | undefined;
|
|
276
280
|
|
|
277
281
|
/**
|
|
278
282
|
* Callback executed when a connection attempt completes
|
|
@@ -332,7 +336,7 @@ declare module "bun" {
|
|
|
332
336
|
* };
|
|
333
337
|
* ```
|
|
334
338
|
*/
|
|
335
|
-
type Options = SQLiteOptions |
|
|
339
|
+
type Options = SQLiteOptions | PostgresOrMySQLOptions;
|
|
336
340
|
|
|
337
341
|
/**
|
|
338
342
|
* Represents a SQL query that can be executed, with additional control
|