vite-uni-dev-tool 0.0.48 → 1.0.0
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/README.md +20 -0
- package/dist/const.cjs +1 -0
- package/dist/const.d.ts +78 -161
- package/dist/const.d.ts.map +1 -1
- package/dist/const.js +1 -47
- package/dist/core-shared.d.ts +44 -0
- package/dist/core-shared.d.ts.map +1 -0
- package/dist/core-shared.js +1 -0
- package/dist/core.d.ts +2 -40
- package/dist/core.d.ts.map +1 -1
- package/dist/core.js +4 -159
- package/dist/i18n/index.cjs +1 -0
- package/dist/i18n/index.d.ts +9 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +1 -0
- package/dist/i18n/instance.cjs +1 -0
- package/dist/i18n/instance.d.ts +15 -0
- package/dist/i18n/instance.d.ts.map +1 -0
- package/dist/i18n/instance.js +1 -0
- package/dist/i18n/locales/en.cjs +1 -0
- package/dist/i18n/locales/en.d.ts +470 -0
- package/dist/i18n/locales/en.d.ts.map +1 -0
- package/dist/i18n/locales/en.js +1 -0
- package/dist/i18n/locales/zh-Hans.cjs +1 -0
- package/dist/i18n/locales/zh-Hans.d.ts +476 -0
- package/dist/i18n/locales/zh-Hans.d.ts.map +1 -0
- package/dist/i18n/locales/zh-Hans.js +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/modules/devConsole/index.cjs +4 -0
- package/dist/{devConsole → modules/devConsole}/index.d.ts +1 -1
- package/dist/modules/devConsole/index.d.ts.map +1 -0
- package/dist/modules/devConsole/index.js +4 -0
- package/dist/modules/devEvent/index.cjs +5 -0
- package/dist/modules/devEvent/index.d.ts +115 -0
- package/dist/modules/devEvent/index.d.ts.map +1 -0
- package/dist/modules/devEvent/index.js +5 -0
- package/dist/modules/devIntercept/index.cjs +13 -0
- package/dist/modules/devIntercept/index.d.ts +71 -0
- package/dist/modules/devIntercept/index.d.ts.map +1 -0
- package/dist/modules/devIntercept/index.js +13 -0
- package/dist/modules/devStore/index.cjs +1 -0
- package/dist/modules/devStore/index.d.ts +159 -0
- package/dist/modules/devStore/index.d.ts.map +1 -0
- package/dist/modules/devStore/index.js +1 -0
- package/dist/modules/devToolInfo/index.cjs +1 -0
- package/dist/modules/devToolInfo/index.d.ts +27 -0
- package/dist/modules/devToolInfo/index.d.ts.map +1 -0
- package/dist/modules/devToolInfo/index.js +1 -0
- package/dist/plugins/uniDevTool/transform/transformApp.cjs +44 -0
- package/dist/plugins/uniDevTool/transform/transformApp.d.ts.map +1 -1
- package/dist/plugins/uniDevTool/transform/transformApp.js +17 -17
- package/dist/plugins/uniDevTool/transform/transformMain.cjs +3 -0
- package/dist/plugins/uniDevTool/transform/transformMain.d.ts.map +1 -1
- package/dist/plugins/uniDevTool/transform/transformMain.js +3 -3
- package/dist/plugins/uniDevTool/transform/transformVue.cjs +41 -0
- package/dist/plugins/uniDevTool/transform/transformVue.d.ts +1 -2
- package/dist/plugins/uniDevTool/transform/transformVue.d.ts.map +1 -1
- package/dist/plugins/uniDevTool/transform/transformVue.js +32 -19
- package/dist/plugins/uniDevTool/uniDevTool.cjs +5 -0
- package/dist/plugins/uniDevTool/uniDevTool.d.ts +3 -11
- package/dist/plugins/uniDevTool/uniDevTool.d.ts.map +1 -1
- package/dist/plugins/uniDevTool/uniDevTool.js +3 -3
- package/dist/plugins/uniGlobalComponents/uniGlobalComponents.cjs +19 -0
- package/dist/plugins/uniGlobalComponents/uniGlobalComponents.d.ts.map +1 -1
- package/dist/plugins/uniGlobalComponents/uniGlobalComponents.js +11 -19
- package/dist/plugins/uniParseStock/index.d.ts +10 -0
- package/dist/plugins/uniParseStock/index.d.ts.map +1 -0
- package/dist/plugins/utils/index.cjs +2 -0
- package/dist/plugins/utils/index.d.ts +1 -3
- package/dist/plugins/utils/index.d.ts.map +1 -1
- package/dist/plugins/utils/index.js +2 -2
- package/dist/shims-uni.d.ts +140 -0
- package/dist/type.d.ts +174 -16
- package/dist/type.d.ts.map +1 -1
- package/dist/utils/array.cjs +1 -0
- package/dist/utils/array.d.ts.map +1 -1
- package/dist/utils/array.js +1 -12
- package/dist/utils/date.cjs +1 -0
- package/dist/utils/date.d.ts.map +1 -1
- package/dist/utils/date.js +1 -59
- package/dist/utils/file.cjs +1 -0
- package/dist/utils/file.d.ts.map +1 -1
- package/dist/utils/file.js +1 -85
- package/dist/utils/function.cjs +1 -0
- package/dist/utils/function.d.ts +13 -0
- package/dist/utils/function.d.ts.map +1 -1
- package/dist/utils/function.js +1 -68
- package/dist/utils/index.cjs +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -63
- package/dist/utils/ip.cjs +1 -0
- package/dist/utils/ip.d.ts +1 -1
- package/dist/utils/ip.d.ts.map +1 -1
- package/dist/utils/ip.js +1 -45
- package/dist/utils/language.cjs +1 -0
- package/dist/utils/language.d.ts +2 -1
- package/dist/utils/language.d.ts.map +1 -1
- package/dist/utils/language.js +1 -63
- package/dist/utils/object.cjs +1 -0
- package/dist/utils/object.d.ts +4 -5
- package/dist/utils/object.d.ts.map +1 -1
- package/dist/utils/object.js +1 -136
- package/dist/utils/openLink.cjs +1 -0
- package/dist/utils/openLink.d.ts.map +1 -1
- package/dist/utils/openLink.js +1 -28
- package/dist/utils/page.cjs +1 -0
- package/dist/utils/page.d.ts.map +1 -1
- package/dist/utils/page.js +1 -7
- package/dist/utils/platform.cjs +1 -0
- package/dist/utils/platform.d.ts.map +1 -1
- package/dist/utils/platform.js +1 -17
- package/dist/utils/string.cjs +1 -0
- package/dist/utils/string.d.ts.map +1 -1
- package/dist/utils/string.js +1 -114
- package/dist/utils/utils.cjs +1 -0
- package/dist/utils/utils.d.ts +1 -1
- package/dist/utils/utils.d.ts.map +1 -1
- package/dist/utils/utils.js +1 -126
- package/dist/v3/AppTransition/index.vue +170 -0
- package/dist/v3/AutoSizer/index.vue +4 -5
- package/dist/v3/AutoSizer/index1.vue +4 -6
- package/dist/v3/AutoSizer/utils.ts +1 -1
- package/dist/v3/CaptureScreen/index.vue +19 -8
- package/dist/v3/CircularButton/index.vue +64 -13
- package/dist/v3/ConsoleList/ConsoleItem.vue +56 -5
- package/dist/v3/ConsoleList/RunJSInput.vue +10 -6
- package/dist/v3/ConsoleList/index.vue +51 -35
- package/dist/v3/CustomSwiper/CustomSwiperItem.vue +49 -0
- package/dist/v3/CustomSwiper/index.vue +104 -0
- package/dist/v3/DevTool/fps-collector.render.ts +148 -0
- package/dist/v3/DevTool/index.vue +209 -102
- package/dist/v3/DevToolButton/index.vue +40 -59
- package/dist/v3/DevToolTitle/index.vue +4 -1
- package/dist/v3/DevToolWindow/DevToolOverlay.vue +182 -0
- package/dist/v3/DevToolWindow/const.ts +47 -69
- package/dist/v3/DevToolWindow/hooks/dataUtils.ts +48 -0
- package/dist/v3/DevToolWindow/hooks/useDevToolData.ts +338 -0
- package/dist/v3/DevToolWindow/hooks/useDevToolHandlers.ts +549 -0
- package/dist/v3/DevToolWindow/hooks/useDevToolOverlay.ts +184 -0
- package/dist/v3/DevToolWindow/index.css +89 -0
- package/dist/v3/DevToolWindow/index.vue +800 -1450
- package/dist/v3/DraggableContainer/index.vue +456 -0
- package/dist/v3/ElEvent/ElEventItem.vue +4 -3
- package/dist/v3/ElEvent/index.vue +26 -9
- package/dist/v3/Empty/index.vue +1 -0
- package/dist/v3/FilterInput/index.vue +8 -22
- package/dist/v3/FilterSelect/index.vue +37 -24
- package/dist/v3/Instance/components/InstanceTreeNode.vue +265 -0
- package/dist/v3/Instance/flatten.ts +226 -0
- package/dist/v3/Instance/index.vue +94 -0
- package/dist/v3/Instance/registry.ts +49 -0
- package/dist/v3/Instance/transformTree.ts +375 -0
- package/dist/v3/Instance/transformTreeCtx.ts +268 -0
- package/dist/v3/{InstanceTree → Instance}/typing.d.ts +15 -2
- package/dist/v3/InstanceDetail/index.vue +433 -44
- package/dist/v3/JsonDetail/index.vue +12 -8
- package/dist/v3/JsonPretty/components/Brackets/index.vue +1 -0
- package/dist/v3/JsonPretty/components/Carets/index.vue +2 -1
- package/dist/v3/JsonPretty/components/CheckController/index.vue +26 -15
- package/dist/v3/JsonPretty/components/TreeNode/index.vue +42 -20
- package/dist/v3/JsonPretty/index.vue +60 -37
- package/dist/v3/JsonPretty/utils/index.ts +41 -44
- package/dist/v3/MovableContainer/index.vue +89 -0
- package/dist/v3/NFCList/NFCItem.vue +14 -14
- package/dist/v3/NFCList/NFCTool.vue +99 -81
- package/dist/v3/NFCList/index.vue +14 -10
- package/dist/v3/NetworkList/InterceptConfig.vue +154 -364
- package/dist/v3/NetworkList/InterceptItem.vue +14 -6
- package/dist/v3/NetworkList/NetworkDetail.vue +34 -29
- package/dist/v3/NetworkList/NetworkIntercept.vue +11 -8
- package/dist/v3/NetworkList/NetworkItem.vue +27 -11
- package/dist/v3/NetworkList/NetworkSend.vue +132 -290
- package/dist/v3/NetworkList/hooks/useNetworkForm.ts +86 -0
- package/dist/v3/NetworkList/index.vue +32 -24
- package/dist/v3/NetworkList/utils.ts +101 -0
- package/dist/v3/Performance/index.vue +495 -0
- package/dist/v3/Performance/modules/PerformanceMetrics.vue +153 -0
- package/dist/v3/Performance/modules/PerformanceWidget.vue +249 -0
- package/dist/v3/Performance/modules/usePerformanceChart.ts +460 -0
- package/dist/v3/Performance/modules/usePerformanceData.ts +258 -0
- package/dist/v3/Pick/index.vue +322 -0
- package/dist/v3/PiniaList/index.vue +38 -17
- package/dist/v3/RouteList/index.vue +32 -15
- package/dist/v3/RunJS/index.vue +30 -10
- package/dist/v3/ScanCodeList/ScanCodeItem.vue +2 -9
- package/dist/v3/ScanCodeList/index.vue +12 -9
- package/dist/v3/SettingButton/index.vue +45 -0
- package/dist/v3/SettingList/index.css +120 -0
- package/dist/v3/SettingList/index.vue +96 -537
- package/dist/v3/SettingList/modules/SettingDevTool.vue +208 -0
- package/dist/v3/SettingList/modules/SettingInfo.vue +119 -0
- package/dist/v3/SettingList/modules/SettingLanguage.vue +74 -0
- package/dist/v3/SettingList/modules/SettingLog.vue +230 -0
- package/dist/v3/SettingList/modules/SettingNetwork.vue +120 -0
- package/dist/v3/SettingList/modules/SettingTheme.vue +312 -0
- package/dist/v3/SourceCode/Line.vue +15 -2
- package/dist/v3/SourceCode/index.vue +25 -24
- package/dist/v3/SourceCode/parseCode.ts +114 -56
- package/dist/v3/StorageList/index.vue +33 -33
- package/dist/v3/Tabs/index.vue +31 -28
- package/dist/v3/Tag/index.vue +39 -20
- package/dist/v3/TransferList/TransferDetail.vue +268 -0
- package/dist/v3/TransferList/TransferItem.vue +125 -0
- package/dist/v3/TransferList/index.vue +181 -0
- package/dist/v3/UniEvent/UniEventItem.vue +1 -0
- package/dist/v3/UniEvent/index.vue +28 -29
- package/dist/v3/{VirtualListPro → VirtualList}/AutoSize.vue +1 -1
- package/dist/v3/VirtualList/index.vue +382 -82
- package/dist/v3/VuexList/index.vue +38 -17
- package/dist/v3/WebSocket/WebSocketDetail.vue +142 -80
- package/dist/v3/WebSocket/WebSocketItem.vue +10 -4
- package/dist/v3/WebSocket/index.vue +44 -30
- package/dist/v3/hooks/useNFC/index.ts +6 -6
- package/dist/v3/hooks/useNFC/typing.d.ts +2 -2
- package/dist/v3/hooks/useNFC/useNFCAndroid.ts +215 -626
- package/dist/v3/hooks/useNFC/useNFCMpWeiXin.ts +54 -85
- package/dist/v3/hooks/useNFC/utils.ts +3 -3
- package/dist/v3/hooks/useRequest/index.ts +2 -2
- package/dist/v3/hooks/useScanCode/index.ts +10 -8
- package/dist/v3/styles/theme.css +290 -0
- package/dist/v3/styles/theme.ts +12 -0
- package/package.json +25 -5
- package/dist/devConsole/index.d.ts.map +0 -1
- package/dist/devConsole/index.js +0 -273
- package/dist/devEvent/index.d.ts +0 -328
- package/dist/devEvent/index.d.ts.map +0 -1
- package/dist/devEvent/index.js +0 -697
- package/dist/devEventBus/index.d.ts +0 -42
- package/dist/devEventBus/index.d.ts.map +0 -1
- package/dist/devEventBus/index.js +0 -70
- package/dist/devIntercept/index.d.ts +0 -281
- package/dist/devIntercept/index.d.ts.map +0 -1
- package/dist/devIntercept/index.js +0 -949
- package/dist/devRunJS/index.d.ts +0 -67
- package/dist/devRunJS/index.d.ts.map +0 -1
- package/dist/devStore/index.d.ts +0 -199
- package/dist/devStore/index.d.ts.map +0 -1
- package/dist/devStore/index.js +0 -562
- package/dist/devToolInfo/index.d.ts +0 -17
- package/dist/devToolInfo/index.d.ts.map +0 -1
- package/dist/devToolInfo/index.js +0 -15
- package/dist/v3/AutoSizer/utils.d.ts +0 -5
- package/dist/v3/AutoSizer/utils.d.ts.map +0 -1
- package/dist/v3/ConsoleList/staticTips.d.ts +0 -13
- package/dist/v3/ConsoleList/staticTips.d.ts.map +0 -1
- package/dist/v3/DevToolWindow/const.d.ts +0 -46
- package/dist/v3/DevToolWindow/const.d.ts.map +0 -1
- package/dist/v3/InstanceTree/components/InstanceTreeNode.vue +0 -81
- package/dist/v3/InstanceTree/flatten.d.ts +0 -10
- package/dist/v3/InstanceTree/flatten.d.ts.map +0 -1
- package/dist/v3/InstanceTree/flatten.ts +0 -75
- package/dist/v3/InstanceTree/index.vue +0 -51
- package/dist/v3/InstanceTree/transformTree.d.ts +0 -17
- package/dist/v3/InstanceTree/transformTree.d.ts.map +0 -1
- package/dist/v3/InstanceTree/transformTree.ts +0 -237
- package/dist/v3/JsonPretty/hooks/useClipboard.d.ts +0 -4
- package/dist/v3/JsonPretty/hooks/useClipboard.d.ts.map +0 -1
- package/dist/v3/JsonPretty/hooks/useError.d.ts +0 -8
- package/dist/v3/JsonPretty/hooks/useError.d.ts.map +0 -1
- package/dist/v3/JsonPretty/type.d.ts +0 -94
- package/dist/v3/JsonPretty/type.d.ts.map +0 -1
- package/dist/v3/JsonPretty/utils/index.d.ts +0 -10
- package/dist/v3/JsonPretty/utils/index.d.ts.map +0 -1
- package/dist/v3/NFCList/const.d.ts +0 -13
- package/dist/v3/NFCList/const.d.ts.map +0 -1
- package/dist/v3/NetworkList/const.d.ts +0 -5
- package/dist/v3/NetworkList/const.d.ts.map +0 -1
- package/dist/v3/SourceCode/parseCode.d.ts +0 -27
- package/dist/v3/SourceCode/parseCode.d.ts.map +0 -1
- package/dist/v3/UploadList/UploadDetail.vue +0 -255
- package/dist/v3/UploadList/UploadItem.vue +0 -122
- package/dist/v3/UploadList/index.vue +0 -125
- package/dist/v3/VirtualListPro/index.vue +0 -229
- package/dist/v3/hooks/useContainerStyle.d.ts +0 -15
- package/dist/v3/hooks/useContainerStyle.d.ts.map +0 -1
- package/dist/v3/hooks/useNFC/index.d.ts +0 -5
- package/dist/v3/hooks/useNFC/index.d.ts.map +0 -1
- package/dist/v3/hooks/useNFC/useNFCAndroid.d.ts +0 -2
- package/dist/v3/hooks/useNFC/useNFCAndroid.d.ts.map +0 -1
- package/dist/v3/hooks/useNFC/useNFCMpWeiXin.d.ts +0 -2
- package/dist/v3/hooks/useNFC/useNFCMpWeiXin.d.ts.map +0 -1
- package/dist/v3/hooks/useNFC/utils.d.ts +0 -95
- package/dist/v3/hooks/useNFC/utils.d.ts.map +0 -1
- package/dist/v3/hooks/useRequest/index.d.ts +0 -126
- package/dist/v3/hooks/useRequest/index.d.ts.map +0 -1
- package/dist/v3/hooks/useRequest/utils.d.ts +0 -35
- package/dist/v3/hooks/useRequest/utils.d.ts.map +0 -1
- package/dist/v3/hooks/useScanCode/index.d.ts +0 -36
- package/dist/v3/hooks/useScanCode/index.d.ts.map +0 -1
- /package/dist/v3/{VirtualListPro → VirtualList}/readme.md +0 -0
package/dist/devStore/index.js
DELETED
|
@@ -1,562 +0,0 @@
|
|
|
1
|
-
import { DEV_TOOL_INFO as S } from "../const.js";
|
|
2
|
-
import "../utils/index.js";
|
|
3
|
-
import { setDevToolInfo as T, getDevToolInfo as k } from "../devToolInfo/index.js";
|
|
4
|
-
import { isBoolean as M, isNil as m, isNumber as g } from "../utils/language.js";
|
|
5
|
-
import { getWifiIp as E, getLanIp as I, getMicroAppIp as y } from "../utils/ip.js";
|
|
6
|
-
import { setValueByPath as D } from "../utils/object.js";
|
|
7
|
-
import { hasUrl as C, splitStrByUrl as z } from "../utils/string.js";
|
|
8
|
-
class $ {
|
|
9
|
-
constructor() {
|
|
10
|
-
this.state = {
|
|
11
|
-
consoleList: [],
|
|
12
|
-
networkList: [],
|
|
13
|
-
storageList: [],
|
|
14
|
-
routeList: [],
|
|
15
|
-
vuexList: {},
|
|
16
|
-
piniaList: {},
|
|
17
|
-
wsList: [],
|
|
18
|
-
netWorkStatus: {},
|
|
19
|
-
uploadList: [],
|
|
20
|
-
elEventList: [],
|
|
21
|
-
uniEventList: [],
|
|
22
|
-
eventCount: {
|
|
23
|
-
on: 0,
|
|
24
|
-
once: 0,
|
|
25
|
-
emit: 0,
|
|
26
|
-
off: 0
|
|
27
|
-
},
|
|
28
|
-
screenList: [],
|
|
29
|
-
interceptNetworkMap: /* @__PURE__ */ new Map(),
|
|
30
|
-
scanCodeList: [],
|
|
31
|
-
nfcList: []
|
|
32
|
-
}, this.uploadMaxSize = 1e3, this.consoleMaxSize = 1e3, this.networkMaxSize = 1e3, this.wsDataMaxSize = 1e3, this.elEventListMaxSize = 1e3, this.uniEventListMaxSize = 1e3, this.screenMaxSize = 1e3, this.scanCodeListMaxSize = 1e3, this.nfcListMaxSize = 1e3, this.zIndex = 998, this.cacheMaxSize = 8 * 1024 * 1024 * 10, this.uploadTaskMap = /* @__PURE__ */ new Map(), this.requestIndex = -1, this.uploadIndex = -1, this.screenIndex = -1, this.devToolVisible = !1, this.devToolDestroy = !1, this.cacheInterceptConfig = !0, this.devToolVersion = "0.0.0", this.devToolBuildTime = "", this.devToolGit = "", this.prePath = "", this.captureList = [];
|
|
33
|
-
const {
|
|
34
|
-
devToolDestroy: t = !1,
|
|
35
|
-
devToolButtonVisible: e = !1,
|
|
36
|
-
cacheInterceptConfig: s = !0,
|
|
37
|
-
interceptNetworkList: i = []
|
|
38
|
-
} = uni.getStorageSync(S);
|
|
39
|
-
this.devToolDestroy = t, this.devToolVisible = e, this.cacheInterceptConfig = s, this.updateInterceptNetworkList(i);
|
|
40
|
-
}
|
|
41
|
-
updateHasUpload() {
|
|
42
|
-
var t, e, s, i, o, a;
|
|
43
|
-
this.state.consoleList = (t = this.state.consoleList) == null ? void 0 : t.map((r) => ({
|
|
44
|
-
...r,
|
|
45
|
-
hasUpload: !0
|
|
46
|
-
})), this.state.networkList = (e = this.state.networkList) == null ? void 0 : e.map((r) => ({
|
|
47
|
-
...r,
|
|
48
|
-
hasUpload: !0
|
|
49
|
-
})), this.state.uploadList = (s = this.state.uploadList) == null ? void 0 : s.map((r) => ({
|
|
50
|
-
...r,
|
|
51
|
-
hasUpload: !0
|
|
52
|
-
})), this.state.elEventList = (i = this.state.elEventList) == null ? void 0 : i.map((r) => ({
|
|
53
|
-
...r,
|
|
54
|
-
hasUpload: !0
|
|
55
|
-
})), this.state.uniEventList = (o = this.state.uniEventList) == null ? void 0 : o.map((r) => ({
|
|
56
|
-
...r,
|
|
57
|
-
hasUpload: !0
|
|
58
|
-
})), this.state.screenList = (a = this.state.screenList) == null ? void 0 : a.map((r) => ({
|
|
59
|
-
...r,
|
|
60
|
-
hasUpload: !0
|
|
61
|
-
}));
|
|
62
|
-
}
|
|
63
|
-
setDevToolVisible(t) {
|
|
64
|
-
this.devToolVisible = t, T({
|
|
65
|
-
devToolButtonVisible: t
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
getDevToolVisible() {
|
|
69
|
-
return this.devToolVisible;
|
|
70
|
-
}
|
|
71
|
-
setWindowInfo(t) {
|
|
72
|
-
this.state.windowInfo = t;
|
|
73
|
-
}
|
|
74
|
-
setDeviceInfo(t) {
|
|
75
|
-
this.state.deviceInfo = t;
|
|
76
|
-
}
|
|
77
|
-
setSystemInfo(t) {
|
|
78
|
-
this.state.systemInfo = t;
|
|
79
|
-
}
|
|
80
|
-
setNetWorkStatus(t) {
|
|
81
|
-
this.state.netWorkStatus = t;
|
|
82
|
-
}
|
|
83
|
-
setVuexStore(t) {
|
|
84
|
-
this.vuexStore = t;
|
|
85
|
-
}
|
|
86
|
-
setVuexList(t) {
|
|
87
|
-
this.state.vuexList = t;
|
|
88
|
-
}
|
|
89
|
-
setPiniaList(t) {
|
|
90
|
-
this.state.piniaList = {
|
|
91
|
-
...this.state.piniaList || {},
|
|
92
|
-
...t
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
setRequestIndex(t) {
|
|
96
|
-
return this.requestIndex = t, this.requestIndex;
|
|
97
|
-
}
|
|
98
|
-
getDevToolOptions() {
|
|
99
|
-
return this.devToolOptions;
|
|
100
|
-
}
|
|
101
|
-
getRequestIndex() {
|
|
102
|
-
return this.requestIndex;
|
|
103
|
-
}
|
|
104
|
-
setUploadIndex(t) {
|
|
105
|
-
return this.uploadIndex = t, this.uploadIndex;
|
|
106
|
-
}
|
|
107
|
-
getUploadIndex() {
|
|
108
|
-
return this.uploadIndex;
|
|
109
|
-
}
|
|
110
|
-
setScreenIndex(t) {
|
|
111
|
-
return this.screenIndex = t, this.screenIndex;
|
|
112
|
-
}
|
|
113
|
-
getScreenIndex() {
|
|
114
|
-
return this.screenIndex;
|
|
115
|
-
}
|
|
116
|
-
setCaptureList(t) {
|
|
117
|
-
this.captureList = t;
|
|
118
|
-
}
|
|
119
|
-
getCaptureList() {
|
|
120
|
-
return this.captureList;
|
|
121
|
-
}
|
|
122
|
-
setDevToolOptions(t) {
|
|
123
|
-
var i, o, a;
|
|
124
|
-
this.devToolOptions = t, this.uploadMaxSize = t.uploadMaxSize || 1e3, this.consoleMaxSize = t.consoleMaxSize || 1e3, this.networkMaxSize = t.networkMaxSize || 1e3, this.wsDataMaxSize = t.wsDataMaxSize || 1e3, this.cacheMaxSize = t.cacheMaxSize || 8 * 1024 * 1024 * 10, this.elEventListMaxSize = t.elEventListMaxSize || 1e3, this.uniEventListMaxSize = t.uniEventListMaxSize || 1e3, this.screenMaxSize = t.screenMaxSize || 1e3, this.scanCodeListMaxSize = t.scanCodeListMaxSize || 1e3, this.nfcListMaxSize = t.nfcListMaxSize || 1e3, this.zIndex = t.zIndex || 998, this.devToolVersion = t.devToolVersion ?? "0.0.0", this.devToolBuildTime = t.devToolBuildTime ?? "", this.devToolGit = t.devToolGit ?? "", this.setCaptureList(t.captureList ?? []);
|
|
125
|
-
const { devToolButtonVisible: e } = k();
|
|
126
|
-
this.devToolVisible = M(e) ? e : t.initShowDevTool ?? !0, this.setDevToolVisible(this.devToolVisible), this.setDevToolDestroy(!this.devToolVisible);
|
|
127
|
-
const s = ((i = t.pagesJson) == null ? void 0 : i.pages.map((r) => {
|
|
128
|
-
var n, h, c;
|
|
129
|
-
const u = (c = (h = (n = t.pagesJson) == null ? void 0 : n.tabBar) == null ? void 0 : h.list) == null ? void 0 : c.some(
|
|
130
|
-
(d) => d.pagePath === r.path
|
|
131
|
-
);
|
|
132
|
-
return {
|
|
133
|
-
...r,
|
|
134
|
-
type: u ? "nav" : "main"
|
|
135
|
-
};
|
|
136
|
-
})) ?? [];
|
|
137
|
-
(a = (o = t.pagesJson) == null ? void 0 : o.subPackages) == null || a.forEach((r) => {
|
|
138
|
-
r.pages.forEach((u) => {
|
|
139
|
-
const n = {
|
|
140
|
-
...u,
|
|
141
|
-
path: `${r.root}/${u.path}`,
|
|
142
|
-
type: "sub",
|
|
143
|
-
uvList: []
|
|
144
|
-
};
|
|
145
|
-
s.push(n);
|
|
146
|
-
});
|
|
147
|
-
}), this.setRouteList(s);
|
|
148
|
-
}
|
|
149
|
-
async getDevData() {
|
|
150
|
-
const t = await uni.getNetworkType(), e = E() || I() || await y();
|
|
151
|
-
return this.refreshStore(), {
|
|
152
|
-
...this.state,
|
|
153
|
-
devToolVisible: this.getDevToolVisible(),
|
|
154
|
-
netWorkStatus: {
|
|
155
|
-
ip: e,
|
|
156
|
-
...t,
|
|
157
|
-
isConnected: t.networkType !== "none"
|
|
158
|
-
},
|
|
159
|
-
cacheInterceptConfig: this.cacheInterceptConfig,
|
|
160
|
-
devToolVersion: this.devToolVersion,
|
|
161
|
-
devToolBuildTime: this.devToolBuildTime,
|
|
162
|
-
devToolGit: this.devToolGit
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
updateStore(t) {
|
|
166
|
-
var o;
|
|
167
|
-
const { key: e, _oldKey: s, value: i } = t;
|
|
168
|
-
return s === e && (uni.removeStorageSync(s), this.state.storageList = (o = this.state.storageList) == null ? void 0 : o.filter(
|
|
169
|
-
(a) => a.key === s
|
|
170
|
-
)), uni.setStorageSync(e, i), this.state.storageList;
|
|
171
|
-
}
|
|
172
|
-
updateVuexStore(t) {
|
|
173
|
-
var e, s;
|
|
174
|
-
try {
|
|
175
|
-
Object.assign(((e = this.vuexStore) == null ? void 0 : e.state) ?? {}, t);
|
|
176
|
-
} catch (i) {
|
|
177
|
-
console.error("[DevTool] updateVuexStore error", i);
|
|
178
|
-
}
|
|
179
|
-
return this.setVuexList({
|
|
180
|
-
...((s = this.vuexStore) == null ? void 0 : s.state) ?? {}
|
|
181
|
-
}), this.state.vuexList;
|
|
182
|
-
}
|
|
183
|
-
setPiniaStore(t) {
|
|
184
|
-
this.piniaStore = t;
|
|
185
|
-
}
|
|
186
|
-
updatePiniaStore(t) {
|
|
187
|
-
try {
|
|
188
|
-
if (!this.piniaStore)
|
|
189
|
-
return console.error("[DevTool] updatePiniaStore piniaStore is undefined"), {};
|
|
190
|
-
const [e, s] = Object.entries(t)[0];
|
|
191
|
-
if (m(e))
|
|
192
|
-
return console.error("[DevTool] updatePiniaStore key is undefined or null"), {};
|
|
193
|
-
D(this.piniaStore.state.value, e, s), this.setPiniaList({
|
|
194
|
-
...this.piniaStore.state.value ?? {}
|
|
195
|
-
});
|
|
196
|
-
} catch (e) {
|
|
197
|
-
console.error("[DevTool] updatePiniaStore error", e);
|
|
198
|
-
}
|
|
199
|
-
return this.state.piniaList ?? {};
|
|
200
|
-
}
|
|
201
|
-
getExportData(t) {
|
|
202
|
-
const e = {};
|
|
203
|
-
return t.exportLog && (e.consoleList = this.state.consoleList), t.exportNetwork && (e.networkList = this.state.networkList), t.exportStorage && (e.storageList = this.state.storageList, e.vuexList = this.state.vuexList, e.piniaList = this.state.piniaList), t.exportUpload && (e.uploadList = this.state.uploadList), t.exportWebSocket && (e.wsList = this.state.wsList), t.exportWindow && (uni.getWindowInfo ? e.windowInfo = uni.getWindowInfo() : e.windowInfo = {
|
|
204
|
-
errMsg: "当前平台不支持 uni.getWindowInfo()"
|
|
205
|
-
}), t.exportDevice && (uni.getDeviceInfo ? e.deviceInfo = uni.getDeviceInfo() : e.deviceInfo = {
|
|
206
|
-
errMsg: "当前平台不支持 uni.getDeviceInfo()"
|
|
207
|
-
}), t.exportSystem && (uni.getSystemInfo ? e.systemInfo = uni.getSystemInfo() : e.systemInfo = {
|
|
208
|
-
errMsg: "当前平台不支持 uni.getSystemInfoo()"
|
|
209
|
-
}), t.exportUniEvent && (e.uniEventList = this.state.uniEventList), t.exportElEvent && (e.elEventList = this.state.elEventList), t.exportScanCodeList && (e.scanCodeList = this.state.scanCodeList), t.exportNfcList && (e.nfcList = this.state.nfcList), e;
|
|
210
|
-
}
|
|
211
|
-
clearConsoleList() {
|
|
212
|
-
this.state.consoleList = [];
|
|
213
|
-
}
|
|
214
|
-
clearDevCache() {
|
|
215
|
-
this.state.consoleList = [], this.state.networkList = [], this.state.wsList = [], this.state.uploadList = [], this.state.elEventList = [], this.state.uniEventList = [], this.state.scanCodeList = [], this.state.nfcList = [], this.state.eventCount = {
|
|
216
|
-
on: 0,
|
|
217
|
-
once: 0,
|
|
218
|
-
emit: 0,
|
|
219
|
-
off: 0
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
clearAll() {
|
|
223
|
-
this.state.consoleList = [], this.state.networkList = [], this.state.storageList = [], this.state.routeList = [], this.state.wsList = [], this.state.uploadList = [], this.state.vuexList = {}, this.state.piniaList = {}, this.state.netWorkStatus = {}, this.state.elEventList = [], this.state.uniEventList = [], this.state.scanCodeList = [], this.state.nfcList = [], this.state.eventCount = {
|
|
224
|
-
on: 0,
|
|
225
|
-
once: 0,
|
|
226
|
-
emit: 0,
|
|
227
|
-
off: 0
|
|
228
|
-
}, this.state.screenList = [], this.state.interceptNetworkMap = /* @__PURE__ */ new Map();
|
|
229
|
-
}
|
|
230
|
-
addUploadTask(t, e) {
|
|
231
|
-
this.uploadTaskMap.set(t, e);
|
|
232
|
-
}
|
|
233
|
-
removeUploadTask(t) {
|
|
234
|
-
this.uploadTaskMap.delete(t);
|
|
235
|
-
}
|
|
236
|
-
clearUploadTask() {
|
|
237
|
-
this.uploadTaskMap.clear();
|
|
238
|
-
}
|
|
239
|
-
clearWsList() {
|
|
240
|
-
this.state.wsList = [];
|
|
241
|
-
}
|
|
242
|
-
updateWsList(t) {
|
|
243
|
-
var s, i, o, a, r, u;
|
|
244
|
-
if (!this.getDevToolVisible())
|
|
245
|
-
return [];
|
|
246
|
-
const e = ((i = (s = this.state) == null ? void 0 : s.wsList) == null ? void 0 : i.findIndex((n) => n.url === t.url)) ?? -1;
|
|
247
|
-
if (e > -1) {
|
|
248
|
-
if ((o = this.state.wsList) != null && o[e]) {
|
|
249
|
-
const n = this.state.wsList[e];
|
|
250
|
-
n.headers = t.headers ?? n.headers, n.readyState = t.readyState ?? n.readyState, n.method = t.method ?? n.method, n.protocols = t.protocols ?? n.protocols, n.message = [
|
|
251
|
-
...this.state.wsList[e].message ?? [],
|
|
252
|
-
...t.message ?? []
|
|
253
|
-
];
|
|
254
|
-
const h = this.wsDataMaxSize, c = ((a = n == null ? void 0 : n.message) == null ? void 0 : a.length) ?? 0;
|
|
255
|
-
Array.isArray(n == null ? void 0 : n.message) && c > h && ((r = n == null ? void 0 : n.message) == null || r.splice(0, c - h));
|
|
256
|
-
}
|
|
257
|
-
} else
|
|
258
|
-
(u = this.state.wsList) == null || u.push(t);
|
|
259
|
-
return this.state.wsList;
|
|
260
|
-
}
|
|
261
|
-
clearWsMessage(t) {
|
|
262
|
-
var s, i, o;
|
|
263
|
-
const e = ((i = (s = this.state) == null ? void 0 : s.wsList) == null ? void 0 : i.findIndex((a) => a.url === t)) ?? -1;
|
|
264
|
-
e !== -1 && (o = this.state.wsList) != null && o[e] && (this.state.wsList[e].message = []);
|
|
265
|
-
}
|
|
266
|
-
clearStorageList(t) {
|
|
267
|
-
return this.state.storageList = [], t && uni.clearStorage(), this.state.storageList;
|
|
268
|
-
}
|
|
269
|
-
setStorageList(t) {
|
|
270
|
-
if (this.getDevToolVisible())
|
|
271
|
-
return this.state.storageList = t, this.state.storageList;
|
|
272
|
-
}
|
|
273
|
-
removeStorage(t, e) {
|
|
274
|
-
var s;
|
|
275
|
-
return this.state.storageList = ((s = this.state.storageList) == null ? void 0 : s.filter((i) => i.key !== t)) ?? [], e && uni.removeStorageSync(t), this.state.storageList;
|
|
276
|
-
}
|
|
277
|
-
addStorage(t, e) {
|
|
278
|
-
var o;
|
|
279
|
-
const { key: s, value: i } = t;
|
|
280
|
-
return (o = this.state.storageList) == null || o.unshift({
|
|
281
|
-
key: s,
|
|
282
|
-
_oldKey: s,
|
|
283
|
-
value: i
|
|
284
|
-
}), e && uni.setStorageSync(s, i), this.state.storageList;
|
|
285
|
-
}
|
|
286
|
-
refreshStore() {
|
|
287
|
-
const { keys: t } = uni.getStorageInfoSync();
|
|
288
|
-
return this.state.storageList = t.map((e) => {
|
|
289
|
-
const s = uni.getStorageSync(e);
|
|
290
|
-
return {
|
|
291
|
-
key: e,
|
|
292
|
-
_oldKey: e,
|
|
293
|
-
value: s
|
|
294
|
-
};
|
|
295
|
-
}), this.state.storageList;
|
|
296
|
-
}
|
|
297
|
-
updateStoreList(t) {
|
|
298
|
-
var i, o, a;
|
|
299
|
-
const e = t[0], s = ((i = this.state.storageList) == null ? void 0 : i.findIndex((r) => r.key === e._oldKey)) ?? -1;
|
|
300
|
-
return s > -1 && t.length === 1 ? (o = this.state.storageList) != null && o[s] && (this.state.storageList[s] = t[0]) : (a = this.state.storageList) == null || a.push(...t), this.state.storageList;
|
|
301
|
-
}
|
|
302
|
-
setRouteList(t, e) {
|
|
303
|
-
var i;
|
|
304
|
-
if (!this.getDevToolVisible())
|
|
305
|
-
return;
|
|
306
|
-
const s = e || ((i = t == null ? void 0 : t[0]) == null ? void 0 : i.path) || "";
|
|
307
|
-
return this.state.routeList = t.map((o, a) => ({
|
|
308
|
-
...o,
|
|
309
|
-
name: o.style.navigationBarTitleText || "无名",
|
|
310
|
-
uvList: [],
|
|
311
|
-
index: o.path === s && a === 0 ? 4 : o.path === s ? 3 : a === 0 ? 2 : 1
|
|
312
|
-
})), this.state.routeList;
|
|
313
|
-
}
|
|
314
|
-
getRouteList() {
|
|
315
|
-
return this.state.routeList;
|
|
316
|
-
}
|
|
317
|
-
updateRouteList(t) {
|
|
318
|
-
var r, u, n;
|
|
319
|
-
const e = t ? t === "/" ? this.getCurrentPagePath() : t : this.getCurrentPagePath(), s = this.prePath;
|
|
320
|
-
this.state.routeList = ((r = this.state.routeList) == null ? void 0 : r.map((h, c) => ({
|
|
321
|
-
...h,
|
|
322
|
-
index: h.path === e && c === 0 ? 4 : h.path === e ? 3 : c === 0 ? 2 : 1
|
|
323
|
-
}))) ?? [];
|
|
324
|
-
function i(h, c, d) {
|
|
325
|
-
if (!(h != null && h[c]))
|
|
326
|
-
return;
|
|
327
|
-
h[c].uvList || (h[c].uvList = []);
|
|
328
|
-
const l = h[c], L = l.uvList ?? [];
|
|
329
|
-
if (L != null && L.length) {
|
|
330
|
-
const p = L.length - 1, v = L[p];
|
|
331
|
-
if (v && (v != null && v.inTime) && !v.outTime) {
|
|
332
|
-
const f = Date.now();
|
|
333
|
-
l.outTime = f, L[p].outTime = f, L[p].duration = f - v.inTime, l.duration = L[p].duration, l.totalDuration = L.reduce((x, w) => x + (w.duration || 0), 0), d && (l.visitTimes = L.length);
|
|
334
|
-
} else {
|
|
335
|
-
const f = Date.now();
|
|
336
|
-
l.inTime = f, l.outTime = 0, l.duration = 0, l.uvList || (l.uvList = []), l.uvList.push({
|
|
337
|
-
index: p + 1,
|
|
338
|
-
inTime: f,
|
|
339
|
-
outTime: 0,
|
|
340
|
-
duration: 0
|
|
341
|
-
}), d && (l.visitTimes = l.uvList.length);
|
|
342
|
-
}
|
|
343
|
-
} else {
|
|
344
|
-
const p = Date.now();
|
|
345
|
-
l.inTime = p, l.outTime = 0, l.duration = 0, l.totalDuration = 0, l.visitTimes = 1, l.uvList = [
|
|
346
|
-
{
|
|
347
|
-
index: 0,
|
|
348
|
-
inTime: p,
|
|
349
|
-
outTime: 0,
|
|
350
|
-
duration: 0
|
|
351
|
-
}
|
|
352
|
-
];
|
|
353
|
-
}
|
|
354
|
-
return h;
|
|
355
|
-
}
|
|
356
|
-
const o = ((u = this.state.routeList) == null ? void 0 : u.findIndex((h) => h.path === s)) ?? -1, a = ((n = this.state.routeList) == null ? void 0 : n.findIndex((h) => h.path === e)) ?? -1;
|
|
357
|
-
if (!(o === -1 && a === -1))
|
|
358
|
-
return o === -1 && a > -1 ? this.state.routeList = i(
|
|
359
|
-
[...this.state.routeList ?? []],
|
|
360
|
-
a,
|
|
361
|
-
!0
|
|
362
|
-
) : (this.state.routeList = i(
|
|
363
|
-
[...this.state.routeList ?? []],
|
|
364
|
-
o
|
|
365
|
-
), this.state.routeList = i(
|
|
366
|
-
[...this.state.routeList ?? []],
|
|
367
|
-
a,
|
|
368
|
-
!0
|
|
369
|
-
)), this.prePath = e, this.state.routeList;
|
|
370
|
-
}
|
|
371
|
-
setConsoleList(t) {
|
|
372
|
-
var e, s;
|
|
373
|
-
this.getDevToolVisible() && ((((s = (e = this.state) == null ? void 0 : e.consoleList) == null ? void 0 : s.length) ?? 0) + t.length > this.consoleMaxSize && (this.state.consoleList = []), this.state.consoleList = t);
|
|
374
|
-
}
|
|
375
|
-
updateConsoleList(t, e) {
|
|
376
|
-
var s, i, o, a, r, u, n;
|
|
377
|
-
if (this.getDevToolVisible())
|
|
378
|
-
return g(e) && e > -1 && t.length === 1 ? (s = this.state.consoleList) != null && s[e] && (this.state.consoleList[e] = t[0]) : ((((o = (i = this.state) == null ? void 0 : i.consoleList) == null ? void 0 : o.length) ?? 0) + t.length > this.cacheMaxSize && ((a = this.state.consoleList) == null || a.splice(
|
|
379
|
-
0,
|
|
380
|
-
this.state.consoleList.length - this.cacheMaxSize - t.length
|
|
381
|
-
)), (u = (r = this.state) == null ? void 0 : r.consoleList) == null || u.push(...t)), this.state.consoleList = (n = this.state.consoleList) == null ? void 0 : n.map((h) => {
|
|
382
|
-
const c = h.args.reduce((d, l) => {
|
|
383
|
-
if (l.type === "string" && C(l.value)) {
|
|
384
|
-
const L = z(l.value);
|
|
385
|
-
return [...d, ...L];
|
|
386
|
-
}
|
|
387
|
-
return [...d, l];
|
|
388
|
-
}, []);
|
|
389
|
-
return {
|
|
390
|
-
...h,
|
|
391
|
-
args: c
|
|
392
|
-
};
|
|
393
|
-
}), this.state.consoleList;
|
|
394
|
-
}
|
|
395
|
-
clearNetworkList() {
|
|
396
|
-
this.state.networkList = [];
|
|
397
|
-
}
|
|
398
|
-
setNetworkList(t) {
|
|
399
|
-
var e, s;
|
|
400
|
-
this.getDevToolVisible() && ((((s = (e = this.state) == null ? void 0 : e.networkList) == null ? void 0 : s.length) ?? 0) + t.length > this.networkMaxSize && (this.state.networkList = []), this.state.networkList = t);
|
|
401
|
-
}
|
|
402
|
-
updateNetworkList(t, e) {
|
|
403
|
-
var s, i, o, a, r, u, n;
|
|
404
|
-
if (g(e) && e > -1)
|
|
405
|
-
(i = (s = this.state) == null ? void 0 : s.networkList) != null && i[e] && (this.state.networkList[e] = t[0]);
|
|
406
|
-
else {
|
|
407
|
-
const h = this.networkMaxSize, c = ((a = (o = this.state) == null ? void 0 : o.networkList) == null ? void 0 : a.length) ?? 0;
|
|
408
|
-
c + t.length > h && ((r = this.state.networkList) == null || r.splice(0, c - h - t.length)), (n = (u = this.state) == null ? void 0 : u.networkList) == null || n.push(...t);
|
|
409
|
-
}
|
|
410
|
-
return this.state.networkList;
|
|
411
|
-
}
|
|
412
|
-
updateUploadList(t, e) {
|
|
413
|
-
var s, i, o, a, r;
|
|
414
|
-
if (g(e) && e > -1 && t.length === 1)
|
|
415
|
-
if ((s = this.state.uploadList) != null && s[e])
|
|
416
|
-
this.state.uploadList[e] = {
|
|
417
|
-
...this.state.uploadList[e],
|
|
418
|
-
...t[0]
|
|
419
|
-
};
|
|
420
|
-
else {
|
|
421
|
-
const u = this.uploadMaxSize, n = ((o = (i = this.state) == null ? void 0 : i.uploadList) == null ? void 0 : o.length) ?? 0;
|
|
422
|
-
n + t.length > u && ((a = this.state.uploadList) == null || a.splice(0, n - u - t.length)), (r = this.state.uploadList) == null || r.push(t[0]);
|
|
423
|
-
}
|
|
424
|
-
return this.state.uploadList;
|
|
425
|
-
}
|
|
426
|
-
clearUploadList() {
|
|
427
|
-
this.state.uploadList = [];
|
|
428
|
-
}
|
|
429
|
-
setDevToolDestroy(t) {
|
|
430
|
-
this.devToolDestroy = t, T({
|
|
431
|
-
devToolDestroy: t
|
|
432
|
-
});
|
|
433
|
-
}
|
|
434
|
-
getDevToolDestroy() {
|
|
435
|
-
const { devToolDestroy: t = !1 } = uni.getStorageSync(S);
|
|
436
|
-
return this.devToolDestroy ?? t;
|
|
437
|
-
}
|
|
438
|
-
getCurrentPagePath() {
|
|
439
|
-
var s, i, o;
|
|
440
|
-
let t = getCurrentPages(), e = t == null ? void 0 : t[t.length - 1];
|
|
441
|
-
return e && e.route ? e.route : ((o = (i = (s = this.state) == null ? void 0 : s.routeList) == null ? void 0 : i[0]) == null ? void 0 : o.path) ?? "";
|
|
442
|
-
}
|
|
443
|
-
/**
|
|
444
|
-
* 新增节点事件
|
|
445
|
-
*
|
|
446
|
-
* @param {DevTool.ElEventItem} event
|
|
447
|
-
* @memberof DevStore
|
|
448
|
-
*/
|
|
449
|
-
addElEvent(t) {
|
|
450
|
-
var i, o;
|
|
451
|
-
this.state.elEventList || (this.state.elEventList = []);
|
|
452
|
-
const e = ((i = this.state.elEventList) == null ? void 0 : i.length) ?? 0, s = this.elEventListMaxSize;
|
|
453
|
-
e > s && this.state.elEventList.splice(0, e - s), (o = this.state.elEventList) == null || o.push(t), this.state.elEventList = this.state.elEventList.sort((a, r) => a.timer - r.timer);
|
|
454
|
-
}
|
|
455
|
-
/**
|
|
456
|
-
* 清空节点事件
|
|
457
|
-
*
|
|
458
|
-
* @memberof DevStore
|
|
459
|
-
*/
|
|
460
|
-
clearElEventList() {
|
|
461
|
-
this.state.elEventList = [];
|
|
462
|
-
}
|
|
463
|
-
/**
|
|
464
|
-
* 新增事件
|
|
465
|
-
*
|
|
466
|
-
* @param {DevTool.UniEventItem} event
|
|
467
|
-
* @memberof DevStore
|
|
468
|
-
*/
|
|
469
|
-
addUniEvent(t) {
|
|
470
|
-
var e;
|
|
471
|
-
this.state.uniEventList || (this.state.uniEventList = []), (e = this.state.uniEventList) == null || e.push(t);
|
|
472
|
-
}
|
|
473
|
-
/**
|
|
474
|
-
* 增加注册事件的数量
|
|
475
|
-
*
|
|
476
|
-
* @param {DevTool.EventCountKey} type
|
|
477
|
-
* @memberof DevStore
|
|
478
|
-
*/
|
|
479
|
-
updateUniEventCount(t) {
|
|
480
|
-
this.state.eventCount || (this.state.eventCount = {
|
|
481
|
-
on: 0,
|
|
482
|
-
once: 0,
|
|
483
|
-
emit: 0,
|
|
484
|
-
off: 0
|
|
485
|
-
}), this.state.eventCount[t] = this.state.eventCount[t] + 1;
|
|
486
|
-
}
|
|
487
|
-
updateUniEventList(t) {
|
|
488
|
-
var i, o, a;
|
|
489
|
-
const e = ((i = this.state.uniEventList) == null ? void 0 : i.length) ?? 0, s = this.uniEventListMaxSize;
|
|
490
|
-
return e + t.length > s && ((o = this.state.uniEventList) == null || o.splice(0, e - s - t.length)), (a = this.state.uniEventList) == null || a.push(...t), this.state.uniEventList;
|
|
491
|
-
}
|
|
492
|
-
clearUniEvent() {
|
|
493
|
-
this.state.eventCount = {
|
|
494
|
-
on: 0,
|
|
495
|
-
once: 0,
|
|
496
|
-
emit: 0,
|
|
497
|
-
off: 0
|
|
498
|
-
}, this.state.uniEventList = [];
|
|
499
|
-
}
|
|
500
|
-
updateScreenList(t, e) {
|
|
501
|
-
var s, i, o, a, r;
|
|
502
|
-
if (g(e) && e > -1 && t.length === 1 && ((s = this.state.screenList) != null && s[e]))
|
|
503
|
-
(i = this.state.screenList) != null && i[e] && (this.state.screenList[e] = {
|
|
504
|
-
...this.state.screenList[e],
|
|
505
|
-
...t[0]
|
|
506
|
-
});
|
|
507
|
-
else {
|
|
508
|
-
const u = ((o = this.state.screenList) == null ? void 0 : o.length) ?? 0, n = this.screenMaxSize;
|
|
509
|
-
u + t.length > n && ((a = this.state.screenList) == null || a.splice(0, u - n - t.length)), (r = this.state.screenList) == null || r.push(...t);
|
|
510
|
-
}
|
|
511
|
-
return this.state.screenList;
|
|
512
|
-
}
|
|
513
|
-
clearCaptureScreenList() {
|
|
514
|
-
this.state.screenList = [];
|
|
515
|
-
}
|
|
516
|
-
addInterceptNetworkItem(t) {
|
|
517
|
-
var s, i, o;
|
|
518
|
-
const e = `${(s = t.method) == null ? void 0 : s.toUpperCase()}|${(i = t.url) == null ? void 0 : i.split("?")[0]}`;
|
|
519
|
-
(o = this.state.interceptNetworkMap) == null || o.set(e, t);
|
|
520
|
-
}
|
|
521
|
-
updateInterceptNetworkList(t) {
|
|
522
|
-
this.getDevToolVisible() && t.forEach((e) => {
|
|
523
|
-
var i, o, a;
|
|
524
|
-
const s = `${(i = e.method) == null ? void 0 : i.toUpperCase()}|${(o = e.url) == null ? void 0 : o.split("?")[0]}`;
|
|
525
|
-
(a = this.state.interceptNetworkMap) == null || a.set(s, e);
|
|
526
|
-
});
|
|
527
|
-
}
|
|
528
|
-
clearInterceptNetworkList() {
|
|
529
|
-
var t;
|
|
530
|
-
(t = this.state.interceptNetworkMap) == null || t.clear();
|
|
531
|
-
}
|
|
532
|
-
getInterceptNetworkMap() {
|
|
533
|
-
return this.state.interceptNetworkMap;
|
|
534
|
-
}
|
|
535
|
-
removeInterceptNetwork(t) {
|
|
536
|
-
var s, i, o;
|
|
537
|
-
const e = `${(s = t.method) == null ? void 0 : s.toUpperCase()}|${(i = t.url) == null ? void 0 : i.split("?")[0]}`;
|
|
538
|
-
(o = this.state.interceptNetworkMap) == null || o.delete(e);
|
|
539
|
-
}
|
|
540
|
-
changeCacheInterceptConfig(t) {
|
|
541
|
-
this.cacheInterceptConfig = t;
|
|
542
|
-
}
|
|
543
|
-
updateScanCodeList(t) {
|
|
544
|
-
var i, o, a;
|
|
545
|
-
const e = ((i = this.state.scanCodeList) == null ? void 0 : i.length) ?? 0, s = this.scanCodeListMaxSize;
|
|
546
|
-
e + t.length > s && ((o = this.state.scanCodeList) == null || o.splice(0, e - s - t.length)), (a = this.state.scanCodeList) == null || a.push(...t);
|
|
547
|
-
}
|
|
548
|
-
clearScanCodeList() {
|
|
549
|
-
this.state.scanCodeList = [];
|
|
550
|
-
}
|
|
551
|
-
updateNfcList(t) {
|
|
552
|
-
var i, o, a;
|
|
553
|
-
const e = ((i = this.state.nfcList) == null ? void 0 : i.length) ?? 0, s = this.nfcListMaxSize;
|
|
554
|
-
e + t.length > s && ((o = this.state.nfcList) == null || o.splice(0, e - s - t.length)), (a = this.state.nfcList) == null || a.push(...t);
|
|
555
|
-
}
|
|
556
|
-
clearNfcList() {
|
|
557
|
-
this.state.nfcList = [];
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
export {
|
|
561
|
-
$ as DevStore
|
|
562
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { DevTool } from '../type';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* 缓存调试工具信息到本地
|
|
5
|
-
*
|
|
6
|
-
* @export
|
|
7
|
-
* @param {DevTool.DevToolInfo} info
|
|
8
|
-
*/
|
|
9
|
-
export declare function setDevToolInfo(info: DevTool.DevToolInfo): void;
|
|
10
|
-
/**
|
|
11
|
-
* 获取本地缓存信息
|
|
12
|
-
*
|
|
13
|
-
* @export
|
|
14
|
-
* @return {*}
|
|
15
|
-
*/
|
|
16
|
-
export declare function getDevToolInfo(): DevTool.DevToolInfo;
|
|
17
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../dev/devToolInfo/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,WAAW,QAMvD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,wBAE7B"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { DEV_TOOL_INFO as o } from "../const.js";
|
|
2
|
-
function r(n) {
|
|
3
|
-
const t = uni.getStorageSync(o);
|
|
4
|
-
uni.setStorageSync(o, {
|
|
5
|
-
...t,
|
|
6
|
-
...n
|
|
7
|
-
});
|
|
8
|
-
}
|
|
9
|
-
function c() {
|
|
10
|
-
return uni.getStorageSync(o);
|
|
11
|
-
}
|
|
12
|
-
export {
|
|
13
|
-
c as getDevToolInfo,
|
|
14
|
-
r as setDevToolInfo
|
|
15
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ComponentInternalInstance } from 'vue';
|
|
2
|
-
|
|
3
|
-
export declare function getRect(selector: string, context: ComponentInternalInstance | null | any, node?: boolean): Promise<UniApp.NodeInfo>;
|
|
4
|
-
export declare function addUnit(value?: string | number): string;
|
|
5
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../dev/v3/AutoSizer/utils.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,yBAAyB,EAA2B,MAAM,KAAK,CAAC;AAE9E,wBAAgB,OAAO,CACrB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,yBAAyB,GAAG,IAAI,GAAG,GAAG,EAC/C,IAAI,GAAE,OAAe,4BAmCtB;AAED,wBAAgB,OAAO,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAMvD"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export type Tip = {
|
|
2
|
-
name: string;
|
|
3
|
-
description: string;
|
|
4
|
-
result: string[];
|
|
5
|
-
};
|
|
6
|
-
export declare const staticTips: Record<string, {
|
|
7
|
-
attr: Tip[];
|
|
8
|
-
fun: Tip[];
|
|
9
|
-
}>;
|
|
10
|
-
export declare const flatStaticTips: Tip[];
|
|
11
|
-
export declare const singleTips: string[];
|
|
12
|
-
export declare const baseSymbols: string[];
|
|
13
|
-
//# sourceMappingURL=staticTips.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"staticTips.d.ts","sourceRoot":"","sources":["../../../dev/v3/ConsoleList/staticTips.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,GAAG,GAAG;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,MAAM,CAC7B,MAAM,EACN;IACE,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,GAAG,EAAE,GAAG,EAAE,CAAC;CACZ,CA4lCF,CAAC;AAEF,eAAO,MAAM,cAAc,OAEjB,CAAC;AAEX,eAAO,MAAM,UAAU,UAStB,CAAC;AAEF,eAAO,MAAM,WAAW,UAAqD,CAAC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
export declare const tabIndex: {
|
|
2
|
-
Console: number;
|
|
3
|
-
Network: number;
|
|
4
|
-
Upload: number;
|
|
5
|
-
WebSocket: number;
|
|
6
|
-
Route: number;
|
|
7
|
-
ElEvent: number;
|
|
8
|
-
UniEvent: number;
|
|
9
|
-
CaptureScreen: number;
|
|
10
|
-
ScanCode: number;
|
|
11
|
-
NFC: number;
|
|
12
|
-
Storage: number;
|
|
13
|
-
Vuex: number;
|
|
14
|
-
Pinia: number;
|
|
15
|
-
Setting: number;
|
|
16
|
-
};
|
|
17
|
-
export declare const tabItems: {
|
|
18
|
-
key: string;
|
|
19
|
-
label: string;
|
|
20
|
-
value: string;
|
|
21
|
-
index: number;
|
|
22
|
-
}[];
|
|
23
|
-
export declare const emptyNetwork: {
|
|
24
|
-
index: number;
|
|
25
|
-
url: string;
|
|
26
|
-
name: string;
|
|
27
|
-
method: string;
|
|
28
|
-
status: string;
|
|
29
|
-
time: string;
|
|
30
|
-
startTime: number;
|
|
31
|
-
endTime: number;
|
|
32
|
-
size: string;
|
|
33
|
-
headers: {
|
|
34
|
-
requestHeader: never[];
|
|
35
|
-
responseHeader: never[];
|
|
36
|
-
};
|
|
37
|
-
response: {
|
|
38
|
-
data: string;
|
|
39
|
-
statusCode: number;
|
|
40
|
-
header: {};
|
|
41
|
-
cookies: never[];
|
|
42
|
-
errMsg: string;
|
|
43
|
-
};
|
|
44
|
-
payload: undefined;
|
|
45
|
-
};
|
|
46
|
-
//# sourceMappingURL=const.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../../../dev/v3/DevToolWindow/const.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;CAoBpB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;GA0HpB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;CAsBxB,CAAC"}
|