mockaton 13.7.0 → 13.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (288) hide show
  1. package/README.md +27 -8
  2. package/package.json +5 -3
  3. package/src/client/ApiConstants.js +0 -2
  4. package/src/client/Filename.js +2 -2
  5. package/src/client/app-payload-viewer.js +4 -2
  6. package/src/client/dir/groupByFolder.js +16 -14
  7. package/src/server/MockBroker.js +7 -2
  8. package/src/server/MockDispatcher.js +3 -2
  9. package/src/server/Mockaton.js +10 -12
  10. package/src/server/Mockaton.test.js +42 -0
  11. package/src/server/cli.js +9 -8
  12. package/src/server/importResolver.js +35 -0
  13. package/src/server/utils/logger.js +2 -4
  14. package/src/server/utils/openInBrowser.js +1 -1
  15. package/vite-plugin/README.md +29 -0
  16. package/vite-plugin/index.ts +21 -0
  17. package/vite-plugin/node_modules/.package-lock.json +356 -0
  18. package/vite-plugin/node_modules/@oxc-project/types/LICENSE +22 -0
  19. package/vite-plugin/node_modules/@oxc-project/types/README.md +3 -0
  20. package/vite-plugin/node_modules/@oxc-project/types/package.json +26 -0
  21. package/vite-plugin/node_modules/@oxc-project/types/types.d.ts +1912 -0
  22. package/vite-plugin/node_modules/@rolldown/binding-darwin-arm64/README.md +3 -0
  23. package/vite-plugin/node_modules/@rolldown/binding-darwin-arm64/package.json +37 -0
  24. package/vite-plugin/node_modules/@rolldown/binding-darwin-arm64/rolldown-binding.darwin-arm64.node +0 -0
  25. package/vite-plugin/node_modules/@rolldown/pluginutils/LICENSE +25 -0
  26. package/vite-plugin/node_modules/@rolldown/pluginutils/README.md +83 -0
  27. package/vite-plugin/node_modules/@rolldown/pluginutils/dist/filter/composable-filters.d.ts +90 -0
  28. package/vite-plugin/node_modules/@rolldown/pluginutils/dist/filter/composable-filters.js +256 -0
  29. package/vite-plugin/node_modules/@rolldown/pluginutils/dist/filter/filter-vite-plugins.d.ts +28 -0
  30. package/vite-plugin/node_modules/@rolldown/pluginutils/dist/filter/filter-vite-plugins.js +75 -0
  31. package/vite-plugin/node_modules/@rolldown/pluginutils/dist/filter/index.d.ts +3 -0
  32. package/vite-plugin/node_modules/@rolldown/pluginutils/dist/filter/index.js +3 -0
  33. package/vite-plugin/node_modules/@rolldown/pluginutils/dist/filter/simple-filters.d.ts +71 -0
  34. package/vite-plugin/node_modules/@rolldown/pluginutils/dist/filter/simple-filters.js +70 -0
  35. package/vite-plugin/node_modules/@rolldown/pluginutils/dist/index.d.ts +1 -0
  36. package/vite-plugin/node_modules/@rolldown/pluginutils/dist/index.js +1 -0
  37. package/vite-plugin/node_modules/@rolldown/pluginutils/dist/utils.d.ts +2 -0
  38. package/vite-plugin/node_modules/@rolldown/pluginutils/dist/utils.js +17 -0
  39. package/vite-plugin/node_modules/@rolldown/pluginutils/package.json +37 -0
  40. package/vite-plugin/node_modules/detect-libc/LICENSE +201 -0
  41. package/vite-plugin/node_modules/detect-libc/README.md +163 -0
  42. package/vite-plugin/node_modules/detect-libc/index.d.ts +14 -0
  43. package/vite-plugin/node_modules/detect-libc/lib/detect-libc.js +313 -0
  44. package/vite-plugin/node_modules/detect-libc/lib/elf.js +39 -0
  45. package/vite-plugin/node_modules/detect-libc/lib/filesystem.js +51 -0
  46. package/vite-plugin/node_modules/detect-libc/lib/process.js +24 -0
  47. package/vite-plugin/node_modules/detect-libc/package.json +44 -0
  48. package/vite-plugin/node_modules/fdir/LICENSE +7 -0
  49. package/vite-plugin/node_modules/fdir/README.md +91 -0
  50. package/vite-plugin/node_modules/fdir/dist/index.cjs +588 -0
  51. package/vite-plugin/node_modules/fdir/dist/index.d.cts +155 -0
  52. package/vite-plugin/node_modules/fdir/dist/index.d.mts +155 -0
  53. package/vite-plugin/node_modules/fdir/dist/index.mjs +570 -0
  54. package/vite-plugin/node_modules/fdir/package.json +103 -0
  55. package/vite-plugin/node_modules/fsevents/LICENSE +22 -0
  56. package/vite-plugin/node_modules/fsevents/README.md +89 -0
  57. package/vite-plugin/node_modules/fsevents/fsevents.d.ts +46 -0
  58. package/vite-plugin/node_modules/fsevents/fsevents.js +83 -0
  59. package/vite-plugin/node_modules/fsevents/fsevents.node +0 -0
  60. package/vite-plugin/node_modules/fsevents/package.json +62 -0
  61. package/vite-plugin/node_modules/lightningcss/LICENSE +373 -0
  62. package/vite-plugin/node_modules/lightningcss/README.md +105 -0
  63. package/vite-plugin/node_modules/lightningcss/node/ast.d.ts +9892 -0
  64. package/vite-plugin/node_modules/lightningcss/node/ast.js.flow +10539 -0
  65. package/vite-plugin/node_modules/lightningcss/node/browserslistToTargets.js +48 -0
  66. package/vite-plugin/node_modules/lightningcss/node/composeVisitors.js +450 -0
  67. package/vite-plugin/node_modules/lightningcss/node/flags.js +28 -0
  68. package/vite-plugin/node_modules/lightningcss/node/index.d.ts +494 -0
  69. package/vite-plugin/node_modules/lightningcss/node/index.js +59 -0
  70. package/vite-plugin/node_modules/lightningcss/node/index.js.flow +843 -0
  71. package/vite-plugin/node_modules/lightningcss/node/index.mjs +4 -0
  72. package/vite-plugin/node_modules/lightningcss/node/targets.d.ts +40 -0
  73. package/vite-plugin/node_modules/lightningcss/node/targets.js.flow +39 -0
  74. package/vite-plugin/node_modules/lightningcss/package.json +110 -0
  75. package/vite-plugin/node_modules/lightningcss-darwin-arm64/LICENSE +373 -0
  76. package/vite-plugin/node_modules/lightningcss-darwin-arm64/README.md +1 -0
  77. package/vite-plugin/node_modules/lightningcss-darwin-arm64/lightningcss.darwin-arm64.node +0 -0
  78. package/vite-plugin/node_modules/lightningcss-darwin-arm64/package.json +34 -0
  79. package/vite-plugin/node_modules/nanoid/LICENSE +20 -0
  80. package/vite-plugin/node_modules/nanoid/README.md +39 -0
  81. package/vite-plugin/node_modules/nanoid/async/index.browser.cjs +69 -0
  82. package/vite-plugin/node_modules/nanoid/async/index.browser.js +34 -0
  83. package/vite-plugin/node_modules/nanoid/async/index.cjs +71 -0
  84. package/vite-plugin/node_modules/nanoid/async/index.d.ts +56 -0
  85. package/vite-plugin/node_modules/nanoid/async/index.js +35 -0
  86. package/vite-plugin/node_modules/nanoid/async/index.native.js +26 -0
  87. package/vite-plugin/node_modules/nanoid/async/package.json +12 -0
  88. package/vite-plugin/node_modules/nanoid/bin/nanoid.cjs +55 -0
  89. package/vite-plugin/node_modules/nanoid/index.browser.cjs +72 -0
  90. package/vite-plugin/node_modules/nanoid/index.browser.js +34 -0
  91. package/vite-plugin/node_modules/nanoid/index.cjs +85 -0
  92. package/vite-plugin/node_modules/nanoid/index.d.cts +91 -0
  93. package/vite-plugin/node_modules/nanoid/index.d.ts +91 -0
  94. package/vite-plugin/node_modules/nanoid/index.js +45 -0
  95. package/vite-plugin/node_modules/nanoid/nanoid.js +1 -0
  96. package/vite-plugin/node_modules/nanoid/non-secure/index.cjs +34 -0
  97. package/vite-plugin/node_modules/nanoid/non-secure/index.d.ts +33 -0
  98. package/vite-plugin/node_modules/nanoid/non-secure/index.js +21 -0
  99. package/vite-plugin/node_modules/nanoid/non-secure/package.json +6 -0
  100. package/vite-plugin/node_modules/nanoid/package.json +89 -0
  101. package/vite-plugin/node_modules/nanoid/url-alphabet/index.cjs +7 -0
  102. package/vite-plugin/node_modules/nanoid/url-alphabet/index.js +3 -0
  103. package/vite-plugin/node_modules/nanoid/url-alphabet/package.json +6 -0
  104. package/vite-plugin/node_modules/picocolors/LICENSE +15 -0
  105. package/vite-plugin/node_modules/picocolors/README.md +21 -0
  106. package/vite-plugin/node_modules/picocolors/package.json +25 -0
  107. package/vite-plugin/node_modules/picocolors/picocolors.browser.js +4 -0
  108. package/vite-plugin/node_modules/picocolors/picocolors.d.ts +5 -0
  109. package/vite-plugin/node_modules/picocolors/picocolors.js +75 -0
  110. package/vite-plugin/node_modules/picocolors/types.d.ts +51 -0
  111. package/vite-plugin/node_modules/picomatch/LICENSE +21 -0
  112. package/vite-plugin/node_modules/picomatch/README.md +749 -0
  113. package/vite-plugin/node_modules/picomatch/index.js +17 -0
  114. package/vite-plugin/node_modules/picomatch/lib/constants.js +184 -0
  115. package/vite-plugin/node_modules/picomatch/lib/parse.js +1386 -0
  116. package/vite-plugin/node_modules/picomatch/lib/picomatch.js +349 -0
  117. package/vite-plugin/node_modules/picomatch/lib/scan.js +391 -0
  118. package/vite-plugin/node_modules/picomatch/lib/utils.js +72 -0
  119. package/vite-plugin/node_modules/picomatch/package.json +82 -0
  120. package/vite-plugin/node_modules/picomatch/posix.js +3 -0
  121. package/vite-plugin/node_modules/postcss/LICENSE +20 -0
  122. package/vite-plugin/node_modules/postcss/README.md +28 -0
  123. package/vite-plugin/node_modules/postcss/lib/at-rule.d.ts +139 -0
  124. package/vite-plugin/node_modules/postcss/lib/at-rule.js +25 -0
  125. package/vite-plugin/node_modules/postcss/lib/comment.d.ts +67 -0
  126. package/vite-plugin/node_modules/postcss/lib/comment.js +13 -0
  127. package/vite-plugin/node_modules/postcss/lib/container.d.ts +478 -0
  128. package/vite-plugin/node_modules/postcss/lib/container.js +447 -0
  129. package/vite-plugin/node_modules/postcss/lib/css-syntax-error.d.ts +247 -0
  130. package/vite-plugin/node_modules/postcss/lib/css-syntax-error.js +133 -0
  131. package/vite-plugin/node_modules/postcss/lib/declaration.d.ts +150 -0
  132. package/vite-plugin/node_modules/postcss/lib/declaration.js +24 -0
  133. package/vite-plugin/node_modules/postcss/lib/document.d.ts +68 -0
  134. package/vite-plugin/node_modules/postcss/lib/document.js +33 -0
  135. package/vite-plugin/node_modules/postcss/lib/fromJSON.d.ts +9 -0
  136. package/vite-plugin/node_modules/postcss/lib/fromJSON.js +54 -0
  137. package/vite-plugin/node_modules/postcss/lib/input.d.ts +226 -0
  138. package/vite-plugin/node_modules/postcss/lib/input.js +273 -0
  139. package/vite-plugin/node_modules/postcss/lib/lazy-result.d.ts +189 -0
  140. package/vite-plugin/node_modules/postcss/lib/lazy-result.js +550 -0
  141. package/vite-plugin/node_modules/postcss/lib/list.d.ts +60 -0
  142. package/vite-plugin/node_modules/postcss/lib/list.js +58 -0
  143. package/vite-plugin/node_modules/postcss/lib/map-generator.js +376 -0
  144. package/vite-plugin/node_modules/postcss/lib/no-work-result.d.ts +45 -0
  145. package/vite-plugin/node_modules/postcss/lib/no-work-result.js +137 -0
  146. package/vite-plugin/node_modules/postcss/lib/node.d.ts +555 -0
  147. package/vite-plugin/node_modules/postcss/lib/node.js +449 -0
  148. package/vite-plugin/node_modules/postcss/lib/parse.d.ts +9 -0
  149. package/vite-plugin/node_modules/postcss/lib/parse.js +42 -0
  150. package/vite-plugin/node_modules/postcss/lib/parser.js +611 -0
  151. package/vite-plugin/node_modules/postcss/lib/postcss.d.mts +66 -0
  152. package/vite-plugin/node_modules/postcss/lib/postcss.d.ts +456 -0
  153. package/vite-plugin/node_modules/postcss/lib/postcss.js +101 -0
  154. package/vite-plugin/node_modules/postcss/lib/postcss.mjs +30 -0
  155. package/vite-plugin/node_modules/postcss/lib/previous-map.d.ts +80 -0
  156. package/vite-plugin/node_modules/postcss/lib/previous-map.js +145 -0
  157. package/vite-plugin/node_modules/postcss/lib/processor.d.ts +114 -0
  158. package/vite-plugin/node_modules/postcss/lib/processor.js +67 -0
  159. package/vite-plugin/node_modules/postcss/lib/result.d.ts +204 -0
  160. package/vite-plugin/node_modules/postcss/lib/result.js +42 -0
  161. package/vite-plugin/node_modules/postcss/lib/root.d.ts +86 -0
  162. package/vite-plugin/node_modules/postcss/lib/root.js +61 -0
  163. package/vite-plugin/node_modules/postcss/lib/rule.d.ts +126 -0
  164. package/vite-plugin/node_modules/postcss/lib/rule.js +27 -0
  165. package/vite-plugin/node_modules/postcss/lib/stringifier.d.ts +45 -0
  166. package/vite-plugin/node_modules/postcss/lib/stringifier.js +370 -0
  167. package/vite-plugin/node_modules/postcss/lib/stringify.d.ts +9 -0
  168. package/vite-plugin/node_modules/postcss/lib/stringify.js +11 -0
  169. package/vite-plugin/node_modules/postcss/lib/symbols.js +5 -0
  170. package/vite-plugin/node_modules/postcss/lib/terminal-highlight.js +70 -0
  171. package/vite-plugin/node_modules/postcss/lib/tokenize.js +266 -0
  172. package/vite-plugin/node_modules/postcss/lib/warn-once.js +13 -0
  173. package/vite-plugin/node_modules/postcss/lib/warning.d.ts +146 -0
  174. package/vite-plugin/node_modules/postcss/lib/warning.js +37 -0
  175. package/vite-plugin/node_modules/postcss/package.json +88 -0
  176. package/vite-plugin/node_modules/rolldown/LICENSE +25 -0
  177. package/vite-plugin/node_modules/rolldown/README.md +11 -0
  178. package/vite-plugin/node_modules/rolldown/bin/cli.mjs +2 -0
  179. package/vite-plugin/node_modules/rolldown/dist/cli.d.mts +1 -0
  180. package/vite-plugin/node_modules/rolldown/dist/cli.mjs +1191 -0
  181. package/vite-plugin/node_modules/rolldown/dist/config.d.mts +14 -0
  182. package/vite-plugin/node_modules/rolldown/dist/config.mjs +4 -0
  183. package/vite-plugin/node_modules/rolldown/dist/experimental-index.d.mts +253 -0
  184. package/vite-plugin/node_modules/rolldown/dist/experimental-index.mjs +320 -0
  185. package/vite-plugin/node_modules/rolldown/dist/experimental-runtime-types.d.ts +98 -0
  186. package/vite-plugin/node_modules/rolldown/dist/filter-index.d.mts +196 -0
  187. package/vite-plugin/node_modules/rolldown/dist/filter-index.mjs +386 -0
  188. package/vite-plugin/node_modules/rolldown/dist/get-log-filter.d.mts +3 -0
  189. package/vite-plugin/node_modules/rolldown/dist/get-log-filter.mjs +68 -0
  190. package/vite-plugin/node_modules/rolldown/dist/index.d.mts +4 -0
  191. package/vite-plugin/node_modules/rolldown/dist/index.mjs +50 -0
  192. package/vite-plugin/node_modules/rolldown/dist/parallel-plugin-worker.d.mts +1 -0
  193. package/vite-plugin/node_modules/rolldown/dist/parallel-plugin-worker.mjs +28 -0
  194. package/vite-plugin/node_modules/rolldown/dist/parallel-plugin.d.mts +13 -0
  195. package/vite-plugin/node_modules/rolldown/dist/parallel-plugin.mjs +6 -0
  196. package/vite-plugin/node_modules/rolldown/dist/parse-ast-index.d.mts +32 -0
  197. package/vite-plugin/node_modules/rolldown/dist/parse-ast-index.mjs +60 -0
  198. package/vite-plugin/node_modules/rolldown/dist/plugins-index.d.mts +33 -0
  199. package/vite-plugin/node_modules/rolldown/dist/plugins-index.mjs +40 -0
  200. package/vite-plugin/node_modules/rolldown/dist/shared/binding-BeU_1iEk.mjs +582 -0
  201. package/vite-plugin/node_modules/rolldown/dist/shared/binding-zH1vcmbM.d.mts +1899 -0
  202. package/vite-plugin/node_modules/rolldown/dist/shared/bindingify-input-options-DbbBhzky.mjs +2211 -0
  203. package/vite-plugin/node_modules/rolldown/dist/shared/constructors-C2EWPKW3.mjs +68 -0
  204. package/vite-plugin/node_modules/rolldown/dist/shared/constructors-D0W3rNfA.d.mts +37 -0
  205. package/vite-plugin/node_modules/rolldown/dist/shared/define-config-5HJ1b9vG.d.mts +3829 -0
  206. package/vite-plugin/node_modules/rolldown/dist/shared/define-config-DJOr6Iwt.mjs +6 -0
  207. package/vite-plugin/node_modules/rolldown/dist/shared/error-DL-e8-oE.mjs +85 -0
  208. package/vite-plugin/node_modules/rolldown/dist/shared/get-log-filter-semyr3Lj.d.mts +35 -0
  209. package/vite-plugin/node_modules/rolldown/dist/shared/load-config-BoVO31Un.mjs +120 -0
  210. package/vite-plugin/node_modules/rolldown/dist/shared/logging-C6h4g8dA.d.mts +50 -0
  211. package/vite-plugin/node_modules/rolldown/dist/shared/logs-D80CXhvg.mjs +180 -0
  212. package/vite-plugin/node_modules/rolldown/dist/shared/misc-DJYbNKZX.mjs +21 -0
  213. package/vite-plugin/node_modules/rolldown/dist/shared/normalize-string-or-regex-CbQQ69gT.mjs +66 -0
  214. package/vite-plugin/node_modules/rolldown/dist/shared/parse-B_ZnWxLZ.mjs +74 -0
  215. package/vite-plugin/node_modules/rolldown/dist/shared/prompt-U5ajztzG.mjs +847 -0
  216. package/vite-plugin/node_modules/rolldown/dist/shared/resolve-tsconfig-CfYpGzid.mjs +113 -0
  217. package/vite-plugin/node_modules/rolldown/dist/shared/rolldown-D3JZ9rMt.mjs +40 -0
  218. package/vite-plugin/node_modules/rolldown/dist/shared/rolldown-build-DSxL8qiP.mjs +3325 -0
  219. package/vite-plugin/node_modules/rolldown/dist/shared/transform-DgZ3paSD.d.mts +149 -0
  220. package/vite-plugin/node_modules/rolldown/dist/shared/watch-Bd8v9ewv.mjs +374 -0
  221. package/vite-plugin/node_modules/rolldown/dist/utils-index.d.mts +376 -0
  222. package/vite-plugin/node_modules/rolldown/dist/utils-index.mjs +2414 -0
  223. package/vite-plugin/node_modules/rolldown/package.json +153 -0
  224. package/vite-plugin/node_modules/source-map-js/LICENSE +28 -0
  225. package/vite-plugin/node_modules/source-map-js/README.md +765 -0
  226. package/vite-plugin/node_modules/source-map-js/lib/array-set.js +121 -0
  227. package/vite-plugin/node_modules/source-map-js/lib/base64-vlq.js +140 -0
  228. package/vite-plugin/node_modules/source-map-js/lib/base64.js +67 -0
  229. package/vite-plugin/node_modules/source-map-js/lib/binary-search.js +111 -0
  230. package/vite-plugin/node_modules/source-map-js/lib/mapping-list.js +79 -0
  231. package/vite-plugin/node_modules/source-map-js/lib/quick-sort.js +132 -0
  232. package/vite-plugin/node_modules/source-map-js/lib/source-map-consumer.d.ts +1 -0
  233. package/vite-plugin/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
  234. package/vite-plugin/node_modules/source-map-js/lib/source-map-generator.d.ts +1 -0
  235. package/vite-plugin/node_modules/source-map-js/lib/source-map-generator.js +444 -0
  236. package/vite-plugin/node_modules/source-map-js/lib/source-node.d.ts +1 -0
  237. package/vite-plugin/node_modules/source-map-js/lib/source-node.js +413 -0
  238. package/vite-plugin/node_modules/source-map-js/lib/util.js +594 -0
  239. package/vite-plugin/node_modules/source-map-js/package.json +71 -0
  240. package/vite-plugin/node_modules/source-map-js/source-map.d.ts +104 -0
  241. package/vite-plugin/node_modules/source-map-js/source-map.js +8 -0
  242. package/vite-plugin/node_modules/tinyglobby/LICENSE +21 -0
  243. package/vite-plugin/node_modules/tinyglobby/README.md +25 -0
  244. package/vite-plugin/node_modules/tinyglobby/dist/index.cjs +334 -0
  245. package/vite-plugin/node_modules/tinyglobby/dist/index.d.cts +148 -0
  246. package/vite-plugin/node_modules/tinyglobby/dist/index.d.mts +148 -0
  247. package/vite-plugin/node_modules/tinyglobby/dist/index.mjs +306 -0
  248. package/vite-plugin/node_modules/tinyglobby/package.json +73 -0
  249. package/vite-plugin/node_modules/vite/LICENSE.md +2230 -0
  250. package/vite-plugin/node_modules/vite/README.md +20 -0
  251. package/vite-plugin/node_modules/vite/bin/openChrome.js +68 -0
  252. package/vite-plugin/node_modules/vite/bin/vite.js +79 -0
  253. package/vite-plugin/node_modules/vite/client.d.ts +282 -0
  254. package/vite-plugin/node_modules/vite/dist/client/client.mjs +1237 -0
  255. package/vite-plugin/node_modules/vite/dist/client/env.mjs +18 -0
  256. package/vite-plugin/node_modules/vite/dist/node/chunks/build.js +5381 -0
  257. package/vite-plugin/node_modules/vite/dist/node/chunks/chunk.js +37 -0
  258. package/vite-plugin/node_modules/vite/dist/node/chunks/dist.js +6784 -0
  259. package/vite-plugin/node_modules/vite/dist/node/chunks/lib.js +371 -0
  260. package/vite-plugin/node_modules/vite/dist/node/chunks/logger.js +322 -0
  261. package/vite-plugin/node_modules/vite/dist/node/chunks/moduleRunnerTransport.d.ts +96 -0
  262. package/vite-plugin/node_modules/vite/dist/node/chunks/node.js +34874 -0
  263. package/vite-plugin/node_modules/vite/dist/node/chunks/postcss-import.js +467 -0
  264. package/vite-plugin/node_modules/vite/dist/node/cli.js +837 -0
  265. package/vite-plugin/node_modules/vite/dist/node/index.d.ts +3867 -0
  266. package/vite-plugin/node_modules/vite/dist/node/index.js +3 -0
  267. package/vite-plugin/node_modules/vite/dist/node/internal.d.ts +2 -0
  268. package/vite-plugin/node_modules/vite/dist/node/internal.js +2 -0
  269. package/vite-plugin/node_modules/vite/dist/node/module-runner.d.ts +315 -0
  270. package/vite-plugin/node_modules/vite/dist/node/module-runner.js +1262 -0
  271. package/vite-plugin/node_modules/vite/misc/false.js +1 -0
  272. package/vite-plugin/node_modules/vite/misc/true.js +1 -0
  273. package/vite-plugin/node_modules/vite/package.json +192 -0
  274. package/vite-plugin/node_modules/vite/types/customEvent.d.ts +79 -0
  275. package/vite-plugin/node_modules/vite/types/hmrPayload.d.ts +80 -0
  276. package/vite-plugin/node_modules/vite/types/hot.d.ts +39 -0
  277. package/vite-plugin/node_modules/vite/types/import-meta.d.ts +5 -0
  278. package/vite-plugin/node_modules/vite/types/importGlob.d.ts +89 -0
  279. package/vite-plugin/node_modules/vite/types/importMeta.d.ts +30 -0
  280. package/vite-plugin/node_modules/vite/types/internal/cssPreprocessorOptions.d.ts +44 -0
  281. package/vite-plugin/node_modules/vite/types/internal/esbuildOptions.d.ts +28 -0
  282. package/vite-plugin/node_modules/vite/types/internal/lightningcssOptions.d.ts +18 -0
  283. package/vite-plugin/node_modules/vite/types/internal/rollupTypeCompat.d.ts +24 -0
  284. package/vite-plugin/node_modules/vite/types/internal/terserOptions.d.ts +11 -0
  285. package/vite-plugin/node_modules/vite/types/metadata.d.ts +47 -0
  286. package/vite-plugin/package.json +14 -0
  287. package/www/src/{assets → .well-known/agent-skills/mockaton}/SKILLS.md +21 -9
  288. package/src/server/cacheBustResolver.js +0 -19
@@ -0,0 +1,371 @@
1
+ import { t as __commonJSMin } from "./chunk.js";
2
+ //#region ../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/parse.js
3
+ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4
+ var openParentheses = "(".charCodeAt(0);
5
+ var closeParentheses = ")".charCodeAt(0);
6
+ var singleQuote = "'".charCodeAt(0);
7
+ var doubleQuote = "\"".charCodeAt(0);
8
+ var backslash = "\\".charCodeAt(0);
9
+ var slash = "/".charCodeAt(0);
10
+ var comma = ",".charCodeAt(0);
11
+ var colon = ":".charCodeAt(0);
12
+ var star = "*".charCodeAt(0);
13
+ var uLower = "u".charCodeAt(0);
14
+ var uUpper = "U".charCodeAt(0);
15
+ var plus = "+".charCodeAt(0);
16
+ var isUnicodeRange = /^[a-f0-9?-]+$/i;
17
+ module.exports = function(input) {
18
+ var tokens = [];
19
+ var value = input;
20
+ var next, quote, prev, token, escape, escapePos, whitespacePos, parenthesesOpenPos;
21
+ var pos = 0;
22
+ var code = value.charCodeAt(pos);
23
+ var max = value.length;
24
+ var stack = [{ nodes: tokens }];
25
+ var balanced = 0;
26
+ var parent;
27
+ var name = "";
28
+ var before = "";
29
+ var after = "";
30
+ while (pos < max) if (code <= 32) {
31
+ next = pos;
32
+ do {
33
+ next += 1;
34
+ code = value.charCodeAt(next);
35
+ } while (code <= 32);
36
+ token = value.slice(pos, next);
37
+ prev = tokens[tokens.length - 1];
38
+ if (code === closeParentheses && balanced) after = token;
39
+ else if (prev && prev.type === "div") {
40
+ prev.after = token;
41
+ prev.sourceEndIndex += token.length;
42
+ } else if (code === comma || code === colon || code === slash && value.charCodeAt(next + 1) !== star && (!parent || parent && parent.type === "function" && parent.value !== "calc")) before = token;
43
+ else tokens.push({
44
+ type: "space",
45
+ sourceIndex: pos,
46
+ sourceEndIndex: next,
47
+ value: token
48
+ });
49
+ pos = next;
50
+ } else if (code === singleQuote || code === doubleQuote) {
51
+ next = pos;
52
+ quote = code === singleQuote ? "'" : "\"";
53
+ token = {
54
+ type: "string",
55
+ sourceIndex: pos,
56
+ quote
57
+ };
58
+ do {
59
+ escape = false;
60
+ next = value.indexOf(quote, next + 1);
61
+ if (~next) {
62
+ escapePos = next;
63
+ while (value.charCodeAt(escapePos - 1) === backslash) {
64
+ escapePos -= 1;
65
+ escape = !escape;
66
+ }
67
+ } else {
68
+ value += quote;
69
+ next = value.length - 1;
70
+ token.unclosed = true;
71
+ }
72
+ } while (escape);
73
+ token.value = value.slice(pos + 1, next);
74
+ token.sourceEndIndex = token.unclosed ? next : next + 1;
75
+ tokens.push(token);
76
+ pos = next + 1;
77
+ code = value.charCodeAt(pos);
78
+ } else if (code === slash && value.charCodeAt(pos + 1) === star) {
79
+ next = value.indexOf("*/", pos);
80
+ token = {
81
+ type: "comment",
82
+ sourceIndex: pos,
83
+ sourceEndIndex: next + 2
84
+ };
85
+ if (next === -1) {
86
+ token.unclosed = true;
87
+ next = value.length;
88
+ token.sourceEndIndex = next;
89
+ }
90
+ token.value = value.slice(pos + 2, next);
91
+ tokens.push(token);
92
+ pos = next + 2;
93
+ code = value.charCodeAt(pos);
94
+ } else if ((code === slash || code === star) && parent && parent.type === "function" && parent.value === "calc") {
95
+ token = value[pos];
96
+ tokens.push({
97
+ type: "word",
98
+ sourceIndex: pos - before.length,
99
+ sourceEndIndex: pos + token.length,
100
+ value: token
101
+ });
102
+ pos += 1;
103
+ code = value.charCodeAt(pos);
104
+ } else if (code === slash || code === comma || code === colon) {
105
+ token = value[pos];
106
+ tokens.push({
107
+ type: "div",
108
+ sourceIndex: pos - before.length,
109
+ sourceEndIndex: pos + token.length,
110
+ value: token,
111
+ before,
112
+ after: ""
113
+ });
114
+ before = "";
115
+ pos += 1;
116
+ code = value.charCodeAt(pos);
117
+ } else if (openParentheses === code) {
118
+ next = pos;
119
+ do {
120
+ next += 1;
121
+ code = value.charCodeAt(next);
122
+ } while (code <= 32);
123
+ parenthesesOpenPos = pos;
124
+ token = {
125
+ type: "function",
126
+ sourceIndex: pos - name.length,
127
+ value: name,
128
+ before: value.slice(parenthesesOpenPos + 1, next)
129
+ };
130
+ pos = next;
131
+ if (name === "url" && code !== singleQuote && code !== doubleQuote) {
132
+ next -= 1;
133
+ do {
134
+ escape = false;
135
+ next = value.indexOf(")", next + 1);
136
+ if (~next) {
137
+ escapePos = next;
138
+ while (value.charCodeAt(escapePos - 1) === backslash) {
139
+ escapePos -= 1;
140
+ escape = !escape;
141
+ }
142
+ } else {
143
+ value += ")";
144
+ next = value.length - 1;
145
+ token.unclosed = true;
146
+ }
147
+ } while (escape);
148
+ whitespacePos = next;
149
+ do {
150
+ whitespacePos -= 1;
151
+ code = value.charCodeAt(whitespacePos);
152
+ } while (code <= 32);
153
+ if (parenthesesOpenPos < whitespacePos) {
154
+ if (pos !== whitespacePos + 1) token.nodes = [{
155
+ type: "word",
156
+ sourceIndex: pos,
157
+ sourceEndIndex: whitespacePos + 1,
158
+ value: value.slice(pos, whitespacePos + 1)
159
+ }];
160
+ else token.nodes = [];
161
+ if (token.unclosed && whitespacePos + 1 !== next) {
162
+ token.after = "";
163
+ token.nodes.push({
164
+ type: "space",
165
+ sourceIndex: whitespacePos + 1,
166
+ sourceEndIndex: next,
167
+ value: value.slice(whitespacePos + 1, next)
168
+ });
169
+ } else {
170
+ token.after = value.slice(whitespacePos + 1, next);
171
+ token.sourceEndIndex = next;
172
+ }
173
+ } else {
174
+ token.after = "";
175
+ token.nodes = [];
176
+ }
177
+ pos = next + 1;
178
+ token.sourceEndIndex = token.unclosed ? next : pos;
179
+ code = value.charCodeAt(pos);
180
+ tokens.push(token);
181
+ } else {
182
+ balanced += 1;
183
+ token.after = "";
184
+ token.sourceEndIndex = pos + 1;
185
+ tokens.push(token);
186
+ stack.push(token);
187
+ tokens = token.nodes = [];
188
+ parent = token;
189
+ }
190
+ name = "";
191
+ } else if (closeParentheses === code && balanced) {
192
+ pos += 1;
193
+ code = value.charCodeAt(pos);
194
+ parent.after = after;
195
+ parent.sourceEndIndex += after.length;
196
+ after = "";
197
+ balanced -= 1;
198
+ stack[stack.length - 1].sourceEndIndex = pos;
199
+ stack.pop();
200
+ parent = stack[balanced];
201
+ tokens = parent.nodes;
202
+ } else {
203
+ next = pos;
204
+ do {
205
+ if (code === backslash) next += 1;
206
+ next += 1;
207
+ code = value.charCodeAt(next);
208
+ } while (next < max && !(code <= 32 || code === singleQuote || code === doubleQuote || code === comma || code === colon || code === slash || code === openParentheses || code === star && parent && parent.type === "function" && parent.value === "calc" || code === slash && parent.type === "function" && parent.value === "calc" || code === closeParentheses && balanced));
209
+ token = value.slice(pos, next);
210
+ if (openParentheses === code) name = token;
211
+ else if ((uLower === token.charCodeAt(0) || uUpper === token.charCodeAt(0)) && plus === token.charCodeAt(1) && isUnicodeRange.test(token.slice(2))) tokens.push({
212
+ type: "unicode-range",
213
+ sourceIndex: pos,
214
+ sourceEndIndex: next,
215
+ value: token
216
+ });
217
+ else tokens.push({
218
+ type: "word",
219
+ sourceIndex: pos,
220
+ sourceEndIndex: next,
221
+ value: token
222
+ });
223
+ pos = next;
224
+ }
225
+ for (pos = stack.length - 1; pos; pos -= 1) {
226
+ stack[pos].unclosed = true;
227
+ stack[pos].sourceEndIndex = value.length;
228
+ }
229
+ return stack[0].nodes;
230
+ };
231
+ }));
232
+ //#endregion
233
+ //#region ../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/walk.js
234
+ var require_walk = /* @__PURE__ */ __commonJSMin(((exports, module) => {
235
+ module.exports = function walk(nodes, cb, bubble) {
236
+ var i, max, node, result;
237
+ for (i = 0, max = nodes.length; i < max; i += 1) {
238
+ node = nodes[i];
239
+ if (!bubble) result = cb(node, i, nodes);
240
+ if (result !== false && node.type === "function" && Array.isArray(node.nodes)) walk(node.nodes, cb, bubble);
241
+ if (bubble) cb(node, i, nodes);
242
+ }
243
+ };
244
+ }));
245
+ //#endregion
246
+ //#region ../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/stringify.js
247
+ var require_stringify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
248
+ function stringifyNode(node, custom) {
249
+ var type = node.type;
250
+ var value = node.value;
251
+ var buf;
252
+ var customResult;
253
+ if (custom && (customResult = custom(node)) !== void 0) return customResult;
254
+ else if (type === "word" || type === "space") return value;
255
+ else if (type === "string") {
256
+ buf = node.quote || "";
257
+ return buf + value + (node.unclosed ? "" : buf);
258
+ } else if (type === "comment") return "/*" + value + (node.unclosed ? "" : "*/");
259
+ else if (type === "div") return (node.before || "") + value + (node.after || "");
260
+ else if (Array.isArray(node.nodes)) {
261
+ buf = stringify(node.nodes, custom);
262
+ if (type !== "function") return buf;
263
+ return value + "(" + (node.before || "") + buf + (node.after || "") + (node.unclosed ? "" : ")");
264
+ }
265
+ return value;
266
+ }
267
+ function stringify(nodes, custom) {
268
+ var result, i;
269
+ if (Array.isArray(nodes)) {
270
+ result = "";
271
+ for (i = nodes.length - 1; ~i; i -= 1) result = stringifyNode(nodes[i], custom) + result;
272
+ return result;
273
+ }
274
+ return stringifyNode(nodes, custom);
275
+ }
276
+ module.exports = stringify;
277
+ }));
278
+ //#endregion
279
+ //#region ../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/unit.js
280
+ var require_unit = /* @__PURE__ */ __commonJSMin(((exports, module) => {
281
+ var minus = "-".charCodeAt(0);
282
+ var plus = "+".charCodeAt(0);
283
+ var dot = ".".charCodeAt(0);
284
+ var exp = "e".charCodeAt(0);
285
+ var EXP = "E".charCodeAt(0);
286
+ function likeNumber(value) {
287
+ var code = value.charCodeAt(0);
288
+ var nextCode;
289
+ if (code === plus || code === minus) {
290
+ nextCode = value.charCodeAt(1);
291
+ if (nextCode >= 48 && nextCode <= 57) return true;
292
+ var nextNextCode = value.charCodeAt(2);
293
+ if (nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57) return true;
294
+ return false;
295
+ }
296
+ if (code === dot) {
297
+ nextCode = value.charCodeAt(1);
298
+ if (nextCode >= 48 && nextCode <= 57) return true;
299
+ return false;
300
+ }
301
+ if (code >= 48 && code <= 57) return true;
302
+ return false;
303
+ }
304
+ module.exports = function(value) {
305
+ var pos = 0;
306
+ var length = value.length;
307
+ var code;
308
+ var nextCode;
309
+ var nextNextCode;
310
+ if (length === 0 || !likeNumber(value)) return false;
311
+ code = value.charCodeAt(pos);
312
+ if (code === plus || code === minus) pos++;
313
+ while (pos < length) {
314
+ code = value.charCodeAt(pos);
315
+ if (code < 48 || code > 57) break;
316
+ pos += 1;
317
+ }
318
+ code = value.charCodeAt(pos);
319
+ nextCode = value.charCodeAt(pos + 1);
320
+ if (code === dot && nextCode >= 48 && nextCode <= 57) {
321
+ pos += 2;
322
+ while (pos < length) {
323
+ code = value.charCodeAt(pos);
324
+ if (code < 48 || code > 57) break;
325
+ pos += 1;
326
+ }
327
+ }
328
+ code = value.charCodeAt(pos);
329
+ nextCode = value.charCodeAt(pos + 1);
330
+ nextNextCode = value.charCodeAt(pos + 2);
331
+ if ((code === exp || code === EXP) && (nextCode >= 48 && nextCode <= 57 || (nextCode === plus || nextCode === minus) && nextNextCode >= 48 && nextNextCode <= 57)) {
332
+ pos += nextCode === plus || nextCode === minus ? 3 : 2;
333
+ while (pos < length) {
334
+ code = value.charCodeAt(pos);
335
+ if (code < 48 || code > 57) break;
336
+ pos += 1;
337
+ }
338
+ }
339
+ return {
340
+ number: value.slice(0, pos),
341
+ unit: value.slice(pos)
342
+ };
343
+ };
344
+ }));
345
+ //#endregion
346
+ //#region ../../node_modules/.pnpm/postcss-value-parser@4.2.0/node_modules/postcss-value-parser/lib/index.js
347
+ var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
348
+ var parse = require_parse();
349
+ var walk = require_walk();
350
+ var stringify = require_stringify();
351
+ function ValueParser(value) {
352
+ if (this instanceof ValueParser) {
353
+ this.nodes = parse(value);
354
+ return this;
355
+ }
356
+ return new ValueParser(value);
357
+ }
358
+ ValueParser.prototype.toString = function() {
359
+ return Array.isArray(this.nodes) ? stringify(this.nodes) : "";
360
+ };
361
+ ValueParser.prototype.walk = function(cb, bubble) {
362
+ walk(this.nodes, cb, bubble);
363
+ return this;
364
+ };
365
+ ValueParser.unit = require_unit();
366
+ ValueParser.walk = walk;
367
+ ValueParser.stringify = stringify;
368
+ module.exports = ValueParser;
369
+ }));
370
+ //#endregion
371
+ export { require_lib as t };
@@ -0,0 +1,322 @@
1
+ import { o as __toESM, t as __commonJSMin } from "./chunk.js";
2
+ import { readFileSync } from "node:fs";
3
+ import path, { resolve } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ import readline from "node:readline";
6
+ //#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
7
+ var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8
+ let p = process || {}, argv = p.argv || [], env = p.env || {};
9
+ let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
10
+ let formatter = (open, close, replace = open) => (input) => {
11
+ let string = "" + input, index = string.indexOf(close, open.length);
12
+ return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
13
+ };
14
+ let replaceClose = (string, close, replace, index) => {
15
+ let result = "", cursor = 0;
16
+ do {
17
+ result += string.substring(cursor, index) + replace;
18
+ cursor = index + close.length;
19
+ index = string.indexOf(close, cursor);
20
+ } while (~index);
21
+ return result + string.substring(cursor);
22
+ };
23
+ let createColors = (enabled = isColorSupported) => {
24
+ let f = enabled ? formatter : () => String;
25
+ return {
26
+ isColorSupported: enabled,
27
+ reset: f("\x1B[0m", "\x1B[0m"),
28
+ bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
29
+ dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
30
+ italic: f("\x1B[3m", "\x1B[23m"),
31
+ underline: f("\x1B[4m", "\x1B[24m"),
32
+ inverse: f("\x1B[7m", "\x1B[27m"),
33
+ hidden: f("\x1B[8m", "\x1B[28m"),
34
+ strikethrough: f("\x1B[9m", "\x1B[29m"),
35
+ black: f("\x1B[30m", "\x1B[39m"),
36
+ red: f("\x1B[31m", "\x1B[39m"),
37
+ green: f("\x1B[32m", "\x1B[39m"),
38
+ yellow: f("\x1B[33m", "\x1B[39m"),
39
+ blue: f("\x1B[34m", "\x1B[39m"),
40
+ magenta: f("\x1B[35m", "\x1B[39m"),
41
+ cyan: f("\x1B[36m", "\x1B[39m"),
42
+ white: f("\x1B[37m", "\x1B[39m"),
43
+ gray: f("\x1B[90m", "\x1B[39m"),
44
+ bgBlack: f("\x1B[40m", "\x1B[49m"),
45
+ bgRed: f("\x1B[41m", "\x1B[49m"),
46
+ bgGreen: f("\x1B[42m", "\x1B[49m"),
47
+ bgYellow: f("\x1B[43m", "\x1B[49m"),
48
+ bgBlue: f("\x1B[44m", "\x1B[49m"),
49
+ bgMagenta: f("\x1B[45m", "\x1B[49m"),
50
+ bgCyan: f("\x1B[46m", "\x1B[49m"),
51
+ bgWhite: f("\x1B[47m", "\x1B[49m"),
52
+ blackBright: f("\x1B[90m", "\x1B[39m"),
53
+ redBright: f("\x1B[91m", "\x1B[39m"),
54
+ greenBright: f("\x1B[92m", "\x1B[39m"),
55
+ yellowBright: f("\x1B[93m", "\x1B[39m"),
56
+ blueBright: f("\x1B[94m", "\x1B[39m"),
57
+ magentaBright: f("\x1B[95m", "\x1B[39m"),
58
+ cyanBright: f("\x1B[96m", "\x1B[39m"),
59
+ whiteBright: f("\x1B[97m", "\x1B[39m"),
60
+ bgBlackBright: f("\x1B[100m", "\x1B[49m"),
61
+ bgRedBright: f("\x1B[101m", "\x1B[49m"),
62
+ bgGreenBright: f("\x1B[102m", "\x1B[49m"),
63
+ bgYellowBright: f("\x1B[103m", "\x1B[49m"),
64
+ bgBlueBright: f("\x1B[104m", "\x1B[49m"),
65
+ bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
66
+ bgCyanBright: f("\x1B[106m", "\x1B[49m"),
67
+ bgWhiteBright: f("\x1B[107m", "\x1B[49m")
68
+ };
69
+ };
70
+ module.exports = createColors();
71
+ module.exports.createColors = createColors;
72
+ }));
73
+ //#endregion
74
+ //#region src/node/constants.ts
75
+ const { version } = JSON.parse(readFileSync(new URL("../../package.json", new URL("../../../src/node/constants.ts", import.meta.url))).toString());
76
+ const ROLLUP_HOOKS = [
77
+ "options",
78
+ "buildStart",
79
+ "buildEnd",
80
+ "renderStart",
81
+ "renderError",
82
+ "renderChunk",
83
+ "writeBundle",
84
+ "generateBundle",
85
+ "banner",
86
+ "footer",
87
+ "augmentChunkHash",
88
+ "outputOptions",
89
+ "intro",
90
+ "outro",
91
+ "closeBundle",
92
+ "closeWatcher",
93
+ "load",
94
+ "moduleParsed",
95
+ "watchChange",
96
+ "resolveDynamicImport",
97
+ "resolveId",
98
+ "transform",
99
+ "onLog"
100
+ ];
101
+ const VERSION = version;
102
+ const DEFAULT_MAIN_FIELDS = [
103
+ "browser",
104
+ "module",
105
+ "jsnext:main",
106
+ "jsnext"
107
+ ];
108
+ const DEFAULT_CLIENT_MAIN_FIELDS = Object.freeze(DEFAULT_MAIN_FIELDS);
109
+ const DEFAULT_SERVER_MAIN_FIELDS = Object.freeze(DEFAULT_MAIN_FIELDS.filter((f) => f !== "browser"));
110
+ /**
111
+ * A special condition that would be replaced with production or development
112
+ * depending on NODE_ENV env variable
113
+ */
114
+ const DEV_PROD_CONDITION = `development|production`;
115
+ const DEFAULT_CONDITIONS = [
116
+ "module",
117
+ "browser",
118
+ "node",
119
+ DEV_PROD_CONDITION
120
+ ];
121
+ const DEFAULT_CLIENT_CONDITIONS = Object.freeze(DEFAULT_CONDITIONS.filter((c) => c !== "node"));
122
+ const DEFAULT_SERVER_CONDITIONS = Object.freeze(DEFAULT_CONDITIONS.filter((c) => c !== "browser"));
123
+ const DEFAULT_EXTERNAL_CONDITIONS = Object.freeze(["node", "module-sync"]);
124
+ const DEFAULT_EXTENSIONS = [
125
+ ".mjs",
126
+ ".js",
127
+ ".mts",
128
+ ".ts",
129
+ ".jsx",
130
+ ".tsx",
131
+ ".json"
132
+ ];
133
+ /**
134
+ * The browser versions that are included in the Baseline Widely Available on 2025-05-01.
135
+ *
136
+ * This value would be bumped on each major release of Vite.
137
+ *
138
+ * The value is generated by `pnpm generate-target` script.
139
+ */
140
+ const ESBUILD_BASELINE_WIDELY_AVAILABLE_TARGET = [
141
+ "chrome111",
142
+ "edge111",
143
+ "firefox114",
144
+ "safari16.4",
145
+ "ios16.4"
146
+ ];
147
+ const DEFAULT_CONFIG_FILES = [
148
+ "vite.config.js",
149
+ "vite.config.mjs",
150
+ "vite.config.ts",
151
+ "vite.config.cjs",
152
+ "vite.config.mts",
153
+ "vite.config.cts"
154
+ ];
155
+ const JS_TYPES_RE = /\.(?:j|t)sx?$|\.mjs$/;
156
+ const CSS_LANGS_RE = /\.(css|less|sass|scss|styl|stylus|pcss|postcss|sss)(?:$|\?)/;
157
+ const OPTIMIZABLE_ENTRY_RE = /\.[cm]?[jt]s$/;
158
+ const SPECIAL_QUERY_RE = /[?&](?:worker|sharedworker|raw|url)\b/;
159
+ /**
160
+ * Prefix for resolved fs paths, since windows paths may not be valid as URLs.
161
+ */
162
+ const FS_PREFIX = `/@fs/`;
163
+ const CLIENT_PUBLIC_PATH = `/@vite/client`;
164
+ const ENV_PUBLIC_PATH = `/@vite/env`;
165
+ const VITE_PACKAGE_DIR = resolve(fileURLToPath(new URL("../../../src/node/constants.ts", import.meta.url)), "../../..");
166
+ const CLIENT_ENTRY = resolve(VITE_PACKAGE_DIR, "dist/client/client.mjs");
167
+ const ENV_ENTRY = resolve(VITE_PACKAGE_DIR, "dist/client/env.mjs");
168
+ const CLIENT_DIR = path.dirname(CLIENT_ENTRY);
169
+ const KNOWN_ASSET_TYPES = [
170
+ "apng",
171
+ "bmp",
172
+ "png",
173
+ "jpe?g",
174
+ "jfif",
175
+ "pjpeg",
176
+ "pjp",
177
+ "gif",
178
+ "svg",
179
+ "ico",
180
+ "webp",
181
+ "avif",
182
+ "cur",
183
+ "jxl",
184
+ "mp4",
185
+ "webm",
186
+ "ogg",
187
+ "mp3",
188
+ "wav",
189
+ "flac",
190
+ "aac",
191
+ "opus",
192
+ "mov",
193
+ "m4a",
194
+ "vtt",
195
+ "woff2?",
196
+ "eot",
197
+ "ttf",
198
+ "otf",
199
+ "webmanifest",
200
+ "pdf",
201
+ "txt"
202
+ ];
203
+ const DEFAULT_ASSETS_RE = new RegExp(`\\.(` + KNOWN_ASSET_TYPES.join("|") + `)(\\?.*)?$`, "i");
204
+ const DEP_VERSION_RE = /[?&](v=[\w.-]+)\b/;
205
+ const loopbackHosts = new Set([
206
+ "localhost",
207
+ "127.0.0.1",
208
+ "::1",
209
+ "0000:0000:0000:0000:0000:0000:0000:0001"
210
+ ]);
211
+ const wildcardHosts = new Set([
212
+ "0.0.0.0",
213
+ "::",
214
+ "0000:0000:0000:0000:0000:0000:0000:0000"
215
+ ]);
216
+ const DEFAULT_DEV_PORT = 5173;
217
+ const DEFAULT_PREVIEW_PORT = 4173;
218
+ const DEFAULT_ASSETS_INLINE_LIMIT = 4096;
219
+ const defaultAllowedOrigins = /^https?:\/\/(?:(?:[^:]+\.)?localhost|127\.0\.0\.1|\[::1\])(?::\d+)?$/;
220
+ const METADATA_FILENAME = "_metadata.json";
221
+ const ERR_OPTIMIZE_DEPS_PROCESSING_ERROR = "ERR_OPTIMIZE_DEPS_PROCESSING_ERROR";
222
+ const ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR = "ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR";
223
+ //#endregion
224
+ //#region src/node/logger.ts
225
+ var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
226
+ const LogLevels = {
227
+ silent: 0,
228
+ error: 1,
229
+ warn: 2,
230
+ info: 3
231
+ };
232
+ let lastType;
233
+ let lastMsg;
234
+ let sameCount = 0;
235
+ function clearScreen() {
236
+ const repeatCount = process.stdout.rows - 2;
237
+ const blank = repeatCount > 0 ? "\n".repeat(repeatCount) : "";
238
+ console.log(blank);
239
+ readline.cursorTo(process.stdout, 0, 0);
240
+ readline.clearScreenDown(process.stdout);
241
+ }
242
+ let timeFormatter;
243
+ function getTimeFormatter() {
244
+ timeFormatter ??= new Intl.DateTimeFormat(void 0, {
245
+ hour: "numeric",
246
+ minute: "numeric",
247
+ second: "numeric"
248
+ });
249
+ return timeFormatter;
250
+ }
251
+ function createLogger(level = "info", options = {}) {
252
+ if (options.customLogger) return options.customLogger;
253
+ const loggedErrors = /* @__PURE__ */ new WeakSet();
254
+ const { prefix = "[vite]", allowClearScreen = true, console = globalThis.console } = options;
255
+ const thresh = LogLevels[level];
256
+ const canClearScreen = allowClearScreen && process.stdout.isTTY && !process.env.CI;
257
+ const clear = canClearScreen ? clearScreen : () => {};
258
+ function format(type, msg, options = {}) {
259
+ if (options.timestamp) {
260
+ let tag = "";
261
+ if (type === "info") tag = import_picocolors.default.cyan(import_picocolors.default.bold(prefix));
262
+ else if (type === "warn") tag = import_picocolors.default.yellow(import_picocolors.default.bold(prefix));
263
+ else tag = import_picocolors.default.red(import_picocolors.default.bold(prefix));
264
+ const environment = options.environment ? options.environment + " " : "";
265
+ return `${import_picocolors.default.dim(getTimeFormatter().format(/* @__PURE__ */ new Date()))} ${tag} ${environment}${msg}`;
266
+ } else return msg;
267
+ }
268
+ function output(type, msg, options = {}) {
269
+ if (thresh >= LogLevels[type]) {
270
+ const method = type === "info" ? "log" : type;
271
+ if (options.error) loggedErrors.add(options.error);
272
+ if (canClearScreen) if (type === lastType && msg === lastMsg) {
273
+ sameCount++;
274
+ clear();
275
+ console[method](format(type, msg, options), import_picocolors.default.yellow(`(x${sameCount + 1})`));
276
+ } else {
277
+ sameCount = 0;
278
+ lastMsg = msg;
279
+ lastType = type;
280
+ if (options.clear) clear();
281
+ console[method](format(type, msg, options));
282
+ }
283
+ else console[method](format(type, msg, options));
284
+ }
285
+ }
286
+ const warnedMessages = /* @__PURE__ */ new Set();
287
+ const logger = {
288
+ hasWarned: false,
289
+ info(msg, opts) {
290
+ output("info", msg, opts);
291
+ },
292
+ warn(msg, opts) {
293
+ logger.hasWarned = true;
294
+ output("warn", msg, opts);
295
+ },
296
+ warnOnce(msg, opts) {
297
+ if (warnedMessages.has(msg)) return;
298
+ logger.hasWarned = true;
299
+ output("warn", msg, opts);
300
+ warnedMessages.add(msg);
301
+ },
302
+ error(msg, opts) {
303
+ logger.hasWarned = true;
304
+ output("error", msg, opts);
305
+ },
306
+ clearScreen(type) {
307
+ if (thresh >= LogLevels[type]) clear();
308
+ },
309
+ hasErrorLogged(error) {
310
+ return loggedErrors.has(error);
311
+ }
312
+ };
313
+ return logger;
314
+ }
315
+ function printServerUrls(urls, optionsHost, info) {
316
+ const colorUrl = (url) => import_picocolors.default.cyan(url.replace(/:(\d+)\//, (_, port) => `:${import_picocolors.default.bold(port)}/`));
317
+ for (const url of urls.local) info(` ${import_picocolors.default.green("➜")} ${import_picocolors.default.bold("Local")}: ${colorUrl(url)}`);
318
+ for (const url of urls.network) info(` ${import_picocolors.default.green("➜")} ${import_picocolors.default.bold("Network")}: ${colorUrl(url)}`);
319
+ if (urls.network.length === 0 && optionsHost === void 0) info(import_picocolors.default.dim(` ${import_picocolors.default.green("➜")} ${import_picocolors.default.bold("Network")}: use `) + import_picocolors.default.bold("--host") + import_picocolors.default.dim(" to expose"));
320
+ }
321
+ //#endregion
322
+ export { OPTIMIZABLE_ENTRY_RE as A, ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR as C, JS_TYPES_RE as D, FS_PREFIX as E, defaultAllowedOrigins as F, loopbackHosts as I, wildcardHosts as L, SPECIAL_QUERY_RE as M, VERSION as N, KNOWN_ASSET_TYPES as O, VITE_PACKAGE_DIR as P, require_picocolors as R, ENV_PUBLIC_PATH as S, ESBUILD_BASELINE_WIDELY_AVAILABLE_TARGET as T, DEFAULT_SERVER_CONDITIONS as _, CLIENT_ENTRY as a, DEV_PROD_CONDITION as b, DEFAULT_ASSETS_INLINE_LIMIT as c, DEFAULT_CLIENT_MAIN_FIELDS as d, DEFAULT_CONFIG_FILES as f, DEFAULT_PREVIEW_PORT as g, DEFAULT_EXTERNAL_CONDITIONS as h, CLIENT_DIR as i, ROLLUP_HOOKS as j, METADATA_FILENAME as k, DEFAULT_ASSETS_RE as l, DEFAULT_EXTENSIONS as m, createLogger as n, CLIENT_PUBLIC_PATH as o, DEFAULT_DEV_PORT as p, printServerUrls as r, CSS_LANGS_RE as s, LogLevels as t, DEFAULT_CLIENT_CONDITIONS as u, DEFAULT_SERVER_MAIN_FIELDS as v, ERR_OPTIMIZE_DEPS_PROCESSING_ERROR as w, ENV_ENTRY as x, DEP_VERSION_RE as y };