@nocobase/plugin-workflow-sql 1.4.0-alpha.1 → 1.4.0-alpha.10

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/README.md CHANGED
@@ -1,9 +1,30 @@
1
- # workflow
1
+ # NocoBase
2
2
 
3
- English | [中文](./README.zh-CN.md)
3
+ <video width="100%" controls>
4
+ <source src="https://static-docs.nocobase.com/NocoBase0510.mp4" type="video/mp4">
5
+ </video>
4
6
 
5
- ## 安装激活
6
7
 
7
- 内置插件无需手动安装激活。
8
+ ## What is NocoBase
8
9
 
9
- ## 使用方法
10
+ NocoBase is a scalability-first, open-source no-code development platform.
11
+ Instead of investing years of time and millions of dollars in research and development, deploy NocoBase in a few minutes and you'll have a private, controllable, and extremely scalable no-code development platform!
12
+
13
+ Homepage:
14
+ https://www.nocobase.com/
15
+
16
+ Online Demo:
17
+ https://demo.nocobase.com/new
18
+
19
+ Documents:
20
+ https://docs.nocobase.com/
21
+
22
+ Commericial license & plugins:
23
+ https://www.nocobase.com/en/commercial
24
+
25
+ License agreement:
26
+ https://www.nocobase.com/en/agreement
27
+
28
+
29
+ ## Contact Us:
30
+ hello@nocobase.com
@@ -7,7 +7,4 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
 
10
- (function(e,o){typeof exports=="object"&&typeof module!="undefined"?o(exports,require("@nocobase/client"),require("react/jsx-runtime"),require("@nocobase/plugin-workflow/client"),require("react-i18next")):typeof define=="function"&&define.amd?define(["exports","@nocobase/client","react/jsx-runtime","@nocobase/plugin-workflow/client","react-i18next"],o):(e=typeof globalThis!="undefined"?globalThis:e||self,o(e["@nocobase/plugin-workflow-sql"]={},e["@nocobase/client"],e.jsxRuntime,e["@nocobase/plugin-workflow"],e["react-i18next"]))})(this,function(e,o,t,a,l){"use strict";var w=Object.defineProperty;var x=(e,o,t)=>o in e?w(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t;var r=(e,o,t)=>(x(e,typeof o!="symbol"?o+"":o,t),t);var d=(e,o,t)=>new Promise((a,l)=>{var s=n=>{try{i(t.next(n))}catch(c){l(c)}},p=n=>{try{i(t.throw(n))}catch(c){l(c)}},i=n=>n.done?a(n.value):Promise.resolve(n.value).then(s,p);i((t=t.apply(e,o)).next())});const s="@nocobase/plugin-workflow-sql";class p extends a.Instruction{constructor(){super(...arguments);r(this,"title",`{{t("SQL action", { ns: "${s}" })}}`);r(this,"type","sql");r(this,"group","collection");r(this,"description",`{{t("Execute a SQL statement in database.", { ns: "${s}" })}}`);r(this,"fieldset",{dataSource:{type:"string",required:!0,title:'{{t("Data source")}}',description:`{{t("Select a data source to execute SQL.", { ns: "${s}" })}}`,"x-decorator":"FormItem","x-component":"DataSourceSelect","x-component-props":{className:"auto-width",filter(u){return u.options.isDBInstance||u.key===o.DEFAULT_DATA_SOURCE_KEY}},default:"main"},sql:{type:"string",required:!0,title:"SQL",description:"{{sqlDescription()}}","x-decorator":"FormItem","x-component":"WorkflowVariableRawTextArea","x-component-props":{rows:20,className:o.css`
11
- font-size: 80%;
12
- font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
13
- `}},withMeta:{type:"boolean","x-decorator":"FormItem","x-component":"Checkbox","x-content":`{{t("Include meta information of this query in result", { ns: "${s}" })}}`}});r(this,"scope",{sqlDescription(){return t.jsxs(l.Trans,{ns:s,children:["SQL query result could be used through ",t.jsx("a",{href:"https://docs-cn.nocobase.com/handbook/workflow-json-query",target:"_blank",rel:"noreferrer",children:"JSON query node"})," (Commercial plugin)."]})}});r(this,"components",{WorkflowVariableRawTextArea:a.WorkflowVariableRawTextArea});r(this,"testable",!0)}useVariables({key:u,title:m},{types:b,fieldNames:f=a.defaultFieldNames}){return{[f.value]:u,[f.label]:m}}}class i extends o.Plugin{afterAdd(){return d(this,null,function*(){})}beforeLoad(){return d(this,null,function*(){})}load(){return d(this,null,function*(){this.app.pm.get("workflow").registerInstruction("sql",p)})}}e.default=i,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
10
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react-i18next"),require("@nocobase/plugin-workflow"),require("@nocobase/client"),require("react")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-sql",["react-i18next","@nocobase/plugin-workflow","@nocobase/client","react"],t):"object"==typeof exports?exports["@nocobase/plugin-workflow-sql"]=t(require("react-i18next"),require("@nocobase/plugin-workflow"),require("@nocobase/client"),require("react")):e["@nocobase/plugin-workflow-sql"]=t(e["react-i18next"],e["@nocobase/plugin-workflow"],e["@nocobase/client"],e.react)}(self,function(e,t,n,r){return function(){"use strict";var o={772:function(e){e.exports=n},305:function(e){e.exports=t},156:function(e){e.exports=r},238:function(t){t.exports=e}},u={};function c(e){var t=u[e];if(void 0!==t)return t.exports;var n=u[e]={exports:{}};return o[e](n,n.exports,c),n.exports}c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,{a:t}),t},c.d=function(e,t){for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};c.r(i),c.d(i,{default:function(){return T}});var a=c("772"),l=c("305"),f=c("156"),s=c.n(f),p=c("238"),b="@nocobase/plugin-workflow-sql";function y(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)}}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(m=function(){return!!e})()}function w(){var e,t,n=(e=["\n font-size: 80%;\n font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;\n "],!t&&(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return w=function(){return n},n}var g=function(e){var t,n,r;function o(){var e,t,n,r;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,o),t=this,n=o,r=arguments,n=v(n),d(e=function(e,t){return t&&("object"===function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}(t)||"function"==typeof t)?t:function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(t,m()?Reflect.construct(n,r||[],v(t).constructor):n.apply(t,r)),"title",'{{t("SQL action", { ns: "'.concat(b,'" })}}')),d(e,"type","sql"),d(e,"group","collection"),d(e,"description",'{{t("Execute a SQL statement in database.", { ns: "'.concat(b,'" })}}')),d(e,"fieldset",{dataSource:{type:"string",required:!0,title:'{{t("Data source")}}',description:'{{t("Select a data source to execute SQL.", { ns: "'.concat(b,'" })}}'),"x-decorator":"FormItem","x-component":"DataSourceSelect","x-component-props":{className:"auto-width",filter:function(e){return e.options.isDBInstance||e.key===a.DEFAULT_DATA_SOURCE_KEY}},default:"main"},sql:{type:"string",required:!0,title:"SQL",description:"{{sqlDescription()}}","x-decorator":"FormItem","x-component":"WorkflowVariableRawTextArea","x-component-props":{rows:20,className:(0,a.css)(w())}},withMeta:{type:"boolean","x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Include meta information of this query in result", { ns: "'.concat(b,'" })}}')}}),d(e,"scope",{sqlDescription:function(){return s().createElement(p.Trans,{ns:b},"SQL query result could be used through ",s().createElement("a",{href:"https://docs-cn.nocobase.com/handbook/workflow-json-query",target:"_blank",rel:"noreferrer"},"JSON query node")," (Commercial plugin).")}}),d(e,"components",{WorkflowVariableRawTextArea:l.WorkflowVariableRawTextArea}),d(e,"testable",!0),e}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(o,e),t=o,n=[{key:"useVariables",value:function(e,t){var n,r=e.key,o=e.title,u=(t.types,t.fieldNames),c=void 0===u?l.defaultFieldNames:u;return d(n={},c.value,r),d(n,c.label,o),n}}],y(t.prototype,n),o}(l.Instruction);function x(e,t,n,r,o,u,c){try{var i=e[u](c),a=i.value}catch(e){n(e);return}i.done?t(a):Promise.resolve(a).then(r,o)}function O(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var u=e.apply(t,n);function c(e){x(u,r,o,c,i,"next",e)}function i(e){x(u,r,o,c,i,"throw",e)}c(void 0)})}}function k(e,t,n){return(k=P()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&_(o,n.prototype),o}).apply(null,arguments)}function j(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)}}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function q(e){var t="function"==typeof Map?new Map:void 0;return(q=function(e){var n;if(null===e||(n=e,-1===Function.toString.call(n).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,r)}function r(){return k(e,arguments,S(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),_(r,e)})(e)}function P(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(P=function(){return!!e})()}function E(e,t){var n,r,o,u,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function i(u){return function(i){return function(u){if(n)throw TypeError("Generator is already executing.");for(;c;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return c.label++,{value:u[1],done:!1};case 5:c.label++,r=u[1],u=[0];continue;case 7:u=c.ops.pop(),c.trys.pop();continue;default:if(!(o=(o=c.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){c=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){c.label=u[1];break}if(6===u[0]&&c.label<o[1]){c.label=o[1],o=u;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(u);break}o[2]&&c.ops.pop(),c.trys.pop();continue}u=t.call(e,c)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,i])}}}var T=function(e){var t,n,r;function o(){var e,t,n;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,o),e=this,t=o,n=arguments,t=S(t),function(e,t){return t&&("object"===function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}(t)||"function"==typeof t)?t:function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,P()?Reflect.construct(t,n||[],S(e).constructor):t.apply(e,n))}return!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_(e,t)}(o,e),t=o,n=[{key:"afterAdd",value:function(){return O(function(){return E(this,function(e){return[2]})})()}},{key:"beforeLoad",value:function(){return O(function(){return E(this,function(e){return[2]})})()}},{key:"load",value:function(){var e=this;return O(function(){return E(this,function(t){return e.app.pm.get("workflow").registerInstruction("sql",g),[2]})})()}}],j(t.prototype,n),o}(q(a.Plugin));return i}()});
@@ -8,13 +8,13 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "1.4.0-alpha.1",
12
- "@nocobase/plugin-workflow": "1.4.0-alpha.1",
11
+ "@nocobase/client": "1.4.0-alpha.10",
12
+ "@nocobase/plugin-workflow": "1.4.0-alpha.10",
13
13
  "react": "18.2.0",
14
14
  "react-i18next": "11.18.6",
15
- "@nocobase/server": "1.4.0-alpha.1",
16
- "@nocobase/data-source-manager": "1.4.0-alpha.1",
17
- "@nocobase/plugin-workflow-test": "1.4.0-alpha.1",
18
- "@nocobase/test": "1.4.0-alpha.1",
19
- "@nocobase/utils": "1.4.0-alpha.1"
15
+ "@nocobase/server": "1.4.0-alpha.10",
16
+ "@nocobase/data-source-manager": "1.4.0-alpha.10",
17
+ "@nocobase/plugin-workflow-test": "1.4.0-alpha.10",
18
+ "@nocobase/test": "1.4.0-alpha.10",
19
+ "@nocobase/utils": "1.4.0-alpha.10"
20
20
  };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName.zh-CN": "工作流:SQL 节点",
5
5
  "description": "Execute SQL statements in workflow.",
6
6
  "description.zh-CN": "可用于在工作流中对数据库执行任意 SQL 语句。",
7
- "version": "1.4.0-alpha.1",
7
+ "version": "1.4.0-alpha.10",
8
8
  "license": "AGPL-3.0",
9
9
  "main": "./dist/server/index.js",
10
10
  "homepage": "https://docs.nocobase.com/handbook/workflow-sql",
@@ -21,7 +21,7 @@
21
21
  "@nocobase/server": "1.x",
22
22
  "@nocobase/test": "1.x"
23
23
  },
24
- "gitHead": "b42379db55cd8774d3543c8d6cdc566434d3f170",
24
+ "gitHead": "74c99c0f2d84690d7e3db62c7a913e6aca97c762",
25
25
  "keywords": [
26
26
  "Workflow"
27
27
  ]
package/README.zh-CN.md DELETED
@@ -1,9 +0,0 @@
1
- # workflow
2
-
3
- [English](./README.md) | 中文
4
-
5
- ## 安装激活
6
-
7
- 内置插件无需手动安装激活。
8
-
9
- ## 使用方法