@vue/devtools-kit 7.3.7 → 7.3.9
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/dist/index.cjs +50 -22
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +50 -22
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -33,9 +33,9 @@ var __toESM = (mod, isNodeMode, target21) => (target21 = mod != null ? __create(
|
|
|
33
33
|
));
|
|
34
34
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
35
|
|
|
36
|
-
// ../../node_modules/.pnpm/tsup@8.
|
|
36
|
+
// ../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.43.0_@types+node@20.16.1__@swc+core@1.5.29_jiti@1.21.6__n4f3octckgstnpji6t2ezjmcwu/node_modules/tsup/assets/cjs_shims.js
|
|
37
37
|
var init_cjs_shims = __esm({
|
|
38
|
-
"../../node_modules/.pnpm/tsup@8.
|
|
38
|
+
"../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.43.0_@types+node@20.16.1__@swc+core@1.5.29_jiti@1.21.6__n4f3octckgstnpji6t2ezjmcwu/node_modules/tsup/assets/cjs_shims.js"() {
|
|
39
39
|
"use strict";
|
|
40
40
|
}
|
|
41
41
|
});
|
|
@@ -1939,6 +1939,9 @@ function getComponentInstance(appRecord, instanceId) {
|
|
|
1939
1939
|
const instance = appRecord.instanceMap.get(instanceId);
|
|
1940
1940
|
return instance || appRecord.instanceMap.get(":root");
|
|
1941
1941
|
}
|
|
1942
|
+
function ensurePropertyExists(obj, key, skipObjCheck = false) {
|
|
1943
|
+
return skipObjCheck ? key in obj : typeof obj === "object" && obj !== null ? key in obj : false;
|
|
1944
|
+
}
|
|
1942
1945
|
|
|
1943
1946
|
// src/core/component/tree/el.ts
|
|
1944
1947
|
init_cjs_shims();
|
|
@@ -2809,13 +2812,21 @@ function setOpenInEditorBaseUrl(url) {
|
|
|
2809
2812
|
import_devtools_shared6.target.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__ = url;
|
|
2810
2813
|
}
|
|
2811
2814
|
function openInEditor(options = {}) {
|
|
2812
|
-
var _a24;
|
|
2813
|
-
const { file, baseUrl = window.location.origin, line = 0, column = 0 } = options;
|
|
2815
|
+
var _a24, _b24, _c;
|
|
2816
|
+
const { file, host, baseUrl = window.location.origin, line = 0, column = 0 } = options;
|
|
2814
2817
|
if (file) {
|
|
2815
|
-
if (
|
|
2816
|
-
const
|
|
2818
|
+
if (host === "chrome-extension") {
|
|
2819
|
+
const fileName = file.replace(/\\/g, "\\\\");
|
|
2820
|
+
const _baseUrl = (_b24 = (_a24 = window.VUE_DEVTOOLS_CONFIG) == null ? void 0 : _a24.openInEditorHost) != null ? _b24 : "/";
|
|
2821
|
+
fetch(`${_baseUrl}__open-in-editor?file=${encodeURI(file)}`).then((response) => {
|
|
2822
|
+
if (!response.ok) {
|
|
2823
|
+
const msg = `Opening component ${fileName} failed`;
|
|
2824
|
+
console.log(`%c${msg}`, "color:red");
|
|
2825
|
+
}
|
|
2826
|
+
});
|
|
2827
|
+
} else if (devtoolsState.vitePluginDetected) {
|
|
2828
|
+
const _baseUrl = (_c = import_devtools_shared6.target.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__) != null ? _c : baseUrl;
|
|
2817
2829
|
import_devtools_shared6.target.__VUE_INSPECTOR__.openInEditor(_baseUrl, file, line, column);
|
|
2818
|
-
} else {
|
|
2819
2830
|
}
|
|
2820
2831
|
}
|
|
2821
2832
|
}
|
|
@@ -3406,7 +3417,13 @@ init_cjs_shims();
|
|
|
3406
3417
|
// src/core/component/state/is.ts
|
|
3407
3418
|
init_cjs_shims();
|
|
3408
3419
|
function isVueInstance(value) {
|
|
3409
|
-
|
|
3420
|
+
if (!ensurePropertyExists(value, "_")) {
|
|
3421
|
+
return false;
|
|
3422
|
+
}
|
|
3423
|
+
if (!isPlainObject(value._)) {
|
|
3424
|
+
return false;
|
|
3425
|
+
}
|
|
3426
|
+
return Object.keys(value._).includes("vnode");
|
|
3410
3427
|
}
|
|
3411
3428
|
function isPlainObject(obj) {
|
|
3412
3429
|
return Object.prototype.toString.call(obj) === "[object Object]";
|
|
@@ -3577,12 +3594,12 @@ function processSetupState(instance) {
|
|
|
3577
3594
|
const value = returnError(() => toRaw2(instance.setupState[key]));
|
|
3578
3595
|
const rawData = raw[key];
|
|
3579
3596
|
let result;
|
|
3580
|
-
let isOtherType = typeof value === "function" ||
|
|
3597
|
+
let isOtherType = typeof value === "function" || ensurePropertyExists(value, "render") && typeof value.render === "function" || ensurePropertyExists(value, "__asyncLoader") && typeof value.__asyncLoader === "function" || typeof value === "object" && value && ("setup" in value || "props" in value) || /^v[A-Z]/.test(key);
|
|
3581
3598
|
if (rawData) {
|
|
3582
3599
|
const info = getSetupStateType(rawData);
|
|
3583
3600
|
const { stateType, stateTypeName } = getStateTypeAndName(info);
|
|
3584
3601
|
const isState = info.ref || info.computed || info.reactive;
|
|
3585
|
-
const raw2 = ((_b24 = (_a24 = rawData.effect) == null ? void 0 : _a24.raw) == null ? void 0 : _b24.toString()) || ((_d = (_c = rawData.effect) == null ? void 0 : _c.fn) == null ? void 0 : _d.toString());
|
|
3602
|
+
const raw2 = ensurePropertyExists(rawData, "effect") ? ((_b24 = (_a24 = rawData.effect) == null ? void 0 : _a24.raw) == null ? void 0 : _b24.toString()) || ((_d = (_c = rawData.effect) == null ? void 0 : _c.fn) == null ? void 0 : _d.toString()) : null;
|
|
3586
3603
|
if (stateType)
|
|
3587
3604
|
isOtherType = false;
|
|
3588
3605
|
result = {
|
|
@@ -3737,9 +3754,9 @@ init_cjs_shims();
|
|
|
3737
3754
|
var MAX_$VM = 10;
|
|
3738
3755
|
var $vmQueue = [];
|
|
3739
3756
|
function exposeInstanceToWindow(componentInstance) {
|
|
3740
|
-
|
|
3741
|
-
if (typeof win === "undefined")
|
|
3757
|
+
if (typeof window === "undefined")
|
|
3742
3758
|
return;
|
|
3759
|
+
const win = window;
|
|
3743
3760
|
if (!componentInstance)
|
|
3744
3761
|
return;
|
|
3745
3762
|
win.$vm = componentInstance;
|
|
@@ -5765,14 +5782,22 @@ function getHTMLElementDetails(value) {
|
|
|
5765
5782
|
};
|
|
5766
5783
|
}
|
|
5767
5784
|
}
|
|
5785
|
+
function tryGetRefValue(ref) {
|
|
5786
|
+
if (ensurePropertyExists(ref, "_value", true)) {
|
|
5787
|
+
return ref._value;
|
|
5788
|
+
}
|
|
5789
|
+
if (ensurePropertyExists(ref, "value", true)) {
|
|
5790
|
+
return ref.value;
|
|
5791
|
+
}
|
|
5792
|
+
}
|
|
5768
5793
|
function getObjectDetails(object) {
|
|
5769
5794
|
var _a24, _b24, _c, _d;
|
|
5770
5795
|
const info = getSetupStateType(object);
|
|
5771
5796
|
const isState = info.ref || info.computed || info.reactive;
|
|
5772
5797
|
if (isState) {
|
|
5773
5798
|
const stateTypeName = info.computed ? "Computed" : info.ref ? "Ref" : info.reactive ? "Reactive" : null;
|
|
5774
|
-
const value = toRaw2(info.reactive ? object : object
|
|
5775
|
-
const raw = ((_b24 = (_a24 = object.effect) == null ? void 0 : _a24.raw) == null ? void 0 : _b24.toString()) || ((_d = (_c = object.effect) == null ? void 0 : _c.fn) == null ? void 0 : _d.toString());
|
|
5799
|
+
const value = toRaw2(info.reactive ? object : tryGetRefValue(object));
|
|
5800
|
+
const raw = ensurePropertyExists(object, "effect") ? ((_b24 = (_a24 = object.effect) == null ? void 0 : _a24.raw) == null ? void 0 : _b24.toString()) || ((_d = (_c = object.effect) == null ? void 0 : _c.fn) == null ? void 0 : _d.toString()) : null;
|
|
5776
5801
|
return {
|
|
5777
5802
|
_custom: {
|
|
5778
5803
|
type: stateTypeName == null ? void 0 : stateTypeName.toLowerCase(),
|
|
@@ -5782,7 +5807,7 @@ function getObjectDetails(object) {
|
|
|
5782
5807
|
}
|
|
5783
5808
|
};
|
|
5784
5809
|
}
|
|
5785
|
-
if (typeof object.__asyncLoader === "function") {
|
|
5810
|
+
if (ensurePropertyExists(object, "__asyncLoader") && typeof object.__asyncLoader === "function") {
|
|
5786
5811
|
return {
|
|
5787
5812
|
_custom: {
|
|
5788
5813
|
type: "component-definition",
|
|
@@ -5838,7 +5863,7 @@ function stringifyReplacer(key, _value, depth, seenInstance) {
|
|
|
5838
5863
|
return getDateDetails(val);
|
|
5839
5864
|
} else if (proto === "[object Error]") {
|
|
5840
5865
|
return `[native Error ${val.message}<>${val.stack}]`;
|
|
5841
|
-
} else if (val
|
|
5866
|
+
} else if (ensurePropertyExists(val, "state", true) && ensurePropertyExists(val, "_vm", true)) {
|
|
5842
5867
|
return getStoreDetails(val);
|
|
5843
5868
|
} else if (val.constructor && val.constructor.name === "VueRouter") {
|
|
5844
5869
|
return getRouterDetails(val);
|
|
@@ -5850,15 +5875,15 @@ function stringifyReplacer(key, _value, depth, seenInstance) {
|
|
|
5850
5875
|
}
|
|
5851
5876
|
seenInstance == null ? void 0 : seenInstance.set(val, depth);
|
|
5852
5877
|
return componentVal;
|
|
5853
|
-
} else if (typeof val.render === "function") {
|
|
5878
|
+
} else if (ensurePropertyExists(val, "render", true) && typeof val.render === "function") {
|
|
5854
5879
|
return getComponentDefinitionDetails(val);
|
|
5855
5880
|
} else if (val.constructor && val.constructor.name === "VNode") {
|
|
5856
5881
|
return `[native VNode <${val.tag}>]`;
|
|
5857
5882
|
} else if (typeof HTMLElement !== "undefined" && val instanceof HTMLElement) {
|
|
5858
5883
|
return getHTMLElementDetails(val);
|
|
5859
|
-
} else if (((_a24 = val.constructor) == null ? void 0 : _a24.name) === "Store" && val
|
|
5884
|
+
} else if (((_a24 = val.constructor) == null ? void 0 : _a24.name) === "Store" && "_wrappedGetters" in val) {
|
|
5860
5885
|
return "[object Store]";
|
|
5861
|
-
} else if (val
|
|
5886
|
+
} else if (ensurePropertyExists(val, "currentRoute", true)) {
|
|
5862
5887
|
return "[object Router]";
|
|
5863
5888
|
}
|
|
5864
5889
|
const customDetails = getObjectDetails(val);
|
|
@@ -5956,11 +5981,11 @@ function encode(data, replacer, list, seen, depth = 0, seenVueInstance = /* @__P
|
|
|
5956
5981
|
const keys = Object.keys(data);
|
|
5957
5982
|
for (i = 0, l = keys.length; i < l; i++) {
|
|
5958
5983
|
key = keys[i];
|
|
5984
|
+
if (key === "compilerOptions")
|
|
5985
|
+
return index;
|
|
5959
5986
|
value = data[key];
|
|
5960
5987
|
const isVm = value != null && isObject(value, Object.prototype.toString.call(data)) && isVueInstance(value);
|
|
5961
5988
|
try {
|
|
5962
|
-
if (key === "compilerOptions")
|
|
5963
|
-
return index;
|
|
5964
5989
|
if (replacer) {
|
|
5965
5990
|
value = replacer.call(data, key, value, depth, seenVueInstance);
|
|
5966
5991
|
}
|
|
@@ -6019,7 +6044,10 @@ function decode(list, reviver2 = null) {
|
|
|
6019
6044
|
function stringifyCircularAutoChunks(data, replacer = null, space = null) {
|
|
6020
6045
|
let result;
|
|
6021
6046
|
try {
|
|
6022
|
-
result = arguments.length === 1 ? JSON.stringify(data) : JSON.stringify(data, (k, v) =>
|
|
6047
|
+
result = arguments.length === 1 ? JSON.stringify(data) : JSON.stringify(data, (k, v) => {
|
|
6048
|
+
var _a24;
|
|
6049
|
+
return (_a24 = replacer == null ? void 0 : replacer(k, v)) == null ? void 0 : _a24.call(this);
|
|
6050
|
+
}, space);
|
|
6023
6051
|
} catch (e) {
|
|
6024
6052
|
result = stringifyStrictCircularAutoChunks(data, replacer, space);
|
|
6025
6053
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -30,6 +30,7 @@ interface OpenInEditorOptions {
|
|
|
30
30
|
file?: string;
|
|
31
31
|
line?: number;
|
|
32
32
|
column?: number;
|
|
33
|
+
host?: string;
|
|
33
34
|
}
|
|
34
35
|
declare function setOpenInEditorBaseUrl(url: string): void;
|
|
35
36
|
declare function openInEditor(options?: OpenInEditorOptions): void;
|
|
@@ -787,7 +788,7 @@ interface CustomCommand {
|
|
|
787
788
|
}
|
|
788
789
|
|
|
789
790
|
interface RouterInfo {
|
|
790
|
-
currentRoute: RouteLocationNormalizedLoaded | null |
|
|
791
|
+
currentRoute: RouteLocationNormalizedLoaded | null | Record<string, any>;
|
|
791
792
|
routes: RouteRecordNormalized[];
|
|
792
793
|
}
|
|
793
794
|
|
|
@@ -991,7 +992,7 @@ declare function formatInspectorStateValue(value: any, quotes?: boolean, options
|
|
|
991
992
|
}): any;
|
|
992
993
|
declare function getRaw(value: InspectorState['value']): {
|
|
993
994
|
value: object | string | number | boolean | null;
|
|
994
|
-
inherit:
|
|
995
|
+
inherit: Record<string, any> | {
|
|
995
996
|
abstract: true;
|
|
996
997
|
};
|
|
997
998
|
customType?: customTypeEnums;
|
|
@@ -1007,7 +1008,7 @@ declare const INFINITY = "__vue_devtool_infinity__";
|
|
|
1007
1008
|
declare const NEGATIVE_INFINITY = "__vue_devtool_negative_infinity__";
|
|
1008
1009
|
declare const NAN = "__vue_devtool_nan__";
|
|
1009
1010
|
|
|
1010
|
-
declare function isPlainObject(obj: unknown):
|
|
1011
|
+
declare function isPlainObject(obj: unknown): obj is object;
|
|
1011
1012
|
|
|
1012
1013
|
declare const devtools: {
|
|
1013
1014
|
hook: VueHooks;
|
package/dist/index.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ interface OpenInEditorOptions {
|
|
|
30
30
|
file?: string;
|
|
31
31
|
line?: number;
|
|
32
32
|
column?: number;
|
|
33
|
+
host?: string;
|
|
33
34
|
}
|
|
34
35
|
declare function setOpenInEditorBaseUrl(url: string): void;
|
|
35
36
|
declare function openInEditor(options?: OpenInEditorOptions): void;
|
|
@@ -787,7 +788,7 @@ interface CustomCommand {
|
|
|
787
788
|
}
|
|
788
789
|
|
|
789
790
|
interface RouterInfo {
|
|
790
|
-
currentRoute: RouteLocationNormalizedLoaded | null |
|
|
791
|
+
currentRoute: RouteLocationNormalizedLoaded | null | Record<string, any>;
|
|
791
792
|
routes: RouteRecordNormalized[];
|
|
792
793
|
}
|
|
793
794
|
|
|
@@ -991,7 +992,7 @@ declare function formatInspectorStateValue(value: any, quotes?: boolean, options
|
|
|
991
992
|
}): any;
|
|
992
993
|
declare function getRaw(value: InspectorState['value']): {
|
|
993
994
|
value: object | string | number | boolean | null;
|
|
994
|
-
inherit:
|
|
995
|
+
inherit: Record<string, any> | {
|
|
995
996
|
abstract: true;
|
|
996
997
|
};
|
|
997
998
|
customType?: customTypeEnums;
|
|
@@ -1007,7 +1008,7 @@ declare const INFINITY = "__vue_devtool_infinity__";
|
|
|
1007
1008
|
declare const NEGATIVE_INFINITY = "__vue_devtool_negative_infinity__";
|
|
1008
1009
|
declare const NAN = "__vue_devtool_nan__";
|
|
1009
1010
|
|
|
1010
|
-
declare function isPlainObject(obj: unknown):
|
|
1011
|
+
declare function isPlainObject(obj: unknown): obj is object;
|
|
1011
1012
|
|
|
1012
1013
|
declare const devtools: {
|
|
1013
1014
|
hook: VueHooks;
|
package/dist/index.js
CHANGED
|
@@ -27,9 +27,9 @@ var __toESM = (mod, isNodeMode, target21) => (target21 = mod != null ? __create(
|
|
|
27
27
|
mod
|
|
28
28
|
));
|
|
29
29
|
|
|
30
|
-
// ../../node_modules/.pnpm/tsup@8.
|
|
30
|
+
// ../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.43.0_@types+node@20.16.1__@swc+core@1.5.29_jiti@1.21.6__n4f3octckgstnpji6t2ezjmcwu/node_modules/tsup/assets/esm_shims.js
|
|
31
31
|
var init_esm_shims = __esm({
|
|
32
|
-
"../../node_modules/.pnpm/tsup@8.
|
|
32
|
+
"../../node_modules/.pnpm/tsup@8.2.4_@microsoft+api-extractor@7.43.0_@types+node@20.16.1__@swc+core@1.5.29_jiti@1.21.6__n4f3octckgstnpji6t2ezjmcwu/node_modules/tsup/assets/esm_shims.js"() {
|
|
33
33
|
"use strict";
|
|
34
34
|
}
|
|
35
35
|
});
|
|
@@ -1850,6 +1850,9 @@ function getComponentInstance(appRecord, instanceId) {
|
|
|
1850
1850
|
const instance = appRecord.instanceMap.get(instanceId);
|
|
1851
1851
|
return instance || appRecord.instanceMap.get(":root");
|
|
1852
1852
|
}
|
|
1853
|
+
function ensurePropertyExists(obj, key, skipObjCheck = false) {
|
|
1854
|
+
return skipObjCheck ? key in obj : typeof obj === "object" && obj !== null ? key in obj : false;
|
|
1855
|
+
}
|
|
1853
1856
|
|
|
1854
1857
|
// src/core/component/tree/el.ts
|
|
1855
1858
|
init_esm_shims();
|
|
@@ -2720,13 +2723,21 @@ function setOpenInEditorBaseUrl(url) {
|
|
|
2720
2723
|
target4.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__ = url;
|
|
2721
2724
|
}
|
|
2722
2725
|
function openInEditor(options = {}) {
|
|
2723
|
-
var _a24;
|
|
2724
|
-
const { file, baseUrl = window.location.origin, line = 0, column = 0 } = options;
|
|
2726
|
+
var _a24, _b24, _c;
|
|
2727
|
+
const { file, host, baseUrl = window.location.origin, line = 0, column = 0 } = options;
|
|
2725
2728
|
if (file) {
|
|
2726
|
-
if (
|
|
2727
|
-
const
|
|
2729
|
+
if (host === "chrome-extension") {
|
|
2730
|
+
const fileName = file.replace(/\\/g, "\\\\");
|
|
2731
|
+
const _baseUrl = (_b24 = (_a24 = window.VUE_DEVTOOLS_CONFIG) == null ? void 0 : _a24.openInEditorHost) != null ? _b24 : "/";
|
|
2732
|
+
fetch(`${_baseUrl}__open-in-editor?file=${encodeURI(file)}`).then((response) => {
|
|
2733
|
+
if (!response.ok) {
|
|
2734
|
+
const msg = `Opening component ${fileName} failed`;
|
|
2735
|
+
console.log(`%c${msg}`, "color:red");
|
|
2736
|
+
}
|
|
2737
|
+
});
|
|
2738
|
+
} else if (devtoolsState.vitePluginDetected) {
|
|
2739
|
+
const _baseUrl = (_c = target4.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__) != null ? _c : baseUrl;
|
|
2728
2740
|
target4.__VUE_INSPECTOR__.openInEditor(_baseUrl, file, line, column);
|
|
2729
|
-
} else {
|
|
2730
2741
|
}
|
|
2731
2742
|
}
|
|
2732
2743
|
}
|
|
@@ -3317,7 +3328,13 @@ init_esm_shims();
|
|
|
3317
3328
|
// src/core/component/state/is.ts
|
|
3318
3329
|
init_esm_shims();
|
|
3319
3330
|
function isVueInstance(value) {
|
|
3320
|
-
|
|
3331
|
+
if (!ensurePropertyExists(value, "_")) {
|
|
3332
|
+
return false;
|
|
3333
|
+
}
|
|
3334
|
+
if (!isPlainObject(value._)) {
|
|
3335
|
+
return false;
|
|
3336
|
+
}
|
|
3337
|
+
return Object.keys(value._).includes("vnode");
|
|
3321
3338
|
}
|
|
3322
3339
|
function isPlainObject(obj) {
|
|
3323
3340
|
return Object.prototype.toString.call(obj) === "[object Object]";
|
|
@@ -3488,12 +3505,12 @@ function processSetupState(instance) {
|
|
|
3488
3505
|
const value = returnError(() => toRaw2(instance.setupState[key]));
|
|
3489
3506
|
const rawData = raw[key];
|
|
3490
3507
|
let result;
|
|
3491
|
-
let isOtherType = typeof value === "function" ||
|
|
3508
|
+
let isOtherType = typeof value === "function" || ensurePropertyExists(value, "render") && typeof value.render === "function" || ensurePropertyExists(value, "__asyncLoader") && typeof value.__asyncLoader === "function" || typeof value === "object" && value && ("setup" in value || "props" in value) || /^v[A-Z]/.test(key);
|
|
3492
3509
|
if (rawData) {
|
|
3493
3510
|
const info = getSetupStateType(rawData);
|
|
3494
3511
|
const { stateType, stateTypeName } = getStateTypeAndName(info);
|
|
3495
3512
|
const isState = info.ref || info.computed || info.reactive;
|
|
3496
|
-
const raw2 = ((_b24 = (_a24 = rawData.effect) == null ? void 0 : _a24.raw) == null ? void 0 : _b24.toString()) || ((_d = (_c = rawData.effect) == null ? void 0 : _c.fn) == null ? void 0 : _d.toString());
|
|
3513
|
+
const raw2 = ensurePropertyExists(rawData, "effect") ? ((_b24 = (_a24 = rawData.effect) == null ? void 0 : _a24.raw) == null ? void 0 : _b24.toString()) || ((_d = (_c = rawData.effect) == null ? void 0 : _c.fn) == null ? void 0 : _d.toString()) : null;
|
|
3497
3514
|
if (stateType)
|
|
3498
3515
|
isOtherType = false;
|
|
3499
3516
|
result = {
|
|
@@ -3648,9 +3665,9 @@ init_esm_shims();
|
|
|
3648
3665
|
var MAX_$VM = 10;
|
|
3649
3666
|
var $vmQueue = [];
|
|
3650
3667
|
function exposeInstanceToWindow(componentInstance) {
|
|
3651
|
-
|
|
3652
|
-
if (typeof win === "undefined")
|
|
3668
|
+
if (typeof window === "undefined")
|
|
3653
3669
|
return;
|
|
3670
|
+
const win = window;
|
|
3654
3671
|
if (!componentInstance)
|
|
3655
3672
|
return;
|
|
3656
3673
|
win.$vm = componentInstance;
|
|
@@ -5676,14 +5693,22 @@ function getHTMLElementDetails(value) {
|
|
|
5676
5693
|
};
|
|
5677
5694
|
}
|
|
5678
5695
|
}
|
|
5696
|
+
function tryGetRefValue(ref) {
|
|
5697
|
+
if (ensurePropertyExists(ref, "_value", true)) {
|
|
5698
|
+
return ref._value;
|
|
5699
|
+
}
|
|
5700
|
+
if (ensurePropertyExists(ref, "value", true)) {
|
|
5701
|
+
return ref.value;
|
|
5702
|
+
}
|
|
5703
|
+
}
|
|
5679
5704
|
function getObjectDetails(object) {
|
|
5680
5705
|
var _a24, _b24, _c, _d;
|
|
5681
5706
|
const info = getSetupStateType(object);
|
|
5682
5707
|
const isState = info.ref || info.computed || info.reactive;
|
|
5683
5708
|
if (isState) {
|
|
5684
5709
|
const stateTypeName = info.computed ? "Computed" : info.ref ? "Ref" : info.reactive ? "Reactive" : null;
|
|
5685
|
-
const value = toRaw2(info.reactive ? object : object
|
|
5686
|
-
const raw = ((_b24 = (_a24 = object.effect) == null ? void 0 : _a24.raw) == null ? void 0 : _b24.toString()) || ((_d = (_c = object.effect) == null ? void 0 : _c.fn) == null ? void 0 : _d.toString());
|
|
5710
|
+
const value = toRaw2(info.reactive ? object : tryGetRefValue(object));
|
|
5711
|
+
const raw = ensurePropertyExists(object, "effect") ? ((_b24 = (_a24 = object.effect) == null ? void 0 : _a24.raw) == null ? void 0 : _b24.toString()) || ((_d = (_c = object.effect) == null ? void 0 : _c.fn) == null ? void 0 : _d.toString()) : null;
|
|
5687
5712
|
return {
|
|
5688
5713
|
_custom: {
|
|
5689
5714
|
type: stateTypeName == null ? void 0 : stateTypeName.toLowerCase(),
|
|
@@ -5693,7 +5718,7 @@ function getObjectDetails(object) {
|
|
|
5693
5718
|
}
|
|
5694
5719
|
};
|
|
5695
5720
|
}
|
|
5696
|
-
if (typeof object.__asyncLoader === "function") {
|
|
5721
|
+
if (ensurePropertyExists(object, "__asyncLoader") && typeof object.__asyncLoader === "function") {
|
|
5697
5722
|
return {
|
|
5698
5723
|
_custom: {
|
|
5699
5724
|
type: "component-definition",
|
|
@@ -5749,7 +5774,7 @@ function stringifyReplacer(key, _value, depth, seenInstance) {
|
|
|
5749
5774
|
return getDateDetails(val);
|
|
5750
5775
|
} else if (proto === "[object Error]") {
|
|
5751
5776
|
return `[native Error ${val.message}<>${val.stack}]`;
|
|
5752
|
-
} else if (val
|
|
5777
|
+
} else if (ensurePropertyExists(val, "state", true) && ensurePropertyExists(val, "_vm", true)) {
|
|
5753
5778
|
return getStoreDetails(val);
|
|
5754
5779
|
} else if (val.constructor && val.constructor.name === "VueRouter") {
|
|
5755
5780
|
return getRouterDetails(val);
|
|
@@ -5761,15 +5786,15 @@ function stringifyReplacer(key, _value, depth, seenInstance) {
|
|
|
5761
5786
|
}
|
|
5762
5787
|
seenInstance == null ? void 0 : seenInstance.set(val, depth);
|
|
5763
5788
|
return componentVal;
|
|
5764
|
-
} else if (typeof val.render === "function") {
|
|
5789
|
+
} else if (ensurePropertyExists(val, "render", true) && typeof val.render === "function") {
|
|
5765
5790
|
return getComponentDefinitionDetails(val);
|
|
5766
5791
|
} else if (val.constructor && val.constructor.name === "VNode") {
|
|
5767
5792
|
return `[native VNode <${val.tag}>]`;
|
|
5768
5793
|
} else if (typeof HTMLElement !== "undefined" && val instanceof HTMLElement) {
|
|
5769
5794
|
return getHTMLElementDetails(val);
|
|
5770
|
-
} else if (((_a24 = val.constructor) == null ? void 0 : _a24.name) === "Store" && val
|
|
5795
|
+
} else if (((_a24 = val.constructor) == null ? void 0 : _a24.name) === "Store" && "_wrappedGetters" in val) {
|
|
5771
5796
|
return "[object Store]";
|
|
5772
|
-
} else if (val
|
|
5797
|
+
} else if (ensurePropertyExists(val, "currentRoute", true)) {
|
|
5773
5798
|
return "[object Router]";
|
|
5774
5799
|
}
|
|
5775
5800
|
const customDetails = getObjectDetails(val);
|
|
@@ -5867,11 +5892,11 @@ function encode(data, replacer, list, seen, depth = 0, seenVueInstance = /* @__P
|
|
|
5867
5892
|
const keys = Object.keys(data);
|
|
5868
5893
|
for (i = 0, l = keys.length; i < l; i++) {
|
|
5869
5894
|
key = keys[i];
|
|
5895
|
+
if (key === "compilerOptions")
|
|
5896
|
+
return index;
|
|
5870
5897
|
value = data[key];
|
|
5871
5898
|
const isVm = value != null && isObject(value, Object.prototype.toString.call(data)) && isVueInstance(value);
|
|
5872
5899
|
try {
|
|
5873
|
-
if (key === "compilerOptions")
|
|
5874
|
-
return index;
|
|
5875
5900
|
if (replacer) {
|
|
5876
5901
|
value = replacer.call(data, key, value, depth, seenVueInstance);
|
|
5877
5902
|
}
|
|
@@ -5930,7 +5955,10 @@ function decode(list, reviver2 = null) {
|
|
|
5930
5955
|
function stringifyCircularAutoChunks(data, replacer = null, space = null) {
|
|
5931
5956
|
let result;
|
|
5932
5957
|
try {
|
|
5933
|
-
result = arguments.length === 1 ? JSON.stringify(data) : JSON.stringify(data, (k, v) =>
|
|
5958
|
+
result = arguments.length === 1 ? JSON.stringify(data) : JSON.stringify(data, (k, v) => {
|
|
5959
|
+
var _a24;
|
|
5960
|
+
return (_a24 = replacer == null ? void 0 : replacer(k, v)) == null ? void 0 : _a24.call(this);
|
|
5961
|
+
}, space);
|
|
5934
5962
|
} catch (e) {
|
|
5935
5963
|
result = stringifyStrictCircularAutoChunks(data, replacer, space);
|
|
5936
5964
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/devtools-kit",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.3.
|
|
4
|
+
"version": "7.3.9",
|
|
5
5
|
"author": "webfansplz",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"perfect-debounce": "^1.0.0",
|
|
30
30
|
"speakingurl": "^14.0.1",
|
|
31
31
|
"superjson": "^2.2.1",
|
|
32
|
-
"@vue/devtools-shared": "^7.3.
|
|
32
|
+
"@vue/devtools-shared": "^7.3.9"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/speakingurl": "^13.0.6",
|
|
36
|
-
"vue": "^3.4.
|
|
37
|
-
"vue-router": "^4.4.
|
|
36
|
+
"vue": "^3.4.38",
|
|
37
|
+
"vue-router": "^4.4.3"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build": "tsup --clean",
|