[autofix.ci] apply automated fixes

This commit is contained in:
autofix-ci[bot]
2025-11-08 05:05:53 +00:00
committed by GitHub
parent c35e6a0f52
commit 71e5f74f9b

View File

@@ -506,30 +506,30 @@ You can use `Bun.YAML.stringify()` to programmatically create YAML configuration
import { YAML } from "bun";
const defaults = {
timeout: 30000,
retries: 3,
timeout: 30000,
retries: 3,
};
const config = {
defaults,
development: {
defaults,
host: "localhost",
port: 3000,
},
production: {
defaults,
host: "api.example.com",
port: 443,
},
servers: [
{ name: "server1", url: "https://api1.example.com" },
{ name: "server2", url: "https://api2.example.com" },
],
features: {
enabled: ["auth", "logging", "metrics"],
disabled: ["experimental"],
},
defaults,
development: {
defaults,
host: "localhost",
port: 3000,
},
production: {
defaults,
host: "api.example.com",
port: 443,
},
servers: [
{ name: "server1", url: "https://api1.example.com" },
{ name: "server2", url: "https://api2.example.com" },
],
features: {
enabled: ["auth", "logging", "metrics"],
disabled: ["experimental"],
},
};
// Generate readable YAML with 2-space indentation
@@ -539,7 +539,8 @@ await Bun.write("config.yaml", yaml);
// The output is valid YAML that parses back to the original object
import { deepEqual } from "node:assert";
deepEqual(config, Bun.YAML.parse(yaml));
```
````
```yaml output.yaml icon="file-code"
defaults:
@@ -568,7 +569,7 @@ features:
- metrics
disabled:
- experimental
```
````
</CodeGroup>
@@ -604,4 +605,3 @@ async function loadUserSettings(userId: string) {
}
}
```