chore: refactored docs to worker + static assets b41590bf
Steve · 2026-02-21 18:06 6 file(s) · +46 −4
bun.lock +8 −2
13 13
      "name": "docs",
14 14
      "version": "0.0.0",
15 15
      "dependencies": {
16 +
        "hono": "latest",
16 17
        "react": "latest",
17 18
        "react-dom": "latest",
18 19
        "vocs": "latest",
19 20
      },
20 21
      "devDependencies": {
22 +
        "@cloudflare/workers-types": "latest",
21 23
        "@types/react": "latest",
22 24
        "typescript": "latest",
23 25
      },
175 177
    "@clack/core": ["@clack/core@1.0.0", "", { "dependencies": { "picocolors": "^1.0.0", "sisteransi": "^1.0.5" } }, "sha512-Orf9Ltr5NeiEuVJS8Rk2XTw3IxNC2Bic3ash7GgYeA8LJ/zmSNpSQ/m5UAhe03lA6KFgklzZ5KTHs4OAMA/SAQ=="],
176 178
177 179
    "@clack/prompts": ["@clack/prompts@1.0.0", "", { "dependencies": { "@clack/core": "1.0.0", "picocolors": "^1.0.0", "sisteransi": "^1.0.5" } }, "sha512-rWPXg9UaCFqErJVQ+MecOaWsozjaxol4yjnmYcGNipAWzdaWa2x+VJmKfGq7L0APwBohQOYdHC+9RO4qRXej+A=="],
180 +
181 +
    "@cloudflare/workers-types": ["@cloudflare/workers-types@4.20260228.0", "", {}, "sha512-9LfRg93ncQq6Oc4MFpqGSs+PmPhqWvg8TspXwbiYNR201IhXB4WqHR/aTSudPI0ujsf/NLc8E9fF3C+aA2g8KQ=="],
178 182
179 183
    "@emotion/hash": ["@emotion/hash@0.9.2", "", {}, "sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g=="],
180 184
596 600
597 601
    "@types/node": ["@types/node@20.19.30", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-WJtwWJu7UdlvzEAUm484QNg5eAoq5QR08KDNx7g45Usrs2NtOPiX8ugDqmKdXkyL03rBqU5dYNYVQetEpBHq2g=="],
598 602
599 -
    "@types/react": ["@types/react@19.2.10", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-WPigyYuGhgZ/cTPRXB2EwUw+XvsRA3GqHlsP4qteqrnnjDrApbS7MxcGr/hke5iUoeB7E/gQtrs9I37zAJ0Vjw=="],
603 +
    "@types/react": ["@types/react@19.2.14", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w=="],
600 604
601 605
    "@types/trusted-types": ["@types/trusted-types@2.0.7", "", {}, "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw=="],
602 606
954 958
955 959
    "hastscript": ["hastscript@8.0.0", "", { "dependencies": { "@types/hast": "^3.0.0", "comma-separated-tokens": "^2.0.0", "hast-util-parse-selector": "^4.0.0", "property-information": "^6.0.0", "space-separated-tokens": "^2.0.0" } }, "sha512-dMOtzCEd3ABUeSIISmrETiKuyydk1w0pa+gE/uormcTpSYuaNJPbX1NU3JLyscSLjwAQM8bWMhhIlnCqnRvDTw=="],
956 960
957 -
    "hono": ["hono@4.11.7", "", {}, "sha512-l7qMiNee7t82bH3SeyUCt9UF15EVmaBvsppY2zQtrbIhl/yzBTny+YUxsVjSjQ6gaqaeVtZmGocom8TzBlA4Yw=="],
961 +
    "hono": ["hono@4.12.1", "", {}, "sha512-hi9afu8g0lfJVLolxElAZGANCTTl6bewIdsRNhaywfP9K8BPf++F2z6OLrYGIinUwpRKzbZHMhPwvc0ZEpAwGw=="],
958 962
959 963
    "html-void-elements": ["html-void-elements@3.0.0", "", {}, "sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg=="],
960 964
1605 1609
    "send/debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="],
1606 1610
1607 1611
    "vite/fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="],
1612 +
1613 +
    "vocs/hono": ["hono@4.11.7", "", {}, "sha512-l7qMiNee7t82bH3SeyUCt9UF15EVmaBvsppY2zQtrbIhl/yzBTny+YUxsVjSjQ6gaqaeVtZmGocom8TzBlA4Yw=="],
1608 1614
1609 1615
    "@radix-ui/react-label/@radix-ui/react-primitive/@radix-ui/react-slot": ["@radix-ui/react-slot@1.2.4", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.2" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-Jl+bCv8HxKnlTLVrcDE8zTMJ09R9/ukw4qBs/oZClOfoQk/cOTbDn+NceXfV7j09YPVQUryJPHurafcSg6EVKA=="],
1610 1616
docs/.gitignore +1 −0
1 1
.wrangler
2 +
.dev.vars
2 3
3 4
.sequoia-state.json
docs/package.json +4 −1
5 5
	"type": "module",
6 6
	"scripts": {
7 7
		"dev": "vocs dev",
8 +
		"dev:api": "wrangler dev",
8 9
		"build": "vocs build && bun inject-og-tags.ts",
9 -
		"deploy": "bun run build && sequoia inject && bunx wrangler pages deploy docs/dist",
10 +
		"deploy": "bun run build && sequoia inject && wrangler deploy",
10 11
		"preview": "vocs preview"
11 12
	},
12 13
	"dependencies": {
14 +
		"hono": "latest",
13 15
		"react": "latest",
14 16
		"react-dom": "latest",
15 17
		"vocs": "latest"
16 18
	},
17 19
	"devDependencies": {
20 +
		"@cloudflare/workers-types": "latest",
18 21
		"@types/react": "latest",
19 22
		"typescript": "latest"
20 23
	}
docs/src/index.ts (added) +21 −0
1 +
import { Hono } from "hono";
2 +
3 +
type Bindings = {
4 +
	ASSETS: Fetcher;
5 +
};
6 +
7 +
const app = new Hono<{ Bindings: Bindings }>();
8 +
9 +
app.get("/oauth/callback", (c) => {
10 +
	return c.text("Not Implemented", 501);
11 +
});
12 +
13 +
app.get("/api/health", (c) => {
14 +
	return c.json({ status: "ok" });
15 +
});
16 +
17 +
app.all("*", (c) => {
18 +
	return c.env.ASSETS.fetch(c.req.raw);
19 +
});
20 +
21 +
export default app;
docs/tsconfig.json +2 −1
18 18
    "strict": true,
19 19
    "noUnusedLocals": true,
20 20
    "noUnusedParameters": true,
21 -
    "noFallthroughCasesInSwitch": true
21 +
    "noFallthroughCasesInSwitch": true,
22 +
    "types": ["@cloudflare/workers-types"]
22 23
  },
23 24
  "include": ["**/*.ts", "**/*.tsx"]
24 25
}
docs/wrangler.toml (added) +10 −0
1 +
name = "sequoia-docs"
2 +
main = "src/index.ts"
3 +
compatibility_date = "2025-04-01"
4 +
5 +
[assets]
6 +
directory = "./docs/dist"
7 +
binding = "ASSETS"
8 +
not_found_handling = "single-page-application"
9 +
html_handling = "auto-trailing-slash"
10 +
run_worker_first = ["/api/*", "/oauth/*"]