@tickernelz/paperclip-pro-adapter-utils 2026.925.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 (1826) hide show
  1. package/README.md +37 -0
  2. package/dist/acpx-engine/cli.d.ts +2 -0
  3. package/dist/acpx-engine/cli.d.ts.map +1 -0
  4. package/dist/acpx-engine/cli.js +128 -0
  5. package/dist/acpx-engine/cli.js.map +1 -0
  6. package/dist/acpx-engine/composed-run-characterization.test.d.ts +2 -0
  7. package/dist/acpx-engine/composed-run-characterization.test.d.ts.map +1 -0
  8. package/dist/acpx-engine/composed-run-characterization.test.js +739 -0
  9. package/dist/acpx-engine/composed-run-characterization.test.js.map +1 -0
  10. package/dist/acpx-engine/constants.d.ts +20 -0
  11. package/dist/acpx-engine/constants.d.ts.map +1 -0
  12. package/dist/acpx-engine/constants.js +37 -0
  13. package/dist/acpx-engine/constants.js.map +1 -0
  14. package/dist/acpx-engine/execute-identity.test.d.ts +2 -0
  15. package/dist/acpx-engine/execute-identity.test.d.ts.map +1 -0
  16. package/dist/acpx-engine/execute-identity.test.js +218 -0
  17. package/dist/acpx-engine/execute-identity.test.js.map +1 -0
  18. package/dist/acpx-engine/execute.d.ts +325 -0
  19. package/dist/acpx-engine/execute.d.ts.map +1 -0
  20. package/dist/acpx-engine/execute.js +4448 -0
  21. package/dist/acpx-engine/execute.js.map +1 -0
  22. package/dist/acpx-engine/execute.test.d.ts +2 -0
  23. package/dist/acpx-engine/execute.test.d.ts.map +1 -0
  24. package/dist/acpx-engine/execute.test.js +6694 -0
  25. package/dist/acpx-engine/execute.test.js.map +1 -0
  26. package/dist/acpx-engine/index.d.ts +6 -0
  27. package/dist/acpx-engine/index.d.ts.map +1 -0
  28. package/dist/acpx-engine/index.js +6 -0
  29. package/dist/acpx-engine/index.js.map +1 -0
  30. package/dist/acpx-engine/local-process-control.d.ts +5 -0
  31. package/dist/acpx-engine/local-process-control.d.ts.map +1 -0
  32. package/dist/acpx-engine/local-process-control.js +39 -0
  33. package/dist/acpx-engine/local-process-control.js.map +1 -0
  34. package/dist/acpx-engine/local-process-control.test.d.ts +2 -0
  35. package/dist/acpx-engine/local-process-control.test.d.ts.map +1 -0
  36. package/dist/acpx-engine/local-process-control.test.js +38 -0
  37. package/dist/acpx-engine/local-process-control.test.js.map +1 -0
  38. package/dist/acpx-engine/operator-stop.test.d.ts +2 -0
  39. package/dist/acpx-engine/operator-stop.test.d.ts.map +1 -0
  40. package/dist/acpx-engine/operator-stop.test.js +107 -0
  41. package/dist/acpx-engine/operator-stop.test.js.map +1 -0
  42. package/dist/acpx-engine/remote-spawn-smoke.test.d.ts +2 -0
  43. package/dist/acpx-engine/remote-spawn-smoke.test.d.ts.map +1 -0
  44. package/dist/acpx-engine/remote-spawn-smoke.test.js +151 -0
  45. package/dist/acpx-engine/remote-spawn-smoke.test.js.map +1 -0
  46. package/dist/acpx-engine/run-contracts.d.ts +413 -0
  47. package/dist/acpx-engine/run-contracts.d.ts.map +1 -0
  48. package/dist/acpx-engine/run-contracts.js +20 -0
  49. package/dist/acpx-engine/run-contracts.js.map +1 -0
  50. package/dist/acpx-engine/run-contracts.test.d.ts +2 -0
  51. package/dist/acpx-engine/run-contracts.test.d.ts.map +1 -0
  52. package/dist/acpx-engine/run-contracts.test.js +57 -0
  53. package/dist/acpx-engine/run-contracts.test.js.map +1 -0
  54. package/dist/acpx-engine/run-coordinator.d.ts +57 -0
  55. package/dist/acpx-engine/run-coordinator.d.ts.map +1 -0
  56. package/dist/acpx-engine/run-coordinator.js +63 -0
  57. package/dist/acpx-engine/run-coordinator.js.map +1 -0
  58. package/dist/acpx-engine/run-coordinator.test.d.ts +2 -0
  59. package/dist/acpx-engine/run-coordinator.test.d.ts.map +1 -0
  60. package/dist/acpx-engine/run-coordinator.test.js +160 -0
  61. package/dist/acpx-engine/run-coordinator.test.js.map +1 -0
  62. package/dist/acpx-engine/run-fault-matrix.test.d.ts +2 -0
  63. package/dist/acpx-engine/run-fault-matrix.test.d.ts.map +1 -0
  64. package/dist/acpx-engine/run-fault-matrix.test.js +829 -0
  65. package/dist/acpx-engine/run-fault-matrix.test.js.map +1 -0
  66. package/dist/acpx-engine/run-resource-ledger.d.ts +30 -0
  67. package/dist/acpx-engine/run-resource-ledger.d.ts.map +1 -0
  68. package/dist/acpx-engine/run-resource-ledger.js +148 -0
  69. package/dist/acpx-engine/run-resource-ledger.js.map +1 -0
  70. package/dist/acpx-engine/run-resource-ledger.test.d.ts +2 -0
  71. package/dist/acpx-engine/run-resource-ledger.test.d.ts.map +1 -0
  72. package/dist/acpx-engine/run-resource-ledger.test.js +154 -0
  73. package/dist/acpx-engine/run-resource-ledger.test.js.map +1 -0
  74. package/dist/acpx-engine/run-site-host.d.ts +73 -0
  75. package/dist/acpx-engine/run-site-host.d.ts.map +1 -0
  76. package/dist/acpx-engine/run-site-host.js +65 -0
  77. package/dist/acpx-engine/run-site-host.js.map +1 -0
  78. package/dist/acpx-engine/run-site-host.test.d.ts +2 -0
  79. package/dist/acpx-engine/run-site-host.test.d.ts.map +1 -0
  80. package/dist/acpx-engine/run-site-host.test.js +98 -0
  81. package/dist/acpx-engine/run-site-host.test.js.map +1 -0
  82. package/dist/acpx-engine/run-site-sandbox.d.ts +142 -0
  83. package/dist/acpx-engine/run-site-sandbox.d.ts.map +1 -0
  84. package/dist/acpx-engine/run-site-sandbox.js +278 -0
  85. package/dist/acpx-engine/run-site-sandbox.js.map +1 -0
  86. package/dist/acpx-engine/run-site-sandbox.test.d.ts +2 -0
  87. package/dist/acpx-engine/run-site-sandbox.test.d.ts.map +1 -0
  88. package/dist/acpx-engine/run-site-sandbox.test.js +275 -0
  89. package/dist/acpx-engine/run-site-sandbox.test.js.map +1 -0
  90. package/dist/acpx-engine/session-codec.d.ts +3 -0
  91. package/dist/acpx-engine/session-codec.d.ts.map +1 -0
  92. package/dist/acpx-engine/session-codec.js +49 -0
  93. package/dist/acpx-engine/session-codec.js.map +1 -0
  94. package/dist/acpx-engine/session-reuse-store.d.ts +62 -0
  95. package/dist/acpx-engine/session-reuse-store.d.ts.map +1 -0
  96. package/dist/acpx-engine/session-reuse-store.js +134 -0
  97. package/dist/acpx-engine/session-reuse-store.js.map +1 -0
  98. package/dist/acpx-engine/session-reuse-store.test.d.ts +2 -0
  99. package/dist/acpx-engine/session-reuse-store.test.d.ts.map +1 -0
  100. package/dist/acpx-engine/session-reuse-store.test.js +134 -0
  101. package/dist/acpx-engine/session-reuse-store.test.js.map +1 -0
  102. package/dist/acpx-engine/settlement-characterization.test.d.ts +2 -0
  103. package/dist/acpx-engine/settlement-characterization.test.d.ts.map +1 -0
  104. package/dist/acpx-engine/settlement-characterization.test.js +880 -0
  105. package/dist/acpx-engine/settlement-characterization.test.js.map +1 -0
  106. package/dist/acpx-engine/settlement-sequence.d.ts +77 -0
  107. package/dist/acpx-engine/settlement-sequence.d.ts.map +1 -0
  108. package/dist/acpx-engine/settlement-sequence.js +119 -0
  109. package/dist/acpx-engine/settlement-sequence.js.map +1 -0
  110. package/dist/acpx-engine/settlement-sequence.test.d.ts +2 -0
  111. package/dist/acpx-engine/settlement-sequence.test.d.ts.map +1 -0
  112. package/dist/acpx-engine/settlement-sequence.test.js +272 -0
  113. package/dist/acpx-engine/settlement-sequence.test.js.map +1 -0
  114. package/dist/acpx-engine/spawn-smoke.test.d.ts +2 -0
  115. package/dist/acpx-engine/spawn-smoke.test.d.ts.map +1 -0
  116. package/dist/acpx-engine/spawn-smoke.test.js +184 -0
  117. package/dist/acpx-engine/spawn-smoke.test.js.map +1 -0
  118. package/dist/acpx-engine/startup-cancellation.d.ts +8 -0
  119. package/dist/acpx-engine/startup-cancellation.d.ts.map +1 -0
  120. package/dist/acpx-engine/startup-cancellation.js +92 -0
  121. package/dist/acpx-engine/startup-cancellation.js.map +1 -0
  122. package/dist/acpx-engine/startup-cancellation.test.d.ts +2 -0
  123. package/dist/acpx-engine/startup-cancellation.test.d.ts.map +1 -0
  124. package/dist/acpx-engine/startup-cancellation.test.js +115 -0
  125. package/dist/acpx-engine/startup-cancellation.test.js.map +1 -0
  126. package/dist/acpx-engine/startup-characterization.test.d.ts +2 -0
  127. package/dist/acpx-engine/startup-characterization.test.d.ts.map +1 -0
  128. package/dist/acpx-engine/startup-characterization.test.js +742 -0
  129. package/dist/acpx-engine/startup-characterization.test.js.map +1 -0
  130. package/dist/acpx-engine/startup-timing.d.ts +419 -0
  131. package/dist/acpx-engine/startup-timing.d.ts.map +1 -0
  132. package/dist/acpx-engine/startup-timing.js +616 -0
  133. package/dist/acpx-engine/startup-timing.js.map +1 -0
  134. package/dist/acpx-engine/startup-timing.test.d.ts +2 -0
  135. package/dist/acpx-engine/startup-timing.test.d.ts.map +1 -0
  136. package/dist/acpx-engine/startup-timing.test.js +619 -0
  137. package/dist/acpx-engine/startup-timing.test.js.map +1 -0
  138. package/dist/acpx-engine/turn-characterization.test.d.ts +2 -0
  139. package/dist/acpx-engine/turn-characterization.test.d.ts.map +1 -0
  140. package/dist/acpx-engine/turn-characterization.test.js +566 -0
  141. package/dist/acpx-engine/turn-characterization.test.js.map +1 -0
  142. package/dist/acpx-engine/turn-sequence.d.ts +54 -0
  143. package/dist/acpx-engine/turn-sequence.d.ts.map +1 -0
  144. package/dist/acpx-engine/turn-sequence.js +75 -0
  145. package/dist/acpx-engine/turn-sequence.js.map +1 -0
  146. package/dist/acpx-engine/turn-sequence.test.d.ts +2 -0
  147. package/dist/acpx-engine/turn-sequence.test.d.ts.map +1 -0
  148. package/dist/acpx-engine/turn-sequence.test.js +177 -0
  149. package/dist/acpx-engine/turn-sequence.test.js.map +1 -0
  150. package/dist/acpx-engine/ui.d.ts +3 -0
  151. package/dist/acpx-engine/ui.d.ts.map +1 -0
  152. package/dist/acpx-engine/ui.js +162 -0
  153. package/dist/acpx-engine/ui.js.map +1 -0
  154. package/dist/billing.d.ts +2 -0
  155. package/dist/billing.d.ts.map +1 -0
  156. package/dist/billing.js +16 -0
  157. package/dist/billing.js.map +1 -0
  158. package/dist/billing.test.d.ts +2 -0
  159. package/dist/billing.test.d.ts.map +1 -0
  160. package/dist/billing.test.js +14 -0
  161. package/dist/billing.test.js.map +1 -0
  162. package/dist/bridge-transport-contract.d.ts +43 -0
  163. package/dist/bridge-transport-contract.d.ts.map +1 -0
  164. package/dist/bridge-transport-contract.js +33 -0
  165. package/dist/bridge-transport-contract.js.map +1 -0
  166. package/dist/chat-file-delivery.d.ts +10 -0
  167. package/dist/chat-file-delivery.d.ts.map +1 -0
  168. package/dist/chat-file-delivery.js +38 -0
  169. package/dist/chat-file-delivery.js.map +1 -0
  170. package/dist/chat-file-delivery.test.d.ts +2 -0
  171. package/dist/chat-file-delivery.test.d.ts.map +1 -0
  172. package/dist/chat-file-delivery.test.js +92 -0
  173. package/dist/chat-file-delivery.test.js.map +1 -0
  174. package/dist/command-managed-runtime.d.ts +162 -0
  175. package/dist/command-managed-runtime.d.ts.map +1 -0
  176. package/dist/command-managed-runtime.js +456 -0
  177. package/dist/command-managed-runtime.js.map +1 -0
  178. package/dist/command-managed-runtime.test.d.ts +2 -0
  179. package/dist/command-managed-runtime.test.d.ts.map +1 -0
  180. package/dist/command-managed-runtime.test.js +908 -0
  181. package/dist/command-managed-runtime.test.js.map +1 -0
  182. package/dist/command-redaction.d.ts +15 -0
  183. package/dist/command-redaction.d.ts.map +1 -0
  184. package/dist/command-redaction.js +97 -0
  185. package/dist/command-redaction.js.map +1 -0
  186. package/dist/command-redaction.test.d.ts +2 -0
  187. package/dist/command-redaction.test.d.ts.map +1 -0
  188. package/dist/command-redaction.test.js +80 -0
  189. package/dist/command-redaction.test.js.map +1 -0
  190. package/dist/duplex-frame-codec.d.ts +124 -0
  191. package/dist/duplex-frame-codec.d.ts.map +1 -0
  192. package/dist/duplex-frame-codec.js +134 -0
  193. package/dist/duplex-frame-codec.js.map +1 -0
  194. package/dist/duplex-frame-codec.test.d.ts +2 -0
  195. package/dist/duplex-frame-codec.test.d.ts.map +1 -0
  196. package/dist/duplex-frame-codec.test.js +172 -0
  197. package/dist/duplex-frame-codec.test.js.map +1 -0
  198. package/dist/duplex-observability.d.ts +220 -0
  199. package/dist/duplex-observability.d.ts.map +1 -0
  200. package/dist/duplex-observability.js +248 -0
  201. package/dist/duplex-observability.js.map +1 -0
  202. package/dist/duplex-observability.test.d.ts +2 -0
  203. package/dist/duplex-observability.test.d.ts.map +1 -0
  204. package/dist/duplex-observability.test.js +55 -0
  205. package/dist/duplex-observability.test.js.map +1 -0
  206. package/dist/env-bindings.d.ts +17 -0
  207. package/dist/env-bindings.d.ts.map +1 -0
  208. package/dist/env-bindings.js +98 -0
  209. package/dist/env-bindings.js.map +1 -0
  210. package/dist/env-bindings.test.d.ts +2 -0
  211. package/dist/env-bindings.test.d.ts.map +1 -0
  212. package/dist/env-bindings.test.js +66 -0
  213. package/dist/env-bindings.test.js.map +1 -0
  214. package/dist/exclude-patterns.d.ts +4 -0
  215. package/dist/exclude-patterns.d.ts.map +1 -0
  216. package/dist/exclude-patterns.js +26 -0
  217. package/dist/exclude-patterns.js.map +1 -0
  218. package/dist/execution-target-sandbox.test.d.ts +2 -0
  219. package/dist/execution-target-sandbox.test.d.ts.map +1 -0
  220. package/dist/execution-target-sandbox.test.js +6522 -0
  221. package/dist/execution-target-sandbox.test.js.map +1 -0
  222. package/dist/execution-target-stdin-race.test.d.ts +2 -0
  223. package/dist/execution-target-stdin-race.test.d.ts.map +1 -0
  224. package/dist/execution-target-stdin-race.test.js +1842 -0
  225. package/dist/execution-target-stdin-race.test.js.map +1 -0
  226. package/dist/execution-target.d.ts +537 -0
  227. package/dist/execution-target.d.ts.map +1 -0
  228. package/dist/execution-target.js +3877 -0
  229. package/dist/execution-target.js.map +1 -0
  230. package/dist/execution-target.test.d.ts +2 -0
  231. package/dist/execution-target.test.d.ts.map +1 -0
  232. package/dist/execution-target.test.js +346 -0
  233. package/dist/execution-target.test.js.map +1 -0
  234. package/dist/git-workspace-sync.d.ts +193 -0
  235. package/dist/git-workspace-sync.d.ts.map +1 -0
  236. package/dist/git-workspace-sync.js +786 -0
  237. package/dist/git-workspace-sync.js.map +1 -0
  238. package/dist/git-workspace-sync.test.d.ts +2 -0
  239. package/dist/git-workspace-sync.test.d.ts.map +1 -0
  240. package/dist/git-workspace-sync.test.js +830 -0
  241. package/dist/git-workspace-sync.test.js.map +1 -0
  242. package/dist/github-launcher-environment.test.d.ts +2 -0
  243. package/dist/github-launcher-environment.test.d.ts.map +1 -0
  244. package/dist/github-launcher-environment.test.js +285 -0
  245. package/dist/github-launcher-environment.test.js.map +1 -0
  246. package/dist/github-launcher.d.ts +8 -0
  247. package/dist/github-launcher.d.ts.map +1 -0
  248. package/dist/github-launcher.js +127 -0
  249. package/dist/github-launcher.js.map +1 -0
  250. package/dist/github-launcher.test.d.ts +2 -0
  251. package/dist/github-launcher.test.d.ts.map +1 -0
  252. package/dist/github-launcher.test.js +166 -0
  253. package/dist/github-launcher.test.js.map +1 -0
  254. package/dist/http2-bridge-server.d.ts +465 -0
  255. package/dist/http2-bridge-server.d.ts.map +1 -0
  256. package/dist/http2-bridge-server.js +1087 -0
  257. package/dist/http2-bridge-server.js.map +1 -0
  258. package/dist/http2-bridge-server.test.d.ts +2 -0
  259. package/dist/http2-bridge-server.test.d.ts.map +1 -0
  260. package/dist/http2-bridge-server.test.js +2129 -0
  261. package/dist/http2-bridge-server.test.js.map +1 -0
  262. package/dist/index.d.ts +20 -0
  263. package/dist/index.d.ts.map +1 -0
  264. package/dist/index.js +12 -0
  265. package/dist/index.js.map +1 -0
  266. package/dist/local-process-sandbox.d.ts +41 -0
  267. package/dist/local-process-sandbox.d.ts.map +1 -0
  268. package/dist/local-process-sandbox.js +432 -0
  269. package/dist/local-process-sandbox.js.map +1 -0
  270. package/dist/local-process-sandbox.test.d.ts +2 -0
  271. package/dist/local-process-sandbox.test.d.ts.map +1 -0
  272. package/dist/local-process-sandbox.test.js +399 -0
  273. package/dist/local-process-sandbox.test.js.map +1 -0
  274. package/dist/log-redaction.d.ts +9 -0
  275. package/dist/log-redaction.d.ts.map +1 -0
  276. package/dist/log-redaction.js +88 -0
  277. package/dist/log-redaction.js.map +1 -0
  278. package/dist/login-capability.d.ts +88 -0
  279. package/dist/login-capability.d.ts.map +1 -0
  280. package/dist/login-capability.js +78 -0
  281. package/dist/login-capability.js.map +1 -0
  282. package/dist/login-capability.test.d.ts +2 -0
  283. package/dist/login-capability.test.d.ts.map +1 -0
  284. package/dist/login-capability.test.js +78 -0
  285. package/dist/login-capability.test.js.map +1 -0
  286. package/dist/login-pty-transport.d.ts +80 -0
  287. package/dist/login-pty-transport.d.ts.map +1 -0
  288. package/dist/login-pty-transport.js +75 -0
  289. package/dist/login-pty-transport.js.map +1 -0
  290. package/dist/login-pty-transport.test.d.ts +2 -0
  291. package/dist/login-pty-transport.test.d.ts.map +1 -0
  292. package/dist/login-pty-transport.test.js +185 -0
  293. package/dist/login-pty-transport.test.js.map +1 -0
  294. package/dist/login-runner-lifecycle.d.ts +70 -0
  295. package/dist/login-runner-lifecycle.d.ts.map +1 -0
  296. package/dist/login-runner-lifecycle.js +52 -0
  297. package/dist/login-runner-lifecycle.js.map +1 -0
  298. package/dist/login-runner-lifecycle.test.d.ts +2 -0
  299. package/dist/login-runner-lifecycle.test.d.ts.map +1 -0
  300. package/dist/login-runner-lifecycle.test.js +122 -0
  301. package/dist/login-runner-lifecycle.test.js.map +1 -0
  302. package/dist/mcp-isolation.integration.test.d.ts +2 -0
  303. package/dist/mcp-isolation.integration.test.d.ts.map +1 -0
  304. package/dist/mcp-isolation.integration.test.js +202 -0
  305. package/dist/mcp-isolation.integration.test.js.map +1 -0
  306. package/dist/paperclip-runner-permissions.d.ts +110 -0
  307. package/dist/paperclip-runner-permissions.d.ts.map +1 -0
  308. package/dist/paperclip-runner-permissions.js +150 -0
  309. package/dist/paperclip-runner-permissions.js.map +1 -0
  310. package/dist/paperclip-runner-permissions.test.d.ts +2 -0
  311. package/dist/paperclip-runner-permissions.test.d.ts.map +1 -0
  312. package/dist/paperclip-runner-permissions.test.js +47 -0
  313. package/dist/paperclip-runner-permissions.test.js.map +1 -0
  314. package/dist/published-exports.test.d.ts +2 -0
  315. package/dist/published-exports.test.d.ts.map +1 -0
  316. package/dist/published-exports.test.js +17 -0
  317. package/dist/published-exports.test.js.map +1 -0
  318. package/dist/remote-execution-env.d.ts +2 -0
  319. package/dist/remote-execution-env.d.ts.map +1 -0
  320. package/dist/remote-execution-env.js +46 -0
  321. package/dist/remote-execution-env.js.map +1 -0
  322. package/dist/remote-managed-runtime.d.ts +45 -0
  323. package/dist/remote-managed-runtime.d.ts.map +1 -0
  324. package/dist/remote-managed-runtime.js +183 -0
  325. package/dist/remote-managed-runtime.js.map +1 -0
  326. package/dist/remote-managed-runtime.test.d.ts +2 -0
  327. package/dist/remote-managed-runtime.test.d.ts.map +1 -0
  328. package/dist/remote-managed-runtime.test.js +294 -0
  329. package/dist/remote-managed-runtime.test.js.map +1 -0
  330. package/dist/runner-connectivity.d.ts +61 -0
  331. package/dist/runner-connectivity.d.ts.map +1 -0
  332. package/dist/runner-connectivity.js +81 -0
  333. package/dist/runner-connectivity.js.map +1 -0
  334. package/dist/runner-connectivity.test.d.ts +2 -0
  335. package/dist/runner-connectivity.test.d.ts.map +1 -0
  336. package/dist/runner-connectivity.test.js +183 -0
  337. package/dist/runner-connectivity.test.js.map +1 -0
  338. package/dist/runtime-progress.d.ts +48 -0
  339. package/dist/runtime-progress.d.ts.map +1 -0
  340. package/dist/runtime-progress.js +99 -0
  341. package/dist/runtime-progress.js.map +1 -0
  342. package/dist/runtime-progress.test.d.ts +2 -0
  343. package/dist/runtime-progress.test.d.ts.map +1 -0
  344. package/dist/runtime-progress.test.js +240 -0
  345. package/dist/runtime-progress.test.js.map +1 -0
  346. package/dist/sandbox-callback-bridge-body.d.ts +12 -0
  347. package/dist/sandbox-callback-bridge-body.d.ts.map +1 -0
  348. package/dist/sandbox-callback-bridge-body.js +39 -0
  349. package/dist/sandbox-callback-bridge-body.js.map +1 -0
  350. package/dist/sandbox-callback-bridge-body.test.d.ts +2 -0
  351. package/dist/sandbox-callback-bridge-body.test.d.ts.map +1 -0
  352. package/dist/sandbox-callback-bridge-body.test.js +31 -0
  353. package/dist/sandbox-callback-bridge-body.test.js.map +1 -0
  354. package/dist/sandbox-callback-bridge.d.ts +268 -0
  355. package/dist/sandbox-callback-bridge.d.ts.map +1 -0
  356. package/dist/sandbox-callback-bridge.js +2357 -0
  357. package/dist/sandbox-callback-bridge.js.map +1 -0
  358. package/dist/sandbox-callback-bridge.test.d.ts +2 -0
  359. package/dist/sandbox-callback-bridge.test.d.ts.map +1 -0
  360. package/dist/sandbox-callback-bridge.test.js +3253 -0
  361. package/dist/sandbox-callback-bridge.test.js.map +1 -0
  362. package/dist/sandbox-file-sync.test.d.ts +2 -0
  363. package/dist/sandbox-file-sync.test.d.ts.map +1 -0
  364. package/dist/sandbox-file-sync.test.js +419 -0
  365. package/dist/sandbox-file-sync.test.js.map +1 -0
  366. package/dist/sandbox-install-command.d.ts +2 -0
  367. package/dist/sandbox-install-command.d.ts.map +1 -0
  368. package/dist/sandbox-install-command.js +47 -0
  369. package/dist/sandbox-install-command.js.map +1 -0
  370. package/dist/sandbox-install-command.test.d.ts +2 -0
  371. package/dist/sandbox-install-command.test.d.ts.map +1 -0
  372. package/dist/sandbox-install-command.test.js +22 -0
  373. package/dist/sandbox-install-command.test.js.map +1 -0
  374. package/dist/sandbox-managed-runtime.d.ts +417 -0
  375. package/dist/sandbox-managed-runtime.d.ts.map +1 -0
  376. package/dist/sandbox-managed-runtime.js +1337 -0
  377. package/dist/sandbox-managed-runtime.js.map +1 -0
  378. package/dist/sandbox-managed-runtime.test.d.ts +2 -0
  379. package/dist/sandbox-managed-runtime.test.d.ts.map +1 -0
  380. package/dist/sandbox-managed-runtime.test.js +3746 -0
  381. package/dist/sandbox-managed-runtime.test.js.map +1 -0
  382. package/dist/sandbox-run-log-stream.d.ts +44 -0
  383. package/dist/sandbox-run-log-stream.d.ts.map +1 -0
  384. package/dist/sandbox-run-log-stream.js +203 -0
  385. package/dist/sandbox-run-log-stream.js.map +1 -0
  386. package/dist/sandbox-shell.d.ts +3 -0
  387. package/dist/sandbox-shell.d.ts.map +1 -0
  388. package/dist/sandbox-shell.js +7 -0
  389. package/dist/sandbox-shell.js.map +1 -0
  390. package/dist/server-utils-env.test.d.ts +2 -0
  391. package/dist/server-utils-env.test.d.ts.map +1 -0
  392. package/dist/server-utils-env.test.js +15 -0
  393. package/dist/server-utils-env.test.js.map +1 -0
  394. package/dist/server-utils.d.ts +617 -0
  395. package/dist/server-utils.d.ts.map +1 -0
  396. package/dist/server-utils.js +3258 -0
  397. package/dist/server-utils.js.map +1 -0
  398. package/dist/server-utils.test.d.ts +2 -0
  399. package/dist/server-utils.test.d.ts.map +1 -0
  400. package/dist/server-utils.test.js +3047 -0
  401. package/dist/server-utils.test.js.map +1 -0
  402. package/dist/session-compaction.d.ts +25 -0
  403. package/dist/session-compaction.d.ts.map +1 -0
  404. package/dist/session-compaction.js +165 -0
  405. package/dist/session-compaction.js.map +1 -0
  406. package/dist/skill-library-manifest.d.ts +6 -0
  407. package/dist/skill-library-manifest.d.ts.map +1 -0
  408. package/dist/skill-library-manifest.js +53 -0
  409. package/dist/skill-library-manifest.js.map +1 -0
  410. package/dist/skill-library-manifest.test.d.ts +2 -0
  411. package/dist/skill-library-manifest.test.d.ts.map +1 -0
  412. package/dist/skill-library-manifest.test.js +84 -0
  413. package/dist/skill-library-manifest.test.js.map +1 -0
  414. package/dist/skills-staging-follow-symlinks.test.d.ts +2 -0
  415. package/dist/skills-staging-follow-symlinks.test.d.ts.map +1 -0
  416. package/dist/skills-staging-follow-symlinks.test.js +126 -0
  417. package/dist/skills-staging-follow-symlinks.test.js.map +1 -0
  418. package/dist/ssh-fixture.test.d.ts +2 -0
  419. package/dist/ssh-fixture.test.d.ts.map +1 -0
  420. package/dist/ssh-fixture.test.js +832 -0
  421. package/dist/ssh-fixture.test.js.map +1 -0
  422. package/dist/ssh.d.ts +124 -0
  423. package/dist/ssh.d.ts.map +1 -0
  424. package/dist/ssh.js +1667 -0
  425. package/dist/ssh.js.map +1 -0
  426. package/dist/sync-operation-schedule.d.ts +17 -0
  427. package/dist/sync-operation-schedule.d.ts.map +1 -0
  428. package/dist/sync-operation-schedule.js +66 -0
  429. package/dist/sync-operation-schedule.js.map +1 -0
  430. package/dist/sync-operation-schedule.test.d.ts +2 -0
  431. package/dist/sync-operation-schedule.test.d.ts.map +1 -0
  432. package/dist/sync-operation-schedule.test.js +130 -0
  433. package/dist/sync-operation-schedule.test.js.map +1 -0
  434. package/dist/test-support/mcp-isolation-harness.d.ts +23 -0
  435. package/dist/test-support/mcp-isolation-harness.d.ts.map +1 -0
  436. package/dist/test-support/mcp-isolation-harness.js +67 -0
  437. package/dist/test-support/mcp-isolation-harness.js.map +1 -0
  438. package/dist/types.d.ts +780 -0
  439. package/dist/types.d.ts.map +1 -0
  440. package/dist/types.js +5 -0
  441. package/dist/types.js.map +1 -0
  442. package/dist/workspace-restore-merge.d.ts +77 -0
  443. package/dist/workspace-restore-merge.d.ts.map +1 -0
  444. package/dist/workspace-restore-merge.js +396 -0
  445. package/dist/workspace-restore-merge.js.map +1 -0
  446. package/dist/workspace-restore-merge.test.d.ts +2 -0
  447. package/dist/workspace-restore-merge.test.d.ts.map +1 -0
  448. package/dist/workspace-restore-merge.test.js +438 -0
  449. package/dist/workspace-restore-merge.test.js.map +1 -0
  450. package/dist/workspace-restore-teardown.d.ts +29 -0
  451. package/dist/workspace-restore-teardown.d.ts.map +1 -0
  452. package/dist/workspace-restore-teardown.js +34 -0
  453. package/dist/workspace-restore-teardown.js.map +1 -0
  454. package/dist/workspace-restore-teardown.test.d.ts +2 -0
  455. package/dist/workspace-restore-teardown.test.d.ts.map +1 -0
  456. package/dist/workspace-restore-teardown.test.js +71 -0
  457. package/dist/workspace-restore-teardown.test.js.map +1 -0
  458. package/node_modules/@agentclientprotocol/sdk/LICENSE +191 -0
  459. package/node_modules/@agentclientprotocol/sdk/README.md +70 -0
  460. package/node_modules/@agentclientprotocol/sdk/dist/acp.d.ts +1803 -0
  461. package/node_modules/@agentclientprotocol/sdk/dist/acp.js +1869 -0
  462. package/node_modules/@agentclientprotocol/sdk/dist/acp.js.map +1 -0
  463. package/node_modules/@agentclientprotocol/sdk/dist/acp.test.d.ts +1 -0
  464. package/node_modules/@agentclientprotocol/sdk/dist/acp.test.js +5036 -0
  465. package/node_modules/@agentclientprotocol/sdk/dist/acp.test.js.map +1 -0
  466. package/node_modules/@agentclientprotocol/sdk/dist/connection.d.ts +89 -0
  467. package/node_modules/@agentclientprotocol/sdk/dist/connection.js +490 -0
  468. package/node_modules/@agentclientprotocol/sdk/dist/connection.js.map +1 -0
  469. package/node_modules/@agentclientprotocol/sdk/dist/connection.test.d.ts +1 -0
  470. package/node_modules/@agentclientprotocol/sdk/dist/connection.test.js +507 -0
  471. package/node_modules/@agentclientprotocol/sdk/dist/connection.test.js.map +1 -0
  472. package/node_modules/@agentclientprotocol/sdk/dist/cookie-store.d.ts +26 -0
  473. package/node_modules/@agentclientprotocol/sdk/dist/cookie-store.js +96 -0
  474. package/node_modules/@agentclientprotocol/sdk/dist/cookie-store.js.map +1 -0
  475. package/node_modules/@agentclientprotocol/sdk/dist/cookie-store.test.d.ts +1 -0
  476. package/node_modules/@agentclientprotocol/sdk/dist/cookie-store.test.js +77 -0
  477. package/node_modules/@agentclientprotocol/sdk/dist/cookie-store.test.js.map +1 -0
  478. package/node_modules/@agentclientprotocol/sdk/dist/examples/agent.d.ts +2 -0
  479. package/node_modules/@agentclientprotocol/sdk/dist/examples/agent.js +232 -0
  480. package/node_modules/@agentclientprotocol/sdk/dist/examples/agent.js.map +1 -0
  481. package/node_modules/@agentclientprotocol/sdk/dist/examples/client.d.ts +2 -0
  482. package/node_modules/@agentclientprotocol/sdk/dist/examples/client.js +132 -0
  483. package/node_modules/@agentclientprotocol/sdk/dist/examples/client.js.map +1 -0
  484. package/node_modules/@agentclientprotocol/sdk/dist/examples/dual-version-agent.d.ts +9 -0
  485. package/node_modules/@agentclientprotocol/sdk/dist/examples/dual-version-agent.js +221 -0
  486. package/node_modules/@agentclientprotocol/sdk/dist/examples/dual-version-agent.js.map +1 -0
  487. package/node_modules/@agentclientprotocol/sdk/dist/examples/http-client.d.ts +2 -0
  488. package/node_modules/@agentclientprotocol/sdk/dist/examples/http-client.js +86 -0
  489. package/node_modules/@agentclientprotocol/sdk/dist/examples/http-client.js.map +1 -0
  490. package/node_modules/@agentclientprotocol/sdk/dist/examples/http-server.d.ts +2 -0
  491. package/node_modules/@agentclientprotocol/sdk/dist/examples/http-server.js +112 -0
  492. package/node_modules/@agentclientprotocol/sdk/dist/examples/http-server.js.map +1 -0
  493. package/node_modules/@agentclientprotocol/sdk/dist/examples/ws-client.d.ts +2 -0
  494. package/node_modules/@agentclientprotocol/sdk/dist/examples/ws-client.js +88 -0
  495. package/node_modules/@agentclientprotocol/sdk/dist/examples/ws-client.js.map +1 -0
  496. package/node_modules/@agentclientprotocol/sdk/dist/http-stream.d.ts +33 -0
  497. package/node_modules/@agentclientprotocol/sdk/dist/http-stream.js +435 -0
  498. package/node_modules/@agentclientprotocol/sdk/dist/http-stream.js.map +1 -0
  499. package/node_modules/@agentclientprotocol/sdk/dist/http-stream.test.d.ts +1 -0
  500. package/node_modules/@agentclientprotocol/sdk/dist/http-stream.test.js +1380 -0
  501. package/node_modules/@agentclientprotocol/sdk/dist/http-stream.test.js.map +1 -0
  502. package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.d.ts +603 -0
  503. package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.js +1076 -0
  504. package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.js.map +1 -0
  505. package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.test.d.ts +1 -0
  506. package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.test.js +917 -0
  507. package/node_modules/@agentclientprotocol/sdk/dist/jsonrpc.test.js.map +1 -0
  508. package/node_modules/@agentclientprotocol/sdk/dist/line-buffer.d.ts +22 -0
  509. package/node_modules/@agentclientprotocol/sdk/dist/line-buffer.js +64 -0
  510. package/node_modules/@agentclientprotocol/sdk/dist/line-buffer.js.map +1 -0
  511. package/node_modules/@agentclientprotocol/sdk/dist/line-buffer.test.d.ts +1 -0
  512. package/node_modules/@agentclientprotocol/sdk/dist/line-buffer.test.js +45 -0
  513. package/node_modules/@agentclientprotocol/sdk/dist/line-buffer.test.js.map +1 -0
  514. package/node_modules/@agentclientprotocol/sdk/dist/node-adapter.d.ts +17 -0
  515. package/node_modules/@agentclientprotocol/sdk/dist/node-adapter.js +426 -0
  516. package/node_modules/@agentclientprotocol/sdk/dist/node-adapter.js.map +1 -0
  517. package/node_modules/@agentclientprotocol/sdk/dist/node-adapter.test.d.ts +1 -0
  518. package/node_modules/@agentclientprotocol/sdk/dist/node-adapter.test.js +499 -0
  519. package/node_modules/@agentclientprotocol/sdk/dist/node-adapter.test.js.map +1 -0
  520. package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.d.ts +37 -0
  521. package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.js +474 -0
  522. package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.js.map +1 -0
  523. package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.test.d.ts +1 -0
  524. package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.test.js +535 -0
  525. package/node_modules/@agentclientprotocol/sdk/dist/protocol-router.test.js.map +1 -0
  526. package/node_modules/@agentclientprotocol/sdk/dist/protocol.d.ts +11 -0
  527. package/node_modules/@agentclientprotocol/sdk/dist/protocol.js +69 -0
  528. package/node_modules/@agentclientprotocol/sdk/dist/protocol.js.map +1 -0
  529. package/node_modules/@agentclientprotocol/sdk/dist/protocol.test.d.ts +1 -0
  530. package/node_modules/@agentclientprotocol/sdk/dist/protocol.test.js +82 -0
  531. package/node_modules/@agentclientprotocol/sdk/dist/protocol.test.js.map +1 -0
  532. package/node_modules/@agentclientprotocol/sdk/dist/schema/guards.gen.d.ts +183 -0
  533. package/node_modules/@agentclientprotocol/sdk/dist/schema/guards.gen.js +207 -0
  534. package/node_modules/@agentclientprotocol/sdk/dist/schema/guards.gen.js.map +1 -0
  535. package/node_modules/@agentclientprotocol/sdk/dist/schema/index.d.ts +51 -0
  536. package/node_modules/@agentclientprotocol/sdk/dist/schema/index.js +52 -0
  537. package/node_modules/@agentclientprotocol/sdk/dist/schema/index.js.map +1 -0
  538. package/node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.d.ts +6219 -0
  539. package/node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.js +3 -0
  540. package/node_modules/@agentclientprotocol/sdk/dist/schema/types.gen.js.map +1 -0
  541. package/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.d.ts +15215 -0
  542. package/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.js +3084 -0
  543. package/node_modules/@agentclientprotocol/sdk/dist/schema/zod.gen.js.map +1 -0
  544. package/node_modules/@agentclientprotocol/sdk/dist/schema-deserialize.d.ts +30 -0
  545. package/node_modules/@agentclientprotocol/sdk/dist/schema-deserialize.js +98 -0
  546. package/node_modules/@agentclientprotocol/sdk/dist/schema-deserialize.js.map +1 -0
  547. package/node_modules/@agentclientprotocol/sdk/dist/schema-deserialize.test.d.ts +1 -0
  548. package/node_modules/@agentclientprotocol/sdk/dist/schema-deserialize.test.js +93 -0
  549. package/node_modules/@agentclientprotocol/sdk/dist/schema-deserialize.test.js.map +1 -0
  550. package/node_modules/@agentclientprotocol/sdk/dist/server-permission.test.d.ts +1 -0
  551. package/node_modules/@agentclientprotocol/sdk/dist/server-permission.test.js +261 -0
  552. package/node_modules/@agentclientprotocol/sdk/dist/server-permission.test.js.map +1 -0
  553. package/node_modules/@agentclientprotocol/sdk/dist/server-session-sse.test.d.ts +1 -0
  554. package/node_modules/@agentclientprotocol/sdk/dist/server-session-sse.test.js +536 -0
  555. package/node_modules/@agentclientprotocol/sdk/dist/server-session-sse.test.js.map +1 -0
  556. package/node_modules/@agentclientprotocol/sdk/dist/server-sse.d.ts +2 -0
  557. package/node_modules/@agentclientprotocol/sdk/dist/server-sse.js +88 -0
  558. package/node_modules/@agentclientprotocol/sdk/dist/server-sse.js.map +1 -0
  559. package/node_modules/@agentclientprotocol/sdk/dist/server-sse.test.d.ts +1 -0
  560. package/node_modules/@agentclientprotocol/sdk/dist/server-sse.test.js +53 -0
  561. package/node_modules/@agentclientprotocol/sdk/dist/server-sse.test.js.map +1 -0
  562. package/node_modules/@agentclientprotocol/sdk/dist/server-websocket-upgrade.test.d.ts +1 -0
  563. package/node_modules/@agentclientprotocol/sdk/dist/server-websocket-upgrade.test.js +992 -0
  564. package/node_modules/@agentclientprotocol/sdk/dist/server-websocket-upgrade.test.js.map +1 -0
  565. package/node_modules/@agentclientprotocol/sdk/dist/server.d.ts +81 -0
  566. package/node_modules/@agentclientprotocol/sdk/dist/server.js +386 -0
  567. package/node_modules/@agentclientprotocol/sdk/dist/server.js.map +1 -0
  568. package/node_modules/@agentclientprotocol/sdk/dist/server.test.d.ts +1 -0
  569. package/node_modules/@agentclientprotocol/sdk/dist/server.test.js +1116 -0
  570. package/node_modules/@agentclientprotocol/sdk/dist/server.test.js.map +1 -0
  571. package/node_modules/@agentclientprotocol/sdk/dist/sse.d.ts +4 -0
  572. package/node_modules/@agentclientprotocol/sdk/dist/sse.js +91 -0
  573. package/node_modules/@agentclientprotocol/sdk/dist/sse.js.map +1 -0
  574. package/node_modules/@agentclientprotocol/sdk/dist/sse.test.d.ts +1 -0
  575. package/node_modules/@agentclientprotocol/sdk/dist/sse.test.js +126 -0
  576. package/node_modules/@agentclientprotocol/sdk/dist/sse.test.js.map +1 -0
  577. package/node_modules/@agentclientprotocol/sdk/dist/stream.d.ts +35 -0
  578. package/node_modules/@agentclientprotocol/sdk/dist/stream.js +115 -0
  579. package/node_modules/@agentclientprotocol/sdk/dist/stream.js.map +1 -0
  580. package/node_modules/@agentclientprotocol/sdk/dist/stream.test.d.ts +1 -0
  581. package/node_modules/@agentclientprotocol/sdk/dist/stream.test.js +195 -0
  582. package/node_modules/@agentclientprotocol/sdk/dist/stream.test.js.map +1 -0
  583. package/node_modules/@agentclientprotocol/sdk/dist/test-support/streams.d.ts +8 -0
  584. package/node_modules/@agentclientprotocol/sdk/dist/test-support/streams.js +51 -0
  585. package/node_modules/@agentclientprotocol/sdk/dist/test-support/streams.js.map +1 -0
  586. package/node_modules/@agentclientprotocol/sdk/dist/test-support/test-agent.d.ts +24 -0
  587. package/node_modules/@agentclientprotocol/sdk/dist/test-support/test-agent.js +163 -0
  588. package/node_modules/@agentclientprotocol/sdk/dist/test-support/test-agent.js.map +1 -0
  589. package/node_modules/@agentclientprotocol/sdk/dist/test-support/test-http-server.d.ts +9 -0
  590. package/node_modules/@agentclientprotocol/sdk/dist/test-support/test-http-server.js +74 -0
  591. package/node_modules/@agentclientprotocol/sdk/dist/test-support/test-http-server.js.map +1 -0
  592. package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.d.ts +957 -0
  593. package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.js +1484 -0
  594. package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.js.map +1 -0
  595. package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.test.d.ts +1 -0
  596. package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.test.js +1287 -0
  597. package/node_modules/@agentclientprotocol/sdk/dist/v2/acp.test.js.map +1 -0
  598. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/guards.gen.d.ts +946 -0
  599. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/guards.gen.js +1046 -0
  600. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/guards.gen.js.map +1 -0
  601. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/index.d.ts +42 -0
  602. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/index.js +43 -0
  603. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/index.js.map +1 -0
  604. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/types.gen.d.ts +6208 -0
  605. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/types.gen.js +3 -0
  606. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/types.gen.js.map +1 -0
  607. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/zod.gen.d.ts +33267 -0
  608. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/zod.gen.js +3199 -0
  609. package/node_modules/@agentclientprotocol/sdk/dist/v2/schema/zod.gen.js.map +1 -0
  610. package/node_modules/@agentclientprotocol/sdk/dist/ws-server.d.ts +14 -0
  611. package/node_modules/@agentclientprotocol/sdk/dist/ws-server.js +357 -0
  612. package/node_modules/@agentclientprotocol/sdk/dist/ws-server.js.map +1 -0
  613. package/node_modules/@agentclientprotocol/sdk/dist/ws-stream.d.ts +54 -0
  614. package/node_modules/@agentclientprotocol/sdk/dist/ws-stream.js +253 -0
  615. package/node_modules/@agentclientprotocol/sdk/dist/ws-stream.js.map +1 -0
  616. package/node_modules/@agentclientprotocol/sdk/dist/ws-stream.test.d.ts +1 -0
  617. package/node_modules/@agentclientprotocol/sdk/dist/ws-stream.test.js +836 -0
  618. package/node_modules/@agentclientprotocol/sdk/dist/ws-stream.test.js.map +1 -0
  619. package/node_modules/@agentclientprotocol/sdk/dist/ws-utils.d.ts +13 -0
  620. package/node_modules/@agentclientprotocol/sdk/dist/ws-utils.js +78 -0
  621. package/node_modules/@agentclientprotocol/sdk/dist/ws-utils.js.map +1 -0
  622. package/node_modules/@agentclientprotocol/sdk/dist/ws-utils.test.d.ts +1 -0
  623. package/node_modules/@agentclientprotocol/sdk/dist/ws-utils.test.js +42 -0
  624. package/node_modules/@agentclientprotocol/sdk/dist/ws-utils.test.js.map +1 -0
  625. package/node_modules/@agentclientprotocol/sdk/package.json +104 -0
  626. package/node_modules/@agentclientprotocol/sdk/schema/schema.json +8967 -0
  627. package/node_modules/@agentclientprotocol/sdk/schema/v2/schema.unstable.json +10242 -0
  628. package/node_modules/@clack/core/LICENSE +9 -0
  629. package/node_modules/@clack/core/README.md +22 -0
  630. package/node_modules/@clack/core/dist/index.d.mts +503 -0
  631. package/node_modules/@clack/core/dist/index.mjs +1003 -0
  632. package/node_modules/@clack/core/package.json +63 -0
  633. package/node_modules/@clack/prompts/LICENSE +9 -0
  634. package/node_modules/@clack/prompts/README.md +396 -0
  635. package/node_modules/@clack/prompts/dist/index.d.mts +949 -0
  636. package/node_modules/@clack/prompts/dist/index.mjs +1423 -0
  637. package/node_modules/@clack/prompts/package.json +67 -0
  638. package/node_modules/@esbuild/linux-x64/README.md +3 -0
  639. package/node_modules/@esbuild/linux-x64/bin/esbuild +0 -0
  640. package/node_modules/@esbuild/linux-x64/package.json +20 -0
  641. package/node_modules/acpx/LICENSE +21 -0
  642. package/node_modules/acpx/README.md +424 -0
  643. package/node_modules/acpx/dist/cli-CxsS1XQp.js +197 -0
  644. package/node_modules/acpx/dist/cli-CxsS1XQp.js.map +1 -0
  645. package/node_modules/acpx/dist/cli.d.ts +14 -0
  646. package/node_modules/acpx/dist/cli.d.ts.map +1 -0
  647. package/node_modules/acpx/dist/cli.js +2683 -0
  648. package/node_modules/acpx/dist/cli.js.map +1 -0
  649. package/node_modules/acpx/dist/client-DwNyFauq.d.ts +192 -0
  650. package/node_modules/acpx/dist/client-DwNyFauq.d.ts.map +1 -0
  651. package/node_modules/acpx/dist/flags-Bjq_XQ4-.js +260 -0
  652. package/node_modules/acpx/dist/flags-Bjq_XQ4-.js.map +1 -0
  653. package/node_modules/acpx/dist/flows-Db_LZKu9.js +1920 -0
  654. package/node_modules/acpx/dist/flows-Db_LZKu9.js.map +1 -0
  655. package/node_modules/acpx/dist/flows.d.ts +318 -0
  656. package/node_modules/acpx/dist/flows.d.ts.map +1 -0
  657. package/node_modules/acpx/dist/flows.js +2 -0
  658. package/node_modules/acpx/dist/live-checkpoint-ClPCSdrW.js +6210 -0
  659. package/node_modules/acpx/dist/live-checkpoint-ClPCSdrW.js.map +1 -0
  660. package/node_modules/acpx/dist/output-CjdF5rHk.js +4593 -0
  661. package/node_modules/acpx/dist/output-CjdF5rHk.js.map +1 -0
  662. package/node_modules/acpx/dist/runtime.d.ts +472 -0
  663. package/node_modules/acpx/dist/runtime.d.ts.map +1 -0
  664. package/node_modules/acpx/dist/runtime.js +1711 -0
  665. package/node_modules/acpx/dist/runtime.js.map +1 -0
  666. package/node_modules/acpx/dist/session-options-jkYbBxGE.d.ts +278 -0
  667. package/node_modules/acpx/dist/session-options-jkYbBxGE.d.ts.map +1 -0
  668. package/node_modules/acpx/package.json +129 -0
  669. package/node_modules/acpx/skills/acpx/SKILL.md +617 -0
  670. package/node_modules/b4a/LICENSE +201 -0
  671. package/node_modules/b4a/README.md +153 -0
  672. package/node_modules/b4a/browser.js +546 -0
  673. package/node_modules/b4a/index.d.ts +144 -0
  674. package/node_modules/b4a/index.js +193 -0
  675. package/node_modules/b4a/lib/ascii.js +31 -0
  676. package/node_modules/b4a/lib/base64.js +64 -0
  677. package/node_modules/b4a/lib/hex.js +51 -0
  678. package/node_modules/b4a/lib/latin1.js +31 -0
  679. package/node_modules/b4a/lib/utf16le.js +40 -0
  680. package/node_modules/b4a/lib/utf8.js +144 -0
  681. package/node_modules/b4a/package.json +54 -0
  682. package/node_modules/b4a/react-native.js +5 -0
  683. package/node_modules/b4a/runtime.d.ts +14 -0
  684. package/node_modules/bare-events/LICENSE +201 -0
  685. package/node_modules/bare-events/README.md +25 -0
  686. package/node_modules/bare-events/global.d.ts +15 -0
  687. package/node_modules/bare-events/global.js +5 -0
  688. package/node_modules/bare-events/index.d.ts +89 -0
  689. package/node_modules/bare-events/index.js +397 -0
  690. package/node_modules/bare-events/lib/errors.js +23 -0
  691. package/node_modules/bare-events/package.json +63 -0
  692. package/node_modules/bare-events/web.d.ts +79 -0
  693. package/node_modules/bare-events/web.js +417 -0
  694. package/node_modules/bare-fs/CMakeLists.txt +13 -0
  695. package/node_modules/bare-fs/LICENSE +201 -0
  696. package/node_modules/bare-fs/README.md +33 -0
  697. package/node_modules/bare-fs/binding.c +2913 -0
  698. package/node_modules/bare-fs/binding.js +1 -0
  699. package/node_modules/bare-fs/index.d.ts +1502 -0
  700. package/node_modules/bare-fs/index.js +2855 -0
  701. package/node_modules/bare-fs/lib/constants.d.ts +50 -0
  702. package/node_modules/bare-fs/lib/constants.js +49 -0
  703. package/node_modules/bare-fs/lib/errors.d.ts +13 -0
  704. package/node_modules/bare-fs/lib/errors.js +55 -0
  705. package/node_modules/bare-fs/package.json +74 -0
  706. package/node_modules/bare-fs/prebuilds/android-arm/bare-fs.bare +0 -0
  707. package/node_modules/bare-fs/prebuilds/android-arm64/bare-fs.bare +0 -0
  708. package/node_modules/bare-fs/prebuilds/android-ia32/bare-fs.bare +0 -0
  709. package/node_modules/bare-fs/prebuilds/android-x64/bare-fs.bare +0 -0
  710. package/node_modules/bare-fs/prebuilds/darwin-arm64/bare-fs.bare +0 -0
  711. package/node_modules/bare-fs/prebuilds/darwin-x64/bare-fs.bare +0 -0
  712. package/node_modules/bare-fs/prebuilds/ios-arm64/bare-fs.bare +0 -0
  713. package/node_modules/bare-fs/prebuilds/ios-arm64-simulator/bare-fs.bare +0 -0
  714. package/node_modules/bare-fs/prebuilds/ios-x64-simulator/bare-fs.bare +0 -0
  715. package/node_modules/bare-fs/prebuilds/linux-arm64/bare-fs.bare +0 -0
  716. package/node_modules/bare-fs/prebuilds/linux-x64/bare-fs.bare +0 -0
  717. package/node_modules/bare-fs/prebuilds/win32-arm64/bare-fs.bare +0 -0
  718. package/node_modules/bare-fs/prebuilds/win32-x64/bare-fs.bare +0 -0
  719. package/node_modules/bare-fs/promises.d.ts +480 -0
  720. package/node_modules/bare-fs/promises.js +119 -0
  721. package/node_modules/bare-path/CMakeLists.txt +13 -0
  722. package/node_modules/bare-path/LICENSE +201 -0
  723. package/node_modules/bare-path/NOTICE +28 -0
  724. package/node_modules/bare-path/README.md +19 -0
  725. package/node_modules/bare-path/binding.c +106 -0
  726. package/node_modules/bare-path/binding.js +1 -0
  727. package/node_modules/bare-path/index.d.ts +27 -0
  728. package/node_modules/bare-path/index.js +9 -0
  729. package/node_modules/bare-path/lib/constants.js +11 -0
  730. package/node_modules/bare-path/lib/posix.js +263 -0
  731. package/node_modules/bare-path/lib/shared.js +81 -0
  732. package/node_modules/bare-path/lib/win32.js +564 -0
  733. package/node_modules/bare-path/package.json +47 -0
  734. package/node_modules/bare-path/prebuilds/android-arm/bare-path.bare +0 -0
  735. package/node_modules/bare-path/prebuilds/android-arm64/bare-path.bare +0 -0
  736. package/node_modules/bare-path/prebuilds/android-ia32/bare-path.bare +0 -0
  737. package/node_modules/bare-path/prebuilds/android-x64/bare-path.bare +0 -0
  738. package/node_modules/bare-path/prebuilds/darwin-arm64/bare-path.bare +0 -0
  739. package/node_modules/bare-path/prebuilds/darwin-x64/bare-path.bare +0 -0
  740. package/node_modules/bare-path/prebuilds/ios-arm64/bare-path.bare +0 -0
  741. package/node_modules/bare-path/prebuilds/ios-arm64-simulator/bare-path.bare +0 -0
  742. package/node_modules/bare-path/prebuilds/ios-x64-simulator/bare-path.bare +0 -0
  743. package/node_modules/bare-path/prebuilds/linux-arm64/bare-path.bare +0 -0
  744. package/node_modules/bare-path/prebuilds/linux-x64/bare-path.bare +0 -0
  745. package/node_modules/bare-path/prebuilds/win32-arm64/bare-path.bare +0 -0
  746. package/node_modules/bare-path/prebuilds/win32-x64/bare-path.bare +0 -0
  747. package/node_modules/bare-stream/LICENSE +201 -0
  748. package/node_modules/bare-stream/README.md +354 -0
  749. package/node_modules/bare-stream/global.d.ts +31 -0
  750. package/node_modules/bare-stream/global.js +15 -0
  751. package/node_modules/bare-stream/index.d.ts +235 -0
  752. package/node_modules/bare-stream/index.js +493 -0
  753. package/node_modules/bare-stream/package.json +75 -0
  754. package/node_modules/bare-stream/promises.js +3 -0
  755. package/node_modules/bare-stream/web.d.ts +152 -0
  756. package/node_modules/bare-stream/web.js +607 -0
  757. package/node_modules/bare-url/CMakeLists.txt +36 -0
  758. package/node_modules/bare-url/LICENSE +201 -0
  759. package/node_modules/bare-url/README.md +33 -0
  760. package/node_modules/bare-url/binding.c +422 -0
  761. package/node_modules/bare-url/binding.js +1 -0
  762. package/node_modules/bare-url/global.d.ts +24 -0
  763. package/node_modules/bare-url/global.js +2 -0
  764. package/node_modules/bare-url/index.d.ts +96 -0
  765. package/node_modules/bare-url/index.js +676 -0
  766. package/node_modules/bare-url/lib/errors.d.ts +10 -0
  767. package/node_modules/bare-url/lib/errors.js +33 -0
  768. package/node_modules/bare-url/lib/url-search-params.d.ts +66 -0
  769. package/node_modules/bare-url/lib/url-search-params.js +276 -0
  770. package/node_modules/bare-url/package.json +54 -0
  771. package/node_modules/bare-url/prebuilds/android-arm/bare-url.bare +0 -0
  772. package/node_modules/bare-url/prebuilds/android-arm64/bare-url.bare +0 -0
  773. package/node_modules/bare-url/prebuilds/android-ia32/bare-url.bare +0 -0
  774. package/node_modules/bare-url/prebuilds/android-x64/bare-url.bare +0 -0
  775. package/node_modules/bare-url/prebuilds/darwin-arm64/bare-url.bare +0 -0
  776. package/node_modules/bare-url/prebuilds/darwin-x64/bare-url.bare +0 -0
  777. package/node_modules/bare-url/prebuilds/ios-arm64/bare-url.bare +0 -0
  778. package/node_modules/bare-url/prebuilds/ios-arm64-simulator/bare-url.bare +0 -0
  779. package/node_modules/bare-url/prebuilds/ios-x64-simulator/bare-url.bare +0 -0
  780. package/node_modules/bare-url/prebuilds/linux-arm64/bare-url.bare +0 -0
  781. package/node_modules/bare-url/prebuilds/linux-x64/bare-url.bare +0 -0
  782. package/node_modules/bare-url/prebuilds/win32-arm64/bare-url.bare +0 -0
  783. package/node_modules/bare-url/prebuilds/win32-x64/bare-url.bare +0 -0
  784. package/node_modules/commander/LICENSE +22 -0
  785. package/node_modules/commander/Readme.md +1172 -0
  786. package/node_modules/commander/index.js +21 -0
  787. package/node_modules/commander/lib/argument.js +147 -0
  788. package/node_modules/commander/lib/command.js +2790 -0
  789. package/node_modules/commander/lib/error.js +36 -0
  790. package/node_modules/commander/lib/help.js +731 -0
  791. package/node_modules/commander/lib/option.js +377 -0
  792. package/node_modules/commander/lib/suggestSimilar.js +99 -0
  793. package/node_modules/commander/package-support.json +19 -0
  794. package/node_modules/commander/package.json +64 -0
  795. package/node_modules/commander/typings/index.d.ts +1113 -0
  796. package/node_modules/esbuild/LICENSE.md +21 -0
  797. package/node_modules/esbuild/README.md +3 -0
  798. package/node_modules/esbuild/bin/esbuild +223 -0
  799. package/node_modules/esbuild/install.js +300 -0
  800. package/node_modules/esbuild/lib/main.d.ts +720 -0
  801. package/node_modules/esbuild/lib/main.js +2536 -0
  802. package/node_modules/esbuild/package.json +74 -0
  803. package/node_modules/events-universal/LICENSE +201 -0
  804. package/node_modules/events-universal/README.md +17 -0
  805. package/node_modules/events-universal/bare.js +1 -0
  806. package/node_modules/events-universal/default.js +1 -0
  807. package/node_modules/events-universal/index.js +1 -0
  808. package/node_modules/events-universal/package.json +39 -0
  809. package/node_modules/events-universal/react-native.js +1 -0
  810. package/node_modules/fast-fifo/LICENSE +21 -0
  811. package/node_modules/fast-fifo/README.md +78 -0
  812. package/node_modules/fast-fifo/fixed-size.js +39 -0
  813. package/node_modules/fast-fifo/index.js +48 -0
  814. package/node_modules/fast-fifo/package.json +28 -0
  815. package/node_modules/fast-string-truncated-width/dist/index.d.ts +4 -0
  816. package/node_modules/fast-string-truncated-width/dist/index.js +111 -0
  817. package/node_modules/fast-string-truncated-width/dist/types.d.ts +19 -0
  818. package/node_modules/fast-string-truncated-width/dist/types.js +2 -0
  819. package/node_modules/fast-string-truncated-width/dist/utils.d.ts +4 -0
  820. package/node_modules/fast-string-truncated-width/dist/utils.js +20 -0
  821. package/node_modules/fast-string-truncated-width/license +21 -0
  822. package/node_modules/fast-string-truncated-width/package.json +35 -0
  823. package/node_modules/fast-string-truncated-width/readme.md +59 -0
  824. package/node_modules/fast-string-width/dist/index.d.ts +4 -0
  825. package/node_modules/fast-string-width/dist/index.js +14 -0
  826. package/node_modules/fast-string-width/license +21 -0
  827. package/node_modules/fast-string-width/package.json +34 -0
  828. package/node_modules/fast-string-width/readme.md +42 -0
  829. package/node_modules/fast-wrap-ansi/LICENSE +23 -0
  830. package/node_modules/fast-wrap-ansi/README.md +26 -0
  831. package/node_modules/fast-wrap-ansi/lib/main.d.ts +6 -0
  832. package/node_modules/fast-wrap-ansi/lib/main.js +218 -0
  833. package/node_modules/fast-wrap-ansi/package.json +51 -0
  834. package/node_modules/sisteransi/license +21 -0
  835. package/node_modules/sisteransi/package.json +34 -0
  836. package/node_modules/sisteransi/readme.md +113 -0
  837. package/node_modules/sisteransi/src/index.js +58 -0
  838. package/node_modules/sisteransi/src/sisteransi.d.ts +35 -0
  839. package/node_modules/skillflag/LICENSE +21 -0
  840. package/node_modules/skillflag/README.md +44 -0
  841. package/node_modules/skillflag/dist/bin/skill-install.d.ts +3 -0
  842. package/node_modules/skillflag/dist/bin/skill-install.d.ts.map +1 -0
  843. package/node_modules/skillflag/dist/bin/skill-install.js +6 -0
  844. package/node_modules/skillflag/dist/bin/skill-install.js.map +1 -0
  845. package/node_modules/skillflag/dist/bin/skillflag.d.ts +3 -0
  846. package/node_modules/skillflag/dist/bin/skillflag.d.ts.map +1 -0
  847. package/node_modules/skillflag/dist/bin/skillflag.js +25 -0
  848. package/node_modules/skillflag/dist/bin/skillflag.js.map +1 -0
  849. package/node_modules/skillflag/dist/core/digest.d.ts +2 -0
  850. package/node_modules/skillflag/dist/core/digest.d.ts.map +1 -0
  851. package/node_modules/skillflag/dist/core/digest.js +15 -0
  852. package/node_modules/skillflag/dist/core/digest.js.map +1 -0
  853. package/node_modules/skillflag/dist/core/errors.d.ts +6 -0
  854. package/node_modules/skillflag/dist/core/errors.d.ts.map +1 -0
  855. package/node_modules/skillflag/dist/core/errors.js +13 -0
  856. package/node_modules/skillflag/dist/core/errors.js.map +1 -0
  857. package/node_modules/skillflag/dist/core/export.d.ts +2 -0
  858. package/node_modules/skillflag/dist/core/export.d.ts.map +1 -0
  859. package/node_modules/skillflag/dist/core/export.js +28 -0
  860. package/node_modules/skillflag/dist/core/export.js.map +1 -0
  861. package/node_modules/skillflag/dist/core/list.d.ts +21 -0
  862. package/node_modules/skillflag/dist/core/list.d.ts.map +1 -0
  863. package/node_modules/skillflag/dist/core/list.js +71 -0
  864. package/node_modules/skillflag/dist/core/list.js.map +1 -0
  865. package/node_modules/skillflag/dist/core/paths.d.ts +15 -0
  866. package/node_modules/skillflag/dist/core/paths.d.ts.map +1 -0
  867. package/node_modules/skillflag/dist/core/paths.js +149 -0
  868. package/node_modules/skillflag/dist/core/paths.js.map +1 -0
  869. package/node_modules/skillflag/dist/core/show.d.ts +2 -0
  870. package/node_modules/skillflag/dist/core/show.d.ts.map +1 -0
  871. package/node_modules/skillflag/dist/core/show.js +8 -0
  872. package/node_modules/skillflag/dist/core/show.js.map +1 -0
  873. package/node_modules/skillflag/dist/core/skillflag.d.ts +3 -0
  874. package/node_modules/skillflag/dist/core/skillflag.d.ts.map +1 -0
  875. package/node_modules/skillflag/dist/core/skillflag.js +2 -0
  876. package/node_modules/skillflag/dist/core/skillflag.js.map +1 -0
  877. package/node_modules/skillflag/dist/core/tar.d.ts +16 -0
  878. package/node_modules/skillflag/dist/core/tar.d.ts.map +1 -0
  879. package/node_modules/skillflag/dist/core/tar.js +140 -0
  880. package/node_modules/skillflag/dist/core/tar.js.map +1 -0
  881. package/node_modules/skillflag/dist/index.d.ts +5 -0
  882. package/node_modules/skillflag/dist/index.d.ts.map +1 -0
  883. package/node_modules/skillflag/dist/index.js +3 -0
  884. package/node_modules/skillflag/dist/index.js.map +1 -0
  885. package/node_modules/skillflag/dist/install/cli.d.ts +57 -0
  886. package/node_modules/skillflag/dist/install/cli.d.ts.map +1 -0
  887. package/node_modules/skillflag/dist/install/cli.js +653 -0
  888. package/node_modules/skillflag/dist/install/cli.js.map +1 -0
  889. package/node_modules/skillflag/dist/install/copy.d.ts +2 -0
  890. package/node_modules/skillflag/dist/install/copy.d.ts.map +1 -0
  891. package/node_modules/skillflag/dist/install/copy.js +19 -0
  892. package/node_modules/skillflag/dist/install/copy.js.map +1 -0
  893. package/node_modules/skillflag/dist/install/errors.d.ts +6 -0
  894. package/node_modules/skillflag/dist/install/errors.d.ts.map +1 -0
  895. package/node_modules/skillflag/dist/install/errors.js +13 -0
  896. package/node_modules/skillflag/dist/install/errors.js.map +1 -0
  897. package/node_modules/skillflag/dist/install/extract.d.ts +3 -0
  898. package/node_modules/skillflag/dist/install/extract.d.ts.map +1 -0
  899. package/node_modules/skillflag/dist/install/extract.js +76 -0
  900. package/node_modules/skillflag/dist/install/extract.js.map +1 -0
  901. package/node_modules/skillflag/dist/install/install.d.ts +21 -0
  902. package/node_modules/skillflag/dist/install/install.d.ts.map +1 -0
  903. package/node_modules/skillflag/dist/install/install.js +35 -0
  904. package/node_modules/skillflag/dist/install/install.js.map +1 -0
  905. package/node_modules/skillflag/dist/install/resolve.d.ts +12 -0
  906. package/node_modules/skillflag/dist/install/resolve.d.ts.map +1 -0
  907. package/node_modules/skillflag/dist/install/resolve.js +119 -0
  908. package/node_modules/skillflag/dist/install/resolve.js.map +1 -0
  909. package/node_modules/skillflag/dist/install/validate.d.ts +7 -0
  910. package/node_modules/skillflag/dist/install/validate.d.ts.map +1 -0
  911. package/node_modules/skillflag/dist/install/validate.js +28 -0
  912. package/node_modules/skillflag/dist/install/validate.js.map +1 -0
  913. package/node_modules/skillflag/dist/shared/frontmatter.d.ts +2 -0
  914. package/node_modules/skillflag/dist/shared/frontmatter.d.ts.map +1 -0
  915. package/node_modules/skillflag/dist/shared/frontmatter.js +28 -0
  916. package/node_modules/skillflag/dist/shared/frontmatter.js.map +1 -0
  917. package/node_modules/skillflag/dist/skillflag.d.ts +29 -0
  918. package/node_modules/skillflag/dist/skillflag.d.ts.map +1 -0
  919. package/node_modules/skillflag/dist/skillflag.js +230 -0
  920. package/node_modules/skillflag/dist/skillflag.js.map +1 -0
  921. package/node_modules/skillflag/dist/utils/collections.d.ts +3 -0
  922. package/node_modules/skillflag/dist/utils/collections.d.ts.map +1 -0
  923. package/node_modules/skillflag/dist/utils/collections.js +18 -0
  924. package/node_modules/skillflag/dist/utils/collections.js.map +1 -0
  925. package/node_modules/skillflag/package.json +78 -0
  926. package/node_modules/skillflag/skills/skillflag/SKILL.md +144 -0
  927. package/node_modules/streamx/LICENSE +21 -0
  928. package/node_modules/streamx/README.md +550 -0
  929. package/node_modules/streamx/index.d.ts +198 -0
  930. package/node_modules/streamx/index.js +1314 -0
  931. package/node_modules/streamx/lib/errors.d.ts +13 -0
  932. package/node_modules/streamx/lib/errors.js +47 -0
  933. package/node_modules/streamx/package.json +51 -0
  934. package/node_modules/streamx/runtime.d.ts +55 -0
  935. package/node_modules/tar-stream/LICENSE +21 -0
  936. package/node_modules/tar-stream/README.md +183 -0
  937. package/node_modules/tar-stream/constants.js +14 -0
  938. package/node_modules/tar-stream/extract.js +418 -0
  939. package/node_modules/tar-stream/headers.js +322 -0
  940. package/node_modules/tar-stream/index.d.ts +60 -0
  941. package/node_modules/tar-stream/index.js +2 -0
  942. package/node_modules/tar-stream/pack.js +287 -0
  943. package/node_modules/tar-stream/package.json +50 -0
  944. package/node_modules/teex/LICENSE +21 -0
  945. package/node_modules/teex/README.md +31 -0
  946. package/node_modules/teex/example.js +16 -0
  947. package/node_modules/teex/index.js +52 -0
  948. package/node_modules/teex/package.json +26 -0
  949. package/node_modules/teex/test.js +68 -0
  950. package/node_modules/text-decoder/LICENSE +201 -0
  951. package/node_modules/text-decoder/README.md +36 -0
  952. package/node_modules/text-decoder/index.js +64 -0
  953. package/node_modules/text-decoder/lib/pass-through-decoder.js +19 -0
  954. package/node_modules/text-decoder/lib/utf8-decoder.js +185 -0
  955. package/node_modules/text-decoder/package.json +39 -0
  956. package/node_modules/tsx/LICENSE +21 -0
  957. package/node_modules/tsx/README.md +32 -0
  958. package/node_modules/tsx/dist/cjs/api/index.cjs +2 -0
  959. package/node_modules/tsx/dist/cjs/api/index.d.cts +35 -0
  960. package/node_modules/tsx/dist/cjs/api/index.d.mts +35 -0
  961. package/node_modules/tsx/dist/cjs/api/index.mjs +2 -0
  962. package/node_modules/tsx/dist/cjs/index.cjs +1 -0
  963. package/node_modules/tsx/dist/cli.mjs +55 -0
  964. package/node_modules/tsx/dist/client-XItNFmsq.cjs +1 -0
  965. package/node_modules/tsx/dist/esm/api/index.cjs +2 -0
  966. package/node_modules/tsx/dist/esm/api/index.d.cts +37 -0
  967. package/node_modules/tsx/dist/esm/api/index.d.mts +37 -0
  968. package/node_modules/tsx/dist/esm/api/index.mjs +2 -0
  969. package/node_modules/tsx/dist/esm/index.mjs +2 -0
  970. package/node_modules/tsx/dist/index-Bqjv9TxC.mjs +1 -0
  971. package/node_modules/tsx/dist/index-DE3OBZuV.mjs +14 -0
  972. package/node_modules/tsx/dist/lexer-CGfpMDSb.cjs +3 -0
  973. package/node_modules/tsx/dist/lexer-CanA6ArK.mjs +3 -0
  974. package/node_modules/tsx/dist/loader.mjs +2 -0
  975. package/node_modules/tsx/dist/package-Dj0mHsMt.mjs +1 -0
  976. package/node_modules/tsx/dist/patch-repl.cjs +1 -0
  977. package/node_modules/tsx/dist/preflight.cjs +1 -0
  978. package/node_modules/tsx/dist/register-B1c7OH6V.cjs +23 -0
  979. package/node_modules/tsx/dist/register-nyXW-TH3.mjs +2 -0
  980. package/node_modules/tsx/dist/repl.mjs +4 -0
  981. package/node_modules/tsx/dist/require-CBjy4Foe.mjs +10 -0
  982. package/node_modules/tsx/dist/require-CVaYn9z3.cjs +1 -0
  983. package/node_modules/tsx/dist/suppress-warnings.cjs +1 -0
  984. package/node_modules/tsx/dist/temporary-directory-Du7LpLp9.mjs +1 -0
  985. package/node_modules/tsx/package.json +70 -0
  986. package/node_modules/zod/LICENSE +21 -0
  987. package/node_modules/zod/README.md +218 -0
  988. package/node_modules/zod/compile.cjs +96 -0
  989. package/node_modules/zod/compile.d.cts +1 -0
  990. package/node_modules/zod/compile.d.ts +1 -0
  991. package/node_modules/zod/compile.js +52 -0
  992. package/node_modules/zod/index.cjs +52 -0
  993. package/node_modules/zod/index.d.cts +3 -0
  994. package/node_modules/zod/index.d.ts +3 -0
  995. package/node_modules/zod/index.js +7 -0
  996. package/node_modules/zod/locales/index.cjs +36 -0
  997. package/node_modules/zod/locales/index.d.cts +1 -0
  998. package/node_modules/zod/locales/index.d.ts +1 -0
  999. package/node_modules/zod/locales/index.js +1 -0
  1000. package/node_modules/zod/locales/package.json +7 -0
  1001. package/node_modules/zod/mini/index.cjs +51 -0
  1002. package/node_modules/zod/mini/index.d.cts +3 -0
  1003. package/node_modules/zod/mini/index.d.ts +3 -0
  1004. package/node_modules/zod/mini/index.js +3 -0
  1005. package/node_modules/zod/mini/package.json +7 -0
  1006. package/node_modules/zod/package.json +147 -0
  1007. package/node_modules/zod/src/compile.ts +56 -0
  1008. package/node_modules/zod/src/index.ts +7 -0
  1009. package/node_modules/zod/src/locales/index.ts +1 -0
  1010. package/node_modules/zod/src/mini/index.ts +3 -0
  1011. package/node_modules/zod/src/v3/ZodError.ts +340 -0
  1012. package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
  1013. package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
  1014. package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
  1015. package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
  1016. package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
  1017. package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
  1018. package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
  1019. package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
  1020. package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
  1021. package/node_modules/zod/src/v3/errors.ts +13 -0
  1022. package/node_modules/zod/src/v3/external.ts +6 -0
  1023. package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
  1024. package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
  1025. package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
  1026. package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
  1027. package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
  1028. package/node_modules/zod/src/v3/helpers/util.ts +224 -0
  1029. package/node_modules/zod/src/v3/index.ts +4 -0
  1030. package/node_modules/zod/src/v3/locales/en.ts +124 -0
  1031. package/node_modules/zod/src/v3/standard-schema.ts +113 -0
  1032. package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
  1033. package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
  1034. package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
  1035. package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
  1036. package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
  1037. package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
  1038. package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
  1039. package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
  1040. package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
  1041. package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
  1042. package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
  1043. package/node_modules/zod/src/v3/tests/complex.test.ts +70 -0
  1044. package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
  1045. package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
  1046. package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
  1047. package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
  1048. package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
  1049. package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
  1050. package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
  1051. package/node_modules/zod/src/v3/tests/error.test.ts +586 -0
  1052. package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
  1053. package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
  1054. package/node_modules/zod/src/v3/tests/function.test.ts +261 -0
  1055. package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
  1056. package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
  1057. package/node_modules/zod/src/v3/tests/intersection.test.ts +128 -0
  1058. package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
  1059. package/node_modules/zod/src/v3/tests/language-server.test.ts +206 -0
  1060. package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
  1061. package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
  1062. package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
  1063. package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
  1064. package/node_modules/zod/src/v3/tests/nan.test.ts +24 -0
  1065. package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
  1066. package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
  1067. package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
  1068. package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
  1069. package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
  1070. package/node_modules/zod/src/v3/tests/object.test.ts +431 -0
  1071. package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
  1072. package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
  1073. package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
  1074. package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
  1075. package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
  1076. package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
  1077. package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
  1078. package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
  1079. package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
  1080. package/node_modules/zod/src/v3/tests/readonly.test.ts +114 -0
  1081. package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
  1082. package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
  1083. package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
  1084. package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
  1085. package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
  1086. package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
  1087. package/node_modules/zod/src/v3/tests/string.test.ts +922 -0
  1088. package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
  1089. package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
  1090. package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
  1091. package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
  1092. package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
  1093. package/node_modules/zod/src/v3/types.ts +5138 -0
  1094. package/node_modules/zod/src/v4/classic/checks.ts +33 -0
  1095. package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
  1096. package/node_modules/zod/src/v4/classic/compat.ts +78 -0
  1097. package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
  1098. package/node_modules/zod/src/v4/classic/errors.ts +97 -0
  1099. package/node_modules/zod/src/v4/classic/external.ts +57 -0
  1100. package/node_modules/zod/src/v4/classic/from-json-schema.ts +944 -0
  1101. package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
  1102. package/node_modules/zod/src/v4/classic/index.ts +5 -0
  1103. package/node_modules/zod/src/v4/classic/iso.ts +20 -0
  1104. package/node_modules/zod/src/v4/classic/parse.ts +88 -0
  1105. package/node_modules/zod/src/v4/classic/schemas.ts +2937 -0
  1106. package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
  1107. package/node_modules/zod/src/v4/classic/tests/apply.test.ts +86 -0
  1108. package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
  1109. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +402 -0
  1110. package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
  1111. package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
  1112. package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
  1113. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +89 -0
  1114. package/node_modules/zod/src/v4/classic/tests/brand.test.ts +106 -0
  1115. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +604 -0
  1116. package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
  1117. package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +572 -0
  1118. package/node_modules/zod/src/v4/classic/tests/codec.test.ts +704 -0
  1119. package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
  1120. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +374 -0
  1121. package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -0
  1122. package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
  1123. package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +985 -0
  1124. package/node_modules/zod/src/v4/classic/tests/date.test.ts +92 -0
  1125. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +316 -0
  1126. package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +380 -0
  1127. package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +32 -0
  1128. package/node_modules/zod/src/v4/classic/tests/default.test.ts +455 -0
  1129. package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
  1130. package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
  1131. package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +221 -0
  1132. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +942 -0
  1133. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +305 -0
  1134. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +917 -0
  1135. package/node_modules/zod/src/v4/classic/tests/error.test.ts +1108 -0
  1136. package/node_modules/zod/src/v4/classic/tests/file.test.ts +96 -0
  1137. package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +179 -0
  1138. package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
  1139. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +1467 -0
  1140. package/node_modules/zod/src/v4/classic/tests/function.test.ts +391 -0
  1141. package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
  1142. package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +32 -0
  1143. package/node_modules/zod/src/v4/classic/tests/hash.test.ts +67 -0
  1144. package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
  1145. package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +159 -0
  1146. package/node_modules/zod/src/v4/classic/tests/index.test.ts +958 -0
  1147. package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +319 -0
  1148. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +127 -0
  1149. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +334 -0
  1150. package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +215 -0
  1151. package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +39 -0
  1152. package/node_modules/zod/src/v4/classic/tests/json.test.ts +109 -0
  1153. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +262 -0
  1154. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +128 -0
  1155. package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +29 -0
  1156. package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +24 -0
  1157. package/node_modules/zod/src/v4/classic/tests/map.test.ts +342 -0
  1158. package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
  1159. package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
  1160. package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +101 -0
  1161. package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
  1162. package/node_modules/zod/src/v4/classic/tests/number.test.ts +401 -0
  1163. package/node_modules/zod/src/v4/classic/tests/object.test.ts +1006 -0
  1164. package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +235 -0
  1165. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +366 -0
  1166. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +497 -0
  1167. package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +211 -0
  1168. package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +101 -0
  1169. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +144 -0
  1170. package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +44 -0
  1171. package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +351 -0
  1172. package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
  1173. package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
  1174. package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
  1175. package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
  1176. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +184 -0
  1177. package/node_modules/zod/src/v4/classic/tests/record.test.ts +885 -0
  1178. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +707 -0
  1179. package/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
  1180. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +693 -0
  1181. package/node_modules/zod/src/v4/classic/tests/registries.test.ts +243 -0
  1182. package/node_modules/zod/src/v4/classic/tests/set.test.ts +190 -0
  1183. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +153 -0
  1184. package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +125 -0
  1185. package/node_modules/zod/src/v4/classic/tests/string.test.ts +1440 -0
  1186. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +124 -0
  1187. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +812 -0
  1188. package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
  1189. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +4733 -0
  1190. package/node_modules/zod/src/v4/classic/tests/transform.test.ts +378 -0
  1191. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +511 -0
  1192. package/node_modules/zod/src/v4/classic/tests/union.test.ts +310 -0
  1193. package/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
  1194. package/node_modules/zod/src/v4/classic/tests/validate.test.ts +645 -0
  1195. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
  1196. package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
  1197. package/node_modules/zod/src/v4/core/api.ts +1875 -0
  1198. package/node_modules/zod/src/v4/core/checks.ts +1266 -0
  1199. package/node_modules/zod/src/v4/core/compile.ts +2313 -0
  1200. package/node_modules/zod/src/v4/core/core.ts +230 -0
  1201. package/node_modules/zod/src/v4/core/doc.ts +52 -0
  1202. package/node_modules/zod/src/v4/core/errors.ts +543 -0
  1203. package/node_modules/zod/src/v4/core/index.ts +19 -0
  1204. package/node_modules/zod/src/v4/core/json-schema-generator.ts +131 -0
  1205. package/node_modules/zod/src/v4/core/json-schema-processors.ts +934 -0
  1206. package/node_modules/zod/src/v4/core/json-schema.ts +148 -0
  1207. package/node_modules/zod/src/v4/core/memoizer.ts +331 -0
  1208. package/node_modules/zod/src/v4/core/parse.ts +309 -0
  1209. package/node_modules/zod/src/v4/core/regexes.ts +217 -0
  1210. package/node_modules/zod/src/v4/core/registries.ts +105 -0
  1211. package/node_modules/zod/src/v4/core/schemas.ts +5192 -0
  1212. package/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
  1213. package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
  1214. package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +1004 -0
  1215. package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
  1216. package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +89 -0
  1217. package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
  1218. package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +34 -0
  1219. package/node_modules/zod/src/v4/core/tests/compile.test.ts +2036 -0
  1220. package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
  1221. package/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
  1222. package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
  1223. package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
  1224. package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +214 -0
  1225. package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
  1226. package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +180 -0
  1227. package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +72 -0
  1228. package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
  1229. package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +163 -0
  1230. package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
  1231. package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -0
  1232. package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
  1233. package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
  1234. package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
  1235. package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
  1236. package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +105 -0
  1237. package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
  1238. package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +125 -0
  1239. package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
  1240. package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +51 -0
  1241. package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +133 -0
  1242. package/node_modules/zod/src/v4/core/to-json-schema.ts +857 -0
  1243. package/node_modules/zod/src/v4/core/util.ts +1280 -0
  1244. package/node_modules/zod/src/v4/core/versions.ts +5 -0
  1245. package/node_modules/zod/src/v4/core/visit.ts +193 -0
  1246. package/node_modules/zod/src/v4/core/zsf.ts +323 -0
  1247. package/node_modules/zod/src/v4/index.ts +4 -0
  1248. package/node_modules/zod/src/v4/locales/ar.ts +120 -0
  1249. package/node_modules/zod/src/v4/locales/az.ts +116 -0
  1250. package/node_modules/zod/src/v4/locales/be.ts +188 -0
  1251. package/node_modules/zod/src/v4/locales/bg.ts +133 -0
  1252. package/node_modules/zod/src/v4/locales/bn.ts +123 -0
  1253. package/node_modules/zod/src/v4/locales/ca.ts +121 -0
  1254. package/node_modules/zod/src/v4/locales/ckb.ts +140 -0
  1255. package/node_modules/zod/src/v4/locales/cs.ts +123 -0
  1256. package/node_modules/zod/src/v4/locales/da.ts +128 -0
  1257. package/node_modules/zod/src/v4/locales/de.ts +121 -0
  1258. package/node_modules/zod/src/v4/locales/el.ts +124 -0
  1259. package/node_modules/zod/src/v4/locales/en.ts +136 -0
  1260. package/node_modules/zod/src/v4/locales/eo.ts +123 -0
  1261. package/node_modules/zod/src/v4/locales/es.ts +145 -0
  1262. package/node_modules/zod/src/v4/locales/fa.ts +131 -0
  1263. package/node_modules/zod/src/v4/locales/fi.ts +126 -0
  1264. package/node_modules/zod/src/v4/locales/fr-CA.ts +121 -0
  1265. package/node_modules/zod/src/v4/locales/fr.ts +139 -0
  1266. package/node_modules/zod/src/v4/locales/gu.ts +123 -0
  1267. package/node_modules/zod/src/v4/locales/he.ts +253 -0
  1268. package/node_modules/zod/src/v4/locales/hi.ts +126 -0
  1269. package/node_modules/zod/src/v4/locales/hr.ts +135 -0
  1270. package/node_modules/zod/src/v4/locales/hu.ts +122 -0
  1271. package/node_modules/zod/src/v4/locales/hy.ts +175 -0
  1272. package/node_modules/zod/src/v4/locales/id.ts +120 -0
  1273. package/node_modules/zod/src/v4/locales/index.ts +63 -0
  1274. package/node_modules/zod/src/v4/locales/is.ts +124 -0
  1275. package/node_modules/zod/src/v4/locales/it.ts +121 -0
  1276. package/node_modules/zod/src/v4/locales/ja.ts +119 -0
  1277. package/node_modules/zod/src/v4/locales/ka.ts +128 -0
  1278. package/node_modules/zod/src/v4/locales/kh.ts +7 -0
  1279. package/node_modules/zod/src/v4/locales/km.ts +124 -0
  1280. package/node_modules/zod/src/v4/locales/kn.ts +126 -0
  1281. package/node_modules/zod/src/v4/locales/ko.ts +126 -0
  1282. package/node_modules/zod/src/v4/locales/lt.ts +243 -0
  1283. package/node_modules/zod/src/v4/locales/mk.ts +123 -0
  1284. package/node_modules/zod/src/v4/locales/ms.ts +120 -0
  1285. package/node_modules/zod/src/v4/locales/ne.ts +128 -0
  1286. package/node_modules/zod/src/v4/locales/nl.ts +126 -0
  1287. package/node_modules/zod/src/v4/locales/nn.ts +121 -0
  1288. package/node_modules/zod/src/v4/locales/no.ts +121 -0
  1289. package/node_modules/zod/src/v4/locales/ota.ts +122 -0
  1290. package/node_modules/zod/src/v4/locales/pl.ts +123 -0
  1291. package/node_modules/zod/src/v4/locales/ps.ts +131 -0
  1292. package/node_modules/zod/src/v4/locales/pt-BR.ts +161 -0
  1293. package/node_modules/zod/src/v4/locales/pt.ts +159 -0
  1294. package/node_modules/zod/src/v4/locales/ro.ts +132 -0
  1295. package/node_modules/zod/src/v4/locales/ru.ts +188 -0
  1296. package/node_modules/zod/src/v4/locales/sk.ts +123 -0
  1297. package/node_modules/zod/src/v4/locales/sl.ts +123 -0
  1298. package/node_modules/zod/src/v4/locales/sv.ts +124 -0
  1299. package/node_modules/zod/src/v4/locales/ta.ts +123 -0
  1300. package/node_modules/zod/src/v4/locales/tg.ts +135 -0
  1301. package/node_modules/zod/src/v4/locales/th.ts +124 -0
  1302. package/node_modules/zod/src/v4/locales/tk.ts +113 -0
  1303. package/node_modules/zod/src/v4/locales/tr.ts +116 -0
  1304. package/node_modules/zod/src/v4/locales/ua.ts +7 -0
  1305. package/node_modules/zod/src/v4/locales/uk.ts +122 -0
  1306. package/node_modules/zod/src/v4/locales/ur.ts +124 -0
  1307. package/node_modules/zod/src/v4/locales/uz.ts +120 -0
  1308. package/node_modules/zod/src/v4/locales/vi.ts +122 -0
  1309. package/node_modules/zod/src/v4/locales/yo.ts +129 -0
  1310. package/node_modules/zod/src/v4/locales/zh-CN.ts +121 -0
  1311. package/node_modules/zod/src/v4/locales/zh-TW.ts +120 -0
  1312. package/node_modules/zod/src/v4/mini/checks.ts +33 -0
  1313. package/node_modules/zod/src/v4/mini/coerce.ts +27 -0
  1314. package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
  1315. package/node_modules/zod/src/v4/mini/external.ts +52 -0
  1316. package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
  1317. package/node_modules/zod/src/v4/mini/index.ts +3 -0
  1318. package/node_modules/zod/src/v4/mini/iso.ts +66 -0
  1319. package/node_modules/zod/src/v4/mini/parse.ts +16 -0
  1320. package/node_modules/zod/src/v4/mini/schemas.ts +2051 -0
  1321. package/node_modules/zod/src/v4/mini/tests/apply.test.ts +57 -0
  1322. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +190 -0
  1323. package/node_modules/zod/src/v4/mini/tests/brand.test.ts +94 -0
  1324. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +158 -0
  1325. package/node_modules/zod/src/v4/mini/tests/codec.test.ts +582 -0
  1326. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +30 -0
  1327. package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +84 -0
  1328. package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +54 -0
  1329. package/node_modules/zod/src/v4/mini/tests/error.test.ts +41 -0
  1330. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +14 -0
  1331. package/node_modules/zod/src/v4/mini/tests/index.test.ts +1146 -0
  1332. package/node_modules/zod/src/v4/mini/tests/number.test.ts +109 -0
  1333. package/node_modules/zod/src/v4/mini/tests/object.test.ts +292 -0
  1334. package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
  1335. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +341 -0
  1336. package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
  1337. package/node_modules/zod/src/v4/mini/tests/string.test.ts +396 -0
  1338. package/node_modules/zod/src/v4-mini/index.ts +3 -0
  1339. package/node_modules/zod/v3/ZodError.cjs +167 -0
  1340. package/node_modules/zod/v3/ZodError.d.cts +164 -0
  1341. package/node_modules/zod/v3/ZodError.d.ts +164 -0
  1342. package/node_modules/zod/v3/ZodError.js +143 -0
  1343. package/node_modules/zod/v3/errors.cjs +36 -0
  1344. package/node_modules/zod/v3/errors.d.cts +5 -0
  1345. package/node_modules/zod/v3/errors.d.ts +5 -0
  1346. package/node_modules/zod/v3/errors.js +9 -0
  1347. package/node_modules/zod/v3/external.cjs +41 -0
  1348. package/node_modules/zod/v3/external.d.cts +6 -0
  1349. package/node_modules/zod/v3/external.d.ts +6 -0
  1350. package/node_modules/zod/v3/external.js +6 -0
  1351. package/node_modules/zod/v3/helpers/enumUtil.cjs +21 -0
  1352. package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
  1353. package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
  1354. package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
  1355. package/node_modules/zod/v3/helpers/errorUtil.cjs +28 -0
  1356. package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
  1357. package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
  1358. package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
  1359. package/node_modules/zod/v3/helpers/parseUtil.cjs +143 -0
  1360. package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
  1361. package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
  1362. package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
  1363. package/node_modules/zod/v3/helpers/partialUtil.cjs +21 -0
  1364. package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
  1365. package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
  1366. package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
  1367. package/node_modules/zod/v3/helpers/typeAliases.cjs +21 -0
  1368. package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
  1369. package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
  1370. package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
  1371. package/node_modules/zod/v3/helpers/util.cjs +156 -0
  1372. package/node_modules/zod/v3/helpers/util.d.cts +85 -0
  1373. package/node_modules/zod/v3/helpers/util.d.ts +85 -0
  1374. package/node_modules/zod/v3/helpers/util.js +133 -0
  1375. package/node_modules/zod/v3/index.cjs +52 -0
  1376. package/node_modules/zod/v3/index.d.cts +4 -0
  1377. package/node_modules/zod/v3/index.d.ts +4 -0
  1378. package/node_modules/zod/v3/index.js +4 -0
  1379. package/node_modules/zod/v3/locales/en.cjs +112 -0
  1380. package/node_modules/zod/v3/locales/en.d.cts +3 -0
  1381. package/node_modules/zod/v3/locales/en.d.ts +3 -0
  1382. package/node_modules/zod/v3/locales/en.js +109 -0
  1383. package/node_modules/zod/v3/package.json +7 -0
  1384. package/node_modules/zod/v3/standard-schema.cjs +21 -0
  1385. package/node_modules/zod/v3/standard-schema.d.cts +102 -0
  1386. package/node_modules/zod/v3/standard-schema.d.ts +102 -0
  1387. package/node_modules/zod/v3/standard-schema.js +1 -0
  1388. package/node_modules/zod/v3/types.cjs +3798 -0
  1389. package/node_modules/zod/v3/types.d.cts +1034 -0
  1390. package/node_modules/zod/v3/types.d.ts +1034 -0
  1391. package/node_modules/zod/v3/types.js +3697 -0
  1392. package/node_modules/zod/v4/classic/checks.cjs +53 -0
  1393. package/node_modules/zod/v4/classic/checks.d.cts +1 -0
  1394. package/node_modules/zod/v4/classic/checks.d.ts +1 -0
  1395. package/node_modules/zod/v4/classic/checks.js +1 -0
  1396. package/node_modules/zod/v4/classic/coerce.cjs +66 -0
  1397. package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
  1398. package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
  1399. package/node_modules/zod/v4/classic/coerce.js +17 -0
  1400. package/node_modules/zod/v4/classic/compat.cjs +80 -0
  1401. package/node_modules/zod/v4/classic/compat.d.cts +48 -0
  1402. package/node_modules/zod/v4/classic/compat.d.ts +48 -0
  1403. package/node_modules/zod/v4/classic/compat.js +31 -0
  1404. package/node_modules/zod/v4/classic/deep-partial.cjs +58 -0
  1405. package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
  1406. package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
  1407. package/node_modules/zod/v4/classic/deep-partial.js +13 -0
  1408. package/node_modules/zod/v4/classic/errors.cjs +102 -0
  1409. package/node_modules/zod/v4/classic/errors.d.cts +29 -0
  1410. package/node_modules/zod/v4/classic/errors.d.ts +29 -0
  1411. package/node_modules/zod/v4/classic/errors.js +57 -0
  1412. package/node_modules/zod/v4/classic/external.cjs +97 -0
  1413. package/node_modules/zod/v4/classic/external.d.cts +19 -0
  1414. package/node_modules/zod/v4/classic/external.d.ts +19 -0
  1415. package/node_modules/zod/v4/classic/external.js +17 -0
  1416. package/node_modules/zod/v4/classic/from-json-schema.cjs +926 -0
  1417. package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
  1418. package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
  1419. package/node_modules/zod/v4/classic/from-json-schema.js +881 -0
  1420. package/node_modules/zod/v4/classic/in-out.cjs +82 -0
  1421. package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
  1422. package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
  1423. package/node_modules/zod/v4/classic/in-out.js +36 -0
  1424. package/node_modules/zod/v4/classic/index.cjs +52 -0
  1425. package/node_modules/zod/v4/classic/index.d.cts +3 -0
  1426. package/node_modules/zod/v4/classic/index.d.ts +3 -0
  1427. package/node_modules/zod/v4/classic/index.js +4 -0
  1428. package/node_modules/zod/v4/classic/iso.cjs +68 -0
  1429. package/node_modules/zod/v4/classic/iso.d.cts +7 -0
  1430. package/node_modules/zod/v4/classic/iso.d.ts +7 -0
  1431. package/node_modules/zod/v4/classic/iso.js +15 -0
  1432. package/node_modules/zod/v4/classic/package.json +7 -0
  1433. package/node_modules/zod/v4/classic/parse.cjs +63 -0
  1434. package/node_modules/zod/v4/classic/parse.d.cts +44 -0
  1435. package/node_modules/zod/v4/classic/parse.d.ts +44 -0
  1436. package/node_modules/zod/v4/classic/parse.js +16 -0
  1437. package/node_modules/zod/v4/classic/schemas.cjs +1676 -0
  1438. package/node_modules/zod/v4/classic/schemas.d.cts +816 -0
  1439. package/node_modules/zod/v4/classic/schemas.d.ts +816 -0
  1440. package/node_modules/zod/v4/classic/schemas.js +1535 -0
  1441. package/node_modules/zod/v4/core/api.cjs +1269 -0
  1442. package/node_modules/zod/v4/core/api.d.cts +335 -0
  1443. package/node_modules/zod/v4/core/api.d.ts +335 -0
  1444. package/node_modules/zod/v4/core/api.js +1107 -0
  1445. package/node_modules/zod/v4/core/checks.cjs +561 -0
  1446. package/node_modules/zod/v4/core/checks.d.cts +294 -0
  1447. package/node_modules/zod/v4/core/checks.d.ts +294 -0
  1448. package/node_modules/zod/v4/core/checks.js +516 -0
  1449. package/node_modules/zod/v4/core/compile.cjs +1908 -0
  1450. package/node_modules/zod/v4/core/compile.d.cts +65 -0
  1451. package/node_modules/zod/v4/core/compile.d.ts +65 -0
  1452. package/node_modules/zod/v4/core/compile.js +1858 -0
  1453. package/node_modules/zod/v4/core/core.cjs +167 -0
  1454. package/node_modules/zod/v4/core/core.d.cts +82 -0
  1455. package/node_modules/zod/v4/core/core.d.ts +82 -0
  1456. package/node_modules/zod/v4/core/core.js +141 -0
  1457. package/node_modules/zod/v4/core/doc.cjs +61 -0
  1458. package/node_modules/zod/v4/core/doc.d.cts +16 -0
  1459. package/node_modules/zod/v4/core/doc.d.ts +16 -0
  1460. package/node_modules/zod/v4/core/doc.js +38 -0
  1461. package/node_modules/zod/v4/core/errors.cjs +317 -0
  1462. package/node_modules/zod/v4/core/errors.d.cts +225 -0
  1463. package/node_modules/zod/v4/core/errors.d.ts +225 -0
  1464. package/node_modules/zod/v4/core/errors.js +267 -0
  1465. package/node_modules/zod/v4/core/index.cjs +70 -0
  1466. package/node_modules/zod/v4/core/index.d.cts +19 -0
  1467. package/node_modules/zod/v4/core/index.d.ts +19 -0
  1468. package/node_modules/zod/v4/core/index.js +19 -0
  1469. package/node_modules/zod/v4/core/json-schema-generator.cjs +122 -0
  1470. package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
  1471. package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
  1472. package/node_modules/zod/v4/core/json-schema-generator.js +99 -0
  1473. package/node_modules/zod/v4/core/json-schema-processors.cjs +929 -0
  1474. package/node_modules/zod/v4/core/json-schema-processors.d.cts +65 -0
  1475. package/node_modules/zod/v4/core/json-schema-processors.d.ts +65 -0
  1476. package/node_modules/zod/v4/core/json-schema-processors.js +843 -0
  1477. package/node_modules/zod/v4/core/json-schema.cjs +21 -0
  1478. package/node_modules/zod/v4/core/json-schema.d.cts +89 -0
  1479. package/node_modules/zod/v4/core/json-schema.d.ts +89 -0
  1480. package/node_modules/zod/v4/core/json-schema.js +1 -0
  1481. package/node_modules/zod/v4/core/memoizer.cjs +360 -0
  1482. package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
  1483. package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
  1484. package/node_modules/zod/v4/core/memoizer.js +311 -0
  1485. package/node_modules/zod/v4/core/package.json +7 -0
  1486. package/node_modules/zod/v4/core/parse.cjs +233 -0
  1487. package/node_modules/zod/v4/core/parse.d.cts +52 -0
  1488. package/node_modules/zod/v4/core/parse.d.ts +52 -0
  1489. package/node_modules/zod/v4/core/parse.js +175 -0
  1490. package/node_modules/zod/v4/core/regexes.cjs +209 -0
  1491. package/node_modules/zod/v4/core/regexes.d.cts +90 -0
  1492. package/node_modules/zod/v4/core/regexes.d.ts +90 -0
  1493. package/node_modules/zod/v4/core/regexes.js +156 -0
  1494. package/node_modules/zod/v4/core/registries.cjs +75 -0
  1495. package/node_modules/zod/v4/core/registries.d.cts +35 -0
  1496. package/node_modules/zod/v4/core/registries.d.ts +35 -0
  1497. package/node_modules/zod/v4/core/registries.js +51 -0
  1498. package/node_modules/zod/v4/core/schemas.cjs +2669 -0
  1499. package/node_modules/zod/v4/core/schemas.d.cts +1273 -0
  1500. package/node_modules/zod/v4/core/schemas.d.ts +1273 -0
  1501. package/node_modules/zod/v4/core/schemas.js +2606 -0
  1502. package/node_modules/zod/v4/core/standard-schema.cjs +21 -0
  1503. package/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
  1504. package/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
  1505. package/node_modules/zod/v4/core/standard-schema.js +1 -0
  1506. package/node_modules/zod/v4/core/to-json-schema.cjs +681 -0
  1507. package/node_modules/zod/v4/core/to-json-schema.d.cts +154 -0
  1508. package/node_modules/zod/v4/core/to-json-schema.d.ts +154 -0
  1509. package/node_modules/zod/v4/core/to-json-schema.js +651 -0
  1510. package/node_modules/zod/v4/core/util.cjs +949 -0
  1511. package/node_modules/zod/v4/core/util.d.cts +278 -0
  1512. package/node_modules/zod/v4/core/util.d.ts +278 -0
  1513. package/node_modules/zod/v4/core/util.js +859 -0
  1514. package/node_modules/zod/v4/core/versions.cjs +27 -0
  1515. package/node_modules/zod/v4/core/versions.d.cts +5 -0
  1516. package/node_modules/zod/v4/core/versions.d.ts +5 -0
  1517. package/node_modules/zod/v4/core/versions.js +5 -0
  1518. package/node_modules/zod/v4/core/visit.cjs +214 -0
  1519. package/node_modules/zod/v4/core/visit.d.cts +30 -0
  1520. package/node_modules/zod/v4/core/visit.d.ts +30 -0
  1521. package/node_modules/zod/v4/core/visit.js +169 -0
  1522. package/node_modules/zod/v4/index.cjs +51 -0
  1523. package/node_modules/zod/v4/index.d.cts +3 -0
  1524. package/node_modules/zod/v4/index.d.ts +3 -0
  1525. package/node_modules/zod/v4/index.js +4 -0
  1526. package/node_modules/zod/v4/locales/ar.cjs +138 -0
  1527. package/node_modules/zod/v4/locales/ar.d.cts +5 -0
  1528. package/node_modules/zod/v4/locales/ar.d.ts +4 -0
  1529. package/node_modules/zod/v4/locales/ar.js +111 -0
  1530. package/node_modules/zod/v4/locales/az.cjs +137 -0
  1531. package/node_modules/zod/v4/locales/az.d.cts +5 -0
  1532. package/node_modules/zod/v4/locales/az.d.ts +4 -0
  1533. package/node_modules/zod/v4/locales/az.js +110 -0
  1534. package/node_modules/zod/v4/locales/be.cjs +195 -0
  1535. package/node_modules/zod/v4/locales/be.d.cts +5 -0
  1536. package/node_modules/zod/v4/locales/be.d.ts +4 -0
  1537. package/node_modules/zod/v4/locales/be.js +168 -0
  1538. package/node_modules/zod/v4/locales/bg.cjs +152 -0
  1539. package/node_modules/zod/v4/locales/bg.d.cts +5 -0
  1540. package/node_modules/zod/v4/locales/bg.d.ts +4 -0
  1541. package/node_modules/zod/v4/locales/bg.js +125 -0
  1542. package/node_modules/zod/v4/locales/bn.cjs +140 -0
  1543. package/node_modules/zod/v4/locales/bn.d.cts +5 -0
  1544. package/node_modules/zod/v4/locales/bn.d.ts +4 -0
  1545. package/node_modules/zod/v4/locales/bn.js +113 -0
  1546. package/node_modules/zod/v4/locales/ca.cjs +139 -0
  1547. package/node_modules/zod/v4/locales/ca.d.cts +5 -0
  1548. package/node_modules/zod/v4/locales/ca.d.ts +4 -0
  1549. package/node_modules/zod/v4/locales/ca.js +112 -0
  1550. package/node_modules/zod/v4/locales/ckb.cjs +160 -0
  1551. package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
  1552. package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
  1553. package/node_modules/zod/v4/locales/ckb.js +133 -0
  1554. package/node_modules/zod/v4/locales/cs.cjs +143 -0
  1555. package/node_modules/zod/v4/locales/cs.d.cts +5 -0
  1556. package/node_modules/zod/v4/locales/cs.d.ts +4 -0
  1557. package/node_modules/zod/v4/locales/cs.js +116 -0
  1558. package/node_modules/zod/v4/locales/da.cjs +147 -0
  1559. package/node_modules/zod/v4/locales/da.d.cts +5 -0
  1560. package/node_modules/zod/v4/locales/da.d.ts +4 -0
  1561. package/node_modules/zod/v4/locales/da.js +120 -0
  1562. package/node_modules/zod/v4/locales/de.cjs +140 -0
  1563. package/node_modules/zod/v4/locales/de.d.cts +5 -0
  1564. package/node_modules/zod/v4/locales/de.d.ts +4 -0
  1565. package/node_modules/zod/v4/locales/de.js +113 -0
  1566. package/node_modules/zod/v4/locales/el.cjs +139 -0
  1567. package/node_modules/zod/v4/locales/el.d.cts +5 -0
  1568. package/node_modules/zod/v4/locales/el.d.ts +4 -0
  1569. package/node_modules/zod/v4/locales/el.js +112 -0
  1570. package/node_modules/zod/v4/locales/en.cjs +152 -0
  1571. package/node_modules/zod/v4/locales/en.d.cts +5 -0
  1572. package/node_modules/zod/v4/locales/en.d.ts +4 -0
  1573. package/node_modules/zod/v4/locales/en.js +125 -0
  1574. package/node_modules/zod/v4/locales/eo.cjs +141 -0
  1575. package/node_modules/zod/v4/locales/eo.d.cts +5 -0
  1576. package/node_modules/zod/v4/locales/eo.d.ts +4 -0
  1577. package/node_modules/zod/v4/locales/eo.js +114 -0
  1578. package/node_modules/zod/v4/locales/es.cjs +163 -0
  1579. package/node_modules/zod/v4/locales/es.d.cts +5 -0
  1580. package/node_modules/zod/v4/locales/es.d.ts +4 -0
  1581. package/node_modules/zod/v4/locales/es.js +136 -0
  1582. package/node_modules/zod/v4/locales/fa.cjs +146 -0
  1583. package/node_modules/zod/v4/locales/fa.d.cts +5 -0
  1584. package/node_modules/zod/v4/locales/fa.d.ts +4 -0
  1585. package/node_modules/zod/v4/locales/fa.js +119 -0
  1586. package/node_modules/zod/v4/locales/fi.cjs +144 -0
  1587. package/node_modules/zod/v4/locales/fi.d.cts +5 -0
  1588. package/node_modules/zod/v4/locales/fi.d.ts +4 -0
  1589. package/node_modules/zod/v4/locales/fi.js +117 -0
  1590. package/node_modules/zod/v4/locales/fr-CA.cjs +139 -0
  1591. package/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
  1592. package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
  1593. package/node_modules/zod/v4/locales/fr-CA.js +112 -0
  1594. package/node_modules/zod/v4/locales/fr.cjs +156 -0
  1595. package/node_modules/zod/v4/locales/fr.d.cts +5 -0
  1596. package/node_modules/zod/v4/locales/fr.d.ts +4 -0
  1597. package/node_modules/zod/v4/locales/fr.js +129 -0
  1598. package/node_modules/zod/v4/locales/gu.cjs +140 -0
  1599. package/node_modules/zod/v4/locales/gu.d.cts +5 -0
  1600. package/node_modules/zod/v4/locales/gu.d.ts +4 -0
  1601. package/node_modules/zod/v4/locales/gu.js +113 -0
  1602. package/node_modules/zod/v4/locales/he.cjs +248 -0
  1603. package/node_modules/zod/v4/locales/he.d.cts +5 -0
  1604. package/node_modules/zod/v4/locales/he.d.ts +4 -0
  1605. package/node_modules/zod/v4/locales/he.js +221 -0
  1606. package/node_modules/zod/v4/locales/hi.cjs +138 -0
  1607. package/node_modules/zod/v4/locales/hi.d.cts +5 -0
  1608. package/node_modules/zod/v4/locales/hi.d.ts +4 -0
  1609. package/node_modules/zod/v4/locales/hi.js +111 -0
  1610. package/node_modules/zod/v4/locales/hr.cjs +153 -0
  1611. package/node_modules/zod/v4/locales/hr.d.cts +5 -0
  1612. package/node_modules/zod/v4/locales/hr.d.ts +4 -0
  1613. package/node_modules/zod/v4/locales/hr.js +126 -0
  1614. package/node_modules/zod/v4/locales/hu.cjs +140 -0
  1615. package/node_modules/zod/v4/locales/hu.d.cts +5 -0
  1616. package/node_modules/zod/v4/locales/hu.d.ts +4 -0
  1617. package/node_modules/zod/v4/locales/hu.js +113 -0
  1618. package/node_modules/zod/v4/locales/hy.cjs +185 -0
  1619. package/node_modules/zod/v4/locales/hy.d.cts +5 -0
  1620. package/node_modules/zod/v4/locales/hy.d.ts +4 -0
  1621. package/node_modules/zod/v4/locales/hy.js +158 -0
  1622. package/node_modules/zod/v4/locales/id.cjs +138 -0
  1623. package/node_modules/zod/v4/locales/id.d.cts +5 -0
  1624. package/node_modules/zod/v4/locales/id.d.ts +4 -0
  1625. package/node_modules/zod/v4/locales/id.js +111 -0
  1626. package/node_modules/zod/v4/locales/index.cjs +152 -0
  1627. package/node_modules/zod/v4/locales/index.d.cts +63 -0
  1628. package/node_modules/zod/v4/locales/index.d.ts +63 -0
  1629. package/node_modules/zod/v4/locales/index.js +63 -0
  1630. package/node_modules/zod/v4/locales/is.cjs +141 -0
  1631. package/node_modules/zod/v4/locales/is.d.cts +5 -0
  1632. package/node_modules/zod/v4/locales/is.d.ts +4 -0
  1633. package/node_modules/zod/v4/locales/is.js +114 -0
  1634. package/node_modules/zod/v4/locales/it.cjs +140 -0
  1635. package/node_modules/zod/v4/locales/it.d.cts +5 -0
  1636. package/node_modules/zod/v4/locales/it.d.ts +4 -0
  1637. package/node_modules/zod/v4/locales/it.js +113 -0
  1638. package/node_modules/zod/v4/locales/ja.cjs +139 -0
  1639. package/node_modules/zod/v4/locales/ja.d.cts +5 -0
  1640. package/node_modules/zod/v4/locales/ja.d.ts +4 -0
  1641. package/node_modules/zod/v4/locales/ja.js +112 -0
  1642. package/node_modules/zod/v4/locales/ka.cjs +144 -0
  1643. package/node_modules/zod/v4/locales/ka.d.cts +5 -0
  1644. package/node_modules/zod/v4/locales/ka.d.ts +4 -0
  1645. package/node_modules/zod/v4/locales/ka.js +117 -0
  1646. package/node_modules/zod/v4/locales/kh.cjs +12 -0
  1647. package/node_modules/zod/v4/locales/kh.d.cts +5 -0
  1648. package/node_modules/zod/v4/locales/kh.d.ts +5 -0
  1649. package/node_modules/zod/v4/locales/kh.js +5 -0
  1650. package/node_modules/zod/v4/locales/km.cjs +142 -0
  1651. package/node_modules/zod/v4/locales/km.d.cts +5 -0
  1652. package/node_modules/zod/v4/locales/km.d.ts +4 -0
  1653. package/node_modules/zod/v4/locales/km.js +115 -0
  1654. package/node_modules/zod/v4/locales/kn.cjs +143 -0
  1655. package/node_modules/zod/v4/locales/kn.d.cts +5 -0
  1656. package/node_modules/zod/v4/locales/kn.d.ts +4 -0
  1657. package/node_modules/zod/v4/locales/kn.js +116 -0
  1658. package/node_modules/zod/v4/locales/ko.cjs +143 -0
  1659. package/node_modules/zod/v4/locales/ko.d.cts +5 -0
  1660. package/node_modules/zod/v4/locales/ko.d.ts +4 -0
  1661. package/node_modules/zod/v4/locales/ko.js +116 -0
  1662. package/node_modules/zod/v4/locales/lt.cjs +234 -0
  1663. package/node_modules/zod/v4/locales/lt.d.cts +5 -0
  1664. package/node_modules/zod/v4/locales/lt.d.ts +4 -0
  1665. package/node_modules/zod/v4/locales/lt.js +207 -0
  1666. package/node_modules/zod/v4/locales/mk.cjs +141 -0
  1667. package/node_modules/zod/v4/locales/mk.d.cts +5 -0
  1668. package/node_modules/zod/v4/locales/mk.d.ts +4 -0
  1669. package/node_modules/zod/v4/locales/mk.js +114 -0
  1670. package/node_modules/zod/v4/locales/ms.cjs +139 -0
  1671. package/node_modules/zod/v4/locales/ms.d.cts +5 -0
  1672. package/node_modules/zod/v4/locales/ms.d.ts +4 -0
  1673. package/node_modules/zod/v4/locales/ms.js +112 -0
  1674. package/node_modules/zod/v4/locales/ne.cjs +138 -0
  1675. package/node_modules/zod/v4/locales/ne.d.cts +5 -0
  1676. package/node_modules/zod/v4/locales/ne.d.ts +4 -0
  1677. package/node_modules/zod/v4/locales/ne.js +111 -0
  1678. package/node_modules/zod/v4/locales/nl.cjs +142 -0
  1679. package/node_modules/zod/v4/locales/nl.d.cts +5 -0
  1680. package/node_modules/zod/v4/locales/nl.d.ts +4 -0
  1681. package/node_modules/zod/v4/locales/nl.js +115 -0
  1682. package/node_modules/zod/v4/locales/nn.cjs +140 -0
  1683. package/node_modules/zod/v4/locales/nn.d.cts +5 -0
  1684. package/node_modules/zod/v4/locales/nn.d.ts +4 -0
  1685. package/node_modules/zod/v4/locales/nn.js +113 -0
  1686. package/node_modules/zod/v4/locales/no.cjs +140 -0
  1687. package/node_modules/zod/v4/locales/no.d.cts +5 -0
  1688. package/node_modules/zod/v4/locales/no.d.ts +4 -0
  1689. package/node_modules/zod/v4/locales/no.js +113 -0
  1690. package/node_modules/zod/v4/locales/ota.cjs +141 -0
  1691. package/node_modules/zod/v4/locales/ota.d.cts +5 -0
  1692. package/node_modules/zod/v4/locales/ota.d.ts +4 -0
  1693. package/node_modules/zod/v4/locales/ota.js +114 -0
  1694. package/node_modules/zod/v4/locales/package.json +7 -0
  1695. package/node_modules/zod/v4/locales/pl.cjs +141 -0
  1696. package/node_modules/zod/v4/locales/pl.d.cts +5 -0
  1697. package/node_modules/zod/v4/locales/pl.d.ts +4 -0
  1698. package/node_modules/zod/v4/locales/pl.js +114 -0
  1699. package/node_modules/zod/v4/locales/ps.cjs +146 -0
  1700. package/node_modules/zod/v4/locales/ps.d.cts +5 -0
  1701. package/node_modules/zod/v4/locales/ps.d.ts +4 -0
  1702. package/node_modules/zod/v4/locales/ps.js +119 -0
  1703. package/node_modules/zod/v4/locales/pt-BR.cjs +170 -0
  1704. package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
  1705. package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
  1706. package/node_modules/zod/v4/locales/pt-BR.js +143 -0
  1707. package/node_modules/zod/v4/locales/pt.cjs +169 -0
  1708. package/node_modules/zod/v4/locales/pt.d.cts +5 -0
  1709. package/node_modules/zod/v4/locales/pt.d.ts +4 -0
  1710. package/node_modules/zod/v4/locales/pt.js +142 -0
  1711. package/node_modules/zod/v4/locales/ro.cjs +149 -0
  1712. package/node_modules/zod/v4/locales/ro.d.cts +5 -0
  1713. package/node_modules/zod/v4/locales/ro.d.ts +4 -0
  1714. package/node_modules/zod/v4/locales/ro.js +122 -0
  1715. package/node_modules/zod/v4/locales/ru.cjs +195 -0
  1716. package/node_modules/zod/v4/locales/ru.d.cts +5 -0
  1717. package/node_modules/zod/v4/locales/ru.d.ts +4 -0
  1718. package/node_modules/zod/v4/locales/ru.js +168 -0
  1719. package/node_modules/zod/v4/locales/sk.cjs +143 -0
  1720. package/node_modules/zod/v4/locales/sk.d.cts +5 -0
  1721. package/node_modules/zod/v4/locales/sk.d.ts +4 -0
  1722. package/node_modules/zod/v4/locales/sk.js +116 -0
  1723. package/node_modules/zod/v4/locales/sl.cjs +141 -0
  1724. package/node_modules/zod/v4/locales/sl.d.cts +5 -0
  1725. package/node_modules/zod/v4/locales/sl.d.ts +4 -0
  1726. package/node_modules/zod/v4/locales/sl.js +114 -0
  1727. package/node_modules/zod/v4/locales/sv.cjs +142 -0
  1728. package/node_modules/zod/v4/locales/sv.d.cts +5 -0
  1729. package/node_modules/zod/v4/locales/sv.d.ts +4 -0
  1730. package/node_modules/zod/v4/locales/sv.js +115 -0
  1731. package/node_modules/zod/v4/locales/ta.cjs +142 -0
  1732. package/node_modules/zod/v4/locales/ta.d.cts +5 -0
  1733. package/node_modules/zod/v4/locales/ta.d.ts +4 -0
  1734. package/node_modules/zod/v4/locales/ta.js +115 -0
  1735. package/node_modules/zod/v4/locales/tg.cjs +144 -0
  1736. package/node_modules/zod/v4/locales/tg.d.cts +5 -0
  1737. package/node_modules/zod/v4/locales/tg.d.ts +4 -0
  1738. package/node_modules/zod/v4/locales/tg.js +117 -0
  1739. package/node_modules/zod/v4/locales/th.cjs +142 -0
  1740. package/node_modules/zod/v4/locales/th.d.cts +5 -0
  1741. package/node_modules/zod/v4/locales/th.d.ts +4 -0
  1742. package/node_modules/zod/v4/locales/th.js +115 -0
  1743. package/node_modules/zod/v4/locales/tk.cjs +134 -0
  1744. package/node_modules/zod/v4/locales/tk.d.cts +5 -0
  1745. package/node_modules/zod/v4/locales/tk.d.ts +4 -0
  1746. package/node_modules/zod/v4/locales/tk.js +107 -0
  1747. package/node_modules/zod/v4/locales/tr.cjs +137 -0
  1748. package/node_modules/zod/v4/locales/tr.d.cts +5 -0
  1749. package/node_modules/zod/v4/locales/tr.d.ts +4 -0
  1750. package/node_modules/zod/v4/locales/tr.js +110 -0
  1751. package/node_modules/zod/v4/locales/ua.cjs +12 -0
  1752. package/node_modules/zod/v4/locales/ua.d.cts +5 -0
  1753. package/node_modules/zod/v4/locales/ua.d.ts +5 -0
  1754. package/node_modules/zod/v4/locales/ua.js +5 -0
  1755. package/node_modules/zod/v4/locales/uk.cjs +140 -0
  1756. package/node_modules/zod/v4/locales/uk.d.cts +5 -0
  1757. package/node_modules/zod/v4/locales/uk.d.ts +4 -0
  1758. package/node_modules/zod/v4/locales/uk.js +113 -0
  1759. package/node_modules/zod/v4/locales/ur.cjs +142 -0
  1760. package/node_modules/zod/v4/locales/ur.d.cts +5 -0
  1761. package/node_modules/zod/v4/locales/ur.d.ts +4 -0
  1762. package/node_modules/zod/v4/locales/ur.js +115 -0
  1763. package/node_modules/zod/v4/locales/uz.cjs +140 -0
  1764. package/node_modules/zod/v4/locales/uz.d.cts +5 -0
  1765. package/node_modules/zod/v4/locales/uz.d.ts +4 -0
  1766. package/node_modules/zod/v4/locales/uz.js +113 -0
  1767. package/node_modules/zod/v4/locales/vi.cjs +140 -0
  1768. package/node_modules/zod/v4/locales/vi.d.cts +5 -0
  1769. package/node_modules/zod/v4/locales/vi.d.ts +4 -0
  1770. package/node_modules/zod/v4/locales/vi.js +113 -0
  1771. package/node_modules/zod/v4/locales/yo.cjs +139 -0
  1772. package/node_modules/zod/v4/locales/yo.d.cts +5 -0
  1773. package/node_modules/zod/v4/locales/yo.d.ts +4 -0
  1774. package/node_modules/zod/v4/locales/yo.js +112 -0
  1775. package/node_modules/zod/v4/locales/zh-CN.cjs +141 -0
  1776. package/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
  1777. package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
  1778. package/node_modules/zod/v4/locales/zh-CN.js +114 -0
  1779. package/node_modules/zod/v4/locales/zh-TW.cjs +139 -0
  1780. package/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
  1781. package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
  1782. package/node_modules/zod/v4/locales/zh-TW.js +112 -0
  1783. package/node_modules/zod/v4/mini/checks.cjs +54 -0
  1784. package/node_modules/zod/v4/mini/checks.d.cts +1 -0
  1785. package/node_modules/zod/v4/mini/checks.d.ts +1 -0
  1786. package/node_modules/zod/v4/mini/checks.js +1 -0
  1787. package/node_modules/zod/v4/mini/coerce.cjs +71 -0
  1788. package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
  1789. package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
  1790. package/node_modules/zod/v4/mini/coerce.js +22 -0
  1791. package/node_modules/zod/v4/mini/deep-partial.cjs +58 -0
  1792. package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
  1793. package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
  1794. package/node_modules/zod/v4/mini/deep-partial.js +13 -0
  1795. package/node_modules/zod/v4/mini/external.cjs +95 -0
  1796. package/node_modules/zod/v4/mini/external.d.cts +16 -0
  1797. package/node_modules/zod/v4/mini/external.d.ts +16 -0
  1798. package/node_modules/zod/v4/mini/external.js +16 -0
  1799. package/node_modules/zod/v4/mini/in-out.cjs +82 -0
  1800. package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
  1801. package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
  1802. package/node_modules/zod/v4/mini/in-out.js +36 -0
  1803. package/node_modules/zod/v4/mini/index.cjs +51 -0
  1804. package/node_modules/zod/v4/mini/index.d.cts +3 -0
  1805. package/node_modules/zod/v4/mini/index.d.ts +3 -0
  1806. package/node_modules/zod/v4/mini/index.js +3 -0
  1807. package/node_modules/zod/v4/mini/iso.cjs +83 -0
  1808. package/node_modules/zod/v4/mini/iso.d.cts +22 -0
  1809. package/node_modules/zod/v4/mini/iso.d.ts +22 -0
  1810. package/node_modules/zod/v4/mini/iso.js +34 -0
  1811. package/node_modules/zod/v4/mini/package.json +7 -0
  1812. package/node_modules/zod/v4/mini/parse.cjs +37 -0
  1813. package/node_modules/zod/v4/mini/parse.d.cts +1 -0
  1814. package/node_modules/zod/v4/mini/parse.d.ts +1 -0
  1815. package/node_modules/zod/v4/mini/parse.js +1 -0
  1816. package/node_modules/zod/v4/mini/schemas.cjs +1147 -0
  1817. package/node_modules/zod/v4/mini/schemas.d.cts +480 -0
  1818. package/node_modules/zod/v4/mini/schemas.d.ts +480 -0
  1819. package/node_modules/zod/v4/mini/schemas.js +1002 -0
  1820. package/node_modules/zod/v4/package.json +7 -0
  1821. package/node_modules/zod/v4-mini/index.cjs +51 -0
  1822. package/node_modules/zod/v4-mini/index.d.cts +3 -0
  1823. package/node_modules/zod/v4-mini/index.d.ts +3 -0
  1824. package/node_modules/zod/v4-mini/index.js +3 -0
  1825. package/node_modules/zod/v4-mini/package.json +7 -0
  1826. package/package.json +50 -0
@@ -0,0 +1,2536 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // lib/npm/node.ts
31
+ var node_exports = {};
32
+ __export(node_exports, {
33
+ analyzeMetafile: () => analyzeMetafile,
34
+ analyzeMetafileSync: () => analyzeMetafileSync,
35
+ build: () => build,
36
+ buildSync: () => buildSync,
37
+ context: () => context,
38
+ default: () => node_default,
39
+ formatMessages: () => formatMessages,
40
+ formatMessagesSync: () => formatMessagesSync,
41
+ initialize: () => initialize,
42
+ stop: () => stop,
43
+ transform: () => transform,
44
+ transformSync: () => transformSync,
45
+ version: () => version
46
+ });
47
+ module.exports = __toCommonJS(node_exports);
48
+
49
+ // lib/shared/stdio_protocol.ts
50
+ function encodePacket(packet) {
51
+ let visit = (value) => {
52
+ if (value === null) {
53
+ bb.write8(0);
54
+ } else if (typeof value === "boolean") {
55
+ bb.write8(1);
56
+ bb.write8(+value);
57
+ } else if (typeof value === "number") {
58
+ bb.write8(2);
59
+ bb.write32(value | 0);
60
+ } else if (typeof value === "string") {
61
+ bb.write8(3);
62
+ bb.write(encodeUTF8(value));
63
+ } else if (value instanceof Uint8Array) {
64
+ bb.write8(4);
65
+ bb.write(value);
66
+ } else if (value instanceof Array) {
67
+ bb.write8(5);
68
+ bb.write32(value.length);
69
+ for (let item of value) {
70
+ visit(item);
71
+ }
72
+ } else {
73
+ let keys = Object.keys(value);
74
+ bb.write8(6);
75
+ bb.write32(keys.length);
76
+ for (let key of keys) {
77
+ bb.write(encodeUTF8(key));
78
+ visit(value[key]);
79
+ }
80
+ }
81
+ };
82
+ let bb = new ByteBuffer();
83
+ bb.write32(0);
84
+ bb.write32(packet.id << 1 | +!packet.isRequest);
85
+ visit(packet.value);
86
+ writeUInt32LE(bb.buf, bb.len - 4, 0);
87
+ return bb.buf.subarray(0, bb.len);
88
+ }
89
+ function decodePacket(bytes) {
90
+ let visit = () => {
91
+ switch (bb.read8()) {
92
+ case 0:
93
+ return null;
94
+ case 1:
95
+ return !!bb.read8();
96
+ case 2:
97
+ return bb.read32();
98
+ case 3:
99
+ return decodeUTF8(bb.read());
100
+ case 4:
101
+ return bb.read();
102
+ case 5: {
103
+ let count = bb.read32();
104
+ let value2 = [];
105
+ for (let i = 0; i < count; i++) {
106
+ value2.push(visit());
107
+ }
108
+ return value2;
109
+ }
110
+ case 6: {
111
+ let count = bb.read32();
112
+ let value2 = {};
113
+ for (let i = 0; i < count; i++) {
114
+ value2[decodeUTF8(bb.read())] = visit();
115
+ }
116
+ return value2;
117
+ }
118
+ default:
119
+ throw new Error("Invalid packet");
120
+ }
121
+ };
122
+ let bb = new ByteBuffer(bytes);
123
+ let id = bb.read32();
124
+ let isRequest = (id & 1) === 0;
125
+ id >>>= 1;
126
+ let value = visit();
127
+ if (bb.ptr !== bytes.length) {
128
+ throw new Error("Invalid packet");
129
+ }
130
+ return { id, isRequest, value };
131
+ }
132
+ var ByteBuffer = class {
133
+ constructor(buf = new Uint8Array(1024)) {
134
+ this.buf = buf;
135
+ this.len = 0;
136
+ this.ptr = 0;
137
+ }
138
+ _write(delta) {
139
+ if (this.len + delta > this.buf.length) {
140
+ let clone = new Uint8Array((this.len + delta) * 2);
141
+ clone.set(this.buf);
142
+ this.buf = clone;
143
+ }
144
+ this.len += delta;
145
+ return this.len - delta;
146
+ }
147
+ write8(value) {
148
+ let offset = this._write(1);
149
+ this.buf[offset] = value;
150
+ }
151
+ write32(value) {
152
+ let offset = this._write(4);
153
+ writeUInt32LE(this.buf, value, offset);
154
+ }
155
+ write(bytes) {
156
+ let offset = this._write(4 + bytes.length);
157
+ writeUInt32LE(this.buf, bytes.length, offset);
158
+ this.buf.set(bytes, offset + 4);
159
+ }
160
+ _read(delta) {
161
+ if (this.ptr + delta > this.buf.length) {
162
+ throw new Error("Invalid packet");
163
+ }
164
+ this.ptr += delta;
165
+ return this.ptr - delta;
166
+ }
167
+ read8() {
168
+ return this.buf[this._read(1)];
169
+ }
170
+ read32() {
171
+ return readUInt32LE(this.buf, this._read(4));
172
+ }
173
+ read() {
174
+ let length = this.read32();
175
+ let bytes = new Uint8Array(length);
176
+ let ptr = this._read(bytes.length);
177
+ bytes.set(this.buf.subarray(ptr, ptr + length));
178
+ return bytes;
179
+ }
180
+ };
181
+ var encodeUTF8;
182
+ var decodeUTF8;
183
+ var encodeInvariant;
184
+ if (typeof TextEncoder !== "undefined" && typeof TextDecoder !== "undefined") {
185
+ let encoder = new TextEncoder();
186
+ let decoder = new TextDecoder();
187
+ encodeUTF8 = (text) => encoder.encode(text);
188
+ decodeUTF8 = (bytes) => decoder.decode(bytes);
189
+ encodeInvariant = 'new TextEncoder().encode("")';
190
+ } else if (typeof Buffer !== "undefined") {
191
+ encodeUTF8 = (text) => Buffer.from(text);
192
+ decodeUTF8 = (bytes) => {
193
+ let { buffer, byteOffset, byteLength } = bytes;
194
+ return Buffer.from(buffer, byteOffset, byteLength).toString();
195
+ };
196
+ encodeInvariant = 'Buffer.from("")';
197
+ } else {
198
+ throw new Error("No UTF-8 codec found");
199
+ }
200
+ if (!(encodeUTF8("") instanceof Uint8Array))
201
+ throw new Error(`Invariant violation: "${encodeInvariant} instanceof Uint8Array" is incorrectly false
202
+
203
+ This indicates that your JavaScript environment is broken. You cannot use
204
+ esbuild in this environment because esbuild relies on this invariant. This
205
+ is not a problem with esbuild. You need to fix your environment instead.
206
+ `);
207
+ function readUInt32LE(buffer, offset) {
208
+ return (buffer[offset++] | buffer[offset++] << 8 | buffer[offset++] << 16 | buffer[offset++] << 24) >>> 0;
209
+ }
210
+ function writeUInt32LE(buffer, value, offset) {
211
+ buffer[offset++] = value;
212
+ buffer[offset++] = value >> 8;
213
+ buffer[offset++] = value >> 16;
214
+ buffer[offset++] = value >> 24;
215
+ }
216
+
217
+ // lib/shared/uint8array_json_parser.ts
218
+ var fromCharCode = String.fromCharCode;
219
+ function throwSyntaxError(bytes, index, message) {
220
+ const c = bytes[index];
221
+ let line = 1;
222
+ let column = 0;
223
+ for (let i = 0; i < index; i++) {
224
+ if (bytes[i] === 10 /* Newline */) {
225
+ line++;
226
+ column = 0;
227
+ } else {
228
+ column++;
229
+ }
230
+ }
231
+ throw new SyntaxError(
232
+ message ? message : index === bytes.length ? "Unexpected end of input while parsing JSON" : c >= 32 && c <= 126 ? `Unexpected character ${fromCharCode(c)} in JSON at position ${index} (line ${line}, column ${column})` : `Unexpected byte 0x${c.toString(16)} in JSON at position ${index} (line ${line}, column ${column})`
233
+ );
234
+ }
235
+ function JSON_parse(bytes) {
236
+ if (!(bytes instanceof Uint8Array)) {
237
+ throw new Error(`JSON input must be a Uint8Array`);
238
+ }
239
+ const propertyStack = [];
240
+ const objectStack = [];
241
+ const stateStack = [];
242
+ const length = bytes.length;
243
+ let property = null;
244
+ let state = 0 /* TopLevel */;
245
+ let object;
246
+ let i = 0;
247
+ while (i < length) {
248
+ let c = bytes[i++];
249
+ if (c <= 32 /* Space */) {
250
+ continue;
251
+ }
252
+ let value;
253
+ if (state === 2 /* Object */ && property === null && c !== 34 /* Quote */ && c !== 125 /* CloseBrace */) {
254
+ throwSyntaxError(bytes, --i);
255
+ }
256
+ switch (c) {
257
+ // True
258
+ case 116 /* LowerT */: {
259
+ if (bytes[i++] !== 114 /* LowerR */ || bytes[i++] !== 117 /* LowerU */ || bytes[i++] !== 101 /* LowerE */) {
260
+ throwSyntaxError(bytes, --i);
261
+ }
262
+ value = true;
263
+ break;
264
+ }
265
+ // False
266
+ case 102 /* LowerF */: {
267
+ if (bytes[i++] !== 97 /* LowerA */ || bytes[i++] !== 108 /* LowerL */ || bytes[i++] !== 115 /* LowerS */ || bytes[i++] !== 101 /* LowerE */) {
268
+ throwSyntaxError(bytes, --i);
269
+ }
270
+ value = false;
271
+ break;
272
+ }
273
+ // Null
274
+ case 110 /* LowerN */: {
275
+ if (bytes[i++] !== 117 /* LowerU */ || bytes[i++] !== 108 /* LowerL */ || bytes[i++] !== 108 /* LowerL */) {
276
+ throwSyntaxError(bytes, --i);
277
+ }
278
+ value = null;
279
+ break;
280
+ }
281
+ // Number begin
282
+ case 45 /* Minus */:
283
+ case 46 /* Dot */:
284
+ case 48 /* Digit0 */:
285
+ case 49 /* Digit1 */:
286
+ case 50 /* Digit2 */:
287
+ case 51 /* Digit3 */:
288
+ case 52 /* Digit4 */:
289
+ case 53 /* Digit5 */:
290
+ case 54 /* Digit6 */:
291
+ case 55 /* Digit7 */:
292
+ case 56 /* Digit8 */:
293
+ case 57 /* Digit9 */: {
294
+ let index = i;
295
+ value = fromCharCode(c);
296
+ c = bytes[i];
297
+ while (true) {
298
+ switch (c) {
299
+ case 43 /* Plus */:
300
+ case 45 /* Minus */:
301
+ case 46 /* Dot */:
302
+ case 48 /* Digit0 */:
303
+ case 49 /* Digit1 */:
304
+ case 50 /* Digit2 */:
305
+ case 51 /* Digit3 */:
306
+ case 52 /* Digit4 */:
307
+ case 53 /* Digit5 */:
308
+ case 54 /* Digit6 */:
309
+ case 55 /* Digit7 */:
310
+ case 56 /* Digit8 */:
311
+ case 57 /* Digit9 */:
312
+ case 101 /* LowerE */:
313
+ case 69 /* UpperE */: {
314
+ value += fromCharCode(c);
315
+ c = bytes[++i];
316
+ continue;
317
+ }
318
+ }
319
+ break;
320
+ }
321
+ value = +value;
322
+ if (isNaN(value)) {
323
+ throwSyntaxError(bytes, --index, "Invalid number");
324
+ }
325
+ break;
326
+ }
327
+ // String begin
328
+ case 34 /* Quote */: {
329
+ value = "";
330
+ while (true) {
331
+ if (i >= length) {
332
+ throwSyntaxError(bytes, length);
333
+ }
334
+ c = bytes[i++];
335
+ if (c === 34 /* Quote */) {
336
+ break;
337
+ } else if (c === 92 /* Backslash */) {
338
+ switch (bytes[i++]) {
339
+ // Normal escape sequence
340
+ case 34 /* Quote */:
341
+ value += '"';
342
+ break;
343
+ case 47 /* Slash */:
344
+ value += "/";
345
+ break;
346
+ case 92 /* Backslash */:
347
+ value += "\\";
348
+ break;
349
+ case 98 /* LowerB */:
350
+ value += "\b";
351
+ break;
352
+ case 102 /* LowerF */:
353
+ value += "\f";
354
+ break;
355
+ case 110 /* LowerN */:
356
+ value += "\n";
357
+ break;
358
+ case 114 /* LowerR */:
359
+ value += "\r";
360
+ break;
361
+ case 116 /* LowerT */:
362
+ value += " ";
363
+ break;
364
+ // Unicode escape sequence
365
+ case 117 /* LowerU */: {
366
+ let code = 0;
367
+ for (let j = 0; j < 4; j++) {
368
+ c = bytes[i++];
369
+ code <<= 4;
370
+ if (c >= 48 /* Digit0 */ && c <= 57 /* Digit9 */) code |= c - 48 /* Digit0 */;
371
+ else if (c >= 97 /* LowerA */ && c <= 102 /* LowerF */) code |= c + (10 - 97 /* LowerA */);
372
+ else if (c >= 65 /* UpperA */ && c <= 70 /* UpperF */) code |= c + (10 - 65 /* UpperA */);
373
+ else throwSyntaxError(bytes, --i);
374
+ }
375
+ value += fromCharCode(code);
376
+ break;
377
+ }
378
+ // Invalid escape sequence
379
+ default:
380
+ throwSyntaxError(bytes, --i);
381
+ break;
382
+ }
383
+ } else if (c <= 127) {
384
+ value += fromCharCode(c);
385
+ } else if ((c & 224) === 192) {
386
+ value += fromCharCode((c & 31) << 6 | bytes[i++] & 63);
387
+ } else if ((c & 240) === 224) {
388
+ value += fromCharCode((c & 15) << 12 | (bytes[i++] & 63) << 6 | bytes[i++] & 63);
389
+ } else if ((c & 248) == 240) {
390
+ let codePoint = (c & 7) << 18 | (bytes[i++] & 63) << 12 | (bytes[i++] & 63) << 6 | bytes[i++] & 63;
391
+ if (codePoint > 65535) {
392
+ codePoint -= 65536;
393
+ value += fromCharCode(codePoint >> 10 & 1023 | 55296);
394
+ codePoint = 56320 | codePoint & 1023;
395
+ }
396
+ value += fromCharCode(codePoint);
397
+ }
398
+ }
399
+ value[0];
400
+ break;
401
+ }
402
+ // Array begin
403
+ case 91 /* OpenBracket */: {
404
+ value = [];
405
+ propertyStack.push(property);
406
+ objectStack.push(object);
407
+ stateStack.push(state);
408
+ property = null;
409
+ object = value;
410
+ state = 1 /* Array */;
411
+ continue;
412
+ }
413
+ // Object begin
414
+ case 123 /* OpenBrace */: {
415
+ value = {};
416
+ propertyStack.push(property);
417
+ objectStack.push(object);
418
+ stateStack.push(state);
419
+ property = null;
420
+ object = value;
421
+ state = 2 /* Object */;
422
+ continue;
423
+ }
424
+ // Array end
425
+ case 93 /* CloseBracket */: {
426
+ if (state !== 1 /* Array */) {
427
+ throwSyntaxError(bytes, --i);
428
+ }
429
+ value = object;
430
+ property = propertyStack.pop();
431
+ object = objectStack.pop();
432
+ state = stateStack.pop();
433
+ break;
434
+ }
435
+ // Object end
436
+ case 125 /* CloseBrace */: {
437
+ if (state !== 2 /* Object */) {
438
+ throwSyntaxError(bytes, --i);
439
+ }
440
+ value = object;
441
+ property = propertyStack.pop();
442
+ object = objectStack.pop();
443
+ state = stateStack.pop();
444
+ break;
445
+ }
446
+ default: {
447
+ throwSyntaxError(bytes, --i);
448
+ }
449
+ }
450
+ c = bytes[i];
451
+ while (c <= 32 /* Space */) {
452
+ c = bytes[++i];
453
+ }
454
+ switch (state) {
455
+ case 0 /* TopLevel */: {
456
+ if (i === length) {
457
+ return value;
458
+ }
459
+ break;
460
+ }
461
+ case 1 /* Array */: {
462
+ object.push(value);
463
+ if (c === 44 /* Comma */) {
464
+ i++;
465
+ continue;
466
+ }
467
+ if (c === 93 /* CloseBracket */) {
468
+ continue;
469
+ }
470
+ break;
471
+ }
472
+ case 2 /* Object */: {
473
+ if (property === null) {
474
+ property = value;
475
+ if (c === 58 /* Colon */) {
476
+ i++;
477
+ continue;
478
+ }
479
+ } else {
480
+ object[property] = value;
481
+ property = null;
482
+ if (c === 44 /* Comma */) {
483
+ i++;
484
+ continue;
485
+ }
486
+ if (c === 125 /* CloseBrace */) {
487
+ continue;
488
+ }
489
+ }
490
+ break;
491
+ }
492
+ }
493
+ break;
494
+ }
495
+ throwSyntaxError(bytes, i);
496
+ }
497
+
498
+ // lib/shared/common.ts
499
+ var quote = JSON.stringify;
500
+ var buildLogLevelDefault = "warning";
501
+ var transformLogLevelDefault = "silent";
502
+ function validateAndJoinStringArray(values, what) {
503
+ const toJoin = [];
504
+ for (const value of values) {
505
+ validateStringValue(value, what);
506
+ if (value.indexOf(",") >= 0) throw new Error(`Invalid ${what}: ${value}`);
507
+ toJoin.push(value);
508
+ }
509
+ return toJoin.join(",");
510
+ }
511
+ var canBeAnything = () => null;
512
+ var mustBeBoolean = (value) => typeof value === "boolean" ? null : "a boolean";
513
+ var mustBeString = (value) => typeof value === "string" ? null : "a string";
514
+ var mustBeRegExp = (value) => value instanceof RegExp ? null : "a RegExp object";
515
+ var mustBeInteger = (value) => typeof value === "number" && value === (value | 0) ? null : "an integer";
516
+ var mustBeValidPortNumber = (value) => typeof value === "number" && value === (value | 0) && value >= 0 && value <= 65535 ? null : "a valid port number";
517
+ var mustBeFunction = (value) => typeof value === "function" ? null : "a function";
518
+ var mustBeArray = (value) => Array.isArray(value) ? null : "an array";
519
+ var mustBeArrayOfStrings = (value) => Array.isArray(value) && value.every((x) => typeof x === "string") ? null : "an array of strings";
520
+ var mustBeObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value) ? null : "an object";
521
+ var mustBeEntryPoints = (value) => typeof value === "object" && value !== null ? null : "an array or an object";
522
+ var mustBeWebAssemblyModule = (value) => value instanceof WebAssembly.Module ? null : "a WebAssembly.Module";
523
+ var mustBeObjectOrNull = (value) => typeof value === "object" && !Array.isArray(value) ? null : "an object or null";
524
+ var mustBeStringOrBoolean = (value) => typeof value === "string" || typeof value === "boolean" ? null : "a string or a boolean";
525
+ var mustBeStringOrObject = (value) => typeof value === "string" || typeof value === "object" && value !== null && !Array.isArray(value) ? null : "a string or an object";
526
+ var mustBeStringOrArrayOfStrings = (value) => typeof value === "string" || Array.isArray(value) && value.every((x) => typeof x === "string") ? null : "a string or an array of strings";
527
+ var mustBeStringOrUint8Array = (value) => typeof value === "string" || value instanceof Uint8Array ? null : "a string or a Uint8Array";
528
+ var mustBeStringOrURL = (value) => typeof value === "string" || value instanceof URL ? null : "a string or a URL";
529
+ function getFlag(object, keys, key, mustBeFn) {
530
+ let value = object[key];
531
+ keys[key + ""] = true;
532
+ if (value === void 0) return void 0;
533
+ let mustBe = mustBeFn(value);
534
+ if (mustBe !== null) throw new Error(`${quote(key)} must be ${mustBe}`);
535
+ return value;
536
+ }
537
+ function checkForInvalidFlags(object, keys, where) {
538
+ for (let key in object) {
539
+ if (!(key in keys)) {
540
+ throw new Error(`Invalid option ${where}: ${quote(key)}`);
541
+ }
542
+ }
543
+ }
544
+ function validateInitializeOptions(options) {
545
+ let keys = /* @__PURE__ */ Object.create(null);
546
+ let wasmURL = getFlag(options, keys, "wasmURL", mustBeStringOrURL);
547
+ let wasmModule = getFlag(options, keys, "wasmModule", mustBeWebAssemblyModule);
548
+ let worker = getFlag(options, keys, "worker", mustBeBoolean);
549
+ checkForInvalidFlags(options, keys, "in initialize() call");
550
+ return {
551
+ wasmURL,
552
+ wasmModule,
553
+ worker
554
+ };
555
+ }
556
+ function validateMangleCache(mangleCache) {
557
+ let validated;
558
+ if (mangleCache !== void 0) {
559
+ validated = /* @__PURE__ */ Object.create(null);
560
+ for (let key in mangleCache) {
561
+ let value = mangleCache[key];
562
+ if (typeof value === "string" || value === false) {
563
+ validated[key] = value;
564
+ } else {
565
+ throw new Error(`Expected ${quote(key)} in mangle cache to map to either a string or false`);
566
+ }
567
+ }
568
+ }
569
+ return validated;
570
+ }
571
+ function pushLogFlags(flags, options, keys, isTTY2, logLevelDefault) {
572
+ let color = getFlag(options, keys, "color", mustBeBoolean);
573
+ let logLevel = getFlag(options, keys, "logLevel", mustBeString);
574
+ let logLimit = getFlag(options, keys, "logLimit", mustBeInteger);
575
+ let logStyle = getFlag(options, keys, "logStyle", mustBeString);
576
+ if (color !== void 0) flags.push(`--color=${color}`);
577
+ else if (isTTY2) flags.push(`--color=true`);
578
+ flags.push(`--log-level=${logLevel || logLevelDefault}`);
579
+ flags.push(`--log-limit=${logLimit || 0}`);
580
+ if (logStyle) flags.push(`--log-style=${logStyle}`);
581
+ }
582
+ function validateStringValue(value, what, key) {
583
+ if (typeof value !== "string") {
584
+ throw new Error(`Expected value for ${what}${key !== void 0 ? " " + quote(key) : ""} to be a string, got ${typeof value} instead`);
585
+ }
586
+ return value;
587
+ }
588
+ function pushCommonFlags(flags, options, keys) {
589
+ let legalComments = getFlag(options, keys, "legalComments", mustBeString);
590
+ let sourceRoot = getFlag(options, keys, "sourceRoot", mustBeString);
591
+ let sourcesContent = getFlag(options, keys, "sourcesContent", mustBeBoolean);
592
+ let target = getFlag(options, keys, "target", mustBeStringOrArrayOfStrings);
593
+ let format = getFlag(options, keys, "format", mustBeString);
594
+ let globalName = getFlag(options, keys, "globalName", mustBeString);
595
+ let mangleProps = getFlag(options, keys, "mangleProps", mustBeRegExp);
596
+ let reserveProps = getFlag(options, keys, "reserveProps", mustBeRegExp);
597
+ let mangleQuoted = getFlag(options, keys, "mangleQuoted", mustBeBoolean);
598
+ let minify = getFlag(options, keys, "minify", mustBeBoolean);
599
+ let minifySyntax = getFlag(options, keys, "minifySyntax", mustBeBoolean);
600
+ let minifyWhitespace = getFlag(options, keys, "minifyWhitespace", mustBeBoolean);
601
+ let minifyIdentifiers = getFlag(options, keys, "minifyIdentifiers", mustBeBoolean);
602
+ let lineLimit = getFlag(options, keys, "lineLimit", mustBeInteger);
603
+ let drop = getFlag(options, keys, "drop", mustBeArrayOfStrings);
604
+ let dropLabels = getFlag(options, keys, "dropLabels", mustBeArrayOfStrings);
605
+ let charset = getFlag(options, keys, "charset", mustBeString);
606
+ let treeShaking = getFlag(options, keys, "treeShaking", mustBeBoolean);
607
+ let ignoreAnnotations = getFlag(options, keys, "ignoreAnnotations", mustBeBoolean);
608
+ let jsx = getFlag(options, keys, "jsx", mustBeString);
609
+ let jsxFactory = getFlag(options, keys, "jsxFactory", mustBeString);
610
+ let jsxFragment = getFlag(options, keys, "jsxFragment", mustBeString);
611
+ let jsxImportSource = getFlag(options, keys, "jsxImportSource", mustBeString);
612
+ let jsxDev = getFlag(options, keys, "jsxDev", mustBeBoolean);
613
+ let jsxSideEffects = getFlag(options, keys, "jsxSideEffects", mustBeBoolean);
614
+ let define = getFlag(options, keys, "define", mustBeObject);
615
+ let logOverride = getFlag(options, keys, "logOverride", mustBeObject);
616
+ let supported = getFlag(options, keys, "supported", mustBeObject);
617
+ let pure = getFlag(options, keys, "pure", mustBeArrayOfStrings);
618
+ let keepNames = getFlag(options, keys, "keepNames", mustBeBoolean);
619
+ let platform = getFlag(options, keys, "platform", mustBeString);
620
+ let tsconfigRaw = getFlag(options, keys, "tsconfigRaw", mustBeStringOrObject);
621
+ let absPaths = getFlag(options, keys, "absPaths", mustBeArrayOfStrings);
622
+ if (legalComments) flags.push(`--legal-comments=${legalComments}`);
623
+ if (sourceRoot !== void 0) flags.push(`--source-root=${sourceRoot}`);
624
+ if (sourcesContent !== void 0) flags.push(`--sources-content=${sourcesContent}`);
625
+ if (target) flags.push(`--target=${validateAndJoinStringArray(Array.isArray(target) ? target : [target], "target")}`);
626
+ if (format) flags.push(`--format=${format}`);
627
+ if (globalName) flags.push(`--global-name=${globalName}`);
628
+ if (platform) flags.push(`--platform=${platform}`);
629
+ if (tsconfigRaw) flags.push(`--tsconfig-raw=${typeof tsconfigRaw === "string" ? tsconfigRaw : JSON.stringify(tsconfigRaw)}`);
630
+ if (minify) flags.push("--minify");
631
+ if (minifySyntax) flags.push("--minify-syntax");
632
+ if (minifyWhitespace) flags.push("--minify-whitespace");
633
+ if (minifyIdentifiers) flags.push("--minify-identifiers");
634
+ if (lineLimit) flags.push(`--line-limit=${lineLimit}`);
635
+ if (charset) flags.push(`--charset=${charset}`);
636
+ if (treeShaking !== void 0) flags.push(`--tree-shaking=${treeShaking}`);
637
+ if (ignoreAnnotations) flags.push(`--ignore-annotations`);
638
+ if (drop) for (let what of drop) flags.push(`--drop:${validateStringValue(what, "drop")}`);
639
+ if (dropLabels) flags.push(`--drop-labels=${validateAndJoinStringArray(dropLabels, "drop label")}`);
640
+ if (absPaths) flags.push(`--abs-paths=${validateAndJoinStringArray(absPaths, "abs paths")}`);
641
+ if (mangleProps) flags.push(`--mangle-props=${jsRegExpToGoRegExp(mangleProps)}`);
642
+ if (reserveProps) flags.push(`--reserve-props=${jsRegExpToGoRegExp(reserveProps)}`);
643
+ if (mangleQuoted !== void 0) flags.push(`--mangle-quoted=${mangleQuoted}`);
644
+ if (jsx) flags.push(`--jsx=${jsx}`);
645
+ if (jsxFactory) flags.push(`--jsx-factory=${jsxFactory}`);
646
+ if (jsxFragment) flags.push(`--jsx-fragment=${jsxFragment}`);
647
+ if (jsxImportSource) flags.push(`--jsx-import-source=${jsxImportSource}`);
648
+ if (jsxDev) flags.push(`--jsx-dev`);
649
+ if (jsxSideEffects) flags.push(`--jsx-side-effects`);
650
+ if (define) {
651
+ for (let key in define) {
652
+ if (key.indexOf("=") >= 0) throw new Error(`Invalid define: ${key}`);
653
+ flags.push(`--define:${key}=${validateStringValue(define[key], "define", key)}`);
654
+ }
655
+ }
656
+ if (logOverride) {
657
+ for (let key in logOverride) {
658
+ if (key.indexOf("=") >= 0) throw new Error(`Invalid log override: ${key}`);
659
+ flags.push(`--log-override:${key}=${validateStringValue(logOverride[key], "log override", key)}`);
660
+ }
661
+ }
662
+ if (supported) {
663
+ for (let key in supported) {
664
+ if (key.indexOf("=") >= 0) throw new Error(`Invalid supported: ${key}`);
665
+ const value = supported[key];
666
+ if (typeof value !== "boolean") throw new Error(`Expected value for supported ${quote(key)} to be a boolean, got ${typeof value} instead`);
667
+ flags.push(`--supported:${key}=${value}`);
668
+ }
669
+ }
670
+ if (pure) for (let fn of pure) flags.push(`--pure:${validateStringValue(fn, "pure")}`);
671
+ if (keepNames) flags.push(`--keep-names`);
672
+ }
673
+ function flagsForBuildOptions(callName, options, isTTY2, logLevelDefault, writeDefault) {
674
+ var _a2;
675
+ let flags = [];
676
+ let entries = [];
677
+ let keys = /* @__PURE__ */ Object.create(null);
678
+ let stdinContents = null;
679
+ let stdinResolveDir = null;
680
+ pushLogFlags(flags, options, keys, isTTY2, logLevelDefault);
681
+ pushCommonFlags(flags, options, keys);
682
+ let sourcemap = getFlag(options, keys, "sourcemap", mustBeStringOrBoolean);
683
+ let bundle = getFlag(options, keys, "bundle", mustBeBoolean);
684
+ let splitting = getFlag(options, keys, "splitting", mustBeBoolean);
685
+ let preserveSymlinks = getFlag(options, keys, "preserveSymlinks", mustBeBoolean);
686
+ let metafile = getFlag(options, keys, "metafile", mustBeBoolean);
687
+ let outfile = getFlag(options, keys, "outfile", mustBeString);
688
+ let outdir = getFlag(options, keys, "outdir", mustBeString);
689
+ let outbase = getFlag(options, keys, "outbase", mustBeString);
690
+ let tsconfig = getFlag(options, keys, "tsconfig", mustBeString);
691
+ let resolveExtensions = getFlag(options, keys, "resolveExtensions", mustBeArrayOfStrings);
692
+ let nodePathsInput = getFlag(options, keys, "nodePaths", mustBeArrayOfStrings);
693
+ let mainFields = getFlag(options, keys, "mainFields", mustBeArrayOfStrings);
694
+ let conditions = getFlag(options, keys, "conditions", mustBeArrayOfStrings);
695
+ let external = getFlag(options, keys, "external", mustBeArrayOfStrings);
696
+ let packages = getFlag(options, keys, "packages", mustBeString);
697
+ let alias = getFlag(options, keys, "alias", mustBeObject);
698
+ let loader = getFlag(options, keys, "loader", mustBeObject);
699
+ let outExtension = getFlag(options, keys, "outExtension", mustBeObject);
700
+ let publicPath = getFlag(options, keys, "publicPath", mustBeString);
701
+ let entryNames = getFlag(options, keys, "entryNames", mustBeString);
702
+ let chunkNames = getFlag(options, keys, "chunkNames", mustBeString);
703
+ let assetNames = getFlag(options, keys, "assetNames", mustBeString);
704
+ let inject = getFlag(options, keys, "inject", mustBeArrayOfStrings);
705
+ let banner = getFlag(options, keys, "banner", mustBeObject);
706
+ let footer = getFlag(options, keys, "footer", mustBeObject);
707
+ let entryPoints = getFlag(options, keys, "entryPoints", mustBeEntryPoints);
708
+ let absWorkingDir = getFlag(options, keys, "absWorkingDir", mustBeString);
709
+ let stdin = getFlag(options, keys, "stdin", mustBeObject);
710
+ let write = (_a2 = getFlag(options, keys, "write", mustBeBoolean)) != null ? _a2 : writeDefault;
711
+ let allowOverwrite = getFlag(options, keys, "allowOverwrite", mustBeBoolean);
712
+ let mangleCache = getFlag(options, keys, "mangleCache", mustBeObject);
713
+ keys.plugins = true;
714
+ checkForInvalidFlags(options, keys, `in ${callName}() call`);
715
+ if (sourcemap) flags.push(`--sourcemap${sourcemap === true ? "" : `=${sourcemap}`}`);
716
+ if (bundle) flags.push("--bundle");
717
+ if (allowOverwrite) flags.push("--allow-overwrite");
718
+ if (splitting) flags.push("--splitting");
719
+ if (preserveSymlinks) flags.push("--preserve-symlinks");
720
+ if (metafile) flags.push(`--metafile`);
721
+ if (outfile) flags.push(`--outfile=${outfile}`);
722
+ if (outdir) flags.push(`--outdir=${outdir}`);
723
+ if (outbase) flags.push(`--outbase=${outbase}`);
724
+ if (tsconfig) flags.push(`--tsconfig=${tsconfig}`);
725
+ if (packages) flags.push(`--packages=${packages}`);
726
+ if (resolveExtensions) flags.push(`--resolve-extensions=${validateAndJoinStringArray(resolveExtensions, "resolve extension")}`);
727
+ if (publicPath) flags.push(`--public-path=${publicPath}`);
728
+ if (entryNames) flags.push(`--entry-names=${entryNames}`);
729
+ if (chunkNames) flags.push(`--chunk-names=${chunkNames}`);
730
+ if (assetNames) flags.push(`--asset-names=${assetNames}`);
731
+ if (mainFields) flags.push(`--main-fields=${validateAndJoinStringArray(mainFields, "main field")}`);
732
+ if (conditions) flags.push(`--conditions=${validateAndJoinStringArray(conditions, "condition")}`);
733
+ if (external) for (let name of external) flags.push(`--external:${validateStringValue(name, "external")}`);
734
+ if (alias) {
735
+ for (let old in alias) {
736
+ if (old.indexOf("=") >= 0) throw new Error(`Invalid package name in alias: ${old}`);
737
+ flags.push(`--alias:${old}=${validateStringValue(alias[old], "alias", old)}`);
738
+ }
739
+ }
740
+ if (banner) {
741
+ for (let type in banner) {
742
+ if (type.indexOf("=") >= 0) throw new Error(`Invalid banner file type: ${type}`);
743
+ flags.push(`--banner:${type}=${validateStringValue(banner[type], "banner", type)}`);
744
+ }
745
+ }
746
+ if (footer) {
747
+ for (let type in footer) {
748
+ if (type.indexOf("=") >= 0) throw new Error(`Invalid footer file type: ${type}`);
749
+ flags.push(`--footer:${type}=${validateStringValue(footer[type], "footer", type)}`);
750
+ }
751
+ }
752
+ if (inject) for (let path3 of inject) flags.push(`--inject:${validateStringValue(path3, "inject")}`);
753
+ if (loader) {
754
+ for (let ext in loader) {
755
+ if (ext.indexOf("=") >= 0) throw new Error(`Invalid loader extension: ${ext}`);
756
+ flags.push(`--loader:${ext}=${validateStringValue(loader[ext], "loader", ext)}`);
757
+ }
758
+ }
759
+ if (outExtension) {
760
+ for (let ext in outExtension) {
761
+ if (ext.indexOf("=") >= 0) throw new Error(`Invalid out extension: ${ext}`);
762
+ flags.push(`--out-extension:${ext}=${validateStringValue(outExtension[ext], "out extension", ext)}`);
763
+ }
764
+ }
765
+ if (entryPoints) {
766
+ if (Array.isArray(entryPoints)) {
767
+ for (let i = 0, n = entryPoints.length; i < n; i++) {
768
+ let entryPoint = entryPoints[i];
769
+ if (typeof entryPoint === "object" && entryPoint !== null) {
770
+ let entryPointKeys = /* @__PURE__ */ Object.create(null);
771
+ let input = getFlag(entryPoint, entryPointKeys, "in", mustBeString);
772
+ let output = getFlag(entryPoint, entryPointKeys, "out", mustBeString);
773
+ checkForInvalidFlags(entryPoint, entryPointKeys, "in entry point at index " + i);
774
+ if (input === void 0) throw new Error('Missing property "in" for entry point at index ' + i);
775
+ if (output === void 0) throw new Error('Missing property "out" for entry point at index ' + i);
776
+ entries.push([output, input]);
777
+ } else {
778
+ entries.push(["", validateStringValue(entryPoint, "entry point at index " + i)]);
779
+ }
780
+ }
781
+ } else {
782
+ for (let key in entryPoints) {
783
+ entries.push([key, validateStringValue(entryPoints[key], "entry point", key)]);
784
+ }
785
+ }
786
+ }
787
+ if (stdin) {
788
+ let stdinKeys = /* @__PURE__ */ Object.create(null);
789
+ let contents = getFlag(stdin, stdinKeys, "contents", mustBeStringOrUint8Array);
790
+ let resolveDir = getFlag(stdin, stdinKeys, "resolveDir", mustBeString);
791
+ let sourcefile = getFlag(stdin, stdinKeys, "sourcefile", mustBeString);
792
+ let loader2 = getFlag(stdin, stdinKeys, "loader", mustBeString);
793
+ checkForInvalidFlags(stdin, stdinKeys, 'in "stdin" object');
794
+ if (sourcefile) flags.push(`--sourcefile=${sourcefile}`);
795
+ if (loader2) flags.push(`--loader=${loader2}`);
796
+ if (resolveDir) stdinResolveDir = resolveDir;
797
+ if (typeof contents === "string") stdinContents = encodeUTF8(contents);
798
+ else if (contents instanceof Uint8Array) stdinContents = contents;
799
+ }
800
+ let nodePaths = [];
801
+ if (nodePathsInput) {
802
+ for (let value of nodePathsInput) {
803
+ value += "";
804
+ nodePaths.push(value);
805
+ }
806
+ }
807
+ return {
808
+ entries,
809
+ flags,
810
+ write,
811
+ stdinContents,
812
+ stdinResolveDir,
813
+ absWorkingDir,
814
+ nodePaths,
815
+ mangleCache: validateMangleCache(mangleCache)
816
+ };
817
+ }
818
+ function flagsForTransformOptions(callName, options, isTTY2, logLevelDefault) {
819
+ let flags = [];
820
+ let keys = /* @__PURE__ */ Object.create(null);
821
+ pushLogFlags(flags, options, keys, isTTY2, logLevelDefault);
822
+ pushCommonFlags(flags, options, keys);
823
+ let sourcemap = getFlag(options, keys, "sourcemap", mustBeStringOrBoolean);
824
+ let sourcefile = getFlag(options, keys, "sourcefile", mustBeString);
825
+ let loader = getFlag(options, keys, "loader", mustBeString);
826
+ let banner = getFlag(options, keys, "banner", mustBeString);
827
+ let footer = getFlag(options, keys, "footer", mustBeString);
828
+ let mangleCache = getFlag(options, keys, "mangleCache", mustBeObject);
829
+ checkForInvalidFlags(options, keys, `in ${callName}() call`);
830
+ if (sourcemap) flags.push(`--sourcemap=${sourcemap === true ? "external" : sourcemap}`);
831
+ if (sourcefile) flags.push(`--sourcefile=${sourcefile}`);
832
+ if (loader) flags.push(`--loader=${loader}`);
833
+ if (banner) flags.push(`--banner=${banner}`);
834
+ if (footer) flags.push(`--footer=${footer}`);
835
+ return {
836
+ flags,
837
+ mangleCache: validateMangleCache(mangleCache)
838
+ };
839
+ }
840
+ function createChannel(streamIn) {
841
+ const requestCallbacksByKey = {};
842
+ const closeData = { didClose: false, reason: "" };
843
+ let responseCallbacks = {};
844
+ let nextRequestID = 0;
845
+ let nextBuildKey = 0;
846
+ let stdout = new Uint8Array(16 * 1024);
847
+ let stdoutUsed = 0;
848
+ let readFromStdout = (chunk) => {
849
+ let limit = stdoutUsed + chunk.length;
850
+ if (limit > stdout.length) {
851
+ let swap = new Uint8Array(limit * 2);
852
+ swap.set(stdout);
853
+ stdout = swap;
854
+ }
855
+ stdout.set(chunk, stdoutUsed);
856
+ stdoutUsed += chunk.length;
857
+ let offset = 0;
858
+ while (offset + 4 <= stdoutUsed) {
859
+ let length = readUInt32LE(stdout, offset);
860
+ if (offset + 4 + length > stdoutUsed) {
861
+ break;
862
+ }
863
+ offset += 4;
864
+ handleIncomingPacket(stdout.subarray(offset, offset + length));
865
+ offset += length;
866
+ }
867
+ if (offset > 0) {
868
+ stdout.copyWithin(0, offset, stdoutUsed);
869
+ stdoutUsed -= offset;
870
+ }
871
+ };
872
+ let afterClose = (error) => {
873
+ closeData.didClose = true;
874
+ if (error) closeData.reason = ": " + (error.message || error);
875
+ const text = "The service was stopped" + closeData.reason;
876
+ for (let id in responseCallbacks) {
877
+ responseCallbacks[id](text, null);
878
+ }
879
+ responseCallbacks = {};
880
+ };
881
+ let sendRequest = (refs, value, callback) => {
882
+ if (closeData.didClose) return callback("The service is no longer running" + closeData.reason, null);
883
+ let id = nextRequestID++;
884
+ responseCallbacks[id] = (error, response) => {
885
+ try {
886
+ callback(error, response);
887
+ } finally {
888
+ if (refs) refs.unref();
889
+ }
890
+ };
891
+ if (refs) refs.ref();
892
+ streamIn.writeToStdin(encodePacket({ id, isRequest: true, value }));
893
+ };
894
+ let sendResponse = (id, value) => {
895
+ if (closeData.didClose) throw new Error("The service is no longer running" + closeData.reason);
896
+ streamIn.writeToStdin(encodePacket({ id, isRequest: false, value }));
897
+ };
898
+ let handleRequest = async (id, request) => {
899
+ try {
900
+ if (request.command === "ping") {
901
+ sendResponse(id, {});
902
+ return;
903
+ }
904
+ if (typeof request.key === "number") {
905
+ const requestCallbacks = requestCallbacksByKey[request.key];
906
+ if (!requestCallbacks) {
907
+ return;
908
+ }
909
+ const callback = requestCallbacks[request.command];
910
+ if (callback) {
911
+ await callback(id, request);
912
+ return;
913
+ }
914
+ }
915
+ throw new Error(`Invalid command: ` + request.command);
916
+ } catch (e) {
917
+ const errors = [extractErrorMessageV8(e, streamIn, null, void 0, "")];
918
+ try {
919
+ sendResponse(id, { errors });
920
+ } catch {
921
+ }
922
+ }
923
+ };
924
+ let isFirstPacket = true;
925
+ let handleIncomingPacket = (bytes) => {
926
+ if (isFirstPacket) {
927
+ isFirstPacket = false;
928
+ let binaryVersion = String.fromCharCode(...bytes);
929
+ if (binaryVersion !== "0.28.2") {
930
+ throw new Error(`Cannot start service: Host version "${"0.28.2"}" does not match binary version ${quote(binaryVersion)}`);
931
+ }
932
+ return;
933
+ }
934
+ let packet = decodePacket(bytes);
935
+ if (packet.isRequest) {
936
+ handleRequest(packet.id, packet.value);
937
+ } else {
938
+ let callback = responseCallbacks[packet.id];
939
+ delete responseCallbacks[packet.id];
940
+ if (packet.value.error) callback(packet.value.error, {});
941
+ else callback(null, packet.value);
942
+ }
943
+ };
944
+ let buildOrContext = ({ callName, refs, options, isTTY: isTTY2, defaultWD: defaultWD2, callback }) => {
945
+ let refCount = 0;
946
+ const buildKey = nextBuildKey++;
947
+ const requestCallbacks = {};
948
+ const buildRefs = {
949
+ ref() {
950
+ if (++refCount === 1) {
951
+ if (refs) refs.ref();
952
+ }
953
+ },
954
+ unref() {
955
+ if (--refCount === 0) {
956
+ delete requestCallbacksByKey[buildKey];
957
+ if (refs) refs.unref();
958
+ }
959
+ }
960
+ };
961
+ requestCallbacksByKey[buildKey] = requestCallbacks;
962
+ buildRefs.ref();
963
+ buildOrContextImpl(
964
+ callName,
965
+ buildKey,
966
+ sendRequest,
967
+ sendResponse,
968
+ buildRefs,
969
+ streamIn,
970
+ requestCallbacks,
971
+ options,
972
+ isTTY2,
973
+ defaultWD2,
974
+ (err, res) => {
975
+ try {
976
+ callback(err, res);
977
+ } finally {
978
+ buildRefs.unref();
979
+ }
980
+ }
981
+ );
982
+ };
983
+ let transform2 = ({ callName, refs, input, options, isTTY: isTTY2, fs: fs3, callback }) => {
984
+ const details = createObjectStash();
985
+ let start = (inputPath) => {
986
+ try {
987
+ if (typeof input !== "string" && !(input instanceof Uint8Array))
988
+ throw new Error('The input to "transform" must be a string or a Uint8Array');
989
+ let {
990
+ flags,
991
+ mangleCache
992
+ } = flagsForTransformOptions(callName, options, isTTY2, transformLogLevelDefault);
993
+ let request = {
994
+ command: "transform",
995
+ flags,
996
+ inputFS: inputPath !== null,
997
+ input: inputPath !== null ? encodeUTF8(inputPath) : typeof input === "string" ? encodeUTF8(input) : input
998
+ };
999
+ if (mangleCache) request.mangleCache = mangleCache;
1000
+ sendRequest(refs, request, (error, response) => {
1001
+ if (error) return callback(new Error(error), null);
1002
+ let errors = replaceDetailsInMessages(response.errors, details);
1003
+ let warnings = replaceDetailsInMessages(response.warnings, details);
1004
+ let outstanding = 1;
1005
+ let next = () => {
1006
+ if (--outstanding === 0) {
1007
+ let result = {
1008
+ warnings,
1009
+ code: response.code,
1010
+ map: response.map,
1011
+ mangleCache: void 0,
1012
+ legalComments: void 0
1013
+ };
1014
+ if ("legalComments" in response) result.legalComments = response == null ? void 0 : response.legalComments;
1015
+ if (response.mangleCache) result.mangleCache = response == null ? void 0 : response.mangleCache;
1016
+ callback(null, result);
1017
+ }
1018
+ };
1019
+ if (errors.length > 0) return callback(failureErrorWithLog("Transform failed", errors, warnings), null);
1020
+ if (response.codeFS) {
1021
+ outstanding++;
1022
+ fs3.readFile(response.code, (err, contents) => {
1023
+ if (err !== null) {
1024
+ callback(err, null);
1025
+ } else {
1026
+ response.code = contents;
1027
+ next();
1028
+ }
1029
+ });
1030
+ }
1031
+ if (response.mapFS) {
1032
+ outstanding++;
1033
+ fs3.readFile(response.map, (err, contents) => {
1034
+ if (err !== null) {
1035
+ callback(err, null);
1036
+ } else {
1037
+ response.map = contents;
1038
+ next();
1039
+ }
1040
+ });
1041
+ }
1042
+ next();
1043
+ });
1044
+ } catch (e) {
1045
+ let flags = [];
1046
+ try {
1047
+ pushLogFlags(flags, options, {}, isTTY2, transformLogLevelDefault);
1048
+ } catch {
1049
+ }
1050
+ const error = extractErrorMessageV8(e, streamIn, details, void 0, "");
1051
+ sendRequest(refs, { command: "error", flags, error }, () => {
1052
+ error.detail = details.load(error.detail);
1053
+ callback(failureErrorWithLog("Transform failed", [error], []), null);
1054
+ });
1055
+ }
1056
+ };
1057
+ if ((typeof input === "string" || input instanceof Uint8Array) && input.length > 1024 * 1024) {
1058
+ let next = start;
1059
+ start = () => fs3.writeFile(input, next);
1060
+ }
1061
+ start(null);
1062
+ };
1063
+ let formatMessages2 = ({ callName, refs, messages, options, callback }) => {
1064
+ if (!options) throw new Error(`Missing second argument in ${callName}() call`);
1065
+ let keys = {};
1066
+ let kind = getFlag(options, keys, "kind", mustBeString);
1067
+ let color = getFlag(options, keys, "color", mustBeBoolean);
1068
+ let terminalWidth = getFlag(options, keys, "terminalWidth", mustBeInteger);
1069
+ let logStyle = getFlag(options, keys, "logStyle", mustBeString);
1070
+ checkForInvalidFlags(options, keys, `in ${callName}() call`);
1071
+ if (kind === void 0) throw new Error(`Missing "kind" in ${callName}() call`);
1072
+ if (kind !== "error" && kind !== "warning") throw new Error(`Expected "kind" to be "error" or "warning" in ${callName}() call`);
1073
+ let request = {
1074
+ command: "format-msgs",
1075
+ messages: sanitizeMessages(messages, "messages", null, "", terminalWidth),
1076
+ isWarning: kind === "warning"
1077
+ };
1078
+ if (color !== void 0) request.color = color;
1079
+ if (terminalWidth !== void 0) request.terminalWidth = terminalWidth;
1080
+ if (logStyle !== void 0) request.logStyle = logStyle;
1081
+ sendRequest(refs, request, (error, response) => {
1082
+ if (error) return callback(new Error(error), null);
1083
+ callback(null, response.messages);
1084
+ });
1085
+ };
1086
+ let analyzeMetafile2 = ({ callName, refs, metafile, options, callback }) => {
1087
+ if (options === void 0) options = {};
1088
+ let keys = {};
1089
+ let color = getFlag(options, keys, "color", mustBeBoolean);
1090
+ let verbose = getFlag(options, keys, "verbose", mustBeBoolean);
1091
+ checkForInvalidFlags(options, keys, `in ${callName}() call`);
1092
+ let request = {
1093
+ command: "analyze-metafile",
1094
+ metafile
1095
+ };
1096
+ if (color !== void 0) request.color = color;
1097
+ if (verbose !== void 0) request.verbose = verbose;
1098
+ sendRequest(refs, request, (error, response) => {
1099
+ if (error) return callback(new Error(error), null);
1100
+ callback(null, response.result);
1101
+ });
1102
+ };
1103
+ return {
1104
+ readFromStdout,
1105
+ afterClose,
1106
+ service: {
1107
+ buildOrContext,
1108
+ transform: transform2,
1109
+ formatMessages: formatMessages2,
1110
+ analyzeMetafile: analyzeMetafile2
1111
+ }
1112
+ };
1113
+ }
1114
+ function buildOrContextImpl(callName, buildKey, sendRequest, sendResponse, refs, streamIn, requestCallbacks, options, isTTY2, defaultWD2, callback) {
1115
+ const details = createObjectStash();
1116
+ const isContext = callName === "context";
1117
+ const handleError = (e, pluginName) => {
1118
+ const flags = [];
1119
+ try {
1120
+ pushLogFlags(flags, options, {}, isTTY2, buildLogLevelDefault);
1121
+ } catch {
1122
+ }
1123
+ const message = extractErrorMessageV8(e, streamIn, details, void 0, pluginName);
1124
+ sendRequest(refs, { command: "error", flags, error: message }, () => {
1125
+ message.detail = details.load(message.detail);
1126
+ callback(failureErrorWithLog(isContext ? "Context failed" : "Build failed", [message], []), null);
1127
+ });
1128
+ };
1129
+ let plugins;
1130
+ if (typeof options === "object") {
1131
+ const value = options.plugins;
1132
+ if (value !== void 0) {
1133
+ if (!Array.isArray(value)) return handleError(new Error(`"plugins" must be an array`), "");
1134
+ plugins = value;
1135
+ }
1136
+ }
1137
+ if (plugins && plugins.length > 0) {
1138
+ if (streamIn.isSync) return handleError(new Error("Cannot use plugins in synchronous API calls"), "");
1139
+ handlePlugins(
1140
+ buildKey,
1141
+ sendRequest,
1142
+ sendResponse,
1143
+ refs,
1144
+ streamIn,
1145
+ requestCallbacks,
1146
+ options,
1147
+ plugins,
1148
+ details
1149
+ ).then(
1150
+ (result) => {
1151
+ if (!result.ok) return handleError(result.error, result.pluginName);
1152
+ try {
1153
+ buildOrContextContinue(result.requestPlugins, result.runOnEndCallbacks, result.scheduleOnDisposeCallbacks);
1154
+ } catch (e) {
1155
+ handleError(e, "");
1156
+ }
1157
+ },
1158
+ (e) => handleError(e, "")
1159
+ );
1160
+ return;
1161
+ }
1162
+ try {
1163
+ buildOrContextContinue(null, (result, done) => done([], []), () => {
1164
+ });
1165
+ } catch (e) {
1166
+ handleError(e, "");
1167
+ }
1168
+ function buildOrContextContinue(requestPlugins, runOnEndCallbacks, scheduleOnDisposeCallbacks) {
1169
+ const writeDefault = streamIn.hasFS;
1170
+ const {
1171
+ entries,
1172
+ flags,
1173
+ write,
1174
+ stdinContents,
1175
+ stdinResolveDir,
1176
+ absWorkingDir,
1177
+ nodePaths,
1178
+ mangleCache
1179
+ } = flagsForBuildOptions(callName, options, isTTY2, buildLogLevelDefault, writeDefault);
1180
+ if (write && !streamIn.hasFS) throw new Error(`The "write" option is unavailable in this environment`);
1181
+ const request = {
1182
+ command: "build",
1183
+ key: buildKey,
1184
+ entries,
1185
+ flags,
1186
+ write,
1187
+ stdinContents,
1188
+ stdinResolveDir,
1189
+ absWorkingDir: absWorkingDir || defaultWD2,
1190
+ nodePaths,
1191
+ context: isContext
1192
+ };
1193
+ if (requestPlugins) request.plugins = requestPlugins;
1194
+ if (mangleCache) request.mangleCache = mangleCache;
1195
+ const buildResponseToResult = (response, callback2) => {
1196
+ const result = {
1197
+ errors: replaceDetailsInMessages(response.errors, details),
1198
+ warnings: replaceDetailsInMessages(response.warnings, details),
1199
+ outputFiles: void 0,
1200
+ metafile: void 0,
1201
+ mangleCache: void 0
1202
+ };
1203
+ const originalErrors = result.errors.slice();
1204
+ const originalWarnings = result.warnings.slice();
1205
+ if (response.outputFiles) result.outputFiles = response.outputFiles.map(convertOutputFiles);
1206
+ if (response.metafile && response.metafile.length) result.metafile = parseJSON(response.metafile);
1207
+ if (response.mangleCache) result.mangleCache = response.mangleCache;
1208
+ if (response.writeToStdout !== void 0) console.log(decodeUTF8(response.writeToStdout).replace(/\n$/, ""));
1209
+ runOnEndCallbacks(result, (onEndErrors, onEndWarnings) => {
1210
+ if (originalErrors.length > 0 || onEndErrors.length > 0) {
1211
+ const error = failureErrorWithLog("Build failed", originalErrors.concat(onEndErrors), originalWarnings.concat(onEndWarnings));
1212
+ return callback2(error, null, onEndErrors, onEndWarnings);
1213
+ }
1214
+ callback2(null, result, onEndErrors, onEndWarnings);
1215
+ });
1216
+ };
1217
+ let latestResultPromise;
1218
+ let provideLatestResult;
1219
+ if (isContext)
1220
+ requestCallbacks["on-end"] = (id, request2) => new Promise((resolve) => {
1221
+ buildResponseToResult(request2, (err, result, onEndErrors, onEndWarnings) => {
1222
+ const response = {
1223
+ errors: onEndErrors,
1224
+ warnings: onEndWarnings
1225
+ };
1226
+ if (provideLatestResult) provideLatestResult(err, result);
1227
+ latestResultPromise = void 0;
1228
+ provideLatestResult = void 0;
1229
+ sendResponse(id, response);
1230
+ resolve();
1231
+ });
1232
+ });
1233
+ sendRequest(refs, request, (error, response) => {
1234
+ if (error) return callback(new Error(error), null);
1235
+ if (!isContext) {
1236
+ return buildResponseToResult(response, (err, res) => {
1237
+ scheduleOnDisposeCallbacks();
1238
+ return callback(err, res);
1239
+ });
1240
+ }
1241
+ if (response.errors.length > 0) {
1242
+ return callback(failureErrorWithLog("Context failed", response.errors, response.warnings), null);
1243
+ }
1244
+ let didDispose = false;
1245
+ const result = {
1246
+ rebuild: () => {
1247
+ if (!latestResultPromise) latestResultPromise = new Promise((resolve, reject) => {
1248
+ let settlePromise;
1249
+ provideLatestResult = (err, result2) => {
1250
+ if (!settlePromise) settlePromise = () => err ? reject(err) : resolve(result2);
1251
+ };
1252
+ const triggerAnotherBuild = () => {
1253
+ const request2 = {
1254
+ command: "rebuild",
1255
+ key: buildKey
1256
+ };
1257
+ sendRequest(refs, request2, (error2, response2) => {
1258
+ if (error2) {
1259
+ reject(new Error(error2));
1260
+ } else if (settlePromise) {
1261
+ settlePromise();
1262
+ } else {
1263
+ triggerAnotherBuild();
1264
+ }
1265
+ });
1266
+ };
1267
+ triggerAnotherBuild();
1268
+ });
1269
+ return latestResultPromise;
1270
+ },
1271
+ watch: (options2 = {}) => new Promise((resolve, reject) => {
1272
+ if (!streamIn.hasFS) throw new Error(`Cannot use the "watch" API in this environment`);
1273
+ const keys = {};
1274
+ const delay = getFlag(options2, keys, "delay", mustBeInteger);
1275
+ checkForInvalidFlags(options2, keys, `in watch() call`);
1276
+ const request2 = {
1277
+ command: "watch",
1278
+ key: buildKey
1279
+ };
1280
+ if (delay) request2.delay = delay;
1281
+ sendRequest(refs, request2, (error2) => {
1282
+ if (error2) reject(new Error(error2));
1283
+ else resolve(void 0);
1284
+ });
1285
+ }),
1286
+ serve: (options2 = {}) => new Promise((resolve, reject) => {
1287
+ if (!streamIn.hasFS) throw new Error(`Cannot use the "serve" API in this environment`);
1288
+ const keys = {};
1289
+ const port = getFlag(options2, keys, "port", mustBeValidPortNumber);
1290
+ const host = getFlag(options2, keys, "host", mustBeString);
1291
+ const servedir = getFlag(options2, keys, "servedir", mustBeString);
1292
+ const keyfile = getFlag(options2, keys, "keyfile", mustBeString);
1293
+ const certfile = getFlag(options2, keys, "certfile", mustBeString);
1294
+ const fallback = getFlag(options2, keys, "fallback", mustBeString);
1295
+ const cors = getFlag(options2, keys, "cors", mustBeObject);
1296
+ const onRequest = getFlag(options2, keys, "onRequest", mustBeFunction);
1297
+ checkForInvalidFlags(options2, keys, `in serve() call`);
1298
+ const request2 = {
1299
+ command: "serve",
1300
+ key: buildKey,
1301
+ onRequest: !!onRequest
1302
+ };
1303
+ if (port !== void 0) request2.port = port;
1304
+ if (host !== void 0) request2.host = host;
1305
+ if (servedir !== void 0) request2.servedir = servedir;
1306
+ if (keyfile !== void 0) request2.keyfile = keyfile;
1307
+ if (certfile !== void 0) request2.certfile = certfile;
1308
+ if (fallback !== void 0) request2.fallback = fallback;
1309
+ if (cors) {
1310
+ const corsKeys = {};
1311
+ const origin = getFlag(cors, corsKeys, "origin", mustBeStringOrArrayOfStrings);
1312
+ checkForInvalidFlags(cors, corsKeys, `on "cors" object`);
1313
+ if (Array.isArray(origin)) request2.corsOrigin = origin;
1314
+ else if (origin !== void 0) request2.corsOrigin = [origin];
1315
+ }
1316
+ sendRequest(refs, request2, (error2, response2) => {
1317
+ if (error2) return reject(new Error(error2));
1318
+ if (onRequest) {
1319
+ requestCallbacks["serve-request"] = (id, request3) => {
1320
+ onRequest(request3.args);
1321
+ sendResponse(id, {});
1322
+ };
1323
+ }
1324
+ resolve(response2);
1325
+ });
1326
+ }),
1327
+ cancel: () => new Promise((resolve) => {
1328
+ if (didDispose) return resolve();
1329
+ const request2 = {
1330
+ command: "cancel",
1331
+ key: buildKey
1332
+ };
1333
+ sendRequest(refs, request2, () => {
1334
+ resolve();
1335
+ });
1336
+ }),
1337
+ dispose: () => new Promise((resolve) => {
1338
+ if (didDispose) return resolve();
1339
+ didDispose = true;
1340
+ const request2 = {
1341
+ command: "dispose",
1342
+ key: buildKey
1343
+ };
1344
+ sendRequest(refs, request2, () => {
1345
+ resolve();
1346
+ scheduleOnDisposeCallbacks();
1347
+ refs.unref();
1348
+ });
1349
+ })
1350
+ };
1351
+ refs.ref();
1352
+ callback(null, result);
1353
+ });
1354
+ }
1355
+ }
1356
+ var handlePlugins = async (buildKey, sendRequest, sendResponse, refs, streamIn, requestCallbacks, initialOptions, plugins, details) => {
1357
+ let onStartCallbacks = [];
1358
+ let onEndCallbacks = [];
1359
+ let onResolveCallbacks = {};
1360
+ let onLoadCallbacks = {};
1361
+ let onDisposeCallbacks = [];
1362
+ let nextCallbackID = 0;
1363
+ let i = 0;
1364
+ let requestPlugins = [];
1365
+ let isSetupDone = false;
1366
+ plugins = [...plugins];
1367
+ for (let item of plugins) {
1368
+ let keys = {};
1369
+ if (typeof item !== "object") throw new Error(`Plugin at index ${i} must be an object`);
1370
+ const name = getFlag(item, keys, "name", mustBeString);
1371
+ if (typeof name !== "string" || name === "") throw new Error(`Plugin at index ${i} is missing a name`);
1372
+ try {
1373
+ let setup = getFlag(item, keys, "setup", mustBeFunction);
1374
+ if (typeof setup !== "function") throw new Error(`Plugin is missing a setup function`);
1375
+ checkForInvalidFlags(item, keys, `on plugin ${quote(name)}`);
1376
+ let plugin = {
1377
+ name,
1378
+ onStart: false,
1379
+ onEnd: false,
1380
+ onResolve: [],
1381
+ onLoad: []
1382
+ };
1383
+ i++;
1384
+ let resolve = (path3, options = {}) => {
1385
+ if (!isSetupDone) throw new Error('Cannot call "resolve" before plugin setup has completed');
1386
+ if (typeof path3 !== "string") throw new Error(`The path to resolve must be a string`);
1387
+ let keys2 = /* @__PURE__ */ Object.create(null);
1388
+ let pluginName = getFlag(options, keys2, "pluginName", mustBeString);
1389
+ let importer = getFlag(options, keys2, "importer", mustBeString);
1390
+ let namespace = getFlag(options, keys2, "namespace", mustBeString);
1391
+ let resolveDir = getFlag(options, keys2, "resolveDir", mustBeString);
1392
+ let kind = getFlag(options, keys2, "kind", mustBeString);
1393
+ let pluginData = getFlag(options, keys2, "pluginData", canBeAnything);
1394
+ let importAttributes = getFlag(options, keys2, "with", mustBeObject);
1395
+ checkForInvalidFlags(options, keys2, "in resolve() call");
1396
+ return new Promise((resolve2, reject) => {
1397
+ const request = {
1398
+ command: "resolve",
1399
+ path: path3,
1400
+ key: buildKey,
1401
+ pluginName: name
1402
+ };
1403
+ if (pluginName != null) request.pluginName = pluginName;
1404
+ if (importer != null) request.importer = importer;
1405
+ if (namespace != null) request.namespace = namespace;
1406
+ if (resolveDir != null) request.resolveDir = resolveDir;
1407
+ if (kind != null) request.kind = kind;
1408
+ else throw new Error(`Must specify "kind" when calling "resolve"`);
1409
+ if (pluginData != null) request.pluginData = details.store(pluginData);
1410
+ if (importAttributes != null) request.with = sanitizeStringMap(importAttributes, "with");
1411
+ sendRequest(refs, request, (error, response) => {
1412
+ if (error !== null) reject(new Error(error));
1413
+ else resolve2({
1414
+ errors: replaceDetailsInMessages(response.errors, details),
1415
+ warnings: replaceDetailsInMessages(response.warnings, details),
1416
+ path: response.path,
1417
+ external: response.external,
1418
+ sideEffects: response.sideEffects,
1419
+ namespace: response.namespace,
1420
+ suffix: response.suffix,
1421
+ pluginData: details.load(response.pluginData)
1422
+ });
1423
+ });
1424
+ });
1425
+ };
1426
+ let promise = setup({
1427
+ initialOptions,
1428
+ resolve,
1429
+ onStart(callback) {
1430
+ let registeredText = `This error came from the "onStart" callback registered here:`;
1431
+ let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onStart");
1432
+ onStartCallbacks.push({ name, callback, note: registeredNote });
1433
+ plugin.onStart = true;
1434
+ },
1435
+ onEnd(callback) {
1436
+ let registeredText = `This error came from the "onEnd" callback registered here:`;
1437
+ let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onEnd");
1438
+ onEndCallbacks.push({ name, callback, note: registeredNote });
1439
+ plugin.onEnd = true;
1440
+ },
1441
+ onResolve(options, callback) {
1442
+ let registeredText = `This error came from the "onResolve" callback registered here:`;
1443
+ let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onResolve");
1444
+ let keys2 = {};
1445
+ let filter = getFlag(options, keys2, "filter", mustBeRegExp);
1446
+ let namespace = getFlag(options, keys2, "namespace", mustBeString);
1447
+ checkForInvalidFlags(options, keys2, `in onResolve() call for plugin ${quote(name)}`);
1448
+ if (filter == null) throw new Error(`onResolve() call is missing a filter`);
1449
+ let id = nextCallbackID++;
1450
+ onResolveCallbacks[id] = { name, callback, note: registeredNote };
1451
+ plugin.onResolve.push({ id, filter: jsRegExpToGoRegExp(filter), namespace: namespace || "" });
1452
+ },
1453
+ onLoad(options, callback) {
1454
+ let registeredText = `This error came from the "onLoad" callback registered here:`;
1455
+ let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onLoad");
1456
+ let keys2 = {};
1457
+ let filter = getFlag(options, keys2, "filter", mustBeRegExp);
1458
+ let namespace = getFlag(options, keys2, "namespace", mustBeString);
1459
+ checkForInvalidFlags(options, keys2, `in onLoad() call for plugin ${quote(name)}`);
1460
+ if (filter == null) throw new Error(`onLoad() call is missing a filter`);
1461
+ let id = nextCallbackID++;
1462
+ onLoadCallbacks[id] = { name, callback, note: registeredNote };
1463
+ plugin.onLoad.push({ id, filter: jsRegExpToGoRegExp(filter), namespace: namespace || "" });
1464
+ },
1465
+ onDispose(callback) {
1466
+ onDisposeCallbacks.push(callback);
1467
+ },
1468
+ esbuild: streamIn.esbuild
1469
+ });
1470
+ if (promise) await promise;
1471
+ requestPlugins.push(plugin);
1472
+ } catch (e) {
1473
+ return { ok: false, error: e, pluginName: name };
1474
+ }
1475
+ }
1476
+ requestCallbacks["on-start"] = async (id, request) => {
1477
+ details.clear();
1478
+ let response = { errors: [], warnings: [] };
1479
+ await Promise.all(onStartCallbacks.map(async ({ name, callback, note }) => {
1480
+ try {
1481
+ let result = await callback();
1482
+ if (result != null) {
1483
+ if (typeof result !== "object") throw new Error(`Expected onStart() callback in plugin ${quote(name)} to return an object`);
1484
+ let keys = {};
1485
+ let errors = getFlag(result, keys, "errors", mustBeArray);
1486
+ let warnings = getFlag(result, keys, "warnings", mustBeArray);
1487
+ checkForInvalidFlags(result, keys, `from onStart() callback in plugin ${quote(name)}`);
1488
+ if (errors != null) response.errors.push(...sanitizeMessages(errors, "errors", details, name, void 0));
1489
+ if (warnings != null) response.warnings.push(...sanitizeMessages(warnings, "warnings", details, name, void 0));
1490
+ }
1491
+ } catch (e) {
1492
+ response.errors.push(extractErrorMessageV8(e, streamIn, details, note && note(), name));
1493
+ }
1494
+ }));
1495
+ sendResponse(id, response);
1496
+ };
1497
+ requestCallbacks["on-resolve"] = async (id, request) => {
1498
+ let response = {}, name = "", callback, note;
1499
+ for (let id2 of request.ids) {
1500
+ try {
1501
+ ({ name, callback, note } = onResolveCallbacks[id2]);
1502
+ let result = await callback({
1503
+ path: request.path,
1504
+ importer: request.importer,
1505
+ namespace: request.namespace,
1506
+ resolveDir: request.resolveDir,
1507
+ kind: request.kind,
1508
+ pluginData: details.load(request.pluginData),
1509
+ with: request.with
1510
+ });
1511
+ if (result != null) {
1512
+ if (typeof result !== "object") throw new Error(`Expected onResolve() callback in plugin ${quote(name)} to return an object`);
1513
+ let keys = {};
1514
+ let pluginName = getFlag(result, keys, "pluginName", mustBeString);
1515
+ let path3 = getFlag(result, keys, "path", mustBeString);
1516
+ let namespace = getFlag(result, keys, "namespace", mustBeString);
1517
+ let suffix = getFlag(result, keys, "suffix", mustBeString);
1518
+ let external = getFlag(result, keys, "external", mustBeBoolean);
1519
+ let sideEffects = getFlag(result, keys, "sideEffects", mustBeBoolean);
1520
+ let pluginData = getFlag(result, keys, "pluginData", canBeAnything);
1521
+ let errors = getFlag(result, keys, "errors", mustBeArray);
1522
+ let warnings = getFlag(result, keys, "warnings", mustBeArray);
1523
+ let watchFiles = getFlag(result, keys, "watchFiles", mustBeArrayOfStrings);
1524
+ let watchDirs = getFlag(result, keys, "watchDirs", mustBeArrayOfStrings);
1525
+ checkForInvalidFlags(result, keys, `from onResolve() callback in plugin ${quote(name)}`);
1526
+ response.id = id2;
1527
+ if (pluginName != null) response.pluginName = pluginName;
1528
+ if (path3 != null) response.path = path3;
1529
+ if (namespace != null) response.namespace = namespace;
1530
+ if (suffix != null) response.suffix = suffix;
1531
+ if (external != null) response.external = external;
1532
+ if (sideEffects != null) response.sideEffects = sideEffects;
1533
+ if (pluginData != null) response.pluginData = details.store(pluginData);
1534
+ if (errors != null) response.errors = sanitizeMessages(errors, "errors", details, name, void 0);
1535
+ if (warnings != null) response.warnings = sanitizeMessages(warnings, "warnings", details, name, void 0);
1536
+ if (watchFiles != null) response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles");
1537
+ if (watchDirs != null) response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs");
1538
+ break;
1539
+ }
1540
+ } catch (e) {
1541
+ response = { id: id2, errors: [extractErrorMessageV8(e, streamIn, details, note && note(), name)] };
1542
+ break;
1543
+ }
1544
+ }
1545
+ sendResponse(id, response);
1546
+ };
1547
+ requestCallbacks["on-load"] = async (id, request) => {
1548
+ let response = {}, name = "", callback, note;
1549
+ for (let id2 of request.ids) {
1550
+ try {
1551
+ ({ name, callback, note } = onLoadCallbacks[id2]);
1552
+ let result = await callback({
1553
+ path: request.path,
1554
+ namespace: request.namespace,
1555
+ suffix: request.suffix,
1556
+ pluginData: details.load(request.pluginData),
1557
+ with: request.with
1558
+ });
1559
+ if (result != null) {
1560
+ if (typeof result !== "object") throw new Error(`Expected onLoad() callback in plugin ${quote(name)} to return an object`);
1561
+ let keys = {};
1562
+ let pluginName = getFlag(result, keys, "pluginName", mustBeString);
1563
+ let contents = getFlag(result, keys, "contents", mustBeStringOrUint8Array);
1564
+ let resolveDir = getFlag(result, keys, "resolveDir", mustBeString);
1565
+ let pluginData = getFlag(result, keys, "pluginData", canBeAnything);
1566
+ let loader = getFlag(result, keys, "loader", mustBeString);
1567
+ let errors = getFlag(result, keys, "errors", mustBeArray);
1568
+ let warnings = getFlag(result, keys, "warnings", mustBeArray);
1569
+ let watchFiles = getFlag(result, keys, "watchFiles", mustBeArrayOfStrings);
1570
+ let watchDirs = getFlag(result, keys, "watchDirs", mustBeArrayOfStrings);
1571
+ checkForInvalidFlags(result, keys, `from onLoad() callback in plugin ${quote(name)}`);
1572
+ response.id = id2;
1573
+ if (pluginName != null) response.pluginName = pluginName;
1574
+ if (contents instanceof Uint8Array) response.contents = contents;
1575
+ else if (contents != null) response.contents = encodeUTF8(contents);
1576
+ if (resolveDir != null) response.resolveDir = resolveDir;
1577
+ if (pluginData != null) response.pluginData = details.store(pluginData);
1578
+ if (loader != null) response.loader = loader;
1579
+ if (errors != null) response.errors = sanitizeMessages(errors, "errors", details, name, void 0);
1580
+ if (warnings != null) response.warnings = sanitizeMessages(warnings, "warnings", details, name, void 0);
1581
+ if (watchFiles != null) response.watchFiles = sanitizeStringArray(watchFiles, "watchFiles");
1582
+ if (watchDirs != null) response.watchDirs = sanitizeStringArray(watchDirs, "watchDirs");
1583
+ break;
1584
+ }
1585
+ } catch (e) {
1586
+ response = { id: id2, errors: [extractErrorMessageV8(e, streamIn, details, note && note(), name)] };
1587
+ break;
1588
+ }
1589
+ }
1590
+ sendResponse(id, response);
1591
+ };
1592
+ let runOnEndCallbacks = (result, done) => done([], []);
1593
+ if (onEndCallbacks.length > 0) {
1594
+ runOnEndCallbacks = (result, done) => {
1595
+ (async () => {
1596
+ const onEndErrors = [];
1597
+ const onEndWarnings = [];
1598
+ for (const { name, callback, note } of onEndCallbacks) {
1599
+ let newErrors;
1600
+ let newWarnings;
1601
+ try {
1602
+ const value = await callback(result);
1603
+ if (value != null) {
1604
+ if (typeof value !== "object") throw new Error(`Expected onEnd() callback in plugin ${quote(name)} to return an object`);
1605
+ let keys = {};
1606
+ let errors = getFlag(value, keys, "errors", mustBeArray);
1607
+ let warnings = getFlag(value, keys, "warnings", mustBeArray);
1608
+ checkForInvalidFlags(value, keys, `from onEnd() callback in plugin ${quote(name)}`);
1609
+ if (errors != null) newErrors = sanitizeMessages(errors, "errors", details, name, void 0);
1610
+ if (warnings != null) newWarnings = sanitizeMessages(warnings, "warnings", details, name, void 0);
1611
+ }
1612
+ } catch (e) {
1613
+ newErrors = [extractErrorMessageV8(e, streamIn, details, note && note(), name)];
1614
+ }
1615
+ if (newErrors) {
1616
+ onEndErrors.push(...newErrors);
1617
+ try {
1618
+ result.errors.push(...newErrors);
1619
+ } catch {
1620
+ }
1621
+ }
1622
+ if (newWarnings) {
1623
+ onEndWarnings.push(...newWarnings);
1624
+ try {
1625
+ result.warnings.push(...newWarnings);
1626
+ } catch {
1627
+ }
1628
+ }
1629
+ }
1630
+ done(onEndErrors, onEndWarnings);
1631
+ })();
1632
+ };
1633
+ }
1634
+ let scheduleOnDisposeCallbacks = () => {
1635
+ for (const cb of onDisposeCallbacks) {
1636
+ setTimeout(() => cb(), 0);
1637
+ }
1638
+ };
1639
+ isSetupDone = true;
1640
+ return {
1641
+ ok: true,
1642
+ requestPlugins,
1643
+ runOnEndCallbacks,
1644
+ scheduleOnDisposeCallbacks
1645
+ };
1646
+ };
1647
+ function createObjectStash() {
1648
+ const map = /* @__PURE__ */ new Map();
1649
+ let nextID = 0;
1650
+ return {
1651
+ clear() {
1652
+ map.clear();
1653
+ },
1654
+ load(id) {
1655
+ return map.get(id);
1656
+ },
1657
+ store(value) {
1658
+ if (value === void 0) return -1;
1659
+ const id = nextID++;
1660
+ map.set(id, value);
1661
+ return id;
1662
+ }
1663
+ };
1664
+ }
1665
+ function extractCallerV8(e, streamIn, ident) {
1666
+ let note;
1667
+ let tried = false;
1668
+ return () => {
1669
+ if (tried) return note;
1670
+ tried = true;
1671
+ try {
1672
+ let lines = (e.stack + "").split("\n");
1673
+ lines.splice(1, 1);
1674
+ let location = parseStackLinesV8(streamIn, lines, ident);
1675
+ if (location) {
1676
+ note = { text: e.message, location };
1677
+ return note;
1678
+ }
1679
+ } catch {
1680
+ }
1681
+ };
1682
+ }
1683
+ function extractErrorMessageV8(e, streamIn, stash, note, pluginName) {
1684
+ let text = "Internal error";
1685
+ let location = null;
1686
+ try {
1687
+ text = (e && e.message || e) + "";
1688
+ } catch {
1689
+ }
1690
+ try {
1691
+ location = parseStackLinesV8(streamIn, (e.stack + "").split("\n"), "");
1692
+ } catch {
1693
+ }
1694
+ return { id: "", pluginName, text, location, notes: note ? [note] : [], detail: stash ? stash.store(e) : -1 };
1695
+ }
1696
+ function parseStackLinesV8(streamIn, lines, ident) {
1697
+ let at = " at ";
1698
+ if (streamIn.readFileSync && !lines[0].startsWith(at) && lines[1].startsWith(at)) {
1699
+ for (let i = 1; i < lines.length; i++) {
1700
+ let line = lines[i];
1701
+ if (!line.startsWith(at)) continue;
1702
+ line = line.slice(at.length);
1703
+ while (true) {
1704
+ let match = /^(?:new |async )?\S+ \((.*)\)$/.exec(line);
1705
+ if (match) {
1706
+ line = match[1];
1707
+ continue;
1708
+ }
1709
+ match = /^eval at \S+ \((.*)\)(?:, \S+:\d+:\d+)?$/.exec(line);
1710
+ if (match) {
1711
+ line = match[1];
1712
+ continue;
1713
+ }
1714
+ match = /^(\S+):(\d+):(\d+)$/.exec(line);
1715
+ if (match) {
1716
+ let contents;
1717
+ try {
1718
+ contents = streamIn.readFileSync(match[1], "utf8");
1719
+ } catch {
1720
+ break;
1721
+ }
1722
+ let lineText = contents.split(/\r\n|\r|\n|\u2028|\u2029/)[+match[2] - 1] || "";
1723
+ let column = +match[3] - 1;
1724
+ let length = lineText.slice(column, column + ident.length) === ident ? ident.length : 0;
1725
+ return {
1726
+ file: match[1],
1727
+ namespace: "file",
1728
+ line: +match[2],
1729
+ column: encodeUTF8(lineText.slice(0, column)).length,
1730
+ length: encodeUTF8(lineText.slice(column, column + length)).length,
1731
+ lineText: lineText + "\n" + lines.slice(1).join("\n"),
1732
+ suggestion: ""
1733
+ };
1734
+ }
1735
+ break;
1736
+ }
1737
+ }
1738
+ }
1739
+ return null;
1740
+ }
1741
+ function failureErrorWithLog(text, errors, warnings) {
1742
+ let limit = 5;
1743
+ text += errors.length < 1 ? "" : ` with ${errors.length} error${errors.length < 2 ? "" : "s"}:` + errors.slice(0, limit + 1).map((e, i) => {
1744
+ if (i === limit) return "\n...";
1745
+ if (!e.location) return `
1746
+ error: ${e.text}`;
1747
+ let { file, line, column } = e.location;
1748
+ let pluginText = e.pluginName ? `[plugin: ${e.pluginName}] ` : "";
1749
+ return `
1750
+ ${file}:${line}:${column}: ERROR: ${pluginText}${e.text}`;
1751
+ }).join("");
1752
+ let error = new Error(text);
1753
+ for (const [key, value] of [["errors", errors], ["warnings", warnings]]) {
1754
+ Object.defineProperty(error, key, {
1755
+ configurable: true,
1756
+ enumerable: true,
1757
+ get: () => value,
1758
+ set: (value2) => Object.defineProperty(error, key, {
1759
+ configurable: true,
1760
+ enumerable: true,
1761
+ value: value2
1762
+ })
1763
+ });
1764
+ }
1765
+ return error;
1766
+ }
1767
+ function replaceDetailsInMessages(messages, stash) {
1768
+ for (const message of messages) {
1769
+ message.detail = stash.load(message.detail);
1770
+ }
1771
+ return messages;
1772
+ }
1773
+ function sanitizeLocation(location, where, terminalWidth) {
1774
+ if (location == null) return null;
1775
+ let keys = {};
1776
+ let file = getFlag(location, keys, "file", mustBeString);
1777
+ let namespace = getFlag(location, keys, "namespace", mustBeString);
1778
+ let line = getFlag(location, keys, "line", mustBeInteger);
1779
+ let column = getFlag(location, keys, "column", mustBeInteger);
1780
+ let length = getFlag(location, keys, "length", mustBeInteger);
1781
+ let lineText = getFlag(location, keys, "lineText", mustBeString);
1782
+ let suggestion = getFlag(location, keys, "suggestion", mustBeString);
1783
+ checkForInvalidFlags(location, keys, where);
1784
+ if (lineText) {
1785
+ const relevantASCII = lineText.slice(
1786
+ 0,
1787
+ (column && column > 0 ? column : 0) + (length && length > 0 ? length : 0) + (terminalWidth && terminalWidth > 0 ? terminalWidth : 80)
1788
+ );
1789
+ if (!/[\x7F-\uFFFF]/.test(relevantASCII) && !/\n/.test(lineText)) {
1790
+ lineText = relevantASCII;
1791
+ }
1792
+ }
1793
+ return {
1794
+ file: file || "",
1795
+ namespace: namespace || "",
1796
+ line: line || 0,
1797
+ column: column || 0,
1798
+ length: length || 0,
1799
+ lineText: lineText || "",
1800
+ suggestion: suggestion || ""
1801
+ };
1802
+ }
1803
+ function sanitizeMessages(messages, property, stash, fallbackPluginName, terminalWidth) {
1804
+ let messagesClone = [];
1805
+ let index = 0;
1806
+ for (const message of messages) {
1807
+ let keys = {};
1808
+ let id = getFlag(message, keys, "id", mustBeString);
1809
+ let pluginName = getFlag(message, keys, "pluginName", mustBeString);
1810
+ let text = getFlag(message, keys, "text", mustBeString);
1811
+ let location = getFlag(message, keys, "location", mustBeObjectOrNull);
1812
+ let notes = getFlag(message, keys, "notes", mustBeArray);
1813
+ let detail = getFlag(message, keys, "detail", canBeAnything);
1814
+ let where = `in element ${index} of "${property}"`;
1815
+ checkForInvalidFlags(message, keys, where);
1816
+ let notesClone = [];
1817
+ if (notes) {
1818
+ for (const note of notes) {
1819
+ let noteKeys = {};
1820
+ let noteText = getFlag(note, noteKeys, "text", mustBeString);
1821
+ let noteLocation = getFlag(note, noteKeys, "location", mustBeObjectOrNull);
1822
+ checkForInvalidFlags(note, noteKeys, where);
1823
+ notesClone.push({
1824
+ text: noteText || "",
1825
+ location: sanitizeLocation(noteLocation, where, terminalWidth)
1826
+ });
1827
+ }
1828
+ }
1829
+ messagesClone.push({
1830
+ id: id || "",
1831
+ pluginName: pluginName || fallbackPluginName,
1832
+ text: text || "",
1833
+ location: sanitizeLocation(location, where, terminalWidth),
1834
+ notes: notesClone,
1835
+ detail: stash ? stash.store(detail) : -1
1836
+ });
1837
+ index++;
1838
+ }
1839
+ return messagesClone;
1840
+ }
1841
+ function sanitizeStringArray(values, property) {
1842
+ const result = [];
1843
+ for (const value of values) {
1844
+ if (typeof value !== "string") throw new Error(`${quote(property)} must be an array of strings`);
1845
+ result.push(value);
1846
+ }
1847
+ return result;
1848
+ }
1849
+ function sanitizeStringMap(map, property) {
1850
+ const result = /* @__PURE__ */ Object.create(null);
1851
+ for (const key in map) {
1852
+ const value = map[key];
1853
+ if (typeof value !== "string") throw new Error(`key ${quote(key)} in object ${quote(property)} must be a string`);
1854
+ result[key] = value;
1855
+ }
1856
+ return result;
1857
+ }
1858
+ function convertOutputFiles({ path: path3, contents, hash }) {
1859
+ let text = null;
1860
+ return {
1861
+ path: path3,
1862
+ contents,
1863
+ hash,
1864
+ get text() {
1865
+ const binary = this.contents;
1866
+ if (text === null || binary !== contents) {
1867
+ contents = binary;
1868
+ text = decodeUTF8(binary);
1869
+ }
1870
+ return text;
1871
+ }
1872
+ };
1873
+ }
1874
+ function jsRegExpToGoRegExp(regexp) {
1875
+ let result = regexp.source;
1876
+ if (regexp.flags) result = `(?${regexp.flags})${result}`;
1877
+ return result;
1878
+ }
1879
+ function parseJSON(bytes) {
1880
+ let text;
1881
+ try {
1882
+ text = decodeUTF8(bytes);
1883
+ } catch {
1884
+ return JSON_parse(bytes);
1885
+ }
1886
+ return JSON.parse(text);
1887
+ }
1888
+
1889
+ // lib/npm/node-platform.ts
1890
+ var fs = require("fs");
1891
+ var os = require("os");
1892
+ var path = require("path");
1893
+ var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH;
1894
+ var isValidBinaryPath = (x) => !!x && x !== "/usr/bin/esbuild";
1895
+ var packageDarwin_arm64 = "@esbuild/darwin-arm64";
1896
+ var packageDarwin_x64 = "@esbuild/darwin-x64";
1897
+ var knownWindowsPackages = {
1898
+ "win32 arm64 LE": "@esbuild/win32-arm64",
1899
+ "win32 ia32 LE": "@esbuild/win32-ia32",
1900
+ "win32 x64 LE": "@esbuild/win32-x64"
1901
+ };
1902
+ var knownUnixlikePackages = {
1903
+ "aix ppc64 BE": "@esbuild/aix-ppc64",
1904
+ "android arm64 LE": "@esbuild/android-arm64",
1905
+ "darwin arm64 LE": "@esbuild/darwin-arm64",
1906
+ "darwin x64 LE": "@esbuild/darwin-x64",
1907
+ "freebsd arm64 LE": "@esbuild/freebsd-arm64",
1908
+ "freebsd x64 LE": "@esbuild/freebsd-x64",
1909
+ "linux arm LE": "@esbuild/linux-arm",
1910
+ "linux arm64 LE": "@esbuild/linux-arm64",
1911
+ "linux ia32 LE": "@esbuild/linux-ia32",
1912
+ "linux mips64el LE": "@esbuild/linux-mips64el",
1913
+ "linux ppc64 LE": "@esbuild/linux-ppc64",
1914
+ "linux riscv64 LE": "@esbuild/linux-riscv64",
1915
+ "linux s390x BE": "@esbuild/linux-s390x",
1916
+ "linux x64 LE": "@esbuild/linux-x64",
1917
+ "linux loong64 LE": "@esbuild/linux-loong64",
1918
+ "netbsd arm64 LE": "@esbuild/netbsd-arm64",
1919
+ "netbsd x64 LE": "@esbuild/netbsd-x64",
1920
+ "openbsd arm64 LE": "@esbuild/openbsd-arm64",
1921
+ "openbsd x64 LE": "@esbuild/openbsd-x64",
1922
+ "sunos x64 LE": "@esbuild/sunos-x64"
1923
+ };
1924
+ var knownWebAssemblyFallbackPackages = {
1925
+ "android arm LE": "@esbuild/android-arm",
1926
+ "android x64 LE": "@esbuild/android-x64",
1927
+ "openharmony arm64 LE": "@esbuild/openharmony-arm64"
1928
+ };
1929
+ function pkgAndSubpathForCurrentPlatform() {
1930
+ let pkg;
1931
+ let subpath;
1932
+ let isWASM = false;
1933
+ let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`;
1934
+ if (platformKey in knownWindowsPackages) {
1935
+ pkg = knownWindowsPackages[platformKey];
1936
+ subpath = "esbuild.exe";
1937
+ } else if (platformKey in knownUnixlikePackages) {
1938
+ pkg = knownUnixlikePackages[platformKey];
1939
+ subpath = "bin/esbuild";
1940
+ } else if (platformKey in knownWebAssemblyFallbackPackages) {
1941
+ pkg = knownWebAssemblyFallbackPackages[platformKey];
1942
+ subpath = "bin/esbuild";
1943
+ isWASM = true;
1944
+ } else {
1945
+ throw new Error(`Unsupported platform: ${platformKey}`);
1946
+ }
1947
+ return { pkg, subpath, isWASM };
1948
+ }
1949
+ function pkgForSomeOtherPlatform() {
1950
+ const libMainJS = require.resolve("esbuild");
1951
+ const nodeModulesDirectory = path.dirname(path.dirname(path.dirname(libMainJS)));
1952
+ if (path.basename(nodeModulesDirectory) === "node_modules") {
1953
+ for (const unixKey in knownUnixlikePackages) {
1954
+ try {
1955
+ const pkg = knownUnixlikePackages[unixKey];
1956
+ if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) return pkg;
1957
+ } catch {
1958
+ }
1959
+ }
1960
+ for (const windowsKey in knownWindowsPackages) {
1961
+ try {
1962
+ const pkg = knownWindowsPackages[windowsKey];
1963
+ if (fs.existsSync(path.join(nodeModulesDirectory, pkg))) return pkg;
1964
+ } catch {
1965
+ }
1966
+ }
1967
+ }
1968
+ return null;
1969
+ }
1970
+ function downloadedBinPath(pkg, subpath) {
1971
+ const esbuildLibDir = path.dirname(require.resolve("esbuild"));
1972
+ return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`);
1973
+ }
1974
+ function generateBinPath() {
1975
+ if (isValidBinaryPath(ESBUILD_BINARY_PATH)) {
1976
+ if (!fs.existsSync(ESBUILD_BINARY_PATH)) {
1977
+ console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`);
1978
+ } else {
1979
+ return { binPath: ESBUILD_BINARY_PATH, isWASM: false };
1980
+ }
1981
+ }
1982
+ const { pkg, subpath, isWASM } = pkgAndSubpathForCurrentPlatform();
1983
+ let binPath;
1984
+ try {
1985
+ binPath = require.resolve(`${pkg}/${subpath}`);
1986
+ } catch (e) {
1987
+ binPath = downloadedBinPath(pkg, subpath);
1988
+ if (!fs.existsSync(binPath)) {
1989
+ try {
1990
+ require.resolve(pkg);
1991
+ } catch {
1992
+ const otherPkg = pkgForSomeOtherPlatform();
1993
+ if (otherPkg) {
1994
+ let suggestions = `
1995
+ Specifically the "${otherPkg}" package is present but this platform
1996
+ needs the "${pkg}" package instead. People often get into this
1997
+ situation by installing esbuild on Windows or macOS and copying "node_modules"
1998
+ into a Docker image that runs Linux, or by copying "node_modules" between
1999
+ Windows and WSL environments.
2000
+
2001
+ If you are installing with npm, you can try not copying the "node_modules"
2002
+ directory when you copy the files over, and running "npm ci" or "npm install"
2003
+ on the destination platform after the copy. Or you could consider using yarn
2004
+ instead of npm which has built-in support for installing a package on multiple
2005
+ platforms simultaneously.
2006
+
2007
+ If you are installing with yarn, you can try listing both this platform and the
2008
+ other platform in your ".yarnrc.yml" file using the "supportedArchitectures"
2009
+ feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
2010
+ Keep in mind that this means multiple copies of esbuild will be present.
2011
+ `;
2012
+ if (pkg === packageDarwin_x64 && otherPkg === packageDarwin_arm64 || pkg === packageDarwin_arm64 && otherPkg === packageDarwin_x64) {
2013
+ suggestions = `
2014
+ Specifically the "${otherPkg}" package is present but this platform
2015
+ needs the "${pkg}" package instead. People often get into this
2016
+ situation by installing esbuild with npm running inside of Rosetta 2 and then
2017
+ trying to use it with node running outside of Rosetta 2, or vice versa (Rosetta
2018
+ 2 is Apple's on-the-fly x86_64-to-arm64 translation service).
2019
+
2020
+ If you are installing with npm, you can try ensuring that both npm and node are
2021
+ not running under Rosetta 2 and then reinstalling esbuild. This likely involves
2022
+ changing how you installed npm and/or node. For example, installing node with
2023
+ the universal installer here should work: https://nodejs.org/en/download/. Or
2024
+ you could consider using yarn instead of npm which has built-in support for
2025
+ installing a package on multiple platforms simultaneously.
2026
+
2027
+ If you are installing with yarn, you can try listing both "arm64" and "x64"
2028
+ in your ".yarnrc.yml" file using the "supportedArchitectures" feature:
2029
+ https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
2030
+ Keep in mind that this means multiple copies of esbuild will be present.
2031
+ `;
2032
+ }
2033
+ throw new Error(`
2034
+ You installed esbuild for another platform than the one you're currently using.
2035
+ This won't work because esbuild is written with native code and needs to
2036
+ install a platform-specific binary executable.
2037
+ ${suggestions}
2038
+ Another alternative is to use the "esbuild-wasm" package instead, which works
2039
+ the same way on all platforms. But it comes with a heavy performance cost and
2040
+ can sometimes be 10x slower than the "esbuild" package, so you may also not
2041
+ want to do that.
2042
+ `);
2043
+ }
2044
+ throw new Error(`The package "${pkg}" could not be found, and is needed by esbuild.
2045
+
2046
+ If you are installing esbuild with npm, make sure that you don't specify the
2047
+ "--no-optional" or "--omit=optional" flags. The "optionalDependencies" feature
2048
+ of "package.json" is used by esbuild to install the correct binary executable
2049
+ for your current platform.`);
2050
+ }
2051
+ throw e;
2052
+ }
2053
+ }
2054
+ if (/\.zip\//.test(binPath)) {
2055
+ let pnpapi;
2056
+ try {
2057
+ pnpapi = require("pnpapi");
2058
+ } catch (e) {
2059
+ }
2060
+ if (pnpapi) {
2061
+ const root = pnpapi.getPackageInformation(pnpapi.topLevel).packageLocation;
2062
+ const binTargetPath = path.join(
2063
+ root,
2064
+ "node_modules",
2065
+ ".cache",
2066
+ "esbuild",
2067
+ `pnpapi-${pkg.replace("/", "-")}-${"0.28.2"}-${path.basename(subpath)}`
2068
+ );
2069
+ if (!fs.existsSync(binTargetPath)) {
2070
+ fs.mkdirSync(path.dirname(binTargetPath), { recursive: true });
2071
+ fs.copyFileSync(binPath, binTargetPath);
2072
+ fs.chmodSync(binTargetPath, 493);
2073
+ }
2074
+ return { binPath: binTargetPath, isWASM };
2075
+ }
2076
+ }
2077
+ return { binPath, isWASM };
2078
+ }
2079
+
2080
+ // lib/npm/node.ts
2081
+ var child_process = require("child_process");
2082
+ var crypto = require("crypto");
2083
+ var path2 = require("path");
2084
+ var fs2 = require("fs");
2085
+ var os2 = require("os");
2086
+ var tty = require("tty");
2087
+ var worker_threads;
2088
+ if (process.env.ESBUILD_WORKER_THREADS !== "0") {
2089
+ try {
2090
+ worker_threads = require("worker_threads");
2091
+ } catch {
2092
+ }
2093
+ let [major, minor] = process.versions.node.split(".");
2094
+ if (
2095
+ // <v12.17.0 does not work
2096
+ +major < 12 || +major === 12 && +minor < 17 || +major === 13 && +minor < 13
2097
+ ) {
2098
+ worker_threads = void 0;
2099
+ }
2100
+ }
2101
+ var _a;
2102
+ var isInternalWorkerThread = ((_a = worker_threads == null ? void 0 : worker_threads.workerData) == null ? void 0 : _a.esbuildVersion) === "0.28.2";
2103
+ var esbuildCommandAndArgs = () => {
2104
+ if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) {
2105
+ throw new Error(
2106
+ `The esbuild JavaScript API cannot be bundled. Please mark the "esbuild" package as external so it's not included in the bundle.
2107
+
2108
+ More information: The file containing the code for esbuild's JavaScript API (${__filename}) does not appear to be inside the esbuild package on the file system, which usually means that the esbuild package was bundled into another file. This is problematic because the API needs to run a binary executable inside the esbuild package which is located using a relative path from the API code to the executable. If the esbuild package is bundled, the relative path will be incorrect and the executable won't be found.`
2109
+ );
2110
+ }
2111
+ if (false) {
2112
+ return ["node", [path2.join(__dirname, "..", "bin", "esbuild")]];
2113
+ } else {
2114
+ const { binPath, isWASM } = generateBinPath();
2115
+ if (isWASM) {
2116
+ return ["node", [binPath]];
2117
+ } else {
2118
+ return [binPath, []];
2119
+ }
2120
+ }
2121
+ };
2122
+ var isTTY = () => tty.isatty(2);
2123
+ var fsSync = {
2124
+ readFile(tempFile, callback) {
2125
+ try {
2126
+ let contents = fs2.readFileSync(tempFile, "utf8");
2127
+ try {
2128
+ fs2.unlinkSync(tempFile);
2129
+ } catch {
2130
+ }
2131
+ callback(null, contents);
2132
+ } catch (err) {
2133
+ callback(err, null);
2134
+ }
2135
+ },
2136
+ writeFile(contents, callback) {
2137
+ try {
2138
+ let tempFile = randomFileName();
2139
+ fs2.writeFileSync(tempFile, contents);
2140
+ callback(tempFile);
2141
+ } catch {
2142
+ callback(null);
2143
+ }
2144
+ }
2145
+ };
2146
+ var fsAsync = {
2147
+ readFile(tempFile, callback) {
2148
+ try {
2149
+ fs2.readFile(tempFile, "utf8", (err, contents) => {
2150
+ try {
2151
+ fs2.unlink(tempFile, () => callback(err, contents));
2152
+ } catch {
2153
+ callback(err, contents);
2154
+ }
2155
+ });
2156
+ } catch (err) {
2157
+ callback(err, null);
2158
+ }
2159
+ },
2160
+ writeFile(contents, callback) {
2161
+ try {
2162
+ let tempFile = randomFileName();
2163
+ fs2.writeFile(tempFile, contents, (err) => err !== null ? callback(null) : callback(tempFile));
2164
+ } catch {
2165
+ callback(null);
2166
+ }
2167
+ }
2168
+ };
2169
+ var version = "0.28.2";
2170
+ var build = (options) => ensureServiceIsRunning().build(options);
2171
+ var context = (buildOptions) => ensureServiceIsRunning().context(buildOptions);
2172
+ var transform = (input, options) => ensureServiceIsRunning().transform(input, options);
2173
+ var formatMessages = (messages, options) => ensureServiceIsRunning().formatMessages(messages, options);
2174
+ var analyzeMetafile = (messages, options) => ensureServiceIsRunning().analyzeMetafile(messages, options);
2175
+ var buildSync = (options) => {
2176
+ if (worker_threads && !isInternalWorkerThread) {
2177
+ if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads);
2178
+ return workerThreadService.buildSync(options);
2179
+ }
2180
+ let result;
2181
+ runServiceSync((service) => service.buildOrContext({
2182
+ callName: "buildSync",
2183
+ refs: null,
2184
+ options,
2185
+ isTTY: isTTY(),
2186
+ defaultWD,
2187
+ callback: (err, res) => {
2188
+ if (err) throw err;
2189
+ result = res;
2190
+ }
2191
+ }));
2192
+ return result;
2193
+ };
2194
+ var transformSync = (input, options) => {
2195
+ if (worker_threads && !isInternalWorkerThread) {
2196
+ if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads);
2197
+ return workerThreadService.transformSync(input, options);
2198
+ }
2199
+ let result;
2200
+ runServiceSync((service) => service.transform({
2201
+ callName: "transformSync",
2202
+ refs: null,
2203
+ input,
2204
+ options: options || {},
2205
+ isTTY: isTTY(),
2206
+ fs: fsSync,
2207
+ callback: (err, res) => {
2208
+ if (err) throw err;
2209
+ result = res;
2210
+ }
2211
+ }));
2212
+ return result;
2213
+ };
2214
+ var formatMessagesSync = (messages, options) => {
2215
+ if (worker_threads && !isInternalWorkerThread) {
2216
+ if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads);
2217
+ return workerThreadService.formatMessagesSync(messages, options);
2218
+ }
2219
+ let result;
2220
+ runServiceSync((service) => service.formatMessages({
2221
+ callName: "formatMessagesSync",
2222
+ refs: null,
2223
+ messages,
2224
+ options,
2225
+ callback: (err, res) => {
2226
+ if (err) throw err;
2227
+ result = res;
2228
+ }
2229
+ }));
2230
+ return result;
2231
+ };
2232
+ var analyzeMetafileSync = (metafile, options) => {
2233
+ if (worker_threads && !isInternalWorkerThread) {
2234
+ if (!workerThreadService) workerThreadService = startWorkerThreadService(worker_threads);
2235
+ return workerThreadService.analyzeMetafileSync(metafile, options);
2236
+ }
2237
+ let result;
2238
+ runServiceSync((service) => service.analyzeMetafile({
2239
+ callName: "analyzeMetafileSync",
2240
+ refs: null,
2241
+ metafile: typeof metafile === "string" ? metafile : JSON.stringify(metafile),
2242
+ options,
2243
+ callback: (err, res) => {
2244
+ if (err) throw err;
2245
+ result = res;
2246
+ }
2247
+ }));
2248
+ return result;
2249
+ };
2250
+ var stop = () => {
2251
+ if (stopService) stopService();
2252
+ if (workerThreadService) workerThreadService.stop();
2253
+ return Promise.resolve();
2254
+ };
2255
+ var initializeWasCalled = false;
2256
+ var initialize = (options) => {
2257
+ options = validateInitializeOptions(options || {});
2258
+ if (options.wasmURL) throw new Error(`The "wasmURL" option only works in the browser`);
2259
+ if (options.wasmModule) throw new Error(`The "wasmModule" option only works in the browser`);
2260
+ if (options.worker) throw new Error(`The "worker" option only works in the browser`);
2261
+ if (initializeWasCalled) throw new Error('Cannot call "initialize" more than once');
2262
+ ensureServiceIsRunning();
2263
+ initializeWasCalled = true;
2264
+ return Promise.resolve();
2265
+ };
2266
+ var defaultWD = process.cwd();
2267
+ var longLivedService;
2268
+ var stopService;
2269
+ var ensureServiceIsRunning = () => {
2270
+ if (longLivedService) return longLivedService;
2271
+ let [command, args] = esbuildCommandAndArgs();
2272
+ let child = child_process.spawn(command, args.concat(`--service=${"0.28.2"}`, "--ping"), {
2273
+ windowsHide: true,
2274
+ stdio: ["pipe", "pipe", "inherit"],
2275
+ cwd: defaultWD
2276
+ });
2277
+ let { readFromStdout, afterClose, service } = createChannel({
2278
+ writeToStdin(bytes) {
2279
+ child.stdin.write(bytes, (err) => {
2280
+ if (err) afterClose(err);
2281
+ });
2282
+ },
2283
+ readFileSync: fs2.readFileSync,
2284
+ isSync: false,
2285
+ hasFS: true,
2286
+ esbuild: node_exports
2287
+ });
2288
+ child.stdin.on("error", afterClose);
2289
+ child.on("error", afterClose);
2290
+ const stdin = child.stdin;
2291
+ const stdout = child.stdout;
2292
+ stdout.on("data", readFromStdout);
2293
+ stdout.on("end", afterClose);
2294
+ stopService = () => {
2295
+ stdin.destroy();
2296
+ stdout.destroy();
2297
+ child.kill();
2298
+ initializeWasCalled = false;
2299
+ longLivedService = void 0;
2300
+ stopService = void 0;
2301
+ };
2302
+ let refCount = 0;
2303
+ child.unref();
2304
+ if (stdin.unref) {
2305
+ stdin.unref();
2306
+ }
2307
+ if (stdout.unref) {
2308
+ stdout.unref();
2309
+ }
2310
+ const refs = {
2311
+ ref() {
2312
+ if (++refCount === 1) child.ref();
2313
+ },
2314
+ unref() {
2315
+ if (--refCount === 0) child.unref();
2316
+ }
2317
+ };
2318
+ longLivedService = {
2319
+ build: (options) => new Promise((resolve, reject) => {
2320
+ service.buildOrContext({
2321
+ callName: "build",
2322
+ refs,
2323
+ options,
2324
+ isTTY: isTTY(),
2325
+ defaultWD,
2326
+ callback: (err, res) => err ? reject(err) : resolve(res)
2327
+ });
2328
+ }),
2329
+ context: (options) => new Promise((resolve, reject) => service.buildOrContext({
2330
+ callName: "context",
2331
+ refs,
2332
+ options,
2333
+ isTTY: isTTY(),
2334
+ defaultWD,
2335
+ callback: (err, res) => err ? reject(err) : resolve(res)
2336
+ })),
2337
+ transform: (input, options) => new Promise((resolve, reject) => service.transform({
2338
+ callName: "transform",
2339
+ refs,
2340
+ input,
2341
+ options: options || {},
2342
+ isTTY: isTTY(),
2343
+ fs: fsAsync,
2344
+ callback: (err, res) => err ? reject(err) : resolve(res)
2345
+ })),
2346
+ formatMessages: (messages, options) => new Promise((resolve, reject) => service.formatMessages({
2347
+ callName: "formatMessages",
2348
+ refs,
2349
+ messages,
2350
+ options,
2351
+ callback: (err, res) => err ? reject(err) : resolve(res)
2352
+ })),
2353
+ analyzeMetafile: (metafile, options) => new Promise((resolve, reject) => service.analyzeMetafile({
2354
+ callName: "analyzeMetafile",
2355
+ refs,
2356
+ metafile: typeof metafile === "string" ? metafile : JSON.stringify(metafile),
2357
+ options,
2358
+ callback: (err, res) => err ? reject(err) : resolve(res)
2359
+ }))
2360
+ };
2361
+ return longLivedService;
2362
+ };
2363
+ var runServiceSync = (callback) => {
2364
+ let [command, args] = esbuildCommandAndArgs();
2365
+ let stdin = new Uint8Array();
2366
+ let { readFromStdout, afterClose, service } = createChannel({
2367
+ writeToStdin(bytes) {
2368
+ if (stdin.length !== 0) throw new Error("Must run at most one command");
2369
+ stdin = bytes;
2370
+ },
2371
+ isSync: true,
2372
+ hasFS: true,
2373
+ esbuild: node_exports
2374
+ });
2375
+ callback(service);
2376
+ let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.28.2"}`), {
2377
+ cwd: defaultWD,
2378
+ windowsHide: true,
2379
+ input: stdin,
2380
+ // We don't know how large the output could be. If it's too large, the
2381
+ // command will fail with ENOBUFS. Reserve 16mb for now since that feels
2382
+ // like it should be enough. Also allow overriding this with an environment
2383
+ // variable.
2384
+ maxBuffer: +process.env.ESBUILD_MAX_BUFFER || 16 * 1024 * 1024
2385
+ });
2386
+ readFromStdout(stdout);
2387
+ afterClose(null);
2388
+ };
2389
+ var randomFileName = () => {
2390
+ return path2.join(os2.tmpdir(), `esbuild-${crypto.randomBytes(32).toString("hex")}`);
2391
+ };
2392
+ var workerThreadService = null;
2393
+ var startWorkerThreadService = (worker_threads2) => {
2394
+ let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel();
2395
+ let worker = new worker_threads2.Worker(__filename, {
2396
+ workerData: { workerPort, defaultWD, esbuildVersion: "0.28.2" },
2397
+ transferList: [workerPort],
2398
+ // From node's documentation: https://nodejs.org/api/worker_threads.html
2399
+ //
2400
+ // Take care when launching worker threads from preload scripts (scripts loaded
2401
+ // and run using the `-r` command line flag). Unless the `execArgv` option is
2402
+ // explicitly set, new Worker threads automatically inherit the command line flags
2403
+ // from the running process and will preload the same preload scripts as the main
2404
+ // thread. If the preload script unconditionally launches a worker thread, every
2405
+ // thread spawned will spawn another until the application crashes.
2406
+ //
2407
+ execArgv: []
2408
+ });
2409
+ let nextID = 0;
2410
+ let fakeBuildError = (text) => {
2411
+ let error = new Error(`Build failed with 1 error:
2412
+ error: ${text}`);
2413
+ let errors = [{ id: "", pluginName: "", text, location: null, notes: [], detail: void 0 }];
2414
+ error.errors = errors;
2415
+ error.warnings = [];
2416
+ return error;
2417
+ };
2418
+ let validateBuildSyncOptions = (options) => {
2419
+ if (!options) return;
2420
+ let plugins = options.plugins;
2421
+ if (plugins && plugins.length > 0) throw fakeBuildError(`Cannot use plugins in synchronous API calls`);
2422
+ };
2423
+ let applyProperties = (object, properties) => {
2424
+ for (let key in properties) {
2425
+ object[key] = properties[key];
2426
+ }
2427
+ };
2428
+ let runCallSync = (command, args) => {
2429
+ let id = nextID++;
2430
+ let sharedBuffer = new SharedArrayBuffer(8);
2431
+ let sharedBufferView = new Int32Array(sharedBuffer);
2432
+ let msg = { sharedBuffer, id, command, args };
2433
+ worker.postMessage(msg);
2434
+ let status = Atomics.wait(sharedBufferView, 0, 0);
2435
+ if (status !== "ok" && status !== "not-equal") throw new Error("Internal error: Atomics.wait() failed: " + status);
2436
+ let { message: { id: id2, resolve, reject, properties } } = worker_threads2.receiveMessageOnPort(mainPort);
2437
+ if (id !== id2) throw new Error(`Internal error: Expected id ${id} but got id ${id2}`);
2438
+ if (reject) {
2439
+ applyProperties(reject, properties);
2440
+ throw reject;
2441
+ }
2442
+ return resolve;
2443
+ };
2444
+ worker.unref();
2445
+ return {
2446
+ buildSync(options) {
2447
+ validateBuildSyncOptions(options);
2448
+ return runCallSync("build", [options]);
2449
+ },
2450
+ transformSync(input, options) {
2451
+ return runCallSync("transform", [input, options]);
2452
+ },
2453
+ formatMessagesSync(messages, options) {
2454
+ return runCallSync("formatMessages", [messages, options]);
2455
+ },
2456
+ analyzeMetafileSync(metafile, options) {
2457
+ return runCallSync("analyzeMetafile", [metafile, options]);
2458
+ },
2459
+ stop() {
2460
+ worker.terminate();
2461
+ workerThreadService = null;
2462
+ }
2463
+ };
2464
+ };
2465
+ var startSyncServiceWorker = () => {
2466
+ let workerPort = worker_threads.workerData.workerPort;
2467
+ let parentPort = worker_threads.parentPort;
2468
+ let extractProperties = (object) => {
2469
+ let properties = {};
2470
+ if (object && typeof object === "object") {
2471
+ for (let key in object) {
2472
+ properties[key] = object[key];
2473
+ }
2474
+ }
2475
+ return properties;
2476
+ };
2477
+ try {
2478
+ let service = ensureServiceIsRunning();
2479
+ defaultWD = worker_threads.workerData.defaultWD;
2480
+ parentPort.on("message", (msg) => {
2481
+ (async () => {
2482
+ let { sharedBuffer, id, command, args } = msg;
2483
+ let sharedBufferView = new Int32Array(sharedBuffer);
2484
+ try {
2485
+ switch (command) {
2486
+ case "build":
2487
+ workerPort.postMessage({ id, resolve: await service.build(args[0]) });
2488
+ break;
2489
+ case "transform":
2490
+ workerPort.postMessage({ id, resolve: await service.transform(args[0], args[1]) });
2491
+ break;
2492
+ case "formatMessages":
2493
+ workerPort.postMessage({ id, resolve: await service.formatMessages(args[0], args[1]) });
2494
+ break;
2495
+ case "analyzeMetafile":
2496
+ workerPort.postMessage({ id, resolve: await service.analyzeMetafile(args[0], args[1]) });
2497
+ break;
2498
+ default:
2499
+ throw new Error(`Invalid command: ${command}`);
2500
+ }
2501
+ } catch (reject) {
2502
+ workerPort.postMessage({ id, reject, properties: extractProperties(reject) });
2503
+ }
2504
+ Atomics.add(sharedBufferView, 0, 1);
2505
+ Atomics.notify(sharedBufferView, 0, Infinity);
2506
+ })();
2507
+ });
2508
+ } catch (reject) {
2509
+ parentPort.on("message", (msg) => {
2510
+ let { sharedBuffer, id } = msg;
2511
+ let sharedBufferView = new Int32Array(sharedBuffer);
2512
+ workerPort.postMessage({ id, reject, properties: extractProperties(reject) });
2513
+ Atomics.add(sharedBufferView, 0, 1);
2514
+ Atomics.notify(sharedBufferView, 0, Infinity);
2515
+ });
2516
+ }
2517
+ };
2518
+ if (isInternalWorkerThread) {
2519
+ startSyncServiceWorker();
2520
+ }
2521
+ var node_default = node_exports;
2522
+ // Annotate the CommonJS export names for ESM import in node:
2523
+ 0 && (module.exports = {
2524
+ analyzeMetafile,
2525
+ analyzeMetafileSync,
2526
+ build,
2527
+ buildSync,
2528
+ context,
2529
+ formatMessages,
2530
+ formatMessagesSync,
2531
+ initialize,
2532
+ stop,
2533
+ transform,
2534
+ transformSync,
2535
+ version
2536
+ });