mirror of
https://github.com/oven-sh/bun
synced 2026-02-03 07:28:53 +00:00
Compare commits
125 Commits
ciro/fix-a
...
riskymh/in
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd676098f2 | ||
|
|
414f08aa8d | ||
|
|
68d322f05f | ||
|
|
39eccf89a8 | ||
|
|
a729a046bd | ||
|
|
9bb4a6af19 | ||
|
|
07ffde8a69 | ||
|
|
bb67f2b345 | ||
|
|
7c4c360431 | ||
|
|
4b39a9b07d | ||
|
|
d0edcc69ae | ||
|
|
0cf2b71ff1 | ||
|
|
40bff9fea8 | ||
|
|
7726e5c670 | ||
|
|
7a31108019 | ||
|
|
dd68364630 | ||
|
|
7d4f6efe7a | ||
|
|
7cdcd34f58 | ||
|
|
2a6d018d73 | ||
|
|
8efe7945eb | ||
|
|
5bdcf339d7 | ||
|
|
03afe6ef28 | ||
|
|
ce5152dd7a | ||
|
|
5c65c18e72 | ||
|
|
100ab8c503 | ||
|
|
a51af710c0 | ||
|
|
5ca1580427 | ||
|
|
b34bab745b | ||
|
|
6034c2f94b | ||
|
|
2b5a59cae1 | ||
|
|
3bcf93ddd6 | ||
|
|
53b24ace79 | ||
|
|
a1f44caa87 | ||
|
|
3de884f2c9 | ||
|
|
a6162295c5 | ||
|
|
80c46b1607 | ||
|
|
86ca965c7f | ||
|
|
0110d3316f | ||
|
|
9d9ccbcba4 | ||
|
|
afbeae15eb | ||
|
|
26cbcd21c1 | ||
|
|
3d6dda6901 | ||
|
|
93f92658b3 | ||
|
|
f8c2dac836 | ||
|
|
4bbe32fff8 | ||
|
|
60c735a11d | ||
|
|
003d13ec27 | ||
|
|
245abb92fb | ||
|
|
066a25ac40 | ||
|
|
ab88317846 | ||
|
|
ec2f2aaf3f | ||
|
|
0037bbe961 | ||
|
|
e7373bbf32 | ||
|
|
006b2215f6 | ||
|
|
4687cc4f5e | ||
|
|
7b78979cc0 | ||
|
|
ad5f00eea3 | ||
|
|
a5ff729665 | ||
|
|
62e8a7fb01 | ||
|
|
220807f3dc | ||
|
|
562f82d3f8 | ||
|
|
4580e11fc3 | ||
|
|
2956281845 | ||
|
|
9a2dfee3ca | ||
|
|
7a47c945aa | ||
|
|
24b7835ecd | ||
|
|
95990e7bd6 | ||
|
|
f2e487b1e6 | ||
|
|
3315ade0e9 | ||
|
|
95e653e52b | ||
|
|
a8522b16af | ||
|
|
aba8c4efd2 | ||
|
|
0bebdc9049 | ||
|
|
1058d0dee4 | ||
|
|
679a07caef | ||
|
|
0bd73b4363 | ||
|
|
bbdc3ae055 | ||
|
|
81e08d45d4 | ||
|
|
89eb48047f | ||
|
|
712d5be741 | ||
|
|
60823348c5 | ||
|
|
2f0ddf3018 | ||
|
|
1ab76610cf | ||
|
|
d3927a6e09 | ||
|
|
8424caa5fa | ||
|
|
3e6d792b62 | ||
|
|
9bb2474adb | ||
|
|
fe94a36dbc | ||
|
|
cb2887feee | ||
|
|
64361eb964 | ||
|
|
3413a2816f | ||
|
|
97a530d832 | ||
|
|
72a6278b3f | ||
|
|
bd232189b4 | ||
|
|
87df7527bb | ||
|
|
56c766772b | ||
|
|
b1914a6235 | ||
|
|
1445e86e12 | ||
|
|
2db492ea5a | ||
|
|
a8a722547d | ||
|
|
a1f756fea9 | ||
|
|
03dfd7d96b | ||
|
|
bfcc678601 | ||
|
|
a39255d275 | ||
|
|
4be5a57c84 | ||
|
|
c5eb9c1113 | ||
|
|
8e6d4e4372 | ||
|
|
0a2aea07a8 | ||
|
|
5f95d87a21 | ||
|
|
8a78796923 | ||
|
|
9db6309723 | ||
|
|
6703de0028 | ||
|
|
f3879a5104 | ||
|
|
07f1beb8a0 | ||
|
|
b73c90692f | ||
|
|
5b56b6e7ea | ||
|
|
9d6b3d0945 | ||
|
|
48f0a7f149 | ||
|
|
e76f90f3c9 | ||
|
|
5cacd0d466 | ||
|
|
c31bd9505a | ||
|
|
1df8ad0199 | ||
|
|
22f707baa1 | ||
|
|
c5d2928156 | ||
|
|
10e8075872 |
@@ -1,78 +0,0 @@
|
||||
import { spawnSync } from "node:child_process";
|
||||
import { readFileSync, existsSync } from "node:fs";
|
||||
import { parseArgs } from "node:util";
|
||||
|
||||
const { positionals, values } = parseArgs({
|
||||
allowPositionals: true,
|
||||
options: {
|
||||
help: {
|
||||
type: "boolean",
|
||||
short: "h",
|
||||
default: false,
|
||||
},
|
||||
interactive: {
|
||||
type: "boolean",
|
||||
short: "i",
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
if (values.help || positionals.length === 0) {
|
||||
console.log("Usage: node agent.mjs <prompt_name> [extra_args...]");
|
||||
console.log("Example: node agent.mjs triage fix bug in authentication");
|
||||
console.log("Options:");
|
||||
console.log(" -h, --help Show this help message");
|
||||
console.log(" -i, --interactive Run in interactive mode");
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
const promptName = positionals[0].toUpperCase();
|
||||
const promptFile = `.agent/${promptName}.md`;
|
||||
const extraArgs = positionals.slice(1);
|
||||
|
||||
if (!existsSync(promptFile)) {
|
||||
console.error(`Error: Prompt file "${promptFile}" not found`);
|
||||
console.error(`Available prompts should be named like: .agent/triage.md, .agent/debug.md, etc.`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
try {
|
||||
let prompt = readFileSync(promptFile, "utf-8");
|
||||
|
||||
const githubEnvs = Object.entries(process.env)
|
||||
.filter(([key]) => key.startsWith("GITHUB_"))
|
||||
.sort(([a], [b]) => a.localeCompare(b));
|
||||
|
||||
if (githubEnvs.length > 0) {
|
||||
const githubContext = `## GitHub Environment\n\n${githubEnvs
|
||||
.map(([key, value]) => `**${key}**: \`${value}\``)
|
||||
.join("\n")}\n\n---\n\n`;
|
||||
prompt = githubContext + prompt;
|
||||
}
|
||||
|
||||
if (extraArgs.length > 0) {
|
||||
const extraArgsContext = `\n\n## Additional Arguments\n\n${extraArgs.join(" ")}\n\n---\n\n`;
|
||||
prompt = prompt + extraArgsContext;
|
||||
}
|
||||
|
||||
const claudeArgs = [prompt, "--allowedTools=Edit,Write,Replace,Search", "--output-format=json"];
|
||||
if (!values.interactive) {
|
||||
claudeArgs.unshift("--print");
|
||||
}
|
||||
|
||||
const { status, error } = spawnSync("claude", claudeArgs, {
|
||||
stdio: "inherit",
|
||||
encoding: "utf-8",
|
||||
});
|
||||
|
||||
if (error) {
|
||||
console.error("Error running claude:", error);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
process.exit(status || 0);
|
||||
} catch (error) {
|
||||
console.error(`Error reading prompt file "${promptFile}":`, error);
|
||||
process.exit(1);
|
||||
}
|
||||
47
.github/pull_request_template.md
vendored
47
.github/pull_request_template.md
vendored
@@ -1,50 +1,3 @@
|
||||
### What does this PR do?
|
||||
|
||||
<!-- **Please explain what your changes do**, example: -->
|
||||
|
||||
<!--
|
||||
|
||||
This adds a new flag --bail to bun test. When set, it will stop running tests after the first failure. This is useful for CI environments where you want to fail fast.
|
||||
|
||||
-->
|
||||
|
||||
- [ ] Documentation or TypeScript types (it's okay to leave the rest blank in this case)
|
||||
- [ ] Code changes
|
||||
|
||||
### How did you verify your code works?
|
||||
|
||||
<!-- **For code changes, please include automated tests**. Feel free to uncomment the line below -->
|
||||
|
||||
<!-- I wrote automated tests -->
|
||||
|
||||
<!-- If JavaScript/TypeScript modules or builtins changed:
|
||||
|
||||
- [ ] I included a test for the new code, or existing tests cover it
|
||||
- [ ] I ran my tests locally and they pass (`bun-debug test test-file-name.test`)
|
||||
|
||||
-->
|
||||
|
||||
<!-- If Zig files changed:
|
||||
|
||||
- [ ] I checked the lifetime of memory allocated to verify it's (1) freed and (2) only freed when it should be
|
||||
- [ ] I included a test for the new code, or an existing test covers it
|
||||
- [ ] JSValue used outside of the stack is either wrapped in a JSC.Strong or is JSValueProtect'ed
|
||||
- [ ] I wrote TypeScript/JavaScript tests and they pass locally (`bun-debug test test-file-name.test`)
|
||||
-->
|
||||
|
||||
<!-- If new methods, getters, or setters were added to a publicly exposed class:
|
||||
|
||||
- [ ] I added TypeScript types for the new methods, getters, or setters
|
||||
-->
|
||||
|
||||
<!-- If dependencies in tests changed:
|
||||
|
||||
- [ ] I made sure that specific versions of dependencies are used instead of ranged or tagged versions
|
||||
-->
|
||||
|
||||
<!-- If a new builtin ESM/CJS module was added:
|
||||
|
||||
- [ ] I updated Aliases in `module_loader.zig` to include the new module
|
||||
- [ ] I added a test that imports the module
|
||||
- [ ] I added a test that require() the module
|
||||
-->
|
||||
|
||||
3
.github/workflows/format.yml
vendored
3
.github/workflows/format.yml
vendored
@@ -55,4 +55,7 @@ jobs:
|
||||
- name: Clang Format
|
||||
run: |
|
||||
bun run clang-format
|
||||
- name: Ban Words
|
||||
run: |
|
||||
bun ./test/internal/ban-words.test.ts
|
||||
- uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27
|
||||
|
||||
15
.github/workflows/update-hdrhistogram.yml
vendored
15
.github/workflows/update-hdrhistogram.yml
vendored
@@ -55,10 +55,13 @@ jobs:
|
||||
echo "Error: Could not fetch SHA for tag $LATEST_TAG"
|
||||
exit 1
|
||||
fi
|
||||
LATEST_SHA=$(curl -sL "https://api.github.com/repos/HdrHistogram/HdrHistogram_c/git/tags/$LATEST_TAG_SHA" | jq -r '.object.sha')
|
||||
if [ -z "$LATEST_SHA" ] || [ "$LATEST_SHA" = "null" ]; then
|
||||
echo "Error: Could not fetch SHA for tag $LATEST_TAG @ $LATEST_TAG_SHA"
|
||||
exit 1
|
||||
|
||||
# Try to get commit SHA from tag object (for annotated tags)
|
||||
# If it fails, assume it's a lightweight tag pointing directly to commit
|
||||
LATEST_SHA=$(curl -sL "https://api.github.com/repos/HdrHistogram/HdrHistogram_c/git/tags/$LATEST_TAG_SHA" 2>/dev/null | jq -r '.object.sha // empty')
|
||||
if [ -z "$LATEST_SHA" ]; then
|
||||
# Lightweight tag - SHA points directly to commit
|
||||
LATEST_SHA="$LATEST_TAG_SHA"
|
||||
fi
|
||||
|
||||
if ! [[ $LATEST_SHA =~ ^[0-9a-f]{40}$ ]]; then
|
||||
@@ -88,7 +91,7 @@ jobs:
|
||||
commit-message: "deps: update hdrhistogram to ${{ steps.check-version.outputs.tag }} (${{ steps.check-version.outputs.latest }})"
|
||||
title: "deps: update hdrhistogram to ${{ steps.check-version.outputs.tag }}"
|
||||
delete-branch: true
|
||||
branch: deps/update-cares-${{ github.run_number }}
|
||||
branch: deps/update-hdrhistogram-${{ github.run_number }}
|
||||
body: |
|
||||
## What does this PR do?
|
||||
|
||||
@@ -96,4 +99,4 @@ jobs:
|
||||
|
||||
Compare: https://github.com/HdrHistogram/HdrHistogram_c/compare/${{ steps.check-version.outputs.current }}...${{ steps.check-version.outputs.latest }}
|
||||
|
||||
Auto-updated by [this workflow](https://github.com/oven-sh/bun/actions/workflows/update-cares.yml)
|
||||
Auto-updated by [this workflow](https://github.com/oven-sh/bun/actions/workflows/update-hdrhistogram.yml)
|
||||
|
||||
33
.github/workflows/update-highway.yml
vendored
33
.github/workflows/update-highway.yml
vendored
@@ -50,14 +50,33 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LATEST_TAG_SHA=$(curl -sL "https://api.github.com/repos/google/highway/git/refs/tags/$LATEST_TAG" | jq -r '.object.sha')
|
||||
if [ -z "$LATEST_TAG_SHA" ] || [ "$LATEST_TAG_SHA" = "null" ]; then
|
||||
TAG_REF=$(curl -sL "https://api.github.com/repos/google/highway/git/refs/tags/$LATEST_TAG")
|
||||
if [ -z "$TAG_REF" ]; then
|
||||
echo "Error: Could not fetch tag reference for $LATEST_TAG"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TAG_OBJECT_SHA=$(echo "$TAG_REF" | jq -r '.object.sha')
|
||||
TAG_OBJECT_TYPE=$(echo "$TAG_REF" | jq -r '.object.type')
|
||||
|
||||
if [ -z "$TAG_OBJECT_SHA" ] || [ "$TAG_OBJECT_SHA" = "null" ]; then
|
||||
echo "Error: Could not fetch SHA for tag $LATEST_TAG"
|
||||
exit 1
|
||||
fi
|
||||
LATEST_SHA=$(curl -sL "https://api.github.com/repos/google/highway/git/tags/$LATEST_TAG_SHA" | jq -r '.object.sha')
|
||||
if [ -z "$LATEST_SHA" ] || [ "$LATEST_SHA" = "null" ]; then
|
||||
echo "Error: Could not fetch SHA for tag $LATEST_TAG @ $LATEST_TAG_SHA"
|
||||
|
||||
# Handle both lightweight tags (type: commit) and annotated tags (type: tag)
|
||||
if [ "$TAG_OBJECT_TYPE" = "commit" ]; then
|
||||
# Lightweight tag - object.sha is already the commit SHA
|
||||
LATEST_SHA="$TAG_OBJECT_SHA"
|
||||
elif [ "$TAG_OBJECT_TYPE" = "tag" ]; then
|
||||
# Annotated tag - need to fetch the tag object to get the commit SHA
|
||||
LATEST_SHA=$(curl -sL "https://api.github.com/repos/google/highway/git/tags/$TAG_OBJECT_SHA" | jq -r '.object.sha')
|
||||
if [ -z "$LATEST_SHA" ] || [ "$LATEST_SHA" = "null" ]; then
|
||||
echo "Error: Could not fetch commit SHA for annotated tag $LATEST_TAG @ $TAG_OBJECT_SHA"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "Error: Unexpected tag object type: $TAG_OBJECT_TYPE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -88,7 +107,7 @@ jobs:
|
||||
commit-message: "deps: update highway to ${{ steps.check-version.outputs.tag }} (${{ steps.check-version.outputs.latest }})"
|
||||
title: "deps: update highway to ${{ steps.check-version.outputs.tag }}"
|
||||
delete-branch: true
|
||||
branch: deps/update-cares-${{ github.run_number }}
|
||||
branch: deps/update-highway-${{ github.run_number }}
|
||||
body: |
|
||||
## What does this PR do?
|
||||
|
||||
@@ -96,4 +115,4 @@ jobs:
|
||||
|
||||
Compare: https://github.com/google/highway/compare/${{ steps.check-version.outputs.current }}...${{ steps.check-version.outputs.latest }}
|
||||
|
||||
Auto-updated by [this workflow](https://github.com/oven-sh/bun/actions/workflows/update-cares.yml)
|
||||
Auto-updated by [this workflow](https://github.com/oven-sh/bun/actions/workflows/update-highway.yml)
|
||||
|
||||
22
.github/workflows/update-lolhtml.yml
vendored
22
.github/workflows/update-lolhtml.yml
vendored
@@ -50,15 +50,27 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LATEST_TAG_SHA=$(curl -sL "https://api.github.com/repos/cloudflare/lol-html/git/refs/tags/$LATEST_TAG" | jq -r '.object.sha')
|
||||
# Get the commit SHA that the tag points to
|
||||
# This handles both lightweight tags (direct commit refs) and annotated tags (tag objects)
|
||||
TAG_REF_RESPONSE=$(curl -sL "https://api.github.com/repos/cloudflare/lol-html/git/refs/tags/$LATEST_TAG")
|
||||
LATEST_TAG_SHA=$(echo "$TAG_REF_RESPONSE" | jq -r '.object.sha')
|
||||
TAG_OBJECT_TYPE=$(echo "$TAG_REF_RESPONSE" | jq -r '.object.type')
|
||||
|
||||
if [ -z "$LATEST_TAG_SHA" ] || [ "$LATEST_TAG_SHA" = "null" ]; then
|
||||
echo "Error: Could not fetch SHA for tag $LATEST_TAG"
|
||||
exit 1
|
||||
fi
|
||||
LATEST_SHA=$(curl -sL "https://api.github.com/repos/cloudflare/lol-html/git/tags/$LATEST_TAG_SHA" | jq -r '.object.sha')
|
||||
if [ -z "$LATEST_SHA" ] || [ "$LATEST_SHA" = "null" ]; then
|
||||
echo "Error: Could not fetch SHA for tag $LATEST_TAG @ $LATEST_TAG_SHA"
|
||||
exit 1
|
||||
|
||||
if [ "$TAG_OBJECT_TYPE" = "tag" ]; then
|
||||
# This is an annotated tag, we need to get the commit it points to
|
||||
LATEST_SHA=$(curl -sL "https://api.github.com/repos/cloudflare/lol-html/git/tags/$LATEST_TAG_SHA" | jq -r '.object.sha')
|
||||
if [ -z "$LATEST_SHA" ] || [ "$LATEST_SHA" = "null" ]; then
|
||||
echo "Error: Could not fetch commit SHA for annotated tag $LATEST_TAG @ $LATEST_TAG_SHA"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
# This is a lightweight tag pointing directly to a commit
|
||||
LATEST_SHA="$LATEST_TAG_SHA"
|
||||
fi
|
||||
|
||||
if ! [[ $LATEST_SHA =~ ^[0-9a-f]{40}$ ]]; then
|
||||
|
||||
27
.github/workflows/update-lshpack.yml
vendored
27
.github/workflows/update-lshpack.yml
vendored
@@ -50,15 +50,32 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LATEST_TAG_SHA=$(curl -sL "https://api.github.com/repos/litespeedtech/ls-hpack/git/refs/tags/$LATEST_TAG" | jq -r '.object.sha')
|
||||
# Get the tag reference, which contains both SHA and type
|
||||
TAG_REF=$(curl -sL "https://api.github.com/repos/litespeedtech/ls-hpack/git/refs/tags/$LATEST_TAG")
|
||||
if [ -z "$TAG_REF" ]; then
|
||||
echo "Error: Could not fetch tag reference for $LATEST_TAG"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LATEST_TAG_SHA=$(echo "$TAG_REF" | jq -r '.object.sha')
|
||||
TAG_TYPE=$(echo "$TAG_REF" | jq -r '.object.type')
|
||||
|
||||
if [ -z "$LATEST_TAG_SHA" ] || [ "$LATEST_TAG_SHA" = "null" ]; then
|
||||
echo "Error: Could not fetch SHA for tag $LATEST_TAG"
|
||||
exit 1
|
||||
fi
|
||||
LATEST_SHA=$(curl -sL "https://api.github.com/repos/litespeedtech/ls-hpack/git/tags/$LATEST_TAG_SHA" | jq -r '.object.sha')
|
||||
if [ -z "$LATEST_SHA" ] || [ "$LATEST_SHA" = "null" ]; then
|
||||
echo "Error: Could not fetch SHA for tag $LATEST_TAG @ $LATEST_TAG_SHA"
|
||||
exit 1
|
||||
|
||||
# If it's an annotated tag, we need to dereference it to get the commit SHA
|
||||
# If it's a lightweight tag, the SHA already points to the commit
|
||||
if [ "$TAG_TYPE" = "tag" ]; then
|
||||
LATEST_SHA=$(curl -sL "https://api.github.com/repos/litespeedtech/ls-hpack/git/tags/$LATEST_TAG_SHA" | jq -r '.object.sha')
|
||||
if [ -z "$LATEST_SHA" ] || [ "$LATEST_SHA" = "null" ]; then
|
||||
echo "Error: Could not fetch commit SHA for annotated tag $LATEST_TAG"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
# For lightweight tags, the SHA is already the commit SHA
|
||||
LATEST_SHA="$LATEST_TAG_SHA"
|
||||
fi
|
||||
|
||||
if ! [[ $LATEST_SHA =~ ^[0-9a-f]{40}$ ]]; then
|
||||
|
||||
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@@ -168,5 +168,5 @@
|
||||
"WebKit/WebInspectorUI": true,
|
||||
},
|
||||
"git.detectSubmodules": false,
|
||||
// "bun.test.customScript": "./build/debug/bun-debug test"
|
||||
"bun.test.customScript": "./build/debug/bun-debug test"
|
||||
}
|
||||
|
||||
@@ -28,10 +28,4 @@ bench("brotli compress stream", async () => {
|
||||
await pipeline(source, compress);
|
||||
});
|
||||
|
||||
bench("brotli decompress stream", async () => {
|
||||
const source = Readable.from([compressed]);
|
||||
const decompress = createBrotliDecompress();
|
||||
await pipeline(source, decompress);
|
||||
});
|
||||
|
||||
await run();
|
||||
|
||||
210
bun.lock
210
bun.lock
@@ -6,6 +6,7 @@
|
||||
"devDependencies": {
|
||||
"@lezer/common": "^1.2.3",
|
||||
"@lezer/cpp": "^1.1.3",
|
||||
"bun-tracestrings": "github:oven-sh/bun.report#912ca63e26c51429d3e6799aa2a6ab079b188fd8",
|
||||
"esbuild": "^0.21.4",
|
||||
"mitata": "^0.1.11",
|
||||
"peechy": "0.4.34",
|
||||
@@ -14,7 +15,7 @@
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"source-map-js": "^1.2.0",
|
||||
"typescript": "^5.7.2",
|
||||
"typescript": "5.9.2",
|
||||
},
|
||||
},
|
||||
"packages/@types/bun": {
|
||||
@@ -31,7 +32,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^19",
|
||||
"typescript": "^5.0.2",
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "^19",
|
||||
@@ -97,41 +97,183 @@
|
||||
|
||||
"@lezer/lr": ["@lezer/lr@1.4.2", "", { "dependencies": { "@lezer/common": "^1.0.0" } }, "sha512-pu0K1jCIdnQ12aWNaAVU5bzi7Bd1w54J3ECgANPmYLtQKP0HBj2cE/5coBD66MT10xbtIuUr7tg0Shbsvk0mDA=="],
|
||||
|
||||
"@octokit/app": ["@octokit/app@14.1.0", "", { "dependencies": { "@octokit/auth-app": "^6.0.0", "@octokit/auth-unauthenticated": "^5.0.0", "@octokit/core": "^5.0.0", "@octokit/oauth-app": "^6.0.0", "@octokit/plugin-paginate-rest": "^9.0.0", "@octokit/types": "^12.0.0", "@octokit/webhooks": "^12.0.4" } }, "sha512-g3uEsGOQCBl1+W1rgfwoRFUIR6PtvB2T1E4RpygeUU5LrLvlOqcxrt5lfykIeRpUPpupreGJUYl70fqMDXdTpw=="],
|
||||
|
||||
"@octokit/auth-app": ["@octokit/auth-app@6.1.4", "", { "dependencies": { "@octokit/auth-oauth-app": "^7.1.0", "@octokit/auth-oauth-user": "^4.1.0", "@octokit/request": "^8.3.1", "@octokit/request-error": "^5.1.0", "@octokit/types": "^13.1.0", "deprecation": "^2.3.1", "lru-cache": "npm:@wolfy1339/lru-cache@^11.0.2-patch.1", "universal-github-app-jwt": "^1.1.2", "universal-user-agent": "^6.0.0" } }, "sha512-QkXkSOHZK4dA5oUqY5Dk3S+5pN2s1igPjEASNQV8/vgJgW034fQWR16u7VsNOK/EljA00eyjYF5mWNxWKWhHRQ=="],
|
||||
|
||||
"@octokit/auth-oauth-app": ["@octokit/auth-oauth-app@7.1.0", "", { "dependencies": { "@octokit/auth-oauth-device": "^6.1.0", "@octokit/auth-oauth-user": "^4.1.0", "@octokit/request": "^8.3.1", "@octokit/types": "^13.0.0", "@types/btoa-lite": "^1.0.0", "btoa-lite": "^1.0.0", "universal-user-agent": "^6.0.0" } }, "sha512-w+SyJN/b0l/HEb4EOPRudo7uUOSW51jcK1jwLa+4r7PA8FPFpoxEnHBHMITqCsc/3Vo2qqFjgQfz/xUUvsSQnA=="],
|
||||
|
||||
"@octokit/auth-oauth-device": ["@octokit/auth-oauth-device@6.1.0", "", { "dependencies": { "@octokit/oauth-methods": "^4.1.0", "@octokit/request": "^8.3.1", "@octokit/types": "^13.0.0", "universal-user-agent": "^6.0.0" } }, "sha512-FNQ7cb8kASufd6Ej4gnJ3f1QB5vJitkoV1O0/g6e6lUsQ7+VsSNRHRmFScN2tV4IgKA12frrr/cegUs0t+0/Lw=="],
|
||||
|
||||
"@octokit/auth-oauth-user": ["@octokit/auth-oauth-user@4.1.0", "", { "dependencies": { "@octokit/auth-oauth-device": "^6.1.0", "@octokit/oauth-methods": "^4.1.0", "@octokit/request": "^8.3.1", "@octokit/types": "^13.0.0", "btoa-lite": "^1.0.0", "universal-user-agent": "^6.0.0" } }, "sha512-FrEp8mtFuS/BrJyjpur+4GARteUCrPeR/tZJzD8YourzoVhRics7u7we/aDcKv+yywRNwNi/P4fRi631rG/OyQ=="],
|
||||
|
||||
"@octokit/auth-token": ["@octokit/auth-token@4.0.0", "", {}, "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA=="],
|
||||
|
||||
"@octokit/auth-unauthenticated": ["@octokit/auth-unauthenticated@5.0.1", "", { "dependencies": { "@octokit/request-error": "^5.0.0", "@octokit/types": "^12.0.0" } }, "sha512-oxeWzmBFxWd+XolxKTc4zr+h3mt+yofn4r7OfoIkR/Cj/o70eEGmPsFbueyJE2iBAGpjgTnEOKM3pnuEGVmiqg=="],
|
||||
|
||||
"@octokit/core": ["@octokit/core@5.2.2", "", { "dependencies": { "@octokit/auth-token": "^4.0.0", "@octokit/graphql": "^7.1.0", "@octokit/request": "^8.4.1", "@octokit/request-error": "^5.1.1", "@octokit/types": "^13.0.0", "before-after-hook": "^2.2.0", "universal-user-agent": "^6.0.0" } }, "sha512-/g2d4sW9nUDJOMz3mabVQvOGhVa4e/BN/Um7yca9Bb2XTzPPnfTWHWQg+IsEYO7M3Vx+EXvaM/I2pJWIMun1bg=="],
|
||||
|
||||
"@octokit/endpoint": ["@octokit/endpoint@9.0.6", "", { "dependencies": { "@octokit/types": "^13.1.0", "universal-user-agent": "^6.0.0" } }, "sha512-H1fNTMA57HbkFESSt3Y9+FBICv+0jFceJFPWDePYlR/iMGrwM5ph+Dd4XRQs+8X+PUFURLQgX9ChPfhJ/1uNQw=="],
|
||||
|
||||
"@octokit/graphql": ["@octokit/graphql@7.1.1", "", { "dependencies": { "@octokit/request": "^8.4.1", "@octokit/types": "^13.0.0", "universal-user-agent": "^6.0.0" } }, "sha512-3mkDltSfcDUoa176nlGoA32RGjeWjl3K7F/BwHwRMJUW/IteSa4bnSV8p2ThNkcIcZU2umkZWxwETSSCJf2Q7g=="],
|
||||
|
||||
"@octokit/oauth-app": ["@octokit/oauth-app@6.1.0", "", { "dependencies": { "@octokit/auth-oauth-app": "^7.0.0", "@octokit/auth-oauth-user": "^4.0.0", "@octokit/auth-unauthenticated": "^5.0.0", "@octokit/core": "^5.0.0", "@octokit/oauth-authorization-url": "^6.0.2", "@octokit/oauth-methods": "^4.0.0", "@types/aws-lambda": "^8.10.83", "universal-user-agent": "^6.0.0" } }, "sha512-nIn/8eUJ/BKUVzxUXd5vpzl1rwaVxMyYbQkNZjHrF7Vk/yu98/YDF/N2KeWO7uZ0g3b5EyiFXFkZI8rJ+DH1/g=="],
|
||||
|
||||
"@octokit/oauth-authorization-url": ["@octokit/oauth-authorization-url@6.0.2", "", {}, "sha512-CdoJukjXXxqLNK4y/VOiVzQVjibqoj/xHgInekviUJV73y/BSIcwvJ/4aNHPBPKcPWFnd4/lO9uqRV65jXhcLA=="],
|
||||
|
||||
"@octokit/oauth-methods": ["@octokit/oauth-methods@4.1.0", "", { "dependencies": { "@octokit/oauth-authorization-url": "^6.0.2", "@octokit/request": "^8.3.1", "@octokit/request-error": "^5.1.0", "@octokit/types": "^13.0.0", "btoa-lite": "^1.0.0" } }, "sha512-4tuKnCRecJ6CG6gr0XcEXdZtkTDbfbnD5oaHBmLERTjTMZNi2CbfEHZxPU41xXLDG4DfKf+sonu00zvKI9NSbw=="],
|
||||
|
||||
"@octokit/openapi-types": ["@octokit/openapi-types@24.2.0", "", {}, "sha512-9sIH3nSUttelJSXUrmGzl7QUBFul0/mB8HRYl3fOlgHbIWG+WnYDXU3v/2zMtAvuzZ/ed00Ei6on975FhBfzrg=="],
|
||||
|
||||
"@octokit/plugin-paginate-graphql": ["@octokit/plugin-paginate-graphql@4.0.1", "", { "peerDependencies": { "@octokit/core": ">=5" } }, "sha512-R8ZQNmrIKKpHWC6V2gum4x9LG2qF1RxRjo27gjQcG3j+vf2tLsEfE7I/wRWEPzYMaenr1M+qDAtNcwZve1ce1A=="],
|
||||
|
||||
"@octokit/plugin-paginate-rest": ["@octokit/plugin-paginate-rest@11.4.4-cjs.2", "", { "dependencies": { "@octokit/types": "^13.7.0" }, "peerDependencies": { "@octokit/core": "5" } }, "sha512-2dK6z8fhs8lla5PaOTgqfCGBxgAv/le+EhPs27KklPhm1bKObpu6lXzwfUEQ16ajXzqNrKMujsFyo9K2eaoISw=="],
|
||||
|
||||
"@octokit/plugin-rest-endpoint-methods": ["@octokit/plugin-rest-endpoint-methods@13.3.2-cjs.1", "", { "dependencies": { "@octokit/types": "^13.8.0" }, "peerDependencies": { "@octokit/core": "^5" } }, "sha512-VUjIjOOvF2oELQmiFpWA1aOPdawpyaCUqcEBc/UOUnj3Xp6DJGrJ1+bjUIIDzdHjnFNO6q57ODMfdEZnoBkCwQ=="],
|
||||
|
||||
"@octokit/plugin-retry": ["@octokit/plugin-retry@6.1.0", "", { "dependencies": { "@octokit/request-error": "^5.0.0", "@octokit/types": "^13.0.0", "bottleneck": "^2.15.3" }, "peerDependencies": { "@octokit/core": "5" } }, "sha512-WrO3bvq4E1Xh1r2mT9w6SDFg01gFmP81nIG77+p/MqW1JeXXgL++6umim3t6x0Zj5pZm3rXAN+0HEjmmdhIRig=="],
|
||||
|
||||
"@octokit/plugin-throttling": ["@octokit/plugin-throttling@8.2.0", "", { "dependencies": { "@octokit/types": "^12.2.0", "bottleneck": "^2.15.3" }, "peerDependencies": { "@octokit/core": "^5.0.0" } }, "sha512-nOpWtLayKFpgqmgD0y3GqXafMFuKcA4tRPZIfu7BArd2lEZeb1988nhWhwx4aZWmjDmUfdgVf7W+Tt4AmvRmMQ=="],
|
||||
|
||||
"@octokit/request": ["@octokit/request@8.4.1", "", { "dependencies": { "@octokit/endpoint": "^9.0.6", "@octokit/request-error": "^5.1.1", "@octokit/types": "^13.1.0", "universal-user-agent": "^6.0.0" } }, "sha512-qnB2+SY3hkCmBxZsR/MPCybNmbJe4KAlfWErXq+rBKkQJlbjdJeS85VI9r8UqeLYLvnAenU8Q1okM/0MBsAGXw=="],
|
||||
|
||||
"@octokit/request-error": ["@octokit/request-error@5.1.1", "", { "dependencies": { "@octokit/types": "^13.1.0", "deprecation": "^2.0.0", "once": "^1.4.0" } }, "sha512-v9iyEQJH6ZntoENr9/yXxjuezh4My67CBSu9r6Ve/05Iu5gNgnisNWOsoJHTP6k0Rr0+HQIpnH+kyammu90q/g=="],
|
||||
|
||||
"@octokit/types": ["@octokit/types@13.10.0", "", { "dependencies": { "@octokit/openapi-types": "^24.2.0" } }, "sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA=="],
|
||||
|
||||
"@octokit/webhooks": ["@octokit/webhooks@12.3.2", "", { "dependencies": { "@octokit/request-error": "^5.0.0", "@octokit/webhooks-methods": "^4.1.0", "@octokit/webhooks-types": "7.6.1", "aggregate-error": "^3.1.0" } }, "sha512-exj1MzVXoP7xnAcAB3jZ97pTvVPkQF9y6GA/dvYC47HV7vLv+24XRS6b/v/XnyikpEuvMhugEXdGtAlU086WkQ=="],
|
||||
|
||||
"@octokit/webhooks-methods": ["@octokit/webhooks-methods@5.1.1", "", {}, "sha512-NGlEHZDseJTCj8TMMFehzwa9g7On4KJMPVHDSrHxCQumL6uSQR8wIkP/qesv52fXqV1BPf4pTxwtS31ldAt9Xg=="],
|
||||
|
||||
"@octokit/webhooks-types": ["@octokit/webhooks-types@7.6.1", "", {}, "sha512-S8u2cJzklBC0FgTwWVLaM8tMrDuDMVE4xiTK4EYXM9GntyvrdbSoxqDQa+Fh57CCNApyIpyeqPhhFEmHPfrXgw=="],
|
||||
|
||||
"@sentry/types": ["@sentry/types@7.120.3", "", {}, "sha512-C4z+3kGWNFJ303FC+FxAd4KkHvxpNFYAFN8iMIgBwJdpIl25KZ8Q/VdGn0MLLUEHNLvjob0+wvwlcRBBNLXOow=="],
|
||||
|
||||
"@types/aws-lambda": ["@types/aws-lambda@8.10.152", "", {}, "sha512-soT/c2gYBnT5ygwiHPmd9a1bftj462NWVk2tKCc1PYHSIacB2UwbTS2zYG4jzag1mRDuzg/OjtxQjQ2NKRB6Rw=="],
|
||||
|
||||
"@types/btoa-lite": ["@types/btoa-lite@1.0.2", "", {}, "sha512-ZYbcE2x7yrvNFJiU7xJGrpF/ihpkM7zKgw8bha3LNJSesvTtUNxbpzaT7WXBIryf6jovisrxTBvymxMeLLj1Mg=="],
|
||||
|
||||
"@types/bun": ["@types/bun@workspace:packages/@types/bun"],
|
||||
|
||||
"@types/node": ["@types/node@22.15.18", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-v1DKRfUdyW+jJhZNEI1PYy29S2YRxMV5AOO/x/SjKmW0acCIOqmbj6Haf9eHAhsPmrhlHSxEhv/1WszcLWV4cg=="],
|
||||
"@types/jsonwebtoken": ["@types/jsonwebtoken@9.0.10", "", { "dependencies": { "@types/ms": "*", "@types/node": "*" } }, "sha512-asx5hIG9Qmf/1oStypjanR7iKTv0gXQ1Ov/jfrX6kS/EO0OFni8orbmGCn0672NHR3kXHwpAwR+B368ZGN/2rA=="],
|
||||
|
||||
"@types/ms": ["@types/ms@2.1.0", "", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="],
|
||||
|
||||
"@types/node": ["@types/node@24.1.0", "", { "dependencies": { "undici-types": "~7.8.0" } }, "sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w=="],
|
||||
|
||||
"@types/react": ["@types/react@19.1.8", "", { "dependencies": { "csstype": "^3.0.2" } }, "sha512-AwAfQ2Wa5bCx9WP8nZL2uMZWod7J7/JSplxbTmBQ5ms6QpqNYm672H0Vu9ZVKVngQ+ii4R/byguVEUZQyeg44g=="],
|
||||
|
||||
"aggregate-error": ["aggregate-error@3.1.0", "", { "dependencies": { "clean-stack": "^2.0.0", "indent-string": "^4.0.0" } }, "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA=="],
|
||||
|
||||
"before-after-hook": ["before-after-hook@2.2.3", "", {}, "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ=="],
|
||||
|
||||
"bottleneck": ["bottleneck@2.19.5", "", {}, "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw=="],
|
||||
|
||||
"btoa-lite": ["btoa-lite@1.0.0", "", {}, "sha512-gvW7InbIyF8AicrqWoptdW08pUxuhq8BEgowNajy9RhiE86fmGAGl+bLKo6oB8QP0CkqHLowfN0oJdKC/J6LbA=="],
|
||||
|
||||
"buffer-equal-constant-time": ["buffer-equal-constant-time@1.0.1", "", {}, "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA=="],
|
||||
|
||||
"bun-tracestrings": ["bun-tracestrings@github:oven-sh/bun.report#912ca63", { "dependencies": { "@octokit/webhooks-methods": "^5.1.0", "@sentry/types": "^7.112.2", "@types/bun": "^1.2.6", "html-minifier": "^4.0.0", "lightningcss": "^1.24.1", "marked": "^12.0.1", "octokit": "^3.2.0", "prettier": "^3.2.5", "typescript": "^5.0.0" }, "bin": { "ci-remap-server": "./bin/ci-remap-server.ts" } }, "oven-sh-bun.report-912ca63"],
|
||||
|
||||
"bun-types": ["bun-types@workspace:packages/bun-types"],
|
||||
|
||||
"camel-case": ["camel-case@4.1.2", "", { "dependencies": { "pascal-case": "^3.1.2", "tslib": "^2.0.3" } }, "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw=="],
|
||||
"camel-case": ["camel-case@3.0.0", "", { "dependencies": { "no-case": "^2.2.0", "upper-case": "^1.1.1" } }, "sha512-+MbKztAYHXPr1jNTSKQF52VpcFjwY5RkR7fxksV8Doo4KAYc5Fl4UJRgthBbTmEx8C54DqahhbLJkDwjI3PI/w=="],
|
||||
|
||||
"capital-case": ["capital-case@1.0.4", "", { "dependencies": { "no-case": "^3.0.4", "tslib": "^2.0.3", "upper-case-first": "^2.0.2" } }, "sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A=="],
|
||||
|
||||
"change-case": ["change-case@4.1.2", "", { "dependencies": { "camel-case": "^4.1.2", "capital-case": "^1.0.4", "constant-case": "^3.0.4", "dot-case": "^3.0.4", "header-case": "^2.0.4", "no-case": "^3.0.4", "param-case": "^3.0.4", "pascal-case": "^3.1.2", "path-case": "^3.0.4", "sentence-case": "^3.0.4", "snake-case": "^3.0.4", "tslib": "^2.0.3" } }, "sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A=="],
|
||||
|
||||
"clean-css": ["clean-css@4.2.4", "", { "dependencies": { "source-map": "~0.6.0" } }, "sha512-EJUDT7nDVFDvaQgAo2G/PJvxmp1o/c6iXLbswsBbUFXi1Nr+AjA2cKmfbKDMjMvzEe75g3P6JkaDDAKk96A85A=="],
|
||||
|
||||
"clean-stack": ["clean-stack@2.2.0", "", {}, "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A=="],
|
||||
|
||||
"commander": ["commander@2.20.3", "", {}, "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="],
|
||||
|
||||
"constant-case": ["constant-case@3.0.4", "", { "dependencies": { "no-case": "^3.0.4", "tslib": "^2.0.3", "upper-case": "^2.0.2" } }, "sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ=="],
|
||||
|
||||
"csstype": ["csstype@3.1.3", "", {}, "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="],
|
||||
|
||||
"deprecation": ["deprecation@2.3.1", "", {}, "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="],
|
||||
|
||||
"detect-libc": ["detect-libc@2.0.4", "", {}, "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA=="],
|
||||
|
||||
"dot-case": ["dot-case@3.0.4", "", { "dependencies": { "no-case": "^3.0.4", "tslib": "^2.0.3" } }, "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w=="],
|
||||
|
||||
"ecdsa-sig-formatter": ["ecdsa-sig-formatter@1.0.11", "", { "dependencies": { "safe-buffer": "^5.0.1" } }, "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ=="],
|
||||
|
||||
"esbuild": ["esbuild@0.21.5", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.21.5", "@esbuild/android-arm": "0.21.5", "@esbuild/android-arm64": "0.21.5", "@esbuild/android-x64": "0.21.5", "@esbuild/darwin-arm64": "0.21.5", "@esbuild/darwin-x64": "0.21.5", "@esbuild/freebsd-arm64": "0.21.5", "@esbuild/freebsd-x64": "0.21.5", "@esbuild/linux-arm": "0.21.5", "@esbuild/linux-arm64": "0.21.5", "@esbuild/linux-ia32": "0.21.5", "@esbuild/linux-loong64": "0.21.5", "@esbuild/linux-mips64el": "0.21.5", "@esbuild/linux-ppc64": "0.21.5", "@esbuild/linux-riscv64": "0.21.5", "@esbuild/linux-s390x": "0.21.5", "@esbuild/linux-x64": "0.21.5", "@esbuild/netbsd-x64": "0.21.5", "@esbuild/openbsd-x64": "0.21.5", "@esbuild/sunos-x64": "0.21.5", "@esbuild/win32-arm64": "0.21.5", "@esbuild/win32-ia32": "0.21.5", "@esbuild/win32-x64": "0.21.5" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw=="],
|
||||
|
||||
"he": ["he@1.2.0", "", { "bin": { "he": "bin/he" } }, "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw=="],
|
||||
|
||||
"header-case": ["header-case@2.0.4", "", { "dependencies": { "capital-case": "^1.0.4", "tslib": "^2.0.3" } }, "sha512-H/vuk5TEEVZwrR0lp2zed9OCo1uAILMlx0JEMgC26rzyJJ3N1v6XkwHHXJQdR2doSjcGPM6OKPYoJgf0plJ11Q=="],
|
||||
|
||||
"html-minifier": ["html-minifier@4.0.0", "", { "dependencies": { "camel-case": "^3.0.0", "clean-css": "^4.2.1", "commander": "^2.19.0", "he": "^1.2.0", "param-case": "^2.1.1", "relateurl": "^0.2.7", "uglify-js": "^3.5.1" }, "bin": { "html-minifier": "./cli.js" } }, "sha512-aoGxanpFPLg7MkIl/DDFYtb0iWz7jMFGqFhvEDZga6/4QTjneiD8I/NXL1x5aaoCp7FSIT6h/OhykDdPsbtMig=="],
|
||||
|
||||
"indent-string": ["indent-string@4.0.0", "", {}, "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg=="],
|
||||
|
||||
"js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="],
|
||||
|
||||
"jsonwebtoken": ["jsonwebtoken@9.0.2", "", { "dependencies": { "jws": "^3.2.2", "lodash.includes": "^4.3.0", "lodash.isboolean": "^3.0.3", "lodash.isinteger": "^4.0.4", "lodash.isnumber": "^3.0.3", "lodash.isplainobject": "^4.0.6", "lodash.isstring": "^4.0.1", "lodash.once": "^4.0.0", "ms": "^2.1.1", "semver": "^7.5.4" } }, "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ=="],
|
||||
|
||||
"jwa": ["jwa@1.4.2", "", { "dependencies": { "buffer-equal-constant-time": "^1.0.1", "ecdsa-sig-formatter": "1.0.11", "safe-buffer": "^5.0.1" } }, "sha512-eeH5JO+21J78qMvTIDdBXidBd6nG2kZjg5Ohz/1fpa28Z4CcsWUzJ1ZZyFq/3z3N17aZy+ZuBoHljASbL1WfOw=="],
|
||||
|
||||
"jws": ["jws@3.2.2", "", { "dependencies": { "jwa": "^1.4.1", "safe-buffer": "^5.0.1" } }, "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA=="],
|
||||
|
||||
"lightningcss": ["lightningcss@1.30.1", "", { "dependencies": { "detect-libc": "^2.0.3" }, "optionalDependencies": { "lightningcss-darwin-arm64": "1.30.1", "lightningcss-darwin-x64": "1.30.1", "lightningcss-freebsd-x64": "1.30.1", "lightningcss-linux-arm-gnueabihf": "1.30.1", "lightningcss-linux-arm64-gnu": "1.30.1", "lightningcss-linux-arm64-musl": "1.30.1", "lightningcss-linux-x64-gnu": "1.30.1", "lightningcss-linux-x64-musl": "1.30.1", "lightningcss-win32-arm64-msvc": "1.30.1", "lightningcss-win32-x64-msvc": "1.30.1" } }, "sha512-xi6IyHML+c9+Q3W0S4fCQJOym42pyurFiJUHEcEyHS0CeKzia4yZDEsLlqOFykxOdHpNy0NmvVO31vcSqAxJCg=="],
|
||||
|
||||
"lightningcss-darwin-arm64": ["lightningcss-darwin-arm64@1.30.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-c8JK7hyE65X1MHMN+Viq9n11RRC7hgin3HhYKhrMyaXflk5GVplZ60IxyoVtzILeKr+xAJwg6zK6sjTBJ0FKYQ=="],
|
||||
|
||||
"lightningcss-darwin-x64": ["lightningcss-darwin-x64@1.30.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-k1EvjakfumAQoTfcXUcHQZhSpLlkAuEkdMBsI/ivWw9hL+7FtilQc0Cy3hrx0AAQrVtQAbMI7YjCgYgvn37PzA=="],
|
||||
|
||||
"lightningcss-freebsd-x64": ["lightningcss-freebsd-x64@1.30.1", "", { "os": "freebsd", "cpu": "x64" }, "sha512-kmW6UGCGg2PcyUE59K5r0kWfKPAVy4SltVeut+umLCFoJ53RdCUWxcRDzO1eTaxf/7Q2H7LTquFHPL5R+Gjyig=="],
|
||||
|
||||
"lightningcss-linux-arm-gnueabihf": ["lightningcss-linux-arm-gnueabihf@1.30.1", "", { "os": "linux", "cpu": "arm" }, "sha512-MjxUShl1v8pit+6D/zSPq9S9dQ2NPFSQwGvxBCYaBYLPlCWuPh9/t1MRS8iUaR8i+a6w7aps+B4N0S1TYP/R+Q=="],
|
||||
|
||||
"lightningcss-linux-arm64-gnu": ["lightningcss-linux-arm64-gnu@1.30.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-gB72maP8rmrKsnKYy8XUuXi/4OctJiuQjcuqWNlJQ6jZiWqtPvqFziskH3hnajfvKB27ynbVCucKSm2rkQp4Bw=="],
|
||||
|
||||
"lightningcss-linux-arm64-musl": ["lightningcss-linux-arm64-musl@1.30.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-jmUQVx4331m6LIX+0wUhBbmMX7TCfjF5FoOH6SD1CttzuYlGNVpA7QnrmLxrsub43ClTINfGSYyHe2HWeLl5CQ=="],
|
||||
|
||||
"lightningcss-linux-x64-gnu": ["lightningcss-linux-x64-gnu@1.30.1", "", { "os": "linux", "cpu": "x64" }, "sha512-piWx3z4wN8J8z3+O5kO74+yr6ze/dKmPnI7vLqfSqI8bccaTGY5xiSGVIJBDd5K5BHlvVLpUB3S2YCfelyJ1bw=="],
|
||||
|
||||
"lightningcss-linux-x64-musl": ["lightningcss-linux-x64-musl@1.30.1", "", { "os": "linux", "cpu": "x64" }, "sha512-rRomAK7eIkL+tHY0YPxbc5Dra2gXlI63HL+v1Pdi1a3sC+tJTcFrHX+E86sulgAXeI7rSzDYhPSeHHjqFhqfeQ=="],
|
||||
|
||||
"lightningcss-win32-arm64-msvc": ["lightningcss-win32-arm64-msvc@1.30.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-mSL4rqPi4iXq5YVqzSsJgMVFENoa4nGTT/GjO2c0Yl9OuQfPsIfncvLrEW6RbbB24WtZ3xP/2CCmI3tNkNV4oA=="],
|
||||
|
||||
"lightningcss-win32-x64-msvc": ["lightningcss-win32-x64-msvc@1.30.1", "", { "os": "win32", "cpu": "x64" }, "sha512-PVqXh48wh4T53F/1CCu8PIPCxLzWyCnn/9T5W1Jpmdy5h9Cwd+0YQS6/LwhHXSafuc61/xg9Lv5OrCby6a++jg=="],
|
||||
|
||||
"lodash.includes": ["lodash.includes@4.3.0", "", {}, "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w=="],
|
||||
|
||||
"lodash.isboolean": ["lodash.isboolean@3.0.3", "", {}, "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg=="],
|
||||
|
||||
"lodash.isinteger": ["lodash.isinteger@4.0.4", "", {}, "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA=="],
|
||||
|
||||
"lodash.isnumber": ["lodash.isnumber@3.0.3", "", {}, "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw=="],
|
||||
|
||||
"lodash.isplainobject": ["lodash.isplainobject@4.0.6", "", {}, "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA=="],
|
||||
|
||||
"lodash.isstring": ["lodash.isstring@4.0.1", "", {}, "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw=="],
|
||||
|
||||
"lodash.once": ["lodash.once@4.1.1", "", {}, "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg=="],
|
||||
|
||||
"loose-envify": ["loose-envify@1.4.0", "", { "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, "bin": { "loose-envify": "cli.js" } }, "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q=="],
|
||||
|
||||
"lower-case": ["lower-case@2.0.2", "", { "dependencies": { "tslib": "^2.0.3" } }, "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg=="],
|
||||
|
||||
"lru-cache": ["@wolfy1339/lru-cache@11.0.2-patch.1", "", {}, "sha512-BgYZfL2ADCXKOw2wJtkM3slhHotawWkgIRRxq4wEybnZQPjvAp71SPX35xepMykTw8gXlzWcWPTY31hlbnRsDA=="],
|
||||
|
||||
"marked": ["marked@12.0.2", "", { "bin": { "marked": "bin/marked.js" } }, "sha512-qXUm7e/YKFoqFPYPa3Ukg9xlI5cyAtGmyEIzMfW//m6kXwCy2Ps9DYf5ioijFKQ8qyuscrHoY04iJGctu2Kg0Q=="],
|
||||
|
||||
"mitata": ["mitata@0.1.14", "", {}, "sha512-8kRs0l636eT4jj68PFXOR2D5xl4m56T478g16SzUPOYgkzQU+xaw62guAQxzBPm+SXb15GQi1cCpDxJfkr4CSA=="],
|
||||
|
||||
"ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="],
|
||||
|
||||
"no-case": ["no-case@3.0.4", "", { "dependencies": { "lower-case": "^2.0.2", "tslib": "^2.0.3" } }, "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg=="],
|
||||
|
||||
"param-case": ["param-case@3.0.4", "", { "dependencies": { "dot-case": "^3.0.4", "tslib": "^2.0.3" } }, "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A=="],
|
||||
"octokit": ["octokit@3.2.2", "", { "dependencies": { "@octokit/app": "^14.0.2", "@octokit/core": "^5.0.0", "@octokit/oauth-app": "^6.0.0", "@octokit/plugin-paginate-graphql": "^4.0.0", "@octokit/plugin-paginate-rest": "11.4.4-cjs.2", "@octokit/plugin-rest-endpoint-methods": "13.3.2-cjs.1", "@octokit/plugin-retry": "^6.0.0", "@octokit/plugin-throttling": "^8.0.0", "@octokit/request-error": "^5.0.0", "@octokit/types": "^13.0.0", "@octokit/webhooks": "^12.3.1" } }, "sha512-7Abo3nADdja8l/aglU6Y3lpnHSfv0tw7gFPiqzry/yCU+2gTAX7R1roJ8hJrxIK+S1j+7iqRJXtmuHJ/UDsBhQ=="],
|
||||
|
||||
"once": ["once@1.4.0", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="],
|
||||
|
||||
"param-case": ["param-case@2.1.1", "", { "dependencies": { "no-case": "^2.2.0" } }, "sha512-eQE845L6ot89sk2N8liD8HAuH4ca6Vvr7VWAWwt7+kvvG5aBcPmmphQ68JsEG2qa9n1TykS2DLeMt363AAH8/w=="],
|
||||
|
||||
"pascal-case": ["pascal-case@3.1.2", "", { "dependencies": { "no-case": "^3.0.4", "tslib": "^2.0.3" } }, "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g=="],
|
||||
|
||||
@@ -139,30 +281,78 @@
|
||||
|
||||
"peechy": ["peechy@0.4.34", "", { "dependencies": { "change-case": "^4.1.2" }, "bin": { "peechy": "cli.js" } }, "sha512-Cpke/cCqqZHhkyxz7mdqS8ZAGJFUi5icu3ZGqxm9GC7g2VrhH0tmjPhZoWHAN5ghw1m1wq5+2YvfbDSqgC4+Zg=="],
|
||||
|
||||
"prettier": ["prettier@3.5.3", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw=="],
|
||||
"prettier": ["prettier@3.6.2", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ=="],
|
||||
|
||||
"prettier-plugin-organize-imports": ["prettier-plugin-organize-imports@4.1.0", "", { "peerDependencies": { "prettier": ">=2.0", "typescript": ">=2.9", "vue-tsc": "^2.1.0" }, "optionalPeers": ["vue-tsc"] }, "sha512-5aWRdCgv645xaa58X8lOxzZoiHAldAPChljr/MT0crXVOWTZ+Svl4hIWlz+niYSlO6ikE5UXkN1JrRvIP2ut0A=="],
|
||||
"prettier-plugin-organize-imports": ["prettier-plugin-organize-imports@4.2.0", "", { "peerDependencies": { "prettier": ">=2.0", "typescript": ">=2.9", "vue-tsc": "^2.1.0 || 3" }, "optionalPeers": ["vue-tsc"] }, "sha512-Zdy27UhlmyvATZi67BTnLcKTo8fm6Oik59Sz6H64PgZJVs6NJpPD1mT240mmJn62c98/QaL+r3kx9Q3gRpDajg=="],
|
||||
|
||||
"react": ["react@18.3.1", "", { "dependencies": { "loose-envify": "^1.1.0" } }, "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ=="],
|
||||
|
||||
"react-dom": ["react-dom@18.3.1", "", { "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.2" }, "peerDependencies": { "react": "^18.3.1" } }, "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw=="],
|
||||
|
||||
"relateurl": ["relateurl@0.2.7", "", {}, "sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog=="],
|
||||
|
||||
"safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="],
|
||||
|
||||
"scheduler": ["scheduler@0.23.2", "", { "dependencies": { "loose-envify": "^1.1.0" } }, "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ=="],
|
||||
|
||||
"semver": ["semver@7.7.2", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="],
|
||||
|
||||
"sentence-case": ["sentence-case@3.0.4", "", { "dependencies": { "no-case": "^3.0.4", "tslib": "^2.0.3", "upper-case-first": "^2.0.2" } }, "sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg=="],
|
||||
|
||||
"snake-case": ["snake-case@3.0.4", "", { "dependencies": { "dot-case": "^3.0.4", "tslib": "^2.0.3" } }, "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg=="],
|
||||
|
||||
"source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="],
|
||||
|
||||
"source-map-js": ["source-map-js@1.2.1", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="],
|
||||
|
||||
"tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"typescript": ["typescript@5.8.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ=="],
|
||||
"typescript": ["typescript@5.9.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A=="],
|
||||
|
||||
"undici-types": ["undici-types@6.21.0", "", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="],
|
||||
"uglify-js": ["uglify-js@3.19.3", "", { "bin": { "uglifyjs": "bin/uglifyjs" } }, "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ=="],
|
||||
|
||||
"upper-case": ["upper-case@2.0.2", "", { "dependencies": { "tslib": "^2.0.3" } }, "sha512-KgdgDGJt2TpuwBUIjgG6lzw2GWFRCW9Qkfkiv0DxqHHLYJHmtmdUIKcZd8rHgFSjopVTlw6ggzCm1b8MFQwikg=="],
|
||||
"undici-types": ["undici-types@7.8.0", "", {}, "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw=="],
|
||||
|
||||
"universal-github-app-jwt": ["universal-github-app-jwt@1.2.0", "", { "dependencies": { "@types/jsonwebtoken": "^9.0.0", "jsonwebtoken": "^9.0.2" } }, "sha512-dncpMpnsKBk0eetwfN8D8OUHGfiDhhJ+mtsbMl+7PfW7mYjiH8LIcqRmYMtzYLgSh47HjfdBtrBwIQ/gizKR3g=="],
|
||||
|
||||
"universal-user-agent": ["universal-user-agent@6.0.1", "", {}, "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ=="],
|
||||
|
||||
"upper-case": ["upper-case@1.1.3", "", {}, "sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA=="],
|
||||
|
||||
"upper-case-first": ["upper-case-first@2.0.2", "", { "dependencies": { "tslib": "^2.0.3" } }, "sha512-514ppYHBaKwfJRK/pNC6c/OxfGa0obSnAl106u97Ed0I625Nin96KAjttZF6ZL3e1XLtphxnqrOi9iWgm+u+bg=="],
|
||||
|
||||
"wrappy": ["wrappy@1.0.2", "", {}, "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="],
|
||||
|
||||
"@octokit/app/@octokit/plugin-paginate-rest": ["@octokit/plugin-paginate-rest@9.2.2", "", { "dependencies": { "@octokit/types": "^12.6.0" }, "peerDependencies": { "@octokit/core": "5" } }, "sha512-u3KYkGF7GcZnSD/3UP0S7K5XUFT2FkOQdcfXZGZQPGv3lm4F2Xbf71lvjldr8c1H3nNbF+33cLEkWYbokGWqiQ=="],
|
||||
|
||||
"@octokit/app/@octokit/types": ["@octokit/types@12.6.0", "", { "dependencies": { "@octokit/openapi-types": "^20.0.0" } }, "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw=="],
|
||||
|
||||
"@octokit/auth-unauthenticated/@octokit/types": ["@octokit/types@12.6.0", "", { "dependencies": { "@octokit/openapi-types": "^20.0.0" } }, "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw=="],
|
||||
|
||||
"@octokit/plugin-throttling/@octokit/types": ["@octokit/types@12.6.0", "", { "dependencies": { "@octokit/openapi-types": "^20.0.0" } }, "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw=="],
|
||||
|
||||
"@octokit/webhooks/@octokit/webhooks-methods": ["@octokit/webhooks-methods@4.1.0", "", {}, "sha512-zoQyKw8h9STNPqtm28UGOYFE7O6D4Il8VJwhAtMHFt2C4L0VQT1qGKLeefUOqHNs1mNRYSadVv7x0z8U2yyeWQ=="],
|
||||
|
||||
"bun-tracestrings/typescript": ["typescript@5.8.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ=="],
|
||||
|
||||
"camel-case/no-case": ["no-case@2.3.2", "", { "dependencies": { "lower-case": "^1.1.1" } }, "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ=="],
|
||||
|
||||
"change-case/camel-case": ["camel-case@4.1.2", "", { "dependencies": { "pascal-case": "^3.1.2", "tslib": "^2.0.3" } }, "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw=="],
|
||||
|
||||
"change-case/param-case": ["param-case@3.0.4", "", { "dependencies": { "dot-case": "^3.0.4", "tslib": "^2.0.3" } }, "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A=="],
|
||||
|
||||
"constant-case/upper-case": ["upper-case@2.0.2", "", { "dependencies": { "tslib": "^2.0.3" } }, "sha512-KgdgDGJt2TpuwBUIjgG6lzw2GWFRCW9Qkfkiv0DxqHHLYJHmtmdUIKcZd8rHgFSjopVTlw6ggzCm1b8MFQwikg=="],
|
||||
|
||||
"param-case/no-case": ["no-case@2.3.2", "", { "dependencies": { "lower-case": "^1.1.1" } }, "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ=="],
|
||||
|
||||
"@octokit/app/@octokit/types/@octokit/openapi-types": ["@octokit/openapi-types@20.0.0", "", {}, "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA=="],
|
||||
|
||||
"@octokit/auth-unauthenticated/@octokit/types/@octokit/openapi-types": ["@octokit/openapi-types@20.0.0", "", {}, "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA=="],
|
||||
|
||||
"@octokit/plugin-throttling/@octokit/types/@octokit/openapi-types": ["@octokit/openapi-types@20.0.0", "", {}, "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA=="],
|
||||
|
||||
"camel-case/no-case/lower-case": ["lower-case@1.1.4", "", {}, "sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA=="],
|
||||
|
||||
"param-case/no-case/lower-case": ["lower-case@1.1.4", "", {}, "sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA=="],
|
||||
}
|
||||
}
|
||||
|
||||
@@ -350,6 +350,7 @@ src/bun.js/bindings/webcore/JSTextEncoderStream.cpp
|
||||
src/bun.js/bindings/webcore/JSTransformStream.cpp
|
||||
src/bun.js/bindings/webcore/JSTransformStreamDefaultController.cpp
|
||||
src/bun.js/bindings/webcore/JSURLSearchParams.cpp
|
||||
src/bun.js/bindings/webcore/JSWasmStreamingCompiler.cpp
|
||||
src/bun.js/bindings/webcore/JSWebSocket.cpp
|
||||
src/bun.js/bindings/webcore/JSWorker.cpp
|
||||
src/bun.js/bindings/webcore/JSWorkerOptions.cpp
|
||||
|
||||
@@ -29,6 +29,7 @@ src/js/builtins/TransformStream.ts
|
||||
src/js/builtins/TransformStreamDefaultController.ts
|
||||
src/js/builtins/TransformStreamInternals.ts
|
||||
src/js/builtins/UtilInspect.ts
|
||||
src/js/builtins/WasmStreaming.ts
|
||||
src/js/builtins/WritableStreamDefaultController.ts
|
||||
src/js/builtins/WritableStreamDefaultWriter.ts
|
||||
src/js/builtins/WritableStreamInternals.ts
|
||||
|
||||
@@ -10,6 +10,7 @@ src/allocators/NullableAllocator.zig
|
||||
src/analytics.zig
|
||||
src/analytics/schema.zig
|
||||
src/api/schema.zig
|
||||
src/asan.zig
|
||||
src/ast.zig
|
||||
src/ast/Ast.zig
|
||||
src/ast/ASTMemoryAllocator.zig
|
||||
@@ -545,6 +546,7 @@ src/http/AsyncHTTP.zig
|
||||
src/http/CertificateInfo.zig
|
||||
src/http/Decompressor.zig
|
||||
src/http/Encoding.zig
|
||||
src/http/ETag.zig
|
||||
src/http/FetchRedirect.zig
|
||||
src/http/HeaderBuilder.zig
|
||||
src/http/Headers.zig
|
||||
@@ -632,6 +634,7 @@ src/install/resolvers/folder_resolver.zig
|
||||
src/install/versioned_url.zig
|
||||
src/install/windows-shim/BinLinkingShim.zig
|
||||
src/install/windows-shim/bun_shim_impl.zig
|
||||
src/install/yarn.zig
|
||||
src/interchange.zig
|
||||
src/interchange/json.zig
|
||||
src/interchange/toml.zig
|
||||
@@ -702,6 +705,9 @@ src/s3/multipart_options.zig
|
||||
src/s3/multipart.zig
|
||||
src/s3/simple_request.zig
|
||||
src/s3/storage_class.zig
|
||||
src/safety.zig
|
||||
src/safety/alloc_ptr.zig
|
||||
src/safety/CriticalSection.zig
|
||||
src/semver.zig
|
||||
src/semver/ExternalString.zig
|
||||
src/semver/SemverObject.zig
|
||||
|
||||
@@ -4,7 +4,7 @@ register_repository(
|
||||
REPOSITORY
|
||||
oven-sh/mimalloc
|
||||
COMMIT
|
||||
1beadf9651a7bfdec6b5367c380ecc3fe1c40d1a
|
||||
d0b7c26cdf7bb4104d7d64c7dd05e8f0d5a7d9d4
|
||||
)
|
||||
|
||||
set(MIMALLOC_CMAKE_ARGS
|
||||
@@ -13,14 +13,47 @@ set(MIMALLOC_CMAKE_ARGS
|
||||
-DMI_BUILD_SHARED=OFF
|
||||
-DMI_BUILD_TESTS=OFF
|
||||
-DMI_USE_CXX=ON
|
||||
-DMI_OVERRIDE=OFF
|
||||
-DMI_OSX_ZONE=OFF
|
||||
-DMI_OSX_INTERPOSE=OFF
|
||||
-DMI_SKIP_COLLECT_ON_EXIT=ON
|
||||
|
||||
# ```
|
||||
# ❯ mimalloc_allow_large_os_pages=0 BUN_PORT=3004 mem bun http-hello.js
|
||||
# Started development server: http://localhost:3004
|
||||
#
|
||||
# Peak memory usage: 52 MB
|
||||
#
|
||||
# ❯ mimalloc_allow_large_os_pages=1 BUN_PORT=3004 mem bun http-hello.js
|
||||
# Started development server: http://localhost:3004
|
||||
#
|
||||
# Peak memory usage: 74 MB
|
||||
# ```
|
||||
#
|
||||
# ```
|
||||
# ❯ mimalloc_allow_large_os_pages=1 mem bun --eval 1
|
||||
#
|
||||
# Peak memory usage: 52 MB
|
||||
#
|
||||
# ❯ mimalloc_allow_large_os_pages=0 mem bun --eval 1
|
||||
#
|
||||
# Peak memory usage: 30 MB
|
||||
# ```
|
||||
-DMI_NO_THP=1
|
||||
)
|
||||
|
||||
if(ENABLE_ASAN)
|
||||
list(APPEND MIMALLOC_CMAKE_ARGS -DMI_TRACK_ASAN=ON)
|
||||
list(APPEND MIMALLOC_CMAKE_ARGS -DMI_OVERRIDE=OFF)
|
||||
list(APPEND MIMALLOC_CMAKE_ARGS -DMI_OSX_ZONE=OFF)
|
||||
list(APPEND MIMALLOC_CMAKE_ARGS -DMI_OSX_INTERPOSE=OFF)
|
||||
elseif(APPLE OR LINUX)
|
||||
# Enable static override when ASAN is not enabled
|
||||
list(APPEND MIMALLOC_CMAKE_ARGS -DMI_OVERRIDE=ON)
|
||||
if(APPLE)
|
||||
list(APPEND MIMALLOC_CMAKE_ARGS -DMI_OSX_ZONE=ON)
|
||||
list(APPEND MIMALLOC_CMAKE_ARGS -DMI_OSX_INTERPOSE=ON)
|
||||
else()
|
||||
list(APPEND MIMALLOC_CMAKE_ARGS -DMI_OSX_ZONE=OFF)
|
||||
list(APPEND MIMALLOC_CMAKE_ARGS -DMI_OSX_INTERPOSE=OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(DEBUG)
|
||||
@@ -31,13 +64,7 @@ if(ENABLE_VALGRIND)
|
||||
list(APPEND MIMALLOC_CMAKE_ARGS -DMI_VALGRIND=ON)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
if(DEBUG)
|
||||
set(MIMALLOC_LIBRARY mimalloc-static-debug)
|
||||
else()
|
||||
set(MIMALLOC_LIBRARY mimalloc-static)
|
||||
endif()
|
||||
elseif(DEBUG)
|
||||
if(DEBUG)
|
||||
if (ENABLE_ASAN)
|
||||
set(MIMALLOC_LIBRARY mimalloc-asan-debug)
|
||||
else()
|
||||
@@ -53,6 +80,7 @@ if(APPLE OR (LINUX AND NOT DEBUG))
|
||||
set(MIMALLOC_LIBRARY CMakeFiles/mimalloc-obj.dir/src/static.c.o)
|
||||
endif()
|
||||
|
||||
|
||||
register_cmake_command(
|
||||
TARGET
|
||||
mimalloc
|
||||
|
||||
@@ -2,7 +2,7 @@ option(WEBKIT_VERSION "The version of WebKit to use")
|
||||
option(WEBKIT_LOCAL "If a local version of WebKit should be used instead of downloading")
|
||||
|
||||
if(NOT WEBKIT_VERSION)
|
||||
set(WEBKIT_VERSION 1098cc50652ab1eab171f58f7669e19ca6c276ae)
|
||||
set(WEBKIT_VERSION 642e2252f6298387edb6d2f991a0408fd0320466)
|
||||
endif()
|
||||
|
||||
string(SUBSTRING ${WEBKIT_VERSION} 0 16 WEBKIT_VERSION_PREFIX)
|
||||
|
||||
@@ -164,6 +164,70 @@ Static responses do not allocate additional memory after initialization. You can
|
||||
|
||||
Static route responses are cached for the lifetime of the server object. To reload static routes, call `server.reload(options)`.
|
||||
|
||||
### File Responses vs Static Responses
|
||||
|
||||
When serving files in routes, there are two distinct behaviors depending on whether you buffer the file content or serve it directly:
|
||||
|
||||
```ts
|
||||
Bun.serve({
|
||||
routes: {
|
||||
// Static route - content is buffered in memory at startup
|
||||
"/logo.png": new Response(await Bun.file("./logo.png").bytes()),
|
||||
|
||||
// File route - content is read from filesystem on each request
|
||||
"/download.zip": new Response(Bun.file("./download.zip")),
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
**Static routes** (`new Response(await file.bytes())`) buffer content in memory at startup:
|
||||
|
||||
- **Zero filesystem I/O** during requests - content served entirely from memory
|
||||
- **ETag support** - Automatically generates and validates ETags for caching
|
||||
- **If-None-Match** - Returns `304 Not Modified` when client ETag matches
|
||||
- **No 404 handling** - Missing files cause startup errors, not runtime 404s
|
||||
- **Memory usage** - Full file content stored in RAM
|
||||
- **Best for**: Small static assets, API responses, frequently accessed files
|
||||
|
||||
**File routes** (`new Response(Bun.file(path))`) read from filesystem per request:
|
||||
|
||||
- **Filesystem reads** on each request - checks file existence and reads content
|
||||
- **Built-in 404 handling** - Returns `404 Not Found` if file doesn't exist or becomes inaccessible
|
||||
- **Last-Modified support** - Uses file modification time for `If-Modified-Since` headers
|
||||
- **If-Modified-Since** - Returns `304 Not Modified` when file hasn't changed since client's cached version
|
||||
- **Range request support** - Automatically handles partial content requests with `Content-Range` headers
|
||||
- **Streaming transfers** - Uses buffered reader with backpressure handling for efficient memory usage
|
||||
- **Memory efficient** - Only buffers small chunks during transfer, not entire file
|
||||
- **Best for**: Large files, dynamic content, user uploads, files that change frequently
|
||||
|
||||
### HTTP Caching Behavior
|
||||
|
||||
Both route types implement HTTP caching standards but with different strategies:
|
||||
|
||||
#### Static Routes Caching
|
||||
|
||||
- **ETag generation**: Automatically computes ETag hash from content at startup
|
||||
- **If-None-Match**: Validates client ETag against server ETag
|
||||
- **304 responses**: Returns `304 Not Modified` with empty body when ETags match
|
||||
- **Cache headers**: Inherits any `Cache-Control` headers you provide in the Response
|
||||
- **Consistency**: ETag remains constant until server restart or route reload
|
||||
|
||||
#### File Routes Caching
|
||||
|
||||
- **Last-Modified**: Uses file's `mtime` for `Last-Modified` header
|
||||
- **If-Modified-Since**: Compares client date with file modification time
|
||||
- **304 responses**: Returns `304 Not Modified` when file unchanged since client's cached version
|
||||
- **Content-Length**: Automatically set based on current file size
|
||||
- **Dynamic validation**: Checks file modification time on each request
|
||||
|
||||
#### Status Code Handling
|
||||
|
||||
Both route types automatically adjust status codes:
|
||||
|
||||
- **200 → 204**: Empty files (0 bytes) return `204 No Content` instead of `200 OK`
|
||||
- **200 → 304**: Successful cache validation returns `304 Not Modified`
|
||||
- **File routes only**: Missing or inaccessible files return `404 Not Found`
|
||||
|
||||
```ts
|
||||
const server = Bun.serve({
|
||||
static: {
|
||||
|
||||
@@ -208,8 +208,8 @@ export class ArrayBufferSink {
|
||||
*
|
||||
* This API might change later to separate Uint8ArraySink and ArrayBufferSink
|
||||
*/
|
||||
flush(): number | Uint8Array | ArrayBuffer;
|
||||
end(): ArrayBuffer | Uint8Array;
|
||||
flush(): number | Uint8Array<ArrayBuffer> | ArrayBuffer;
|
||||
end(): ArrayBuffer | Uint8Array<ArrayBuffer>;
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -158,6 +158,18 @@ $ bun install --omit dev
|
||||
$ bun install --omit=dev --omit=peer --omit=optional
|
||||
```
|
||||
|
||||
## Platform-specific installation
|
||||
|
||||
To add packages for a specific platform and omit downloading the rest:
|
||||
|
||||
```bash
|
||||
$ bun install --os=win32 # i.e @oven/bun-windows-x64
|
||||
$ bun install --os=darwin --cpu=arm64 # i.e @oven/bun-darwin-aarch64
|
||||
$ bun install --os=linux --cpu=x64 --libc=glibc # i.e @oven/bun-linux-x64
|
||||
$ bun install --os=linux --cpu=arm64 --libc=musl # i.e @oven/bun-linux-aarch64-musl
|
||||
$ bun install --os=* --cpu=* --libc=* # <everything>
|
||||
```
|
||||
|
||||
## Dry run
|
||||
|
||||
To perform a dry run (i.e. don't actually install anything):
|
||||
|
||||
@@ -158,7 +158,7 @@ See [Test > Lifecycle](https://bun.com/docs/test/lifecycle) for complete documen
|
||||
|
||||
## Mocks
|
||||
|
||||
Create mock functions with the `mock` function. Mocks are automatically reset between tests.
|
||||
Create mock functions with the `mock` function.
|
||||
|
||||
```ts
|
||||
import { test, expect, mock } from "bun:test";
|
||||
|
||||
@@ -14,7 +14,7 @@ if (typeof Bun !== "undefined") {
|
||||
|
||||
---
|
||||
|
||||
In TypeScript environments, the previous approach will result in a type error unless `bun-types` is globally installed. To avoid this, you can check `process.versions` instead.
|
||||
In TypeScript environments, the previous approach will result in a type error unless `@types/bun` is installed. To avoid this, you can check `process.versions` instead.
|
||||
|
||||
```ts
|
||||
if (process.versions.bun) {
|
||||
|
||||
@@ -426,6 +426,54 @@ test("exactly two assertions", () => {
|
||||
|
||||
This helps ensure all your assertions run, especially in complex async code with multiple code paths.
|
||||
|
||||
## Type Testing
|
||||
|
||||
Bun includes `expectTypeOf` for testing typescript types, compatible with Vitest.
|
||||
|
||||
### expectTypeOf
|
||||
|
||||
{% callout %}
|
||||
|
||||
**Note** — These functions are no-ops at runtime - you need to run TypeScript separately to verify the type checks.
|
||||
|
||||
{% endcallout %}
|
||||
|
||||
The `expectTypeOf` function provides type-level assertions that are checked by TypeScript's type checker. **Important**:
|
||||
|
||||
To test your types:
|
||||
|
||||
1. Write your type assertions using `expectTypeOf`
|
||||
2. Run `bunx tsc --noEmit` to check that your types are correct
|
||||
|
||||
```ts
|
||||
import { expectTypeOf } from "bun:test";
|
||||
|
||||
// Basic type assertions
|
||||
expectTypeOf<string>().toEqualTypeOf<string>();
|
||||
expectTypeOf(123).toBeNumber();
|
||||
expectTypeOf("hello").toBeString();
|
||||
|
||||
// Object type matching
|
||||
expectTypeOf({ a: 1, b: "hello" }).toMatchObjectType<{ a: number }>();
|
||||
|
||||
// Function types
|
||||
function greet(name: string): string {
|
||||
return `Hello ${name}`;
|
||||
}
|
||||
|
||||
expectTypeOf(greet).toBeFunction();
|
||||
expectTypeOf(greet).parameters.toEqualTypeOf<[string]>();
|
||||
expectTypeOf(greet).returns.toEqualTypeOf<string>();
|
||||
|
||||
// Array types
|
||||
expectTypeOf([1, 2, 3]).items.toBeNumber();
|
||||
|
||||
// Promise types
|
||||
expectTypeOf(Promise.resolve(42)).resolves.toBeNumber();
|
||||
```
|
||||
|
||||
For full documentation on expectTypeOf matchers, see the [API Reference](/reference/bun/test/expectTypeOf)
|
||||
|
||||
## Matchers
|
||||
|
||||
Bun implements the following matchers. Full Jest compatibility is on the roadmap; track progress [here](https://github.com/oven-sh/bun/issues/1825).
|
||||
@@ -629,17 +677,17 @@ Bun implements the following matchers. Full Jest compatibility is on the roadmap
|
||||
|
||||
---
|
||||
|
||||
- ❌
|
||||
- ✅
|
||||
- [`.toHaveReturnedWith()`](https://jestjs.io/docs/expect#tohavereturnedwithvalue)
|
||||
|
||||
---
|
||||
|
||||
- ❌
|
||||
- ✅
|
||||
- [`.toHaveLastReturnedWith()`](https://jestjs.io/docs/expect#tohavelastreturnedwithvalue)
|
||||
|
||||
---
|
||||
|
||||
- ❌
|
||||
- ✅
|
||||
- [`.toHaveNthReturnedWith()`](https://jestjs.io/docs/expect#tohaventhreturnedwithnthcall-value)
|
||||
|
||||
---
|
||||
|
||||
1
examples/.gitignore
vendored
1
examples/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
bun-examples-all
|
||||
@@ -1,7 +0,0 @@
|
||||
#[no_mangle]
|
||||
pub extern "C" fn add(a: i32, b: i32) -> i32 {
|
||||
a + b
|
||||
}
|
||||
|
||||
// to compile:
|
||||
// rustc --crate-type cdylib add.rs
|
||||
@@ -1,12 +0,0 @@
|
||||
import { dlopen, suffix } from "bun:ffi";
|
||||
|
||||
const {
|
||||
symbols: { add },
|
||||
} = dlopen(`./libadd.${suffix}`, {
|
||||
add: {
|
||||
args: ["i32", "i32"],
|
||||
returns: "i32",
|
||||
},
|
||||
});
|
||||
|
||||
console.log(add(1, 2));
|
||||
@@ -1,6 +0,0 @@
|
||||
pub export fn add(a: i32, b: i32) i32 {
|
||||
return a + b;
|
||||
}
|
||||
|
||||
// to compile:
|
||||
// zig build-lib -OReleaseFast ./add.zig -dynamic --name add
|
||||
@@ -1,89 +0,0 @@
|
||||
// To run this example:
|
||||
//
|
||||
// bun --hot bun-hot-websockets.js
|
||||
//
|
||||
|
||||
const css = ([inner]) => {
|
||||
return inner;
|
||||
};
|
||||
|
||||
const styles = css`
|
||||
#bun {
|
||||
margin: 0 auto;
|
||||
margin-top: 200px;
|
||||
object-fit: cover;
|
||||
}
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
body {
|
||||
background: #f1239f;
|
||||
font-family: "Inter", sans-serif;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
align-content: center;
|
||||
color: white;
|
||||
}
|
||||
h1 {
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
font-size: 3rem;
|
||||
-webkit-text-stroke: 2px black;
|
||||
}
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
`;
|
||||
|
||||
Bun.serve({
|
||||
websocket: {
|
||||
message(ws, msg) {
|
||||
ws.send(styles);
|
||||
},
|
||||
},
|
||||
fetch(req, server) {
|
||||
if (req.url.endsWith("/hot")) {
|
||||
if (server.upgrade(req))
|
||||
return new Response("", {
|
||||
status: 101,
|
||||
});
|
||||
}
|
||||
|
||||
return new Response(
|
||||
`
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>WebSockets</title>
|
||||
</head>
|
||||
<body>
|
||||
<style></style>
|
||||
<script>
|
||||
const ws = new WebSocket("ws://localhost:3000/hot");
|
||||
const style = document.querySelector("style");
|
||||
ws.onmessage = (e) => {
|
||||
style.innerHTML = e.data;
|
||||
};
|
||||
setInterval(() => {
|
||||
ws.send("ping");
|
||||
}, 8);
|
||||
</script>
|
||||
<div id="app">
|
||||
<img src="https://bun.com/logo.svg" alt="Bun" id='bun' />
|
||||
<h1>bun --hot websockets</h1>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
`,
|
||||
{
|
||||
headers: {
|
||||
"Content-Type": "text/html; charset=utf-8",
|
||||
},
|
||||
},
|
||||
);
|
||||
},
|
||||
});
|
||||
@@ -1,9 +0,0 @@
|
||||
import { resolve } from "path";
|
||||
const { write, stdout, file } = Bun;
|
||||
import { argv } from "process";
|
||||
|
||||
const path = resolve(argv.at(-1)!);
|
||||
await write(stdout, file(path));
|
||||
|
||||
Bun.stdout;
|
||||
process.stdout;
|
||||
@@ -1,11 +0,0 @@
|
||||
const sequence = [1, 2, 3];
|
||||
sequence.toReversed(); // => [3, 2, 1]
|
||||
sequence; // => [1, 2, 3]
|
||||
|
||||
const outOfOrder = new Uint8Array([3, 1, 2]);
|
||||
outOfOrder.toSorted(); // => Uint8Array [1, 2, 3]
|
||||
outOfOrder; // => Uint8Array [3, 1, 2]
|
||||
|
||||
const correctionNeeded = [1, 1, 3];
|
||||
correctionNeeded.with(1, 2); // => [1, 2, 3]
|
||||
correctionNeeded; // => [1, 1, 3]
|
||||
@@ -1,23 +0,0 @@
|
||||
// Accepts a string, TypedArray, or Blob (file blob support is not implemented but planned)
|
||||
const input = "hello world".repeat(400);
|
||||
|
||||
// Bun.hash() defaults to Wyhash because it's fast
|
||||
console.log(Bun.hash(input));
|
||||
|
||||
console.log(Bun.hash.wyhash(input));
|
||||
// and returns a bigint
|
||||
// all of these hashing functions return number if 32-bit or bigint if 64-bit, not typed arrays.
|
||||
console.log(Bun.hash.adler32(input)); // number
|
||||
console.log(Bun.hash.crc32(input)); // number
|
||||
console.log(Bun.hash.cityHash32(input)); // number
|
||||
console.log(Bun.hash.cityHash64(input)); // bigint
|
||||
console.log(Bun.hash.xxHash32(input)); // number
|
||||
console.log(Bun.hash.xxHash64(input)); // bigint
|
||||
console.log(Bun.hash.xxHash3(input)); // bigint
|
||||
console.log(Bun.hash.murmur32v3(input)); // number
|
||||
console.log(Bun.hash.murmur32v2(input)); // number
|
||||
console.log(Bun.hash.murmur64v2(input)); // bigint
|
||||
console.log(Bun.hash.rapidhash(input)); // bigint
|
||||
|
||||
// Second argument accepts a seed where relevant
|
||||
console.log(Bun.hash(input, 12345));
|
||||
@@ -1,37 +0,0 @@
|
||||
// Start a fast HTTP server from a function
|
||||
|
||||
Bun.serve({
|
||||
async fetch(req) {
|
||||
const { pathname } = new URL(req.url);
|
||||
if (!(pathname.startsWith("/https://") || pathname.startsWith("/http://"))) {
|
||||
return new Response("Enter a path that starts with https:// or http://\n", {
|
||||
status: 400,
|
||||
});
|
||||
}
|
||||
|
||||
const response = await fetch(req.url.substring("http://localhost:3000/".length), req.clone());
|
||||
|
||||
return new HTMLRewriter()
|
||||
.on("a[href]", {
|
||||
element(element) {
|
||||
element.setAttribute("href", "https://www.youtube.com/watch?v=dQw4w9WgXcQ");
|
||||
},
|
||||
})
|
||||
.transform(response);
|
||||
},
|
||||
|
||||
// this is called when fetch() throws or rejects
|
||||
// error(err: Error) {
|
||||
// },
|
||||
|
||||
// this boolean enables the bun's default error handler
|
||||
// sometime after the initial release, it will auto reload as well
|
||||
development: process.env.NODE_ENV !== "production",
|
||||
// note: this isn't node, but for compatibility bun supports process.env + more stuff in process
|
||||
|
||||
// SSL is enabled if these two are set
|
||||
// certFile: './cert.pem',
|
||||
// keyFile: './key.pem',
|
||||
|
||||
port: 3000, // number or string
|
||||
});
|
||||
@@ -1,76 +0,0 @@
|
||||
import { file, serve } from "bun";
|
||||
import { existsSync, statSync } from "fs";
|
||||
|
||||
serve({
|
||||
fetch(req: Request) {
|
||||
let pathname = new URL(req.url).pathname.substring(1);
|
||||
if (pathname == "") {
|
||||
pathname = import.meta.url.replace("file://", "");
|
||||
}
|
||||
|
||||
if (!existsSync(pathname)) {
|
||||
return new Response(null, { status: 404 });
|
||||
}
|
||||
|
||||
const stats = statSync(pathname);
|
||||
|
||||
// https://github.com/gornostay25/svelte-adapter-bun/blob/master/src/sirv.js
|
||||
const headers = new Headers({
|
||||
"Content-Length": "" + stats.size,
|
||||
"Last-Modified": stats.mtime.toUTCString(),
|
||||
ETag: `W/"${stats.size}-${stats.mtime.getTime()}"`,
|
||||
});
|
||||
|
||||
if (req.headers.get("if-none-match") === headers.get("ETag")) {
|
||||
return new Response(null, { status: 304 });
|
||||
}
|
||||
|
||||
const opts = { code: 200, start: 0, end: Infinity, range: false };
|
||||
|
||||
if (req.headers.has("range")) {
|
||||
opts.code = 206;
|
||||
let [x, y] = req.headers.get("range")!.replace("bytes=", "").split("-");
|
||||
let end = (opts.end = parseInt(y, 10) || stats.size - 1);
|
||||
let start = (opts.start = parseInt(x, 10) || 0);
|
||||
|
||||
if (start >= stats.size || end >= stats.size) {
|
||||
headers.set("Content-Range", `bytes */${stats.size}`);
|
||||
return new Response(null, {
|
||||
headers: headers,
|
||||
status: 416,
|
||||
});
|
||||
}
|
||||
|
||||
headers.set("Content-Range", `bytes ${start}-${end}/${stats.size}`);
|
||||
headers.set("Content-Length", "" + (end - start + 1));
|
||||
headers.set("Accept-Ranges", "bytes");
|
||||
opts.range = true;
|
||||
}
|
||||
|
||||
if (opts.range) {
|
||||
return new Response(file(pathname).slice(opts.start, opts.end), {
|
||||
headers,
|
||||
status: opts.code,
|
||||
});
|
||||
}
|
||||
|
||||
return new Response(file(pathname), { headers, status: opts.code });
|
||||
},
|
||||
|
||||
// this is called when fetch() throws or rejects
|
||||
// error(err: Error) {
|
||||
// return new Response("uh oh! :(" + String(err.toString()), { status: 500 });
|
||||
// },
|
||||
|
||||
// this boolean enables the bun's default error handler
|
||||
// sometime after the initial release, it will auto reload as well
|
||||
development: process.env.NODE_ENV !== "production",
|
||||
// note: this isn't node, but for compatibility bun supports process.env + more stuff in process
|
||||
|
||||
// SSL is enabled if these two are set
|
||||
// certFile: './cert.pem',
|
||||
// keyFile: './key.pem',
|
||||
|
||||
port: 3000, // number or string
|
||||
hostname: "localhost", // defaults to 0.0.0.0
|
||||
});
|
||||
@@ -1,31 +0,0 @@
|
||||
import { file, serve } from "bun";
|
||||
|
||||
serve({
|
||||
fetch(req: Request) {
|
||||
const pathname = new URL(req.url).pathname.substring(1);
|
||||
|
||||
// If the URL is empty, display this file.
|
||||
if (pathname === "") {
|
||||
return new Response(file(import.meta.url.replace("file://", "")));
|
||||
}
|
||||
|
||||
return new Response(file(pathname));
|
||||
},
|
||||
|
||||
// this is called when fetch() throws or rejects
|
||||
// error(err: Error) {
|
||||
// return new Response("uh oh! :(" + String(err.toString()), { status: 500 });
|
||||
// },
|
||||
|
||||
// this boolean enables the bun's default error handler
|
||||
// sometime after the initial release, it will auto reload as well
|
||||
development: process.env.NODE_ENV !== "production",
|
||||
// note: this isn't node, but for compatibility bun supports process.env + more stuff in process
|
||||
|
||||
// SSL is enabled if these two are set
|
||||
// certFile: './cert.pem',
|
||||
// keyFile: './key.pem',
|
||||
|
||||
port: 3000, // number or string
|
||||
hostname: "localhost", // defaults to 0.0.0.0
|
||||
});
|
||||
@@ -1,17 +0,0 @@
|
||||
import { serve } from "bun";
|
||||
|
||||
serve({
|
||||
async fetch(req) {
|
||||
// body is a ReadableStream
|
||||
const body = req.body;
|
||||
|
||||
const writer = Bun.file(`upload.${Date.now()}.txt`).writer();
|
||||
for await (const chunk of body!) {
|
||||
writer.write(chunk);
|
||||
}
|
||||
const wrote = await writer.end();
|
||||
|
||||
// @ts-ignore
|
||||
return Response.json({ wrote, type: req.headers.get("Content-Type") });
|
||||
},
|
||||
});
|
||||
@@ -1,12 +0,0 @@
|
||||
import { serve } from "bun";
|
||||
|
||||
const server = serve({
|
||||
fetch(req) {
|
||||
return new Response(`Pending requests count: ${this.pendingRequests}`);
|
||||
},
|
||||
});
|
||||
|
||||
// Stop the server after 5 seconds
|
||||
setTimeout(() => {
|
||||
server.stop();
|
||||
}, 5000);
|
||||
@@ -1,34 +0,0 @@
|
||||
// Start a fast HTTP server from a function
|
||||
Bun.serve({
|
||||
fetch(req: Request) {
|
||||
return new Response(`Echo: ${req.url}`);
|
||||
},
|
||||
|
||||
// baseURI: "http://localhost:3000",
|
||||
|
||||
// this is called when fetch() throws or rejects
|
||||
// error(err: Error) {
|
||||
// return new Response("uh oh! :(\n" + err.toString(), { status: 500 });
|
||||
// },
|
||||
|
||||
// this boolean enables bun's default error handler
|
||||
development: process.env.NODE_ENV !== "production",
|
||||
// note: this isn't node, but for compatibility bun supports process.env + more stuff in process
|
||||
|
||||
// SSL is enabled if these two are set
|
||||
// certFile: './cert.pem',
|
||||
// keyFile: './key.pem',
|
||||
|
||||
port: 3000, // number or string
|
||||
});
|
||||
// Start a fast HTTP server from the main file's export
|
||||
// export default {
|
||||
// fetch(req) {
|
||||
// return new Response(
|
||||
// `This is another way to start a server!
|
||||
// if the main file export default's an object
|
||||
// with 'fetch'. Bun automatically calls Bun.serve`
|
||||
// );
|
||||
// },
|
||||
// // so autocomplete & type checking works
|
||||
// } as Bun.Serve;
|
||||
@@ -1,193 +0,0 @@
|
||||
const { AWS_LAMBDA_RUNTIME_API, LAMBDA_TASK_ROOT, _HANDLER } = process.env;
|
||||
|
||||
if (!AWS_LAMBDA_RUNTIME_API || AWS_LAMBDA_RUNTIME_API === "") {
|
||||
throw new Error("AWS_LAMBDA_RUNTIME_API is not set");
|
||||
}
|
||||
|
||||
const nextURL = `http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/invocation/next`;
|
||||
const sourceDir = LAMBDA_TASK_ROOT;
|
||||
if (!sourceDir) {
|
||||
throw new Error("handler is not set");
|
||||
}
|
||||
if (!_HANDLER) {
|
||||
throw new Error("handler is not set");
|
||||
}
|
||||
|
||||
// don't care if this fails
|
||||
if (process.cwd() !== sourceDir) {
|
||||
try {
|
||||
process.chdir(sourceDir);
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
var handlerDot = _HANDLER.lastIndexOf(".");
|
||||
var sourcefile = handlerDot > 0 ? _HANDLER.substring(0, handlerDot) : _HANDLER;
|
||||
if (sourcefile.length === 0) {
|
||||
throw new Error("handler is not set");
|
||||
}
|
||||
if (!sourcefile.startsWith("/")) {
|
||||
sourcefile = `./${sourcefile}`;
|
||||
}
|
||||
function noop() {}
|
||||
const method = (handlerDot > 0 ? _HANDLER.substring(handlerDot) : "") || "GET";
|
||||
|
||||
if (typeof process.env.VERBOSE !== "undefined") {
|
||||
console.time(`Loaded ${sourcefile}`);
|
||||
}
|
||||
var Handler;
|
||||
|
||||
try {
|
||||
Handler = await import(sourcefile);
|
||||
} catch (e: any) {
|
||||
console.error("Error loading sourcefile:", e);
|
||||
try {
|
||||
await fetch(new URL(`http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/init/error`).href, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({
|
||||
errorMessage: e.message,
|
||||
errorType: e.name,
|
||||
stackTrace: e?.stack?.split("\n") ?? [],
|
||||
}),
|
||||
});
|
||||
} catch (e2) {
|
||||
console.error("Error sending error to runtime:", e2);
|
||||
}
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (typeof process.env.VERBOSE !== "undefined") {
|
||||
console.timeEnd(`Loaded ${sourcefile}`);
|
||||
}
|
||||
|
||||
const handlerFunction = Handler.default?.fetch;
|
||||
if (typeof handlerFunction !== "function") {
|
||||
const e = new Error(`${sourcefile} must export default a function called fetch
|
||||
|
||||
Here is an example:
|
||||
|
||||
export default {
|
||||
fetch(req) {
|
||||
return new Response("Hello World");
|
||||
}
|
||||
}
|
||||
`);
|
||||
|
||||
console.error(e);
|
||||
|
||||
try {
|
||||
await fetch(new URL(`http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/init/error`).href, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({
|
||||
errorMessage: e.message,
|
||||
errorType: e.name,
|
||||
stackTrace: e?.stack?.split("\n") ?? [],
|
||||
}),
|
||||
});
|
||||
} catch (e2) {
|
||||
console.error("Error sending error to runtime:", e2);
|
||||
}
|
||||
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
var baseURLString = AWS_LAMBDA_RUNTIME_API;
|
||||
if ("baseURI" in Handler.default) {
|
||||
baseURLString = Handler.default.baseURI?.toString();
|
||||
}
|
||||
|
||||
var baseURL;
|
||||
try {
|
||||
baseURL = new URL(baseURLString);
|
||||
} catch (e: any) {
|
||||
console.error("Error parsing baseURI:", e);
|
||||
try {
|
||||
await fetch(new URL(`http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/init/error`).href, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({
|
||||
errorMessage: e.message,
|
||||
errorType: e.name,
|
||||
stackTrace: e?.stack?.split("\n") || [],
|
||||
}),
|
||||
});
|
||||
} catch (e2) {
|
||||
console.error("Error sending error to runtime:", e2);
|
||||
}
|
||||
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
async function runHandler(response: Response) {
|
||||
const traceID = response.headers.get("Lambda-Runtime-Trace-Id");
|
||||
const requestID = response.headers.get("Lambda-Runtime-Aws-Request-Id");
|
||||
var request = new Request(baseURL.href, {
|
||||
method,
|
||||
headers: response.headers,
|
||||
body: parseInt(response.headers.get("Content-Length") || "0", 10) > 0 ? await response.blob() : undefined,
|
||||
});
|
||||
// we are done with the Response object here
|
||||
// allow it to be GC'd
|
||||
(response as any) = undefined;
|
||||
|
||||
var result: Response;
|
||||
try {
|
||||
if (typeof process.env.VERBOSE !== "undefined") {
|
||||
console.time(`[${traceID}] Run ${request.url}`);
|
||||
}
|
||||
result = handlerFunction(request, {});
|
||||
if (result && (result as any).then) {
|
||||
await result;
|
||||
}
|
||||
} catch (e1: any) {
|
||||
if (typeof process.env.VERBOSE !== "undefined") {
|
||||
console.error(`[${traceID}] Error running handler:`, e1);
|
||||
}
|
||||
fetch(`http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/invocation/${requestID}/error`, {
|
||||
method: "POST",
|
||||
|
||||
body: JSON.stringify({
|
||||
errorMessage: e1.message,
|
||||
errorType: e1.name,
|
||||
stackTrace: e1?.stack?.split("\n") ?? [],
|
||||
}),
|
||||
}).finally(noop);
|
||||
return;
|
||||
} finally {
|
||||
if (typeof process.env.VERBOSE !== "undefined") {
|
||||
console.timeEnd(`[${traceID}] Run ${request.url}`);
|
||||
}
|
||||
}
|
||||
|
||||
if (!result || !("headers" in result)) {
|
||||
await fetch(`http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/invocation/${requestID}/error`, {
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
errorMessage: "Expected Response object",
|
||||
errorType: "ExpectedResponseObject",
|
||||
stackTrace: [],
|
||||
}),
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
await fetch(`http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/invocation/${requestID}/response`, {
|
||||
method: "POST",
|
||||
headers: result.headers,
|
||||
body: await result.blob(),
|
||||
});
|
||||
(result as any) = undefined;
|
||||
}
|
||||
|
||||
while (true) {
|
||||
fetch(nextURL).then(runHandler, console.error);
|
||||
}
|
||||
|
||||
export {};
|
||||
@@ -1,48 +0,0 @@
|
||||
{
|
||||
"lockfileVersion": 1,
|
||||
"workspaces": {
|
||||
"": {
|
||||
"name": "macros",
|
||||
"dependencies": {
|
||||
"moment": "^2.29.1",
|
||||
"papaparse": "^5.3.1",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-refresh": "^0.10.0",
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^17.0.24",
|
||||
"@types/react-dom": "^17.0.9",
|
||||
},
|
||||
},
|
||||
},
|
||||
"packages": {
|
||||
"@types/prop-types": ["@types/prop-types@15.7.5", "", {}, "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w=="],
|
||||
|
||||
"@types/react": ["@types/react@17.0.53", "", { "dependencies": { "@types/prop-types": "*", "@types/scheduler": "*", "csstype": "^3.0.2" } }, "sha512-1yIpQR2zdYu1Z/dc1OxC+MA6GR240u3gcnP4l6mvj/PJiVaqHsQPmWttsvHsfnhfPbU2FuGmo0wSITPygjBmsw=="],
|
||||
|
||||
"@types/react-dom": ["@types/react-dom@17.0.19", "", { "dependencies": { "@types/react": "^17" } }, "sha512-PiYG40pnQRdPHnlf7tZnp0aQ6q9tspYr72vD61saO6zFCybLfMqwUCN0va1/P+86DXn18ZWeW30Bk7xlC5eEAQ=="],
|
||||
|
||||
"@types/scheduler": ["@types/scheduler@0.16.2", "", {}, "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew=="],
|
||||
|
||||
"csstype": ["csstype@3.1.1", "", {}, "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw=="],
|
||||
|
||||
"js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="],
|
||||
|
||||
"loose-envify": ["loose-envify@1.4.0", "", { "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, "bin": { "loose-envify": "cli.js" } }, "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q=="],
|
||||
|
||||
"moment": ["moment@2.29.4", "", {}, "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w=="],
|
||||
|
||||
"object-assign": ["object-assign@4.1.1", "", {}, "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="],
|
||||
|
||||
"papaparse": ["papaparse@5.3.2", "", {}, "sha512-6dNZu0Ki+gyV0eBsFKJhYr+MdQYAzFUGlBMNj3GNrmHxmz1lfRa24CjFObPXtjcetlOv5Ad299MhIK0znp3afw=="],
|
||||
|
||||
"react": ["react@17.0.2", "", { "dependencies": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" } }, "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA=="],
|
||||
|
||||
"react-dom": ["react-dom@17.0.2", "", { "dependencies": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", "scheduler": "^0.20.2" }, "peerDependencies": { "react": "17.0.2" } }, "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA=="],
|
||||
|
||||
"react-refresh": ["react-refresh@0.10.0", "", {}, "sha512-PgidR3wST3dDYKr6b4pJoqQFpPGNKDSCDx4cZoshjXipw3LzO7mG1My2pwEzz2JVkF+inx3xRpDeQLFQGH/hsQ=="],
|
||||
|
||||
"scheduler": ["scheduler@0.20.2", "", { "dependencies": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" } }, "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ=="],
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
import { fetchCSV } from "macro:fetchCSV";
|
||||
|
||||
export const Covid19 = () => {
|
||||
const rows = fetchCSV("https://covid19.who.int/WHO-COVID-19-global-data.csv", {
|
||||
last: 100,
|
||||
columns: ["New_cases", "Date_reported", "Country"],
|
||||
});
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h2>Covid-19</h2>
|
||||
<h6>last {rows.length} updates from the WHO</h6>
|
||||
<div className="Table">
|
||||
<div className="Header">
|
||||
<div className="Heading">New Cases</div>
|
||||
<div className="Heading">Date</div>
|
||||
<div className="Heading">Country</div>
|
||||
</div>
|
||||
|
||||
{rows.map((row, index) => (
|
||||
<div className="Row" key={index}>
|
||||
<div className="Column">{row[0]}</div>
|
||||
<div className="Column">{row[1]}</div>
|
||||
<div className="Column">{row[2]}</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -1,15 +0,0 @@
|
||||
// source code
|
||||
import { matchInFile } from "macro:matchInFile";
|
||||
|
||||
export const IPAddresses = () => (
|
||||
<div>
|
||||
<h2>recent ip addresses</h2>
|
||||
<div className="Lines">
|
||||
{matchInFile("access.log", /^(?:[0-9]{1,3}\.){3}[0-9]{1,3}/).map((ipAddress, index) => (
|
||||
<div className="Line" key={index}>
|
||||
{ipAddress}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
@@ -1,15 +0,0 @@
|
||||
import * as ReactDOM from "react-dom";
|
||||
import * as React from "react";
|
||||
import { IPAddresses } from "./example";
|
||||
import { Covid19 } from "./covid19";
|
||||
|
||||
const Start = function () {
|
||||
const root = document.createElement("div");
|
||||
document.body.appendChild(root);
|
||||
|
||||
// comment out to switch between examples
|
||||
// ReactDOM.render(<IPAddresses />, root);
|
||||
ReactDOM.render(<Covid19 />, root);
|
||||
};
|
||||
|
||||
Start();
|
||||
@@ -1,4 +0,0 @@
|
||||
// source code
|
||||
import { mysteryBox } from "macro:./mystery-box";
|
||||
|
||||
export default "You roll! " + mysteryBox(123);
|
||||
@@ -1,54 +0,0 @@
|
||||
import Pappa from "papaparse";
|
||||
// Example usage:
|
||||
// const rows = fetchCSV(
|
||||
// "https://covid19.who.int/WHO-COVID-19-global-data.csv",
|
||||
// {
|
||||
// last: 100,
|
||||
// columns: ["New_cases", "Date_reported", "Country"],
|
||||
// }
|
||||
// );
|
||||
export async function fetchCSV(callExpression) {
|
||||
console.time("fetchCSV Total");
|
||||
const [
|
||||
urlNode,
|
||||
{
|
||||
properties: { last: limit = 10, columns = [] },
|
||||
},
|
||||
] = callExpression.arguments;
|
||||
const url = urlNode.get();
|
||||
|
||||
console.time("Fetch");
|
||||
const response = await fetch(url);
|
||||
const csvText = await response.text();
|
||||
console.timeEnd("Fetch");
|
||||
|
||||
console.time("Parse");
|
||||
let rows = Pappa.parse(csvText, { fastMode: true }).data;
|
||||
console.timeEnd("Parse");
|
||||
|
||||
console.time("Render");
|
||||
const columnIndices = new Array(columns.length);
|
||||
|
||||
for (let i = 0; i < columns.length; i++) {
|
||||
columnIndices[i] = rows[0].indexOf(columns[i]);
|
||||
}
|
||||
|
||||
rows = rows
|
||||
.slice(Math.max(limit, rows.length) - limit)
|
||||
.reverse()
|
||||
.filter(columns => columns.every(Boolean));
|
||||
const value = (
|
||||
<array>
|
||||
{rows.map(columns => (
|
||||
<array>
|
||||
{columnIndices.map(columnIndex => (
|
||||
<string value={columns[columnIndex]} />
|
||||
))}
|
||||
</array>
|
||||
))}
|
||||
</array>
|
||||
);
|
||||
console.timeEnd("Render");
|
||||
console.timeEnd("fetchCSV Total");
|
||||
return value;
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
// macro code
|
||||
export async function matchInFile(callExpression: BunAST.CallExpression) {
|
||||
const [filePathNode, matcherNode] = callExpression.arguments;
|
||||
let filePath: string;
|
||||
filePath = filePathNode.get();
|
||||
|
||||
let matcher: RegExp;
|
||||
matcher = matcherNode.get();
|
||||
const file: string = await Bun.file(Bun.cwd + filePath).text();
|
||||
|
||||
return (
|
||||
<array>
|
||||
{file
|
||||
.split("\n")
|
||||
.map(line => line.match(matcher))
|
||||
.filter(Boolean)
|
||||
.reverse()
|
||||
.map(line => (
|
||||
<string value={line[0]} />
|
||||
))}
|
||||
</array>
|
||||
);
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
export function mysteryBox(callExpression) {
|
||||
console.log(callExpression.log);
|
||||
// get arguments
|
||||
const [countNode] = callExpression.arguments;
|
||||
const countString: string = countNode.get();
|
||||
const count: number = parseInt(countString, 10);
|
||||
|
||||
// validate
|
||||
if (!(count >= 1 && count <= 1000)) return new Error(`Argument ${countString} is expected to be between 1 and 1000`);
|
||||
|
||||
// return a value
|
||||
return (Math.random() * count) | 0;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
import moment from "moment";
|
||||
export function now(node) {
|
||||
var fmt = "HH:mm:ss";
|
||||
const args = node.arguments;
|
||||
if (args[0] instanceof <string />) {
|
||||
fmt = args[0].get();
|
||||
}
|
||||
const time = moment().format(fmt);
|
||||
return <string value={time}></string>;
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"name": "macros",
|
||||
"version": "1.0.0",
|
||||
"main": "index.js",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"moment": "^2.29.1",
|
||||
"papaparse": "^5.3.1",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-refresh": "^0.10.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^17.0.24",
|
||||
"@types/react-dom": "^17.0.9"
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Macro test</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<link rel="stylesheet" href="/styles.css" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script async type="module" src="/components/index.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,47 +0,0 @@
|
||||
html {
|
||||
font-size: 4rem;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: black;
|
||||
|
||||
color: rgb(0, 255, 0);
|
||||
font-family: "Courier";
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 48px auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.Line {
|
||||
font-size: 0.5rem;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.Table {
|
||||
display: grid;
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.Row,
|
||||
.Header {
|
||||
display: grid;
|
||||
grid-template-columns: 2fr 1fr 1fr;
|
||||
text-align: right;
|
||||
|
||||
column-gap: 2rem;
|
||||
}
|
||||
|
||||
.Heading {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.Header {
|
||||
border-bottom: 1px solid rgb(0, 255, 0);
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.Heading:nth-of-type(2) {
|
||||
text-align: left;
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"paths": {},
|
||||
"jsx": "preserve"
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
const map = Bun.mmap("./mmap.txt", { shared: true });
|
||||
const utf8decoder = new TextDecoder("utf-8");
|
||||
|
||||
let old = new TextEncoder().encode("12345");
|
||||
|
||||
setInterval(() => {
|
||||
old = old.sort((a, b) => (Math.random() > 0.5 ? -1 : 1));
|
||||
console.log(`changing mmap to ~> ${utf8decoder.decode(old)}`);
|
||||
|
||||
map.set(old);
|
||||
}, 4);
|
||||
@@ -1,22 +0,0 @@
|
||||
const map = Bun.mmap("./mmap.txt");
|
||||
|
||||
function buffer_hash(buffer) {
|
||||
let hash = 0;
|
||||
for (let i = 0; i < buffer.length; i++) {
|
||||
hash = (hash << 5) - hash + buffer[i];
|
||||
hash |= 0; // Convert to 32bit integer
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
const decoder = new TextDecoder();
|
||||
|
||||
let hash = buffer_hash(map);
|
||||
console.log(decoder.decode(map));
|
||||
|
||||
while (true) {
|
||||
if (buffer_hash(map) !== hash) {
|
||||
hash = buffer_hash(map);
|
||||
console.log(`mmap changed to ~> ${decoder.decode(map)}`);
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
43521
|
||||
@@ -1,23 +0,0 @@
|
||||
import { resolve } from "path";
|
||||
import { parse } from "querystring";
|
||||
|
||||
export default {
|
||||
fetch(req) {
|
||||
const url = new URL(req.url);
|
||||
if (url.pathname === "/favicon.ico") return new Response("nooo dont open favicon in editor", { status: 404 });
|
||||
|
||||
var pathname = req.url.substring(1);
|
||||
const q = pathname.indexOf("?");
|
||||
var { editor } = parse(pathname.substring(q + 1)) || {};
|
||||
|
||||
if (q > 0) {
|
||||
pathname = pathname.substring(0, q);
|
||||
}
|
||||
|
||||
Bun.openInEditor(resolve(pathname), {
|
||||
editor,
|
||||
});
|
||||
|
||||
return new Response(`Opened ${req.url}`);
|
||||
},
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,33 +0,0 @@
|
||||
{
|
||||
"name": "simple-react",
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@emotion/css": "^11.1.3",
|
||||
"@vitejs/plugin-react-refresh": "^1.3.3",
|
||||
"antd": "^4.16.1",
|
||||
"left-pad": "^1.3.0",
|
||||
"next": "^11.0.0",
|
||||
"parcel": "2.0.0-beta.3",
|
||||
"react": "^17.0.2",
|
||||
"react-bootstrap": "^1.6.1",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-form": "^4.0.1",
|
||||
"react-hook-form": "^7.8.3"
|
||||
},
|
||||
"parcel": "parceldist/index.js",
|
||||
"targets": {
|
||||
"parcel": {
|
||||
"outputFormat": "esmodule",
|
||||
"sourceMap": false,
|
||||
"optimize": false,
|
||||
"engines": {
|
||||
"chrome": "last 1 version"
|
||||
}
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@snowpack/plugin-react-refresh": "^2.5.0",
|
||||
"typescript": "^4.3.4"
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
crossorigin="anonymous"
|
||||
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;700&family=Space+Mono:wght@400;700&display=swap"
|
||||
/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="reactroot"></div>
|
||||
<link rel="stylesheet" href="./src/index.css" />
|
||||
<script src="./src/index.tsx" async type="module"></script>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,14 +0,0 @@
|
||||
:root {
|
||||
--timestamp: "0";
|
||||
--interval: "8";
|
||||
--progress-bar: 11.83299999999997%;
|
||||
--spinner-1-muted: rgb(142, 6, 182);
|
||||
--spinner-1-primary: rgb(177, 8, 227);
|
||||
--spinner-2-muted: rgb(110, 148, 190);
|
||||
--spinner-2-primary: rgb(138, 185, 238);
|
||||
--spinner-3-muted: rgb(75, 45, 64);
|
||||
--spinner-3-primary: rgb(94, 56, 80);
|
||||
--spinner-4-muted: rgb(155, 129, 108);
|
||||
--spinner-4-primary: rgb(194, 161, 135);
|
||||
--spinner-rotate: 213deg;
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
import React from "react";
|
||||
|
||||
export function RenderCounter({ name, children }) {
|
||||
const counter = React.useRef(1);
|
||||
return (
|
||||
<div className="RenderCounter">
|
||||
<div className="RenderCounter-meta">
|
||||
<div className="RenderCounter-title">
|
||||
{name} rendered <strong>{counter.current++} times</strong>
|
||||
</div>
|
||||
<div className="RenderCounter-lastRender">
|
||||
LAST RENDER:{" "}
|
||||
{new Intl.DateTimeFormat([], {
|
||||
timeStyle: "long",
|
||||
}).format(new Date())}
|
||||
</div>
|
||||
</div>
|
||||
<div className="RenderCounter-children">{children}</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
import * as React from "react";
|
||||
import { Button } from "./Button";
|
||||
import { RenderCounter } from "./RenderCounter";
|
||||
export function App() {
|
||||
return (
|
||||
<RenderCounter name="App">
|
||||
<div className="AppRoot">
|
||||
<h1>This is the root element</h1>
|
||||
|
||||
<Button>Click</Button>
|
||||
</div>
|
||||
</RenderCounter>
|
||||
);
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import { RenderCounter } from "./RenderCounter";
|
||||
|
||||
export const Button = ({ children }) => {
|
||||
return (
|
||||
<RenderCounter name="Button">
|
||||
<div className="Button">{children}</div>
|
||||
</RenderCounter>
|
||||
);
|
||||
};
|
||||
@@ -1 +0,0 @@
|
||||
@import "https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;700&family=Space+Mono:wght@400;700&display=swap";
|
||||
@@ -1,98 +0,0 @@
|
||||
@import "./colors.css";
|
||||
|
||||
:root {
|
||||
--heading-font: "Space Mono", system-ui;
|
||||
--body-font: "IBM Plex Sans", system-ui;
|
||||
|
||||
--color-brand: #02ff00;
|
||||
--color-brand-muted: rgb(2, 150, 0);
|
||||
|
||||
--padding-horizontal: 90px;
|
||||
|
||||
--page-background: black;
|
||||
--page-background-alpha: rgba(0, 0, 0, 0.8);
|
||||
|
||||
--result__background-color: black;
|
||||
--result__primary-color: var(--color-brand);
|
||||
--result__foreground-color: white;
|
||||
--result__muted-color: rgb(165, 165, 165);
|
||||
|
||||
--card-width: 352px;
|
||||
|
||||
--page-width: 1152px;
|
||||
|
||||
--snippets_container-background-unfocused: #171717;
|
||||
--snippets_container-background-focused: #0017e9;
|
||||
--snippets_container-background: var(
|
||||
--snippets_container-background-unfocused
|
||||
);
|
||||
--snippets_container-muted-color: rgb(153, 153, 153);
|
||||
}
|
||||
|
||||
body {
|
||||
color: white;
|
||||
margin: 0;
|
||||
|
||||
padding: 0;
|
||||
font-family: var(--body-font);
|
||||
background-color: var(--page-background);
|
||||
color: var(--result__muted-color);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#reactroot,
|
||||
#__next,
|
||||
body,
|
||||
html {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.RenderCounter {
|
||||
border: 10px solid var(--snippets_container-background-focused);
|
||||
margin: 10px;
|
||||
padding: 10px;
|
||||
animation: flash 0.2s linear;
|
||||
animation-fill-mode: forwards;
|
||||
}
|
||||
|
||||
.RenderCounter-meta {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
margin: -10px;
|
||||
padding: 10px;
|
||||
background-color: #111;
|
||||
}
|
||||
|
||||
.RenderCounter-lastRender,
|
||||
.RenderCounter-title {
|
||||
white-space: nowrap;
|
||||
color: rgb(153, 153, 153);
|
||||
}
|
||||
|
||||
@keyframes flash {
|
||||
from {
|
||||
border-color: var(--snippets_container-background-focused);
|
||||
}
|
||||
|
||||
to {
|
||||
border-color: var(--snippets_container-background-unfocused);
|
||||
}
|
||||
}
|
||||
|
||||
.Button {
|
||||
display: block;
|
||||
|
||||
border: 1px solid rgb(20, 180, 0);
|
||||
background-color: rgb(2, 150, 0);
|
||||
color: white;
|
||||
font-weight: 500;
|
||||
padding: 10px 12px;
|
||||
border-radius: 4px;
|
||||
text-transform: uppercase;
|
||||
text-align: center;
|
||||
width: fit-content;
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
import ReactDOM from "react-dom";
|
||||
import React from "react";
|
||||
import { App } from "./components/app";
|
||||
import classNames from "classnames";
|
||||
|
||||
function startReact() {
|
||||
ReactDOM.render(<App />, document.querySelector("#reactroot"));
|
||||
}
|
||||
|
||||
globalThis.addEventListener("DOMContentLoaded", () => {
|
||||
startReact();
|
||||
});
|
||||
startReact();
|
||||
|
||||
export { App };
|
||||
@@ -1,62 +0,0 @@
|
||||
import React from "react";
|
||||
|
||||
export const Main = ({ productName }) => {
|
||||
return (
|
||||
<>
|
||||
<header>
|
||||
<div className="Title">CSS HMR Stress Test</div>
|
||||
<p className="Description">
|
||||
This page visually tests how quickly a bundler can update CSS over Hot Module Reloading.
|
||||
</p>
|
||||
</header>
|
||||
<main className="main">
|
||||
<section className="ProgressSection">
|
||||
<p className="Subtitle">
|
||||
<span className="Subtitle-part">
|
||||
Ran: <span className="timer"></span>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<div className="ProgressBar-container">
|
||||
<div className="ProgressBar"></div>
|
||||
</div>
|
||||
<div className="SectionLabel">The progress bar should move from left to right smoothly.</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<div className="Spinners">
|
||||
<div className="Spinner-container Spinner-1">
|
||||
<div className="Spinner"></div>
|
||||
</div>
|
||||
|
||||
<div className="Spinner-container Spinner-2">
|
||||
<div className="Spinner"></div>
|
||||
</div>
|
||||
|
||||
<div className="Spinner-container Spinner-3">
|
||||
<div className="Spinner"></div>
|
||||
</div>
|
||||
|
||||
<div className="Spinner-container Spinner-4">
|
||||
<div className="Spinner"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="SectionLabel">The spinners should rotate & change color smoothly.</div>
|
||||
</section>
|
||||
</main>
|
||||
<footer>
|
||||
<div className="SectionLabel FooterLabel">There are no CSS animations on this page.</div>
|
||||
|
||||
<div className="Bundler-container">
|
||||
<div className="Bundler">{productName}</div>
|
||||
<div className="Bundler-updateRate">
|
||||
Saving a css file every
|
||||
<span className="highlight">
|
||||
<span className="interval"></span>ms
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</>
|
||||
);
|
||||
};
|
||||
@@ -1,29 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "esnext",
|
||||
"lib": [
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"esnext"
|
||||
],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": false,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noEmit": true,
|
||||
"esModuleInterop": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve"
|
||||
},
|
||||
"include": [
|
||||
"next-env.d.ts",
|
||||
"**/*.ts",
|
||||
"**/*.tsx"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
||||
Binary file not shown.
@@ -1,20 +0,0 @@
|
||||
// A simple way to connect FileSystemRouter to Bun#serve
|
||||
// run with `bun run index.tsx`
|
||||
|
||||
import { renderToReadableStream } from "react-dom/server";
|
||||
import { FileSystemRouter } from "bun";
|
||||
|
||||
export default {
|
||||
port: 3000,
|
||||
async fetch(request: Request) {
|
||||
const router = new FileSystemRouter({
|
||||
dir: process.cwd() + "/pages",
|
||||
style: "nextjs",
|
||||
});
|
||||
|
||||
const route = router.match(request);
|
||||
|
||||
const { default: Root } = await import(route.filePath!);
|
||||
return new Response(await renderToReadableStream(<Root {...route.params} />));
|
||||
},
|
||||
};
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"name": "react-routes",
|
||||
"module": "index.tsx",
|
||||
"type": "module",
|
||||
"devDependencies": {
|
||||
"@types/react": "^18.0.27",
|
||||
"@types/react-dom": "^18.0.10",
|
||||
"bun-types": "^0.7.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0"
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
// reachable from http://localhost:3000/
|
||||
|
||||
export default () => (
|
||||
<html>
|
||||
<head>
|
||||
<title>index</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>
|
||||
<a href="/one">one</a>
|
||||
</h1>
|
||||
<h1>
|
||||
<a href="/two">two</a>
|
||||
</h1>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
@@ -1,12 +0,0 @@
|
||||
// reachable from http://localhost:3000/one
|
||||
|
||||
export default () => (
|
||||
<html>
|
||||
<head>
|
||||
<title>one</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>one</p>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
@@ -1,12 +0,0 @@
|
||||
// reachable from http://localhost:3000/two
|
||||
|
||||
export default () => (
|
||||
<html>
|
||||
<head>
|
||||
<title>two</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>two</p>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"lib": [
|
||||
"ESNext"
|
||||
],
|
||||
"module": "esnext",
|
||||
"target": "esnext",
|
||||
"moduleResolution": "nodenext",
|
||||
"strict": false,
|
||||
"downlevelIteration": true,
|
||||
"skipLibCheck": true,
|
||||
"jsx": "preserve",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"allowJs": true,
|
||||
"types": [
|
||||
"bun-types" // add Bun global
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
import { SHA1, SHA256, SHA512, SHA384, SHA512_256, MD5, MD4, RIPEMD160, sha } from "bun";
|
||||
|
||||
const input = "Hello World";
|
||||
const [first, second] = input.split(" ");
|
||||
|
||||
const log = (name, ...args) => console.log(`${name}:`.padStart("SHA512_256: ".length), ...args);
|
||||
|
||||
console.log("");
|
||||
// This is SHA512-256:
|
||||
// This function is shorthand for SHA512_256.hash(input)
|
||||
log("Bun.sha()", sha(input, "base64"));
|
||||
|
||||
log("SHA1", SHA1.hash(input, "hex"));
|
||||
log("SHA256", SHA256.hash(input, "hex"));
|
||||
log("SHA384", SHA384.hash(input, "hex"));
|
||||
log("SHA512", SHA512.hash(input, "hex"));
|
||||
log("SHA512_256", SHA512_256.hash(input, "hex"));
|
||||
log("RIPEMD160", RIPEMD160.hash(input, "hex"));
|
||||
|
||||
console.log("");
|
||||
console.log("---- Chunked ----");
|
||||
console.log("");
|
||||
|
||||
// You can also do updates in chunks:
|
||||
// const hash = new Hash();
|
||||
for (let Hash of [SHA1, SHA256, SHA384, SHA512, SHA512_256, RIPEMD160]) {
|
||||
const hash = new Hash();
|
||||
hash.update(first);
|
||||
hash.update(" " + second);
|
||||
log(Hash.name, hash.digest("hex"));
|
||||
}
|
||||
|
||||
console.log("");
|
||||
console.log("---- Base64 ----");
|
||||
console.log("");
|
||||
|
||||
// base64 or hex
|
||||
for (let Hash of [SHA1, SHA256, SHA384, SHA512, SHA512_256]) {
|
||||
const hash = new Hash();
|
||||
hash.update(first);
|
||||
hash.update(" " + second);
|
||||
log(Hash.name, hash.digest("base64"));
|
||||
}
|
||||
|
||||
console.log("");
|
||||
console.log("---- Uint8Array ----");
|
||||
console.log("");
|
||||
|
||||
// Uint8Array by default
|
||||
for (let Hash of [SHA1, SHA256, SHA384, SHA512, SHA512_256]) {
|
||||
const hash = new Hash();
|
||||
hash.update(first);
|
||||
hash.update(" " + second);
|
||||
log(Hash.name, hash.digest());
|
||||
}
|
||||
|
||||
console.log("");
|
||||
console.log("---- Uint8Array can be updated in-place ----");
|
||||
console.log("");
|
||||
|
||||
var oneBuf = new Uint8Array(1024);
|
||||
// Update Uint8Array in-place instead of allocating a new one
|
||||
for (let Hash of [SHA1, SHA256, SHA384, SHA512, SHA512_256]) {
|
||||
const hash = new Hash();
|
||||
hash.update(first);
|
||||
hash.update(" " + second);
|
||||
log(Hash.name, hash.digest(oneBuf).subarray(0, Hash.byteLength));
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
import { spawn, which } from "bun";
|
||||
import { rmSync } from "fs";
|
||||
import { basename } from "path";
|
||||
|
||||
const repo = process.argv.at(3) || "TheoBr/vercel-vite-demo";
|
||||
|
||||
const target = basename(repo) + "-main";
|
||||
console.log("Downloading", repo, "to", "/tmp/" + target);
|
||||
|
||||
const archive = await fetch(`https://github.com/${repo}/archive/refs/heads/main.tar.gz`);
|
||||
|
||||
// remove the directory if it already exists locally
|
||||
rmSync("/tmp/" + target, { recursive: true, force: true });
|
||||
|
||||
const tar = spawn({
|
||||
cmd: ["tar", "-xzf", "-"],
|
||||
stdin: archive.body,
|
||||
|
||||
stderr: "inherit",
|
||||
stdout: "inherit",
|
||||
cwd: "/tmp",
|
||||
});
|
||||
|
||||
await tar.exited;
|
||||
|
||||
// if vercel isn't installed, install it
|
||||
if (!which("vercel")) {
|
||||
console.log("Installing vercel...");
|
||||
|
||||
const installer = spawn(["bun", "install", "-g", "vercel"], {
|
||||
stderr: "inherit",
|
||||
stdout: "inherit",
|
||||
stdin: "inherit",
|
||||
});
|
||||
await installer.exited;
|
||||
|
||||
if (!which("vercel")) {
|
||||
throw new Error("Failed to install Vercel CLI");
|
||||
}
|
||||
}
|
||||
|
||||
const { exited: deployed } = spawn({
|
||||
cmd: ["vercel", "deploy", "--yes", "--public", target],
|
||||
stdio: ["inherit", "inherit", "inherit"],
|
||||
cwd: "/tmp",
|
||||
});
|
||||
|
||||
await deployed;
|
||||
@@ -1,15 +0,0 @@
|
||||
import { resolve } from "path";
|
||||
import type { ServeOptions } from "bun";
|
||||
|
||||
const development = process.env.NODE_ENV !== "production";
|
||||
export default {
|
||||
fetch(req: Request) {
|
||||
return new Response(Bun.file(resolve(req.url.substring(1))));
|
||||
},
|
||||
|
||||
// hostname: "0.0.0.0",
|
||||
port: process.env.PORT || "443",
|
||||
keyFile: process.env.SSL_KEY_FILE || "./key.pem",
|
||||
certFile: process.env.SSL_CERTIFICATE_FILE || "./cert.pem",
|
||||
development,
|
||||
} as ServeOptions;
|
||||
@@ -1,49 +0,0 @@
|
||||
import { listen, connect } from "bun";
|
||||
|
||||
var counter = 0;
|
||||
const msg = Buffer.from("Hello World!");
|
||||
|
||||
const handlers = {
|
||||
open(socket) {
|
||||
if (!socket.data?.isServer) {
|
||||
if (!socket.write(msg)) {
|
||||
socket.data = { pending: msg };
|
||||
}
|
||||
}
|
||||
},
|
||||
data(socket, buffer) {
|
||||
if (!socket.write(buffer)) {
|
||||
socket.data = { pending: buffer };
|
||||
return;
|
||||
}
|
||||
counter++;
|
||||
},
|
||||
drain(socket) {
|
||||
const pending = socket.data?.pending;
|
||||
if (!pending) return;
|
||||
if (socket.write(pending)) {
|
||||
socket.data = undefined;
|
||||
counter++;
|
||||
return;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
setInterval(() => {
|
||||
console.log("Wrote", counter, "messages");
|
||||
counter = 0;
|
||||
}, 1000);
|
||||
|
||||
const server = listen({
|
||||
socket: handlers,
|
||||
hostname: "localhost",
|
||||
port: 8080,
|
||||
data: {
|
||||
isServer: true,
|
||||
},
|
||||
});
|
||||
const connection = await connect({
|
||||
socket: handlers,
|
||||
hostname: "localhost",
|
||||
port: 8080,
|
||||
});
|
||||
@@ -686,7 +686,7 @@ def add(debugger, *, category, regex=False, type, identifier=None, synth=False,
|
||||
if summary: debugger.HandleCommand('type summary add --category %s%s%s "%s"' % (category, ' --inline-children' if inline_children else ''.join((' --expand' if expand else '', ' --python-function %s_SummaryProvider' % prefix if summary == True else ' --summary-string "%s"' % summary)), ' --regex' if regex else '', type))
|
||||
if synth: debugger.HandleCommand('type synthetic add --category %s%s --python-class %s_SynthProvider "%s"' % (category, ' --regex' if regex else '', prefix, type))
|
||||
|
||||
def MultiArrayList_Entry(type): return '^multi_array_list\\.MultiArrayList\\(%s\\)\\.Entry__struct_[1-9][0-9]*$' % type
|
||||
def MultiArrayList_Entry(type): return 'multi_array_list\\.MultiArrayList\\(%s\\)\\.Entry__struct_[1-9][0-9]*$' % type
|
||||
|
||||
def __lldb_init_module(debugger, _=None):
|
||||
# Initialize Zig Categories
|
||||
@@ -701,8 +701,8 @@ def __lldb_init_module(debugger, _=None):
|
||||
# Initialize Zig Standard Library
|
||||
add(debugger, category='zig.std', type='mem.Allocator', summary='${var.ptr}')
|
||||
add(debugger, category='zig.std', regex=True, type='^segmented_list\\.SegmentedList\\(.*\\)$', identifier='std_SegmentedList', synth=True, expand=True, summary='len=${var.len}')
|
||||
add(debugger, category='zig.std', regex=True, type='^multi_array_list\\.MultiArrayList\\(.*\\)$', identifier='std_MultiArrayList', synth=True, expand=True, summary='len=${var.len} capacity=${var.capacity}')
|
||||
add(debugger, category='zig.std', regex=True, type='^multi_array_list\\.MultiArrayList\\(.*\\)\\.Slice$', identifier='std_MultiArrayList_Slice', synth=True, expand=True, summary='len=${var.len} capacity=${var.capacity}')
|
||||
add(debugger, category='zig.std', regex=True, type='multi_array_list\\.MultiArrayList\\(.*\\)$', identifier='std_MultiArrayList', synth=True, expand=True, summary='len=${var.len} capacity=${var.capacity}')
|
||||
add(debugger, category='zig.std', regex=True, type='multi_array_list\\.MultiArrayList\\(.*\\)\\.Slice$', identifier='std_MultiArrayList_Slice', synth=True, expand=True, summary='len=${var.len} capacity=${var.capacity}')
|
||||
add(debugger, category='zig.std', regex=True, type=MultiArrayList_Entry('.*'), identifier='std_Entry', synth=True, inline_children=True, summary=True)
|
||||
add(debugger, category='zig.std', regex=True, type='^hash_map\\.HashMapUnmanaged\\(.*\\)$', identifier='std_HashMapUnmanaged', synth=True, expand=True, summary=True)
|
||||
add(debugger, category='zig.std', regex=True, type='^hash_map\\.HashMapUnmanaged\\(.*\\)\\.Entry$', identifier = 'std_Entry', synth=True, inline_children=True, summary=True)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"./packages/@types/bun"
|
||||
],
|
||||
"devDependencies": {
|
||||
"bun-tracestrings": "github:oven-sh/bun.report#912ca63e26c51429d3e6799aa2a6ab079b188fd8",
|
||||
"@lezer/common": "^1.2.3",
|
||||
"@lezer/cpp": "^1.1.3",
|
||||
"esbuild": "^0.21.4",
|
||||
@@ -17,7 +18,7 @@
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"source-map-js": "^1.2.0",
|
||||
"typescript": "^5.7.2"
|
||||
"typescript": "5.9.2"
|
||||
},
|
||||
"resolutions": {
|
||||
"bun-types": "workspace:packages/bun-types",
|
||||
|
||||
137
packages/bun-types/bun.d.ts
vendored
137
packages/bun-types/bun.d.ts
vendored
@@ -21,7 +21,7 @@ declare module "bun" {
|
||||
| DataView<TArrayBuffer>;
|
||||
type BufferSource = NodeJS.TypedArray | DataView | ArrayBufferLike;
|
||||
type StringOrBuffer = string | NodeJS.TypedArray | ArrayBufferLike;
|
||||
type XMLHttpRequestBodyInit = Blob | BufferSource | string | FormData | Iterable<Uint8Array>;
|
||||
type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string;
|
||||
type ReadableStreamController<T> = ReadableStreamDefaultController<T>;
|
||||
type ReadableStreamDefaultReadResult<T> =
|
||||
| ReadableStreamDefaultReadValueResult<T>
|
||||
@@ -826,7 +826,7 @@ declare module "bun" {
|
||||
buffers: Array<ArrayBufferView | ArrayBufferLike>,
|
||||
maxLength: number,
|
||||
asUint8Array: true,
|
||||
): Uint8Array;
|
||||
): Uint8Array<ArrayBuffer>;
|
||||
|
||||
/**
|
||||
* Consume all data from a {@link ReadableStream} until it closes or errors.
|
||||
@@ -843,35 +843,6 @@ declare module "bun" {
|
||||
stream: ReadableStream<ArrayBufferView | ArrayBufferLike>,
|
||||
): Promise<ArrayBuffer> | ArrayBuffer;
|
||||
|
||||
/**
|
||||
* Consume all data from a {@link ReadableStream} until it closes or errors.
|
||||
*
|
||||
* Concatenate the chunks into a single {@link ArrayBuffer}.
|
||||
*
|
||||
* Each chunk must be a TypedArray or an ArrayBuffer. If you need to support
|
||||
* chunks of different types, consider {@link readableStreamToBlob}
|
||||
*
|
||||
* @param stream The stream to consume.
|
||||
* @returns A promise that resolves with the concatenated chunks or the concatenated chunks as a {@link Uint8Array}.
|
||||
*
|
||||
* @deprecated Use {@link ReadableStream.bytes}
|
||||
*/
|
||||
function readableStreamToBytes(
|
||||
stream: ReadableStream<ArrayBufferView | ArrayBufferLike>,
|
||||
): Promise<Uint8Array> | Uint8Array;
|
||||
|
||||
/**
|
||||
* Consume all data from a {@link ReadableStream} until it closes or errors.
|
||||
*
|
||||
* Concatenate the chunks into a single {@link Blob}.
|
||||
*
|
||||
* @param stream The stream to consume.
|
||||
* @returns A promise that resolves with the concatenated chunks as a {@link Blob}.
|
||||
*
|
||||
* @deprecated Use {@link ReadableStream.blob}
|
||||
*/
|
||||
function readableStreamToBlob(stream: ReadableStream): Promise<Blob>;
|
||||
|
||||
/**
|
||||
* Consume all data from a {@link ReadableStream} until it closes or errors.
|
||||
*
|
||||
@@ -904,30 +875,6 @@ declare module "bun" {
|
||||
multipartBoundaryExcludingDashes?: string | NodeJS.TypedArray | ArrayBufferView,
|
||||
): Promise<FormData>;
|
||||
|
||||
/**
|
||||
* Consume all data from a {@link ReadableStream} until it closes or errors.
|
||||
*
|
||||
* Concatenate the chunks into a single string. Chunks must be a TypedArray or an ArrayBuffer. If you need to support chunks of different types, consider {@link readableStreamToBlob}.
|
||||
*
|
||||
* @param stream The stream to consume.
|
||||
* @returns A promise that resolves with the concatenated chunks as a {@link String}.
|
||||
*
|
||||
* @deprecated Use {@link ReadableStream.text}
|
||||
*/
|
||||
function readableStreamToText(stream: ReadableStream): Promise<string>;
|
||||
|
||||
/**
|
||||
* Consume all data from a {@link ReadableStream} until it closes or errors.
|
||||
*
|
||||
* Concatenate the chunks into a single string and parse as JSON. Chunks must be a TypedArray or an ArrayBuffer. If you need to support chunks of different types, consider {@link readableStreamToBlob}.
|
||||
*
|
||||
* @param stream The stream to consume.
|
||||
* @returns A promise that resolves with the concatenated chunks as a {@link String}.
|
||||
*
|
||||
* @deprecated Use {@link ReadableStream.json}
|
||||
*/
|
||||
function readableStreamToJSON(stream: ReadableStream): Promise<any>;
|
||||
|
||||
/**
|
||||
* Consume all data from a {@link ReadableStream} until it closes or errors.
|
||||
*
|
||||
@@ -1027,8 +974,8 @@ declare module "bun" {
|
||||
*
|
||||
* This API might change later to separate Uint8ArraySink and ArrayBufferSink
|
||||
*/
|
||||
flush(): number | Uint8Array | ArrayBuffer;
|
||||
end(): ArrayBuffer | Uint8Array;
|
||||
flush(): number | Uint8Array<ArrayBuffer> | ArrayBuffer;
|
||||
end(): ArrayBuffer | Uint8Array<ArrayBuffer>;
|
||||
}
|
||||
|
||||
/** DNS Related APIs */
|
||||
@@ -1595,13 +1542,18 @@ declare module "bun" {
|
||||
* Executes a SQL query using template literals
|
||||
* @example
|
||||
* ```ts
|
||||
* const [user] = await sql`select * from users where id = ${1}`;
|
||||
* const [user] = await sql<Users[]>`select * from users where id = ${1}`;
|
||||
* ```
|
||||
*/
|
||||
<T = any>(strings: TemplateStringsArray, ...values: unknown[]): SQL.Query<T>;
|
||||
|
||||
/**
|
||||
* Execute a SQL query using a string
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
* const users = await sql<User[]>`SELECT * FROM users WHERE id = ${1}`;
|
||||
* ```
|
||||
*/
|
||||
<T = any>(string: string): SQL.Query<T>;
|
||||
|
||||
@@ -1620,6 +1572,23 @@ declare module "bun" {
|
||||
* const result = await sql`insert into users ${sql(user)} returning *`;
|
||||
* ```
|
||||
*/
|
||||
<T extends { [Key in PropertyKey]: unknown }>(obj: T | T[] | readonly T[]): SQL.Helper<T>;
|
||||
|
||||
/**
|
||||
* Helper function for inserting an object into a query, supporting specific columns
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
* // Insert an object
|
||||
* const result = await sql`insert into users ${sql(users)} returning *`;
|
||||
*
|
||||
* // Or pick specific columns
|
||||
* const result = await sql`insert into users ${sql(users, "id", "name")} returning *`;
|
||||
*
|
||||
* // Or a single object
|
||||
* const result = await sql`insert into users ${sql(user)} returning *`;
|
||||
* ```
|
||||
*/
|
||||
<T extends { [Key in PropertyKey]: unknown }, Keys extends keyof T = keyof T>(
|
||||
obj: T | T[] | readonly T[],
|
||||
...columns: readonly Keys[]
|
||||
@@ -3682,7 +3651,7 @@ declare module "bun" {
|
||||
|
||||
/**
|
||||
* If set, the HTTP server will listen on a unix socket instead of a port.
|
||||
* (Cannot be used with hostname+port)
|
||||
* (Cannot use unix with port + hostname)
|
||||
*/
|
||||
unix?: never;
|
||||
|
||||
@@ -3705,9 +3674,21 @@ declare module "bun" {
|
||||
interface UnixServeOptions extends GenericServeOptions {
|
||||
/**
|
||||
* If set, the HTTP server will listen on a unix socket instead of a port.
|
||||
* (Cannot be used with hostname+port)
|
||||
*/
|
||||
unix: string;
|
||||
|
||||
/**
|
||||
* If set, the HTTP server will listen on this port
|
||||
* (Cannot use port with unix)
|
||||
*/
|
||||
port?: never;
|
||||
|
||||
/**
|
||||
* If set, the HTTP server will listen on this hostname
|
||||
* (Cannot use hostname with unix)
|
||||
*/
|
||||
hostname?: never;
|
||||
|
||||
/**
|
||||
* Handle HTTP requests
|
||||
*
|
||||
@@ -4635,7 +4616,7 @@ declare module "bun" {
|
||||
*
|
||||
* @param path The path to the file as a byte buffer (the buffer is copied) if the path starts with `s3://` it will behave like {@link S3File}
|
||||
*/
|
||||
function file(path: ArrayBufferLike | Uint8Array, options?: BlobPropertyBag): BunFile;
|
||||
function file(path: ArrayBufferLike | Uint8Array<ArrayBuffer>, options?: BlobPropertyBag): BunFile;
|
||||
|
||||
/**
|
||||
* [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) powered by the fastest system calls available for operating on files.
|
||||
@@ -4658,7 +4639,7 @@ declare module "bun" {
|
||||
*
|
||||
* This can be 3.5x faster than `new Uint8Array(size)`, but if you send uninitialized memory to your users (even unintentionally), it can potentially leak anything recently in memory.
|
||||
*/
|
||||
function allocUnsafe(size: number): Uint8Array;
|
||||
function allocUnsafe(size: number): Uint8Array<ArrayBuffer>;
|
||||
|
||||
/**
|
||||
* Options for `Bun.inspect`
|
||||
@@ -4941,7 +4922,7 @@ declare module "bun" {
|
||||
*
|
||||
* To close the file, set the array to `null` and it will be garbage collected eventually.
|
||||
*/
|
||||
function mmap(path: PathLike, opts?: MMapOptions): Uint8Array;
|
||||
function mmap(path: PathLike, opts?: MMapOptions): Uint8Array<ArrayBuffer>;
|
||||
|
||||
/**
|
||||
* Write to stdout
|
||||
@@ -4971,8 +4952,8 @@ declare module "bun" {
|
||||
| { r: number; g: number; b: number; a?: number }
|
||||
| [number, number, number]
|
||||
| [number, number, number, number]
|
||||
| Uint8Array
|
||||
| Uint8ClampedArray
|
||||
| Uint8Array<ArrayBuffer>
|
||||
| Uint8ClampedArray<ArrayBuffer>
|
||||
| Float32Array
|
||||
| Float64Array
|
||||
| string
|
||||
@@ -5095,7 +5076,7 @@ declare module "bun" {
|
||||
*
|
||||
* **The input buffer must not be garbage collected**. That means you will need to hold on to it for the duration of the string's lifetime.
|
||||
*/
|
||||
function arrayBufferToString(buffer: Uint8Array | ArrayBufferLike): string;
|
||||
function arrayBufferToString(buffer: Uint8Array<ArrayBuffer> | ArrayBufferLike): string;
|
||||
|
||||
/**
|
||||
* Cast bytes to a `String` without copying. This is the fastest way to get a `String` from a `Uint16Array`
|
||||
@@ -5644,9 +5625,9 @@ declare module "bun" {
|
||||
* @returns The output buffer with the compressed data
|
||||
*/
|
||||
function deflateSync(
|
||||
data: Uint8Array | string | ArrayBuffer,
|
||||
data: Uint8Array<ArrayBuffer> | string | ArrayBuffer,
|
||||
options?: ZlibCompressionOptions | LibdeflateCompressionOptions,
|
||||
): Uint8Array;
|
||||
): Uint8Array<ArrayBuffer>;
|
||||
/**
|
||||
* Compresses a chunk of data with `zlib` GZIP algorithm.
|
||||
* @param data The buffer of data to compress
|
||||
@@ -5654,27 +5635,27 @@ declare module "bun" {
|
||||
* @returns The output buffer with the compressed data
|
||||
*/
|
||||
function gzipSync(
|
||||
data: Uint8Array | string | ArrayBuffer,
|
||||
data: Uint8Array<ArrayBuffer> | string | ArrayBuffer,
|
||||
options?: ZlibCompressionOptions | LibdeflateCompressionOptions,
|
||||
): Uint8Array;
|
||||
): Uint8Array<ArrayBuffer>;
|
||||
/**
|
||||
* Decompresses a chunk of data with `zlib` INFLATE algorithm.
|
||||
* @param data The buffer of data to decompress
|
||||
* @returns The output buffer with the decompressed data
|
||||
*/
|
||||
function inflateSync(
|
||||
data: Uint8Array | string | ArrayBuffer,
|
||||
data: Uint8Array<ArrayBuffer> | string | ArrayBuffer,
|
||||
options?: ZlibCompressionOptions | LibdeflateCompressionOptions,
|
||||
): Uint8Array;
|
||||
): Uint8Array<ArrayBuffer>;
|
||||
/**
|
||||
* Decompresses a chunk of data with `zlib` GUNZIP algorithm.
|
||||
* @param data The buffer of data to decompress
|
||||
* @returns The output buffer with the decompressed data
|
||||
*/
|
||||
function gunzipSync(
|
||||
data: Uint8Array | string | ArrayBuffer,
|
||||
data: Uint8Array<ArrayBuffer> | string | ArrayBuffer,
|
||||
options?: ZlibCompressionOptions | LibdeflateCompressionOptions,
|
||||
): Uint8Array;
|
||||
): Uint8Array<ArrayBuffer>;
|
||||
|
||||
/**
|
||||
* Compresses a chunk of data with the Zstandard (zstd) compression algorithm.
|
||||
@@ -6651,7 +6632,7 @@ declare module "bun" {
|
||||
interface BinaryTypeList {
|
||||
arraybuffer: ArrayBuffer;
|
||||
buffer: Buffer;
|
||||
uint8array: Uint8Array;
|
||||
uint8array: Uint8Array<ArrayBuffer>;
|
||||
// TODO: DataView
|
||||
// dataview: DataView;
|
||||
}
|
||||
@@ -6829,6 +6810,7 @@ declare module "bun" {
|
||||
* The unix socket to listen on or connect to
|
||||
*/
|
||||
unix: string;
|
||||
|
||||
/**
|
||||
* TLS Configuration with which to create the socket
|
||||
*/
|
||||
@@ -7223,7 +7205,7 @@ declare module "bun" {
|
||||
}
|
||||
|
||||
type ReadableToIO<X extends Readable> = X extends "pipe" | undefined
|
||||
? ReadableStream<Uint8Array>
|
||||
? ReadableStream<Uint8Array<ArrayBuffer>>
|
||||
: X extends BunFile | ArrayBufferView | number
|
||||
? number
|
||||
: undefined;
|
||||
@@ -8007,7 +7989,7 @@ declare module "bun" {
|
||||
|
||||
/**
|
||||
* ```
|
||||
* INFO = { prod/dev/optional/peer dependencies, os, cpu, libc (TODO), bin, binDir }
|
||||
* INFO = { prod/dev/optional/peer dependencies, os, cpu, libc, bin, binDir }
|
||||
*
|
||||
* // first index is resolution for each type of package
|
||||
* npm -> [ "name@version", registry (TODO: remove if default), INFO, integrity]
|
||||
@@ -8043,6 +8025,7 @@ declare module "bun" {
|
||||
type BunLockFilePackageInfo = BunLockFileBasePackageInfo & {
|
||||
os?: string | string[];
|
||||
cpu?: string | string[];
|
||||
libc?: string | string[];
|
||||
bundled?: true;
|
||||
};
|
||||
|
||||
|
||||
58
packages/bun-types/deprecated.d.ts
vendored
58
packages/bun-types/deprecated.d.ts
vendored
@@ -1,4 +1,57 @@
|
||||
declare module "bun" {
|
||||
/**
|
||||
* Consume all data from a {@link ReadableStream} until it closes or errors.
|
||||
*
|
||||
* Concatenate the chunks into a single {@link ArrayBuffer}.
|
||||
*
|
||||
* Each chunk must be a TypedArray or an ArrayBuffer. If you need to support
|
||||
* chunks of different types, consider {@link readableStreamToBlob}
|
||||
*
|
||||
* @param stream The stream to consume.
|
||||
* @returns A promise that resolves with the concatenated chunks or the concatenated chunks as a {@link Uint8Array}.
|
||||
*
|
||||
* @deprecated Use {@link ReadableStream.bytes}
|
||||
*/
|
||||
function readableStreamToBytes(
|
||||
stream: ReadableStream<ArrayBufferView | ArrayBufferLike>,
|
||||
): Promise<Uint8Array<ArrayBuffer>> | Uint8Array<ArrayBuffer>;
|
||||
|
||||
/**
|
||||
* Consume all data from a {@link ReadableStream} until it closes or errors.
|
||||
*
|
||||
* Concatenate the chunks into a single {@link Blob}.
|
||||
*
|
||||
* @param stream The stream to consume.
|
||||
* @returns A promise that resolves with the concatenated chunks as a {@link Blob}.
|
||||
*
|
||||
* @deprecated Use {@link ReadableStream.blob}
|
||||
*/
|
||||
function readableStreamToBlob(stream: ReadableStream): Promise<Blob>;
|
||||
|
||||
/**
|
||||
* Consume all data from a {@link ReadableStream} until it closes or errors.
|
||||
*
|
||||
* Concatenate the chunks into a single string. Chunks must be a TypedArray or an ArrayBuffer. If you need to support chunks of different types, consider {@link readableStreamToBlob}.
|
||||
*
|
||||
* @param stream The stream to consume.
|
||||
* @returns A promise that resolves with the concatenated chunks as a {@link String}.
|
||||
*
|
||||
* @deprecated Use {@link ReadableStream.text}
|
||||
*/
|
||||
function readableStreamToText(stream: ReadableStream): Promise<string>;
|
||||
|
||||
/**
|
||||
* Consume all data from a {@link ReadableStream} until it closes or errors.
|
||||
*
|
||||
* Concatenate the chunks into a single string and parse as JSON. Chunks must be a TypedArray or an ArrayBuffer. If you need to support chunks of different types, consider {@link readableStreamToBlob}.
|
||||
*
|
||||
* @param stream The stream to consume.
|
||||
* @returns A promise that resolves with the concatenated chunks as a {@link String}.
|
||||
*
|
||||
* @deprecated Use {@link ReadableStream.json}
|
||||
*/
|
||||
function readableStreamToJSON(stream: ReadableStream): Promise<any>;
|
||||
|
||||
interface BunMessageEvent<T> {
|
||||
/**
|
||||
* @deprecated
|
||||
@@ -31,6 +84,9 @@ declare module "bun" {
|
||||
*/
|
||||
type Errorlike = ErrorLike;
|
||||
|
||||
/** @deprecated This is unused in Bun's types and may be removed in the future */
|
||||
type ShellFunction = (input: Uint8Array<ArrayBuffer>) => Uint8Array<ArrayBuffer>;
|
||||
|
||||
interface TLSOptions {
|
||||
/**
|
||||
* File path to a TLS key
|
||||
@@ -59,7 +115,7 @@ declare module "bun" {
|
||||
}
|
||||
|
||||
/** @deprecated This type is unused in Bun's declarations and may be removed in the future */
|
||||
type ReadableIO = ReadableStream<Uint8Array> | number | undefined;
|
||||
type ReadableIO = ReadableStream<Uint8Array<ArrayBuffer>> | number | undefined;
|
||||
}
|
||||
|
||||
declare namespace NodeJS {
|
||||
|
||||
22
packages/bun-types/fetch.d.ts
vendored
22
packages/bun-types/fetch.d.ts
vendored
@@ -1,19 +1,21 @@
|
||||
/*
|
||||
|
||||
This file does not declare any global types.
|
||||
|
||||
That should only happen in [./globals.d.ts](./globals.d.ts)
|
||||
so that our documentation generator can pick it up, as it
|
||||
expects all globals to be declared in one file.
|
||||
|
||||
* This file does not declare any global types.
|
||||
*
|
||||
* That should only happen in [./globals.d.ts](./globals.d.ts)
|
||||
* so that our documentation generator can pick it up, as it
|
||||
* expects all globals to be declared in one file.
|
||||
*
|
||||
* This may change in the future, which would be
|
||||
* a nice thing as it would allow us to split up
|
||||
* relevant types into their own files.
|
||||
*/
|
||||
|
||||
declare module "bun" {
|
||||
type HeadersInit = string[][] | Record<string, string | ReadonlyArray<string>> | Headers;
|
||||
type BodyInit =
|
||||
| ReadableStream
|
||||
| Bun.XMLHttpRequestBodyInit
|
||||
| URLSearchParams
|
||||
// Extras that Bun supports:
|
||||
| AsyncIterable<string | ArrayBuffer | ArrayBufferView>
|
||||
| AsyncGenerator<string | ArrayBuffer | ArrayBufferView>
|
||||
| (() => AsyncGenerator<string | ArrayBuffer | ArrayBufferView>);
|
||||
|
||||
@@ -26,7 +28,7 @@ declare module "bun" {
|
||||
? {}
|
||||
: Omit<import("undici-types").RequestInit, "body" | "headers"> & {
|
||||
body?: Bun.BodyInit | null | undefined;
|
||||
headers?: Bun.HeadersInit;
|
||||
headers?: Bun.HeadersInit | undefined;
|
||||
};
|
||||
|
||||
interface BunHeadersOverride extends LibOrFallbackHeaders {
|
||||
|
||||
10
packages/bun-types/globals.d.ts
vendored
10
packages/bun-types/globals.d.ts
vendored
@@ -999,6 +999,7 @@ interface ArrayBuffer {
|
||||
* Read-only. The length of the ArrayBuffer (in bytes).
|
||||
*/
|
||||
readonly byteLength: number;
|
||||
|
||||
/**
|
||||
* Resize an ArrayBuffer in-place.
|
||||
*/
|
||||
@@ -1008,7 +1009,6 @@ interface ArrayBuffer {
|
||||
* Returns a section of an ArrayBuffer.
|
||||
*/
|
||||
slice(begin: number, end?: number): ArrayBuffer;
|
||||
readonly [Symbol.toStringTag]: string;
|
||||
}
|
||||
|
||||
interface SharedArrayBuffer {
|
||||
@@ -1426,12 +1426,12 @@ interface Blob {
|
||||
/**
|
||||
* Returns a promise that resolves to the contents of the blob as a Uint8Array (array of bytes) its the same as `new Uint8Array(await blob.arrayBuffer())`
|
||||
*/
|
||||
bytes(): Promise<Uint8Array>;
|
||||
bytes(): Promise<Uint8Array<ArrayBuffer>>;
|
||||
|
||||
/**
|
||||
* Returns a readable stream of the blob's contents
|
||||
*/
|
||||
stream(): ReadableStream<Uint8Array>;
|
||||
stream(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
||||
}
|
||||
|
||||
declare var Blob: Bun.__internal.UseLibDomIfAvailable<
|
||||
@@ -1506,14 +1506,14 @@ interface Uint8ArrayConstructor {
|
||||
alphabet?: "base64" | "base64url";
|
||||
lastChunkHandling?: "loose" | "strict" | "stop-before-partial";
|
||||
},
|
||||
): Uint8Array;
|
||||
): Uint8Array<ArrayBuffer>;
|
||||
|
||||
/**
|
||||
* Create a new Uint8Array from a hex encoded string
|
||||
* @param hex The hex encoded string to convert to a Uint8Array
|
||||
* @returns A new Uint8Array containing the decoded data
|
||||
*/
|
||||
fromHex(hex: string): Uint8Array;
|
||||
fromHex(hex: string): Uint8Array<ArrayBuffer>;
|
||||
}
|
||||
|
||||
interface BroadcastChannel extends Bun.__internal.LibEmptyOrBroadcastChannel {}
|
||||
|
||||
5
packages/bun-types/overrides.d.ts
vendored
5
packages/bun-types/overrides.d.ts
vendored
@@ -6,14 +6,17 @@ declare module "stream/web" {
|
||||
* Consume a ReadableStream as text
|
||||
*/
|
||||
text(): Promise<string>;
|
||||
|
||||
/**
|
||||
* Consume a ReadableStream as a Uint8Array
|
||||
*/
|
||||
bytes(): Promise<Uint8Array>;
|
||||
bytes(): Promise<Uint8Array<ArrayBuffer>>;
|
||||
|
||||
/**
|
||||
* Consume a ReadableStream as JSON
|
||||
*/
|
||||
json(): Promise<any>;
|
||||
|
||||
/**
|
||||
* Consume a ReadableStream as a Blob
|
||||
*/
|
||||
|
||||
@@ -10,10 +10,11 @@
|
||||
},
|
||||
"files": [
|
||||
"./*.d.ts",
|
||||
"docs/**/*.md",
|
||||
"docs/*.md",
|
||||
"CLAUDE.md",
|
||||
"README.md"
|
||||
"./vendor/**/*.d.ts",
|
||||
"./docs/**/*.md",
|
||||
"./docs/*.md",
|
||||
"./CLAUDE.md",
|
||||
"./README.md"
|
||||
],
|
||||
"homepage": "https://bun.com",
|
||||
"dependencies": {
|
||||
@@ -23,8 +24,7 @@
|
||||
"@types/react": "^19"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^19",
|
||||
"typescript": "^5.0.2"
|
||||
"@types/react": "^19"
|
||||
},
|
||||
"scripts": {
|
||||
"prebuild": "echo $(pwd)",
|
||||
|
||||
4
packages/bun-types/s3.d.ts
vendored
4
packages/bun-types/s3.d.ts
vendored
@@ -487,8 +487,8 @@ declare module "bun" {
|
||||
* // Process text chunk by chunk
|
||||
* }
|
||||
*/
|
||||
readonly readable: ReadableStream;
|
||||
stream(): ReadableStream;
|
||||
readonly readable: ReadableStream<Uint8Array<ArrayBuffer>>;
|
||||
stream(): ReadableStream<Uint8Array<ArrayBuffer>>;
|
||||
|
||||
/**
|
||||
* The name or path of the file in the bucket.
|
||||
|
||||
6
packages/bun-types/shell.d.ts
vendored
6
packages/bun-types/shell.d.ts
vendored
@@ -1,6 +1,4 @@
|
||||
declare module "bun" {
|
||||
type ShellFunction = (input: Uint8Array) => Uint8Array;
|
||||
|
||||
type ShellExpression =
|
||||
| { toString(): string }
|
||||
| Array<ShellExpression>
|
||||
@@ -294,7 +292,7 @@ declare module "bun" {
|
||||
* console.log(output.bytes()); // Uint8Array { byteLength: 6 }
|
||||
* ```
|
||||
*/
|
||||
bytes(): Uint8Array;
|
||||
bytes(): Uint8Array<ArrayBuffer>;
|
||||
}
|
||||
|
||||
interface ShellOutput {
|
||||
@@ -361,7 +359,7 @@ declare module "bun" {
|
||||
* console.log(output.bytes()); // Uint8Array { byteLength: 6 }
|
||||
* ```
|
||||
*/
|
||||
bytes(): Uint8Array;
|
||||
bytes(): Uint8Array<ArrayBuffer>;
|
||||
|
||||
/**
|
||||
* Read from stdout as a Blob
|
||||
|
||||
25
packages/bun-types/sqlite.d.ts
vendored
25
packages/bun-types/sqlite.d.ts
vendored
@@ -383,19 +383,28 @@ declare module "bun:sqlite" {
|
||||
* ]);
|
||||
* ```
|
||||
*/
|
||||
transaction(insideTransaction: (...args: any) => void): CallableFunction & {
|
||||
transaction<A extends any[], T>(
|
||||
insideTransaction: (...args: A) => T,
|
||||
): {
|
||||
/**
|
||||
* uses "BEGIN DEFERRED"
|
||||
* Execute the transaction
|
||||
*/
|
||||
deferred: (...args: any) => void;
|
||||
(...args: A): T;
|
||||
|
||||
/**
|
||||
* uses "BEGIN IMMEDIATE"
|
||||
* Execute the transaction using "BEGIN DEFERRED"
|
||||
*/
|
||||
immediate: (...args: any) => void;
|
||||
deferred: (...args: A) => T;
|
||||
|
||||
/**
|
||||
* uses "BEGIN EXCLUSIVE"
|
||||
* Execute the transaction using "BEGIN IMMEDIATE"
|
||||
*/
|
||||
exclusive: (...args: any) => void;
|
||||
immediate: (...args: A) => T;
|
||||
|
||||
/**
|
||||
* Execute the transaction using "BEGIN EXCLUSIVE"
|
||||
*/
|
||||
exclusive: (...args: A) => T;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -664,7 +673,7 @@ declare module "bun:sqlite" {
|
||||
[Symbol.iterator](): IterableIterator<ReturnType>;
|
||||
|
||||
/**
|
||||
* Execute the prepared statement. This returns `undefined`.
|
||||
* Execute the prepared statement.
|
||||
*
|
||||
* @param params optional values to bind to the statement. If omitted, the statement is run with the last bound values or no parameters if there are none.
|
||||
*
|
||||
|
||||
1
packages/bun-types/test-globals.d.ts
vendored
1
packages/bun-types/test-globals.d.ts
vendored
@@ -10,6 +10,7 @@ declare var test: typeof import("bun:test").test;
|
||||
declare var it: typeof import("bun:test").it;
|
||||
declare var describe: typeof import("bun:test").describe;
|
||||
declare var expect: typeof import("bun:test").expect;
|
||||
declare var expectTypeOf: typeof import("bun:test").expectTypeOf;
|
||||
declare var beforeAll: typeof import("bun:test").beforeAll;
|
||||
declare var beforeEach: typeof import("bun:test").beforeEach;
|
||||
declare var afterEach: typeof import("bun:test").afterEach;
|
||||
|
||||
27
packages/bun-types/test.d.ts
vendored
27
packages/bun-types/test.d.ts
vendored
@@ -56,6 +56,11 @@ declare module "bun:test" {
|
||||
* Restore the previous value of mocks.
|
||||
*/
|
||||
restore(): void;
|
||||
|
||||
/**
|
||||
* Reset all mock function state (calls, results, etc.) without restoring their original implementation.
|
||||
*/
|
||||
clearAllMocks(): void;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1642,6 +1647,26 @@ declare module "bun:test" {
|
||||
*/
|
||||
toHaveReturnedTimes(times: number): void;
|
||||
|
||||
/**
|
||||
* Ensures that a mock function has returned a specific value.
|
||||
* This matcher uses deep equality, like toEqual(), and supports asymmetric matchers.
|
||||
*/
|
||||
toHaveReturnedWith(expected: unknown): void;
|
||||
|
||||
/**
|
||||
* Ensures that a mock function has returned a specific value on its last invocation.
|
||||
* This matcher uses deep equality, like toEqual(), and supports asymmetric matchers.
|
||||
*/
|
||||
toHaveLastReturnedWith(expected: unknown): void;
|
||||
|
||||
/**
|
||||
* Ensures that a mock function has returned a specific value on the nth invocation.
|
||||
* This matcher uses deep equality, like toEqual(), and supports asymmetric matchers.
|
||||
* @param n The 1-based index of the function call
|
||||
* @param expected The expected return value
|
||||
*/
|
||||
toHaveNthReturnedWith(n: number, expected: unknown): void;
|
||||
|
||||
/**
|
||||
* Ensures that a mock function is called.
|
||||
*/
|
||||
@@ -2182,4 +2207,6 @@ declare module "bun:test" {
|
||||
|
||||
export type UnknownFunction = (...args: unknown[]) => unknown;
|
||||
}
|
||||
|
||||
export const expectTypeOf: typeof import("./vendor/expect-type").expectTypeOf;
|
||||
}
|
||||
|
||||
283
packages/bun-types/vendor/expect-type/branding.d.ts
vendored
Normal file
283
packages/bun-types/vendor/expect-type/branding.d.ts
vendored
Normal file
@@ -0,0 +1,283 @@
|
||||
/*
|
||||
Copyright 2024 Misha Kaletsky
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
*/
|
||||
|
||||
import type { ConstructorOverloadParameters, NumOverloads, OverloadsInfoUnion } from "./overloads";
|
||||
import type {
|
||||
IsAny,
|
||||
IsNever,
|
||||
IsUnknown,
|
||||
MutuallyExtends,
|
||||
OptionalKeys,
|
||||
ReadonlyKeys,
|
||||
RequiredKeys,
|
||||
UnionToTuple,
|
||||
} from "./utils";
|
||||
/**
|
||||
* Represents a deeply branded type.
|
||||
*
|
||||
* Recursively walk a type and replace it with a branded type related to the
|
||||
* original. This is useful for equality-checking stricter than
|
||||
* `A extends B ? B extends A ? true : false : false`, because it detects the
|
||||
* difference between a few edge-case types that vanilla TypeScript
|
||||
* doesn't by default:
|
||||
* - `any` vs `unknown`
|
||||
* - `{ readonly a: string }` vs `{ a: string }`
|
||||
* - `{ a?: string }` vs `{ a: string | undefined }`
|
||||
*
|
||||
* __Note__: not very performant for complex types - this should only be used
|
||||
* when you know you need it. If doing an equality check, it's almost always
|
||||
* better to use {@linkcode StrictEqualUsingTSInternalIdenticalToOperator}.
|
||||
*/
|
||||
export type DeepBrand<T> =
|
||||
IsNever<T> extends true
|
||||
? {
|
||||
type: "never";
|
||||
}
|
||||
: IsAny<T> extends true
|
||||
? {
|
||||
type: "any";
|
||||
}
|
||||
: IsUnknown<T> extends true
|
||||
? {
|
||||
type: "unknown";
|
||||
}
|
||||
: T extends string | number | boolean | symbol | bigint | null | undefined | void
|
||||
? {
|
||||
type: "primitive";
|
||||
value: T;
|
||||
}
|
||||
: T extends new (...args: any[]) => any
|
||||
? {
|
||||
type: "constructor";
|
||||
params: ConstructorOverloadParameters<T>;
|
||||
instance: DeepBrand<InstanceType<Extract<T, new (...args: any) => any>>>;
|
||||
}
|
||||
: T extends (...args: infer P) => infer R
|
||||
? NumOverloads<T> extends 1
|
||||
? {
|
||||
type: "function";
|
||||
params: DeepBrand<P>;
|
||||
return: DeepBrand<R>;
|
||||
this: DeepBrand<ThisParameterType<T>>;
|
||||
props: DeepBrand<Omit<T, keyof Function>>;
|
||||
}
|
||||
: UnionToTuple<OverloadsInfoUnion<T>> extends infer OverloadsTuple
|
||||
? {
|
||||
type: "overloads";
|
||||
overloads: {
|
||||
[K in keyof OverloadsTuple]: DeepBrand<OverloadsTuple[K]>;
|
||||
};
|
||||
}
|
||||
: never
|
||||
: T extends any[]
|
||||
? {
|
||||
type: "array";
|
||||
items: {
|
||||
[K in keyof T]: T[K];
|
||||
};
|
||||
}
|
||||
: {
|
||||
type: "object";
|
||||
properties: {
|
||||
[K in keyof T]: DeepBrand<T[K]>;
|
||||
};
|
||||
readonly: ReadonlyKeys<T>;
|
||||
required: RequiredKeys<T>;
|
||||
optional: OptionalKeys<T>;
|
||||
constructorParams: DeepBrand<ConstructorOverloadParameters<T>>;
|
||||
};
|
||||
/**
|
||||
* Checks if two types are strictly equal using branding.
|
||||
*/
|
||||
export type StrictEqualUsingBranding<Left, Right> = MutuallyExtends<DeepBrand<Left>, DeepBrand<Right>>;
|
||||
1207
packages/bun-types/vendor/expect-type/index.d.ts
vendored
Normal file
1207
packages/bun-types/vendor/expect-type/index.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
395
packages/bun-types/vendor/expect-type/messages.d.ts
vendored
Normal file
395
packages/bun-types/vendor/expect-type/messages.d.ts
vendored
Normal file
@@ -0,0 +1,395 @@
|
||||
/*
|
||||
Copyright 2024 Misha Kaletsky
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
*/
|
||||
|
||||
import type { StrictEqualUsingBranding } from "./branding";
|
||||
import type { And, Extends, ExtendsExcludingAnyOrNever, IsAny, IsNever, IsUnknown, Not, UsefulKeys } from "./utils";
|
||||
/**
|
||||
* Determines the printable type representation for a given type.
|
||||
*/
|
||||
export type PrintType<T> =
|
||||
IsUnknown<T> extends true
|
||||
? "unknown"
|
||||
: IsNever<T> extends true
|
||||
? "never"
|
||||
: IsAny<T> extends true
|
||||
? never
|
||||
: boolean extends T
|
||||
? "boolean"
|
||||
: T extends boolean
|
||||
? `literal boolean: ${T}`
|
||||
: string extends T
|
||||
? "string"
|
||||
: T extends string
|
||||
? `literal string: ${T}`
|
||||
: number extends T
|
||||
? "number"
|
||||
: T extends number
|
||||
? `literal number: ${T}`
|
||||
: bigint extends T
|
||||
? "bigint"
|
||||
: T extends bigint
|
||||
? `literal bigint: ${T}`
|
||||
: T extends null
|
||||
? "null"
|
||||
: T extends undefined
|
||||
? "undefined"
|
||||
: T extends (...args: any[]) => any
|
||||
? "function"
|
||||
: "...";
|
||||
/**
|
||||
* Helper for showing end-user a hint why their type assertion is failing.
|
||||
* This swaps "leaf" types with a literal message about what the actual and
|
||||
* expected types are. Needs to check for `Not<IsAny<Actual>>` because
|
||||
* otherwise `LeafTypeOf<Actual>` returns `never`, which extends everything 🤔
|
||||
*/
|
||||
export type MismatchInfo<Actual, Expected> =
|
||||
And<[Extends<PrintType<Actual>, "...">, Not<IsAny<Actual>>]> extends true
|
||||
? And<[Extends<any[], Actual>, Extends<any[], Expected>]> extends true
|
||||
? Array<MismatchInfo<Extract<Actual, any[]>[number], Extract<Expected, any[]>[number]>>
|
||||
: {
|
||||
[K in UsefulKeys<Actual> | UsefulKeys<Expected>]: MismatchInfo<
|
||||
K extends keyof Actual ? Actual[K] : never,
|
||||
K extends keyof Expected ? Expected[K] : never
|
||||
>;
|
||||
}
|
||||
: StrictEqualUsingBranding<Actual, Expected> extends true
|
||||
? Actual
|
||||
: `Expected: ${PrintType<Expected>}, Actual: ${PrintType<Exclude<Actual, Expected>>}`;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const inverted: unique symbol;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
type Inverted<T> = {
|
||||
[inverted]: T;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectNull: unique symbol;
|
||||
export type ExpectNull<T> = {
|
||||
[expectNull]: T;
|
||||
result: ExtendsExcludingAnyOrNever<T, null>;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectUndefined: unique symbol;
|
||||
export type ExpectUndefined<T> = {
|
||||
[expectUndefined]: T;
|
||||
result: ExtendsExcludingAnyOrNever<T, undefined>;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectNumber: unique symbol;
|
||||
export type ExpectNumber<T> = {
|
||||
[expectNumber]: T;
|
||||
result: ExtendsExcludingAnyOrNever<T, number>;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectString: unique symbol;
|
||||
export type ExpectString<T> = {
|
||||
[expectString]: T;
|
||||
result: ExtendsExcludingAnyOrNever<T, string>;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectBoolean: unique symbol;
|
||||
export type ExpectBoolean<T> = {
|
||||
[expectBoolean]: T;
|
||||
result: ExtendsExcludingAnyOrNever<T, boolean>;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectVoid: unique symbol;
|
||||
export type ExpectVoid<T> = {
|
||||
[expectVoid]: T;
|
||||
result: ExtendsExcludingAnyOrNever<T, void>;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectFunction: unique symbol;
|
||||
export type ExpectFunction<T> = {
|
||||
[expectFunction]: T;
|
||||
result: ExtendsExcludingAnyOrNever<T, (...args: any[]) => any>;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectObject: unique symbol;
|
||||
export type ExpectObject<T> = {
|
||||
[expectObject]: T;
|
||||
result: ExtendsExcludingAnyOrNever<T, object>;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectArray: unique symbol;
|
||||
export type ExpectArray<T> = {
|
||||
[expectArray]: T;
|
||||
result: ExtendsExcludingAnyOrNever<T, any[]>;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectSymbol: unique symbol;
|
||||
export type ExpectSymbol<T> = {
|
||||
[expectSymbol]: T;
|
||||
result: ExtendsExcludingAnyOrNever<T, symbol>;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectAny: unique symbol;
|
||||
export type ExpectAny<T> = {
|
||||
[expectAny]: T;
|
||||
result: IsAny<T>;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectUnknown: unique symbol;
|
||||
export type ExpectUnknown<T> = {
|
||||
[expectUnknown]: T;
|
||||
result: IsUnknown<T>;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectNever: unique symbol;
|
||||
export type ExpectNever<T> = {
|
||||
[expectNever]: T;
|
||||
result: IsNever<T>;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectNullable: unique symbol;
|
||||
export type ExpectNullable<T> = {
|
||||
[expectNullable]: T;
|
||||
result: Not<StrictEqualUsingBranding<T, NonNullable<T>>>;
|
||||
};
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const expectBigInt: unique symbol;
|
||||
export type ExpectBigInt<T> = {
|
||||
[expectBigInt]: T;
|
||||
result: ExtendsExcludingAnyOrNever<T, bigint>;
|
||||
};
|
||||
/**
|
||||
* Checks if the result of an expecter matches the specified options, and
|
||||
* resolves to a fairly readable error message if not.
|
||||
*/
|
||||
export type Scolder<
|
||||
Expecter extends {
|
||||
result: boolean;
|
||||
},
|
||||
Options extends {
|
||||
positive: boolean;
|
||||
},
|
||||
> = Expecter["result"] extends Options["positive"]
|
||||
? () => true
|
||||
: Options["positive"] extends true
|
||||
? Expecter
|
||||
: Inverted<Expecter>;
|
||||
export {};
|
||||
669
packages/bun-types/vendor/expect-type/overloads.d.ts
vendored
Normal file
669
packages/bun-types/vendor/expect-type/overloads.d.ts
vendored
Normal file
@@ -0,0 +1,669 @@
|
||||
/*
|
||||
Copyright 2024 Misha Kaletsky
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
*/
|
||||
|
||||
import type {
|
||||
IsNever,
|
||||
StrictEqualUsingTSInternalIdenticalToOperator,
|
||||
UnionToIntersection,
|
||||
UnionToTuple,
|
||||
} from "./utils";
|
||||
/**
|
||||
* The simple(ish) way to get overload info from a function
|
||||
* {@linkcode FunctionType}. Recent versions of TypeScript will match any
|
||||
* function against a generic 10-overload type, filling in slots with
|
||||
* duplicates of the function. So, we can just match against a single type
|
||||
* and get all the overloads.
|
||||
*
|
||||
* For older versions of TypeScript, we'll need to painstakingly do
|
||||
* ten separate matches.
|
||||
*/
|
||||
export type TSPost53OverloadsInfoUnion<FunctionType> = FunctionType extends {
|
||||
(...args: infer A1): infer R1;
|
||||
(...args: infer A2): infer R2;
|
||||
(...args: infer A3): infer R3;
|
||||
(...args: infer A4): infer R4;
|
||||
(...args: infer A5): infer R5;
|
||||
(...args: infer A6): infer R6;
|
||||
(...args: infer A7): infer R7;
|
||||
(...args: infer A8): infer R8;
|
||||
(...args: infer A9): infer R9;
|
||||
(...args: infer A10): infer R10;
|
||||
}
|
||||
?
|
||||
| ((...p: A1) => R1)
|
||||
| ((...p: A2) => R2)
|
||||
| ((...p: A3) => R3)
|
||||
| ((...p: A4) => R4)
|
||||
| ((...p: A5) => R5)
|
||||
| ((...p: A6) => R6)
|
||||
| ((...p: A7) => R7)
|
||||
| ((...p: A8) => R8)
|
||||
| ((...p: A9) => R9)
|
||||
| ((...p: A10) => R10)
|
||||
: never;
|
||||
/**
|
||||
* A function with `unknown` parameters and return type.
|
||||
*/
|
||||
export type UnknownFunction = (...args: unknown[]) => unknown;
|
||||
/**
|
||||
* `true` iff {@linkcode FunctionType} is
|
||||
* equivalent to `(...args: unknown[]) => unknown`,
|
||||
* which is what an overload variant looks like for a non-existent overload.
|
||||
* This is useful because older versions of TypeScript end up with
|
||||
* 9 "useless" overloads and one real one for parameterless/generic functions.
|
||||
*
|
||||
* @see {@link https://github.com/microsoft/TypeScript/issues/28867 | Related}
|
||||
*/
|
||||
export type IsUselessOverloadInfo<FunctionType> = StrictEqualUsingTSInternalIdenticalToOperator<
|
||||
FunctionType,
|
||||
UnknownFunction
|
||||
>;
|
||||
/**
|
||||
* Old versions of TypeScript can sometimes seem to refuse to separate out
|
||||
* union members unless you put them each in a pointless tuple and add an
|
||||
* extra `infer X` expression. There may be a better way to work around this
|
||||
* problem, but since it's not a problem in newer versions of TypeScript,
|
||||
* it's not a priority right now.
|
||||
*/
|
||||
export type Tuplify<Union> = Union extends infer X ? [X] : never;
|
||||
/**
|
||||
* For older versions of TypeScript, we need two separate workarounds
|
||||
* to get overload info. First, we need need to use
|
||||
* {@linkcode DecreasingOverloadsInfoUnion} to get the overload info for
|
||||
* functions with 1-10 overloads. Then, we need to filter out the
|
||||
* "useless" overloads that are present in older versions of TypeScript,
|
||||
* for parameterless functions. To do this we use
|
||||
* {@linkcode IsUselessOverloadInfo} to remove useless overloads.
|
||||
*
|
||||
* @see {@link https://github.com/microsoft/TypeScript/issues/28867 | Related}
|
||||
*/
|
||||
export type TSPre53OverloadsInfoUnion<FunctionType> =
|
||||
Tuplify<DecreasingOverloadsInfoUnion<FunctionType>> extends infer Tup
|
||||
? Tup extends [infer Fn]
|
||||
? IsUselessOverloadInfo<Fn> extends true
|
||||
? never
|
||||
: Fn
|
||||
: never
|
||||
: never;
|
||||
/**
|
||||
* For versions of TypeScript below 5.3, we need to check for 10 overloads,
|
||||
* then 9, then 8, etc., to get a union of the overload variants.
|
||||
*/
|
||||
export type DecreasingOverloadsInfoUnion<F> = F extends {
|
||||
(...args: infer A1): infer R1;
|
||||
(...args: infer A2): infer R2;
|
||||
(...args: infer A3): infer R3;
|
||||
(...args: infer A4): infer R4;
|
||||
(...args: infer A5): infer R5;
|
||||
(...args: infer A6): infer R6;
|
||||
(...args: infer A7): infer R7;
|
||||
(...args: infer A8): infer R8;
|
||||
(...args: infer A9): infer R9;
|
||||
(...args: infer A10): infer R10;
|
||||
}
|
||||
?
|
||||
| ((...p: A1) => R1)
|
||||
| ((...p: A2) => R2)
|
||||
| ((...p: A3) => R3)
|
||||
| ((...p: A4) => R4)
|
||||
| ((...p: A5) => R5)
|
||||
| ((...p: A6) => R6)
|
||||
| ((...p: A7) => R7)
|
||||
| ((...p: A8) => R8)
|
||||
| ((...p: A9) => R9)
|
||||
| ((...p: A10) => R10)
|
||||
: F extends {
|
||||
(...args: infer A1): infer R1;
|
||||
(...args: infer A2): infer R2;
|
||||
(...args: infer A3): infer R3;
|
||||
(...args: infer A4): infer R4;
|
||||
(...args: infer A5): infer R5;
|
||||
(...args: infer A6): infer R6;
|
||||
(...args: infer A7): infer R7;
|
||||
(...args: infer A8): infer R8;
|
||||
(...args: infer A9): infer R9;
|
||||
}
|
||||
?
|
||||
| ((...p: A1) => R1)
|
||||
| ((...p: A2) => R2)
|
||||
| ((...p: A3) => R3)
|
||||
| ((...p: A4) => R4)
|
||||
| ((...p: A5) => R5)
|
||||
| ((...p: A6) => R6)
|
||||
| ((...p: A7) => R7)
|
||||
| ((...p: A8) => R8)
|
||||
| ((...p: A9) => R9)
|
||||
: F extends {
|
||||
(...args: infer A1): infer R1;
|
||||
(...args: infer A2): infer R2;
|
||||
(...args: infer A3): infer R3;
|
||||
(...args: infer A4): infer R4;
|
||||
(...args: infer A5): infer R5;
|
||||
(...args: infer A6): infer R6;
|
||||
(...args: infer A7): infer R7;
|
||||
(...args: infer A8): infer R8;
|
||||
}
|
||||
?
|
||||
| ((...p: A1) => R1)
|
||||
| ((...p: A2) => R2)
|
||||
| ((...p: A3) => R3)
|
||||
| ((...p: A4) => R4)
|
||||
| ((...p: A5) => R5)
|
||||
| ((...p: A6) => R6)
|
||||
| ((...p: A7) => R7)
|
||||
| ((...p: A8) => R8)
|
||||
: F extends {
|
||||
(...args: infer A1): infer R1;
|
||||
(...args: infer A2): infer R2;
|
||||
(...args: infer A3): infer R3;
|
||||
(...args: infer A4): infer R4;
|
||||
(...args: infer A5): infer R5;
|
||||
(...args: infer A6): infer R6;
|
||||
(...args: infer A7): infer R7;
|
||||
}
|
||||
?
|
||||
| ((...p: A1) => R1)
|
||||
| ((...p: A2) => R2)
|
||||
| ((...p: A3) => R3)
|
||||
| ((...p: A4) => R4)
|
||||
| ((...p: A5) => R5)
|
||||
| ((...p: A6) => R6)
|
||||
| ((...p: A7) => R7)
|
||||
: F extends {
|
||||
(...args: infer A1): infer R1;
|
||||
(...args: infer A2): infer R2;
|
||||
(...args: infer A3): infer R3;
|
||||
(...args: infer A4): infer R4;
|
||||
(...args: infer A5): infer R5;
|
||||
(...args: infer A6): infer R6;
|
||||
}
|
||||
?
|
||||
| ((...p: A1) => R1)
|
||||
| ((...p: A2) => R2)
|
||||
| ((...p: A3) => R3)
|
||||
| ((...p: A4) => R4)
|
||||
| ((...p: A5) => R5)
|
||||
| ((...p: A6) => R6)
|
||||
: F extends {
|
||||
(...args: infer A1): infer R1;
|
||||
(...args: infer A2): infer R2;
|
||||
(...args: infer A3): infer R3;
|
||||
(...args: infer A4): infer R4;
|
||||
(...args: infer A5): infer R5;
|
||||
}
|
||||
? ((...p: A1) => R1) | ((...p: A2) => R2) | ((...p: A3) => R3) | ((...p: A4) => R4) | ((...p: A5) => R5)
|
||||
: F extends {
|
||||
(...args: infer A1): infer R1;
|
||||
(...args: infer A2): infer R2;
|
||||
(...args: infer A3): infer R3;
|
||||
(...args: infer A4): infer R4;
|
||||
}
|
||||
? ((...p: A1) => R1) | ((...p: A2) => R2) | ((...p: A3) => R3) | ((...p: A4) => R4)
|
||||
: F extends {
|
||||
(...args: infer A1): infer R1;
|
||||
(...args: infer A2): infer R2;
|
||||
(...args: infer A3): infer R3;
|
||||
}
|
||||
? ((...p: A1) => R1) | ((...p: A2) => R2) | ((...p: A3) => R3)
|
||||
: F extends {
|
||||
(...args: infer A1): infer R1;
|
||||
(...args: infer A2): infer R2;
|
||||
}
|
||||
? ((...p: A1) => R1) | ((...p: A2) => R2)
|
||||
: F extends (...args: infer A1) => infer R1
|
||||
? (...p: A1) => R1
|
||||
: never;
|
||||
/**
|
||||
* Get a union of overload variants for a function {@linkcode FunctionType}.
|
||||
* Does a check for whether we can do the one-shot
|
||||
* 10-overload matcher (which works for ts\>5.3), and if not,
|
||||
* falls back to the more complicated utility.
|
||||
*/
|
||||
export type OverloadsInfoUnion<FunctionType> =
|
||||
IsNever<TSPost53OverloadsInfoUnion<(a: 1) => 2>> extends true
|
||||
? TSPre53OverloadsInfoUnion<FunctionType>
|
||||
: TSPost53OverloadsInfoUnion<FunctionType>;
|
||||
/**
|
||||
* Allows inferring any function using the `infer` keyword.
|
||||
*/
|
||||
export type InferFunctionType<FunctionType extends (...args: any) => any> = FunctionType;
|
||||
/**
|
||||
* A union type of the parameters allowed for any
|
||||
* overload of function {@linkcode FunctionType}.
|
||||
*/
|
||||
export type OverloadParameters<FunctionType> =
|
||||
OverloadsInfoUnion<FunctionType> extends InferFunctionType<infer Fn> ? Parameters<Fn> : never;
|
||||
/**
|
||||
* A union type of the return types for any overload of
|
||||
* function {@linkcode FunctionType}.
|
||||
*/
|
||||
export type OverloadReturnTypes<FunctionType> =
|
||||
OverloadsInfoUnion<FunctionType> extends InferFunctionType<infer Fn> ? ReturnType<Fn> : never;
|
||||
/**
|
||||
* Takes an overload variants {@linkcode Union},
|
||||
* produced from {@linkcode OverloadsInfoUnion} and rejects
|
||||
* the ones incompatible with parameters {@linkcode Args}.
|
||||
*/
|
||||
export type SelectOverloadsInfo<Union extends UnknownFunction, Args extends unknown[]> =
|
||||
Union extends InferFunctionType<infer Fn> ? (Args extends Parameters<Fn> ? Fn : never) : never;
|
||||
/**
|
||||
* Creates a new overload (an intersection type) from an existing one,
|
||||
* which only includes variant(s) which can accept
|
||||
* {@linkcode Args} as parameters.
|
||||
*/
|
||||
export type OverloadsNarrowedByParameters<
|
||||
FunctionType,
|
||||
Args extends OverloadParameters<FunctionType>,
|
||||
> = UnionToIntersection<SelectOverloadsInfo<OverloadsInfoUnion<FunctionType>, Args>>;
|
||||
/**
|
||||
* The simple(ish) way to get overload info from a constructor
|
||||
* {@linkcode ConstructorType}. Recent versions of TypeScript will match any
|
||||
* constructor against a generic 10-overload type, filling in slots with
|
||||
* duplicates of the constructor. So, we can just match against a single type
|
||||
* and get all the overloads.
|
||||
*
|
||||
* For older versions of TypeScript,
|
||||
* we'll need to painstakingly do ten separate matches.
|
||||
*/
|
||||
export type TSPost53ConstructorOverloadsInfoUnion<ConstructorType> = ConstructorType extends {
|
||||
new (...args: infer A1): infer R1;
|
||||
new (...args: infer A2): infer R2;
|
||||
new (...args: infer A3): infer R3;
|
||||
new (...args: infer A4): infer R4;
|
||||
new (...args: infer A5): infer R5;
|
||||
new (...args: infer A6): infer R6;
|
||||
new (...args: infer A7): infer R7;
|
||||
new (...args: infer A8): infer R8;
|
||||
new (...args: infer A9): infer R9;
|
||||
new (...args: infer A10): infer R10;
|
||||
}
|
||||
?
|
||||
| (new (...p: A1) => R1)
|
||||
| (new (...p: A2) => R2)
|
||||
| (new (...p: A3) => R3)
|
||||
| (new (...p: A4) => R4)
|
||||
| (new (...p: A5) => R5)
|
||||
| (new (...p: A6) => R6)
|
||||
| (new (...p: A7) => R7)
|
||||
| (new (...p: A8) => R8)
|
||||
| (new (...p: A9) => R9)
|
||||
| (new (...p: A10) => R10)
|
||||
: never;
|
||||
/**
|
||||
* A constructor function with `unknown` parameters and return type.
|
||||
*/
|
||||
export type UnknownConstructor = new (...args: unknown[]) => unknown;
|
||||
/**
|
||||
* Same as {@linkcode IsUselessOverloadInfo}, but for constructors.
|
||||
*/
|
||||
export type IsUselessConstructorOverloadInfo<FunctionType> = StrictEqualUsingTSInternalIdenticalToOperator<
|
||||
FunctionType,
|
||||
UnknownConstructor
|
||||
>;
|
||||
/**
|
||||
* For older versions of TypeScript, we need two separate workarounds to
|
||||
* get constructor overload info. First, we need need to use
|
||||
* {@linkcode DecreasingConstructorOverloadsInfoUnion} to get the overload
|
||||
* info for constructors with 1-10 overloads. Then, we need to filter out the
|
||||
* "useless" overloads that are present in older versions of TypeScript,
|
||||
* for parameterless constructors. To do this we use
|
||||
* {@linkcode IsUselessConstructorOverloadInfo} to remove useless overloads.
|
||||
*
|
||||
* @see {@link https://github.com/microsoft/TypeScript/issues/28867 | Related}
|
||||
*/
|
||||
export type TSPre53ConstructorOverloadsInfoUnion<ConstructorType> =
|
||||
Tuplify<DecreasingConstructorOverloadsInfoUnion<ConstructorType>> extends infer Tup
|
||||
? Tup extends [infer Ctor]
|
||||
? IsUselessConstructorOverloadInfo<Ctor> extends true
|
||||
? never
|
||||
: Ctor
|
||||
: never
|
||||
: never;
|
||||
/**
|
||||
* For versions of TypeScript below 5.3, we need to check for 10 overloads,
|
||||
* then 9, then 8, etc., to get a union of the overload variants.
|
||||
*/
|
||||
export type DecreasingConstructorOverloadsInfoUnion<ConstructorType> = ConstructorType extends {
|
||||
new (...args: infer A1): infer R1;
|
||||
new (...args: infer A2): infer R2;
|
||||
new (...args: infer A3): infer R3;
|
||||
new (...args: infer A4): infer R4;
|
||||
new (...args: infer A5): infer R5;
|
||||
new (...args: infer A6): infer R6;
|
||||
new (...args: infer A7): infer R7;
|
||||
new (...args: infer A8): infer R8;
|
||||
new (...args: infer A9): infer R9;
|
||||
new (...args: infer A10): infer R10;
|
||||
}
|
||||
?
|
||||
| (new (...p: A1) => R1)
|
||||
| (new (...p: A2) => R2)
|
||||
| (new (...p: A3) => R3)
|
||||
| (new (...p: A4) => R4)
|
||||
| (new (...p: A5) => R5)
|
||||
| (new (...p: A6) => R6)
|
||||
| (new (...p: A7) => R7)
|
||||
| (new (...p: A8) => R8)
|
||||
| (new (...p: A9) => R9)
|
||||
| (new (...p: A10) => R10)
|
||||
: ConstructorType extends {
|
||||
new (...args: infer A1): infer R1;
|
||||
new (...args: infer A2): infer R2;
|
||||
new (...args: infer A3): infer R3;
|
||||
new (...args: infer A4): infer R4;
|
||||
new (...args: infer A5): infer R5;
|
||||
new (...args: infer A6): infer R6;
|
||||
new (...args: infer A7): infer R7;
|
||||
new (...args: infer A8): infer R8;
|
||||
new (...args: infer A9): infer R9;
|
||||
}
|
||||
?
|
||||
| (new (...p: A1) => R1)
|
||||
| (new (...p: A2) => R2)
|
||||
| (new (...p: A3) => R3)
|
||||
| (new (...p: A4) => R4)
|
||||
| (new (...p: A5) => R5)
|
||||
| (new (...p: A6) => R6)
|
||||
| (new (...p: A7) => R7)
|
||||
| (new (...p: A8) => R8)
|
||||
| (new (...p: A9) => R9)
|
||||
: ConstructorType extends {
|
||||
new (...args: infer A1): infer R1;
|
||||
new (...args: infer A2): infer R2;
|
||||
new (...args: infer A3): infer R3;
|
||||
new (...args: infer A4): infer R4;
|
||||
new (...args: infer A5): infer R5;
|
||||
new (...args: infer A6): infer R6;
|
||||
new (...args: infer A7): infer R7;
|
||||
new (...args: infer A8): infer R8;
|
||||
}
|
||||
?
|
||||
| (new (...p: A1) => R1)
|
||||
| (new (...p: A2) => R2)
|
||||
| (new (...p: A3) => R3)
|
||||
| (new (...p: A4) => R4)
|
||||
| (new (...p: A5) => R5)
|
||||
| (new (...p: A6) => R6)
|
||||
| (new (...p: A7) => R7)
|
||||
| (new (...p: A8) => R8)
|
||||
: ConstructorType extends {
|
||||
new (...args: infer A1): infer R1;
|
||||
new (...args: infer A2): infer R2;
|
||||
new (...args: infer A3): infer R3;
|
||||
new (...args: infer A4): infer R4;
|
||||
new (...args: infer A5): infer R5;
|
||||
new (...args: infer A6): infer R6;
|
||||
new (...args: infer A7): infer R7;
|
||||
}
|
||||
?
|
||||
| (new (...p: A1) => R1)
|
||||
| (new (...p: A2) => R2)
|
||||
| (new (...p: A3) => R3)
|
||||
| (new (...p: A4) => R4)
|
||||
| (new (...p: A5) => R5)
|
||||
| (new (...p: A6) => R6)
|
||||
| (new (...p: A7) => R7)
|
||||
: ConstructorType extends {
|
||||
new (...args: infer A1): infer R1;
|
||||
new (...args: infer A2): infer R2;
|
||||
new (...args: infer A3): infer R3;
|
||||
new (...args: infer A4): infer R4;
|
||||
new (...args: infer A5): infer R5;
|
||||
new (...args: infer A6): infer R6;
|
||||
}
|
||||
?
|
||||
| (new (...p: A1) => R1)
|
||||
| (new (...p: A2) => R2)
|
||||
| (new (...p: A3) => R3)
|
||||
| (new (...p: A4) => R4)
|
||||
| (new (...p: A5) => R5)
|
||||
| (new (...p: A6) => R6)
|
||||
: ConstructorType extends {
|
||||
new (...args: infer A1): infer R1;
|
||||
new (...args: infer A2): infer R2;
|
||||
new (...args: infer A3): infer R3;
|
||||
new (...args: infer A4): infer R4;
|
||||
new (...args: infer A5): infer R5;
|
||||
}
|
||||
?
|
||||
| (new (...p: A1) => R1)
|
||||
| (new (...p: A2) => R2)
|
||||
| (new (...p: A3) => R3)
|
||||
| (new (...p: A4) => R4)
|
||||
| (new (...p: A5) => R5)
|
||||
: ConstructorType extends {
|
||||
new (...args: infer A1): infer R1;
|
||||
new (...args: infer A2): infer R2;
|
||||
new (...args: infer A3): infer R3;
|
||||
new (...args: infer A4): infer R4;
|
||||
}
|
||||
? (new (...p: A1) => R1) | (new (...p: A2) => R2) | (new (...p: A3) => R3) | (new (...p: A4) => R4)
|
||||
: ConstructorType extends {
|
||||
new (...args: infer A1): infer R1;
|
||||
new (...args: infer A2): infer R2;
|
||||
new (...args: infer A3): infer R3;
|
||||
}
|
||||
? (new (...p: A1) => R1) | (new (...p: A2) => R2) | (new (...p: A3) => R3)
|
||||
: ConstructorType extends {
|
||||
new (...args: infer A1): infer R1;
|
||||
new (...args: infer A2): infer R2;
|
||||
}
|
||||
? (new (...p: A1) => R1) | (new (...p: A2) => R2)
|
||||
: ConstructorType extends new (...args: infer A1) => infer R1
|
||||
? new (...p: A1) => R1
|
||||
: never;
|
||||
/**
|
||||
* Get a union of overload variants for a constructor
|
||||
* {@linkcode ConstructorType}. Does a check for whether we can do the
|
||||
* one-shot 10-overload matcher (which works for ts\>5.3), and if not,
|
||||
* falls back to the more complicated utility.
|
||||
*/
|
||||
export type ConstructorOverloadsUnion<ConstructorType> =
|
||||
IsNever<TSPost53ConstructorOverloadsInfoUnion<new (a: 1) => any>> extends true
|
||||
? TSPre53ConstructorOverloadsInfoUnion<ConstructorType>
|
||||
: TSPost53ConstructorOverloadsInfoUnion<ConstructorType>;
|
||||
/**
|
||||
* Allows inferring any constructor using the `infer` keyword.
|
||||
*/
|
||||
export type InferConstructor<ConstructorType extends new (...args: any) => any> = ConstructorType;
|
||||
/**
|
||||
* A union type of the parameters allowed for any overload
|
||||
* of constructor {@linkcode ConstructorType}.
|
||||
*/
|
||||
export type ConstructorOverloadParameters<ConstructorType> =
|
||||
ConstructorOverloadsUnion<ConstructorType> extends InferConstructor<infer Ctor> ? ConstructorParameters<Ctor> : never;
|
||||
/**
|
||||
* Calculates the number of overloads for a given function type.
|
||||
*/
|
||||
export type NumOverloads<FunctionType> = UnionToTuple<OverloadsInfoUnion<FunctionType>>["length"];
|
||||
431
packages/bun-types/vendor/expect-type/utils.d.ts
vendored
Normal file
431
packages/bun-types/vendor/expect-type/utils.d.ts
vendored
Normal file
@@ -0,0 +1,431 @@
|
||||
/*
|
||||
Copyright 2024 Misha Kaletsky
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
*/
|
||||
|
||||
/**
|
||||
* Negates a boolean type.
|
||||
*/
|
||||
export type Not<T extends boolean> = T extends true ? false : true;
|
||||
/**
|
||||
* Returns `true` if at least one of the types in the
|
||||
* {@linkcode Types} array is `true`, otherwise returns `false`.
|
||||
*/
|
||||
export type Or<Types extends boolean[]> = Types[number] extends false ? false : true;
|
||||
/**
|
||||
* Checks if all the boolean types in the {@linkcode Types} array are `true`.
|
||||
*/
|
||||
export type And<Types extends boolean[]> = Types[number] extends true ? true : false;
|
||||
/**
|
||||
* Represents an equality type that returns {@linkcode Right} if
|
||||
* {@linkcode Left} is `true`,
|
||||
* otherwise returns the negation of {@linkcode Right}.
|
||||
*/
|
||||
export type Eq<Left extends boolean, Right extends boolean> = Left extends true ? Right : Not<Right>;
|
||||
/**
|
||||
* Represents the exclusive OR operation on a tuple of boolean types.
|
||||
* Returns `true` if exactly one of the boolean types is `true`,
|
||||
* otherwise returns `false`.
|
||||
*/
|
||||
export type Xor<Types extends [boolean, boolean]> = Not<Eq<Types[0], Types[1]>>;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const secret: unique symbol;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
type Secret = typeof secret;
|
||||
/**
|
||||
* Checks if the given type is `never`.
|
||||
*/
|
||||
export type IsNever<T> = [T] extends [never] ? true : false;
|
||||
/**
|
||||
* Checks if the given type is `any`.
|
||||
*/
|
||||
export type IsAny<T> = [T] extends [Secret] ? Not<IsNever<T>> : false;
|
||||
/**
|
||||
* Determines if the given type is `unknown`.
|
||||
*/
|
||||
export type IsUnknown<T> = [unknown] extends [T] ? Not<IsAny<T>> : false;
|
||||
/**
|
||||
* Determines if a type is either `never` or `any`.
|
||||
*/
|
||||
export type IsNeverOrAny<T> = Or<[IsNever<T>, IsAny<T>]>;
|
||||
/**
|
||||
* Subjective "useful" keys from a type. For objects it's just `keyof` but for
|
||||
* tuples/arrays it's the number keys.
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
* UsefulKeys<{ a: 1; b: 2 }> // 'a' | 'b'
|
||||
*
|
||||
* UsefulKeys<['a', 'b']> // '0' | '1'
|
||||
*
|
||||
* UsefulKeys<string[]> // number
|
||||
* ```
|
||||
*/
|
||||
export type UsefulKeys<T> = T extends any[]
|
||||
? {
|
||||
[K in keyof T]: K;
|
||||
}[number]
|
||||
: keyof T;
|
||||
/**
|
||||
* Extracts the keys from a type that are required (not optional).
|
||||
*/
|
||||
export type RequiredKeys<T> = Extract<
|
||||
{
|
||||
[K in keyof T]-?: {} extends Pick<T, K> ? never : K;
|
||||
}[keyof T],
|
||||
keyof T
|
||||
>;
|
||||
/**
|
||||
* Gets the keys of an object type that are optional.
|
||||
*/
|
||||
export type OptionalKeys<T> = Exclude<keyof T, RequiredKeys<T>>;
|
||||
/**
|
||||
* Extracts the keys from a type that are not `readonly`.
|
||||
*/
|
||||
export type ReadonlyKeys<T> = Extract<
|
||||
{
|
||||
[K in keyof T]-?: ReadonlyEquivalent<
|
||||
{
|
||||
[_K in K]: T[K];
|
||||
},
|
||||
{
|
||||
-readonly [_K in K]: T[K];
|
||||
}
|
||||
> extends true
|
||||
? never
|
||||
: K;
|
||||
}[keyof T],
|
||||
keyof T
|
||||
>;
|
||||
/**
|
||||
* Determines if two types, are equivalent in a `readonly` manner.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
type ReadonlyEquivalent<X, Y> = Extends<<T>() => T extends X ? true : false, <T>() => T extends Y ? true : false>;
|
||||
/**
|
||||
* Checks if one type extends another. Note: this is not quite the same as `Left extends Right` because:
|
||||
* 1. If either type is `never`, the result is `true` iff the other type is also `never`.
|
||||
* 2. Types are wrapped in a 1-tuple so that union types are not distributed - instead we consider `string | number` to _not_ extend `number`. If we used `Left extends Right` directly you would get `Extends<string | number, number>` => `false | true` => `boolean`.
|
||||
*/
|
||||
export type Extends<Left, Right> = IsNever<Left> extends true ? IsNever<Right> : [Left] extends [Right] ? true : false;
|
||||
/**
|
||||
* Checks if the {@linkcode Left} type extends the {@linkcode Right} type,
|
||||
* excluding `any` or `never`.
|
||||
*/
|
||||
export type ExtendsExcludingAnyOrNever<Left, Right> = IsAny<Left> extends true ? IsAny<Right> : Extends<Left, Right>;
|
||||
/**
|
||||
* Checks if two types are strictly equal using
|
||||
* the TypeScript internal identical-to operator.
|
||||
*
|
||||
* @see {@link https://github.com/microsoft/TypeScript/issues/55188#issuecomment-1656328122 | much history}
|
||||
*/
|
||||
export type StrictEqualUsingTSInternalIdenticalToOperator<L, R> =
|
||||
(<T>() => T extends (L & T) | T ? true : false) extends <T>() => T extends (R & T) | T ? true : false
|
||||
? IsNever<L> extends IsNever<R>
|
||||
? true
|
||||
: false
|
||||
: false;
|
||||
/**
|
||||
* Checks that {@linkcode Left} and {@linkcode Right} extend each other.
|
||||
* Not quite the same as an equality check since `any` can make it resolve
|
||||
* to `true`. So should only be used when {@linkcode Left} and
|
||||
* {@linkcode Right} are known to avoid `any`.
|
||||
*/
|
||||
export type MutuallyExtends<Left, Right> = And<[Extends<Left, Right>, Extends<Right, Left>]>;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
declare const mismatch: unique symbol;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
type Mismatch = {
|
||||
[mismatch]: "mismatch";
|
||||
};
|
||||
/**
|
||||
* A type which should match anything passed as a value but *doesn't*
|
||||
* match {@linkcode Mismatch}. It helps TypeScript select the right overload
|
||||
* for {@linkcode PositiveExpectTypeOf.toEqualTypeOf | .toEqualTypeOf()} and
|
||||
* {@linkcode PositiveExpectTypeOf.toMatchTypeOf | .toMatchTypeOf()}.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
declare const avalue: unique symbol;
|
||||
/**
|
||||
* Represents a value that can be of various types.
|
||||
*/
|
||||
export type AValue =
|
||||
| {
|
||||
[avalue]?: undefined;
|
||||
}
|
||||
| string
|
||||
| number
|
||||
| boolean
|
||||
| symbol
|
||||
| bigint
|
||||
| null
|
||||
| undefined
|
||||
| void;
|
||||
/**
|
||||
* Represents the type of mismatched arguments between
|
||||
* the actual result and the expected result.
|
||||
*
|
||||
* If {@linkcode ActualResult} and {@linkcode ExpectedResult} are equivalent,
|
||||
* the type resolves to an empty tuple `[]`, indicating no mismatch.
|
||||
* If they are not equivalent, it resolves to a tuple containing the element
|
||||
* {@linkcode Mismatch}, signifying a discrepancy between
|
||||
* the expected and actual results.
|
||||
*/
|
||||
export type MismatchArgs<ActualResult extends boolean, ExpectedResult extends boolean> =
|
||||
Eq<ActualResult, ExpectedResult> extends true ? [] : [Mismatch];
|
||||
/**
|
||||
* Represents the options for the {@linkcode ExpectTypeOf} function.
|
||||
*/
|
||||
export interface ExpectTypeOfOptions {
|
||||
positive: boolean;
|
||||
branded: boolean;
|
||||
}
|
||||
/**
|
||||
* Convert a union to an intersection.
|
||||
* `A | B | C` -\> `A & B & C`
|
||||
*/
|
||||
export type UnionToIntersection<Union> = (Union extends any ? (distributedUnion: Union) => void : never) extends (
|
||||
mergedIntersection: infer Intersection,
|
||||
) => void
|
||||
? Intersection
|
||||
: never;
|
||||
/**
|
||||
* Get the last element of a union.
|
||||
* First, converts to a union of `() => T` functions,
|
||||
* then uses {@linkcode UnionToIntersection} to get the last one.
|
||||
*/
|
||||
export type LastOf<Union> =
|
||||
UnionToIntersection<Union extends any ? () => Union : never> extends () => infer R ? R : never;
|
||||
/**
|
||||
* Intermediate type for {@linkcode UnionToTuple} which pushes the
|
||||
* "last" union member to the end of a tuple, and recursively prepends
|
||||
* the remainder of the union.
|
||||
*/
|
||||
export type TuplifyUnion<Union, LastElement = LastOf<Union>> =
|
||||
IsNever<Union> extends true ? [] : [...TuplifyUnion<Exclude<Union, LastElement>>, LastElement];
|
||||
/**
|
||||
* Convert a union like `1 | 2 | 3` to a tuple like `[1, 2, 3]`.
|
||||
*/
|
||||
export type UnionToTuple<Union> = TuplifyUnion<Union>;
|
||||
export type IsTuple<T> = Or<[Extends<T, []>, Extends<T, [any, ...any[]]>]>;
|
||||
export type IsUnion<T> = Not<Extends<UnionToTuple<T>["length"], 1>>;
|
||||
/**
|
||||
* A recursive version of `Pick` that selects properties from the left type that are present in the right type.
|
||||
* The "leaf" types from `Left` are used - only the keys of `Right` are considered.
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
* const user = {email: 'a@b.com', name: 'John Doe', address: {street: '123 2nd St', city: 'New York', zip: '10001', state: 'NY', country: 'USA'}}
|
||||
*
|
||||
* type Result = DeepPickMatchingProps<typeof user, {name: unknown; address: {city: unknown}}> // {name: string, address: {city: string}}
|
||||
* ```
|
||||
*/
|
||||
export type DeepPickMatchingProps<Left, Right> =
|
||||
Left extends Record<string, unknown>
|
||||
? Pick<
|
||||
{
|
||||
[K in keyof Left]: K extends keyof Right ? DeepPickMatchingProps<Left[K], Right[K]> : never;
|
||||
},
|
||||
Extract<keyof Left, keyof Right>
|
||||
>
|
||||
: Left;
|
||||
export {};
|
||||
File diff suppressed because it is too large
Load Diff
@@ -130,6 +130,7 @@ void us_internal_socket_context_unlink_socket(int ssl, struct us_socket_context_
|
||||
next->prev = prev;
|
||||
}
|
||||
}
|
||||
us_internal_disable_sweep_timer(context->loop);
|
||||
us_socket_context_unref(ssl, context);
|
||||
}
|
||||
void us_internal_socket_context_unlink_connecting_socket(int ssl, struct us_socket_context_t *context, struct us_connecting_socket_t *c) {
|
||||
@@ -147,6 +148,7 @@ void us_internal_socket_context_unlink_connecting_socket(int ssl, struct us_sock
|
||||
next->prev_pending = prev;
|
||||
}
|
||||
}
|
||||
us_internal_disable_sweep_timer(context->loop);
|
||||
us_socket_context_unref(ssl, context);
|
||||
}
|
||||
|
||||
@@ -172,6 +174,7 @@ void us_internal_socket_context_link_connecting_socket(int ssl, struct us_socket
|
||||
}
|
||||
context->head_connecting_sockets = c;
|
||||
us_socket_context_ref(ssl, context);
|
||||
us_internal_enable_sweep_timer(context->loop);
|
||||
}
|
||||
|
||||
|
||||
@@ -185,6 +188,7 @@ void us_internal_socket_context_link_socket(struct us_socket_context_t *context,
|
||||
}
|
||||
context->head_sockets = s;
|
||||
us_socket_context_ref(0, context);
|
||||
us_internal_enable_sweep_timer(context->loop);
|
||||
}
|
||||
|
||||
struct us_loop_t *us_socket_context_loop(int ssl, struct us_socket_context_t *context) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Maintaining the root certificates
|
||||
// Maintaining the root certificates
|
||||
//
|
||||
// `src/crypto/root_certs.h` contains a compiled-in set of root certificates used as trust anchors
|
||||
// for TLS certificate validation.
|
||||
@@ -23,76 +23,10 @@
|
||||
// `src/crypto/root_certs.h`.
|
||||
// * Using `git diff-files` to determine which certificate have been added and/or
|
||||
// removed.
|
||||
//
|
||||
//
|
||||
#include "libusockets.h"
|
||||
static struct us_cert_string_t root_certs[] = {
|
||||
|
||||
/* GlobalSign Root CA */
|
||||
{.str="-----BEGIN CERTIFICATE-----\n"
|
||||
"MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkGA1UEBhMC\n"
|
||||
"QkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jvb3QgQ0ExGzAZBgNV\n"
|
||||
"BAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAwMDBaFw0yODAxMjgxMjAwMDBa\n"
|
||||
"MFcxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRAwDgYDVQQLEwdS\n"
|
||||
"b290IENBMRswGQYDVQQDExJHbG9iYWxTaWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUA\n"
|
||||
"A4IBDwAwggEKAoIBAQDaDuaZjc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtI\n"
|
||||
"K+6NiY6arymAZavpxy0Sy6scTHAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCO\n"
|
||||
"XkNz8kHp1Wrjsok6Vjk4bwY8iGlbKk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdG\n"
|
||||
"snUOhugZitVtbNV4FpWi6cgKOOvyJBNPc1STE4U6G7weNLWLBYy5d4ux2x8gkasJU26Qzns3\n"
|
||||
"dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrXgzT/LCrBbBlDSgeF59N89iFo7+ryUp9/k5DP\n"
|
||||
"AgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRg\n"
|
||||
"e2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0BAQUFAAOCAQEA1nPnfE920I2/7LqivjTF\n"
|
||||
"KDK1fPxsnCwrvQmeU79rXqoRSLblCKOzyj1hTdNGCbM+w6DjY1Ub8rrvrTnhQ7k4o+YviiY7\n"
|
||||
"76BQVvnGCv04zcQLcFGUl5gE38NflNUVyRRBnMRddWQVDf9VMOyGj/8N7yy5Y0b2qvzfvGn9\n"
|
||||
"LhJIZJrglfCm7ymPAbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhHhm4qxFYxldBniYUr\n"
|
||||
"+WymXUadDKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveCX4XSQRjbgbME\n"
|
||||
"HMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A==\n"
|
||||
"-----END CERTIFICATE-----",.len=1258},
|
||||
|
||||
/* Entrust.net Premium 2048 Secure Server CA */
|
||||
{.str="-----BEGIN CERTIFICATE-----\n"
|
||||
"MIIEKjCCAxKgAwIBAgIEOGPe+DANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChMLRW50cnVz\n"
|
||||
"dC5uZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBpbmNvcnAuIGJ5IHJl\n"
|
||||
"Zi4gKGxpbWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5IEVudHJ1c3QubmV0IExpbWl0\n"
|
||||
"ZWQxMzAxBgNVBAMTKkVudHJ1c3QubmV0IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4\n"
|
||||
"KTAeFw05OTEyMjQxNzUwNTFaFw0yOTA3MjQxNDE1MTJaMIG0MRQwEgYDVQQKEwtFbnRydXN0\n"
|
||||
"Lm5ldDFAMD4GA1UECxQ3d3d3LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVm\n"
|
||||
"LiAobGltaXRzIGxpYWIuKTElMCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRl\n"
|
||||
"ZDEzMDEGA1UEAxMqRW50cnVzdC5uZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgp\n"
|
||||
"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArU1LqRKGsuqjIAcVFmQqK0vRvwtK\n"
|
||||
"TY7tgHalZ7d4QMBzQshowNtTK91euHaYNZOLGp18EzoOH1u3Hs/lJBQesYGpjX24zGtLA/EC\n"
|
||||
"DNyrpUAkAH90lKGdCCmziAv1h3edVc3kw37XamSrhRSGlVuXMlBvPci6Zgzj/L24ScF2iUkZ\n"
|
||||
"/cCovYmjZy/Gn7xxGWC4LeksyZB2ZnuU4q941mVTXTzWnLLPKQP5L6RQstRIzgUyVYr9smRM\n"
|
||||
"DuSYB3Xbf9+5CFVghTAp+XtIpGmG4zU/HoZdenoVve8AjhUiVBcAkCaTvA5JaJG/+EfTnZVC\n"
|
||||
"wQ5N328mz8MYIWJmQ3DW1cAH4QIDAQABo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/\n"
|
||||
"BAUwAwEB/zAdBgNVHQ4EFgQUVeSB0RGAvtiJuQijMfmhJAkWuXAwDQYJKoZIhvcNAQEFBQAD\n"
|
||||
"ggEBADubj1abMOdTmXx6eadNl9cZlZD7Bh/KM3xGY4+WZiT6QBshJ8rmcnPyT/4xmf3IDExo\n"
|
||||
"U8aAghOY+rat2l098c5u9hURlIIM7j+VrxGrD9cv3h8Dj1csHsm7mhpElesYT6YfzX1XEC+b\n"
|
||||
"BAlahLVu2B064dae0Wx5XnkcFMXj0EyTO2U87d89vqbllRrDtRnDvV5bu/8j72gZyxKTJ1wD\n"
|
||||
"LW8w0B62GqzeWvfRqqgnpv55gcR5mTNXuhKwqeBCbJPKVt7+bYQLCIt+jerXmCHG8+c8eS9e\n"
|
||||
"nNFMFY3h7CI3zJpDC5fcgJCNs2ebb0gIFVbPv/ErfF6adulZkMV8gzURZVE=\n"
|
||||
"-----END CERTIFICATE-----",.len=1501},
|
||||
|
||||
/* Baltimore CyberTrust Root */
|
||||
{.str="-----BEGIN CERTIFICATE-----\n"
|
||||
"MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJRTESMBAG\n"
|
||||
"A1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlCYWx0aW1v\n"
|
||||
"cmUgQ3liZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoXDTI1MDUxMjIzNTkwMFowWjEL\n"
|
||||
"MAkGA1UEBhMCSUUxEjAQBgNVBAoTCUJhbHRpbW9yZTETMBEGA1UECxMKQ3liZXJUcnVzdDEi\n"
|
||||
"MCAGA1UEAxMZQmFsdGltb3JlIEN5YmVyVHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQAD\n"
|
||||
"ggEPADCCAQoCggEBAKMEuyKrmD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2ygu\n"
|
||||
"zmKiYv60iNoS6zjrIZ3AQSsBUnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo\n"
|
||||
"6vWrJYeKmpYcqWe4PwzV9/lSEy/CG9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSu\n"
|
||||
"XmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9XbIGevOF6uvUA65ehD5f/xXtabz5OTZydc93Uk3z\n"
|
||||
"yZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjprl3RjM71oGDHweI12v/yejl0qhqdNkNwnGjkC\n"
|
||||
"AwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoIVDaGezq1BE3wMBIGA1UdEwEB/wQIMAYB\n"
|
||||
"Af8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQCFDF2O5G9RaEIFoN27\n"
|
||||
"TyclhAO992T9Ldcw46QQF+vaKSm2eT929hkTI7gQCvlYpNRhcL0EYWoSihfVCr3FvDB81ukM\n"
|
||||
"JY2GQE/szKN+OMY3EU/t3WgxjkzSswF07r51XgdIGn9w/xZchMB5hbgF/X++ZRGjD8ACtPhS\n"
|
||||
"NzkE1akxehi/oCr0Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsaY71k5h+3zvDyny67\n"
|
||||
"G7fyUIhzksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9HRCwBXbsdtTLS\n"
|
||||
"R9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp\n"
|
||||
"-----END CERTIFICATE-----",.len=1258},
|
||||
|
||||
/* Entrust Root Certification Authority */
|
||||
{.str="-----BEGIN CERTIFICATE-----\n"
|
||||
"MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMCVVMxFjAU\n"
|
||||
@@ -119,30 +53,6 @@ static struct us_cert_string_t root_certs[] = {
|
||||
"j2A781q0tHuu2guQOHXvgR1m0vdXcDazv/wor3ElhVsT/h5/WrQ8\n"
|
||||
"-----END CERTIFICATE-----",.len=1639},
|
||||
|
||||
/* Comodo AAA Services root */
|
||||
{.str="-----BEGIN CERTIFICATE-----\n"
|
||||
"MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEbMBkGA1UE\n"
|
||||
"CAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21v\n"
|
||||
"ZG8gQ0EgTGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTA0\n"
|
||||
"MDEwMTAwMDAwMFoXDTI4MTIzMTIzNTk1OVowezELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdy\n"
|
||||
"ZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENB\n"
|
||||
"IExpbWl0ZWQxITAfBgNVBAMMGEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZI\n"
|
||||
"hvcNAQEBBQADggEPADCCAQoCggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686td\n"
|
||||
"UIoWMQuaBtDFcCLNSS1UY8y2bmhGC1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWPPe\n"
|
||||
"3M/vg4aijJRPn2jymJBGhCfHdr/jzDUsi14HZGWCwEiwqJH5YZ92IFCokcdmtet4YgNW8Ioa\n"
|
||||
"E+oxox6gmf049vYnMlhvB/VruPsUK6+3qszWY19zjNoFmag4qMsXeDZRrOme9Hg6jc8P2ULi\n"
|
||||
"mAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjHYpy+g8cmez6KJcfA3Z3mNWgQIJ2P2N7S\n"
|
||||
"w4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQUoBEKIz6W8Qfs4q8p74Klf9AwpLQwDgYD\n"
|
||||
"VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wewYDVR0fBHQwcjA4oDagNIYyaHR0cDov\n"
|
||||
"L2NybC5jb21vZG9jYS5jb20vQUFBQ2VydGlmaWNhdGVTZXJ2aWNlcy5jcmwwNqA0oDKGMGh0\n"
|
||||
"dHA6Ly9jcmwuY29tb2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2VzLmNybDANBgkqhkiG\n"
|
||||
"9w0BAQUFAAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm7l3sAg9g1o1Q\n"
|
||||
"GE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLzRt0vxuBq\n"
|
||||
"w8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2G9w84FoVxp7Z8VlI\n"
|
||||
"MCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsil2D4kF501KKaU73yqWjgom7C\n"
|
||||
"12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg==\n"
|
||||
"-----END CERTIFICATE-----",.len=1513},
|
||||
|
||||
/* QuoVadis Root CA 2 */
|
||||
{.str="-----BEGIN CERTIFICATE-----\n"
|
||||
"MIIFtzCCA5+gAwIBAgICBQkwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNV\n"
|
||||
@@ -211,78 +121,6 @@ static struct us_cert_string_t root_certs[] = {
|
||||
"zTSMmfXK4SVhM7JZG+Ju1zdXtg2pEto=\n"
|
||||
"-----END CERTIFICATE-----",.len=2349},
|
||||
|
||||
/* XRamp Global CA Root */
|
||||
{.str="-----BEGIN CERTIFICATE-----\n"
|
||||
"MIIEMDCCAxigAwIBAgIQUJRs7Bjq1ZxN1ZfvdY+grTANBgkqhkiG9w0BAQUFADCBgjELMAkG\n"
|
||||
"A1UEBhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJh\n"
|
||||
"bXAgU2VjdXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlm\n"
|
||||
"aWNhdGlvbiBBdXRob3JpdHkwHhcNMDQxMTAxMTcxNDA0WhcNMzUwMTAxMDUzNzE5WjCBgjEL\n"
|
||||
"MAkGA1UEBhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMb\n"
|
||||
"WFJhbXAgU2VjdXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2Vy\n"
|
||||
"dGlmaWNhdGlvbiBBdXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCY\n"
|
||||
"JB69FbS638eMpSe2OAtp87ZOqCwuIR1cRN8hXX4jdP5efrRKt6atH67gBhbim1vZZ3RrXYCP\n"
|
||||
"KZ2GG9mcDZhtdhAoWORlsH9KmHmf4MMxfoArtYzAQDsRhtDLooY2YKTVMIJt2W7QDxIEM5df\n"
|
||||
"T2Fa8OT5kavnHTu86M/0ay00fOJIYRyO82FEzG+gSqmUsE3a56k0enI4qEHMPJQRfevIpoy3\n"
|
||||
"hsvKMzvZPTeL+3o+hiznc9cKV6xkmxnr9A8ECIqsAxcZZPRaJSKNNCyy9mgdEm3Tih4U2sSP\n"
|
||||
"puIjhdV6Db1q4Ons7Be7QhtnqiXtRYMh/MHJfNViPvryxS3T/dRlAgMBAAGjgZ8wgZwwEwYJ\n"
|
||||
"KwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0O\n"
|
||||
"BBYEFMZPoj0GY4QJnM5i5ASsjVy16bYbMDYGA1UdHwQvMC0wK6ApoCeGJWh0dHA6Ly9jcmwu\n"
|
||||
"eHJhbXBzZWN1cml0eS5jb20vWEdDQS5jcmwwEAYJKwYBBAGCNxUBBAMCAQEwDQYJKoZIhvcN\n"
|
||||
"AQEFBQADggEBAJEVOQMBG2f7Shz5CmBbodpNl2L5JFMn14JkTpAuw0kbK5rc/Kh4ZzXxHfAR\n"
|
||||
"vbdI4xD2Dd8/0sm2qlWkSLoC295ZLhVbO50WfUfXN+pfTXYSNrsf16GBBEYgoyxtqZ4Bfj8p\n"
|
||||
"zgCT3/3JknOJiWSe5yvkHJEs0rnOfc5vMZnT5r7SHpDwCRR5XCOrTdLaIR9NmXmd4c8nnxCb\n"
|
||||
"HIgNsIpkQTG4DmyQJKSbXHGPurt+HBvbaoAPIbzp26a3QPSyi6mx5O+aGtA9aZnuqCij4Tyz\n"
|
||||
"8LIRnM98QObd50N9otg6tamN8jSZxNQQ4Qb9CYQQO+7ETPTsJ3xCwnR8gooJybQDJbw=\n"
|
||||
"-----END CERTIFICATE-----",.len=1509},
|
||||
|
||||
/* Go Daddy Class 2 CA */
|
||||
{.str="-----BEGIN CERTIFICATE-----\n"
|
||||
"MIIEADCCAuigAwIBAgIBADANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEhMB8GA1UE\n"
|
||||
"ChMYVGhlIEdvIERhZGR5IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAy\n"
|
||||
"IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA0MDYyOTE3MDYyMFoXDTM0MDYyOTE3MDYy\n"
|
||||
"MFowYzELMAkGA1UEBhMCVVMxITAfBgNVBAoTGFRoZSBHbyBEYWRkeSBHcm91cCwgSW5jLjEx\n"
|
||||
"MC8GA1UECxMoR28gRGFkZHkgQ2xhc3MgMiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASAw\n"
|
||||
"DQYJKoZIhvcNAQEBBQADggENADCCAQgCggEBAN6d1+pXGEmhW+vXX0iG6r7d/+TvZxz0ZWiz\n"
|
||||
"V3GgXne77ZtJ6XCAPVYYYwhv2vLM0D9/AlQiVBDYsoHUwHU9S3/Hd8M+eKsaA7Ugay9qK7HF\n"
|
||||
"iH7Eux6wwdhFJ2+qN1j3hybX2C32qRe3H3I2TqYXP2WYktsqbl2i/ojgC95/5Y0V4evLOtXi\n"
|
||||
"EqITLdiOr18SPaAIBQi2XKVlOARFmR6jYGB0xUGlcmIbYsUfb18aQr4CUWWoriMYavx4A6lN\n"
|
||||
"f4DD+qta/KFApMoZFv6yyO9ecw3ud72a9nmYvLEHZ6IVDd2gWMZEewo+YihfukEHU1jPEX44\n"
|
||||
"dMX4/7VpkI+EdOqXG68CAQOjgcAwgb0wHQYDVR0OBBYEFNLEsNKR1EwRcbNhyz2h/t2oatTj\n"
|
||||
"MIGNBgNVHSMEgYUwgYKAFNLEsNKR1EwRcbNhyz2h/t2oatTjoWekZTBjMQswCQYDVQQGEwJV\n"
|
||||
"UzEhMB8GA1UEChMYVGhlIEdvIERhZGR5IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBEYWRk\n"
|
||||
"eSBDbGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJ\n"
|
||||
"KoZIhvcNAQEFBQADggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wimPQoZ+YeAEW5p5JYX\n"
|
||||
"MP80kWNyOO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKtI3lpjbi2Tc7P\n"
|
||||
"TMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQHmyW74cN\n"
|
||||
"xA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mERdEr/VxqHD3VILs9R\n"
|
||||
"aRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5CufReYNnyicsbkqWletNw+vHX/b\n"
|
||||
"vZ8=\n"
|
||||
"-----END CERTIFICATE-----",.len=1445},
|
||||
|
||||
/* Starfield Class 2 CA */
|
||||
{.str="-----BEGIN CERTIFICATE-----\n"
|
||||
"MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzElMCMGA1UE\n"
|
||||
"ChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZpZWxkIENs\n"
|
||||
"YXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQwNjI5MTczOTE2WhcNMzQwNjI5\n"
|
||||
"MTczOTE2WjBoMQswCQYDVQQGEwJVUzElMCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2ll\n"
|
||||
"cywgSW5jLjEyMDAGA1UECxMpU3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRo\n"
|
||||
"b3JpdHkwggEgMA0GCSqGSIb3DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N\n"
|
||||
"78gDGIc/oav7PKaf8MOh2tTYbitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMe\n"
|
||||
"j2YcOadN+lq2cwQlZut3f+dZxkqZJRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0\n"
|
||||
"X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVmepsZGD3/cVE8MC5fvj13c7JdBmzDI1aaK4Umkhyn\n"
|
||||
"ArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSNF4Azbl5KXZnJHoe0nRrA1W4TNSNe35tfPe/W\n"
|
||||
"93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HFMIHCMB0GA1UdDgQWBBS/X7fRzt0fhvRb\n"
|
||||
"Vazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fRzt0fhvRbVazc1xDCDqmI56FspGowaDEL\n"
|
||||
"MAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xMjAw\n"
|
||||
"BgNVBAsTKVN0YXJmaWVsZCBDbGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwG\n"
|
||||
"A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGsafPzWdqbAYcaT1ep\n"
|
||||
"oXkJKtv3L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLMPUxA2IGvd56D\n"
|
||||
"eruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJlxy16paq8\n"
|
||||
"U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynpVSJYACPq4xJDKVtH\n"
|
||||
"CN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEYWQPJIrSPnNVeKtelttQKbfi3\n"
|
||||
"QBFGmh95DmK/D5fs4C8fF5Q=\n"
|
||||
"-----END CERTIFICATE-----",.len=1465},
|
||||
|
||||
/* DigiCert Assured ID Root CA */
|
||||
{.str="-----BEGIN CERTIFICATE-----\n"
|
||||
"MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBlMQswCQYD\n"
|
||||
@@ -3625,6 +3463,52 @@ static struct us_cert_string_t root_certs[] = {
|
||||
"GJCy89UDyibK79XH4I9TjvAA46jtn/mtd+ArY0+ew+43u3gJhJ65bvspmZDogNOfJA==\n"
|
||||
"-----END CERTIFICATE-----",.len=2020},
|
||||
|
||||
/* TrustAsia TLS ECC Root CA */
|
||||
{.str="-----BEGIN CERTIFICATE-----\n"
|
||||
"MIICMTCCAbegAwIBAgIUNnThTXxlE8msg1UloD5Sfi9QaMcwCgYIKoZIzj0EAwMwWDELMAkG\n"
|
||||
"A1UEBhMCQ04xJTAjBgNVBAoTHFRydXN0QXNpYSBUZWNobm9sb2dpZXMsIEluYy4xIjAgBgNV\n"
|
||||
"BAMTGVRydXN0QXNpYSBUTFMgRUNDIFJvb3QgQ0EwHhcNMjQwNTE1MDU0MTU2WhcNNDQwNTE1\n"
|
||||
"MDU0MTU1WjBYMQswCQYDVQQGEwJDTjElMCMGA1UEChMcVHJ1c3RBc2lhIFRlY2hub2xvZ2ll\n"
|
||||
"cywgSW5jLjEiMCAGA1UEAxMZVHJ1c3RBc2lhIFRMUyBFQ0MgUm9vdCBDQTB2MBAGByqGSM49\n"
|
||||
"AgEGBSuBBAAiA2IABLh/pVs/AT598IhtrimY4ZtcU5nb9wj/1WrgjstEpvDBjL1P1M7UiFPo\n"
|
||||
"XlfXTr4sP/MSpwDpguMqWzJ8S5sUKZ74LYO1644xST0mYekdcouJtgq7nDM1D9rs3qlKH8kz\n"
|
||||
"saNCMEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQULIVTu7FDzTLqnqOH/qKYqKaT6RAw\n"
|
||||
"DgYDVR0PAQH/BAQDAgEGMAoGCCqGSM49BAMDA2gAMGUCMFRH18MtYYZI9HlaVQ01L18N9mds\n"
|
||||
"d0AaRuf4aFtOJx24mH1/k78ITcTaRTChD15KeAIxAKORh/IRM4PDwYqROkwrULG9IpRdNYlz\n"
|
||||
"g8WbGf60oenUoWa2AaU2+dhoYSi3dOGiMQ==\n"
|
||||
"-----END CERTIFICATE-----",.len=820},
|
||||
|
||||
/* TrustAsia TLS RSA Root CA */
|
||||
{.str="-----BEGIN CERTIFICATE-----\n"
|
||||
"MIIFgDCCA2igAwIBAgIUHBjYz+VTPyI1RlNUJDxsR9FcSpwwDQYJKoZIhvcNAQEMBQAwWDEL\n"
|
||||
"MAkGA1UEBhMCQ04xJTAjBgNVBAoTHFRydXN0QXNpYSBUZWNobm9sb2dpZXMsIEluYy4xIjAg\n"
|
||||
"BgNVBAMTGVRydXN0QXNpYSBUTFMgUlNBIFJvb3QgQ0EwHhcNMjQwNTE1MDU0MTU3WhcNNDQw\n"
|
||||
"NTE1MDU0MTU2WjBYMQswCQYDVQQGEwJDTjElMCMGA1UEChMcVHJ1c3RBc2lhIFRlY2hub2xv\n"
|
||||
"Z2llcywgSW5jLjEiMCAGA1UEAxMZVHJ1c3RBc2lhIFRMUyBSU0EgUm9vdCBDQTCCAiIwDQYJ\n"
|
||||
"KoZIhvcNAQEBBQADggIPADCCAgoCggIBAMMWuBtqpERz5dZO9LnPWwvB0ZqB9WOwj0PBuwha\n"
|
||||
"GnrhB3YmH49pVr7+NmDQDIPNlOrnxS1cLwUWAp4KqC/lYCZUlviYQB2srp10Zy9U+5RjmOMm\n"
|
||||
"SoPGlbYJQ1DNDX3eRA5gEk9bNb2/mThtfWza4mhzH/kxpRkQcwUqwzIZheo0qt1CHjCNP561\n"
|
||||
"HmHVb70AcnKtEj+qpklz8oYVlQwQX1Fkzv93uMltrOXVmPGZLmzjyUT5tUMnCE32ft5Eebuy\n"
|
||||
"jBza00tsLtbDeLdM1aTk2tyKjg7/D8OmYCYozza/+lcK7Fs/6TAWe8TbxNRkoDD75f0dcZLd\n"
|
||||
"KY9BWN4ArTr9PXwaqLEX8E40eFgl1oUh63kd0Nyrz2I8sMeXi9bQn9P+PN7F4/w6g3CEIR0J\n"
|
||||
"wqH8uyghZVNgepBtljhb//HXeltt08lwSUq6HTrQUNoyIBnkiz/r1RYmNzz7dZ6wB3C4FGB3\n"
|
||||
"3PYPXFIKvF1tjVEK2sUYyJtt3LCDs3+jTnhMmCWr8n4uIF6CFabW2I+s5c0yhsj55NqJ4js+\n"
|
||||
"k8UTav/H9xj8Z7XvGCxUq0DTbE3txci3OE9kxJRMT6DNrqXGJyV1J23G2pyOsAWZ1SgRxSHU\n"
|
||||
"uPzHlqtKZFlhaxP8S8ySpg+kUb8OWJDZgoM5pl+z+m6Ss80zDoWo8SnTq1mt1tve1CuBAgMB\n"
|
||||
"AAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFLgHkXlcBvRG/XtZylomkadFK/hT\n"
|
||||
"MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQwFAAOCAgEAIZtqBSBdGBanEqT3Rz/Nyjuu\n"
|
||||
"jsCCztxIJXgXbODgcMTWltnZ9r96nBO7U5WS/8+S4PPFJzVXqDuiGev4iqME3mmL5Dw8veWv\n"
|
||||
"0BIb5Ylrc5tvJQJLkIKvQMKtuppgJFqBTQUYo+IzeXoLH5Pt7DlK9RME7I10nYEKqG/odv6L\n"
|
||||
"TytpEoYKNDbdgptvT+Bz3Ul/KD7JO6NXBNiT2Twp2xIQaOHEibgGIOcberyxk2GaGUARtWqF\n"
|
||||
"VwHxtlotJnMnlvm5P1vQiJ3koP26TpUJg3933FEFlJ0gcXax7PqJtZwuhfG5WyRasQmr2soa\n"
|
||||
"B82G39tp27RIGAAtvKLEiUUjpQ7hRGU+isFqMB3iYPg6qocJQrmBktwliJiJ8Xw18WLK7nn4\n"
|
||||
"GS/+X/jbh87qqA8MpugLoDzga5SYnH+tBuYc6kIQX+ImFTw3OffXvO645e8D7r0i+yiGNFjE\n"
|
||||
"Wn9hongPXvPKnbwbPKfILfanIhHKA9jnZwqKDss1jjQ52MjqjZ9k4DewbNfFj8GQYSbbJIwe\n"
|
||||
"SsCI3zWQzj8C9GRh3sfIB5XeMhg6j6JCQCTl1jNdfK7vsU1P1FeQNWrcrgSXSYk0ly4wBOeY\n"
|
||||
"99sLAZDBHwo/+ML+TvrbmnNzFrwFuHnYWa8G5z9nODmxfKuU4CkUpijy323imttUQ/hHWKNd\n"
|
||||
"dBWcwauwxzQ=\n"
|
||||
"-----END CERTIFICATE-----",.len=1964},
|
||||
|
||||
/* D-TRUST EV Root CA 2 2023 */
|
||||
{.str="-----BEGIN CERTIFICATE-----\n"
|
||||
"MIIFqTCCA5GgAwIBAgIQaSYJfoBLTKCnjHhiU19abzANBgkqhkiG9w0BAQ0FADBIMQswCQYD\n"
|
||||
@@ -3655,4 +3539,35 @@ static struct us_cert_string_t root_certs[] = {
|
||||
"S5N5YHVpD/Aa1VP6IQzCP+k/HxiMkl14p3ZnGbuy6n/pcAlWVqOwDAstNl7F6cTVg8uGF5cs\n"
|
||||
"bBNvh1qvSaYd2804BC5f4ko1Di1L+KIkBI3Y4WNeApI02phhXBxvWHZks/wCuPWdCg==\n"
|
||||
"-----END CERTIFICATE-----",.len=2020},
|
||||
|
||||
/* SwissSign RSA TLS Root CA 2022 - 1 */
|
||||
{.str="-----BEGIN CERTIFICATE-----\n"
|
||||
"MIIFkzCCA3ugAwIBAgIUQ/oMX04bgBhE79G0TzUfRPSA7cswDQYJKoZIhvcNAQELBQAwUTEL\n"
|
||||
"MAkGA1UEBhMCQ0gxFTATBgNVBAoTDFN3aXNzU2lnbiBBRzErMCkGA1UEAxMiU3dpc3NTaWdu\n"
|
||||
"IFJTQSBUTFMgUm9vdCBDQSAyMDIyIC0gMTAeFw0yMjA2MDgxMTA4MjJaFw00NzA2MDgxMTA4\n"
|
||||
"MjJaMFExCzAJBgNVBAYTAkNIMRUwEwYDVQQKEwxTd2lzc1NpZ24gQUcxKzApBgNVBAMTIlN3\n"
|
||||
"aXNzU2lnbiBSU0EgVExTIFJvb3QgQ0EgMjAyMiAtIDEwggIiMA0GCSqGSIb3DQEBAQUAA4IC\n"
|
||||
"DwAwggIKAoICAQDLKmjiC8NXvDVjvHClO/OMPE5Xlm7DTjak9gLKHqquuN6orx122ro10JFw\n"
|
||||
"B9+zBvKK8i5VUXu7LCTLf5ImgKO0lPaCoaTo+nUdWfMHamFk4saMla+ju45vVs9xzF6BYQ1t\n"
|
||||
"8qsCLqSX5XH8irCRIFucdFJtrhUnWXjyCcplDn/L9Ovn3KlMd/YrFgSVrpxxpT8q2kFC5zyE\n"
|
||||
"EPThPYxr4iuRR1VPuFa+Rd4iUU1OKNlfGUEGjw5NBuBwQCMBauTLE5tzrE0USJIt/m2n+Idr\n"
|
||||
"eXXhvhCxqohAWVTXz8TQm0SzOGlkjIHRI36qOTw7D59Ke4LKa2/KIj4x0LDQKhySio/YGZxH\n"
|
||||
"5D4MucLNvkEM+KRHBdvBFzA4OmnczcNpI/2aDwLOEGrOyvi5KaM2iYauC8BPY7kGWUleDsFp\n"
|
||||
"swrzd34unYyzJ5jSmY0lpx+Gs6ZUcDj8fV3oT4MM0ZPlEuRU2j7yrTrePjxF8CgPBrnh25d7\n"
|
||||
"mUWe3f6VWQQvdT/TromZhqwUtKiE+shdOxtYk8EXlFXIC+OCeYSf8wCENO7cMdWP8vpPlkwG\n"
|
||||
"qnj73mSiI80fPsWMvDdUDrtaclXvyFu1cvh43zcgTFeRc5JzrBh3Q4IgaezprClG5QtO+Ddz\n"
|
||||
"iZaKHG29777YtvTKwP1H8K4LWCDFyB02rpeNUIMmJCn3nTsPBQIDAQABo2MwYTAPBgNVHRMB\n"
|
||||
"Af8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAfBgNVHSMEGDAWgBRvjmKLk0Ow4UD2p8P98Q+4\n"
|
||||
"DxU4pTAdBgNVHQ4EFgQUb45ii5NDsOFA9qfD/fEPuA8VOKUwDQYJKoZIhvcNAQELBQADggIB\n"
|
||||
"AKwsKUF9+lz1GpUYvyypiqkkVHX1uECry6gkUSsYP2OprphWKwVDIqO310aewCoSPY6WlkDf\n"
|
||||
"DDOLazeROpW7OSltwAJsipQLBwJNGD77+3v1dj2b9l4wBlgzHqp41eZUBDqyggmNzhYzWUUo\n"
|
||||
"8aWjlw5DI/0LIICQ/+Mmz7hkkeUFjxOgdg3XNwwQiJb0Pr6VvfHDffCjw3lHC1ySFWPtUnWK\n"
|
||||
"50Zpy1FVCypM9fJkT6lc/2cyjlUtMoIcgC9qkfjLvH4YoiaoLqNTKIftV+Vlek4ASltOU8li\n"
|
||||
"Nr3CjlvrzG4ngRhZi0Rjn9UMZfQpZX+RLOV/fuiJz48gy20HQhFRJjKKLjpHE7iNvUcNCfAW\n"
|
||||
"pO2Whi4Z2L6MOuhFLhG6rlrnub+xzI/goP+4s9GFe3lmozm1O2bYQL7Pt2eLSMkZJVX8vY3P\n"
|
||||
"XtpOpvJpzv1/THfQwUY1mFwjmwJFQ5Ra3bxHrSL+ul4vkSkphnsh3m5kt8sNjzdbowhq6/Td\n"
|
||||
"Ao9QAwKxuDdollDruF/UKIqlIgyKhPBZLtU30WHlQnNYKoH3dtvi4k0NX/a3vgW0rk4N3hY9\n"
|
||||
"A4GzJl5LuEsAz/+MF7psYC0nhzck5npgL7XTgwSqT0N1osGDsieYK7EOgLrAhV5Cud+xYJHT\n"
|
||||
"6xh+cHiudoO+cVrQkOPKwRYlZ0rwtnu64ZzZ\n"
|
||||
"-----END CERTIFICATE-----",.len=1988},
|
||||
};
|
||||
|
||||
@@ -116,6 +116,8 @@ extern struct addrinfo_result *Bun__addrinfo_getRequestResult(struct addrinfo_re
|
||||
/* Loop related */
|
||||
void us_internal_dispatch_ready_poll(struct us_poll_t *p, int error, int eof, int events);
|
||||
void us_internal_timer_sweep(us_loop_r loop);
|
||||
void us_internal_enable_sweep_timer(struct us_loop_t *loop);
|
||||
void us_internal_disable_sweep_timer(struct us_loop_t *loop);
|
||||
void us_internal_free_closed_sockets(us_loop_r loop);
|
||||
void us_internal_loop_link(struct us_loop_t *loop,
|
||||
struct us_socket_context_t *context);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user