@vue/devtools-kit 7.0.9 → 7.0.10

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 CHANGED
@@ -1746,18 +1746,39 @@ function normalizeRouterInfo(appRecord) {
1746
1746
  const routesMap = /* @__PURE__ */ new Map();
1747
1747
  return ((router == null ? void 0 : router.getRoutes()) || []).filter((i) => !routesMap.has(i.path) && routesMap.set(i.path, 1));
1748
1748
  };
1749
- function init() {
1750
- var _a8;
1751
- const router = (_a8 = appRecord.app) == null ? void 0 : _a8.config.globalProperties.$router;
1752
- const currentRoute = router == null ? void 0 : router.currentRoute.value;
1753
- const routes = getRoutes(router).map((item) => {
1754
- const { path, name, children } = item;
1749
+ function filterRoutes(routes) {
1750
+ return routes.map((item) => {
1751
+ let { path, name, children } = item;
1752
+ if (children == null ? void 0 : children.length)
1753
+ children = filterRoutes(children);
1755
1754
  return {
1756
1755
  path,
1757
1756
  name,
1758
1757
  children
1759
1758
  };
1760
1759
  });
1760
+ }
1761
+ function filterCurrentRoute(route) {
1762
+ if (route) {
1763
+ const { fullPath, hash, href, path, name, matched, params, query } = route;
1764
+ return {
1765
+ fullPath,
1766
+ hash,
1767
+ href,
1768
+ path,
1769
+ name,
1770
+ params,
1771
+ query,
1772
+ matched: filterRoutes(matched)
1773
+ };
1774
+ }
1775
+ return route;
1776
+ }
1777
+ function init() {
1778
+ var _a8;
1779
+ const router = (_a8 = appRecord.app) == null ? void 0 : _a8.config.globalProperties.$router;
1780
+ const currentRoute = filterCurrentRoute(router == null ? void 0 : router.currentRoute.value);
1781
+ const routes = filterRoutes(getRoutes(router));
1761
1782
  const c = console.warn;
1762
1783
  console.warn = () => {
1763
1784
  };
package/dist/index.mjs CHANGED
@@ -1711,18 +1711,39 @@ function normalizeRouterInfo(appRecord) {
1711
1711
  const routesMap = /* @__PURE__ */ new Map();
1712
1712
  return ((router == null ? void 0 : router.getRoutes()) || []).filter((i) => !routesMap.has(i.path) && routesMap.set(i.path, 1));
1713
1713
  };
1714
- function init() {
1715
- var _a8;
1716
- const router = (_a8 = appRecord.app) == null ? void 0 : _a8.config.globalProperties.$router;
1717
- const currentRoute = router == null ? void 0 : router.currentRoute.value;
1718
- const routes = getRoutes(router).map((item) => {
1719
- const { path, name, children } = item;
1714
+ function filterRoutes(routes) {
1715
+ return routes.map((item) => {
1716
+ let { path, name, children } = item;
1717
+ if (children == null ? void 0 : children.length)
1718
+ children = filterRoutes(children);
1720
1719
  return {
1721
1720
  path,
1722
1721
  name,
1723
1722
  children
1724
1723
  };
1725
1724
  });
1725
+ }
1726
+ function filterCurrentRoute(route) {
1727
+ if (route) {
1728
+ const { fullPath, hash, href, path, name, matched, params, query } = route;
1729
+ return {
1730
+ fullPath,
1731
+ hash,
1732
+ href,
1733
+ path,
1734
+ name,
1735
+ params,
1736
+ query,
1737
+ matched: filterRoutes(matched)
1738
+ };
1739
+ }
1740
+ return route;
1741
+ }
1742
+ function init() {
1743
+ var _a8;
1744
+ const router = (_a8 = appRecord.app) == null ? void 0 : _a8.config.globalProperties.$router;
1745
+ const currentRoute = filterCurrentRoute(router == null ? void 0 : router.currentRoute.value);
1746
+ const routes = filterRoutes(getRoutes(router));
1726
1747
  const c = console.warn;
1727
1748
  console.warn = () => {
1728
1749
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vue/devtools-kit",
3
3
  "type": "module",
4
- "version": "7.0.9",
4
+ "version": "7.0.10",
5
5
  "author": "webfansplz",
6
6
  "license": "MIT",
7
7
  "exports": {
@@ -21,8 +21,8 @@
21
21
  "mitt": "^3.0.1",
22
22
  "perfect-debounce": "^1.0.0",
23
23
  "speakingurl": "^14.0.1",
24
- "@vue/devtools-shared": "^7.0.9",
25
- "@vue/devtools-schema": "^7.0.9"
24
+ "@vue/devtools-schema": "^7.0.10",
25
+ "@vue/devtools-shared": "^7.0.10"
26
26
  },
27
27
  "devDependencies": {
28
28
  "vue": "^3.4.4",