@nuxt/devtools 0.1.1 → 0.1.3

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 (274) hide show
  1. package/README.md +23 -0
  2. package/dist/chunks/module-main.mjs +72 -71
  3. package/dist/chunks/vscode.mjs +1612 -86
  4. package/dist/cli.mjs +39 -16
  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.23dc2d8f.js → Badge.e080ea4a.js} +1 -1
  9. package/dist/client/_nuxt/ComponentItem.c17d2931.js +1 -0
  10. package/dist/client/_nuxt/ComponentItem.vue.3441f37f.js +1 -0
  11. package/dist/client/_nuxt/ComponentsGraph.4d50b4fe.js +1 -0
  12. package/dist/client/_nuxt/ComponentsGraph.vue.5b3b134e.js +1 -0
  13. package/dist/client/_nuxt/ComponentsList.ac84bcd1.js +1 -0
  14. package/dist/client/_nuxt/ComponentsList.vue.c704cf24.js +1 -0
  15. package/dist/client/_nuxt/ComposableItem.72806cd2.js +1 -0
  16. package/dist/client/_nuxt/ComposableItem.vue.90cd23bc.js +1 -0
  17. package/dist/client/_nuxt/ComposableTree.43de28f8.js +1 -0
  18. package/dist/client/_nuxt/ComposableTree.vue.808503d9.js +1 -0
  19. package/dist/client/_nuxt/CurrentRoute.e8d5b2cb.js +1 -0
  20. package/dist/client/_nuxt/Drawer.583a0aa3.js +1 -0
  21. package/dist/client/_nuxt/Drawer.vue.30b0fc28.js +1 -0
  22. package/dist/client/_nuxt/DrawerItem.e2effddf.js +1 -0
  23. package/dist/client/_nuxt/DrawerItem.vue.8cadb3c9.js +1 -0
  24. package/dist/client/_nuxt/FileIcon.68b82ecb.js +1 -0
  25. package/dist/client/_nuxt/FileIcon.vue.3bb914bc.js +1 -0
  26. package/dist/client/_nuxt/FilepathItem.8049add8.js +1 -0
  27. package/dist/client/_nuxt/FilepathItem.vue.811409e2.js +1 -0
  28. package/dist/client/_nuxt/HooksTable.59d897cb.js +1 -0
  29. package/dist/client/_nuxt/HooksTable.vue.6b9004ef.js +1 -0
  30. package/dist/client/_nuxt/IconTitle.f576cbf3.js +1 -0
  31. package/dist/client/_nuxt/{IconTitle.vue.909d2a6b.js → IconTitle.vue.dfa8cbcf.js} +1 -1
  32. package/dist/client/_nuxt/IframeView.13e136bd.js +1 -0
  33. package/dist/client/_nuxt/IframeView.vue.6843a7fa.js +1 -0
  34. package/dist/client/_nuxt/LaunchPage.e39fe420.js +1 -0
  35. package/dist/client/_nuxt/LaunchPage.vue.6be17436.js +1 -0
  36. package/dist/client/_nuxt/ModuleItem.8c304e21.js +1 -0
  37. package/dist/client/_nuxt/ModuleItem.vue.2d131549.js +1 -0
  38. package/dist/client/_nuxt/ModuleTreeNode.78ca9ece.js +1 -0
  39. package/dist/client/_nuxt/NButton.13233a1a.js +1 -0
  40. package/dist/client/_nuxt/NButton.vue.e86a98c0.js +1 -0
  41. package/dist/client/_nuxt/NCard.7a4e503f.js +1 -0
  42. package/dist/client/_nuxt/NCheckbox.2da82abb.js +1 -0
  43. package/dist/client/_nuxt/NCheckbox.vue.f058658a.js +1 -0
  44. package/dist/client/_nuxt/NDarkToggle.b7397b85.js +1 -0
  45. package/dist/client/_nuxt/NDarkToggle.vue.104b9df7.js +1 -0
  46. package/dist/client/_nuxt/{NDialog.09638209.js → NDialog.ff796c22.js} +3 -3
  47. package/dist/client/_nuxt/NDropdown.6e99be47.js +1 -0
  48. package/dist/client/_nuxt/NIcon.62a6a6a2.js +1 -0
  49. package/dist/client/_nuxt/NIcon.vue.5c5f9ae0.js +1 -0
  50. package/dist/client/_nuxt/NLink.f8b21877.js +1 -0
  51. package/dist/client/_nuxt/NLink.vue.0f719ab9.js +1 -0
  52. package/dist/client/_nuxt/{NRadio.a5c0205d.js → NRadio.8c217808.js} +1 -1
  53. package/dist/client/_nuxt/NSwitch.ea9c119a.js +1 -0
  54. package/dist/client/_nuxt/NSwitch.vue.a7a200ce.js +1 -0
  55. package/dist/client/_nuxt/NTextInput.48fb0a25.js +1 -0
  56. package/dist/client/_nuxt/NTextInput.vue.5d4d2524.js +1 -0
  57. package/dist/client/_nuxt/NTip.d9c4666f.js +1 -0
  58. package/dist/client/_nuxt/Notification.287365de.js +1 -0
  59. package/dist/client/_nuxt/Notification.vue.dd7d98d5.js +1 -0
  60. package/dist/client/_nuxt/{NuxtContentLogo.1ca13565.js → NuxtContentLogo.447522e5.js} +1 -1
  61. package/dist/client/_nuxt/NuxtExampleLayout.06f6d250.js +1 -0
  62. package/dist/client/_nuxt/NuxtLogo.b27dc990.js +1 -0
  63. package/dist/client/_nuxt/PluginItem.6a55c130.js +1 -0
  64. package/dist/client/_nuxt/PluginItem.vue.6e1d1965.js +1 -0
  65. package/dist/client/_nuxt/RoutePathItem.b209a7cb.js +1 -0
  66. package/dist/client/_nuxt/RoutePathItem.vue.90d1f11a.js +1 -0
  67. package/dist/client/_nuxt/RoutesTable.ffa3adf9.js +1 -0
  68. package/dist/client/_nuxt/RoutesTable.vue.1bbafbda.js +1 -0
  69. package/dist/client/_nuxt/SectionBlock.082cb101.css +1 -0
  70. package/dist/client/_nuxt/SectionBlock.2e26af4b.js +1 -0
  71. package/dist/client/_nuxt/Settings.a15dbb2e.js +1 -0
  72. package/dist/client/_nuxt/Settings.vue.f2a6e99c.js +1 -0
  73. package/dist/client/_nuxt/{StateEditor.f3649b84.css → StateEditor.989cce56.css} +1 -1
  74. package/dist/client/_nuxt/StateEditor.fd549a9f.js +1 -0
  75. package/dist/client/_nuxt/StateEditor.vue.0d8adb50.js +135 -0
  76. package/dist/client/_nuxt/StateEditor.vue.ead0fa52.js +1 -0
  77. package/dist/client/_nuxt/StateGroup.bcb980bd.js +1 -0
  78. package/dist/client/_nuxt/{StateGroup.vue.2dd6ea33.js → StateGroup.vue.c133a773.js} +1 -1
  79. package/dist/client/_nuxt/TabIcon.e55b5a67.js +1 -0
  80. package/dist/client/_nuxt/{TabIcon.vue.8a3fdf6c.js → TabIcon.vue.adac3b56.js} +1 -1
  81. package/dist/client/_nuxt/{UnoIcon.58399ac9.js → UnoIcon.3132b92a.js} +1 -1
  82. package/dist/client/_nuxt/__inspecting.a43a7f80.js +1 -0
  83. package/dist/client/_nuxt/app.config.12fdda03.js +1 -0
  84. package/dist/client/_nuxt/asyncData.518fdb22.js +1 -0
  85. package/dist/client/_nuxt/client-only.f9d053f8.js +4 -0
  86. package/dist/client/_nuxt/client.210463dc.js +1 -0
  87. package/dist/client/_nuxt/component.vue3.02eb71f6.js +1 -0
  88. package/dist/client/_nuxt/components.4f55e0db.js +1 -0
  89. package/dist/client/_nuxt/components.84a4af12.js +1 -0
  90. package/dist/client/_nuxt/{components.client.bfee0e6a.js → components.client.e93eaead.js} +2 -2
  91. package/dist/client/_nuxt/composables.2b96933d.js +1 -0
  92. package/dist/client/_nuxt/composables.59ebbb45.js +1 -0
  93. package/dist/client/_nuxt/{context.dc73232e.js → context.c20dc632.js} +1 -1
  94. package/dist/client/_nuxt/custom-_name_.2cdb4455.js +1 -0
  95. package/dist/client/_nuxt/default.585c2af8.js +1 -0
  96. package/dist/client/_nuxt/defu.5a7c1433.js +1 -0
  97. package/dist/client/_nuxt/{dev-only.fb81821a.js → dev-only.32de73cb.js} +1 -1
  98. package/dist/client/_nuxt/{editor.f69d200c.js → editor.45ea8ca4.js} +1 -1
  99. package/dist/client/_nuxt/entry.6e08c3bd.css +1 -0
  100. package/dist/client/_nuxt/entry.fad9213c.js +1 -0
  101. package/dist/client/_nuxt/error-404.bf8933d3.js +1 -0
  102. package/dist/client/_nuxt/error-500.fe852534.js +1 -0
  103. package/dist/client/_nuxt/error-component.0aa3c1f1.js +3 -0
  104. package/dist/client/_nuxt/error.ab352ad9.js +1 -0
  105. package/dist/client/_nuxt/hooks.da36eba4.js +1 -0
  106. package/dist/client/_nuxt/imports.05a63875.js +1 -0
  107. package/dist/client/_nuxt/{index.7c6751e3.js → index.bf1af76f.js} +1 -1
  108. package/dist/client/_nuxt/index.d56af0a0.js +1 -0
  109. package/dist/client/_nuxt/{index.96e42b53.js → index.e1377d3f.js} +1 -1
  110. package/dist/client/_nuxt/index.e7819c37.js +1 -0
  111. package/dist/client/_nuxt/layout.f6e6e706.js +1 -0
  112. package/dist/client/_nuxt/layouts.ed44bf26.js +1 -0
  113. package/dist/client/_nuxt/middleware.42780100.js +1 -0
  114. package/dist/client/_nuxt/modules.58ec9d96.js +1 -0
  115. package/dist/client/_nuxt/none.a36fcb53.js +1 -0
  116. package/dist/client/_nuxt/nuxt-error-boundary.70c75848.js +1 -0
  117. package/dist/client/_nuxt/nuxt-link.ed65b9da.js +1 -0
  118. package/dist/client/_nuxt/nuxt-loading-indicator.366d3e52.js +1 -0
  119. package/dist/client/_nuxt/nuxt.21217109.js +1 -0
  120. package/dist/client/_nuxt/overview.ce599b13.js +1 -0
  121. package/dist/client/_nuxt/page.fb94fd70.js +1 -0
  122. package/dist/client/_nuxt/pages.ca7b2f77.js +1 -0
  123. package/dist/client/_nuxt/payload.78a6e729.js +1 -0
  124. package/dist/client/_nuxt/plugins.48c9acc3.js +1 -0
  125. package/dist/client/_nuxt/router.96f0ba10.js +1 -0
  126. package/dist/client/_nuxt/{rpc.990da39b.js → rpc.2e6b297d.js} +1 -1
  127. package/dist/client/_nuxt/runtime-configs.1c27e6f2.js +1 -0
  128. package/dist/client/_nuxt/{runtime-core.esm-bundler.5019e930.js → runtime-core.esm-bundler.ad888d46.js} +1 -1
  129. package/dist/client/_nuxt/runtime-dom.esm-bundler.c94e30c4.js +1 -0
  130. package/dist/client/_nuxt/{server-placeholder.735ae8e9.js → server-placeholder.ba9b9f8a.js} +1 -1
  131. package/dist/client/_nuxt/server-routes.de3e707e.js +1 -0
  132. package/dist/client/_nuxt/state.2c41a47c.js +1 -0
  133. package/dist/client/_nuxt/state.85e68c45.js +1 -0
  134. package/dist/client/_nuxt/storage.abd6f5f8.js +1 -0
  135. package/dist/client/_nuxt/{unocss-runtime.2da03436.js → unocss-runtime.1d429fd2.js} +1 -1
  136. package/dist/client/_nuxt/utils.1c789938.js +1 -0
  137. package/dist/client/_nuxt/{utils.3921fcc0.js → utils.8ee5a573.js} +2 -2
  138. package/dist/client/_nuxt/{virtual-files.8b6129f7.js → virtual-files.53d6f968.js} +8 -8
  139. package/dist/client/_nuxt/welcome.11fc1574.js +1 -0
  140. package/dist/client/index.html +2 -2
  141. package/dist/client/modules/components/index.html +2 -2
  142. package/dist/client/modules/hooks/index.html +2 -2
  143. package/dist/client/modules/imports/index.html +2 -2
  144. package/dist/client/modules/layouts/index.html +2 -2
  145. package/dist/client/modules/middleware/index.html +2 -2
  146. package/dist/client/modules/modules/index.html +2 -2
  147. package/dist/client/modules/overview/index.html +2 -2
  148. package/dist/client/modules/pages/index.html +2 -2
  149. package/dist/client/modules/payload/index.html +2 -2
  150. package/dist/client/modules/plugins/index.html +2 -2
  151. package/dist/client/modules/runtime-configs/index.html +2 -2
  152. package/dist/client/modules/server-routes/index.html +2 -2
  153. package/dist/client/modules/virtual-files/index.html +2 -2
  154. package/dist/module.json +1 -1
  155. package/dist/module.mjs +2 -2
  156. package/dist/runtime/plugins/view/Container.vue +5 -3
  157. package/dist/runtime/plugins/view/Frame.vue +12 -2
  158. package/dist/runtime/shared/hooks.mjs +4 -3
  159. package/dist/shared/{devtools.861712a3.mjs → devtools.38b2468f.mjs} +6 -6
  160. package/dist/shared/{devtools.bea56ed1.mjs → devtools.c43ddaa5.mjs} +1 -1
  161. package/dist/shared/{devtools.34d9e53a.mjs → devtools.cce722d0.mjs} +5 -5
  162. package/dist/types.d.ts +20 -2
  163. package/module.cjs +1 -1
  164. package/package.json +12 -12
  165. package/dist/chunks/index.mjs +0 -47749
  166. package/dist/client/_nuxt/ComponentItem.e70cb817.js +0 -1
  167. package/dist/client/_nuxt/ComponentItem.vue.b2907459.js +0 -1
  168. package/dist/client/_nuxt/ComponentsGraph.80197dea.js +0 -1
  169. package/dist/client/_nuxt/ComponentsGraph.vue.4984fec1.js +0 -1
  170. package/dist/client/_nuxt/ComponentsList.d795349a.js +0 -1
  171. package/dist/client/_nuxt/ComponentsList.vue.e6afcbfb.js +0 -1
  172. package/dist/client/_nuxt/ComposableItem.d63f347f.js +0 -1
  173. package/dist/client/_nuxt/ComposableItem.vue.63bbac89.js +0 -1
  174. package/dist/client/_nuxt/ComposableTree.fc74024a.js +0 -1
  175. package/dist/client/_nuxt/ComposableTree.vue.c7f41864.js +0 -1
  176. package/dist/client/_nuxt/CurrentRoute.4a32c426.js +0 -1
  177. package/dist/client/_nuxt/Drawer.71f7d62d.js +0 -1
  178. package/dist/client/_nuxt/Drawer.vue.61472665.js +0 -1
  179. package/dist/client/_nuxt/DrawerItem.0c4e93e1.js +0 -1
  180. package/dist/client/_nuxt/DrawerItem.vue.30f032f8.js +0 -1
  181. package/dist/client/_nuxt/FileIcon.4f6c385a.js +0 -1
  182. package/dist/client/_nuxt/FileIcon.vue.e650fe14.js +0 -1
  183. package/dist/client/_nuxt/FilepathItem.f0424391.js +0 -1
  184. package/dist/client/_nuxt/FilepathItem.vue.3e647321.js +0 -1
  185. package/dist/client/_nuxt/HooksTable.e9c5c41d.js +0 -1
  186. package/dist/client/_nuxt/HooksTable.vue.93af23f8.js +0 -1
  187. package/dist/client/_nuxt/IconTitle.576c2413.js +0 -1
  188. package/dist/client/_nuxt/IframeView.78e9c8e5.js +0 -1
  189. package/dist/client/_nuxt/IframeView.vue.54f89e7f.js +0 -1
  190. package/dist/client/_nuxt/LaunchPage.aef7119a.js +0 -1
  191. package/dist/client/_nuxt/LaunchPage.vue.520a72f3.js +0 -1
  192. package/dist/client/_nuxt/ModuleItem.ac19d5c9.js +0 -1
  193. package/dist/client/_nuxt/ModuleItem.vue.68a7fefd.js +0 -1
  194. package/dist/client/_nuxt/ModuleTreeNode.040f6e05.js +0 -1
  195. package/dist/client/_nuxt/NButton.fb93b328.js +0 -1
  196. package/dist/client/_nuxt/NButton.vue.e1b8a843.js +0 -1
  197. package/dist/client/_nuxt/NCard.47038127.js +0 -1
  198. package/dist/client/_nuxt/NCheckbox.ec4f225e.js +0 -1
  199. package/dist/client/_nuxt/NCheckbox.vue.25b386b6.js +0 -1
  200. package/dist/client/_nuxt/NDarkToggle.46f06112.js +0 -1
  201. package/dist/client/_nuxt/NDarkToggle.vue.c227b1bd.js +0 -1
  202. package/dist/client/_nuxt/NDropdown.3b66cf14.js +0 -1
  203. package/dist/client/_nuxt/NIcon.e9d8d4d5.js +0 -1
  204. package/dist/client/_nuxt/NIcon.vue.2481694f.js +0 -1
  205. package/dist/client/_nuxt/NLink.873d3d79.js +0 -1
  206. package/dist/client/_nuxt/NLink.vue.c3ddaba8.js +0 -1
  207. package/dist/client/_nuxt/NSwitch.4c2c96d6.js +0 -1
  208. package/dist/client/_nuxt/NSwitch.vue.36ec57ea.js +0 -1
  209. package/dist/client/_nuxt/NTextInput.3c1a9b08.js +0 -1
  210. package/dist/client/_nuxt/NTextInput.vue.2d3f9e19.js +0 -1
  211. package/dist/client/_nuxt/NTip.ff4fea4e.js +0 -1
  212. package/dist/client/_nuxt/Notification.f594eb13.js +0 -1
  213. package/dist/client/_nuxt/Notification.vue.b0304237.js +0 -1
  214. package/dist/client/_nuxt/NuxtExampleLayout.4569dcf8.js +0 -1
  215. package/dist/client/_nuxt/NuxtLogo.acbeec62.js +0 -1
  216. package/dist/client/_nuxt/PluginItem.b3be3a58.js +0 -1
  217. package/dist/client/_nuxt/PluginItem.vue.eaf5eab2.js +0 -1
  218. package/dist/client/_nuxt/RoutePathItem.8db2ae7e.js +0 -1
  219. package/dist/client/_nuxt/RoutePathItem.vue.04745c20.js +0 -1
  220. package/dist/client/_nuxt/RoutesTable.6b9eefe0.js +0 -1
  221. package/dist/client/_nuxt/RoutesTable.vue.af7acfb0.js +0 -1
  222. package/dist/client/_nuxt/SectionBlock.6bf10c9f.js +0 -1
  223. package/dist/client/_nuxt/SectionBlock.a75bb023.css +0 -1
  224. package/dist/client/_nuxt/Settings.ceefb680.js +0 -1
  225. package/dist/client/_nuxt/Settings.vue.6d6be237.js +0 -1
  226. package/dist/client/_nuxt/StateEditor.b25ca4bb.js +0 -1
  227. package/dist/client/_nuxt/StateEditor.vue.4c95ce8f.js +0 -135
  228. package/dist/client/_nuxt/StateEditor.vue.94361847.js +0 -1
  229. package/dist/client/_nuxt/StateGroup.03356999.js +0 -1
  230. package/dist/client/_nuxt/TabIcon.0eec1314.js +0 -1
  231. package/dist/client/_nuxt/__inspecting.06a43aaf.js +0 -1
  232. package/dist/client/_nuxt/app.config.a09258b3.js +0 -1
  233. package/dist/client/_nuxt/asyncData.0d07d609.js +0 -1
  234. package/dist/client/_nuxt/client-only.57dcb5bd.js +0 -4
  235. package/dist/client/_nuxt/client.ef9805ed.js +0 -1
  236. package/dist/client/_nuxt/component.vue3.70214810.js +0 -1
  237. package/dist/client/_nuxt/components.67fd2b98.js +0 -1
  238. package/dist/client/_nuxt/components.bcdd3ff8.js +0 -1
  239. package/dist/client/_nuxt/composables.3d6ee8a2.js +0 -1
  240. package/dist/client/_nuxt/composables.7fd231ea.js +0 -1
  241. package/dist/client/_nuxt/custom-_name_.2acc77aa.js +0 -1
  242. package/dist/client/_nuxt/default.7612ba66.js +0 -1
  243. package/dist/client/_nuxt/entry.53569115.css +0 -1
  244. package/dist/client/_nuxt/entry.709b2421.js +0 -1
  245. package/dist/client/_nuxt/error-404.f7be8ae4.js +0 -1
  246. package/dist/client/_nuxt/error-500.31030cf5.js +0 -1
  247. package/dist/client/_nuxt/error-component.2d0a1159.js +0 -3
  248. package/dist/client/_nuxt/error.10b092f1.js +0 -1
  249. package/dist/client/_nuxt/hooks.d96e987b.js +0 -1
  250. package/dist/client/_nuxt/imports.57b0481d.js +0 -1
  251. package/dist/client/_nuxt/index.0977b63e.js +0 -1
  252. package/dist/client/_nuxt/index.6cafd97e.js +0 -1
  253. package/dist/client/_nuxt/layout.27c704cb.js +0 -1
  254. package/dist/client/_nuxt/layouts.cd5cbb48.js +0 -1
  255. package/dist/client/_nuxt/middleware.8875601d.js +0 -1
  256. package/dist/client/_nuxt/modules.36a5839f.js +0 -1
  257. package/dist/client/_nuxt/none.1c37aed4.js +0 -1
  258. package/dist/client/_nuxt/nuxt-error-boundary.fc4d7c25.js +0 -1
  259. package/dist/client/_nuxt/nuxt-link.724f8a66.js +0 -1
  260. package/dist/client/_nuxt/nuxt-loading-indicator.494ea32c.js +0 -1
  261. package/dist/client/_nuxt/overview.a69ce720.js +0 -1
  262. package/dist/client/_nuxt/page.8df04ed4.js +0 -1
  263. package/dist/client/_nuxt/pages.02ef0472.js +0 -1
  264. package/dist/client/_nuxt/payload.8cf95895.js +0 -1
  265. package/dist/client/_nuxt/plugins.50899071.js +0 -1
  266. package/dist/client/_nuxt/runtime-configs.d1fe4f1d.js +0 -1
  267. package/dist/client/_nuxt/runtime-dom.esm-bundler.b0076367.js +0 -1
  268. package/dist/client/_nuxt/server-routes.ff745565.js +0 -1
  269. package/dist/client/_nuxt/state.5364a68a.js +0 -1
  270. package/dist/client/_nuxt/state.90201abf.js +0 -1
  271. package/dist/client/_nuxt/storage.82519452.js +0 -1
  272. package/dist/client/_nuxt/utils.c2a3506b.js +0 -1
  273. package/dist/client/_nuxt/welcome.432c9232.js +0 -1
  274. package/dist/shared/devtools.8467d016.mjs +0 -1504
@@ -1,29 +1,28 @@
1
+ import require$$1$1, { hostname } from 'os';
1
2
  import { logger } from '@nuxt/kit';
2
3
  import { execa } from 'execa';
3
4
  import { createServer } from 'node:net';
4
5
  import { networkInterfaces } from 'node:os';
5
- import { g as getAugmentedNamespace, r as requireSrc, c as commonjsGlobal, l as lib$4 } from '../shared/devtools.8467d016.mjs';
6
- import require$$0__default from 'fs';
7
- import require$$0$1 from 'util';
8
- import require$$0 from 'url';
6
+ import fs__default from 'fs';
7
+ import require$$0 from 'path';
8
+ import require$$1 from 'util';
9
+ import require$$0$1 from 'url';
9
10
  import require$$2$1 from 'https';
10
- import require$$0$5 from 'net';
11
- import require$$1 from 'http';
12
- import require$$0$2 from 'stream';
13
- import require$$0$3 from 'assert';
11
+ import require$$3 from 'net';
12
+ import require$$1$2 from 'http';
13
+ import require$$0$3 from 'stream';
14
+ import require$$4 from 'assert';
15
+ import require$$0$2 from 'tty';
14
16
  import require$$0$4 from 'zlib';
15
- import require$$1$1 from 'path';
16
17
  import { L as LOG_PREFIX } from './module-main.mjs';
17
- import 'tty';
18
- import 'os';
19
18
  import 'buffer';
20
19
  import 'tls';
21
20
  import 'crypto';
22
21
  import 'events';
23
22
  import 'querystring';
24
- import '../shared/devtools.34d9e53a.mjs';
25
- import '../shared/devtools.861712a3.mjs';
26
- import '../shared/devtools.bea56ed1.mjs';
23
+ import '../shared/devtools.cce722d0.mjs';
24
+ import '../shared/devtools.38b2468f.mjs';
25
+ import '../shared/devtools.c43ddaa5.mjs';
27
26
  import 'birpc';
28
27
  import 'unimport';
29
28
  import 'pathe';
@@ -40,6 +39,36 @@ import __cjs_mod__ from 'module';
40
39
  const __filename = __cjs_url__.fileURLToPath(import.meta.url);
41
40
  const __dirname = __cjs_path__.dirname(__filename);
42
41
  const require = __cjs_mod__.createRequire(import.meta.url);
42
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
43
+
44
+ function getAugmentedNamespace(n) {
45
+ if (n.__esModule) return n;
46
+ var f = n.default;
47
+ if (typeof f == "function") {
48
+ var a = function a () {
49
+ if (this instanceof a) {
50
+ var args = [null];
51
+ args.push.apply(args, arguments);
52
+ var Ctor = Function.bind.apply(f, args);
53
+ return new Ctor();
54
+ }
55
+ return f.apply(this, arguments);
56
+ };
57
+ a.prototype = f.prototype;
58
+ } else a = {};
59
+ Object.defineProperty(a, '__esModule', {value: true});
60
+ Object.keys(n).forEach(function (k) {
61
+ var d = Object.getOwnPropertyDescriptor(n, k);
62
+ Object.defineProperty(a, k, d.get ? d : {
63
+ enumerable: true,
64
+ get: function () {
65
+ return n[k];
66
+ }
67
+ });
68
+ });
69
+ return a;
70
+ }
71
+
43
72
  const unsafePorts = /* @__PURE__ */ new Set([
44
73
  1,
45
74
  7,
@@ -274,6 +303,275 @@ async function findPort(ports, host, _verbose = false, _random = true) {
274
303
  }
275
304
  }
276
305
 
306
+ var windows;
307
+ var hasRequiredWindows;
308
+
309
+ function requireWindows () {
310
+ if (hasRequiredWindows) return windows;
311
+ hasRequiredWindows = 1;
312
+ windows = isexe;
313
+ isexe.sync = sync;
314
+
315
+ var fs = fs__default;
316
+
317
+ function checkPathExt (path, options) {
318
+ var pathext = options.pathExt !== undefined ?
319
+ options.pathExt : process.env.PATHEXT;
320
+
321
+ if (!pathext) {
322
+ return true
323
+ }
324
+
325
+ pathext = pathext.split(';');
326
+ if (pathext.indexOf('') !== -1) {
327
+ return true
328
+ }
329
+ for (var i = 0; i < pathext.length; i++) {
330
+ var p = pathext[i].toLowerCase();
331
+ if (p && path.substr(-p.length).toLowerCase() === p) {
332
+ return true
333
+ }
334
+ }
335
+ return false
336
+ }
337
+
338
+ function checkStat (stat, path, options) {
339
+ if (!stat.isSymbolicLink() && !stat.isFile()) {
340
+ return false
341
+ }
342
+ return checkPathExt(path, options)
343
+ }
344
+
345
+ function isexe (path, options, cb) {
346
+ fs.stat(path, function (er, stat) {
347
+ cb(er, er ? false : checkStat(stat, path, options));
348
+ });
349
+ }
350
+
351
+ function sync (path, options) {
352
+ return checkStat(fs.statSync(path), path, options)
353
+ }
354
+ return windows;
355
+ }
356
+
357
+ var mode;
358
+ var hasRequiredMode;
359
+
360
+ function requireMode () {
361
+ if (hasRequiredMode) return mode;
362
+ hasRequiredMode = 1;
363
+ mode = isexe;
364
+ isexe.sync = sync;
365
+
366
+ var fs = fs__default;
367
+
368
+ function isexe (path, options, cb) {
369
+ fs.stat(path, function (er, stat) {
370
+ cb(er, er ? false : checkStat(stat, options));
371
+ });
372
+ }
373
+
374
+ function sync (path, options) {
375
+ return checkStat(fs.statSync(path), options)
376
+ }
377
+
378
+ function checkStat (stat, options) {
379
+ return stat.isFile() && checkMode(stat, options)
380
+ }
381
+
382
+ function checkMode (stat, options) {
383
+ var mod = stat.mode;
384
+ var uid = stat.uid;
385
+ var gid = stat.gid;
386
+
387
+ var myUid = options.uid !== undefined ?
388
+ options.uid : process.getuid && process.getuid();
389
+ var myGid = options.gid !== undefined ?
390
+ options.gid : process.getgid && process.getgid();
391
+
392
+ var u = parseInt('100', 8);
393
+ var g = parseInt('010', 8);
394
+ var o = parseInt('001', 8);
395
+ var ug = u | g;
396
+
397
+ var ret = (mod & o) ||
398
+ (mod & g) && gid === myGid ||
399
+ (mod & u) && uid === myUid ||
400
+ (mod & ug) && myUid === 0;
401
+
402
+ return ret
403
+ }
404
+ return mode;
405
+ }
406
+
407
+ var core;
408
+ if (process.platform === 'win32' || commonjsGlobal.TESTING_WINDOWS) {
409
+ core = requireWindows();
410
+ } else {
411
+ core = requireMode();
412
+ }
413
+
414
+ var isexe_1 = isexe$1;
415
+ isexe$1.sync = sync;
416
+
417
+ function isexe$1 (path, options, cb) {
418
+ if (typeof options === 'function') {
419
+ cb = options;
420
+ options = {};
421
+ }
422
+
423
+ if (!cb) {
424
+ if (typeof Promise !== 'function') {
425
+ throw new TypeError('callback not provided')
426
+ }
427
+
428
+ return new Promise(function (resolve, reject) {
429
+ isexe$1(path, options || {}, function (er, is) {
430
+ if (er) {
431
+ reject(er);
432
+ } else {
433
+ resolve(is);
434
+ }
435
+ });
436
+ })
437
+ }
438
+
439
+ core(path, options || {}, function (er, is) {
440
+ // ignore EACCES because that just means we aren't allowed to run it
441
+ if (er) {
442
+ if (er.code === 'EACCES' || options && options.ignoreErrors) {
443
+ er = null;
444
+ is = false;
445
+ }
446
+ }
447
+ cb(er, is);
448
+ });
449
+ }
450
+
451
+ function sync (path, options) {
452
+ // my kingdom for a filtered catch
453
+ try {
454
+ return core.sync(path, options || {})
455
+ } catch (er) {
456
+ if (options && options.ignoreErrors || er.code === 'EACCES') {
457
+ return false
458
+ } else {
459
+ throw er
460
+ }
461
+ }
462
+ }
463
+
464
+ const isexe = isexe_1;
465
+ const { join, delimiter, sep, posix } = require$$0;
466
+
467
+ const isWindows = process.platform === 'win32';
468
+
469
+ // used to check for slashed in commands passed in. always checks for the posix
470
+ // seperator on all platforms, and checks for the current separator when not on
471
+ // a posix platform. don't use the isWindows check for this since that is mocked
472
+ // in tests but we still need the code to actually work when called. that is also
473
+ // why it is ignored from coverage.
474
+ /* istanbul ignore next */
475
+ const rSlash = new RegExp(`[${posix.sep}${sep === posix.sep ? '' : sep}]`.replace(/(\\)/g, '\\$1'));
476
+ const rRel = new RegExp(`^\\.${rSlash.source}`);
477
+
478
+ const getNotFoundError = (cmd) =>
479
+ Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' });
480
+
481
+ const getPathInfo = (cmd, {
482
+ path: optPath = process.env.PATH,
483
+ pathExt: optPathExt = process.env.PATHEXT,
484
+ delimiter: optDelimiter = delimiter,
485
+ }) => {
486
+ // If it has a slash, then we don't bother searching the pathenv.
487
+ // just check the file itself, and that's it.
488
+ const pathEnv = cmd.match(rSlash) ? [''] : [
489
+ // windows always checks the cwd first
490
+ ...(isWindows ? [process.cwd()] : []),
491
+ ...(optPath || /* istanbul ignore next: very unusual */ '').split(optDelimiter),
492
+ ];
493
+
494
+ if (isWindows) {
495
+ const pathExtExe = optPathExt || ['.EXE', '.CMD', '.BAT', '.COM'].join(optDelimiter);
496
+ const pathExt = pathExtExe.split(optDelimiter);
497
+ if (cmd.includes('.') && pathExt[0] !== '') {
498
+ pathExt.unshift('');
499
+ }
500
+ return { pathEnv, pathExt, pathExtExe }
501
+ }
502
+
503
+ return { pathEnv, pathExt: [''] }
504
+ };
505
+
506
+ const getPathPart = (raw, cmd) => {
507
+ const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw;
508
+ const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : '';
509
+ return prefix + join(pathPart, cmd)
510
+ };
511
+
512
+ const which = async (cmd, opt = {}) => {
513
+ const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
514
+ const found = [];
515
+
516
+ for (const envPart of pathEnv) {
517
+ const p = getPathPart(envPart, cmd);
518
+
519
+ for (const ext of pathExt) {
520
+ const withExt = p + ext;
521
+ const is = await isexe(withExt, { pathExt: pathExtExe, ignoreErrors: true });
522
+ if (is) {
523
+ if (!opt.all) {
524
+ return withExt
525
+ }
526
+ found.push(withExt);
527
+ }
528
+ }
529
+ }
530
+
531
+ if (opt.all && found.length) {
532
+ return found
533
+ }
534
+
535
+ if (opt.nothrow) {
536
+ return null
537
+ }
538
+
539
+ throw getNotFoundError(cmd)
540
+ };
541
+
542
+ const whichSync = (cmd, opt = {}) => {
543
+ const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
544
+ const found = [];
545
+
546
+ for (const pathEnvPart of pathEnv) {
547
+ const p = getPathPart(pathEnvPart, cmd);
548
+
549
+ for (const ext of pathExt) {
550
+ const withExt = p + ext;
551
+ const is = isexe.sync(withExt, { pathExt: pathExtExe, ignoreErrors: true });
552
+ if (is) {
553
+ if (!opt.all) {
554
+ return withExt
555
+ }
556
+ found.push(withExt);
557
+ }
558
+ }
559
+ }
560
+
561
+ if (opt.all && found.length) {
562
+ return found
563
+ }
564
+
565
+ if (opt.nothrow) {
566
+ return null
567
+ }
568
+
569
+ throw getNotFoundError(cmd)
570
+ };
571
+
572
+ var lib$4 = which;
573
+ which.sync = whichSync;
574
+
277
575
  var errorExports = {};
278
576
  var error = {
279
577
  get exports(){ return errorExports; },
@@ -655,7 +953,7 @@ internals$8.base = function (obj, baseProto, options) {
655
953
 
656
954
  var cache = {};
657
955
 
658
- var common = {};
956
+ var common$1 = {};
659
957
 
660
958
  const name = "joi";
661
959
  const description = "Object schema validation";
@@ -663,7 +961,7 @@ const version = "17.7.0";
663
961
  const repository = "git://github.com/hapijs/joi";
664
962
  const main = "lib/index.js";
665
963
  const types$1 = "lib/index.d.ts";
666
- const browser = "dist/joi-browser.min.js";
964
+ const browser$1 = "dist/joi-browser.min.js";
667
965
  const files = [
668
966
  "lib/**/*",
669
967
  "dist/*"
@@ -700,7 +998,7 @@ const _package = {
700
998
  repository: repository,
701
999
  main: main,
702
1000
  types: types$1,
703
- browser: browser,
1001
+ browser: browser$1,
704
1002
  files: files,
705
1003
  keywords: keywords,
706
1004
  dependencies: dependencies,
@@ -710,21 +1008,21 @@ const _package = {
710
1008
  };
711
1009
 
712
1010
  const _package$1 = {
713
- __proto__: null,
714
- browser: browser,
715
- default: _package,
716
- dependencies: dependencies,
717
- description: description,
718
- devDependencies: devDependencies,
719
- files: files,
720
- keywords: keywords,
721
- license: license,
722
- main: main,
723
- name: name,
724
- repository: repository,
725
- scripts: scripts,
726
- types: types$1,
727
- version: version
1011
+ __proto__: null,
1012
+ browser: browser$1,
1013
+ default: _package,
1014
+ dependencies: dependencies,
1015
+ description: description,
1016
+ devDependencies: devDependencies,
1017
+ files: files,
1018
+ keywords: keywords,
1019
+ license: license,
1020
+ main: main,
1021
+ name: name,
1022
+ repository: repository,
1023
+ scripts: scripts,
1024
+ types: types$1,
1025
+ version: version
728
1026
  };
729
1027
 
730
1028
  const require$$2 = /*@__PURE__*/getAugmentedNamespace(_package$1);
@@ -1606,7 +1904,7 @@ function requireAnnotate () {
1606
1904
 
1607
1905
  const Clone = clone;
1608
1906
 
1609
- const Common = requireCommon();
1907
+ const Common = requireCommon$1();
1610
1908
 
1611
1909
 
1612
1910
  const internals = {
@@ -1788,7 +2086,7 @@ function requireErrors () {
1788
2086
  (function (exports) {
1789
2087
 
1790
2088
  const Annotate = requireAnnotate();
1791
- const Common = requireCommon();
2089
+ const Common = requireCommon$1();
1792
2090
  const Template = requireTemplate();
1793
2091
 
1794
2092
 
@@ -2070,7 +2368,7 @@ function requireRef () {
2070
2368
  const Clone = clone;
2071
2369
  const Reach = reach;
2072
2370
 
2073
- const Common = requireCommon();
2371
+ const Common = requireCommon$1();
2074
2372
 
2075
2373
  let Template;
2076
2374
 
@@ -2494,7 +2792,7 @@ function requireTemplate () {
2494
2792
  const EscapeHtml = escapeHtml;
2495
2793
  const Formula = lib$3;
2496
2794
 
2497
- const Common = requireCommon();
2795
+ const Common = requireCommon$1();
2498
2796
  const Errors = requireErrors();
2499
2797
  const Ref = requireRef();
2500
2798
 
@@ -3116,11 +3414,11 @@ function requireMessages () {
3116
3414
  return messages;
3117
3415
  }
3118
3416
 
3119
- var hasRequiredCommon;
3417
+ var hasRequiredCommon$1;
3120
3418
 
3121
- function requireCommon () {
3122
- if (hasRequiredCommon) return common;
3123
- hasRequiredCommon = 1;
3419
+ function requireCommon$1 () {
3420
+ if (hasRequiredCommon$1) return common$1;
3421
+ hasRequiredCommon$1 = 1;
3124
3422
  (function (exports) {
3125
3423
 
3126
3424
  const Assert = assert$1;
@@ -3337,8 +3635,8 @@ function requireCommon () {
3337
3635
  Assert(!Array.isArray(arg), 'Method no longer accepts array arguments:', method);
3338
3636
  }
3339
3637
  };
3340
- } (common));
3341
- return common;
3638
+ } (common$1));
3639
+ return common$1;
3342
3640
  }
3343
3641
 
3344
3642
  var hasRequiredCache;
@@ -3350,7 +3648,7 @@ function requireCache () {
3350
3648
  const Assert = assert$1;
3351
3649
  const Clone = clone;
3352
3650
 
3353
- const Common = requireCommon();
3651
+ const Common = requireCommon$1();
3354
3652
 
3355
3653
 
3356
3654
  const internals = {
@@ -3502,7 +3800,7 @@ function requireCompile () {
3502
3800
 
3503
3801
  const Assert = assert$1;
3504
3802
 
3505
- const Common = requireCommon();
3803
+ const Common = requireCommon$1();
3506
3804
  const Ref = requireRef();
3507
3805
 
3508
3806
 
@@ -3796,7 +4094,7 @@ function requireExtend () {
3796
4094
  const Assert = assert$1;
3797
4095
  const Clone = clone;
3798
4096
 
3799
- const Common = requireCommon();
4097
+ const Common = requireCommon$1();
3800
4098
  const Messages = requireMessages();
3801
4099
 
3802
4100
 
@@ -4117,7 +4415,7 @@ function requireManifest () {
4117
4415
  const Assert = assert$1;
4118
4416
  const Clone = clone;
4119
4417
 
4120
- const Common = requireCommon();
4418
+ const Common = requireCommon$1();
4121
4419
  const Messages = requireMessages();
4122
4420
  const Ref = requireRef();
4123
4421
  const Template = requireTemplate();
@@ -5369,7 +5667,7 @@ function requireModify () {
5369
5667
 
5370
5668
  const Assert = assert$1;
5371
5669
 
5372
- const Common = requireCommon();
5670
+ const Common = requireCommon$1();
5373
5671
  const Ref = requireRef();
5374
5672
 
5375
5673
 
@@ -5650,7 +5948,7 @@ function requireState$1 () {
5650
5948
  const Clone = clone;
5651
5949
  const Reach = reach;
5652
5950
 
5653
- const Common = requireCommon();
5951
+ const Common = requireCommon$1();
5654
5952
 
5655
5953
 
5656
5954
  const internals = {
@@ -5812,7 +6110,7 @@ function requireValidator () {
5812
6110
  const Ignore = ignore;
5813
6111
  const Reach = reach;
5814
6112
 
5815
- const Common = requireCommon();
6113
+ const Common = requireCommon$1();
5816
6114
  const Errors = requireErrors();
5817
6115
  const State = requireState$1();
5818
6116
 
@@ -6472,7 +6770,7 @@ function requireValues () {
6472
6770
  const Assert = assert$1;
6473
6771
  const DeepEqual = deepEqual;
6474
6772
 
6475
- const Common = requireCommon();
6773
+ const Common = requireCommon$1();
6476
6774
 
6477
6775
 
6478
6776
  const internals = {};
@@ -6746,7 +7044,7 @@ function requireBase () {
6746
7044
  const Merge = merge$6;
6747
7045
 
6748
7046
  const Cache = requireCache();
6749
- const Common = requireCommon();
7047
+ const Common = requireCommon$1();
6750
7048
  const Compile = requireCompile();
6751
7049
  const Errors = requireErrors();
6752
7050
  const Extend = requireExtend();
@@ -7820,7 +8118,7 @@ function requireAny () {
7820
8118
  const Assert = assert$1;
7821
8119
 
7822
8120
  const Base = requireBase();
7823
- const Common = requireCommon();
8121
+ const Common = requireCommon$1();
7824
8122
  const Messages = requireMessages();
7825
8123
 
7826
8124
 
@@ -8000,7 +8298,7 @@ function requireAlternatives () {
8000
8298
  const Merge = merge$6;
8001
8299
 
8002
8300
  const Any = requireAny();
8003
- const Common = requireCommon();
8301
+ const Common = requireCommon$1();
8004
8302
  const Compile = requireCompile();
8005
8303
  const Errors = requireErrors();
8006
8304
  const Ref = requireRef();
@@ -8364,7 +8662,7 @@ function requireArray () {
8364
8662
  const Reach = reach;
8365
8663
 
8366
8664
  const Any = requireAny();
8367
- const Common = requireCommon();
8665
+ const Common = requireCommon$1();
8368
8666
  const Compile = requireCompile();
8369
8667
 
8370
8668
 
@@ -9176,7 +9474,7 @@ function requireBoolean () {
9176
9474
  const Assert = assert$1;
9177
9475
 
9178
9476
  const Any = requireAny();
9179
- const Common = requireCommon();
9477
+ const Common = requireCommon$1();
9180
9478
  const Values = requireValues();
9181
9479
 
9182
9480
 
@@ -9334,7 +9632,7 @@ function requireDate () {
9334
9632
  const Assert = assert$1;
9335
9633
 
9336
9634
  const Any = requireAny();
9337
- const Common = requireCommon();
9635
+ const Common = requireCommon$1();
9338
9636
  const Template = requireTemplate();
9339
9637
 
9340
9638
 
@@ -9905,7 +10203,7 @@ function requireKeys () {
9905
10203
  const Topo = lib$1;
9906
10204
 
9907
10205
  const Any = requireAny();
9908
- const Common = requireCommon();
10206
+ const Common = requireCommon$1();
9909
10207
  const Compile = requireCompile();
9910
10208
  const Errors = requireErrors();
9911
10209
  const Ref = requireRef();
@@ -11075,7 +11373,7 @@ function requireLink () {
11075
11373
  const Assert = assert$1;
11076
11374
 
11077
11375
  const Any = requireAny();
11078
- const Common = requireCommon();
11376
+ const Common = requireCommon$1();
11079
11377
  const Compile = requireCompile();
11080
11378
  const Errors = requireErrors();
11081
11379
 
@@ -11251,7 +11549,7 @@ function requireNumber () {
11251
11549
  const Assert = assert$1;
11252
11550
 
11253
11551
  const Any = requireAny();
11254
- const Common = requireCommon();
11552
+ const Common = requireCommon$1();
11255
11553
 
11256
11554
 
11257
11555
  const internals = {
@@ -11649,7 +11947,7 @@ var errors = {};
11649
11947
 
11650
11948
  (function (exports) {
11651
11949
 
11652
- const Url = require$$0;
11950
+ const Url = require$$0$1;
11653
11951
 
11654
11952
  const Errors = errors;
11655
11953
 
@@ -11774,7 +12072,7 @@ var errors = {};
11774
12072
 
11775
12073
  var email = {};
11776
12074
 
11777
- const Util = require$$0$1;
12075
+ const Util = require$$1;
11778
12076
 
11779
12077
  const Domain = domain;
11780
12078
  const Errors = errors;
@@ -13736,7 +14034,7 @@ function requireString () {
13736
14034
  const Uri = uri;
13737
14035
 
13738
14036
  const Any = requireAny();
13739
- const Common = requireCommon();
14037
+ const Common = requireCommon$1();
13740
14038
 
13741
14039
 
13742
14040
  const internals = {
@@ -14676,7 +14974,7 @@ function requireBinary () {
14676
14974
  const Assert = assert$1;
14677
14975
 
14678
14976
  const Any = requireAny();
14679
- const Common = requireCommon();
14977
+ const Common = requireCommon$1();
14680
14978
 
14681
14979
 
14682
14980
  binary = Any.extend({
@@ -14780,7 +15078,7 @@ function requireLib () {
14780
15078
  const Clone = clone;
14781
15079
 
14782
15080
  const Cache = requireCache();
14783
- const Common = requireCommon();
15081
+ const Common = requireCommon$1();
14784
15082
  const Compile = requireCompile();
14785
15083
  const Errors = requireErrors();
14786
15084
  const Extend = requireExtend();
@@ -16393,6 +16691,1204 @@ var followRedirects = {
16393
16691
  set exports(v){ followRedirectsExports = v; },
16394
16692
  };
16395
16693
 
16694
+ var srcExports = {};
16695
+ var src = {
16696
+ get exports(){ return srcExports; },
16697
+ set exports(v){ srcExports = v; },
16698
+ };
16699
+
16700
+ var browserExports = {};
16701
+ var browser = {
16702
+ get exports(){ return browserExports; },
16703
+ set exports(v){ browserExports = v; },
16704
+ };
16705
+
16706
+ /**
16707
+ * Helpers.
16708
+ */
16709
+
16710
+ var ms;
16711
+ var hasRequiredMs;
16712
+
16713
+ function requireMs () {
16714
+ if (hasRequiredMs) return ms;
16715
+ hasRequiredMs = 1;
16716
+ var s = 1000;
16717
+ var m = s * 60;
16718
+ var h = m * 60;
16719
+ var d = h * 24;
16720
+ var w = d * 7;
16721
+ var y = d * 365.25;
16722
+
16723
+ /**
16724
+ * Parse or format the given `val`.
16725
+ *
16726
+ * Options:
16727
+ *
16728
+ * - `long` verbose formatting [false]
16729
+ *
16730
+ * @param {String|Number} val
16731
+ * @param {Object} [options]
16732
+ * @throws {Error} throw an error if val is not a non-empty string or a number
16733
+ * @return {String|Number}
16734
+ * @api public
16735
+ */
16736
+
16737
+ ms = function(val, options) {
16738
+ options = options || {};
16739
+ var type = typeof val;
16740
+ if (type === 'string' && val.length > 0) {
16741
+ return parse(val);
16742
+ } else if (type === 'number' && isFinite(val)) {
16743
+ return options.long ? fmtLong(val) : fmtShort(val);
16744
+ }
16745
+ throw new Error(
16746
+ 'val is not a non-empty string or a valid number. val=' +
16747
+ JSON.stringify(val)
16748
+ );
16749
+ };
16750
+
16751
+ /**
16752
+ * Parse the given `str` and return milliseconds.
16753
+ *
16754
+ * @param {String} str
16755
+ * @return {Number}
16756
+ * @api private
16757
+ */
16758
+
16759
+ function parse(str) {
16760
+ str = String(str);
16761
+ if (str.length > 100) {
16762
+ return;
16763
+ }
16764
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
16765
+ str
16766
+ );
16767
+ if (!match) {
16768
+ return;
16769
+ }
16770
+ var n = parseFloat(match[1]);
16771
+ var type = (match[2] || 'ms').toLowerCase();
16772
+ switch (type) {
16773
+ case 'years':
16774
+ case 'year':
16775
+ case 'yrs':
16776
+ case 'yr':
16777
+ case 'y':
16778
+ return n * y;
16779
+ case 'weeks':
16780
+ case 'week':
16781
+ case 'w':
16782
+ return n * w;
16783
+ case 'days':
16784
+ case 'day':
16785
+ case 'd':
16786
+ return n * d;
16787
+ case 'hours':
16788
+ case 'hour':
16789
+ case 'hrs':
16790
+ case 'hr':
16791
+ case 'h':
16792
+ return n * h;
16793
+ case 'minutes':
16794
+ case 'minute':
16795
+ case 'mins':
16796
+ case 'min':
16797
+ case 'm':
16798
+ return n * m;
16799
+ case 'seconds':
16800
+ case 'second':
16801
+ case 'secs':
16802
+ case 'sec':
16803
+ case 's':
16804
+ return n * s;
16805
+ case 'milliseconds':
16806
+ case 'millisecond':
16807
+ case 'msecs':
16808
+ case 'msec':
16809
+ case 'ms':
16810
+ return n;
16811
+ default:
16812
+ return undefined;
16813
+ }
16814
+ }
16815
+
16816
+ /**
16817
+ * Short format for `ms`.
16818
+ *
16819
+ * @param {Number} ms
16820
+ * @return {String}
16821
+ * @api private
16822
+ */
16823
+
16824
+ function fmtShort(ms) {
16825
+ var msAbs = Math.abs(ms);
16826
+ if (msAbs >= d) {
16827
+ return Math.round(ms / d) + 'd';
16828
+ }
16829
+ if (msAbs >= h) {
16830
+ return Math.round(ms / h) + 'h';
16831
+ }
16832
+ if (msAbs >= m) {
16833
+ return Math.round(ms / m) + 'm';
16834
+ }
16835
+ if (msAbs >= s) {
16836
+ return Math.round(ms / s) + 's';
16837
+ }
16838
+ return ms + 'ms';
16839
+ }
16840
+
16841
+ /**
16842
+ * Long format for `ms`.
16843
+ *
16844
+ * @param {Number} ms
16845
+ * @return {String}
16846
+ * @api private
16847
+ */
16848
+
16849
+ function fmtLong(ms) {
16850
+ var msAbs = Math.abs(ms);
16851
+ if (msAbs >= d) {
16852
+ return plural(ms, msAbs, d, 'day');
16853
+ }
16854
+ if (msAbs >= h) {
16855
+ return plural(ms, msAbs, h, 'hour');
16856
+ }
16857
+ if (msAbs >= m) {
16858
+ return plural(ms, msAbs, m, 'minute');
16859
+ }
16860
+ if (msAbs >= s) {
16861
+ return plural(ms, msAbs, s, 'second');
16862
+ }
16863
+ return ms + ' ms';
16864
+ }
16865
+
16866
+ /**
16867
+ * Pluralization helper.
16868
+ */
16869
+
16870
+ function plural(ms, msAbs, n, name) {
16871
+ var isPlural = msAbs >= n * 1.5;
16872
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
16873
+ }
16874
+ return ms;
16875
+ }
16876
+
16877
+ var common;
16878
+ var hasRequiredCommon;
16879
+
16880
+ function requireCommon () {
16881
+ if (hasRequiredCommon) return common;
16882
+ hasRequiredCommon = 1;
16883
+ /**
16884
+ * This is the common logic for both the Node.js and web browser
16885
+ * implementations of `debug()`.
16886
+ */
16887
+
16888
+ function setup(env) {
16889
+ createDebug.debug = createDebug;
16890
+ createDebug.default = createDebug;
16891
+ createDebug.coerce = coerce;
16892
+ createDebug.disable = disable;
16893
+ createDebug.enable = enable;
16894
+ createDebug.enabled = enabled;
16895
+ createDebug.humanize = requireMs();
16896
+ createDebug.destroy = destroy;
16897
+
16898
+ Object.keys(env).forEach(key => {
16899
+ createDebug[key] = env[key];
16900
+ });
16901
+
16902
+ /**
16903
+ * The currently active debug mode names, and names to skip.
16904
+ */
16905
+
16906
+ createDebug.names = [];
16907
+ createDebug.skips = [];
16908
+
16909
+ /**
16910
+ * Map of special "%n" handling functions, for the debug "format" argument.
16911
+ *
16912
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
16913
+ */
16914
+ createDebug.formatters = {};
16915
+
16916
+ /**
16917
+ * Selects a color for a debug namespace
16918
+ * @param {String} namespace The namespace string for the debug instance to be colored
16919
+ * @return {Number|String} An ANSI color code for the given namespace
16920
+ * @api private
16921
+ */
16922
+ function selectColor(namespace) {
16923
+ let hash = 0;
16924
+
16925
+ for (let i = 0; i < namespace.length; i++) {
16926
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
16927
+ hash |= 0; // Convert to 32bit integer
16928
+ }
16929
+
16930
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
16931
+ }
16932
+ createDebug.selectColor = selectColor;
16933
+
16934
+ /**
16935
+ * Create a debugger with the given `namespace`.
16936
+ *
16937
+ * @param {String} namespace
16938
+ * @return {Function}
16939
+ * @api public
16940
+ */
16941
+ function createDebug(namespace) {
16942
+ let prevTime;
16943
+ let enableOverride = null;
16944
+ let namespacesCache;
16945
+ let enabledCache;
16946
+
16947
+ function debug(...args) {
16948
+ // Disabled?
16949
+ if (!debug.enabled) {
16950
+ return;
16951
+ }
16952
+
16953
+ const self = debug;
16954
+
16955
+ // Set `diff` timestamp
16956
+ const curr = Number(new Date());
16957
+ const ms = curr - (prevTime || curr);
16958
+ self.diff = ms;
16959
+ self.prev = prevTime;
16960
+ self.curr = curr;
16961
+ prevTime = curr;
16962
+
16963
+ args[0] = createDebug.coerce(args[0]);
16964
+
16965
+ if (typeof args[0] !== 'string') {
16966
+ // Anything else let's inspect with %O
16967
+ args.unshift('%O');
16968
+ }
16969
+
16970
+ // Apply any `formatters` transformations
16971
+ let index = 0;
16972
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
16973
+ // If we encounter an escaped % then don't increase the array index
16974
+ if (match === '%%') {
16975
+ return '%';
16976
+ }
16977
+ index++;
16978
+ const formatter = createDebug.formatters[format];
16979
+ if (typeof formatter === 'function') {
16980
+ const val = args[index];
16981
+ match = formatter.call(self, val);
16982
+
16983
+ // Now we need to remove `args[index]` since it's inlined in the `format`
16984
+ args.splice(index, 1);
16985
+ index--;
16986
+ }
16987
+ return match;
16988
+ });
16989
+
16990
+ // Apply env-specific formatting (colors, etc.)
16991
+ createDebug.formatArgs.call(self, args);
16992
+
16993
+ const logFn = self.log || createDebug.log;
16994
+ logFn.apply(self, args);
16995
+ }
16996
+
16997
+ debug.namespace = namespace;
16998
+ debug.useColors = createDebug.useColors();
16999
+ debug.color = createDebug.selectColor(namespace);
17000
+ debug.extend = extend;
17001
+ debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
17002
+
17003
+ Object.defineProperty(debug, 'enabled', {
17004
+ enumerable: true,
17005
+ configurable: false,
17006
+ get: () => {
17007
+ if (enableOverride !== null) {
17008
+ return enableOverride;
17009
+ }
17010
+ if (namespacesCache !== createDebug.namespaces) {
17011
+ namespacesCache = createDebug.namespaces;
17012
+ enabledCache = createDebug.enabled(namespace);
17013
+ }
17014
+
17015
+ return enabledCache;
17016
+ },
17017
+ set: v => {
17018
+ enableOverride = v;
17019
+ }
17020
+ });
17021
+
17022
+ // Env-specific initialization logic for debug instances
17023
+ if (typeof createDebug.init === 'function') {
17024
+ createDebug.init(debug);
17025
+ }
17026
+
17027
+ return debug;
17028
+ }
17029
+
17030
+ function extend(namespace, delimiter) {
17031
+ const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
17032
+ newDebug.log = this.log;
17033
+ return newDebug;
17034
+ }
17035
+
17036
+ /**
17037
+ * Enables a debug mode by namespaces. This can include modes
17038
+ * separated by a colon and wildcards.
17039
+ *
17040
+ * @param {String} namespaces
17041
+ * @api public
17042
+ */
17043
+ function enable(namespaces) {
17044
+ createDebug.save(namespaces);
17045
+ createDebug.namespaces = namespaces;
17046
+
17047
+ createDebug.names = [];
17048
+ createDebug.skips = [];
17049
+
17050
+ let i;
17051
+ const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
17052
+ const len = split.length;
17053
+
17054
+ for (i = 0; i < len; i++) {
17055
+ if (!split[i]) {
17056
+ // ignore empty strings
17057
+ continue;
17058
+ }
17059
+
17060
+ namespaces = split[i].replace(/\*/g, '.*?');
17061
+
17062
+ if (namespaces[0] === '-') {
17063
+ createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
17064
+ } else {
17065
+ createDebug.names.push(new RegExp('^' + namespaces + '$'));
17066
+ }
17067
+ }
17068
+ }
17069
+
17070
+ /**
17071
+ * Disable debug output.
17072
+ *
17073
+ * @return {String} namespaces
17074
+ * @api public
17075
+ */
17076
+ function disable() {
17077
+ const namespaces = [
17078
+ ...createDebug.names.map(toNamespace),
17079
+ ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
17080
+ ].join(',');
17081
+ createDebug.enable('');
17082
+ return namespaces;
17083
+ }
17084
+
17085
+ /**
17086
+ * Returns true if the given mode name is enabled, false otherwise.
17087
+ *
17088
+ * @param {String} name
17089
+ * @return {Boolean}
17090
+ * @api public
17091
+ */
17092
+ function enabled(name) {
17093
+ if (name[name.length - 1] === '*') {
17094
+ return true;
17095
+ }
17096
+
17097
+ let i;
17098
+ let len;
17099
+
17100
+ for (i = 0, len = createDebug.skips.length; i < len; i++) {
17101
+ if (createDebug.skips[i].test(name)) {
17102
+ return false;
17103
+ }
17104
+ }
17105
+
17106
+ for (i = 0, len = createDebug.names.length; i < len; i++) {
17107
+ if (createDebug.names[i].test(name)) {
17108
+ return true;
17109
+ }
17110
+ }
17111
+
17112
+ return false;
17113
+ }
17114
+
17115
+ /**
17116
+ * Convert regexp to namespace
17117
+ *
17118
+ * @param {RegExp} regxep
17119
+ * @return {String} namespace
17120
+ * @api private
17121
+ */
17122
+ function toNamespace(regexp) {
17123
+ return regexp.toString()
17124
+ .substring(2, regexp.toString().length - 2)
17125
+ .replace(/\.\*\?$/, '*');
17126
+ }
17127
+
17128
+ /**
17129
+ * Coerce `val`.
17130
+ *
17131
+ * @param {Mixed} val
17132
+ * @return {Mixed}
17133
+ * @api private
17134
+ */
17135
+ function coerce(val) {
17136
+ if (val instanceof Error) {
17137
+ return val.stack || val.message;
17138
+ }
17139
+ return val;
17140
+ }
17141
+
17142
+ /**
17143
+ * XXX DO NOT USE. This is a temporary stub function.
17144
+ * XXX It WILL be removed in the next major release.
17145
+ */
17146
+ function destroy() {
17147
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
17148
+ }
17149
+
17150
+ createDebug.enable(createDebug.load());
17151
+
17152
+ return createDebug;
17153
+ }
17154
+
17155
+ common = setup;
17156
+ return common;
17157
+ }
17158
+
17159
+ /* eslint-env browser */
17160
+
17161
+ var hasRequiredBrowser;
17162
+
17163
+ function requireBrowser () {
17164
+ if (hasRequiredBrowser) return browserExports;
17165
+ hasRequiredBrowser = 1;
17166
+ (function (module, exports) {
17167
+ /**
17168
+ * This is the web browser implementation of `debug()`.
17169
+ */
17170
+
17171
+ exports.formatArgs = formatArgs;
17172
+ exports.save = save;
17173
+ exports.load = load;
17174
+ exports.useColors = useColors;
17175
+ exports.storage = localstorage();
17176
+ exports.destroy = (() => {
17177
+ let warned = false;
17178
+
17179
+ return () => {
17180
+ if (!warned) {
17181
+ warned = true;
17182
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
17183
+ }
17184
+ };
17185
+ })();
17186
+
17187
+ /**
17188
+ * Colors.
17189
+ */
17190
+
17191
+ exports.colors = [
17192
+ '#0000CC',
17193
+ '#0000FF',
17194
+ '#0033CC',
17195
+ '#0033FF',
17196
+ '#0066CC',
17197
+ '#0066FF',
17198
+ '#0099CC',
17199
+ '#0099FF',
17200
+ '#00CC00',
17201
+ '#00CC33',
17202
+ '#00CC66',
17203
+ '#00CC99',
17204
+ '#00CCCC',
17205
+ '#00CCFF',
17206
+ '#3300CC',
17207
+ '#3300FF',
17208
+ '#3333CC',
17209
+ '#3333FF',
17210
+ '#3366CC',
17211
+ '#3366FF',
17212
+ '#3399CC',
17213
+ '#3399FF',
17214
+ '#33CC00',
17215
+ '#33CC33',
17216
+ '#33CC66',
17217
+ '#33CC99',
17218
+ '#33CCCC',
17219
+ '#33CCFF',
17220
+ '#6600CC',
17221
+ '#6600FF',
17222
+ '#6633CC',
17223
+ '#6633FF',
17224
+ '#66CC00',
17225
+ '#66CC33',
17226
+ '#9900CC',
17227
+ '#9900FF',
17228
+ '#9933CC',
17229
+ '#9933FF',
17230
+ '#99CC00',
17231
+ '#99CC33',
17232
+ '#CC0000',
17233
+ '#CC0033',
17234
+ '#CC0066',
17235
+ '#CC0099',
17236
+ '#CC00CC',
17237
+ '#CC00FF',
17238
+ '#CC3300',
17239
+ '#CC3333',
17240
+ '#CC3366',
17241
+ '#CC3399',
17242
+ '#CC33CC',
17243
+ '#CC33FF',
17244
+ '#CC6600',
17245
+ '#CC6633',
17246
+ '#CC9900',
17247
+ '#CC9933',
17248
+ '#CCCC00',
17249
+ '#CCCC33',
17250
+ '#FF0000',
17251
+ '#FF0033',
17252
+ '#FF0066',
17253
+ '#FF0099',
17254
+ '#FF00CC',
17255
+ '#FF00FF',
17256
+ '#FF3300',
17257
+ '#FF3333',
17258
+ '#FF3366',
17259
+ '#FF3399',
17260
+ '#FF33CC',
17261
+ '#FF33FF',
17262
+ '#FF6600',
17263
+ '#FF6633',
17264
+ '#FF9900',
17265
+ '#FF9933',
17266
+ '#FFCC00',
17267
+ '#FFCC33'
17268
+ ];
17269
+
17270
+ /**
17271
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
17272
+ * and the Firebug extension (any Firefox version) are known
17273
+ * to support "%c" CSS customizations.
17274
+ *
17275
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
17276
+ */
17277
+
17278
+ // eslint-disable-next-line complexity
17279
+ function useColors() {
17280
+ // NB: In an Electron preload script, document will be defined but not fully
17281
+ // initialized. Since we know we're in Chrome, we'll just detect this case
17282
+ // explicitly
17283
+ if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
17284
+ return true;
17285
+ }
17286
+
17287
+ // Internet Explorer and Edge do not support colors.
17288
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
17289
+ return false;
17290
+ }
17291
+
17292
+ // Is webkit? http://stackoverflow.com/a/16459606/376773
17293
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
17294
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
17295
+ // Is firebug? http://stackoverflow.com/a/398120/376773
17296
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
17297
+ // Is firefox >= v31?
17298
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
17299
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
17300
+ // Double check webkit in userAgent just in case we are in a worker
17301
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
17302
+ }
17303
+
17304
+ /**
17305
+ * Colorize log arguments if enabled.
17306
+ *
17307
+ * @api public
17308
+ */
17309
+
17310
+ function formatArgs(args) {
17311
+ args[0] = (this.useColors ? '%c' : '') +
17312
+ this.namespace +
17313
+ (this.useColors ? ' %c' : ' ') +
17314
+ args[0] +
17315
+ (this.useColors ? '%c ' : ' ') +
17316
+ '+' + module.exports.humanize(this.diff);
17317
+
17318
+ if (!this.useColors) {
17319
+ return;
17320
+ }
17321
+
17322
+ const c = 'color: ' + this.color;
17323
+ args.splice(1, 0, c, 'color: inherit');
17324
+
17325
+ // The final "%c" is somewhat tricky, because there could be other
17326
+ // arguments passed either before or after the %c, so we need to
17327
+ // figure out the correct index to insert the CSS into
17328
+ let index = 0;
17329
+ let lastC = 0;
17330
+ args[0].replace(/%[a-zA-Z%]/g, match => {
17331
+ if (match === '%%') {
17332
+ return;
17333
+ }
17334
+ index++;
17335
+ if (match === '%c') {
17336
+ // We only are interested in the *last* %c
17337
+ // (the user may have provided their own)
17338
+ lastC = index;
17339
+ }
17340
+ });
17341
+
17342
+ args.splice(lastC, 0, c);
17343
+ }
17344
+
17345
+ /**
17346
+ * Invokes `console.debug()` when available.
17347
+ * No-op when `console.debug` is not a "function".
17348
+ * If `console.debug` is not available, falls back
17349
+ * to `console.log`.
17350
+ *
17351
+ * @api public
17352
+ */
17353
+ exports.log = console.debug || console.log || (() => {});
17354
+
17355
+ /**
17356
+ * Save `namespaces`.
17357
+ *
17358
+ * @param {String} namespaces
17359
+ * @api private
17360
+ */
17361
+ function save(namespaces) {
17362
+ try {
17363
+ if (namespaces) {
17364
+ exports.storage.setItem('debug', namespaces);
17365
+ } else {
17366
+ exports.storage.removeItem('debug');
17367
+ }
17368
+ } catch (error) {
17369
+ // Swallow
17370
+ // XXX (@Qix-) should we be logging these?
17371
+ }
17372
+ }
17373
+
17374
+ /**
17375
+ * Load `namespaces`.
17376
+ *
17377
+ * @return {String} returns the previously persisted debug modes
17378
+ * @api private
17379
+ */
17380
+ function load() {
17381
+ let r;
17382
+ try {
17383
+ r = exports.storage.getItem('debug');
17384
+ } catch (error) {
17385
+ // Swallow
17386
+ // XXX (@Qix-) should we be logging these?
17387
+ }
17388
+
17389
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
17390
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
17391
+ r = process.env.DEBUG;
17392
+ }
17393
+
17394
+ return r;
17395
+ }
17396
+
17397
+ /**
17398
+ * Localstorage attempts to return the localstorage.
17399
+ *
17400
+ * This is necessary because safari throws
17401
+ * when a user disables cookies/localstorage
17402
+ * and you attempt to access it.
17403
+ *
17404
+ * @return {LocalStorage}
17405
+ * @api private
17406
+ */
17407
+
17408
+ function localstorage() {
17409
+ try {
17410
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
17411
+ // The Browser also has localStorage in the global context.
17412
+ return localStorage;
17413
+ } catch (error) {
17414
+ // Swallow
17415
+ // XXX (@Qix-) should we be logging these?
17416
+ }
17417
+ }
17418
+
17419
+ module.exports = requireCommon()(exports);
17420
+
17421
+ const {formatters} = module.exports;
17422
+
17423
+ /**
17424
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
17425
+ */
17426
+
17427
+ formatters.j = function (v) {
17428
+ try {
17429
+ return JSON.stringify(v);
17430
+ } catch (error) {
17431
+ return '[UnexpectedJSONParseError]: ' + error.message;
17432
+ }
17433
+ };
17434
+ } (browser, browserExports));
17435
+ return browserExports;
17436
+ }
17437
+
17438
+ var nodeExports = {};
17439
+ var node = {
17440
+ get exports(){ return nodeExports; },
17441
+ set exports(v){ nodeExports = v; },
17442
+ };
17443
+
17444
+ var hasFlag;
17445
+ var hasRequiredHasFlag;
17446
+
17447
+ function requireHasFlag () {
17448
+ if (hasRequiredHasFlag) return hasFlag;
17449
+ hasRequiredHasFlag = 1;
17450
+ hasFlag = (flag, argv) => {
17451
+ argv = argv || process.argv;
17452
+ const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
17453
+ const pos = argv.indexOf(prefix + flag);
17454
+ const terminatorPos = argv.indexOf('--');
17455
+ return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
17456
+ };
17457
+ return hasFlag;
17458
+ }
17459
+
17460
+ var supportsColor_1;
17461
+ var hasRequiredSupportsColor;
17462
+
17463
+ function requireSupportsColor () {
17464
+ if (hasRequiredSupportsColor) return supportsColor_1;
17465
+ hasRequiredSupportsColor = 1;
17466
+ const os = require$$1$1;
17467
+ const hasFlag = requireHasFlag();
17468
+
17469
+ const env = process.env;
17470
+
17471
+ let forceColor;
17472
+ if (hasFlag('no-color') ||
17473
+ hasFlag('no-colors') ||
17474
+ hasFlag('color=false')) {
17475
+ forceColor = false;
17476
+ } else if (hasFlag('color') ||
17477
+ hasFlag('colors') ||
17478
+ hasFlag('color=true') ||
17479
+ hasFlag('color=always')) {
17480
+ forceColor = true;
17481
+ }
17482
+ if ('FORCE_COLOR' in env) {
17483
+ forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
17484
+ }
17485
+
17486
+ function translateLevel(level) {
17487
+ if (level === 0) {
17488
+ return false;
17489
+ }
17490
+
17491
+ return {
17492
+ level,
17493
+ hasBasic: true,
17494
+ has256: level >= 2,
17495
+ has16m: level >= 3
17496
+ };
17497
+ }
17498
+
17499
+ function supportsColor(stream) {
17500
+ if (forceColor === false) {
17501
+ return 0;
17502
+ }
17503
+
17504
+ if (hasFlag('color=16m') ||
17505
+ hasFlag('color=full') ||
17506
+ hasFlag('color=truecolor')) {
17507
+ return 3;
17508
+ }
17509
+
17510
+ if (hasFlag('color=256')) {
17511
+ return 2;
17512
+ }
17513
+
17514
+ if (stream && !stream.isTTY && forceColor !== true) {
17515
+ return 0;
17516
+ }
17517
+
17518
+ const min = forceColor ? 1 : 0;
17519
+
17520
+ if (process.platform === 'win32') {
17521
+ // Node.js 7.5.0 is the first version of Node.js to include a patch to
17522
+ // libuv that enables 256 color output on Windows. Anything earlier and it
17523
+ // won't work. However, here we target Node.js 8 at minimum as it is an LTS
17524
+ // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
17525
+ // release that supports 256 colors. Windows 10 build 14931 is the first release
17526
+ // that supports 16m/TrueColor.
17527
+ const osRelease = os.release().split('.');
17528
+ if (
17529
+ Number(process.versions.node.split('.')[0]) >= 8 &&
17530
+ Number(osRelease[0]) >= 10 &&
17531
+ Number(osRelease[2]) >= 10586
17532
+ ) {
17533
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
17534
+ }
17535
+
17536
+ return 1;
17537
+ }
17538
+
17539
+ if ('CI' in env) {
17540
+ if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
17541
+ return 1;
17542
+ }
17543
+
17544
+ return min;
17545
+ }
17546
+
17547
+ if ('TEAMCITY_VERSION' in env) {
17548
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
17549
+ }
17550
+
17551
+ if (env.COLORTERM === 'truecolor') {
17552
+ return 3;
17553
+ }
17554
+
17555
+ if ('TERM_PROGRAM' in env) {
17556
+ const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
17557
+
17558
+ switch (env.TERM_PROGRAM) {
17559
+ case 'iTerm.app':
17560
+ return version >= 3 ? 3 : 2;
17561
+ case 'Apple_Terminal':
17562
+ return 2;
17563
+ // No default
17564
+ }
17565
+ }
17566
+
17567
+ if (/-256(color)?$/i.test(env.TERM)) {
17568
+ return 2;
17569
+ }
17570
+
17571
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
17572
+ return 1;
17573
+ }
17574
+
17575
+ if ('COLORTERM' in env) {
17576
+ return 1;
17577
+ }
17578
+
17579
+ if (env.TERM === 'dumb') {
17580
+ return min;
17581
+ }
17582
+
17583
+ return min;
17584
+ }
17585
+
17586
+ function getSupportLevel(stream) {
17587
+ const level = supportsColor(stream);
17588
+ return translateLevel(level);
17589
+ }
17590
+
17591
+ supportsColor_1 = {
17592
+ supportsColor: getSupportLevel,
17593
+ stdout: getSupportLevel(process.stdout),
17594
+ stderr: getSupportLevel(process.stderr)
17595
+ };
17596
+ return supportsColor_1;
17597
+ }
17598
+
17599
+ /**
17600
+ * Module dependencies.
17601
+ */
17602
+
17603
+ var hasRequiredNode;
17604
+
17605
+ function requireNode () {
17606
+ if (hasRequiredNode) return nodeExports;
17607
+ hasRequiredNode = 1;
17608
+ (function (module, exports) {
17609
+ const tty = require$$0$2;
17610
+ const util = require$$1;
17611
+
17612
+ /**
17613
+ * This is the Node.js implementation of `debug()`.
17614
+ */
17615
+
17616
+ exports.init = init;
17617
+ exports.log = log;
17618
+ exports.formatArgs = formatArgs;
17619
+ exports.save = save;
17620
+ exports.load = load;
17621
+ exports.useColors = useColors;
17622
+ exports.destroy = util.deprecate(
17623
+ () => {},
17624
+ 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
17625
+ );
17626
+
17627
+ /**
17628
+ * Colors.
17629
+ */
17630
+
17631
+ exports.colors = [6, 2, 3, 4, 5, 1];
17632
+
17633
+ try {
17634
+ // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
17635
+ // eslint-disable-next-line import/no-extraneous-dependencies
17636
+ const supportsColor = requireSupportsColor();
17637
+
17638
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
17639
+ exports.colors = [
17640
+ 20,
17641
+ 21,
17642
+ 26,
17643
+ 27,
17644
+ 32,
17645
+ 33,
17646
+ 38,
17647
+ 39,
17648
+ 40,
17649
+ 41,
17650
+ 42,
17651
+ 43,
17652
+ 44,
17653
+ 45,
17654
+ 56,
17655
+ 57,
17656
+ 62,
17657
+ 63,
17658
+ 68,
17659
+ 69,
17660
+ 74,
17661
+ 75,
17662
+ 76,
17663
+ 77,
17664
+ 78,
17665
+ 79,
17666
+ 80,
17667
+ 81,
17668
+ 92,
17669
+ 93,
17670
+ 98,
17671
+ 99,
17672
+ 112,
17673
+ 113,
17674
+ 128,
17675
+ 129,
17676
+ 134,
17677
+ 135,
17678
+ 148,
17679
+ 149,
17680
+ 160,
17681
+ 161,
17682
+ 162,
17683
+ 163,
17684
+ 164,
17685
+ 165,
17686
+ 166,
17687
+ 167,
17688
+ 168,
17689
+ 169,
17690
+ 170,
17691
+ 171,
17692
+ 172,
17693
+ 173,
17694
+ 178,
17695
+ 179,
17696
+ 184,
17697
+ 185,
17698
+ 196,
17699
+ 197,
17700
+ 198,
17701
+ 199,
17702
+ 200,
17703
+ 201,
17704
+ 202,
17705
+ 203,
17706
+ 204,
17707
+ 205,
17708
+ 206,
17709
+ 207,
17710
+ 208,
17711
+ 209,
17712
+ 214,
17713
+ 215,
17714
+ 220,
17715
+ 221
17716
+ ];
17717
+ }
17718
+ } catch (error) {
17719
+ // Swallow - we only care if `supports-color` is available; it doesn't have to be.
17720
+ }
17721
+
17722
+ /**
17723
+ * Build up the default `inspectOpts` object from the environment variables.
17724
+ *
17725
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
17726
+ */
17727
+
17728
+ exports.inspectOpts = Object.keys(process.env).filter(key => {
17729
+ return /^debug_/i.test(key);
17730
+ }).reduce((obj, key) => {
17731
+ // Camel-case
17732
+ const prop = key
17733
+ .substring(6)
17734
+ .toLowerCase()
17735
+ .replace(/_([a-z])/g, (_, k) => {
17736
+ return k.toUpperCase();
17737
+ });
17738
+
17739
+ // Coerce string value into JS value
17740
+ let val = process.env[key];
17741
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
17742
+ val = true;
17743
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
17744
+ val = false;
17745
+ } else if (val === 'null') {
17746
+ val = null;
17747
+ } else {
17748
+ val = Number(val);
17749
+ }
17750
+
17751
+ obj[prop] = val;
17752
+ return obj;
17753
+ }, {});
17754
+
17755
+ /**
17756
+ * Is stdout a TTY? Colored output is enabled when `true`.
17757
+ */
17758
+
17759
+ function useColors() {
17760
+ return 'colors' in exports.inspectOpts ?
17761
+ Boolean(exports.inspectOpts.colors) :
17762
+ tty.isatty(process.stderr.fd);
17763
+ }
17764
+
17765
+ /**
17766
+ * Adds ANSI color escape codes if enabled.
17767
+ *
17768
+ * @api public
17769
+ */
17770
+
17771
+ function formatArgs(args) {
17772
+ const {namespace: name, useColors} = this;
17773
+
17774
+ if (useColors) {
17775
+ const c = this.color;
17776
+ const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
17777
+ const prefix = ` ${colorCode};1m${name} \u001B[0m`;
17778
+
17779
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
17780
+ args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
17781
+ } else {
17782
+ args[0] = getDate() + name + ' ' + args[0];
17783
+ }
17784
+ }
17785
+
17786
+ function getDate() {
17787
+ if (exports.inspectOpts.hideDate) {
17788
+ return '';
17789
+ }
17790
+ return new Date().toISOString() + ' ';
17791
+ }
17792
+
17793
+ /**
17794
+ * Invokes `util.format()` with the specified arguments and writes to stderr.
17795
+ */
17796
+
17797
+ function log(...args) {
17798
+ return process.stderr.write(util.format(...args) + '\n');
17799
+ }
17800
+
17801
+ /**
17802
+ * Save `namespaces`.
17803
+ *
17804
+ * @param {String} namespaces
17805
+ * @api private
17806
+ */
17807
+ function save(namespaces) {
17808
+ if (namespaces) {
17809
+ process.env.DEBUG = namespaces;
17810
+ } else {
17811
+ // If you set a process.env field to null or undefined, it gets cast to the
17812
+ // string 'null' or 'undefined'. Just delete instead.
17813
+ delete process.env.DEBUG;
17814
+ }
17815
+ }
17816
+
17817
+ /**
17818
+ * Load `namespaces`.
17819
+ *
17820
+ * @return {String} returns the previously persisted debug modes
17821
+ * @api private
17822
+ */
17823
+
17824
+ function load() {
17825
+ return process.env.DEBUG;
17826
+ }
17827
+
17828
+ /**
17829
+ * Init logic for `debug` instances.
17830
+ *
17831
+ * Create a new `inspectOpts` object in case `useColors` is set
17832
+ * differently for a particular `debug` instance.
17833
+ */
17834
+
17835
+ function init(debug) {
17836
+ debug.inspectOpts = {};
17837
+
17838
+ const keys = Object.keys(exports.inspectOpts);
17839
+ for (let i = 0; i < keys.length; i++) {
17840
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
17841
+ }
17842
+ }
17843
+
17844
+ module.exports = requireCommon()(exports);
17845
+
17846
+ const {formatters} = module.exports;
17847
+
17848
+ /**
17849
+ * Map %o to `util.inspect()`, all on a single line.
17850
+ */
17851
+
17852
+ formatters.o = function (v) {
17853
+ this.inspectOpts.colors = this.useColors;
17854
+ return util.inspect(v, this.inspectOpts)
17855
+ .split('\n')
17856
+ .map(str => str.trim())
17857
+ .join(' ');
17858
+ };
17859
+
17860
+ /**
17861
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
17862
+ */
17863
+
17864
+ formatters.O = function (v) {
17865
+ this.inspectOpts.colors = this.useColors;
17866
+ return util.inspect(v, this.inspectOpts);
17867
+ };
17868
+ } (node, nodeExports));
17869
+ return nodeExports;
17870
+ }
17871
+
17872
+ /**
17873
+ * Detect Electron renderer / nwjs process, which is node, but we should
17874
+ * treat as a browser.
17875
+ */
17876
+
17877
+ var hasRequiredSrc;
17878
+
17879
+ function requireSrc () {
17880
+ if (hasRequiredSrc) return srcExports;
17881
+ hasRequiredSrc = 1;
17882
+ (function (module) {
17883
+ if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
17884
+ module.exports = requireBrowser();
17885
+ } else {
17886
+ module.exports = requireNode();
17887
+ }
17888
+ } (src));
17889
+ return srcExports;
17890
+ }
17891
+
16396
17892
  var debug$1;
16397
17893
 
16398
17894
  var debug_1 = function () {
@@ -16409,12 +17905,12 @@ var debug_1 = function () {
16409
17905
  debug$1.apply(null, arguments);
16410
17906
  };
16411
17907
 
16412
- var url$1 = require$$0;
17908
+ var url$1 = require$$0$1;
16413
17909
  var URL$1 = url$1.URL;
16414
- var http$1 = require$$1;
17910
+ var http$1 = require$$1$2;
16415
17911
  var https$2 = require$$2$1;
16416
- var Writable = require$$0$2.Writable;
16417
- var assert = require$$0$3;
17912
+ var Writable = require$$0$3.Writable;
17913
+ var assert = require$$4;
16418
17914
  var debug = debug_1;
16419
17915
 
16420
17916
  // Create handlers that pass events from native requests
@@ -17039,11 +18535,11 @@ var utils$6 = utils$c;
17039
18535
  var settle = settle$1;
17040
18536
  var buildFullPath$1 = buildFullPath$2;
17041
18537
  var buildURL$1 = buildURL$2;
17042
- var http = require$$1;
18538
+ var http = require$$1$2;
17043
18539
  var https$1 = require$$2$1;
17044
18540
  var httpFollow = followRedirectsExports.http;
17045
18541
  var httpsFollow = followRedirectsExports.https;
17046
- var url = require$$0;
18542
+ var url = require$$0$1;
17047
18543
  var zlib = require$$0$4;
17048
18544
  var VERSION$1 = data.version;
17049
18545
  var transitionalDefaults$1 = transitional;
@@ -17468,8 +18964,8 @@ var hasRequiredDelayed_stream;
17468
18964
  function requireDelayed_stream () {
17469
18965
  if (hasRequiredDelayed_stream) return delayed_stream;
17470
18966
  hasRequiredDelayed_stream = 1;
17471
- var Stream = require$$0$2.Stream;
17472
- var util = require$$0$1;
18967
+ var Stream = require$$0$3.Stream;
18968
+ var util = require$$1;
17473
18969
 
17474
18970
  delayed_stream = DelayedStream;
17475
18971
  function DelayedStream() {
@@ -17584,8 +19080,8 @@ var hasRequiredCombined_stream;
17584
19080
  function requireCombined_stream () {
17585
19081
  if (hasRequiredCombined_stream) return combined_stream;
17586
19082
  hasRequiredCombined_stream = 1;
17587
- var util = require$$0$1;
17588
- var Stream = require$$0$2.Stream;
19083
+ var util = require$$1;
19084
+ var Stream = require$$0$3.Stream;
17589
19085
  var DelayedStream = requireDelayed_stream();
17590
19086
 
17591
19087
  combined_stream = CombinedStream;
@@ -28556,7 +30052,7 @@ function requireMimeTypes () {
28556
30052
  */
28557
30053
 
28558
30054
  var db = requireMimeDb();
28559
- var extname = require$$1$1.extname;
30055
+ var extname = require$$0.extname;
28560
30056
 
28561
30057
  /**
28562
30058
  * Module variables.
@@ -29225,13 +30721,13 @@ function requireForm_data () {
29225
30721
  if (hasRequiredForm_data) return form_data;
29226
30722
  hasRequiredForm_data = 1;
29227
30723
  var CombinedStream = requireCombined_stream();
29228
- var util = require$$0$1;
29229
- var path = require$$1$1;
29230
- var http = require$$1;
30724
+ var util = require$$1;
30725
+ var path = require$$0;
30726
+ var http = require$$1$2;
29231
30727
  var https = require$$2$1;
29232
- var parseUrl = require$$0.parse;
29233
- var fs = require$$0__default;
29234
- var Stream = require$$0$2.Stream;
30728
+ var parseUrl = require$$0$1.parse;
30729
+ var fs = fs__default;
30730
+ var Stream = require$$0$3.Stream;
29235
30731
  var mime = requireMimeTypes();
29236
30732
  var asynckit = requireAsynckit();
29237
30733
  var populate = requirePopulate();
@@ -39667,12 +41163,12 @@ race$1.race = race;
39667
41163
 
39668
41164
  } (operators));
39669
41165
 
39670
- const fs = require$$0__default;
39671
- const { promisify } = require$$0$1;
41166
+ const fs = fs__default;
41167
+ const { promisify } = require$$1;
39672
41168
  const Joi = requireLib();
39673
41169
  const https = require$$2$1;
39674
- const net = require$$0$5;
39675
- const util = require$$0$1;
41170
+ const net = require$$3;
41171
+ const util = require$$1;
39676
41172
  const axiosPkg = axiosExports$1.default;
39677
41173
  const axiosHttpAdapter = http_1;
39678
41174
  const { isBoolean, isEmpty, negate, noop, once, partial, pick, zip } = fp;
@@ -40073,7 +41569,9 @@ async function setup(nuxt, _functions, options) {
40073
41569
  let url = `http://localhost:${port}`;
40074
41570
  let loaded = false;
40075
41571
  let promise = null;
40076
- async function start() {
41572
+ const mode = options?.mode || "local-serve";
41573
+ const computerHostName = options.tunnel?.name || hostname().split(".").join("");
41574
+ async function startCodeServer() {
40077
41575
  if (options?.reuseExistingServer && !await checkPort(port)) {
40078
41576
  loaded = true;
40079
41577
  url = `http://localhost:${port}/?folder=${encodeURIComponent(nuxt.options.rootDir)}`;
@@ -40100,6 +41598,34 @@ async function setup(nuxt, _functions, options) {
40100
41598
  await new Promise((resolve) => setTimeout(resolve, 2e3));
40101
41599
  loaded = true;
40102
41600
  }
41601
+ async function startCodeTunnel() {
41602
+ const { stdout: currentDir } = await execa("pwd");
41603
+ url = `https://vscode.dev/tunnel/${computerHostName}${currentDir}`;
41604
+ logger.info(LOG_PREFIX, `Starting VS Code tunnel at ${url} ...`);
41605
+ const command = execa("code", [
41606
+ "tunnel",
41607
+ "--accept-server-license-terms",
41608
+ "--name",
41609
+ `${computerHostName}`
41610
+ ]);
41611
+ command.stderr?.pipe(process.stderr);
41612
+ command.stdout?.pipe(process.stdout);
41613
+ nuxt.hook("close", () => {
41614
+ command.kill();
41615
+ });
41616
+ await waitOn_1({
41617
+ resources: [url],
41618
+ timeout: 2e4
41619
+ });
41620
+ await new Promise((resolve) => setTimeout(resolve, 2e3));
41621
+ loaded = true;
41622
+ }
41623
+ async function start() {
41624
+ if (mode === "tunnel")
41625
+ await startCodeTunnel();
41626
+ else
41627
+ await startCodeServer();
41628
+ }
40103
41629
  nuxt.hook("devtools:customTabs", (tabs) => {
40104
41630
  tabs.push({
40105
41631
  name: "builtin-vscode",