vite-plugin-vue-devtools 0.0.22 → 0.1.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.
Files changed (31) hide show
  1. package/README.md +15 -1
  2. package/dist/client/assets/{IframeView.vue_vue_type_script_setup_true_lang-7a782b7f.js → IframeView.vue_vue_type_script_setup_true_lang-0449d6b9.js} +2 -2
  3. package/dist/client/assets/{VCard-1a6832d4.js → VCard-29b1adce.js} +1 -1
  4. package/dist/client/assets/{VIcon.vue_vue_type_script_setup_true_lang-13ffd017.js → VIcon.vue_vue_type_script_setup_true_lang-f66901cc.js} +3 -3
  5. package/dist/client/assets/{VIconButton.vue_vue_type_script_setup_true_lang-186dde54.js → VIconButton.vue_vue_type_script_setup_true_lang-d5adb3a3.js} +5 -5
  6. package/dist/client/assets/{VIconTitle.vue_vue_type_script_setup_true_lang-fc3a2149.js → VIconTitle.vue_vue_type_script_setup_true_lang-88051acd.js} +6 -6
  7. package/dist/client/assets/{VPanelGrids-2dc8992e.js → VPanelGrids-abfaa973.js} +1 -1
  8. package/dist/client/assets/{VTextInput.vue_vue_type_script_setup_true_lang-535b6d73.js → VTextInput.vue_vue_type_script_setup_true_lang-1c9578c9.js} +19 -19
  9. package/dist/client/assets/{__inspecting-f04aca07.js → __inspecting-10ac6572.js} +2 -2
  10. package/dist/client/assets/{assets-e128fa14.js → assets-845f9f7f.js} +37 -37
  11. package/dist/client/assets/{components-5a527785.js → components-2ebcce62.js} +16 -16
  12. package/dist/client/assets/{documentations-f1b6f767.js → documentations-e7bc5c48.js} +20 -20
  13. package/dist/client/assets/{graph-9f30454f.js → graph-9547ed1e.js} +2 -2
  14. package/dist/client/assets/{index-347d3959.js → index-92885597.js} +1 -1
  15. package/dist/client/assets/{index-f8c90594.css → index-d015c21f.css} +1 -1
  16. package/dist/client/assets/{index-ee58a812.js → index-f0b756d9.js} +5979 -6403
  17. package/dist/client/assets/{inspect-400c2b70.js → inspect-14ec3ba4.js} +3 -3
  18. package/dist/client/assets/{npm-cd00dfa9.js → npm-20e4b0ab.js} +7 -7
  19. package/dist/client/assets/{overview-57c2cbd3.js → overview-4e60a278.js} +5 -5
  20. package/dist/client/assets/{pages-3d8588ac.js → pages-c7c02f81.js} +12 -12
  21. package/dist/client/assets/{pinia-b4b2eaba.js → pinia-1020b7d8.js} +5 -5
  22. package/dist/client/assets/{routes-8e26a6ac.js → routes-9fac0370.js} +7 -7
  23. package/dist/client/assets/{rpc-e28ef409.js → rpc-d18195f5.js} +3 -2
  24. package/dist/client/assets/{settings-b50a459c.js → settings-d7601de4.js} +9 -9
  25. package/dist/client/assets/{splitpanes.es-5f60be7d.js → splitpanes.es-af9ab4de.js} +20 -20
  26. package/dist/client/assets/{timeline-99b31af4.js → timeline-e220561d.js} +13 -13
  27. package/dist/client/index.html +2 -2
  28. package/dist/index.cjs +15 -4
  29. package/dist/index.d.ts +11 -2
  30. package/dist/index.mjs +15 -4
  31. package/package.json +22 -22
package/dist/index.cjs CHANGED
@@ -13676,7 +13676,7 @@ function getVueDevtoolsPath() {
13676
13676
  const pluginPath = vite.normalizePath(path$3__default.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('index.cjs', document.baseURI).href)))));
13677
13677
  return pluginPath.replace(/\/dist$/, "//src/node");
13678
13678
  }
13679
- function PluginVueDevtools() {
13679
+ function VitePluginVueDevTools(options = { appendTo: "" }) {
13680
13680
  const vueDevtoolsPath = getVueDevtoolsPath();
13681
13681
  const inspect = Inspect__default({
13682
13682
  silent: true
@@ -13695,8 +13695,8 @@ function PluginVueDevtools() {
13695
13695
  getImageMeta,
13696
13696
  getTextAssetContent,
13697
13697
  getPackages: () => getPackages(config.root),
13698
- installPackage: (packages, options = {}) => installPackage(packages, {
13699
- ...options,
13698
+ installPackage: (packages, options2 = {}) => installPackage(packages, {
13699
+ ...options2,
13700
13700
  cwd: config.root,
13701
13701
  callback: (type, data) => {
13702
13702
  if (type === "data")
@@ -13729,7 +13729,18 @@ function PluginVueDevtools() {
13729
13729
  if (id === "virtual:vue-devtools-options")
13730
13730
  return `export default ${JSON.stringify({ base: config.base })}`;
13731
13731
  },
13732
+ transform(code, id) {
13733
+ const { appendTo } = options;
13734
+ if (!appendTo)
13735
+ return;
13736
+ const [filename] = id.split("?", 2);
13737
+ if (typeof appendTo === "string" && filename.endsWith(appendTo) || appendTo instanceof RegExp && appendTo.test(filename))
13738
+ return { code: `${code}
13739
+ import 'virtual:vue-devtools-path:app.js'` };
13740
+ },
13732
13741
  transformIndexHtml(html) {
13742
+ if (options.appendTo)
13743
+ return;
13733
13744
  return {
13734
13745
  html,
13735
13746
  tags: [
@@ -13757,4 +13768,4 @@ function PluginVueDevtools() {
13757
13768
  ];
13758
13769
  }
13759
13770
 
13760
- module.exports = PluginVueDevtools;
13771
+ module.exports = VitePluginVueDevTools;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,14 @@
1
1
  import { PluginOption } from 'vite';
2
2
 
3
- declare function PluginVueDevtools(): PluginOption;
3
+ interface VitePluginVueDevToolsOptions {
4
+ /**
5
+ * append an import to the module id ending with `appendTo` instead of adding a script into body
6
+ * useful for projects that do not use html file as an entry
7
+ *
8
+ * WARNING: only set this if you know exactly what it does.
9
+ */
10
+ appendTo?: string | RegExp;
11
+ }
12
+ declare function VitePluginVueDevTools(options?: VitePluginVueDevToolsOptions): PluginOption;
4
13
 
5
- export { PluginVueDevtools as default };
14
+ export { VitePluginVueDevToolsOptions, VitePluginVueDevTools as default };
package/dist/index.mjs CHANGED
@@ -13650,7 +13650,7 @@ function getVueDevtoolsPath() {
13650
13650
  const pluginPath = normalizePath(path$3$1.dirname(fileURLToPath(import.meta.url)));
13651
13651
  return pluginPath.replace(/\/dist$/, "//src/node");
13652
13652
  }
13653
- function PluginVueDevtools() {
13653
+ function VitePluginVueDevTools(options = { appendTo: "" }) {
13654
13654
  const vueDevtoolsPath = getVueDevtoolsPath();
13655
13655
  const inspect = Inspect({
13656
13656
  silent: true
@@ -13669,8 +13669,8 @@ function PluginVueDevtools() {
13669
13669
  getImageMeta,
13670
13670
  getTextAssetContent,
13671
13671
  getPackages: () => getPackages(config.root),
13672
- installPackage: (packages, options = {}) => installPackage(packages, {
13673
- ...options,
13672
+ installPackage: (packages, options2 = {}) => installPackage(packages, {
13673
+ ...options2,
13674
13674
  cwd: config.root,
13675
13675
  callback: (type, data) => {
13676
13676
  if (type === "data")
@@ -13703,7 +13703,18 @@ function PluginVueDevtools() {
13703
13703
  if (id === "virtual:vue-devtools-options")
13704
13704
  return `export default ${JSON.stringify({ base: config.base })}`;
13705
13705
  },
13706
+ transform(code, id) {
13707
+ const { appendTo } = options;
13708
+ if (!appendTo)
13709
+ return;
13710
+ const [filename] = id.split("?", 2);
13711
+ if (typeof appendTo === "string" && filename.endsWith(appendTo) || appendTo instanceof RegExp && appendTo.test(filename))
13712
+ return { code: `${code}
13713
+ import 'virtual:vue-devtools-path:app.js'` };
13714
+ },
13706
13715
  transformIndexHtml(html) {
13716
+ if (options.appendTo)
13717
+ return;
13707
13718
  return {
13708
13719
  html,
13709
13720
  tags: [
@@ -13731,4 +13742,4 @@ function PluginVueDevtools() {
13731
13742
  ];
13732
13743
  }
13733
13744
 
13734
- export { PluginVueDevtools as default };
13745
+ export { VitePluginVueDevTools as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-vue-devtools",
3
- "version": "0.0.22",
3
+ "version": "0.1.0",
4
4
  "packageManager": "pnpm@8.4.0",
5
5
  "description": "A vite plugin for Vue Devtools",
6
6
  "author": "webfansplz",
@@ -56,31 +56,31 @@
56
56
  },
57
57
  "dependencies": {
58
58
  "@vueuse/core": "^10.1.2",
59
- "algoliasearch": "^4.17.0",
60
- "birpc": "^0.2.11",
59
+ "algoliasearch": "^4.17.1",
60
+ "birpc": "^0.2.12",
61
61
  "execa": "^7.1.1",
62
62
  "nanoid": "^4.0.2",
63
63
  "sirv": "^2.0.3",
64
64
  "splitpanes": "^3.1.5",
65
65
  "vite-hot-client": "^0.2.1",
66
- "vite-plugin-inspect": "^0.7.26",
67
- "vite-plugin-vue-inspector": "^3.4.1",
68
- "vue-router": "^4.1.6",
66
+ "vite-plugin-inspect": "^0.7.28",
67
+ "vite-plugin-vue-inspector": "^3.4.2",
68
+ "vue-router": "^4.2.2",
69
69
  "xterm": "^5.1.0",
70
70
  "xterm-addon-fit": "^0.7.0"
71
71
  },
72
72
  "devDependencies": {
73
- "@algolia/client-search": "^4.17.0",
73
+ "@algolia/client-search": "^4.17.1",
74
74
  "@antfu/eslint-config": "^0.38.5",
75
75
  "@antfu/ni": "^0.21.3",
76
- "@iconify/json": "^2.2.61",
77
- "@nuxt/devtools-ui-kit": "^0.4.5",
76
+ "@iconify/json": "^2.2.71",
77
+ "@nuxt/devtools-ui-kit": "^0.5.5",
78
78
  "@types/codemirror": "^5.60.7",
79
- "@types/node": "^20.1.0",
79
+ "@types/node": "^20.2.5",
80
80
  "@types/splitpanes": "^2.2.1",
81
- "@unocss/eslint-config": "^0.51.12",
82
- "@unocss/reset": "^0.51.12",
83
- "@vitejs/plugin-vue": "^4.2.1",
81
+ "@unocss/eslint-config": "^0.52.5",
82
+ "@unocss/reset": "^0.52.5",
83
+ "@vitejs/plugin-vue": "^4.2.3",
84
84
  "bumpp": "^9.1.0",
85
85
  "codemirror": "^6.0.1",
86
86
  "codemirror-theme-vars": "^0.1.2",
@@ -94,21 +94,21 @@
94
94
  "npm-run-all": "^4.1.5",
95
95
  "ohash": "^1.1.2",
96
96
  "pathe": "^1.1.0",
97
- "pinia": "^2.0.35",
98
- "pnpm": "^8.4.0",
99
- "rimraf": "^5.0.0",
97
+ "pinia": "^2.1.3",
98
+ "pnpm": "^8.6.0",
99
+ "rimraf": "^5.0.1",
100
100
  "simple-git-hooks": "^2.8.1",
101
101
  "typescript": "^5.0.4",
102
102
  "unbuild": "^1.2.1",
103
- "unocss": "^0.51.12",
104
- "unplugin-auto-import": "^0.15.3",
105
- "unplugin-vue-components": "^0.24.1",
103
+ "unocss": "^0.52.5",
104
+ "unplugin-auto-import": "^0.16.4",
105
+ "unplugin-vue-components": "^0.25.0",
106
106
  "vis-data": "^7.1.6",
107
107
  "vis-network": "^9.1.6",
108
- "vite": "^4.3.5",
108
+ "vite": "^4.3.9",
109
109
  "vite-dev-rpc": "^0.1.2",
110
- "vite-plugin-pages": "^0.29.0",
111
- "vue": "^3.2.47",
110
+ "vite-plugin-pages": "^0.30.1",
111
+ "vue": "^3.3.4",
112
112
  "vue-virtual-scroller": "2.0.0-beta.8"
113
113
  },
114
114
  "simple-git-hooks": {