@nuxt/devtools-nightly 0.0.0 → 2.0.0-beta.0-28940159.3b2c84c

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 (138) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +129 -0
  3. package/cli.mjs +2 -0
  4. package/dist/chunks/analyze-build.mjs +58 -0
  5. package/dist/chunks/module-main.mjs +2044 -0
  6. package/dist/chunks/plugin-metrics.mjs +68 -0
  7. package/dist/chunks/timeline.mjs +73 -0
  8. package/dist/chunks/vite-inspect.mjs +57 -0
  9. package/dist/chunks/vscode.mjs +195 -0
  10. package/dist/chunks/vue-devtools.mjs +30 -0
  11. package/dist/chunks/vue-inspector.mjs +15 -0
  12. package/dist/client/200.html +20 -0
  13. package/dist/client/404.html +20 -0
  14. package/dist/client/_nuxt/__blank-f4f9nu4d.js +1 -0
  15. package/dist/client/_nuxt/analyze-build-d4ocz87m.js +1 -0
  16. package/dist/client/_nuxt/assets-accfst8t.js +16 -0
  17. package/dist/client/_nuxt/assets.css-hmxl533k.css +1 -0
  18. package/dist/client/_nuxt/builds/latest.json +1 -0
  19. package/dist/client/_nuxt/builds/meta/078b774d-b96e-484e-b4d5-b349c23c7fd7.json +1 -0
  20. package/dist/client/_nuxt/c5gs2ah3.js +17 -0
  21. package/dist/client/_nuxt/client-ihvctios.js +1 -0
  22. package/dist/client/_nuxt/code-diff.vue-dfkrd13w.js +8 -0
  23. package/dist/client/_nuxt/code-snippets.vue-lcfqth8k.js +1 -0
  24. package/dist/client/_nuxt/components-oghrvkye.js +1 -0
  25. package/dist/client/_nuxt/components-tree-knr0y8qe.js +1 -0
  26. package/dist/client/_nuxt/composable-item.vue-lu13s905.js +1 -0
  27. package/dist/client/_nuxt/constants-b32h69zq.js +1 -0
  28. package/dist/client/_nuxt/custom-_name_-fup3n0cu.js +1 -0
  29. package/dist/client/_nuxt/default-i1yqd2to.js +1 -0
  30. package/dist/client/_nuxt/duration-display.vue-e5ntxkcx.js +1 -0
  31. package/dist/client/_nuxt/entry.css-kxi58hys.css +1 -0
  32. package/dist/client/_nuxt/error-404-ci0xzyd6.js +1 -0
  33. package/dist/client/_nuxt/error-404.css-b3x40x40.css +1 -0
  34. package/dist/client/_nuxt/error-500-ny17oe9i.js +1 -0
  35. package/dist/client/_nuxt/error-500.css-hilpkhd4.css +1 -0
  36. package/dist/client/_nuxt/error-nhdqe6i6.js +9 -0
  37. package/dist/client/_nuxt/filepath-item.vue-mcgdbj53.js +1 -0
  38. package/dist/client/_nuxt/full-nb67w4v9.js +1 -0
  39. package/dist/client/_nuxt/help-fab.css-ms50khsu.css +1 -0
  40. package/dist/client/_nuxt/help-fab.vue-opvnmtcj.js +1 -0
  41. package/dist/client/_nuxt/hooks-kfudy7r2.js +1 -0
  42. package/dist/client/_nuxt/imports-eo3khgic.js +1 -0
  43. package/dist/client/_nuxt/index-m4vf8cbo.js +2 -0
  44. package/dist/client/_nuxt/index-ow49s53n.js +1 -0
  45. package/dist/client/_nuxt/launch-page.vue-iesvi41s.js +1 -0
  46. package/dist/client/_nuxt/modules-bjoacevh.js +1 -0
  47. package/dist/client/_nuxt/nbadge-hknag3xt.js +1 -0
  48. package/dist/client/_nuxt/ncheckbox.vue-ms3v2bv8.js +1 -0
  49. package/dist/client/_nuxt/ncode-block.css-c9cb29at.css +1 -0
  50. package/dist/client/_nuxt/ncode-block.vue-ls06c06q.js +2 -0
  51. package/dist/client/_nuxt/ndrawer.vue-pawnvrjc.js +1 -0
  52. package/dist/client/_nuxt/ndropdown.vue-dbst6ukt.js +1 -0
  53. package/dist/client/_nuxt/nicon-title.vue-ipq3avx6.js +1 -0
  54. package/dist/client/_nuxt/nlink.vue-e8l6ggyt.js +1 -0
  55. package/dist/client/_nuxt/nmarkdown.vue-lp7ya0j6.js +1 -0
  56. package/dist/client/_nuxt/nnavbar.vue-lykocirm.js +1 -0
  57. package/dist/client/_nuxt/none-dgqlebv3.js +1 -0
  58. package/dist/client/_nuxt/nsection-block-o11p8ted.js +1 -0
  59. package/dist/client/_nuxt/nsection-block.css-e7kbjm7k.css +1 -0
  60. package/dist/client/_nuxt/nselect-tabs.vue-otuk7xnz.js +1 -0
  61. package/dist/client/_nuxt/nselect.vue-bjzfjabo.js +1 -0
  62. package/dist/client/_nuxt/open-graph-bfgokib7.js +3 -0
  63. package/dist/client/_nuxt/open-graph.css-e21qzmvj.css +1 -0
  64. package/dist/client/_nuxt/overview-klilnch0.js +1 -0
  65. package/dist/client/_nuxt/pages-jvi3fi1o.js +1 -0
  66. package/dist/client/_nuxt/payload-nznxtz0n.js +1 -0
  67. package/dist/client/_nuxt/pinia-dvjxs68v.js +1 -0
  68. package/dist/client/_nuxt/plugins-1i3hudxm.js +1 -0
  69. package/dist/client/_nuxt/runtime-configs-zuvf8944.js +1 -0
  70. package/dist/client/_nuxt/server-route-inputs.vue-mus15xmu.js +1 -0
  71. package/dist/client/_nuxt/server-routes-g18npbq7.js +9 -0
  72. package/dist/client/_nuxt/server-tasks-mvftg09y.js +1 -0
  73. package/dist/client/_nuxt/settings-hux8x7fu.js +1 -0
  74. package/dist/client/_nuxt/stacktrace-list.vue-k97c53ud.js +1 -0
  75. package/dist/client/_nuxt/state-components-hjf5pd61.js +1 -0
  76. package/dist/client/_nuxt/state-editor.vue-h67wwxtf.js +1 -0
  77. package/dist/client/_nuxt/state-modules-c2e21x4m.js +1 -0
  78. package/dist/client/_nuxt/storage-fh94um93.js +1 -0
  79. package/dist/client/_nuxt/terminals-l9qfrdfc.js +1 -0
  80. package/dist/client/_nuxt/terminals.css-mejv43xm.css +1 -0
  81. package/dist/client/_nuxt/timeline-cb92pqd1.js +31 -0
  82. package/dist/client/_nuxt/timeline.css-lhkpu01p.css +1 -0
  83. package/dist/client/_nuxt/unocss-runtime-jzfgcoxk.js +1 -0
  84. package/dist/client/_nuxt/vendor/json-editor-vue-c3wisb33.js +3818 -0
  85. package/dist/client/_nuxt/vendor/json-editor-vue.css-mqq5uooj.css +1 -0
  86. package/dist/client/_nuxt/vendor/markdown-it-fvu08dbs.js +16 -0
  87. package/dist/client/_nuxt/vendor/shiki-bnvxb5wv.js +147 -0
  88. package/dist/client/_nuxt/vendor/unocss-3uirpnla.js +2 -0
  89. package/dist/client/_nuxt/vendor/unocss.css-mhvipxpl.css +1 -0
  90. package/dist/client/_nuxt/vendor/vis-dlwijd5n.js +98 -0
  91. package/dist/client/_nuxt/vendor/xterm-dbpzgj7s.js +9 -0
  92. package/dist/client/_nuxt/vendor/xterm.css-egmhki83.css +32 -0
  93. package/dist/client/_nuxt/virtual-files-idfl2dwx.js +1 -0
  94. package/dist/client/_nuxt/virtual-files.css-gqpg2wnb.css +1 -0
  95. package/dist/client/_nuxt/vue-virtual-scroller.esm-md1d6mcg.js +2 -0
  96. package/dist/client/index.html +20 -0
  97. package/dist/client/nuxt.svg +3 -0
  98. package/dist/dirs.d.mts +7 -0
  99. package/dist/dirs.d.ts +7 -0
  100. package/dist/dirs.mjs +28 -0
  101. package/dist/module.cjs +5 -0
  102. package/dist/module.d.mts +9 -0
  103. package/dist/module.d.ts +9 -0
  104. package/dist/module.json +9 -0
  105. package/dist/module.mjs +6 -0
  106. package/dist/runtime/auth/index.html +76 -0
  107. package/dist/runtime/function-metrics-helpers.d.ts +3 -0
  108. package/dist/runtime/function-metrics-helpers.js +69 -0
  109. package/dist/runtime/nitro/inline.d.ts +3 -0
  110. package/dist/runtime/nitro/inline.js +6 -0
  111. package/dist/runtime/plugins/devtools.client.d.ts +2 -0
  112. package/dist/runtime/plugins/devtools.client.js +56 -0
  113. package/dist/runtime/plugins/devtools.server.d.ts +2 -0
  114. package/dist/runtime/plugins/devtools.server.js +7 -0
  115. package/dist/runtime/plugins/view/FrameBox.vue +167 -0
  116. package/dist/runtime/plugins/view/Main.vue +422 -0
  117. package/dist/runtime/plugins/view/client.d.ts +12 -0
  118. package/dist/runtime/plugins/view/client.js +332 -0
  119. package/dist/runtime/plugins/view/state.d.ts +5 -0
  120. package/dist/runtime/plugins/view/state.js +17 -0
  121. package/dist/runtime/plugins/view/utils.d.ts +31 -0
  122. package/dist/runtime/plugins/view/utils.js +156 -0
  123. package/dist/runtime/settings.d.ts +4 -0
  124. package/dist/runtime/settings.js +2 -0
  125. package/dist/runtime/shared/hooks.d.ts +2 -0
  126. package/dist/runtime/shared/hooks.js +33 -0
  127. package/dist/runtime/use-nuxt-devtools.d.ts +8 -0
  128. package/dist/runtime/use-nuxt-devtools.js +23 -0
  129. package/dist/runtime/vue-devtools/overlay.d.ts +1 -0
  130. package/dist/runtime/vue-devtools/overlay.js +8 -0
  131. package/dist/shared/devtools-nightly.2a48a9e5.d.mts +62 -0
  132. package/dist/shared/devtools-nightly.2a48a9e5.d.ts +62 -0
  133. package/dist/shared/devtools-nightly.5ac54dae.mjs +121 -0
  134. package/dist/types.d.mts +42 -0
  135. package/dist/types.d.ts +42 -0
  136. package/dist/types.mjs +1 -0
  137. package/package.json +123 -2
  138. package/types.d.ts +1 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022-PRESENT Nuxt Team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,129 @@
1
+ <a href="https://devtools.nuxt.com"><img width="1200" alt="Nuxt DevTools" src="https://github-production-user-asset-6210df.s3.amazonaws.com/904724/261577617-a10567bd-ad33-48cc-9bda-9e37dbe1929f.png"></a>
2
+ <br>
3
+
4
+ <h1>
5
+ Nuxt DevTools
6
+ </h1>
7
+
8
+ [![npm version][npm-version-src]][npm-version-href]
9
+ [![npm downloads][npm-downloads-src]][npm-downloads-href]
10
+ [![License][license-src]][license-href]
11
+ [![Nuxt][nuxt-src]][nuxt-href]
12
+ [![Volta][volta-src]][volta-href]
13
+
14
+ <p>
15
+ Unleash Nuxt Developer Experience.
16
+ <br>Nuxt DevTools is a set of visual tools that help you to know your app better.
17
+ </p>
18
+
19
+ <p>
20
+ <a href="https://nuxt.com/blog/nuxt-devtools-v1-0">👋 Introduction</a> |
21
+ <a href="https://github.com/nuxt/devtools/discussions/29">💡 Ideas & Suggestions</a> |
22
+ <a href="https://github.com/nuxt/devtools/discussions/31">🗺️ Project Roadmap</a> |
23
+ <a href="https://devtools.nuxt.com/">📚 Documentation</a>
24
+ </p>
25
+
26
+ <br>
27
+
28
+ > [!NOTE]
29
+ > You are viewing the v2.x branch which are in active development. For the latest stable version, please refer to the [v1.x branch](https://github.com/nuxt/devtools/tree/v1)
30
+
31
+ ## Installation
32
+
33
+ > Nuxt DevTools v2 requires **Nuxt v3.15.0 or higher**.
34
+
35
+ Nuxt DevTools is **enabled by default** in Nuxt v3.8.0. You can press <kbd>Shift</kbd> + <kbd>Alt</kbd> / <kbd>⇧ Shift</kbd> + <kbd>⌥ Option</kbd> + <kbd>D</kbd> in your app to open it up.
36
+
37
+ If you want to explicitly enable or disable Nuxt DevTools, you can update your `nuxt.config` with:
38
+
39
+ ```js
40
+ export default defineNuxtConfig({
41
+ devtools: {
42
+ enabled: true // or false to disable
43
+ }
44
+ })
45
+ ```
46
+
47
+ ### Nightly Release Channel
48
+
49
+ Similar to [Nuxt's Nightly Channel](https://nuxt.com/docs/guide/going-further/nightly-release-channel), DevTools also offers a nightly release channel, that automatically releases for every commit to `main` branch.
50
+
51
+ You can opt-in to the nightly release channel by running:
52
+
53
+ ```diff
54
+ {
55
+ "devDependencies": {
56
+ -- "@nuxt/devtools": "^0.1.0"
57
+ ++ "@nuxt/devtools": "npm:@nuxt/devtools-nightly@latest"
58
+ }
59
+ }
60
+ ```
61
+
62
+ Remove lockfile (`package-lock.json`, `yarn.lock`, or `pnpm-lock.yaml`) and reinstall dependencies.
63
+
64
+ ### Module Options
65
+
66
+ To configure Nuxt DevTools, you can pass the `devtools` options.
67
+
68
+ ```ts
69
+ // nuxt.config.ts
70
+ export default defineNuxtConfig({
71
+ devtools: {
72
+ // Enable devtools (default: true)
73
+ enabled: true,
74
+ // VS Code Server options
75
+ vscode: {},
76
+ // ...other options
77
+ }
78
+ })
79
+ ```
80
+
81
+ For all options available, please refer to TSDocs in your IDE, or the [type definition file](https://github.com/nuxt/devtools/blob/main/packages/devtools-kit/src/_types/options.ts).
82
+
83
+ ## Features
84
+
85
+ Read the [**Announcement Blog Post 🎊**](https://nuxt.com/blog/nuxt-devtools-v1-0) for why we built Nuxt DevTools and what it can do!
86
+
87
+ ## Module Authors
88
+
89
+ Please refer to the [Module Authors Guide](https://devtools.nuxt.com/module/guide).
90
+
91
+ ## Contribution Guide
92
+
93
+ Please refer to the [Contribution Guide](https://devtools.nuxt.com/development/contributing).
94
+
95
+ ## Anonymous Usage Analytics
96
+
97
+ Nuxt DevTools collects anonymous telemetry data about general usage. This helps us to accurately gauge feature usage and customization across all our users. This data will let us better understand how each features in Nuxt DevTools are used, measuring improvements made (DX and performances) and their relevance. It would also help us to prioritize our efforts and focus on the features that matter the most to our users.
98
+
99
+ Nuxt DevTools' telemetry data is piped through [Nuxt Telemetry](https://github.com/nuxt/telemetry), meaning that Nuxt DevTools will respect your local and global Nuxt Telemetry settings. You can also opt-out Nuxt DevTools' telemetry in the Nuxt DevTools settings.
100
+
101
+ The data we collect is completely anonymous, not traceable to the source (using hash+seed), and only meaningful in aggregate form. No data we collect is personally identifiable or trackable.
102
+
103
+ ### Events
104
+
105
+ On top of the [default Nuxt Telemetry events](https://github.com/nuxt/telemetry#events), Nuxt DevTools also collects the following events:
106
+
107
+ - Versions of Nuxt DevTools
108
+ - Navigations between tabs/feature
109
+ - This helps us to understand which features are used the most to prioritize our efforts.
110
+ - Browser and OS names and versions
111
+ - This helps us improve compatibility across different browsers and operating systems.
112
+ - Click event on some action buttons
113
+
114
+ ## License
115
+
116
+ [MIT](./LICENSE)
117
+
118
+ <!-- Badges -->
119
+
120
+ [npm-version-src]: https://img.shields.io/npm/v/@nuxt/devtools/latest.svg?style=flat&colorA=18181B&colorB=28CF8D
121
+ [npm-version-href]: https://npmjs.com/package/@nuxt/devtools
122
+ [npm-downloads-src]: https://img.shields.io/npm/dm/@nuxt/devtools.svg?style=flat&colorA=18181B&colorB=28CF8D
123
+ [npm-downloads-href]: https://npm.chart.dev/@nuxt/devtools
124
+ [license-src]: https://img.shields.io/npm/l/@nuxt/devtools.svg?style=flat&colorA=18181B&colorB=28CF8D
125
+ [license-href]: https://npmjs.com/package/@nuxt/devtools
126
+ [nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt.js
127
+ [nuxt-href]: https://nuxt.com
128
+ [volta-src]: https://user-images.githubusercontent.com/904724/209143798-32345f6c-3cf8-4e06-9659-f4ace4a6acde.svg
129
+ [volta-href]: https://volta.net/nuxt/devtools?utm_source=nuxt_devtools_readme
package/cli.mjs ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import('@nuxt/devtools-wizard')
@@ -0,0 +1,58 @@
1
+ import { addVitePlugin } from '@nuxt/kit';
2
+ import { resolve, join } from 'pathe';
3
+ import { readdir, lstat } from 'node:fs/promises';
4
+ import { createVitePluginInspect } from './vite-inspect.mjs';
5
+ import '@nuxt/devtools-kit';
6
+
7
+ async function getFolderSize(dir) {
8
+ const dirents = await readdir(dir, {
9
+ withFileTypes: true
10
+ });
11
+ if (dirents.length === 0)
12
+ return 0;
13
+ const files = [];
14
+ const directorys = [];
15
+ for (const dirent of dirents) {
16
+ if (dirent.isFile()) {
17
+ files.push(dirent);
18
+ continue;
19
+ }
20
+ if (dirent.isDirectory())
21
+ directorys.push(dirent);
22
+ }
23
+ const sizes = await Promise.all(
24
+ [
25
+ files.map(async (file) => {
26
+ const path = resolve(dir, file.name);
27
+ const { size } = await lstat(path);
28
+ return size;
29
+ }),
30
+ directorys.map((directory) => {
31
+ const path = resolve(dir, directory.name);
32
+ return getFolderSize(path);
33
+ })
34
+ ].flat()
35
+ );
36
+ return sizes.reduce((total, size) => total += size, 0);
37
+ }
38
+
39
+ async function setup(nuxt, options) {
40
+ if (options.viteInspect !== false) {
41
+ addVitePlugin(
42
+ await createVitePluginInspect({
43
+ build: true,
44
+ outputDir: join(nuxt.options.analyzeDir, ".vite-inspect")
45
+ })
46
+ );
47
+ }
48
+ nuxt.hook("build:analyze:done", async (meta) => {
49
+ const _meta = meta;
50
+ _meta.size = _meta.size || {};
51
+ const dirs = [join(meta.buildDir, "dist/client"), meta.outDir];
52
+ const [clientBundleSize, nitroBundleSize] = await Promise.all(dirs.map(getFolderSize));
53
+ _meta.size.clientBundle = clientBundleSize;
54
+ _meta.size.nitroBundle = nitroBundleSize;
55
+ });
56
+ }
57
+
58
+ export { setup };