@workerdeck/web 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +59 -0
- package/dist/assets/emscripten-module.browser-5SUE27GY-ntU7dq9B.js +1 -0
- package/dist/assets/ffi-CdNMd84O.js +1 -0
- package/dist/assets/highlighted-body-OFNGDK62-3ziW0qKZ.js +1 -0
- package/dist/assets/index-B-6d1dTe.css +1 -0
- package/dist/assets/index-CkFmqlop.js +22 -0
- package/dist/assets/index-Cw8epeIo.js +1 -0
- package/dist/assets/index-d8zBDtNE.js +2 -0
- package/dist/assets/index-p6gzNhpM.js +481 -0
- package/dist/assets/inter-cyrillic-400-normal-obahsSVq.woff2 +0 -0
- package/dist/assets/inter-cyrillic-500-normal-BasfLYem.woff2 +0 -0
- package/dist/assets/inter-cyrillic-600-normal-CWCymEST.woff2 +0 -0
- package/dist/assets/inter-cyrillic-700-normal-CjBOestx.woff2 +0 -0
- package/dist/assets/inter-cyrillic-ext-400-normal-BQZuk6qB.woff2 +0 -0
- package/dist/assets/inter-cyrillic-ext-500-normal-B0yAr1jD.woff2 +0 -0
- package/dist/assets/inter-cyrillic-ext-600-normal-Dfes3d0z.woff2 +0 -0
- package/dist/assets/inter-cyrillic-ext-700-normal-BjwYoWNd.woff2 +0 -0
- package/dist/assets/inter-greek-400-normal-B4URO6DV.woff2 +0 -0
- package/dist/assets/inter-greek-500-normal-BIZE56-Y.woff2 +0 -0
- package/dist/assets/inter-greek-600-normal-plRanbMR.woff2 +0 -0
- package/dist/assets/inter-greek-700-normal-C3JjAnD8.woff2 +0 -0
- package/dist/assets/inter-greek-ext-400-normal-DGGRlc-M.woff2 +0 -0
- package/dist/assets/inter-greek-ext-500-normal-C4iEst2y.woff2 +0 -0
- package/dist/assets/inter-greek-ext-600-normal-DRtmH8MT.woff2 +0 -0
- package/dist/assets/inter-greek-ext-700-normal-qfdV9bQt.woff2 +0 -0
- package/dist/assets/inter-latin-400-normal-C38fXH4l.woff2 +0 -0
- package/dist/assets/inter-latin-500-normal-Cerq10X2.woff2 +0 -0
- package/dist/assets/inter-latin-600-normal-LgqL8muc.woff2 +0 -0
- package/dist/assets/inter-latin-700-normal-Yt3aPRUw.woff2 +0 -0
- package/dist/assets/inter-latin-ext-400-normal-C1nco2VV.woff2 +0 -0
- package/dist/assets/inter-latin-ext-500-normal-CV4jyFjo.woff2 +0 -0
- package/dist/assets/inter-latin-ext-600-normal-D2bJ5OIk.woff2 +0 -0
- package/dist/assets/inter-latin-ext-700-normal-Ca8adRJv.woff2 +0 -0
- package/dist/assets/inter-vietnamese-400-normal-DMkecbls.woff2 +0 -0
- package/dist/assets/inter-vietnamese-500-normal-DOriooB6.woff2 +0 -0
- package/dist/assets/inter-vietnamese-600-normal-Cc8MFFhd.woff2 +0 -0
- package/dist/assets/inter-vietnamese-700-normal-DlLaEgI2.woff2 +0 -0
- package/dist/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
- package/dist/assets/jetbrains-mono-cyrillic-500-normal-DmUKJPL_.woff2 +0 -0
- package/dist/assets/jetbrains-mono-cyrillic-600-normal-EVf6-Yzo.woff2 +0 -0
- package/dist/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
- package/dist/assets/jetbrains-mono-greek-500-normal-JpySY46c.woff2 +0 -0
- package/dist/assets/jetbrains-mono-greek-600-normal-H7WoG9Et.woff2 +0 -0
- package/dist/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
- package/dist/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
- package/dist/assets/jetbrains-mono-latin-600-normal-C8RAYTDA.woff2 +0 -0
- package/dist/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
- package/dist/assets/jetbrains-mono-latin-ext-500-normal-Cut-4mMH.woff2 +0 -0
- package/dist/assets/jetbrains-mono-latin-ext-600-normal-BfB_LPfz.woff2 +0 -0
- package/dist/assets/module-asyncify-R6PWJ6ZV-V2kApR_G.js +6 -0
- package/dist/favicon.svg +11 -0
- package/dist/index.html +27 -0
- package/entry.d.mts +17 -0
- package/entry.mjs +39 -0
- package/package.json +69 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Tobias Strebitzer
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# @workerdeck/web
|
|
2
|
+
|
|
3
|
+
The [WorkerDeck](https://github.com/workerdeck/workerdeck) dashboard, **prebuilt**:
|
|
4
|
+
session list, create/resume flow, live transcript panel with approve/deny controls, jobs, profiles,
|
|
5
|
+
settings. TanStack Router, React 19, Tailwind v4.
|
|
6
|
+
|
|
7
|
+
This package ships static files and **no runtime dependencies** — React, the router and the rest
|
|
8
|
+
are compiled into `dist/`, not installed by you.
|
|
9
|
+
|
|
10
|
+
> Most people want [`workerdeck`](https://www.npmjs.com/package/workerdeck) instead:
|
|
11
|
+
> `npx workerdeck` serves this dashboard *and* the gateway on one port, already wired — it
|
|
12
|
+
> depends on this package to do it. Reach for this one directly when you want to serve the
|
|
13
|
+
> dashboard from your own host.
|
|
14
|
+
|
|
15
|
+
## Serving it
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
import { dashboardDir } from '@workerdeck/web'
|
|
19
|
+
// -> absolute path to a directory containing index.html + assets/
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
```js
|
|
23
|
+
import express from 'express'
|
|
24
|
+
import { dashboardDir, dashboardIndexHtml } from '@workerdeck/web'
|
|
25
|
+
|
|
26
|
+
const app = express()
|
|
27
|
+
// Hashed filenames — safe to cache forever.
|
|
28
|
+
app.use('/assets', express.static(`${dashboardDir}/assets`, { immutable: true, maxAge: '1y' }))
|
|
29
|
+
// Hash history: every route is `#/…`, so only the entry document is requested.
|
|
30
|
+
app.get('*', (_req, res) => res.sendFile(dashboardIndexHtml, {
|
|
31
|
+
headers: { 'cache-control': 'no-cache' }, // or an update never reaches a warm browser
|
|
32
|
+
}))
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Three constraints, all baked in at build time
|
|
36
|
+
|
|
37
|
+
1. **Mount it at a domain root.** The build sets no `base`, so assets resolve from an absolute
|
|
38
|
+
`/assets/...`. Behind a subpath you get a blank page. Mounting elsewhere needs a rebuild.
|
|
39
|
+
2. **Serve the gateway on the same origin, under `/v1`.** The app builds its client from
|
|
40
|
+
`location.origin`. This is not just convenience: a browser cannot set headers on a WebSocket
|
|
41
|
+
handshake, so a same-origin cookie is the only credential a tab can present when it attaches to
|
|
42
|
+
a session. Split the origins and you need a proxy that stamps credentials server-side.
|
|
43
|
+
3. **No SPA rewrite rules needed** — hash history means the server only ever serves `index.html`.
|
|
44
|
+
|
|
45
|
+
Cache headers matter: hashed assets `immutable`, `index.html` `no-cache`.
|
|
46
|
+
|
|
47
|
+
## Building it yourself
|
|
48
|
+
|
|
49
|
+
The dist is a plain vite build, so a fork can change any of the above:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
git clone https://github.com/workerdeck/workerdeck
|
|
53
|
+
cd workerdeck && pnpm install
|
|
54
|
+
pnpm --filter @workerdeck/web run build # -> packages/web/dist
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
`workerdeck` will serve a custom build if you point its config at one (`webRoot`).
|
|
58
|
+
|
|
59
|
+
MIT
|