@nocobase/plugin-flow-engine 2.2.0-beta.5 → 2.2.0-beta.7
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/dist/client/index.js +1 -1
- package/dist/externalVersion.js +9 -9
- package/dist/node_modules/@ant-design/icons-svg/package.json +1 -1
- package/dist/node_modules/acorn/package.json +1 -1
- package/dist/node_modules/acorn-jsx/package.json +1 -1
- package/dist/node_modules/acorn-walk/package.json +1 -1
- package/dist/node_modules/ses/package.json +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/flow-surfaces/authoring-validation.js +23 -7
- package/dist/server/flow-surfaces/planning/key-registry.d.ts +1 -1
- package/dist/server/flow-surfaces/runjs-authoring/rules.js +0 -2
- package/dist/server/flow-surfaces/runjs-authoring/runtime/constants.d.ts +0 -1
- package/dist/server/flow-surfaces/runjs-authoring/runtime/constants.js +11 -19
- package/dist/server/flow-surfaces/runjs-authoring/runtime/types.d.ts +0 -12
- package/dist/server/flow-surfaces/runjs-authoring/scan/index.d.ts +0 -14
- package/dist/server/flow-surfaces/runjs-authoring/scan/index.js +1 -7
- package/dist/server/flow-surfaces/runjs-authoring/scan/source-patterns.d.ts +0 -14
- package/dist/server/flow-surfaces/runjs-authoring/scan/source-patterns.js +18 -73
- package/dist/server/flow-surfaces/runjs-authoring/types.d.ts +1 -1
- package/dist/server/flow-surfaces/runjs-authoring/validators/index.js +9 -53
- package/dist/server/flow-surfaces/service.d.ts +18 -0
- package/dist/server/flow-surfaces/service.js +419 -66
- package/package.json +2 -2
- package/dist/server/flow-surfaces/runjs-authoring/blocked-global-stop/index.d.ts +0 -10
- package/dist/server/flow-surfaces/runjs-authoring/blocked-global-stop/index.js +0 -40
package/dist/client/index.js
CHANGED
|
@@ -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("@nocobase/client")):"function"==typeof define&&define.amd?define("@nocobase/plugin-flow-engine",["@nocobase/client"],t):"object"==typeof exports?exports["@nocobase/plugin-flow-engine"]=t(require("@nocobase/client")):e["@nocobase/plugin-flow-engine"]=t(e["@nocobase/client"])}(self,function(e){return function(){"use strict";var t={342:function(t){t.exports=e}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.g.importScripts&&(o=r.g.location+"");var o,i=r.g.document;if(!o&&i&&(i.currentScript&&"SCRIPT"===i.currentScript.tagName.toUpperCase()&&(o=i.currentScript.src),!o)){var u=i.getElementsByTagName("script");if(u.length)for(var c=u.length-1;c>-1&&(!o||!/^http(s?):/.test(o));)o=u[c--].src}if(!o)throw Error("Automatic publicPath is not supported in this browser");r.p=o.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/");var a={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@nocobase/client")):"function"==typeof define&&define.amd?define("@nocobase/plugin-flow-engine",["@nocobase/client"],t):"object"==typeof exports?exports["@nocobase/plugin-flow-engine"]=t(require("@nocobase/client")):e["@nocobase/plugin-flow-engine"]=t(e["@nocobase/client"])}(self,function(e){return function(){"use strict";var t={342:function(t){t.exports=e}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.g.importScripts&&(o=r.g.location+"");var o,i=r.g.document;if(!o&&i&&(i.currentScript&&"SCRIPT"===i.currentScript.tagName.toUpperCase()&&(o=i.currentScript.src),!o)){var u=i.getElementsByTagName("script");if(u.length)for(var c=u.length-1;c>-1&&(!o||!/^http(s?):/.test(o));)o=u[c--].src}if(!o)throw Error("Automatic publicPath is not supported in this browser");r.p=o.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/");var a={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src){var n=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"");n.indexOf("/static/plugins/@nocobase/plugin-flow-engine/dist/client/")>=0&&(e=n.replace(/\/[^\/]+$/,"/"))}if(!e){var o=window.__webpack_public_path__||"";o&&("/"!==o.charAt(o.length-1)&&(o+="/"),e=o+"static/plugins/@nocobase/plugin-flow-engine/dist/client/")}if(!e){var i=window.__nocobase_modern_client_prefix__||"v",u="/"+(i=String(i).replace(/^\/+|\/+$/g,"")||"v")+"/";if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var c=window.location.pathname||"/",a=c.indexOf(u);e=a>=0?c.slice(0,a+1):"/"}e&&(e=e.replace(RegExp("/"+i+"/?$"),"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-flow-engine/dist/client/"}r.p=e}(),!function(){r.r(a),r.d(a,{PluginFlowEngineClient:function(){return p}});var e=r(342);function t(e,t,n,r,o,i,u){try{var c=e[i](u),a=c.value}catch(e){n(e);return}c.done?t(a):Promise.resolve(a).then(r,o)}function n(e){return function(){var n=this,r=arguments;return new Promise(function(o,i){var u=e.apply(n,r);function c(e){t(u,o,i,c,a,"next",e)}function a(e){t(u,o,i,c,a,"throw",e)}c(void 0)})}}function o(e,t,n){return(o=l()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&u(o,n.prototype),o}).apply(null,arguments)}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t="function"==typeof Map?new Map:void 0;return(c=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 o(e,arguments,i(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),u(n,e)})(e)}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}function f(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(u,"next",{value:a(0)}),c(u,"throw",{value:a(1)}),c(u,"return",{value:a(2)}),"function"==typeof Symbol&&c(u,Symbol.iterator,{value:function(){return this}}),u;function a(c){return function(a){var l=[c,a];if(n)throw TypeError("Generator is already executing.");for(;u&&(u=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=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++,r=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=t.call(e,i)}catch(e){l=[6,e],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}var p=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function r(){var e,t;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return e=r,t=arguments,e=i(e),function(e,t){var n;if(t&&("object"==((n=t)&&"u">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,l()?Reflect.construct(e,t||[],i(this).constructor):e.apply(this,t))}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&u(r,e),t=[{key:"afterAdd",value:function(){return n(function(){return f(this,function(e){return[2]})})()}},{key:"beforeLoad",value:function(){return n(function(){return f(this,function(e){return[2]})})()}},{key:"load",value:function(){return n(function(){return f(this,function(e){return[2]})})()}}],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)}}(r.prototype,t),r}(c(e.Plugin));a.default=p}(),a}()});
|
package/dist/externalVersion.js
CHANGED
|
@@ -8,16 +8,16 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "2.2.0-beta.
|
|
11
|
+
"@nocobase/client": "2.2.0-beta.7",
|
|
12
12
|
"lodash": "4.18.1",
|
|
13
|
-
"@nocobase/database": "2.2.0-beta.
|
|
14
|
-
"@nocobase/data-source-manager": "2.2.0-beta.
|
|
15
|
-
"@nocobase/resourcer": "2.2.0-beta.
|
|
16
|
-
"@nocobase/utils": "2.2.0-beta.
|
|
17
|
-
"@nocobase/cache": "2.2.0-beta.
|
|
18
|
-
"@nocobase/server": "2.2.0-beta.
|
|
19
|
-
"@nocobase/actions": "2.2.0-beta.
|
|
13
|
+
"@nocobase/database": "2.2.0-beta.7",
|
|
14
|
+
"@nocobase/data-source-manager": "2.2.0-beta.7",
|
|
15
|
+
"@nocobase/resourcer": "2.2.0-beta.7",
|
|
16
|
+
"@nocobase/utils": "2.2.0-beta.7",
|
|
17
|
+
"@nocobase/cache": "2.2.0-beta.7",
|
|
18
|
+
"@nocobase/server": "2.2.0-beta.7",
|
|
19
|
+
"@nocobase/actions": "2.2.0-beta.7",
|
|
20
20
|
"sequelize": "6.35.2",
|
|
21
21
|
"@formily/json-schema": "2.3.7",
|
|
22
|
-
"@nocobase/ai": "2.2.0-beta.
|
|
22
|
+
"@nocobase/ai": "2.2.0-beta.7"
|
|
23
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@ant-design/icons-svg","version":"4.3.1","sideEffects":false,"description":"Abstract nodes for ant design icons.","contributors":["HeskeyBaozi <hezhiyu233@foxmail.com>"],"homepage":"https://github.com/ant-design/ant-design-icons/","license":"MIT","main":"lib/index.js","module":"es/index.js","files":["lib","es","inline-svg","inline-namespaced-svg"],"repository":{"type":"git","url":"git+https://github.com/ant-design/ant-design-icons.git"},"scripts":{"g":"npm run generate","generate":"cross-env NODE_ENV=production gulp --require ts-node/register/transpile-only","type-check":"tsc --noEmit","build:es":"tsc --project tsconfig.build.json --module esnext --outDir es","build:lib":"tsc --project tsconfig.build.json --module commonjs --outDir lib","build":"cross-env NODE_ENV=production && npm run build:es && npm run build:lib","test":"cross-env NODE_ENV=test && npm run test:unit","test:unit":"jest","prepublishOnly":"npm run test && npm run g && npm run build && npm run type-check && npm run digest","digest":"node scripts/digest.js"},"bugs":{"url":"https://github.com/ant-design/ant-design-icons/issues"},"devDependencies":{"@babel/core":"^7.8.6","@babel/preset-env":"^7.8.6","@babel/preset-typescript":"^7.8.3","@rgrove/parse-xml":"^2.0.2","@types/gulp":"^4.0.6","@types/gulp-concat":"^0.0.32","@types/gulp-rename":"^0.0.33","@types/jest":"^25.1.3","@types/lodash.camelcase":"^4.3.6","@types/lodash.template":"^4.4.6","@types/lodash.upperfirst":"^4.3.6","@types/node":"^13.9.3","@types/ramda":"^0.26.43","@types/rgrove__parse-xml":"^1.1.0","@types/svgo":"^1.3.1","@types/through2":"^2.0.34","@typescript-eslint/eslint-plugin":"^2.21.0","@typescript-eslint/parser":"^2.21.0","babel-jest":"^25.1.0","cross-env":"^7.0.0","del":"^5.1.0","eslint":"^7.16.0","globby":"^11.0.0","gulp":"^4.0.2","gulp-clone":"^2.0.1","gulp-concat":"^2.6.1","gulp-header":"^2.0.9","gulp-rename":"^2.0.0","jest":"^25.1.0","lodash.camelcase":"^4.3.0","lodash.template":"^4.5.0","lodash.upperfirst":"^4.3.1","ramda":"^0.27.0","svgo":"^1.3.2","through2":"^3.0.1","ts-node":"^8.6.2","typescript":"^4.0.0","vinyl":"^2.2.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_lastModified":"2026-06-
|
|
1
|
+
{"name":"@ant-design/icons-svg","version":"4.3.1","sideEffects":false,"description":"Abstract nodes for ant design icons.","contributors":["HeskeyBaozi <hezhiyu233@foxmail.com>"],"homepage":"https://github.com/ant-design/ant-design-icons/","license":"MIT","main":"lib/index.js","module":"es/index.js","files":["lib","es","inline-svg","inline-namespaced-svg"],"repository":{"type":"git","url":"git+https://github.com/ant-design/ant-design-icons.git"},"scripts":{"g":"npm run generate","generate":"cross-env NODE_ENV=production gulp --require ts-node/register/transpile-only","type-check":"tsc --noEmit","build:es":"tsc --project tsconfig.build.json --module esnext --outDir es","build:lib":"tsc --project tsconfig.build.json --module commonjs --outDir lib","build":"cross-env NODE_ENV=production && npm run build:es && npm run build:lib","test":"cross-env NODE_ENV=test && npm run test:unit","test:unit":"jest","prepublishOnly":"npm run test && npm run g && npm run build && npm run type-check && npm run digest","digest":"node scripts/digest.js"},"bugs":{"url":"https://github.com/ant-design/ant-design-icons/issues"},"devDependencies":{"@babel/core":"^7.8.6","@babel/preset-env":"^7.8.6","@babel/preset-typescript":"^7.8.3","@rgrove/parse-xml":"^2.0.2","@types/gulp":"^4.0.6","@types/gulp-concat":"^0.0.32","@types/gulp-rename":"^0.0.33","@types/jest":"^25.1.3","@types/lodash.camelcase":"^4.3.6","@types/lodash.template":"^4.4.6","@types/lodash.upperfirst":"^4.3.6","@types/node":"^13.9.3","@types/ramda":"^0.26.43","@types/rgrove__parse-xml":"^1.1.0","@types/svgo":"^1.3.1","@types/through2":"^2.0.34","@typescript-eslint/eslint-plugin":"^2.21.0","@typescript-eslint/parser":"^2.21.0","babel-jest":"^25.1.0","cross-env":"^7.0.0","del":"^5.1.0","eslint":"^7.16.0","globby":"^11.0.0","gulp":"^4.0.2","gulp-clone":"^2.0.1","gulp-concat":"^2.6.1","gulp-header":"^2.0.9","gulp-rename":"^2.0.0","jest":"^25.1.0","lodash.camelcase":"^4.3.0","lodash.template":"^4.5.0","lodash.upperfirst":"^4.3.1","ramda":"^0.27.0","svgo":"^1.3.2","through2":"^3.0.1","ts-node":"^8.6.2","typescript":"^4.0.0","vinyl":"^2.2.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_lastModified":"2026-06-25T01:02:41.232Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"acorn","description":"ECMAScript parser","homepage":"https://github.com/acornjs/acorn","main":"dist/acorn.js","types":"dist/acorn.d.ts","module":"dist/acorn.mjs","exports":{".":[{"import":"./dist/acorn.mjs","require":"./dist/acorn.js","default":"./dist/acorn.js"},"./dist/acorn.js"],"./package.json":"./package.json"},"version":"8.11.2","engines":{"node":">=0.4.0"},"maintainers":[{"name":"Marijn Haverbeke","email":"marijnh@gmail.com","web":"https://marijnhaverbeke.nl"},{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"https://rreverser.com/"},{"name":"Adrian Heine","web":"http://adrianheine.de"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn.git"},"license":"MIT","scripts":{"prepare":"cd ..; npm run build:main"},"bin":{"acorn":"./bin/acorn"},"_lastModified":"2026-06-
|
|
1
|
+
{"name":"acorn","description":"ECMAScript parser","homepage":"https://github.com/acornjs/acorn","main":"dist/acorn.js","types":"dist/acorn.d.ts","module":"dist/acorn.mjs","exports":{".":[{"import":"./dist/acorn.mjs","require":"./dist/acorn.js","default":"./dist/acorn.js"},"./dist/acorn.js"],"./package.json":"./package.json"},"version":"8.11.2","engines":{"node":">=0.4.0"},"maintainers":[{"name":"Marijn Haverbeke","email":"marijnh@gmail.com","web":"https://marijnhaverbeke.nl"},{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"https://rreverser.com/"},{"name":"Adrian Heine","web":"http://adrianheine.de"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn.git"},"license":"MIT","scripts":{"prepare":"cd ..; npm run build:main"},"bin":{"acorn":"./bin/acorn"},"_lastModified":"2026-06-25T01:02:42.131Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"acorn-jsx","description":"Modern, fast React.js JSX parser","homepage":"https://github.com/acornjs/acorn-jsx","version":"5.3.2","maintainers":[{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"http://rreverser.com/"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn-jsx"},"license":"MIT","scripts":{"test":"node test/run.js"},"peerDependencies":{"acorn":"^6.0.0 || ^7.0.0 || ^8.0.0"},"devDependencies":{"acorn":"^8.0.1"},"_lastModified":"2026-06-
|
|
1
|
+
{"name":"acorn-jsx","description":"Modern, fast React.js JSX parser","homepage":"https://github.com/acornjs/acorn-jsx","version":"5.3.2","maintainers":[{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"http://rreverser.com/"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn-jsx"},"license":"MIT","scripts":{"test":"node test/run.js"},"peerDependencies":{"acorn":"^6.0.0 || ^7.0.0 || ^8.0.0"},"devDependencies":{"acorn":"^8.0.1"},"_lastModified":"2026-06-25T01:02:42.557Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"acorn-walk","description":"ECMAScript (ESTree) AST walker","homepage":"https://github.com/acornjs/acorn","main":"dist/walk.js","types":"dist/walk.d.ts","module":"dist/walk.mjs","exports":{".":[{"import":"./dist/walk.mjs","require":"./dist/walk.js","default":"./dist/walk.js"},"./dist/walk.js"],"./package.json":"./package.json"},"version":"8.3.4","engines":{"node":">=0.4.0"},"dependencies":{"acorn":"^8.11.0"},"maintainers":[{"name":"Marijn Haverbeke","email":"marijnh@gmail.com","web":"https://marijnhaverbeke.nl"},{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"https://rreverser.com/"},{"name":"Adrian Heine","web":"http://adrianheine.de"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn.git"},"scripts":{"prepare":"cd ..; npm run build:walk"},"license":"MIT","_lastModified":"2026-06-
|
|
1
|
+
{"name":"acorn-walk","description":"ECMAScript (ESTree) AST walker","homepage":"https://github.com/acornjs/acorn","main":"dist/walk.js","types":"dist/walk.d.ts","module":"dist/walk.mjs","exports":{".":[{"import":"./dist/walk.mjs","require":"./dist/walk.js","default":"./dist/walk.js"},"./dist/walk.js"],"./package.json":"./package.json"},"version":"8.3.4","engines":{"node":">=0.4.0"},"dependencies":{"acorn":"^8.11.0"},"maintainers":[{"name":"Marijn Haverbeke","email":"marijnh@gmail.com","web":"https://marijnhaverbeke.nl"},{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"https://rreverser.com/"},{"name":"Adrian Heine","web":"http://adrianheine.de"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn.git"},"scripts":{"prepare":"cd ..; npm run build:walk"},"license":"MIT","_lastModified":"2026-06-25T01:02:42.666Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"ses","version":"1.14.0","description":"Hardened JavaScript for Fearless Cooperation","keywords":["lockdown","harden","Compartment","assert","security","confinement","isolation","object capabilities","ocaps","secure execution","third-party code","prototype pollution","supply-chain attack","plugin"],"author":"Agoric","license":"Apache-2.0","homepage":"https://github.com/Agoric/SES-shim/tree/master/packages/ses#readme","repository":{"type":"git","url":"git+https://github.com/endojs/endo.git","directory":"packages/ses"},"bugs":{"url":"https://github.com/endojs/endo/issues"},"type":"module","main":"./dist/ses.cjs","module":"./index.js","unpkg":"./dist/ses.umd.js","types":"./types.d.ts","exports":{".":{"import":{"types":"./types.d.ts","xs":"./src-xs/index.js","default":"./index.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/ses.cjs"}},"./lockdown":{"import":{"types":"./types.d.ts","default":"./index.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/ses.cjs"}},"./hermes":{"require":{"types":"./dist/types.d.cts","default":"./dist/ses-hermes.cjs"}},"./tools.js":"./tools.js","./assert-shim.js":"./assert-shim.js","./lockdown-shim.js":{"xs":"./src-xs/lockdown-shim.js","default":"./lockdown-shim.js"},"./compartment-shim.js":{"xs":"./src-xs/compartment-shim.js","default":"./compartment-shim.js"},"./console-shim.js":"./console-shim.js","./package.json":"./package.json"},"scripts":{"build:vanilla":"node scripts/bundle.js","build:hermes":"node scripts/bundle.js hermes","build":"yarn build:vanilla && yarn build:hermes","clean":"rm -rf dist","cover":"c8 ava","demo":"python3 -m http.server","lint":"yarn lint:types && yarn lint:eslint","lint-fix":"eslint --fix .","lint:eslint":"eslint .","lint:types":"tsc","prepare":"npm run clean && npm run build","qt":"ava","test":"tsd && ava","test:hermes":"./scripts/hermes-test.sh","test:xs":"xst dist/ses.umd.js test/_lockdown-safe.js && node scripts/generate-test-xs.js && xst tmp/test-xs.js && rm -rf tmp","postpack":"git clean -fX \"*.d.ts*\" \"*.d.cts*\" \"*.d.mts*\" \"*.tsbuildinfo\""},"dependencies":{"@endo/cache-map":"^1.1.0","@endo/env-options":"^1.1.11","@endo/immutable-arraybuffer":"^1.1.2"},"devDependencies":{"@babel/generator":"^7.26.3","@babel/parser":"~7.26.2","@babel/traverse":"~7.25.9","@babel/types":"~7.26.0","@endo/compartment-mapper":"^1.6.3","@endo/module-source":"^1.3.3","@endo/test262-runner":"^0.1.48","@types/babel__traverse":"^7.20.5","ava":"^6.1.3","babel-eslint":"^10.1.0","c8":"^7.14.0","core-js":"^3.31.0","eslint":"^8.57.1","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^9.1.0","eslint-plugin-eslint-comments":"^3.2.0","eslint-plugin-import":"^2.31.0","hermes-engine-cli":"^0.12.0","prettier":"^3.5.3","terser":"^5.16.6","tsd":"^0.31.2","typescript":"~5.8.3"},"files":["./*.d.ts","./*.js","./*.map","LICENSE*","SECURITY*","dist","lib","src","tools"],"publishConfig":{"access":"public"},"eslintConfig":{"extends":["plugin:@endo/ses"]},"ava":{"files":["test/**/*.test.*"],"timeout":"2m"},"typeCoverage":{"atLeast":81.17},"gitHead":"9815aea9541f241389d2135c6097a7442bdffa17","_lastModified":"2026-06-
|
|
1
|
+
{"name":"ses","version":"1.14.0","description":"Hardened JavaScript for Fearless Cooperation","keywords":["lockdown","harden","Compartment","assert","security","confinement","isolation","object capabilities","ocaps","secure execution","third-party code","prototype pollution","supply-chain attack","plugin"],"author":"Agoric","license":"Apache-2.0","homepage":"https://github.com/Agoric/SES-shim/tree/master/packages/ses#readme","repository":{"type":"git","url":"git+https://github.com/endojs/endo.git","directory":"packages/ses"},"bugs":{"url":"https://github.com/endojs/endo/issues"},"type":"module","main":"./dist/ses.cjs","module":"./index.js","unpkg":"./dist/ses.umd.js","types":"./types.d.ts","exports":{".":{"import":{"types":"./types.d.ts","xs":"./src-xs/index.js","default":"./index.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/ses.cjs"}},"./lockdown":{"import":{"types":"./types.d.ts","default":"./index.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/ses.cjs"}},"./hermes":{"require":{"types":"./dist/types.d.cts","default":"./dist/ses-hermes.cjs"}},"./tools.js":"./tools.js","./assert-shim.js":"./assert-shim.js","./lockdown-shim.js":{"xs":"./src-xs/lockdown-shim.js","default":"./lockdown-shim.js"},"./compartment-shim.js":{"xs":"./src-xs/compartment-shim.js","default":"./compartment-shim.js"},"./console-shim.js":"./console-shim.js","./package.json":"./package.json"},"scripts":{"build:vanilla":"node scripts/bundle.js","build:hermes":"node scripts/bundle.js hermes","build":"yarn build:vanilla && yarn build:hermes","clean":"rm -rf dist","cover":"c8 ava","demo":"python3 -m http.server","lint":"yarn lint:types && yarn lint:eslint","lint-fix":"eslint --fix .","lint:eslint":"eslint .","lint:types":"tsc","prepare":"npm run clean && npm run build","qt":"ava","test":"tsd && ava","test:hermes":"./scripts/hermes-test.sh","test:xs":"xst dist/ses.umd.js test/_lockdown-safe.js && node scripts/generate-test-xs.js && xst tmp/test-xs.js && rm -rf tmp","postpack":"git clean -fX \"*.d.ts*\" \"*.d.cts*\" \"*.d.mts*\" \"*.tsbuildinfo\""},"dependencies":{"@endo/cache-map":"^1.1.0","@endo/env-options":"^1.1.11","@endo/immutable-arraybuffer":"^1.1.2"},"devDependencies":{"@babel/generator":"^7.26.3","@babel/parser":"~7.26.2","@babel/traverse":"~7.25.9","@babel/types":"~7.26.0","@endo/compartment-mapper":"^1.6.3","@endo/module-source":"^1.3.3","@endo/test262-runner":"^0.1.48","@types/babel__traverse":"^7.20.5","ava":"^6.1.3","babel-eslint":"^10.1.0","c8":"^7.14.0","core-js":"^3.31.0","eslint":"^8.57.1","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^9.1.0","eslint-plugin-eslint-comments":"^3.2.0","eslint-plugin-import":"^2.31.0","hermes-engine-cli":"^0.12.0","prettier":"^3.5.3","terser":"^5.16.6","tsd":"^0.31.2","typescript":"~5.8.3"},"files":["./*.d.ts","./*.js","./*.map","LICENSE*","SECURITY*","dist","lib","src","tools"],"publishConfig":{"access":"public"},"eslintConfig":{"extends":["plugin:@endo/ses"]},"ava":{"files":["test/**/*.test.*"],"timeout":"2m"},"typeCoverage":{"atLeast":81.17},"gitHead":"9815aea9541f241389d2135c6097a7442bdffa17","_lastModified":"2026-06-25T01:02:41.734Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"zod","version":"4.3.5","type":"module","license":"MIT","author":"Colin McDonnell <zod@colinhacks.com>","description":"TypeScript-first schema declaration and validation library with static type inference","homepage":"https://zod.dev","llms":"https://zod.dev/llms.txt","llmsFull":"https://zod.dev/llms-full.txt","mcpServer":"https://mcp.inkeep.com/zod/mcp","funding":"https://github.com/sponsors/colinhacks","sideEffects":false,"files":["src","**/*.js","**/*.mjs","**/*.cjs","**/*.d.ts","**/*.d.mts","**/*.d.cts","**/package.json"],"keywords":["typescript","schema","validation","type","inference"],"main":"./index.cjs","types":"./index.d.cts","module":"./index.js","zshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts","./mini":"./src/mini/index.ts","./locales":"./src/locales/index.ts","./v3":"./src/v3/index.ts","./v4":"./src/v4/index.ts","./v4-mini":"./src/v4-mini/index.ts","./v4/mini":"./src/v4/mini/index.ts","./v4/core":"./src/v4/core/index.ts","./v4/locales":"./src/v4/locales/index.ts","./v4/locales/*":"./src/v4/locales/*"},"conditions":{"@zod/source":"src"}},"exports":{"./package.json":"./package.json",".":{"@zod/source":"./src/index.ts","types":"./index.d.cts","import":"./index.js","require":"./index.cjs"},"./mini":{"@zod/source":"./src/mini/index.ts","types":"./mini/index.d.cts","import":"./mini/index.js","require":"./mini/index.cjs"},"./locales":{"@zod/source":"./src/locales/index.ts","types":"./locales/index.d.cts","import":"./locales/index.js","require":"./locales/index.cjs"},"./v3":{"@zod/source":"./src/v3/index.ts","types":"./v3/index.d.cts","import":"./v3/index.js","require":"./v3/index.cjs"},"./v4":{"@zod/source":"./src/v4/index.ts","types":"./v4/index.d.cts","import":"./v4/index.js","require":"./v4/index.cjs"},"./v4-mini":{"@zod/source":"./src/v4-mini/index.ts","types":"./v4-mini/index.d.cts","import":"./v4-mini/index.js","require":"./v4-mini/index.cjs"},"./v4/mini":{"@zod/source":"./src/v4/mini/index.ts","types":"./v4/mini/index.d.cts","import":"./v4/mini/index.js","require":"./v4/mini/index.cjs"},"./v4/core":{"@zod/source":"./src/v4/core/index.ts","types":"./v4/core/index.d.cts","import":"./v4/core/index.js","require":"./v4/core/index.cjs"},"./v4/locales":{"@zod/source":"./src/v4/locales/index.ts","types":"./v4/locales/index.d.cts","import":"./v4/locales/index.js","require":"./v4/locales/index.cjs"},"./v4/locales/*":{"@zod/source":"./src/v4/locales/*","types":"./v4/locales/*","import":"./v4/locales/*","require":"./v4/locales/*"}},"repository":{"type":"git","url":"git+https://github.com/colinhacks/zod.git"},"bugs":{"url":"https://github.com/colinhacks/zod/issues"},"support":{"backing":{"npm-funding":true}},"scripts":{"clean":"git clean -xdf . -e node_modules","build":"zshy --project tsconfig.build.json","postbuild":"tsx ../../scripts/write-stub-package-jsons.ts && pnpm biome check --write .","test:watch":"pnpm vitest","test":"pnpm vitest run","prepublishOnly":"tsx ../../scripts/check-versions.ts"},"_lastModified":"2026-06-
|
|
1
|
+
{"name":"zod","version":"4.3.5","type":"module","license":"MIT","author":"Colin McDonnell <zod@colinhacks.com>","description":"TypeScript-first schema declaration and validation library with static type inference","homepage":"https://zod.dev","llms":"https://zod.dev/llms.txt","llmsFull":"https://zod.dev/llms-full.txt","mcpServer":"https://mcp.inkeep.com/zod/mcp","funding":"https://github.com/sponsors/colinhacks","sideEffects":false,"files":["src","**/*.js","**/*.mjs","**/*.cjs","**/*.d.ts","**/*.d.mts","**/*.d.cts","**/package.json"],"keywords":["typescript","schema","validation","type","inference"],"main":"./index.cjs","types":"./index.d.cts","module":"./index.js","zshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts","./mini":"./src/mini/index.ts","./locales":"./src/locales/index.ts","./v3":"./src/v3/index.ts","./v4":"./src/v4/index.ts","./v4-mini":"./src/v4-mini/index.ts","./v4/mini":"./src/v4/mini/index.ts","./v4/core":"./src/v4/core/index.ts","./v4/locales":"./src/v4/locales/index.ts","./v4/locales/*":"./src/v4/locales/*"},"conditions":{"@zod/source":"src"}},"exports":{"./package.json":"./package.json",".":{"@zod/source":"./src/index.ts","types":"./index.d.cts","import":"./index.js","require":"./index.cjs"},"./mini":{"@zod/source":"./src/mini/index.ts","types":"./mini/index.d.cts","import":"./mini/index.js","require":"./mini/index.cjs"},"./locales":{"@zod/source":"./src/locales/index.ts","types":"./locales/index.d.cts","import":"./locales/index.js","require":"./locales/index.cjs"},"./v3":{"@zod/source":"./src/v3/index.ts","types":"./v3/index.d.cts","import":"./v3/index.js","require":"./v3/index.cjs"},"./v4":{"@zod/source":"./src/v4/index.ts","types":"./v4/index.d.cts","import":"./v4/index.js","require":"./v4/index.cjs"},"./v4-mini":{"@zod/source":"./src/v4-mini/index.ts","types":"./v4-mini/index.d.cts","import":"./v4-mini/index.js","require":"./v4-mini/index.cjs"},"./v4/mini":{"@zod/source":"./src/v4/mini/index.ts","types":"./v4/mini/index.d.cts","import":"./v4/mini/index.js","require":"./v4/mini/index.cjs"},"./v4/core":{"@zod/source":"./src/v4/core/index.ts","types":"./v4/core/index.d.cts","import":"./v4/core/index.js","require":"./v4/core/index.cjs"},"./v4/locales":{"@zod/source":"./src/v4/locales/index.ts","types":"./v4/locales/index.d.cts","import":"./v4/locales/index.js","require":"./v4/locales/index.cjs"},"./v4/locales/*":{"@zod/source":"./src/v4/locales/*","types":"./v4/locales/*","import":"./v4/locales/*","require":"./v4/locales/*"}},"repository":{"type":"git","url":"git+https://github.com/colinhacks/zod.git"},"bugs":{"url":"https://github.com/colinhacks/zod/issues"},"support":{"backing":{"npm-funding":true}},"scripts":{"clean":"git clean -xdf . -e node_modules","build":"zshy --project tsconfig.build.json","postbuild":"tsx ../../scripts/write-stub-package-jsons.ts && pnpm biome check --write .","test:watch":"pnpm vitest","test":"pnpm vitest run","prepublishOnly":"tsx ../../scripts/check-versions.ts"},"_lastModified":"2026-06-25T01:02:43.735Z"}
|
|
@@ -6240,11 +6240,12 @@ function buildAuthoringAIEmployeeActionIdentity(settings) {
|
|
|
6240
6240
|
return stableSerializeAuthoringValue(normalizeAuthoringAIEmployeePublicSettingsForIdentity(settings));
|
|
6241
6241
|
}
|
|
6242
6242
|
function normalizeAuthoringAIEmployeePublicSettingsForIdentity(settings) {
|
|
6243
|
+
const workContext = Object.prototype.hasOwnProperty.call(settings, "workContext") ? normalizeAuthoringAIEmployeeWorkContextForIdentity(settings.workContext) : [{ type: "flow-model", target: "self" }];
|
|
6243
6244
|
return {
|
|
6244
6245
|
username: String(settings.username || "").trim(),
|
|
6245
6246
|
auto: typeof settings.auto === "boolean" ? settings.auto : false,
|
|
6246
|
-
workContext
|
|
6247
|
-
tasks: normalizeAuthoringAIEmployeeTasksForIdentity(settings.tasks),
|
|
6247
|
+
workContext,
|
|
6248
|
+
tasks: normalizeAuthoringAIEmployeeTasksForIdentity(settings.tasks, workContext),
|
|
6248
6249
|
style: {
|
|
6249
6250
|
...AUTHORING_AI_EMPLOYEE_DEFAULT_STYLE,
|
|
6250
6251
|
..._.isPlainObject(settings.style) ? _.pick(settings.style, AUTHORING_AI_EMPLOYEE_STYLE_PUBLIC_KEYS) : {}
|
|
@@ -6263,7 +6264,14 @@ function normalizeAuthoringAIEmployeeWorkContextForIdentity(value) {
|
|
|
6263
6264
|
return output;
|
|
6264
6265
|
});
|
|
6265
6266
|
}
|
|
6266
|
-
function
|
|
6267
|
+
function normalizeAuthoringAIEmployeeTaskWorkContextForIdentity(value, defaultWorkContext) {
|
|
6268
|
+
const normalized = normalizeAuthoringAIEmployeeWorkContextForIdentity(value);
|
|
6269
|
+
if (Array.isArray(defaultWorkContext) && !normalized.length) {
|
|
6270
|
+
return _.cloneDeep(defaultWorkContext);
|
|
6271
|
+
}
|
|
6272
|
+
return normalized;
|
|
6273
|
+
}
|
|
6274
|
+
function normalizeAuthoringAIEmployeeTasksForIdentity(value, defaultWorkContext) {
|
|
6267
6275
|
return _.castArray(value || []).map((task) => {
|
|
6268
6276
|
if (!_.isPlainObject(task)) {
|
|
6269
6277
|
return task;
|
|
@@ -6271,10 +6279,11 @@ function normalizeAuthoringAIEmployeeTasksForIdentity(value) {
|
|
|
6271
6279
|
const output = _.pick(task, AUTHORING_AI_EMPLOYEE_TASK_PUBLIC_SETTING_KEYS);
|
|
6272
6280
|
if (_.isPlainObject(output.message)) {
|
|
6273
6281
|
output.message = _.pick(output.message, AUTHORING_AI_EMPLOYEE_TASK_MESSAGE_PUBLIC_KEYS);
|
|
6274
|
-
if (
|
|
6275
|
-
output.message.workContext =
|
|
6276
|
-
|
|
6277
|
-
|
|
6282
|
+
if (Object.prototype.hasOwnProperty.call(output.message, "workContext")) {
|
|
6283
|
+
output.message.workContext = normalizeAuthoringAIEmployeeTaskWorkContextForIdentity(
|
|
6284
|
+
output.message.workContext,
|
|
6285
|
+
defaultWorkContext
|
|
6286
|
+
);
|
|
6278
6287
|
}
|
|
6279
6288
|
}
|
|
6280
6289
|
if (Object.prototype.hasOwnProperty.call(task, "prompt") && !Object.prototype.hasOwnProperty.call(output.message || {}, "user")) {
|
|
@@ -6283,6 +6292,13 @@ function normalizeAuthoringAIEmployeeTasksForIdentity(value) {
|
|
|
6283
6292
|
user: task.prompt
|
|
6284
6293
|
};
|
|
6285
6294
|
}
|
|
6295
|
+
if (!_.isPlainObject(output.message) && Array.isArray(defaultWorkContext)) {
|
|
6296
|
+
output.message = {
|
|
6297
|
+
workContext: _.cloneDeep(defaultWorkContext)
|
|
6298
|
+
};
|
|
6299
|
+
} else if (_.isPlainObject(output.message) && !Object.prototype.hasOwnProperty.call(output.message, "workContext")) {
|
|
6300
|
+
output.message.workContext = _.cloneDeep(defaultWorkContext || []);
|
|
6301
|
+
}
|
|
6286
6302
|
if (_.isPlainObject(output.model)) {
|
|
6287
6303
|
output.model = _.pick(output.model, AUTHORING_AI_EMPLOYEE_TASK_MODEL_PUBLIC_KEYS);
|
|
6288
6304
|
}
|
|
@@ -26,7 +26,7 @@ export declare function buildSurfaceKeysObject(keyMap: Map<string, FlowSurfaceRe
|
|
|
26
26
|
[k: string]: {
|
|
27
27
|
uid: string;
|
|
28
28
|
kind: string;
|
|
29
|
-
source: "
|
|
29
|
+
source: "system" | "declared" | "request";
|
|
30
30
|
locator: FlowSurfaceReadLocator;
|
|
31
31
|
};
|
|
32
32
|
};
|
|
@@ -32,7 +32,6 @@ __export(rules_exports, {
|
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(rules_exports);
|
|
34
34
|
var import_blocked_capability_reroute = require("./blocked-capability-reroute");
|
|
35
|
-
var import_blocked_global_stop = require("./blocked-global-stop");
|
|
36
35
|
var import_ctx_libs_member_mismatch_stop = require("./ctx-libs-member-mismatch-stop");
|
|
37
36
|
var import_ctx_root_mismatch_stop = require("./ctx-root-mismatch-stop");
|
|
38
37
|
var import_missing_top_level_return = require("./missing-top-level-return");
|
|
@@ -61,7 +60,6 @@ const RUNJS_AUTHORING_RULES = [
|
|
|
61
60
|
import_replace_innerhtml_with_render.replaceInnerHtmlWithRenderRule,
|
|
62
61
|
import_render_top_level_function_wrapper.renderTopLevelFunctionWrapperRule,
|
|
63
62
|
import_render_unreachable_render_call.renderUnreachableRenderCallRule,
|
|
64
|
-
import_blocked_global_stop.blockedGlobalStopRule,
|
|
65
63
|
import_unknown_global_stop.unknownGlobalStopRule,
|
|
66
64
|
import_blocked_capability_reroute.blockedCapabilityRerouteRule,
|
|
67
65
|
import_react_runtime_contract_stop.reactRuntimeContractStopRule,
|
|
@@ -21,7 +21,6 @@ export declare const BLOCKED_CTX_CAPABILITIES: Record<string, {
|
|
|
21
21
|
capability: string;
|
|
22
22
|
reroute: string;
|
|
23
23
|
}>;
|
|
24
|
-
export declare const FORBIDDEN_BARE_GLOBALS: Set<string>;
|
|
25
24
|
export declare const RUNJS_ALLOWED_BARE_GLOBALS: Set<string>;
|
|
26
25
|
export declare const RUNJS_ALLOWED_BARE_GLOBALS_BY_MODEL_USE: Record<string, Set<string>>;
|
|
27
26
|
export declare const NON_METHOD_CALL_KEYWORDS: Set<string>;
|
|
@@ -50,7 +50,6 @@ __export(constants_exports, {
|
|
|
50
50
|
FLOW_RESOURCE_CLASS_NAMES: () => FLOW_RESOURCE_CLASS_NAMES,
|
|
51
51
|
FLOW_RESOURCE_METHODS_BY_TYPE: () => FLOW_RESOURCE_METHODS_BY_TYPE,
|
|
52
52
|
FLOW_RESOURCE_METHOD_SUGGESTIONS: () => FLOW_RESOURCE_METHOD_SUGGESTIONS,
|
|
53
|
-
FORBIDDEN_BARE_GLOBALS: () => FORBIDDEN_BARE_GLOBALS,
|
|
54
53
|
INIT_RESOURCE_CLASS_NAMES: () => INIT_RESOURCE_CLASS_NAMES,
|
|
55
54
|
KNOWN_MODEL_USES: () => KNOWN_MODEL_USES,
|
|
56
55
|
MAX_RUNJS_ERRORS_PER_SOURCE: () => MAX_RUNJS_ERRORS_PER_SOURCE,
|
|
@@ -224,7 +223,12 @@ const ALLOWED_CTX_ROOTS = /* @__PURE__ */ new Set([
|
|
|
224
223
|
]);
|
|
225
224
|
const CHART_CTX_ROOTS = /* @__PURE__ */ new Set(["data"]);
|
|
226
225
|
const BLOCKED_CTX_CAPABILITIES = {};
|
|
227
|
-
const
|
|
226
|
+
const RUNJS_ALLOWED_BARE_GLOBALS = /* @__PURE__ */ new Set([
|
|
227
|
+
"ctx",
|
|
228
|
+
"console",
|
|
229
|
+
"window",
|
|
230
|
+
"document",
|
|
231
|
+
"navigator",
|
|
228
232
|
"fetch",
|
|
229
233
|
"localStorage",
|
|
230
234
|
"sessionStorage",
|
|
@@ -237,22 +241,6 @@ const FORBIDDEN_BARE_GLOBALS = /* @__PURE__ */ new Set([
|
|
|
237
241
|
"EventSource",
|
|
238
242
|
"indexedDB",
|
|
239
243
|
"caches",
|
|
240
|
-
"Function",
|
|
241
|
-
"eval",
|
|
242
|
-
"globalThis",
|
|
243
|
-
"Intl",
|
|
244
|
-
"process",
|
|
245
|
-
"require",
|
|
246
|
-
"module",
|
|
247
|
-
"exports",
|
|
248
|
-
"location"
|
|
249
|
-
]);
|
|
250
|
-
const RUNJS_ALLOWED_BARE_GLOBALS = /* @__PURE__ */ new Set([
|
|
251
|
-
"ctx",
|
|
252
|
-
"console",
|
|
253
|
-
"window",
|
|
254
|
-
"document",
|
|
255
|
-
"navigator",
|
|
256
244
|
"setTimeout",
|
|
257
245
|
"clearTimeout",
|
|
258
246
|
"setInterval",
|
|
@@ -296,9 +284,14 @@ const RUNJS_ALLOWED_BARE_GLOBALS = /* @__PURE__ */ new Set([
|
|
|
296
284
|
"WeakMap",
|
|
297
285
|
"WeakRef",
|
|
298
286
|
"WeakSet",
|
|
287
|
+
"Function",
|
|
288
|
+
"eval",
|
|
289
|
+
"globalThis",
|
|
290
|
+
"Intl",
|
|
299
291
|
"JSON",
|
|
300
292
|
"Blob",
|
|
301
293
|
"URL",
|
|
294
|
+
"location",
|
|
302
295
|
"decodeURI",
|
|
303
296
|
"decodeURIComponent",
|
|
304
297
|
"encodeURI",
|
|
@@ -714,7 +707,6 @@ function escapeRegExp(value) {
|
|
|
714
707
|
FLOW_RESOURCE_CLASS_NAMES,
|
|
715
708
|
FLOW_RESOURCE_METHODS_BY_TYPE,
|
|
716
709
|
FLOW_RESOURCE_METHOD_SUGGESTIONS,
|
|
717
|
-
FORBIDDEN_BARE_GLOBALS,
|
|
718
710
|
INIT_RESOURCE_CLASS_NAMES,
|
|
719
711
|
KNOWN_MODEL_USES,
|
|
720
712
|
MAX_RUNJS_ERRORS_PER_SOURCE,
|
|
@@ -40,9 +40,6 @@ export type RunJsScanResult = RunJsAstInspection & {
|
|
|
40
40
|
match: string;
|
|
41
41
|
}>;
|
|
42
42
|
dynamicCtxAccesses: IndexedEntry[];
|
|
43
|
-
forbiddenBareGlobals: Array<IndexedEntry & {
|
|
44
|
-
name: string;
|
|
45
|
-
}>;
|
|
46
43
|
functionRanges: SourceRange[];
|
|
47
44
|
invalidCtxLibMemberAccesses: InvalidCtxLibMemberAccess[];
|
|
48
45
|
invalidReactRuntimeBindings: InvalidReactRuntimeBinding[];
|
|
@@ -65,15 +62,6 @@ export type RunJsScanResult = RunJsAstInspection & {
|
|
|
65
62
|
}>;
|
|
66
63
|
topLevelReturns: IndexedEntry[];
|
|
67
64
|
unboundReactCreateElementCalls: IndexedEntry[];
|
|
68
|
-
windowDocumentNavigatorAliases: Array<{
|
|
69
|
-
alias: string;
|
|
70
|
-
index: number;
|
|
71
|
-
root: string;
|
|
72
|
-
}>;
|
|
73
|
-
windowDocumentNavigatorUses: Array<IndexedEntry & {
|
|
74
|
-
member: string;
|
|
75
|
-
root: string;
|
|
76
|
-
}>;
|
|
77
65
|
};
|
|
78
66
|
export type RunJsInspectionRuntime = {
|
|
79
67
|
context: RunJsAuthoringContext;
|
|
@@ -149,16 +149,6 @@ export declare function scanJavaScriptSource(source: string, ast?: any, context?
|
|
|
149
149
|
alias: string;
|
|
150
150
|
index: number;
|
|
151
151
|
}[];
|
|
152
|
-
windowDocumentNavigatorUses: {
|
|
153
|
-
root: string;
|
|
154
|
-
member: string;
|
|
155
|
-
index: number;
|
|
156
|
-
}[];
|
|
157
|
-
windowDocumentNavigatorAliases: {
|
|
158
|
-
alias: string;
|
|
159
|
-
root: string;
|
|
160
|
-
index: number;
|
|
161
|
-
}[];
|
|
162
152
|
ctxAliases: {
|
|
163
153
|
alias: string;
|
|
164
154
|
index: number;
|
|
@@ -179,10 +169,6 @@ export declare function scanJavaScriptSource(source: string, ast?: any, context?
|
|
|
179
169
|
ruleId: "runjs-ctx-member-not-callable";
|
|
180
170
|
}[];
|
|
181
171
|
invalidCtxLibMemberAccesses: import("../internal-types").InvalidCtxLibMemberAccess[];
|
|
182
|
-
forbiddenBareGlobals: {
|
|
183
|
-
name: string;
|
|
184
|
-
index: number;
|
|
185
|
-
}[];
|
|
186
172
|
ctxMemberAccesses: {
|
|
187
173
|
member: string;
|
|
188
174
|
index: number;
|
|
@@ -71,10 +71,7 @@ function scanJavaScriptSource(source, ast, context = {}, modelUse = "") {
|
|
|
71
71
|
const flowResourceAliases = (0, import_source_patterns.collectFlowResourceAliases)(masked, sourceBindings);
|
|
72
72
|
const directDomWrites = (0, import_source_patterns.collectDirectDomWrites)(source, masked, sourceBindings);
|
|
73
73
|
const directDomAliases = (0, import_source_patterns.collectDirectDomAliases)(masked, sourceBindings);
|
|
74
|
-
const windowDocumentNavigatorUses = (0, import_source_patterns.collectWindowDocumentNavigatorUses)(source, masked, sourceBindings);
|
|
75
|
-
const windowDocumentNavigatorAliases = (0, import_source_patterns.collectWindowDocumentNavigatorAliases)(masked, sourceBindings);
|
|
76
74
|
const ctxAliases = (0, import_source_patterns.collectCtxAliases)(masked, sourceBindings);
|
|
77
|
-
const forbiddenBareGlobals = (0, import_source_patterns.collectForbiddenBareGlobals)(masked, sourceBindings);
|
|
78
75
|
return {
|
|
79
76
|
source,
|
|
80
77
|
masked,
|
|
@@ -126,14 +123,11 @@ function scanJavaScriptSource(source, ast, context = {}, modelUse = "") {
|
|
|
126
123
|
),
|
|
127
124
|
directDomWrites,
|
|
128
125
|
directDomAliases,
|
|
129
|
-
windowDocumentNavigatorUses,
|
|
130
|
-
windowDocumentNavigatorAliases,
|
|
131
126
|
ctxAliases,
|
|
132
127
|
ctxLibMemberCaseMismatches: (0, import_source_patterns.collectCtxLibMemberCaseMismatches)(source, masked, sourceBindings),
|
|
133
128
|
invalidCtxApiMemberAccesses: (astInspection == null ? void 0 : astInspection.invalidCtxApiMemberAccesses) || [],
|
|
134
129
|
invalidCtxNonFunctionCalls: (astInspection == null ? void 0 : astInspection.invalidCtxNonFunctionCalls) || [],
|
|
135
130
|
invalidCtxLibMemberAccesses: (astInspection == null ? void 0 : astInspection.invalidCtxLibMemberAccesses) || [],
|
|
136
|
-
forbiddenBareGlobals,
|
|
137
131
|
ctxMemberAccesses: (0, import_source_patterns.collectCtxMemberAccesses)(masked, sourceBindings),
|
|
138
132
|
dynamicCtxAccesses: (0, import_static_values.findUnboundCtxMatches)(masked, /\bctx\s*(?:\?\.\s*)?\[/g, sourceBindings),
|
|
139
133
|
isTopLevelFunctionWrapper: (0, import_source_patterns.isTopLevelFunctionWrapper)(masked, functionRanges, topLevelReachableCtxRenderCalls)
|
|
@@ -159,7 +153,7 @@ function collectAstUnknownBareGlobalsFromAst(ast, identifierBindings, modelUse)
|
|
|
159
153
|
if (!name) {
|
|
160
154
|
return;
|
|
161
155
|
}
|
|
162
|
-
if (allowedGlobals.has(name)
|
|
156
|
+
if (allowedGlobals.has(name)) {
|
|
163
157
|
return;
|
|
164
158
|
}
|
|
165
159
|
const index = typeof node.start === "number" ? node.start : 0;
|
|
@@ -7,10 +7,6 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
import type { CtxLibMemberCaseMismatch, FlowResourceAlias, ReactComponentAlias, ResourceCallInReactHook, SourceBinding, SourceRange, StringLiteralBinding } from '../internal-types';
|
|
10
|
-
export declare function collectForbiddenBareGlobals(masked: string, bindings: SourceBinding[]): {
|
|
11
|
-
name: string;
|
|
12
|
-
index: number;
|
|
13
|
-
}[];
|
|
14
10
|
export declare function collectInvalidApiResourceCalls(source: string, masked: string, bindings: SourceBinding[]): {
|
|
15
11
|
index: number;
|
|
16
12
|
match: string;
|
|
@@ -64,16 +60,6 @@ export declare function collectDirectDomWrites(source: string, masked: string, b
|
|
|
64
60
|
index: number;
|
|
65
61
|
match: string;
|
|
66
62
|
}[];
|
|
67
|
-
export declare function collectWindowDocumentNavigatorUses(source: string, masked: string, bindings: SourceBinding[]): {
|
|
68
|
-
root: string;
|
|
69
|
-
member: string;
|
|
70
|
-
index: number;
|
|
71
|
-
}[];
|
|
72
|
-
export declare function collectWindowDocumentNavigatorAliases(masked: string, bindings: SourceBinding[]): {
|
|
73
|
-
alias: string;
|
|
74
|
-
root: string;
|
|
75
|
-
index: number;
|
|
76
|
-
}[];
|
|
77
63
|
export declare function collectDirectDomAliases(masked: string, bindings: SourceBinding[]): {
|
|
78
64
|
alias: string;
|
|
79
65
|
index: number;
|
|
@@ -33,7 +33,6 @@ __export(source_patterns_exports, {
|
|
|
33
33
|
collectDirectDomAliases: () => collectDirectDomAliases,
|
|
34
34
|
collectDirectDomWrites: () => collectDirectDomWrites,
|
|
35
35
|
collectFlowResourceAliases: () => collectFlowResourceAliases,
|
|
36
|
-
collectForbiddenBareGlobals: () => collectForbiddenBareGlobals,
|
|
37
36
|
collectInvalidApiResourceCalls: () => collectInvalidApiResourceCalls,
|
|
38
37
|
collectInvalidFlowResourceListCalls: () => collectInvalidFlowResourceListCalls,
|
|
39
38
|
collectInvalidResourceTypeCalls: () => collectInvalidResourceTypeCalls,
|
|
@@ -43,8 +42,6 @@ __export(source_patterns_exports, {
|
|
|
43
42
|
collectReactHookCalls: () => collectReactHookCalls,
|
|
44
43
|
collectResourceCallsInReactHooks: () => collectResourceCallsInReactHooks,
|
|
45
44
|
collectUnboundReactCreateElementCalls: () => collectUnboundReactCreateElementCalls,
|
|
46
|
-
collectWindowDocumentNavigatorAliases: () => collectWindowDocumentNavigatorAliases,
|
|
47
|
-
collectWindowDocumentNavigatorUses: () => collectWindowDocumentNavigatorUses,
|
|
48
45
|
getResourceLikeCtxRunjsEntrypoint: () => getResourceLikeCtxRunjsEntrypoint,
|
|
49
46
|
isResourceLikeCtxRequest: () => isResourceLikeCtxRequest,
|
|
50
47
|
isTopLevelFunctionWrapper: () => isTopLevelFunctionWrapper
|
|
@@ -53,18 +50,6 @@ module.exports = __toCommonJS(source_patterns_exports);
|
|
|
53
50
|
var import_constants = require("../runtime/constants");
|
|
54
51
|
var import_bindings = require("../ast/bindings");
|
|
55
52
|
var import_source = require("../ast/source");
|
|
56
|
-
function collectForbiddenBareGlobals(masked, bindings) {
|
|
57
|
-
const entries = [];
|
|
58
|
-
for (const name of import_constants.FORBIDDEN_BARE_GLOBALS) {
|
|
59
|
-
const pattern = new RegExp(`(?<![.$\\w])${(0, import_source.escapeRegExp)(name)}\\b`, "g");
|
|
60
|
-
for (const match of masked.matchAll(pattern)) {
|
|
61
|
-
if (!(0, import_bindings.isNameBoundAtIndex)(bindings, name, match.index || 0) && !isObjectPropertyKey(masked, match.index || 0, name)) {
|
|
62
|
-
entries.push({ name, index: match.index || 0 });
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
return entries.sort((left, right) => left.index - right.index);
|
|
67
|
-
}
|
|
68
53
|
function collectInvalidApiResourceCalls(source, masked, bindings) {
|
|
69
54
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
70
55
|
const resourceMethods = /* @__PURE__ */ new Set(["list", "get", "create", "update", "destroy"]);
|
|
@@ -618,6 +603,16 @@ function collectDirectDomWrites(source, masked, bindings) {
|
|
|
618
603
|
}
|
|
619
604
|
entries.push({ index, match: match[0].replace(/\s*(?:\?\.)?\($/, "") });
|
|
620
605
|
}
|
|
606
|
+
for (const match of masked.matchAll(
|
|
607
|
+
/\b(document)\s*(?:\?\.|\.)\s*body\s*(?:\?\.|\.)\s*(innerHTML|insertAdjacentHTML)\b|(?<![.$\w])((window|globalThis)\s*(?:\?\.|\.)\s*document)\s*(?:\?\.|\.)\s*body\s*(?:\?\.|\.)\s*(innerHTML|insertAdjacentHTML)\b/g
|
|
608
|
+
)) {
|
|
609
|
+
const index = match.index || 0;
|
|
610
|
+
const root = match[1] || match[4];
|
|
611
|
+
if (root && (0, import_bindings.isNameBoundAtIndex)(bindings, root, index)) {
|
|
612
|
+
continue;
|
|
613
|
+
}
|
|
614
|
+
entries.push({ index, match: match[0] });
|
|
615
|
+
}
|
|
621
616
|
for (const match of commentMasked.matchAll(
|
|
622
617
|
/\b(ctx)\s*(?:\?\.|\.)\s*element\s*(?:\?\.\s*)?\[\s*(?:(['"])([A-Za-z_$][\w$]*)\2|([^\]]+))\s*\]/g
|
|
623
618
|
)) {
|
|
@@ -639,71 +634,24 @@ function collectDirectDomWrites(source, masked, bindings) {
|
|
|
639
634
|
}
|
|
640
635
|
}
|
|
641
636
|
for (const match of commentMasked.matchAll(
|
|
642
|
-
|
|
637
|
+
/(?<![.$\w])(window|globalThis)\s*(?:\?\.\s*)?\[\s*(['"])document\2\s*\]\s*(?:(?:\?\.|\.)\s*createElement|(?:\?\.\s*)?\[\s*(['"])createElement\3\s*\])/g
|
|
643
638
|
)) {
|
|
644
639
|
const index = match.index || 0;
|
|
645
|
-
|
|
646
|
-
const dynamicMember = Boolean(match[4]);
|
|
647
|
-
if (isCodeTokenAt(masked, index, match[1]) && !(0, import_bindings.isNameBoundAtIndex)(bindings, match[1], index) && (dynamicMember || isDirectDomMember(member))) {
|
|
640
|
+
if (isCodeTokenAt(masked, index, match[1]) && !(0, import_bindings.isNameBoundAtIndex)(bindings, match[1], index)) {
|
|
648
641
|
entries.push({ index, match: match[0] });
|
|
649
642
|
}
|
|
650
643
|
}
|
|
651
|
-
return entries;
|
|
652
|
-
}
|
|
653
|
-
function collectWindowDocumentNavigatorUses(source, masked, bindings) {
|
|
654
|
-
const commentMasked = (0, import_source.maskJavaScriptComments)(source);
|
|
655
|
-
const entries = [...masked.matchAll(/\b(window|document|navigator)\s*(?:\?\.|\.)\s*([A-Za-z_$][\w$]*)/g)].filter((match) => !(0, import_bindings.isNameBoundAtIndex)(bindings, match[1], match.index || 0)).map((match) => ({
|
|
656
|
-
root: match[1],
|
|
657
|
-
member: match[2],
|
|
658
|
-
index: match.index || 0
|
|
659
|
-
}));
|
|
660
644
|
for (const match of commentMasked.matchAll(
|
|
661
|
-
/\b(
|
|
645
|
+
/\b(element)\s*(?:\?\.\s*)?\[\s*(?:(['"])([A-Za-z_$][\w$]*)\2|([^\]]+))\s*\]/g
|
|
662
646
|
)) {
|
|
663
647
|
const index = match.index || 0;
|
|
664
|
-
const
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
entries.push({
|
|
669
|
-
root,
|
|
670
|
-
member: match[3] || "[dynamic]",
|
|
671
|
-
index
|
|
672
|
-
});
|
|
673
|
-
}
|
|
674
|
-
return entries.sort((left, right) => left.index - right.index);
|
|
675
|
-
}
|
|
676
|
-
function collectWindowDocumentNavigatorAliases(masked, bindings) {
|
|
677
|
-
const entries = [];
|
|
678
|
-
collectAliasMatches(
|
|
679
|
-
masked,
|
|
680
|
-
[
|
|
681
|
-
/\b(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=\s*(window|document|navigator)\b/g,
|
|
682
|
-
/(?<![.$\w])([A-Za-z_$][\w$]*)\s*=\s*(window|document|navigator)\b/g
|
|
683
|
-
],
|
|
684
|
-
(match) => {
|
|
685
|
-
const alias = match[1];
|
|
686
|
-
const root = match[2];
|
|
687
|
-
const rootIndex = (match.index || 0) + match[0].lastIndexOf(root);
|
|
688
|
-
if (alias === root || (0, import_bindings.isNameBoundAtIndex)(bindings, root, rootIndex)) {
|
|
689
|
-
return;
|
|
690
|
-
}
|
|
691
|
-
entries.push({ alias, root, index: rootIndex });
|
|
692
|
-
}
|
|
693
|
-
);
|
|
694
|
-
for (const match of masked.matchAll(
|
|
695
|
-
/\b(?:const|let|var)\s*\{([^}]*)\}\s*=\s*(window|document|navigator)\b(?!\s*(?:\.|\?\.))/g
|
|
696
|
-
)) {
|
|
697
|
-
const root = match[2];
|
|
698
|
-
const rootIndex = (match.index || 0) + match[0].lastIndexOf(root);
|
|
699
|
-
if ((0, import_bindings.isNameBoundAtIndex)(bindings, root, rootIndex)) {
|
|
700
|
-
continue;
|
|
648
|
+
const member = match[3] || "";
|
|
649
|
+
const dynamicMember = Boolean(match[4]);
|
|
650
|
+
if (isCodeTokenAt(masked, index, match[1]) && !(0, import_bindings.isNameBoundAtIndex)(bindings, match[1], index) && (dynamicMember || isDirectDomMember(member))) {
|
|
651
|
+
entries.push({ index, match: match[0] });
|
|
701
652
|
}
|
|
702
|
-
collectObjectBindingAliases(match[1]).forEach((alias) => {
|
|
703
|
-
entries.push({ alias, root, index: rootIndex });
|
|
704
|
-
});
|
|
705
653
|
}
|
|
706
|
-
return
|
|
654
|
+
return entries;
|
|
707
655
|
}
|
|
708
656
|
function collectDirectDomAliases(masked, bindings) {
|
|
709
657
|
const entries = [];
|
|
@@ -871,7 +819,6 @@ function isResourceLikeRunjsEntrypointExpression(value) {
|
|
|
871
819
|
collectDirectDomAliases,
|
|
872
820
|
collectDirectDomWrites,
|
|
873
821
|
collectFlowResourceAliases,
|
|
874
|
-
collectForbiddenBareGlobals,
|
|
875
822
|
collectInvalidApiResourceCalls,
|
|
876
823
|
collectInvalidFlowResourceListCalls,
|
|
877
824
|
collectInvalidResourceTypeCalls,
|
|
@@ -881,8 +828,6 @@ function isResourceLikeRunjsEntrypointExpression(value) {
|
|
|
881
828
|
collectReactHookCalls,
|
|
882
829
|
collectResourceCallsInReactHooks,
|
|
883
830
|
collectUnboundReactCreateElementCalls,
|
|
884
|
-
collectWindowDocumentNavigatorAliases,
|
|
885
|
-
collectWindowDocumentNavigatorUses,
|
|
886
831
|
getResourceLikeCtxRunjsEntrypoint,
|
|
887
832
|
isResourceLikeCtxRequest,
|
|
888
833
|
isTopLevelFunctionWrapper
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
export type RunJsAuthoringRepairClass = 'syntax-stop' | 'nested-runjs-stop' | 'source-limit-stop' | 'switch-to-resource-api' | 'missing-top-level-return' | 'value-surface-forbids-render' | 'unknown-surface-stop' | 'unknown-model-stop' | 'replace-innerhtml-with-render' | 'render-top-level-function-wrapper' | 'render-unreachable-render-call' | '
|
|
9
|
+
export type RunJsAuthoringRepairClass = 'syntax-stop' | 'nested-runjs-stop' | 'source-limit-stop' | 'switch-to-resource-api' | 'missing-top-level-return' | 'value-surface-forbids-render' | 'unknown-surface-stop' | 'unknown-model-stop' | 'replace-innerhtml-with-render' | 'render-top-level-function-wrapper' | 'render-unreachable-render-call' | 'unknown-global-stop' | 'blocked-capability-reroute' | 'react-runtime-contract-stop' | 'resource-runtime-contract-stop' | 'ctx-libs-member-mismatch-stop' | 'ctx-root-mismatch-stop';
|
|
10
10
|
export type RunJsAuthoringSurfaceStyle = 'render' | 'value' | 'action';
|
|
11
11
|
export interface RunJsAuthoringRuleDefinition {
|
|
12
12
|
repairClass: RunJsAuthoringRepairClass;
|