@tachybase/module-multi-app 0.23.8
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/.turbo/turbo-build.log +14 -0
- package/README.md +34 -0
- package/README.zh-CN.md +34 -0
- package/client.d.ts +1 -0
- package/client.js +1 -0
- package/dist/client/AppManager.d.ts +2 -0
- package/dist/client/AppNameInput.d.ts +2 -0
- package/dist/client/MultiAppBlockInitializer.d.ts +2 -0
- package/dist/client/MultiAppManagerProvider.d.ts +2 -0
- package/dist/client/MultiAppManagerProvider.style.d.ts +5 -0
- package/dist/client/Settings.d.ts +2 -0
- package/dist/client/index.d.ts +6 -0
- package/dist/client/index.js +1 -0
- package/dist/client/settings/schemas/applications.d.ts +13 -0
- package/dist/client/utils.d.ts +4 -0
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +27 -0
- package/dist/externalVersion.js +16 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +39 -0
- package/dist/locale/en-US.json +27 -0
- package/dist/locale/es-ES.json +9 -0
- package/dist/locale/ko_KR.json +11 -0
- package/dist/locale/pt-BR.json +9 -0
- package/dist/locale/zh-CN.json +27 -0
- package/dist/node_modules/mariadb/LICENSE +502 -0
- package/dist/node_modules/mariadb/callback.js +41 -0
- package/dist/node_modules/mariadb/lib/cmd/batch-bulk.js +278 -0
- package/dist/node_modules/mariadb/lib/cmd/batch-rewrite.js +372 -0
- package/dist/node_modules/mariadb/lib/cmd/change-user.js +149 -0
- package/dist/node_modules/mariadb/lib/cmd/class/ok-packet.js +17 -0
- package/dist/node_modules/mariadb/lib/cmd/column-definition.js +102 -0
- package/dist/node_modules/mariadb/lib/cmd/command.js +168 -0
- package/dist/node_modules/mariadb/lib/cmd/common-binary-cmd.js +327 -0
- package/dist/node_modules/mariadb/lib/cmd/common-text-cmd.js +427 -0
- package/dist/node_modules/mariadb/lib/cmd/handshake/auth/caching-sha2-password-auth.js +168 -0
- package/dist/node_modules/mariadb/lib/cmd/handshake/auth/clear-password-auth.js +23 -0
- package/dist/node_modules/mariadb/lib/cmd/handshake/auth/ed25519-password-auth.js +761 -0
- package/dist/node_modules/mariadb/lib/cmd/handshake/auth/native-password-auth.js +55 -0
- package/dist/node_modules/mariadb/lib/cmd/handshake/auth/pam-password-auth.js +58 -0
- package/dist/node_modules/mariadb/lib/cmd/handshake/auth/plugin-auth.js +19 -0
- package/dist/node_modules/mariadb/lib/cmd/handshake/auth/sha256-password-auth.js +142 -0
- package/dist/node_modules/mariadb/lib/cmd/handshake/client-capabilities.js +74 -0
- package/dist/node_modules/mariadb/lib/cmd/handshake/client-handshake-response.js +126 -0
- package/dist/node_modules/mariadb/lib/cmd/handshake/handshake.js +292 -0
- package/dist/node_modules/mariadb/lib/cmd/handshake/initial-handshake.js +74 -0
- package/dist/node_modules/mariadb/lib/cmd/handshake/ssl-request.js +29 -0
- package/dist/node_modules/mariadb/lib/cmd/ping.js +52 -0
- package/dist/node_modules/mariadb/lib/cmd/query.js +255 -0
- package/dist/node_modules/mariadb/lib/cmd/quit.js +28 -0
- package/dist/node_modules/mariadb/lib/cmd/reset.js +54 -0
- package/dist/node_modules/mariadb/lib/cmd/resultset.js +607 -0
- package/dist/node_modules/mariadb/lib/cmd/stream.js +45 -0
- package/dist/node_modules/mariadb/lib/config/connection-options.js +258 -0
- package/dist/node_modules/mariadb/lib/config/pool-cluster-options.js +19 -0
- package/dist/node_modules/mariadb/lib/config/pool-options.js +47 -0
- package/dist/node_modules/mariadb/lib/connection-callback.js +160 -0
- package/dist/node_modules/mariadb/lib/connection.js +1460 -0
- package/dist/node_modules/mariadb/lib/const/capabilities.js +64 -0
- package/dist/node_modules/mariadb/lib/const/collations.js +473 -0
- package/dist/node_modules/mariadb/lib/const/connection_status.js +13 -0
- package/dist/node_modules/mariadb/lib/const/error-code.js +1282 -0
- package/dist/node_modules/mariadb/lib/const/field-detail.js +35 -0
- package/dist/node_modules/mariadb/lib/const/field-type.js +71 -0
- package/dist/node_modules/mariadb/lib/const/server-status.js +30 -0
- package/dist/node_modules/mariadb/lib/const/state-change.js +12 -0
- package/dist/node_modules/mariadb/lib/filtered-pool-cluster.js +81 -0
- package/dist/node_modules/mariadb/lib/io/bulk-packet.js +590 -0
- package/dist/node_modules/mariadb/lib/io/compression-input-stream.js +141 -0
- package/dist/node_modules/mariadb/lib/io/compression-output-stream.js +171 -0
- package/dist/node_modules/mariadb/lib/io/packet-input-stream.js +193 -0
- package/dist/node_modules/mariadb/lib/io/packet-node-encoded.js +36 -0
- package/dist/node_modules/mariadb/lib/io/packet-node-iconv.js +37 -0
- package/dist/node_modules/mariadb/lib/io/packet-output-stream.js +502 -0
- package/dist/node_modules/mariadb/lib/io/packet.js +515 -0
- package/dist/node_modules/mariadb/lib/io/rewrite-packet.js +481 -0
- package/dist/node_modules/mariadb/lib/misc/connection-information.js +96 -0
- package/dist/node_modules/mariadb/lib/misc/errors.js +123 -0
- package/dist/node_modules/mariadb/lib/misc/parse.js +1033 -0
- package/dist/node_modules/mariadb/lib/misc/utils.js +298 -0
- package/dist/node_modules/mariadb/lib/pool-base.js +611 -0
- package/dist/node_modules/mariadb/lib/pool-callback.js +202 -0
- package/dist/node_modules/mariadb/lib/pool-cluster-callback.js +66 -0
- package/dist/node_modules/mariadb/lib/pool-cluster.js +407 -0
- package/dist/node_modules/mariadb/lib/pool-promise.js +108 -0
- package/dist/node_modules/mariadb/package.json +1 -0
- package/dist/node_modules/mariadb/promise.js +34 -0
- package/dist/node_modules/mariadb/types/index.d.ts +870 -0
- package/dist/server/actions/apps.d.ts +5 -0
- package/dist/server/actions/apps.js +117 -0
- package/dist/server/app-lifecycle.d.ts +8 -0
- package/dist/server/app-lifecycle.js +99 -0
- package/dist/server/app-start-env.d.ts +2 -0
- package/dist/server/app-start-env.js +105 -0
- package/dist/server/collections/applications.d.ts +2 -0
- package/dist/server/collections/applications.js +82 -0
- package/dist/server/index.d.ts +4 -0
- package/dist/server/index.js +29 -0
- package/dist/server/middlewares/app-selector.d.ts +1 -0
- package/dist/server/middlewares/app-selector.js +47 -0
- package/dist/server/middlewares/index.d.ts +2 -0
- package/dist/server/middlewares/index.js +23 -0
- package/dist/server/middlewares/inject-app-list.d.ts +1 -0
- package/dist/server/middlewares/inject-app-list.js +48 -0
- package/dist/server/migrations/20240820153000-add-apps-tmpl.d.ts +6 -0
- package/dist/server/migrations/20240820153000-add-apps-tmpl.js +47 -0
- package/dist/server/migrations/20241126124904-add-createdBy.d.ts +6 -0
- package/dist/server/migrations/20241126124904-add-createdBy.js +41 -0
- package/dist/server/models/application.d.ts +10 -0
- package/dist/server/models/application.js +57 -0
- package/dist/server/server.d.ts +19 -0
- package/dist/server/server.js +246 -0
- package/dist/swagger/index.d.ts +197 -0
- package/dist/swagger/index.js +227 -0
- package/package.json +38 -0
- package/server.d.ts +2 -0
- package/server.js +1 -0
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var swagger_exports = {};
|
|
19
|
+
__export(swagger_exports, {
|
|
20
|
+
default: () => swagger_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(swagger_exports);
|
|
23
|
+
var swagger_default = {
|
|
24
|
+
info: {
|
|
25
|
+
title: "TachyBase API - Multi-app manager plugin"
|
|
26
|
+
},
|
|
27
|
+
tags: [],
|
|
28
|
+
paths: {
|
|
29
|
+
"/applications:list": {
|
|
30
|
+
get: {
|
|
31
|
+
tags: ["applications"],
|
|
32
|
+
description: "List all applications",
|
|
33
|
+
responses: {
|
|
34
|
+
200: {
|
|
35
|
+
description: "ok",
|
|
36
|
+
content: {
|
|
37
|
+
"application/json": {
|
|
38
|
+
schema: {
|
|
39
|
+
$ref: "#/components/schemas/application"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"/applications:create": {
|
|
48
|
+
post: {
|
|
49
|
+
tags: ["applications"],
|
|
50
|
+
description: "Update application",
|
|
51
|
+
requestBody: {
|
|
52
|
+
required: true,
|
|
53
|
+
content: {
|
|
54
|
+
"application/json": {
|
|
55
|
+
schema: {
|
|
56
|
+
$ref: "#/components/schemas/applicationFrom"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
responses: {
|
|
62
|
+
200: {
|
|
63
|
+
description: "ok",
|
|
64
|
+
content: {
|
|
65
|
+
"application/json": {
|
|
66
|
+
schema: {
|
|
67
|
+
$ref: "#/components/schemas/application"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"/applications:update": {
|
|
76
|
+
post: {
|
|
77
|
+
tags: ["applications"],
|
|
78
|
+
description: "Update application",
|
|
79
|
+
parameters: [
|
|
80
|
+
{
|
|
81
|
+
name: "filterByTk",
|
|
82
|
+
in: "query",
|
|
83
|
+
description: "application name",
|
|
84
|
+
required: true,
|
|
85
|
+
schema: {
|
|
86
|
+
type: "string"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
requestBody: {
|
|
91
|
+
required: true,
|
|
92
|
+
content: {
|
|
93
|
+
"application/json": {
|
|
94
|
+
schema: {
|
|
95
|
+
$ref: "#/components/schemas/applicationFrom"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
responses: {
|
|
101
|
+
200: {
|
|
102
|
+
description: "ok",
|
|
103
|
+
content: {
|
|
104
|
+
"application/json": {
|
|
105
|
+
schema: {
|
|
106
|
+
$ref: "#/components/schemas/application"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"/applications:destroy": {
|
|
115
|
+
post: {
|
|
116
|
+
tags: ["applications"],
|
|
117
|
+
description: "Delete application",
|
|
118
|
+
parameters: [
|
|
119
|
+
{
|
|
120
|
+
name: "filterByTk",
|
|
121
|
+
in: "query",
|
|
122
|
+
description: "application name",
|
|
123
|
+
required: true,
|
|
124
|
+
schema: {
|
|
125
|
+
type: "string"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
responses: {
|
|
130
|
+
200: {
|
|
131
|
+
description: "ok"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
components: {
|
|
138
|
+
schemas: {
|
|
139
|
+
applicationFrom: {
|
|
140
|
+
allOf: [
|
|
141
|
+
{
|
|
142
|
+
$ref: "#/components/schemas/application"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
type: "object",
|
|
146
|
+
properties: {
|
|
147
|
+
createdAt: {
|
|
148
|
+
readOnly: true
|
|
149
|
+
},
|
|
150
|
+
updatedAt: {
|
|
151
|
+
readOnly: true
|
|
152
|
+
},
|
|
153
|
+
status: {
|
|
154
|
+
readOnly: true
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
application: {
|
|
161
|
+
type: "object",
|
|
162
|
+
properties: {
|
|
163
|
+
name: {
|
|
164
|
+
type: "string",
|
|
165
|
+
example: "app-1",
|
|
166
|
+
description: "The application's name"
|
|
167
|
+
},
|
|
168
|
+
displayName: {
|
|
169
|
+
type: "string",
|
|
170
|
+
example: "first application",
|
|
171
|
+
description: "The application's display name"
|
|
172
|
+
},
|
|
173
|
+
pinned: {
|
|
174
|
+
type: "boolean",
|
|
175
|
+
example: true,
|
|
176
|
+
description: "\u662F\u5426\u5728\u83DC\u5355\u4E0A\u663E\u793A"
|
|
177
|
+
},
|
|
178
|
+
cname: {
|
|
179
|
+
type: "string",
|
|
180
|
+
example: "app-1.example.com",
|
|
181
|
+
description: "custom domain of the application"
|
|
182
|
+
},
|
|
183
|
+
status: {
|
|
184
|
+
type: "string",
|
|
185
|
+
example: "running",
|
|
186
|
+
description: "application status"
|
|
187
|
+
},
|
|
188
|
+
options: {
|
|
189
|
+
type: "object",
|
|
190
|
+
properties: {
|
|
191
|
+
// standaloneDeployment: {
|
|
192
|
+
// type: 'boolean',
|
|
193
|
+
// example: true,
|
|
194
|
+
// description: '是否为独立部署的子应用',
|
|
195
|
+
// },
|
|
196
|
+
autoStart: {
|
|
197
|
+
type: "boolean",
|
|
198
|
+
example: true,
|
|
199
|
+
description: "\u5E94\u7528\u662F\u5426\u9ED8\u8BA4\u8DDF\u968F\u4E3B\u5E94\u7528\u542F\u52A8"
|
|
200
|
+
},
|
|
201
|
+
startEnvs: {
|
|
202
|
+
type: "string",
|
|
203
|
+
example: "APP_KEY=test-key\nAPI_BASE_PATH=/api/",
|
|
204
|
+
description: "\u5E94\u7528\u542F\u52A8\u65F6\u7684\u73AF\u5883\u53D8\u91CF"
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
tmpl: {
|
|
209
|
+
type: "string",
|
|
210
|
+
example: "default",
|
|
211
|
+
description: "\u6A21\u677F\u5E94\u7528\u7684 ID"
|
|
212
|
+
},
|
|
213
|
+
createdAt: {
|
|
214
|
+
type: "string",
|
|
215
|
+
format: "date-time",
|
|
216
|
+
description: "\u521B\u5EFA\u65F6\u95F4"
|
|
217
|
+
},
|
|
218
|
+
updatedAt: {
|
|
219
|
+
type: "string",
|
|
220
|
+
format: "date-time",
|
|
221
|
+
description: "\u66F4\u65B0\u65F6\u95F4"
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tachybase/module-multi-app",
|
|
3
|
+
"displayName": "Multi-app manager",
|
|
4
|
+
"version": "0.23.8",
|
|
5
|
+
"description": "Dynamically create multiple apps without separate deployments.",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"System management"
|
|
8
|
+
],
|
|
9
|
+
"license": "Apache-2.0",
|
|
10
|
+
"main": "./dist/server/index.js",
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@ant-design/icons": "^5.5.2"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"antd": "5.22.5",
|
|
16
|
+
"async-mutex": "^0.3.2",
|
|
17
|
+
"lodash": "4.17.21",
|
|
18
|
+
"mysql2": "^3.11.5",
|
|
19
|
+
"pg": "^8.13.1",
|
|
20
|
+
"react": "~18.3.1",
|
|
21
|
+
"react-i18next": "^15.2.0",
|
|
22
|
+
"react-router-dom": "6.28.1",
|
|
23
|
+
"@tachybase/schema": "0.23.8"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"@tachybase/actions": "0.23.8",
|
|
27
|
+
"@tachybase/client": "0.23.8",
|
|
28
|
+
"@tachybase/database": "0.23.8",
|
|
29
|
+
"@tachybase/test": "0.23.8",
|
|
30
|
+
"@tachybase/server": "0.23.8",
|
|
31
|
+
"@tachybase/utils": "0.23.8"
|
|
32
|
+
},
|
|
33
|
+
"description.zh-CN": "无需单独部署即可动态创建多个应用。",
|
|
34
|
+
"displayName.zh-CN": "多应用管理器",
|
|
35
|
+
"scripts": {
|
|
36
|
+
"build": "tachybase-build --no-dts @tachybase/module-multi-app"
|
|
37
|
+
}
|
|
38
|
+
}
|
package/server.d.ts
ADDED
package/server.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./dist/server/index.js');
|