@5minds/processcube_app_sdk 0.0.1-develop-bafa68-ljwsdd45 → 0.0.1-develop-67a1d9-ljwtoaen
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/package.json +2 -2
- package/server/index.cjs +1 -1
- package/server/index.d.ts +1 -1
- package/server/index.mjs +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@5minds/processcube_app_sdk",
|
|
3
|
-
"version": "0.0.1-develop-
|
|
3
|
+
"version": "0.0.1-develop-67a1d9-ljwtoaen",
|
|
4
4
|
"description": "The SDK for ProcessCube Apps",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "common/index.cjs",
|
|
@@ -78,6 +78,6 @@
|
|
|
78
78
|
"dependencies": {
|
|
79
79
|
"@5minds/processcube_engine_client": "^4.3.1",
|
|
80
80
|
"client-only": "^0.0.1",
|
|
81
|
-
"server
|
|
81
|
+
"only-server": "^0.0.1"
|
|
82
82
|
}
|
|
83
83
|
}
|
package/server/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var u=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var k=Object.prototype.hasOwnProperty;var w=(s,t)=>{for(var e in t)u(s,e,{get:t[e],enumerable:!0})},y=(s,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of T(t))!k.call(s,n)&&n!==e&&u(s,n,{get:()=>t[n],enumerable:!(r=I(t,n))||r.enumerable});return s};var U=s=>y(u({},"__esModule",{value:!0}),s);var S={};w(S,{default:()=>B,finishTask:()=>R,finishUserTaskAndGetNext:()=>M,hardNavigate:()=>C,startProcess:()=>D,waitForUserTaskByProcessInstanceId:()=>h});module.exports=U(S);var K=require("server
|
|
1
|
+
"use strict";var u=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var k=Object.prototype.hasOwnProperty;var w=(s,t)=>{for(var e in t)u(s,e,{get:t[e],enumerable:!0})},y=(s,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of T(t))!k.call(s,n)&&n!==e&&u(s,n,{get:()=>t[n],enumerable:!(r=I(t,n))||r.enumerable});return s};var U=s=>y(u({},"__esModule",{value:!0}),s);var S={};w(S,{default:()=>B,finishTask:()=>R,finishUserTaskAndGetNext:()=>M,hardNavigate:()=>C,startProcess:()=>D,waitForUserTaskByProcessInstanceId:()=>h});module.exports=U(S);var K=require("only-server");var x=process.env.PROCESSCUBE_ENGINE_URL||"http://localhost:10560";function a(){return x}function l(s){s=s}var i=require("@5minds/processcube_engine_client");var N=a(),o=new i.EngineClient(N);async function E(s){return(await o.userTasks.query({flowNodeInstanceId:s})).userTasks[0]}async function P(s,t){let e=await o.userTasks.query({processInstanceId:s,flowNodeId:t});return e.totalCount==0?null:e.userTasks[0]}async function h(s,t){return new Promise(async e=>{let r=o.userTasks.onUserTaskWaiting(async c=>{if(c.processInstanceId===s&&c.flowNodeId===t){let m=await E(c.flowNodeInstanceId);e(m)}}),n=await P(s,t);n&&e(n),await r})}async function M(s,t,e){await o.userTasks.finishUserTask(s,t);let r=await o.userTasks.query({flowNodeId:e,state:i.DataModels.FlowNodeInstances.FlowNodeInstanceState.suspended});return r.totalCount>0?r.userTasks[0]:null}var f=require("next/cache"),d=require("next/navigation");async function C(s,t){(0,f.revalidatePath)(s),(0,d.redirect)(s,t)}var p=require("@5minds/processcube_engine_client");var F=a(),g=new p.EngineClient(F);async function D(s){return await g.processModels.startProcessInstance({processModelId:s})}async function R(s,t){await g.userTasks.finishUserTask(s,t)}var B={config:({engineUrl:s})=>{typeof s=="string"&&l(s)}};0&&(module.exports={finishTask,finishUserTaskAndGetNext,hardNavigate,startProcess,waitForUserTaskByProcessInstanceId});
|
package/server/index.d.ts
CHANGED
package/server/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"server
|
|
1
|
+
import"only-server";var f=process.env.PROCESSCUBE_ENGINE_URL||"http://localhost:10560";function o(){return f}function c(s){s=s}import{EngineClient as d,DataModels as p}from"@5minds/processcube_engine_client";var g=o(),n=new d(g);async function m(s){return(await n.userTasks.query({flowNodeInstanceId:s})).userTasks[0]}async function I(s,t){let e=await n.userTasks.query({processInstanceId:s,flowNodeId:t});return e.totalCount==0?null:e.userTasks[0]}async function E(s,t){return new Promise(async e=>{let r=n.userTasks.onUserTaskWaiting(async a=>{if(a.processInstanceId===s&&a.flowNodeId===t){let l=await m(a.flowNodeInstanceId);e(l)}}),i=await I(s,t);i&&e(i),await r})}async function P(s,t,e){await n.userTasks.finishUserTask(s,t);let r=await n.userTasks.query({flowNodeId:e,state:p.FlowNodeInstances.FlowNodeInstanceState.suspended});return r.totalCount>0?r.userTasks[0]:null}import{revalidatePath as T}from"next/cache";import{redirect as k}from"next/navigation";async function R(s,t){T(s),k(s,t)}import{EngineClient as w}from"@5minds/processcube_engine_client";var y=o(),u=new w(y);async function _(s){return await u.processModels.startProcessInstance({processModelId:s})}async function A(s,t){await u.userTasks.finishUserTask(s,t)}var z={config:({engineUrl:s})=>{typeof s=="string"&&c(s)}};export{z as default,A as finishTask,P as finishUserTaskAndGetNext,R as hardNavigate,_ as startProcess,E as waitForUserTaskByProcessInstanceId};
|