@pisell/core 1.0.13 → 1.0.15

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.
Files changed (137) hide show
  1. package/es/app/app.d.ts +87 -0
  2. package/es/app/const.d.ts +4 -0
  3. package/es/app/index.d.ts +14 -0
  4. package/es/applicationManager/application.d.ts +50 -0
  5. package/es/applicationManager/index.d.ts +13 -0
  6. package/es/aws/index.d.ts +16 -0
  7. package/es/cmd/const.d.ts +11 -0
  8. package/es/cmd/index.d.ts +13 -0
  9. package/es/cmd/type.d.ts +5 -0
  10. package/es/config.d.ts +3 -0
  11. package/es/cookie/index.d.ts +13 -0
  12. package/es/data/index.d.ts +8 -0
  13. package/es/history/config.d.ts +24 -0
  14. package/es/history/index.d.ts +20 -0
  15. package/es/history/type.d.ts +2 -0
  16. package/es/hooks/index.d.ts +12 -0
  17. package/es/hooks/useDelayedValue/index.d.ts +2 -0
  18. package/es/hooks/useDispatch/index.d.ts +2 -0
  19. package/es/hooks/useLowCode/index.d.ts +13 -0
  20. package/es/hooks/useStore/index.d.ts +6 -0
  21. package/es/index.d.ts +6 -0
  22. package/es/indexDB/index.d.ts +248 -0
  23. package/es/indexDB/index.js +453 -70
  24. package/es/locales/en.d.ts +3 -0
  25. package/es/locales/index.d.ts +39 -0
  26. package/es/locales/original.d.ts +3 -0
  27. package/es/locales/type.d.ts +19 -0
  28. package/es/locales/zh-CN.d.ts +3 -0
  29. package/es/locales/zh-HK.d.ts +3 -0
  30. package/es/logger/feishu.d.ts +11 -0
  31. package/es/menuManager/hooks.d.ts +17 -0
  32. package/es/menuManager/index.d.ts +28 -0
  33. package/es/models/global.d.ts +32 -0
  34. package/es/models/index.d.ts +45 -0
  35. package/es/models/type.d.ts +2 -0
  36. package/es/plugin/index.d.ts +0 -0
  37. package/es/pubsub/example.d.ts +5 -0
  38. package/es/pubsub/index.d.ts +63 -0
  39. package/es/request/cache.d.ts +46 -0
  40. package/es/request/cancelToken.d.ts +38 -0
  41. package/es/request/config.d.ts +3 -0
  42. package/es/request/constants.d.ts +2 -0
  43. package/es/request/index.d.ts +24 -0
  44. package/es/request/pisell2Request.d.ts +6 -0
  45. package/es/request/type.d.ts +41 -0
  46. package/es/request/utils.d.ts +46 -0
  47. package/es/routes/config.d.ts +7 -0
  48. package/es/routes/index.d.ts +28 -0
  49. package/es/socket/components/SocketMonitorPage.d.ts +6 -0
  50. package/es/socket/components/index.d.ts +2 -0
  51. package/es/socket/constants.d.ts +33 -0
  52. package/es/socket/events.d.ts +31 -0
  53. package/es/socket/heartbeat.d.ts +66 -0
  54. package/es/socket/index.d.ts +61 -0
  55. package/es/socket/monitor.d.ts +169 -0
  56. package/es/socket/reconnect.d.ts +61 -0
  57. package/es/socket/socket.d.ts +130 -0
  58. package/es/socket/types.d.ts +84 -0
  59. package/es/storage/index.d.ts +17 -0
  60. package/es/tasks/index.d.ts +83 -0
  61. package/es/tasks/type.d.ts +62 -0
  62. package/es/tasks/useTasks.d.ts +5 -0
  63. package/es/type.d.ts +2 -0
  64. package/es/variables/VariablesProvider.d.ts +7 -0
  65. package/es/variables/config.d.ts +3 -0
  66. package/es/variables/index.d.ts +6 -0
  67. package/es/variables/type.d.ts +2 -0
  68. package/es/website/index.d.ts +6 -0
  69. package/lib/app/app.d.ts +87 -0
  70. package/lib/app/const.d.ts +4 -0
  71. package/lib/app/index.d.ts +14 -0
  72. package/lib/applicationManager/application.d.ts +50 -0
  73. package/lib/applicationManager/index.d.ts +13 -0
  74. package/lib/aws/index.d.ts +16 -0
  75. package/lib/cmd/const.d.ts +11 -0
  76. package/lib/cmd/index.d.ts +13 -0
  77. package/lib/cmd/type.d.ts +5 -0
  78. package/lib/config.d.ts +3 -0
  79. package/lib/cookie/index.d.ts +13 -0
  80. package/lib/data/index.d.ts +8 -0
  81. package/lib/history/config.d.ts +24 -0
  82. package/lib/history/index.d.ts +20 -0
  83. package/lib/history/type.d.ts +2 -0
  84. package/lib/hooks/index.d.ts +12 -0
  85. package/lib/hooks/useDelayedValue/index.d.ts +2 -0
  86. package/lib/hooks/useDispatch/index.d.ts +2 -0
  87. package/lib/hooks/useLowCode/index.d.ts +13 -0
  88. package/lib/hooks/useStore/index.d.ts +6 -0
  89. package/lib/index.d.ts +6 -0
  90. package/lib/indexDB/index.d.ts +248 -0
  91. package/lib/indexDB/index.js +159 -0
  92. package/lib/locales/en.d.ts +3 -0
  93. package/lib/locales/index.d.ts +39 -0
  94. package/lib/locales/original.d.ts +3 -0
  95. package/lib/locales/type.d.ts +19 -0
  96. package/lib/locales/zh-CN.d.ts +3 -0
  97. package/lib/locales/zh-HK.d.ts +3 -0
  98. package/lib/logger/feishu.d.ts +11 -0
  99. package/lib/menuManager/hooks.d.ts +17 -0
  100. package/lib/menuManager/index.d.ts +28 -0
  101. package/lib/models/global.d.ts +32 -0
  102. package/lib/models/index.d.ts +45 -0
  103. package/lib/models/type.d.ts +2 -0
  104. package/lib/plugin/index.d.ts +0 -0
  105. package/lib/pubsub/example.d.ts +5 -0
  106. package/lib/pubsub/index.d.ts +63 -0
  107. package/lib/request/cache.d.ts +46 -0
  108. package/lib/request/cancelToken.d.ts +38 -0
  109. package/lib/request/config.d.ts +3 -0
  110. package/lib/request/constants.d.ts +2 -0
  111. package/lib/request/index.d.ts +24 -0
  112. package/lib/request/pisell2Request.d.ts +6 -0
  113. package/lib/request/type.d.ts +41 -0
  114. package/lib/request/utils.d.ts +46 -0
  115. package/lib/routes/config.d.ts +7 -0
  116. package/lib/routes/index.d.ts +28 -0
  117. package/lib/socket/components/SocketMonitorPage.d.ts +6 -0
  118. package/lib/socket/components/index.d.ts +2 -0
  119. package/lib/socket/constants.d.ts +33 -0
  120. package/lib/socket/events.d.ts +31 -0
  121. package/lib/socket/heartbeat.d.ts +66 -0
  122. package/lib/socket/index.d.ts +61 -0
  123. package/lib/socket/monitor.d.ts +169 -0
  124. package/lib/socket/reconnect.d.ts +61 -0
  125. package/lib/socket/socket.d.ts +130 -0
  126. package/lib/socket/types.d.ts +84 -0
  127. package/lib/storage/index.d.ts +17 -0
  128. package/lib/tasks/index.d.ts +83 -0
  129. package/lib/tasks/type.d.ts +62 -0
  130. package/lib/tasks/useTasks.d.ts +5 -0
  131. package/lib/type.d.ts +2 -0
  132. package/lib/variables/VariablesProvider.d.ts +7 -0
  133. package/lib/variables/config.d.ts +3 -0
  134. package/lib/variables/index.d.ts +6 -0
  135. package/lib/variables/type.d.ts +2 -0
  136. package/lib/website/index.d.ts +6 -0
  137. package/package.json +8 -8
@@ -0,0 +1,61 @@
1
+ import { ReconnectOptions } from "./types";
2
+ /**
3
+ * Socket重连管理器
4
+ * 处理断线重连逻辑
5
+ */
6
+ export declare class ReconnectManager {
7
+ private options;
8
+ private attempts;
9
+ private timer;
10
+ private isReconnecting;
11
+ private reconnectCallback;
12
+ private onAttempt;
13
+ private onSuccess;
14
+ private onFail;
15
+ private onMaxAttemptsExceeded;
16
+ /**
17
+ * 创建重连管理器实例
18
+ * @param options 重连配置
19
+ * @param reconnectCallback 重连执行函数
20
+ * @param callbacks 回调函数集合
21
+ */
22
+ constructor(options: ReconnectOptions, reconnectCallback: () => Promise<boolean>, callbacks?: {
23
+ onAttempt?: (attempt: number) => void;
24
+ onSuccess?: () => void;
25
+ onFail?: (error: Error) => void;
26
+ onMaxAttemptsExceeded?: () => void;
27
+ });
28
+ /**
29
+ * 启动重连过程
30
+ */
31
+ startReconnect(): void;
32
+ /**
33
+ * 停止重连过程
34
+ */
35
+ stopReconnect(): void;
36
+ /**
37
+ * 获取当前重连尝试次数
38
+ */
39
+ getReconnectAttempts(): number;
40
+ /**
41
+ * 获取当前是否正在重连
42
+ */
43
+ isActive(): boolean;
44
+ /**
45
+ * 重置重连状态
46
+ */
47
+ reset(): void;
48
+ /**
49
+ * 安排下一次重连尝试
50
+ */
51
+ private scheduleReconnect;
52
+ /**
53
+ * 执行重连操作
54
+ */
55
+ private executeReconnect;
56
+ /**
57
+ * 计算重连延迟时间
58
+ * 支持指数退避算法,增加随机抖动
59
+ */
60
+ private getReconnectDelay;
61
+ }
@@ -0,0 +1,130 @@
1
+ import { SocketOptions, SocketStatus } from "./types";
2
+ import { SocketMonitor, SocketMonitorOptions } from "./monitor";
3
+ /**
4
+ * Socket主类
5
+ * 负责管理WebSocket连接、消息收发、事件处理、心跳检测和断线重连
6
+ */
7
+ export declare class Socket {
8
+ private ws;
9
+ private url;
10
+ private options;
11
+ private status;
12
+ private eventHandlers;
13
+ private heartbeatManager;
14
+ private reconnectManager;
15
+ private monitor;
16
+ private messageIdCounter;
17
+ /**
18
+ * 创建Socket实例
19
+ * @param options Socket配置选项
20
+ */
21
+ constructor(options: SocketOptions);
22
+ /**
23
+ * 建立WebSocket连接
24
+ */
25
+ connect(): Promise<void>;
26
+ /**
27
+ * 关闭WebSocket连接
28
+ * @param isManual 是否手动关闭
29
+ */
30
+ disconnect(isManual?: boolean): void;
31
+ /**
32
+ * 发送消息到服务器
33
+ * @param event 事件名称
34
+ * @param data 消息数据
35
+ * @param id 消息ID(可选,默认自动生成)
36
+ */
37
+ send(type: string, data?: any, id?: string): void;
38
+ /**
39
+ * 发送原始消息
40
+ * @param message 消息对象
41
+ */
42
+ private sendRaw;
43
+ /**
44
+ * 注册事件监听器
45
+ * @param event 事件名称
46
+ * @param handler 事件处理函数
47
+ */
48
+ on(event: string, handler: (...args: any[]) => void): void;
49
+ /**
50
+ * 移除事件监听器
51
+ * @param event 事件名称
52
+ * @param handler 事件处理函数(可选,不提供则移除所有该事件的处理函数)
53
+ */
54
+ off(event: string, handler?: (...args: any[]) => void): void;
55
+ /**
56
+ * 触发事件
57
+ * @param event 事件名称
58
+ * @param args 事件参数
59
+ */
60
+ private emit;
61
+ /**
62
+ * 获取当前连接状态
63
+ */
64
+ getStatus(): SocketStatus;
65
+ /**
66
+ * 获取当前状态描述
67
+ */
68
+ getStatusText(): string;
69
+ /**
70
+ * 检查是否已连接
71
+ */
72
+ isConnected(): boolean;
73
+ /**
74
+ * 设置连接状态
75
+ */
76
+ private setStatus;
77
+ /**
78
+ * 设置WebSocket事件监听器
79
+ */
80
+ private setupWebSocketListeners;
81
+ /**
82
+ * 处理接收到的消息
83
+ */
84
+ private handleMessage;
85
+ /**
86
+ * 处理连接关闭
87
+ */
88
+ private handleConnectionClosed;
89
+ /**
90
+ * 处理连接失败
91
+ */
92
+ private handleConnectionFailure;
93
+ /**
94
+ * 处理心跳响应
95
+ */
96
+ private handleHeartbeatResponse;
97
+ /**
98
+ * 初始化心跳检测
99
+ */
100
+ private initHeartbeat;
101
+ /**
102
+ * 初始化重连管理
103
+ */
104
+ private initReconnect;
105
+ /**
106
+ * 开始重连过程
107
+ */
108
+ private startReconnection;
109
+ /**
110
+ * 生成消息ID
111
+ */
112
+ private generateMessageId;
113
+ /**
114
+ * 启用监控功能
115
+ * @param options 监控配置选项
116
+ */
117
+ enableMonitoring(options?: SocketMonitorOptions): SocketMonitor;
118
+ /**
119
+ * 禁用监控功能
120
+ */
121
+ disableMonitoring(): void;
122
+ /**
123
+ * 获取监控器实例
124
+ */
125
+ getMonitor(): SocketMonitor | null;
126
+ /**
127
+ * 释放资源
128
+ */
129
+ destroy(): void;
130
+ }
@@ -0,0 +1,84 @@
1
+ /**
2
+ * Socket配置选项
3
+ */
4
+ export interface SocketOptions {
5
+ /** 是否自动连接 */
6
+ autoConnect?: boolean;
7
+ /** 是否启用重连功能 */
8
+ reconnection?: boolean;
9
+ /** 最大重连尝试次数,默认无限 */
10
+ reconnectionAttempts?: number;
11
+ /** 重连延迟时间(毫秒) */
12
+ reconnectionDelay?: number;
13
+ /** 最大重连延迟时间(毫秒) */
14
+ reconnectionDelayMax?: number;
15
+ /** 是否启用心跳检测 */
16
+ heartbeat?: boolean;
17
+ /** 心跳间隔时间(毫秒) */
18
+ heartbeatInterval?: number;
19
+ /** 请求超时时间(毫秒) */
20
+ timeout?: number;
21
+ /** 心跳超时时间(毫秒) */
22
+ heartbeatTimeout?: number;
23
+ /** 自定义协议 */
24
+ protocols?: string | string[];
25
+ /** 连接URL */
26
+ url: string;
27
+ }
28
+ /**
29
+ * Socket连接状态
30
+ */
31
+ export declare enum SocketStatus {
32
+ CONNECTING = 0,
33
+ OPEN = 1,
34
+ CLOSING = 2,
35
+ CLOSED = 3,
36
+ RECONNECTING = 4
37
+ }
38
+ /**
39
+ * Socket消息格式
40
+ */
41
+ export interface SocketMessage<T = any> {
42
+ /** 事件类型 */
43
+ type: string;
44
+ /** 消息数据 */
45
+ data?: T;
46
+ /** 消息ID */
47
+ id?: string;
48
+ }
49
+ /**
50
+ * 心跳配置选项
51
+ */
52
+ export interface HeartbeatOptions {
53
+ /** 心跳间隔时间(毫秒) */
54
+ interval: number;
55
+ /** 心跳超时时间(毫秒) */
56
+ timeout: number;
57
+ /** 心跳探测消息 */
58
+ message?: SocketMessage;
59
+ }
60
+ /**
61
+ * 重连配置选项
62
+ */
63
+ export interface ReconnectOptions {
64
+ /** 是否启用重连 */
65
+ enabled: boolean;
66
+ /** 最大重连尝试次数 */
67
+ attempts?: number;
68
+ /** 重连延迟时间(毫秒) */
69
+ delay: number;
70
+ /** 最大重连延迟时间(毫秒) */
71
+ delayMax?: number;
72
+ /** 是否使用指数退避算法 */
73
+ jitter?: boolean;
74
+ }
75
+ /**
76
+ * 事件处理函数类型
77
+ */
78
+ export declare type EventHandler = (...args: any[]) => void;
79
+ /**
80
+ * 事件处理函数映射
81
+ */
82
+ export interface EventHandlerMap {
83
+ [event: string]: EventHandler[];
84
+ }
@@ -0,0 +1,17 @@
1
+ import App from '../app';
2
+ export interface StorageOptions {
3
+ storageKey?: string;
4
+ removeStorageAfter?: (key: string) => void;
5
+ setStorageAfter?: (key: string, value: string) => void;
6
+ }
7
+ export declare class Storage {
8
+ private storageKey;
9
+ private app?;
10
+ private options;
11
+ constructor(app?: App, options?: StorageOptions);
12
+ createKey: (key: string) => string;
13
+ setStorage: (key: string, value: string) => void;
14
+ getStorage: (key: string) => string | null;
15
+ removeStorage: (key: string) => void;
16
+ clear: () => void;
17
+ }
@@ -0,0 +1,83 @@
1
+ import { Task, TasksModule, RunTaskParams, AddTaskParams, DeleteTaskParams } from "./type";
2
+ import App from "../app";
3
+ export declare class TasksManager {
4
+ private static instance;
5
+ private taskFunctions;
6
+ private tasks;
7
+ private app;
8
+ private db;
9
+ useTasks: () => {
10
+ tasks: TasksModule;
11
+ };
12
+ watchTaskCallback: (taskModule: TasksModule) => void;
13
+ private timerIds;
14
+ constructor(app: App);
15
+ static getInstance(app?: App): TasksManager;
16
+ addTaskFunction<T>(name: string, fun: T): void;
17
+ addTaskFunctions<T>(tasks: {
18
+ name: string;
19
+ fun: T;
20
+ }[]): void;
21
+ getTasks(): TasksModule;
22
+ getTaskFunction(name: string): any;
23
+ init(): Promise<void>;
24
+ private saveTaskQueueToLocal;
25
+ private loadTaskQueueFromLocal;
26
+ /**
27
+ * @title: 执行任务
28
+ * @description:
29
+ * @param {Task} task
30
+ * @return {*}
31
+ * @Author: zhiwei.Wang
32
+ * @Date: 2024-09-26 13:53
33
+ */
34
+ private runTask;
35
+ /**
36
+ * @title: 清除任务定时器
37
+ * @param {NodeJS.Timeout} timerId
38
+ */
39
+ private clearTaskTimer;
40
+ /**
41
+ * @title: 启动轮询
42
+ * @description: 根据轮询间隔定期执行任务
43
+ * @param {Task} task
44
+ * @return {*}
45
+ */
46
+ private startPolling;
47
+ /**
48
+ * @title: 创建任务数据
49
+ * @description:
50
+ * @param {Partial} payload
51
+ * @return {*}
52
+ * @Author: zhiwei.Wang
53
+ * @Date: 2024-09-26 13:54
54
+ */
55
+ private createTaskData;
56
+ private getTaskQueue;
57
+ private timeout;
58
+ /**
59
+ * @title: 执行任务队列
60
+ * @description:
61
+ * @return {*}
62
+ * @Author: zhiwei.Wang
63
+ * @Date: 2024-09-26 13:52
64
+ */
65
+ run(payload: RunTaskParams): Promise<void>;
66
+ deleteTask(payload: DeleteTaskParams): void;
67
+ /**
68
+ * @title: 重试任务
69
+ * @description:
70
+ * @return {*}
71
+ * @Author: zhiwei.Wang
72
+ * @Date: 2024-09-26 13:53
73
+ */
74
+ retryTask(payload: RunTaskParams): void;
75
+ addTask(payload: AddTaskParams): void;
76
+ private updateTask;
77
+ private updateQueueStatus;
78
+ private setTasks;
79
+ clearAllTaskTimer(tasks: Task[]): void;
80
+ clearTasks(payload: RunTaskParams): void;
81
+ clearAllTasks(): void;
82
+ watchTask(callback: (taskModule: TasksModule) => void): void;
83
+ }
@@ -0,0 +1,62 @@
1
+ export declare type TaskRunStatus = "pending" | "in-progress" | "success" | "failure";
2
+ export interface Task {
3
+ id?: string;
4
+ type?: "local" | "cloud";
5
+ retries?: number;
6
+ maxRetries?: number;
7
+ status?: TaskRunStatus;
8
+ action: string;
9
+ payload: any;
10
+ beforeAction?: string;
11
+ beforePayload?: any;
12
+ afterAction?: string;
13
+ afterPayload?: any;
14
+ polling?: {
15
+ interval?: number;
16
+ };
17
+ pollingResult?: {
18
+ count: number;
19
+ timerId?: any;
20
+ };
21
+ manual?: boolean;
22
+ destroy?: boolean;
23
+ [key: string]: any;
24
+ }
25
+ export interface TaskConfig {
26
+ tasks: Task[];
27
+ }
28
+ declare type TaskModuleName = string;
29
+ declare type TaskQueueName = string;
30
+ declare type TaskStatus = "uncompleted" | "completed";
31
+ export interface TaskQueue {
32
+ status: TaskStatus;
33
+ tasks: Task[];
34
+ }
35
+ export interface RunTaskParams {
36
+ module: TaskModuleName;
37
+ queueId: TaskQueueName;
38
+ callback?: () => void;
39
+ }
40
+ export interface DeleteTaskParams {
41
+ module: TaskModuleName;
42
+ queueId: TaskQueueName;
43
+ taskId: string;
44
+ }
45
+ export interface AddTaskParams {
46
+ module: TaskModuleName;
47
+ queueId: TaskQueueName;
48
+ tasks: Task[];
49
+ }
50
+ export interface TaskRunResult {
51
+ status: TaskRunStatus;
52
+ [key: string]: any;
53
+ }
54
+ export interface TasksModule {
55
+ [key: TaskModuleName]: {
56
+ [key: TaskQueueName]: {
57
+ status: TaskStatus;
58
+ tasks: Task[];
59
+ };
60
+ };
61
+ }
62
+ export {};
@@ -0,0 +1,5 @@
1
+ import { TasksModule } from './type';
2
+ declare const useTasks: () => {
3
+ tasks: TasksModule;
4
+ };
5
+ export default useTasks;
package/lib/type.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export interface CoreConfig {
2
+ }
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ export declare const useVariablesContext: () => any;
3
+ interface VariablesProviderProps {
4
+ children: React.ReactNode;
5
+ }
6
+ export declare const VariablesProvider: React.FC<VariablesProviderProps>;
7
+ export {};
@@ -0,0 +1,3 @@
1
+ import { VariablesConfig } from './type';
2
+ export declare const setConfig: (newConfig: Partial<VariablesConfig>) => void;
3
+ export declare const getConfig: () => VariablesConfig;
@@ -0,0 +1,6 @@
1
+ export declare type VariableMap = Record<string, string>;
2
+ declare const _default: {
3
+ setConfig: (newConfig: Partial<import("./type").VariablesConfig>) => void;
4
+ getConfig: () => import("./type").VariablesConfig;
5
+ };
6
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export interface VariablesConfig {
2
+ }
@@ -0,0 +1,6 @@
1
+ declare const _default: {
2
+ setTitle: (title: string) => void;
3
+ setIcon: (paramsIcon: string) => void;
4
+ setAppleWebAppTitle: (title: string) => void;
5
+ };
6
+ export default _default;
package/package.json CHANGED
@@ -1,12 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/core",
3
- "version": "1.0.13",
4
- "scripts": {
5
- "build": "father build",
6
- "dev": "father dev",
7
- "build:types": "tsc --project tsconfig.types.json",
8
- "publish:types": "npm run build:types && cd types && cp ../types-package.json package.json && npm publish"
9
- },
3
+ "version": "1.0.15",
10
4
  "sideEffects": false,
11
5
  "main": "./lib/index.js",
12
6
  "module": "./es/index.js",
@@ -29,7 +23,7 @@
29
23
  "history": "^4.9.0",
30
24
  "react-router-dom": "^5.3.4",
31
25
  "react-redux": "^9.1.2",
32
- "@pisell/utils": "3.0.1",
26
+ "@pisell/utils": "3.0.2",
33
27
  "dva": "^2.4.1",
34
28
  "dva-core": "^2.0.4",
35
29
  "js-md5": "^0.8.3",
@@ -44,5 +38,11 @@
44
38
  ],
45
39
  "publishConfig": {
46
40
  "access": "public"
41
+ },
42
+ "scripts": {
43
+ "build": "father build",
44
+ "dev": "father dev",
45
+ "build:types": "tsc --project tsconfig.types.json",
46
+ "publish:types": "npm run build:types && cd types && cp ../types-package.json package.json && npm publish"
47
47
  }
48
48
  }