mirror of
https://github.com/openclaw/clawhub.git
synced 2026-08-14 08:52:21 +00:00
Compare commits
43
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e790c4d30a | ||
|
|
bbd517e5b5 | ||
|
|
54c793a660 | ||
|
|
5d9a89a885 | ||
|
|
31e9a57678 | ||
|
|
7680cc4ce8 | ||
|
|
de56255b95 | ||
|
|
eaaa5e4423 | ||
|
|
49e9c3c071 | ||
|
|
ef96fbee84 | ||
|
|
9fc032216e | ||
|
|
236058b1b5 | ||
|
|
595bd2cf05 | ||
|
|
918b5528df | ||
|
|
2f6f11af3f | ||
|
|
c90f92dbc7 | ||
|
|
8db8c89206 | ||
|
|
00c31dcdd4 | ||
|
|
47646937b6 | ||
|
|
10d250ea32 | ||
|
|
e7fa7afdf7 | ||
|
|
aa97727be8 | ||
|
|
d375496c17 | ||
|
|
9a912ee5eb | ||
|
|
11b257a062 | ||
|
|
02e509404a | ||
|
|
2cf6182991 | ||
|
|
e108789ab1 | ||
|
|
18bfea5035 | ||
|
|
5f93ddb390 | ||
|
|
2b552c4803 | ||
|
|
ece0b830fb | ||
|
|
57afea9de5 | ||
|
|
1e788b2e0c | ||
|
|
f025721261 | ||
|
|
c2cc61df24 | ||
|
|
7a8a3f75ce | ||
|
|
ac0bdf0375 | ||
|
|
6c7dd2ec6d | ||
|
|
c72e3007a1 | ||
|
|
b66d28a184 | ||
|
|
dddee828af | ||
|
|
106cb1896a |
@@ -15,10 +15,12 @@ jobs:
|
||||
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: 1.3.5
|
||||
bun-version: 1.3.6
|
||||
|
||||
- name: Install
|
||||
run: bun install --frozen-lockfile
|
||||
- name: Peer deps
|
||||
run: bun run check:peers
|
||||
|
||||
- name: Lint
|
||||
run: bun run lint
|
||||
@@ -36,4 +38,3 @@ jobs:
|
||||
|
||||
- name: Build
|
||||
run: bun run build
|
||||
|
||||
|
||||
@@ -21,3 +21,6 @@ todos.json
|
||||
.vscode
|
||||
.env*.local
|
||||
coverage
|
||||
playwright-report
|
||||
test-results
|
||||
.playwright
|
||||
|
||||
@@ -2,6 +2,23 @@
|
||||
|
||||
## Unreleased
|
||||
|
||||
### Fixed
|
||||
- Registry: drop missing skills during search hydration (thanks @aaronn, #28).
|
||||
|
||||
## 0.3.0 - 2026-01-19
|
||||
|
||||
### Added
|
||||
- CLI: add `explore` command for latest updates, with limit clamping + tests/docs (thanks @jdrhyne, #14).
|
||||
- CLI: `explore --json` output + new sorts (`installs`, `installsAllTime`, `trending`) and limit up to 200.
|
||||
- API: `/api/v1/skills` supports installs + trending sorts (7-day installs).
|
||||
- API: idempotent `POST/DELETE /api/v1/stars/{slug}` endpoints.
|
||||
- Registry: trending leaderboard + daily stats backfill for installs-based sorts.
|
||||
|
||||
### Fixed
|
||||
- Web: keep search mode navigation and state in sync (thanks @NACC96, #12).
|
||||
|
||||
## 0.2.0 - 2026-01-13
|
||||
|
||||
### Added
|
||||
- Web: dynamic OG image cards for skills (name, description, version).
|
||||
- CLI: auto-scan Clawdbot skill roots (per-agent workspaces, shared skills, extraDirs).
|
||||
@@ -14,6 +31,7 @@
|
||||
- Registry: make SoulHub auto-seed idempotent and non-user-owned.
|
||||
- Registry: keep GitHub backup state + publish backups intact (thanks @joshp123, #1).
|
||||
- CLI/Registry: restore fork lineage on sync + clamp bulk list queries (thanks @joshp123, #1).
|
||||
- CLI: default workdir falls back to Clawdbot workspace (override with `--workdir` / `CLAWDHUB_WORKDIR`).
|
||||
|
||||
## 0.0.6 - 2026-01-07
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"!**/.output",
|
||||
"!**/coverage",
|
||||
"!**/convex/_generated",
|
||||
"!**/test-results",
|
||||
"!**/src/routeTree.gen.ts",
|
||||
"!**/.tanstack",
|
||||
"!**/public",
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
{
|
||||
"lockfileVersion": 1,
|
||||
"configVersion": 0,
|
||||
"workspaces": {
|
||||
"": {
|
||||
"name": "clawdhub",
|
||||
"dependencies": {
|
||||
"@auth/core": "^0.41.1",
|
||||
"@auth/core": "^0.37.4",
|
||||
"@convex-dev/auth": "^0.0.90",
|
||||
"@fontsource/bricolage-grotesque": "^5.2.10",
|
||||
"@fontsource/ibm-plex-mono": "^5.2.7",
|
||||
@@ -14,17 +15,17 @@
|
||||
"@radix-ui/react-toggle-group": "^1.1.11",
|
||||
"@resvg/resvg-wasm": "^2.6.2",
|
||||
"@tailwindcss/vite": "^4.1.18",
|
||||
"@tanstack/react-devtools": "^0.9.0",
|
||||
"@tanstack/react-router": "^1.144.0",
|
||||
"@tanstack/react-router-devtools": "^1.144.0",
|
||||
"@tanstack/react-start": "^1.145.3",
|
||||
"@tanstack/router-plugin": "^1.145.2",
|
||||
"@tanstack/react-devtools": "^0.9.2",
|
||||
"@tanstack/react-router": "^1.151.6",
|
||||
"@tanstack/react-router-devtools": "^1.151.6",
|
||||
"@tanstack/react-start": "^1.152.0",
|
||||
"@tanstack/router-plugin": "^1.151.6",
|
||||
"@vercel/analytics": "^1.6.1",
|
||||
"clawdhub-schema": "^0.0.2",
|
||||
"clawdhub-schema": "workspace:*",
|
||||
"clsx": "^2.1.1",
|
||||
"convex": "^1.31.2",
|
||||
"convex": "^1.31.5",
|
||||
"fflate": "^0.8.2",
|
||||
"h3": "2.0.1-rc.5",
|
||||
"h3": "2.0.1-rc.8",
|
||||
"lucide-react": "^0.562.0",
|
||||
"monaco-editor": "^0.55.1",
|
||||
"nitro": "^3.0.1-alpha.1",
|
||||
@@ -35,31 +36,32 @@
|
||||
"semver": "^7.7.3",
|
||||
"tailwind-merge": "^3.4.0",
|
||||
"tailwindcss": "^4.1.18",
|
||||
"vite-tsconfig-paths": "^6.0.3",
|
||||
"vite-tsconfig-paths": "^6.0.4",
|
||||
"yaml": "^2.8.2",
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "^2.3.11",
|
||||
"@tanstack/devtools-vite": "^0.4.0",
|
||||
"@playwright/test": "^1.57.0",
|
||||
"@tanstack/devtools-vite": "^0.4.1",
|
||||
"@testing-library/dom": "^10.4.1",
|
||||
"@testing-library/react": "^16.3.1",
|
||||
"@types/node": "^25.0.3",
|
||||
"@types/react": "^19.2.7",
|
||||
"@types/node": "^25.0.9",
|
||||
"@types/react": "^19.2.8",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"@types/semver": "^7.7.1",
|
||||
"@vitejs/plugin-react": "^5.1.2",
|
||||
"@vitest/coverage-v8": "^4.0.16",
|
||||
"@vitest/coverage-v8": "^4.0.17",
|
||||
"jsdom": "^27.4.0",
|
||||
"oxlint": "^1.36.0",
|
||||
"oxlint-tsgolint": "^0.10.1",
|
||||
"oxlint": "^1.39.0",
|
||||
"oxlint-tsgolint": "^0.11.1",
|
||||
"typescript": "^5.9.3",
|
||||
"vite": "^7.3.0",
|
||||
"vitest": "^4.0.16",
|
||||
"vite": "^7.3.1",
|
||||
"vitest": "^4.0.17",
|
||||
},
|
||||
},
|
||||
"packages/clawdhub": {
|
||||
"name": "clawdhub",
|
||||
"version": "0.1.0",
|
||||
"version": "0.3.0",
|
||||
"bin": {
|
||||
"clawdhub": "bin/clawdhub.js",
|
||||
},
|
||||
@@ -74,9 +76,10 @@
|
||||
"ora": "^9.0.0",
|
||||
"p-retry": "^7.1.1",
|
||||
"semver": "^7.7.3",
|
||||
"undici": "^7.16.0",
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^25.0.3",
|
||||
"@types/node": "^25.0.9",
|
||||
"typescript": "^5.9.3",
|
||||
},
|
||||
},
|
||||
@@ -104,7 +107,7 @@
|
||||
|
||||
"@asamuzakjp/nwsapi": ["@asamuzakjp/nwsapi@2.3.9", "", {}, "sha512-n8GuYSrI9bF7FFZ/SjhwevlHc8xaVlb/7HmHelnc/PZXBD2ZR49NnN9sMMuDdEGPeeRQ5d0hqlSlEpgCX3Wl0Q=="],
|
||||
|
||||
"@auth/core": ["@auth/core@0.41.1", "", { "dependencies": { "@panva/hkdf": "^1.2.1", "jose": "^6.0.6", "oauth4webapi": "^3.3.0", "preact": "10.24.3", "preact-render-to-string": "6.5.11" }, "peerDependencies": { "@simplewebauthn/browser": "^9.0.1", "@simplewebauthn/server": "^9.0.2", "nodemailer": "^7.0.7" }, "optionalPeers": ["@simplewebauthn/browser", "@simplewebauthn/server", "nodemailer"] }, "sha512-t9cJ2zNYAdWMacGRMT6+r4xr1uybIdmYa49calBPeTqwgAFPV/88ac9TEvCR85pvATiSPt8VaNf+Gt24JIT/uw=="],
|
||||
"@auth/core": ["@auth/core@0.37.4", "", { "dependencies": { "@panva/hkdf": "^1.2.1", "jose": "^5.9.6", "oauth4webapi": "^3.1.1", "preact": "10.24.3", "preact-render-to-string": "6.5.11" }, "peerDependencies": { "@simplewebauthn/browser": "^9.0.1", "@simplewebauthn/server": "^9.0.2", "nodemailer": "^6.8.0" }, "optionalPeers": ["@simplewebauthn/browser", "@simplewebauthn/server", "nodemailer"] }, "sha512-HOXJwXWXQRhbBDHlMU0K/6FT1v+wjtzdKhsNg0ZN7/gne6XPsIrjZ4daMcFnbq0Z/vsAbYBinQhhua0d77v7qw=="],
|
||||
|
||||
"@babel/code-frame": ["@babel/code-frame@7.27.1", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.27.1", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" } }, "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg=="],
|
||||
|
||||
@@ -354,36 +357,38 @@
|
||||
|
||||
"@oxc-transform/binding-win32-x64-msvc": ["@oxc-transform/binding-win32-x64-msvc@0.96.0", "", { "os": "win32", "cpu": "x64" }, "sha512-0fI0P0W7bSO/GCP/N5dkmtB9vBqCA4ggo1WmXTnxNJVmFFOtcA1vYm1I9jl8fxo+sucW2WnlpnI4fjKdo3JKxA=="],
|
||||
|
||||
"@oxlint-tsgolint/darwin-arm64": ["@oxlint-tsgolint/darwin-arm64@0.10.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-KGC4++BeEqrIcmDHiJt/e6/860PWJmUJjjp0mE+smpBmRXMjmOFFjrPmN+ZyCyVgf1WdmhPkQXsRSPeTR+2omw=="],
|
||||
"@oxlint-tsgolint/darwin-arm64": ["@oxlint-tsgolint/darwin-arm64@0.11.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-UJIOFeJZpFTJIGS+bMdFXcvjslvnXBEouMvzynfQD7RTazcFIRLbokYgEbhrN2P6B352Ut1TUtvR0CLAp/9QfA=="],
|
||||
|
||||
"@oxlint-tsgolint/darwin-x64": ["@oxlint-tsgolint/darwin-x64@0.10.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-tvmrDgj3Q0tdc+zMWfCVLVq8EQDEUqasm1zaWgSMYIszpID6qdgqbT+OpWWXV9fLZgtvrkoXGwxkHAUJzdVZXQ=="],
|
||||
"@oxlint-tsgolint/darwin-x64": ["@oxlint-tsgolint/darwin-x64@0.11.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-68O8YvexIm+ISZKl2vBFII1dMfLrteDyPcuCIecDuiBIj2tV0KYq13zpSCMz4dvJUWJW6RmOOGZKrkkvOAy6uQ=="],
|
||||
|
||||
"@oxlint-tsgolint/linux-arm64": ["@oxlint-tsgolint/linux-arm64@0.10.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-7kD28z6/ykGx8WetKTPRZt30pd+ziassxg/8cM24lhjUI+hNXyRHVtHes73dh9D6glJKno+1ut+3amUdZBZcpQ=="],
|
||||
"@oxlint-tsgolint/linux-arm64": ["@oxlint-tsgolint/linux-arm64@0.11.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-hXBInrFxPNbPPbPQYozo8YpSsFFYdtHBWRUiLMxul71vTy1CdSA7H5Qq2KbrKomr/ASmhvIDVAQZxh9hIJNHMA=="],
|
||||
|
||||
"@oxlint-tsgolint/linux-x64": ["@oxlint-tsgolint/linux-x64@0.10.1", "", { "os": "linux", "cpu": "x64" }, "sha512-NmJmiqdzYUTHIxteSTyX6IFFgnIsOAjRWXfrS6Jbo5xlB3g39WHniSF3asB/khLJNtwSg4InUS34NprYM7zrEw=="],
|
||||
"@oxlint-tsgolint/linux-x64": ["@oxlint-tsgolint/linux-x64@0.11.1", "", { "os": "linux", "cpu": "x64" }, "sha512-aMaGctlwrJhaIQPOdVJR+AGHZGPm4D1pJ457l0SqZt4dLXAhuUt2ene6cUUGF+864R7bDyFVGZqbZHODYpENyA=="],
|
||||
|
||||
"@oxlint-tsgolint/win32-arm64": ["@oxlint-tsgolint/win32-arm64@0.10.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-3KrT80vl3nXUkjuJI/z8dF6xWsKx0t9Tz4ZQHgQw3fYw+CoihBRWGklrdlmCz+EGfMyVaQLqBV9PZckhSqLe2A=="],
|
||||
"@oxlint-tsgolint/win32-arm64": ["@oxlint-tsgolint/win32-arm64@0.11.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-ipOs6kKo8fz5n5LSHvcbyZFmEpEIsh2m7+B03RW3jGjBEPMiXb4PfKNuxnusFYTtJM9WaR3bCVm5UxeJTA8r3w=="],
|
||||
|
||||
"@oxlint-tsgolint/win32-x64": ["@oxlint-tsgolint/win32-x64@0.10.1", "", { "os": "win32", "cpu": "x64" }, "sha512-hW1fSJZVxG51sLdGq1sQjOzb1tsQ23z/BquJfUwL7CqBobxr7TJvGmoINL+9KryOJt0jCoaiMfWe4yoYw5XfIA=="],
|
||||
"@oxlint-tsgolint/win32-x64": ["@oxlint-tsgolint/win32-x64@0.11.1", "", { "os": "win32", "cpu": "x64" }, "sha512-m2apsAXg6qU3ulQG45W/qshyEpOjoL+uaQyXJG5dBoDoa66XPtCaSkBlKltD0EwGu0aoB8lM4I5I3OzQ6raNhw=="],
|
||||
|
||||
"@oxlint/darwin-arm64": ["@oxlint/darwin-arm64@1.36.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-MJkj82GH+nhvWKJhSIM6KlZ8tyGKdogSQXtNdpIyP02r/tTayFJQaAEWayG2Jhsn93kske+nimg5MYFhwO/rlg=="],
|
||||
"@oxlint/darwin-arm64": ["@oxlint/darwin-arm64@1.39.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-lT3hNhIa02xCujI6YGgjmYGg3Ht/X9ag5ipUVETaMpx5Rd4BbTNWUPif1WN1YZHxt3KLCIqaAe7zVhatv83HOQ=="],
|
||||
|
||||
"@oxlint/darwin-x64": ["@oxlint/darwin-x64@1.36.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-VvEhfkqj/99dCTqOcfkyFXOSbx4lIy5u2m2GHbK4WCMDySokOcMTNRHGw8fH/WgQ5cDrDMSTYIGQTmnBGi9tiQ=="],
|
||||
"@oxlint/darwin-x64": ["@oxlint/darwin-x64@1.39.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-UT+rfTWd+Yr7iJeSLd/7nF8X4gTYssKh+n77hxl6Oilp3NnG1CKRHxZDy3o3lIBnwgzJkdyUAiYWO1bTMXQ1lA=="],
|
||||
|
||||
"@oxlint/linux-arm64-gnu": ["@oxlint/linux-arm64-gnu@1.36.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-EMx92X5q+hHc3olTuj/kgkx9+yP0p/AVs4yvHbUfzZhBekXNpUWxWvg4hIKmQWn+Ee2j4o80/0ACGO0hDYJ9mg=="],
|
||||
"@oxlint/linux-arm64-gnu": ["@oxlint/linux-arm64-gnu@1.39.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-qocBkvS2V6rH0t9AT3DfQunMnj3xkM7srs5/Ycj2j5ZqMoaWd/FxHNVJDFP++35roKSvsRJoS0mtA8/77jqm6Q=="],
|
||||
|
||||
"@oxlint/linux-arm64-musl": ["@oxlint/linux-arm64-musl@1.36.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-7YCxtrPIctVYLqWrWkk8pahdCxch6PtsaucfMLC7TOlDt4nODhnQd4yzEscKqJ8Gjrw1bF4g+Ngob1gB+Qr9Fw=="],
|
||||
"@oxlint/linux-arm64-musl": ["@oxlint/linux-arm64-musl@1.39.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-arZzAc1PPcz9epvGBBCMHICeyQloKtHX3eoOe62B3Dskn7gf6Q14wnDHr1r9Vp4vtcBATNq6HlKV14smdlC/qA=="],
|
||||
|
||||
"@oxlint/linux-x64-gnu": ["@oxlint/linux-x64-gnu@1.36.0", "", { "os": "linux", "cpu": "x64" }, "sha512-lnaJVlx5r3NWmoOMesfQXJSf78jHTn8Z+sdAf795Kgteo72+qGC1Uax2SToCJVN2J8PNG3oRV5bLriiCNR2i6Q=="],
|
||||
"@oxlint/linux-x64-gnu": ["@oxlint/linux-x64-gnu@1.39.0", "", { "os": "linux", "cpu": "x64" }, "sha512-ZVt5qsECpuNprdWxAPpDBwoixr1VTcZ4qAEQA2l/wmFyVPDYFD3oBY/SWACNnWBddMrswjTg9O8ALxYWoEpmXw=="],
|
||||
|
||||
"@oxlint/linux-x64-musl": ["@oxlint/linux-x64-musl@1.36.0", "", { "os": "linux", "cpu": "x64" }, "sha512-AhuEU2Qdl66lSfTGu/Htirq8r/8q2YnZoG3yEXLMQWnPMn7efy8spD/N1NA7kH0Hll+cdfwgQkQqC2G4MS2lPQ=="],
|
||||
"@oxlint/linux-x64-musl": ["@oxlint/linux-x64-musl@1.39.0", "", { "os": "linux", "cpu": "x64" }, "sha512-pB0hlGyKPbxr9NMIV783lD6cWL3MpaqnZRM9MWni4yBdHPTKyFNYdg5hGD0Bwg+UP4S2rOevq/+OO9x9Bi7E6g=="],
|
||||
|
||||
"@oxlint/win32-arm64": ["@oxlint/win32-arm64@1.36.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-GlWCBjUJY2QgvBFuNRkiRJu7K/djLmM0UQKfZV8IN+UXbP/JbjZHWKRdd4LXlQmzoz7M5Hd6p+ElCej8/90FCg=="],
|
||||
"@oxlint/win32-arm64": ["@oxlint/win32-arm64@1.39.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-Gg2SFaJohI9+tIQVKXlPw3FsPQFi/eCSWiCgwPtPn5uzQxHRTeQEZKuluz1fuzR5U70TXubb2liZi4Dgl8LJQA=="],
|
||||
|
||||
"@oxlint/win32-x64": ["@oxlint/win32-x64@1.36.0", "", { "os": "win32", "cpu": "x64" }, "sha512-J+Vc00Utcf8p77lZPruQgb0QnQXuKnFogN88kCnOqs2a83I+vTBB8ILr0+L9sTwVRvIDMSC0pLdeQH4svWGFZg=="],
|
||||
"@oxlint/win32-x64": ["@oxlint/win32-x64@1.39.0", "", { "os": "win32", "cpu": "x64" }, "sha512-sbi25lfj74hH+6qQtb7s1wEvd1j8OQbTaH8v3xTcDjrwm579Cyh0HBv1YSZ2+gsnVwfVDiCTL1D0JsNqYXszVA=="],
|
||||
|
||||
"@panva/hkdf": ["@panva/hkdf@1.2.1", "", {}, "sha512-6oclG6Y3PiDFcoyk8srjLfVKyMfVCKJ27JwNPViuXziFpmdz+MZnZN/aKY0JGXgYuO/VghU0jcOAZgWXZ1Dmrw=="],
|
||||
|
||||
"@playwright/test": ["@playwright/test@1.57.0", "", { "dependencies": { "playwright": "1.57.0" }, "bin": { "playwright": "cli.js" } }, "sha512-6TyEnHgd6SArQO8UO2OMTxshln3QMWBtPGrOCgs3wVEmQmwyuNtB10IZMfmYDE0riwNR1cu4q+pPcxMVtaG3TA=="],
|
||||
|
||||
"@radix-ui/primitive": ["@radix-ui/primitive@1.1.3", "", {}, "sha512-JTF99U/6XIjCBo0wqkU5sK10glYe27MRRsfwoiq5zzOEZLHU3A3KCMa5X/azekYRCJ0HlwI0crAXS/5dEHTzDg=="],
|
||||
|
||||
"@radix-ui/react-arrow": ["@radix-ui/react-arrow@1.1.7", "", { "dependencies": { "@radix-ui/react-primitive": "2.1.3" }, "peerDependencies": { "@types/react": "*", "@types/react-dom": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react", "@types/react-dom"] }, "sha512-F+M1tLhO+mlQaOWspE8Wstg+z6PwxwRd8oQ8IXceWz92kfAmalTRf0EjrouQeo7QssEPfCn05B4Ihs1K9WQ/7w=="],
|
||||
@@ -532,7 +537,7 @@
|
||||
|
||||
"@tailwindcss/vite": ["@tailwindcss/vite@4.1.18", "", { "dependencies": { "@tailwindcss/node": "4.1.18", "@tailwindcss/oxide": "4.1.18", "tailwindcss": "4.1.18" }, "peerDependencies": { "vite": "^5.2.0 || ^6 || ^7" } }, "sha512-jVA+/UpKL1vRLg6Hkao5jldawNmRo7mQYrZtNHMIVpLfLhDml5nMRUo/8MwoX2vNXvnaXNNMedrMfMugAVX1nA=="],
|
||||
|
||||
"@tanstack/devtools": ["@tanstack/devtools@0.10.1", "", { "dependencies": { "@solid-primitives/event-listener": "^2.4.3", "@solid-primitives/keyboard": "^1.3.3", "@solid-primitives/resize-observer": "^2.1.3", "@tanstack/devtools-client": "0.0.5", "@tanstack/devtools-event-bus": "0.4.0", "@tanstack/devtools-ui": "0.4.4", "clsx": "^2.1.1", "goober": "^2.1.16", "solid-js": "^1.9.9" } }, "sha512-1gtPmCDXV4Pl1nVtoqwjV0tc4E9GMuFtlkBX1Lz1KfqI3W9JojT5YsVifOQ/g8BTQ5w5+tyIANwHU7WYgLq/MQ=="],
|
||||
"@tanstack/devtools": ["@tanstack/devtools@0.10.3", "", { "dependencies": { "@solid-primitives/event-listener": "^2.4.3", "@solid-primitives/keyboard": "^1.3.3", "@solid-primitives/resize-observer": "^2.1.3", "@tanstack/devtools-client": "0.0.5", "@tanstack/devtools-event-bus": "0.4.0", "@tanstack/devtools-ui": "0.4.4", "clsx": "^2.1.1", "goober": "^2.1.16", "solid-js": "^1.9.9" } }, "sha512-M2HnKtaNf3Z8JDTNDq+X7/1gwOqSwTnCyC0GR+TYiRZM9mkY9GpvTqp6p6bx3DT8onu2URJiVxgHD9WK2e3MNQ=="],
|
||||
|
||||
"@tanstack/devtools-client": ["@tanstack/devtools-client@0.0.5", "", { "dependencies": { "@tanstack/devtools-event-client": "^0.4.0" } }, "sha512-hsNDE3iu4frt9cC2ppn1mNRnLKo2uc1/1hXAyY9z4UYb+o40M2clFAhiFoo4HngjfGJDV3x18KVVIq7W4Un+zA=="],
|
||||
|
||||
@@ -542,47 +547,47 @@
|
||||
|
||||
"@tanstack/devtools-ui": ["@tanstack/devtools-ui@0.4.4", "", { "dependencies": { "clsx": "^2.1.1", "goober": "^2.1.16", "solid-js": "^1.9.9" } }, "sha512-5xHXFyX3nom0UaNfiOM92o6ziaHjGo3mcSGe2HD5Xs8dWRZNpdZ0Smd0B9ddEhy0oB+gXyMzZgUJb9DmrZV0Mg=="],
|
||||
|
||||
"@tanstack/devtools-vite": ["@tanstack/devtools-vite@0.4.0", "", { "dependencies": { "@babel/core": "^7.28.4", "@babel/generator": "^7.28.3", "@babel/parser": "^7.28.4", "@babel/traverse": "^7.28.4", "@babel/types": "^7.28.4", "@tanstack/devtools-client": "0.0.5", "@tanstack/devtools-event-bus": "0.4.0", "chalk": "^5.6.2", "launch-editor": "^2.11.1", "picomatch": "^4.0.3" }, "peerDependencies": { "vite": "^6.0.0 || ^7.0.0" } }, "sha512-vZ5SsjcLSLC+lBb4N6QDJEdrsrORs8OtIcwQafexAR7aJOv6SxGNoqERujEbTzfWY+PAypa1oYxPqtEAOcitDw=="],
|
||||
"@tanstack/devtools-vite": ["@tanstack/devtools-vite@0.4.1", "", { "dependencies": { "@babel/core": "^7.28.4", "@babel/generator": "^7.28.3", "@babel/parser": "^7.28.4", "@babel/traverse": "^7.28.4", "@babel/types": "^7.28.4", "@tanstack/devtools-client": "0.0.5", "@tanstack/devtools-event-bus": "0.4.0", "chalk": "^5.6.2", "launch-editor": "^2.11.1", "picomatch": "^4.0.3" }, "peerDependencies": { "vite": "^6.0.0 || ^7.0.0" } }, "sha512-PkMOomcWnl/pUkCqIjqL/csjPHtkMVBirDpJVOZR7XJZDxo5CuD7B+3KsujFCF4Dsn6QYlae97gCZvxi/CB76Q=="],
|
||||
|
||||
"@tanstack/history": ["@tanstack/history@1.141.0", "", {}, "sha512-LS54XNyxyTs5m/pl1lkwlg7uZM3lvsv2FIIV1rsJgnfwVCnI+n4ZGZ2CcjNT13BPu/3hPP+iHmliBSscJxW5FQ=="],
|
||||
"@tanstack/history": ["@tanstack/history@1.151.1", "", {}, "sha512-Z/eymNBuUGHYIea7nNX3xR5feqx418ChlwWOKklVpCVzEQ5Q3kNTUw+WK4HYUKxF+1uXFN01Dbuhhl7SmW1LJA=="],
|
||||
|
||||
"@tanstack/react-devtools": ["@tanstack/react-devtools@0.9.0", "", { "dependencies": { "@tanstack/devtools": "0.10.1" }, "peerDependencies": { "@types/react": ">=16.8", "@types/react-dom": ">=16.8", "react": ">=16.8", "react-dom": ">=16.8" } }, "sha512-Lq0svXOTG5N61SHgx8F0on6zz2GB0kmFjN/yyfNLrJyRgJ+U3jYFRd9ti3uBPABsXzHQMHYYujnTXrOYp/OaUg=="],
|
||||
"@tanstack/react-devtools": ["@tanstack/react-devtools@0.9.2", "", { "dependencies": { "@tanstack/devtools": "0.10.3" }, "peerDependencies": { "@types/react": ">=16.8", "@types/react-dom": ">=16.8", "react": ">=16.8", "react-dom": ">=16.8" } }, "sha512-JNXvBO3jgq16GzTVm7p65n5zHNfMhnqF6Bm7CawjoqZrjEakxbM6Yvy63aKSIpbrdf+Wun2Xn8P0qD+vp56e1g=="],
|
||||
|
||||
"@tanstack/react-router": ["@tanstack/react-router@1.144.0", "", { "dependencies": { "@tanstack/history": "1.141.0", "@tanstack/react-store": "^0.8.0", "@tanstack/router-core": "1.144.0", "isbot": "^5.1.22", "tiny-invariant": "^1.3.3", "tiny-warning": "^1.0.3" }, "peerDependencies": { "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0" } }, "sha512-GmRyIGmHtGj3VLTHXepIwXAxTcHyL5W7Vw7O1CnVEtFxQQWKMVOnWgI7tPY6FhlNwMKVb3n0mPFWz9KMYyd2GA=="],
|
||||
"@tanstack/react-router": ["@tanstack/react-router@1.151.6", "", { "dependencies": { "@tanstack/history": "1.151.1", "@tanstack/react-store": "^0.8.0", "@tanstack/router-core": "1.151.6", "isbot": "^5.1.22", "tiny-invariant": "^1.3.3", "tiny-warning": "^1.0.3" }, "peerDependencies": { "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0" } }, "sha512-KDbz7kacZCOoDrUwYljz4I/qjqVGq+bgUhpi/CWubi7by0GZ3JEECwFl/+k+4V6ATinJDjTNmCGwFcdwqjQDtA=="],
|
||||
|
||||
"@tanstack/react-router-devtools": ["@tanstack/react-router-devtools@1.144.0", "", { "dependencies": { "@tanstack/router-devtools-core": "1.144.0" }, "peerDependencies": { "@tanstack/react-router": "^1.144.0", "@tanstack/router-core": "^1.144.0", "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0" }, "optionalPeers": ["@tanstack/router-core"] }, "sha512-nstjZvZbOM4U0/Hzi82rtsP1DsR2tfigBidK+WuaDRVVstBsnwVor3DQXTGY5CcfgIiMI3eKzI17VOy3SQDDoQ=="],
|
||||
"@tanstack/react-router-devtools": ["@tanstack/react-router-devtools@1.151.6", "", { "dependencies": { "@tanstack/router-devtools-core": "1.151.6" }, "peerDependencies": { "@tanstack/react-router": "^1.151.6", "@tanstack/router-core": "^1.151.6", "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0" }, "optionalPeers": ["@tanstack/router-core"] }, "sha512-mRRFzIAIOAWYcZrEr0FYy/1FmM51iWwUdK0J3nWuXjAIeEb7uizS0HkeNbzX5yxfGZgkplk23eCXIUmJcDuVRQ=="],
|
||||
|
||||
"@tanstack/react-start": ["@tanstack/react-start@1.145.3", "", { "dependencies": { "@tanstack/react-router": "1.144.0", "@tanstack/react-start-client": "1.145.0", "@tanstack/react-start-server": "1.145.3", "@tanstack/router-utils": "^1.143.11", "@tanstack/start-client-core": "1.145.0", "@tanstack/start-plugin-core": "1.145.3", "@tanstack/start-server-core": "1.145.3", "pathe": "^2.0.3" }, "peerDependencies": { "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0", "vite": ">=7.0.0" } }, "sha512-ZRd0VbcpPSmYTGdR7PF5LdyPnB7rd4zfyuf8bjtUbjphh4P0wjE3DUTA7Mk29RMvvo6sS7Advjsax9ZqEevLgg=="],
|
||||
"@tanstack/react-start": ["@tanstack/react-start@1.152.0", "", { "dependencies": { "@tanstack/react-router": "1.151.6", "@tanstack/react-start-client": "1.152.0", "@tanstack/react-start-server": "1.152.0", "@tanstack/router-utils": "^1.143.11", "@tanstack/start-client-core": "1.152.0", "@tanstack/start-plugin-core": "1.152.0", "@tanstack/start-server-core": "1.152.0", "pathe": "^2.0.3" }, "peerDependencies": { "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0", "vite": ">=7.0.0" } }, "sha512-btRNNIJGnXVEmD9yuiyNRvMITX5aocVJVdv/LQHxca4EcxntPEn1+HboPXFr6SDl9UNekH/6NZqv3LPz9tDm7A=="],
|
||||
|
||||
"@tanstack/react-start-client": ["@tanstack/react-start-client@1.145.0", "", { "dependencies": { "@tanstack/react-router": "1.144.0", "@tanstack/router-core": "1.144.0", "@tanstack/start-client-core": "1.145.0", "tiny-invariant": "^1.3.3", "tiny-warning": "^1.0.3" }, "peerDependencies": { "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0" } }, "sha512-UC/+ONaOzuFnlHbOEudYS+AHOrcwAJaqbnfh9zZ5pUtTkJToBawW3YabDbMnS3o6lEiKggc8uGpsiCglUJrBcA=="],
|
||||
"@tanstack/react-start-client": ["@tanstack/react-start-client@1.152.0", "", { "dependencies": { "@tanstack/react-router": "1.151.6", "@tanstack/router-core": "1.151.6", "@tanstack/start-client-core": "1.152.0", "tiny-invariant": "^1.3.3", "tiny-warning": "^1.0.3" }, "peerDependencies": { "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0" } }, "sha512-YI2VVdCLk86QP5Q0oMXZWdk551haIisuF5AIr+S9ZAF415s4AgDpKRlXX251aqiHXYvv4rFnV1c9o7w02031Cw=="],
|
||||
|
||||
"@tanstack/react-start-server": ["@tanstack/react-start-server@1.145.3", "", { "dependencies": { "@tanstack/history": "1.141.0", "@tanstack/react-router": "1.144.0", "@tanstack/router-core": "1.144.0", "@tanstack/start-client-core": "1.145.0", "@tanstack/start-server-core": "1.145.3" }, "peerDependencies": { "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0" } }, "sha512-HHFq8KTUUsgjifNpYfU7o1jJaVmrwhrjtqQuabGiRseaeIRd4qIGsIS6M1bmOM4+5sYZLKm+lkP6oxgOBuvvaQ=="],
|
||||
"@tanstack/react-start-server": ["@tanstack/react-start-server@1.152.0", "", { "dependencies": { "@tanstack/history": "1.151.1", "@tanstack/react-router": "1.151.6", "@tanstack/router-core": "1.151.6", "@tanstack/start-client-core": "1.152.0", "@tanstack/start-server-core": "1.152.0" }, "peerDependencies": { "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0" } }, "sha512-oz3J3Ipj04IUAfVSE1DD41x8+7DDWHZez+fCqLnk8sw63ct013CeKwIvW9v1n0OtU6axekuVHHYBOsF5wO5/lg=="],
|
||||
|
||||
"@tanstack/react-store": ["@tanstack/react-store@0.8.0", "", { "dependencies": { "@tanstack/store": "0.8.0", "use-sync-external-store": "^1.6.0" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-1vG9beLIuB7q69skxK9r5xiLN3ztzIPfSQSs0GfeqWGO2tGIyInZx0x1COhpx97RKaONSoAb8C3dxacWksm1ow=="],
|
||||
|
||||
"@tanstack/router-core": ["@tanstack/router-core@1.144.0", "", { "dependencies": { "@tanstack/history": "1.141.0", "@tanstack/store": "^0.8.0", "cookie-es": "^2.0.0", "seroval": "^1.4.1", "seroval-plugins": "^1.4.0", "tiny-invariant": "^1.3.3", "tiny-warning": "^1.0.3" } }, "sha512-6oVERtK9XDHCP4XojgHsdHO56ZSj11YaWjF5g/zw39LhyA6Lx+/X86AEIHO4y0BUrMQaJfcjdAQMVSAs6Vjtdg=="],
|
||||
"@tanstack/router-core": ["@tanstack/router-core@1.151.6", "", { "dependencies": { "@tanstack/history": "1.151.1", "@tanstack/store": "^0.8.0", "cookie-es": "^2.0.0", "seroval": "^1.4.1", "seroval-plugins": "^1.4.0", "tiny-invariant": "^1.3.3", "tiny-warning": "^1.0.3" } }, "sha512-eyqWx6vhKffkINWLujDF2sxAG9GE/XUdi3HrlD94ddJO9MBi/90a1HJaTYFSV8LmngjcRv8A3tt7OvFdv/UqhA=="],
|
||||
|
||||
"@tanstack/router-devtools-core": ["@tanstack/router-devtools-core@1.144.0", "", { "dependencies": { "clsx": "^2.1.1", "goober": "^2.1.16", "tiny-invariant": "^1.3.3" }, "peerDependencies": { "@tanstack/router-core": "^1.144.0", "csstype": "^3.0.10", "solid-js": ">=1.9.5" }, "optionalPeers": ["csstype"] }, "sha512-rbpQn1aHUtcfY3U3SyJqOZRqDu0a2uPK+TE2CH50HieJApmCuNKj5RsjVQYHgwiFFvR0w0LUmueTnl2X2hiWTg=="],
|
||||
"@tanstack/router-devtools-core": ["@tanstack/router-devtools-core@1.151.6", "", { "dependencies": { "clsx": "^2.1.1", "goober": "^2.1.16", "tiny-invariant": "^1.3.3" }, "peerDependencies": { "@tanstack/router-core": "^1.151.6", "csstype": "^3.0.10" }, "optionalPeers": ["csstype"] }, "sha512-OHGGvEtnANEbEwjYCChbvCyCLk/3Cqh9G5bhM5DVqrZ+b9wfeu46IdEsbSi1JfuK2sCHNMS5MrJaE2HZPsFx6Q=="],
|
||||
|
||||
"@tanstack/router-generator": ["@tanstack/router-generator@1.145.2", "", { "dependencies": { "@tanstack/router-core": "1.144.0", "@tanstack/router-utils": "1.143.11", "@tanstack/virtual-file-routes": "1.141.0", "prettier": "^3.5.0", "recast": "^0.23.11", "source-map": "^0.7.4", "tsx": "^4.19.2", "zod": "^3.24.2" } }, "sha512-6DLwfqhexgxw2T2QuS9Y349Vb49hCXBIz9mjWyynjMrpejLXJL+PaHaKJw0Y+H7Ao6RE2vlvXCc2cMjgbz5c7Q=="],
|
||||
"@tanstack/router-generator": ["@tanstack/router-generator@1.151.6", "", { "dependencies": { "@tanstack/router-core": "1.151.6", "@tanstack/router-utils": "1.143.11", "@tanstack/virtual-file-routes": "1.145.4", "prettier": "^3.5.0", "recast": "^0.23.11", "source-map": "^0.7.4", "tsx": "^4.19.2", "zod": "^3.24.2" } }, "sha512-IS4tkrkLIwI2EViGlUXCVgnKJ4EhWMM6w75XoJqd0X4t6K0/OiHkr3AQ0f2qZXbNciqLGxS88GLe5UiSAOS5Vw=="],
|
||||
|
||||
"@tanstack/router-plugin": ["@tanstack/router-plugin@1.145.2", "", { "dependencies": { "@babel/core": "^7.28.5", "@babel/plugin-syntax-jsx": "^7.27.1", "@babel/plugin-syntax-typescript": "^7.27.1", "@babel/template": "^7.27.2", "@babel/traverse": "^7.28.5", "@babel/types": "^7.28.5", "@tanstack/router-core": "1.144.0", "@tanstack/router-generator": "1.145.2", "@tanstack/router-utils": "1.143.11", "@tanstack/virtual-file-routes": "1.141.0", "babel-dead-code-elimination": "^1.0.11", "chokidar": "^3.6.0", "unplugin": "^2.1.2", "zod": "^3.24.2" }, "peerDependencies": { "@rsbuild/core": ">=1.0.2", "@tanstack/react-router": "^1.144.0", "vite": ">=5.0.0 || >=6.0.0 || >=7.0.0", "vite-plugin-solid": "^2.11.10", "webpack": ">=5.92.0" }, "optionalPeers": ["@rsbuild/core", "@tanstack/react-router", "vite", "vite-plugin-solid", "webpack"] }, "sha512-dOABjCE4M2KxB+f/mY71dDZduwVTpf+tCPb4NxmAqbF5Rxes24QaaIZQmiU12jte/L8zYyIA/yX9fi93xZue5Q=="],
|
||||
"@tanstack/router-plugin": ["@tanstack/router-plugin@1.151.6", "", { "dependencies": { "@babel/core": "^7.28.5", "@babel/plugin-syntax-jsx": "^7.27.1", "@babel/plugin-syntax-typescript": "^7.27.1", "@babel/template": "^7.27.2", "@babel/traverse": "^7.28.5", "@babel/types": "^7.28.5", "@tanstack/router-core": "1.151.6", "@tanstack/router-generator": "1.151.6", "@tanstack/router-utils": "1.143.11", "@tanstack/virtual-file-routes": "1.145.4", "babel-dead-code-elimination": "^1.0.11", "chokidar": "^3.6.0", "unplugin": "^2.1.2", "zod": "^3.24.2" }, "peerDependencies": { "@rsbuild/core": ">=1.0.2", "@tanstack/react-router": "^1.151.6", "vite": ">=5.0.0 || >=6.0.0 || >=7.0.0", "vite-plugin-solid": "^2.11.10", "webpack": ">=5.92.0" }, "optionalPeers": ["@rsbuild/core", "@tanstack/react-router", "vite", "vite-plugin-solid", "webpack"] }, "sha512-Kz9wmAgcylung1KoXvEEVTW91PNh4U65MgVwSmz5fYQP7UqNHPvHqBFWKEu17a45SfZ4LufsNW3LTFT35tWGXg=="],
|
||||
|
||||
"@tanstack/router-utils": ["@tanstack/router-utils@1.143.11", "", { "dependencies": { "@babel/core": "^7.28.5", "@babel/generator": "^7.28.5", "@babel/parser": "^7.28.5", "ansis": "^4.1.0", "diff": "^8.0.2", "pathe": "^2.0.3", "tinyglobby": "^0.2.15" } }, "sha512-N24G4LpfyK8dOlnP8BvNdkuxg1xQljkyl6PcrdiPSA301pOjatRT1y8wuCCJZKVVD8gkd0MpCZ0VEjRMGILOtA=="],
|
||||
|
||||
"@tanstack/start-client-core": ["@tanstack/start-client-core@1.145.0", "", { "dependencies": { "@tanstack/router-core": "1.144.0", "@tanstack/start-fn-stubs": "1.143.8", "@tanstack/start-storage-context": "1.144.0", "seroval": "^1.4.1", "tiny-invariant": "^1.3.3", "tiny-warning": "^1.0.3" } }, "sha512-pqINeN7ZqdfTZrkhy9C7isxRr8U3cByH5ZtLVnUxJp9fvLgwX7LlI+OWpGI0q3E8f/mHMUqJdeE56+atSs8Khw=="],
|
||||
"@tanstack/start-client-core": ["@tanstack/start-client-core@1.152.0", "", { "dependencies": { "@tanstack/router-core": "1.151.6", "@tanstack/start-fn-stubs": "1.151.3", "@tanstack/start-storage-context": "1.151.6", "seroval": "^1.4.1", "tiny-invariant": "^1.3.3", "tiny-warning": "^1.0.3" } }, "sha512-G88urpJImiGZttawtciSj46Ko57TXO2pd11Zef6Yw1VLD6fJs+RF0q9N0P98SGs9Jm0oUjLusi3Ti550fkQ2qw=="],
|
||||
|
||||
"@tanstack/start-fn-stubs": ["@tanstack/start-fn-stubs@1.143.8", "", {}, "sha512-2IKUPh/TlxwzwHMiHNeFw95+L2sD4M03Es27SxMR0A60Qc4WclpaD6gpC8FsbuNASM2jBxk2UyeYClJxW1GOAQ=="],
|
||||
"@tanstack/start-fn-stubs": ["@tanstack/start-fn-stubs@1.151.3", "", {}, "sha512-/zWBnfsOwact936Bn0CxigudU1QRZdiNTsK7ME/LMXXA66XsDxkryX5+5FeGwU5ETNPfLAx6pRUet1mtUKnLCg=="],
|
||||
|
||||
"@tanstack/start-plugin-core": ["@tanstack/start-plugin-core@1.145.3", "", { "dependencies": { "@babel/code-frame": "7.27.1", "@babel/core": "^7.28.5", "@babel/types": "^7.28.5", "@rolldown/pluginutils": "1.0.0-beta.40", "@tanstack/router-core": "1.144.0", "@tanstack/router-generator": "1.145.2", "@tanstack/router-plugin": "1.145.2", "@tanstack/router-utils": "1.143.11", "@tanstack/start-client-core": "1.145.0", "@tanstack/start-server-core": "1.145.3", "babel-dead-code-elimination": "^1.0.11", "cheerio": "^1.0.0", "exsolve": "^1.0.7", "pathe": "^2.0.3", "srvx": "^0.10.0", "tinyglobby": "^0.2.15", "ufo": "^1.5.4", "vitefu": "^1.1.1", "xmlbuilder2": "^4.0.3", "zod": "^3.24.2" }, "peerDependencies": { "vite": ">=7.0.0" } }, "sha512-PUWKI/8OMyvq8Yjn8ccbEwenASBs5YPEHpXmUjeZ0qb8REGJ6v71Twlqtuva6/fBqZrAKl+2CZrWjgbYZr/h8g=="],
|
||||
"@tanstack/start-plugin-core": ["@tanstack/start-plugin-core@1.152.0", "", { "dependencies": { "@babel/code-frame": "7.27.1", "@babel/core": "^7.28.5", "@babel/types": "^7.28.5", "@rolldown/pluginutils": "1.0.0-beta.40", "@tanstack/router-core": "1.151.6", "@tanstack/router-generator": "1.151.6", "@tanstack/router-plugin": "1.151.6", "@tanstack/router-utils": "1.143.11", "@tanstack/start-client-core": "1.152.0", "@tanstack/start-server-core": "1.152.0", "babel-dead-code-elimination": "^1.0.11", "cheerio": "^1.0.0", "exsolve": "^1.0.7", "pathe": "^2.0.3", "srvx": "^0.10.0", "tinyglobby": "^0.2.15", "ufo": "^1.5.4", "vitefu": "^1.1.1", "xmlbuilder2": "^4.0.3", "zod": "^3.24.2" }, "peerDependencies": { "vite": ">=7.0.0" } }, "sha512-XT+ECwpmi6cQj6gb9QHo1XOOw+7zGXOvwnrijg3HSzNKFDlawHycgOotnViTOjtVjhHLpW1/yGyivWX5OC8wTw=="],
|
||||
|
||||
"@tanstack/start-server-core": ["@tanstack/start-server-core@1.145.3", "", { "dependencies": { "@tanstack/history": "1.141.0", "@tanstack/router-core": "1.144.0", "@tanstack/start-client-core": "1.145.0", "@tanstack/start-storage-context": "1.144.0", "h3-v2": "npm:h3@2.0.1-rc.7", "seroval": "^1.4.1", "tiny-invariant": "^1.3.3" } }, "sha512-atsi0fyzymG9BRDJL4kb0oJjhCdB+Wqds+OGPDiWj5VOteCXLpop0ulDlak6wNL2QJZbqqv5BgtGbTQ6rlNyJg=="],
|
||||
"@tanstack/start-server-core": ["@tanstack/start-server-core@1.152.0", "", { "dependencies": { "@tanstack/history": "1.151.1", "@tanstack/router-core": "1.151.6", "@tanstack/start-client-core": "1.152.0", "@tanstack/start-storage-context": "1.151.6", "h3-v2": "npm:h3@2.0.1-rc.7", "seroval": "^1.4.1", "tiny-invariant": "^1.3.3" } }, "sha512-bMmc4tIhR3FClb1iWLw0zuhvY71b9k2iz8Jw0tSK/KKi++gl1bGyJjuPtx8kDbx5Ix1SoXp4QNdXuo7dv5INfQ=="],
|
||||
|
||||
"@tanstack/start-storage-context": ["@tanstack/start-storage-context@1.144.0", "", { "dependencies": { "@tanstack/router-core": "1.144.0" } }, "sha512-DuUx5CXfLNettyJlsHDQp66y5haeqzXJkUor7kp5p10SVv24p76dTYqBOpw+wQz//RfJlOciIZFVBcKezXXY0w=="],
|
||||
"@tanstack/start-storage-context": ["@tanstack/start-storage-context@1.151.6", "", { "dependencies": { "@tanstack/router-core": "1.151.6" } }, "sha512-MvTcT40qnqatIpKjWSfMRxFzTkprGBxhX2c+em58iZLEsGksitMUWbprknD6AIUqjHty8V3LuhULks/o6tSugQ=="],
|
||||
|
||||
"@tanstack/store": ["@tanstack/store@0.8.0", "", {}, "sha512-Om+BO0YfMZe//X2z0uLF2j+75nQga6TpTJgLJQBiq85aOyZNIhkCgleNcud2KQg4k4v9Y9l+Uhru3qWMPGTOzQ=="],
|
||||
|
||||
"@tanstack/virtual-file-routes": ["@tanstack/virtual-file-routes@1.141.0", "", {}, "sha512-CJrWtr6L9TVzEImm9S7dQINx+xJcYP/aDkIi6gnaWtIgbZs1pnzsE0yJc2noqXZ+yAOqLx3TBGpBEs9tS0P9/A=="],
|
||||
"@tanstack/virtual-file-routes": ["@tanstack/virtual-file-routes@1.145.4", "", {}, "sha512-CI75JrfqSluhdGwLssgVeQBaCphgfkMQpi8MCY3UJX1hoGzXa8kHYJcUuIFMOLs1q7zqHy++EVVtMK03osR5wQ=="],
|
||||
|
||||
"@testing-library/dom": ["@testing-library/dom@10.4.1", "", { "dependencies": { "@babel/code-frame": "^7.10.4", "@babel/runtime": "^7.12.5", "@types/aria-query": "^5.0.1", "aria-query": "5.3.0", "dom-accessibility-api": "^0.5.9", "lz-string": "^1.5.0", "picocolors": "1.1.1", "pretty-format": "^27.0.2" } }, "sha512-o4PXJQidqJl82ckFaXUeoAW+XysPLauYI43Abki5hABd853iMhitooc6znOnczgbTYmEP6U6/y1ZyKAIsvMKGg=="],
|
||||
|
||||
@@ -616,9 +621,9 @@
|
||||
|
||||
"@types/ms": ["@types/ms@2.1.0", "", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="],
|
||||
|
||||
"@types/node": ["@types/node@25.0.3", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-W609buLVRVmeW693xKfzHeIV6nJGGz98uCPfeXI1ELMLXVeKYZ9m15fAMSaUPBHYLGFsVRcMmSCksQOrZV9BYA=="],
|
||||
"@types/node": ["@types/node@25.0.9", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-/rpCXHlCWeqClNBwUhDcusJxXYDjZTyE8v5oTO7WbL8eij2nKhUeU89/6xgjU7N4/Vh3He0BtyhJdQbDyhiXAw=="],
|
||||
|
||||
"@types/react": ["@types/react@19.2.7", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-MWtvHrGZLFttgeEj28VXHxpmwYbor/ATPYbBfSFZEIRK0ecCFLl2Qo55z52Hss+UV9CRN7trSeq1zbgx7YDWWg=="],
|
||||
"@types/react": ["@types/react@19.2.8", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-3MbSL37jEchWZz2p2mjntRZtPt837ij10ApxKfgmXCTuHWagYg7iA5bqPw6C8BMPfwidlvfPI/fxOc42HLhcyg=="],
|
||||
|
||||
"@types/react-dom": ["@types/react-dom@19.2.3", "", { "peerDependencies": { "@types/react": "^19.2.0" } }, "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ=="],
|
||||
|
||||
@@ -634,21 +639,21 @@
|
||||
|
||||
"@vitejs/plugin-react": ["@vitejs/plugin-react@5.1.2", "", { "dependencies": { "@babel/core": "^7.28.5", "@babel/plugin-transform-react-jsx-self": "^7.27.1", "@babel/plugin-transform-react-jsx-source": "^7.27.1", "@rolldown/pluginutils": "1.0.0-beta.53", "@types/babel__core": "^7.20.5", "react-refresh": "^0.18.0" }, "peerDependencies": { "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" } }, "sha512-EcA07pHJouywpzsoTUqNh5NwGayl2PPVEJKUSinGGSxFGYn+shYbqMGBg6FXDqgXum9Ou/ecb+411ssw8HImJQ=="],
|
||||
|
||||
"@vitest/coverage-v8": ["@vitest/coverage-v8@4.0.16", "", { "dependencies": { "@bcoe/v8-coverage": "^1.0.2", "@vitest/utils": "4.0.16", "ast-v8-to-istanbul": "^0.3.8", "istanbul-lib-coverage": "^3.2.2", "istanbul-lib-report": "^3.0.1", "istanbul-lib-source-maps": "^5.0.6", "istanbul-reports": "^3.2.0", "magicast": "^0.5.1", "obug": "^2.1.1", "std-env": "^3.10.0", "tinyrainbow": "^3.0.3" }, "peerDependencies": { "@vitest/browser": "4.0.16", "vitest": "4.0.16" }, "optionalPeers": ["@vitest/browser"] }, "sha512-2rNdjEIsPRzsdu6/9Eq0AYAzYdpP6Bx9cje9tL3FE5XzXRQF1fNU9pe/1yE8fCrS0HD+fBtt6gLPh6LI57tX7A=="],
|
||||
"@vitest/coverage-v8": ["@vitest/coverage-v8@4.0.17", "", { "dependencies": { "@bcoe/v8-coverage": "^1.0.2", "@vitest/utils": "4.0.17", "ast-v8-to-istanbul": "^0.3.10", "istanbul-lib-coverage": "^3.2.2", "istanbul-lib-report": "^3.0.1", "istanbul-reports": "^3.2.0", "magicast": "^0.5.1", "obug": "^2.1.1", "std-env": "^3.10.0", "tinyrainbow": "^3.0.3" }, "peerDependencies": { "@vitest/browser": "4.0.17", "vitest": "4.0.17" }, "optionalPeers": ["@vitest/browser"] }, "sha512-/6zU2FLGg0jsd+ePZcwHRy3+WpNTBBhDY56P4JTRqUN/Dp6CvOEa9HrikcQ4KfV2b2kAHUFB4dl1SuocWXSFEw=="],
|
||||
|
||||
"@vitest/expect": ["@vitest/expect@4.0.16", "", { "dependencies": { "@standard-schema/spec": "^1.0.0", "@types/chai": "^5.2.2", "@vitest/spy": "4.0.16", "@vitest/utils": "4.0.16", "chai": "^6.2.1", "tinyrainbow": "^3.0.3" } }, "sha512-eshqULT2It7McaJkQGLkPjPjNph+uevROGuIMJdG3V+0BSR2w9u6J9Lwu+E8cK5TETlfou8GRijhafIMhXsimA=="],
|
||||
"@vitest/expect": ["@vitest/expect@4.0.17", "", { "dependencies": { "@standard-schema/spec": "^1.0.0", "@types/chai": "^5.2.2", "@vitest/spy": "4.0.17", "@vitest/utils": "4.0.17", "chai": "^6.2.1", "tinyrainbow": "^3.0.3" } }, "sha512-mEoqP3RqhKlbmUmntNDDCJeTDavDR+fVYkSOw8qRwJFaW/0/5zA9zFeTrHqNtcmwh6j26yMmwx2PqUDPzt5ZAQ=="],
|
||||
|
||||
"@vitest/mocker": ["@vitest/mocker@4.0.16", "", { "dependencies": { "@vitest/spy": "4.0.16", "estree-walker": "^3.0.3", "magic-string": "^0.30.21" }, "peerDependencies": { "msw": "^2.4.9", "vite": "^6.0.0 || ^7.0.0-0" }, "optionalPeers": ["msw", "vite"] }, "sha512-yb6k4AZxJTB+q9ycAvsoxGn+j/po0UaPgajllBgt1PzoMAAmJGYFdDk0uCcRcxb3BrME34I6u8gHZTQlkqSZpg=="],
|
||||
"@vitest/mocker": ["@vitest/mocker@4.0.17", "", { "dependencies": { "@vitest/spy": "4.0.17", "estree-walker": "^3.0.3", "magic-string": "^0.30.21" }, "peerDependencies": { "msw": "^2.4.9", "vite": "^6.0.0 || ^7.0.0-0" }, "optionalPeers": ["msw", "vite"] }, "sha512-+ZtQhLA3lDh1tI2wxe3yMsGzbp7uuJSWBM1iTIKCbppWTSBN09PUC+L+fyNlQApQoR+Ps8twt2pbSSXg2fQVEQ=="],
|
||||
|
||||
"@vitest/pretty-format": ["@vitest/pretty-format@4.0.16", "", { "dependencies": { "tinyrainbow": "^3.0.3" } }, "sha512-eNCYNsSty9xJKi/UdVD8Ou16alu7AYiS2fCPRs0b1OdhJiV89buAXQLpTbe+X8V9L6qrs9CqyvU7OaAopJYPsA=="],
|
||||
"@vitest/pretty-format": ["@vitest/pretty-format@4.0.17", "", { "dependencies": { "tinyrainbow": "^3.0.3" } }, "sha512-Ah3VAYmjcEdHg6+MwFE17qyLqBHZ+ni2ScKCiW2XrlSBV4H3Z7vYfPfz7CWQ33gyu76oc0Ai36+kgLU3rfF4nw=="],
|
||||
|
||||
"@vitest/runner": ["@vitest/runner@4.0.16", "", { "dependencies": { "@vitest/utils": "4.0.16", "pathe": "^2.0.3" } }, "sha512-VWEDm5Wv9xEo80ctjORcTQRJ539EGPB3Pb9ApvVRAY1U/WkHXmmYISqU5E79uCwcW7xYUV38gwZD+RV755fu3Q=="],
|
||||
"@vitest/runner": ["@vitest/runner@4.0.17", "", { "dependencies": { "@vitest/utils": "4.0.17", "pathe": "^2.0.3" } }, "sha512-JmuQyf8aMWoo/LmNFppdpkfRVHJcsgzkbCA+/Bk7VfNH7RE6Ut2qxegeyx2j3ojtJtKIbIGy3h+KxGfYfk28YQ=="],
|
||||
|
||||
"@vitest/snapshot": ["@vitest/snapshot@4.0.16", "", { "dependencies": { "@vitest/pretty-format": "4.0.16", "magic-string": "^0.30.21", "pathe": "^2.0.3" } }, "sha512-sf6NcrYhYBsSYefxnry+DR8n3UV4xWZwWxYbCJUt2YdvtqzSPR7VfGrY0zsv090DAbjFZsi7ZaMi1KnSRyK1XA=="],
|
||||
"@vitest/snapshot": ["@vitest/snapshot@4.0.17", "", { "dependencies": { "@vitest/pretty-format": "4.0.17", "magic-string": "^0.30.21", "pathe": "^2.0.3" } }, "sha512-npPelD7oyL+YQM2gbIYvlavlMVWUfNNGZPcu0aEUQXt7FXTuqhmgiYupPnAanhKvyP6Srs2pIbWo30K0RbDtRQ=="],
|
||||
|
||||
"@vitest/spy": ["@vitest/spy@4.0.16", "", {}, "sha512-4jIOWjKP0ZUaEmJm00E0cOBLU+5WE0BpeNr3XN6TEF05ltro6NJqHWxXD0kA8/Zc8Nh23AT8WQxwNG+WeROupw=="],
|
||||
"@vitest/spy": ["@vitest/spy@4.0.17", "", {}, "sha512-I1bQo8QaP6tZlTomQNWKJE6ym4SHf3oLS7ceNjozxxgzavRAgZDc06T7kD8gb9bXKEgcLNt00Z+kZO6KaJ62Ew=="],
|
||||
|
||||
"@vitest/utils": ["@vitest/utils@4.0.16", "", { "dependencies": { "@vitest/pretty-format": "4.0.16", "tinyrainbow": "^3.0.3" } }, "sha512-h8z9yYhV3e1LEfaQ3zdypIrnAg/9hguReGZoS7Gl0aBG5xgA410zBqECqmaF/+RkTggRsfnzc1XaAHA6bmUufA=="],
|
||||
"@vitest/utils": ["@vitest/utils@4.0.17", "", { "dependencies": { "@vitest/pretty-format": "4.0.17", "tinyrainbow": "^3.0.3" } }, "sha512-RG6iy+IzQpa9SB8HAFHJ9Y+pTzI+h8553MrciN9eC6TFBErqrQaTas4vG+MVj8S4uKk8uTT2p0vgZPnTdxd96w=="],
|
||||
|
||||
"acorn": ["acorn@8.15.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg=="],
|
||||
|
||||
@@ -734,7 +739,7 @@
|
||||
|
||||
"convert-source-map": ["convert-source-map@2.0.0", "", {}, "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg=="],
|
||||
|
||||
"convex": ["convex@1.31.2", "", { "dependencies": { "esbuild": "0.25.4", "prettier": "^3.0.0" }, "peerDependencies": { "@auth0/auth0-react": "^2.0.1", "@clerk/clerk-react": "^4.12.8 || ^5.0.0", "react": "^18.0.0 || ^19.0.0-0 || ^19.0.0" }, "optionalPeers": ["@auth0/auth0-react", "@clerk/clerk-react", "react"], "bin": { "convex": "bin/main.js" } }, "sha512-RFuJOwlL2bM5X63egvBI5ZZZH6wESREpAbHsLjODxzDeJuewTLKrEnbvHV/NWp1uJYpgEFJziuGHmZ0tnAmmJg=="],
|
||||
"convex": ["convex@1.31.5", "", { "dependencies": { "esbuild": "0.27.0", "prettier": "^3.0.0" }, "peerDependencies": { "@auth0/auth0-react": "^2.0.1", "@clerk/clerk-react": "^4.12.8 || ^5.0.0", "react": "^18.0.0 || ^19.0.0-0 || ^19.0.0" }, "optionalPeers": ["@auth0/auth0-react", "@clerk/clerk-react", "react"], "bin": { "convex": "bin/main.js" } }, "sha512-E1IuJKFwMCHDToNGukBPs6c7RFaarR3t8chLF9n98TM5/Tgmj8lM6l7sKM1aJ3VwqGaB4wbeUAPY8osbCOXBhQ=="],
|
||||
|
||||
"cookie": ["cookie@1.1.1", "", {}, "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ=="],
|
||||
|
||||
@@ -836,7 +841,7 @@
|
||||
|
||||
"graceful-fs": ["graceful-fs@4.2.11", "", {}, "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="],
|
||||
|
||||
"h3": ["h3@2.0.1-rc.5", "", { "dependencies": { "rou3": "^0.7.9", "srvx": "^0.9.1" }, "peerDependencies": { "crossws": "^0.4.1" }, "optionalPeers": ["crossws"] }, "sha512-qkohAzCab0nLzXNm78tBjZDvtKMTmtygS8BJLT3VPczAQofdqlFXDPkXdLMJN4r05+xqneG8snZJ0HgkERCZTg=="],
|
||||
"h3": ["h3@2.0.1-rc.8", "", { "dependencies": { "rou3": "^0.7.12", "srvx": "^0.10.0" }, "peerDependencies": { "crossws": "^0.4.1" }, "optionalPeers": ["crossws"] }, "sha512-IIMQG7qnXx1Ls75suuMHH4xtcvTFxsUguDIZB+dgdYr1RftLj59FkeWF1dOr+jnejDs8Eo+ZKV1CMqogFeqGRQ=="],
|
||||
|
||||
"h3-v2": ["h3@2.0.1-rc.7", "", { "dependencies": { "rou3": "^0.7.12", "srvx": "^0.10.0" }, "peerDependencies": { "crossws": "^0.4.1" }, "optionalPeers": ["crossws"] }, "sha512-qbrRu1OLXmUYnysWOCVrYhtC/m8ZuXu/zCbo3U/KyphJxbPFiC76jHYwVrmEcss9uNAHO5BoUguQ46yEpgI2PA=="],
|
||||
|
||||
@@ -896,13 +901,11 @@
|
||||
|
||||
"istanbul-lib-report": ["istanbul-lib-report@3.0.1", "", { "dependencies": { "istanbul-lib-coverage": "^3.0.0", "make-dir": "^4.0.0", "supports-color": "^7.1.0" } }, "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw=="],
|
||||
|
||||
"istanbul-lib-source-maps": ["istanbul-lib-source-maps@5.0.6", "", { "dependencies": { "@jridgewell/trace-mapping": "^0.3.23", "debug": "^4.1.1", "istanbul-lib-coverage": "^3.0.0" } }, "sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A=="],
|
||||
|
||||
"istanbul-reports": ["istanbul-reports@3.2.0", "", { "dependencies": { "html-escaper": "^2.0.0", "istanbul-lib-report": "^3.0.0" } }, "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA=="],
|
||||
|
||||
"jiti": ["jiti@2.6.1", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ=="],
|
||||
|
||||
"jose": ["jose@6.1.3", "", {}, "sha512-0TpaTfihd4QMNwrz/ob2Bp7X04yuxJkjRGi4aKmOqwhov54i6u79oCv7T+C7lo70MKH6BesI3vscD1yb/yzKXQ=="],
|
||||
"jose": ["jose@5.10.0", "", {}, "sha512-s+3Al/p9g32Iq+oqXxkW//7jk2Vig6FF1CFqzVXoTUXt2qz89YWbL+OwS17NFYEvxC35n0FKeGO2LGYSxeM2Gg=="],
|
||||
|
||||
"js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="],
|
||||
|
||||
@@ -1088,9 +1091,9 @@
|
||||
|
||||
"oxc-transform": ["oxc-transform@0.96.0", "", { "optionalDependencies": { "@oxc-transform/binding-android-arm64": "0.96.0", "@oxc-transform/binding-darwin-arm64": "0.96.0", "@oxc-transform/binding-darwin-x64": "0.96.0", "@oxc-transform/binding-freebsd-x64": "0.96.0", "@oxc-transform/binding-linux-arm-gnueabihf": "0.96.0", "@oxc-transform/binding-linux-arm-musleabihf": "0.96.0", "@oxc-transform/binding-linux-arm64-gnu": "0.96.0", "@oxc-transform/binding-linux-arm64-musl": "0.96.0", "@oxc-transform/binding-linux-riscv64-gnu": "0.96.0", "@oxc-transform/binding-linux-s390x-gnu": "0.96.0", "@oxc-transform/binding-linux-x64-gnu": "0.96.0", "@oxc-transform/binding-linux-x64-musl": "0.96.0", "@oxc-transform/binding-wasm32-wasi": "0.96.0", "@oxc-transform/binding-win32-arm64-msvc": "0.96.0", "@oxc-transform/binding-win32-x64-msvc": "0.96.0" } }, "sha512-dQPNIF+gHpSkmC0+Vg9IktNyhcn28Y8R3eTLyzn52UNymkasLicl3sFAtz7oEVuFmCpgGjaUTKkwk+jW2cHpDQ=="],
|
||||
|
||||
"oxlint": ["oxlint@1.36.0", "", { "optionalDependencies": { "@oxlint/darwin-arm64": "1.36.0", "@oxlint/darwin-x64": "1.36.0", "@oxlint/linux-arm64-gnu": "1.36.0", "@oxlint/linux-arm64-musl": "1.36.0", "@oxlint/linux-x64-gnu": "1.36.0", "@oxlint/linux-x64-musl": "1.36.0", "@oxlint/win32-arm64": "1.36.0", "@oxlint/win32-x64": "1.36.0" }, "peerDependencies": { "oxlint-tsgolint": ">=0.10.0" }, "optionalPeers": ["oxlint-tsgolint"], "bin": { "oxc_language_server": "bin/oxc_language_server", "oxlint": "bin/oxlint" } }, "sha512-IicUdXfXgI8OKrDPnoSjvBfeEF8PkKtm+CoLlg4LYe4ypc8U+T4r7730XYshdBGZdelg+JRw8GtCb2w/KaaZvw=="],
|
||||
"oxlint": ["oxlint@1.39.0", "", { "optionalDependencies": { "@oxlint/darwin-arm64": "1.39.0", "@oxlint/darwin-x64": "1.39.0", "@oxlint/linux-arm64-gnu": "1.39.0", "@oxlint/linux-arm64-musl": "1.39.0", "@oxlint/linux-x64-gnu": "1.39.0", "@oxlint/linux-x64-musl": "1.39.0", "@oxlint/win32-arm64": "1.39.0", "@oxlint/win32-x64": "1.39.0" }, "peerDependencies": { "oxlint-tsgolint": ">=0.10.0" }, "optionalPeers": ["oxlint-tsgolint"], "bin": { "oxlint": "bin/oxlint" } }, "sha512-wSiLr0wjG+KTU6c1LpVoQk7JZ7l8HCKlAkVDVTJKWmCGazsNxexxnOXl7dsar92mQcRnzko5g077ggP3RINSjA=="],
|
||||
|
||||
"oxlint-tsgolint": ["oxlint-tsgolint@0.10.1", "", { "optionalDependencies": { "@oxlint-tsgolint/darwin-arm64": "0.10.1", "@oxlint-tsgolint/darwin-x64": "0.10.1", "@oxlint-tsgolint/linux-arm64": "0.10.1", "@oxlint-tsgolint/linux-x64": "0.10.1", "@oxlint-tsgolint/win32-arm64": "0.10.1", "@oxlint-tsgolint/win32-x64": "0.10.1" }, "bin": { "tsgolint": "bin/tsgolint.js" } }, "sha512-EEHNdo5cW2w1xwYdBQ7d3IXDqWAtMkfVFrh+9gQ4kYbYJwygY4QXSh1eH80/xVipZdVKujAwBgg/nNNHk56kxQ=="],
|
||||
"oxlint-tsgolint": ["oxlint-tsgolint@0.11.1", "", { "optionalDependencies": { "@oxlint-tsgolint/darwin-arm64": "0.11.1", "@oxlint-tsgolint/darwin-x64": "0.11.1", "@oxlint-tsgolint/linux-arm64": "0.11.1", "@oxlint-tsgolint/linux-x64": "0.11.1", "@oxlint-tsgolint/win32-arm64": "0.11.1", "@oxlint-tsgolint/win32-x64": "0.11.1" }, "bin": { "tsgolint": "bin/tsgolint.js" } }, "sha512-WulCp+0/6RvpM4zPv+dAXybf03QvRA8ATxaBlmj4XMIQqTs5jeq3cUTk48WCt4CpLwKhyyGZPHmjLl1KHQ/cvA=="],
|
||||
|
||||
"p-retry": ["p-retry@7.1.1", "", { "dependencies": { "is-network-error": "^1.1.0" } }, "sha512-J5ApzjyRkkf601HpEeykoiCvzHQjWxPAHhyjFcEUP2SWq0+35NKh8TLhpLw+Dkq5TZBFvUM6UigdE9hIVYTl5w=="],
|
||||
|
||||
@@ -1110,6 +1113,10 @@
|
||||
|
||||
"picomatch": ["picomatch@4.0.3", "", {}, "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q=="],
|
||||
|
||||
"playwright": ["playwright@1.57.0", "", { "dependencies": { "playwright-core": "1.57.0" }, "optionalDependencies": { "fsevents": "2.3.2" }, "bin": { "playwright": "cli.js" } }, "sha512-ilYQj1s8sr2ppEJ2YVadYBN0Mb3mdo9J0wQ+UuDhzYqURwSoW4n1Xs5vs7ORwgDGmyEh33tRMeS8KhdkMoLXQw=="],
|
||||
|
||||
"playwright-core": ["playwright-core@1.57.0", "", { "bin": { "playwright-core": "cli.js" } }, "sha512-agTcKlMw/mjBWOnD6kFZttAAGHgi/Nw0CZ2o6JqWSbMlI219lAFLZZCyqByTsvVAJq5XA5H8cA6PrvBRpBWEuQ=="],
|
||||
|
||||
"postcss": ["postcss@8.5.6", "", { "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg=="],
|
||||
|
||||
"preact": ["preact@10.24.3", "", {}, "sha512-Z2dPnBnMUfyQfSQ+GBdsGa16hz35YmLmtTLhM169uW944hYL6xzTYkJjC07j+Wosz733pMWx0fgON3JNw1jJQA=="],
|
||||
@@ -1192,7 +1199,7 @@
|
||||
|
||||
"space-separated-tokens": ["space-separated-tokens@2.0.2", "", {}, "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q=="],
|
||||
|
||||
"srvx": ["srvx@0.9.8", "", { "bin": { "srvx": "bin/srvx.mjs" } }, "sha512-RZaxTKJEE/14HYn8COLuUOJAt0U55N9l1Xf6jj+T0GoA01EUH1Xz5JtSUOI+EHn+AEgPCVn7gk6jHJffrr06fQ=="],
|
||||
"srvx": ["srvx@0.10.0", "", { "bin": { "srvx": "bin/srvx.mjs" } }, "sha512-NqIsR+wQCfkvvwczBh8J8uM4wTZx41K2lLSEp/3oMp917ODVVMtW5Me4epCmQ3gH8D+0b+/t4xxkUKutyhimTA=="],
|
||||
|
||||
"stackback": ["stackback@0.0.2", "", {}, "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw=="],
|
||||
|
||||
@@ -1292,13 +1299,13 @@
|
||||
|
||||
"vfile-message": ["vfile-message@4.0.3", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-stringify-position": "^4.0.0" } }, "sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw=="],
|
||||
|
||||
"vite": ["vite@7.3.0", "", { "dependencies": { "esbuild": "^0.27.0", "fdir": "^6.5.0", "picomatch": "^4.0.3", "postcss": "^8.5.6", "rollup": "^4.43.0", "tinyglobby": "^0.2.15" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "jiti": ">=1.21.0", "less": "^4.0.0", "lightningcss": "^1.21.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "jiti", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-dZwN5L1VlUBewiP6H9s2+B3e3Jg96D0vzN+Ry73sOefebhYr9f94wwkMNN/9ouoU8pV1BqA1d1zGk8928cx0rg=="],
|
||||
"vite": ["vite@7.3.1", "", { "dependencies": { "esbuild": "^0.27.0", "fdir": "^6.5.0", "picomatch": "^4.0.3", "postcss": "^8.5.6", "rollup": "^4.43.0", "tinyglobby": "^0.2.15" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "jiti": ">=1.21.0", "less": "^4.0.0", "lightningcss": "^1.21.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "jiti", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA=="],
|
||||
|
||||
"vite-tsconfig-paths": ["vite-tsconfig-paths@6.0.3", "", { "dependencies": { "debug": "^4.1.1", "globrex": "^0.1.2", "tsconfck": "^3.0.3" }, "peerDependencies": { "vite": "*" }, "optionalPeers": ["vite"] }, "sha512-7bL7FPX/DSviaZGYUKowWF1AiDVWjMjxNbE8lyaVGDezkedWqfGhlnQ4BZXre0ZN5P4kAgIJfAlgFDVyjrCIyg=="],
|
||||
"vite-tsconfig-paths": ["vite-tsconfig-paths@6.0.4", "", { "dependencies": { "debug": "^4.1.1", "globrex": "^0.1.2", "tsconfck": "^3.0.3", "vite": "*" } }, "sha512-iIsEJ+ek5KqRTK17pmxtgIxXtqr3qDdE6OxrP9mVeGhVDNXRJTKN/l9oMbujTQNzMLe6XZ8qmpztfbkPu2TiFQ=="],
|
||||
|
||||
"vitefu": ["vitefu@1.1.1", "", { "peerDependencies": { "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0-beta.0" }, "optionalPeers": ["vite"] }, "sha512-B/Fegf3i8zh0yFbpzZ21amWzHmuNlLlmJT6n7bu5e+pCHUKQIfXSYokrqOBGEMMe9UG2sostKQF9mml/vYaWJQ=="],
|
||||
|
||||
"vitest": ["vitest@4.0.16", "", { "dependencies": { "@vitest/expect": "4.0.16", "@vitest/mocker": "4.0.16", "@vitest/pretty-format": "4.0.16", "@vitest/runner": "4.0.16", "@vitest/snapshot": "4.0.16", "@vitest/spy": "4.0.16", "@vitest/utils": "4.0.16", "es-module-lexer": "^1.7.0", "expect-type": "^1.2.2", "magic-string": "^0.30.21", "obug": "^2.1.1", "pathe": "^2.0.3", "picomatch": "^4.0.3", "std-env": "^3.10.0", "tinybench": "^2.9.0", "tinyexec": "^1.0.2", "tinyglobby": "^0.2.15", "tinyrainbow": "^3.0.3", "vite": "^6.0.0 || ^7.0.0", "why-is-node-running": "^2.3.0" }, "peerDependencies": { "@edge-runtime/vm": "*", "@opentelemetry/api": "^1.9.0", "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", "@vitest/browser-playwright": "4.0.16", "@vitest/browser-preview": "4.0.16", "@vitest/browser-webdriverio": "4.0.16", "@vitest/ui": "4.0.16", "happy-dom": "*", "jsdom": "*" }, "optionalPeers": ["@edge-runtime/vm", "@opentelemetry/api", "@types/node", "@vitest/browser-playwright", "@vitest/browser-preview", "@vitest/browser-webdriverio", "@vitest/ui", "happy-dom", "jsdom"], "bin": { "vitest": "vitest.mjs" } }, "sha512-E4t7DJ9pESL6E3I8nFjPa4xGUd3PmiWDLsDztS2qXSJWfHtbQnwAWylaBvSNY48I3vr8PTqIZlyK8TE3V3CA4Q=="],
|
||||
"vitest": ["vitest@4.0.17", "", { "dependencies": { "@vitest/expect": "4.0.17", "@vitest/mocker": "4.0.17", "@vitest/pretty-format": "4.0.17", "@vitest/runner": "4.0.17", "@vitest/snapshot": "4.0.17", "@vitest/spy": "4.0.17", "@vitest/utils": "4.0.17", "es-module-lexer": "^1.7.0", "expect-type": "^1.2.2", "magic-string": "^0.30.21", "obug": "^2.1.1", "pathe": "^2.0.3", "picomatch": "^4.0.3", "std-env": "^3.10.0", "tinybench": "^2.9.0", "tinyexec": "^1.0.2", "tinyglobby": "^0.2.15", "tinyrainbow": "^3.0.3", "vite": "^6.0.0 || ^7.0.0", "why-is-node-running": "^2.3.0" }, "peerDependencies": { "@edge-runtime/vm": "*", "@opentelemetry/api": "^1.9.0", "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", "@vitest/browser-playwright": "4.0.17", "@vitest/browser-preview": "4.0.17", "@vitest/browser-webdriverio": "4.0.17", "@vitest/ui": "4.0.17", "happy-dom": "*", "jsdom": "*" }, "optionalPeers": ["@edge-runtime/vm", "@opentelemetry/api", "@types/node", "@vitest/browser-playwright", "@vitest/browser-preview", "@vitest/browser-webdriverio", "@vitest/ui", "happy-dom", "jsdom"], "bin": { "vitest": "vitest.mjs" } }, "sha512-FQMeF0DJdWY0iOnbv466n/0BudNdKj1l5jYgl5JVTwjSsZSlqyXFt/9+1sEyhR6CLowbZpV7O1sCHrzBhucKKg=="],
|
||||
|
||||
"w3c-xmlserializer": ["w3c-xmlserializer@5.0.0", "", { "dependencies": { "xml-name-validator": "^5.0.0" } }, "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA=="],
|
||||
|
||||
@@ -1338,8 +1345,6 @@
|
||||
|
||||
"@babel/helper-compilation-targets/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="],
|
||||
|
||||
"@convex-dev/auth/jose": ["jose@5.10.0", "", {}, "sha512-s+3Al/p9g32Iq+oqXxkW//7jk2Vig6FF1CFqzVXoTUXt2qz89YWbL+OwS17NFYEvxC35n0FKeGO2LGYSxeM2Gg=="],
|
||||
|
||||
"@tailwindcss/oxide-wasm32-wasi/@emnapi/core": ["@emnapi/core@1.8.0", "", { "dependencies": { "@emnapi/wasi-threads": "1.1.0", "tslib": "^2.4.0" }, "bundled": true }, "sha512-ryJnSmj4UhrGLZZPJ6PKVb4wNPAIkW6iyLy+0TRwazd3L1u0wzMe8RfqevAh2HbcSkoeLiSYnOVDOys4JSGYyg=="],
|
||||
|
||||
"@tailwindcss/oxide-wasm32-wasi/@emnapi/runtime": ["@emnapi/runtime@1.8.0", "", { "dependencies": { "tslib": "^2.4.0" }, "bundled": true }, "sha512-Z82FDl1ByxqPEPrAYYeTQVlx2FSHPe1qwX465c+96IRS3fTdSYRoJcRxg3g2fEG5I69z1dSEWQlNRRr0/677mg=="],
|
||||
@@ -1354,19 +1359,19 @@
|
||||
|
||||
"@tanstack/start-plugin-core/@rolldown/pluginutils": ["@rolldown/pluginutils@1.0.0-beta.40", "", {}, "sha512-s3GeJKSQOwBlzdUrj4ISjJj5SfSh+aqn0wjOar4Bx95iV1ETI7F6S/5hLcfAxZ9kXDcyrAkxPlqmd1ZITttf+w=="],
|
||||
|
||||
"@tanstack/start-plugin-core/srvx": ["srvx@0.10.0", "", { "bin": { "srvx": "bin/srvx.mjs" } }, "sha512-NqIsR+wQCfkvvwczBh8J8uM4wTZx41K2lLSEp/3oMp917ODVVMtW5Me4epCmQ3gH8D+0b+/t4xxkUKutyhimTA=="],
|
||||
|
||||
"anymatch/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="],
|
||||
|
||||
"ast-v8-to-istanbul/js-tokens": ["js-tokens@9.0.1", "", {}, "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ=="],
|
||||
|
||||
"cheerio/parse5": ["parse5@7.3.0", "", { "dependencies": { "entities": "^6.0.0" } }, "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw=="],
|
||||
|
||||
"convex/esbuild": ["esbuild@0.25.4", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.25.4", "@esbuild/android-arm": "0.25.4", "@esbuild/android-arm64": "0.25.4", "@esbuild/android-x64": "0.25.4", "@esbuild/darwin-arm64": "0.25.4", "@esbuild/darwin-x64": "0.25.4", "@esbuild/freebsd-arm64": "0.25.4", "@esbuild/freebsd-x64": "0.25.4", "@esbuild/linux-arm": "0.25.4", "@esbuild/linux-arm64": "0.25.4", "@esbuild/linux-ia32": "0.25.4", "@esbuild/linux-loong64": "0.25.4", "@esbuild/linux-mips64el": "0.25.4", "@esbuild/linux-ppc64": "0.25.4", "@esbuild/linux-riscv64": "0.25.4", "@esbuild/linux-s390x": "0.25.4", "@esbuild/linux-x64": "0.25.4", "@esbuild/netbsd-arm64": "0.25.4", "@esbuild/netbsd-x64": "0.25.4", "@esbuild/openbsd-arm64": "0.25.4", "@esbuild/openbsd-x64": "0.25.4", "@esbuild/sunos-x64": "0.25.4", "@esbuild/win32-arm64": "0.25.4", "@esbuild/win32-ia32": "0.25.4", "@esbuild/win32-x64": "0.25.4" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-8pgjLUcUjcgDg+2Q4NYXnPbo/vncAY4UmyaCm0jZevERqCHZIaWwdJHkf8XQtu4AxSKCdvrUbT0XUr1IdZzI8Q=="],
|
||||
"convex/esbuild": ["esbuild@0.27.0", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.27.0", "@esbuild/android-arm": "0.27.0", "@esbuild/android-arm64": "0.27.0", "@esbuild/android-x64": "0.27.0", "@esbuild/darwin-arm64": "0.27.0", "@esbuild/darwin-x64": "0.27.0", "@esbuild/freebsd-arm64": "0.27.0", "@esbuild/freebsd-x64": "0.27.0", "@esbuild/linux-arm": "0.27.0", "@esbuild/linux-arm64": "0.27.0", "@esbuild/linux-ia32": "0.27.0", "@esbuild/linux-loong64": "0.27.0", "@esbuild/linux-mips64el": "0.27.0", "@esbuild/linux-ppc64": "0.27.0", "@esbuild/linux-riscv64": "0.27.0", "@esbuild/linux-s390x": "0.27.0", "@esbuild/linux-x64": "0.27.0", "@esbuild/netbsd-arm64": "0.27.0", "@esbuild/netbsd-x64": "0.27.0", "@esbuild/openbsd-arm64": "0.27.0", "@esbuild/openbsd-x64": "0.27.0", "@esbuild/openharmony-arm64": "0.27.0", "@esbuild/sunos-x64": "0.27.0", "@esbuild/win32-arm64": "0.27.0", "@esbuild/win32-ia32": "0.27.0", "@esbuild/win32-x64": "0.27.0" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-jd0f4NHbD6cALCyGElNpGAOtWxSq46l9X/sWB0Nzd5er4Kz2YTm+Vl0qKFT9KUJvD8+fiO8AvoHhFvEatfVixA=="],
|
||||
|
||||
"dom-serializer/entities": ["entities@4.5.0", "", {}, "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw=="],
|
||||
|
||||
"h3-v2/srvx": ["srvx@0.10.0", "", { "bin": { "srvx": "bin/srvx.mjs" } }, "sha512-NqIsR+wQCfkvvwczBh8J8uM4wTZx41K2lLSEp/3oMp917ODVVMtW5Me4epCmQ3gH8D+0b+/t4xxkUKutyhimTA=="],
|
||||
"nitro/h3": ["h3@2.0.1-rc.5", "", { "dependencies": { "rou3": "^0.7.9", "srvx": "^0.9.1" }, "peerDependencies": { "crossws": "^0.4.1" }, "optionalPeers": ["crossws"] }, "sha512-qkohAzCab0nLzXNm78tBjZDvtKMTmtygS8BJLT3VPczAQofdqlFXDPkXdLMJN4r05+xqneG8snZJ0HgkERCZTg=="],
|
||||
|
||||
"nitro/srvx": ["srvx@0.9.8", "", { "bin": { "srvx": "bin/srvx.mjs" } }, "sha512-RZaxTKJEE/14HYn8COLuUOJAt0U55N9l1Xf6jj+T0GoA01EUH1Xz5JtSUOI+EHn+AEgPCVn7gk6jHJffrr06fQ=="],
|
||||
|
||||
"parse-entities/@types/unist": ["@types/unist@2.0.11", "", {}, "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA=="],
|
||||
|
||||
@@ -1374,6 +1379,8 @@
|
||||
|
||||
"parse5-parser-stream/parse5": ["parse5@7.3.0", "", { "dependencies": { "entities": "^6.0.0" } }, "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw=="],
|
||||
|
||||
"playwright/fsevents": ["fsevents@2.3.2", "", { "os": "darwin" }, "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA=="],
|
||||
|
||||
"readdirp/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="],
|
||||
|
||||
"recast/source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="],
|
||||
@@ -1384,54 +1391,56 @@
|
||||
|
||||
"strip-ansi/ansi-regex": ["ansi-regex@6.2.2", "", {}, "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="],
|
||||
|
||||
"convex/esbuild/@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.25.4", "", { "os": "aix", "cpu": "ppc64" }, "sha512-1VCICWypeQKhVbE9oW/sJaAmjLxhVqacdkvPLEjwlttjfwENRSClS8EjBz0KzRyFSCPDIkuXW34Je/vk7zdB7Q=="],
|
||||
"convex/esbuild/@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.27.0", "", { "os": "aix", "cpu": "ppc64" }, "sha512-KuZrd2hRjz01y5JK9mEBSD3Vj3mbCvemhT466rSuJYeE/hjuBrHfjjcjMdTm/sz7au+++sdbJZJmuBwQLuw68A=="],
|
||||
|
||||
"convex/esbuild/@esbuild/android-arm": ["@esbuild/android-arm@0.25.4", "", { "os": "android", "cpu": "arm" }, "sha512-QNdQEps7DfFwE3hXiU4BZeOV68HHzYwGd0Nthhd3uCkkEKK7/R6MTgM0P7H7FAs5pU/DIWsviMmEGxEoxIZ+ZQ=="],
|
||||
"convex/esbuild/@esbuild/android-arm": ["@esbuild/android-arm@0.27.0", "", { "os": "android", "cpu": "arm" }, "sha512-j67aezrPNYWJEOHUNLPj9maeJte7uSMM6gMoxfPC9hOg8N02JuQi/T7ewumf4tNvJadFkvLZMlAq73b9uwdMyQ=="],
|
||||
|
||||
"convex/esbuild/@esbuild/android-arm64": ["@esbuild/android-arm64@0.25.4", "", { "os": "android", "cpu": "arm64" }, "sha512-bBy69pgfhMGtCnwpC/x5QhfxAz/cBgQ9enbtwjf6V9lnPI/hMyT9iWpR1arm0l3kttTr4L0KSLpKmLp/ilKS9A=="],
|
||||
"convex/esbuild/@esbuild/android-arm64": ["@esbuild/android-arm64@0.27.0", "", { "os": "android", "cpu": "arm64" }, "sha512-CC3vt4+1xZrs97/PKDkl0yN7w8edvU2vZvAFGD16n9F0Cvniy5qvzRXjfO1l94efczkkQE6g1x0i73Qf5uthOQ=="],
|
||||
|
||||
"convex/esbuild/@esbuild/android-x64": ["@esbuild/android-x64@0.25.4", "", { "os": "android", "cpu": "x64" }, "sha512-TVhdVtQIFuVpIIR282btcGC2oGQoSfZfmBdTip2anCaVYcqWlZXGcdcKIUklfX2wj0JklNYgz39OBqh2cqXvcQ=="],
|
||||
"convex/esbuild/@esbuild/android-x64": ["@esbuild/android-x64@0.27.0", "", { "os": "android", "cpu": "x64" }, "sha512-wurMkF1nmQajBO1+0CJmcN17U4BP6GqNSROP8t0X/Jiw2ltYGLHpEksp9MpoBqkrFR3kv2/te6Sha26k3+yZ9Q=="],
|
||||
|
||||
"convex/esbuild/@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.25.4", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Y1giCfM4nlHDWEfSckMzeWNdQS31BQGs9/rouw6Ub91tkK79aIMTH3q9xHvzH8d0wDru5Ci0kWB8b3up/nl16g=="],
|
||||
"convex/esbuild/@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.27.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-uJOQKYCcHhg07DL7i8MzjvS2LaP7W7Pn/7uA0B5S1EnqAirJtbyw4yC5jQ5qcFjHK9l6o/MX9QisBg12kNkdHg=="],
|
||||
|
||||
"convex/esbuild/@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.25.4", "", { "os": "darwin", "cpu": "x64" }, "sha512-CJsry8ZGM5VFVeyUYB3cdKpd/H69PYez4eJh1W/t38vzutdjEjtP7hB6eLKBoOdxcAlCtEYHzQ/PJ/oU9I4u0A=="],
|
||||
"convex/esbuild/@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.27.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-8mG6arH3yB/4ZXiEnXof5MK72dE6zM9cDvUcPtxhUZsDjESl9JipZYW60C3JGreKCEP+p8P/72r69m4AZGJd5g=="],
|
||||
|
||||
"convex/esbuild/@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.25.4", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-yYq+39NlTRzU2XmoPW4l5Ifpl9fqSk0nAJYM/V/WUGPEFfek1epLHJIkTQM6bBs1swApjO5nWgvr843g6TjxuQ=="],
|
||||
"convex/esbuild/@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.27.0", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-9FHtyO988CwNMMOE3YIeci+UV+x5Zy8fI2qHNpsEtSF83YPBmE8UWmfYAQg6Ux7Gsmd4FejZqnEUZCMGaNQHQw=="],
|
||||
|
||||
"convex/esbuild/@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.25.4", "", { "os": "freebsd", "cpu": "x64" }, "sha512-0FgvOJ6UUMflsHSPLzdfDnnBBVoCDtBTVyn/MrWloUNvq/5SFmh13l3dvgRPkDihRxb77Y17MbqbCAa2strMQQ=="],
|
||||
"convex/esbuild/@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.27.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-zCMeMXI4HS/tXvJz8vWGexpZj2YVtRAihHLk1imZj4efx1BQzN76YFeKqlDr3bUWI26wHwLWPd3rwh6pe4EV7g=="],
|
||||
|
||||
"convex/esbuild/@esbuild/linux-arm": ["@esbuild/linux-arm@0.25.4", "", { "os": "linux", "cpu": "arm" }, "sha512-kro4c0P85GMfFYqW4TWOpvmF8rFShbWGnrLqlzp4X1TNWjRY3JMYUfDCtOxPKOIY8B0WC8HN51hGP4I4hz4AaQ=="],
|
||||
"convex/esbuild/@esbuild/linux-arm": ["@esbuild/linux-arm@0.27.0", "", { "os": "linux", "cpu": "arm" }, "sha512-t76XLQDpxgmq2cNXKTVEB7O7YMb42atj2Re2Haf45HkaUpjM2J0UuJZDuaGbPbamzZ7bawyGFUkodL+zcE+jvQ=="],
|
||||
|
||||
"convex/esbuild/@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.25.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-+89UsQTfXdmjIvZS6nUnOOLoXnkUTB9hR5QAeLrQdzOSWZvNSAXAtcRDHWtqAUtAmv7ZM1WPOOeSxDzzzMogiQ=="],
|
||||
"convex/esbuild/@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.27.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-AS18v0V+vZiLJyi/4LphvBE+OIX682Pu7ZYNsdUHyUKSoRwdnOsMf6FDekwoAFKej14WAkOef3zAORJgAtXnlQ=="],
|
||||
|
||||
"convex/esbuild/@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.25.4", "", { "os": "linux", "cpu": "ia32" }, "sha512-yTEjoapy8UP3rv8dB0ip3AfMpRbyhSN3+hY8mo/i4QXFeDxmiYbEKp3ZRjBKcOP862Ua4b1PDfwlvbuwY7hIGQ=="],
|
||||
"convex/esbuild/@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.27.0", "", { "os": "linux", "cpu": "ia32" }, "sha512-Mz1jxqm/kfgKkc/KLHC5qIujMvnnarD9ra1cEcrs7qshTUSksPihGrWHVG5+osAIQ68577Zpww7SGapmzSt4Nw=="],
|
||||
|
||||
"convex/esbuild/@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.25.4", "", { "os": "linux", "cpu": "none" }, "sha512-NeqqYkrcGzFwi6CGRGNMOjWGGSYOpqwCjS9fvaUlX5s3zwOtn1qwg1s2iE2svBe4Q/YOG1q6875lcAoQK/F4VA=="],
|
||||
"convex/esbuild/@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.27.0", "", { "os": "linux", "cpu": "none" }, "sha512-QbEREjdJeIreIAbdG2hLU1yXm1uu+LTdzoq1KCo4G4pFOLlvIspBm36QrQOar9LFduavoWX2msNFAAAY9j4BDg=="],
|
||||
|
||||
"convex/esbuild/@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.25.4", "", { "os": "linux", "cpu": "none" }, "sha512-IcvTlF9dtLrfL/M8WgNI/qJYBENP3ekgsHbYUIzEzq5XJzzVEV/fXY9WFPfEEXmu3ck2qJP8LG/p3Q8f7Zc2Xg=="],
|
||||
"convex/esbuild/@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.27.0", "", { "os": "linux", "cpu": "none" }, "sha512-sJz3zRNe4tO2wxvDpH/HYJilb6+2YJxo/ZNbVdtFiKDufzWq4JmKAiHy9iGoLjAV7r/W32VgaHGkk35cUXlNOg=="],
|
||||
|
||||
"convex/esbuild/@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.25.4", "", { "os": "linux", "cpu": "ppc64" }, "sha512-HOy0aLTJTVtoTeGZh4HSXaO6M95qu4k5lJcH4gxv56iaycfz1S8GO/5Jh6X4Y1YiI0h7cRyLi+HixMR+88swag=="],
|
||||
"convex/esbuild/@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.27.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-z9N10FBD0DCS2dmSABDBb5TLAyF1/ydVb+N4pi88T45efQ/w4ohr/F/QYCkxDPnkhkp6AIpIcQKQ8F0ANoA2JA=="],
|
||||
|
||||
"convex/esbuild/@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.25.4", "", { "os": "linux", "cpu": "none" }, "sha512-i8JUDAufpz9jOzo4yIShCTcXzS07vEgWzyX3NH2G7LEFVgrLEhjwL3ajFE4fZI3I4ZgiM7JH3GQ7ReObROvSUA=="],
|
||||
"convex/esbuild/@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.27.0", "", { "os": "linux", "cpu": "none" }, "sha512-pQdyAIZ0BWIC5GyvVFn5awDiO14TkT/19FTmFcPdDec94KJ1uZcmFs21Fo8auMXzD4Tt+diXu1LW1gHus9fhFQ=="],
|
||||
|
||||
"convex/esbuild/@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.25.4", "", { "os": "linux", "cpu": "s390x" }, "sha512-jFnu+6UbLlzIjPQpWCNh5QtrcNfMLjgIavnwPQAfoGx4q17ocOU9MsQ2QVvFxwQoWpZT8DvTLooTvmOQXkO51g=="],
|
||||
"convex/esbuild/@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.27.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-hPlRWR4eIDDEci953RI1BLZitgi5uqcsjKMxwYfmi4LcwyWo2IcRP+lThVnKjNtk90pLS8nKdroXYOqW+QQH+w=="],
|
||||
|
||||
"convex/esbuild/@esbuild/linux-x64": ["@esbuild/linux-x64@0.25.4", "", { "os": "linux", "cpu": "x64" }, "sha512-6e0cvXwzOnVWJHq+mskP8DNSrKBr1bULBvnFLpc1KY+d+irZSgZ02TGse5FsafKS5jg2e4pbvK6TPXaF/A6+CA=="],
|
||||
"convex/esbuild/@esbuild/linux-x64": ["@esbuild/linux-x64@0.27.0", "", { "os": "linux", "cpu": "x64" }, "sha512-1hBWx4OUJE2cab++aVZ7pObD6s+DK4mPGpemtnAORBvb5l/g5xFGk0vc0PjSkrDs0XaXj9yyob3d14XqvnQ4gw=="],
|
||||
|
||||
"convex/esbuild/@esbuild/netbsd-arm64": ["@esbuild/netbsd-arm64@0.25.4", "", { "os": "none", "cpu": "arm64" }, "sha512-vUnkBYxZW4hL/ie91hSqaSNjulOnYXE1VSLusnvHg2u3jewJBz3YzB9+oCw8DABeVqZGg94t9tyZFoHma8gWZQ=="],
|
||||
"convex/esbuild/@esbuild/netbsd-arm64": ["@esbuild/netbsd-arm64@0.27.0", "", { "os": "none", "cpu": "arm64" }, "sha512-6m0sfQfxfQfy1qRuecMkJlf1cIzTOgyaeXaiVaaki8/v+WB+U4hc6ik15ZW6TAllRlg/WuQXxWj1jx6C+dfy3w=="],
|
||||
|
||||
"convex/esbuild/@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.25.4", "", { "os": "none", "cpu": "x64" }, "sha512-XAg8pIQn5CzhOB8odIcAm42QsOfa98SBeKUdo4xa8OvX8LbMZqEtgeWE9P/Wxt7MlG2QqvjGths+nq48TrUiKw=="],
|
||||
"convex/esbuild/@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.27.0", "", { "os": "none", "cpu": "x64" }, "sha512-xbbOdfn06FtcJ9d0ShxxvSn2iUsGd/lgPIO2V3VZIPDbEaIj1/3nBBe1AwuEZKXVXkMmpr6LUAgMkLD/4D2PPA=="],
|
||||
|
||||
"convex/esbuild/@esbuild/openbsd-arm64": ["@esbuild/openbsd-arm64@0.25.4", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-Ct2WcFEANlFDtp1nVAXSNBPDxyU+j7+tId//iHXU2f/lN5AmO4zLyhDcpR5Cz1r08mVxzt3Jpyt4PmXQ1O6+7A=="],
|
||||
"convex/esbuild/@esbuild/openbsd-arm64": ["@esbuild/openbsd-arm64@0.27.0", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-fWgqR8uNbCQ/GGv0yhzttj6sU/9Z5/Sv/VGU3F5OuXK6J6SlriONKrQ7tNlwBrJZXRYk5jUhuWvF7GYzGguBZQ=="],
|
||||
|
||||
"convex/esbuild/@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.25.4", "", { "os": "openbsd", "cpu": "x64" }, "sha512-xAGGhyOQ9Otm1Xu8NT1ifGLnA6M3sJxZ6ixylb+vIUVzvvd6GOALpwQrYrtlPouMqd/vSbgehz6HaVk4+7Afhw=="],
|
||||
"convex/esbuild/@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.27.0", "", { "os": "openbsd", "cpu": "x64" }, "sha512-aCwlRdSNMNxkGGqQajMUza6uXzR/U0dIl1QmLjPtRbLOx3Gy3otfFu/VjATy4yQzo9yFDGTxYDo1FfAD9oRD2A=="],
|
||||
|
||||
"convex/esbuild/@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.25.4", "", { "os": "sunos", "cpu": "x64" }, "sha512-Mw+tzy4pp6wZEK0+Lwr76pWLjrtjmJyUB23tHKqEDP74R3q95luY/bXqXZeYl4NYlvwOqoRKlInQialgCKy67Q=="],
|
||||
"convex/esbuild/@esbuild/openharmony-arm64": ["@esbuild/openharmony-arm64@0.27.0", "", { "os": "none", "cpu": "arm64" }, "sha512-nyvsBccxNAsNYz2jVFYwEGuRRomqZ149A39SHWk4hV0jWxKM0hjBPm3AmdxcbHiFLbBSwG6SbpIcUbXjgyECfA=="],
|
||||
|
||||
"convex/esbuild/@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.25.4", "", { "os": "win32", "cpu": "arm64" }, "sha512-AVUP428VQTSddguz9dO9ngb+E5aScyg7nOeJDrF1HPYu555gmza3bDGMPhmVXL8svDSoqPCsCPjb265yG/kLKQ=="],
|
||||
"convex/esbuild/@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.27.0", "", { "os": "sunos", "cpu": "x64" }, "sha512-Q1KY1iJafM+UX6CFEL+F4HRTgygmEW568YMqDA5UV97AuZSm21b7SXIrRJDwXWPzr8MGr75fUZPV67FdtMHlHA=="],
|
||||
|
||||
"convex/esbuild/@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.25.4", "", { "os": "win32", "cpu": "ia32" }, "sha512-i1sW+1i+oWvQzSgfRcxxG2k4I9n3O9NRqy8U+uugaT2Dy7kLO9Y7wI72haOahxceMX8hZAzgGou1FhndRldxRg=="],
|
||||
"convex/esbuild/@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.27.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-W1eyGNi6d+8kOmZIwi/EDjrL9nxQIQ0MiGqe/AWc6+IaHloxHSGoeRgDRKHFISThLmsewZ5nHFvGFWdBYlgKPg=="],
|
||||
|
||||
"convex/esbuild/@esbuild/win32-x64": ["@esbuild/win32-x64@0.25.4", "", { "os": "win32", "cpu": "x64" }, "sha512-nOT2vZNw6hJ+z43oP1SPea/G/6AbN6X+bGNhNuq8NtRHy4wsMhw765IKLNmnjek7GvjWBYQ8Q5VBoYTFg9y1UQ=="],
|
||||
"convex/esbuild/@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.27.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-30z1aKL9h22kQhilnYkORFYt+3wp7yZsHWus+wSKAJR8JtdfI76LJ4SBdMsCopTR3z/ORqVu5L1vtnHZWVj4cQ=="],
|
||||
|
||||
"convex/esbuild/@esbuild/win32-x64": ["@esbuild/win32-x64@0.27.0", "", { "os": "win32", "cpu": "x64" }, "sha512-aIitBcjQeyOhMTImhLZmtxfdOcuNRpwlPNmlFKPcHQYPhEssw75Cl1TSXJXpMkzaua9FUetx/4OQKq7eJul5Cg=="],
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+12
@@ -21,6 +21,7 @@ import type * as githubSoulBackupsNode from "../githubSoulBackupsNode.js";
|
||||
import type * as http from "../http.js";
|
||||
import type * as httpApi from "../httpApi.js";
|
||||
import type * as httpApiV1 from "../httpApiV1.js";
|
||||
import type * as leaderboards from "../leaderboards.js";
|
||||
import type * as lib_access from "../lib/access.js";
|
||||
import type * as lib_apiTokenAuth from "../lib/apiTokenAuth.js";
|
||||
import type * as lib_changelog from "../lib/changelog.js";
|
||||
@@ -28,8 +29,11 @@ import type * as lib_embeddings from "../lib/embeddings.js";
|
||||
import type * as lib_githubBackup from "../lib/githubBackup.js";
|
||||
import type * as lib_githubImport from "../lib/githubImport.js";
|
||||
import type * as lib_githubSoulBackup from "../lib/githubSoulBackup.js";
|
||||
import type * as lib_leaderboards from "../lib/leaderboards.js";
|
||||
import type * as lib_searchText from "../lib/searchText.js";
|
||||
import type * as lib_skillBackfill from "../lib/skillBackfill.js";
|
||||
import type * as lib_skillPublish from "../lib/skillPublish.js";
|
||||
import type * as lib_skillStats from "../lib/skillStats.js";
|
||||
import type * as lib_skills from "../lib/skills.js";
|
||||
import type * as lib_soulChangelog from "../lib/soulChangelog.js";
|
||||
import type * as lib_soulPublish from "../lib/soulPublish.js";
|
||||
@@ -39,12 +43,14 @@ import type * as maintenance from "../maintenance.js";
|
||||
import type * as rateLimits from "../rateLimits.js";
|
||||
import type * as search from "../search.js";
|
||||
import type * as seed from "../seed.js";
|
||||
import type * as seedSouls from "../seedSouls.js";
|
||||
import type * as skills from "../skills.js";
|
||||
import type * as soulComments from "../soulComments.js";
|
||||
import type * as soulDownloads from "../soulDownloads.js";
|
||||
import type * as soulStars from "../soulStars.js";
|
||||
import type * as souls from "../souls.js";
|
||||
import type * as stars from "../stars.js";
|
||||
import type * as statsMaintenance from "../statsMaintenance.js";
|
||||
import type * as telemetry from "../telemetry.js";
|
||||
import type * as tokens from "../tokens.js";
|
||||
import type * as uploads from "../uploads.js";
|
||||
@@ -71,6 +77,7 @@ declare const fullApi: ApiFromModules<{
|
||||
http: typeof http;
|
||||
httpApi: typeof httpApi;
|
||||
httpApiV1: typeof httpApiV1;
|
||||
leaderboards: typeof leaderboards;
|
||||
"lib/access": typeof lib_access;
|
||||
"lib/apiTokenAuth": typeof lib_apiTokenAuth;
|
||||
"lib/changelog": typeof lib_changelog;
|
||||
@@ -78,8 +85,11 @@ declare const fullApi: ApiFromModules<{
|
||||
"lib/githubBackup": typeof lib_githubBackup;
|
||||
"lib/githubImport": typeof lib_githubImport;
|
||||
"lib/githubSoulBackup": typeof lib_githubSoulBackup;
|
||||
"lib/leaderboards": typeof lib_leaderboards;
|
||||
"lib/searchText": typeof lib_searchText;
|
||||
"lib/skillBackfill": typeof lib_skillBackfill;
|
||||
"lib/skillPublish": typeof lib_skillPublish;
|
||||
"lib/skillStats": typeof lib_skillStats;
|
||||
"lib/skills": typeof lib_skills;
|
||||
"lib/soulChangelog": typeof lib_soulChangelog;
|
||||
"lib/soulPublish": typeof lib_soulPublish;
|
||||
@@ -89,12 +99,14 @@ declare const fullApi: ApiFromModules<{
|
||||
rateLimits: typeof rateLimits;
|
||||
search: typeof search;
|
||||
seed: typeof seed;
|
||||
seedSouls: typeof seedSouls;
|
||||
skills: typeof skills;
|
||||
soulComments: typeof soulComments;
|
||||
soulDownloads: typeof soulDownloads;
|
||||
soulStars: typeof soulStars;
|
||||
souls: typeof souls;
|
||||
stars: typeof stars;
|
||||
statsMaintenance: typeof statsMaintenance;
|
||||
telemetry: typeof telemetry;
|
||||
tokens: typeof tokens;
|
||||
uploads: typeof uploads;
|
||||
|
||||
@@ -10,4 +10,18 @@ crons.interval(
|
||||
{ batchSize: 50, maxBatches: 5 },
|
||||
)
|
||||
|
||||
crons.interval(
|
||||
'trending-leaderboard',
|
||||
{ minutes: 60 },
|
||||
internal.leaderboards.rebuildTrendingLeaderboardInternal,
|
||||
{ limit: 200 },
|
||||
)
|
||||
|
||||
crons.interval(
|
||||
'skill-stats-backfill',
|
||||
{ minutes: 10 },
|
||||
internal.statsMaintenance.runSkillStatBackfillInternal,
|
||||
{ batchSize: 200, maxBatches: 5 },
|
||||
)
|
||||
|
||||
export default crons
|
||||
|
||||
@@ -364,6 +364,10 @@ export const seedSkillMutation = internalMutation({
|
||||
tags: {},
|
||||
softDeletedAt: undefined,
|
||||
badges: { redactionApproved: undefined },
|
||||
statsDownloads: 0,
|
||||
statsStars: 0,
|
||||
statsInstallsCurrent: 0,
|
||||
statsInstallsAllTime: 0,
|
||||
stats: {
|
||||
downloads: 0,
|
||||
installsCurrent: 0,
|
||||
@@ -413,6 +417,10 @@ export const seedSkillMutation = internalMutation({
|
||||
await ctx.db.patch(skillId, {
|
||||
latestVersionId: versionId,
|
||||
tags: { latest: versionId },
|
||||
statsDownloads: 0,
|
||||
statsStars: 0,
|
||||
statsInstallsCurrent: 0,
|
||||
statsInstallsAllTime: 0,
|
||||
stats: {
|
||||
downloads: 0,
|
||||
installsCurrent: 0,
|
||||
|
||||
+6
-2
@@ -2,6 +2,7 @@ import { v } from 'convex/values'
|
||||
import { zipSync } from 'fflate'
|
||||
import { api } from './_generated/api'
|
||||
import { httpAction, mutation } from './_generated/server'
|
||||
import { applySkillStatDeltas, bumpDailySkillStats } from './lib/skillStats'
|
||||
|
||||
export const downloadZip = httpAction(async (ctx, request) => {
|
||||
const url = new URL(request.url)
|
||||
@@ -69,9 +70,12 @@ export const increment = mutation({
|
||||
handler: async (ctx, args) => {
|
||||
const skill = await ctx.db.get(args.skillId)
|
||||
if (!skill) return
|
||||
const now = Date.now()
|
||||
const patch = applySkillStatDeltas(skill, { downloads: 1 })
|
||||
await ctx.db.patch(skill._id, {
|
||||
stats: { ...skill.stats, downloads: skill.stats.downloads + 1 },
|
||||
updatedAt: Date.now(),
|
||||
...patch,
|
||||
updatedAt: now,
|
||||
})
|
||||
await bumpDailySkillStats(ctx, { skillId: skill._id, now, downloads: 1 })
|
||||
},
|
||||
})
|
||||
|
||||
@@ -26,6 +26,8 @@ import {
|
||||
soulsDeleteRouterV1Http,
|
||||
soulsGetRouterV1Http,
|
||||
soulsPostRouterV1Http,
|
||||
starsDeleteRouterV1Http,
|
||||
starsPostRouterV1Http,
|
||||
whoamiV1Http,
|
||||
} from './httpApiV1'
|
||||
|
||||
@@ -81,6 +83,18 @@ http.route({
|
||||
handler: skillsDeleteRouterV1Http,
|
||||
})
|
||||
|
||||
http.route({
|
||||
pathPrefix: `${ApiRoutes.stars}/`,
|
||||
method: 'POST',
|
||||
handler: starsPostRouterV1Http,
|
||||
})
|
||||
|
||||
http.route({
|
||||
pathPrefix: `${ApiRoutes.stars}/`,
|
||||
method: 'DELETE',
|
||||
handler: starsDeleteRouterV1Http,
|
||||
})
|
||||
|
||||
http.route({
|
||||
path: ApiRoutes.whoami,
|
||||
method: 'GET',
|
||||
|
||||
@@ -11,7 +11,7 @@ vi.mock('./skills', () => ({
|
||||
|
||||
const { requireApiTokenUser } = await import('./lib/apiTokenAuth')
|
||||
const { publishVersionForUser } = await import('./skills')
|
||||
const { __handlers } = await import('./httpApi')
|
||||
const { __handlers, cliSkillDeleteHttp, cliSkillUndeleteHttp } = await import('./httpApi')
|
||||
const { hashSkillFiles } = await import('./lib/skills')
|
||||
|
||||
function makeCtx(partial: Record<string, unknown>) {
|
||||
@@ -55,6 +55,19 @@ describe('httpApi handlers', () => {
|
||||
expect(json.results[0].slug).toBe('a')
|
||||
})
|
||||
|
||||
it('searchSkillsHttp omits approvedOnly when false', async () => {
|
||||
const runAction = vi.fn().mockResolvedValue([])
|
||||
await __handlers.searchSkillsHandler(
|
||||
makeCtx({ runAction }),
|
||||
new Request('https://example.com/api/search?q=test&approvedOnly=false'),
|
||||
)
|
||||
expect(runAction).toHaveBeenCalledWith(expect.anything(), {
|
||||
query: 'test',
|
||||
limit: undefined,
|
||||
approvedOnly: undefined,
|
||||
})
|
||||
})
|
||||
|
||||
it('getSkillHttp validates slug', async () => {
|
||||
const response = await __handlers.getSkillHandler(
|
||||
makeCtx({ runQuery: vi.fn() }),
|
||||
@@ -104,6 +117,30 @@ describe('httpApi handlers', () => {
|
||||
expect(json.owner.handle).toBe('p')
|
||||
})
|
||||
|
||||
it('getSkillHttp returns payload with null owner/latestVersion', async () => {
|
||||
const runQuery = vi.fn().mockResolvedValue({
|
||||
skill: {
|
||||
slug: 'demo',
|
||||
displayName: 'Demo',
|
||||
summary: null,
|
||||
tags: {},
|
||||
stats: {},
|
||||
createdAt: 1,
|
||||
updatedAt: 2,
|
||||
},
|
||||
latestVersion: null,
|
||||
owner: null,
|
||||
})
|
||||
const response = await __handlers.getSkillHandler(
|
||||
makeCtx({ runQuery }),
|
||||
new Request('https://example.com/api/skill?slug=demo'),
|
||||
)
|
||||
expect(response.status).toBe(200)
|
||||
const json = await response.json()
|
||||
expect(json.latestVersion).toBeNull()
|
||||
expect(json.owner).toBeNull()
|
||||
})
|
||||
|
||||
it('resolveSkillVersionHttp validates hash', async () => {
|
||||
const response = await __handlers.resolveSkillVersionHandler(
|
||||
makeCtx({ runQuery: vi.fn() }),
|
||||
@@ -186,6 +223,65 @@ describe('httpApi handlers', () => {
|
||||
expect(runMutation).toHaveBeenCalledTimes(1)
|
||||
})
|
||||
|
||||
it('cliTelemetrySyncHttp returns 400 on invalid payload', async () => {
|
||||
vi.mocked(requireApiTokenUser).mockResolvedValueOnce({ userId: 'users:1' } as never)
|
||||
const response = await __handlers.cliTelemetrySyncHandler(
|
||||
makeCtx({ runMutation: vi.fn() }),
|
||||
new Request('https://x/api/cli/telemetry/sync', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ roots: 'nope' }),
|
||||
}),
|
||||
)
|
||||
expect(response.status).toBe(400)
|
||||
})
|
||||
|
||||
it('cliTelemetrySyncHttp forwards skill versions when provided', async () => {
|
||||
vi.mocked(requireApiTokenUser).mockResolvedValueOnce({ userId: 'users:1' } as never)
|
||||
const runMutation = vi.fn().mockResolvedValue(null)
|
||||
await __handlers.cliTelemetrySyncHandler(
|
||||
makeCtx({ runMutation }),
|
||||
new Request('https://x/api/cli/telemetry/sync', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
roots: [
|
||||
{
|
||||
rootId: 'abc',
|
||||
label: '~/skills',
|
||||
skills: [{ slug: 'weather', version: '1.0.0' }],
|
||||
},
|
||||
],
|
||||
}),
|
||||
}),
|
||||
)
|
||||
expect(runMutation).toHaveBeenCalledWith(expect.anything(), {
|
||||
userId: 'users:1',
|
||||
roots: [
|
||||
{ rootId: 'abc', label: '~/skills', skills: [{ slug: 'weather', version: '1.0.0' }] },
|
||||
],
|
||||
})
|
||||
})
|
||||
|
||||
it('cliTelemetrySyncHttp returns 400 on invalid json', async () => {
|
||||
const request = new Request('https://x/api/cli/telemetry/sync', { method: 'POST', body: '{' })
|
||||
const response = await __handlers.cliTelemetrySyncHandler(makeCtx({}), request)
|
||||
expect(response.status).toBe(400)
|
||||
})
|
||||
|
||||
it('cliTelemetrySyncHttp returns 401 when unauthorized', async () => {
|
||||
vi.mocked(requireApiTokenUser).mockRejectedValueOnce(new Error('Unauthorized'))
|
||||
const response = await __handlers.cliTelemetrySyncHandler(
|
||||
makeCtx({}),
|
||||
new Request('https://x/api/cli/telemetry/sync', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ roots: [] }),
|
||||
}),
|
||||
)
|
||||
expect(response.status).toBe(401)
|
||||
})
|
||||
|
||||
it('cliUploadUrlHttp returns uploadUrl', async () => {
|
||||
vi.mocked(requireApiTokenUser).mockResolvedValueOnce({ userId: 'user1' } as never)
|
||||
const runMutation = vi.fn().mockResolvedValue('https://upload.local')
|
||||
@@ -316,6 +412,48 @@ describe('httpApi handlers', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it('cliSkillUndeleteHttp calls delete handler with deleted=false', async () => {
|
||||
const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {})
|
||||
vi.mocked(requireApiTokenUser).mockResolvedValueOnce({ userId: 'user1' } as never)
|
||||
const runMutation = vi.fn().mockResolvedValue({ ok: true })
|
||||
const response = await cliSkillUndeleteHttp(
|
||||
makeCtx({ runMutation }),
|
||||
new Request('https://x/api/cli/skill/undelete', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ slug: 'demo' }),
|
||||
}),
|
||||
)
|
||||
expect(response.status).toBe(200)
|
||||
expect(runMutation).toHaveBeenCalledWith(expect.anything(), {
|
||||
userId: 'user1',
|
||||
slug: 'demo',
|
||||
deleted: false,
|
||||
})
|
||||
warnSpy.mockRestore()
|
||||
})
|
||||
|
||||
it('cliSkillDeleteHttp calls delete handler with deleted=true', async () => {
|
||||
const warnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {})
|
||||
vi.mocked(requireApiTokenUser).mockResolvedValueOnce({ userId: 'user1' } as never)
|
||||
const runMutation = vi.fn().mockResolvedValue({ ok: true })
|
||||
const response = await cliSkillDeleteHttp(
|
||||
makeCtx({ runMutation }),
|
||||
new Request('https://x/api/cli/skill/delete', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ slug: 'demo' }),
|
||||
}),
|
||||
)
|
||||
expect(response.status).toBe(200)
|
||||
expect(runMutation).toHaveBeenCalledWith(expect.anything(), {
|
||||
userId: 'user1',
|
||||
slug: 'demo',
|
||||
deleted: true,
|
||||
})
|
||||
warnSpy.mockRestore()
|
||||
})
|
||||
|
||||
it('cliSkillDeleteHandler returns 400 on invalid json', async () => {
|
||||
const request = new Request('https://x/api/cli/skill/delete', { method: 'POST', body: '{' })
|
||||
const response = await __handlers.cliSkillDeleteHandler(makeCtx({}), request, true)
|
||||
|
||||
@@ -25,6 +25,29 @@ describe('httpApi', () => {
|
||||
expect(parsed.files[0]?.path).toBe('SKILL.md')
|
||||
})
|
||||
|
||||
it('normalizes optional fields in publish payload', () => {
|
||||
const parsed = __test.parsePublishBody({
|
||||
slug: 'cool-skill',
|
||||
displayName: 'Cool Skill',
|
||||
version: '1.2.3',
|
||||
changelog: '',
|
||||
tags: [],
|
||||
forkOf: { slug: 'base-skill' },
|
||||
files: [
|
||||
{
|
||||
path: 'SKILL.md',
|
||||
size: 5,
|
||||
storageId: 'fakeStorageId',
|
||||
sha256: 'abcd',
|
||||
contentType: 'text/markdown',
|
||||
},
|
||||
],
|
||||
})
|
||||
expect(parsed.tags).toBeUndefined()
|
||||
expect(parsed.source).toBeUndefined()
|
||||
expect(parsed.forkOf).toEqual({ slug: 'base-skill', version: undefined })
|
||||
})
|
||||
|
||||
it('rejects invalid publish payloads', () => {
|
||||
expect(() => __test.parsePublishBody(null)).toThrow(/Publish payload/i)
|
||||
expect(() =>
|
||||
|
||||
@@ -158,6 +158,31 @@ describe('httpApiV1 handlers', () => {
|
||||
expect(json.items[0].tags.latest).toBe('1.0.0')
|
||||
})
|
||||
|
||||
it('lists skills supports sort aliases', async () => {
|
||||
const checks: Array<[string, string]> = [
|
||||
['rating', 'stars'],
|
||||
['installs', 'installsCurrent'],
|
||||
['installs-all-time', 'installsAllTime'],
|
||||
['trending', 'trending'],
|
||||
]
|
||||
|
||||
for (const [input, expected] of checks) {
|
||||
const runQuery = vi.fn(async (_query: unknown, args: Record<string, unknown>) => {
|
||||
if ('sort' in args || 'cursor' in args || 'limit' in args) {
|
||||
expect(args.sort).toBe(expected)
|
||||
return { items: [], nextCursor: null }
|
||||
}
|
||||
return null
|
||||
})
|
||||
const runMutation = vi.fn().mockResolvedValue(okRate())
|
||||
const response = await __handlers.listSkillsV1Handler(
|
||||
makeCtx({ runQuery, runMutation }),
|
||||
new Request(`https://example.com/api/v1/skills?sort=${input}`),
|
||||
)
|
||||
expect(response.status).toBe(200)
|
||||
}
|
||||
})
|
||||
|
||||
it('get skill returns 404 when missing', async () => {
|
||||
const runQuery = vi.fn().mockResolvedValue(null)
|
||||
const runMutation = vi.fn().mockResolvedValue(okRate())
|
||||
@@ -498,4 +523,62 @@ describe('httpApiV1 handlers', () => {
|
||||
)
|
||||
expect(response2.status).toBe(200)
|
||||
})
|
||||
|
||||
it('stars require auth', async () => {
|
||||
vi.mocked(requireApiTokenUser).mockRejectedValueOnce(new Error('Unauthorized'))
|
||||
const runMutation = vi.fn().mockResolvedValue(okRate())
|
||||
const response = await __handlers.starsPostRouterV1Handler(
|
||||
makeCtx({ runMutation }),
|
||||
new Request('https://example.com/api/v1/stars/demo', { method: 'POST' }),
|
||||
)
|
||||
expect(response.status).toBe(401)
|
||||
})
|
||||
|
||||
it('stars add succeeds', async () => {
|
||||
vi.mocked(requireApiTokenUser).mockResolvedValue({
|
||||
userId: 'users:1',
|
||||
user: { handle: 'p' },
|
||||
} as never)
|
||||
const runQuery = vi.fn().mockResolvedValue({ _id: 'skills:1' })
|
||||
const runMutation = vi
|
||||
.fn()
|
||||
.mockResolvedValueOnce(okRate())
|
||||
.mockResolvedValueOnce(okRate())
|
||||
.mockResolvedValueOnce({ ok: true, starred: true, alreadyStarred: false })
|
||||
const response = await __handlers.starsPostRouterV1Handler(
|
||||
makeCtx({ runQuery, runMutation }),
|
||||
new Request('https://example.com/api/v1/stars/demo', {
|
||||
method: 'POST',
|
||||
headers: { Authorization: 'Bearer clh_test' },
|
||||
}),
|
||||
)
|
||||
expect(response.status).toBe(200)
|
||||
const json = await response.json()
|
||||
expect(json.ok).toBe(true)
|
||||
expect(json.starred).toBe(true)
|
||||
})
|
||||
|
||||
it('stars delete succeeds', async () => {
|
||||
vi.mocked(requireApiTokenUser).mockResolvedValue({
|
||||
userId: 'users:1',
|
||||
user: { handle: 'p' },
|
||||
} as never)
|
||||
const runQuery = vi.fn().mockResolvedValue({ _id: 'skills:1' })
|
||||
const runMutation = vi
|
||||
.fn()
|
||||
.mockResolvedValueOnce(okRate())
|
||||
.mockResolvedValueOnce(okRate())
|
||||
.mockResolvedValueOnce({ ok: true, unstarred: true, alreadyUnstarred: false })
|
||||
const response = await __handlers.starsDeleteRouterV1Handler(
|
||||
makeCtx({ runQuery, runMutation }),
|
||||
new Request('https://example.com/api/v1/stars/demo', {
|
||||
method: 'DELETE',
|
||||
headers: { Authorization: 'Bearer clh_test' },
|
||||
}),
|
||||
)
|
||||
expect(response.status).toBe(200)
|
||||
const json = await response.json()
|
||||
expect(json.ok).toBe(true)
|
||||
expect(json.unstarred).toBe(true)
|
||||
})
|
||||
})
|
||||
|
||||
+83
-1
@@ -191,11 +191,14 @@ async function listSkillsV1Handler(ctx: ActionCtx, request: Request) {
|
||||
|
||||
const url = new URL(request.url)
|
||||
const limit = toOptionalNumber(url.searchParams.get('limit'))
|
||||
const cursor = url.searchParams.get('cursor')?.trim() || undefined
|
||||
const rawCursor = url.searchParams.get('cursor')?.trim() || undefined
|
||||
const sort = parseListSort(url.searchParams.get('sort'))
|
||||
const cursor = sort === 'updated' ? rawCursor : undefined
|
||||
|
||||
const result = (await ctx.runQuery(api.skills.listPublicPage, {
|
||||
limit,
|
||||
cursor,
|
||||
sort,
|
||||
})) as ListSkillsResult
|
||||
|
||||
const items = await Promise.all(
|
||||
@@ -753,6 +756,33 @@ function toOptionalNumber(value: string | null) {
|
||||
return Number.isFinite(parsed) ? parsed : undefined
|
||||
}
|
||||
|
||||
type SkillListSort =
|
||||
| 'updated'
|
||||
| 'downloads'
|
||||
| 'stars'
|
||||
| 'installsCurrent'
|
||||
| 'installsAllTime'
|
||||
| 'trending'
|
||||
|
||||
function parseListSort(value: string | null): SkillListSort {
|
||||
const normalized = value?.trim().toLowerCase()
|
||||
if (normalized === 'downloads') return 'downloads'
|
||||
if (normalized === 'stars' || normalized === 'rating') return 'stars'
|
||||
if (
|
||||
normalized === 'installs' ||
|
||||
normalized === 'install' ||
|
||||
normalized === 'installscurrent' ||
|
||||
normalized === 'installs-current'
|
||||
) {
|
||||
return 'installsCurrent'
|
||||
}
|
||||
if (normalized === 'installsalltime' || normalized === 'installs-all-time') {
|
||||
return 'installsAllTime'
|
||||
}
|
||||
if (normalized === 'trending') return 'trending'
|
||||
return 'updated'
|
||||
}
|
||||
|
||||
async function sha256Hex(bytes: Uint8Array) {
|
||||
const buffer = bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength)
|
||||
const digest = await crypto.subtle.digest('SHA-256', buffer)
|
||||
@@ -1047,6 +1077,56 @@ async function soulsDeleteRouterV1Handler(ctx: ActionCtx, request: Request) {
|
||||
}
|
||||
|
||||
export const soulsDeleteRouterV1Http = httpAction(soulsDeleteRouterV1Handler)
|
||||
|
||||
async function starsPostRouterV1Handler(ctx: ActionCtx, request: Request) {
|
||||
const rate = await applyRateLimit(ctx, request, 'write')
|
||||
if (!rate.ok) return rate.response
|
||||
|
||||
const segments = getPathSegments(request, '/api/v1/stars/')
|
||||
if (segments.length !== 1) return text('Not found', 404, rate.headers)
|
||||
const slug = segments[0]?.trim().toLowerCase() ?? ''
|
||||
|
||||
try {
|
||||
const { userId } = await requireApiTokenUser(ctx, request)
|
||||
const skill = await ctx.runQuery(internal.skills.getSkillBySlugInternal, { slug })
|
||||
if (!skill) return text('Skill not found', 404, rate.headers)
|
||||
|
||||
const result = await ctx.runMutation(internal.stars.addStarInternal, {
|
||||
userId,
|
||||
skillId: skill._id,
|
||||
})
|
||||
return json(result, 200, rate.headers)
|
||||
} catch {
|
||||
return text('Unauthorized', 401, rate.headers)
|
||||
}
|
||||
}
|
||||
|
||||
export const starsPostRouterV1Http = httpAction(starsPostRouterV1Handler)
|
||||
|
||||
async function starsDeleteRouterV1Handler(ctx: ActionCtx, request: Request) {
|
||||
const rate = await applyRateLimit(ctx, request, 'write')
|
||||
if (!rate.ok) return rate.response
|
||||
|
||||
const segments = getPathSegments(request, '/api/v1/stars/')
|
||||
if (segments.length !== 1) return text('Not found', 404, rate.headers)
|
||||
const slug = segments[0]?.trim().toLowerCase() ?? ''
|
||||
|
||||
try {
|
||||
const { userId } = await requireApiTokenUser(ctx, request)
|
||||
const skill = await ctx.runQuery(internal.skills.getSkillBySlugInternal, { slug })
|
||||
if (!skill) return text('Skill not found', 404, rate.headers)
|
||||
|
||||
const result = await ctx.runMutation(internal.stars.removeStarInternal, {
|
||||
userId,
|
||||
skillId: skill._id,
|
||||
})
|
||||
return json(result, 200, rate.headers)
|
||||
} catch {
|
||||
return text('Unauthorized', 401, rate.headers)
|
||||
}
|
||||
}
|
||||
|
||||
export const starsDeleteRouterV1Http = httpAction(starsDeleteRouterV1Handler)
|
||||
export const __handlers = {
|
||||
searchSkillsV1Handler,
|
||||
resolveSkillVersionV1Handler,
|
||||
@@ -1060,5 +1140,7 @@ export const __handlers = {
|
||||
publishSoulV1Handler,
|
||||
soulsPostRouterV1Handler,
|
||||
soulsDeleteRouterV1Handler,
|
||||
starsPostRouterV1Handler,
|
||||
starsDeleteRouterV1Handler,
|
||||
whoamiV1Handler,
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
import { v } from 'convex/values'
|
||||
import { internalMutation } from './_generated/server'
|
||||
import { buildTrendingLeaderboard } from './lib/leaderboards'
|
||||
|
||||
const MAX_TRENDING_LIMIT = 200
|
||||
const KEEP_LEADERBOARD_ENTRIES = 3
|
||||
|
||||
export const rebuildTrendingLeaderboardInternal = internalMutation({
|
||||
args: { limit: v.optional(v.number()) },
|
||||
handler: async (ctx, args) => {
|
||||
const limit = clampInt(args.limit ?? MAX_TRENDING_LIMIT, 1, MAX_TRENDING_LIMIT)
|
||||
const now = Date.now()
|
||||
const { startDay, endDay, items } = await buildTrendingLeaderboard(ctx, { limit, now })
|
||||
|
||||
await ctx.db.insert('skillLeaderboards', {
|
||||
kind: 'trending',
|
||||
generatedAt: now,
|
||||
rangeStartDay: startDay,
|
||||
rangeEndDay: endDay,
|
||||
items,
|
||||
})
|
||||
|
||||
const recent = await ctx.db
|
||||
.query('skillLeaderboards')
|
||||
.withIndex('by_kind', (q) => q.eq('kind', 'trending'))
|
||||
.order('desc')
|
||||
.take(KEEP_LEADERBOARD_ENTRIES + 5)
|
||||
|
||||
for (const entry of recent.slice(KEEP_LEADERBOARD_ENTRIES)) {
|
||||
await ctx.db.delete(entry._id)
|
||||
}
|
||||
|
||||
return { ok: true as const, count: items.length }
|
||||
},
|
||||
})
|
||||
|
||||
function clampInt(value: number, min: number, max: number) {
|
||||
return Math.min(Math.max(value, min), max)
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
import type { Id } from '../_generated/dataModel'
|
||||
import type { MutationCtx, QueryCtx } from '../_generated/server'
|
||||
|
||||
const DAY_MS = 24 * 60 * 60 * 1000
|
||||
export const TRENDING_DAYS = 7
|
||||
|
||||
type LeaderboardEntry = {
|
||||
skillId: Id<'skills'>
|
||||
score: number
|
||||
installs: number
|
||||
downloads: number
|
||||
}
|
||||
|
||||
export function toDayKey(timestamp: number) {
|
||||
return Math.floor(timestamp / DAY_MS)
|
||||
}
|
||||
|
||||
export function getTrendingRange(now: number) {
|
||||
const endDay = toDayKey(now)
|
||||
const startDay = endDay - (TRENDING_DAYS - 1)
|
||||
return { startDay, endDay }
|
||||
}
|
||||
|
||||
export async function buildTrendingLeaderboard(
|
||||
ctx: QueryCtx | MutationCtx,
|
||||
params: { limit: number; now?: number },
|
||||
) {
|
||||
const now = params.now ?? Date.now()
|
||||
const { startDay, endDay } = getTrendingRange(now)
|
||||
const rows = await ctx.db
|
||||
.query('skillDailyStats')
|
||||
.withIndex('by_day', (q) => q.gte('day', startDay).lte('day', endDay))
|
||||
.collect()
|
||||
|
||||
const totals = new Map<Id<'skills'>, { installs: number; downloads: number }>()
|
||||
for (const row of rows) {
|
||||
const current = totals.get(row.skillId) ?? { installs: 0, downloads: 0 }
|
||||
current.installs += row.installs
|
||||
current.downloads += row.downloads
|
||||
totals.set(row.skillId, current)
|
||||
}
|
||||
|
||||
const entries = Array.from(totals, ([skillId, totalsEntry]) => ({
|
||||
skillId,
|
||||
installs: totalsEntry.installs,
|
||||
downloads: totalsEntry.downloads,
|
||||
score: totalsEntry.installs,
|
||||
}))
|
||||
|
||||
const items = topN(entries, params.limit, compareTrendingEntries).sort((a, b) =>
|
||||
compareTrendingEntries(b, a),
|
||||
)
|
||||
|
||||
return { startDay, endDay, items }
|
||||
}
|
||||
|
||||
function compareTrendingEntries(a: LeaderboardEntry, b: LeaderboardEntry) {
|
||||
if (a.score !== b.score) return a.score - b.score
|
||||
if (a.downloads !== b.downloads) return a.downloads - b.downloads
|
||||
return 0
|
||||
}
|
||||
|
||||
function topN<T>(entries: T[], limit: number, compare: (a: T, b: T) => number) {
|
||||
if (entries.length <= limit) return entries.slice()
|
||||
|
||||
const heap: T[] = []
|
||||
for (const entry of entries) {
|
||||
if (heap.length < limit) {
|
||||
heap.push(entry)
|
||||
siftUp(heap, heap.length - 1, compare)
|
||||
continue
|
||||
}
|
||||
if (compare(entry, heap[0]) <= 0) continue
|
||||
heap[0] = entry
|
||||
siftDown(heap, 0, compare)
|
||||
}
|
||||
return heap
|
||||
}
|
||||
|
||||
function siftUp<T>(heap: T[], index: number, compare: (a: T, b: T) => number) {
|
||||
let current = index
|
||||
while (current > 0) {
|
||||
const parent = Math.floor((current - 1) / 2)
|
||||
if (compare(heap[current], heap[parent]) >= 0) break
|
||||
;[heap[current], heap[parent]] = [heap[parent], heap[current]]
|
||||
current = parent
|
||||
}
|
||||
}
|
||||
|
||||
function siftDown<T>(heap: T[], index: number, compare: (a: T, b: T) => number) {
|
||||
let current = index
|
||||
const length = heap.length
|
||||
while (true) {
|
||||
const left = current * 2 + 1
|
||||
const right = current * 2 + 2
|
||||
let smallest = current
|
||||
if (left < length && compare(heap[left], heap[smallest]) < 0) smallest = left
|
||||
if (right < length && compare(heap[right], heap[smallest]) < 0) smallest = right
|
||||
if (smallest === current) break
|
||||
;[heap[current], heap[smallest]] = [heap[smallest], heap[current]]
|
||||
current = smallest
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/* @vitest-environment node */
|
||||
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { __test, matchesExactTokens, tokenize } from './searchText'
|
||||
|
||||
describe('searchText', () => {
|
||||
it('tokenize lowercases and splits on punctuation', () => {
|
||||
expect(tokenize('Minimax Usage /minimax-usage')).toEqual([
|
||||
'minimax',
|
||||
'usage',
|
||||
'minimax',
|
||||
'usage',
|
||||
])
|
||||
})
|
||||
|
||||
it('matchesExactTokens requires all query tokens', () => {
|
||||
const queryTokens = tokenize('Remind Me')
|
||||
expect(matchesExactTokens(queryTokens, ['Remind Me', '/remind-me', 'Short summary'])).toBe(true)
|
||||
expect(matchesExactTokens(queryTokens, ['Reminder tool', '/reminder', 'Short summary'])).toBe(
|
||||
false,
|
||||
)
|
||||
})
|
||||
|
||||
it('matchesExactTokens ignores empty inputs', () => {
|
||||
expect(matchesExactTokens([], ['text'])).toBe(false)
|
||||
expect(matchesExactTokens(['token'], [' ', null, undefined])).toBe(false)
|
||||
})
|
||||
|
||||
it('normalize uses lowercase', () => {
|
||||
expect(__test.normalize('AbC')).toBe('abc')
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,25 @@
|
||||
const WORD_RE = /[a-z0-9]+/g
|
||||
|
||||
function normalize(value: string) {
|
||||
return value.toLowerCase()
|
||||
}
|
||||
|
||||
export function tokenize(value: string): string[] {
|
||||
if (!value) return []
|
||||
return normalize(value).match(WORD_RE) ?? []
|
||||
}
|
||||
|
||||
export function matchesExactTokens(
|
||||
queryTokens: string[],
|
||||
parts: Array<string | null | undefined>,
|
||||
): boolean {
|
||||
if (queryTokens.length === 0) return false
|
||||
const text = parts.filter((part) => Boolean(part?.trim())).join(' ')
|
||||
if (!text) return false
|
||||
const textTokens = tokenize(text)
|
||||
if (textTokens.length === 0) return false
|
||||
const textSet = new Set(textTokens)
|
||||
return queryTokens.every((token) => textSet.has(token))
|
||||
}
|
||||
|
||||
export const __test = { normalize, tokenize, matchesExactTokens }
|
||||
@@ -0,0 +1,80 @@
|
||||
import type { Doc, Id } from '../_generated/dataModel'
|
||||
import type { MutationCtx } from '../_generated/server'
|
||||
import { toDayKey } from './leaderboards'
|
||||
|
||||
type SkillStatDeltas = {
|
||||
downloads?: number
|
||||
stars?: number
|
||||
installsCurrent?: number
|
||||
installsAllTime?: number
|
||||
}
|
||||
|
||||
export function applySkillStatDeltas(skill: Doc<'skills'>, deltas: SkillStatDeltas) {
|
||||
const currentDownloads =
|
||||
typeof skill.statsDownloads === 'number' ? skill.statsDownloads : skill.stats.downloads
|
||||
const currentStars = typeof skill.statsStars === 'number' ? skill.statsStars : skill.stats.stars
|
||||
const currentInstallsCurrent =
|
||||
typeof skill.statsInstallsCurrent === 'number'
|
||||
? skill.statsInstallsCurrent
|
||||
: (skill.stats.installsCurrent ?? 0)
|
||||
const currentInstallsAllTime =
|
||||
typeof skill.statsInstallsAllTime === 'number'
|
||||
? skill.statsInstallsAllTime
|
||||
: (skill.stats.installsAllTime ?? 0)
|
||||
|
||||
const nextDownloads = Math.max(0, currentDownloads + (deltas.downloads ?? 0))
|
||||
const nextStars = Math.max(0, currentStars + (deltas.stars ?? 0))
|
||||
const nextInstallsCurrent = Math.max(0, currentInstallsCurrent + (deltas.installsCurrent ?? 0))
|
||||
const nextInstallsAllTime = Math.max(0, currentInstallsAllTime + (deltas.installsAllTime ?? 0))
|
||||
|
||||
return {
|
||||
statsDownloads: nextDownloads,
|
||||
statsStars: nextStars,
|
||||
statsInstallsCurrent: nextInstallsCurrent,
|
||||
statsInstallsAllTime: nextInstallsAllTime,
|
||||
stats: {
|
||||
...skill.stats,
|
||||
downloads: nextDownloads,
|
||||
stars: nextStars,
|
||||
installsCurrent: nextInstallsCurrent,
|
||||
installsAllTime: nextInstallsAllTime,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
export async function bumpDailySkillStats(
|
||||
ctx: MutationCtx,
|
||||
params: {
|
||||
skillId: Id<'skills'>
|
||||
now: number
|
||||
downloads?: number
|
||||
installs?: number
|
||||
},
|
||||
) {
|
||||
const downloads = params.downloads ?? 0
|
||||
const installs = params.installs ?? 0
|
||||
if (downloads === 0 && installs === 0) return
|
||||
|
||||
const day = toDayKey(params.now)
|
||||
const existing = await ctx.db
|
||||
.query('skillDailyStats')
|
||||
.withIndex('by_skill_day', (q) => q.eq('skillId', params.skillId).eq('day', day))
|
||||
.unique()
|
||||
|
||||
if (existing) {
|
||||
await ctx.db.patch(existing._id, {
|
||||
downloads: Math.max(0, existing.downloads + downloads),
|
||||
installs: Math.max(0, existing.installs + installs),
|
||||
updatedAt: params.now,
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
await ctx.db.insert('skillDailyStats', {
|
||||
skillId: params.skillId,
|
||||
day,
|
||||
downloads: Math.max(0, downloads),
|
||||
installs: Math.max(0, installs),
|
||||
updatedAt: params.now,
|
||||
})
|
||||
}
|
||||
+26
-13
@@ -1,20 +1,33 @@
|
||||
/* @vitest-environment node */
|
||||
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { API_TOKEN_PREFIX, generateToken, hashToken } from './tokens'
|
||||
import { __test, generateToken, hashToken } from './tokens'
|
||||
|
||||
describe('tokens', () => {
|
||||
it('generates token with prefix and url-safe chars', () => {
|
||||
const { token, prefix } = generateToken()
|
||||
expect(token.startsWith(API_TOKEN_PREFIX)).toBe(true)
|
||||
expect(prefix).toBe(token.slice(0, 12))
|
||||
expect(token).toMatch(/^[a-z0-9_-]+$/i)
|
||||
it('hashToken returns sha256 hex', async () => {
|
||||
await expect(hashToken('test')).resolves.toBe(
|
||||
'9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08',
|
||||
)
|
||||
})
|
||||
|
||||
it('hashes tokens deterministically', async () => {
|
||||
const a = await hashToken('clh_test')
|
||||
const b = await hashToken('clh_test')
|
||||
const c = await hashToken('clh_other')
|
||||
expect(a).toBe(b)
|
||||
expect(a).not.toBe(c)
|
||||
expect(a).toMatch(/^[a-f0-9]{64}$/)
|
||||
it('generateToken returns token + prefix', () => {
|
||||
const { token, prefix } = generateToken()
|
||||
expect(token).toMatch(/^clh_[A-Za-z0-9_-]+$/)
|
||||
expect(prefix).toBe(token.slice(0, 12))
|
||||
})
|
||||
|
||||
it('toHex encodes bytes', () => {
|
||||
expect(__test.toHex(new Uint8Array([0, 15, 255]))).toBe('000fff')
|
||||
})
|
||||
|
||||
it('toBase64 encodes 1/2/3-byte tails', () => {
|
||||
expect(__test.toBase64(new Uint8Array([0xff]))).toBe('/w==')
|
||||
expect(__test.toBase64(new Uint8Array([0xff, 0xee]))).toBe('/+4=')
|
||||
expect(__test.toBase64(new Uint8Array([0xff, 0xee, 0xdd]))).toBe('/+7d')
|
||||
})
|
||||
|
||||
it('toBase64Url replaces alphabet and strips padding', () => {
|
||||
expect(__test.toBase64Url(new Uint8Array([0xff]))).toBe('_w')
|
||||
expect(__test.toBase64Url(new Uint8Array([0xfa, 0x00, 0x00]))).toBe('-gAA')
|
||||
})
|
||||
})
|
||||
|
||||
@@ -43,3 +43,9 @@ function toBase64(bytes: Uint8Array) {
|
||||
}
|
||||
return output
|
||||
}
|
||||
|
||||
export const __test = {
|
||||
toHex,
|
||||
toBase64,
|
||||
toBase64Url,
|
||||
}
|
||||
|
||||
@@ -49,6 +49,10 @@ const skills = defineTable({
|
||||
),
|
||||
}),
|
||||
batch: v.optional(v.string()),
|
||||
statsDownloads: v.optional(v.number()),
|
||||
statsStars: v.optional(v.number()),
|
||||
statsInstallsCurrent: v.optional(v.number()),
|
||||
statsInstallsAllTime: v.optional(v.number()),
|
||||
stats: v.object({
|
||||
downloads: v.number(),
|
||||
installsCurrent: v.optional(v.number()),
|
||||
@@ -63,6 +67,10 @@ const skills = defineTable({
|
||||
.index('by_slug', ['slug'])
|
||||
.index('by_owner', ['ownerUserId'])
|
||||
.index('by_updated', ['updatedAt'])
|
||||
.index('by_stats_downloads', ['statsDownloads', 'updatedAt'])
|
||||
.index('by_stats_stars', ['statsStars', 'updatedAt'])
|
||||
.index('by_stats_installs_current', ['statsInstallsCurrent', 'updatedAt'])
|
||||
.index('by_stats_installs_all_time', ['statsInstallsAllTime', 'updatedAt'])
|
||||
.index('by_batch', ['batch'])
|
||||
|
||||
const souls = defineTable({
|
||||
@@ -177,6 +185,38 @@ const skillEmbeddings = defineTable({
|
||||
filterFields: ['visibility'],
|
||||
})
|
||||
|
||||
const skillDailyStats = defineTable({
|
||||
skillId: v.id('skills'),
|
||||
day: v.number(),
|
||||
downloads: v.number(),
|
||||
installs: v.number(),
|
||||
updatedAt: v.number(),
|
||||
})
|
||||
.index('by_skill_day', ['skillId', 'day'])
|
||||
.index('by_day', ['day'])
|
||||
|
||||
const skillLeaderboards = defineTable({
|
||||
kind: v.string(),
|
||||
generatedAt: v.number(),
|
||||
rangeStartDay: v.number(),
|
||||
rangeEndDay: v.number(),
|
||||
items: v.array(
|
||||
v.object({
|
||||
skillId: v.id('skills'),
|
||||
score: v.number(),
|
||||
installs: v.number(),
|
||||
downloads: v.number(),
|
||||
}),
|
||||
),
|
||||
}).index('by_kind', ['kind', 'generatedAt'])
|
||||
|
||||
const skillStatBackfillState = defineTable({
|
||||
key: v.string(),
|
||||
cursor: v.optional(v.string()),
|
||||
doneAt: v.optional(v.number()),
|
||||
updatedAt: v.number(),
|
||||
}).index('by_key', ['key'])
|
||||
|
||||
const soulEmbeddings = defineTable({
|
||||
soulId: v.id('souls'),
|
||||
versionId: v.id('soulVersions'),
|
||||
@@ -323,6 +363,9 @@ export default defineSchema({
|
||||
soulVersionFingerprints,
|
||||
skillEmbeddings,
|
||||
soulEmbeddings,
|
||||
skillDailyStats,
|
||||
skillLeaderboards,
|
||||
skillStatBackfillState,
|
||||
comments,
|
||||
soulComments,
|
||||
stars,
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
/* @vitest-environment node */
|
||||
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { __test } from './search'
|
||||
|
||||
describe('search helpers', () => {
|
||||
it('advances candidate limit until max', () => {
|
||||
expect(__test.getNextCandidateLimit(50, 1000)).toBe(100)
|
||||
expect(__test.getNextCandidateLimit(800, 1000)).toBe(1000)
|
||||
expect(__test.getNextCandidateLimit(1000, 1000)).toBeNull()
|
||||
})
|
||||
})
|
||||
+130
-38
@@ -3,15 +3,22 @@ import { internal } from './_generated/api'
|
||||
import type { Doc, Id } from './_generated/dataModel'
|
||||
import { action, internalQuery } from './_generated/server'
|
||||
import { generateEmbedding } from './lib/embeddings'
|
||||
import { matchesExactTokens, tokenize } from './lib/searchText'
|
||||
|
||||
type HydratedEntry = {
|
||||
embeddingId: Id<'skillEmbeddings'>
|
||||
skill: Doc<'skills'> | null
|
||||
version: Doc<'skillVersions'> | null
|
||||
ownerHandle: string | null
|
||||
}
|
||||
|
||||
type SearchResult = HydratedEntry & { score: number }
|
||||
|
||||
function getNextCandidateLimit(current: number, max: number) {
|
||||
const next = Math.min(current * 2, max)
|
||||
return next > current ? next : null
|
||||
}
|
||||
|
||||
export const searchSkills: ReturnType<typeof action> = action({
|
||||
args: {
|
||||
query: v.string(),
|
||||
@@ -21,49 +28,98 @@ export const searchSkills: ReturnType<typeof action> = action({
|
||||
handler: async (ctx, args): Promise<SearchResult[]> => {
|
||||
const query = args.query.trim()
|
||||
if (!query) return []
|
||||
const vector = await generateEmbedding(query)
|
||||
const results = await ctx.vectorSearch('skillEmbeddings', 'by_embedding', {
|
||||
vector,
|
||||
limit: args.limit ?? 10,
|
||||
filter: (q) => q.or(q.eq('visibility', 'latest'), q.eq('visibility', 'latest-approved')),
|
||||
})
|
||||
const queryTokens = tokenize(query)
|
||||
if (queryTokens.length === 0) return []
|
||||
let vector: number[]
|
||||
try {
|
||||
vector = await generateEmbedding(query)
|
||||
} catch (error) {
|
||||
console.warn('Search embedding generation failed', error)
|
||||
return []
|
||||
}
|
||||
const limit = args.limit ?? 10
|
||||
const maxCandidate = Math.min(Math.max(limit * 10, 200), 1000)
|
||||
let candidateLimit = Math.max(limit * 3, 50)
|
||||
let hydrated: HydratedEntry[] = []
|
||||
let scoreById = new Map<Id<'skillEmbeddings'>, number>()
|
||||
let exactMatches: HydratedEntry[] = []
|
||||
|
||||
const hydrated = (await ctx.runQuery(internal.search.hydrateResults, {
|
||||
embeddingIds: results.map((result) => result._id),
|
||||
})) as HydratedEntry[]
|
||||
while (candidateLimit <= maxCandidate) {
|
||||
const results = await ctx.vectorSearch('skillEmbeddings', 'by_embedding', {
|
||||
vector,
|
||||
limit: candidateLimit,
|
||||
filter: (q) => q.or(q.eq('visibility', 'latest'), q.eq('visibility', 'latest-approved')),
|
||||
})
|
||||
|
||||
const scoreById = new Map<Id<'skillEmbeddings'>, number>(
|
||||
results.map((result) => [result._id, result._score]),
|
||||
)
|
||||
hydrated = (await ctx.runQuery(internal.search.hydrateResults, {
|
||||
embeddingIds: results.map((result) => result._id),
|
||||
})) as HydratedEntry[]
|
||||
|
||||
const filtered = args.highlightedOnly
|
||||
? hydrated.filter((entry) => entry.skill?.batch === 'highlighted')
|
||||
: hydrated
|
||||
scoreById = new Map<Id<'skillEmbeddings'>, number>(
|
||||
results.map((result) => [result._id, result._score]),
|
||||
)
|
||||
|
||||
return filtered
|
||||
const filtered = args.highlightedOnly
|
||||
? hydrated.filter((entry) => entry.skill?.batch === 'highlighted')
|
||||
: hydrated
|
||||
|
||||
exactMatches = filtered.filter((entry) =>
|
||||
matchesExactTokens(queryTokens, [
|
||||
entry.skill?.displayName,
|
||||
entry.skill?.slug,
|
||||
entry.skill?.summary,
|
||||
]),
|
||||
)
|
||||
|
||||
if (exactMatches.length >= limit || results.length < candidateLimit) {
|
||||
break
|
||||
}
|
||||
|
||||
const nextLimit = getNextCandidateLimit(candidateLimit, maxCandidate)
|
||||
if (!nextLimit) break
|
||||
candidateLimit = nextLimit
|
||||
}
|
||||
|
||||
return exactMatches
|
||||
.map((entry) => ({
|
||||
...entry,
|
||||
score: scoreById.get(entry.embeddingId) ?? 0,
|
||||
}))
|
||||
.filter((entry) => entry.skill)
|
||||
.slice(0, limit)
|
||||
},
|
||||
})
|
||||
|
||||
export const hydrateResults = internalQuery({
|
||||
args: { embeddingIds: v.array(v.id('skillEmbeddings')) },
|
||||
handler: async (ctx, args): Promise<HydratedEntry[]> => {
|
||||
const entries: HydratedEntry[] = []
|
||||
const ownerHandleCache = new Map<Id<'users'>, Promise<string | null>>()
|
||||
|
||||
for (const embeddingId of args.embeddingIds) {
|
||||
const embedding = await ctx.db.get(embeddingId)
|
||||
if (!embedding) continue
|
||||
const skill = await ctx.db.get(embedding.skillId)
|
||||
if (skill?.softDeletedAt) continue
|
||||
const version = await ctx.db.get(embedding.versionId)
|
||||
entries.push({ embeddingId, skill, version })
|
||||
const getOwnerHandle = (ownerUserId: Id<'users'>) => {
|
||||
const cached = ownerHandleCache.get(ownerUserId)
|
||||
if (cached) return cached
|
||||
const handlePromise = ctx.db
|
||||
.get(ownerUserId)
|
||||
.then((owner) => owner?.handle ?? owner?._id ?? null)
|
||||
ownerHandleCache.set(ownerUserId, handlePromise)
|
||||
return handlePromise
|
||||
}
|
||||
|
||||
return entries
|
||||
const entries = await Promise.all(
|
||||
args.embeddingIds.map(async (embeddingId) => {
|
||||
const embedding = await ctx.db.get(embeddingId)
|
||||
if (!embedding) return null
|
||||
const skill = await ctx.db.get(embedding.skillId)
|
||||
if (!skill || skill.softDeletedAt) return null
|
||||
const [version, ownerHandle] = await Promise.all([
|
||||
ctx.db.get(embedding.versionId),
|
||||
getOwnerHandle(skill.ownerUserId),
|
||||
])
|
||||
return { embeddingId, skill, version, ownerHandle }
|
||||
}),
|
||||
)
|
||||
|
||||
return entries.filter((entry): entry is HydratedEntry => entry !== null)
|
||||
},
|
||||
})
|
||||
|
||||
@@ -83,27 +139,61 @@ export const searchSouls: ReturnType<typeof action> = action({
|
||||
handler: async (ctx, args): Promise<SoulSearchResult[]> => {
|
||||
const query = args.query.trim()
|
||||
if (!query) return []
|
||||
const vector = await generateEmbedding(query)
|
||||
const results = await ctx.vectorSearch('soulEmbeddings', 'by_embedding', {
|
||||
vector,
|
||||
limit: args.limit ?? 10,
|
||||
filter: (q) => q.or(q.eq('visibility', 'latest'), q.eq('visibility', 'latest-approved')),
|
||||
})
|
||||
const queryTokens = tokenize(query)
|
||||
if (queryTokens.length === 0) return []
|
||||
let vector: number[]
|
||||
try {
|
||||
vector = await generateEmbedding(query)
|
||||
} catch (error) {
|
||||
console.warn('Search embedding generation failed', error)
|
||||
return []
|
||||
}
|
||||
const limit = args.limit ?? 10
|
||||
const maxCandidate = Math.min(Math.max(limit * 10, 200), 1000)
|
||||
let candidateLimit = Math.max(limit * 3, 50)
|
||||
let hydrated: HydratedSoulEntry[] = []
|
||||
let scoreById = new Map<Id<'soulEmbeddings'>, number>()
|
||||
let exactMatches: HydratedSoulEntry[] = []
|
||||
|
||||
const hydrated = (await ctx.runQuery(internal.search.hydrateSoulResults, {
|
||||
embeddingIds: results.map((result) => result._id),
|
||||
})) as HydratedSoulEntry[]
|
||||
while (candidateLimit <= maxCandidate) {
|
||||
const results = await ctx.vectorSearch('soulEmbeddings', 'by_embedding', {
|
||||
vector,
|
||||
limit: candidateLimit,
|
||||
filter: (q) => q.or(q.eq('visibility', 'latest'), q.eq('visibility', 'latest-approved')),
|
||||
})
|
||||
|
||||
const scoreById = new Map<Id<'soulEmbeddings'>, number>(
|
||||
results.map((result) => [result._id, result._score]),
|
||||
)
|
||||
hydrated = (await ctx.runQuery(internal.search.hydrateSoulResults, {
|
||||
embeddingIds: results.map((result) => result._id),
|
||||
})) as HydratedSoulEntry[]
|
||||
|
||||
return hydrated
|
||||
scoreById = new Map<Id<'soulEmbeddings'>, number>(
|
||||
results.map((result) => [result._id, result._score]),
|
||||
)
|
||||
|
||||
exactMatches = hydrated.filter((entry) =>
|
||||
matchesExactTokens(queryTokens, [
|
||||
entry.soul?.displayName,
|
||||
entry.soul?.slug,
|
||||
entry.soul?.summary,
|
||||
]),
|
||||
)
|
||||
|
||||
if (exactMatches.length >= limit || results.length < candidateLimit) {
|
||||
break
|
||||
}
|
||||
|
||||
const nextLimit = getNextCandidateLimit(candidateLimit, maxCandidate)
|
||||
if (!nextLimit) break
|
||||
candidateLimit = nextLimit
|
||||
}
|
||||
|
||||
return exactMatches
|
||||
.map((entry) => ({
|
||||
...entry,
|
||||
score: scoreById.get(entry.embeddingId) ?? 0,
|
||||
}))
|
||||
.filter((entry) => entry.soul)
|
||||
.slice(0, limit)
|
||||
},
|
||||
})
|
||||
|
||||
@@ -124,3 +214,5 @@ export const hydrateSoulResults = internalQuery({
|
||||
return entries
|
||||
},
|
||||
})
|
||||
|
||||
export const __test = { getNextCandidateLimit }
|
||||
|
||||
+124
-16
@@ -1,10 +1,11 @@
|
||||
import { ConvexError, v } from 'convex/values'
|
||||
import { internal } from './_generated/api'
|
||||
import type { Doc, Id } from './_generated/dataModel'
|
||||
import type { MutationCtx } from './_generated/server'
|
||||
import type { MutationCtx, QueryCtx } from './_generated/server'
|
||||
import { action, internalMutation, internalQuery, mutation, query } from './_generated/server'
|
||||
import { assertRole, requireUser, requireUserFromAction } from './lib/access'
|
||||
import { generateChangelogPreview as buildChangelogPreview } from './lib/changelog'
|
||||
import { buildTrendingLeaderboard, getTrendingRange } from './lib/leaderboards'
|
||||
import {
|
||||
fetchText,
|
||||
type PublishResult,
|
||||
@@ -20,9 +21,43 @@ type FileTextResult = { path: string; text: string; size: number; sha256: string
|
||||
|
||||
const MAX_DIFF_FILE_BYTES = 200 * 1024
|
||||
const MAX_LIST_LIMIT = 50
|
||||
const MAX_PUBLIC_LIST_LIMIT = 200
|
||||
const MAX_LIST_BULK_LIMIT = 200
|
||||
const MAX_LIST_TAKE = 1000
|
||||
|
||||
async function resolveOwnerHandle(ctx: QueryCtx, ownerUserId: Id<'users'>) {
|
||||
const owner = await ctx.db.get(ownerUserId)
|
||||
return owner?.handle ?? owner?._id ?? null
|
||||
}
|
||||
|
||||
type PublicSkillEntry = {
|
||||
skill: Doc<'skills'>
|
||||
latestVersion: Doc<'skillVersions'> | null
|
||||
ownerHandle: string | null
|
||||
}
|
||||
|
||||
async function buildPublicSkillEntries(ctx: QueryCtx, skills: Doc<'skills'>[]) {
|
||||
const ownerHandleCache = new Map<Id<'users'>, Promise<string | null>>()
|
||||
|
||||
const getOwnerHandle = (ownerUserId: Id<'users'>) => {
|
||||
const cached = ownerHandleCache.get(ownerUserId)
|
||||
if (cached) return cached
|
||||
const handlePromise = resolveOwnerHandle(ctx, ownerUserId)
|
||||
ownerHandleCache.set(ownerUserId, handlePromise)
|
||||
return handlePromise
|
||||
}
|
||||
|
||||
return Promise.all(
|
||||
skills.map(async (skill) => {
|
||||
const [latestVersion, ownerHandle] = await Promise.all([
|
||||
skill.latestVersionId ? ctx.db.get(skill.latestVersionId) : null,
|
||||
getOwnerHandle(skill.ownerUserId),
|
||||
])
|
||||
return { skill, latestVersion, ownerHandle }
|
||||
}),
|
||||
) satisfies Promise<PublicSkillEntry[]>
|
||||
}
|
||||
|
||||
export const getBySlug = query({
|
||||
args: { slug: v.string() },
|
||||
handler: async (ctx, args) => {
|
||||
@@ -154,30 +189,99 @@ export const listPublicPage = query({
|
||||
args: {
|
||||
cursor: v.optional(v.string()),
|
||||
limit: v.optional(v.number()),
|
||||
sort: v.optional(
|
||||
v.union(
|
||||
v.literal('updated'),
|
||||
v.literal('downloads'),
|
||||
v.literal('stars'),
|
||||
v.literal('installsCurrent'),
|
||||
v.literal('installsAllTime'),
|
||||
v.literal('trending'),
|
||||
),
|
||||
),
|
||||
},
|
||||
handler: async (ctx, args) => {
|
||||
const limit = clampInt(args.limit ?? 24, 1, MAX_LIST_LIMIT)
|
||||
const { page, isDone, continueCursor } = await ctx.db
|
||||
.query('skills')
|
||||
.withIndex('by_updated', (q) => q)
|
||||
.order('desc')
|
||||
.paginate({ cursor: args.cursor ?? null, numItems: limit })
|
||||
const sort = args.sort ?? 'updated'
|
||||
const limit = clampInt(args.limit ?? 24, 1, MAX_PUBLIC_LIST_LIMIT)
|
||||
|
||||
const items: Array<{
|
||||
skill: Doc<'skills'>
|
||||
latestVersion: Doc<'skillVersions'> | null
|
||||
}> = []
|
||||
if (sort === 'updated') {
|
||||
const { page, isDone, continueCursor } = await ctx.db
|
||||
.query('skills')
|
||||
.withIndex('by_updated', (q) => q)
|
||||
.order('desc')
|
||||
.paginate({ cursor: args.cursor ?? null, numItems: limit })
|
||||
|
||||
for (const skill of page) {
|
||||
if (skill.softDeletedAt) continue
|
||||
const latestVersion = skill.latestVersionId ? await ctx.db.get(skill.latestVersionId) : null
|
||||
items.push({ skill, latestVersion })
|
||||
const skills = page.filter((skill) => !skill.softDeletedAt)
|
||||
const items = await buildPublicSkillEntries(ctx, skills)
|
||||
|
||||
return { items, nextCursor: isDone ? null : continueCursor }
|
||||
}
|
||||
|
||||
return { items, nextCursor: isDone ? null : continueCursor }
|
||||
if (sort === 'trending') {
|
||||
const entries = await getTrendingEntries(ctx, limit)
|
||||
const skills: Doc<'skills'>[] = []
|
||||
|
||||
for (const entry of entries) {
|
||||
const skill = await ctx.db.get(entry.skillId)
|
||||
if (!skill || skill.softDeletedAt) continue
|
||||
skills.push(skill)
|
||||
if (skills.length >= limit) break
|
||||
}
|
||||
|
||||
const items = await buildPublicSkillEntries(ctx, skills)
|
||||
return { items, nextCursor: null }
|
||||
}
|
||||
|
||||
const index = sortToIndex(sort)
|
||||
const page = await ctx.db
|
||||
.query('skills')
|
||||
.withIndex(index, (q) => q)
|
||||
.order('desc')
|
||||
.take(Math.min(limit * 5, MAX_LIST_TAKE))
|
||||
|
||||
const filtered = page.filter((skill) => !skill.softDeletedAt).slice(0, limit)
|
||||
const items = await buildPublicSkillEntries(ctx, filtered)
|
||||
return { items, nextCursor: null }
|
||||
},
|
||||
})
|
||||
|
||||
function sortToIndex(
|
||||
sort: 'downloads' | 'stars' | 'installsCurrent' | 'installsAllTime',
|
||||
):
|
||||
| 'by_stats_downloads'
|
||||
| 'by_stats_stars'
|
||||
| 'by_stats_installs_current'
|
||||
| 'by_stats_installs_all_time' {
|
||||
switch (sort) {
|
||||
case 'downloads':
|
||||
return 'by_stats_downloads'
|
||||
case 'stars':
|
||||
return 'by_stats_stars'
|
||||
case 'installsCurrent':
|
||||
return 'by_stats_installs_current'
|
||||
case 'installsAllTime':
|
||||
return 'by_stats_installs_all_time'
|
||||
}
|
||||
}
|
||||
|
||||
async function getTrendingEntries(ctx: QueryCtx, limit: number) {
|
||||
const now = Date.now()
|
||||
const { startDay, endDay } = getTrendingRange(now)
|
||||
const latest = await ctx.db
|
||||
.query('skillLeaderboards')
|
||||
.withIndex('by_kind', (q) => q.eq('kind', 'trending'))
|
||||
.order('desc')
|
||||
.take(1)
|
||||
|
||||
const leaderboard = latest[0]
|
||||
if (leaderboard && leaderboard.rangeStartDay === startDay && leaderboard.rangeEndDay === endDay) {
|
||||
return leaderboard.items.slice(0, limit)
|
||||
}
|
||||
|
||||
const fallback = await buildTrendingLeaderboard(ctx, { limit, now })
|
||||
return fallback.items
|
||||
}
|
||||
|
||||
export const listVersions = query({
|
||||
args: { skillId: v.id('skills'), limit: v.optional(v.number()) },
|
||||
handler: async (ctx, args) => {
|
||||
@@ -587,6 +691,10 @@ export const insertVersion = internalMutation({
|
||||
tags: {},
|
||||
softDeletedAt: undefined,
|
||||
badges: { redactionApproved: undefined },
|
||||
statsDownloads: 0,
|
||||
statsStars: 0,
|
||||
statsInstallsCurrent: 0,
|
||||
statsInstallsAllTime: 0,
|
||||
stats: {
|
||||
downloads: 0,
|
||||
installsCurrent: 0,
|
||||
|
||||
+52
-3
@@ -1,7 +1,8 @@
|
||||
import { v } from 'convex/values'
|
||||
import type { Doc } from './_generated/dataModel'
|
||||
import { mutation, query } from './_generated/server'
|
||||
import { internalMutation, mutation, query } from './_generated/server'
|
||||
import { requireUser } from './lib/access'
|
||||
import { applySkillStatDeltas } from './lib/skillStats'
|
||||
|
||||
export const isStarred = query({
|
||||
args: { skillId: v.id('skills') },
|
||||
@@ -29,8 +30,9 @@ export const toggle = mutation({
|
||||
|
||||
if (existing) {
|
||||
await ctx.db.delete(existing._id)
|
||||
const patch = applySkillStatDeltas(skill, { stars: -1 })
|
||||
await ctx.db.patch(skill._id, {
|
||||
stats: { ...skill.stats, stars: Math.max(0, skill.stats.stars - 1) },
|
||||
...patch,
|
||||
updatedAt: Date.now(),
|
||||
})
|
||||
return { starred: false }
|
||||
@@ -43,7 +45,7 @@ export const toggle = mutation({
|
||||
})
|
||||
|
||||
await ctx.db.patch(skill._id, {
|
||||
stats: { ...skill.stats, stars: skill.stats.stars + 1 },
|
||||
...applySkillStatDeltas(skill, { stars: 1 }),
|
||||
updatedAt: Date.now(),
|
||||
})
|
||||
|
||||
@@ -68,3 +70,50 @@ export const listByUser = query({
|
||||
return skills
|
||||
},
|
||||
})
|
||||
|
||||
export const addStarInternal = internalMutation({
|
||||
args: { userId: v.id('users'), skillId: v.id('skills') },
|
||||
handler: async (ctx, args) => {
|
||||
const skill = await ctx.db.get(args.skillId)
|
||||
if (!skill) throw new Error('Skill not found')
|
||||
const existing = await ctx.db
|
||||
.query('stars')
|
||||
.withIndex('by_skill_user', (q) => q.eq('skillId', args.skillId).eq('userId', args.userId))
|
||||
.unique()
|
||||
if (existing) return { ok: true as const, starred: true, alreadyStarred: true }
|
||||
|
||||
await ctx.db.insert('stars', {
|
||||
skillId: args.skillId,
|
||||
userId: args.userId,
|
||||
createdAt: Date.now(),
|
||||
})
|
||||
|
||||
await ctx.db.patch(skill._id, {
|
||||
...applySkillStatDeltas(skill, { stars: 1 }),
|
||||
updatedAt: Date.now(),
|
||||
})
|
||||
|
||||
return { ok: true as const, starred: true, alreadyStarred: false }
|
||||
},
|
||||
})
|
||||
|
||||
export const removeStarInternal = internalMutation({
|
||||
args: { userId: v.id('users'), skillId: v.id('skills') },
|
||||
handler: async (ctx, args) => {
|
||||
const skill = await ctx.db.get(args.skillId)
|
||||
if (!skill) throw new Error('Skill not found')
|
||||
const existing = await ctx.db
|
||||
.query('stars')
|
||||
.withIndex('by_skill_user', (q) => q.eq('skillId', args.skillId).eq('userId', args.userId))
|
||||
.unique()
|
||||
if (!existing) return { ok: true as const, unstarred: false, alreadyUnstarred: true }
|
||||
|
||||
await ctx.db.delete(existing._id)
|
||||
await ctx.db.patch(skill._id, {
|
||||
...applySkillStatDeltas(skill, { stars: -1 }),
|
||||
updatedAt: Date.now(),
|
||||
})
|
||||
|
||||
return { ok: true as const, unstarred: true, alreadyUnstarred: false }
|
||||
},
|
||||
})
|
||||
|
||||
@@ -0,0 +1,180 @@
|
||||
import { v } from 'convex/values'
|
||||
import { internal } from './_generated/api'
|
||||
import type { Doc } from './_generated/dataModel'
|
||||
import { internalAction, internalMutation, internalQuery } from './_generated/server'
|
||||
|
||||
const DEFAULT_BATCH_SIZE = 200
|
||||
const MAX_BATCH_SIZE = 1000
|
||||
const DEFAULT_MAX_BATCHES = 5
|
||||
const MAX_MAX_BATCHES = 50
|
||||
const BACKFILL_STATE_KEY = 'default'
|
||||
|
||||
export const backfillSkillStatFieldsInternal = internalMutation({
|
||||
args: {
|
||||
cursor: v.optional(v.string()),
|
||||
batchSize: v.optional(v.number()),
|
||||
},
|
||||
handler: async (ctx, args) => {
|
||||
const batchSize = clampInt(args.batchSize ?? DEFAULT_BATCH_SIZE, 1, MAX_BATCH_SIZE)
|
||||
const { page, isDone, continueCursor } = await ctx.db
|
||||
.query('skills')
|
||||
.order('asc')
|
||||
.paginate({ cursor: args.cursor ?? null, numItems: batchSize })
|
||||
|
||||
let patched = 0
|
||||
for (const skill of page) {
|
||||
const next = buildSkillStatPatch(skill)
|
||||
if (!next) continue
|
||||
await ctx.db.patch(skill._id, next)
|
||||
patched += 1
|
||||
}
|
||||
|
||||
return {
|
||||
ok: true as const,
|
||||
scanned: page.length,
|
||||
patched,
|
||||
cursor: isDone ? null : continueCursor,
|
||||
isDone,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
type BackfillState = {
|
||||
cursor: string | null
|
||||
doneAt?: number
|
||||
}
|
||||
|
||||
export const getSkillStatBackfillStateInternal = internalQuery({
|
||||
args: {},
|
||||
handler: async (ctx): Promise<BackfillState> => {
|
||||
const state = await ctx.db
|
||||
.query('skillStatBackfillState')
|
||||
.withIndex('by_key', (q) => q.eq('key', BACKFILL_STATE_KEY))
|
||||
.unique()
|
||||
return { cursor: state?.cursor ?? null, doneAt: state?.doneAt }
|
||||
},
|
||||
})
|
||||
|
||||
export const setSkillStatBackfillStateInternal = internalMutation({
|
||||
args: {
|
||||
cursor: v.optional(v.string()),
|
||||
doneAt: v.optional(v.number()),
|
||||
},
|
||||
handler: async (ctx, args) => {
|
||||
const now = Date.now()
|
||||
const state = await ctx.db
|
||||
.query('skillStatBackfillState')
|
||||
.withIndex('by_key', (q) => q.eq('key', BACKFILL_STATE_KEY))
|
||||
.unique()
|
||||
|
||||
if (!state) {
|
||||
await ctx.db.insert('skillStatBackfillState', {
|
||||
key: BACKFILL_STATE_KEY,
|
||||
cursor: args.cursor,
|
||||
doneAt: args.doneAt,
|
||||
updatedAt: now,
|
||||
})
|
||||
return { ok: true as const }
|
||||
}
|
||||
|
||||
await ctx.db.patch(state._id, {
|
||||
cursor: args.cursor,
|
||||
doneAt: args.doneAt,
|
||||
updatedAt: now,
|
||||
})
|
||||
|
||||
return { ok: true as const }
|
||||
},
|
||||
})
|
||||
|
||||
export const runSkillStatBackfillInternal = internalAction({
|
||||
args: {
|
||||
batchSize: v.optional(v.number()),
|
||||
maxBatches: v.optional(v.number()),
|
||||
resetCursor: v.optional(v.boolean()),
|
||||
},
|
||||
handler: async (ctx, args) => {
|
||||
const batchSize = clampInt(args.batchSize ?? DEFAULT_BATCH_SIZE, 1, MAX_BATCH_SIZE)
|
||||
const maxBatches = clampInt(args.maxBatches ?? DEFAULT_MAX_BATCHES, 1, MAX_MAX_BATCHES)
|
||||
|
||||
if (args.resetCursor) {
|
||||
await ctx.runMutation(internal.statsMaintenance.setSkillStatBackfillStateInternal, {
|
||||
cursor: undefined,
|
||||
doneAt: undefined,
|
||||
})
|
||||
}
|
||||
|
||||
const state = await ctx.runQuery(
|
||||
internal.statsMaintenance.getSkillStatBackfillStateInternal,
|
||||
{},
|
||||
)
|
||||
if (state.doneAt && !args.resetCursor) {
|
||||
return {
|
||||
ok: true as const,
|
||||
isDone: true,
|
||||
cursor: null,
|
||||
stats: { scanned: 0, patched: 0, batches: 0 },
|
||||
}
|
||||
}
|
||||
|
||||
let cursor = state.cursor ?? null
|
||||
const stats = { scanned: 0, patched: 0, batches: 0 }
|
||||
|
||||
for (let i = 0; i < maxBatches; i += 1) {
|
||||
const result = await ctx.runMutation(
|
||||
internal.statsMaintenance.backfillSkillStatFieldsInternal,
|
||||
{
|
||||
cursor: cursor ?? undefined,
|
||||
batchSize,
|
||||
},
|
||||
)
|
||||
stats.scanned += result.scanned
|
||||
stats.patched += result.patched
|
||||
stats.batches += 1
|
||||
cursor = result.cursor
|
||||
|
||||
if (result.isDone) {
|
||||
await ctx.runMutation(internal.statsMaintenance.setSkillStatBackfillStateInternal, {
|
||||
cursor: undefined,
|
||||
doneAt: Date.now(),
|
||||
})
|
||||
return { ok: true as const, isDone: true, cursor: null, stats }
|
||||
}
|
||||
|
||||
await ctx.runMutation(internal.statsMaintenance.setSkillStatBackfillStateInternal, {
|
||||
cursor: cursor ?? undefined,
|
||||
doneAt: undefined,
|
||||
})
|
||||
}
|
||||
|
||||
return { ok: true as const, isDone: false, cursor, stats }
|
||||
},
|
||||
})
|
||||
|
||||
function buildSkillStatPatch(skill: Doc<'skills'>) {
|
||||
const stats = skill.stats
|
||||
const nextDownloads = stats.downloads
|
||||
const nextStars = stats.stars
|
||||
const nextInstallsCurrent = stats.installsCurrent ?? 0
|
||||
const nextInstallsAllTime = stats.installsAllTime ?? 0
|
||||
|
||||
if (
|
||||
skill.statsDownloads === nextDownloads &&
|
||||
skill.statsStars === nextStars &&
|
||||
skill.statsInstallsCurrent === nextInstallsCurrent &&
|
||||
skill.statsInstallsAllTime === nextInstallsAllTime
|
||||
) {
|
||||
return null
|
||||
}
|
||||
|
||||
return {
|
||||
statsDownloads: nextDownloads,
|
||||
statsStars: nextStars,
|
||||
statsInstallsCurrent: nextInstallsCurrent,
|
||||
statsInstallsAllTime: nextInstallsAllTime,
|
||||
}
|
||||
}
|
||||
|
||||
function clampInt(value: number, min: number, max: number) {
|
||||
return Math.min(Math.max(value, min), max)
|
||||
}
|
||||
+21
-30
@@ -4,6 +4,7 @@ import type { Id } from './_generated/dataModel'
|
||||
import type { MutationCtx, QueryCtx } from './_generated/server'
|
||||
import { internalMutation, mutation, query } from './_generated/server'
|
||||
import { requireUser } from './lib/access'
|
||||
import { applySkillStatDeltas, bumpDailySkillStats } from './lib/skillStats'
|
||||
|
||||
const TELEMETRY_STALE_MS = 120 * 24 * 60 * 60 * 1000
|
||||
|
||||
@@ -157,23 +158,12 @@ async function clearTelemetryForUser(ctx: MutationCtx, params: { userId: Id<'use
|
||||
await ctx.db.delete(entry._id)
|
||||
continue
|
||||
}
|
||||
const stats = skill.stats as {
|
||||
downloads: number
|
||||
installsCurrent?: number
|
||||
installsAllTime?: number
|
||||
stars: number
|
||||
versions: number
|
||||
comments: number
|
||||
}
|
||||
const patch = applySkillStatDeltas(skill, {
|
||||
installsCurrent: entry.activeRoots > 0 ? -1 : 0,
|
||||
installsAllTime: -1,
|
||||
})
|
||||
await ctx.db.patch(skill._id, {
|
||||
stats: {
|
||||
...stats,
|
||||
installsCurrent: Math.max(
|
||||
0,
|
||||
(stats.installsCurrent ?? 0) - (entry.activeRoots > 0 ? 1 : 0),
|
||||
),
|
||||
installsAllTime: Math.max(0, (stats.installsAllTime ?? 0) - 1),
|
||||
},
|
||||
...patch,
|
||||
updatedAt: Date.now(),
|
||||
})
|
||||
await ctx.db.delete(entry._id)
|
||||
@@ -383,23 +373,24 @@ async function bumpSkillInstallCounts(
|
||||
) {
|
||||
const skill = await ctx.db.get(params.skillId)
|
||||
if (!skill) return
|
||||
const stats = skill.stats as {
|
||||
downloads: number
|
||||
installsCurrent?: number
|
||||
installsAllTime?: number
|
||||
stars: number
|
||||
versions: number
|
||||
comments: number
|
||||
}
|
||||
const now = Date.now()
|
||||
const patch = applySkillStatDeltas(skill, {
|
||||
installsAllTime: params.deltaAllTime,
|
||||
installsCurrent: params.deltaCurrent,
|
||||
})
|
||||
|
||||
await ctx.db.patch(skill._id, {
|
||||
stats: {
|
||||
...stats,
|
||||
installsAllTime: Math.max(0, (stats.installsAllTime ?? 0) + params.deltaAllTime),
|
||||
installsCurrent: Math.max(0, (stats.installsCurrent ?? 0) + params.deltaCurrent),
|
||||
},
|
||||
updatedAt: Date.now(),
|
||||
...patch,
|
||||
updatedAt: now,
|
||||
})
|
||||
|
||||
if (params.deltaAllTime > 0) {
|
||||
await bumpDailySkillStats(ctx, {
|
||||
skillId: params.skillId,
|
||||
now,
|
||||
installs: params.deltaAllTime,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
async function expireStaleRoots(
|
||||
|
||||
+2
-1
@@ -30,7 +30,8 @@ Headers: `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`, `Ret
|
||||
Public read:
|
||||
|
||||
- `GET /api/v1/search?q=...`
|
||||
- `GET /api/v1/skills?limit=&cursor=`
|
||||
- `GET /api/v1/skills?limit=&cursor=&sort=`
|
||||
- `sort`: `updated` (default), `downloads`, `stars` (`rating`), `installsCurrent` (`installs`), `installsAllTime`, `trending`
|
||||
- `GET /api/v1/skills/{slug}`
|
||||
- `GET /api/v1/skills/{slug}/versions?limit=&cursor=`
|
||||
- `GET /api/v1/skills/{slug}/versions/{version}`
|
||||
|
||||
+17
-1
@@ -17,7 +17,7 @@ bun clawdhub --help
|
||||
|
||||
## Global flags
|
||||
|
||||
- `--workdir <dir>`: working directory (default: cwd)
|
||||
- `--workdir <dir>`: working directory (default: cwd; falls back to Clawdbot workspace if configured)
|
||||
- `--dir <dir>`: install dir under workdir (default: `skills`)
|
||||
- `--site <url>`: base URL for browser login (default: `https://clawdhub.com`)
|
||||
- `--registry <url>`: API base URL (default: discovered, else `https://clawdhub.com`)
|
||||
@@ -27,6 +27,7 @@ Env equivalents:
|
||||
|
||||
- `CLAWDHUB_SITE`
|
||||
- `CLAWDHUB_REGISTRY`
|
||||
- `CLAWDHUB_WORKDIR`
|
||||
|
||||
## Config file
|
||||
|
||||
@@ -46,10 +47,25 @@ Stores your API token + cached registry URL.
|
||||
|
||||
- Verifies the stored token via `/api/v1/whoami`.
|
||||
|
||||
### `star <slug>` / `unstar <slug>`
|
||||
|
||||
- Adds/removes a skill from your highlights.
|
||||
- Calls `POST /api/v1/stars/<slug>` and `DELETE /api/v1/stars/<slug>`.
|
||||
- `--yes` skips confirmation.
|
||||
|
||||
### `search <query...>`
|
||||
|
||||
- Calls `/api/v1/search?q=...`.
|
||||
|
||||
### `explore`
|
||||
|
||||
- Lists latest updated skills via `/api/v1/skills?limit=...` (sorted by `updatedAt` desc).
|
||||
- Flags:
|
||||
- `--limit <n>` (1–200, default: 25)
|
||||
- `--sort newest|downloads|rating|installs|installsAllTime|trending` (default: newest)
|
||||
- `--json` (machine-readable output)
|
||||
- Output: `<slug> v<version> <age> <summary>` (summary truncated to 50 chars).
|
||||
|
||||
### `install <slug>`
|
||||
|
||||
- Resolves latest version via `/api/v1/skills/<slug>`.
|
||||
|
||||
+21
-2
@@ -44,8 +44,13 @@ Response:
|
||||
|
||||
Query params:
|
||||
|
||||
- `limit` (optional): integer
|
||||
- `cursor` (optional): pagination cursor
|
||||
- `limit` (optional): integer (1–200)
|
||||
- `cursor` (optional): pagination cursor (only for `sort=updated`)
|
||||
- `sort` (optional): `updated` (default), `downloads`, `stars` (alias: `rating`), `installsCurrent` (alias: `installs`), `installsAllTime`, `trending`
|
||||
|
||||
Notes:
|
||||
|
||||
- `trending` ranks by installs in the last 7 days (telemetry-based).
|
||||
|
||||
Response:
|
||||
|
||||
@@ -140,6 +145,20 @@ Publishes a new version.
|
||||
|
||||
Soft-delete / restore a skill (owner/admin only).
|
||||
|
||||
### `POST /api/v1/stars/{slug}` / `DELETE /api/v1/stars/{slug}`
|
||||
|
||||
Add/remove a star (highlights). Both endpoints are idempotent.
|
||||
|
||||
Responses:
|
||||
|
||||
```json
|
||||
{ "ok": true, "starred": true, "alreadyStarred": false }
|
||||
```
|
||||
|
||||
```json
|
||||
{ "ok": true, "unstarred": true, "alreadyUnstarred": false }
|
||||
```
|
||||
|
||||
## Legacy CLI endpoints (deprecated)
|
||||
|
||||
Still supported for older CLI versions:
|
||||
|
||||
@@ -48,3 +48,17 @@ read_when:
|
||||
|
||||
## Sync
|
||||
- `bun clawdhub sync --dry-run --all`
|
||||
|
||||
## Playwright (menu smoke)
|
||||
|
||||
Run against prod:
|
||||
|
||||
```
|
||||
PLAYWRIGHT_BASE_URL=https://clawdhub.com bun run test:pw
|
||||
```
|
||||
|
||||
Run against a local preview server:
|
||||
|
||||
```
|
||||
bun run test:e2e:local
|
||||
```
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ bun clawdhub whoami
|
||||
bun clawdhub search gif --limit 5
|
||||
```
|
||||
|
||||
Install a skill into `./skills/<slug>`:
|
||||
Install a skill into `./skills/<slug>` (if Clawdbot is configured, installs into that workspace instead):
|
||||
|
||||
```bash
|
||||
bun clawdhub install <slug>
|
||||
|
||||
@@ -11,9 +11,23 @@ import {
|
||||
parseArk,
|
||||
} from 'clawdhub-schema'
|
||||
import { unzipSync } from 'fflate'
|
||||
import { Agent, setGlobalDispatcher } from 'undici'
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { readGlobalConfig } from '../packages/clawdhub/src/config'
|
||||
|
||||
const REQUEST_TIMEOUT_MS = 15_000
|
||||
|
||||
try {
|
||||
setGlobalDispatcher(
|
||||
new Agent({
|
||||
allowH2: true,
|
||||
connect: { timeout: REQUEST_TIMEOUT_MS },
|
||||
}),
|
||||
)
|
||||
} catch {
|
||||
// ignore dispatcher setup failures
|
||||
}
|
||||
|
||||
function mustGetToken() {
|
||||
const fromEnv = process.env.CLAWDHUB_E2E_TOKEN?.trim()
|
||||
if (fromEnv) return fromEnv
|
||||
@@ -31,6 +45,16 @@ async function makeTempConfig(registry: string, token: string | null) {
|
||||
return { dir, path }
|
||||
}
|
||||
|
||||
async function fetchWithTimeout(input: RequestInfo | URL, init?: RequestInit) {
|
||||
const controller = new AbortController()
|
||||
const timeout = setTimeout(() => controller.abort('Timeout'), REQUEST_TIMEOUT_MS)
|
||||
try {
|
||||
return await fetch(input, { ...init, signal: controller.signal })
|
||||
} finally {
|
||||
clearTimeout(timeout)
|
||||
}
|
||||
}
|
||||
|
||||
describe('clawdhub e2e', () => {
|
||||
it('prints CLI version via --cli-version', async () => {
|
||||
const result = spawnSync('bun', ['clawdhub', '--cli-version'], {
|
||||
@@ -47,7 +71,9 @@ describe('clawdhub e2e', () => {
|
||||
url.searchParams.set('q', 'gif')
|
||||
url.searchParams.set('limit', '5')
|
||||
|
||||
const response = await fetch(url.toString(), { headers: { Accept: 'application/json' } })
|
||||
const response = await fetchWithTimeout(url.toString(), {
|
||||
headers: { Accept: 'application/json' },
|
||||
})
|
||||
expect(response.ok).toBe(true)
|
||||
const json = (await response.json()) as unknown
|
||||
const parsed = parseArk(ApiV1SearchResponseSchema, json, 'API response')
|
||||
@@ -103,7 +129,7 @@ describe('clawdhub e2e', () => {
|
||||
const cfg = await makeTempConfig(registry, token)
|
||||
try {
|
||||
const whoamiUrl = new URL(ApiRoutes.whoami, registry)
|
||||
const whoamiRes = await fetch(whoamiUrl.toString(), {
|
||||
const whoamiRes = await fetchWithTimeout(whoamiUrl.toString(), {
|
||||
headers: { Accept: 'application/json', Authorization: `Bearer ${token}` },
|
||||
})
|
||||
expect(whoamiRes.ok).toBe(true)
|
||||
@@ -310,7 +336,7 @@ describe('clawdhub e2e', () => {
|
||||
const downloadUrl = new URL(ApiRoutes.download, registry)
|
||||
downloadUrl.searchParams.set('slug', slug)
|
||||
downloadUrl.searchParams.set('version', '1.0.1')
|
||||
const zipRes = await fetch(downloadUrl.toString())
|
||||
const zipRes = await fetchWithTimeout(downloadUrl.toString())
|
||||
expect(zipRes.ok).toBe(true)
|
||||
const zipBytes = new Uint8Array(await zipRes.arrayBuffer())
|
||||
const unzipped = unzipSync(zipBytes)
|
||||
@@ -374,7 +400,8 @@ describe('clawdhub e2e', () => {
|
||||
)
|
||||
expect(update.status).toBe(0)
|
||||
|
||||
const metaRes = await fetch(`${registry}${ApiRoutes.skills}/${slug}`, {
|
||||
const metaUrl = new URL(`${ApiRoutes.skills}/${slug}`, registry)
|
||||
const metaRes = await fetchWithTimeout(metaUrl.toString(), {
|
||||
headers: { Accept: 'application/json' },
|
||||
})
|
||||
expect(metaRes.status).toBe(200)
|
||||
@@ -401,12 +428,12 @@ describe('clawdhub e2e', () => {
|
||||
)
|
||||
expect(del.status).toBe(0)
|
||||
|
||||
const metaAfterDelete = await fetch(metaUrl.toString(), {
|
||||
const metaAfterDelete = await fetchWithTimeout(metaUrl.toString(), {
|
||||
headers: { Accept: 'application/json' },
|
||||
})
|
||||
expect(metaAfterDelete.status).toBe(404)
|
||||
|
||||
const downloadAfterDelete = await fetch(downloadUrl.toString())
|
||||
const downloadAfterDelete = await fetchWithTimeout(downloadUrl.toString())
|
||||
expect(downloadAfterDelete.status).toBe(404)
|
||||
|
||||
const undelete = spawnSync(
|
||||
@@ -431,7 +458,7 @@ describe('clawdhub e2e', () => {
|
||||
)
|
||||
expect(undelete.status).toBe(0)
|
||||
|
||||
const metaAfterUndelete = await fetch(metaUrl.toString(), {
|
||||
const metaAfterUndelete = await fetchWithTimeout(metaUrl.toString(), {
|
||||
headers: { Accept: 'application/json' },
|
||||
})
|
||||
expect(metaAfterUndelete.status).toBe(200)
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
import { expect, test } from '@playwright/test'
|
||||
|
||||
const navLabels = ['Skills', 'Upload', 'Import', 'Search']
|
||||
|
||||
test('skills loads without error', async ({ page }) => {
|
||||
await page.goto('/skills', { waitUntil: 'domcontentloaded' })
|
||||
await expect(page.locator('text=Something went wrong!')).toHaveCount(0)
|
||||
await expect(page.locator('h1', { hasText: 'Skills' })).toBeVisible()
|
||||
})
|
||||
|
||||
test('souls loads without error', async ({ page }) => {
|
||||
await page.goto('/souls', { waitUntil: 'domcontentloaded' })
|
||||
await expect(page.locator('text=Something went wrong!')).toHaveCount(0)
|
||||
await expect(page.locator('h1', { hasText: 'Souls' })).toBeVisible()
|
||||
})
|
||||
|
||||
test('header menu routes render', async ({ page }) => {
|
||||
await page.goto('/', { waitUntil: 'domcontentloaded' })
|
||||
|
||||
for (const label of navLabels) {
|
||||
const link = page.getByRole('link', { name: label }).first()
|
||||
await expect(link).toBeVisible()
|
||||
await link.click()
|
||||
|
||||
if (label === 'Skills') {
|
||||
await expect(page).toHaveURL(/\/skills/)
|
||||
await expect(page.locator('h1', { hasText: 'Skills' })).toBeVisible()
|
||||
}
|
||||
|
||||
if (label === 'Upload') {
|
||||
await expect(page).toHaveURL(/\/upload/)
|
||||
const heading = page.locator('h1.section-title', { hasText: /^Publish a /i })
|
||||
const signInCard = page.locator('text=Sign in to upload')
|
||||
await expect(heading.or(signInCard)).toBeVisible()
|
||||
}
|
||||
|
||||
if (label === 'Import') {
|
||||
await expect(page).toHaveURL(/\/import/)
|
||||
const heading = page.getByRole('heading', { name: 'Import from GitHub' })
|
||||
const signInCard = page.locator('text=Sign in to import and publish skills.')
|
||||
await expect(heading.or(signInCard)).toBeVisible()
|
||||
}
|
||||
|
||||
if (label === 'Search') {
|
||||
await expect(page).toHaveURL(/\/?(\?|$)/)
|
||||
await expect(page.locator('h1', { hasText: 'ClawdHub' })).toBeVisible()
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,97 @@
|
||||
import { expect, test } from '@playwright/test'
|
||||
|
||||
test('skills search paginates exact results', async ({ page }) => {
|
||||
await page.addInitScript(() => {
|
||||
const makeSearchResults = (count: number) =>
|
||||
Array.from({ length: count }, (_, index) => ({
|
||||
score: 0.9,
|
||||
skill: {
|
||||
_id: `skill_${index}`,
|
||||
slug: `skill-${index}`,
|
||||
displayName: `Skill ${index}`,
|
||||
summary: `Summary ${index}`,
|
||||
tags: {},
|
||||
stats: {
|
||||
downloads: 0,
|
||||
installsCurrent: 0,
|
||||
installsAllTime: 0,
|
||||
stars: 0,
|
||||
versions: 1,
|
||||
comments: 0,
|
||||
},
|
||||
createdAt: 0,
|
||||
updatedAt: 0,
|
||||
},
|
||||
version: null,
|
||||
}))
|
||||
|
||||
class MockWebSocket {
|
||||
url: string
|
||||
readyState = 0
|
||||
onopen?: () => void
|
||||
onmessage?: (event: { data: string }) => void
|
||||
onclose?: (event: { code: number; reason: string }) => void
|
||||
onerror?: () => void
|
||||
|
||||
constructor(url: string) {
|
||||
this.url = url
|
||||
window.setTimeout(() => {
|
||||
this.readyState = 1
|
||||
this.onopen?.()
|
||||
}, 0)
|
||||
}
|
||||
|
||||
send(data: string) {
|
||||
try {
|
||||
const message = JSON.parse(data) as {
|
||||
type?: string
|
||||
requestId?: number
|
||||
udfPath?: string
|
||||
args?: Array<Record<string, unknown>>
|
||||
}
|
||||
if (message.type === 'Action' && message.udfPath?.includes('searchSkills')) {
|
||||
const [args] = message.args ?? []
|
||||
const limit = typeof args?.limit === 'number' ? args.limit : 10
|
||||
const limits = (window as typeof window & { __searchLimits: number[] }).__searchLimits
|
||||
limits.push(limit)
|
||||
const response = {
|
||||
type: 'ActionResponse',
|
||||
requestId: message.requestId,
|
||||
success: true,
|
||||
result: makeSearchResults(limit),
|
||||
logLines: [],
|
||||
}
|
||||
window.setTimeout(() => {
|
||||
this.onmessage?.({ data: JSON.stringify(response) })
|
||||
}, 0)
|
||||
}
|
||||
} catch {
|
||||
this.onerror?.()
|
||||
}
|
||||
}
|
||||
|
||||
close(code = 1000, reason = 'closed') {
|
||||
this.readyState = 3
|
||||
this.onclose?.({ code, reason })
|
||||
}
|
||||
}
|
||||
|
||||
;(window as typeof window & { __searchLimits: number[] }).__searchLimits = []
|
||||
window.WebSocket = MockWebSocket as unknown as typeof WebSocket
|
||||
})
|
||||
|
||||
await page.goto('/skills', { waitUntil: 'domcontentloaded' })
|
||||
await expect(page.getByRole('heading', { name: 'Skills' })).toBeVisible()
|
||||
|
||||
const input = page.getByPlaceholder('Filter by name, slug, or summary…')
|
||||
await input.fill('remind')
|
||||
await expect(page.getByText('Skill 0')).toBeVisible()
|
||||
await expect(page.getByText('Scroll to load more')).toBeVisible()
|
||||
|
||||
await page.evaluate(() => window.scrollTo(0, document.body.scrollHeight))
|
||||
await expect(page.getByText('Skill 75')).toBeVisible()
|
||||
const limits = await page.evaluate(
|
||||
() => (window as typeof window & { __searchLimits: number[] }).__searchLimits,
|
||||
)
|
||||
expect(limits).toEqual([50, 100])
|
||||
})
|
||||
+22
-18
@@ -10,9 +10,12 @@
|
||||
"build": "bun --bun vite build",
|
||||
"preview": "bun --bun vite preview",
|
||||
"docs:list": "bun scripts/docs-list.ts",
|
||||
"check:peers": "bun scripts/check-peer-deps.ts",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"test:e2e": "vitest run -c vitest.e2e.config.ts",
|
||||
"test:e2e:local": "bash scripts/run-playwright-local.sh",
|
||||
"test:pw": "playwright test",
|
||||
"coverage": "vitest run --coverage",
|
||||
"convex:deploy": "bunx convex deploy --typecheck=disable --yes",
|
||||
"lint": "bun run lint:biome && bun run lint:oxlint",
|
||||
@@ -21,7 +24,7 @@
|
||||
"format": "biome format --write ."
|
||||
},
|
||||
"dependencies": {
|
||||
"@auth/core": "^0.41.1",
|
||||
"@auth/core": "^0.37.4",
|
||||
"@convex-dev/auth": "^0.0.90",
|
||||
"@fontsource/bricolage-grotesque": "^5.2.10",
|
||||
"@fontsource/ibm-plex-mono": "^5.2.7",
|
||||
@@ -31,17 +34,17 @@
|
||||
"@radix-ui/react-toggle-group": "^1.1.11",
|
||||
"@resvg/resvg-wasm": "^2.6.2",
|
||||
"@tailwindcss/vite": "^4.1.18",
|
||||
"@tanstack/react-devtools": "^0.9.0",
|
||||
"@tanstack/react-router": "^1.144.0",
|
||||
"@tanstack/react-router-devtools": "^1.144.0",
|
||||
"@tanstack/react-start": "^1.145.3",
|
||||
"@tanstack/router-plugin": "^1.145.2",
|
||||
"@tanstack/react-devtools": "^0.9.2",
|
||||
"@tanstack/react-router": "^1.151.6",
|
||||
"@tanstack/react-router-devtools": "^1.151.6",
|
||||
"@tanstack/react-start": "^1.152.0",
|
||||
"@tanstack/router-plugin": "^1.151.6",
|
||||
"@vercel/analytics": "^1.6.1",
|
||||
"clawdhub-schema": "^0.0.2",
|
||||
"clawdhub-schema": "workspace:*",
|
||||
"clsx": "^2.1.1",
|
||||
"convex": "^1.31.2",
|
||||
"convex": "^1.31.5",
|
||||
"fflate": "^0.8.2",
|
||||
"h3": "2.0.1-rc.5",
|
||||
"h3": "2.0.1-rc.8",
|
||||
"lucide-react": "^0.562.0",
|
||||
"monaco-editor": "^0.55.1",
|
||||
"nitro": "^3.0.1-alpha.1",
|
||||
@@ -52,25 +55,26 @@
|
||||
"semver": "^7.7.3",
|
||||
"tailwind-merge": "^3.4.0",
|
||||
"tailwindcss": "^4.1.18",
|
||||
"vite-tsconfig-paths": "^6.0.3",
|
||||
"vite-tsconfig-paths": "^6.0.4",
|
||||
"yaml": "^2.8.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "^2.3.11",
|
||||
"@tanstack/devtools-vite": "^0.4.0",
|
||||
"@playwright/test": "^1.57.0",
|
||||
"@tanstack/devtools-vite": "^0.4.1",
|
||||
"@testing-library/dom": "^10.4.1",
|
||||
"@testing-library/react": "^16.3.1",
|
||||
"@types/node": "^25.0.3",
|
||||
"@types/react": "^19.2.7",
|
||||
"@types/node": "^25.0.9",
|
||||
"@types/react": "^19.2.8",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"@types/semver": "^7.7.1",
|
||||
"@vitejs/plugin-react": "^5.1.2",
|
||||
"@vitest/coverage-v8": "^4.0.16",
|
||||
"@vitest/coverage-v8": "^4.0.17",
|
||||
"jsdom": "^27.4.0",
|
||||
"oxlint": "^1.36.0",
|
||||
"oxlint-tsgolint": "^0.10.1",
|
||||
"oxlint": "^1.39.0",
|
||||
"oxlint-tsgolint": "^0.11.1",
|
||||
"typescript": "^5.9.3",
|
||||
"vite": "^7.3.0",
|
||||
"vitest": "^4.0.16"
|
||||
"vite": "^7.3.1",
|
||||
"vitest": "^4.0.17"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,5 +53,5 @@ clawdhub sync --root ../clawdis/skills --all --dry-run
|
||||
|
||||
- Site: `https://clawdhub.com` (override via `--site` or `CLAWDHUB_SITE`)
|
||||
- Registry: discovered from `/.well-known/clawdhub.json` on the site (override via `--registry` or `CLAWDHUB_REGISTRY`)
|
||||
- Workdir: current directory (override via `--workdir`)
|
||||
- Workdir: current directory (falls back to Clawdbot workspace if configured; override via `--workdir` or `CLAWDHUB_WORKDIR`)
|
||||
- Install dir: `./skills` under workdir (override via `--dir`)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "clawdhub",
|
||||
"version": "0.1.0",
|
||||
"description": "ClawdHub CLI \u2014 install, update, search, and publish agent skills.",
|
||||
"version": "0.3.0",
|
||||
"description": "ClawdHub CLI \\u2014 install, update, search, and publish agent skills.",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
@@ -28,10 +28,11 @@
|
||||
"mime": "^4.1.0",
|
||||
"ora": "^9.0.0",
|
||||
"p-retry": "^7.1.1",
|
||||
"semver": "^7.7.3"
|
||||
"semver": "^7.7.3",
|
||||
"undici": "^7.16.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^25.0.3",
|
||||
"@types/node": "^25.0.9",
|
||||
"typescript": "^5.9.3"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
@@ -21,12 +21,23 @@ describe('browserAuth', () => {
|
||||
expect(url).toContain('state=')
|
||||
})
|
||||
|
||||
it('builds auth url without label', () => {
|
||||
const url = buildCliAuthUrl({
|
||||
siteUrl: 'https://example.com',
|
||||
redirectUri: 'http://127.0.0.1:1234/callback',
|
||||
state: 'state123',
|
||||
})
|
||||
expect(url).toContain('https://example.com/cli/auth?')
|
||||
expect(url).not.toContain('label_b64=')
|
||||
})
|
||||
|
||||
it('accepts only loopback http redirect uris', () => {
|
||||
expect(isAllowedLoopbackRedirectUri('http://127.0.0.1:1234/callback')).toBe(true)
|
||||
expect(isAllowedLoopbackRedirectUri('http://localhost:1234/callback')).toBe(true)
|
||||
expect(isAllowedLoopbackRedirectUri('http://[::1]:1234/callback')).toBe(true)
|
||||
expect(isAllowedLoopbackRedirectUri('https://127.0.0.1:1234/callback')).toBe(false)
|
||||
expect(isAllowedLoopbackRedirectUri('http://evil.com/callback')).toBe(false)
|
||||
expect(isAllowedLoopbackRedirectUri('not a url')).toBe(false)
|
||||
})
|
||||
|
||||
it('receives token via loopback server', async () => {
|
||||
@@ -43,4 +54,43 @@ describe('browserAuth', () => {
|
||||
})
|
||||
await expect(server.waitForResult()).resolves.toEqual(payload)
|
||||
})
|
||||
|
||||
it('serves callback html', async () => {
|
||||
const server = await startLoopbackAuthServer({ timeoutMs: 2000 })
|
||||
const response = await fetch(server.redirectUri)
|
||||
expect(response.status).toBe(200)
|
||||
const text = await response.text()
|
||||
expect(text).toContain('ClawdHub CLI Login')
|
||||
server.close()
|
||||
})
|
||||
|
||||
it('returns 404 for unknown routes', async () => {
|
||||
const server = await startLoopbackAuthServer({ timeoutMs: 2000 })
|
||||
const response = await fetch(server.redirectUri.replace('/callback', '/nope'))
|
||||
expect(response.status).toBe(404)
|
||||
server.close()
|
||||
})
|
||||
|
||||
it('rejects invalid json payloads', async () => {
|
||||
const server = await startLoopbackAuthServer({ timeoutMs: 2000 })
|
||||
const tokenUrl = server.redirectUri.replace('/callback', '/token')
|
||||
const response = await fetch(tokenUrl, { method: 'POST', body: '{' })
|
||||
expect(response.status).toBe(400)
|
||||
await expect(server.waitForResult()).rejects.toThrow()
|
||||
})
|
||||
|
||||
it('rejects state mismatches', async () => {
|
||||
const server = await startLoopbackAuthServer({ timeoutMs: 2000 })
|
||||
await fetch(server.redirectUri.replace('/callback', '/token'), {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ token: 'clh_test', registry: 'https://example.com', state: 'nope' }),
|
||||
})
|
||||
await expect(server.waitForResult()).rejects.toThrow(/state mismatch/i)
|
||||
})
|
||||
|
||||
it('times out waiting for login', async () => {
|
||||
const server = await startLoopbackAuthServer({ timeoutMs: 25 })
|
||||
await expect(server.waitForResult()).rejects.toThrow(/timed out waiting for browser login/i)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
#!/usr/bin/env node
|
||||
import { resolve } from 'node:path'
|
||||
import { stat } from 'node:fs/promises'
|
||||
import { join, resolve } from 'node:path'
|
||||
import { Command } from 'commander'
|
||||
import { getCliBuildLabel, getCliVersion } from './cli/buildInfo.js'
|
||||
import { resolveClawdbotDefaultWorkspace } from './cli/clawdbotConfig.js'
|
||||
import { cmdLoginFlow, cmdLogout, cmdWhoami } from './cli/commands/auth.js'
|
||||
import { cmdDeleteSkill, cmdUndeleteSkill } from './cli/commands/delete.js'
|
||||
import { cmdPublish } from './cli/commands/publish.js'
|
||||
import { cmdInstall, cmdList, cmdSearch, cmdUpdate } from './cli/commands/skills.js'
|
||||
import { cmdExplore, cmdInstall, cmdList, cmdSearch, cmdUpdate } from './cli/commands/skills.js'
|
||||
import { cmdStarSkill } from './cli/commands/star.js'
|
||||
import { cmdSync } from './cli/commands/sync.js'
|
||||
import { cmdUnstarSkill } from './cli/commands/unstar.js'
|
||||
import { configureCommanderHelp, styleEnvBlock, styleTitle } from './cli/helpStyle.js'
|
||||
import { DEFAULT_REGISTRY, DEFAULT_SITE } from './cli/registry.js'
|
||||
import type { GlobalOpts } from './cli/types.js'
|
||||
@@ -28,13 +32,16 @@ const program = new Command()
|
||||
.option('--no-input', 'Disable prompts')
|
||||
.showHelpAfterError()
|
||||
.showSuggestionAfterError()
|
||||
.addHelpText('after', styleEnvBlock('\nEnv:\n CLAWDHUB_SITE\n CLAWDHUB_REGISTRY\n'))
|
||||
.addHelpText(
|
||||
'after',
|
||||
styleEnvBlock('\nEnv:\n CLAWDHUB_SITE\n CLAWDHUB_REGISTRY\n CLAWDHUB_WORKDIR\n'),
|
||||
)
|
||||
|
||||
configureCommanderHelp(program)
|
||||
|
||||
function resolveGlobalOpts(): GlobalOpts {
|
||||
async function resolveGlobalOpts(): Promise<GlobalOpts> {
|
||||
const raw = program.opts<{ workdir?: string; dir?: string; site?: string; registry?: string }>()
|
||||
const workdir = resolve(raw.workdir ?? process.cwd())
|
||||
const workdir = await resolveWorkdir(raw.workdir)
|
||||
const dir = resolve(workdir, raw.dir ?? 'skills')
|
||||
const site = raw.site ?? process.env.CLAWDHUB_SITE ?? DEFAULT_SITE
|
||||
const registrySource = raw.registry ? 'cli' : process.env.CLAWDHUB_REGISTRY ? 'env' : 'default'
|
||||
@@ -47,6 +54,35 @@ function isInputAllowed() {
|
||||
return globalFlags.input !== false
|
||||
}
|
||||
|
||||
async function resolveWorkdir(explicit?: string) {
|
||||
if (explicit?.trim()) return resolve(explicit.trim())
|
||||
const envWorkdir = process.env.CLAWDHUB_WORKDIR?.trim()
|
||||
if (envWorkdir) return resolve(envWorkdir)
|
||||
|
||||
const cwd = resolve(process.cwd())
|
||||
const hasMarker = await hasClawdhubMarker(cwd)
|
||||
if (hasMarker) return cwd
|
||||
|
||||
const clawdbotWorkspace = await resolveClawdbotDefaultWorkspace()
|
||||
return clawdbotWorkspace ? resolve(clawdbotWorkspace) : cwd
|
||||
}
|
||||
|
||||
async function hasClawdhubMarker(workdir: string) {
|
||||
const lockfile = join(workdir, '.clawdhub', 'lock.json')
|
||||
if (await pathExists(lockfile)) return true
|
||||
const markerDir = join(workdir, '.clawdhub')
|
||||
return pathExists(markerDir)
|
||||
}
|
||||
|
||||
async function pathExists(path: string) {
|
||||
try {
|
||||
await stat(path)
|
||||
return true
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
program
|
||||
.command('login')
|
||||
.description('Log in (opens browser or stores token)')
|
||||
@@ -54,7 +90,7 @@ program
|
||||
.option('--label <label>', 'Token label (browser flow only)', 'CLI token')
|
||||
.option('--no-browser', 'Do not open browser (requires --token)')
|
||||
.action(async (options) => {
|
||||
const opts = resolveGlobalOpts()
|
||||
const opts = await resolveGlobalOpts()
|
||||
await cmdLoginFlow(opts, options, isInputAllowed())
|
||||
})
|
||||
|
||||
@@ -62,7 +98,7 @@ program
|
||||
.command('logout')
|
||||
.description('Remove stored token')
|
||||
.action(async () => {
|
||||
const opts = resolveGlobalOpts()
|
||||
const opts = await resolveGlobalOpts()
|
||||
await cmdLogout(opts)
|
||||
})
|
||||
|
||||
@@ -70,7 +106,7 @@ program
|
||||
.command('whoami')
|
||||
.description('Validate token')
|
||||
.action(async () => {
|
||||
const opts = resolveGlobalOpts()
|
||||
const opts = await resolveGlobalOpts()
|
||||
await cmdWhoami(opts)
|
||||
})
|
||||
|
||||
@@ -87,7 +123,7 @@ auth
|
||||
.option('--label <label>', 'Token label (browser flow only)', 'CLI token')
|
||||
.option('--no-browser', 'Do not open browser (requires --token)')
|
||||
.action(async (options) => {
|
||||
const opts = resolveGlobalOpts()
|
||||
const opts = await resolveGlobalOpts()
|
||||
await cmdLoginFlow(opts, options, isInputAllowed())
|
||||
})
|
||||
|
||||
@@ -95,7 +131,7 @@ auth
|
||||
.command('logout')
|
||||
.description('Remove stored token')
|
||||
.action(async () => {
|
||||
const opts = resolveGlobalOpts()
|
||||
const opts = await resolveGlobalOpts()
|
||||
await cmdLogout(opts)
|
||||
})
|
||||
|
||||
@@ -103,7 +139,7 @@ auth
|
||||
.command('whoami')
|
||||
.description('Validate token')
|
||||
.action(async () => {
|
||||
const opts = resolveGlobalOpts()
|
||||
const opts = await resolveGlobalOpts()
|
||||
await cmdWhoami(opts)
|
||||
})
|
||||
|
||||
@@ -113,7 +149,7 @@ program
|
||||
.argument('<query...>', 'Query string')
|
||||
.option('--limit <n>', 'Max results', (value) => Number.parseInt(value, 10))
|
||||
.action(async (queryParts, options) => {
|
||||
const opts = resolveGlobalOpts()
|
||||
const opts = await resolveGlobalOpts()
|
||||
const query = queryParts.join(' ').trim()
|
||||
await cmdSearch(opts, query, options.limit)
|
||||
})
|
||||
@@ -125,7 +161,7 @@ program
|
||||
.option('--version <version>', 'Version to install')
|
||||
.option('--force', 'Overwrite existing folder')
|
||||
.action(async (slug, options) => {
|
||||
const opts = resolveGlobalOpts()
|
||||
const opts = await resolveGlobalOpts()
|
||||
await cmdInstall(opts, slug, options.version, options.force)
|
||||
})
|
||||
|
||||
@@ -137,7 +173,7 @@ program
|
||||
.option('--version <version>', 'Update to specific version (single slug only)')
|
||||
.option('--force', 'Overwrite when local files do not match any version')
|
||||
.action(async (slug, options) => {
|
||||
const opts = resolveGlobalOpts()
|
||||
const opts = await resolveGlobalOpts()
|
||||
await cmdUpdate(opts, slug, options, isInputAllowed())
|
||||
})
|
||||
|
||||
@@ -145,10 +181,32 @@ program
|
||||
.command('list')
|
||||
.description('List installed skills (from lockfile)')
|
||||
.action(async () => {
|
||||
const opts = resolveGlobalOpts()
|
||||
const opts = await resolveGlobalOpts()
|
||||
await cmdList(opts)
|
||||
})
|
||||
|
||||
program
|
||||
.command('explore')
|
||||
.description('Browse latest updated skills from the registry')
|
||||
.option(
|
||||
'--limit <n>',
|
||||
'Number of skills to show (max 200)',
|
||||
(value) => Number.parseInt(value, 10),
|
||||
25,
|
||||
)
|
||||
.option(
|
||||
'--sort <order>',
|
||||
'Sort by newest, downloads, rating, installs, installsAllTime, or trending',
|
||||
'newest',
|
||||
)
|
||||
.option('--json', 'Output JSON')
|
||||
.action(async (options) => {
|
||||
const opts = await resolveGlobalOpts()
|
||||
const limit =
|
||||
typeof options.limit === 'number' && Number.isFinite(options.limit) ? options.limit : 25
|
||||
await cmdExplore(opts, { limit, sort: options.sort, json: options.json })
|
||||
})
|
||||
|
||||
program
|
||||
.command('publish')
|
||||
.description('Publish skill from folder')
|
||||
@@ -160,7 +218,7 @@ program
|
||||
.option('--changelog <text>', 'Changelog text')
|
||||
.option('--tags <tags>', 'Comma-separated tags', 'latest')
|
||||
.action(async (folder, options) => {
|
||||
const opts = resolveGlobalOpts()
|
||||
const opts = await resolveGlobalOpts()
|
||||
await cmdPublish(opts, folder, options)
|
||||
})
|
||||
|
||||
@@ -170,7 +228,7 @@ program
|
||||
.argument('<slug>', 'Skill slug')
|
||||
.option('--yes', 'Skip confirmation')
|
||||
.action(async (slug, options) => {
|
||||
const opts = resolveGlobalOpts()
|
||||
const opts = await resolveGlobalOpts()
|
||||
await cmdDeleteSkill(opts, slug, options, isInputAllowed())
|
||||
})
|
||||
|
||||
@@ -180,10 +238,30 @@ program
|
||||
.argument('<slug>', 'Skill slug')
|
||||
.option('--yes', 'Skip confirmation')
|
||||
.action(async (slug, options) => {
|
||||
const opts = resolveGlobalOpts()
|
||||
const opts = await resolveGlobalOpts()
|
||||
await cmdUndeleteSkill(opts, slug, options, isInputAllowed())
|
||||
})
|
||||
|
||||
program
|
||||
.command('star')
|
||||
.description('Add a skill to your highlights')
|
||||
.argument('<slug>', 'Skill slug')
|
||||
.option('--yes', 'Skip confirmation')
|
||||
.action(async (slug, options) => {
|
||||
const opts = await resolveGlobalOpts()
|
||||
await cmdStarSkill(opts, slug, options, isInputAllowed())
|
||||
})
|
||||
|
||||
program
|
||||
.command('unstar')
|
||||
.description('Remove a skill from your highlights')
|
||||
.argument('<slug>', 'Skill slug')
|
||||
.option('--yes', 'Skip confirmation')
|
||||
.action(async (slug, options) => {
|
||||
const opts = await resolveGlobalOpts()
|
||||
await cmdUnstarSkill(opts, slug, options, isInputAllowed())
|
||||
})
|
||||
|
||||
program
|
||||
.command('sync')
|
||||
.description('Scan local skills and publish new/updated ones')
|
||||
@@ -195,7 +273,7 @@ program
|
||||
.option('--tags <tags>', 'Comma-separated tags', 'latest')
|
||||
.option('--concurrency <n>', 'Concurrent registry checks (default: 4)', '4')
|
||||
.action(async (options) => {
|
||||
const opts = resolveGlobalOpts()
|
||||
const opts = await resolveGlobalOpts()
|
||||
const bump = String(options.bump ?? 'patch') as 'patch' | 'minor' | 'major'
|
||||
if (!['patch', 'minor', 'major'].includes(bump)) fail('--bump must be patch|minor|major')
|
||||
const concurrencyRaw = Number(options.concurrency ?? 4)
|
||||
@@ -217,7 +295,7 @@ program
|
||||
})
|
||||
|
||||
program.action(async () => {
|
||||
const opts = resolveGlobalOpts()
|
||||
const opts = await resolveGlobalOpts()
|
||||
const cfg = await readGlobalConfig()
|
||||
if (cfg?.token) {
|
||||
await cmdSync(opts, {}, isInputAllowed())
|
||||
|
||||
@@ -3,7 +3,7 @@ import { mkdir, mkdtemp, writeFile } from 'node:fs/promises'
|
||||
import { tmpdir } from 'node:os'
|
||||
import { join, resolve } from 'node:path'
|
||||
import { afterEach, describe, expect, it } from 'vitest'
|
||||
import { resolveClawdbotSkillRoots } from './clawdbotConfig.js'
|
||||
import { resolveClawdbotDefaultWorkspace, resolveClawdbotSkillRoots } from './clawdbotConfig.js'
|
||||
|
||||
const originalEnv = { ...process.env }
|
||||
|
||||
@@ -24,7 +24,15 @@ describe('resolveClawdbotSkillRoots', () => {
|
||||
|
||||
const config = `{
|
||||
// JSON5 comments + trailing commas supported
|
||||
agent: { workspace: '~/clawd-main', },
|
||||
agents: {
|
||||
defaults: { workspace: '~/clawd-main', },
|
||||
list: [
|
||||
{ id: 'work', name: 'Work Bot', workspace: '~/clawd-work', },
|
||||
{ id: 'family', workspace: '~/clawd-family', },
|
||||
],
|
||||
},
|
||||
// legacy entries still supported
|
||||
agent: { workspace: '~/clawd-legacy', },
|
||||
routing: {
|
||||
agents: {
|
||||
work: { name: 'Work Bot', workspace: '~/clawd-work', },
|
||||
@@ -57,6 +65,56 @@ describe('resolveClawdbotSkillRoots', () => {
|
||||
expect(labels[resolve('/opt/skills')]).toBe('Extra: skills')
|
||||
})
|
||||
|
||||
it('resolves default workspace from agents.defaults and agents.list', async () => {
|
||||
const base = await mkdtemp(join(tmpdir(), 'clawdhub-clawdbot-default-'))
|
||||
const home = join(base, 'home')
|
||||
const stateDir = join(base, 'state')
|
||||
const configPath = join(base, 'clawdbot.json')
|
||||
const workspaceMain = join(base, 'workspace-main')
|
||||
const workspaceList = join(base, 'workspace-list')
|
||||
|
||||
process.env.HOME = home
|
||||
process.env.CLAWDBOT_STATE_DIR = stateDir
|
||||
process.env.CLAWDBOT_CONFIG_PATH = configPath
|
||||
|
||||
const config = `{
|
||||
agents: {
|
||||
defaults: { workspace: "${workspaceMain}", },
|
||||
list: [
|
||||
{ id: 'main', workspace: "${workspaceList}", default: true },
|
||||
],
|
||||
},
|
||||
}`
|
||||
await writeFile(configPath, config, 'utf8')
|
||||
|
||||
const workspace = await resolveClawdbotDefaultWorkspace()
|
||||
expect(workspace).toBe(resolve(workspaceMain))
|
||||
})
|
||||
|
||||
it('falls back to default agent in agents.list when defaults missing', async () => {
|
||||
const base = await mkdtemp(join(tmpdir(), 'clawdhub-clawdbot-list-'))
|
||||
const home = join(base, 'home')
|
||||
const configPath = join(base, 'clawdbot.json')
|
||||
const workspaceMain = join(base, 'workspace-main')
|
||||
const workspaceWork = join(base, 'workspace-work')
|
||||
|
||||
process.env.HOME = home
|
||||
process.env.CLAWDBOT_CONFIG_PATH = configPath
|
||||
|
||||
const config = `{
|
||||
agents: {
|
||||
list: [
|
||||
{ id: 'main', workspace: "${workspaceMain}", default: true },
|
||||
{ id: 'work', workspace: "${workspaceWork}" },
|
||||
],
|
||||
},
|
||||
}`
|
||||
await writeFile(configPath, config, 'utf8')
|
||||
|
||||
const workspace = await resolveClawdbotDefaultWorkspace()
|
||||
expect(workspace).toBe(resolve(workspaceMain))
|
||||
})
|
||||
|
||||
it('respects CLAWDBOT_STATE_DIR and CLAWDBOT_CONFIG_PATH overrides', async () => {
|
||||
const base = await mkdtemp(join(tmpdir(), 'clawdhub-clawdbot-override-'))
|
||||
const home = join(base, 'home')
|
||||
|
||||
@@ -5,6 +5,15 @@ import JSON5 from 'json5'
|
||||
|
||||
type ClawdbotConfig = {
|
||||
agent?: { workspace?: string }
|
||||
agents?: {
|
||||
defaults?: { workspace?: string }
|
||||
list?: Array<{
|
||||
id?: string
|
||||
name?: string
|
||||
workspace?: string
|
||||
default?: boolean
|
||||
}>
|
||||
}
|
||||
routing?: {
|
||||
agents?: Record<
|
||||
string,
|
||||
@@ -37,11 +46,21 @@ export async function resolveClawdbotSkillRoots(): Promise<ClawdbotSkillRoots> {
|
||||
const config = await readClawdbotConfig()
|
||||
if (!config) return { roots, labels }
|
||||
|
||||
const mainWorkspace = resolveUserPath(config.agent?.workspace ?? '')
|
||||
const mainWorkspace = resolveUserPath(
|
||||
config.agents?.defaults?.workspace ?? config.agent?.workspace ?? '',
|
||||
)
|
||||
if (mainWorkspace) {
|
||||
pushRoot(roots, labels, join(mainWorkspace, 'skills'), 'Agent: main')
|
||||
}
|
||||
|
||||
const listedAgents = config.agents?.list ?? []
|
||||
for (const entry of listedAgents) {
|
||||
const workspace = resolveUserPath(entry?.workspace ?? '')
|
||||
if (!workspace) continue
|
||||
const name = entry?.name?.trim() || entry?.id?.trim() || 'agent'
|
||||
pushRoot(roots, labels, join(workspace, 'skills'), `Agent: ${name}`)
|
||||
}
|
||||
|
||||
const agents = config.routing?.agents ?? {}
|
||||
for (const [agentId, entry] of Object.entries(agents)) {
|
||||
const workspace = resolveUserPath(entry?.workspace ?? '')
|
||||
@@ -61,6 +80,22 @@ export async function resolveClawdbotSkillRoots(): Promise<ClawdbotSkillRoots> {
|
||||
return { roots, labels }
|
||||
}
|
||||
|
||||
export async function resolveClawdbotDefaultWorkspace(): Promise<string | null> {
|
||||
const config = await readClawdbotConfig()
|
||||
if (!config) return null
|
||||
|
||||
const defaultsWorkspace = resolveUserPath(
|
||||
config.agents?.defaults?.workspace ?? config.agent?.workspace ?? '',
|
||||
)
|
||||
if (defaultsWorkspace) return defaultsWorkspace
|
||||
|
||||
const listedAgents = config.agents?.list ?? []
|
||||
const defaultAgent =
|
||||
listedAgents.find((entry) => entry.default) ?? listedAgents.find((entry) => entry.id === 'main')
|
||||
const listWorkspace = resolveUserPath(defaultAgent?.workspace ?? '')
|
||||
return listWorkspace || null
|
||||
}
|
||||
|
||||
function resolveClawdbotStateDir() {
|
||||
const override = process.env.CLAWDBOT_STATE_DIR?.trim()
|
||||
if (override) return resolveUserPath(override)
|
||||
@@ -96,8 +131,17 @@ async function readClawdbotConfig(): Promise<ClawdbotConfig | null> {
|
||||
function pushRoot(roots: string[], labels: Record<string, string>, root: string, label?: string) {
|
||||
const resolved = resolveUserPath(root)
|
||||
if (!resolved) return
|
||||
roots.push(resolved)
|
||||
if (!roots.includes(resolved)) roots.push(resolved)
|
||||
if (!label) return
|
||||
const existing = labels[resolved]
|
||||
labels[resolved] = existing ? `${existing}, ${label}` : label
|
||||
if (!existing) {
|
||||
labels[resolved] = label
|
||||
return
|
||||
}
|
||||
const parts = existing
|
||||
.split(', ')
|
||||
.map((part) => part.trim())
|
||||
.filter(Boolean)
|
||||
if (parts.includes(label)) return
|
||||
labels[resolved] = `${existing}, ${label}`
|
||||
}
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
/* @vitest-environment node */
|
||||
|
||||
import { afterEach, describe, expect, it, vi } from 'vitest'
|
||||
import type { GlobalOpts } from '../types'
|
||||
|
||||
const mockApiRequest = vi.fn()
|
||||
vi.mock('../../http.js', () => ({
|
||||
apiRequest: (...args: unknown[]) => mockApiRequest(...args),
|
||||
}))
|
||||
|
||||
const mockGetRegistry = vi.fn(async () => 'https://clawdhub.com')
|
||||
vi.mock('../registry.js', () => ({
|
||||
getRegistry: () => mockGetRegistry(),
|
||||
}))
|
||||
|
||||
const mockSpinner = { stop: vi.fn(), fail: vi.fn() }
|
||||
vi.mock('../ui.js', () => ({
|
||||
createSpinner: vi.fn(() => mockSpinner),
|
||||
formatError: (error: unknown) => (error instanceof Error ? error.message : String(error)),
|
||||
}))
|
||||
|
||||
const { clampLimit, cmdExplore, formatExploreLine } = await import('./skills')
|
||||
|
||||
const mockLog = vi.spyOn(console, 'log').mockImplementation(() => {})
|
||||
|
||||
function makeOpts(): GlobalOpts {
|
||||
return {
|
||||
workdir: '/work',
|
||||
dir: '/work/skills',
|
||||
site: 'https://clawdhub.com',
|
||||
registry: 'https://clawdhub.com',
|
||||
registrySource: 'default',
|
||||
}
|
||||
}
|
||||
|
||||
afterEach(() => {
|
||||
vi.clearAllMocks()
|
||||
})
|
||||
|
||||
describe('explore helpers', () => {
|
||||
it('clamps explore limits and handles non-finite values', () => {
|
||||
expect(clampLimit(-5)).toBe(1)
|
||||
expect(clampLimit(0)).toBe(1)
|
||||
expect(clampLimit(1)).toBe(1)
|
||||
expect(clampLimit(50)).toBe(50)
|
||||
expect(clampLimit(99)).toBe(99)
|
||||
expect(clampLimit(200)).toBe(200)
|
||||
expect(clampLimit(250)).toBe(200)
|
||||
expect(clampLimit(Number.NaN)).toBe(25)
|
||||
expect(clampLimit(Number.POSITIVE_INFINITY)).toBe(25)
|
||||
expect(clampLimit(Number.NaN, 10)).toBe(10)
|
||||
})
|
||||
|
||||
it('formats explore lines with relative time and truncation', () => {
|
||||
const now = 4 * 60 * 60 * 1000
|
||||
const nowSpy = vi.spyOn(Date, 'now').mockReturnValue(now)
|
||||
const summary = 'a'.repeat(60)
|
||||
const line = formatExploreLine({
|
||||
slug: 'weather',
|
||||
summary,
|
||||
updatedAt: now - 2 * 60 * 60 * 1000,
|
||||
latestVersion: null,
|
||||
})
|
||||
expect(line).toBe(`weather v? 2h ago ${'a'.repeat(49)}…`)
|
||||
nowSpy.mockRestore()
|
||||
})
|
||||
})
|
||||
|
||||
describe('cmdExplore', () => {
|
||||
it('clamps limit and handles empty results', async () => {
|
||||
mockApiRequest.mockResolvedValue({ items: [] })
|
||||
|
||||
await cmdExplore(makeOpts(), { limit: 0 })
|
||||
|
||||
const [, args] = mockApiRequest.mock.calls[0] ?? []
|
||||
const url = new URL(String(args?.url))
|
||||
expect(url.searchParams.get('limit')).toBe('1')
|
||||
expect(mockLog).toHaveBeenCalledWith('No skills found.')
|
||||
})
|
||||
|
||||
it('prints formatted results', async () => {
|
||||
const now = 10 * 60 * 1000
|
||||
const nowSpy = vi.spyOn(Date, 'now').mockReturnValue(now)
|
||||
const item = {
|
||||
slug: 'gog',
|
||||
summary: 'Google Workspace CLI for Gmail, Calendar, Drive and more.',
|
||||
updatedAt: now - 90 * 1000,
|
||||
latestVersion: { version: '1.2.3' },
|
||||
}
|
||||
mockApiRequest.mockResolvedValue({ items: [item] })
|
||||
|
||||
await cmdExplore(makeOpts(), { limit: 250 })
|
||||
|
||||
const [, args] = mockApiRequest.mock.calls[0] ?? []
|
||||
const url = new URL(String(args?.url))
|
||||
expect(url.searchParams.get('limit')).toBe('200')
|
||||
expect(mockLog).toHaveBeenCalledWith(formatExploreLine(item))
|
||||
nowSpy.mockRestore()
|
||||
})
|
||||
|
||||
it('supports sort and json output', async () => {
|
||||
const payload = { items: [], nextCursor: null }
|
||||
mockApiRequest.mockResolvedValue(payload)
|
||||
|
||||
await cmdExplore(makeOpts(), { limit: 10, sort: 'installs', json: true })
|
||||
|
||||
const [, args] = mockApiRequest.mock.calls[0] ?? []
|
||||
const url = new URL(String(args?.url))
|
||||
expect(url.searchParams.get('limit')).toBe('10')
|
||||
expect(url.searchParams.get('sort')).toBe('installsCurrent')
|
||||
expect(mockLog).toHaveBeenCalledWith(JSON.stringify(payload, null, 2))
|
||||
})
|
||||
|
||||
it('supports all-time installs and trending sorts', async () => {
|
||||
mockApiRequest.mockResolvedValue({ items: [], nextCursor: null })
|
||||
|
||||
await cmdExplore(makeOpts(), { limit: 5, sort: 'installsAllTime' })
|
||||
await cmdExplore(makeOpts(), { limit: 5, sort: 'trending' })
|
||||
|
||||
const first = new URL(String(mockApiRequest.mock.calls[0]?.[1]?.url))
|
||||
const second = new URL(String(mockApiRequest.mock.calls[1]?.[1]?.url))
|
||||
expect(first.searchParams.get('sort')).toBe('installsAllTime')
|
||||
expect(second.searchParams.get('sort')).toBe('trending')
|
||||
})
|
||||
})
|
||||
@@ -5,6 +5,7 @@ import { apiRequest, downloadZip } from '../../http.js'
|
||||
import {
|
||||
ApiRoutes,
|
||||
ApiV1SearchResponseSchema,
|
||||
ApiV1SkillListResponseSchema,
|
||||
ApiV1SkillResolveResponseSchema,
|
||||
ApiV1SkillResponseSchema,
|
||||
} from '../../schema/index.js'
|
||||
@@ -241,6 +242,123 @@ export async function cmdList(opts: GlobalOpts) {
|
||||
}
|
||||
}
|
||||
|
||||
type ExploreSort = 'newest' | 'downloads' | 'rating' | 'installs' | 'installsAllTime' | 'trending'
|
||||
type ApiExploreSort =
|
||||
| 'updated'
|
||||
| 'downloads'
|
||||
| 'stars'
|
||||
| 'installsCurrent'
|
||||
| 'installsAllTime'
|
||||
| 'trending'
|
||||
|
||||
export async function cmdExplore(
|
||||
opts: GlobalOpts,
|
||||
options: { limit?: number; sort?: string; json?: boolean } = {},
|
||||
) {
|
||||
const registry = await getRegistry(opts, { cache: true })
|
||||
const spinner = createSpinner('Fetching latest skills')
|
||||
try {
|
||||
const url = new URL(ApiRoutes.skills, registry)
|
||||
const boundedLimit = clampLimit(options.limit ?? 25)
|
||||
const { apiSort } = resolveExploreSort(options.sort)
|
||||
url.searchParams.set('limit', String(boundedLimit))
|
||||
if (apiSort !== 'updated') url.searchParams.set('sort', apiSort)
|
||||
const result = await apiRequest(
|
||||
registry,
|
||||
{ method: 'GET', url: url.toString() },
|
||||
ApiV1SkillListResponseSchema,
|
||||
)
|
||||
|
||||
spinner.stop()
|
||||
if (options.json) {
|
||||
console.log(JSON.stringify(result, null, 2))
|
||||
return
|
||||
}
|
||||
if (result.items.length === 0) {
|
||||
console.log('No skills found.')
|
||||
return
|
||||
}
|
||||
|
||||
for (const item of result.items) {
|
||||
console.log(formatExploreLine(item))
|
||||
}
|
||||
} catch (error) {
|
||||
spinner.fail(formatError(error))
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
export function formatExploreLine(item: {
|
||||
slug: string
|
||||
summary?: string | null
|
||||
updatedAt: number
|
||||
latestVersion?: { version: string } | null
|
||||
}) {
|
||||
const version = item.latestVersion?.version ?? '?'
|
||||
const age = formatRelativeTime(item.updatedAt)
|
||||
const summary = item.summary ? ` ${truncate(item.summary, 50)}` : ''
|
||||
return `${item.slug} v${version} ${age}${summary}`
|
||||
}
|
||||
|
||||
export function clampLimit(limit: number, fallback = 25) {
|
||||
if (!Number.isFinite(limit)) return fallback
|
||||
return Math.min(Math.max(1, limit), 200)
|
||||
}
|
||||
|
||||
function formatRelativeTime(timestamp: number): string {
|
||||
const now = Date.now()
|
||||
const diff = now - timestamp
|
||||
const seconds = Math.floor(diff / 1000)
|
||||
const minutes = Math.floor(seconds / 60)
|
||||
const hours = Math.floor(minutes / 60)
|
||||
const days = Math.floor(hours / 24)
|
||||
|
||||
if (days > 30) {
|
||||
const months = Math.floor(days / 30)
|
||||
return `${months}mo ago`
|
||||
}
|
||||
if (days > 0) return `${days}d ago`
|
||||
if (hours > 0) return `${hours}h ago`
|
||||
if (minutes > 0) return `${minutes}m ago`
|
||||
return 'just now'
|
||||
}
|
||||
|
||||
function truncate(str: string, maxLen: number): string {
|
||||
if (str.length <= maxLen) return str
|
||||
return `${str.slice(0, maxLen - 1)}…`
|
||||
}
|
||||
|
||||
function resolveExploreSort(raw?: string): { sort: ExploreSort; apiSort: ApiExploreSort } {
|
||||
const normalized = raw?.trim().toLowerCase()
|
||||
if (!normalized || normalized === 'newest' || normalized === 'updated') {
|
||||
return { sort: 'newest', apiSort: 'updated' }
|
||||
}
|
||||
if (normalized === 'downloads' || normalized === 'download') {
|
||||
return { sort: 'downloads', apiSort: 'downloads' }
|
||||
}
|
||||
if (normalized === 'rating' || normalized === 'stars' || normalized === 'star') {
|
||||
return { sort: 'rating', apiSort: 'stars' }
|
||||
}
|
||||
if (
|
||||
normalized === 'installs' ||
|
||||
normalized === 'install' ||
|
||||
normalized === 'installscurrent' ||
|
||||
normalized === 'installs-current' ||
|
||||
normalized === 'current'
|
||||
) {
|
||||
return { sort: 'installs', apiSort: 'installsCurrent' }
|
||||
}
|
||||
if (normalized === 'installsalltime' || normalized === 'installs-all-time') {
|
||||
return { sort: 'installsAllTime', apiSort: 'installsAllTime' }
|
||||
}
|
||||
if (normalized === 'trending') {
|
||||
return { sort: 'trending', apiSort: 'trending' }
|
||||
}
|
||||
fail(
|
||||
`Invalid sort "${raw}". Use newest, downloads, rating, installs, installsAllTime, or trending.`,
|
||||
)
|
||||
}
|
||||
|
||||
async function resolveSkillVersion(registry: string, slug: string, hash: string) {
|
||||
const url = new URL(ApiRoutes.resolve, registry)
|
||||
url.searchParams.set('slug', slug)
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
import { readGlobalConfig } from '../../config.js'
|
||||
import { apiRequest } from '../../http.js'
|
||||
import { ApiRoutes, ApiV1StarResponseSchema } from '../../schema/index.js'
|
||||
import { getRegistry } from '../registry.js'
|
||||
import type { GlobalOpts } from '../types.js'
|
||||
import { createSpinner, fail, formatError, isInteractive, promptConfirm } from '../ui.js'
|
||||
|
||||
async function requireToken() {
|
||||
const cfg = await readGlobalConfig()
|
||||
const token = cfg?.token
|
||||
if (!token) fail('Not logged in. Run: clawdhub login')
|
||||
return token
|
||||
}
|
||||
|
||||
export async function cmdStarSkill(
|
||||
opts: GlobalOpts,
|
||||
slugArg: string,
|
||||
options: { yes?: boolean },
|
||||
inputAllowed: boolean,
|
||||
) {
|
||||
const slug = slugArg.trim().toLowerCase()
|
||||
if (!slug) fail('Slug required')
|
||||
const allowPrompt = isInteractive() && inputAllowed !== false
|
||||
|
||||
if (!options.yes) {
|
||||
if (!allowPrompt) fail('Pass --yes (no input)')
|
||||
const ok = await promptConfirm(`Star ${slug}?`)
|
||||
if (!ok) return
|
||||
}
|
||||
|
||||
const token = await requireToken()
|
||||
const registry = await getRegistry(opts, { cache: true })
|
||||
const spinner = createSpinner(`Starring ${slug}`)
|
||||
try {
|
||||
const result = await apiRequest(
|
||||
registry,
|
||||
{ method: 'POST', path: `${ApiRoutes.stars}/${encodeURIComponent(slug)}`, token },
|
||||
ApiV1StarResponseSchema,
|
||||
)
|
||||
spinner.succeed(result.alreadyStarred ? `OK. ${slug} already starred.` : `OK. Starred ${slug}`)
|
||||
return result
|
||||
} catch (error) {
|
||||
spinner.fail(formatError(error))
|
||||
throw error
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
import { readGlobalConfig } from '../../config.js'
|
||||
import { apiRequest } from '../../http.js'
|
||||
import { ApiRoutes, ApiV1UnstarResponseSchema } from '../../schema/index.js'
|
||||
import { getRegistry } from '../registry.js'
|
||||
import type { GlobalOpts } from '../types.js'
|
||||
import { createSpinner, fail, formatError, isInteractive, promptConfirm } from '../ui.js'
|
||||
|
||||
async function requireToken() {
|
||||
const cfg = await readGlobalConfig()
|
||||
const token = cfg?.token
|
||||
if (!token) fail('Not logged in. Run: clawdhub login')
|
||||
return token
|
||||
}
|
||||
|
||||
export async function cmdUnstarSkill(
|
||||
opts: GlobalOpts,
|
||||
slugArg: string,
|
||||
options: { yes?: boolean },
|
||||
inputAllowed: boolean,
|
||||
) {
|
||||
const slug = slugArg.trim().toLowerCase()
|
||||
if (!slug) fail('Slug required')
|
||||
const allowPrompt = isInteractive() && inputAllowed !== false
|
||||
|
||||
if (!options.yes) {
|
||||
if (!allowPrompt) fail('Pass --yes (no input)')
|
||||
const ok = await promptConfirm(`Unstar ${slug}?`)
|
||||
if (!ok) return
|
||||
}
|
||||
|
||||
const token = await requireToken()
|
||||
const registry = await getRegistry(opts, { cache: true })
|
||||
const spinner = createSpinner(`Unstarring ${slug}`)
|
||||
try {
|
||||
const result = await apiRequest(
|
||||
registry,
|
||||
{ method: 'DELETE', path: `${ApiRoutes.stars}/${encodeURIComponent(slug)}`, token },
|
||||
ApiV1UnstarResponseSchema,
|
||||
)
|
||||
spinner.succeed(
|
||||
result.alreadyUnstarred ? `OK. ${slug} already unstarred.` : `OK. Unstarred ${slug}`,
|
||||
)
|
||||
return result
|
||||
} catch (error) {
|
||||
spinner.fail(formatError(error))
|
||||
throw error
|
||||
}
|
||||
}
|
||||
@@ -33,4 +33,43 @@ describe('discovery', () => {
|
||||
minCliVersion: undefined,
|
||||
})
|
||||
})
|
||||
|
||||
it('parses apiBase config', async () => {
|
||||
vi.stubGlobal(
|
||||
'fetch',
|
||||
vi.fn(
|
||||
async () =>
|
||||
new Response(
|
||||
JSON.stringify({
|
||||
apiBase: 'https://api.example.com',
|
||||
authBase: 'https://auth.example.com',
|
||||
minCliVersion: '1.2.3',
|
||||
}),
|
||||
{
|
||||
status: 200,
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
},
|
||||
),
|
||||
) as unknown as typeof fetch,
|
||||
)
|
||||
await expect(discoverRegistryFromSite('https://example.com')).resolves.toEqual({
|
||||
apiBase: 'https://api.example.com',
|
||||
authBase: 'https://auth.example.com',
|
||||
minCliVersion: '1.2.3',
|
||||
})
|
||||
})
|
||||
|
||||
it('returns null when apiBase is empty', async () => {
|
||||
vi.stubGlobal(
|
||||
'fetch',
|
||||
vi.fn(
|
||||
async () =>
|
||||
new Response(JSON.stringify({ apiBase: '' }), {
|
||||
status: 200,
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
}),
|
||||
) as unknown as typeof fetch,
|
||||
)
|
||||
await expect(discoverRegistryFromSite('https://example.com')).resolves.toBeNull()
|
||||
})
|
||||
})
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* @vitest-environment node */
|
||||
|
||||
import { describe, expect, it, vi } from 'vitest'
|
||||
import { apiRequest, downloadZip } from './http'
|
||||
import { apiRequest, apiRequestForm, downloadZip } from './http'
|
||||
import { ApiV1WhoamiResponseSchema } from './schema/index.js'
|
||||
|
||||
describe('apiRequest', () => {
|
||||
@@ -80,4 +80,77 @@ describe('apiRequest', () => {
|
||||
expect(url).toContain('version=1.0.0')
|
||||
vi.unstubAllGlobals()
|
||||
})
|
||||
|
||||
it('does not retry on non-retryable errors', async () => {
|
||||
const fetchMock = vi.fn().mockResolvedValue({
|
||||
ok: false,
|
||||
status: 404,
|
||||
text: async () => 'nope',
|
||||
})
|
||||
vi.stubGlobal('fetch', fetchMock)
|
||||
await expect(downloadZip('https://example.com', { slug: 'demo' })).rejects.toThrow('nope')
|
||||
expect(fetchMock).toHaveBeenCalledTimes(1)
|
||||
vi.unstubAllGlobals()
|
||||
})
|
||||
})
|
||||
|
||||
describe('apiRequestForm', () => {
|
||||
it('posts form data and returns json', async () => {
|
||||
const fetchMock = vi.fn().mockResolvedValue({
|
||||
ok: true,
|
||||
json: async () => ({ ok: true }),
|
||||
})
|
||||
vi.stubGlobal('fetch', fetchMock)
|
||||
const form = new FormData()
|
||||
form.append('x', '1')
|
||||
const result = await apiRequestForm('https://example.com', {
|
||||
method: 'POST',
|
||||
path: '/upload',
|
||||
token: 'clh_token',
|
||||
form,
|
||||
})
|
||||
expect(result).toEqual({ ok: true })
|
||||
const [, init] = fetchMock.mock.calls[0] as [string, RequestInit]
|
||||
expect(init.body).toBe(form)
|
||||
expect((init.headers as Record<string, string>).Authorization).toBe('Bearer clh_token')
|
||||
vi.unstubAllGlobals()
|
||||
})
|
||||
|
||||
it('retries on 429', async () => {
|
||||
const fetchMock = vi.fn().mockResolvedValue({
|
||||
ok: false,
|
||||
status: 429,
|
||||
text: async () => 'rate limited',
|
||||
})
|
||||
vi.stubGlobal('fetch', fetchMock)
|
||||
await expect(
|
||||
apiRequestForm('https://example.com', {
|
||||
method: 'POST',
|
||||
path: '/upload',
|
||||
form: new FormData(),
|
||||
}),
|
||||
).rejects.toThrow('rate limited')
|
||||
expect(fetchMock).toHaveBeenCalledTimes(3)
|
||||
vi.unstubAllGlobals()
|
||||
})
|
||||
|
||||
it('falls back to HTTP status when body cannot be read', async () => {
|
||||
const fetchMock = vi.fn().mockResolvedValue({
|
||||
ok: false,
|
||||
status: 400,
|
||||
text: async () => {
|
||||
throw new Error('boom')
|
||||
},
|
||||
})
|
||||
vi.stubGlobal('fetch', fetchMock)
|
||||
await expect(
|
||||
apiRequestForm('https://example.com', {
|
||||
method: 'POST',
|
||||
path: '/upload',
|
||||
form: new FormData(),
|
||||
}),
|
||||
).rejects.toThrow('HTTP 400')
|
||||
expect(fetchMock).toHaveBeenCalledTimes(1)
|
||||
vi.unstubAllGlobals()
|
||||
})
|
||||
})
|
||||
|
||||
@@ -1,7 +1,29 @@
|
||||
import { spawnSync } from 'node:child_process'
|
||||
import { mkdtemp, rm, writeFile } from 'node:fs/promises'
|
||||
import { tmpdir } from 'node:os'
|
||||
import { join } from 'node:path'
|
||||
import pRetry, { AbortError } from 'p-retry'
|
||||
import { Agent, setGlobalDispatcher } from 'undici'
|
||||
import type { ArkValidator } from './schema/index.js'
|
||||
import { ApiRoutes, parseArk } from './schema/index.js'
|
||||
|
||||
const REQUEST_TIMEOUT_MS = 15_000
|
||||
const REQUEST_TIMEOUT_SECONDS = Math.ceil(REQUEST_TIMEOUT_MS / 1000)
|
||||
const isBun = typeof process !== 'undefined' && Boolean(process.versions?.bun)
|
||||
|
||||
if (typeof process !== 'undefined' && process.versions?.node) {
|
||||
try {
|
||||
setGlobalDispatcher(
|
||||
new Agent({
|
||||
allowH2: true,
|
||||
connect: { timeout: REQUEST_TIMEOUT_MS },
|
||||
}),
|
||||
)
|
||||
} catch {
|
||||
// ignore dispatcher setup failures in non-node runtimes
|
||||
}
|
||||
}
|
||||
|
||||
type RequestArgs =
|
||||
| { method: 'GET' | 'POST' | 'DELETE'; path: string; token?: string; body?: unknown }
|
||||
| { method: 'GET' | 'POST' | 'DELETE'; url: string; token?: string; body?: unknown }
|
||||
@@ -20,6 +42,10 @@ export async function apiRequest<T>(
|
||||
const url = 'url' in args ? args.url : new URL(args.path, registry).toString()
|
||||
const json = await pRetry(
|
||||
async () => {
|
||||
if (isBun) {
|
||||
return await fetchJsonViaCurl(url, args)
|
||||
}
|
||||
|
||||
const headers: Record<string, string> = { Accept: 'application/json' }
|
||||
if (args.token) headers.Authorization = `Bearer ${args.token}`
|
||||
let body: string | undefined
|
||||
@@ -27,7 +53,15 @@ export async function apiRequest<T>(
|
||||
headers['Content-Type'] = 'application/json'
|
||||
body = JSON.stringify(args.body ?? {})
|
||||
}
|
||||
const response = await fetch(url, { method: args.method, headers, body })
|
||||
const controller = new AbortController()
|
||||
const timeout = setTimeout(() => controller.abort('Timeout'), REQUEST_TIMEOUT_MS)
|
||||
const response = await fetch(url, {
|
||||
method: args.method,
|
||||
headers,
|
||||
body,
|
||||
signal: controller.signal,
|
||||
})
|
||||
clearTimeout(timeout)
|
||||
if (!response.ok) {
|
||||
const text = await response.text().catch(() => '')
|
||||
const message = text || `HTTP ${response.status}`
|
||||
@@ -62,9 +96,21 @@ export async function apiRequestForm<T>(
|
||||
const url = 'url' in args ? args.url : new URL(args.path, registry).toString()
|
||||
const json = await pRetry(
|
||||
async () => {
|
||||
if (isBun) {
|
||||
return await fetchJsonFormViaCurl(url, args)
|
||||
}
|
||||
|
||||
const headers: Record<string, string> = { Accept: 'application/json' }
|
||||
if (args.token) headers.Authorization = `Bearer ${args.token}`
|
||||
const response = await fetch(url, { method: args.method, headers, body: args.form })
|
||||
const controller = new AbortController()
|
||||
const timeout = setTimeout(() => controller.abort('Timeout'), REQUEST_TIMEOUT_MS)
|
||||
const response = await fetch(url, {
|
||||
method: args.method,
|
||||
headers,
|
||||
body: args.form,
|
||||
signal: controller.signal,
|
||||
})
|
||||
clearTimeout(timeout)
|
||||
if (!response.ok) {
|
||||
const text = await response.text().catch(() => '')
|
||||
const message = text || `HTTP ${response.status}`
|
||||
@@ -87,7 +133,14 @@ export async function downloadZip(registry: string, args: { slug: string; versio
|
||||
if (args.version) url.searchParams.set('version', args.version)
|
||||
return pRetry(
|
||||
async () => {
|
||||
const response = await fetch(url.toString(), { method: 'GET' })
|
||||
if (isBun) {
|
||||
return await fetchBinaryViaCurl(url.toString())
|
||||
}
|
||||
|
||||
const controller = new AbortController()
|
||||
const timeout = setTimeout(() => controller.abort('Timeout'), REQUEST_TIMEOUT_MS)
|
||||
const response = await fetch(url.toString(), { method: 'GET', signal: controller.signal })
|
||||
clearTimeout(timeout)
|
||||
if (!response.ok) {
|
||||
const message = (await response.text().catch(() => '')) || `HTTP ${response.status}`
|
||||
if (response.status === 429 || response.status >= 500) {
|
||||
@@ -100,3 +153,149 @@ export async function downloadZip(registry: string, args: { slug: string; versio
|
||||
{ retries: 2 },
|
||||
)
|
||||
}
|
||||
|
||||
async function fetchJsonViaCurl(url: string, args: RequestArgs) {
|
||||
const headers = ['-H', 'Accept: application/json']
|
||||
if (args.token) {
|
||||
headers.push('-H', `Authorization: Bearer ${args.token}`)
|
||||
}
|
||||
const curlArgs = [
|
||||
'--silent',
|
||||
'--show-error',
|
||||
'--location',
|
||||
'--max-time',
|
||||
String(REQUEST_TIMEOUT_SECONDS),
|
||||
'--write-out',
|
||||
'\n%{http_code}',
|
||||
'-X',
|
||||
args.method,
|
||||
...headers,
|
||||
url,
|
||||
]
|
||||
if (args.method === 'POST') {
|
||||
curlArgs.push('-H', 'Content-Type: application/json')
|
||||
curlArgs.push('--data-binary', JSON.stringify(args.body ?? {}))
|
||||
}
|
||||
|
||||
const result = spawnSync('curl', curlArgs, { encoding: 'utf8' })
|
||||
if (result.status !== 0) {
|
||||
throw new Error(result.stderr || 'curl failed')
|
||||
}
|
||||
const output = result.stdout ?? ''
|
||||
const splitAt = output.lastIndexOf('\n')
|
||||
if (splitAt === -1) throw new Error('curl response missing status')
|
||||
const body = output.slice(0, splitAt)
|
||||
const status = Number(output.slice(splitAt + 1).trim())
|
||||
if (!Number.isFinite(status)) throw new Error('curl response missing status')
|
||||
if (status < 200 || status >= 300) {
|
||||
if (status === 429 || status >= 500) {
|
||||
throw new Error(body || `HTTP ${status}`)
|
||||
}
|
||||
throw new AbortError(body || `HTTP ${status}`)
|
||||
}
|
||||
return JSON.parse(body || 'null') as unknown
|
||||
}
|
||||
|
||||
async function fetchJsonFormViaCurl(url: string, args: FormRequestArgs) {
|
||||
const headers = ['-H', 'Accept: application/json']
|
||||
if (args.token) {
|
||||
headers.push('-H', `Authorization: Bearer ${args.token}`)
|
||||
}
|
||||
|
||||
const tempDir = await mkdtemp(join(tmpdir(), 'clawdhub-upload-'))
|
||||
try {
|
||||
const formArgs: string[] = []
|
||||
for (const [key, value] of args.form.entries()) {
|
||||
if (value instanceof Blob) {
|
||||
const filename = typeof (value as File).name === 'string' ? (value as File).name : 'file'
|
||||
const filePath = join(tempDir, filename)
|
||||
const bytes = new Uint8Array(await value.arrayBuffer())
|
||||
await writeFile(filePath, bytes)
|
||||
formArgs.push('-F', `${key}=@${filePath};filename=${filename}`)
|
||||
} else {
|
||||
formArgs.push('-F', `${key}=${String(value)}`)
|
||||
}
|
||||
}
|
||||
|
||||
const curlArgs = [
|
||||
'--silent',
|
||||
'--show-error',
|
||||
'--location',
|
||||
'--max-time',
|
||||
String(REQUEST_TIMEOUT_SECONDS),
|
||||
'--write-out',
|
||||
'\n%{http_code}',
|
||||
'-X',
|
||||
args.method,
|
||||
...headers,
|
||||
...formArgs,
|
||||
url,
|
||||
]
|
||||
|
||||
const result = spawnSync('curl', curlArgs, { encoding: 'utf8' })
|
||||
if (result.status !== 0) {
|
||||
throw new Error(result.stderr || 'curl failed')
|
||||
}
|
||||
const output = result.stdout ?? ''
|
||||
const splitAt = output.lastIndexOf('\n')
|
||||
if (splitAt === -1) throw new Error('curl response missing status')
|
||||
const body = output.slice(0, splitAt)
|
||||
const status = Number(output.slice(splitAt + 1).trim())
|
||||
if (!Number.isFinite(status)) throw new Error('curl response missing status')
|
||||
if (status < 200 || status >= 300) {
|
||||
if (status === 429 || status >= 500) {
|
||||
throw new Error(body || `HTTP ${status}`)
|
||||
}
|
||||
throw new AbortError(body || `HTTP ${status}`)
|
||||
}
|
||||
return JSON.parse(body || 'null') as unknown
|
||||
} finally {
|
||||
await rm(tempDir, { recursive: true, force: true })
|
||||
}
|
||||
}
|
||||
|
||||
async function fetchBinaryViaCurl(url: string) {
|
||||
const tempDir = await mkdtemp(join(tmpdir(), 'clawdhub-download-'))
|
||||
const filePath = join(tempDir, 'payload.bin')
|
||||
try {
|
||||
const curlArgs = [
|
||||
'--silent',
|
||||
'--show-error',
|
||||
'--location',
|
||||
'--max-time',
|
||||
String(REQUEST_TIMEOUT_SECONDS),
|
||||
'-o',
|
||||
filePath,
|
||||
'--write-out',
|
||||
'%{http_code}',
|
||||
url,
|
||||
]
|
||||
const result = spawnSync('curl', curlArgs, { encoding: 'utf8' })
|
||||
if (result.status !== 0) {
|
||||
throw new Error(result.stderr || 'curl failed')
|
||||
}
|
||||
const status = Number((result.stdout ?? '').trim())
|
||||
if (!Number.isFinite(status)) throw new Error('curl response missing status')
|
||||
if (status < 200 || status >= 300) {
|
||||
const body = await readFileSafe(filePath)
|
||||
const message = body ? new TextDecoder().decode(body) : `HTTP ${status}`
|
||||
if (status === 429 || status >= 500) {
|
||||
throw new Error(message)
|
||||
}
|
||||
throw new AbortError(message)
|
||||
}
|
||||
const bytes = await readFileSafe(filePath)
|
||||
return bytes ? new Uint8Array(bytes) : new Uint8Array()
|
||||
} finally {
|
||||
await rm(tempDir, { recursive: true, force: true })
|
||||
}
|
||||
}
|
||||
|
||||
async function readFileSafe(path: string) {
|
||||
try {
|
||||
const { readFile } = await import('node:fs/promises')
|
||||
return await readFile(path)
|
||||
} catch {
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ export const ApiRoutes = {
|
||||
resolve: '/api/v1/resolve',
|
||||
download: '/api/v1/download',
|
||||
skills: '/api/v1/skills',
|
||||
stars: '/api/v1/stars',
|
||||
souls: '/api/v1/souls',
|
||||
whoami: '/api/v1/whoami',
|
||||
} as const
|
||||
|
||||
@@ -215,6 +215,18 @@ export const ApiV1DeleteResponseSchema = type({
|
||||
ok: 'true',
|
||||
})
|
||||
|
||||
export const ApiV1StarResponseSchema = type({
|
||||
ok: 'true',
|
||||
starred: 'boolean',
|
||||
alreadyStarred: 'boolean',
|
||||
})
|
||||
|
||||
export const ApiV1UnstarResponseSchema = type({
|
||||
ok: 'true',
|
||||
unstarred: 'boolean',
|
||||
alreadyUnstarred: 'boolean',
|
||||
})
|
||||
|
||||
export const SkillInstallSpecSchema = type({
|
||||
id: 'string?',
|
||||
kind: '"brew"|"node"|"go"|"uv"',
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/* @vitest-environment node */
|
||||
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import * as schema from '.'
|
||||
import { isTextContentType, TEXT_FILE_EXTENSION_SET } from './textFiles'
|
||||
|
||||
describe('packages/clawdhub schema textFiles', () => {
|
||||
it('exports text-file extension set', () => {
|
||||
expect(TEXT_FILE_EXTENSION_SET.has('md')).toBe(true)
|
||||
expect(TEXT_FILE_EXTENSION_SET.has('exe')).toBe(false)
|
||||
})
|
||||
|
||||
it('detects text content types with parameters', () => {
|
||||
expect(isTextContentType('text/plain; charset=utf-8')).toBe(true)
|
||||
expect(isTextContentType('application/json; charset=utf-8')).toBe(true)
|
||||
expect(isTextContentType('application/octet-stream')).toBe(false)
|
||||
})
|
||||
|
||||
it('re-exports helpers from index', () => {
|
||||
expect(typeof schema.isTextContentType).toBe('function')
|
||||
expect(schema.isTextContentType('application/markdown')).toBe(true)
|
||||
})
|
||||
})
|
||||
Vendored
+1
@@ -15,6 +15,7 @@ export declare const ApiRoutes: {
|
||||
readonly resolve: "/api/v1/resolve";
|
||||
readonly download: "/api/v1/download";
|
||||
readonly skills: "/api/v1/skills";
|
||||
readonly stars: "/api/v1/stars";
|
||||
readonly souls: "/api/v1/souls";
|
||||
readonly whoami: "/api/v1/whoami";
|
||||
};
|
||||
|
||||
Vendored
+1
@@ -15,6 +15,7 @@ export const ApiRoutes = {
|
||||
resolve: '/api/v1/resolve',
|
||||
download: '/api/v1/download',
|
||||
skills: '/api/v1/skills',
|
||||
stars: '/api/v1/stars',
|
||||
souls: '/api/v1/souls',
|
||||
whoami: '/api/v1/whoami',
|
||||
};
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,QAAQ,EAAE,eAAe;IACzB,MAAM,EAAE,aAAa;IACrB,KAAK,EAAE,YAAY;IACnB,YAAY,EAAE,oBAAoB;IAClC,SAAS,EAAE,iBAAiB;IAC5B,YAAY,EAAE,qBAAqB;IACnC,UAAU,EAAE,kBAAkB;IAC9B,gBAAgB,EAAE,yBAAyB;IAC3C,cAAc,EAAE,uBAAuB;IACvC,gBAAgB,EAAE,yBAAyB;CACnC,CAAA;AAEV,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,MAAM,EAAE,gBAAgB;IACxB,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,kBAAkB;IAC5B,MAAM,EAAE,gBAAgB;IACxB,KAAK,EAAE,eAAe;IACtB,MAAM,EAAE,gBAAgB;CAChB,CAAA"}
|
||||
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,QAAQ,EAAE,eAAe;IACzB,MAAM,EAAE,aAAa;IACrB,KAAK,EAAE,YAAY;IACnB,YAAY,EAAE,oBAAoB;IAClC,SAAS,EAAE,iBAAiB;IAC5B,YAAY,EAAE,qBAAqB;IACnC,UAAU,EAAE,kBAAkB;IAC9B,gBAAgB,EAAE,yBAAyB;IAC3C,cAAc,EAAE,uBAAuB;IACvC,gBAAgB,EAAE,yBAAyB;CACnC,CAAA;AAEV,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,MAAM,EAAE,gBAAgB;IACxB,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,kBAAkB;IAC5B,MAAM,EAAE,gBAAgB;IACxB,KAAK,EAAE,eAAe;IACtB,KAAK,EAAE,eAAe;IACtB,MAAM,EAAE,gBAAgB;CAChB,CAAA"}
|
||||
Vendored
+10
@@ -221,6 +221,16 @@ export declare const ApiV1PublishResponseSchema: import("arktype/internal/varian
|
||||
export declare const ApiV1DeleteResponseSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
||||
ok: true;
|
||||
}, {}>;
|
||||
export declare const ApiV1StarResponseSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
||||
ok: true;
|
||||
starred: boolean;
|
||||
alreadyStarred: boolean;
|
||||
}, {}>;
|
||||
export declare const ApiV1UnstarResponseSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
||||
ok: true;
|
||||
unstarred: boolean;
|
||||
alreadyUnstarred: boolean;
|
||||
}, {}>;
|
||||
export declare const SkillInstallSpecSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
||||
kind: "brew" | "node" | "go" | "uv";
|
||||
id?: string | undefined;
|
||||
|
||||
Vendored
+11
-1
@@ -192,6 +192,16 @@ export const ApiV1PublishResponseSchema = type({
|
||||
export const ApiV1DeleteResponseSchema = type({
|
||||
ok: 'true',
|
||||
});
|
||||
export const ApiV1StarResponseSchema = type({
|
||||
ok: 'true',
|
||||
starred: 'boolean',
|
||||
alreadyStarred: 'boolean',
|
||||
});
|
||||
export const ApiV1UnstarResponseSchema = type({
|
||||
ok: 'true',
|
||||
unstarred: 'boolean',
|
||||
alreadyUnstarred: 'boolean',
|
||||
});
|
||||
export const SkillInstallSpecSchema = type({
|
||||
id: 'string?',
|
||||
kind: '"brew"|"node"|"go"|"uv"',
|
||||
@@ -230,4 +240,4 @@ export const ClawdisSkillMetadataSchema = type({
|
||||
nix: NixPluginSpecSchema.optional(),
|
||||
config: ClawdbotConfigSpecSchema.optional(),
|
||||
});
|
||||
//# sourceMappingURL=schemas.js.map
|
||||
//# sourceMappingURL=schemas.js.map
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -16,6 +16,7 @@ export const ApiRoutes = {
|
||||
resolve: '/api/v1/resolve',
|
||||
download: '/api/v1/download',
|
||||
skills: '/api/v1/skills',
|
||||
stars: '/api/v1/stars',
|
||||
souls: '/api/v1/souls',
|
||||
whoami: '/api/v1/whoami',
|
||||
} as const
|
||||
|
||||
@@ -226,6 +226,18 @@ export const ApiV1DeleteResponseSchema = type({
|
||||
ok: 'true',
|
||||
})
|
||||
|
||||
export const ApiV1StarResponseSchema = type({
|
||||
ok: 'true',
|
||||
starred: 'boolean',
|
||||
alreadyStarred: 'boolean',
|
||||
})
|
||||
|
||||
export const ApiV1UnstarResponseSchema = type({
|
||||
ok: 'true',
|
||||
unstarred: 'boolean',
|
||||
alreadyUnstarred: 'boolean',
|
||||
})
|
||||
|
||||
export const SkillInstallSpecSchema = type({
|
||||
id: 'string?',
|
||||
kind: '"brew"|"node"|"go"|"uv"',
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
import { defineConfig, devices } from '@playwright/test'
|
||||
|
||||
const port = Number(process.env.PLAYWRIGHT_PORT || 4173)
|
||||
const baseURL = process.env.PLAYWRIGHT_BASE_URL || `http://127.0.0.1:${port}`
|
||||
|
||||
export default defineConfig({
|
||||
testDir: './e2e',
|
||||
testMatch: /.*\.pw\.test\.ts/,
|
||||
timeout: 60_000,
|
||||
expect: { timeout: 10_000 },
|
||||
fullyParallel: true,
|
||||
retries: process.env.CI ? 2 : 0,
|
||||
reporter: process.env.CI ? [['list'], ['html', { open: 'never' }]] : [['list']],
|
||||
use: {
|
||||
baseURL,
|
||||
trace: 'retain-on-failure',
|
||||
},
|
||||
webServer: process.env.PLAYWRIGHT_BASE_URL
|
||||
? undefined
|
||||
: {
|
||||
command: 'bun run preview -- --host 127.0.0.1 --port 4173',
|
||||
url: baseURL,
|
||||
reuseExistingServer: !process.env.CI,
|
||||
stdout: 'ignore',
|
||||
stderr: 'pipe',
|
||||
},
|
||||
projects: [
|
||||
{
|
||||
name: 'chromium',
|
||||
use: { ...devices['Desktop Chrome'] },
|
||||
},
|
||||
],
|
||||
})
|
||||
@@ -0,0 +1,56 @@
|
||||
import { readFile } from 'node:fs/promises'
|
||||
import { join } from 'node:path'
|
||||
import semver from 'semver'
|
||||
|
||||
type PackageJson = {
|
||||
name?: string
|
||||
version?: string
|
||||
dependencies?: Record<string, string>
|
||||
peerDependencies?: Record<string, string>
|
||||
}
|
||||
|
||||
async function readJson(path: string): Promise<PackageJson> {
|
||||
const raw = await readFile(path, 'utf8')
|
||||
return JSON.parse(raw) as PackageJson
|
||||
}
|
||||
|
||||
async function main() {
|
||||
const root = process.cwd()
|
||||
const rootPkgPath = join(root, 'package.json')
|
||||
const authPkgPath = join(root, 'node_modules', '@convex-dev', 'auth', 'package.json')
|
||||
const corePkgPath = join(root, 'node_modules', '@auth', 'core', 'package.json')
|
||||
|
||||
const rootPkg = await readJson(rootPkgPath)
|
||||
const authPkg = await readJson(authPkgPath)
|
||||
const corePkg = await readJson(corePkgPath)
|
||||
|
||||
const peerRange = authPkg.peerDependencies?.['@auth/core']
|
||||
const declaredRange = rootPkg.dependencies?.['@auth/core']
|
||||
const installedVersion = corePkg.version
|
||||
|
||||
if (!peerRange) {
|
||||
throw new Error('Missing @auth/core peer range in @convex-dev/auth package.json')
|
||||
}
|
||||
if (!declaredRange) {
|
||||
throw new Error('Missing @auth/core dependency in root package.json')
|
||||
}
|
||||
if (!installedVersion) {
|
||||
throw new Error('Missing @auth/core version in node_modules')
|
||||
}
|
||||
|
||||
if (!semver.intersects(declaredRange, peerRange, { includePrerelease: true })) {
|
||||
throw new Error(
|
||||
`@auth/core range mismatch: package.json declares "${declaredRange}" but @convex-dev/auth requires "${peerRange}"`,
|
||||
)
|
||||
}
|
||||
|
||||
if (!semver.satisfies(installedVersion, peerRange, { includePrerelease: true })) {
|
||||
throw new Error(
|
||||
`@auth/core version mismatch: installed "${installedVersion}" does not satisfy @convex-dev/auth peer "${peerRange}"`,
|
||||
)
|
||||
}
|
||||
|
||||
console.log(`peer ok: @auth/core ${installedVersion} satisfies @convex-dev/auth (${peerRange})`)
|
||||
}
|
||||
|
||||
await main()
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
PORT="${PLAYWRIGHT_PORT:-4173}"
|
||||
|
||||
if [[ -n "${PLAYWRIGHT_BASE_URL:-}" ]]; then
|
||||
echo "Running against $PLAYWRIGHT_BASE_URL"
|
||||
bun run test:pw
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Running against local preview server on http://127.0.0.1:$PORT"
|
||||
bun run build
|
||||
PLAYWRIGHT_PORT="$PORT" bun run test:pw
|
||||
@@ -79,8 +79,8 @@ function wrapText(value: string, maxChars: number, maxLines: number) {
|
||||
}
|
||||
|
||||
export function buildSoulOgSvg(params: SoulOgSvgParams) {
|
||||
const rawTitle = params.title.trim() || 'onlycrabs.ai'
|
||||
const rawDescription = params.description.trim() || 'SOUL.md bundle on onlycrabs.ai.'
|
||||
const rawTitle = params.title.trim() || 'SoulHub'
|
||||
const rawDescription = params.description.trim() || 'SOUL.md bundle on SoulHub.'
|
||||
|
||||
const cardX = 72
|
||||
const cardY = 96
|
||||
|
||||
@@ -46,10 +46,9 @@ async function ensureWasm() {
|
||||
await wasmInitPromise
|
||||
}
|
||||
|
||||
function buildFooter(host: string | null, slug: string, owner: string | null) {
|
||||
const base = host ? host : 'onlycrabs.ai'
|
||||
if (owner) return `${base}/@${owner}/${slug}`
|
||||
return `${base}/souls/${slug}`
|
||||
function buildFooter(slug: string, owner: string | null) {
|
||||
if (owner) return `@${owner}/${slug}`
|
||||
return `souls/${slug}`
|
||||
}
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
@@ -75,9 +74,9 @@ export default defineEventHandler(async (event) => {
|
||||
const title = titleFromQuery || meta?.displayName || slug
|
||||
const description = descriptionFromQuery || meta?.summary || ''
|
||||
|
||||
const ownerLabel = owner ? `@${owner}` : 'onlycrabs.ai'
|
||||
const ownerLabel = owner ? `@${owner}` : 'SoulHub'
|
||||
const versionLabel = version ? `v${version}` : 'latest'
|
||||
const footer = buildFooter(getRequestHost(event), slug, owner || null)
|
||||
const footer = buildFooter(slug, owner || null)
|
||||
|
||||
const cacheKey = version ? 'public, max-age=31536000, immutable' : 'public, max-age=3600'
|
||||
setHeader(event, 'Cache-Control', cacheKey)
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
import { describe, expect, it, vi } from 'vitest'
|
||||
|
||||
vi.mock('@tanstack/react-router', () => ({
|
||||
createFileRoute: () => (config: { beforeLoad?: unknown }) => ({ __config: config }),
|
||||
redirect: (options: unknown) => ({ redirect: options }),
|
||||
}))
|
||||
|
||||
import { Route } from '../routes/search'
|
||||
|
||||
describe('search route', () => {
|
||||
it('redirects to the skills index', () => {
|
||||
const beforeLoad = Route.__config.beforeLoad as (args: {
|
||||
search: { q?: string; highlighted?: boolean }
|
||||
}) => void
|
||||
let thrown: unknown
|
||||
|
||||
try {
|
||||
beforeLoad({ search: { q: 'crab', highlighted: true } })
|
||||
} catch (error) {
|
||||
thrown = error
|
||||
}
|
||||
|
||||
expect(thrown).toEqual({
|
||||
redirect: {
|
||||
to: '/skills',
|
||||
search: {
|
||||
q: 'crab',
|
||||
highlighted: true,
|
||||
},
|
||||
replace: true,
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
it('redirects to the skills index without query', () => {
|
||||
const beforeLoad = Route.__config.beforeLoad as (args: {
|
||||
search: { q?: string; highlighted?: boolean }
|
||||
}) => void
|
||||
let thrown: unknown
|
||||
|
||||
try {
|
||||
beforeLoad({ search: {} })
|
||||
} catch (error) {
|
||||
thrown = error
|
||||
}
|
||||
|
||||
expect(thrown).toEqual({
|
||||
redirect: {
|
||||
to: '/skills',
|
||||
search: {
|
||||
q: undefined,
|
||||
highlighted: undefined,
|
||||
},
|
||||
replace: true,
|
||||
},
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -4,6 +4,7 @@ import { vi } from 'vitest'
|
||||
import { SkillDetailPage } from '../components/SkillDetailPage'
|
||||
|
||||
const navigateMock = vi.fn()
|
||||
const useAuthStatusMock = vi.fn()
|
||||
|
||||
vi.mock('@tanstack/react-router', () => ({
|
||||
useNavigate: () => navigateMock,
|
||||
@@ -13,18 +14,27 @@ const useQueryMock = vi.fn()
|
||||
const getReadmeMock = vi.fn()
|
||||
|
||||
vi.mock('convex/react', () => ({
|
||||
useConvexAuth: () => ({ isAuthenticated: false }),
|
||||
useQuery: (...args: unknown[]) => useQueryMock(...args),
|
||||
useMutation: () => vi.fn(),
|
||||
useAction: () => getReadmeMock,
|
||||
}))
|
||||
|
||||
vi.mock('../lib/useAuthStatus', () => ({
|
||||
useAuthStatus: () => useAuthStatusMock(),
|
||||
}))
|
||||
|
||||
describe('SkillDetailPage', () => {
|
||||
beforeEach(() => {
|
||||
useQueryMock.mockReset()
|
||||
getReadmeMock.mockReset()
|
||||
navigateMock.mockReset()
|
||||
useAuthStatusMock.mockReset()
|
||||
getReadmeMock.mockResolvedValue({ text: '' })
|
||||
useAuthStatusMock.mockReturnValue({
|
||||
isAuthenticated: false,
|
||||
isLoading: false,
|
||||
me: null,
|
||||
})
|
||||
useQueryMock.mockImplementation((_fn: unknown, args: unknown) => {
|
||||
if (args === 'skip') return undefined
|
||||
return undefined
|
||||
@@ -32,9 +42,7 @@ describe('SkillDetailPage', () => {
|
||||
})
|
||||
|
||||
it('shows a loading indicator while loading', () => {
|
||||
useQueryMock
|
||||
.mockImplementationOnce(() => null) // me
|
||||
.mockImplementationOnce(() => undefined) // getBySlug
|
||||
useQueryMock.mockImplementationOnce(() => undefined) // getBySlug
|
||||
|
||||
render(<SkillDetailPage slug="weather" />)
|
||||
expect(screen.getByText(/Loading skill/i)).toBeTruthy()
|
||||
@@ -42,30 +50,26 @@ describe('SkillDetailPage', () => {
|
||||
})
|
||||
|
||||
it('shows not found when skill query resolves to null', async () => {
|
||||
useQueryMock
|
||||
.mockImplementationOnce(() => null) // me
|
||||
.mockImplementationOnce(() => null) // getBySlug
|
||||
useQueryMock.mockImplementationOnce(() => null) // getBySlug
|
||||
|
||||
render(<SkillDetailPage slug="missing-skill" />)
|
||||
expect(await screen.findByText(/Skill not found/i)).toBeTruthy()
|
||||
})
|
||||
|
||||
it('redirects legacy routes to canonical owner/slug', async () => {
|
||||
useQueryMock
|
||||
.mockImplementationOnce(() => null) // me
|
||||
.mockImplementationOnce(() => ({
|
||||
skill: {
|
||||
_id: 'skills:1',
|
||||
slug: 'weather',
|
||||
displayName: 'Weather',
|
||||
summary: 'Get current weather.',
|
||||
ownerUserId: 'users:1',
|
||||
tags: {},
|
||||
stats: { stars: 0, downloads: 0 },
|
||||
},
|
||||
owner: { handle: 'steipete', name: 'Peter' },
|
||||
latestVersion: { _id: 'skillVersions:1', version: '1.0.0', parsed: {} },
|
||||
}))
|
||||
useQueryMock.mockImplementationOnce(() => ({
|
||||
skill: {
|
||||
_id: 'skills:1',
|
||||
slug: 'weather',
|
||||
displayName: 'Weather',
|
||||
summary: 'Get current weather.',
|
||||
ownerUserId: 'users:1',
|
||||
tags: {},
|
||||
stats: { stars: 0, downloads: 0 },
|
||||
},
|
||||
owner: { handle: 'steipete', name: 'Peter' },
|
||||
latestVersion: { _id: 'skillVersions:1', version: '1.0.0', parsed: {} },
|
||||
}))
|
||||
|
||||
render(<SkillDetailPage slug="weather" redirectToCanonical />)
|
||||
expect(screen.getByText(/Loading skill/i)).toBeTruthy()
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
/* @vitest-environment jsdom */
|
||||
import { act, fireEvent, render, screen } from '@testing-library/react'
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
|
||||
import { SkillsIndex } from '../routes/skills/index'
|
||||
|
||||
const navigateMock = vi.fn()
|
||||
const useQueryMock = vi.fn()
|
||||
const useActionMock = vi.fn()
|
||||
let searchMock: Record<string, unknown> = {}
|
||||
|
||||
vi.mock('@tanstack/react-router', () => ({
|
||||
createFileRoute: () => (_config: { component: unknown; validateSearch: unknown }) => ({
|
||||
useNavigate: () => navigateMock,
|
||||
useSearch: () => searchMock,
|
||||
}),
|
||||
Link: (props: { children: unknown }) => <a href="/">{props.children}</a>,
|
||||
}))
|
||||
|
||||
vi.mock('convex/react', () => ({
|
||||
useAction: (...args: unknown[]) => useActionMock(...args),
|
||||
useQuery: (...args: unknown[]) => useQueryMock(...args),
|
||||
}))
|
||||
|
||||
describe('SkillsIndex', () => {
|
||||
beforeEach(() => {
|
||||
useQueryMock.mockReset()
|
||||
useActionMock.mockReset()
|
||||
navigateMock.mockReset()
|
||||
searchMock = {}
|
||||
useActionMock.mockReturnValue(() => Promise.resolve([]))
|
||||
useQueryMock.mockReturnValue({ items: [], nextCursor: null })
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
vi.useRealTimers()
|
||||
vi.unstubAllGlobals()
|
||||
})
|
||||
|
||||
it('requests the first skills page', () => {
|
||||
render(<SkillsIndex />)
|
||||
expect(useQueryMock).toHaveBeenCalledWith(expect.anything(), {
|
||||
cursor: undefined,
|
||||
limit: 50,
|
||||
})
|
||||
})
|
||||
|
||||
it('renders an empty state when no skills are returned', () => {
|
||||
render(<SkillsIndex />)
|
||||
expect(screen.getByText('No skills match that filter.')).toBeTruthy()
|
||||
})
|
||||
|
||||
it('skips list query and calls search when query is set', async () => {
|
||||
searchMock = { q: 'remind' }
|
||||
const actionFn = vi.fn().mockResolvedValue([])
|
||||
useActionMock.mockReturnValue(actionFn)
|
||||
useQueryMock.mockReturnValue(undefined)
|
||||
vi.useFakeTimers()
|
||||
|
||||
render(<SkillsIndex />)
|
||||
|
||||
expect(useQueryMock).toHaveBeenCalledWith(expect.anything(), 'skip')
|
||||
await act(async () => {
|
||||
await vi.runAllTimersAsync()
|
||||
})
|
||||
expect(actionFn).toHaveBeenCalledWith({
|
||||
query: 'remind',
|
||||
highlightedOnly: false,
|
||||
limit: 50,
|
||||
})
|
||||
})
|
||||
|
||||
it('loads more results when search pagination is requested', async () => {
|
||||
searchMock = { q: 'remind' }
|
||||
vi.stubGlobal('IntersectionObserver', undefined)
|
||||
const actionFn = vi
|
||||
.fn()
|
||||
.mockResolvedValueOnce(makeSearchResults(50))
|
||||
.mockResolvedValueOnce(makeSearchResults(100))
|
||||
useActionMock.mockReturnValue(actionFn)
|
||||
useQueryMock.mockReturnValue(undefined)
|
||||
vi.useFakeTimers()
|
||||
|
||||
render(<SkillsIndex />)
|
||||
await act(async () => {
|
||||
await vi.runAllTimersAsync()
|
||||
})
|
||||
|
||||
const loadMoreButton = screen.getByRole('button', { name: 'Load more' })
|
||||
await act(async () => {
|
||||
fireEvent.click(loadMoreButton)
|
||||
await vi.runAllTimersAsync()
|
||||
})
|
||||
|
||||
expect(actionFn).toHaveBeenLastCalledWith({
|
||||
query: 'remind',
|
||||
highlightedOnly: false,
|
||||
limit: 100,
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
function makeSearchResults(count: number) {
|
||||
return Array.from({ length: count }, (_, index) => ({
|
||||
score: 0.9,
|
||||
skill: {
|
||||
_id: `skill_${index}`,
|
||||
slug: `skill-${index}`,
|
||||
displayName: `Skill ${index}`,
|
||||
summary: `Summary ${index}`,
|
||||
tags: {},
|
||||
stats: {
|
||||
downloads: 0,
|
||||
installsCurrent: 0,
|
||||
installsAllTime: 0,
|
||||
stars: 0,
|
||||
versions: 1,
|
||||
comments: 0,
|
||||
},
|
||||
createdAt: 0,
|
||||
updatedAt: 0,
|
||||
},
|
||||
version: null,
|
||||
}))
|
||||
}
|
||||
@@ -15,10 +15,10 @@ const publishVersion = vi.fn()
|
||||
const generateChangelogPreview = vi.fn()
|
||||
const fetchMock = vi.fn()
|
||||
const useQueryMock = vi.fn()
|
||||
const useAuthStatusMock = vi.fn()
|
||||
let useActionCallCount = 0
|
||||
|
||||
vi.mock('convex/react', () => ({
|
||||
useConvexAuth: () => ({ isAuthenticated: true }),
|
||||
useQuery: (...args: unknown[]) => useQueryMock(...args),
|
||||
useMutation: () => generateUploadUrl,
|
||||
useAction: () => {
|
||||
@@ -27,6 +27,10 @@ vi.mock('convex/react', () => ({
|
||||
},
|
||||
}))
|
||||
|
||||
vi.mock('../lib/useAuthStatus', () => ({
|
||||
useAuthStatus: () => useAuthStatusMock(),
|
||||
}))
|
||||
|
||||
describe('Upload route', () => {
|
||||
beforeEach(() => {
|
||||
generateUploadUrl.mockReset()
|
||||
@@ -34,7 +38,13 @@ describe('Upload route', () => {
|
||||
generateChangelogPreview.mockReset()
|
||||
fetchMock.mockReset()
|
||||
useQueryMock.mockReset()
|
||||
useAuthStatusMock.mockReset()
|
||||
useActionCallCount = 0
|
||||
useAuthStatusMock.mockReturnValue({
|
||||
isAuthenticated: true,
|
||||
isLoading: false,
|
||||
me: { _id: 'users:1' },
|
||||
})
|
||||
useQueryMock.mockImplementation((_fn: unknown, args: unknown) => {
|
||||
if (args === 'skip') return undefined
|
||||
return null
|
||||
|
||||
@@ -3,15 +3,13 @@ import { convex } from '../convex/client'
|
||||
import { UserBootstrap } from './UserBootstrap'
|
||||
|
||||
export function AppProviders({ children }: { children: React.ReactNode }) {
|
||||
if (typeof window === 'undefined') {
|
||||
return <>{children}</>
|
||||
}
|
||||
|
||||
return (
|
||||
<ConvexAuthProvider
|
||||
client={convex}
|
||||
replaceURL={(relativeUrl) => {
|
||||
window.history.replaceState(null, '', relativeUrl)
|
||||
if (typeof window !== 'undefined') {
|
||||
window.history.replaceState(null, '', relativeUrl)
|
||||
}
|
||||
}}
|
||||
>
|
||||
<UserBootstrap />
|
||||
|
||||
@@ -9,8 +9,8 @@ export function Footer() {
|
||||
<div className="site-footer-row">
|
||||
<div className="site-footer-copy">
|
||||
{siteName} · A{' '}
|
||||
<a href="https://clawdbot.com" target="_blank" rel="noreferrer">
|
||||
ClawdBot
|
||||
<a href="https://clawd.bot" target="_blank" rel="noreferrer">
|
||||
Clawdbot
|
||||
</a>{' '}
|
||||
project ·{' '}
|
||||
<a href="https://github.com/clawdbot/clawdhub" target="_blank" rel="noreferrer">
|
||||
|
||||
+15
-20
@@ -1,13 +1,12 @@
|
||||
import { useAuthActions } from '@convex-dev/auth/react'
|
||||
import { Link } from '@tanstack/react-router'
|
||||
import { useConvexAuth, useQuery } from 'convex/react'
|
||||
import { Menu, Monitor, Moon, Sun } from 'lucide-react'
|
||||
import { useMemo, useRef } from 'react'
|
||||
import { api } from '../../convex/_generated/api'
|
||||
import { gravatarUrl } from '../lib/gravatar'
|
||||
import { getClawdHubSiteUrl, getOnlyCrabsSiteUrl, getSiteMode, getSiteName } from '../lib/site'
|
||||
import { getClawdHubSiteUrl, getSiteMode, getSiteName } from '../lib/site'
|
||||
import { applyTheme, useThemeMode } from '../lib/theme'
|
||||
import { startThemeTransition } from '../lib/theme-transition'
|
||||
import { useAuthStatus } from '../lib/useAuthStatus'
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
@@ -18,15 +17,13 @@ import {
|
||||
import { ToggleGroup, ToggleGroupItem } from './ui/toggle-group'
|
||||
|
||||
export default function Header() {
|
||||
const { isAuthenticated, isLoading } = useConvexAuth()
|
||||
const { isAuthenticated, isLoading, me } = useAuthStatus()
|
||||
const { signIn, signOut } = useAuthActions()
|
||||
const me = useQuery(api.users.me)
|
||||
const { mode, setMode } = useThemeMode()
|
||||
const toggleRef = useRef<HTMLDivElement | null>(null)
|
||||
const siteMode = getSiteMode()
|
||||
const siteName = useMemo(() => getSiteName(siteMode), [siteMode])
|
||||
const isSoulMode = siteMode === 'souls'
|
||||
const onlyCrabsUrl = getOnlyCrabsSiteUrl()
|
||||
const clawdHubUrl = getClawdHubSiteUrl()
|
||||
|
||||
const avatar = me?.image ?? (me?.email ? gravatarUrl(me.email) : undefined)
|
||||
@@ -50,18 +47,18 @@ export default function Header() {
|
||||
return (
|
||||
<header className="navbar">
|
||||
<div className="navbar-inner">
|
||||
<Link to="/" search={{ q: undefined, highlighted: undefined }} className="brand">
|
||||
<Link
|
||||
to="/"
|
||||
search={{ q: undefined, highlighted: undefined, search: undefined }}
|
||||
className="brand"
|
||||
>
|
||||
<span className="brand-mark">
|
||||
<img src="/clawd-logo.png" alt="" aria-hidden="true" />
|
||||
</span>
|
||||
<span className="brand-name">{siteName}</span>
|
||||
</Link>
|
||||
<nav className="nav-links">
|
||||
{isSoulMode ? (
|
||||
<a href={clawdHubUrl}>ClawdHub</a>
|
||||
) : (
|
||||
<a href={onlyCrabsUrl}>onlycrabs.ai</a>
|
||||
)}
|
||||
{isSoulMode ? <a href={clawdHubUrl}>ClawdHub</a> : null}
|
||||
<Link
|
||||
to={isSoulMode ? '/souls' : '/skills'}
|
||||
search={
|
||||
@@ -82,7 +79,7 @@ export default function Header() {
|
||||
Upload
|
||||
</Link>
|
||||
{isSoulMode ? null : <Link to="/import">Import</Link>}
|
||||
<Link to="/search" search={{ q: undefined, highlighted: undefined }}>
|
||||
<Link to="/" search={{ q: undefined, highlighted: undefined, search: true }}>
|
||||
Search
|
||||
</Link>
|
||||
{me ? <Link to="/stars">Stars</Link> : null}
|
||||
@@ -97,13 +94,11 @@ export default function Header() {
|
||||
</button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="end">
|
||||
<DropdownMenuItem asChild>
|
||||
{isSoulMode ? (
|
||||
{isSoulMode ? (
|
||||
<DropdownMenuItem asChild>
|
||||
<a href={clawdHubUrl}>ClawdHub</a>
|
||||
) : (
|
||||
<a href={onlyCrabsUrl}>onlycrabs.ai</a>
|
||||
)}
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuItem>
|
||||
) : null}
|
||||
<DropdownMenuItem asChild>
|
||||
<Link
|
||||
to={isSoulMode ? '/souls' : '/skills'}
|
||||
@@ -133,7 +128,7 @@ export default function Header() {
|
||||
</DropdownMenuItem>
|
||||
)}
|
||||
<DropdownMenuItem asChild>
|
||||
<Link to="/search" search={{ q: undefined, highlighted: undefined }}>
|
||||
<Link to="/" search={{ q: undefined, highlighted: undefined, search: true }}>
|
||||
Search
|
||||
</Link>
|
||||
</DropdownMenuItem>
|
||||
|
||||
@@ -8,11 +8,14 @@ type SkillCardProps = {
|
||||
chip?: string
|
||||
summaryFallback: string
|
||||
meta: ReactNode
|
||||
href?: string
|
||||
}
|
||||
|
||||
export function SkillCard({ skill, badge, chip, summaryFallback, meta }: SkillCardProps) {
|
||||
export function SkillCard({ skill, badge, chip, summaryFallback, meta, href }: SkillCardProps) {
|
||||
const link = href ?? `/skills/${skill.slug}`
|
||||
|
||||
return (
|
||||
<Link to="/skills/$slug" params={{ slug: skill.slug }} className="card skill-card">
|
||||
<Link to={link} className="card skill-card">
|
||||
{badge || chip ? (
|
||||
<div className="skill-card-tags">
|
||||
{badge ? <div className="tag">{badge}</div> : null}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { useNavigate } from '@tanstack/react-router'
|
||||
import type { ClawdisSkillMetadata, SkillInstallSpec } from 'clawdhub-schema'
|
||||
import { useAction, useConvexAuth, useMutation, useQuery } from 'convex/react'
|
||||
import { useAction, useMutation, useQuery } from 'convex/react'
|
||||
import { useEffect, useMemo, useState } from 'react'
|
||||
import ReactMarkdown from 'react-markdown'
|
||||
import remarkGfm from 'remark-gfm'
|
||||
import { api } from '../../convex/_generated/api'
|
||||
import type { Doc, Id } from '../../convex/_generated/dataModel'
|
||||
import { useAuthStatus } from '../lib/useAuthStatus'
|
||||
import { SkillDiffCard } from './SkillDiffCard'
|
||||
|
||||
type SkillDetailPageProps = {
|
||||
@@ -20,8 +21,7 @@ export function SkillDetailPage({
|
||||
redirectToCanonical,
|
||||
}: SkillDetailPageProps) {
|
||||
const navigate = useNavigate()
|
||||
const { isAuthenticated } = useConvexAuth()
|
||||
const me = useQuery(api.users.me)
|
||||
const { isAuthenticated, me } = useAuthStatus()
|
||||
const result = useQuery(api.skills.getBySlug, { slug })
|
||||
const toggleStar = useMutation(api.stars.toggle)
|
||||
const addComment = useMutation(api.comments.add)
|
||||
|
||||
@@ -418,7 +418,7 @@ function buildDiffOptions(viewMode: 'split' | 'inline'): DiffEditorProps['option
|
||||
|
||||
function applyMonacoTheme(monaco: NonNullable<ReturnType<typeof useMonaco>>) {
|
||||
const styles = getComputedStyle(document.documentElement)
|
||||
const surface = styles.getPropertyValue('--surface').trim() || '#ffffff'
|
||||
const surface = normalizeHex(styles.getPropertyValue('--surface').trim() || '#ffffff')
|
||||
const surfaceMuted = styles.getPropertyValue('--surface-muted').trim() || '#f6f1ec'
|
||||
const ink = styles.getPropertyValue('--ink').trim() || '#1d1a17'
|
||||
const inkSoft = styles.getPropertyValue('--ink-soft').trim() || '#4c463f'
|
||||
@@ -468,7 +468,7 @@ function applyMonacoTheme(monaco: NonNullable<ReturnType<typeof useMonaco>>) {
|
||||
}
|
||||
|
||||
function normalizeHex(value: string) {
|
||||
if (!value.startsWith('#')) return '#000000'
|
||||
if (!value.startsWith('#')) return value
|
||||
if (value.length === 4) {
|
||||
return `#${value[1]}${value[1]}${value[2]}${value[2]}${value[3]}${value[3]}`
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import { useAction, useConvexAuth, useMutation, useQuery } from 'convex/react'
|
||||
import { useAction, useMutation, useQuery } from 'convex/react'
|
||||
import { useEffect, useMemo, useRef, useState } from 'react'
|
||||
import ReactMarkdown from 'react-markdown'
|
||||
import remarkGfm from 'remark-gfm'
|
||||
import { api } from '../../convex/_generated/api'
|
||||
import type { Doc } from '../../convex/_generated/dataModel'
|
||||
import { useAuthStatus } from '../lib/useAuthStatus'
|
||||
|
||||
type SoulDetailPageProps = {
|
||||
slug: string
|
||||
}
|
||||
|
||||
export function SoulDetailPage({ slug }: SoulDetailPageProps) {
|
||||
const { isAuthenticated } = useConvexAuth()
|
||||
const me = useQuery(api.users.me)
|
||||
const { isAuthenticated, me } = useAuthStatus()
|
||||
const result = useQuery(api.souls.getBySlug, { slug })
|
||||
const toggleStar = useMutation(api.soulStars.toggle)
|
||||
const addComment = useMutation(api.soulComments.add)
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { useConvexAuth, useMutation } from 'convex/react'
|
||||
import { useMutation } from 'convex/react'
|
||||
import { useEffect, useRef } from 'react'
|
||||
import { api } from '../../convex/_generated/api'
|
||||
import { useAuthStatus } from '../lib/useAuthStatus'
|
||||
|
||||
export function UserBootstrap() {
|
||||
const { isAuthenticated, isLoading } = useConvexAuth()
|
||||
const { isAuthenticated, isLoading } = useAuthStatus()
|
||||
const ensureUser = useMutation(api.users.ensure)
|
||||
const didRun = useRef(false)
|
||||
|
||||
|
||||
+3
-3
@@ -35,7 +35,7 @@ describe('og helpers', () => {
|
||||
summary: 'Personal north star notes.',
|
||||
version: '0.1.0',
|
||||
})
|
||||
expect(meta.title).toBe('North Star — onlycrabs.ai')
|
||||
expect(meta.title).toBe('North Star — SoulHub')
|
||||
expect(meta.description).toBe('Personal north star notes.')
|
||||
expect(meta.url).toContain('/souls/north-star')
|
||||
expect(meta.owner).toBe('someone')
|
||||
@@ -57,8 +57,8 @@ describe('og helpers', () => {
|
||||
|
||||
it('uses soul defaults when owner and summary are missing', () => {
|
||||
const meta = buildSoulMeta({ slug: 'signal' })
|
||||
expect(meta.title).toBe('signal — onlycrabs.ai')
|
||||
expect(meta.description).toMatch(/onlycrabs\.ai — the home for SOUL.md/i)
|
||||
expect(meta.title).toBe('signal — SoulHub')
|
||||
expect(meta.description).toMatch(/SoulHub — the home for SOUL.md/i)
|
||||
expect(meta.url).toContain('/souls/signal')
|
||||
expect(meta.owner).toBeNull()
|
||||
expect(meta.image).toContain('slug=signal')
|
||||
|
||||
+3
-4
@@ -33,8 +33,7 @@ type SoulMeta = {
|
||||
}
|
||||
|
||||
const DEFAULT_DESCRIPTION = 'ClawdHub — a fast skill registry for agents, with vector search.'
|
||||
const DEFAULT_SOUL_DESCRIPTION =
|
||||
'onlycrabs.ai — the home for SOUL.md bundles and personal system lore.'
|
||||
const DEFAULT_SOUL_DESCRIPTION = 'SoulHub — the home for SOUL.md bundles and personal system lore.'
|
||||
const OG_SKILL_IMAGE_LAYOUT_VERSION = '5'
|
||||
const OG_SOUL_IMAGE_LAYOUT_VERSION = '1'
|
||||
|
||||
@@ -125,9 +124,9 @@ export function buildSoulMeta(source: SoulMetaSource): SoulMeta {
|
||||
const displayName = clean(source.displayName) || clean(source.slug)
|
||||
const summary = clean(source.summary)
|
||||
const version = clean(source.version)
|
||||
const title = `${displayName} — onlycrabs.ai`
|
||||
const title = `${displayName} — SoulHub`
|
||||
const description =
|
||||
summary || (owner ? `Soul by @${owner} on onlycrabs.ai.` : DEFAULT_SOUL_DESCRIPTION)
|
||||
summary || (owner ? `Soul by @${owner} on SoulHub.` : DEFAULT_SOUL_DESCRIPTION)
|
||||
const url = `${siteUrl}/souls/${source.slug}`
|
||||
const imageParams = new URLSearchParams()
|
||||
imageParams.set('v', OG_SOUL_IMAGE_LAYOUT_VERSION)
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
/* @vitest-environment node */
|
||||
|
||||
import { afterEach, describe, expect, it, vi } from 'vitest'
|
||||
|
||||
import {
|
||||
detectSiteMode,
|
||||
detectSiteModeFromUrl,
|
||||
getClawdHubSiteUrl,
|
||||
getOnlyCrabsHost,
|
||||
getOnlyCrabsSiteUrl,
|
||||
getSiteDescription,
|
||||
getSiteMode,
|
||||
getSiteName,
|
||||
getSiteUrlForMode,
|
||||
} from './site'
|
||||
|
||||
function withMetaEnv<T>(values: Record<string, string | undefined>, run: () => T): T {
|
||||
const env = import.meta.env as unknown as Record<string, unknown>
|
||||
const previous = new Map<string, unknown>()
|
||||
for (const [key, value] of Object.entries(values)) {
|
||||
previous.set(key, env[key])
|
||||
if (value === undefined) {
|
||||
delete env[key]
|
||||
} else {
|
||||
env[key] = value
|
||||
}
|
||||
}
|
||||
try {
|
||||
return run()
|
||||
} finally {
|
||||
for (const [key, value] of previous.entries()) {
|
||||
if (value === undefined) delete env[key]
|
||||
else env[key] = value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
afterEach(() => {
|
||||
vi.unstubAllGlobals()
|
||||
vi.unstubAllEnvs()
|
||||
})
|
||||
|
||||
describe('site helpers', () => {
|
||||
it('returns default and env configured site URLs', () => {
|
||||
expect(getClawdHubSiteUrl()).toBe('https://clawdhub.com')
|
||||
withMetaEnv({ VITE_SITE_URL: 'https://example.com' }, () => {
|
||||
expect(getClawdHubSiteUrl()).toBe('https://example.com')
|
||||
})
|
||||
})
|
||||
|
||||
it('picks SoulHub URL from explicit env', () => {
|
||||
withMetaEnv({ VITE_SOULHUB_SITE_URL: 'https://souls.example.com' }, () => {
|
||||
expect(getOnlyCrabsSiteUrl()).toBe('https://souls.example.com')
|
||||
})
|
||||
})
|
||||
|
||||
it('derives SoulHub URL from local VITE_SITE_URL', () => {
|
||||
withMetaEnv({ VITE_SITE_URL: 'http://localhost:3000' }, () => {
|
||||
expect(getOnlyCrabsSiteUrl()).toBe('http://localhost:3000')
|
||||
})
|
||||
withMetaEnv({ VITE_SITE_URL: 'http://127.0.0.1:3000' }, () => {
|
||||
expect(getOnlyCrabsSiteUrl()).toBe('http://127.0.0.1:3000')
|
||||
})
|
||||
withMetaEnv({ VITE_SITE_URL: 'http://0.0.0.0:3000' }, () => {
|
||||
expect(getOnlyCrabsSiteUrl()).toBe('http://0.0.0.0:3000')
|
||||
})
|
||||
})
|
||||
|
||||
it('falls back to default SoulHub URL for invalid VITE_SITE_URL', () => {
|
||||
withMetaEnv({ VITE_SITE_URL: 'not a url' }, () => {
|
||||
expect(getOnlyCrabsSiteUrl()).toBe('https://onlycrabs.ai')
|
||||
})
|
||||
})
|
||||
|
||||
it('detects site mode from host and URLs', () => {
|
||||
expect(detectSiteMode(null)).toBe('skills')
|
||||
|
||||
withMetaEnv({ VITE_SOULHUB_HOST: 'souls.example.com' }, () => {
|
||||
expect(getOnlyCrabsHost()).toBe('souls.example.com')
|
||||
expect(detectSiteMode('souls.example.com')).toBe('souls')
|
||||
expect(detectSiteMode('sub.souls.example.com')).toBe('souls')
|
||||
expect(detectSiteMode('clawdhub.com')).toBe('skills')
|
||||
|
||||
expect(detectSiteModeFromUrl('https://souls.example.com/x')).toBe('souls')
|
||||
expect(detectSiteModeFromUrl('souls.example.com')).toBe('souls')
|
||||
expect(detectSiteModeFromUrl('https://clawdhub.com')).toBe('skills')
|
||||
})
|
||||
})
|
||||
|
||||
it('detects site mode from window when available', () => {
|
||||
withMetaEnv({ VITE_SOULHUB_HOST: 'onlycrabs.ai' }, () => {
|
||||
vi.stubGlobal('window', { location: { hostname: 'onlycrabs.ai' } } as unknown as Window)
|
||||
expect(getSiteMode()).toBe('souls')
|
||||
})
|
||||
})
|
||||
|
||||
it('detects site mode from env on the server', () => {
|
||||
withMetaEnv({ VITE_SITE_MODE: 'souls', VITE_SOULHUB_HOST: 'onlycrabs.ai' }, () => {
|
||||
expect(getSiteMode()).toBe('souls')
|
||||
})
|
||||
withMetaEnv({ VITE_SITE_MODE: 'skills', VITE_SOULHUB_HOST: 'onlycrabs.ai' }, () => {
|
||||
expect(getSiteMode()).toBe('skills')
|
||||
})
|
||||
})
|
||||
|
||||
it('detects site mode from VITE_SOULHUB_SITE_URL and SITE_URL fallback', () => {
|
||||
withMetaEnv(
|
||||
{ VITE_SITE_MODE: undefined, VITE_SOULHUB_SITE_URL: 'https://onlycrabs.ai' },
|
||||
() => {
|
||||
expect(getSiteMode()).toBe('souls')
|
||||
},
|
||||
)
|
||||
|
||||
withMetaEnv({ VITE_SOULHUB_SITE_URL: undefined, VITE_SITE_URL: undefined }, () => {
|
||||
vi.stubEnv('SITE_URL', 'https://onlycrabs.ai')
|
||||
expect(getSiteMode()).toBe('souls')
|
||||
})
|
||||
})
|
||||
|
||||
it('derives site metadata from mode', () => {
|
||||
expect(getSiteName('skills')).toBe('ClawdHub')
|
||||
expect(getSiteName('souls')).toBe('SoulHub')
|
||||
|
||||
expect(getSiteDescription('skills')).toContain('ClawdHub')
|
||||
expect(getSiteDescription('souls')).toContain('SoulHub')
|
||||
|
||||
expect(getSiteUrlForMode('skills')).toBe('https://clawdhub.com')
|
||||
expect(getSiteUrlForMode('souls')).toBe('https://onlycrabs.ai')
|
||||
})
|
||||
})
|
||||
+2
-2
@@ -70,12 +70,12 @@ export function getSiteMode(): SiteMode {
|
||||
}
|
||||
|
||||
export function getSiteName(mode: SiteMode = getSiteMode()) {
|
||||
return mode === 'souls' ? 'onlycrabs.ai' : 'ClawdHub'
|
||||
return mode === 'souls' ? 'SoulHub' : 'ClawdHub'
|
||||
}
|
||||
|
||||
export function getSiteDescription(mode: SiteMode = getSiteMode()) {
|
||||
return mode === 'souls'
|
||||
? 'onlycrabs.ai — the home for SOUL.md bundles and personal system lore.'
|
||||
? 'SoulHub — the home for SOUL.md bundles and personal system lore.'
|
||||
: 'ClawdHub — a fast skill registry for agents, with vector search.'
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import { useQuery } from 'convex/react'
|
||||
import { api } from '../../convex/_generated/api'
|
||||
|
||||
export function useAuthStatus() {
|
||||
const me = useQuery(api.users.me)
|
||||
return {
|
||||
me,
|
||||
isLoading: me === undefined,
|
||||
isAuthenticated: Boolean(me),
|
||||
}
|
||||
}
|
||||
@@ -115,8 +115,8 @@ export interface FileRoutesByFullPath {
|
||||
'/skills/$slug': typeof SkillsSlugRoute
|
||||
'/souls/$slug': typeof SoulsSlugRoute
|
||||
'/u/$handle': typeof UHandleRoute
|
||||
'/skills': typeof SkillsIndexRoute
|
||||
'/souls': typeof SoulsIndexRoute
|
||||
'/skills/': typeof SkillsIndexRoute
|
||||
'/souls/': typeof SoulsIndexRoute
|
||||
}
|
||||
export interface FileRoutesByTo {
|
||||
'/': typeof IndexRoute
|
||||
@@ -169,8 +169,8 @@ export interface FileRouteTypes {
|
||||
| '/skills/$slug'
|
||||
| '/souls/$slug'
|
||||
| '/u/$handle'
|
||||
| '/skills'
|
||||
| '/souls'
|
||||
| '/skills/'
|
||||
| '/souls/'
|
||||
fileRoutesByTo: FileRoutesByTo
|
||||
to:
|
||||
| '/'
|
||||
@@ -286,14 +286,14 @@ declare module '@tanstack/react-router' {
|
||||
'/souls/': {
|
||||
id: '/souls/'
|
||||
path: '/souls'
|
||||
fullPath: '/souls'
|
||||
fullPath: '/souls/'
|
||||
preLoaderRoute: typeof SoulsIndexRouteImport
|
||||
parentRoute: typeof rootRouteImport
|
||||
}
|
||||
'/skills/': {
|
||||
id: '/skills/'
|
||||
path: '/skills'
|
||||
fullPath: '/skills'
|
||||
fullPath: '/skills/'
|
||||
preLoaderRoute: typeof SkillsIndexRouteImport
|
||||
parentRoute: typeof rootRouteImport
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import { useAuthActions } from '@convex-dev/auth/react'
|
||||
import { createFileRoute } from '@tanstack/react-router'
|
||||
import { useConvexAuth, useMutation, useQuery } from 'convex/react'
|
||||
import { useMutation } from 'convex/react'
|
||||
import { useEffect, useMemo, useRef, useState } from 'react'
|
||||
import { api } from '../../../convex/_generated/api'
|
||||
import { useAuthStatus } from '../../lib/useAuthStatus'
|
||||
|
||||
export const Route = createFileRoute('/cli/auth')({
|
||||
component: CliAuth,
|
||||
})
|
||||
|
||||
function CliAuth() {
|
||||
const { isAuthenticated, isLoading } = useConvexAuth()
|
||||
const { isAuthenticated, isLoading, me } = useAuthStatus()
|
||||
const { signIn } = useAuthActions()
|
||||
const me = useQuery(api.users.me)
|
||||
const createToken = useMutation(api.tokens.create)
|
||||
|
||||
const search = Route.useSearch() as {
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { createFileRoute, useNavigate } from '@tanstack/react-router'
|
||||
import { useAction, useConvexAuth } from 'convex/react'
|
||||
import { useAction } from 'convex/react'
|
||||
import { useMemo, useState } from 'react'
|
||||
import { api } from '../../convex/_generated/api'
|
||||
import { formatBytes } from '../lib/uploadUtils'
|
||||
import { useAuthStatus } from '../lib/useAuthStatus'
|
||||
|
||||
export const Route = createFileRoute('/import')({
|
||||
component: ImportGitHub,
|
||||
@@ -37,7 +38,7 @@ type CandidatePreview = {
|
||||
}
|
||||
|
||||
function ImportGitHub() {
|
||||
const { isAuthenticated, isLoading } = useConvexAuth()
|
||||
const { isAuthenticated, isLoading } = useAuthStatus()
|
||||
const previewImport = useAction(api.githubImport.previewGitHubImport)
|
||||
const previewCandidate = useAction(api.githubImport.previewGitHubImportCandidate)
|
||||
const importSkill = useAction(api.githubImport.importGitHubSkill)
|
||||
|
||||
+81
-212
@@ -11,7 +11,14 @@ import { getSiteMode } from '../lib/site'
|
||||
export const Route = createFileRoute('/')({
|
||||
validateSearch: (search) => ({
|
||||
q: typeof search.q === 'string' && search.q.trim() ? search.q : undefined,
|
||||
highlighted: search.highlighted === '1' || search.highlighted === 'true' ? true : undefined,
|
||||
highlighted:
|
||||
search.highlighted === '1' || search.highlighted === 'true' || search.highlighted === true
|
||||
? true
|
||||
: undefined,
|
||||
search:
|
||||
search.search === '1' || search.search === 'true' || search.search === true
|
||||
? true
|
||||
: undefined,
|
||||
}),
|
||||
component: Home,
|
||||
})
|
||||
@@ -22,75 +29,13 @@ function Home() {
|
||||
}
|
||||
|
||||
function SkillsHome() {
|
||||
const navigate = Route.useNavigate()
|
||||
const search = Route.useSearch()
|
||||
const searchSkills = useAction(api.search.searchSkills)
|
||||
const highlighted =
|
||||
(useQuery(api.skills.list, { batch: 'highlighted', limit: 6 }) as Doc<'skills'>[]) ?? []
|
||||
const latest = (useQuery(api.skills.list, { limit: 12 }) as Doc<'skills'>[]) ?? []
|
||||
const [query, setQuery] = useState(search.q ?? '')
|
||||
const [highlightedOnly, setHighlightedOnly] = useState(search.highlighted ?? false)
|
||||
const [results, setResults] = useState<
|
||||
Array<{ skill: Doc<'skills'>; version: Doc<'skillVersions'> | null; score: number }>
|
||||
>([])
|
||||
const [isSearching, setIsSearching] = useState(false)
|
||||
const [searchMode, setSearchMode] = useState(Boolean(search.q || search.highlighted))
|
||||
const searchRequest = useRef(0)
|
||||
const inputRef = useRef<HTMLInputElement | null>(null)
|
||||
const trimmedQuery = useMemo(() => query.trim(), [query])
|
||||
const hasQuery = trimmedQuery.length > 0
|
||||
|
||||
useEffect(() => {
|
||||
setQuery(search.q ?? '')
|
||||
setHighlightedOnly(search.highlighted ?? false)
|
||||
if (search.q || search.highlighted) {
|
||||
setSearchMode(true)
|
||||
}
|
||||
}, [search.highlighted, search.q])
|
||||
|
||||
useEffect(() => {
|
||||
void navigate({
|
||||
search: () => ({
|
||||
q: trimmedQuery || undefined,
|
||||
highlighted: highlightedOnly ? true : undefined,
|
||||
}),
|
||||
replace: true,
|
||||
})
|
||||
}, [highlightedOnly, navigate, trimmedQuery])
|
||||
|
||||
useEffect(() => {
|
||||
if (!trimmedQuery) {
|
||||
setResults([])
|
||||
setIsSearching(false)
|
||||
return
|
||||
}
|
||||
searchRequest.current += 1
|
||||
const requestId = searchRequest.current
|
||||
setIsSearching(true)
|
||||
const handle = window.setTimeout(() => {
|
||||
void (async () => {
|
||||
try {
|
||||
const data = (await searchSkills({ query: trimmedQuery, highlightedOnly })) as Array<{
|
||||
skill: Doc<'skills'>
|
||||
version: Doc<'skillVersions'> | null
|
||||
score: number
|
||||
}>
|
||||
if (requestId === searchRequest.current) {
|
||||
setResults(data)
|
||||
}
|
||||
} finally {
|
||||
if (requestId === searchRequest.current) {
|
||||
setIsSearching(false)
|
||||
}
|
||||
}
|
||||
})()
|
||||
}, 220)
|
||||
return () => window.clearTimeout(handle)
|
||||
}, [highlightedOnly, searchSkills, trimmedQuery])
|
||||
|
||||
return (
|
||||
<main>
|
||||
<section className={`hero${searchMode ? ' search-mode' : ''}`}>
|
||||
<section className="hero">
|
||||
<div className="hero-inner">
|
||||
<div className="hero-copy fade-up" data-delay="1">
|
||||
<span className="hero-badge">Lobster-light. Agent-right.</span>
|
||||
@@ -103,158 +48,73 @@ function SkillsHome() {
|
||||
<Link to="/upload" search={{ updateSlug: undefined }} className="btn btn-primary">
|
||||
Publish a skill
|
||||
</Link>
|
||||
<Link to="/search" search={{ q: undefined, highlighted: undefined }} className="btn">
|
||||
Explore search
|
||||
<Link to="/skills" className="btn">
|
||||
Browse skills
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
<div className="hero-card hero-search-card fade-up" data-delay="2">
|
||||
<form
|
||||
className="search-bar"
|
||||
onSubmit={(event) => {
|
||||
event.preventDefault()
|
||||
if (!searchMode) setSearchMode(true)
|
||||
inputRef.current?.focus()
|
||||
}}
|
||||
>
|
||||
<span className="mono">/</span>
|
||||
<input
|
||||
ref={inputRef}
|
||||
className="search-input"
|
||||
placeholder="Search skills, tags, or capabilities"
|
||||
value={query}
|
||||
onChange={(event) => setQuery(event.target.value)}
|
||||
onFocus={() => setSearchMode(true)}
|
||||
onKeyDown={(event) => {
|
||||
if (event.key === 'Escape' && !trimmedQuery) {
|
||||
setSearchMode(false)
|
||||
inputRef.current?.blur()
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<button
|
||||
className="search-filter-button"
|
||||
type="button"
|
||||
aria-pressed={highlightedOnly}
|
||||
onClick={() => {
|
||||
setHighlightedOnly((value) => !value)
|
||||
setSearchMode(true)
|
||||
}}
|
||||
>
|
||||
Highlighted
|
||||
</button>
|
||||
</form>
|
||||
{!searchMode ? (
|
||||
<div className="hero-install" style={{ marginTop: 18 }}>
|
||||
<div className="stat">Search skills. Versioned, rollback-ready.</div>
|
||||
<InstallSwitcher exampleSlug="sonoscli" />
|
||||
</div>
|
||||
) : null}
|
||||
<div className="hero-install" style={{ marginTop: 18 }}>
|
||||
<div className="stat">Search skills. Versioned, rollback-ready.</div>
|
||||
<InstallSwitcher exampleSlug="sonoscli" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{searchMode ? (
|
||||
<section className="section">
|
||||
<h2 className="section-title">Search results</h2>
|
||||
<p className="section-subtitle">
|
||||
{isSearching ? 'Searching now.' : 'Instant results as you type.'}
|
||||
</p>
|
||||
<div className="grid">
|
||||
{!hasQuery ? (
|
||||
<div className="card">Start typing to search.</div>
|
||||
) : results.length === 0 ? (
|
||||
<div className="card">No results yet. Try a different prompt.</div>
|
||||
) : (
|
||||
results.map((result) => (
|
||||
<Link
|
||||
key={result.skill._id}
|
||||
to="/skills/$slug"
|
||||
params={{ slug: result.skill.slug }}
|
||||
className="card"
|
||||
>
|
||||
<div className="tag">Score {(result.score ?? 0).toFixed(2)}</div>
|
||||
<h3 className="section-title" style={{ fontSize: '1.2rem', margin: 0 }}>
|
||||
{result.skill.displayName}
|
||||
</h3>
|
||||
<p className="section-subtitle" style={{ margin: 0 }}>
|
||||
{result.skill.summary ?? 'Skill pack'}
|
||||
</p>
|
||||
{result.skill.batch === 'highlighted' ? (
|
||||
<div className="tag">Highlighted</div>
|
||||
) : null}
|
||||
</Link>
|
||||
))
|
||||
)}
|
||||
</div>
|
||||
</section>
|
||||
) : (
|
||||
<>
|
||||
<section className="section">
|
||||
<h2 className="section-title">Highlighted batch</h2>
|
||||
<p className="section-subtitle">Curated signal — highlighted for quick trust.</p>
|
||||
<div className="grid">
|
||||
{highlighted.length === 0 ? (
|
||||
<div className="card">No highlighted skills yet.</div>
|
||||
) : (
|
||||
highlighted.map((skill) => (
|
||||
<SkillCard
|
||||
key={skill._id}
|
||||
skill={skill}
|
||||
badge="Highlighted"
|
||||
summaryFallback="A fresh skill bundle."
|
||||
meta={
|
||||
<div className="stat">
|
||||
⭐ {skill.stats.stars} · ⤓ {skill.stats.downloads} · ⤒{' '}
|
||||
{skill.stats.installsAllTime ?? 0}
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
))
|
||||
)}
|
||||
</div>
|
||||
</section>
|
||||
<section className="section">
|
||||
<h2 className="section-title">Highlighted batch</h2>
|
||||
<p className="section-subtitle">Curated signal — highlighted for quick trust.</p>
|
||||
<div className="grid">
|
||||
{highlighted.length === 0 ? (
|
||||
<div className="card">No highlighted skills yet.</div>
|
||||
) : (
|
||||
highlighted.map((skill) => (
|
||||
<SkillCard
|
||||
key={skill._id}
|
||||
skill={skill}
|
||||
badge="Highlighted"
|
||||
summaryFallback="A fresh skill bundle."
|
||||
meta={
|
||||
<div className="stat">
|
||||
⭐ {skill.stats.stars} · ⤓ {skill.stats.downloads} · ⤒{' '}
|
||||
{skill.stats.installsAllTime ?? 0}
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
))
|
||||
)}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="section">
|
||||
<h2 className="section-title">Latest drops</h2>
|
||||
<p className="section-subtitle">Newest uploads across the registry.</p>
|
||||
<div className="grid">
|
||||
{latest.length === 0 ? (
|
||||
<div className="card">No skills yet. Be the first.</div>
|
||||
) : (
|
||||
latest.map((skill) => (
|
||||
<SkillCard
|
||||
key={skill._id}
|
||||
skill={skill}
|
||||
summaryFallback="Agent-ready skill pack."
|
||||
meta={
|
||||
<div className="stat">
|
||||
{skill.stats.versions} versions · ⤓ {skill.stats.downloads} · ⤒{' '}
|
||||
{skill.stats.installsAllTime ?? 0}
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
))
|
||||
)}
|
||||
</div>
|
||||
<div className="section-cta">
|
||||
<Link
|
||||
to="/skills"
|
||||
search={{
|
||||
q: undefined,
|
||||
sort: undefined,
|
||||
dir: undefined,
|
||||
highlighted: undefined,
|
||||
view: undefined,
|
||||
}}
|
||||
className="btn"
|
||||
>
|
||||
See all skills
|
||||
</Link>
|
||||
</div>
|
||||
</section>
|
||||
</>
|
||||
)}
|
||||
<section className="section">
|
||||
<h2 className="section-title">Latest drops</h2>
|
||||
<p className="section-subtitle">Newest uploads across the registry.</p>
|
||||
<div className="grid">
|
||||
{latest.length === 0 ? (
|
||||
<div className="card">No skills yet. Be the first.</div>
|
||||
) : (
|
||||
latest.map((skill) => (
|
||||
<SkillCard
|
||||
key={skill._id}
|
||||
skill={skill}
|
||||
summaryFallback="Agent-ready skill pack."
|
||||
meta={
|
||||
<div className="stat">
|
||||
{skill.stats.versions} versions · ⤓ {skill.stats.downloads} · ⤒{' '}
|
||||
{skill.stats.installsAllTime ?? 0}
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
))
|
||||
)}
|
||||
</div>
|
||||
<div className="section-cta">
|
||||
<Link to="/skills" className="btn">
|
||||
See all skills
|
||||
</Link>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
)
|
||||
}
|
||||
@@ -270,7 +130,7 @@ function OnlyCrabsHome() {
|
||||
Array<{ soul: Doc<'souls'>; version: Doc<'soulVersions'> | null; score: number }>
|
||||
>([])
|
||||
const [isSearching, setIsSearching] = useState(false)
|
||||
const [searchMode, setSearchMode] = useState(Boolean(search.q))
|
||||
const [searchMode, setSearchMode] = useState(Boolean(search.q || search.search))
|
||||
const searchRequest = useRef(0)
|
||||
const seedEnsuredRef = useRef(false)
|
||||
const inputRef = useRef<HTMLInputElement | null>(null)
|
||||
@@ -279,10 +139,12 @@ function OnlyCrabsHome() {
|
||||
|
||||
useEffect(() => {
|
||||
setQuery(search.q ?? '')
|
||||
if (search.q) {
|
||||
if (search.q || search.search) {
|
||||
setSearchMode(true)
|
||||
} else {
|
||||
setSearchMode(false)
|
||||
}
|
||||
}, [search.q])
|
||||
}, [search.q, search.search])
|
||||
|
||||
useEffect(() => {
|
||||
if (seedEnsuredRef.current) return
|
||||
@@ -295,10 +157,17 @@ function OnlyCrabsHome() {
|
||||
search: () => ({
|
||||
q: trimmedQuery || undefined,
|
||||
highlighted: undefined,
|
||||
search: searchMode && !trimmedQuery ? true : undefined,
|
||||
}),
|
||||
replace: true,
|
||||
})
|
||||
}, [navigate, trimmedQuery])
|
||||
}, [navigate, searchMode, trimmedQuery])
|
||||
|
||||
useEffect(() => {
|
||||
if (searchMode && inputRef.current) {
|
||||
inputRef.current.focus()
|
||||
}
|
||||
}, [searchMode])
|
||||
|
||||
useEffect(() => {
|
||||
if (!trimmedQuery) {
|
||||
@@ -336,7 +205,7 @@ function OnlyCrabsHome() {
|
||||
<div className="hero-inner">
|
||||
<div className="hero-copy fade-up" data-delay="1">
|
||||
<span className="hero-badge">SOUL.md, shared.</span>
|
||||
<h1 className="hero-title">onlycrabs.ai, where system lore lives.</h1>
|
||||
<h1 className="hero-title">SoulHub, where system lore lives.</h1>
|
||||
<p className="hero-subtitle">
|
||||
Share SOUL.md bundles, version them like docs, and keep personal system lore in one
|
||||
public place.
|
||||
|
||||
+9
-20
@@ -1,29 +1,18 @@
|
||||
import { createFileRoute } from '@tanstack/react-router'
|
||||
import { useEffect } from 'react'
|
||||
import { createFileRoute, redirect } from '@tanstack/react-router'
|
||||
|
||||
export const Route = createFileRoute('/search')({
|
||||
validateSearch: (search) => ({
|
||||
q: typeof search.q === 'string' && search.q.trim() ? search.q : undefined,
|
||||
highlighted: search.highlighted === '1' || search.highlighted === 'true' ? true : undefined,
|
||||
}),
|
||||
component: SearchRedirect,
|
||||
})
|
||||
|
||||
function SearchRedirect() {
|
||||
const navigate = Route.useNavigate()
|
||||
const search = Route.useSearch()
|
||||
|
||||
useEffect(() => {
|
||||
void navigate({
|
||||
to: '/',
|
||||
search: (prev) => ({
|
||||
...prev,
|
||||
beforeLoad: ({ search }) => {
|
||||
throw redirect({
|
||||
to: '/skills',
|
||||
search: {
|
||||
q: search.q || undefined,
|
||||
highlighted: search.highlighted ? true : undefined,
|
||||
}),
|
||||
highlighted: search.highlighted || undefined,
|
||||
},
|
||||
replace: true,
|
||||
})
|
||||
}, [navigate, search.highlighted, search.q])
|
||||
|
||||
return null
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
+172
-34
@@ -1,11 +1,12 @@
|
||||
import { createFileRoute, Link } from '@tanstack/react-router'
|
||||
import { useQuery } from 'convex/react'
|
||||
import { useEffect, useMemo, useState } from 'react'
|
||||
import { useAction, useQuery } from 'convex/react'
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import { api } from '../../../convex/_generated/api'
|
||||
import type { Doc } from '../../../convex/_generated/dataModel'
|
||||
import { SkillCard } from '../../components/SkillCard'
|
||||
|
||||
const sortKeys = ['newest', 'downloads', 'installs', 'stars', 'name', 'updated'] as const
|
||||
const pageSize = 50
|
||||
type SortKey = (typeof sortKeys)[number]
|
||||
type SortDir = 'asc' | 'desc'
|
||||
|
||||
@@ -20,20 +21,41 @@ function parseDir(value: unknown, sort: SortKey): SortDir {
|
||||
return sort === 'name' ? 'asc' : 'desc'
|
||||
}
|
||||
|
||||
type SkillListEntry = {
|
||||
skill: Doc<'skills'>
|
||||
latestVersion: Doc<'skillVersions'> | null
|
||||
ownerHandle?: string | null
|
||||
}
|
||||
|
||||
type SkillSearchEntry = {
|
||||
skill: Doc<'skills'>
|
||||
version: Doc<'skillVersions'> | null
|
||||
score: number
|
||||
ownerHandle?: string | null
|
||||
}
|
||||
|
||||
function buildSkillHref(skill: Doc<'skills'>, ownerHandle?: string | null) {
|
||||
const owner = ownerHandle ?? 'unknown'
|
||||
return `/${encodeURIComponent(owner)}/${encodeURIComponent(skill.slug)}`
|
||||
}
|
||||
|
||||
export const Route = createFileRoute('/skills/')({
|
||||
validateSearch: (search) => {
|
||||
return {
|
||||
q: typeof search.q === 'string' && search.q.trim() ? search.q : undefined,
|
||||
sort: typeof search.sort === 'string' ? parseSort(search.sort) : undefined,
|
||||
dir: search.dir === 'asc' || search.dir === 'desc' ? search.dir : undefined,
|
||||
highlighted: search.highlighted === '1' || search.highlighted === 'true' ? true : undefined,
|
||||
highlighted:
|
||||
search.highlighted === '1' || search.highlighted === 'true' || search.highlighted === true
|
||||
? true
|
||||
: undefined,
|
||||
view: search.view === 'cards' || search.view === 'list' ? search.view : undefined,
|
||||
}
|
||||
},
|
||||
component: SkillsIndex,
|
||||
})
|
||||
|
||||
function SkillsIndex() {
|
||||
export function SkillsIndex() {
|
||||
const navigate = Route.useNavigate()
|
||||
const search = Route.useSearch()
|
||||
const sort = search.sort ?? 'newest'
|
||||
@@ -41,29 +63,100 @@ function SkillsIndex() {
|
||||
const view = search.view ?? 'list'
|
||||
const highlightedOnly = search.highlighted ?? false
|
||||
const [query, setQuery] = useState(search.q ?? '')
|
||||
const searchSkills = useAction(api.search.searchSkills)
|
||||
const [pages, setPages] = useState<Array<SkillListEntry>>([])
|
||||
const [cursor, setCursor] = useState<string | null>(null)
|
||||
const [nextCursor, setNextCursor] = useState<string | null>(null)
|
||||
const [searchResults, setSearchResults] = useState<Array<SkillSearchEntry>>([])
|
||||
const [searchLimit, setSearchLimit] = useState(pageSize)
|
||||
const [isSearching, setIsSearching] = useState(false)
|
||||
const searchRequest = useRef(0)
|
||||
const loadMoreRef = useRef<HTMLDivElement | null>(null)
|
||||
|
||||
const items = useQuery(api.skills.listWithLatest, { limit: 500 }) as
|
||||
| Array<{ skill: Doc<'skills'>; latestVersion: Doc<'skillVersions'> | null }>
|
||||
const trimmedQuery = useMemo(() => query.trim(), [query])
|
||||
const hasQuery = trimmedQuery.length > 0
|
||||
const searchKey = trimmedQuery ? `${trimmedQuery}::${highlightedOnly ? '1' : '0'}` : ''
|
||||
|
||||
const listPage = useQuery(
|
||||
api.skills.listPublicPage,
|
||||
hasQuery ? 'skip' : { cursor: cursor ?? undefined, limit: pageSize },
|
||||
) as
|
||||
| {
|
||||
items: Array<SkillListEntry>
|
||||
nextCursor: string | null
|
||||
}
|
||||
| undefined
|
||||
const isLoadingSkills = items === undefined
|
||||
const isLoadingList = !hasQuery && pages.length === 0 && listPage === undefined
|
||||
|
||||
useEffect(() => {
|
||||
setQuery(search.q ?? '')
|
||||
}, [search.q])
|
||||
|
||||
const filtered = useMemo(() => {
|
||||
const value = query.trim().toLowerCase()
|
||||
const all = (items ?? []).filter((entry) =>
|
||||
highlightedOnly ? entry.skill.batch === 'highlighted' : true,
|
||||
)
|
||||
if (!value) return all
|
||||
return all.filter((entry) => {
|
||||
const skill = entry.skill
|
||||
if (skill.slug.toLowerCase().includes(value)) return true
|
||||
if (skill.displayName.toLowerCase().includes(value)) return true
|
||||
return (skill.summary ?? '').toLowerCase().includes(value)
|
||||
})
|
||||
}, [highlightedOnly, query, items])
|
||||
useEffect(() => {
|
||||
if (hasQuery) return
|
||||
setPages([])
|
||||
setCursor(null)
|
||||
setNextCursor(null)
|
||||
}, [hasQuery])
|
||||
|
||||
useEffect(() => {
|
||||
if (hasQuery || !listPage) return
|
||||
setNextCursor(listPage.nextCursor)
|
||||
setPages((prev) => (cursor ? [...prev, ...listPage.items] : listPage.items))
|
||||
}, [cursor, hasQuery, listPage])
|
||||
|
||||
useEffect(() => {
|
||||
if (!searchKey) {
|
||||
setSearchResults([])
|
||||
setIsSearching(false)
|
||||
return
|
||||
}
|
||||
setSearchResults([])
|
||||
setSearchLimit(pageSize)
|
||||
}, [searchKey])
|
||||
|
||||
useEffect(() => {
|
||||
if (!hasQuery) return
|
||||
searchRequest.current += 1
|
||||
const requestId = searchRequest.current
|
||||
setIsSearching(true)
|
||||
const handle = window.setTimeout(() => {
|
||||
void (async () => {
|
||||
try {
|
||||
const data = (await searchSkills({
|
||||
query: trimmedQuery,
|
||||
highlightedOnly,
|
||||
limit: searchLimit,
|
||||
})) as Array<SkillSearchEntry>
|
||||
if (requestId === searchRequest.current) {
|
||||
setSearchResults(data)
|
||||
}
|
||||
} finally {
|
||||
if (requestId === searchRequest.current) {
|
||||
setIsSearching(false)
|
||||
}
|
||||
}
|
||||
})()
|
||||
}, 220)
|
||||
return () => window.clearTimeout(handle)
|
||||
}, [hasQuery, highlightedOnly, searchLimit, searchSkills, trimmedQuery])
|
||||
|
||||
const baseItems = useMemo(() => {
|
||||
if (hasQuery) {
|
||||
return searchResults.map((entry) => ({
|
||||
skill: entry.skill,
|
||||
latestVersion: entry.version,
|
||||
ownerHandle: entry.ownerHandle ?? null,
|
||||
}))
|
||||
}
|
||||
return pages
|
||||
}, [hasQuery, pages, searchResults])
|
||||
|
||||
const filtered = useMemo(
|
||||
() =>
|
||||
baseItems.filter((entry) => (highlightedOnly ? entry.skill.batch === 'highlighted' : true)),
|
||||
[baseItems, highlightedOnly],
|
||||
)
|
||||
|
||||
const sorted = useMemo(() => {
|
||||
const multiplier = dir === 'asc' ? 1 : -1
|
||||
@@ -93,10 +186,39 @@ function SkillsIndex() {
|
||||
return results
|
||||
}, [dir, filtered, sort])
|
||||
|
||||
const showing = sorted.length
|
||||
const total = items?.filter((entry) =>
|
||||
highlightedOnly ? entry.skill.batch === 'highlighted' : true,
|
||||
).length
|
||||
const isLoadingSkills = hasQuery ? isSearching && searchResults.length === 0 : isLoadingList
|
||||
const canLoadMore = hasQuery
|
||||
? !isSearching && searchResults.length === searchLimit && searchResults.length > 0
|
||||
: nextCursor !== null
|
||||
const isLoadingMore = hasQuery
|
||||
? isSearching && searchResults.length > 0
|
||||
: listPage === undefined && pages.length > 0
|
||||
const canAutoLoad = typeof IntersectionObserver !== 'undefined'
|
||||
|
||||
const loadMore = useCallback(() => {
|
||||
if (isLoadingMore || !canLoadMore) return
|
||||
if (hasQuery) {
|
||||
setSearchLimit((value) => value + pageSize)
|
||||
} else if (nextCursor) {
|
||||
setCursor(nextCursor)
|
||||
}
|
||||
}, [canLoadMore, hasQuery, isLoadingMore, nextCursor])
|
||||
|
||||
useEffect(() => {
|
||||
if (!canLoadMore || typeof IntersectionObserver === 'undefined') return
|
||||
const target = loadMoreRef.current
|
||||
if (!target) return
|
||||
const observer = new IntersectionObserver(
|
||||
(entries) => {
|
||||
if (entries.some((entry) => entry.isIntersecting)) {
|
||||
loadMore()
|
||||
}
|
||||
},
|
||||
{ rootMargin: '200px' },
|
||||
)
|
||||
observer.observe(target)
|
||||
return () => observer.disconnect()
|
||||
}, [canLoadMore, loadMore])
|
||||
|
||||
return (
|
||||
<main className="section">
|
||||
@@ -108,9 +230,7 @@ function SkillsIndex() {
|
||||
<p className="section-subtitle" style={{ marginBottom: 0 }}>
|
||||
{isLoadingSkills
|
||||
? 'Loading skills…'
|
||||
: `${showing}${typeof total === 'number' ? ` of ${total}` : ''} skills${
|
||||
highlightedOnly ? ' (highlighted)' : ''
|
||||
}.`}
|
||||
: `Browse the skill library${highlightedOnly ? ' (highlighted)' : ''}.`}
|
||||
</p>
|
||||
</div>
|
||||
<div className="skills-toolbar">
|
||||
@@ -209,17 +329,19 @@ function SkillsIndex() {
|
||||
<div className="card">
|
||||
<div className="loading-indicator">Loading skills…</div>
|
||||
</div>
|
||||
) : showing === 0 ? (
|
||||
) : sorted.length === 0 ? (
|
||||
<div className="card">No skills match that filter.</div>
|
||||
) : view === 'cards' ? (
|
||||
<div className="grid">
|
||||
{sorted.map((entry) => {
|
||||
const skill = entry.skill
|
||||
const isPlugin = Boolean(entry.latestVersion?.parsed?.clawdis?.nix?.plugin)
|
||||
const skillHref = buildSkillHref(skill, entry.ownerHandle)
|
||||
return (
|
||||
<SkillCard
|
||||
key={skill._id}
|
||||
skill={skill}
|
||||
href={skillHref}
|
||||
badge={skill.batch === 'highlighted' ? 'Highlighted' : undefined}
|
||||
chip={isPlugin ? 'Plugin bundle (nix)' : undefined}
|
||||
summaryFallback="Agent-ready skill pack."
|
||||
@@ -238,13 +360,9 @@ function SkillsIndex() {
|
||||
{sorted.map((entry) => {
|
||||
const skill = entry.skill
|
||||
const isPlugin = Boolean(entry.latestVersion?.parsed?.clawdis?.nix?.plugin)
|
||||
const skillHref = buildSkillHref(skill, entry.ownerHandle)
|
||||
return (
|
||||
<Link
|
||||
key={skill._id}
|
||||
className="skills-row"
|
||||
to="/skills/$slug"
|
||||
params={{ slug: skill.slug }}
|
||||
>
|
||||
<Link key={skill._id} className="skills-row" to={skillHref}>
|
||||
<div className="skills-row-main">
|
||||
<div className="skills-row-title">
|
||||
<span>{skill.displayName}</span>
|
||||
@@ -276,6 +394,26 @@ function SkillsIndex() {
|
||||
})}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{canLoadMore ? (
|
||||
<div
|
||||
ref={canAutoLoad ? loadMoreRef : null}
|
||||
className="card"
|
||||
style={{ marginTop: 16, display: 'flex', justifyContent: 'center' }}
|
||||
>
|
||||
{canAutoLoad ? (
|
||||
isLoadingMore ? (
|
||||
'Loading more…'
|
||||
) : (
|
||||
'Scroll to load more'
|
||||
)
|
||||
) : (
|
||||
<button className="btn" type="button" onClick={loadMore} disabled={isLoadingMore}>
|
||||
{isLoadingMore ? 'Loading…' : 'Load more'}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
) : null}
|
||||
</main>
|
||||
)
|
||||
}
|
||||
|
||||
+26
-7
@@ -1,5 +1,5 @@
|
||||
import { createFileRoute, Link } from '@tanstack/react-router'
|
||||
import { useQuery } from 'convex/react'
|
||||
import { useMutation, useQuery } from 'convex/react'
|
||||
import { api } from '../../convex/_generated/api'
|
||||
import type { Doc } from '../../convex/_generated/dataModel'
|
||||
|
||||
@@ -14,6 +14,8 @@ function Stars() {
|
||||
| Doc<'skills'>[]
|
||||
| undefined) ?? []
|
||||
|
||||
const toggleStar = useMutation(api.stars.toggle)
|
||||
|
||||
if (!me) {
|
||||
return (
|
||||
<main className="section">
|
||||
@@ -31,12 +33,29 @@ function Stars() {
|
||||
<div className="card">No stars yet.</div>
|
||||
) : (
|
||||
skills.map((skill) => (
|
||||
<Link key={skill._id} to="/skills/$slug" params={{ slug: skill.slug }} className="card">
|
||||
<h3 className="section-title" style={{ fontSize: '1.2rem', margin: 0 }}>
|
||||
{skill.displayName}
|
||||
</h3>
|
||||
<div className="stat">⭐ {skill.stats.stars}</div>
|
||||
</Link>
|
||||
<div key={skill._id} className="card skill-card">
|
||||
<Link to="/skills/$slug" params={{ slug: skill.slug }}>
|
||||
<h3 className="skill-card-title">{skill.displayName}</h3>
|
||||
</Link>
|
||||
<div className="skill-card-footer skill-card-footer-inline">
|
||||
<span className="stat">⭐ {skill.stats.stars}</span>
|
||||
<button
|
||||
className="star-toggle is-active"
|
||||
type="button"
|
||||
onClick={async () => {
|
||||
try {
|
||||
await toggleStar({ skillId: skill._id })
|
||||
} catch (error) {
|
||||
console.error('Failed to unstar skill:', error)
|
||||
window.alert('Unable to unstar this skill. Please try again.')
|
||||
}
|
||||
}}
|
||||
aria-label={`Unstar ${skill.displayName}`}
|
||||
>
|
||||
<span aria-hidden="true">★</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
))
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { createFileRoute, useNavigate, useSearch } from '@tanstack/react-router'
|
||||
import { useAction, useConvexAuth, useMutation, useQuery } from 'convex/react'
|
||||
import { useAction, useMutation, useQuery } from 'convex/react'
|
||||
import { useEffect, useMemo, useRef, useState } from 'react'
|
||||
import semver from 'semver'
|
||||
import { api } from '../../convex/_generated/api'
|
||||
import { getSiteMode } from '../lib/site'
|
||||
import { expandFiles } from '../lib/uploadFiles'
|
||||
import { useAuthStatus } from '../lib/useAuthStatus'
|
||||
import {
|
||||
formatBytes,
|
||||
formatPublishError,
|
||||
@@ -24,7 +25,7 @@ export const Route = createFileRoute('/upload')({
|
||||
})
|
||||
|
||||
export function Upload() {
|
||||
const { isAuthenticated } = useConvexAuth()
|
||||
const { isAuthenticated } = useAuthStatus()
|
||||
const { updateSlug } = useSearch({ from: '/upload' })
|
||||
const siteMode = getSiteMode()
|
||||
const isSoulMode = siteMode === 'souls'
|
||||
|
||||
+14
-2
@@ -1002,6 +1002,13 @@ code {
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
.skill-card-footer-inline {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.hero-install {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
@@ -2357,7 +2364,7 @@ code {
|
||||
color: var(--accent-deep);
|
||||
}
|
||||
|
||||
.markdown code {
|
||||
.markdown :not(pre) > code {
|
||||
background: rgba(255, 107, 74, 0.12);
|
||||
padding: 2px 6px;
|
||||
border-radius: 8px;
|
||||
@@ -2397,11 +2404,16 @@ code {
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
[data-theme="dark"] .markdown code {
|
||||
[data-theme="dark"] .markdown :not(pre) > code {
|
||||
background: rgba(255, 131, 95, 0.2);
|
||||
color: #ffe9de;
|
||||
}
|
||||
|
||||
[data-theme="dark"] .markdown pre code {
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.fade-up {
|
||||
animation: fadeUp 0.6s ease forwards;
|
||||
opacity: 0;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { createRequire } from 'node:module'
|
||||
import { dirname, join } from 'node:path'
|
||||
import tailwindcss from '@tailwindcss/vite'
|
||||
import { devtools } from '@tanstack/devtools-vite'
|
||||
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
|
||||
@@ -19,7 +20,26 @@ const plexMonoPath = require.resolve(
|
||||
'@fontsource/ibm-plex-mono/files/ibm-plex-mono-latin-500-normal.woff2',
|
||||
)
|
||||
|
||||
const convexEntry = require.resolve('convex')
|
||||
const convexRoot = dirname(dirname(dirname(convexEntry)))
|
||||
const convexReactPath = join(convexRoot, 'dist/esm/react/index.js')
|
||||
const convexBrowserPath = join(convexRoot, 'dist/esm/browser/index.js')
|
||||
const convexValuesPath = join(convexRoot, 'dist/esm/values/index.js')
|
||||
const convexAuthReactPath = require.resolve('@convex-dev/auth/react')
|
||||
|
||||
const config = defineConfig({
|
||||
resolve: {
|
||||
dedupe: ['convex', '@convex-dev/auth', 'react', 'react-dom'],
|
||||
alias: {
|
||||
'convex/react': convexReactPath,
|
||||
'convex/browser': convexBrowserPath,
|
||||
'convex/values': convexValuesPath,
|
||||
'@convex-dev/auth/react': convexAuthReactPath,
|
||||
},
|
||||
},
|
||||
optimizeDeps: {
|
||||
include: ['convex/react', 'convex/browser'],
|
||||
},
|
||||
plugins: [
|
||||
devtools(),
|
||||
nitro({
|
||||
|
||||
Reference in New Issue
Block a user