@nocobase/plugin-multi-app-manager 1.0.0-alpha.9 → 1.0.1-alpha.2

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(o,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("@nocobase/client"),require("react/jsx-runtime"),require("antd"),require("react-router-dom"),require("@formily/react"),require("antd-style"),require("react-i18next"),require("@formily/shared"),require("react")):typeof define=="function"&&define.amd?define(["exports","@nocobase/client","react/jsx-runtime","antd","react-router-dom","@formily/react","antd-style","react-i18next","@formily/shared","react"],e):(o=typeof globalThis!="undefined"?globalThis:o||self,e(o["@nocobase/plugin-multi-app-manager"]={},o["@nocobase/client"],o.jsxRuntime,o.antd,o["react-router-dom"],o["@formily/react"],o["antd-style"],o["react-i18next"],o["@formily/shared"],o.react))})(this,function(o,e,n,p,m,d,y,s,i,l){"use strict";var E=Object.defineProperty,z=Object.defineProperties;var B=Object.getOwnPropertyDescriptors;var M=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable;var F=(o,e,n)=>e in o?E(o,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[e]=n,x=(o,e)=>{for(var n in e||(e={}))K.call(e,n)&&F(o,n,e[n]);if(M)for(var n of M(e))L.call(e,n)&&F(o,n,e[n]);return o},g=(o,e)=>z(o,B(e));var v=(o,e,n)=>new Promise((p,m)=>{var d=i=>{try{s(n.next(i))}catch(l){m(l)}},y=i=>{try{s(n.throw(i))}catch(l){m(l)}},s=i=>i.done?p(i.value):Promise.resolve(i.value).then(d,y);s((n=n.apply(o,e)).next())});const T=t=>{const r=e.useApp(),u=t.value&&n.jsx("a",{target:"_blank",href:r.getRouteUrl(`/apps/${t.value}/admin`),rel:"noreferrer",children:t.value});return n.jsxs("div",{style:t.style,children:[t.addonBefore,t.prefix,u,t.suffix,t.addonAfter]})},k=d.connect(p.Input,d.mapReadPretty(T)),q=y.createStyles(({token:t})=>({button:{color:t.colorTextHeaderMenu+" !important"}})),b=()=>{const{t}=s.useTranslation("multi-app-manager");return{t}},c=t=>`{{t("${t}", { ns: 'multi-app-manager' })}}`,I=()=>{const{styles:t}=q(),{data:r,run:u}=e.useRequest({resource:"applications",action:"listPinned"},{manual:!0}),{t:f}=b(),P=e.useApp(),j=[...((r==null?void 0:r.data)||[]).map(a=>{let w=P.getRouteUrl(`/apps/${a.name}/admin/`);return a.cname&&(w=`//${a.cname}`),{key:a.name,label:n.jsx("a",{href:w,target:"_blank",rel:"noopener noreferrer",children:a.displayName||a.name})}}),{key:".manager",label:n.jsx(m.Link,{to:P.pluginSettingsManager.getRoutePath("multi-app-manager"),children:f("Manage applications")})}];return n.jsx(p.Dropdown,{onOpenChange:a=>{u()},menu:{items:j},children:n.jsx(p.Button,{className:t.button,title:"Apps",icon:n.jsx(e.Icon,{type:"AppstoreOutlined"})})})},N=t=>n.jsx(e.PinnedPluginListProvider,{items:{am:{order:201,component:"MultiAppManager",pin:!0}},children:n.jsx(e.SchemaComponentOptions,{components:{MultiAppManager:I,AppNameInput:k},children:t.children})}),h={name:"applications",targetKey:"name",fields:[{type:"uid",name:"name",primaryKey:!0,prefix:"a",interface:"input",uiSchema:{type:"string",title:c("App ID"),required:!0,"x-component":"Input","x-validator":"uid"}},{type:"string",name:"displayName",interface:"input",uiSchema:{type:"string",title:c("App display name"),required:!0,"x-component":"Input"}},{type:"string",name:"pinned",interface:"checkbox",uiSchema:{type:"boolean","x-content":c("Pin to menu"),"x-component":"Checkbox"}},{type:"string",name:"status",interface:"radioGroup",defaultValue:"pending",uiSchema:{type:"string",title:c("App status"),enum:[{label:"Initializing",value:"initializing"},{label:"Initialized",value:"initialized"},{label:"Running",value:"running"},{label:"Commanding",value:"commanding"},{label:"Stopped",value:"stopped"},{label:"Error",value:"error"},{label:"Not found",value:"not_found"}],"x-component":"Radio.Group"}}]},O=()=>{const{state:t,setState:r,refresh:u}=e.useResourceActionContext(),{resource:f}=e.useResourceContext();return{run(){return v(this,null,function*(){yield f.destroy({filterByTk:(t==null?void 0:t.selectedRowKeys)||[]}),r==null||r({selectedRowKeys:[]}),u()})}}},A={type:"void","x-component":"div",properties:{displayName:{"x-component":"CollectionField","x-decorator":"FormItem"},name:{"x-component":"CollectionField","x-decorator":"FormItem","x-disabled":"{{ !createOnly }}"},"options.autoStart":{title:e.tval("Start mode",{ns:"@nocobase/plugin-multi-app-manager"}),"x-component":"Radio.Group","x-decorator":"FormItem",default:!1,enum:[{label:e.tval("Start on first visit",{ns:"@nocobase/plugin-multi-app-manager"}),value:!1},{label:e.tval("Start with main application",{ns:"@nocobase/plugin-multi-app-manager"}),value:!0}]},cname:{title:c("Custom domain"),"x-component":"Input","x-decorator":"FormItem"},pinned:{"x-component":"CollectionField","x-decorator":"FormItem"}}},C={properties:{view:{type:"void","x-component":"AppVisitor","x-component-props":{}},update:{type:"void",title:'{{t("Edit")}}',"x-component":"Action.Link","x-component-props":{},properties:{drawer:{type:"void","x-component":"Action.Drawer","x-decorator":"Form","x-decorator-props":{useValues:"{{ cm.useValuesFromRecord }}"},title:'{{t("Edit")}}',properties:{formSchema:A,footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-component-props":{useAction:"{{ cm.useCancelAction }}"}},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",useAction:"{{ cm.useUpdateAction }}"}}}}}}}},delete:{type:"void",title:'{{ t("Delete") }}',"x-component":"Action.Link","x-component-props":{confirm:{title:"{{t('Delete')}}",content:"{{t('Are you sure you want to delete it?')}}"},useAction:"{{cm.useDestroyAction}}"}}}},R={type:"object",properties:{[i.uid()]:{type:"void","x-decorator":"ResourceActionProvider","x-decorator-props":{collection:h,resourceName:"applications",request:{resource:"applications",action:"list",params:{pageSize:50,sort:["-createdAt"],appends:[]}}},"x-component":"CollectionProvider_deprecated","x-component-props":{collection:h},properties:{actions:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:16}},properties:{delete:{type:"void",title:'{{ t("Delete") }}',"x-component":"Action","x-component-props":{icon:"DeleteOutlined",useAction:O,confirm:{title:"{{t('Delete')}}",content:"{{t('Are you sure you want to delete it?')}}"}}},create:{type:"void",title:'{{t("Add new")}}',"x-decorator":t=>l.createElement(e.SchemaComponentOptions,g(x({},t),{scope:{createOnly:!0}})),"x-component":"Action","x-component-props":{type:"primary",icon:"PlusOutlined"},properties:{drawer:{type:"void","x-component":"Action.Drawer","x-decorator":"Form","x-decorator-props":{useValues(t){const r=e.useActionContext();return e.useRequest(()=>Promise.resolve({data:{name:`a_${i.uid()}`}}),g(x({},t),{refreshDeps:[r.visible]}))}},title:'{{t("Add new")}}',properties:{formSchema:A,footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-component-props":{useAction:"{{ cm.useCancelAction }}"}},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",useAction:"{{ cm.useCreateAction }}"}}}}}}}}}},table:{type:"void","x-uid":"input","x-component":"Table.Void","x-component-props":{rowKey:"name",rowSelection:{type:"checkbox"},useDataSource:"{{ cm.useDataSourceFromRAC }}"},properties:{displayName:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{displayName:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},name:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{name:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},pinned:{type:"void",title:c("Pin to menu"),"x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{pinned:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},status:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{status:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},actions:{type:"void",title:'{{t("Actions")}}',"x-component":"Table.Column",properties:{actions:x({type:"void","x-component":"Space","x-component-props":{split:"|"}},C)}}}}}}}},V=()=>{const t=e.useRecord(),r=e.useApp();return t.cname?`//${t.cname}`:r.getRouteUrl(`/apps/${t.name}/admin/`)},_=()=>{const{t}=b(),r=V();return n.jsx("a",{href:r,target:"_blank",rel:"noreferrer",children:t("View",{ns:"client"})})},$=()=>n.jsx(p.Card,{bordered:!1,children:n.jsx(e.SchemaComponent,{schema:R,components:{AppVisitor:_}})}),S="multi-app-manager";class D extends e.Plugin{load(){return v(this,null,function*(){this.app.use(N),this.app.pluginSettingsManager.add(S,{title:`{{t("Multi-app manager", { ns: "${S}" })}}`,icon:"AppstoreOutlined",Component:$,aclSnippet:"pm.multi-app-manager.applications"})})}}o.PluginMultiAppManagerClient=D,o.default=D,o.formSchema=A,o.tableActionColumnSchema=C,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
10
+ (function(o,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("@nocobase/client"),require("react/jsx-runtime"),require("antd"),require("react-router-dom"),require("@formily/react"),require("antd-style"),require("react-i18next"),require("@formily/shared"),require("@nocobase/utils/client"),require("react")):typeof define=="function"&&define.amd?define(["exports","@nocobase/client","react/jsx-runtime","antd","react-router-dom","@formily/react","antd-style","react-i18next","@formily/shared","@nocobase/utils/client","react"],e):(o=typeof globalThis!="undefined"?globalThis:o||self,e(o["@nocobase/plugin-multi-app-manager"]={},o["@nocobase/client"],o.jsxRuntime,o.antd,o["react-router-dom"],o["@formily/react"],o["antd-style"],o["react-i18next"],o["@formily/shared"],o["@nocobase/utils"],o.react))})(this,function(o,e,n,c,m,d,y,l,i,a,T){"use strict";var z=Object.defineProperty,B=Object.defineProperties;var K=Object.getOwnPropertyDescriptors;var M=Object.getOwnPropertySymbols;var L=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable;var F=(o,e,n)=>e in o?z(o,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[e]=n,x=(o,e)=>{for(var n in e||(e={}))L.call(e,n)&&F(o,n,e[n]);if(M)for(var n of M(e))U.call(e,n)&&F(o,n,e[n]);return o},g=(o,e)=>B(o,K(e));var v=(o,e,n)=>new Promise((c,m)=>{var d=i=>{try{l(n.next(i))}catch(a){m(a)}},y=i=>{try{l(n.throw(i))}catch(a){m(a)}},l=i=>i.done?c(i.value):Promise.resolve(i.value).then(d,y);l((n=n.apply(o,e)).next())});const k=t=>{const r=e.useApp(),u=t.value&&n.jsx("a",{target:"_blank",href:r.getRouteUrl(`/apps/${t.value}/admin`),rel:"noreferrer",children:t.value});return n.jsxs("div",{style:t.style,children:[t.addonBefore,t.prefix,u,t.suffix,t.addonAfter]})},q=d.connect(c.Input,d.mapReadPretty(k)),I=y.createStyles(({token:t})=>({button:{color:t.colorTextHeaderMenu+" !important"}})),b=()=>{const{t}=l.useTranslation("multi-app-manager");return{t}},s=t=>`{{t("${t}", { ns: 'multi-app-manager' })}}`,N=()=>{const{styles:t}=I(),{data:r,run:u}=e.useRequest({resource:"applications",action:"listPinned"},{manual:!0}),{t:f}=b(),P=e.useApp(),$=[...((r==null?void 0:r.data)||[]).map(p=>{let w=P.getRouteUrl(`/apps/${p.name}/admin/`);return p.cname&&(w=`//${p.cname}`),{key:p.name,label:n.jsx("a",{href:w,target:"_blank",rel:"noopener noreferrer",children:p.displayName||p.name})}}),{key:".manager",label:n.jsx(m.Link,{to:P.pluginSettingsManager.getRoutePath("multi-app-manager"),children:f("Manage applications")})}];return n.jsx(c.Dropdown,{onOpenChange:p=>{u()},menu:{items:$},children:n.jsx(c.Button,{className:t.button,title:"Apps",icon:n.jsx(e.Icon,{type:"AppstoreOutlined"})})})},O=t=>n.jsx(e.PinnedPluginListProvider,{items:{am:{order:201,component:"MultiAppManager",pin:!0}},children:n.jsx(e.SchemaComponentOptions,{components:{MultiAppManager:N,AppNameInput:q},children:t.children})}),h={name:"applications",targetKey:"name",fields:[{type:"uid",name:"name",primaryKey:!0,prefix:"a",interface:"input",uiSchema:{type:"string",title:s("App ID"),required:!0,"x-component":"Input","x-validator":"uid"}},{type:"string",name:"displayName",interface:"input",uiSchema:{type:"string",title:s("App display name"),required:!0,"x-component":"Input"}},{type:"string",name:"pinned",interface:"checkbox",uiSchema:{type:"boolean","x-content":s("Pin to menu"),"x-component":"Checkbox"}},{type:"string",name:"status",interface:"radioGroup",defaultValue:"pending",uiSchema:{type:"string",title:s("App status"),enum:[{label:"Initializing",value:"initializing"},{label:"Initialized",value:"initialized"},{label:"Running",value:"running"},{label:"Commanding",value:"commanding"},{label:"Stopped",value:"stopped"},{label:"Error",value:"error"},{label:"Not found",value:"not_found"}],"x-component":"Radio.Group"}}]},R=()=>{const{state:t,setState:r,refresh:u}=e.useResourceActionContext(),{resource:f}=e.useResourceContext();return{run(){return v(this,null,function*(){yield f.destroy({filterByTk:(t==null?void 0:t.selectedRowKeys)||[]}),r==null||r({selectedRowKeys:[]}),u()})}}},A={type:"void","x-component":"div",properties:{displayName:{"x-component":"CollectionField","x-decorator":"FormItem"},name:{"x-component":"CollectionField","x-decorator":"FormItem","x-disabled":"{{ !createOnly }}"},"options.autoStart":{title:a.tval("Start mode",{ns:"@nocobase/plugin-multi-app-manager"}),"x-component":"Radio.Group","x-decorator":"FormItem",default:!1,enum:[{label:a.tval("Start on first visit",{ns:"@nocobase/plugin-multi-app-manager"}),value:!1},{label:a.tval("Start with main application",{ns:"@nocobase/plugin-multi-app-manager"}),value:!0}]},cname:{title:s("Custom domain"),"x-component":"Input","x-decorator":"FormItem"},pinned:{"x-component":"CollectionField","x-decorator":"FormItem"}}},C={properties:{view:{type:"void","x-component":"AppVisitor","x-component-props":{}},update:{type:"void",title:'{{t("Edit")}}',"x-component":"Action.Link","x-component-props":{},properties:{drawer:{type:"void","x-component":"Action.Drawer","x-decorator":"Form","x-decorator-props":{useValues:"{{ cm.useValuesFromRecord }}"},title:'{{t("Edit")}}',properties:{formSchema:A,footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-component-props":{useAction:"{{ cm.useCancelAction }}"}},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",useAction:"{{ cm.useUpdateAction }}"}}}}}}}},delete:{type:"void",title:'{{ t("Delete") }}',"x-component":"Action.Link","x-component-props":{confirm:{title:"{{t('Delete')}}",content:"{{t('Are you sure you want to delete it?')}}"},useAction:"{{cm.useDestroyAction}}"}}}},V={type:"object",properties:{[i.uid()]:{type:"void","x-decorator":"ResourceActionProvider","x-decorator-props":{collection:h,resourceName:"applications",request:{resource:"applications",action:"list",params:{pageSize:50,sort:["-createdAt"],appends:[]}}},"x-component":"CollectionProvider_deprecated","x-component-props":{collection:h},properties:{actions:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:16}},properties:{delete:{type:"void",title:'{{ t("Delete") }}',"x-component":"Action","x-component-props":{icon:"DeleteOutlined",useAction:R,confirm:{title:"{{t('Delete')}}",content:"{{t('Are you sure you want to delete it?')}}"}}},create:{type:"void",title:'{{t("Add new")}}',"x-decorator":t=>T.createElement(e.SchemaComponentOptions,g(x({},t),{scope:{createOnly:!0}})),"x-component":"Action","x-component-props":{type:"primary",icon:"PlusOutlined"},properties:{drawer:{type:"void","x-component":"Action.Drawer","x-decorator":"Form","x-decorator-props":{useValues(t){const r=e.useActionContext();return e.useRequest(()=>Promise.resolve({data:{name:`a_${i.uid()}`}}),g(x({},t),{refreshDeps:[r.visible]}))}},title:'{{t("Add new")}}',properties:{formSchema:A,footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-component-props":{useAction:"{{ cm.useCancelAction }}"}},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",useAction:"{{ cm.useCreateAction }}"}}}}}}}}}},table:{type:"void","x-uid":"input","x-component":"Table.Void","x-component-props":{rowKey:"name",rowSelection:{type:"checkbox"},useDataSource:"{{ cm.useDataSourceFromRAC }}"},properties:{displayName:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{displayName:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},name:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{name:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},pinned:{type:"void",title:s("Pin to menu"),"x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{pinned:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},status:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{status:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},actions:{type:"void",title:'{{t("Actions")}}',"x-component":"Table.Column",properties:{actions:x({type:"void","x-component":"Space","x-component-props":{split:"|"}},C)}}}}}}}},_=()=>{const t=e.useRecord(),r=e.useApp();return t.cname?`//${t.cname}`:r.getRouteUrl(`/apps/${t.name}/admin/`)},j=()=>{const{t}=b(),r=_();return n.jsx("a",{href:r,target:"_blank",rel:"noreferrer",children:t("View",{ns:"client"})})},E=()=>n.jsx(c.Card,{bordered:!1,children:n.jsx(e.SchemaComponent,{schema:V,components:{AppVisitor:j}})}),S="multi-app-manager";class D extends e.Plugin{load(){return v(this,null,function*(){this.app.use(O),this.app.pluginSettingsManager.add(S,{title:`{{t("Multi-app manager", { ns: "${S}" })}}`,icon:"AppstoreOutlined",Component:E,aclSnippet:"pm.multi-app-manager.applications"})})}}o.PluginMultiAppManagerClient=D,o.default=D,o.formSchema=A,o.tableActionColumnSchema=C,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -8,18 +8,18 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "1.0.0-alpha.9",
11
+ "@nocobase/client": "1.0.1-alpha.2",
12
12
  "antd": "5.12.8",
13
13
  "react": "18.2.0",
14
14
  "@formily/react": "2.3.0",
15
15
  "antd-style": "3.6.1",
16
16
  "react-router-dom": "6.21.0",
17
17
  "react-i18next": "11.18.6",
18
- "@nocobase/database": "1.0.0-alpha.9",
19
- "@nocobase/server": "1.0.0-alpha.9",
18
+ "@nocobase/database": "1.0.1-alpha.2",
19
+ "@nocobase/server": "1.0.1-alpha.2",
20
20
  "lodash": "4.17.21",
21
21
  "mysql2": "2.3.3",
22
22
  "pg": "8.11.3",
23
- "@nocobase/utils": "1.0.0-alpha.9",
23
+ "@nocobase/utils": "1.0.1-alpha.2",
24
24
  "@formily/shared": "2.3.0"
25
25
  };
@@ -1 +1 @@
1
- {"name":"mariadb","version":"2.5.6","description":"fast mariadb/mysql connector.","main":"promise.js","types":"types/index.d.ts","directories":{"lib":"lib","test":"test"},"private":false,"scripts":{"test":"npm run test:types-prettier && npm run test:prettier && npm run test:types && npm run test:lint && npm run test:base","test:base":"mocha --no-parallel --timeout 5000 \"test/**/*.js\" ","test:lint":"eslint \"{lib,test}/**/*.js\" ","test:types":"eslint \"types/*.ts\" ","test:types-prettier":"prettier --write \"types/*.ts\"","test:prettier":"prettier --write \"{tools,lib,test,benchmarks}/**/*.js\"","coverage":"npm run coverage:test && npm run coverage:report","coverage:test":"nyc mocha --no-parallel --timeout 5000 \"test/**/*.js\"","coverage:report":"nyc report --reporter=text-lcov > coverage.lcov && codecov","benchmark":"node ./benchmarks/benchmarks.js","generate":"node ./tools/generate-mariadb.js"},"repository":{"type":"git","url":"git+https://github.com/mariadb-corporation/mariadb-connector-nodejs.git"},"keywords":["mariadb","mysql","client","driver","connector"],"files":["lib","types/index.d.ts","promise.js","callback.js"],"engines":{"node":">= 10.13"},"author":"Diego Dupin <diego.dupin@mariadb.com>","license":"LGPL-2.1-or-later","dependencies":{"@types/geojson":"^7946.0.8","@types/node":"^17.0.10","denque":"^2.0.1","iconv-lite":"^0.6.3","long":"^5.2.0","moment-timezone":"^0.5.34","please-upgrade-node":"^3.2.0"},"devDependencies":{"@typescript-eslint/eslint-plugin":"^5.10.0","@typescript-eslint/parser":"^5.10.0","benchmark":"^2.1.4","chai":"^4.3.4","codecov":"^3.8.2","chalk":"^4.1.2","dom-parser":"^0.1.6","error-stack-parser":"^2.0.6","eslint":"^8.7.0","eslint-config-prettier":"^8.3.0","eslint-plugin-markdown":"^2.2.1","eslint-plugin-prettier":"^4.0.0","mocha":"^9.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.5.1","typescript":"^4.5.5"},"bugs":{"url":"https://jira.mariadb.org/projects/CONJS/"},"homepage":"https://github.com/mariadb-corporation/mariadb-connector-nodejs#readme","_lastModified":"2024-05-09T15:24:12.002Z"}
1
+ {"name":"mariadb","version":"2.5.6","description":"fast mariadb/mysql connector.","main":"promise.js","types":"types/index.d.ts","directories":{"lib":"lib","test":"test"},"private":false,"scripts":{"test":"npm run test:types-prettier && npm run test:prettier && npm run test:types && npm run test:lint && npm run test:base","test:base":"mocha --no-parallel --timeout 5000 \"test/**/*.js\" ","test:lint":"eslint \"{lib,test}/**/*.js\" ","test:types":"eslint \"types/*.ts\" ","test:types-prettier":"prettier --write \"types/*.ts\"","test:prettier":"prettier --write \"{tools,lib,test,benchmarks}/**/*.js\"","coverage":"npm run coverage:test && npm run coverage:report","coverage:test":"nyc mocha --no-parallel --timeout 5000 \"test/**/*.js\"","coverage:report":"nyc report --reporter=text-lcov > coverage.lcov && codecov","benchmark":"node ./benchmarks/benchmarks.js","generate":"node ./tools/generate-mariadb.js"},"repository":{"type":"git","url":"git+https://github.com/mariadb-corporation/mariadb-connector-nodejs.git"},"keywords":["mariadb","mysql","client","driver","connector"],"files":["lib","types/index.d.ts","promise.js","callback.js"],"engines":{"node":">= 10.13"},"author":"Diego Dupin <diego.dupin@mariadb.com>","license":"LGPL-2.1-or-later","dependencies":{"@types/geojson":"^7946.0.8","@types/node":"^17.0.10","denque":"^2.0.1","iconv-lite":"^0.6.3","long":"^5.2.0","moment-timezone":"^0.5.34","please-upgrade-node":"^3.2.0"},"devDependencies":{"@typescript-eslint/eslint-plugin":"^5.10.0","@typescript-eslint/parser":"^5.10.0","benchmark":"^2.1.4","chai":"^4.3.4","codecov":"^3.8.2","chalk":"^4.1.2","dom-parser":"^0.1.6","error-stack-parser":"^2.0.6","eslint":"^8.7.0","eslint-config-prettier":"^8.3.0","eslint-plugin-markdown":"^2.2.1","eslint-plugin-prettier":"^4.0.0","mocha":"^9.2.0","mocha-lcov-reporter":"^1.3.0","nyc":"^15.1.0","prettier":"^2.5.1","typescript":"^4.5.5"},"bugs":{"url":"https://jira.mariadb.org/projects/CONJS/"},"homepage":"https://github.com/mariadb-corporation/mariadb-connector-nodejs#readme","_lastModified":"2024-06-11T12:24:25.784Z"}
@@ -163,6 +163,10 @@ class PluginMultiAppManagerServer extends import_server.Plugin {
163
163
  async (model, options) => {
164
164
  var _a;
165
165
  const { transaction } = options;
166
+ const name = model.get("name");
167
+ if (name === "main") {
168
+ throw new Error('Application name "main" is reserved');
169
+ }
166
170
  const subApp = model.registerToSupervisor(this.app, {
167
171
  appOptionsFactory: this.appOptionsFactory
168
172
  });
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName.zh-CN": "多应用管理器",
5
5
  "description": "Dynamically create multiple apps without separate deployments.",
6
6
  "description.zh-CN": "无需单独部署即可动态创建多个应用。",
7
- "version": "1.0.0-alpha.9",
7
+ "version": "1.0.1-alpha.2",
8
8
  "license": "AGPL-3.0",
9
9
  "main": "./dist/server/index.js",
10
10
  "homepage": "https://docs.nocobase.com/handbook/multi-app-manager",
@@ -28,7 +28,7 @@
28
28
  "@nocobase/test": "1.x",
29
29
  "@nocobase/utils": "1.x"
30
30
  },
31
- "gitHead": "562d6ae965317098df05db756d160e03363dcec5",
31
+ "gitHead": "fc5a8e3c812516f787cb22d3d198f058f45b1963",
32
32
  "keywords": [
33
33
  "system"
34
34
  ]