@pisell/core 1.1.5 → 1.1.6
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/es/indexDB/index.d.ts +2 -2
- package/es/indexDB/index.js +620 -569
- package/es/routes/index.d.ts +1 -1
- package/es/socket/monitor.js +2 -0
- package/es/socket/types.d.ts +3 -2
- package/lib/applicationManager/index.js +3 -1
- package/lib/indexDB/index.d.ts +2 -2
- package/lib/indexDB/index.js +184 -289
- package/lib/routes/index.d.ts +1 -1
- package/lib/socket/monitor.js +2 -0
- package/lib/socket/types.d.ts +3 -2
- package/package.json +9 -8
package/es/routes/index.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export declare class RouterManager {
|
|
|
20
20
|
get(name: string): RouteType;
|
|
21
21
|
has(name: string): boolean;
|
|
22
22
|
remove(name: string): void;
|
|
23
|
-
renderComponent(item: RouteType, children?: React.ReactNode): string | number | boolean |
|
|
23
|
+
renderComponent(item: RouteType, children?: React.ReactNode): string | number | boolean | JSX.Element | React.ReactFragment | null | undefined;
|
|
24
24
|
getPageByRoute(route: string): ApplicationInterface | undefined;
|
|
25
25
|
getRouterComponent({ fallback }: {
|
|
26
26
|
fallback?: React.ReactNode;
|
package/es/socket/monitor.js
CHANGED
|
@@ -332,6 +332,7 @@ export var SocketMonitor = /*#__PURE__*/function () {
|
|
|
332
332
|
id: message.id || "out_".concat(Date.now()),
|
|
333
333
|
timestamp: Date.now(),
|
|
334
334
|
direction: 'out',
|
|
335
|
+
//@ts-ignore
|
|
335
336
|
message: this.options.recordMessageContent ? message : {
|
|
336
337
|
event: message.event
|
|
337
338
|
},
|
|
@@ -363,6 +364,7 @@ export var SocketMonitor = /*#__PURE__*/function () {
|
|
|
363
364
|
id: message.id || "in_".concat(Date.now()),
|
|
364
365
|
timestamp: Date.now(),
|
|
365
366
|
direction: 'in',
|
|
367
|
+
//@ts-ignore
|
|
366
368
|
message: this.options.recordMessageContent ? message : {
|
|
367
369
|
event: message.event
|
|
368
370
|
},
|
package/es/socket/types.d.ts
CHANGED
|
@@ -38,13 +38,14 @@ export declare enum SocketStatus {
|
|
|
38
38
|
/**
|
|
39
39
|
* Socket消息格式
|
|
40
40
|
*/
|
|
41
|
-
export interface SocketMessage
|
|
41
|
+
export interface SocketMessage {
|
|
42
42
|
/** 事件类型 */
|
|
43
43
|
type: string;
|
|
44
44
|
/** 消息数据 */
|
|
45
|
-
data?:
|
|
45
|
+
data?: any;
|
|
46
46
|
/** 消息ID */
|
|
47
47
|
id?: string;
|
|
48
|
+
event?: any;
|
|
48
49
|
}
|
|
49
50
|
/**
|
|
50
51
|
* 心跳配置选项
|
|
@@ -74,7 +74,9 @@ var ApplicationManager = class {
|
|
|
74
74
|
* @returns
|
|
75
75
|
*/
|
|
76
76
|
getAllComponents() {
|
|
77
|
-
return Array.from(this.applications.values()).flatMap(
|
|
77
|
+
return Array.from(this.applications.values()).flatMap(
|
|
78
|
+
(application) => Array.from(application.components.values())
|
|
79
|
+
).filter((component) => component.autoRender).map((component) => component.Component);
|
|
78
80
|
}
|
|
79
81
|
};
|
|
80
82
|
// Annotate the CommonJS export names for ESM import in node:
|
package/lib/indexDB/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import App from "../app";
|
|
|
2
2
|
/**
|
|
3
3
|
* IndexDB 管理器模块
|
|
4
4
|
*
|
|
5
|
-
*
|
|
5
|
+
* 这个模块使用 Dexie.js 提供了对浏览器 IndexedDB 的简单封装,并在不支持 IndexedDB 的环境中
|
|
6
6
|
* 自动降级使用内存存储作为备选存储方案。
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
@@ -34,7 +34,7 @@ export interface DBOptions {
|
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
36
|
* IndexDB 管理器类
|
|
37
|
-
* 提供对 IndexedDB
|
|
37
|
+
* 使用 Dexie.js 提供对 IndexedDB 的封装,支持自动降级到内存存储
|
|
38
38
|
* @class IndexDBManager
|
|
39
39
|
*/
|
|
40
40
|
declare class IndexDBManager {
|