@nocobase/plugin-workflow-sql 1.6.0-beta.9 → 1.7.0-alpha.1

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.
@@ -7,4 +7,4 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
 
10
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react-i18next"),require("@ant-design/icons"),require("@nocobase/client"),require("react"),require("@nocobase/plugin-workflow/client")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-sql",["react-i18next","@ant-design/icons","@nocobase/client","react","@nocobase/plugin-workflow/client"],t):"object"==typeof exports?exports["@nocobase/plugin-workflow-sql"]=t(require("react-i18next"),require("@ant-design/icons"),require("@nocobase/client"),require("react"),require("@nocobase/plugin-workflow/client")):e["@nocobase/plugin-workflow-sql"]=t(e["react-i18next"],e["@ant-design/icons"],e["@nocobase/client"],e.react,e["@nocobase/plugin-workflow/client"])}(self,function(e,t,n,r,o){return function(){"use strict";var u={482:function(e){e.exports=t},772:function(e){e.exports=n},433:function(e){e.exports=o},156:function(e){e.exports=r},238:function(t){t.exports=e}},c={};function i(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={exports:{}};return u[e](n,n.exports,i),n.exports}i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};i.r(a),i.d(a,{default:function(){return M}});var l=i("772"),f=i("433"),s=i("156"),p=i.n(s),b=i("482"),y=i("238"),d="@nocobase/plugin-workflow-sql";function v(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 h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(g=function(){return!!e})()}function x(){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 x=function(){return n},n}var O=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=m(n),h(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,g()?Reflect.construct(n,r||[],m(t).constructor):n.apply(t,r)),"title",'{{t("SQL action", { ns: "'.concat(d,'" })}}')),h(e,"type","sql"),h(e,"group","collection"),h(e,"description",'{{t("Execute a SQL statement in database.", { ns: "'.concat(d,'" })}}')),h(e,"icon",p().createElement(b.ConsoleSqlOutlined,{style:{}})),h(e,"fieldset",{dataSource:{type:"string",required:!0,title:'{{t("Data source")}}',description:'{{t("Select a data source to execute SQL.", { ns: "'.concat(d,'" })}}'),"x-decorator":"FormItem","x-component":"DataSourceSelect","x-component-props":{className:"auto-width",filter:function(e){return e.options.isDBInstance||e.key===l.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,l.css)(x())}},withMeta:{type:"boolean","x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Include meta information of this query in result", { ns: "'.concat(d,'" })}}')}}),h(e,"scope",{sqlDescription:function(){return p().createElement(y.Trans,{ns:d},"SQL query result could be used through ",p().createElement("a",{href:"https://docs-cn.nocobase.com/handbook/workflow-json-query",target:"_blank",rel:"noreferrer"},"JSON query node")," (Commercial plugin).")}}),h(e,"components",{WorkflowVariableRawTextArea:f.WorkflowVariableRawTextArea}),h(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&&w(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?f.defaultFieldNames:u;return h(n={},c.value,r),h(n,c.label,o),n}}],v(t.prototype,n),o}(f.Instruction);function k(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 j(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var u=e.apply(t,n);function c(e){k(u,r,o,c,i,"next",e)}function i(e){k(u,r,o,c,i,"throw",e)}c(void 0)})}}function S(e,t,n){return(S=T()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&P(o,n.prototype),o}).apply(null,arguments)}function q(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 _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function P(e,t){return(P=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(e){var t="function"==typeof Map?new Map:void 0;return(E=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 S(e,arguments,_(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),P(r,e)})(e)}function T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(T=function(){return!!e})()}function R(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 M=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=_(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,T()?Reflect.construct(t,n||[],_(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&&P(e,t)}(o,e),t=o,n=[{key:"afterAdd",value:function(){return j(function(){return R(this,function(e){return[2]})})()}},{key:"beforeLoad",value:function(){return j(function(){return R(this,function(e){return[2]})})()}},{key:"load",value:function(){var e=this;return j(function(){return R(this,function(t){return e.app.pm.get("workflow").registerInstruction("sql",O),[2]})})()}}],q(t.prototype,n),o}(E(l.Plugin));return a}()});
10
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react-i18next"),require("@ant-design/icons"),require("@nocobase/client"),require("@nocobase/plugin-workflow/client"),require("react")):"function"==typeof define&&define.amd?define("@nocobase/plugin-workflow-sql",["react-i18next","@ant-design/icons","@nocobase/client","@nocobase/plugin-workflow/client","react"],t):"object"==typeof exports?exports["@nocobase/plugin-workflow-sql"]=t(require("react-i18next"),require("@ant-design/icons"),require("@nocobase/client"),require("@nocobase/plugin-workflow/client"),require("react")):e["@nocobase/plugin-workflow-sql"]=t(e["react-i18next"],e["@ant-design/icons"],e["@nocobase/client"],e["@nocobase/plugin-workflow/client"],e.react)}(self,function(e,t,n,r,o){return function(){"use strict";var u={482:function(e){e.exports=t},772:function(e){e.exports=n},433:function(e){e.exports=r},156:function(e){e.exports=o},238:function(t){t.exports=e}},c={};function i(e){var t=c[e];if(void 0!==t)return t.exports;var n=c[e]={exports:{}};return u[e](n,n.exports,i),n.exports}i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};i.r(a),i.d(a,{default:function(){return M}});var l=i("772"),f=i("433"),s=i("156"),p=i.n(s),b=i("482"),y=i("238"),d="@nocobase/plugin-workflow-sql";function v(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 h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(g=function(){return!!e})()}function x(){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 x=function(){return n},n}var O=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=m(n),h(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,g()?Reflect.construct(n,r||[],m(t).constructor):n.apply(t,r)),"title",'{{t("SQL action", { ns: "'.concat(d,'" })}}')),h(e,"type","sql"),h(e,"group","collection"),h(e,"description",'{{t("Execute a SQL statement in database.", { ns: "'.concat(d,'" })}}')),h(e,"icon",p().createElement(b.ConsoleSqlOutlined,{style:{}})),h(e,"fieldset",{dataSource:{type:"string",required:!0,title:'{{t("Data source")}}',description:'{{t("Select a data source to execute SQL.", { ns: "'.concat(d,'" })}}'),"x-decorator":"FormItem","x-component":"DataSourceSelect","x-component-props":{className:"auto-width",filter:function(e){return e.options.isDBInstance||e.key===l.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,l.css)(x())}},withMeta:{type:"boolean","x-decorator":"FormItem","x-component":"Checkbox","x-content":'{{t("Include meta information of this query in result", { ns: "'.concat(d,'" })}}')}}),h(e,"scope",{sqlDescription:function(){return p().createElement(y.Trans,{ns:d},"SQL query result could be used through ",p().createElement("a",{href:"https://docs-cn.nocobase.com/handbook/workflow-json-query",target:"_blank",rel:"noreferrer"},"JSON query node")," (Commercial plugin).")}}),h(e,"components",{WorkflowVariableRawTextArea:f.WorkflowVariableRawTextArea}),h(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&&w(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?f.defaultFieldNames:u;return h(n={},c.value,r),h(n,c.label,o),n}}],v(t.prototype,n),o}(f.Instruction);function k(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 j(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var u=e.apply(t,n);function c(e){k(u,r,o,c,i,"next",e)}function i(e){k(u,r,o,c,i,"throw",e)}c(void 0)})}}function S(e,t,n){return(S=T()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&P(o,n.prototype),o}).apply(null,arguments)}function q(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 _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function P(e,t){return(P=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(e){var t="function"==typeof Map?new Map:void 0;return(E=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 S(e,arguments,_(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),P(r,e)})(e)}function T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(T=function(){return!!e})()}function R(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 M=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=_(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,T()?Reflect.construct(t,n||[],_(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&&P(e,t)}(o,e),t=o,n=[{key:"afterAdd",value:function(){return j(function(){return R(this,function(e){return[2]})})()}},{key:"beforeLoad",value:function(){return j(function(){return R(this,function(e){return[2]})})()}},{key:"load",value:function(){var e=this;return j(function(){return R(this,function(t){return e.app.pm.get("workflow").registerInstruction("sql",O),[2]})})()}}],q(t.prototype,n),o}(E(l.Plugin));return a}()});
@@ -8,14 +8,14 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "1.6.0-beta.9",
12
- "@nocobase/plugin-workflow": "1.6.0-beta.9",
11
+ "@nocobase/client": "1.7.0-alpha.1",
12
+ "@nocobase/plugin-workflow": "1.7.0-alpha.1",
13
13
  "react": "18.2.0",
14
- "@ant-design/icons": "5.2.6",
14
+ "@ant-design/icons": "5.6.1",
15
15
  "react-i18next": "11.18.6",
16
- "@nocobase/server": "1.6.0-beta.9",
17
- "@nocobase/data-source-manager": "1.6.0-beta.9",
18
- "@nocobase/plugin-workflow-test": "1.6.0-beta.9",
19
- "@nocobase/test": "1.6.0-beta.9",
20
- "@nocobase/utils": "1.6.0-beta.9"
16
+ "@nocobase/server": "1.7.0-alpha.1",
17
+ "@nocobase/data-source-manager": "1.7.0-alpha.1",
18
+ "@nocobase/plugin-workflow-test": "1.7.0-alpha.1",
19
+ "@nocobase/test": "1.7.0-alpha.1",
20
+ "@nocobase/utils": "1.7.0-alpha.1"
21
21
  };
@@ -0,0 +1,5 @@
1
+ {
2
+ "SQL action": "Azione SQL",
3
+ "Execute a SQL statement in database": "Esegui un'istruzione SQL nel database",
4
+ "Usage of SQL query result is not supported yet.": "L'utilizzo del risultato della query SQL non è ancora supportato."
5
+ }
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.6.0-beta.9",
7
+ "version": "1.7.0-alpha.1",
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": "eb1ff948fcf7a51175626a1a56a8b8d9b90be006",
24
+ "gitHead": "e411c9728b4d1f16b0beac16e40dd3499352b052",
25
25
  "keywords": [
26
26
  "Workflow"
27
27
  ]