@tachybase/module-workflow 0.23.47 → 0.23.48
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/dist/client/index.js +1 -1
- package/dist/externalVersion.js +15 -15
- package/dist/locale/en-US.json +2 -0
- package/dist/locale/zh-CN.json +2 -0
- package/dist/node_modules/@babel/core/package.json +1 -1
- package/dist/node_modules/cron-parser/package.json +1 -1
- package/dist/node_modules/form-data/package.json +1 -1
- package/dist/node_modules/jsonata/package.json +1 -1
- package/dist/node_modules/lru-cache/package.json +1 -1
- package/dist/node_modules/mime-types/package.json +1 -1
- package/dist/node_modules/qrcode/package.json +1 -1
- package/dist/server/features/interception/RequestInterceptionTrigger.js +4 -1
- package/dist/server/features/omni-trigger/CustomActionTrigger.js +4 -1
- package/package.json +17 -17
package/dist/client/index.js
CHANGED
|
@@ -504,7 +504,7 @@ lib.log`},"x-component":"CodeMirror",required:!0},model:{type:"array",title:N("P
|
|
|
504
504
|
.ant-table-cell {
|
|
505
505
|
text-align: center;
|
|
506
506
|
}
|
|
507
|
-
`},properties:{action:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:60},title:'{{t("Actions")}}',properties:{action:{"x-component":"ColumnAction"}}},id:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:80},title:ie("ID"),properties:{id:{type:"number","x-component":"Input","x-read-pretty":!0}}},createdAt:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:160},properties:{createdAt:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},summary:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",title:ie("Summary"),properties:{summary:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},user:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:140},title:ie("The Notified Person"),properties:{user:{"x-component":"ColumnUser","x-read-pretty":!0}}},workflow:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:null},title:'{{t("Workflow", { ns: "workflow" })}}',properties:{workflow:{"x-component":"ColumnWorkflow","x-read-pretty":!0}}},node:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:null},title:`{{t("Task node", { ns: "${Ie}" })}}`,properties:{node:{"x-component":"ColumnNode","x-read-pretty":!0}}}}}}};class Mi extends s.Plugin{load(){return O(this,null,function*(){this.app.addComponents({NoticeBlockProvider:gi,NoticeCenter:Oi})})}}function Go(){const e=W.uid();return{type:"void",name:e,"x-uid":e,"x-decorator-props":{collection:Yt,params:{appends:["user.id","user.nickname","node.id","node.title","job.id","job.status","job.result","workflow.id","workflow.title","workflow.enabled","execution.id","execution.status"]},action:"listCentralized"},"x-decorator":"NoticeBlockProvider","x-component":"CardItem","x-designer":"TableBlockDesigner","x-toolbar":"BlockSchemaToolbar","x-settings":"blockSettings:table",properties:{notice:{type:"void","x-component":"NoticeCenter"}}}}const Ei=()=>{const{insert:e}=s.useSchemaInitializer(),t=s.useSchemaInitializerItem(),o=b.useCallback(()=>{const n=Go();e(n)},[e,Go]);return r.jsx(s.SchemaInitializerItem,I(v({},t),{onClick:o}))};class $i extends s.Plugin{afterAdd(){return O(this,null,function*(){yield this.app.pm.add(Mi)})}load(){return O(this,null,function*(){this.app.addComponents({NoticeBlockInitializer:Ei}),this.app.schemaInitializerManager.get("page:addBlock").add("otherBlocks.workflow.common.notice",{key:"noticeBlock",name:"noticeBlock",type:"item",title:ie("Notice Center"),Component:"NoticeBlockInitializer",icon:"NotificationOutlined"})})}}class Bi extends s.Plugin{afterAdd(){return O(this,null,function*(){yield this.app.pm.add(ci),yield this.app.pm.add($i)})}}class Vi extends Qe{constructor(){super(...arguments),this.title=N("General event"),this.description=N("Omni Trigger is a versatile trigger. You can use it to trigger workflows in a table, trigger it from another workflow, or trigger it with a form button."),this.fieldset={bindCollection:{type:"boolean",title:N("Bind collection?"),"x-decorator":"FormItem","x-component":"Radio.Group",enum:[{label:N("Yes"),value:!0},{label:N("No"),value:!1}],required:!0,default:!1},collection:{type:"string",title:N("Collection"),"x-decorator":"FormItem","x-component":"DataSourceCollectionCascader",required:!0,"x-reactions":[{target:"changed",effects:["onFieldValueChange"],fulfill:{state:{value:[]}}},{dependencies:["bindCollection"],fulfill:{state:{visible:"{{!!$deps[0]}}"}}}]},appends:{type:"array",title:N("Associations to use"),description:N("Please select the associated fields that need to be accessed in subsequent nodes. With more than two levels of to-many associations may cause performance issue, please use with caution."),"x-decorator":"FormItem","x-component":"AppendsTreeSelect","x-component-props":{multiple:!0,useCollection(){var o;return(o=S.useForm().values)==null?void 0:o.collection}},"x-reactions":[{dependencies:["collection"],fulfill:{state:{visible:"{{!!$deps[0]}}"}}}]}},this.scope={useCollectionDataSource:s.useCollectionDataSource},this.components={},this.isActionTriggerable=(t,o={})=>{const{buttonAction:n}=o;return[n==="customize:triggerWorkflows",n==="submit"].some(l=>l===!0)}}useVariables(t,o){var l;const n=s.useCompile(),{getCollectionFields:i}=s.useCollectionManager_deprecated(),a=ue(I(v({appends:["user"]},o),{fields:[{collectionName:"users",name:"user",type:"hasOne",target:"users",uiSchema:{title:F("User acted")}}],compile:n,getCollectionFields:i}));return[...ue({appends:["data",...((l=t.appends)==null?void 0:l.map(c=>`data.${c}`))||[]],fields:[{collectionName:t.collection,name:"data",type:"hasOne",target:t.collection,uiSchema:{title:F("Trigger data")}}],compile:n,getCollectionFields:i}),...a,{label:F("Role of user acted"),value:"roleName"}]}useInitializers(t){return t.collection?{name:"triggerData",type:"item",key:"triggerData",title:N("Trigger data"),Component:Te,collection:t.collection,dataPath:"$context.data"}:null}}const Wi=()=>{const e=s.useSchemaInitializerItem();return r.jsx(s.BlockInitializer,I(v({},e),{schema:ji,item:e}))},ji={type:"void",title:N("Trigger workflow"),"x-component":"Action","x-use-component-props":"usePropsAPIRegular","x-align":"right","x-acl-action":"update","x-decorator":"ACLActionProvider","x-acl-action-props":{skipScopeCheck:!0},"x-toolbar":"ActionSchemaToolbar","x-settings":"actionSettings:APIRegular","x-action":"customize:triggerWorkflows","x-action-settings":{bindWorkflow:!1,updateMode:"selected",triggerWorkflows:[]},"x-component-props":{icon:"CarryOutOutlined"}},zi=[{name:"editButton",Component:s.ActionDesigner.ButtonEditor,useComponentProps(){const{buttonEditorProps:e}=s.useSchemaToolbar();return e}},{name:"workflowConfig",Component:s.WorkflowConfig,useVisible(){var t;const e=S.useFieldSchema();return S.isValid((t=e==null?void 0:e["x-action-settings"])==null?void 0:t.triggerWorkflows)}},{name:"remove",sort:100,Component:s.ActionDesigner.RemoveButton,useComponentProps(){const{removeButtonProps:e}=s.useSchemaToolbar();return e}}],Li=new s.SchemaSettings({name:"actionSettings:APIRegular",items:zi}),qi=()=>{const{field:e,resource:t,__parent:o,service:n}=s.useBlockRequestContext(),i=S.useFieldSchema(),a=b.useContext(S.SchemaExpressionScopeContext),l=s.useTableBlockContext(),{rowKey:c}=l,{t:d}=X.useTranslation();oe.useNavigate(),s.useCompile();const p=S.useField(),{modal:u,notification:f}=x.App.useApp(),h=s.useVariables(),{name:g,getField:y}=s.useCollection_deprecated(),w=s.useLocalVariables(),{run:A}=s.useRequest({resource:"workflows",action:"trigger"},{manual:!0});return s.useNoticeSub("workflow:regular",C=>{if(C.msg==="start")f.info({key:"workflow:regular",message:d("Start"),description:r.jsx(x.Progress,{percent:0}),duration:0});else if(C.msg==="progress"){const D=C.current+1,$=Math.floor(D/C.total*100)===100?3:0;f.info({key:"workflow:regular",message:`${d("Processing")}...`,description:r.jsx(x.Progress,{percent:Math.floor(D/C.total*100)}),duration:$})}else C.msg==="done"&&(f.success({key:"workflow:regular",message:d("Done"),description:r.jsx(x.Progress,{percent:100}),duration:3}),n.refresh())}),{onClick(){return O(this,null,function*(){var Y,se,V,M,L,R,H;const C=(M=(V=(se=(Y=l.field)==null?void 0:Y.data)==null?void 0:se.selectedRowKeys)!=null?V:a==null?void 0:a.selectedRecordKeys)!=null?M:[],{filter:D}=(R=(L=n.params)==null?void 0:L[0])!=null?R:{},{bindWorkflow:$=!1,triggerWorkflows:E=!1,assignedValues:P={},updateMode:B}=(H=i==null?void 0:i["x-action-settings"])!=null?H:{},_=B==="selected",z={primaryKey:c||"id",targetKeys:C};if(p.data=e.data||{},p.data.loading=!0,!E&&!$)return u.info({title:F("Not bind workflow!")});const J=Object.keys(P).map(G=>O(this,null,function*(){const re=P[G],Le=y(G);if(s.isVariable(re)){const xe=yield h==null?void 0:h.parseVariable(re,w);xe&&s.transformVariableValue(xe,{targetCollectionField:Le})}}));yield Promise.all(J),u.confirm({title:F("Confirm",{ns:"core"}),content:F("Trigger workflow?",{ns:"core"}),onOk(){return O(this,null,function*(){if($){const G={filterByTk:$,updateData:encodeURIComponent(JSON.stringify(z))};A(G)}else E&&(_?yield t.trigger({filterByTk:C,triggerWorkflows:E&&E.length>0?E.map(G=>[G.workflowKey,G.context].filter(Boolean).join("!")).join(","):[]}):yield t.trigger({filter:D,triggerWorkflows:E&&E.length>0?E.map(G=>[G.workflowKey,G.context].filter(Boolean).join("!")).join(","):[]}));p.data.loading=!1})},onCancel(){return O(this,null,function*(){p.data.loading=!1})}})})}}};class Ui extends s.Plugin{load(){return O(this,null,function*(){this.app.addComponents({APIRegularInitializer:Wi}),this.app.addScopes({usePropsAPIRegular:qi}),this.app.schemaSettingsManager.add(Li),["table","details"].forEach(t=>{this.app.schemaInitializerManager.addItem(`${t}:configureActions`,"customize.APIRegular",{title:N("Trigger workflow"),Component:"APIRegularInitializer",name:"apiRegular",useVisible(){const o=s.useCollection();return(o.template!=="view"||(o==null?void 0:o.writableView))&&o.template!=="file"&&o.template!=="sql"}})})})}}function Ki(){const e=S.useForm(),{field:t,__parent:o,resource:n}=s.useBlockRequestContext(),{setVisible:i}=s.useActionContext(),a=s.useFilterByTk(),l=oe.useNavigate(),c=S.useFieldSchema(),d=S.useField(),p=s.useCompile(),{modal:u}=x.App.useApp(),f=s.useCollectValuesToSubmit();return d.componentProps.filterKeys,{onClick(){return O(this,null,function*(){var T,C;const{onSuccess:g,skipValidator:y,triggerWorkflows:w}=(c==null?void 0:c["x-action-settings"])||{};y||(yield e.submit());const A=yield f();d.data=t.data||{},d.data.loading=!0;try{const D=yield n.trigger({values:A,filterByTk:a,triggerWorkflows:w!=null&&w.length?w.map($=>[$.workflowKey,$.context].filter(Boolean).join("!")).join(","):void 0});if(d.data.data=D,(C=(T=o==null?void 0:o.service)==null?void 0:T.refresh)==null||C.call(T),i==null||i(!1),!(g!=null&&g.successMessage))return;g!=null&&g.manualClose?u.success({title:p(g==null?void 0:g.successMessage),onOk:()=>O(this,null,function*(){return yield e.reset(),(g==null?void 0:g.redirecting)&&(g==null?void 0:g.redirectTo)&&(W.isURL(g.redirectTo)?window.location.href=g.redirectTo:l(g.redirectTo))})}):x.message.success(p(g==null?void 0:g.successMessage))}catch(D){console.error(D)}finally{d.data.loading=!1}})}}}function _i(){const e=s.useCompile(),t=s.useFilterByTk(),o=S.useField(),n=S.useFieldSchema(),{field:i,resource:a}=s.useBlockRequestContext(),{setVisible:l,setSubmitted:c}=s.useActionContext(),{modal:d}=x.App.useApp(),p=oe.useNavigate(),{onSuccess:u,triggerWorkflows:f}=(n==null?void 0:n["x-action-settings"])||{};return{onClick(g,y){return O(this,null,function*(){o.data=i.data||{},o.data.loading=!0;try{if(yield a.trigger({filterByTk:t,triggerWorkflows:f!=null&&f.length?f.map(w=>[w.workflowKey,w.context].filter(Boolean).join("!")).join(","):void 0}),y==null||y(),l==null||l(!1),c==null||c(!0),!(u!=null&&u.successMessage))return;u!=null&&u.manualClose?d.success({title:e(u==null?void 0:u.successMessage),onOk(){u!=null&&u.redirecting&&(u!=null&&u.redirectTo)&&(W.isURL(u.redirectTo)?window.location.href=u.redirectTo:p(u.redirectTo))}}):x.message.success(e(u==null?void 0:u.successMessage))}catch(w){console.error(w)}finally{o.data.loading=!1}})}}}const Qt={name:"triggerWorkflow",title:N("Trigger workflow"),Component:"CustomizeActionInitializer",schema:{title:N("Trigger workflow"),"x-component":"Action","x-use-component-props":"useFormWorkflowCustomActionProps","x-designer":"Action.Designer","x-action-settings":{skipValidator:!1,onSuccess:{manualClose:!0,redirecting:!1,successMessage:N("Submitted successfully")},triggerWorkflows:[]},"x-action":"customize:triggerWorkflows"}},vt={name:"triggerWorkflow",title:N("Trigger workflow"),Component:"CustomizeActionInitializer",schema:{title:N("Trigger workflow"),"x-component":"Action","x-use-component-props":"useRecordWorkflowCustomTriggerActionProps","x-designer":"Action.Designer","x-action-settings":{onSuccess:{manualClose:!0,redirecting:!1,successMessage:N("Submitted successfully")},triggerWorkflows:[]},"x-action":"customize:triggerWorkflows"}},Zt=I(v({},vt),{schema:I(v({},vt.schema),{"x-component":"Action.Link"})});class Gi extends s.Plugin{afterAdd(){return O(this,null,function*(){yield this.app.pm.add(Ui)})}load(){return O(this,null,function*(){this.app.pm.get("workflow").registerTrigger("general-action",Vi),this.app.addScopes({useFormWorkflowCustomActionProps:Ki,useRecordWorkflowCustomTriggerActionProps:_i}),this.app.schemaInitializerManager.get("FormActionInitializers").add("customize.triggerWorkflow",Qt),this.app.schemaInitializerManager.get("createForm:configureActions").add("customize.triggerWorkflow",Qt),this.app.schemaInitializerManager.get("editForm:configureActions").add("customize.triggerWorkflow",Qt),this.app.schemaInitializerManager.get("detailsWithPaging:configureActions").add("customize.triggerWorkflow",vt),this.app.schemaInitializerManager.get("details:configureActions").add("customize.triggerWorkflow",vt),this.app.schemaInitializerManager.get("table:configureItemActions").add("customize.triggerWorkflow",Zt),this.app.schemaInitializerManager.get("gridCard:configureItemActions").add("customize.triggerWorkflow",Zt),this.app.schemaInitializerManager.get("list:configureItemActions").add("customize.triggerWorkflow",Zt)})}}class Hi extends Q{constructor(){super(...arguments),this.title=`{{t("Parallel branch", { ns: "${m}" })}}`,this.type="parallel",this.group="control",this.icon="MergeOutlined",this.color="#6e93e8",this.description=`{{t("Run multiple branch processes in parallel.", { ns: "${m}" })}}`,this.fieldset={mode:{type:"string",title:`{{t("Mode", { ns: "${m}" })}}`,"x-decorator":"FormItem","x-component":"RadioWithTooltip","x-component-props":{options:[{value:"all",label:`{{t('All succeeded', { ns: "${m}" })}}`,tooltip:`{{t('Continue after all branches succeeded', { ns: "${m}" })}}`},{value:"allSettled",label:`{{t('All settled', { ns: "${m}" })}}`,tooltip:`{{t('Continue after all branches finished', { ns: "${m}" })}}`},{value:"any",label:`{{t('Any succeeded', { ns: "${m}" })}}`,tooltip:`{{t('Continue after any branch succeeded', { ns: "${m}" })}}`},{value:"race",label:`{{t('Any succeeded or failed', { ns: "${m}" })}}`,tooltip:`{{t('Continue after any branch succeeded, or exit after any branch failed.', { ns: "${m}" })}}`}]},default:"all"}},this.components={RadioWithTooltip:Oe}}Component({data:t}){const{styles:o}=ge(),{id:n,config:{mode:i}}=t,{workflow:a,nodes:l}=q(),c=l.reduce((y,w)=>w.upstreamId===n&&w.branchIndex!=null?y.concat(w):y,[]).sort((y,w)=>y.branchIndex-w.branchIndex),[d,p]=b.useState(Math.max(2,c.length)),{getAriaLabel:u}=dt(t),f=F("Add branch"),h=Array(Math.max(0,d-c.length)).fill(null),g=c[c.length-1];return r.jsx(nt,{data:t,children:r.jsxs("div",{className:o.nodeSubtreeClass,children:[r.jsxs("div",{className:o.branchBlockClass,children:[c.map(y=>r.jsx($e,{from:t,entry:y,branchIndex:y.branchIndex},y.id)),h.map((y,w)=>r.jsx($e,{from:t,branchIndex:(g?g.branchIndex:0)+w+1,controller:c.length+w>1?r.jsx("div",{className:s.css`
|
|
507
|
+
`},properties:{action:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:60},title:'{{t("Actions")}}',properties:{action:{"x-component":"ColumnAction"}}},id:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:80},title:ie("ID"),properties:{id:{type:"number","x-component":"Input","x-read-pretty":!0}}},createdAt:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:160},properties:{createdAt:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},summary:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",title:ie("Summary"),properties:{summary:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},user:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:140},title:ie("The Notified Person"),properties:{user:{"x-component":"ColumnUser","x-read-pretty":!0}}},workflow:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:null},title:'{{t("Workflow", { ns: "workflow" })}}',properties:{workflow:{"x-component":"ColumnWorkflow","x-read-pretty":!0}}},node:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:null},title:`{{t("Task node", { ns: "${Ie}" })}}`,properties:{node:{"x-component":"ColumnNode","x-read-pretty":!0}}}}}}};class Mi extends s.Plugin{load(){return O(this,null,function*(){this.app.addComponents({NoticeBlockProvider:gi,NoticeCenter:Oi})})}}function Go(){const e=W.uid();return{type:"void",name:e,"x-uid":e,"x-decorator-props":{collection:Yt,params:{appends:["user.id","user.nickname","node.id","node.title","job.id","job.status","job.result","workflow.id","workflow.title","workflow.enabled","execution.id","execution.status"]},action:"listCentralized"},"x-decorator":"NoticeBlockProvider","x-component":"CardItem","x-designer":"TableBlockDesigner","x-toolbar":"BlockSchemaToolbar","x-settings":"blockSettings:table",properties:{notice:{type:"void","x-component":"NoticeCenter"}}}}const Ei=()=>{const{insert:e}=s.useSchemaInitializer(),t=s.useSchemaInitializerItem(),o=b.useCallback(()=>{const n=Go();e(n)},[e,Go]);return r.jsx(s.SchemaInitializerItem,I(v({},t),{onClick:o}))};class $i extends s.Plugin{afterAdd(){return O(this,null,function*(){yield this.app.pm.add(Mi)})}load(){return O(this,null,function*(){this.app.addComponents({NoticeBlockInitializer:Ei}),this.app.schemaInitializerManager.get("page:addBlock").add("otherBlocks.workflow.common.notice",{key:"noticeBlock",name:"noticeBlock",type:"item",title:ie("Notice Center"),Component:"NoticeBlockInitializer",icon:"NotificationOutlined"})})}}class Bi extends s.Plugin{afterAdd(){return O(this,null,function*(){yield this.app.pm.add(ci),yield this.app.pm.add($i)})}}class Vi extends Qe{constructor(){super(...arguments),this.title=N("General event"),this.description=N("Omni Trigger is a versatile trigger. You can use it to trigger workflows in a table, trigger it from another workflow, or trigger it with a form button."),this.fieldset={bindCollection:{type:"boolean",title:N("Bind collection?"),"x-decorator":"FormItem","x-component":"Radio.Group",enum:[{label:N("Yes"),value:!0},{label:N("No"),value:!1}],required:!0,default:!1},collection:{type:"string",title:N("Collection"),"x-decorator":"FormItem","x-component":"DataSourceCollectionCascader",required:!0,"x-reactions":[{target:"changed",effects:["onFieldValueChange"],fulfill:{state:{value:[]}}},{dependencies:["bindCollection"],fulfill:{state:{visible:"{{!!$deps[0]}}"}}}]},appends:{type:"array",title:N("Associations to use"),description:N("Please select the associated fields that need to be accessed in subsequent nodes. With more than two levels of to-many associations may cause performance issue, please use with caution."),"x-decorator":"FormItem","x-component":"AppendsTreeSelect","x-component-props":{multiple:!0,useCollection(){var o;return(o=S.useForm().values)==null?void 0:o.collection}},"x-reactions":[{dependencies:["collection"],fulfill:{state:{visible:"{{!!$deps[0]}}"}}}]}},this.scope={useCollectionDataSource:s.useCollectionDataSource},this.components={},this.isActionTriggerable=(t,o={})=>{const{buttonAction:n}=o;return[n==="customize:triggerWorkflows",n==="submit"].some(l=>l===!0)}}useVariables(t,o){var l;const n=s.useCompile(),{getCollectionFields:i}=s.useCollectionManager_deprecated(),a=ue(I(v({appends:["user"]},o),{fields:[{collectionName:"users",name:"user",type:"hasOne",target:"users",uiSchema:{title:F("User acted")}}],compile:n,getCollectionFields:i}));return[...ue({appends:["data",...((l=t.appends)==null?void 0:l.map(c=>`data.${c}`))||[]],fields:[{collectionName:t.collection,name:"data",type:"hasOne",target:t.collection,uiSchema:{title:F("Trigger data")}}],compile:n,getCollectionFields:i}),...a,{label:F("Role of user acted"),value:"roleName"}]}useInitializers(t){return t.collection?{name:"triggerData",type:"item",key:"triggerData",title:N("Trigger data"),Component:Te,collection:t.collection,dataPath:"$context.data"}:null}}const Wi=()=>{const e=s.useSchemaInitializerItem();return r.jsx(s.BlockInitializer,I(v({},e),{schema:ji,item:e}))},ji={type:"void",title:N("Trigger workflow"),"x-component":"Action","x-use-component-props":"usePropsAPIRegular","x-align":"right","x-acl-action":"update","x-decorator":"ACLActionProvider","x-acl-action-props":{skipScopeCheck:!0},"x-toolbar":"ActionSchemaToolbar","x-settings":"actionSettings:APIRegular","x-action":"customize:triggerWorkflows","x-action-settings":{bindWorkflow:!1,updateMode:"selected",triggerWorkflows:[]},"x-component-props":{icon:"CarryOutOutlined"}},zi=[{name:"editButton",Component:s.ActionDesigner.ButtonEditor,useComponentProps(){const{buttonEditorProps:e}=s.useSchemaToolbar();return e}},{name:"workflowConfig",Component:s.WorkflowConfig,useVisible(){var t;const e=S.useFieldSchema();return S.isValid((t=e==null?void 0:e["x-action-settings"])==null?void 0:t.triggerWorkflows)}},{name:"remove",sort:100,Component:s.ActionDesigner.RemoveButton,useComponentProps(){const{removeButtonProps:e}=s.useSchemaToolbar();return e}}],Li=new s.SchemaSettings({name:"actionSettings:APIRegular",items:zi}),qi=()=>{const{field:e,resource:t,__parent:o,service:n}=s.useBlockRequestContext(),i=S.useFieldSchema(),a=b.useContext(S.SchemaExpressionScopeContext),l=s.useTableBlockContext(),{rowKey:c}=l,{t:d}=X.useTranslation();oe.useNavigate(),s.useCompile();const p=S.useField(),{modal:u,notification:f}=x.App.useApp(),h=s.useVariables(),{name:g,getField:y}=s.useCollection_deprecated(),w=s.useLocalVariables(),{run:A}=s.useRequest({resource:"workflows",action:"trigger"},{manual:!0});return s.useNoticeSub("workflow:regular",C=>{if(C.msg==="start")f.info({key:"workflow:regular",message:d("Start"),description:r.jsx(x.Progress,{percent:0}),duration:0});else if(C.msg==="progress"){const D=C.current+1,$=Math.floor(D/C.total*100)===100?3:0;f.info({key:"workflow:regular",message:`${d("Processing")}...`,description:r.jsx(x.Progress,{percent:Math.floor(D/C.total*100)}),duration:$})}else C.msg==="done"&&(f.success({key:"workflow:regular",message:d("Done"),description:r.jsx(x.Progress,{percent:100}),duration:3}),n.refresh())}),{onClick(){return O(this,null,function*(){var Y,se,V,M,L,R,H;const C=(M=(V=(se=(Y=l.field)==null?void 0:Y.data)==null?void 0:se.selectedRowKeys)!=null?V:a==null?void 0:a.selectedRecordKeys)!=null?M:[],{filter:D}=(R=(L=n.params)==null?void 0:L[0])!=null?R:{},{bindWorkflow:$=!1,triggerWorkflows:E=!1,assignedValues:P={},updateMode:B}=(H=i==null?void 0:i["x-action-settings"])!=null?H:{},_=B==="selected",z={primaryKey:c||"id",targetKeys:C};if(p.data=e.data||{},p.data.loading=!0,!E&&!$)return u.info({title:F("Not bind workflow!")});const J=Object.keys(P).map(G=>O(this,null,function*(){const re=P[G],Le=y(G);if(s.isVariable(re)){const xe=yield h==null?void 0:h.parseVariable(re,w);xe&&s.transformVariableValue(xe,{targetCollectionField:Le})}}));yield Promise.all(J),u.confirm({title:F("Confirm",{ns:"core"}),content:F("Trigger workflow?"),onOk(){return O(this,null,function*(){if($){const G={filterByTk:$,updateData:encodeURIComponent(JSON.stringify(z))};A(G)}else E&&(_?yield t.trigger({filterByTk:C,triggerWorkflows:E&&E.length>0?E.map(G=>[G.workflowKey,G.context].filter(Boolean).join("!")).join(","):[]}):yield t.trigger({filter:D,triggerWorkflows:E&&E.length>0?E.map(G=>[G.workflowKey,G.context].filter(Boolean).join("!")).join(","):[]}));p.data.loading=!1})},onCancel(){return O(this,null,function*(){p.data.loading=!1})}})})}}};class Ui extends s.Plugin{load(){return O(this,null,function*(){this.app.addComponents({APIRegularInitializer:Wi}),this.app.addScopes({usePropsAPIRegular:qi}),this.app.schemaSettingsManager.add(Li),["table","details"].forEach(t=>{this.app.schemaInitializerManager.addItem(`${t}:configureActions`,"customize.APIRegular",{title:N("Trigger workflow"),Component:"APIRegularInitializer",name:"apiRegular",useVisible(){const o=s.useCollection();return(o.template!=="view"||(o==null?void 0:o.writableView))&&o.template!=="file"&&o.template!=="sql"}})})})}}function Ki(){const e=S.useForm(),{field:t,__parent:o,resource:n}=s.useBlockRequestContext(),{setVisible:i}=s.useActionContext(),a=s.useFilterByTk(),l=oe.useNavigate(),c=S.useFieldSchema(),d=S.useField(),p=s.useCompile(),{modal:u}=x.App.useApp(),f=s.useCollectValuesToSubmit();return d.componentProps.filterKeys,{onClick(){return O(this,null,function*(){var T,C;const{onSuccess:g,skipValidator:y,triggerWorkflows:w}=(c==null?void 0:c["x-action-settings"])||{};y||(yield e.submit());const A=yield f();d.data=t.data||{},d.data.loading=!0;try{const D=yield n.trigger({values:A,filterByTk:a,triggerWorkflows:w!=null&&w.length?w.map($=>[$.workflowKey,$.context].filter(Boolean).join("!")).join(","):void 0});if(d.data.data=D,(C=(T=o==null?void 0:o.service)==null?void 0:T.refresh)==null||C.call(T),i==null||i(!1),!(g!=null&&g.successMessage))return;g!=null&&g.manualClose?u.success({title:p(g==null?void 0:g.successMessage),onOk:()=>O(this,null,function*(){return yield e.reset(),(g==null?void 0:g.redirecting)&&(g==null?void 0:g.redirectTo)&&(W.isURL(g.redirectTo)?window.location.href=g.redirectTo:l(g.redirectTo))})}):x.message.success(p(g==null?void 0:g.successMessage))}catch(D){console.error(D)}finally{d.data.loading=!1}})}}}function _i(){const e=s.useCompile(),t=s.useFilterByTk(),o=S.useField(),n=S.useFieldSchema(),{field:i,resource:a}=s.useBlockRequestContext(),{setVisible:l,setSubmitted:c}=s.useActionContext(),{modal:d}=x.App.useApp(),p=oe.useNavigate(),{onSuccess:u,triggerWorkflows:f}=(n==null?void 0:n["x-action-settings"])||{};return{onClick(g,y){return O(this,null,function*(){o.data=i.data||{},o.data.loading=!0;try{if(yield a.trigger({filterByTk:t,triggerWorkflows:f!=null&&f.length?f.map(w=>[w.workflowKey,w.context].filter(Boolean).join("!")).join(","):void 0}),y==null||y(),l==null||l(!1),c==null||c(!0),!(u!=null&&u.successMessage))return;u!=null&&u.manualClose?d.success({title:e(u==null?void 0:u.successMessage),onOk(){u!=null&&u.redirecting&&(u!=null&&u.redirectTo)&&(W.isURL(u.redirectTo)?window.location.href=u.redirectTo:p(u.redirectTo))}}):x.message.success(e(u==null?void 0:u.successMessage))}catch(w){console.error(w)}finally{o.data.loading=!1}})}}}const Qt={name:"triggerWorkflow",title:N("Trigger workflow"),Component:"CustomizeActionInitializer",schema:{title:N("Trigger workflow"),"x-component":"Action","x-use-component-props":"useFormWorkflowCustomActionProps","x-designer":"Action.Designer","x-action-settings":{skipValidator:!1,onSuccess:{manualClose:!0,redirecting:!1,successMessage:N("Submitted successfully")},triggerWorkflows:[]},"x-action":"customize:triggerWorkflows"}},vt={name:"triggerWorkflow",title:N("Trigger workflow"),Component:"CustomizeActionInitializer",schema:{title:N("Trigger workflow"),"x-component":"Action","x-use-component-props":"useRecordWorkflowCustomTriggerActionProps","x-designer":"Action.Designer","x-action-settings":{onSuccess:{manualClose:!0,redirecting:!1,successMessage:N("Submitted successfully")},triggerWorkflows:[]},"x-action":"customize:triggerWorkflows"}},Zt=I(v({},vt),{schema:I(v({},vt.schema),{"x-component":"Action.Link"})});class Gi extends s.Plugin{afterAdd(){return O(this,null,function*(){yield this.app.pm.add(Ui)})}load(){return O(this,null,function*(){this.app.pm.get("workflow").registerTrigger("general-action",Vi),this.app.addScopes({useFormWorkflowCustomActionProps:Ki,useRecordWorkflowCustomTriggerActionProps:_i}),this.app.schemaInitializerManager.get("FormActionInitializers").add("customize.triggerWorkflow",Qt),this.app.schemaInitializerManager.get("createForm:configureActions").add("customize.triggerWorkflow",Qt),this.app.schemaInitializerManager.get("editForm:configureActions").add("customize.triggerWorkflow",Qt),this.app.schemaInitializerManager.get("detailsWithPaging:configureActions").add("customize.triggerWorkflow",vt),this.app.schemaInitializerManager.get("details:configureActions").add("customize.triggerWorkflow",vt),this.app.schemaInitializerManager.get("table:configureItemActions").add("customize.triggerWorkflow",Zt),this.app.schemaInitializerManager.get("gridCard:configureItemActions").add("customize.triggerWorkflow",Zt),this.app.schemaInitializerManager.get("list:configureItemActions").add("customize.triggerWorkflow",Zt)})}}class Hi extends Q{constructor(){super(...arguments),this.title=`{{t("Parallel branch", { ns: "${m}" })}}`,this.type="parallel",this.group="control",this.icon="MergeOutlined",this.color="#6e93e8",this.description=`{{t("Run multiple branch processes in parallel.", { ns: "${m}" })}}`,this.fieldset={mode:{type:"string",title:`{{t("Mode", { ns: "${m}" })}}`,"x-decorator":"FormItem","x-component":"RadioWithTooltip","x-component-props":{options:[{value:"all",label:`{{t('All succeeded', { ns: "${m}" })}}`,tooltip:`{{t('Continue after all branches succeeded', { ns: "${m}" })}}`},{value:"allSettled",label:`{{t('All settled', { ns: "${m}" })}}`,tooltip:`{{t('Continue after all branches finished', { ns: "${m}" })}}`},{value:"any",label:`{{t('Any succeeded', { ns: "${m}" })}}`,tooltip:`{{t('Continue after any branch succeeded', { ns: "${m}" })}}`},{value:"race",label:`{{t('Any succeeded or failed', { ns: "${m}" })}}`,tooltip:`{{t('Continue after any branch succeeded, or exit after any branch failed.', { ns: "${m}" })}}`}]},default:"all"}},this.components={RadioWithTooltip:Oe}}Component({data:t}){const{styles:o}=ge(),{id:n,config:{mode:i}}=t,{workflow:a,nodes:l}=q(),c=l.reduce((y,w)=>w.upstreamId===n&&w.branchIndex!=null?y.concat(w):y,[]).sort((y,w)=>y.branchIndex-w.branchIndex),[d,p]=b.useState(Math.max(2,c.length)),{getAriaLabel:u}=dt(t),f=F("Add branch"),h=Array(Math.max(0,d-c.length)).fill(null),g=c[c.length-1];return r.jsx(nt,{data:t,children:r.jsxs("div",{className:o.nodeSubtreeClass,children:[r.jsxs("div",{className:o.branchBlockClass,children:[c.map(y=>r.jsx($e,{from:t,entry:y,branchIndex:y.branchIndex},y.id)),h.map((y,w)=>r.jsx($e,{from:t,branchIndex:(g?g.branchIndex:0)+w+1,controller:c.length+w>1?r.jsx("div",{className:s.css`
|
|
508
508
|
padding-top: 2em;
|
|
509
509
|
|
|
510
510
|
> button {
|
package/dist/externalVersion.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
"react": "18.3.1",
|
|
3
|
-
"@tachybase/client": "0.23.
|
|
3
|
+
"@tachybase/client": "0.23.48",
|
|
4
4
|
"@ant-design/icons": "5.3.7",
|
|
5
5
|
"antd": "5.22.5",
|
|
6
6
|
"lodash": "4.17.21",
|
|
7
|
-
"@tachybase/utils": "0.23.
|
|
7
|
+
"@tachybase/utils": "0.23.48",
|
|
8
8
|
"react-i18next": "15.2.0",
|
|
9
9
|
"react-router-dom": "6.28.1",
|
|
10
|
-
"@tachybase/schema": "0.23.
|
|
11
|
-
"@tachybase/database": "0.23.
|
|
12
|
-
"@tachybase/logger": "0.23.
|
|
13
|
-
"@tachybase/server": "0.23.
|
|
14
|
-
"@tachybase/evaluators": "0.23.
|
|
15
|
-
"@tachybase/components": "0.23.
|
|
16
|
-
"@tachybase/actions": "0.23.
|
|
17
|
-
"@tachybase/data-source": "0.23.
|
|
10
|
+
"@tachybase/schema": "0.23.48",
|
|
11
|
+
"@tachybase/database": "0.23.48",
|
|
12
|
+
"@tachybase/logger": "0.23.48",
|
|
13
|
+
"@tachybase/server": "0.23.48",
|
|
14
|
+
"@tachybase/evaluators": "0.23.48",
|
|
15
|
+
"@tachybase/components": "0.23.48",
|
|
16
|
+
"@tachybase/actions": "0.23.48",
|
|
17
|
+
"@tachybase/data-source": "0.23.48",
|
|
18
18
|
"axios": "1.7.7",
|
|
19
19
|
"sequelize": "6.37.5",
|
|
20
|
-
"@tachybase/plugin-workflow-test": "0.23.
|
|
21
|
-
"@tachybase/test": "0.23.
|
|
22
|
-
"@tachybase/module-error-handler": "0.23.
|
|
23
|
-
"@tachybase/resourcer": "0.23.
|
|
24
|
-
"@tachybase/module-ui-schema": "0.23.
|
|
20
|
+
"@tachybase/plugin-workflow-test": "0.23.48",
|
|
21
|
+
"@tachybase/test": "0.23.48",
|
|
22
|
+
"@tachybase/module-error-handler": "0.23.48",
|
|
23
|
+
"@tachybase/resourcer": "0.23.48",
|
|
24
|
+
"@tachybase/module-ui-schema": "0.23.48"
|
|
25
25
|
};
|
package/dist/locale/en-US.json
CHANGED
|
@@ -279,6 +279,7 @@
|
|
|
279
279
|
"Trigger type": "Trigger type",
|
|
280
280
|
"Trigger variables": "Trigger variables",
|
|
281
281
|
"Trigger workflow": "Trigger workflow",
|
|
282
|
+
"Trigger workflow?": "Trigger workflow?",
|
|
282
283
|
"Triggered at": "Triggered at",
|
|
283
284
|
"Triggered only if one of the selected fields changes. If unselected, it means that it will be triggered when any field changes. When record is added or deleted, any field is considered to have been changed.": "Triggered only if one of the selected fields changes. If unselected, it means that it will be triggered when any field changes. When record is added or deleted, any field is considered to have been changed.",
|
|
284
285
|
"True": "True",
|
|
@@ -311,6 +312,7 @@
|
|
|
311
312
|
"Withdrawable": "Withdrawable",
|
|
312
313
|
"Withdrawn": "Withdrawn",
|
|
313
314
|
"Workflow": "Workflow",
|
|
315
|
+
"Workflow on your action failed, please contact the administrator": "Workflow on your action failed, please contact the administrator",
|
|
314
316
|
"Workflow todos": "Workflow todos",
|
|
315
317
|
"comment": "comment",
|
|
316
318
|
"concat": "concat",
|
package/dist/locale/zh-CN.json
CHANGED
|
@@ -354,6 +354,7 @@
|
|
|
354
354
|
"Trigger type": "触发方式",
|
|
355
355
|
"Trigger variables": "触发器变量",
|
|
356
356
|
"Trigger workflow": "触发工作流",
|
|
357
|
+
"Trigger workflow?": "是否执行工作流",
|
|
357
358
|
"Triggered at": "触发时间",
|
|
358
359
|
"Triggered but still waiting in queue to execute.": "已触发但仍在队列中等待执行。",
|
|
359
360
|
"Triggered only if one of the selected fields changes. If unselected, it means that it will be triggered when any field changes. When record is added or deleted, any field is considered to have been changed.": "只有被选中的某个字段发生变动时才会触发。如果不选择,则表示任何字段变动时都会触发。新增或删除数据时,任意字段都被认为发生变动。",
|
|
@@ -398,6 +399,7 @@
|
|
|
398
399
|
"Withdraw": "撤回",
|
|
399
400
|
"Withdrawn": "撤回",
|
|
400
401
|
"Workflow": "工作流",
|
|
402
|
+
"Workflow on your action failed, please contact the administrator": "工作流执行失败, 请联系管理员",
|
|
401
403
|
"Workflow todos": "工作流待办",
|
|
402
404
|
"Workflow will be triggered before deleting succeeded.": "删除成功之前触发工作流。",
|
|
403
405
|
"Workflow will be triggered before or after submitting succeeded based on workflow type.": "工作流会基于其类型在提交成功之前或之后触发。",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@babel/core","version":"7.26.0","description":"Babel compiler core.","main":"./lib/index.js","author":"The Babel Team (https://babel.dev/team)","license":"MIT","publishConfig":{"access":"public"},"repository":{"type":"git","url":"https://github.com/babel/babel.git","directory":"packages/babel-core"},"homepage":"https://babel.dev/docs/en/next/babel-core","bugs":"https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20core%22+is%3Aopen","keywords":["6to5","babel","classes","const","es6","harmony","let","modules","transpile","transpiler","var","babel-core","compiler"],"engines":{"node":">=6.9.0"},"funding":{"type":"opencollective","url":"https://opencollective.com/babel"},"browser":{"./lib/config/files/index.js":"./lib/config/files/index-browser.js","./lib/config/resolve-targets.js":"./lib/config/resolve-targets-browser.js","./lib/transform-file.js":"./lib/transform-file-browser.js","./src/config/files/index.ts":"./src/config/files/index-browser.ts","./src/config/resolve-targets.ts":"./src/config/resolve-targets-browser.ts","./src/transform-file.ts":"./src/transform-file-browser.ts"},"dependencies":{"@ampproject/remapping":"^2.2.0","@babel/code-frame":"^7.26.0","@babel/generator":"^7.26.0","@babel/helper-compilation-targets":"^7.25.9","@babel/helper-module-transforms":"^7.26.0","@babel/helpers":"^7.26.0","@babel/parser":"^7.26.0","@babel/template":"^7.25.9","@babel/traverse":"^7.25.9","@babel/types":"^7.26.0","convert-source-map":"^2.0.0","debug":"^4.1.0","gensync":"^1.0.0-beta.2","json5":"^2.2.3","semver":"^6.3.1"},"devDependencies":{"@babel/helper-transform-fixture-test-runner":"^7.26.0","@babel/plugin-syntax-flow":"^7.26.0","@babel/plugin-transform-flow-strip-types":"^7.25.9","@babel/plugin-transform-modules-commonjs":"^7.25.9","@babel/preset-env":"^7.26.0","@babel/preset-typescript":"^7.26.0","@jridgewell/trace-mapping":"^0.3.25","@types/convert-source-map":"^2.0.0","@types/debug":"^4.1.0","@types/gensync":"^1.0.0","@types/resolve":"^1.3.2","@types/semver":"^5.4.0","rimraf":"^3.0.0","ts-node":"^11.0.0-beta.1"},"type":"commonjs","_lastModified":"2025-02-
|
|
1
|
+
{"name":"@babel/core","version":"7.26.0","description":"Babel compiler core.","main":"./lib/index.js","author":"The Babel Team (https://babel.dev/team)","license":"MIT","publishConfig":{"access":"public"},"repository":{"type":"git","url":"https://github.com/babel/babel.git","directory":"packages/babel-core"},"homepage":"https://babel.dev/docs/en/next/babel-core","bugs":"https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20core%22+is%3Aopen","keywords":["6to5","babel","classes","const","es6","harmony","let","modules","transpile","transpiler","var","babel-core","compiler"],"engines":{"node":">=6.9.0"},"funding":{"type":"opencollective","url":"https://opencollective.com/babel"},"browser":{"./lib/config/files/index.js":"./lib/config/files/index-browser.js","./lib/config/resolve-targets.js":"./lib/config/resolve-targets-browser.js","./lib/transform-file.js":"./lib/transform-file-browser.js","./src/config/files/index.ts":"./src/config/files/index-browser.ts","./src/config/resolve-targets.ts":"./src/config/resolve-targets-browser.ts","./src/transform-file.ts":"./src/transform-file-browser.ts"},"dependencies":{"@ampproject/remapping":"^2.2.0","@babel/code-frame":"^7.26.0","@babel/generator":"^7.26.0","@babel/helper-compilation-targets":"^7.25.9","@babel/helper-module-transforms":"^7.26.0","@babel/helpers":"^7.26.0","@babel/parser":"^7.26.0","@babel/template":"^7.25.9","@babel/traverse":"^7.25.9","@babel/types":"^7.26.0","convert-source-map":"^2.0.0","debug":"^4.1.0","gensync":"^1.0.0-beta.2","json5":"^2.2.3","semver":"^6.3.1"},"devDependencies":{"@babel/helper-transform-fixture-test-runner":"^7.26.0","@babel/plugin-syntax-flow":"^7.26.0","@babel/plugin-transform-flow-strip-types":"^7.25.9","@babel/plugin-transform-modules-commonjs":"^7.25.9","@babel/preset-env":"^7.26.0","@babel/preset-typescript":"^7.26.0","@jridgewell/trace-mapping":"^0.3.25","@types/convert-source-map":"^2.0.0","@types/debug":"^4.1.0","@types/gensync":"^1.0.0","@types/resolve":"^1.3.2","@types/semver":"^5.4.0","rimraf":"^3.0.0","ts-node":"^11.0.0-beta.1"},"type":"commonjs","_lastModified":"2025-02-21T11:06:26.111Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"cron-parser","version":"4.9.0","description":"Node.js library for parsing crontab instructions","main":"lib/parser.js","types":"types/index.d.ts","typesVersions":{"<4.1":{"*":["types/ts3/*"]}},"directories":{"test":"test"},"scripts":{"test:tsd":"tsd","test:unit":"TZ=UTC tap ./test/*.js","test:cover":"TZ=UTC tap --coverage-report=html ./test/*.js","lint":"eslint .","lint:fix":"eslint --fix .","test":"npm run lint && npm run test:unit && npm run test:tsd"},"repository":{"type":"git","url":"https://github.com/harrisiirak/cron-parser.git"},"keywords":["cron","crontab","parser"],"author":"Harri Siirak","contributors":["Nicholas Clawson","Daniel Prentis <daniel@salsitasoft.com>","Renault John Lecoultre","Richard Astbury <richard.astbury@gmail.com>","Meaglin Wasabi <Meaglin.wasabi@gmail.com>","Mike Kusold <hello@mikekusold.com>","Alex Kit <alex.kit@atmajs.com>","Santiago Gimeno <santiago.gimeno@gmail.com>","Daniel <darc.tec@gmail.com>","Christian Steininger <christian.steininger.cs@gmail.com>","Mykola Piskovyi <m.piskovyi@gmail.com>","Brian Vaughn <brian.david.vaughn@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Yasuhiroki <yasuhiroki.duck@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Brendan Warkentin <faazshift@gmail.com>","Charlie Fish <fishcharlie.code@gmail.com>","Ian Graves <ian+diskimage@iangrav.es>","Andy Thompson <me@andytson.com>","Regev Brody <regevbr@gmail.com>"],"license":"MIT","dependencies":{"luxon":"^3.2.1"},"devDependencies":{"eslint":"^8.27.0","sinon":"^15.0.1","tap":"^16.3.3","tsd":"^0.26.0"},"engines":{"node":">=12.0.0"},"browser":{"fs":false},"tap":{"check-coverage":false},"tsd":{"directory":"test","compilerOptions":{"lib":["es2017","dom"]}},"files":["lib","types","LICENSE","README.md"],"_lastModified":"2025-02-
|
|
1
|
+
{"name":"cron-parser","version":"4.9.0","description":"Node.js library for parsing crontab instructions","main":"lib/parser.js","types":"types/index.d.ts","typesVersions":{"<4.1":{"*":["types/ts3/*"]}},"directories":{"test":"test"},"scripts":{"test:tsd":"tsd","test:unit":"TZ=UTC tap ./test/*.js","test:cover":"TZ=UTC tap --coverage-report=html ./test/*.js","lint":"eslint .","lint:fix":"eslint --fix .","test":"npm run lint && npm run test:unit && npm run test:tsd"},"repository":{"type":"git","url":"https://github.com/harrisiirak/cron-parser.git"},"keywords":["cron","crontab","parser"],"author":"Harri Siirak","contributors":["Nicholas Clawson","Daniel Prentis <daniel@salsitasoft.com>","Renault John Lecoultre","Richard Astbury <richard.astbury@gmail.com>","Meaglin Wasabi <Meaglin.wasabi@gmail.com>","Mike Kusold <hello@mikekusold.com>","Alex Kit <alex.kit@atmajs.com>","Santiago Gimeno <santiago.gimeno@gmail.com>","Daniel <darc.tec@gmail.com>","Christian Steininger <christian.steininger.cs@gmail.com>","Mykola Piskovyi <m.piskovyi@gmail.com>","Brian Vaughn <brian.david.vaughn@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Yasuhiroki <yasuhiroki.duck@gmail.com>","Nicholas Clawson <nickclaw@gmail.com>","Brendan Warkentin <faazshift@gmail.com>","Charlie Fish <fishcharlie.code@gmail.com>","Ian Graves <ian+diskimage@iangrav.es>","Andy Thompson <me@andytson.com>","Regev Brody <regevbr@gmail.com>"],"license":"MIT","dependencies":{"luxon":"^3.2.1"},"devDependencies":{"eslint":"^8.27.0","sinon":"^15.0.1","tap":"^16.3.3","tsd":"^0.26.0"},"engines":{"node":">=12.0.0"},"browser":{"fs":false},"tap":{"check-coverage":false},"tsd":{"directory":"test","compilerOptions":{"lib":["es2017","dom"]}},"files":["lib","types","LICENSE","README.md"],"_lastModified":"2025-02-21T11:06:26.346Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"author":"Felix Geisendörfer <felix@debuggable.com> (http://debuggable.com/)","name":"form-data","description":"A library to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.","version":"4.0.1","repository":{"type":"git","url":"git://github.com/form-data/form-data.git"},"main":"./lib/form_data","browser":"./lib/browser","typings":"./index.d.ts","scripts":{"pretest":"npm run lint","pretests-only":"rimraf coverage test/tmp","tests-only":"istanbul cover test/run.js","posttests-only":"istanbul report lcov text","test":"npm run tests-only","posttest":"npx npm@'>=10.2' audit --production","lint":"eslint --ext=js,mjs .","report":"istanbul report lcov text","ci-lint":"is-node-modern 8 && npm run lint || is-node-not-modern 8","ci-test":"npm run tests-only && npm run browser && npm run report","predebug":"rimraf coverage test/tmp","debug":"verbose=1 ./test/run.js","browser":"browserify -t browserify-istanbul test/run-browser.js | obake --coverage","check":"istanbul check-coverage coverage/coverage*.json","files":"pkgfiles --sort=name","get-version":"node -e \"console.log(require('./package.json').version)\"","update-readme":"sed -i.bak 's/\\/master\\.svg/\\/v'$(npm --silent run get-version)'.svg/g' README.md","restore-readme":"mv README.md.bak README.md","prepublish":"in-publish && npm run update-readme || not-in-publish","postpublish":"npm run restore-readme"},"pre-commit":["lint","ci-test","check"],"engines":{"node":">= 6"},"dependencies":{"asynckit":"^0.4.0","combined-stream":"^1.0.8","mime-types":"^2.1.12"},"devDependencies":{"@types/node":"^12.0.10","browserify":"^13.1.1","browserify-istanbul":"^2.0.0","coveralls":"^3.0.4","cross-spawn":"^6.0.5","eslint":"^6.0.1","fake":"^0.2.2","far":"^0.0.7","formidable":"^1.0.17","in-publish":"^2.0.0","is-node-modern":"^1.0.0","istanbul":"^0.4.5","obake":"^0.1.2","puppeteer":"^1.19.0","pkgfiles":"^2.3.0","pre-commit":"^1.1.3","request":"^2.88.0","rimraf":"^2.7.1","tape":"^4.6.2","typescript":"^3.5.2"},"license":"MIT","_lastModified":"2025-02-
|
|
1
|
+
{"author":"Felix Geisendörfer <felix@debuggable.com> (http://debuggable.com/)","name":"form-data","description":"A library to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.","version":"4.0.1","repository":{"type":"git","url":"git://github.com/form-data/form-data.git"},"main":"./lib/form_data","browser":"./lib/browser","typings":"./index.d.ts","scripts":{"pretest":"npm run lint","pretests-only":"rimraf coverage test/tmp","tests-only":"istanbul cover test/run.js","posttests-only":"istanbul report lcov text","test":"npm run tests-only","posttest":"npx npm@'>=10.2' audit --production","lint":"eslint --ext=js,mjs .","report":"istanbul report lcov text","ci-lint":"is-node-modern 8 && npm run lint || is-node-not-modern 8","ci-test":"npm run tests-only && npm run browser && npm run report","predebug":"rimraf coverage test/tmp","debug":"verbose=1 ./test/run.js","browser":"browserify -t browserify-istanbul test/run-browser.js | obake --coverage","check":"istanbul check-coverage coverage/coverage*.json","files":"pkgfiles --sort=name","get-version":"node -e \"console.log(require('./package.json').version)\"","update-readme":"sed -i.bak 's/\\/master\\.svg/\\/v'$(npm --silent run get-version)'.svg/g' README.md","restore-readme":"mv README.md.bak README.md","prepublish":"in-publish && npm run update-readme || not-in-publish","postpublish":"npm run restore-readme"},"pre-commit":["lint","ci-test","check"],"engines":{"node":">= 6"},"dependencies":{"asynckit":"^0.4.0","combined-stream":"^1.0.8","mime-types":"^2.1.12"},"devDependencies":{"@types/node":"^12.0.10","browserify":"^13.1.1","browserify-istanbul":"^2.0.0","coveralls":"^3.0.4","cross-spawn":"^6.0.5","eslint":"^6.0.1","fake":"^0.2.2","far":"^0.0.7","formidable":"^1.0.17","in-publish":"^2.0.0","is-node-modern":"^1.0.0","istanbul":"^0.4.5","obake":"^0.1.2","puppeteer":"^1.19.0","pkgfiles":"^2.3.0","pre-commit":"^1.1.3","request":"^2.88.0","rimraf":"^2.7.1","tape":"^4.6.2","typescript":"^3.5.2"},"license":"MIT","_lastModified":"2025-02-21T11:06:21.626Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"jsonata","version":"2.0.6","description":"JSON query and transformation language","module":"jsonata.js","main":"jsonata.js","typings":"jsonata.d.ts","homepage":"http://jsonata.org/","repository":{"type":"git","url":"https://github.com/jsonata-js/jsonata.git"},"scripts":{"pretest":"npm run lint","mocha":"nyc ./node_modules/mocha/bin/_mocha -- \"test/**/*.js\"","test":"npm run mocha","posttest":"npm run check-coverage && npm run browserify && npm run minify && npm run build-es5","build-es5":"npm run mkdir-dist && npm run regenerator && npm run browserify-es5 && npm run minify-es5","check-coverage":"nyc check-coverage --statements 100 --branches 100 --functions 100 --lines 100","browserify":"browserify src/jsonata.js --outfile jsonata.js --standalone jsonata","mkdir-dist":"mkdirp ./dist","regenerator":"babel src --out-dir dist --presets=@babel/env","browserify-es5":"regenerator --include-runtime polyfill.js > jsonata-es5.js; browserify dist/jsonata.js --standalone jsonata >> jsonata-es5.js","prepublishOnly":"npm run browserify && npm run minify && npm run build-es5","lint":"eslint src","doc":"jsdoc --configure jsdoc.json .","cover":"nyc _mocha","minify":"uglifyjs jsonata.js -o jsonata.min.js --compress --mangle","minify-es5":"uglifyjs jsonata-es5.js -o jsonata-es5.min.js --compress --mangle"},"license":"MIT","keywords":["JSON","query","transformation","transform","mapping","path"],"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.8.4","@babel/preset-env":"^7.8.4","browserify":"^16.5.0","chai":"^4.2.0","chai-as-promised":"^7.1.1","eslint":"8.0.0","eslint-plugin-ideal":"^0.1.3","eslint-plugin-promise":"^6.0.0","jsdoc":"^3.6.3","mkdirp":"^1.0.3","mocha":"^7.0.1","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","regenerator":"^0.14.4","request":"^2.88.2","uglify-es":"^3.3.10"},"engines":{"node":">= 8"},"_lastModified":"2025-02-
|
|
1
|
+
{"name":"jsonata","version":"2.0.6","description":"JSON query and transformation language","module":"jsonata.js","main":"jsonata.js","typings":"jsonata.d.ts","homepage":"http://jsonata.org/","repository":{"type":"git","url":"https://github.com/jsonata-js/jsonata.git"},"scripts":{"pretest":"npm run lint","mocha":"nyc ./node_modules/mocha/bin/_mocha -- \"test/**/*.js\"","test":"npm run mocha","posttest":"npm run check-coverage && npm run browserify && npm run minify && npm run build-es5","build-es5":"npm run mkdir-dist && npm run regenerator && npm run browserify-es5 && npm run minify-es5","check-coverage":"nyc check-coverage --statements 100 --branches 100 --functions 100 --lines 100","browserify":"browserify src/jsonata.js --outfile jsonata.js --standalone jsonata","mkdir-dist":"mkdirp ./dist","regenerator":"babel src --out-dir dist --presets=@babel/env","browserify-es5":"regenerator --include-runtime polyfill.js > jsonata-es5.js; browserify dist/jsonata.js --standalone jsonata >> jsonata-es5.js","prepublishOnly":"npm run browserify && npm run minify && npm run build-es5","lint":"eslint src","doc":"jsdoc --configure jsdoc.json .","cover":"nyc _mocha","minify":"uglifyjs jsonata.js -o jsonata.min.js --compress --mangle","minify-es5":"uglifyjs jsonata-es5.js -o jsonata-es5.min.js --compress --mangle"},"license":"MIT","keywords":["JSON","query","transformation","transform","mapping","path"],"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.8.4","@babel/preset-env":"^7.8.4","browserify":"^16.5.0","chai":"^4.2.0","chai-as-promised":"^7.1.1","eslint":"8.0.0","eslint-plugin-ideal":"^0.1.3","eslint-plugin-promise":"^6.0.0","jsdoc":"^3.6.3","mkdirp":"^1.0.3","mocha":"^7.0.1","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","regenerator":"^0.14.4","request":"^2.88.2","uglify-es":"^3.3.10"},"engines":{"node":">= 8"},"_lastModified":"2025-02-21T11:06:22.647Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"commonjs","_lastModified":"2025-02-
|
|
1
|
+
{"type":"commonjs","_lastModified":"2025-02-21T11:06:21.339Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"mime-types","description":"The ultimate javascript content-type utility.","version":"2.1.35","contributors":["Douglas Christopher Wilson <doug@somethingdoug.com>","Jeremiah Senkpiel <fishrock123@rocketmail.com> (https://searchbeam.jit.su)","Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"],"license":"MIT","keywords":["mime","types"],"repository":"jshttp/mime-types","dependencies":{"mime-db":"1.52.0"},"devDependencies":{"eslint":"7.32.0","eslint-config-standard":"14.1.1","eslint-plugin-import":"2.25.4","eslint-plugin-markdown":"2.2.1","eslint-plugin-node":"11.1.0","eslint-plugin-promise":"5.2.0","eslint-plugin-standard":"4.1.0","mocha":"9.2.2","nyc":"15.1.0"},"files":["HISTORY.md","LICENSE","index.js"],"engines":{"node":">= 0.6"},"scripts":{"lint":"eslint .","test":"mocha --reporter spec test/test.js","test-ci":"nyc --reporter=lcov --reporter=text npm test","test-cov":"nyc --reporter=html --reporter=text npm test"},"_lastModified":"2025-02-
|
|
1
|
+
{"name":"mime-types","description":"The ultimate javascript content-type utility.","version":"2.1.35","contributors":["Douglas Christopher Wilson <doug@somethingdoug.com>","Jeremiah Senkpiel <fishrock123@rocketmail.com> (https://searchbeam.jit.su)","Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"],"license":"MIT","keywords":["mime","types"],"repository":"jshttp/mime-types","dependencies":{"mime-db":"1.52.0"},"devDependencies":{"eslint":"7.32.0","eslint-config-standard":"14.1.1","eslint-plugin-import":"2.25.4","eslint-plugin-markdown":"2.2.1","eslint-plugin-node":"11.1.0","eslint-plugin-promise":"5.2.0","eslint-plugin-standard":"4.1.0","mocha":"9.2.2","nyc":"15.1.0"},"files":["HISTORY.md","LICENSE","index.js"],"engines":{"node":">= 0.6"},"scripts":{"lint":"eslint .","test":"mocha --reporter spec test/test.js","test-ci":"nyc --reporter=lcov --reporter=text npm test","test-cov":"nyc --reporter=html --reporter=text npm test"},"_lastModified":"2025-02-21T11:06:21.783Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"qrcode","description":"QRCode / 2d Barcode api with both server side and client side support using canvas","version":"1.5.4","author":"Ryan Day <soldair@gmail.com>","contributors":["Vincenzo Greco <greco.vincenzo@gmail.com>","Linus Unnebäck <linus@folkdatorn.se>"],"keywords":["qr","code","canvas","qrcode"],"main":"./lib/index.js","browser":{"./lib/index.js":"./lib/browser.js","fs":false},"files":["bin","build","lib","helper"],"homepage":"http://github.com/soldair/node-qrcode","license":"MIT","scripts":{"lint":"standard","pretest":"npm run lint","test":"node --throw-deprecation test.js","build":"rollup -c","prepublish":"npm run build","browser":"node examples/clientsideserver.js"},"bin":{"qrcode":"./bin/qrcode"},"dependencies":{"dijkstrajs":"^1.0.1","pngjs":"^5.0.0","yargs":"^15.3.1"},"devDependencies":{"@babel/core":"^7.9.0","@babel/preset-env":"^7.9.5","@rollup/plugin-commonjs":"^11.1.0","@rollup/plugin-node-resolve":"^7.1.3","browserify":"^16.5.1","canvas":"^2.8.0","canvasutil":"0.0.4","colors":"^1.4.0","express":"^4.17.1","htmlparser2":"^4.1.0","rollup":"^2.6.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-terser":"^5.3.0","sinon":"^9.0.2","standard":"^16.0.4","tap":"^16.2.0"},"repository":{"type":"git","url":"git://github.com/soldair/node-qrcode.git"},"engines":{"node":">=10.13.0"},"standard":{"ignore":["build/","examples/vendors/","lib/core/regex.js"]},"_lastModified":"2025-02-
|
|
1
|
+
{"name":"qrcode","description":"QRCode / 2d Barcode api with both server side and client side support using canvas","version":"1.5.4","author":"Ryan Day <soldair@gmail.com>","contributors":["Vincenzo Greco <greco.vincenzo@gmail.com>","Linus Unnebäck <linus@folkdatorn.se>"],"keywords":["qr","code","canvas","qrcode"],"main":"./lib/index.js","browser":{"./lib/index.js":"./lib/browser.js","fs":false},"files":["bin","build","lib","helper"],"homepage":"http://github.com/soldair/node-qrcode","license":"MIT","scripts":{"lint":"standard","pretest":"npm run lint","test":"node --throw-deprecation test.js","build":"rollup -c","prepublish":"npm run build","browser":"node examples/clientsideserver.js"},"bin":{"qrcode":"./bin/qrcode"},"dependencies":{"dijkstrajs":"^1.0.1","pngjs":"^5.0.0","yargs":"^15.3.1"},"devDependencies":{"@babel/core":"^7.9.0","@babel/preset-env":"^7.9.5","@rollup/plugin-commonjs":"^11.1.0","@rollup/plugin-node-resolve":"^7.1.3","browserify":"^16.5.1","canvas":"^2.8.0","canvasutil":"0.0.4","colors":"^1.4.0","express":"^4.17.1","htmlparser2":"^4.1.0","rollup":"^2.6.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-terser":"^5.3.0","sinon":"^9.0.2","standard":"^16.0.4","tap":"^16.2.0"},"repository":{"type":"git","url":"git://github.com/soldair/node-qrcode.git"},"engines":{"node":">=10.13.0"},"standard":{"ignore":["build/","examples/vendors/","lib/core/regex.js"]},"_lastModified":"2025-02-21T11:06:22.214Z"}
|
|
@@ -112,7 +112,10 @@ const _RequestInterceptionTrigger = class _RequestInterceptionTrigger extends im
|
|
|
112
112
|
}
|
|
113
113
|
if (processor.execution.status < import_constants.EXECUTION_STATUS.STARTED) {
|
|
114
114
|
if ((lastNode == null ? void 0 : lastNode.type) !== "end") {
|
|
115
|
-
return context.throw(
|
|
115
|
+
return context.throw(
|
|
116
|
+
500,
|
|
117
|
+
context.t("Workflow on your action failed, please contact the administrator", { ns: "workflow" })
|
|
118
|
+
);
|
|
116
119
|
}
|
|
117
120
|
const err = new RequestInterceptionError("Request is intercepted by workflow");
|
|
118
121
|
err.status = 400;
|
|
@@ -131,7 +131,10 @@ const _OmniTrigger = class _OmniTrigger extends import_triggers.default {
|
|
|
131
131
|
}
|
|
132
132
|
if (processor.execution.status < import_constants.EXECUTION_STATUS.STARTED) {
|
|
133
133
|
if ((lastNode == null ? void 0 : lastNode.type) !== "end") {
|
|
134
|
-
return context.throw(
|
|
134
|
+
return context.throw(
|
|
135
|
+
500,
|
|
136
|
+
context.t("Workflow on your action failed, please contact the administrator", { ns: "workflow" })
|
|
137
|
+
);
|
|
135
138
|
}
|
|
136
139
|
const err = new CustomActionInterceptionError("Request is intercepted by workflow");
|
|
137
140
|
err.status = 400;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tachybase/module-workflow",
|
|
3
3
|
"displayName": "Workflow",
|
|
4
|
-
"version": "0.23.
|
|
4
|
+
"version": "0.23.48",
|
|
5
5
|
"description": "A powerful BPM tool that provides foundational support for business automation, with the capability to extend unlimited triggers and nodes.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"Workflow"
|
|
@@ -35,24 +35,24 @@
|
|
|
35
35
|
"react-js-cron": "^3.2.0",
|
|
36
36
|
"react-router-dom": "6.28.1",
|
|
37
37
|
"sequelize": "^6.37.5",
|
|
38
|
-
"@tachybase/
|
|
39
|
-
"@tachybase/
|
|
38
|
+
"@tachybase/plugin-workflow-test": "0.23.48",
|
|
39
|
+
"@tachybase/components": "0.23.48"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@tachybase/actions": "0.23.
|
|
43
|
-
"@tachybase/database": "0.23.
|
|
44
|
-
"@tachybase/client": "0.23.
|
|
45
|
-
"@tachybase/
|
|
46
|
-
"@tachybase/
|
|
47
|
-
"@tachybase/
|
|
48
|
-
"@tachybase/module-collection": "0.23.
|
|
49
|
-
"@tachybase/module-
|
|
50
|
-
"@tachybase/
|
|
51
|
-
"@tachybase/
|
|
52
|
-
"@tachybase/server": "0.23.
|
|
53
|
-
"@tachybase/schema": "0.23.
|
|
54
|
-
"@tachybase/test": "0.23.
|
|
55
|
-
"@tachybase/utils": "0.23.
|
|
42
|
+
"@tachybase/actions": "0.23.48",
|
|
43
|
+
"@tachybase/database": "0.23.48",
|
|
44
|
+
"@tachybase/client": "0.23.48",
|
|
45
|
+
"@tachybase/evaluators": "0.23.48",
|
|
46
|
+
"@tachybase/logger": "0.23.48",
|
|
47
|
+
"@tachybase/data-source": "0.23.48",
|
|
48
|
+
"@tachybase/module-collection": "0.23.48",
|
|
49
|
+
"@tachybase/module-user": "0.23.48",
|
|
50
|
+
"@tachybase/resourcer": "0.23.48",
|
|
51
|
+
"@tachybase/module-error-handler": "0.23.48",
|
|
52
|
+
"@tachybase/server": "0.23.48",
|
|
53
|
+
"@tachybase/schema": "0.23.48",
|
|
54
|
+
"@tachybase/test": "0.23.48",
|
|
55
|
+
"@tachybase/utils": "0.23.48"
|
|
56
56
|
},
|
|
57
57
|
"description.zh-CN": "一个强大的 BPM 工具,为业务自动化提供基础支持,并且可任意扩展更多的触发器和节点。",
|
|
58
58
|
"displayName.zh-CN": "工作流",
|