@workflow/web 4.0.1-beta.7 → 4.0.1-beta.9
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/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +7 -7
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_not-found/page.js +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js +2 -2
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/run/[runId]/page.js +3 -3
- package/.next/server/app/run/[runId]/page.js.nft.json +1 -1
- package/.next/server/app/run/[runId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/run/[runId]/streams/[streamId]/page.js +2 -2
- package/.next/server/app/run/[runId]/streams/[streamId]/page.js.nft.json +1 -1
- package/.next/server/app/run/[runId]/streams/[streamId]/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/11.js +84 -0
- package/.next/server/chunks/701.js +1 -1
- package/.next/server/chunks/771.js +7 -0
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/133-acaa79432682b5cd.js +1 -0
- package/.next/static/chunks/app/{layout-cbeec5bd379efacd.js → layout-fd323e57c0037f09.js} +1 -1
- package/.next/static/chunks/app/page-9872f81f67580e33.js +1 -0
- package/.next/static/chunks/app/run/[runId]/page-38f7abc19e3b368a.js +1 -0
- package/.next/static/chunks/app/run/[runId]/streams/[streamId]/{page-a467453890419d95.js → page-148265f25fb0e40e.js} +1 -1
- package/.next/trace +21 -20
- package/package.json +5 -5
- package/.next/server/chunks/52.js +0 -57
- package/.next/server/chunks/910.js +0 -7
- package/.next/static/chunks/617-9852d1dec9970af4.js +0 -1
- package/.next/static/chunks/app/page-f99d16dfe9e892cc.js +0 -1
- package/.next/static/chunks/app/run/[runId]/page-8efd19c9397988db.js +0 -1
- /package/.next/static/{i6LtFXJZ0N6Pry_U6y_fL → 4FOwLpzlSLP9zA2DH14SZ}/_buildManifest.js +0 -0
- /package/.next/static/{i6LtFXJZ0N6Pry_U6y_fL → 4FOwLpzlSLP9zA2DH14SZ}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[417],{5988:(e,t,s)=>{"use strict";s.d(t,{s:()=>o});var r=s(5386),a=s(1049),n=s(5505),l=s(4773),d=s(8257);function o(e){let{date:t,className:s="",type:o="relative"}=e,[,c]=(0,l.useState)(Date.now()),i="relative"===o?(0,a.o)(new Date(t),new Date):(0,n.B)(new Date(t),{addSuffix:!0}),u=new Date(t).toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"});return(0,l.useEffect)(()=>{let e=setInterval(()=>{c(Date.now())},1e3);return()=>clearInterval(e)},[]),(0,r.jsxs)(d.m_,{children:[(0,r.jsx)(d.k$,{asChild:!0,children:(0,r.jsx)("span",{className:"".concat(s," cursor-help border-b border-dotted"),children:i})}),(0,r.jsx)(d.ZI,{children:(0,r.jsx)("p",{children:u})})]})}},6810:(e,t,s)=>{"use strict";s.d(t,{W:()=>n});var r=s(5386),a=s(8257);function n(e){let{status:t,context:s,className:n}=e,l=()=>{switch(t){case"running":return"text-blue-600 dark:text-blue-400";case"completed":return"text-green-600 dark:text-green-400";case"failed":return"text-red-600 dark:text-red-400";case"cancelled":return"text-yellow-600 dark:text-yellow-400";case"pending":return"text-gray-600 dark:text-gray-400";case"paused":return"text-orange-600 dark:text-orange-400";default:return"text-gray-500 dark:text-gray-400"}};if("failed"===t&&(null==s?void 0:s.error)){let e="string"==typeof s.error?s.error:s.error instanceof Error?s.error.message:JSON.stringify(s.error);return(0,r.jsxs)(a.m_,{children:[(0,r.jsx)(a.k$,{asChild:!0,children:(0,r.jsx)("span",{className:"".concat(n," border-b border-dotted cursor-help ").concat(l()),children:t})}),(0,r.jsx)(a.ZI,{className:"max-w-md",children:(0,r.jsx)("p",{className:"text-xs whitespace-pre-wrap break-words",children:e})})]})}return(0,r.jsx)("span",{className:"".concat(n," ").concat(l()),children:t})}},7307:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>P});var r=s(5386),a=s(3283),n=s(7394),l=s(2931),d=s(9373),o=s(3039),c=s(4773),i=s(8150),u=s(7122),x=s(2382),h=s(6016),m=s(2287);function f(e){let{...t}=e;return(0,r.jsx)(x.bL,{"data-slot":"alert-dialog",...t})}function j(e){let{...t}=e;return(0,r.jsx)(x.ZL,{"data-slot":"alert-dialog-portal",...t})}function g(e){let{className:t,...s}=e;return(0,r.jsx)(x.hJ,{"data-slot":"alert-dialog-overlay",className:(0,m.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...s})}function p(e){let{className:t,...s}=e;return(0,r.jsxs)(j,{children:[(0,r.jsx)(g,{}),(0,r.jsx)(x.UC,{"data-slot":"alert-dialog-content",className:(0,m.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...s})]})}function v(e){let{className:t,...s}=e;return(0,r.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,m.cn)("flex flex-col gap-2 text-center sm:text-left",t),...s})}function w(e){let{className:t,...s}=e;return(0,r.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,m.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...s})}function N(e){let{className:t,...s}=e;return(0,r.jsx)(x.hE,{"data-slot":"alert-dialog-title",className:(0,m.cn)("text-lg font-semibold",t),...s})}function y(e){let{className:t,...s}=e;return(0,r.jsx)(x.VY,{"data-slot":"alert-dialog-description",className:(0,m.cn)("text-muted-foreground text-sm",t),...s})}function b(e){let{className:t,...s}=e;return(0,r.jsx)(x.rc,{className:(0,m.cn)((0,h.r)(),t),...s})}function k(e){let{className:t,...s}=e;return(0,r.jsx)(x.ZD,{className:(0,m.cn)((0,h.r)({variant:"outline"}),t),...s})}var C=s(8052),R=s(7960),I=s(8649),A=s(8257);function E(e){let{canCancel:t,cancelling:s,cancelDisabledReason:a,onCancel:n}=e;return(0,r.jsxs)(A.m_,{children:[(0,r.jsx)(A.k$,{asChild:!0,children:(0,r.jsx)("span",{children:(0,r.jsxs)(h.$,{variant:"outline",size:"sm",onClick:n,disabled:!t||s,children:[(0,r.jsx)(I.A,{className:"h-4 w-4"}),s?"Cancelling...":"Cancel"]})})}),a&&(0,r.jsx)(A.ZI,{children:(0,r.jsx)("p",{children:a})})]})}var S=s(7536),_=s(2737);function D(e){let{text:t,children:s,className:a}=e,[n,l]=(0,c.useState)(!1),d=async()=>{try{await navigator.clipboard.writeText(t),l(!0),setTimeout(()=>l(!1),2e3)}catch(e){console.error("Failed to copy text:",e)}};return(0,r.jsxs)("div",{className:(0,m.cn)("flex items-center gap-2 group",a),children:[s,(0,r.jsxs)(A.m_,{children:[(0,r.jsx)(A.k$,{asChild:!0,children:(0,r.jsx)("button",{type:"button",onClick:d,className:"opacity-0 group-hover:opacity-100 transition-opacity","aria-label":"Copy to clipboard",children:n?(0,r.jsx)(S.A,{className:"h-3 w-3 text-green-600"}):(0,r.jsx)(_.A,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})}),(0,r.jsx)(A.ZI,{children:(0,r.jsx)("p",{children:n?"Copied!":"Copy to clipboard"})})]})]})}function z(e){let{hasError:t,errorMessage:s}=e;return(0,r.jsx)("div",{className:"flex items-center gap-2",children:(0,r.jsxs)(A.m_,{children:[(0,r.jsx)(A.k$,{asChild:!0,children:(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("div",{className:"w-2 h-2 rounded-full ".concat(t?"bg-red-500":"bg-green-500 animate-pulse")}),(0,r.jsx)("span",{className:"text-xs $\n hasError\n ? 'text-red-600 dark:text-red-400'\n : 'text-muted-foreground'",children:t?"Error":"Live"})]})}),(0,r.jsx)(A.ZI,{children:(0,r.jsx)("p",{children:t?"Error updating data: ".concat(s):"Content updates every ".concat(m.Oc/1e3," seconds")})})]})})}var Z=s(5988),$=s(4692);function F(e){let{canRerun:t,rerunning:s,rerunDisabledReason:a,onRerun:n}=e;return(0,r.jsxs)(A.m_,{children:[(0,r.jsx)(A.k$,{asChild:!0,children:(0,r.jsx)("span",{children:(0,r.jsxs)(h.$,{variant:"outline",size:"sm",onClick:n,disabled:!t||s,children:[(0,r.jsx)($.A,{className:"h-4 w-4"}),s?"Re-running...":"Re-run"]})})}),a&&(0,r.jsx)(A.ZI,{children:(0,r.jsx)("p",{children:a})})]})}var L=s(6810);function O(e){var t;let{config:s,runId:n,selectedId:x}=e,h=(0,a.useRouter)(),[m,j]=(0,c.useState)(!1),[g,I]=(0,c.useState)(!1),[A,S]=(0,c.useState)(!1),[_,$]=(0,c.useState)(!1),O=(0,c.useMemo)(()=>(0,C.nO)(s),[s]),{run:P,steps:T,hooks:W,events:J,loading:U,error:B,update:K}=(0,d.Qz)(O,n,{live:!0}),M=null!=P?P:{},Q=async()=>{if(!m)try{j(!0),S(!1),await (0,d.Su)(O,n),await K(),i.oR.success("Run cancelled successfully")}catch(e){console.error("Failed to cancel run:",e),i.oR.error("Failed to cancel run",{description:e instanceof Error?e.message:"An unknown error occurred"})}finally{j(!1)}},q=async()=>{if(!g)try{I(!0),$(!1);let e=await (0,d.Ns)(O,M.runId);i.oR.success("New run started successfully",{description:"Run ID: ".concat(e)}),h.push((0,C.g0)("/run/".concat(e),s))}catch(e){console.error("Failed to re-run workflow:",e),i.oR.error("Failed to start new run",{description:e instanceof Error?e.message:"An unknown error occurred"})}finally{I(!1),$(!1)}};if(B&&!P)return(0,r.jsxs)(u.Fc,{variant:"destructive",className:"m-4",children:[(0,r.jsx)(o.A,{className:"h-4 w-4"}),(0,r.jsx)(u.XL,{children:"Error loading workflow run"}),(0,r.jsx)(u.TN,{children:B.message})]});let V=(null==(t=(0,l.s)(M.workflowName))?void 0:t.shortName)||"?",X="pending"===M.status||"running"===M.status,Y=m?"Cancelling run...":"completed"===M.status?"Run has already completed":"failed"===M.status?"Run has already failed":"cancelled"===M.status?"Run has already been cancelled":"",G="pending"===M.status||"running"===M.status;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(f,{open:A,onOpenChange:S,children:(0,r.jsxs)(p,{children:[(0,r.jsxs)(v,{children:[(0,r.jsx)(N,{children:"Cancel Workflow Run?"}),(0,r.jsx)(y,{children:"This will stop the workflow execution immediately, and no further steps will be executed. Partial workflow execution may occur. Are you sure you want to cancel the run?"})]}),(0,r.jsxs)(w,{children:[(0,r.jsx)(k,{children:"Keep Running"}),(0,r.jsx)(b,{onClick:Q,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Cancel Run"})]})]})}),(0,r.jsx)(f,{open:_,onOpenChange:$,children:(0,r.jsxs)(p,{children:[(0,r.jsxs)(v,{children:[(0,r.jsx)(N,{children:"Re-run Workflow?"}),(0,r.jsx)(y,{children:"This can potentially re-run code that is meant to only execute once. Are you sure you want to re-run the workflow?"})]}),(0,r.jsxs)(w,{children:[(0,r.jsx)(k,{children:"Cancel"}),(0,r.jsx)(b,{onClick:q,children:"Re-run Workflow"})]})]})}),(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsx)(R.E,{href:(0,C.g0)("/",s)}),(0,r.jsxs)("div",{className:"space-y-4 pb-6 border-b",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between",children:[(0,r.jsx)("div",{className:"mb-6",children:(0,r.jsx)("h1",{className:"text-2xl font-semibold",children:V})}),(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsx)(z,{hasError:!1,errorMessage:""}),(0,r.jsx)(F,{canRerun:!U&&!G&&!g,rerunning:g,rerunDisabledReason:g?"Re-running workflow...":U?"Loading run data...":G?"Cannot re-run while workflow is still running":"",onRerun:()=>{$(!0)}}),(0,r.jsx)(E,{canCancel:X,cancelling:m,cancelDisabledReason:Y,onCancel:()=>{S(!0)}})]})]}),(0,r.jsxs)("div",{className:"flex items-start gap-8",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)("div",{className:"text-xs text-muted-foreground",children:"Status"}),(0,r.jsx)(L.W,{status:M.status||"...",context:M})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)("div",{className:"text-xs text-muted-foreground",children:"Run ID"}),(0,r.jsx)(D,{text:M.runId,children:(0,r.jsx)("div",{className:"text-sm mt-0.5 font-mono",children:M.runId})})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)("div",{className:"text-xs text-muted-foreground",children:"Queued"}),(0,r.jsx)("div",{className:"text-sm",children:M.createdAt?(0,r.jsx)(Z.s,{date:M.createdAt}):"-"})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)("div",{className:"text-xs text-muted-foreground",children:"Started"}),(0,r.jsx)("div",{className:"text-sm",children:M.startedAt?(0,r.jsx)(Z.s,{date:M.startedAt}):"-"})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)("div",{className:"text-xs text-muted-foreground",children:"Completed"}),(0,r.jsx)("div",{className:"text-sm",children:M.completedAt?(0,r.jsx)(Z.s,{date:M.completedAt}):"-"})]})]})]}),(0,r.jsx)(d.J9,{error:B,steps:T,events:J,hooks:W,env:O,run:M,isLoading:U})]})]})}function P(){let e=(0,a.useParams)(),t=(0,a.useSearchParams)(),s=(0,C.Nt)(),l=e.runId,d=t.get("stepId")||t.get("step"),o=t.get("eventId")||t.get("event"),c=t.get("hookId")||t.get("hook");return(0,r.jsx)(n.t,{title:"Run Detail Error",description:"Failed to load run details. Please try navigating back to the home page.",children:(0,r.jsx)(O,{config:s,runId:l,selectedId:d||o||c||void 0})})}},7960:(e,t,s)=>{"use strict";s.d(t,{E:()=>d});var r=s(5386),a=s(7437),n=s(8414),l=s.n(n);function d(e){let{href:t,label:s="Back"}=e;return(0,r.jsxs)(l(),{href:t,className:"inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors mb-2",children:[(0,r.jsx)(a.A,{className:"h-4 w-4"}),s]})}},8252:(e,t,s)=>{Promise.resolve().then(s.bind(s,7307))},8257:(e,t,s)=>{"use strict";s.d(t,{ZI:()=>c,k$:()=>o,m_:()=>d});var r=s(5386),a=s(7384),n=s(4773),l=s(2287);a.Kq;let d=a.bL,o=a.l9,c=n.forwardRef((e,t)=>{let{className:s,sideOffset:n=4,...d}=e;return(0,r.jsx)(a.UC,{ref:t,sideOffset:n,className:(0,l.cn)("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...d})});c.displayName=a.UC.displayName}},e=>{e.O(0,[246,703,337,829,81,383,617,909,624,358],()=>e(e.s=8252)),_N_E=e.O()}]);
|
|
File without changes
|
|
File without changes
|