vite-uni-dev-tool 0.0.12 → 0.0.13

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 (181) hide show
  1. package/dist/const.d.ts +133 -0
  2. package/dist/const.d.ts.map +1 -0
  3. package/dist/const.js +36 -0
  4. package/dist/core.d.ts +52 -0
  5. package/dist/core.d.ts.map +1 -0
  6. package/dist/core.js +80 -0
  7. package/dist/devConsole/index.d.ts +169 -0
  8. package/dist/devConsole/index.d.ts.map +1 -0
  9. package/dist/devConsole/index.js +270 -0
  10. package/dist/devEvent/index.d.ts +286 -0
  11. package/dist/devEvent/index.d.ts.map +1 -0
  12. package/dist/devEvent/index.js +435 -0
  13. package/dist/devEventBus/index.d.ts +42 -0
  14. package/dist/devEventBus/index.d.ts.map +1 -0
  15. package/dist/devEventBus/index.js +70 -0
  16. package/dist/devIntercept/index.d.ts +119 -0
  17. package/dist/devIntercept/index.d.ts.map +1 -0
  18. package/dist/devIntercept/index.js +582 -0
  19. package/dist/devRunJS/index.d.ts +67 -0
  20. package/dist/devRunJS/index.d.ts.map +1 -0
  21. package/dist/devStore/index.d.ts +178 -0
  22. package/dist/devStore/index.d.ts.map +1 -0
  23. package/dist/devStore/index.js +395 -0
  24. package/dist/devToolInfo/index.d.ts +17 -0
  25. package/dist/devToolInfo/index.d.ts.map +1 -0
  26. package/dist/devToolInfo/index.js +15 -0
  27. package/{dev → dist}/plugins/uniDevTool/uniDevTool.d.ts +7 -1
  28. package/dist/plugins/uniDevTool/uniDevTool.d.ts.map +1 -0
  29. package/dist/plugins/uniDevTool/uniDevTool.js +35 -0
  30. package/{dev → dist}/plugins/utils/index.d.ts +3 -0
  31. package/{dev → dist}/plugins/utils/index.d.ts.map +1 -1
  32. package/dist/plugins/utils/index.js +1 -0
  33. package/dist/type.d.ts +264 -0
  34. package/dist/type.d.ts.map +1 -0
  35. package/dist/utils/array.d.ts +2 -0
  36. package/dist/utils/array.d.ts.map +1 -0
  37. package/dist/utils/array.js +12 -0
  38. package/dist/utils/date.d.ts +19 -0
  39. package/dist/utils/date.d.ts.map +1 -0
  40. package/dist/utils/date.js +40 -0
  41. package/dist/utils/file.d.ts +11 -0
  42. package/dist/utils/file.d.ts.map +1 -0
  43. package/dist/utils/file.js +87 -0
  44. package/dist/utils/function.d.ts +28 -0
  45. package/dist/utils/function.d.ts.map +1 -0
  46. package/dist/utils/function.js +46 -0
  47. package/dist/utils/index.d.ts +11 -0
  48. package/dist/utils/index.d.ts.map +1 -0
  49. package/dist/utils/index.js +55 -0
  50. package/dist/utils/ip.d.ts +5 -0
  51. package/dist/utils/ip.d.ts.map +1 -0
  52. package/dist/utils/ip.js +21 -0
  53. package/dist/utils/language.d.ts +29 -0
  54. package/dist/utils/language.d.ts.map +1 -0
  55. package/dist/utils/language.js +50 -0
  56. package/dist/utils/object.d.ts +49 -0
  57. package/dist/utils/object.d.ts.map +1 -0
  58. package/dist/utils/object.js +118 -0
  59. package/dist/utils/page.d.ts +7 -0
  60. package/dist/utils/page.d.ts.map +1 -0
  61. package/dist/utils/page.js +7 -0
  62. package/dist/utils/platform.d.ts +4 -0
  63. package/dist/utils/platform.d.ts.map +1 -0
  64. package/dist/utils/platform.js +14 -0
  65. package/dist/utils/string.d.ts +45 -0
  66. package/dist/utils/string.d.ts.map +1 -0
  67. package/dist/utils/string.js +88 -0
  68. package/dist/utils/utils.d.ts +16 -0
  69. package/dist/utils/utils.d.ts.map +1 -0
  70. package/dist/v2/AutoSizer/utils.d.ts +5 -0
  71. package/dist/v2/AutoSizer/utils.d.ts.map +1 -0
  72. package/dist/v2/JsonPretty/hooks/useClipboard.d.ts +4 -0
  73. package/dist/v2/JsonPretty/hooks/useClipboard.d.ts.map +1 -0
  74. package/dist/v2/JsonPretty/hooks/useError.d.ts +8 -0
  75. package/dist/v2/JsonPretty/hooks/useError.d.ts.map +1 -0
  76. package/dist/v2/JsonPretty/type.d.ts +93 -0
  77. package/dist/v2/JsonPretty/type.d.ts.map +1 -0
  78. package/dist/v3/AutoSizer/utils.d.ts +5 -0
  79. package/dist/v3/AutoSizer/utils.d.ts.map +1 -0
  80. package/dist/v3/ConsoleList/staticTips.d.ts +13 -0
  81. package/dist/v3/ConsoleList/staticTips.d.ts.map +1 -0
  82. package/dist/v3/JsonPretty/hooks/useClipboard.d.ts +4 -0
  83. package/dist/v3/JsonPretty/hooks/useClipboard.d.ts.map +1 -0
  84. package/dist/v3/JsonPretty/hooks/useError.d.ts +8 -0
  85. package/dist/v3/JsonPretty/hooks/useError.d.ts.map +1 -0
  86. package/dist/v3/JsonPretty/type.d.ts +93 -0
  87. package/dist/v3/JsonPretty/type.d.ts.map +1 -0
  88. package/dist/v3/JsonPretty/utils/index.d.ts +10 -0
  89. package/dist/v3/JsonPretty/utils/index.d.ts.map +1 -0
  90. package/package.json +5 -5
  91. package/dev/components/AppInfo/index.vue +0 -36
  92. package/dev/components/AutoSizer/index.vue +0 -193
  93. package/dev/components/AutoSizer/index1.vue +0 -186
  94. package/dev/components/AutoSizer/utils.ts +0 -49
  95. package/dev/components/Button/index.vue +0 -34
  96. package/dev/components/CaptureScreen/index.vue +0 -62
  97. package/dev/components/Checkbox/index.vue +0 -40
  98. package/dev/components/CloseButton/index.vue +0 -26
  99. package/dev/components/Code/index.vue +0 -230
  100. package/dev/components/Connection/index.vue +0 -88
  101. package/dev/components/ConsoleList/Code.vue +0 -227
  102. package/dev/components/ConsoleList/ConsoleItem.vue +0 -207
  103. package/dev/components/ConsoleList/RunJSInput.vue +0 -237
  104. package/dev/components/ConsoleList/index.vue +0 -139
  105. package/dev/components/ConsoleList/staticTips.ts +0 -1145
  106. package/dev/components/DevTool/index.vue +0 -188
  107. package/dev/components/DevToolButton/index.vue +0 -210
  108. package/dev/components/DevToolTitle/index.vue +0 -21
  109. package/dev/components/DevToolWindow/index.vue +0 -1053
  110. package/dev/components/DeviceInfo/index.vue +0 -32
  111. package/dev/components/Empty/empty.png +0 -0
  112. package/dev/components/Empty/index.vue +0 -28
  113. package/dev/components/FilterInput/index.vue +0 -86
  114. package/dev/components/JsonPretty/components/Brackets/index.vue +0 -23
  115. package/dev/components/JsonPretty/components/Carets/index.vue +0 -59
  116. package/dev/components/JsonPretty/components/CheckController/index.vue +0 -125
  117. package/dev/components/JsonPretty/components/TreeNode/index.vue +0 -349
  118. package/dev/components/JsonPretty/hooks/useClipboard.ts +0 -21
  119. package/dev/components/JsonPretty/hooks/useError.ts +0 -21
  120. package/dev/components/JsonPretty/index.vue +0 -476
  121. package/dev/components/JsonPretty/type.ts +0 -125
  122. package/dev/components/JsonPretty/utils/index.ts +0 -172
  123. package/dev/components/NetworkList/NetworkDetail.vue +0 -194
  124. package/dev/components/NetworkList/NetworkItem.vue +0 -119
  125. package/dev/components/NetworkList/index.vue +0 -128
  126. package/dev/components/PiniaList/index.vue +0 -64
  127. package/dev/components/RouteList/index.vue +0 -121
  128. package/dev/components/RunJS/index.vue +0 -128
  129. package/dev/components/SettingList/index.vue +0 -222
  130. package/dev/components/SourceCode/index.vue +0 -231
  131. package/dev/components/StorageList/index.vue +0 -170
  132. package/dev/components/SystemInfo/index.vue +0 -34
  133. package/dev/components/Tabs/index.vue +0 -123
  134. package/dev/components/Tag/index.vue +0 -89
  135. package/dev/components/UniEvent/UniEventItem.vue +0 -126
  136. package/dev/components/UniEvent/index.vue +0 -98
  137. package/dev/components/UploadList/UploadDetail.vue +0 -204
  138. package/dev/components/UploadList/UploadItem.vue +0 -117
  139. package/dev/components/UploadList/index.vue +0 -117
  140. package/dev/components/VirtualList/index.vue +0 -112
  141. package/dev/components/VirtualListPro/AutoSize.vue +0 -43
  142. package/dev/components/VirtualListPro/index.vue +0 -238
  143. package/dev/components/VirtualListPro/readme.md +0 -40
  144. package/dev/components/VuexList/index.vue +0 -54
  145. package/dev/components/WebSocket/WebSocketItem.vue +0 -103
  146. package/dev/components/WebSocket/WebSocketList.vue +0 -173
  147. package/dev/components/WebSocket/index.vue +0 -124
  148. package/dev/components/WindowInfo/index.vue +0 -33
  149. package/dev/const.ts +0 -164
  150. package/dev/core.ts +0 -118
  151. package/dev/devConsole/index.ts +0 -350
  152. package/dev/devEvent/index.ts +0 -810
  153. package/dev/devEventBus/index.ts +0 -94
  154. package/dev/devIntercept/index.ts +0 -745
  155. package/dev/devRunJS/index.ts +0 -170
  156. package/dev/devStore/index.ts +0 -732
  157. package/dev/devToolInfo/index.ts +0 -26
  158. package/dev/plugins/uniDevTool/uniDevTool.d.ts.map +0 -1
  159. package/dev/plugins/uniDevTool/uniDevTool.js +0 -36
  160. package/dev/plugins/utils/index.js +0 -1
  161. package/dev/shims-uni.d.ts +0 -43
  162. package/dev/type.ts +0 -291
  163. package/dev/utils/array.ts +0 -15
  164. package/dev/utils/date.ts +0 -75
  165. package/dev/utils/file.ts +0 -121
  166. package/dev/utils/function.ts +0 -192
  167. package/dev/utils/index.d.ts +0 -6
  168. package/dev/utils/index.ts +0 -51
  169. package/dev/utils/ip.ts +0 -79
  170. package/dev/utils/language.ts +0 -77
  171. package/dev/utils/object.ts +0 -306
  172. package/dev/utils/page.ts +0 -13
  173. package/dev/utils/platform.ts +0 -14
  174. package/dev/utils/string.ts +0 -133
  175. package/dev/utils/utils.ts +0 -198
  176. /package/{dev → dist}/index.d.ts +0 -0
  177. /package/{dev → dist}/index.d.ts.map +0 -0
  178. /package/{dev → dist}/index.js +0 -0
  179. /package/{dev → dist}/plugins/uniGlobalComponents/uniGlobalComponents.d.ts +0 -0
  180. /package/{dev → dist}/plugins/uniGlobalComponents/uniGlobalComponents.d.ts.map +0 -0
  181. /package/{dev → dist}/plugins/uniGlobalComponents/uniGlobalComponents.js +0 -0
@@ -0,0 +1,133 @@
1
+ /**
2
+ * 调试按钮事件
3
+ */
4
+ export declare const DEV_BUTTON_VISIBLE = "dev-button-visible";
5
+ /**
6
+ * 调试弹窗事件
7
+ */
8
+ export declare const DEV_WINDOW_VISIBLE = "dev-window-visible";
9
+ /**
10
+ * app 发出的信息
11
+ */
12
+ export declare const DEV_APP_MESSAGE = "dev-app-message";
13
+ /**
14
+ * 调试弹窗发出的消息
15
+ */
16
+ export declare const DEV_WINDOW_MESSAGE = "dev-window-message";
17
+ /**
18
+ * 调试器销毁
19
+ */
20
+ export declare const DEV_IS_DESTROY = "dev-is-destroy";
21
+ /**
22
+ * 清空console
23
+ */
24
+ export declare const DEV_CONSOLE_CLEAR = "dev-console-clear";
25
+ /**
26
+ * 清空network
27
+ */
28
+ export declare const DEV_NETWORK_CLEAR = "dev-network-clear";
29
+ /**
30
+ * 清空websocket
31
+ */
32
+ export declare const DEV_WEBSOCKET_CLEAR = "dev-websocket-clear";
33
+ /**
34
+ * 清空upload
35
+ */
36
+ export declare const DEV_UPLOAD_CLEAR = "dev-upload-clear";
37
+ /**
38
+ * 清空storage
39
+ */
40
+ export declare const DEV_STORAGE_CLEAR = "dev-storage-clear";
41
+ /**
42
+ * 刷新storage
43
+ */
44
+ export declare const DEV_STORAGE_REFRESH = "dev-storage-refresh";
45
+ /**
46
+ * 移除storage
47
+ */
48
+ export declare const DEV_STORAGE_REMOVE = "dev-storage-remove";
49
+ /**
50
+ * 新增storage
51
+ */
52
+ export declare const DEV_STORAGE_ADD = "dev-storage-add";
53
+ /**
54
+ * 更新storage
55
+ */
56
+ export declare const DEV_STORAGE_UPDATE = "dev-storage-update";
57
+ /**
58
+ * 页面跳转
59
+ */
60
+ export declare const DEV_PAGE_JUMP = "dev-page-jump";
61
+ /**
62
+ * 隐藏调试按钮
63
+ */
64
+ export declare const DEV_BUTTON_SHOW_OR_HIDE = "dev-button-show-or-hide";
65
+ /**
66
+ * 重启调试器
67
+ */
68
+ export declare const DEV_RESTART_DEBUGGER = "dev-restart-debugger";
69
+ /**
70
+ * 重启app
71
+ */
72
+ export declare const DEV_RESTART_APP = "dev-restart-app";
73
+ /**
74
+ * 导出日志
75
+ */
76
+ export declare const DEV_EXPORT_LOG = "dev-export-log";
77
+ /**
78
+ * 改变vuex数据
79
+ */
80
+ export declare const DEV_VUEX_CHANGE = "dev-vuex-change";
81
+ /**
82
+ * 改变pinia
83
+ */
84
+ export declare const DEV_PINIA_CHANGE = "dev-pinia-change";
85
+ /**
86
+ * 清除日志缓存
87
+ */
88
+ export declare const DEV_LOG_CACHE_CLEAR = "dev-log-cache-clear";
89
+ /**
90
+ * 销毁调试工具
91
+ */
92
+ export declare const DEV_DESTROY = "dev-destroy";
93
+ /**
94
+ * 显示调试弹窗
95
+ */
96
+ export declare const DEV_WINDOW_OPEN = "dev-window-open";
97
+ /**
98
+ * 显示调试弹窗
99
+ */
100
+ export declare const DEV_WINDOW_CLOSE = "dev-window-close";
101
+ /**
102
+ * 刷新路由列表
103
+ */
104
+ export declare const DEV_ROUTE_REFRESH = "dev-route-refresh";
105
+ /**
106
+ * 获取 dev option
107
+ */
108
+ export declare const DEV_OPTION = "dev-option";
109
+ /**
110
+ * 获取options
111
+ */
112
+ export declare const DEV_OPTION_GET = "dev-option-get";
113
+ /**
114
+ * 发送 options
115
+ */
116
+ export declare const DEV_OPTION_SEND = "dev-option-send";
117
+ /**
118
+ * 清空事件
119
+ */
120
+ export declare const DEV_UNI_EVENT_CLEAR = "dev-uni-event-clear";
121
+ /**
122
+ * 运行js
123
+ */
124
+ export declare const DEV_RUN_JS = "dev-uni-run-js";
125
+ /**
126
+ * 清空截屏列表
127
+ */
128
+ export declare const DEV_CAPTURE_SCREEN_CLEAR = "dev-capture-screen-clear";
129
+ /**
130
+ * 存储的dev-tool 信息
131
+ */
132
+ export declare const DEV_TOOL_INFO = "dev-tool-info";
133
+ //# sourceMappingURL=const.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../dev/const.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,eAAe,oBAAoB,CAAC;AAEjD;;GAEG;AACH,eAA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AU,eAAe,CAAC;AAEvC;;GAEG;AACH,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,eAAe,oBAAoB,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AAEzD;;GAEG;AACH,eAAO,MAAM,UAAU,mBAAmB,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,wBAAwB,6BAA6B,CAAC;AAEnE;;GAEG;AACH,eAAO,MAAM,aAAa,kBAAkB,CAAC"}
package/dist/const.js ADDED
@@ -0,0 +1,36 @@
1
+ const e = "dev-button-visible", E = "dev-window-visible", o = "dev-app-message", _ = "dev-window-message", t = "dev-is-destroy", s = "dev-console-clear", n = "dev-network-clear", c = "dev-websocket-clear", d = "dev-upload-clear", D = "dev-storage-clear", v = "dev-storage-refresh", V = "dev-storage-remove", O = "dev-storage-add", r = "dev-storage-update", R = "dev-page-jump", a = "dev-button-show-or-hide", A = "dev-restart-debugger", T = "dev-restart-app", S = "dev-export-log", N = "dev-vuex-change", i = "dev-pinia-change", C = "dev-log-cache-clear", I = "dev-destroy", l = "dev-window-open", p = "dev-window-close", L = "dev-route-refresh", g = "dev-option", G = "dev-option-get", P = "dev-option-send", u = "dev-uni-event-clear", w = "dev-uni-run-js", U = "dev-capture-screen-clear", W = "dev-tool-info";
2
+ export {
3
+ o as DEV_APP_MESSAGE,
4
+ a as DEV_BUTTON_SHOW_OR_HIDE,
5
+ e as DEV_BUTTON_VISIBLE,
6
+ U as DEV_CAPTURE_SCREEN_CLEAR,
7
+ s as DEV_CONSOLE_CLEAR,
8
+ I as DEV_DESTROY,
9
+ S as DEV_EXPORT_LOG,
10
+ t as DEV_IS_DESTROY,
11
+ C as DEV_LOG_CACHE_CLEAR,
12
+ n as DEV_NETWORK_CLEAR,
13
+ g as DEV_OPTION,
14
+ G as DEV_OPTION_GET,
15
+ P as DEV_OPTION_SEND,
16
+ R as DEV_PAGE_JUMP,
17
+ i as DEV_PINIA_CHANGE,
18
+ T as DEV_RESTART_APP,
19
+ A as DEV_RESTART_DEBUGGER,
20
+ L as DEV_ROUTE_REFRESH,
21
+ w as DEV_RUN_JS,
22
+ O as DEV_STORAGE_ADD,
23
+ D as DEV_STORAGE_CLEAR,
24
+ v as DEV_STORAGE_REFRESH,
25
+ V as DEV_STORAGE_REMOVE,
26
+ r as DEV_STORAGE_UPDATE,
27
+ W as DEV_TOOL_INFO,
28
+ u as DEV_UNI_EVENT_CLEAR,
29
+ d as DEV_UPLOAD_CLEAR,
30
+ N as DEV_VUEX_CHANGE,
31
+ c as DEV_WEBSOCKET_CLEAR,
32
+ p as DEV_WINDOW_CLOSE,
33
+ _ as DEV_WINDOW_MESSAGE,
34
+ l as DEV_WINDOW_OPEN,
35
+ E as DEV_WINDOW_VISIBLE
36
+ };
package/dist/core.d.ts ADDED
@@ -0,0 +1,52 @@
1
+ import { DevConsole } from './devConsole';
2
+ import { DevTool } from './type';
3
+ import { EventBus } from './devEventBus';
4
+
5
+ /**
6
+ * 备份原生方法
7
+ *
8
+ * @private
9
+ * @memberof DevStore
10
+ */
11
+ declare const backup: {
12
+ setStorage: {
13
+ (options: UniApp.SetStorageOptions): void;
14
+ <T extends UniApp.SetStorageOptions = UniApp.SetStorageOptions>(options: T): UniApp.PromisifySuccessResult<T, UniApp.SetStorageOptions, void>;
15
+ };
16
+ setStorageSync: (key: string, value: any) => void;
17
+ clearStorage: () => void;
18
+ clearStorageSync: () => void;
19
+ removeStorage: {
20
+ (options: UniApp.RemoveStorageOptions): void;
21
+ <T_1 extends UniApp.RemoveStorageOptions = UniApp.RemoveStorageOptions>(options: T_1): UniApp.PromisifySuccessResult<T_1, UniApp.RemoveStorageOptions, void>;
22
+ };
23
+ removeStorageSync: (key: string) => void;
24
+ reject: <T_2 = never>(reason?: any) => Promise<T_2>;
25
+ connectSocket: {
26
+ (options: UniApp.ConnectSocketOption): UniApp.SocketTask;
27
+ <T_3 extends UniApp.ConnectSocketOption = UniApp.ConnectSocketOption>(options: T_3): UniApp.PromisifySuccessResult<T_3, UniApp.ConnectSocketOption, UniApp.SocketTask>;
28
+ };
29
+ uploadFile: {
30
+ (options: UniApp.UploadFileOption): UniApp.UploadTask;
31
+ <T_4 extends UniApp.UploadFileOption = UniApp.UploadFileOption>(options: T_4): UniApp.PromisifySuccessResult<T_4, UniApp.UploadFileOption, UniApp.UploadTask>;
32
+ };
33
+ $on: (eventName: string, callback: (result: any) => void) => void;
34
+ $once: (eventName: string, callback: (result: any) => void) => void;
35
+ $emit: (eventName: string, param?: any) => void;
36
+ $off: (eventName?: string | string[] | undefined, callback?: ((result: any) => void) | undefined) => void;
37
+ __log__: any;
38
+ };
39
+ declare const eventBus: EventBus;
40
+ declare const console: DevConsole;
41
+ declare function getDevToolOptions(): DevTool.DevToolOptions | undefined;
42
+ declare function initDevTool(options?: DevTool.DevToolOptions): void;
43
+ declare function showDevToolButton(): void;
44
+ declare function hideDevToolButton(): void;
45
+ declare function openDevToolWindow(): void;
46
+ declare function closeDevToolWindow(): void;
47
+ declare function createDevTool(): void;
48
+ declare function destroyDevTool(): void;
49
+ declare function interceptVuexStorage(store: any): void;
50
+ declare function interceptPiniaStore(context: any): any;
51
+ export { backup, console, initDevTool, createDevTool, destroyDevTool, showDevToolButton, hideDevToolButton, openDevToolWindow, closeDevToolWindow, getDevToolOptions, interceptVuexStorage, interceptPiniaStore, eventBus, };
52
+ //# sourceMappingURL=core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../dev/core.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC;;;;;GAKG;AACH,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmBX,CAAC;AAEF,QAAA,MAAM,QAAQ,UAAiB,CAAC;AAShC,QAAA,MAAM,OAAO,YAAwB,CAAC;AAOtC,iBAAS,iBAAiB,uCAEzB;AAED,iBAAS,WAAW,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,cAAc,QAQpD;AAED,iBAAS,iBAAiB,SAEzB;AAED,iBAAS,iBAAiB,SAEzB;AAED,iBAAS,iBAAiB,SAEzB;AAED,iBAAS,kBAAkB,SAE1B;AAED,iBAAS,aAAa,SAMrB;AAED,iBAAS,cAAc,SAEtB;AAED,iBAAS,oBAAoB,CAAC,KAAK,EAAE,GAAG,QAEvC;AAED,iBAAS,mBAAmB,CAAC,OAAO,EAAE,GAAG,OAExC;AAID,OAAO,EACL,MAAM,EACN,OAAO,EACP,WAAW,EACX,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,QAAQ,GACT,CAAC"}
package/dist/core.js ADDED
@@ -0,0 +1,80 @@
1
+ import { DevStore as c } from "./devStore/index.js";
2
+ import { DevEvent as i } from "./devEvent/index.js";
3
+ import { DevIntercept as u } from "./devIntercept/index.js";
4
+ import { DevConsole as l } from "./devConsole/index.js";
5
+ import { EventBus as v } from "./devEventBus/index.js";
6
+ const s = {
7
+ // log: console.log,
8
+ // info: console.info,
9
+ // warn: console.warn,
10
+ // error: console.error,
11
+ setStorage: uni == null ? void 0 : uni.setStorage,
12
+ setStorageSync: uni == null ? void 0 : uni.setStorageSync,
13
+ clearStorage: uni == null ? void 0 : uni.clearStorage,
14
+ clearStorageSync: uni == null ? void 0 : uni.clearStorageSync,
15
+ removeStorage: uni == null ? void 0 : uni.removeStorage,
16
+ removeStorageSync: uni == null ? void 0 : uni.removeStorageSync,
17
+ reject: Promise.reject,
18
+ connectSocket: uni == null ? void 0 : uni.connectSocket,
19
+ uploadFile: uni == null ? void 0 : uni.uploadFile,
20
+ $on: uni.$on,
21
+ $once: uni.$once,
22
+ $emit: uni.$emit,
23
+ $off: uni.$off,
24
+ __log__: uni.__log__
25
+ }, a = new v(), o = new c(), n = new i({
26
+ store: o,
27
+ eventBus: a
28
+ }), r = new l(n), t = new u({
29
+ event: n,
30
+ enableInterceptPromiseReject: o == null ? void 0 : o.enableInterceptPromiseReject
31
+ });
32
+ function T() {
33
+ return o.getDevToolOptions();
34
+ }
35
+ function p(e) {
36
+ e != null && e.mode || r.error("[DevTool] 请传入 mode: import.meta.env.MODE"), o.setDevToolOptions(e || { mode: "" }), t.interceptVue3(e == null ? void 0 : e.vue3instance);
37
+ }
38
+ function d() {
39
+ n.showDevToolButton();
40
+ }
41
+ function _() {
42
+ n.hideDevToolButton();
43
+ }
44
+ function w() {
45
+ n.openDevToolWindow();
46
+ }
47
+ function y() {
48
+ n.closeDevToolWindow();
49
+ }
50
+ function $() {
51
+ n.createDevTool(), t.init({
52
+ event: n,
53
+ enableInterceptPromiseReject: o == null ? void 0 : o.enableInterceptPromiseReject
54
+ });
55
+ }
56
+ function P() {
57
+ n.destroyDevTool();
58
+ }
59
+ function j(e) {
60
+ return t.interceptVuexStorage(e);
61
+ }
62
+ function B(e) {
63
+ return t.interceptPiniaStore(e);
64
+ }
65
+ uni.__dev__console = r;
66
+ export {
67
+ s as backup,
68
+ y as closeDevToolWindow,
69
+ r as console,
70
+ $ as createDevTool,
71
+ P as destroyDevTool,
72
+ a as eventBus,
73
+ T as getDevToolOptions,
74
+ _ as hideDevToolButton,
75
+ p as initDevTool,
76
+ B as interceptPiniaStore,
77
+ j as interceptVuexStorage,
78
+ w as openDevToolWindow,
79
+ d as showDevToolButton
80
+ };
@@ -0,0 +1,169 @@
1
+ import { DevEvent } from '../devEvent';
2
+ import { DevTool } from '../type';
3
+
4
+ /**
5
+ * DevTool 包装之后的 console 类
6
+ *
7
+ * 用于记录 console 日志
8
+ *
9
+ * 覆盖 console 将会导致难以预料的事情发生,因此不建议覆盖 console
10
+ *
11
+ * @export
12
+ * @class DevConsole
13
+ */
14
+ export declare class DevConsole {
15
+ event: DevEvent;
16
+ /**
17
+ * 时间戳记录
18
+ *
19
+ * @memberof DevConsole
20
+ */
21
+ timeMap: Map<string, number>;
22
+ /**
23
+ * 计数器记录
24
+ *
25
+ * @memberof DevConsole
26
+ */
27
+ countMap: Map<string, number>;
28
+ constructor(event: DevEvent);
29
+ /**
30
+ * 包装之后的 console 方法
31
+ *
32
+ * @param {DevTool.ConsoleType} type
33
+ * @param {any[]} args
34
+ * @memberof DevConsole
35
+ */
36
+ factory(type: DevTool.ConsoleType, args: any[]): void;
37
+ /**
38
+ * DevTool 包装之后的 console.log 方法
39
+ *
40
+ * @param {...any[]} args
41
+ * @memberof DevConsole
42
+ */
43
+ log(...args: any[]): void;
44
+ /**
45
+ * DevTool 包装之后的 console.info 方法
46
+ *
47
+ * @param {...any[]} args
48
+ * @memberof DevConsole
49
+ */
50
+ info(...args: any[]): void;
51
+ /**
52
+ * DevTool 包装之后的 console.warn 方法
53
+ *
54
+ * @param {...any[]} args
55
+ * @memberof DevConsole
56
+ */
57
+ warn(...args: any[]): void;
58
+ /**
59
+ * DevTool 包装之后的 console.error 方法
60
+ *
61
+ * @param {...any[]} args
62
+ * @memberof DevConsole
63
+ */
64
+ error(...args: any[]): void;
65
+ /**
66
+ * DevTool 包装之后的 console.time 方法
67
+ *
68
+ * @param {string} label
69
+ * @memberof DevConsole
70
+ */
71
+ time(label: string): void;
72
+ /**
73
+ * DevTool 包装之后的 console.timeEnd 方法
74
+ *
75
+ * @param {string} label
76
+ * @memberof DevConsole
77
+ */
78
+ timeEnd(label: string): void;
79
+ /**
80
+ * DevTool 包装之后的 console.clear 方法
81
+ *
82
+ * @memberof DevConsole
83
+ */
84
+ clear(): void;
85
+ /**
86
+ * DevTool 包装之后的 console.count 方法
87
+ *
88
+ * @param {string} [label='']
89
+ * @memberof DevConsole
90
+ */
91
+ count(label?: string): void;
92
+ /**
93
+ * DevTool 包装之后的 console.countReset 方法
94
+ *
95
+ * @param {string} [label='']
96
+ * @memberof DevConsole
97
+ */
98
+ countReset(label?: string): void;
99
+ /**
100
+ * 原始 console.assert 方法
101
+ *
102
+ * @param {...any[]} args
103
+ * @memberof DevConsole
104
+ */
105
+ assert(...args: any[]): void;
106
+ /**
107
+ * 原始 console.debug 方法
108
+ *
109
+ * @param {...any[]} args
110
+ * @memberof DevConsole
111
+ */
112
+ debug(...args: any[]): void;
113
+ /**
114
+ * 原始 console.dir 方法
115
+ *
116
+ * @param {...any[]} args
117
+ * @memberof DevConsole
118
+ */
119
+ dir(...args: any[]): void;
120
+ /**
121
+ * 原始 console.dirxml 方法
122
+ *
123
+ * @param {...any[]} args
124
+ * @memberof DevConsole
125
+ */
126
+ dirxml(...args: any[]): void;
127
+ /**
128
+ * 原始 console.group 方法
129
+ *
130
+ * @param {...any[]} args
131
+ * @memberof DevConsole
132
+ */
133
+ group(...args: any[]): void;
134
+ /**
135
+ * 原始 console.groupCollapsed 方法
136
+ *
137
+ * @param {...any[]} args
138
+ * @memberof DevConsole
139
+ */
140
+ groupCollapsed(...args: any[]): void;
141
+ /**
142
+ * 原始 console.groupEnd 方法
143
+ *
144
+ * @memberof DevConsole
145
+ */
146
+ groupEnd(): void;
147
+ /**
148
+ * 原始 console.table 方法
149
+ *
150
+ * @param {...any[]} args
151
+ * @memberof DevConsole
152
+ */
153
+ table(...args: any[]): void;
154
+ /**
155
+ * 原始 console.timeStamp 方法
156
+ *
157
+ * @param {...any[]} args
158
+ * @memberof DevConsole
159
+ */
160
+ timeStamp(...args: any[]): void;
161
+ /**
162
+ * 原始 console.profile 方法
163
+ *
164
+ * @param {...any[]} args
165
+ * @memberof DevConsole
166
+ */
167
+ trace(...args: any[]): void;
168
+ }
169
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../dev/devConsole/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC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