@nocobase/plugin-multi-app-manager 0.20.0-alpha.1 → 0.20.0-alpha.11
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
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(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,s,u,d,y,l,i,m){"use strict";var z=Object.defineProperty,B=Object.defineProperties;var K=Object.getOwnPropertyDescriptors;var w=Object.getOwnPropertySymbols;var L=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable;var k=(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)&&k(o,n,e[n]);if(w)for(var n of w(e))U.call(e,n)&&k(o,n,e[n]);return o},g=(o,e)=>B(o,K(e));var v=(o,e,n)=>new Promise((s,u)=>{var d=i=>{try{l(n.next(i))}catch(m){u(m)}},y=i=>{try{l(n.throw(i))}catch(m){u(m)}},l=i=>i.done?s(i.value):Promise.resolve(i.value).then(d,y);l((n=n.apply(o,e)).next())});const T=t=>{const r=e.useApp(),p=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,p,t.suffix,t.addonAfter]})},I=d.connect(s.Input,d.mapReadPretty(T)),q=y.createStyles(({token:t})=>({button:{color:t.colorTextHeaderMenu+" !important"}})),h=()=>{const{t}=l.useTranslation("multi-app-manager");return{t}},a=t=>`{{t("${t}", { ns: 'multi-app-manager' })}}`,N=()=>{const{styles:t}=q(),{data:r,run:p}=e.useRequest({resource:"applications",action:"listPinned"},{manual:!0}),{t:f}=h(),F=e.useApp(),E=[...((r==null?void 0:r.data)||[]).map(c=>{var P;let M=F.getRouteUrl(`/apps/${c.name}/admin/`);return(P=c.options)!=null&&P.standaloneDeployment&&c.cname&&(M=`//${c.cname}`),{key:c.name,label:n.jsx("a",{href:M,target:"_blank",rel:"noopener noreferrer",children:c.displayName||c.name})}}),{key:".manager",label:n.jsx(u.Link,{to:F.pluginSettingsManager.getRoutePath("multi-app-manager"),children:f("Manage applications")})}];return n.jsx(s.Dropdown,{onOpenChange:c=>{p()},menu:{items:E},children:n.jsx(s.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:I},children:t.children})}),b={name:"applications",targetKey:"name",fields:[{type:"uid",name:"name",primaryKey:!0,prefix:"a",interface:"input",uiSchema:{type:"string",title:a("App ID"),required:!0,"x-component":"Input","x-validator":"uid"}},{type:"string",name:"displayName",interface:"input",uiSchema:{type:"string",title:a("App display name"),required:!0,"x-component":"Input"}},{type:"string",name:"pinned",interface:"checkbox",uiSchema:{type:"boolean","x-content":a("Pin to menu"),"x-component":"Checkbox"}},{type:"string",name:"status",interface:"radioGroup",defaultValue:"pending",uiSchema:{type:"string",title:a("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:p}=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:[]}),p()})}}},A={type:"void","x-component":"div",properties:{displayName:{"x-component":"CollectionField","x-decorator":"FormItem"},name:{"x-component":"CollectionField","x-decorator":"FormItem","x-disabled":"{{ !createOnly }}"},pinned:{"x-component":"CollectionField","x-decorator":"FormItem"},"options.standaloneDeployment":{"x-component":"Checkbox","x-decorator":"FormItem","x-content":a("Standalone deployment")},"options.autoStart":{"x-component":"Checkbox","x-decorator":"FormItem","x-content":a("Auto start")},cname:{title:a("Custom domain"),"x-component":"Input","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:b,resourceName:"applications",request:{resource:"applications",action:"list",params:{pageSize:50,sort:["-createdAt"],appends:[]}}},"x-component":"CollectionProvider_deprecated","x-component-props":{collection:b},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":{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=>m.createElement(e.SchemaComponentOptions,g(x({},t),{scope:{createOnly:!0}})),"x-component":"Action","x-component-props":{type:"primary"},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:a("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)}}}}}}}},_=()=>{var p;const t=e.useRecord(),r=e.useApp();return(p=t.options)!=null&&p.standaloneDeployment&&t.cname?`//${t.cname}`:r.getRouteUrl(`/apps/${t.name}/admin/`)},$=()=>{const{t}=h(),r=_();return n.jsx("a",{href:r,target:"_blank",rel:"noreferrer",children:t("View",{ns:"client"})})},j=()=>n.jsx(s.Card,{bordered:!1,children:n.jsx(e.SchemaComponent,{schema:V,components:{AppVisitor:$}})}),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:j,aclSnippet:"pm.multi-app-manager.applications"})})}}o.MultiAppManagerPlugin=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,13 +1,13 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
"@nocobase/client": "0.20.0-alpha.
|
|
2
|
+
"@nocobase/client": "0.20.0-alpha.11",
|
|
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.20.0-alpha.
|
|
10
|
-
"@nocobase/server": "0.20.0-alpha.
|
|
9
|
+
"@nocobase/database": "0.20.0-alpha.11",
|
|
10
|
+
"@nocobase/server": "0.20.0-alpha.11",
|
|
11
11
|
"async-mutex": "0.3.2",
|
|
12
12
|
"lodash": "4.17.21",
|
|
13
13
|
"mysql2": "2.3.3",
|
|
@@ -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-03-
|
|
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-03-16T12:16:27.974Z"}
|
package/dist/server/server.js
CHANGED
package/package.json
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
"displayName.zh-CN": "多应用管理器",
|
|
5
5
|
"description": "Dynamically create multiple apps without separate deployments.",
|
|
6
6
|
"description.zh-CN": "无需单独部署即可动态创建多个应用。",
|
|
7
|
-
"version": "0.20.0-alpha.
|
|
7
|
+
"version": "0.20.0-alpha.11",
|
|
8
8
|
"license": "AGPL-3.0",
|
|
9
9
|
"main": "./dist/server/index.js",
|
|
10
|
-
"homepage": "https://docs.nocobase.com/
|
|
11
|
-
"homepage.zh-CN": "https://docs-cn.nocobase.com/
|
|
10
|
+
"homepage": "https://docs.nocobase.com/handbook/multi-app-manager",
|
|
11
|
+
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/multi-app-manager",
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@formily/react": "2.x",
|
|
14
14
|
"@formily/shared": "2.x",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@nocobase/test": "0.x",
|
|
29
29
|
"@nocobase/utils": "0.x"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "ed56e8464869fefbd6e263a2358fc14930c22f96",
|
|
32
32
|
"keywords": [
|
|
33
33
|
"system"
|
|
34
34
|
]
|