@workflow/web 4.1.33 → 4.1.35
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 +11 -34
- package/build/client/assets/{encryption-Cu4jq70Y.js → encryption-BhH0xZid.js} +2 -2
- package/build/client/assets/{entry.client-C7XgFTHI.js → entry.client-CaUKWFDB.js} +13 -35
- package/build/client/assets/{highlighted-body-B3W2YXNL-CK5bxjZc.js → highlighted-body-B3W2YXNL-D5wXP22M.js} +2 -2
- package/build/client/assets/{home-vGjXNC_q.js → home-CjokEfcx.js} +92 -164
- package/build/client/assets/{index-BQ-Xa8kF.js → index-BbkkdbNz.js} +78 -149
- package/build/client/assets/{index-CXBr7N7m.js → index-DY3Cy2uF.js} +20 -23
- package/build/client/assets/{manifest-5d325d67.js → manifest-cbe27963.js} +1 -1
- package/build/client/assets/{mermaid-3ZIDBTTL-CCVNMOf9.js → mermaid-3ZIDBTTL-8p93TMNC.js} +315 -479
- package/build/client/assets/mermaid-3ZIDBTTL-DHICBbcE.css +1 -0
- package/build/client/assets/{root-DjobWPwY.js → root-D-ZCwNhI.js} +5 -35
- package/build/client/assets/root-DzrclYrK.css +1 -0
- package/build/client/assets/{run-detail-nLEl00wq.js → run-detail-H0o7UsyU.js} +141 -205
- package/build/client/assets/server-build-DMZyIeNn.css +1 -0
- package/build/client/assets/{worker-CqHKTA7D.js → worker-DxRAeS-i.js} +2 -2
- package/build/client/assets/{workflow-graph-viewer-CTw33ANm.js → workflow-graph-viewer-C-MZ2XPV.js} +466 -723
- package/build/server/assets/{app-DFeBwpXW.js → app-BX9dMsx4.js} +67 -153
- package/build/server/assets/{highlighted-body-B3W2YXNL-DucHV668.js → highlighted-body-B3W2YXNL-CHc9_Xzp.js} +2 -2
- package/build/server/assets/{index-BUlN7QFn.js → index-BC_EEwAS.js} +2 -2
- package/build/server/assets/{index-DOJ452m_.js → index-BNN2zck_.js} +3 -3
- package/build/server/assets/{index-CMfOrLiJ.js → index-C-y3EhAf.js} +25 -32
- package/build/server/assets/{mermaid-3ZIDBTTL-DCNPJ1qb.js → mermaid-3ZIDBTTL-CP_u5jLd.js} +2 -2
- package/build/server/assets/{server-build-D0sUavwG.js → server-build-C0EUGBN0.js} +6483 -7670
- package/build/server/assets/{token-v98bLjzH.js → token-DYdYwRhs.js} +6 -6
- package/build/server/assets/{token-util-BoIjkgfM.js → token-util-BZHkMK_T.js} +2 -2
- package/build/server/index.js +1 -1
- package/host-guard.js +176 -0
- package/package.json +5 -4
- package/server.d.ts +15 -1
- package/server.js +28 -3
- package/build/client/assets/mermaid-3ZIDBTTL-yyHEMZs4.css +0 -1
- package/build/client/assets/root-BOS11TzD.css +0 -1
- package/build/client/assets/server-build-CNEy-GiI.css +0 -1
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
|
|
14
|
+
There are two approaches:
|
|
15
15
|
|
|
16
16
|
1. Run `npx workflow web --noBrowser` on a server
|
|
17
|
-
2.
|
|
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:
|
|
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
|
-
|
|
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
|
-
|
|
44
|
-
|
|
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,5 +1,5 @@
|
|
|
1
|
-
import { R as RuntimeDecryptionError } from "./index-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { R as RuntimeDecryptionError } from "./index-DY3Cy2uF.js";
|
|
2
|
+
import "./index-BbkkdbNz.js";
|
|
3
3
|
const NONCE_LENGTH = 12;
|
|
4
4
|
const TAG_LENGTH = 128;
|
|
5
5
|
const KEY_LENGTH = 32;
|
|
@@ -1,17 +1,8 @@
|
|
|
1
|
-
import { a as requireReact, b as requireReactDom, m as matchRoutes, s as shouldHydrateRouteLoader, N as NO_BODY_STATUS_CODES, R as ReactExports, i as isRouteErrorResponse, r as reactExports, c as invariant, u as useFogOFWarDiscovery, F as FrameworkContext, d as RemixErrorBoundary, e as RouterProvider, f as reactDomExports, h as decodeViaTurboStream, k as createClientRoutes, l as createRouter, n as getPatchRoutesOnNavigationFunction, o as getTurboStreamSingleFetchDataStrategy, p as createBrowserHistory, q as createClientRoutesWithHMRRevalidationOptOut, t as mapRouteProperties, v as hydrationRouteProperties, j as jsxRuntimeExports } from "./index-
|
|
1
|
+
import { a as requireReact, b as requireReactDom, m as matchRoutes, s as shouldHydrateRouteLoader, N as NO_BODY_STATUS_CODES, R as ReactExports, i as isRouteErrorResponse, r as reactExports, c as invariant, u as useFogOFWarDiscovery, F as FrameworkContext, d as RemixErrorBoundary, e as RouterProvider, f as reactDomExports, h as decodeViaTurboStream, k as createClientRoutes, l as createRouter, n as getPatchRoutesOnNavigationFunction, o as getTurboStreamSingleFetchDataStrategy, p as createBrowserHistory, q as createClientRoutesWithHMRRevalidationOptOut, t as mapRouteProperties, v as hydrationRouteProperties, j as jsxRuntimeExports } from "./index-BbkkdbNz.js";
|
|
2
2
|
var client = { exports: {} };
|
|
3
3
|
var reactDomClient_production = {};
|
|
4
4
|
var scheduler = { exports: {} };
|
|
5
5
|
var scheduler_production = {};
|
|
6
|
-
/**
|
|
7
|
-
* @license React
|
|
8
|
-
* scheduler.production.js
|
|
9
|
-
*
|
|
10
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
11
|
-
*
|
|
12
|
-
* This source code is licensed under the MIT license found in the
|
|
13
|
-
* LICENSE file in the root directory of this source tree.
|
|
14
|
-
*/
|
|
15
6
|
var hasRequiredScheduler_production;
|
|
16
7
|
function requireScheduler_production() {
|
|
17
8
|
if (hasRequiredScheduler_production) return scheduler_production;
|
|
@@ -276,15 +267,6 @@ function requireScheduler() {
|
|
|
276
267
|
}
|
|
277
268
|
return scheduler.exports;
|
|
278
269
|
}
|
|
279
|
-
/**
|
|
280
|
-
* @license React
|
|
281
|
-
* react-dom-client.production.js
|
|
282
|
-
*
|
|
283
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
284
|
-
*
|
|
285
|
-
* This source code is licensed under the MIT license found in the
|
|
286
|
-
* LICENSE file in the root directory of this source tree.
|
|
287
|
-
*/
|
|
288
270
|
var hasRequiredReactDomClient_production;
|
|
289
271
|
function requireReactDomClient_production() {
|
|
290
272
|
if (hasRequiredReactDomClient_production) return reactDomClient_production;
|
|
@@ -403,16 +385,16 @@ function requireReactDomClient_production() {
|
|
|
403
385
|
}
|
|
404
386
|
return null;
|
|
405
387
|
}
|
|
406
|
-
var assign = Object.assign, REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_PROVIDER_TYPE = Symbol.for("react.provider"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
407
|
-
var REACT_ACTIVITY_TYPE = Symbol.for("react.activity");
|
|
408
|
-
var REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel");
|
|
388
|
+
var assign = Object.assign, REACT_LEGACY_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element"), REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_PROVIDER_TYPE = /* @__PURE__ */ Symbol.for("react.provider"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
|
|
389
|
+
var REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity");
|
|
390
|
+
var REACT_MEMO_CACHE_SENTINEL = /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel");
|
|
409
391
|
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
410
392
|
function getIteratorFn(maybeIterable) {
|
|
411
393
|
if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
|
|
412
394
|
maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
|
|
413
395
|
return "function" === typeof maybeIterable ? maybeIterable : null;
|
|
414
396
|
}
|
|
415
|
-
var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
|
|
397
|
+
var REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference");
|
|
416
398
|
function getComponentNameFromType(type) {
|
|
417
399
|
if (null == type) return null;
|
|
418
400
|
if ("function" === typeof type)
|
|
@@ -11498,7 +11480,7 @@ function initSsrInfo() {
|
|
|
11498
11480
|
if (!ssrInfo && window.__reactRouterContext && window.__reactRouterManifest && window.__reactRouterRouteModules) {
|
|
11499
11481
|
if (window.__reactRouterManifest.sri === true) {
|
|
11500
11482
|
const importMap = document.querySelector("script[rr-importmap]");
|
|
11501
|
-
if (importMap
|
|
11483
|
+
if (importMap?.textContent) {
|
|
11502
11484
|
try {
|
|
11503
11485
|
window.__reactRouterManifest.sri = JSON.parse(
|
|
11504
11486
|
importMap.textContent
|
|
@@ -11522,7 +11504,6 @@ function createHydratedRouter({
|
|
|
11522
11504
|
getContext,
|
|
11523
11505
|
instrumentations
|
|
11524
11506
|
}) {
|
|
11525
|
-
var _a, _b;
|
|
11526
11507
|
initSsrInfo();
|
|
11527
11508
|
if (!ssrInfo) {
|
|
11528
11509
|
throw new Error(
|
|
@@ -11557,7 +11538,7 @@ function createHydratedRouter({
|
|
|
11557
11538
|
let hydrationData = void 0;
|
|
11558
11539
|
if (ssrInfo.context.isSpaMode) {
|
|
11559
11540
|
let { loaderData } = ssrInfo.context.state;
|
|
11560
|
-
if (
|
|
11541
|
+
if (ssrInfo.manifest.routes.root?.hasLoader && loaderData && "root" in loaderData) {
|
|
11561
11542
|
hydrationData = {
|
|
11562
11543
|
loaderData: {
|
|
11563
11544
|
root: loaderData.root
|
|
@@ -11568,16 +11549,13 @@ function createHydratedRouter({
|
|
|
11568
11549
|
hydrationData = getHydrationData({
|
|
11569
11550
|
state: ssrInfo.context.state,
|
|
11570
11551
|
routes,
|
|
11571
|
-
getRouteInfo: (routeId) => {
|
|
11572
|
-
|
|
11573
|
-
|
|
11574
|
-
|
|
11575
|
-
|
|
11576
|
-
hasHydrateFallback: ((_c = ssrInfo.routeModules[routeId]) == null ? void 0 : _c.HydrateFallback) != null
|
|
11577
|
-
};
|
|
11578
|
-
},
|
|
11552
|
+
getRouteInfo: (routeId) => ({
|
|
11553
|
+
clientLoader: ssrInfo.routeModules[routeId]?.clientLoader,
|
|
11554
|
+
hasLoader: ssrInfo.manifest.routes[routeId]?.hasLoader === true,
|
|
11555
|
+
hasHydrateFallback: ssrInfo.routeModules[routeId]?.HydrateFallback != null
|
|
11556
|
+
}),
|
|
11579
11557
|
location: window.location,
|
|
11580
|
-
basename:
|
|
11558
|
+
basename: window.__reactRouterContext?.basename,
|
|
11581
11559
|
isSpaMode: ssrInfo.context.isSpaMode
|
|
11582
11560
|
});
|
|
11583
11561
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R, K as Ks, Q as Qe } from "./mermaid-3ZIDBTTL-
|
|
2
|
-
import { r as reactExports, j as jsxRuntimeExports } from "./index-
|
|
1
|
+
import { R, K as Ks, Q as Qe } from "./mermaid-3ZIDBTTL-8p93TMNC.js";
|
|
2
|
+
import { r as reactExports, j as jsxRuntimeExports } from "./index-BbkkdbNz.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);
|
|
5
5
|
return reactExports.useEffect(() => {
|