@5minds/processcube_app_sdk 0.0.1-develop-0a3c29-ljsn38ye → 0.0.1-develop-bafa68-ljwsdd45

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.
@@ -0,0 +1 @@
1
+ "use strict";"use client";var i=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var u=(e,r)=>{for(var n in r)i(e,n,{get:r[n],enumerable:!0})},l=(e,r,n,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of f(r))!m.call(e,o)&&o!==n&&i(e,o,{get:()=>r[o],enumerable:!(t=c(r,o))||t.enumerable});return e};var s=e=>l(i({},"__esModule",{value:!0}),e);var D={};u(D,{DynamicLink:()=>y});module.exports=s(D);var v=require("client-only");var p=require("next/navigation"),a=require("react/jsx-runtime");function y({href:e,children:r}){let n=(0,p.useRouter)();return(0,a.jsx)("a",{href:e,onClick:t=>{t.preventDefault(),n.replace(e),n.refresh()},children:r})}0&&(module.exports={DynamicLink});
@@ -0,0 +1 @@
1
+ "use client";import"client-only";import{useRouter as t}from"next/navigation";import{jsx as i}from"react/jsx-runtime";function a({href:r,children:n}){let e=t();return i("a",{href:r,onClick:o=>{o.preventDefault(),e.replace(r),e.refresh()},children:n})}export{a as DynamicLink};
@@ -0,0 +1 @@
1
+ "use strict";var i=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var f=(e,r)=>{for(var o in r)i(e,o,{get:r[o],enumerable:!0})},d=(e,r,o,m)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of p(r))!a.call(e,t)&&t!==o&&i(e,t,{get:()=>r[t],enumerable:!(m=h(r,t))||m.enumerable});return e};var R=e=>d(i({},"__esModule",{value:!0}),e);var k={};f(k,{RemoteUserTask:()=>g});module.exports=R(k);var s=require("react/jsx-runtime");function g(e){return(0,s.jsx)("div",{style:{width:"100%",height:"100%"},children:(0,s.jsx)("iframe",{width:"100%",height:"100%",src:e.url})})}0&&(module.exports={RemoteUserTask});
package/package.json CHANGED
@@ -1,33 +1,41 @@
1
1
  {
2
2
  "name": "@5minds/processcube_app_sdk",
3
- "version": "0.0.1-develop-0a3c29-ljsn38ye",
3
+ "version": "0.0.1-develop-bafa68-ljwsdd45",
4
4
  "description": "The SDK for ProcessCube Apps",
5
5
  "type": "module",
6
- "main": "common/index.js",
7
- "module": "common/index.js",
8
- "browser": "client/index.js",
6
+ "main": "common/index.cjs",
7
+ "module": "common/index.mjs",
8
+ "browser": "client/index.mjs",
9
9
  "types": "common/index.d.ts",
10
10
  "exports": {
11
11
  ".": {
12
12
  "types": "./common/index.d.ts",
13
- "default": "./common/index.js"
13
+ "require": "./common/index.cjs",
14
+ "default": "./common/index.mjs"
14
15
  },
15
16
  "./server": {
16
17
  "types": "./server/index.d.ts",
17
- "default": "./server/index.js"
18
+ "require": "./server/index.cjs",
19
+ "default": "./server/index.mjs"
18
20
  },
19
21
  "./client": {
20
22
  "types": "./client/index.d.ts",
21
- "default": "./client/index.js"
23
+ "require": "./client/index.cjs",
24
+ "default": "./client/index.mjs"
22
25
  }
23
26
  },
24
27
  "scripts": {
25
28
  "clean": "rm -rf server common client",
26
29
  "prepare": "npm run build:prod",
27
30
  "test": "echo \"Error: no test specified\" && exit 1",
28
- "build": "NODE_ENV=development esbuild src/**/*.ts --outdir=. --packages=external --bundle --format=esm --analyze=verbose && tsc --emitDeclarationOnly && tsc -p tsconfig.common.json --emitDeclarationOnly && tsc -p tsconfig.client.json --emitDeclarationOnly",
29
- "build:prod": "npm run clean && NODE_ENV=production esbuild src/**/*.ts --outdir=. --packages=external --bundle --format=esm --tree-shaking=true --splitting --minify --drop:console && tsc --emitDeclarationOnly && tsc -p tsconfig.common.json --emitDeclarationOnly && tsc -p tsconfig.client.json --emitDeclarationOnly",
30
- "watch": "NODE_ENV=development concurrently --kill-others -n=esbuild,tsc:server,tsc:common,tsc:client \"esbuild src/**/*.ts --watch --outdir=. --format=esm --bundle --packages=external\" \"tsc --watch --emitDeclarationOnly\" \"tsc -p tsconfig.common.json --watch --emitDeclarationOnly\" \"tsc -p tsconfig.client.json --watch --emitDeclarationOnly\""
31
+ "build": "concurrently -n=build:esm,build:commonjs,build:types \"npm run build:esm\" \"npm run build:commonjs\" \"npm run build:types\"",
32
+ "build:esm": "NODE_ENV=development esbuild src/**/*.ts --outdir=. --packages=external --bundle --format=esm --analyze=verbose --out-extension:.js=.mjs",
33
+ "build:commonjs": "NODE_ENV=development esbuild src/**/*.ts --outdir=. --packages=external --bundle --platform=node --out-extension:.js=.cjs --analyze=verbose",
34
+ "build:types": "tsc --emitDeclarationOnly && tsc -p tsconfig.common.json --emitDeclarationOnly && tsc -p tsconfig.client.json --emitDeclarationOnly",
35
+ "build:prod": "npm run clean && concurrently -n=build:prod:esm,build:prod:commonjs,build:types \"npm run build:prod:esm\" \"npm run build:prod:commonjs\" \"npm run build:types\"",
36
+ "build:prod:esm": "NODE_ENV=production esbuild src/**/*.ts --outdir=. --packages=external --bundle --format=esm --tree-shaking=true --splitting --minify --drop:console --out-extension:.js=.mjs",
37
+ "build:prod:commonjs": "NODE_ENV=production esbuild src/**/*.ts --outdir=. --packages=external --bundle --platform=node --out-extension:.js=.cjs --tree-shaking=true --minify --drop:console",
38
+ "watch": "NODE_ENV=development concurrently --kill-others -n=esbuild:esm,esbuild:comonjs,tsc:server,tsc:common,tsc:client \"esbuild src/**/*.ts --watch --outdir=. --format=esm --bundle --packages=external --out-extension:.js=.mjs\" \"esbuild src/**/*.ts --watch --outdir=. --platform=node --bundle --packages=external --out-extension:.js=.cjs\" \"tsc -p tsconfig.json --watch --preserveWatchOutput --emitDeclarationOnly\" \"tsc -p tsconfig.common.json --watch --preserveWatchOutput --emitDeclarationOnly\" \"tsc -p tsconfig.client.json --watch --preserveWatchOutput --emitDeclarationOnly\""
31
39
  },
32
40
  "repository": {
33
41
  "type": "git",
@@ -0,0 +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-only");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/client/index.js DELETED
@@ -1 +0,0 @@
1
- import"client-only";import{useRouter as t}from"next/navigation";import{jsx as i}from"react/jsx-runtime";function a({href:r,children:o}){let e=t();return i("a",{href:r,onClick:n=>{n.preventDefault(),e.replace(r),e.refresh()},children:o})}export{a as DynamicLink};
File without changes
File without changes