chore: import upstream snapshot with attribution
Deploy (to testing) and Test Playground Preview Worker / Deploy Playground Preview Worker (testing) (push) Has been skipped
Deploy Workers Shared Staging / Deploy Workers Shared Staging (push) Failing after 0s
Prerelease / build (push) Has been skipped
Handle Changesets / Handle Changesets (push) Has been cancelled
Semgrep OSS scan / semgrep-oss (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 12:30:11 +08:00
commit 70bf21e064
5213 changed files with 731895 additions and 0 deletions
@@ -0,0 +1 @@
module.exports = "common";
+1
View File
@@ -0,0 +1 @@
export default "bundled";
@@ -0,0 +1 @@
export default "dynamic";
@@ -0,0 +1 @@
SELECT * FROM users;
+32
View File
@@ -0,0 +1,32 @@
import common from "./common.cjs";
import dep from "./dep";
import sql from "./example.sql";
import text from "./text.txt";
export default <ExportedHandler>{
async fetch(request) {
const url = new URL(request.url);
if (url.pathname === "/dep") {
return new Response(dep);
}
if (url.pathname === "/text") {
return new Response(text);
}
if (url.pathname === "/sql") {
return new Response(sql);
}
if (url.pathname === "/common") {
return new Response(common);
}
if (url.pathname === "/dynamic") {
return new Response((await import("./dynamic.js")).default);
}
if (url.pathname.startsWith("/lang/")) {
// Build the path dynamically to ensure esbuild doesn't inline the import.
const language =
"./lang/" + url.pathname.substring("/lang/".length) + ".js";
return new Response((await import(language)).default.hello);
}
return new Response("Not Found", { status: 404 });
},
};
@@ -0,0 +1 @@
export default { hello: "hello" };
@@ -0,0 +1 @@
export default { hello: "bonjour" };
+9
View File
@@ -0,0 +1,9 @@
declare module "*.txt" {
const value: string;
export default value;
}
declare module "*.sql" {
const value: string;
export default value;
}
+1
View File
@@ -0,0 +1 @@
test