@workflow/web 4.1.32 → 4.1.34

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/README.md CHANGED
@@ -11,55 +11,32 @@ Observability Web UI Package bundled in the [Workflow SDK](https://useworkflow.d
11
11
 
12
12
  While this UI is bundled with the Workflow CLI, you can also self-host it.
13
13
 
14
- There are multiple approaches:
14
+ There are two approaches:
15
15
 
16
16
  1. Run `npx workflow web --noBrowser` on a server
17
- 2. Clone this repo and deploy as a normal Next.js app
18
- 3. Deploy the published `@workflow/web` package
17
+ 2. Run the published `@workflow/web` package's server directly
19
18
 
20
19
  All options require the environment to be configured with the right environment variables for the World you're using.
21
20
 
21
+ ### Allowed host names
22
+
23
+ To protect against DNS rebinding, the server rejects requests whose `Host` header is not `localhost`, a `*.localhost` name, or an IP address. If you reach the UI under a domain name (for example behind a reverse proxy), list it in `WORKFLOW_WEB_ALLOWED_HOSTS` or pass `--webAllowedHosts` to the CLI: comma-separated, `.example.com` matches the domain and its subdomains, and `*` disables the check. Cross-origin `POST` requests are rejected as well, unless their origin is one of these names.
24
+
22
25
  ### Option 1: Run with the CLI
23
26
 
24
27
  ```bash
25
- npx workflow web --noBrowser
28
+ npx workflow web --noBrowser --webAllowedHosts workflow.example.com
26
29
  ```
27
30
 
28
31
  This will start the web UI on the default port `3456`.
29
32
 
30
- ### Option 2: Clone and deploy
31
-
32
- - Build and deploy like any Next.js app.
33
- - Configure the backend via environment variables (same variables the CLI writes).
34
-
35
- ### Option 3: Deploy the published `@workflow/web` package
36
-
37
- The published `@workflow/web` package contains a prebuilt `.next` directory and `package.json`.
38
- You can install it and run `next start` from the package directory.
33
+ ### Option 2: Run the published `@workflow/web` package
39
34
 
40
- Example (Node server / container):
35
+ The published `@workflow/web` package contains a prebuilt `build/` directory and a standalone server entry point, `server.js`.
41
36
 
42
37
  ```bash
43
- mkdir workflow-observability-ui
44
- cd workflow-observability-ui
45
-
46
- npm init -y
47
- # You must provide React runtime dependencies in your host project.
48
- npm i @workflow/web react react-dom
49
-
50
- # Run Next.js from the installed package (it contains the .next output)
51
- cd node_modules/@workflow/web
52
- npx --yes next start -p "${PORT:-3456}"
53
- ```
54
-
55
- If you prefer, you can set a `start` script in your host `package.json` like:
56
-
57
- ```json
58
- {
59
- "scripts": {
60
- "start": "cd node_modules/@workflow/web && next start -p $PORT"
61
- }
62
- }
38
+ npm i @workflow/web
39
+ PORT=3456 WORKFLOW_WEB_ALLOWED_HOSTS=workflow.example.com node node_modules/@workflow/web/server.js
63
40
  ```
64
41
 
65
42
  ### Configuration (environment variables)
@@ -1,4 +1,4 @@
1
- import { R, K as Ks, Q as Qe } from "./mermaid-3ZIDBTTL-Q2_PQwJo.js";
1
+ import { R, K as Ks, Q as Qe } from "./mermaid-3ZIDBTTL-CCVNMOf9.js";
2
2
  import { r as reactExports, j as jsxRuntimeExports } from "./index-BQ-Xa8kF.js";
3
3
  var L = ({ code: s, language: t, raw: e, className: n, ...d$1 }) => {
4
4
  let { shikiTheme: l } = reactExports.useContext(R), o = Ks(), [m, i] = reactExports.useState(e);
@@ -1,6 +1,6 @@
1
1
  import { r as reactExports, D as ReactDOM, j as jsxRuntimeExports, A as Link, f as reactDomExports, C as useSearchParams, B as useNavigate, E as useLocation, w as withComponentProps } from "./index-BQ-Xa8kF.js";
2
- import { R as ResolveHookModal, S as Send, a as Skeleton, u as unwrapOrThrow, W as WorkflowWebAPIError, b as RelativeTime, A as Alert, C as CircleAlert, c as AlertTitle, d as AlertDescription, g as getErrorMessage, e as CopyableText, D as DropdownMenu, f as DropdownMenuTrigger, E as Ellipsis, h as DropdownMenuContent, i as DropdownMenuItem, j as ChevronRight, r as resumeHook, k as createCollection, l as hideOthers, m as ReactRemoveScroll, n as useDirection, o as ChevronDown, p as ChevronUp, q as Check, X, s as useControllableState$1, P as Primitive$1, t as composeEventHandlers$1, v as Presence, w as useSize, x as createContextScope$1, y as cancelRun, z as reenqueueRun, B as parseWorkflowName, F as StatusBadge, Z as Zap, G as CircleX, H as RunActionsDropdownItems, I as unwrapServerActionResult, J as WorkflowGraphViewer, T as Tabs, K as TabsList, L as TabsTrigger, M as TabsContent, N as ErrorBoundary } from "./workflow-graph-viewer-CazJ_HP0.js";
3
- import { g as useLayoutEffect2, P as Primitive, c as createLucideIcon, h as useToast, d as cn, D as DEFAULT_PAGE_SIZE, i as fetchRuns, j as fetchHooks, k as getPaginationDisplay, T as Tooltip, a as TooltipTrigger, B as Button, b as TooltipContent, l as fetchEvents, m as useCallbackRef, n as useComposedRefs, A as Anchor, o as composeEventHandlers, p as useId, q as createPopperScope, s as DismissableLayer, v as createContextScope, w as createSlot, C as Content$1, x as useControllableState, y as Root2$1, V as VISUALLY_HIDDEN_STYLES, z as Arrow, E as useComposedRefs$1, u as useServerConfig, t as toast, L as LoaderCircle, F as fetchRun, G as cva, H as Presence$1, I as createContext2, J as fetchWorkflowsManifest } from "./mermaid-3ZIDBTTL-Q2_PQwJo.js";
2
+ import { R as ResolveHookModal, S as Send, a as Skeleton, u as unwrapOrThrow, W as WorkflowWebAPIError, b as RelativeTime, A as Alert, C as CircleAlert, c as AlertTitle, d as AlertDescription, g as getErrorMessage, e as CopyableText, D as DropdownMenu, f as DropdownMenuTrigger, E as Ellipsis, h as DropdownMenuContent, i as DropdownMenuItem, j as ChevronRight, r as resumeHook, k as createCollection, l as hideOthers, m as ReactRemoveScroll, n as useDirection, o as ChevronDown, p as ChevronUp, q as Check, X, s as useControllableState$1, P as Primitive$1, t as composeEventHandlers$1, v as Presence, w as useSize, x as createContextScope$1, y as cancelRun, z as reenqueueRun, B as parseWorkflowName, F as StatusBadge, Z as Zap, G as CircleX, H as RunActionsDropdownItems, I as unwrapServerActionResult, J as WorkflowGraphViewer, T as Tabs, K as TabsList, L as TabsTrigger, M as TabsContent, N as ErrorBoundary } from "./workflow-graph-viewer-CTw33ANm.js";
3
+ import { g as useLayoutEffect2, P as Primitive, c as createLucideIcon, h as useToast, d as cn, D as DEFAULT_PAGE_SIZE, i as fetchRuns, j as fetchHooks, k as getPaginationDisplay, T as Tooltip, a as TooltipTrigger, B as Button, b as TooltipContent, l as fetchEvents, m as useCallbackRef, n as useComposedRefs, A as Anchor, o as composeEventHandlers, p as useId, q as createPopperScope, s as DismissableLayer, v as createContextScope, w as createSlot, C as Content$1, x as useControllableState, y as Root2$1, V as VISUALLY_HIDDEN_STYLES, z as Arrow, E as useComposedRefs$1, u as useServerConfig, t as toast, L as LoaderCircle, F as fetchRun, G as cva, H as Presence$1, I as createContext2, J as fetchWorkflowsManifest } from "./mermaid-3ZIDBTTL-CCVNMOf9.js";
4
4
  import "./index-CXBr7N7m.js";
5
5
  var PORTAL_NAME$2 = "Portal";
6
6
  var Portal$2 = reactExports.forwardRef((props, forwardedRef) => {
@@ -1 +1 @@
1
- window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-C7XgFTHI.js","imports":["/assets/index-BQ-Xa8kF.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/root-DpF6w_fA.js","imports":["/assets/index-BQ-Xa8kF.js","/assets/mermaid-3ZIDBTTL-Q2_PQwJo.js"],"css":["/assets/root-BOS11TzD.css","/assets/mermaid-3ZIDBTTL-yyHEMZs4.css"]},"routes/home":{"id":"routes/home","parentId":"root","index":true,"hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/home-BaDfLHa9.js","imports":["/assets/index-BQ-Xa8kF.js","/assets/workflow-graph-viewer-CazJ_HP0.js","/assets/mermaid-3ZIDBTTL-Q2_PQwJo.js","/assets/index-CXBr7N7m.js"],"css":["/assets/workflow-graph-viewer-yls6qlc0.css","/assets/mermaid-3ZIDBTTL-yyHEMZs4.css"]},"routes/run-detail":{"id":"routes/run-detail","parentId":"root","path":"run/:runId","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/run-detail-BP7Q8-uY.js","imports":["/assets/index-BQ-Xa8kF.js","/assets/workflow-graph-viewer-CazJ_HP0.js","/assets/mermaid-3ZIDBTTL-Q2_PQwJo.js","/assets/encryption-Cu4jq70Y.js","/assets/index-CXBr7N7m.js"],"css":["/assets/workflow-graph-viewer-yls6qlc0.css","/assets/mermaid-3ZIDBTTL-yyHEMZs4.css"]},"routes/api.rpc":{"id":"routes/api.rpc","parentId":"root","path":"api/rpc","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.rpc-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.stream.$streamId":{"id":"routes/api.stream.$streamId","parentId":"root","path":"api/stream/:streamId","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.stream._streamId-l0sNRNKZ.js","imports":[],"css":[]}},"url":"/assets/manifest-830ddfa8.js","version":"830ddfa8"};
1
+ window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-C7XgFTHI.js","imports":["/assets/index-BQ-Xa8kF.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/root-DjobWPwY.js","imports":["/assets/index-BQ-Xa8kF.js","/assets/mermaid-3ZIDBTTL-CCVNMOf9.js"],"css":["/assets/root-BOS11TzD.css","/assets/mermaid-3ZIDBTTL-yyHEMZs4.css"]},"routes/home":{"id":"routes/home","parentId":"root","index":true,"hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/home-vGjXNC_q.js","imports":["/assets/index-BQ-Xa8kF.js","/assets/workflow-graph-viewer-CTw33ANm.js","/assets/mermaid-3ZIDBTTL-CCVNMOf9.js","/assets/index-CXBr7N7m.js"],"css":["/assets/workflow-graph-viewer-yls6qlc0.css","/assets/mermaid-3ZIDBTTL-yyHEMZs4.css"]},"routes/run-detail":{"id":"routes/run-detail","parentId":"root","path":"run/:runId","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/run-detail-nLEl00wq.js","imports":["/assets/index-BQ-Xa8kF.js","/assets/workflow-graph-viewer-CTw33ANm.js","/assets/mermaid-3ZIDBTTL-CCVNMOf9.js","/assets/encryption-Cu4jq70Y.js","/assets/index-CXBr7N7m.js"],"css":["/assets/workflow-graph-viewer-yls6qlc0.css","/assets/mermaid-3ZIDBTTL-yyHEMZs4.css"]},"routes/api.rpc":{"id":"routes/api.rpc","parentId":"root","path":"api/rpc","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.rpc-l0sNRNKZ.js","imports":[],"css":[]},"routes/api.stream.$streamId":{"id":"routes/api.stream.$streamId","parentId":"root","path":"api/stream/:streamId","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.stream._streamId-l0sNRNKZ.js","imports":[],"css":[]}},"url":"/assets/manifest-5d325d67.js","version":"5d325d67"};