aifastdb 1.2.1 → 1.3.1
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/aifastdb.win32-x64-msvc.node +0 -0
- package/dist/security/index.d.ts +5 -0
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/index.js +3 -1
- package/dist/security/index.js.map +1 -1
- package/dist/security/server/admin/icons.d.ts +32 -0
- package/dist/security/server/admin/icons.d.ts.map +1 -0
- package/dist/security/server/admin/icons.js +102 -0
- package/dist/security/server/admin/icons.js.map +1 -0
- package/dist/security/server/admin/index.d.ts +28 -0
- package/dist/security/server/admin/index.d.ts.map +1 -0
- package/dist/security/server/admin/index.js +47 -0
- package/dist/security/server/admin/index.js.map +1 -0
- package/dist/security/server/admin/routes.d.ts +53 -0
- package/dist/security/server/admin/routes.d.ts.map +1 -0
- package/dist/security/server/admin/routes.js +489 -0
- package/dist/security/server/admin/routes.js.map +1 -0
- package/dist/security/server/admin/styles.d.ts +6 -0
- package/dist/security/server/admin/styles.d.ts.map +1 -0
- package/dist/security/server/admin/styles.js +812 -0
- package/dist/security/server/admin/styles.js.map +1 -0
- package/dist/security/server/admin/templates.d.ts +102 -0
- package/dist/security/server/admin/templates.d.ts.map +1 -0
- package/dist/security/server/admin/templates.js +1067 -0
- package/dist/security/server/admin/templates.js.map +1 -0
- package/dist/security/server/http-server.d.ts +12 -0
- package/dist/security/server/http-server.d.ts.map +1 -1
- package/dist/security/server/http-server.js +55 -1
- package/dist/security/server/http-server.js.map +1 -1
- package/dist/security/server/routes.d.ts +1 -0
- package/dist/security/server/routes.d.ts.map +1 -1
- package/dist/security/server/routes.js +9 -1
- package/dist/security/server/routes.js.map +1 -1
- package/dist/security/types.d.ts +18 -1
- package/dist/security/types.d.ts.map +1 -1
- package/dist/security/types.js.map +1 -1
- package/package.json +1 -1
|
Binary file
|
package/dist/security/index.d.ts
CHANGED
|
@@ -75,12 +75,17 @@ export declare function localConfig(options?: {
|
|
|
75
75
|
* 创建局域网模式配置
|
|
76
76
|
*/
|
|
77
77
|
export declare function intranetConfig(options: {
|
|
78
|
+
host?: string;
|
|
78
79
|
port?: number;
|
|
79
80
|
https?: {
|
|
80
81
|
cert: string;
|
|
81
82
|
key: string;
|
|
82
83
|
};
|
|
83
84
|
sessionTimeout?: number;
|
|
85
|
+
adminPanel?: {
|
|
86
|
+
enabled?: boolean;
|
|
87
|
+
basePath?: string;
|
|
88
|
+
};
|
|
84
89
|
users?: {
|
|
85
90
|
path?: string;
|
|
86
91
|
initialUsers?: Array<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../ts/security/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,OAAO,EAEL,YAAY,EAGZ,IAAI,EACJ,UAAU,EACV,UAAU,EACV,IAAI,EAGJ,OAAO,EACP,UAAU,EACV,SAAS,EACT,UAAU,EAGV,aAAa,EACb,OAAO,EACP,iBAAiB,EAGjB,cAAc,EACd,QAAQ,EACR,aAAa,EAGb,mBAAmB,EACnB,sBAAsB,EACtB,wBAAwB,EACxB,cAAc,EACd,cAAc,EACd,aAAa,EACb,WAAW,EACX,SAAS,EAGT,eAAe,EACf,eAAe,EACf,UAAU,EACV,iBAAiB,EAGjB,YAAY,EACZ,YAAY,EACZ,eAAe,EAGf,aAAa,EACb,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,SAAS,CAAC;AAMjB,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,EAAE,sBAAsB,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AAM5F,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;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AC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACtD,KAAK,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,KAAK,CAAC;YAAE,QAAQ,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE,CAAC;CACvG,GAAG,YAAY,CAAC,UAAU,CAAC,CA0B3B;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IACrC,GAAG,EAAE;QACH,SAAS,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;QACxC,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,GAAG,YAAY,CAAC,UAAU,CAAC,CA+E3B"}
|
package/dist/security/index.js
CHANGED
|
@@ -124,6 +124,7 @@ async function createSecureServer(config) {
|
|
|
124
124
|
}
|
|
125
125
|
const httpServer = new http_server_2.SecureHttpServer({
|
|
126
126
|
security,
|
|
127
|
+
db: config.db, // 传递数据库实例给管理面板
|
|
127
128
|
});
|
|
128
129
|
return {
|
|
129
130
|
async start() {
|
|
@@ -211,10 +212,11 @@ function intranetConfig(options) {
|
|
|
211
212
|
return {
|
|
212
213
|
mode: types_2.SecurityMode.Intranet,
|
|
213
214
|
server: {
|
|
214
|
-
host: '0.0.0.0',
|
|
215
|
+
host: options.host || '0.0.0.0', // 默认监听所有网络接口(支持局域网访问)
|
|
215
216
|
port: options.port || 8443,
|
|
216
217
|
https: options.https ? { enabled: true, ...options.https } : undefined,
|
|
217
218
|
},
|
|
219
|
+
adminPanel: options.adminPanel,
|
|
218
220
|
auth: {
|
|
219
221
|
type: 'session',
|
|
220
222
|
sessionTimeout: options.sessionTimeout || 8 * 60 * 60 * 1000,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../ts/security/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AA6KH,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../ts/security/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AA6KH,gDAgEC;AAMD,gDAIC;AAMD,gDAUC;AASD,kCAOC;AAKD,wCAiCC;AAKD,4CAyFC;AAzZD,+EAA+E;AAC/E,OAAO;AACP,+EAA+E;AAE/E,iCAmDiB;AAlDf,SAAS;AACT,qGAAA,YAAY,OAAA;AA6CZ,OAAO;AACP,sGAAA,aAAa,OAAA;AACb,yGAAA,gBAAgB,OAAA;AAChB,2GAAA,kBAAkB,OAAA;AAGpB,+EAA+E;AAC/E,OAAO;AACP,+EAA+E;AAE/E,uCAA6E;AAApE,0GAAA,iBAAiB,OAAA;AAAE,kHAAA,yBAAyB,OAAA;AACrD,6CAAsF;AAA7E,gHAAA,oBAAoB,OAAA;AAAE,wHAAA,4BAA4B,OAAA;AAC3D,iDAA4F;AAAnF,oHAAA,sBAAsB,OAAA;AAAE,4HAAA,8BAA8B,OAAA;AAE/D,+EAA+E;AAC/E,SAAS;AACT,+EAA+E;AAE/E,0CAAsE;AAA7D,yGAAA,cAAc,OAAA;AACvB,kCAAmD;AAA1C,iGAAA,UAAU,OAAA;AACnB,0CAAsG;AAA7F,wGAAA,aAAa,OAAA;AAAoC,8GAAA,mBAAmB,OAAA;AAE7E,+EAA+E;AAC/E,SAAS;AACT,+EAA+E;AAE/E,oDAAoE;AAA3D,sGAAA,SAAS,OAAA;AAClB,wDAAwE;AAA/D,yGAAA,UAAU,OAAA;AAEn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AAE,yBAAyB;aACrC;SACF;QACD,KAAK,EAAE;YACL,OAAO,EAAE,IAAI;YACb,OAAO,EAAE;gBACP,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,kBAAkB;gBACxB,QAAQ,EAAE;oBACR,OAAO,EAAE,OAAO;oBAChB,QAAQ,EAAE,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACf;aACF;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,IAAI;gBACV,UAAU,EAAE,IAAI;gBAChB,gBAAgB,EAAE,IAAI;gBACtB,YAAY,EAAE,IAAI;gBAClB,MAAM,EAAE,IAAI;aACb;YACD,eAAe,EAAE;gBACf,IAAI,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAC;aACtC;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Admin Panel Icons - SVG 图标集合
|
|
3
|
+
*/
|
|
4
|
+
export declare const icons: {
|
|
5
|
+
dashboard: string;
|
|
6
|
+
collections: string;
|
|
7
|
+
documents: string;
|
|
8
|
+
search: string;
|
|
9
|
+
monitoring: string;
|
|
10
|
+
users: string;
|
|
11
|
+
settings: string;
|
|
12
|
+
database: string;
|
|
13
|
+
memory: string;
|
|
14
|
+
clock: string;
|
|
15
|
+
server: string;
|
|
16
|
+
plus: string;
|
|
17
|
+
edit: string;
|
|
18
|
+
trash: string;
|
|
19
|
+
refresh: string;
|
|
20
|
+
download: string;
|
|
21
|
+
eye: string;
|
|
22
|
+
close: string;
|
|
23
|
+
chevronLeft: string;
|
|
24
|
+
chevronRight: string;
|
|
25
|
+
checkCircle: string;
|
|
26
|
+
exclamationCircle: string;
|
|
27
|
+
logo: string;
|
|
28
|
+
empty: string;
|
|
29
|
+
logout: string;
|
|
30
|
+
};
|
|
31
|
+
export declare function icon(name: keyof typeof icons): string;
|
|
32
|
+
//# sourceMappingURL=icons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../../ts/security/server/admin/icons.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;CAkHjB,CAAC;AAEF,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,OAAO,KAAK,GAAG,MAAM,CAErD"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Admin Panel Icons - SVG 图标集合
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.icons = void 0;
|
|
7
|
+
exports.icon = icon;
|
|
8
|
+
exports.icons = {
|
|
9
|
+
// 导航图标
|
|
10
|
+
dashboard: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
11
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M4 5a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM14 5a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1V5zM4 15a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1H5a1 1 0 01-1-1v-4zM14 15a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-4z" />
|
|
12
|
+
</svg>`,
|
|
13
|
+
collections: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
14
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" />
|
|
15
|
+
</svg>`,
|
|
16
|
+
documents: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
17
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
|
|
18
|
+
</svg>`,
|
|
19
|
+
search: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
20
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
|
|
21
|
+
</svg>`,
|
|
22
|
+
monitoring: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
23
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" />
|
|
24
|
+
</svg>`,
|
|
25
|
+
users: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
26
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z" />
|
|
27
|
+
</svg>`,
|
|
28
|
+
settings: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
29
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" />
|
|
30
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
|
|
31
|
+
</svg>`,
|
|
32
|
+
// 状态图标
|
|
33
|
+
database: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
34
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4" />
|
|
35
|
+
</svg>`,
|
|
36
|
+
memory: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
37
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M9 3v2m6-2v2M9 19v2m6-2v2M5 9H3m2 6H3m18-6h-2m2 6h-2M7 19h10a2 2 0 002-2V7a2 2 0 00-2-2H7a2 2 0 00-2 2v10a2 2 0 002 2zM9 9h6v6H9V9z" />
|
|
38
|
+
</svg>`,
|
|
39
|
+
clock: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
40
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" />
|
|
41
|
+
</svg>`,
|
|
42
|
+
server: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
43
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01" />
|
|
44
|
+
</svg>`,
|
|
45
|
+
// 操作图标
|
|
46
|
+
plus: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
47
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M12 4v16m8-8H4" />
|
|
48
|
+
</svg>`,
|
|
49
|
+
edit: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
50
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" />
|
|
51
|
+
</svg>`,
|
|
52
|
+
trash: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
53
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />
|
|
54
|
+
</svg>`,
|
|
55
|
+
refresh: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
56
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" />
|
|
57
|
+
</svg>`,
|
|
58
|
+
download: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
59
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" />
|
|
60
|
+
</svg>`,
|
|
61
|
+
eye: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
62
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
|
|
63
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" />
|
|
64
|
+
</svg>`,
|
|
65
|
+
close: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
66
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
|
|
67
|
+
</svg>`,
|
|
68
|
+
chevronLeft: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
69
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7" />
|
|
70
|
+
</svg>`,
|
|
71
|
+
chevronRight: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
72
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7" />
|
|
73
|
+
</svg>`,
|
|
74
|
+
// 状态指示
|
|
75
|
+
checkCircle: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
76
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" />
|
|
77
|
+
</svg>`,
|
|
78
|
+
exclamationCircle: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
79
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
|
80
|
+
</svg>`,
|
|
81
|
+
// Logo
|
|
82
|
+
logo: `<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
83
|
+
<rect width="32" height="32" rx="8" fill="currentColor" fill-opacity="0.1"/>
|
|
84
|
+
<path d="M8 12C8 9.79086 9.79086 8 12 8H20C22.2091 8 24 9.79086 24 12V20C24 22.2091 22.2091 24 20 24H12C9.79086 24 8 22.2091 8 20V12Z" stroke="currentColor" stroke-width="2"/>
|
|
85
|
+
<circle cx="16" cy="16" r="4" fill="currentColor"/>
|
|
86
|
+
<path d="M16 8V12" stroke="currentColor" stroke-width="2"/>
|
|
87
|
+
<path d="M16 20V24" stroke="currentColor" stroke-width="2"/>
|
|
88
|
+
<path d="M8 16H12" stroke="currentColor" stroke-width="2"/>
|
|
89
|
+
<path d="M20 16H24" stroke="currentColor" stroke-width="2"/>
|
|
90
|
+
</svg>`,
|
|
91
|
+
// 空状态
|
|
92
|
+
empty: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5">
|
|
93
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4" />
|
|
94
|
+
</svg>`,
|
|
95
|
+
logout: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
96
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1" />
|
|
97
|
+
</svg>`,
|
|
98
|
+
};
|
|
99
|
+
function icon(name) {
|
|
100
|
+
return exports.icons[name] || '';
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=icons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.js","sourceRoot":"","sources":["../../../../ts/security/server/admin/icons.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAsHH,oBAEC;AAtHY,QAAA,KAAK,GAAG;IACnB,OAAO;IACP,SAAS,EAAE;;SAEJ;IAEP,WAAW,EAAE;;SAEN;IAEP,SAAS,EAAE;;SAEJ;IAEP,MAAM,EAAE;;SAED;IAEP,UAAU,EAAE;;SAEL;IAEP,KAAK,EAAE;;SAEA;IAEP,QAAQ,EAAE;;;SAGH;IAEP,OAAO;IACP,QAAQ,EAAE;;SAEH;IAEP,MAAM,EAAE;;SAED;IAEP,KAAK,EAAE;;SAEA;IAEP,MAAM,EAAE;;SAED;IAEP,OAAO;IACP,IAAI,EAAE;;SAEC;IAEP,IAAI,EAAE;;SAEC;IAEP,KAAK,EAAE;;SAEA;IAEP,OAAO,EAAE;;SAEF;IAEP,QAAQ,EAAE;;SAEH;IAEP,GAAG,EAAE;;;SAGE;IAEP,KAAK,EAAE;;SAEA;IAEP,WAAW,EAAE;;SAEN;IAEP,YAAY,EAAE;;SAEP;IAEP,OAAO;IACP,WAAW,EAAE;;SAEN;IAEP,iBAAiB,EAAE;;SAEZ;IAEP,OAAO;IACP,IAAI,EAAE;;;;;;;;SAQC;IAEP,MAAM;IACN,KAAK,EAAE;;SAEA;IAEP,MAAM,EAAE;;SAED;CACR,CAAC;AAEF,SAAgB,IAAI,CAAC,IAAwB;IAC3C,OAAO,aAAK,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Admin Panel - 管理面板主入口
|
|
3
|
+
*
|
|
4
|
+
* 提供数据库可视化管理界面:
|
|
5
|
+
* - 仪表盘:系统概览和统计
|
|
6
|
+
* - 集合管理:创建、删除、查看集合
|
|
7
|
+
* - 文档浏览:分页查看和搜索文档
|
|
8
|
+
* - 搜索测试:测试向量搜索功能
|
|
9
|
+
* - 系统监控:内存、性能监控
|
|
10
|
+
* - 用户管理:管理用户和权限
|
|
11
|
+
*/
|
|
12
|
+
export { adminStyles } from './styles';
|
|
13
|
+
export { icons, icon } from './icons';
|
|
14
|
+
export { renderPage, renderDashboard, renderCollections, renderDocuments, renderSearch, renderMonitoring, renderUsers, } from './templates';
|
|
15
|
+
export { adminRoutes, matchAdminRoute, AdminRoute, AdminRouteHandler, } from './routes';
|
|
16
|
+
/**
|
|
17
|
+
* 检查请求是否是管理面板请求
|
|
18
|
+
*/
|
|
19
|
+
export declare function isAdminRequest(path: string): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* 检查用户是否有管理面板访问权限
|
|
22
|
+
*/
|
|
23
|
+
export declare function hasAdminAccess(security: {
|
|
24
|
+
user?: {
|
|
25
|
+
role: string;
|
|
26
|
+
};
|
|
27
|
+
} | null | undefined): boolean;
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../ts/security/server/admin/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EACL,UAAU,EACV,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,WAAW,EACX,eAAe,EACf,UAAU,EACV,iBAAiB,GAClB,MAAM,UAAU,CAAC;AAElB;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE;IAAE,IAAI,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAGhG"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Admin Panel - 管理面板主入口
|
|
4
|
+
*
|
|
5
|
+
* 提供数据库可视化管理界面:
|
|
6
|
+
* - 仪表盘:系统概览和统计
|
|
7
|
+
* - 集合管理:创建、删除、查看集合
|
|
8
|
+
* - 文档浏览:分页查看和搜索文档
|
|
9
|
+
* - 搜索测试:测试向量搜索功能
|
|
10
|
+
* - 系统监控:内存、性能监控
|
|
11
|
+
* - 用户管理:管理用户和权限
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.matchAdminRoute = exports.adminRoutes = exports.renderUsers = exports.renderMonitoring = exports.renderSearch = exports.renderDocuments = exports.renderCollections = exports.renderDashboard = exports.renderPage = exports.icon = exports.icons = exports.adminStyles = void 0;
|
|
15
|
+
exports.isAdminRequest = isAdminRequest;
|
|
16
|
+
exports.hasAdminAccess = hasAdminAccess;
|
|
17
|
+
var styles_1 = require("./styles");
|
|
18
|
+
Object.defineProperty(exports, "adminStyles", { enumerable: true, get: function () { return styles_1.adminStyles; } });
|
|
19
|
+
var icons_1 = require("./icons");
|
|
20
|
+
Object.defineProperty(exports, "icons", { enumerable: true, get: function () { return icons_1.icons; } });
|
|
21
|
+
Object.defineProperty(exports, "icon", { enumerable: true, get: function () { return icons_1.icon; } });
|
|
22
|
+
var templates_1 = require("./templates");
|
|
23
|
+
Object.defineProperty(exports, "renderPage", { enumerable: true, get: function () { return templates_1.renderPage; } });
|
|
24
|
+
Object.defineProperty(exports, "renderDashboard", { enumerable: true, get: function () { return templates_1.renderDashboard; } });
|
|
25
|
+
Object.defineProperty(exports, "renderCollections", { enumerable: true, get: function () { return templates_1.renderCollections; } });
|
|
26
|
+
Object.defineProperty(exports, "renderDocuments", { enumerable: true, get: function () { return templates_1.renderDocuments; } });
|
|
27
|
+
Object.defineProperty(exports, "renderSearch", { enumerable: true, get: function () { return templates_1.renderSearch; } });
|
|
28
|
+
Object.defineProperty(exports, "renderMonitoring", { enumerable: true, get: function () { return templates_1.renderMonitoring; } });
|
|
29
|
+
Object.defineProperty(exports, "renderUsers", { enumerable: true, get: function () { return templates_1.renderUsers; } });
|
|
30
|
+
var routes_1 = require("./routes");
|
|
31
|
+
Object.defineProperty(exports, "adminRoutes", { enumerable: true, get: function () { return routes_1.adminRoutes; } });
|
|
32
|
+
Object.defineProperty(exports, "matchAdminRoute", { enumerable: true, get: function () { return routes_1.matchAdminRoute; } });
|
|
33
|
+
/**
|
|
34
|
+
* 检查请求是否是管理面板请求
|
|
35
|
+
*/
|
|
36
|
+
function isAdminRequest(path) {
|
|
37
|
+
return path.startsWith('/admin') || path.startsWith('/api/v1/admin');
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* 检查用户是否有管理面板访问权限
|
|
41
|
+
*/
|
|
42
|
+
function hasAdminAccess(security) {
|
|
43
|
+
if (!security?.user)
|
|
44
|
+
return false;
|
|
45
|
+
return security.user.role === 'admin' || security.user.role === 'super_admin';
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../ts/security/server/admin/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAuBH,wCAEC;AAKD,wCAGC;AA/BD,mCAAuC;AAA9B,qGAAA,WAAW,OAAA;AACpB,iCAAsC;AAA7B,8FAAA,KAAK,OAAA;AAAE,6FAAA,IAAI,OAAA;AACpB,yCAQqB;AAPnB,uGAAA,UAAU,OAAA;AACV,4GAAA,eAAe,OAAA;AACf,8GAAA,iBAAiB,OAAA;AACjB,4GAAA,eAAe,OAAA;AACf,yGAAA,YAAY,OAAA;AACZ,6GAAA,gBAAgB,OAAA;AAChB,wGAAA,WAAW,OAAA;AAEb,mCAKkB;AAJhB,qGAAA,WAAW,OAAA;AACX,yGAAA,eAAe,OAAA;AAKjB;;GAEG;AACH,SAAgB,cAAc,CAAC,IAAY;IACzC,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;AACvE,CAAC;AAED;;GAEG;AACH,SAAgB,cAAc,CAAC,QAAwD;IACrF,IAAI,CAAC,QAAQ,EAAE,IAAI;QAAE,OAAO,KAAK,CAAC;IAClC,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,KAAK,aAAa,CAAC;AAChF,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Admin Panel Routes - 管理面板 API 路由
|
|
3
|
+
*/
|
|
4
|
+
import { RequestContext, ResponseContext } from '../http-server';
|
|
5
|
+
import { SecurityMode } from '../routes';
|
|
6
|
+
export type AdminRouteHandler = (ctx: RequestContext, security: SecurityMode, db?: any) => Promise<ResponseContext>;
|
|
7
|
+
export interface AdminRoute {
|
|
8
|
+
method: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
9
|
+
path: string;
|
|
10
|
+
handler: AdminRouteHandler;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 仪表盘页面
|
|
14
|
+
*/
|
|
15
|
+
export declare const dashboardHandler: AdminRouteHandler;
|
|
16
|
+
/**
|
|
17
|
+
* 集合管理页面
|
|
18
|
+
*/
|
|
19
|
+
export declare const collectionsPageHandler: AdminRouteHandler;
|
|
20
|
+
/**
|
|
21
|
+
* 文档浏览页面
|
|
22
|
+
*/
|
|
23
|
+
export declare const documentsPageHandler: AdminRouteHandler;
|
|
24
|
+
/**
|
|
25
|
+
* 搜索测试页面
|
|
26
|
+
*/
|
|
27
|
+
export declare const searchPageHandler: AdminRouteHandler;
|
|
28
|
+
/**
|
|
29
|
+
* 系统监控页面
|
|
30
|
+
*/
|
|
31
|
+
export declare const monitoringPageHandler: AdminRouteHandler;
|
|
32
|
+
/**
|
|
33
|
+
* 用户管理页面
|
|
34
|
+
*/
|
|
35
|
+
export declare const usersPageHandler: AdminRouteHandler;
|
|
36
|
+
/**
|
|
37
|
+
* 创建集合 API
|
|
38
|
+
*/
|
|
39
|
+
export declare const createCollectionApiHandler: AdminRouteHandler;
|
|
40
|
+
/**
|
|
41
|
+
* 删除集合 API
|
|
42
|
+
*/
|
|
43
|
+
export declare const deleteCollectionApiHandler: AdminRouteHandler;
|
|
44
|
+
/**
|
|
45
|
+
* 导出文档 API
|
|
46
|
+
*/
|
|
47
|
+
export declare const exportDocumentsApiHandler: AdminRouteHandler;
|
|
48
|
+
export declare const adminRoutes: AdminRoute[];
|
|
49
|
+
/**
|
|
50
|
+
* 匹配管理面板路由
|
|
51
|
+
*/
|
|
52
|
+
export declare function matchAdminRoute(method: string, path: string): AdminRoute | null;
|
|
53
|
+
//# sourceMappingURL=routes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../ts/security/server/admin/routes.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,O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