@nocobase/plugin-multi-app-manager 0.21.0-alpha.1 → 0.21.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.js +1 -1
- package/dist/externalVersion.js +4 -4
- package/dist/node_modules/mariadb/package.json +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +1 -1
- package/dist/server/server.d.ts +1 -1
- package/dist/server/server.js +4 -4
- package/package.json +2 -2
package/dist/client/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Plugin } from '@nocobase/client';
|
|
2
|
-
export declare class
|
|
2
|
+
export declare class PluginMultiAppManagerClient extends Plugin {
|
|
3
3
|
load(): Promise<void>;
|
|
4
4
|
}
|
|
5
|
-
export default
|
|
5
|
+
export default PluginMultiAppManagerClient;
|
|
6
6
|
export { formSchema, tableActionColumnSchema } from './settings/schemas/applications';
|
package/dist/client/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(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.
|
|
1
|
+
(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"}})});
|
package/dist/externalVersion.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
"@nocobase/client": "0.21.0-alpha.
|
|
2
|
+
"@nocobase/client": "0.21.0-alpha.10",
|
|
3
3
|
"antd": "5.12.8",
|
|
4
4
|
"react": "18.2.0",
|
|
5
5
|
"@formily/react": "2.3.0",
|
|
6
6
|
"antd-style": "3.6.1",
|
|
7
7
|
"react-router-dom": "6.21.0",
|
|
8
8
|
"react-i18next": "11.18.6",
|
|
9
|
-
"@nocobase/database": "0.21.0-alpha.
|
|
10
|
-
"@nocobase/server": "0.21.0-alpha.
|
|
9
|
+
"@nocobase/database": "0.21.0-alpha.10",
|
|
10
|
+
"@nocobase/server": "0.21.0-alpha.10",
|
|
11
11
|
"lodash": "4.17.21",
|
|
12
12
|
"mysql2": "2.3.3",
|
|
13
13
|
"pg": "8.11.3",
|
|
14
|
-
"@nocobase/utils": "0.21.0-alpha.
|
|
14
|
+
"@nocobase/utils": "0.21.0-alpha.10",
|
|
15
15
|
"@formily/shared": "2.3.0"
|
|
16
16
|
};
|
|
@@ -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-
|
|
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-04-16T16:10:18.055Z"}
|
package/dist/server/index.d.ts
CHANGED
package/dist/server/index.js
CHANGED
|
@@ -18,7 +18,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
18
18
|
var server_exports = {};
|
|
19
19
|
__export(server_exports, {
|
|
20
20
|
ApplicationModel: () => import_application.ApplicationModel,
|
|
21
|
-
default: () => import_server.
|
|
21
|
+
default: () => import_server.PluginMultiAppManagerServer,
|
|
22
22
|
registerAppOptions: () => import_application.registerAppOptions
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(server_exports);
|
package/dist/server/server.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export type AppDbCreator = (app: Application, options?: Transactionable & {
|
|
|
5
5
|
}) => Promise<void>;
|
|
6
6
|
export type AppOptionsFactory = (appName: string, mainApp: Application) => any;
|
|
7
7
|
export type SubAppUpgradeHandler = (mainApp: Application) => Promise<void>;
|
|
8
|
-
export declare class
|
|
8
|
+
export declare class PluginMultiAppManagerServer extends Plugin {
|
|
9
9
|
appDbCreator: AppDbCreator;
|
|
10
10
|
appOptionsFactory: AppOptionsFactory;
|
|
11
11
|
subAppUpgradeHandler: SubAppUpgradeHandler;
|
package/dist/server/server.js
CHANGED
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
28
|
var server_exports = {};
|
|
29
29
|
__export(server_exports, {
|
|
30
|
-
|
|
30
|
+
PluginMultiAppManagerServer: () => PluginMultiAppManagerServer
|
|
31
31
|
});
|
|
32
32
|
module.exports = __toCommonJS(server_exports);
|
|
33
33
|
var import_database = require("@nocobase/database");
|
|
@@ -103,7 +103,7 @@ const defaultDbCreator = async (app) => {
|
|
|
103
103
|
}
|
|
104
104
|
};
|
|
105
105
|
const defaultAppOptionsFactory = (appName, mainApp) => {
|
|
106
|
-
const rawDatabaseOptions =
|
|
106
|
+
const rawDatabaseOptions = PluginMultiAppManagerServer.getDatabaseConfig(mainApp);
|
|
107
107
|
if (rawDatabaseOptions.dialect === "sqlite") {
|
|
108
108
|
const mainAppStorage = rawDatabaseOptions.storage;
|
|
109
109
|
if (mainAppStorage !== ":memory:") {
|
|
@@ -124,7 +124,7 @@ const defaultAppOptionsFactory = (appName, mainApp) => {
|
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
126
|
};
|
|
127
|
-
class
|
|
127
|
+
class PluginMultiAppManagerServer extends import_server.Plugin {
|
|
128
128
|
appDbCreator = defaultDbCreator;
|
|
129
129
|
appOptionsFactory = defaultAppOptionsFactory;
|
|
130
130
|
subAppUpgradeHandler = defaultSubAppUpgradeHandle;
|
|
@@ -294,5 +294,5 @@ class PluginMultiAppManager extends import_server.Plugin {
|
|
|
294
294
|
}
|
|
295
295
|
// Annotate the CommonJS export names for ESM import in node:
|
|
296
296
|
0 && (module.exports = {
|
|
297
|
-
|
|
297
|
+
PluginMultiAppManagerServer
|
|
298
298
|
});
|
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": "0.21.0-alpha.
|
|
7
|
+
"version": "0.21.0-alpha.10",
|
|
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": "0.x",
|
|
29
29
|
"@nocobase/utils": "0.x"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "98adf5ec996a4f359c6ca1c4a6ac837c43b6e268",
|
|
32
32
|
"keywords": [
|
|
33
33
|
"system"
|
|
34
34
|
]
|