@nocobase/plugin-workflow-javascript 2.0.3
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/LICENSE +201 -0
- package/README.md +99 -0
- package/client.d.ts +2 -0
- package/client.js +1 -0
- package/dist/client/907399554f340b0a.js +10 -0
- package/dist/client/CodeEditor.d.ts +8 -0
- package/dist/client/ScriptInstruction.d.ts +129 -0
- package/dist/client/d608e8e5c2f2b5cf.js +10 -0
- package/dist/client/index.d.ts +5 -0
- package/dist/client/index.js +10 -0
- package/dist/externalVersion.js +23 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +48 -0
- package/dist/locale/de-DE.json +33 -0
- package/dist/locale/en-US.json +33 -0
- package/dist/locale/es-ES.json +33 -0
- package/dist/locale/fr-FR.json +33 -0
- package/dist/locale/hu-HU.json +33 -0
- package/dist/locale/id-ID.json +33 -0
- package/dist/locale/index.d.ts +12 -0
- package/dist/locale/index.js +54 -0
- package/dist/locale/it-IT.json +33 -0
- package/dist/locale/ja-JP.json +33 -0
- package/dist/locale/ko-KR.json +33 -0
- package/dist/locale/ko_KR.json +25 -0
- package/dist/locale/nl-NL.json +33 -0
- package/dist/locale/pt-BR.json +33 -0
- package/dist/locale/ru-RU.json +33 -0
- package/dist/locale/tr-TR.json +33 -0
- package/dist/locale/uk-UA.json +33 -0
- package/dist/locale/vi-VN.json +33 -0
- package/dist/locale/zh-CN.json +33 -0
- package/dist/locale/zh-TW.json +33 -0
- package/dist/node_modules/winston-transport/.babelrc +3 -0
- package/dist/node_modules/winston-transport/.eslintrc +7 -0
- package/dist/node_modules/winston-transport/.gitattributes +1 -0
- package/dist/node_modules/winston-transport/.nyc_output/c1bd7935-644d-4c7a-89c1-24531a04e4cc.json +1 -0
- package/dist/node_modules/winston-transport/.nyc_output/processinfo/c1bd7935-644d-4c7a-89c1-24531a04e4cc.json +1 -0
- package/dist/node_modules/winston-transport/.nyc_output/processinfo/index.json +1 -0
- package/dist/node_modules/winston-transport/LICENSE +22 -0
- package/dist/node_modules/winston-transport/dist/index.js +8 -0
- package/dist/node_modules/winston-transport/dist/legacy.js +116 -0
- package/dist/node_modules/winston-transport/dist/modern.js +212 -0
- package/dist/node_modules/winston-transport/index.d.ts +39 -0
- package/dist/node_modules/winston-transport/index.js +3 -0
- package/dist/node_modules/winston-transport/legacy.js +119 -0
- package/dist/node_modules/winston-transport/modern.js +211 -0
- package/dist/node_modules/winston-transport/node_modules/readable-stream/errors-browser.js +127 -0
- package/dist/node_modules/winston-transport/node_modules/readable-stream/errors.js +116 -0
- package/dist/node_modules/winston-transport/node_modules/readable-stream/experimentalWarning.js +17 -0
- package/dist/node_modules/winston-transport/node_modules/readable-stream/lib/_stream_duplex.js +126 -0
- package/dist/node_modules/winston-transport/node_modules/readable-stream/lib/_stream_passthrough.js +37 -0
- package/dist/node_modules/winston-transport/node_modules/readable-stream/lib/_stream_readable.js +1027 -0
- package/dist/node_modules/winston-transport/node_modules/readable-stream/lib/_stream_transform.js +190 -0
- package/dist/node_modules/winston-transport/node_modules/readable-stream/lib/_stream_writable.js +641 -0
- package/dist/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/async_iterator.js +180 -0
- package/dist/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/buffer_list.js +183 -0
- package/dist/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/destroy.js +96 -0
- package/dist/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +86 -0
- package/dist/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/from-browser.js +3 -0
- package/dist/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/from.js +52 -0
- package/dist/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/pipeline.js +86 -0
- package/dist/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/state.js +22 -0
- package/dist/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
- package/dist/node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
- package/dist/node_modules/winston-transport/node_modules/readable-stream/package.json +68 -0
- package/dist/node_modules/winston-transport/node_modules/readable-stream/readable-browser.js +9 -0
- package/dist/node_modules/winston-transport/node_modules/readable-stream/readable.js +16 -0
- package/dist/node_modules/winston-transport/package.json +1 -0
- package/dist/server/ScriptInstruction.d.ts +45 -0
- package/dist/server/ScriptInstruction.js +175 -0
- package/dist/server/Vm.js +100 -0
- package/dist/server/cache-logger.d.ts +6 -0
- package/dist/server/cache-logger.js +56 -0
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js +42 -0
- package/dist/server/plugin.d.ts +11 -0
- package/dist/server/plugin.js +68 -0
- package/package.json +40 -0
- package/server.d.ts +2 -0
- package/server.js +1 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { SchemaInitializerItemType } from '@nocobase/client';
|
|
2
|
+
import { Instruction, WorkflowVariableInput } from '@nocobase/plugin-workflow/client';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { SubModelItem } from '@nocobase/flow-engine';
|
|
5
|
+
declare function useScriptDescription(): React.JSX.Element;
|
|
6
|
+
export default class extends Instruction {
|
|
7
|
+
title: string;
|
|
8
|
+
type: string;
|
|
9
|
+
group: string;
|
|
10
|
+
description: string;
|
|
11
|
+
icon: React.JSX.Element;
|
|
12
|
+
fieldset: {
|
|
13
|
+
arguments: {
|
|
14
|
+
type: string;
|
|
15
|
+
title: string;
|
|
16
|
+
description: string;
|
|
17
|
+
'x-decorator': string;
|
|
18
|
+
'x-component': string;
|
|
19
|
+
default: any[];
|
|
20
|
+
items: {
|
|
21
|
+
type: string;
|
|
22
|
+
'x-component': string;
|
|
23
|
+
properties: {
|
|
24
|
+
name: {
|
|
25
|
+
type: string;
|
|
26
|
+
'x-decorator': string;
|
|
27
|
+
'x-component': string;
|
|
28
|
+
'x-component-props': {
|
|
29
|
+
placeholder: string;
|
|
30
|
+
};
|
|
31
|
+
'x-validator': (value: any, rule: any, ctx: any) => string | true;
|
|
32
|
+
};
|
|
33
|
+
value: {
|
|
34
|
+
type: string;
|
|
35
|
+
'x-decorator': string;
|
|
36
|
+
'x-component': string;
|
|
37
|
+
'x-component-props': {
|
|
38
|
+
changeOnSelect: boolean;
|
|
39
|
+
useTypedConstant: boolean;
|
|
40
|
+
placeholder: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
remove: {
|
|
44
|
+
type: string;
|
|
45
|
+
'x-decorator': string;
|
|
46
|
+
'x-component': string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
properties: {
|
|
51
|
+
add: {
|
|
52
|
+
type: string;
|
|
53
|
+
title: string;
|
|
54
|
+
'x-component': string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
content: {
|
|
59
|
+
type: string;
|
|
60
|
+
title: string;
|
|
61
|
+
description: string;
|
|
62
|
+
'x-decorator': string;
|
|
63
|
+
'x-component': string;
|
|
64
|
+
default: string;
|
|
65
|
+
};
|
|
66
|
+
timeout: {
|
|
67
|
+
type: string;
|
|
68
|
+
title: string;
|
|
69
|
+
description: string;
|
|
70
|
+
'x-decorator': string;
|
|
71
|
+
'x-component': string;
|
|
72
|
+
'x-component-props': {
|
|
73
|
+
min: number;
|
|
74
|
+
className: string;
|
|
75
|
+
addonAfter: string;
|
|
76
|
+
};
|
|
77
|
+
default: number;
|
|
78
|
+
};
|
|
79
|
+
continue: {
|
|
80
|
+
type: string;
|
|
81
|
+
'x-decorator': string;
|
|
82
|
+
'x-component': string;
|
|
83
|
+
'x-content': string;
|
|
84
|
+
default: boolean;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
scope: {
|
|
88
|
+
useScriptDescription: typeof useScriptDescription;
|
|
89
|
+
};
|
|
90
|
+
components: {
|
|
91
|
+
ArrayItems: import("@formily/reactive-react").ReactFC<React.HTMLAttributes<HTMLDivElement>> & import("@formily/antd-v5").ArrayBaseMixins & {
|
|
92
|
+
Item: import("@formily/reactive-react").ReactFC<React.HTMLAttributes<HTMLDivElement> & {
|
|
93
|
+
type?: "card" | "divide";
|
|
94
|
+
}>;
|
|
95
|
+
};
|
|
96
|
+
CodeEditor: React.LazyExoticComponent<React.FC<{
|
|
97
|
+
onChange: Function;
|
|
98
|
+
value: string;
|
|
99
|
+
disabled: boolean;
|
|
100
|
+
}>>;
|
|
101
|
+
WorkflowVariableInput: typeof WorkflowVariableInput;
|
|
102
|
+
Space: React.ForwardRefExoticComponent<import("antd").SpaceProps & React.RefAttributes<HTMLDivElement>> & {
|
|
103
|
+
Compact: React.FC<import("antd/es/space/Compact").SpaceCompactProps>;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
useVariables({ key, title }: {
|
|
107
|
+
key: any;
|
|
108
|
+
title: any;
|
|
109
|
+
}, { types, fieldNames }: {
|
|
110
|
+
types: any;
|
|
111
|
+
fieldNames?: {
|
|
112
|
+
readonly label: "label";
|
|
113
|
+
readonly value: "value";
|
|
114
|
+
readonly children: "children";
|
|
115
|
+
};
|
|
116
|
+
}): {
|
|
117
|
+
value: any;
|
|
118
|
+
label: any;
|
|
119
|
+
};
|
|
120
|
+
useInitializers(node: any): SchemaInitializerItemType;
|
|
121
|
+
/**
|
|
122
|
+
* 2.0
|
|
123
|
+
*/
|
|
124
|
+
getCreateModelMenuItem({ node }: {
|
|
125
|
+
node: any;
|
|
126
|
+
}): SubModelItem;
|
|
127
|
+
testable: boolean;
|
|
128
|
+
}
|
|
129
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
"use strict";(self.webpackChunk_nocobase_plugin_workflow_javascript=self.webpackChunk_nocobase_plugin_workflow_javascript||[]).push([["222"],{1706:function(e,r,n){n.r(r);var t,o,a=n(8156),i=n.n(a),c=n(687),l=n(990),u=n(7055),s=n(7402),f=n(4779),d=n(115),h=n(2749);function v(e,r,n,t,o,a,i){try{var c=e[a](i),l=c.value}catch(e){n(e);return}c.done?r(l):Promise.resolve(l).then(t,o)}function b(){var e,r,n=(e=["\n display: flex;\n width: 100%;\n height: 20em;\n\n .cm-editor {\n width: 100%;\n border-radius: ","px;\n border: 1px solid ",";\n &:hover {\n border-color: ",";\n }\n overflow: hidden;\n\n &.cm-focused {\n border-color: ",";\n outline: none;\n }\n }\n "],r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}})));return b=function(){return n},n}var p=(0,n(8202).createStyles)(function(e){var r=e.token;return{box:(0,e.css)(b(),r.borderRadius,r.colorBorder,r.colorPrimaryHover,r.colorPrimaryHover)}}),m=l.tk.theme({".cm-scroller":{backgroundColor:"#f0f0f0"}}),y=l.tk.theme({".cm-scroller":{backgroundColor:"#fff"}}),w=(0,f.ir)((t=function(e){var r;return function(e,r){var n,t,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(a){return function(c){var l=[a,c];if(n)throw TypeError("Generator is already executing.");for(;i;)try{if(n=1,t&&(o=2&l[0]?t.return:l[0]?t.throw||((o=t.return)&&o.call(t),0):t.next)&&!(o=o.call(t,l[1])).done)return o;switch(t=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,t=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=r.call(e,i)}catch(e){l=[6,e],t=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(n){return r=e.state.doc.toString(),(0,d.JSHINT)(r,{esversion:11,asi:!1,browser:!0,undef:!0,unused:!0,strict:"global",module:!0}),[2,(d.JSHINT.errors||[]).map(function(r){if(!r)return null;try{var n=e.state.doc.line(r.line||1),t=Math.min(Math.max(0,r.character-1),n.length),o=t;if(r.evidence){var a,i=(null==(a=r.evidence.slice(t).match(/^\w+|./))?void 0:a[0])||"";o=Math.min(t+i.length,n.length)}return{from:n.from+t,to:n.from+o,message:r.reason||"Syntax error",severity:r.code&&r.code.startsWith("W")?"warning":"error",source:"jshint"}}catch(e){return console.warn("Error processing lint result:",e),null}}).filter(Boolean)]})},o=function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function i(e){v(a,n,o,i,c,"next",e)}function c(e){v(a,n,o,i,c,"throw",e)}i(void 0)})},function(e){return o.apply(this,arguments)}));r.default=function(e){var r=e.onChange,n=e.value,t=e.disabled,o=(0,a.useRef)(null),f=(0,h.useMemoizedFn)(function(e){r&&r(e)}),d=p().styles,v=new u.F6;return(0,a.useEffect)(function(){var e=u.yy.create({doc:n,extensions:[c.Xy,(0,s.eJ)(),v.of(w),l.tk.updateListener.of(function(e){e.docChanged&&f(e.state.doc.toString())}),l.tk.editable.of(!t),t?m:y]}),r=new l.tk({state:e,parent:o.current});return function(){r.destroy()}},[t]),i().createElement("div",{ref:o,className:d.box})}}}]);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("ahooks"),require("@nocobase/client"),require("@nocobase/plugin-workflow/client"),require("@formily/antd-v5"),require("react"),require("@ant-design/icons"),require("lodash"),require("antd"),require("antd-style"),require("react-i18next")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-javascript",["ahooks","@nocobase/client","@nocobase/plugin-workflow/client","@formily/antd-v5","react","@ant-design/icons","lodash","antd","antd-style","react-i18next"],t):"object"==typeof exports?exports["@nocobase/plugin-workflow-javascript"]=t(require("ahooks"),require("@nocobase/client"),require("@nocobase/plugin-workflow/client"),require("@formily/antd-v5"),require("react"),require("@ant-design/icons"),require("lodash"),require("antd"),require("antd-style"),require("react-i18next")):e["@nocobase/plugin-workflow-javascript"]=t(e.ahooks,e["@nocobase/client"],e["@nocobase/plugin-workflow/client"],e["@formily/antd-v5"],e.react,e["@ant-design/icons"],e.lodash,e.antd,e["antd-style"],e["react-i18next"])}(self,function(e,t,n,r,o,i,c,u,a,l){return function(){var s,p,f,d,b,y,m={3581:function(e){e.exports=function(e,t){return"undefined"!=typeof __deoptimization_sideEffect__&&__deoptimization_sideEffect__(e,t),t}},482:function(e){"use strict";e.exports=i},4632:function(e){"use strict";e.exports=r},3772:function(e){"use strict";e.exports=t},8433:function(e){"use strict";e.exports=n},2749:function(t){"use strict";t.exports=e},2721:function(e){"use strict";e.exports=u},8202:function(e){"use strict";e.exports=a},467:function(e){"use strict";e.exports=c},8156:function(e){"use strict";e.exports=o},3238:function(e){"use strict";e.exports=l}},v={};function h(e){var t=v[e];if(void 0!==t)return t.exports;var n=v[e]={exports:{}};return m[e](n,n.exports,h),n.exports}h.m=m,h.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return h.d(t,{a:t}),t},h.d=function(e,t){for(var n in t)h.o(t,n)&&!h.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},h.f={},h.e=function(e){return Promise.all(Object.keys(h.f).reduce(function(t,n){return h.f[n](e,t),t},[]))},h.u=function(e){return""+({222:"d608e8e5c2f2b5cf",701:"907399554f340b0a"})[e]+".js"},h.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),h.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s={},p="@nocobase/plugin-workflow-javascript:",h.l=function(e,t,n,r){if(s[e])return void s[e].push(t);if(void 0!==n)for(var o,i,c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var a=c[u];if(a.getAttribute("src")==e||a.getAttribute("data-webpack")==p+n){o=a;break}}o||(i=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,h.nc&&o.setAttribute("nonce",h.nc),o.setAttribute("data-webpack",p+n),o.src=e),s[e]=[t];var l=function(t,n){o.onerror=o.onload=null,clearTimeout(f);var r=s[e];if(delete s[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},f=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),i&&document.head.appendChild(o)},h.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(f=window.__webpack_public_path__||"/").endsWith("/")||(f+="/"),h.p=f+"static/plugins/@nocobase/plugin-workflow-javascript/dist/client/",d={909:0},h.f.j=function(e,t){var n=h.o(d,e)?d[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=d[e]=[t,r]});t.push(n[2]=r);var o=h.p+h.u(e),i=Error();h.l(o,function(t){if(h.o(d,e)&&(0!==(n=d[e])&&(d[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",i.name="ChunkLoadError",i.type=r,i.request=o,n[1](i)}},"chunk-"+e,e)}},b=function(e,t){var n,r,o=t[0],i=t[1],c=t[2],u=0;if(o.some(function(e){return 0!==d[e]})){for(n in i)h.o(i,n)&&(h.m[n]=i[n]);c&&c(h)}for(e&&e(t);u<o.length;u++)r=o[u],h.o(d,r)&&d[r]&&d[r][0](),d[r]=0},(y=self.webpackChunk_nocobase_plugin_workflow_javascript=self.webpackChunk_nocobase_plugin_workflow_javascript||[]).forEach(b.bind(null,0)),y.push=b.bind(null,y.push.bind(y));var g={};return!function(){"use strict";h.r(g),h.d(g,{PluginWorkflowScriptClient:function(){return _},default:function(){return S}});var e=h(3772),t=h(4632),n=h(482),r=h(8433),o=h(2721),i=h(8156),c=h.n(i);h(3238);var u="workflow-javascript";function a(t){var n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.i18n.t(t,(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},o),r=r={ns:u},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n))}var l=h(3581);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d=function(){return!!e})()}var b=(0,i.lazy)(function(){return l("imported_-9r67ij_component",Promise.all([h.e("701"),h.e("222")]).then(h.bind(h,1706)))});function y(){return c().createElement("div",null,c().createElement("span",null,a("Node.js features supported can be found in the documentaion: ")),c().createElement("a",{href:a("https://docs.nocobase.com/handbook/workflow-javascript"),target:"_blank",rel:"noreferrer"},a("JavaScript node")))}var m=function(e){var i;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function l(){var e,i,f;if(!(this instanceof l))throw TypeError("Cannot call a class as a function");return i=l,f=arguments,i=p(i),s(e=function(e,t){var n;if(t&&("object"==((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,d()?Reflect.construct(i,f||[],p(this).constructor):i.apply(this,f)),"title","JavaScript"),s(e,"type","script"),s(e,"group","extended"),s(e,"description",'{{t("Execute a piece of JavaScript in an isolated Node.js environment.", { ns: "'.concat(u,'" })}}')),s(e,"icon",c().createElement(n.CodeOutlined,null)),s(e,"fieldset",{arguments:{type:"array",title:'{{t("Arguments", { ns: "'.concat(u,'" })}}'),description:'{{t("The arguments that will be used in script with same name.", { ns: "'.concat(u,'" })}}'),"x-decorator":"FormItem","x-component":"ArrayItems",default:[],items:{type:"object","x-component":"Space",properties:{name:{type:"string","x-decorator":"FormItem","x-component":"Input","x-component-props":{placeholder:'{{t("Name")}}'},"x-validator":function(e,t,n){var r=RegExp("^[\\p{L}$_][\\p{L}\\p{N}$_]*$","u"),o=n.form.getValuesIn().arguments.filter(function(t){return t.name===e});return r.test(e)?!(o.length>1)||a("Argument name duplicated"):a("Argument name is invalid")}},value:{type:"string","x-decorator":"FormItem","x-component":"WorkflowVariableInput","x-component-props":{changeOnSelect:!0,useTypedConstant:!0,placeholder:'{{t("Value")}}'}},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}},properties:{add:{type:"void",title:'{{t("Add argument", { ns: "'.concat(u,'" })}}'),"x-component":"ArrayItems.Addition"}}},content:{type:"string",title:'{{t("Script content", { ns: "'.concat(u,'" })}}'),description:"{{useScriptDescription()}}","x-decorator":"FormItem","x-component":"CodeEditor",default:'return "Hello world!";'},timeout:{type:"number",title:'{{t("Timeout", { ns: "'.concat(u,'" })}}'),description:'{{t("The maximum execution time of the script. 0 means no timeout.", { ns: "'.concat(u,'" })}}'),"x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{min:0,className:"auto-width",addonAfter:'{{t("Milliseconds", { ns: "'.concat(u,'" })}}')},default:0},continue:{type:"boolean","x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Continue when exception thrown", { ns: "'.concat(u,'" })}}'),default:!1}}),s(e,"scope",{useScriptDescription:y}),s(e,"components",{ArrayItems:t.ArrayItems,CodeEditor:b,WorkflowVariableInput:r.WorkflowVariableInput,Space:o.Space}),s(e,"testable",!0),e}return l.prototype=Object.create(e&&e.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),e&&f(l,e),i=[{key:"useVariables",value:function(e,t){var n=e.key,o=e.title,i=t.types;return(void 0===t.fieldNames&&r.defaultFieldNames,i&&!i.some(function(e){return e in r.BaseTypeSets||Object.values(r.BaseTypeSets).some(function(t){return t.has(e)})}))?null:{value:n,label:o}}},{key:"useInitializers",value:function(e){var t,n;return{name:null!=(t=e.title)?t:"#".concat(e.id),type:"item",title:null!=(n=e.title)?n:"#".concat(e.id),Component:r.ValueBlock.Initializer,node:e,resultTitle:a("Script result")}}},{key:"getCreateModelMenuItem",value:function(e){var t,n,r=e.node;return{key:null!=(t=r.title)?t:"#".concat(r.id),label:null!=(n=r.title)?n:"#".concat(r.id),useModel:"NodeValueModel",createModelOptions:{use:"NodeValueModel",stepParams:{valueSettings:{init:{dataSource:"{{$jobsMapByNodeKey.".concat(r.key,"}}"),defaultValue:a("Script result")}},cardSettings:{titleDescription:{title:'{{t("JavaScript", { ns: "'.concat(u,'" })}}')}}}}}}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(l.prototype,i),l}(r.Instruction);function v(e,t,n,r,o,i,c){try{var u=e[i](c),a=u.value}catch(e){n(e);return}u.done?t(a):Promise.resolve(a).then(r,o)}function w(e,t,n){return(w=k()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&j(o,n.prototype),o}).apply(null,arguments)}function x(e){return(x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function j(e,t){return(j=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function O(e){var t="function"==typeof Map?new Map:void 0;return(O=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return w(e,arguments,x(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),j(n,e)})(e)}function k(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(k=function(){return!!e})()}var _=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return e=n,t=arguments,e=x(e),function(e,t){var n;if(t&&("object"==((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,k()?Reflect.construct(e,t||[],x(this).constructor):e.apply(this,t))}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&j(n,e),t=[{key:"load",value:function(){var e,t=this;return(e=function(){return function(e,t){var n,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){var a=[i,u];if(n)throw TypeError("Generator is already executing.");for(;c;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return c.label++,{value:a[1],done:!1};case 5:c.label++,r=a[1],a=[0];continue;case 7:a=c.ops.pop(),c.trys.pop();continue;default:if(!(o=(o=c.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){c=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){c.label=a[1];break}if(6===a[0]&&c.label<o[1]){c.label=o[1],o=a;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(a);break}o[2]&&c.ops.pop(),c.trys.pop();continue}a=t.call(e,c)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}}(this,function(e){return t.app.pm.get("workflow").registerInstruction("script",m),[2]})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function c(e){v(i,r,o,c,u,"next",e)}function u(e){v(i,r,o,c,u,"throw",e)}c(void 0)})})()}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(O(e.Plugin)),S=_}(),g}()});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
module.exports = {
|
|
11
|
+
"react": "18.2.0",
|
|
12
|
+
"ahooks": "3.7.8",
|
|
13
|
+
"antd-style": "3.7.1",
|
|
14
|
+
"@formily/antd-v5": "1.2.3",
|
|
15
|
+
"@ant-design/icons": "5.6.1",
|
|
16
|
+
"@nocobase/client": "2.0.3",
|
|
17
|
+
"@nocobase/plugin-workflow": "2.0.3",
|
|
18
|
+
"antd": "5.24.2",
|
|
19
|
+
"@nocobase/flow-engine": "2.0.3",
|
|
20
|
+
"react-i18next": "11.18.6",
|
|
21
|
+
"winston": "3.13.0",
|
|
22
|
+
"@nocobase/server": "2.0.3"
|
|
23
|
+
};
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __create = Object.create;
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __export = (target, all) => {
|
|
17
|
+
for (var name in all)
|
|
18
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
+
for (let key of __getOwnPropNames(from))
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
29
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
30
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
31
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
32
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
33
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
34
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
35
|
+
mod
|
|
36
|
+
));
|
|
37
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
38
|
+
var src_exports = {};
|
|
39
|
+
__export(src_exports, {
|
|
40
|
+
default: () => import_server.default
|
|
41
|
+
});
|
|
42
|
+
module.exports = __toCommonJS(src_exports);
|
|
43
|
+
__reExport(src_exports, require("./server"), module.exports);
|
|
44
|
+
var import_server = __toESM(require("./server"));
|
|
45
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
+
0 && (module.exports = {
|
|
47
|
+
...require("./server")
|
|
48
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Add argument": "Add argument",
|
|
3
|
+
"Argument name duplicated": "Argument name duplicated",
|
|
4
|
+
"Argument name is invalid": "Argument name is invalid",
|
|
5
|
+
"Arguments": "Arguments",
|
|
6
|
+
"Continue when exception thrown": "Continue when exception thrown",
|
|
7
|
+
"Continue workflow when exception is throw": "Continue workflow when exception is throw",
|
|
8
|
+
"Error occurs in the execution": "Error occurs in the execution",
|
|
9
|
+
"Execute a piece of JavaScript in an isolated Node.js environment.": "Execute a piece of JavaScript in an isolated Node.js environment.",
|
|
10
|
+
"Execute a piece of JavaScript.": "Execute a piece of JavaScript.",
|
|
11
|
+
"Execution status": "Execution status",
|
|
12
|
+
"Milliseconds": "Milliseconds",
|
|
13
|
+
"Mock Arguments": "Mock Arguments",
|
|
14
|
+
"Node.js features supported can be found in the documentaion": "Node.js features supported can be found in the documentaion",
|
|
15
|
+
"Node.js features supported can be found in the documentaion: ": "Node.js features supported can be found in the documentaion: ",
|
|
16
|
+
"Output": "Output",
|
|
17
|
+
"Parameter names should be a valid javascript variable": "Parameter names should be a valid javascript variable",
|
|
18
|
+
"Repetition of parameter names": "Repetition of parameter names",
|
|
19
|
+
"Result": "Result",
|
|
20
|
+
"Run": "Run",
|
|
21
|
+
"Script": "Script",
|
|
22
|
+
"Script content": "Script content",
|
|
23
|
+
"Script node": "Script node",
|
|
24
|
+
"Script result": "Script result",
|
|
25
|
+
"Test run success": "Test run success",
|
|
26
|
+
"Test script": "Test script",
|
|
27
|
+
"The arguments that will be used in script with same name.": "The arguments that will be used in script with same name.",
|
|
28
|
+
"The maximum Milliseconds time of the script. 0 means no timeout.": "The maximum execution time of the script. 0 means no timeout.",
|
|
29
|
+
"The maximum execution time of the script. 0 means no timeout.": "The maximum execution time of the script. 0 means no timeout.",
|
|
30
|
+
"Timeout": "Timeout",
|
|
31
|
+
"Try it out": "Try it out",
|
|
32
|
+
"https://docs.nocobase.com/handbook/workflow-javascript": "https://docs.nocobase.com/handbook/workflow-javascript"
|
|
33
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Add argument": "Add argument",
|
|
3
|
+
"Argument name duplicated": "Argument name duplicated",
|
|
4
|
+
"Argument name is invalid": "Argument name is invalid",
|
|
5
|
+
"Arguments": "Arguments",
|
|
6
|
+
"Continue when exception thrown": "Continue when exception thrown",
|
|
7
|
+
"Continue workflow when exception is throw": "Continue workflow when exception is throw",
|
|
8
|
+
"Error occurs in the execution": "Error occurs in the execution",
|
|
9
|
+
"Execute a piece of JavaScript in an isolated Node.js environment.": "Execute a piece of JavaScript in an isolated Node.js environment.",
|
|
10
|
+
"Execute a piece of JavaScript.": "Execute a piece of JavaScript.",
|
|
11
|
+
"Execution status": "Execution status",
|
|
12
|
+
"Milliseconds": "Milliseconds",
|
|
13
|
+
"Mock Arguments": "Mock Arguments",
|
|
14
|
+
"Node.js features supported can be found in the documentaion": "Node.js features supported can be found in the documentaion",
|
|
15
|
+
"Node.js features supported can be found in the documentaion: ": "Node.js features supported can be found in the documentaion: ",
|
|
16
|
+
"Output": "Output",
|
|
17
|
+
"Parameter names should be a valid javascript variable": "Parameter names should be a valid javascript variable",
|
|
18
|
+
"Repetition of parameter names": "Repetition of parameter names",
|
|
19
|
+
"Result": "Result",
|
|
20
|
+
"Run": "Run",
|
|
21
|
+
"Script": "Script",
|
|
22
|
+
"Script content": "Script content",
|
|
23
|
+
"Script node": "Script node",
|
|
24
|
+
"Script result": "Script result",
|
|
25
|
+
"Test run success": "Test run success",
|
|
26
|
+
"Test script": "Test script",
|
|
27
|
+
"The arguments that will be used in script with same name.": "The arguments that will be used in script with same name.",
|
|
28
|
+
"The maximum Milliseconds time of the script. 0 means no timeout.": "The maximum execution time of the script. 0 means no timeout.",
|
|
29
|
+
"The maximum execution time of the script. 0 means no timeout.": "The maximum execution time of the script. 0 means no timeout.",
|
|
30
|
+
"Timeout": "Timeout",
|
|
31
|
+
"Try it out": "Try it out",
|
|
32
|
+
"https://docs.nocobase.com/handbook/workflow-javascript": "https://docs.nocobase.com/handbook/workflow-javascript"
|
|
33
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Add argument": "Add argument",
|
|
3
|
+
"Argument name duplicated": "Argument name duplicated",
|
|
4
|
+
"Argument name is invalid": "Argument name is invalid",
|
|
5
|
+
"Arguments": "Arguments",
|
|
6
|
+
"Continue when exception thrown": "Continue when exception thrown",
|
|
7
|
+
"Continue workflow when exception is throw": "Continue workflow when exception is throw",
|
|
8
|
+
"Error occurs in the execution": "Error occurs in the execution",
|
|
9
|
+
"Execute a piece of JavaScript in an isolated Node.js environment.": "Execute a piece of JavaScript in an isolated Node.js environment.",
|
|
10
|
+
"Execute a piece of JavaScript.": "Execute a piece of JavaScript.",
|
|
11
|
+
"Execution status": "Execution status",
|
|
12
|
+
"Milliseconds": "Milliseconds",
|
|
13
|
+
"Mock Arguments": "Mock Arguments",
|
|
14
|
+
"Node.js features supported can be found in the documentaion": "Node.js features supported can be found in the documentaion",
|
|
15
|
+
"Node.js features supported can be found in the documentaion: ": "Node.js features supported can be found in the documentaion: ",
|
|
16
|
+
"Output": "Output",
|
|
17
|
+
"Parameter names should be a valid javascript variable": "Parameter names should be a valid javascript variable",
|
|
18
|
+
"Repetition of parameter names": "Repetition of parameter names",
|
|
19
|
+
"Result": "Result",
|
|
20
|
+
"Run": "Run",
|
|
21
|
+
"Script": "Script",
|
|
22
|
+
"Script content": "Script content",
|
|
23
|
+
"Script node": "Script node",
|
|
24
|
+
"Script result": "Script result",
|
|
25
|
+
"Test run success": "Test run success",
|
|
26
|
+
"Test script": "Test script",
|
|
27
|
+
"The arguments that will be used in script with same name.": "The arguments that will be used in script with same name.",
|
|
28
|
+
"The maximum Milliseconds time of the script. 0 means no timeout.": "The maximum execution time of the script. 0 means no timeout.",
|
|
29
|
+
"The maximum execution time of the script. 0 means no timeout.": "The maximum execution time of the script. 0 means no timeout.",
|
|
30
|
+
"Timeout": "Timeout",
|
|
31
|
+
"Try it out": "Try it out",
|
|
32
|
+
"https://docs.nocobase.com/handbook/workflow-javascript": "https://docs.nocobase.com/handbook/workflow-javascript"
|
|
33
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Add argument": "Add argument",
|
|
3
|
+
"Argument name duplicated": "Argument name duplicated",
|
|
4
|
+
"Argument name is invalid": "Argument name is invalid",
|
|
5
|
+
"Arguments": "Arguments",
|
|
6
|
+
"Continue when exception thrown": "Continue when exception thrown",
|
|
7
|
+
"Continue workflow when exception is throw": "Continue workflow when exception is throw",
|
|
8
|
+
"Error occurs in the execution": "Error occurs in the execution",
|
|
9
|
+
"Execute a piece of JavaScript in an isolated Node.js environment.": "Execute a piece of JavaScript in an isolated Node.js environment.",
|
|
10
|
+
"Execute a piece of JavaScript.": "Execute a piece of JavaScript.",
|
|
11
|
+
"Execution status": "Execution status",
|
|
12
|
+
"Milliseconds": "Milliseconds",
|
|
13
|
+
"Mock Arguments": "Mock Arguments",
|
|
14
|
+
"Node.js features supported can be found in the documentaion": "Node.js features supported can be found in the documentaion",
|
|
15
|
+
"Node.js features supported can be found in the documentaion: ": "Node.js features supported can be found in the documentaion: ",
|
|
16
|
+
"Output": "Output",
|
|
17
|
+
"Parameter names should be a valid javascript variable": "Parameter names should be a valid javascript variable",
|
|
18
|
+
"Repetition of parameter names": "Repetition of parameter names",
|
|
19
|
+
"Result": "Result",
|
|
20
|
+
"Run": "Run",
|
|
21
|
+
"Script": "Script",
|
|
22
|
+
"Script content": "Script content",
|
|
23
|
+
"Script node": "Script node",
|
|
24
|
+
"Script result": "Script result",
|
|
25
|
+
"Test run success": "Test run success",
|
|
26
|
+
"Test script": "Test script",
|
|
27
|
+
"The arguments that will be used in script with same name.": "The arguments that will be used in script with same name.",
|
|
28
|
+
"The maximum Milliseconds time of the script. 0 means no timeout.": "The maximum execution time of the script. 0 means no timeout.",
|
|
29
|
+
"The maximum execution time of the script. 0 means no timeout.": "The maximum execution time of the script. 0 means no timeout.",
|
|
30
|
+
"Timeout": "Timeout",
|
|
31
|
+
"Try it out": "Try it out",
|
|
32
|
+
"https://docs.nocobase.com/handbook/workflow-javascript": "https://docs.nocobase.com/handbook/workflow-javascript"
|
|
33
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Add argument": "Argumentum hozzáadása",
|
|
3
|
+
"Argument name duplicated": "Az argumentum név duplikált",
|
|
4
|
+
"Argument name is invalid": "Az argumentum név érvénytelen",
|
|
5
|
+
"Arguments": "Argumentumok",
|
|
6
|
+
"Continue when exception thrown": "Folytatás, ha kivétel dobódik",
|
|
7
|
+
"Continue workflow when exception is throw": "A munkafolyamat folytatása, ha kivétel dobódik",
|
|
8
|
+
"Error occurs in the execution": "Hiba történt a végrehajtás során",
|
|
9
|
+
"Execute a piece of JavaScript in an isolated Node.js environment.": "JavaScript kód végrehajtása izolált Node.js környezetben.",
|
|
10
|
+
"Execute a piece of JavaScript.": "JavaScript kód végrehajtása.",
|
|
11
|
+
"Execution status": "Végrehajtási állapot",
|
|
12
|
+
"Milliseconds": "Ezredmásodpercek",
|
|
13
|
+
"Mock Arguments": "Mockolt argumentumok",
|
|
14
|
+
"Node.js features supported can be found in the documentaion": "A támogatott Node.js funkciók a dokumentációban találhatók",
|
|
15
|
+
"Node.js features supported can be found in the documentaion: ": "A támogatott Node.js funkciók a dokumentációban találhatók: ",
|
|
16
|
+
"Output": "Kimenet",
|
|
17
|
+
"Parameter names should be a valid javascript variable": "A paraméter neveknek érvényes JavaScript változóknak kell lenniük",
|
|
18
|
+
"Repetition of parameter names": "Paraméternevek ismétlődése",
|
|
19
|
+
"Result": "Eredmény",
|
|
20
|
+
"Run": "Futtatás",
|
|
21
|
+
"Script": "Szkript",
|
|
22
|
+
"Script content": "Szkript tartalma",
|
|
23
|
+
"Script node": "Szkript csomópont",
|
|
24
|
+
"Script result": "Szkript eredménye",
|
|
25
|
+
"Test run success": "Sikeres tesztfuttatás",
|
|
26
|
+
"Test script": "Tesztszkript",
|
|
27
|
+
"The arguments that will be used in script with same name.": "Az argumentumok, amelyek azonos névvel lesznek használva a szkriptben.",
|
|
28
|
+
"The maximum Milliseconds time of the script. 0 means no timeout.": "A szkript maximális végrehajtási ideje ezredmásodpercben. 0 esetén nincs időkorlát.",
|
|
29
|
+
"The maximum execution time of the script. 0 means no timeout.": "A szkript maximális végrehajtási ideje. 0 esetén nincs időkorlát.",
|
|
30
|
+
"Timeout": "Időtúllépés",
|
|
31
|
+
"Try it out": "Próbálja ki",
|
|
32
|
+
"https://docs.nocobase.com/handbook/workflow-javascript": "https://docs.nocobase.com/handbook/workflow-javascript"
|
|
33
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Add argument": "Tambah argumen",
|
|
3
|
+
"Argument name duplicated": "Nama argumen duplikat",
|
|
4
|
+
"Argument name is invalid": "Nama argumen tidak valid",
|
|
5
|
+
"Arguments": "Argumen",
|
|
6
|
+
"Continue when exception thrown": "Lanjutkan ketika pengecualian dilempar",
|
|
7
|
+
"Continue workflow when exception is throw": "Lanjutkan alur kerja ketika pengecualian dilempar",
|
|
8
|
+
"Error occurs in the execution": "Terjadi kesalahan dalam eksekusi",
|
|
9
|
+
"Execute a piece of JavaScript in an isolated Node.js environment.": "Jalankan sepotong JavaScript di lingkungan Node.js yang terisolasi.",
|
|
10
|
+
"Execute a piece of JavaScript.": "Jalankan sepotong JavaScript.",
|
|
11
|
+
"Execution status": "Status eksekusi",
|
|
12
|
+
"Milliseconds": "Milidetik",
|
|
13
|
+
"Mock Arguments": "Argumen Mock",
|
|
14
|
+
"Node.js features supported can be found in the documentaion": "Fitur Node.js yang didukung dapat ditemukan di dokumentasi",
|
|
15
|
+
"Node.js features supported can be found in the documentaion: ": "Fitur Node.js yang didukung dapat ditemukan di dokumentasi: ",
|
|
16
|
+
"Output": "Keluaran",
|
|
17
|
+
"Parameter names should be a valid javascript variable": "Nama parameter harus berupa variabel javascript yang valid",
|
|
18
|
+
"Repetition of parameter names": "Pengulangan nama parameter",
|
|
19
|
+
"Result": "Hasil",
|
|
20
|
+
"Run": "Jalankan",
|
|
21
|
+
"Script": "Skrip",
|
|
22
|
+
"Script content": "Konten skrip",
|
|
23
|
+
"Script node": "Node skrip",
|
|
24
|
+
"Script result": "Hasil skrip",
|
|
25
|
+
"Test run success": "Uji coba berhasil",
|
|
26
|
+
"Test script": "Uji skrip",
|
|
27
|
+
"The arguments that will be used in script with same name.": "Argumen yang akan digunakan dalam skrip dengan nama yang sama.",
|
|
28
|
+
"The maximum Milliseconds time of the script. 0 means no timeout.": "Waktu maksimum Milidetik skrip. 0 berarti tidak ada batas waktu.",
|
|
29
|
+
"The maximum execution time of the script. 0 means no timeout.": "Waktu eksekusi maksimum skrip. 0 berarti tidak ada batas waktu.",
|
|
30
|
+
"Timeout": "Batas waktu",
|
|
31
|
+
"Try it out": "Cobalah",
|
|
32
|
+
"https://docs.nocobase.com/handbook/workflow-javascript": "https://docs.nocobase.com/handbook/workflow-javascript"
|
|
33
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
export declare const NAMESPACE = "workflow-javascript";
|
|
10
|
+
export declare function useLang(key: string, options?: {}): string;
|
|
11
|
+
export declare function lang(key: string, options?: {}): string;
|
|
12
|
+
export declare function usePluginTranslation(options: any): import("react-i18next").UseTranslationResponse<"workflow-javascript", undefined>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var locale_exports = {};
|
|
28
|
+
__export(locale_exports, {
|
|
29
|
+
NAMESPACE: () => NAMESPACE,
|
|
30
|
+
lang: () => lang,
|
|
31
|
+
useLang: () => useLang,
|
|
32
|
+
usePluginTranslation: () => usePluginTranslation
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(locale_exports);
|
|
35
|
+
var import_react_i18next = require("react-i18next");
|
|
36
|
+
var import_client = require("@nocobase/client");
|
|
37
|
+
const NAMESPACE = "workflow-javascript";
|
|
38
|
+
function useLang(key, options = {}) {
|
|
39
|
+
const { t } = usePluginTranslation(options);
|
|
40
|
+
return t(key);
|
|
41
|
+
}
|
|
42
|
+
function lang(key, options = {}) {
|
|
43
|
+
return import_client.i18n.t(key, { ...options, ns: NAMESPACE });
|
|
44
|
+
}
|
|
45
|
+
function usePluginTranslation(options) {
|
|
46
|
+
return (0, import_react_i18next.useTranslation)(NAMESPACE, options);
|
|
47
|
+
}
|
|
48
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
49
|
+
0 && (module.exports = {
|
|
50
|
+
NAMESPACE,
|
|
51
|
+
lang,
|
|
52
|
+
useLang,
|
|
53
|
+
usePluginTranslation
|
|
54
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Add argument": "Add argument",
|
|
3
|
+
"Argument name duplicated": "Argument name duplicated",
|
|
4
|
+
"Argument name is invalid": "Argument name is invalid",
|
|
5
|
+
"Arguments": "Arguments",
|
|
6
|
+
"Continue when exception thrown": "Continue when exception thrown",
|
|
7
|
+
"Continue workflow when exception is throw": "Continue workflow when exception is throw",
|
|
8
|
+
"Error occurs in the execution": "Error occurs in the execution",
|
|
9
|
+
"Execute a piece of JavaScript in an isolated Node.js environment.": "Execute a piece of JavaScript in an isolated Node.js environment.",
|
|
10
|
+
"Execute a piece of JavaScript.": "Execute a piece of JavaScript.",
|
|
11
|
+
"Execution status": "Execution status",
|
|
12
|
+
"Milliseconds": "Milliseconds",
|
|
13
|
+
"Mock Arguments": "Mock Arguments",
|
|
14
|
+
"Node.js features supported can be found in the documentaion": "Node.js features supported can be found in the documentaion",
|
|
15
|
+
"Node.js features supported can be found in the documentaion: ": "Node.js features supported can be found in the documentaion: ",
|
|
16
|
+
"Output": "Output",
|
|
17
|
+
"Parameter names should be a valid javascript variable": "Parameter names should be a valid javascript variable",
|
|
18
|
+
"Repetition of parameter names": "Repetition of parameter names",
|
|
19
|
+
"Result": "Result",
|
|
20
|
+
"Run": "Run",
|
|
21
|
+
"Script": "Script",
|
|
22
|
+
"Script content": "Script content",
|
|
23
|
+
"Script node": "Script node",
|
|
24
|
+
"Script result": "Script result",
|
|
25
|
+
"Test run success": "Test run success",
|
|
26
|
+
"Test script": "Test script",
|
|
27
|
+
"The arguments that will be used in script with same name.": "The arguments that will be used in script with same name.",
|
|
28
|
+
"The maximum Milliseconds time of the script. 0 means no timeout.": "The maximum execution time of the script. 0 means no timeout.",
|
|
29
|
+
"The maximum execution time of the script. 0 means no timeout.": "The maximum execution time of the script. 0 means no timeout.",
|
|
30
|
+
"Timeout": "Timeout",
|
|
31
|
+
"Try it out": "Try it out",
|
|
32
|
+
"https://docs.nocobase.com/handbook/workflow-javascript": "https://docs.nocobase.com/handbook/workflow-javascript"
|
|
33
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Add argument": "引数の追加",
|
|
3
|
+
"Argument name duplicated": "引数名が重複しています",
|
|
4
|
+
"Argument name is invalid": "無効な引数名",
|
|
5
|
+
"Arguments": "引数",
|
|
6
|
+
"Continue when exception thrown": "例外発生時のワークフロー継続",
|
|
7
|
+
"Continue workflow when exception is throw": "例外発生時もワークフローを継続",
|
|
8
|
+
"Error occurs in the execution": "実行中にエラーが発生しました",
|
|
9
|
+
"Execute a piece of JavaScript in an isolated Node.js environment.": "分離されたNode.js環境でJavaScriptコードを実行します。",
|
|
10
|
+
"Execute a piece of JavaScript.": "JavaScriptコードの実行",
|
|
11
|
+
"Execution status": "実行ステータス",
|
|
12
|
+
"Milliseconds": "ミリ秒",
|
|
13
|
+
"Mock Arguments": "モック引数",
|
|
14
|
+
"Node.js features supported can be found in the documentaion": "対応可能なNode.js機能についてはドキュメントをご参照ください",
|
|
15
|
+
"Node.js features supported can be found in the documentaion: ": "対応可能なNode.js機能については、ドキュメントを参照してください: ",
|
|
16
|
+
"Output": "コンソール出力",
|
|
17
|
+
"Parameter names should be a valid javascript variable": "パラメータ名は有効なJavaScript変数名である必要があります",
|
|
18
|
+
"Repetition of parameter names": "パラメータ名の重複",
|
|
19
|
+
"Result": "実行結果",
|
|
20
|
+
"Run": "実行",
|
|
21
|
+
"Script": "スクリプト",
|
|
22
|
+
"Script content": "スクリプト内容",
|
|
23
|
+
"Script node": "スクリプトノード",
|
|
24
|
+
"Script result": "スクリプト実行結果",
|
|
25
|
+
"Test run success": "テスト実行成功",
|
|
26
|
+
"Test script": "テストスクリプト",
|
|
27
|
+
"The arguments that will be used in script with same name.": "同一名称のスクリプト内で使用される引数",
|
|
28
|
+
"The maximum Milliseconds time of the script. 0 means no timeout.": "スクリプトの最大実行時間。0はタイムアウトなしを意味します。",
|
|
29
|
+
"The maximum execution time of the script. 0 means no timeout.": "スクリプトの最大実行時間。0はタイムアウトなしを意味します。",
|
|
30
|
+
"Timeout": "タイムアウト",
|
|
31
|
+
"Try it out": "テスト実行",
|
|
32
|
+
"https://docs.nocobase.com/handbook/workflow-javascript": "https://docs.nocobase.com/handbook/workflow-javascript"
|
|
33
|
+
}
|