@nuxt/devtools 0.1.4 → 0.1.6

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 (202) hide show
  1. package/README.md +2 -0
  2. package/dist/chunks/module-main.mjs +2 -2
  3. package/dist/chunks/vscode.mjs +67 -64
  4. package/dist/cli.mjs +354 -62
  5. package/dist/client/200.html +2 -2
  6. package/dist/client/404.html +2 -2
  7. package/dist/client/__inspecting/index.html +2 -2
  8. package/dist/client/_nuxt/Badge.d9b6d9b1.js +1 -0
  9. package/dist/client/_nuxt/FilepathItem.vue.31689a0a.js +1 -0
  10. package/dist/client/_nuxt/LaunchPage.vue.65011890.js +1 -0
  11. package/dist/client/_nuxt/{welcome.db724adb.css → NButton.db724adb.css} +0 -0
  12. package/dist/client/_nuxt/NButton.vue.56759fc1.js +113 -0
  13. package/dist/client/_nuxt/NIcon.vue.c1ad97a9.js +1 -0
  14. package/dist/client/_nuxt/NTextInput.vue.b6c079ee.js +1 -0
  15. package/dist/client/_nuxt/NuxtLogo.9303af79.js +1 -0
  16. package/dist/client/_nuxt/SectionBlock.48da9d80.css +1 -0
  17. package/dist/client/_nuxt/SectionBlock.885bbad5.js +1 -0
  18. package/dist/client/_nuxt/Settings.vue.dda6fcf5.js +1 -0
  19. package/dist/client/_nuxt/{StateEditor.989cce56.css → StateEditor.c82309e2.css} +1 -1
  20. package/dist/client/_nuxt/{StateEditor.vue.0d8adb50.js → StateEditor.vue.0f1b994b.js} +1 -1
  21. package/dist/client/_nuxt/StateEditor.vue.3374c6ec.js +1 -0
  22. package/dist/client/_nuxt/TabIcon.vue.8d3722ca.js +1 -0
  23. package/dist/client/_nuxt/__inspecting.6fe111b0.js +1 -0
  24. package/dist/client/_nuxt/asyncData.d544d421.js +1 -0
  25. package/dist/client/_nuxt/components.25d13f1f.js +1 -0
  26. package/dist/client/_nuxt/composables.80d3af7a.js +1 -0
  27. package/dist/client/_nuxt/context.b32078d3.js +1 -0
  28. package/dist/client/_nuxt/custom-_name_.14809d72.js +1 -0
  29. package/dist/client/_nuxt/default.7ecded8d.js +1 -0
  30. package/dist/client/_nuxt/editor.b2159474.js +1 -0
  31. package/dist/client/_nuxt/entry.43bdd1fb.css +1 -0
  32. package/dist/client/_nuxt/entry.b1094864.js +5 -0
  33. package/dist/client/_nuxt/error-404.2ee33711.js +1 -0
  34. package/dist/client/_nuxt/error-500.ef980084.js +1 -0
  35. package/dist/client/_nuxt/error-component.7b202115.js +3 -0
  36. package/dist/client/_nuxt/hooks.ca7ea52c.js +1 -0
  37. package/dist/client/_nuxt/imports.f7013fa4.js +1 -0
  38. package/dist/client/_nuxt/index.2ad8ed93.js +1 -0
  39. package/dist/client/_nuxt/layouts.b684dcc1.js +1 -0
  40. package/dist/client/_nuxt/middleware.e10aa06d.js +1 -0
  41. package/dist/client/_nuxt/modules.0b22b757.js +1 -0
  42. package/dist/client/_nuxt/none.38bfd553.js +1 -0
  43. package/dist/client/_nuxt/nuxt-link.752dfef9.js +1 -0
  44. package/dist/client/_nuxt/overview.d488d202.js +1 -0
  45. package/dist/client/_nuxt/pages.22ce604b.js +1 -0
  46. package/dist/client/_nuxt/payload.5372dcff.js +1 -0
  47. package/dist/client/_nuxt/plugins.f9b29762.js +1 -0
  48. package/dist/client/_nuxt/runtime-configs.99425f61.js +1 -0
  49. package/dist/client/_nuxt/server-routes.763958ec.js +1 -0
  50. package/dist/client/_nuxt/state.65ceafcf.js +1 -0
  51. package/dist/client/_nuxt/unocss-runtime.c4939419.js +2 -0
  52. package/dist/client/_nuxt/{virtual-files.53d6f968.js → virtual-files.13f3141f.js} +8 -8
  53. package/dist/client/index.html +2 -2
  54. package/dist/client/modules/components/index.html +2 -2
  55. package/dist/client/modules/hooks/index.html +2 -2
  56. package/dist/client/modules/imports/index.html +2 -2
  57. package/dist/client/modules/layouts/index.html +2 -2
  58. package/dist/client/modules/middleware/index.html +2 -2
  59. package/dist/client/modules/modules/index.html +2 -2
  60. package/dist/client/modules/overview/index.html +2 -2
  61. package/dist/client/modules/pages/index.html +2 -2
  62. package/dist/client/modules/payload/index.html +2 -2
  63. package/dist/client/modules/plugins/index.html +2 -2
  64. package/dist/client/modules/runtime-configs/index.html +2 -2
  65. package/dist/client/modules/server-routes/index.html +2 -2
  66. package/dist/client/modules/virtual-files/index.html +2 -2
  67. package/dist/module.json +1 -1
  68. package/dist/module.mjs +30 -6
  69. package/dist/shared/{devtools.b5fb0de8.mjs → devtools.e6742cbd.mjs} +1 -1
  70. package/package.json +31 -29
  71. package/dist/client/_nuxt/Badge.e080ea4a.js +0 -1
  72. package/dist/client/_nuxt/ComponentItem.c17d2931.js +0 -1
  73. package/dist/client/_nuxt/ComponentItem.vue.3441f37f.js +0 -1
  74. package/dist/client/_nuxt/ComponentsGraph.4d50b4fe.js +0 -1
  75. package/dist/client/_nuxt/ComponentsGraph.vue.5b3b134e.js +0 -1
  76. package/dist/client/_nuxt/ComponentsList.ac84bcd1.js +0 -1
  77. package/dist/client/_nuxt/ComponentsList.vue.c704cf24.js +0 -1
  78. package/dist/client/_nuxt/ComposableItem.72806cd2.js +0 -1
  79. package/dist/client/_nuxt/ComposableItem.vue.90cd23bc.js +0 -1
  80. package/dist/client/_nuxt/ComposableTree.43de28f8.js +0 -1
  81. package/dist/client/_nuxt/ComposableTree.vue.808503d9.js +0 -1
  82. package/dist/client/_nuxt/CurrentRoute.e8d5b2cb.js +0 -1
  83. package/dist/client/_nuxt/Drawer.583a0aa3.js +0 -1
  84. package/dist/client/_nuxt/Drawer.vue.30b0fc28.js +0 -1
  85. package/dist/client/_nuxt/DrawerItem.e2effddf.js +0 -1
  86. package/dist/client/_nuxt/DrawerItem.vue.8cadb3c9.js +0 -1
  87. package/dist/client/_nuxt/FileIcon.68b82ecb.js +0 -1
  88. package/dist/client/_nuxt/FileIcon.vue.3bb914bc.js +0 -1
  89. package/dist/client/_nuxt/FilepathItem.8049add8.js +0 -1
  90. package/dist/client/_nuxt/FilepathItem.vue.811409e2.js +0 -1
  91. package/dist/client/_nuxt/HooksTable.59d897cb.js +0 -1
  92. package/dist/client/_nuxt/HooksTable.vue.6b9004ef.js +0 -1
  93. package/dist/client/_nuxt/IconTitle.f576cbf3.js +0 -1
  94. package/dist/client/_nuxt/IconTitle.vue.dfa8cbcf.js +0 -1
  95. package/dist/client/_nuxt/IframeView.13e136bd.js +0 -1
  96. package/dist/client/_nuxt/IframeView.vue.6843a7fa.js +0 -1
  97. package/dist/client/_nuxt/LaunchPage.e39fe420.js +0 -1
  98. package/dist/client/_nuxt/LaunchPage.vue.6be17436.js +0 -1
  99. package/dist/client/_nuxt/ModuleItem.8c304e21.js +0 -1
  100. package/dist/client/_nuxt/ModuleItem.vue.2d131549.js +0 -1
  101. package/dist/client/_nuxt/ModuleTreeNode.78ca9ece.js +0 -1
  102. package/dist/client/_nuxt/NButton.13233a1a.js +0 -1
  103. package/dist/client/_nuxt/NButton.vue.e86a98c0.js +0 -1
  104. package/dist/client/_nuxt/NCard.7a4e503f.js +0 -1
  105. package/dist/client/_nuxt/NCheckbox.2da82abb.js +0 -1
  106. package/dist/client/_nuxt/NCheckbox.vue.f058658a.js +0 -1
  107. package/dist/client/_nuxt/NDarkToggle.b7397b85.js +0 -1
  108. package/dist/client/_nuxt/NDarkToggle.vue.104b9df7.js +0 -1
  109. package/dist/client/_nuxt/NDialog.ff796c22.js +0 -7
  110. package/dist/client/_nuxt/NDropdown.6e99be47.js +0 -1
  111. package/dist/client/_nuxt/NIcon.62a6a6a2.js +0 -1
  112. package/dist/client/_nuxt/NIcon.vue.5c5f9ae0.js +0 -1
  113. package/dist/client/_nuxt/NLink.f8b21877.js +0 -1
  114. package/dist/client/_nuxt/NLink.vue.0f719ab9.js +0 -1
  115. package/dist/client/_nuxt/NRadio.8c217808.js +0 -1
  116. package/dist/client/_nuxt/NSwitch.ea9c119a.js +0 -1
  117. package/dist/client/_nuxt/NSwitch.vue.a7a200ce.js +0 -1
  118. package/dist/client/_nuxt/NTextInput.48fb0a25.js +0 -1
  119. package/dist/client/_nuxt/NTextInput.vue.5d4d2524.js +0 -1
  120. package/dist/client/_nuxt/NTip.d9c4666f.js +0 -1
  121. package/dist/client/_nuxt/Notification.287365de.js +0 -1
  122. package/dist/client/_nuxt/Notification.vue.dd7d98d5.js +0 -1
  123. package/dist/client/_nuxt/NuxtContentLogo.447522e5.js +0 -1
  124. package/dist/client/_nuxt/NuxtExampleLayout.06f6d250.js +0 -1
  125. package/dist/client/_nuxt/NuxtLogo.b27dc990.js +0 -1
  126. package/dist/client/_nuxt/PluginItem.6a55c130.js +0 -1
  127. package/dist/client/_nuxt/PluginItem.vue.6e1d1965.js +0 -1
  128. package/dist/client/_nuxt/RoutePathItem.b209a7cb.js +0 -1
  129. package/dist/client/_nuxt/RoutePathItem.vue.90d1f11a.js +0 -1
  130. package/dist/client/_nuxt/RoutesTable.ffa3adf9.js +0 -1
  131. package/dist/client/_nuxt/RoutesTable.vue.1bbafbda.js +0 -1
  132. package/dist/client/_nuxt/SectionBlock.082cb101.css +0 -1
  133. package/dist/client/_nuxt/SectionBlock.2e26af4b.js +0 -1
  134. package/dist/client/_nuxt/Settings.a15dbb2e.js +0 -1
  135. package/dist/client/_nuxt/Settings.vue.f2a6e99c.js +0 -1
  136. package/dist/client/_nuxt/StateEditor.fd549a9f.js +0 -1
  137. package/dist/client/_nuxt/StateEditor.vue.ead0fa52.js +0 -1
  138. package/dist/client/_nuxt/StateGroup.bcb980bd.js +0 -1
  139. package/dist/client/_nuxt/StateGroup.vue.c133a773.js +0 -1
  140. package/dist/client/_nuxt/TabIcon.e55b5a67.js +0 -1
  141. package/dist/client/_nuxt/TabIcon.vue.adac3b56.js +0 -1
  142. package/dist/client/_nuxt/UnoIcon.3132b92a.js +0 -1
  143. package/dist/client/_nuxt/__inspecting.a43a7f80.js +0 -1
  144. package/dist/client/_nuxt/app.config.12fdda03.js +0 -1
  145. package/dist/client/_nuxt/asyncData.518fdb22.js +0 -1
  146. package/dist/client/_nuxt/client-only.f9d053f8.js +0 -4
  147. package/dist/client/_nuxt/client.210463dc.js +0 -1
  148. package/dist/client/_nuxt/color-mode-options.00c15dd1.js +0 -1
  149. package/dist/client/_nuxt/component.vue3.02eb71f6.js +0 -1
  150. package/dist/client/_nuxt/components.4f55e0db.js +0 -1
  151. package/dist/client/_nuxt/components.84a4af12.js +0 -1
  152. package/dist/client/_nuxt/components.client.e93eaead.js +0 -113
  153. package/dist/client/_nuxt/composables.2b96933d.js +0 -1
  154. package/dist/client/_nuxt/composables.59ebbb45.js +0 -1
  155. package/dist/client/_nuxt/context.c20dc632.js +0 -1
  156. package/dist/client/_nuxt/custom-_name_.2cdb4455.js +0 -1
  157. package/dist/client/_nuxt/default.585c2af8.js +0 -1
  158. package/dist/client/_nuxt/defu.5a7c1433.js +0 -1
  159. package/dist/client/_nuxt/dev-only.32de73cb.js +0 -1
  160. package/dist/client/_nuxt/editor.45ea8ca4.js +0 -1
  161. package/dist/client/_nuxt/entry.6e08c3bd.css +0 -1
  162. package/dist/client/_nuxt/entry.72ee2736.js +0 -1
  163. package/dist/client/_nuxt/error-404.bf8933d3.js +0 -1
  164. package/dist/client/_nuxt/error-500.fe852534.js +0 -1
  165. package/dist/client/_nuxt/error-component.0aa3c1f1.js +0 -3
  166. package/dist/client/_nuxt/error.ab352ad9.js +0 -1
  167. package/dist/client/_nuxt/hooks.da36eba4.js +0 -1
  168. package/dist/client/_nuxt/imports.05a63875.js +0 -1
  169. package/dist/client/_nuxt/index.bf1af76f.js +0 -1
  170. package/dist/client/_nuxt/index.d56af0a0.js +0 -1
  171. package/dist/client/_nuxt/index.e1377d3f.js +0 -1
  172. package/dist/client/_nuxt/index.e7819c37.js +0 -1
  173. package/dist/client/_nuxt/layout.f6e6e706.js +0 -1
  174. package/dist/client/_nuxt/layouts.ed44bf26.js +0 -1
  175. package/dist/client/_nuxt/middleware.42780100.js +0 -1
  176. package/dist/client/_nuxt/modules.58ec9d96.js +0 -1
  177. package/dist/client/_nuxt/none.a36fcb53.js +0 -1
  178. package/dist/client/_nuxt/nuxt-error-boundary.70c75848.js +0 -1
  179. package/dist/client/_nuxt/nuxt-link.ed65b9da.js +0 -1
  180. package/dist/client/_nuxt/nuxt-loading-indicator.366d3e52.js +0 -1
  181. package/dist/client/_nuxt/nuxt.21217109.js +0 -1
  182. package/dist/client/_nuxt/overview.c0a9db52.js +0 -1
  183. package/dist/client/_nuxt/page.fb94fd70.js +0 -1
  184. package/dist/client/_nuxt/pages.ca7b2f77.js +0 -1
  185. package/dist/client/_nuxt/payload.78a6e729.js +0 -1
  186. package/dist/client/_nuxt/plugins.48c9acc3.js +0 -1
  187. package/dist/client/_nuxt/router.96f0ba10.js +0 -1
  188. package/dist/client/_nuxt/rpc.2e6b297d.js +0 -1
  189. package/dist/client/_nuxt/runtime-configs.1c27e6f2.js +0 -1
  190. package/dist/client/_nuxt/runtime-core.esm-bundler.ad888d46.js +0 -1
  191. package/dist/client/_nuxt/runtime-dom.esm-bundler.c94e30c4.js +0 -1
  192. package/dist/client/_nuxt/server-placeholder.ba9b9f8a.js +0 -1
  193. package/dist/client/_nuxt/server-routes.de3e707e.js +0 -1
  194. package/dist/client/_nuxt/state.2c41a47c.js +0 -1
  195. package/dist/client/_nuxt/state.85e68c45.js +0 -1
  196. package/dist/client/_nuxt/storage.abd6f5f8.js +0 -1
  197. package/dist/client/_nuxt/unocss-runtime.1d429fd2.js +0 -2
  198. package/dist/client/_nuxt/utils.1c789938.js +0 -1
  199. package/dist/client/_nuxt/utils.8ee5a573.js +0 -5
  200. package/dist/client/_nuxt/welcome.11fc1574.js +0 -1
  201. package/dist/shared/devtools.38b2468f.mjs +0 -337
  202. package/dist/shared/devtools.cce722d0.mjs +0 -68
package/dist/cli.mjs CHANGED
@@ -1,102 +1,393 @@
1
1
  import fs__default from 'fs';
2
- import require$$1 from 'os';
3
2
  import consola from 'consola';
4
3
  import { execa } from 'execa';
5
4
  import { readUser, writeUser } from 'rc9';
6
- import { g as globalDirs } from './shared/devtools.38b2468f.mjs';
5
+ import require$$1 from 'path';
6
+ import require$$1$1 from 'os';
7
7
  import { resolve } from 'pathe';
8
- import { n as name } from './shared/devtools.b5fb0de8.mjs';
9
- import 'path';
8
+ import { n as name } from './shared/devtools.e6742cbd.mjs';
10
9
 
11
- const RC_PATH = ".nuxtrc";
12
- function enable(path, modulePath) {
13
- const rc = readUser(RC_PATH);
14
- let changed = false;
15
- const esmPath = resolve(modulePath, "dist", "module.mjs");
16
- const cjsPath = resolve(modulePath, "module.cjs");
17
- const removePaths = [
18
- modulePath,
19
- esmPath
20
- ];
21
- if (require$$1.platform() === "win32") {
22
- removePaths.push(
23
- modulePath.replace(/\\/g, "/"),
24
- esmPath.replace(/\\/g, "/"),
25
- cjsPath
26
- );
10
+ var globalDirs = {};
11
+
12
+ const { hasOwnProperty } = Object.prototype;
13
+
14
+ const eol = typeof process !== 'undefined' &&
15
+ process.platform === 'win32' ? '\r\n' : '\n';
16
+
17
+ const encode = (obj, opt) => {
18
+ const children = [];
19
+ let out = '';
20
+
21
+ if (typeof opt === 'string') {
22
+ opt = {
23
+ section: opt,
24
+ whitespace: false,
25
+ };
26
+ } else {
27
+ opt = opt || Object.create(null);
28
+ opt.whitespace = opt.whitespace === true;
27
29
  }
28
- const targetPath = cjsPath.replace(/\\/g, "/");
29
- if (!fs__default.existsSync(targetPath))
30
- throw new Error("Failed to locate the global Nuxt Devtools module. You may try it again");
31
- if (rc.modules && Array.isArray(rc.modules)) {
32
- rc.modules = rc.modules.filter((i) => {
33
- const result = !removePaths.includes(i);
34
- if (!result)
35
- changed = true;
36
- return result;
30
+
31
+ const separator = opt.whitespace ? ' = ' : '=';
32
+
33
+ for (const k of Object.keys(obj)) {
34
+ const val = obj[k];
35
+ if (val && Array.isArray(val)) {
36
+ for (const item of val)
37
+ out += safe(k + '[]') + separator + safe(item) + '\n';
38
+ } else if (val && typeof val === 'object')
39
+ children.push(k);
40
+ else
41
+ out += safe(k) + separator + safe(val) + eol;
42
+ }
43
+
44
+ if (opt.section && out.length)
45
+ out = '[' + safe(opt.section) + ']' + eol + out;
46
+
47
+ for (const k of children) {
48
+ const nk = dotSplit(k).join('\\.');
49
+ const section = (opt.section ? opt.section + '.' : '') + nk;
50
+ const { whitespace } = opt;
51
+ const child = encode(obj[k], {
52
+ section,
53
+ whitespace,
37
54
  });
55
+ if (out.length && child.length)
56
+ out += eol;
57
+
58
+ out += child;
38
59
  }
39
- if (!rc.modules?.includes(targetPath)) {
40
- rc.modules = [...rc.modules || [], targetPath];
41
- changed = true;
60
+
61
+ return out
62
+ };
63
+
64
+ const dotSplit = str =>
65
+ str.replace(/\1/g, '\u0002LITERAL\\1LITERAL\u0002')
66
+ .replace(/\\\./g, '\u0001')
67
+ .split(/\./)
68
+ .map(part =>
69
+ part.replace(/\1/g, '\\.')
70
+ .replace(/\2LITERAL\\1LITERAL\2/g, '\u0001'));
71
+
72
+ const decode = str => {
73
+ const out = Object.create(null);
74
+ let p = out;
75
+ let section = null;
76
+ // section |key = value
77
+ const re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;
78
+ const lines = str.split(/[\r\n]+/g);
79
+
80
+ for (const line of lines) {
81
+ if (!line || line.match(/^\s*[;#]/))
82
+ continue
83
+ const match = line.match(re);
84
+ if (!match)
85
+ continue
86
+ if (match[1] !== undefined) {
87
+ section = unsafe(match[1]);
88
+ if (section === '__proto__') {
89
+ // not allowed
90
+ // keep parsing the section, but don't attach it.
91
+ p = Object.create(null);
92
+ continue
93
+ }
94
+ p = out[section] = out[section] || Object.create(null);
95
+ continue
96
+ }
97
+ const keyRaw = unsafe(match[2]);
98
+ const isArray = keyRaw.length > 2 && keyRaw.slice(-2) === '[]';
99
+ const key = isArray ? keyRaw.slice(0, -2) : keyRaw;
100
+ if (key === '__proto__')
101
+ continue
102
+ const valueRaw = match[3] ? unsafe(match[4]) : true;
103
+ const value = valueRaw === 'true' ||
104
+ valueRaw === 'false' ||
105
+ valueRaw === 'null' ? JSON.parse(valueRaw)
106
+ : valueRaw;
107
+
108
+ // Convert keys with '[]' suffix to an array
109
+ if (isArray) {
110
+ if (!hasOwnProperty.call(p, key))
111
+ p[key] = [];
112
+ else if (!Array.isArray(p[key]))
113
+ p[key] = [p[key]];
114
+ }
115
+
116
+ // safeguard against resetting a previously defined
117
+ // array by accidentally forgetting the brackets
118
+ if (Array.isArray(p[key]))
119
+ p[key].push(value);
120
+ else
121
+ p[key] = value;
122
+ }
123
+
124
+ // {a:{y:1},"a.b":{x:2}} --> {a:{y:1,b:{x:2}}}
125
+ // use a filter to return the keys that have to be deleted.
126
+ const remove = [];
127
+ for (const k of Object.keys(out)) {
128
+ if (!hasOwnProperty.call(out, k) ||
129
+ typeof out[k] !== 'object' ||
130
+ Array.isArray(out[k]))
131
+ continue
132
+
133
+ // see if the parent section is also an object.
134
+ // if so, add it to that, and mark this one for deletion
135
+ const parts = dotSplit(k);
136
+ let p = out;
137
+ const l = parts.pop();
138
+ const nl = l.replace(/\\\./g, '.');
139
+ for (const part of parts) {
140
+ if (part === '__proto__')
141
+ continue
142
+ if (!hasOwnProperty.call(p, part) || typeof p[part] !== 'object')
143
+ p[part] = Object.create(null);
144
+ p = p[part];
145
+ }
146
+ if (p === out && nl === l)
147
+ continue
148
+
149
+ p[nl] = out[k];
150
+ remove.push(k);
151
+ }
152
+ for (const del of remove)
153
+ delete out[del];
154
+
155
+ return out
156
+ };
157
+
158
+ const isQuoted = val =>
159
+ (val.charAt(0) === '"' && val.slice(-1) === '"') ||
160
+ (val.charAt(0) === "'" && val.slice(-1) === "'");
161
+
162
+ const safe = val =>
163
+ (typeof val !== 'string' ||
164
+ val.match(/[=\r\n]/) ||
165
+ val.match(/^\[/) ||
166
+ (val.length > 1 &&
167
+ isQuoted(val)) ||
168
+ val !== val.trim())
169
+ ? JSON.stringify(val)
170
+ : val.replace(/;/g, '\\;').replace(/#/g, '\\#');
171
+
172
+ const unsafe = (val, doUnesc) => {
173
+ val = (val || '').trim();
174
+ if (isQuoted(val)) {
175
+ // remove the single quotes before calling JSON.parse
176
+ if (val.charAt(0) === "'")
177
+ val = val.substr(1, val.length - 2);
178
+
179
+ try {
180
+ val = JSON.parse(val);
181
+ } catch (_) {}
182
+ } else {
183
+ // walk the val to find the first not-escaped ; character
184
+ let esc = false;
185
+ let unesc = '';
186
+ for (let i = 0, l = val.length; i < l; i++) {
187
+ const c = val.charAt(i);
188
+ if (esc) {
189
+ if ('\\;#'.indexOf(c) !== -1)
190
+ unesc += c;
191
+ else
192
+ unesc += '\\' + c;
193
+
194
+ esc = false;
195
+ } else if (';#'.indexOf(c) !== -1)
196
+ break
197
+ else if (c === '\\')
198
+ esc = true;
199
+ else
200
+ unesc += c;
201
+ }
202
+ if (esc)
203
+ unesc += '\\';
204
+
205
+ return unesc.trim()
42
206
  }
207
+ return val
208
+ };
209
+
210
+ var ini = {
211
+ parse: decode,
212
+ decode,
213
+ stringify: encode,
214
+ encode,
215
+ safe,
216
+ unsafe,
217
+ };
218
+
219
+ (function (exports) {
220
+ const path = require$$1;
221
+ const os = require$$1$1;
222
+ const fs = fs__default;
223
+ const ini$1 = ini;
224
+
225
+ const isWindows = process.platform === 'win32';
226
+
227
+ const readRc = filePath => {
228
+ try {
229
+ return ini$1.parse(fs.readFileSync(filePath, 'utf8')).prefix;
230
+ } catch {}
231
+ };
232
+
233
+ const getEnvNpmPrefix = () => {
234
+ // TODO: Remove the `.reduce` call.
235
+ // eslint-disable-next-line unicorn/no-array-reduce
236
+ return Object.keys(process.env).reduce((prefix, name) => {
237
+ return /^npm_config_prefix$/i.test(name) ? process.env[name] : prefix;
238
+ }, undefined);
239
+ };
240
+
241
+ const getGlobalNpmrc = () => {
242
+ if (isWindows && process.env.APPDATA) {
243
+ // Hardcoded contents of `c:\Program Files\nodejs\node_modules\npm\npmrc`
244
+ return path.join(process.env.APPDATA, '/npm/etc/npmrc');
245
+ }
246
+
247
+ // Homebrew special case: `$(brew --prefix)/lib/node_modules/npm/npmrc`
248
+ if (process.execPath.includes('/Cellar/node')) {
249
+ const homebrewPrefix = process.execPath.slice(0, process.execPath.indexOf('/Cellar/node'));
250
+ return path.join(homebrewPrefix, '/lib/node_modules/npm/npmrc');
251
+ }
252
+
253
+ if (process.execPath.endsWith('/bin/node')) {
254
+ const installDir = path.dirname(path.dirname(process.execPath));
255
+ return path.join(installDir, '/etc/npmrc');
256
+ }
257
+ };
258
+
259
+ const getDefaultNpmPrefix = () => {
260
+ if (isWindows) {
261
+ const {APPDATA} = process.env;
262
+ // `c:\node\node.exe` → `prefix=c:\node\`
263
+ return APPDATA ? path.join(APPDATA, 'npm') : path.dirname(process.execPath);
264
+ }
265
+
266
+ // `/usr/local/bin/node` → `prefix=/usr/local`
267
+ return path.dirname(path.dirname(process.execPath));
268
+ };
269
+
270
+ const getNpmPrefix = () => {
271
+ const envPrefix = getEnvNpmPrefix();
272
+ if (envPrefix) {
273
+ return envPrefix;
274
+ }
275
+
276
+ const homePrefix = readRc(path.join(os.homedir(), '.npmrc'));
277
+ if (homePrefix) {
278
+ return homePrefix;
279
+ }
280
+
281
+ if (process.env.PREFIX) {
282
+ return process.env.PREFIX;
283
+ }
284
+
285
+ const globalPrefix = readRc(getGlobalNpmrc());
286
+ if (globalPrefix) {
287
+ return globalPrefix;
288
+ }
289
+
290
+ return getDefaultNpmPrefix();
291
+ };
292
+
293
+ const npmPrefix = path.resolve(getNpmPrefix());
294
+
295
+ const getYarnWindowsDirectory = () => {
296
+ if (isWindows && process.env.LOCALAPPDATA) {
297
+ const dir = path.join(process.env.LOCALAPPDATA, 'Yarn');
298
+ if (fs.existsSync(dir)) {
299
+ return dir;
300
+ }
301
+ }
302
+
303
+ return false;
304
+ };
305
+
306
+ const getYarnPrefix = () => {
307
+ if (process.env.PREFIX) {
308
+ return process.env.PREFIX;
309
+ }
310
+
311
+ const windowsPrefix = getYarnWindowsDirectory();
312
+ if (windowsPrefix) {
313
+ return windowsPrefix;
314
+ }
315
+
316
+ const configPrefix = path.join(os.homedir(), '.config/yarn');
317
+ if (fs.existsSync(configPrefix)) {
318
+ return configPrefix;
319
+ }
320
+
321
+ const homePrefix = path.join(os.homedir(), '.yarn-config');
322
+ if (fs.existsSync(homePrefix)) {
323
+ return homePrefix;
324
+ }
325
+
326
+ // Yarn supports the npm conventions but the inverse is not true
327
+ return npmPrefix;
328
+ };
329
+
330
+ exports.npm = {};
331
+ exports.npm.prefix = npmPrefix;
332
+ exports.npm.packages = path.join(npmPrefix, isWindows ? 'node_modules' : 'lib/node_modules');
333
+ exports.npm.binaries = isWindows ? npmPrefix : path.join(npmPrefix, 'bin');
334
+
335
+ const yarnPrefix = path.resolve(getYarnPrefix());
336
+ exports.yarn = {};
337
+ exports.yarn.prefix = yarnPrefix;
338
+ exports.yarn.packages = path.join(yarnPrefix, getYarnWindowsDirectory() ? 'Data/global/node_modules' : 'global/node_modules');
339
+ exports.yarn.binaries = path.join(exports.yarn.packages, '.bin');
340
+ } (globalDirs));
341
+
342
+ const RC_PATH = ".nuxtrc";
343
+ function enable(rc, path) {
344
+ const modulePath = resolve(globalDirs.npm.packages, name);
345
+ const targetPath = resolve(modulePath, "module.cjs").replace(/\\/g, "/");
346
+ if (!fs__default.existsSync(targetPath))
347
+ throw new Error("Failed to locate the global Nuxt Devtools module. You may try it again");
348
+ removeModule(rc);
349
+ if (!rc.modules?.includes(targetPath))
350
+ rc.modules = [...rc.modules || [], targetPath];
43
351
  if (!rc.devtoolsGlobal)
44
352
  rc.devtoolsGlobal = {};
45
353
  if (!rc.devtoolsGlobal.projects)
46
354
  rc.devtoolsGlobal.projects = [];
47
- if (!rc.devtoolsGlobal.projects.includes(path)) {
355
+ if (!rc.devtoolsGlobal.projects.includes(path))
48
356
  rc.devtoolsGlobal.projects.push(path);
49
- changed = true;
50
- }
51
- if (changed)
52
- writeUser(rc, RC_PATH);
53
- return changed;
54
357
  }
55
- function disable(path) {
56
- const rc = readUser(RC_PATH);
358
+ function disable(rc, path) {
57
359
  if (rc.devtoolsGlobal?.projects?.includes(path)) {
58
360
  rc.devtoolsGlobal.projects = rc.devtoolsGlobal.projects.filter((p) => p !== path);
59
- writeUser(rc, RC_PATH);
60
361
  return true;
61
362
  }
363
+ if (!rc.devtoolsGlobal.projects?.length)
364
+ removeModule(rc);
62
365
  return false;
63
366
  }
64
- function remove(modulePath) {
65
- const rc = readUser(RC_PATH);
66
- const esmPath = resolve(modulePath, "dist", "module.mjs");
67
- const cjsPath = resolve(modulePath, "module.cjs");
68
- const removePaths = [
69
- modulePath,
70
- esmPath,
71
- cjsPath,
72
- modulePath.replace(/\\/g, "/"),
73
- esmPath.replace(/\\/g, "/"),
74
- cjsPath.replace(/\\/g, "/")
75
- ];
76
- rc.modules = (rc.modules || []).filter((p) => !removePaths.includes(p));
77
- writeUser(rc, RC_PATH);
367
+ const pathRegex = /[\\\/]@nuxt[\\\/]devtools[\\\/]/;
368
+ function removeModule(rc) {
369
+ if (Array.isArray(rc.modules))
370
+ rc.modules = rc.modules.filter((p) => !p.match(pathRegex));
78
371
  return true;
79
372
  }
80
373
  async function run() {
81
374
  const args = process.argv.slice(2);
82
375
  const command = args[0];
83
376
  const cwd = process.cwd();
84
- const modulePath = resolve(globalDirs.npm.packages, name);
377
+ const rc = readUser(RC_PATH);
85
378
  if (command === "enable") {
86
379
  consola.info("Installed Nuxt Devtools...");
87
380
  await execa("npm", ["install", "-g", `${name}@latest`], { stdio: "inherit" });
88
- if (enable(cwd, modulePath))
89
- consola.info("Nuxt Devtools enabled! Restart your Nuxt app to start using it.");
90
- else
91
- consola.warn("Nuxt Devtools is already enabled for this project.");
381
+ enable(rc, cwd);
382
+ consola.info("Nuxt Devtools enabled! Restart your Nuxt app to start using it.");
92
383
  } else if (command === "disable") {
93
384
  const isRemove = args.includes("--remove");
94
- if (disable(cwd))
385
+ if (disable(rc, cwd))
95
386
  consola.success("Nuxt Devtools disabled for this project.");
96
387
  else if (!isRemove)
97
388
  consola.warn("Nuxt Devtools is not enabled for this project.");
98
389
  if (isRemove) {
99
- remove(modulePath);
390
+ removeModule(rc);
100
391
  consola.success("Nuxt Devtools is removed globally");
101
392
  }
102
393
  } else if (!command) {
@@ -106,6 +397,7 @@ async function run() {
106
397
  consola.log(`Unknown command "${command}"`);
107
398
  process.exit(1);
108
399
  }
400
+ writeUser(rc, RC_PATH);
109
401
  }
110
402
  run().catch((err) => {
111
403
  consola.error(err);
@@ -1,7 +1,7 @@
1
1
  <!DOCTYPE html>
2
2
  <html >
3
3
  <head><meta charset="utf-8">
4
- <meta name="viewport" content="width=device-width, initial-scale=1"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/entry.72ee2736.js"><link rel="preload" as="style" href="/__nuxt_devtools__/client/_nuxt/entry.6e08c3bd.css"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/runtime-dom.esm-bundler.c94e30c4.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/runtime-core.esm-bundler.ad888d46.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/index.d56af0a0.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/router.96f0ba10.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/nuxt.21217109.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/utils.8ee5a573.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error.ab352ad9.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/state.2c41a47c.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/layout.f6e6e706.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/nuxt-link.ed65b9da.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/app.config.12fdda03.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/defu.5a7c1433.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/storage.abd6f5f8.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/index.e1377d3f.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/index.bf1af76f.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/color-mode-options.00c15dd1.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/client.210463dc.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/rpc.2e6b297d.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/nuxt-loading-indicator.366d3e52.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/page.fb94fd70.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/composables.59ebbb45.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/unocss-runtime.1d429fd2.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error-component.0aa3c1f1.js"><link rel="stylesheet" href="/__nuxt_devtools__/client/_nuxt/entry.6e08c3bd.css"><script>"use strict";const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"system";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
4
+ <meta name="viewport" content="width=device-width, initial-scale=1"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/entry.b1094864.js"><link rel="preload" as="style" href="/__nuxt_devtools__/client/_nuxt/entry.43bdd1fb.css"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/default.7ecded8d.js"><link rel="prefetch" as="style" href="/__nuxt_devtools__/client/_nuxt/SectionBlock.48da9d80.css"><link rel="prefetch" as="style" href="/__nuxt_devtools__/client/_nuxt/NButton.db724adb.css"><link rel="prefetch" as="style" href="/__nuxt_devtools__/client/_nuxt/StateEditor.c82309e2.css"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/context.b32078d3.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NuxtLogo.9303af79.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/_plugin-vue_export-helper.c27b6911.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/Settings.vue.dda6fcf5.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NButton.vue.56759fc1.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NIcon.vue.c1ad97a9.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/nuxt-link.752dfef9.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/StateEditor.vue.0f1b994b.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/composables.80d3af7a.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/TabIcon.vue.8d3722ca.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/state.65ceafcf.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/asyncData.d544d421.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/none.38bfd553.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/unocss-runtime.c4939419.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error-component.7b202115.js"><link rel="stylesheet" href="/__nuxt_devtools__/client/_nuxt/entry.43bdd1fb.css"><script>"use strict";const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"system";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
5
5
  </script></head>
6
- <body ><div id="__nuxt"></div><script>window.__NUXT__={serverRendered:false,config:{public:{fixture4:"public runtime config from nuxt.config.ts"},app:{baseURL:"\u002F__nuxt_devtools__\u002Fclient",buildAssetsDir:"\u002F_nuxt\u002F",cdnURL:""}},data:{},state:{}}</script><script type="module" src="/__nuxt_devtools__/client/_nuxt/entry.72ee2736.js" crossorigin></script></body>
6
+ <body ><div id="__nuxt"></div><script>window.__NUXT__={serverRendered:false,config:{public:{fixture4:"public runtime config from nuxt.config.ts"},app:{baseURL:"\u002F__nuxt_devtools__\u002Fclient",buildAssetsDir:"\u002F_nuxt\u002F",cdnURL:""}},data:{},state:{}}</script><script type="module" src="/__nuxt_devtools__/client/_nuxt/entry.b1094864.js" crossorigin></script></body>
7
7
  </html>
@@ -1,7 +1,7 @@
1
1
  <!DOCTYPE html>
2
2
  <html >
3
3
  <head><meta charset="utf-8">
4
- <meta name="viewport" content="width=device-width, initial-scale=1"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/entry.72ee2736.js"><link rel="preload" as="style" href="/__nuxt_devtools__/client/_nuxt/entry.6e08c3bd.css"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/runtime-dom.esm-bundler.c94e30c4.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/runtime-core.esm-bundler.ad888d46.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/index.d56af0a0.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/router.96f0ba10.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/nuxt.21217109.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/utils.8ee5a573.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error.ab352ad9.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/state.2c41a47c.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/layout.f6e6e706.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/nuxt-link.ed65b9da.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/app.config.12fdda03.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/defu.5a7c1433.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/storage.abd6f5f8.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/index.e1377d3f.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/index.bf1af76f.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/color-mode-options.00c15dd1.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/client.210463dc.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/rpc.2e6b297d.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/nuxt-loading-indicator.366d3e52.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/page.fb94fd70.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/composables.59ebbb45.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/unocss-runtime.1d429fd2.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error-component.0aa3c1f1.js"><link rel="stylesheet" href="/__nuxt_devtools__/client/_nuxt/entry.6e08c3bd.css"><script>"use strict";const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"system";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
4
+ <meta name="viewport" content="width=device-width, initial-scale=1"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/entry.b1094864.js"><link rel="preload" as="style" href="/__nuxt_devtools__/client/_nuxt/entry.43bdd1fb.css"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/default.7ecded8d.js"><link rel="prefetch" as="style" href="/__nuxt_devtools__/client/_nuxt/SectionBlock.48da9d80.css"><link rel="prefetch" as="style" href="/__nuxt_devtools__/client/_nuxt/NButton.db724adb.css"><link rel="prefetch" as="style" href="/__nuxt_devtools__/client/_nuxt/StateEditor.c82309e2.css"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/context.b32078d3.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NuxtLogo.9303af79.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/_plugin-vue_export-helper.c27b6911.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/Settings.vue.dda6fcf5.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NButton.vue.56759fc1.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NIcon.vue.c1ad97a9.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/nuxt-link.752dfef9.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/StateEditor.vue.0f1b994b.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/composables.80d3af7a.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/TabIcon.vue.8d3722ca.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/state.65ceafcf.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/asyncData.d544d421.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/none.38bfd553.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/unocss-runtime.c4939419.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error-component.7b202115.js"><link rel="stylesheet" href="/__nuxt_devtools__/client/_nuxt/entry.43bdd1fb.css"><script>"use strict";const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"system";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
5
5
  </script></head>
6
- <body ><div id="__nuxt"></div><script>window.__NUXT__={serverRendered:false,config:{public:{fixture4:"public runtime config from nuxt.config.ts"},app:{baseURL:"\u002F__nuxt_devtools__\u002Fclient",buildAssetsDir:"\u002F_nuxt\u002F",cdnURL:""}},data:{},state:{}}</script><script type="module" src="/__nuxt_devtools__/client/_nuxt/entry.72ee2736.js" crossorigin></script></body>
6
+ <body ><div id="__nuxt"></div><script>window.__NUXT__={serverRendered:false,config:{public:{fixture4:"public runtime config from nuxt.config.ts"},app:{baseURL:"\u002F__nuxt_devtools__\u002Fclient",buildAssetsDir:"\u002F_nuxt\u002F",cdnURL:""}},data:{},state:{}}</script><script type="module" src="/__nuxt_devtools__/client/_nuxt/entry.b1094864.js" crossorigin></script></body>
7
7
  </html>
@@ -1,7 +1,7 @@
1
1
  <!DOCTYPE html>
2
2
  <html >
3
3
  <head><meta charset="utf-8">
4
- <meta name="viewport" content="width=device-width, initial-scale=1"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/entry.72ee2736.js"><link rel="preload" as="style" href="/__nuxt_devtools__/client/_nuxt/entry.6e08c3bd.css"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/runtime-dom.esm-bundler.c94e30c4.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/runtime-core.esm-bundler.ad888d46.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/index.d56af0a0.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/router.96f0ba10.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/nuxt.21217109.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/utils.8ee5a573.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error.ab352ad9.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/state.2c41a47c.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/layout.f6e6e706.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/nuxt-link.ed65b9da.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/app.config.12fdda03.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/defu.5a7c1433.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/storage.abd6f5f8.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/index.e1377d3f.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/index.bf1af76f.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/color-mode-options.00c15dd1.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/client.210463dc.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/rpc.2e6b297d.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/nuxt-loading-indicator.366d3e52.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/page.fb94fd70.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/composables.59ebbb45.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/unocss-runtime.1d429fd2.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error-component.0aa3c1f1.js"><link rel="stylesheet" href="/__nuxt_devtools__/client/_nuxt/entry.6e08c3bd.css"><script>"use strict";const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"system";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
4
+ <meta name="viewport" content="width=device-width, initial-scale=1"><link rel="modulepreload" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/entry.b1094864.js"><link rel="preload" as="style" href="/__nuxt_devtools__/client/_nuxt/entry.43bdd1fb.css"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/default.7ecded8d.js"><link rel="prefetch" as="style" href="/__nuxt_devtools__/client/_nuxt/SectionBlock.48da9d80.css"><link rel="prefetch" as="style" href="/__nuxt_devtools__/client/_nuxt/NButton.db724adb.css"><link rel="prefetch" as="style" href="/__nuxt_devtools__/client/_nuxt/StateEditor.c82309e2.css"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/context.b32078d3.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NuxtLogo.9303af79.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/_plugin-vue_export-helper.c27b6911.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/Settings.vue.dda6fcf5.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NButton.vue.56759fc1.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/NIcon.vue.c1ad97a9.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/nuxt-link.752dfef9.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/StateEditor.vue.0f1b994b.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/composables.80d3af7a.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/TabIcon.vue.8d3722ca.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/state.65ceafcf.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/asyncData.d544d421.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/none.38bfd553.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/unocss-runtime.c4939419.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt_devtools__/client/_nuxt/error-component.7b202115.js"><link rel="stylesheet" href="/__nuxt_devtools__/client/_nuxt/entry.43bdd1fb.css"><script>"use strict";const w=window,de=document.documentElement,knownColorSchemes=["dark","light"],preference=window.localStorage.getItem("nuxt-color-mode")||"system";let value=preference==="system"?getColorScheme():preference;const forcedColorMode=de.getAttribute("data-color-mode-forced");forcedColorMode&&(value=forcedColorMode),addColorScheme(value),w["__NUXT_COLOR_MODE__"]={preference,value,getColorScheme,addColorScheme,removeColorScheme};function addColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.add(o):de.className+=" "+o,t&&de.setAttribute("data-"+t,e)}function removeColorScheme(e){const o=""+e+"",t="";de.classList?de.classList.remove(o):de.className=de.className.replace(new RegExp(o,"g"),""),t&&de.removeAttribute("data-"+t)}function prefersColorScheme(e){return w.matchMedia("(prefers-color-scheme"+e+")")}function getColorScheme(){if(w.matchMedia&&prefersColorScheme("").media!=="not all"){for(const e of knownColorSchemes)if(prefersColorScheme(":"+e).matches)return e}return"light"}
5
5
  </script></head>
6
- <body ><div id="__nuxt"></div><script>window.__NUXT__={serverRendered:false,config:{public:{fixture4:"public runtime config from nuxt.config.ts"},app:{baseURL:"\u002F__nuxt_devtools__\u002Fclient",buildAssetsDir:"\u002F_nuxt\u002F",cdnURL:""}},data:{},state:{}}</script><script type="module" src="/__nuxt_devtools__/client/_nuxt/entry.72ee2736.js" crossorigin></script></body>
6
+ <body ><div id="__nuxt"></div><script>window.__NUXT__={serverRendered:false,config:{public:{fixture4:"public runtime config from nuxt.config.ts"},app:{baseURL:"\u002F__nuxt_devtools__\u002Fclient",buildAssetsDir:"\u002F_nuxt\u002F",cdnURL:""}},data:{},state:{}}</script><script type="module" src="/__nuxt_devtools__/client/_nuxt/entry.b1094864.js" crossorigin></script></body>
7
7
  </html>
@@ -0,0 +1 @@
1
+ import{_ as o}from"./_plugin-vue_export-helper.c27b6911.js";import{o as t,e as n,r}from"./entry.b1094864.js";const s={},c={class:"text-12px whitespace-nowrap px-1.5 py-0.5 mx-0.5 rounded"};function _(e,a){return t(),n("span",c,[r(e.$slots,"default")])}const d=o(s,[["render",_]]);export{d as _};
@@ -0,0 +1 @@
1
+ import{f as p,k as s}from"./state.65ceafcf.js";import{o as f}from"./editor.b2159474.js";import{a as l,k as m,o as u,e as h,t as c,u as a}from"./entry.b1094864.js";const E=l({__name:"FilepathItem",props:{filepath:null},setup(e){const o=e,t=p(),i=m(()=>o.filepath&&t.value?s(o.filepath,t.value.rootDir):o.filepath);return(n,r)=>(u(),h("button",{"font-mono":"","hover:underline":"","ws-nowrap":"","of-hidden":"",onClick:r[0]||(r[0]=d=>("openInEditor"in n?n.openInEditor:a(f))(e.filepath))},c(a(i)),1))}});export{E as _};
@@ -0,0 +1 @@
1
+ import{_}from"./TabIcon.vue.8d3722ca.js";import{_ as f}from"./NIcon.vue.c1ad97a9.js";import{r as p,_ as k}from"./NButton.vue.56759fc1.js";import{a as h,e as a,h as b,f as s,t as i,u as g,l as c,F as x,B as w,o as n,c as l,w as y,j as B,V as N}from"./entry.b1094864.js";const C={flex:"~ col gap2","h-full":"","items-center":"","justify-center":""},M={"text-xl":""},V=["innerHTML"],v={flex:"~ gap2 wrap"},H=h({__name:"LaunchPage",props:{icon:null,title:null,description:null,actions:null},emits:["action"],setup(e){return(o,L)=>{const d=_,m=f,u=k;return n(),a("div",C,[b(d,{"text-5xl":"",mb4:"",icon:e.icon||e.icon,title:e.title},null,8,["icon","title"]),s("h1",M,i(e.title),1),e.description?(n(),a("div",{key:0,op50:"","text-center":"","text-base":"","mt--1":"",mb2:"",class:"markdown-body",innerHTML:("renderMarkdown"in o?o.renderMarkdown:g(p))(e.description)},null,8,V)):c("",!0),s("div",v,[(n(!0),a(x,null,w(e.actions,(t,r)=>(n(),l(u,N({key:r,n:"solid primary",disabled:t.pending,to:t.src,target:t.src?"_blank":void 0},t.attrs,{onClick:()=>{t.handle?.(),o.$emit("action",r)}}),{default:y(()=>[t.pending?(n(),l(m,{key:0,icon:"carbon-circle-dash","animate-spin":""})):c("",!0),B(" "+i(t.label),1)]),_:2},1040,["disabled","to","target","onClick"]))),128))])])}}});export{H as _};