repoburg 1.3.87 → 1.3.88

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 (544) hide show
  1. package/backend/.env +20 -0
  2. package/backend/.repoburg/hooks/README.md +53 -0
  3. package/backend/.repoburg/hooks/eslint-hook.ts +46 -0
  4. package/backend/.repoburg/hooks/example-hook.ts +62 -0
  5. package/backend/dist/src/ai-actions/ai-actions.controller.js +67 -0
  6. package/backend/dist/src/ai-actions/ai-actions.controller.js.map +1 -1
  7. package/backend/dist/src/application-state/application-state.controller.js +123 -0
  8. package/backend/dist/src/application-state/application-state.controller.js.map +1 -1
  9. package/backend/dist/src/application-state/dto/set-alibaba-config.dto.js +2 -0
  10. package/backend/dist/src/application-state/dto/set-alibaba-config.dto.js.map +1 -1
  11. package/backend/dist/src/application-state/dto/set-auto-context-fetch-enabled.dto.js +4 -0
  12. package/backend/dist/src/application-state/dto/set-auto-context-fetch-enabled.dto.js.map +1 -1
  13. package/backend/dist/src/application-state/dto/set-auto-send-to-ai-studio-enabled.dto.js +2 -0
  14. package/backend/dist/src/application-state/dto/set-auto-send-to-ai-studio-enabled.dto.js.map +1 -1
  15. package/backend/dist/src/application-state/dto/set-context-token-limit.dto.js +6 -0
  16. package/backend/dist/src/application-state/dto/set-context-token-limit.dto.js.map +1 -1
  17. package/backend/dist/src/application-state/dto/set-execution-strategy.dto.js +6 -0
  18. package/backend/dist/src/application-state/dto/set-execution-strategy.dto.js.map +1 -1
  19. package/backend/dist/src/application-state/dto/set-followup-token-limit.dto.js +5 -0
  20. package/backend/dist/src/application-state/dto/set-followup-token-limit.dto.js.map +1 -1
  21. package/backend/dist/src/application-state/dto/set-history-compression-enabled.dto.js +4 -0
  22. package/backend/dist/src/application-state/dto/set-history-compression-enabled.dto.js.map +1 -1
  23. package/backend/dist/src/application-state/dto/set-llm-retry-enabled.dto.js +4 -0
  24. package/backend/dist/src/application-state/dto/set-llm-retry-enabled.dto.js.map +1 -1
  25. package/backend/dist/src/application-state/dto/set-llm-retry-max-attempts.dto.js +6 -0
  26. package/backend/dist/src/application-state/dto/set-llm-retry-max-attempts.dto.js.map +1 -1
  27. package/backend/dist/src/application-state/dto/set-manual-llm-enabled.dto.js +4 -0
  28. package/backend/dist/src/application-state/dto/set-manual-llm-enabled.dto.js.map +1 -1
  29. package/backend/dist/src/application-state/dto/set-openrouter-config.dto.js +2 -0
  30. package/backend/dist/src/application-state/dto/set-openrouter-config.dto.js.map +1 -1
  31. package/backend/dist/src/application-state/dto/set-streaming-enabled.dto.js +2 -0
  32. package/backend/dist/src/application-state/dto/set-streaming-enabled.dto.js.map +1 -1
  33. package/backend/dist/src/application-state/dto/set-syntax-validation-enabled.dto.js +4 -0
  34. package/backend/dist/src/application-state/dto/set-syntax-validation-enabled.dto.js.map +1 -1
  35. package/backend/dist/src/application-state/dto/set-theme.dto.js +6 -0
  36. package/backend/dist/src/application-state/dto/set-theme.dto.js.map +1 -1
  37. package/backend/dist/src/application-state/dto/set-tools-enabled.dto.js +4 -0
  38. package/backend/dist/src/application-state/dto/set-tools-enabled.dto.js.map +1 -1
  39. package/backend/dist/src/application-state/dto/set-websocket-enabled.dto.js +2 -0
  40. package/backend/dist/src/application-state/dto/set-websocket-enabled.dto.js.map +1 -1
  41. package/backend/dist/src/application-state/dto/set-yolo-mode-message.dto.js +5 -0
  42. package/backend/dist/src/application-state/dto/set-yolo-mode-message.dto.js.map +1 -1
  43. package/backend/dist/src/application-state/dto/set-yolo-mode.dto.js +4 -0
  44. package/backend/dist/src/application-state/dto/set-yolo-mode.dto.js.map +1 -1
  45. package/backend/dist/src/application-state/dto/set-zai-config.dto.js +2 -0
  46. package/backend/dist/src/application-state/dto/set-zai-config.dto.js.map +1 -1
  47. package/backend/dist/src/context-snippets/context-snippets.controller.js +38 -0
  48. package/backend/dist/src/context-snippets/context-snippets.controller.js.map +1 -1
  49. package/backend/dist/src/context-templates/context-templates.controller.js +104 -0
  50. package/backend/dist/src/context-templates/context-templates.controller.js.map +1 -1
  51. package/backend/dist/src/context-templates/dto/context-template.dto.d.ts +1 -1
  52. package/backend/dist/src/context-templates/dto/context-template.dto.js +44 -1
  53. package/backend/dist/src/context-templates/dto/context-template.dto.js.map +1 -1
  54. package/backend/dist/src/core-entities/ai-action.entity.js +73 -0
  55. package/backend/dist/src/core-entities/ai-action.entity.js.map +1 -1
  56. package/backend/dist/src/core-entities/base.entity.js +18 -0
  57. package/backend/dist/src/core-entities/base.entity.js.map +1 -1
  58. package/backend/dist/src/core-entities/context-snippet.entity.js +12 -0
  59. package/backend/dist/src/core-entities/context-snippet.entity.js.map +1 -1
  60. package/backend/dist/src/core-entities/context-template.entity.d.ts +2 -4
  61. package/backend/dist/src/core-entities/context-template.entity.js +50 -7
  62. package/backend/dist/src/core-entities/context-template.entity.js.map +1 -1
  63. package/backend/dist/src/core-entities/custom-snippet.entity.js +16 -0
  64. package/backend/dist/src/core-entities/custom-snippet.entity.js.map +1 -1
  65. package/backend/dist/src/core-entities/custom-variable.entity.js +24 -0
  66. package/backend/dist/src/core-entities/custom-variable.entity.js.map +1 -1
  67. package/backend/dist/src/core-entities/enums.d.ts +64 -0
  68. package/backend/dist/src/core-entities/enums.js +77 -0
  69. package/backend/dist/src/core-entities/enums.js.map +1 -0
  70. package/backend/dist/src/core-entities/execution-log.entity.js +15 -0
  71. package/backend/dist/src/core-entities/execution-log.entity.js.map +1 -1
  72. package/backend/dist/src/core-entities/index.d.ts +1 -2
  73. package/backend/dist/src/core-entities/index.js +1 -2
  74. package/backend/dist/src/core-entities/index.js.map +1 -1
  75. package/backend/dist/src/core-entities/llm-call-log.entity.js +43 -0
  76. package/backend/dist/src/core-entities/llm-call-log.entity.js.map +1 -1
  77. package/backend/dist/src/core-entities/mcp-config.entity.js +27 -0
  78. package/backend/dist/src/core-entities/mcp-config.entity.js.map +1 -1
  79. package/backend/dist/src/core-entities/mcp-tool.entity.js +26 -0
  80. package/backend/dist/src/core-entities/mcp-tool.entity.js.map +1 -1
  81. package/backend/dist/src/core-entities/project.entity.js +13 -0
  82. package/backend/dist/src/core-entities/project.entity.js.map +1 -1
  83. package/backend/dist/src/core-entities/session-input.entity.js +94 -0
  84. package/backend/dist/src/core-entities/session-input.entity.js.map +1 -1
  85. package/backend/dist/src/core-entities/session.entity.d.ts +1 -1
  86. package/backend/dist/src/core-entities/session.entity.js +96 -1
  87. package/backend/dist/src/core-entities/session.entity.js.map +1 -1
  88. package/backend/dist/src/core-entities/system-prompt.entity.js +29 -0
  89. package/backend/dist/src/core-entities/system-prompt.entity.js.map +1 -1
  90. package/backend/dist/src/core-entities/tool-hook.entity.js +21 -0
  91. package/backend/dist/src/core-entities/tool-hook.entity.js.map +1 -1
  92. package/backend/dist/src/custom-snippets/custom-snippets.controller.js +48 -0
  93. package/backend/dist/src/custom-snippets/custom-snippets.controller.js.map +1 -1
  94. package/backend/dist/src/custom-variables/custom-variables.controller.js +46 -0
  95. package/backend/dist/src/custom-variables/custom-variables.controller.js.map +1 -1
  96. package/backend/dist/src/global-config/global-config.controller.js +12 -0
  97. package/backend/dist/src/global-config/global-config.controller.js.map +1 -1
  98. package/backend/dist/src/interactive-chat/streaming.controller.js +38 -0
  99. package/backend/dist/src/interactive-chat/streaming.controller.js.map +1 -1
  100. package/backend/dist/src/llm-call-logs/llm-call-logs.controller.js +96 -0
  101. package/backend/dist/src/llm-call-logs/llm-call-logs.controller.js.map +1 -1
  102. package/backend/dist/src/llm-provider/llm-provider.controller.js +18 -0
  103. package/backend/dist/src/llm-provider/llm-provider.controller.js.map +1 -1
  104. package/backend/dist/src/llm-provider/zai-llm.provider.js +0 -1
  105. package/backend/dist/src/llm-provider/zai-llm.provider.js.map +1 -1
  106. package/backend/dist/src/llm-responses/dto/submit-llm-response.dto.js +45 -0
  107. package/backend/dist/src/llm-responses/dto/submit-llm-response.dto.js.map +1 -1
  108. package/backend/dist/src/llm-responses/dto/sync-conversation.dto.js +24 -0
  109. package/backend/dist/src/llm-responses/dto/sync-conversation.dto.js.map +1 -1
  110. package/backend/dist/src/llm-responses/llm-responses.controller.js +32 -0
  111. package/backend/dist/src/llm-responses/llm-responses.controller.js.map +1 -1
  112. package/backend/dist/src/main.js +9 -0
  113. package/backend/dist/src/main.js.map +1 -1
  114. package/backend/dist/src/mcp/dto/batch-update-mcp-tools.dto.js +8 -0
  115. package/backend/dist/src/mcp/dto/batch-update-mcp-tools.dto.js.map +1 -1
  116. package/backend/dist/src/mcp/dto/create-mcp-config.dto.js +5 -0
  117. package/backend/dist/src/mcp/dto/create-mcp-config.dto.js.map +1 -1
  118. package/backend/dist/src/mcp/dto/update-mcp-config.dto.js +2 -0
  119. package/backend/dist/src/mcp/dto/update-mcp-config.dto.js.map +1 -1
  120. package/backend/dist/src/mcp/mcp.controller.js +21 -0
  121. package/backend/dist/src/mcp/mcp.controller.js.map +1 -1
  122. package/backend/dist/src/projects/dto/project.dto.js +14 -0
  123. package/backend/dist/src/projects/dto/project.dto.js.map +1 -1
  124. package/backend/dist/src/projects/projects.controller.js +31 -0
  125. package/backend/dist/src/projects/projects.controller.js.map +1 -1
  126. package/backend/dist/src/session-inputs/dto/session-input.dto.d.ts +12 -1
  127. package/backend/dist/src/session-inputs/dto/session-input.dto.js +103 -1
  128. package/backend/dist/src/session-inputs/dto/session-input.dto.js.map +1 -1
  129. package/backend/dist/src/session-inputs/session-input.subscriber.js.map +1 -1
  130. package/backend/dist/src/session-inputs/session-inputs.controller.d.ts +2 -1
  131. package/backend/dist/src/session-inputs/session-inputs.controller.js +84 -0
  132. package/backend/dist/src/session-inputs/session-inputs.controller.js.map +1 -1
  133. package/backend/dist/src/session-inputs/session-inputs.module.js +1 -0
  134. package/backend/dist/src/session-inputs/session-inputs.module.js.map +1 -1
  135. package/backend/dist/src/session-inputs/session-inputs.service.d.ts +7 -3
  136. package/backend/dist/src/session-inputs/session-inputs.service.js +51 -4
  137. package/backend/dist/src/session-inputs/session-inputs.service.js.map +1 -1
  138. package/backend/dist/src/sessions/dto/session.dto.js +91 -0
  139. package/backend/dist/src/sessions/dto/session.dto.js.map +1 -1
  140. package/backend/dist/src/sessions/sessions.controller.js +112 -0
  141. package/backend/dist/src/sessions/sessions.controller.js.map +1 -1
  142. package/backend/dist/src/sub-agents/dto/create-sub-agent.dto.js +26 -0
  143. package/backend/dist/src/sub-agents/dto/create-sub-agent.dto.js.map +1 -1
  144. package/backend/dist/src/sub-agents/dto/update-sub-agent.dto.js +22 -0
  145. package/backend/dist/src/sub-agents/dto/update-sub-agent.dto.js.map +1 -1
  146. package/backend/dist/src/sub-agents/sub-agent-run.entity.d.ts +2 -7
  147. package/backend/dist/src/sub-agents/sub-agent-run.entity.js +63 -9
  148. package/backend/dist/src/sub-agents/sub-agent-run.entity.js.map +1 -1
  149. package/backend/dist/src/sub-agents/sub-agent-runs.controller.js +63 -0
  150. package/backend/dist/src/sub-agents/sub-agent-runs.controller.js.map +1 -1
  151. package/backend/dist/src/sub-agents/sub-agent.entity.js +47 -0
  152. package/backend/dist/src/sub-agents/sub-agent.entity.js.map +1 -1
  153. package/backend/dist/src/sub-agents/sub-agents.controller.js +25 -0
  154. package/backend/dist/src/sub-agents/sub-agents.controller.js.map +1 -1
  155. package/backend/dist/src/system-prompts/dto/set-enabled-tools.dto.js +9 -0
  156. package/backend/dist/src/system-prompts/dto/set-enabled-tools.dto.js.map +1 -1
  157. package/backend/dist/src/system-prompts/dto/system-prompt.dto.js +43 -0
  158. package/backend/dist/src/system-prompts/dto/system-prompt.dto.js.map +1 -1
  159. package/backend/dist/src/system-prompts/dto/toggle-tool.dto.js +5 -0
  160. package/backend/dist/src/system-prompts/dto/toggle-tool.dto.js.map +1 -1
  161. package/backend/dist/src/system-prompts/system-prompts.controller.js +80 -0
  162. package/backend/dist/src/system-prompts/system-prompts.controller.js.map +1 -1
  163. package/backend/dist/src/tool-hooks/dto/create-tool-hook.dto.js +14 -0
  164. package/backend/dist/src/tool-hooks/dto/create-tool-hook.dto.js.map +1 -1
  165. package/backend/dist/src/tool-hooks/dto/update-tool-hook.dto.js +11 -0
  166. package/backend/dist/src/tool-hooks/dto/update-tool-hook.dto.js.map +1 -1
  167. package/backend/dist/src/tool-hooks/tool-hooks.controller.js +52 -0
  168. package/backend/dist/src/tool-hooks/tool-hooks.controller.js.map +1 -1
  169. package/backend/dist/src/visual-editor/visual-editor.controller.js +15 -0
  170. package/backend/dist/src/visual-editor/visual-editor.controller.js.map +1 -1
  171. package/backend/dist/src/workspace/workspace.controller.js +41 -0
  172. package/backend/dist/src/workspace/workspace.controller.js.map +1 -1
  173. package/backend/dist/tsconfig.build.tsbuildinfo +1 -1
  174. package/{daemon/node_modules/undici-types → backend/node_modules/@eslint/eslintrc}/LICENSE +5 -7
  175. package/backend/node_modules/@eslint/eslintrc/README.md +115 -0
  176. package/backend/node_modules/@eslint/eslintrc/conf/config-schema.js +79 -0
  177. package/backend/node_modules/@eslint/eslintrc/conf/environments.js +215 -0
  178. package/backend/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs +1104 -0
  179. package/backend/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs.map +1 -0
  180. package/backend/node_modules/@eslint/eslintrc/dist/eslintrc.cjs +4344 -0
  181. package/backend/node_modules/@eslint/eslintrc/dist/eslintrc.cjs.map +1 -0
  182. package/backend/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js +532 -0
  183. package/backend/node_modules/@eslint/eslintrc/lib/config-array/config-array.js +523 -0
  184. package/backend/node_modules/@eslint/eslintrc/lib/config-array/config-dependency.js +124 -0
  185. package/backend/node_modules/@eslint/eslintrc/lib/config-array/extracted-config.js +145 -0
  186. package/backend/node_modules/@eslint/eslintrc/lib/config-array/ignore-pattern.js +238 -0
  187. package/backend/node_modules/@eslint/eslintrc/lib/config-array/index.js +19 -0
  188. package/backend/node_modules/@eslint/eslintrc/lib/config-array/override-tester.js +225 -0
  189. package/backend/node_modules/@eslint/eslintrc/lib/config-array-factory.js +1151 -0
  190. package/backend/node_modules/@eslint/eslintrc/lib/flat-compat.js +318 -0
  191. package/backend/node_modules/@eslint/eslintrc/lib/index-universal.js +29 -0
  192. package/backend/node_modules/@eslint/eslintrc/lib/index.js +56 -0
  193. package/backend/node_modules/@eslint/eslintrc/lib/shared/ajv.js +191 -0
  194. package/backend/node_modules/@eslint/eslintrc/lib/shared/config-ops.js +135 -0
  195. package/backend/node_modules/@eslint/eslintrc/lib/shared/config-validator.js +325 -0
  196. package/backend/node_modules/@eslint/eslintrc/lib/shared/deprecation-warnings.js +63 -0
  197. package/backend/node_modules/@eslint/eslintrc/lib/shared/naming.js +96 -0
  198. package/backend/node_modules/@eslint/eslintrc/lib/shared/relative-module-resolver.js +42 -0
  199. package/backend/node_modules/@eslint/eslintrc/lib/shared/types.js +149 -0
  200. package/backend/node_modules/@eslint/eslintrc/package.json +82 -0
  201. package/backend/node_modules/@eslint/eslintrc/universal.js +9 -0
  202. package/backend/package.json +1 -3
  203. package/daemon/dist/api/system.js +25 -0
  204. package/daemon/dist/daemon.blob +0 -0
  205. package/daemon/dist/index.js +0 -0
  206. package/package.json +3 -1
  207. package/visual-editor-proxy/.repoburg/data.sqlite +0 -0
  208. package/visual-editor-proxy/dist/tsconfig.tsbuildinfo +1 -1
  209. package/backend/node_modules/@types/node/LICENSE +0 -21
  210. package/backend/node_modules/@types/node/README.md +0 -15
  211. package/backend/node_modules/@types/node/assert/strict.d.ts +0 -8
  212. package/backend/node_modules/@types/node/assert.d.ts +0 -1044
  213. package/backend/node_modules/@types/node/async_hooks.d.ts +0 -605
  214. package/backend/node_modules/@types/node/buffer.buffer.d.ts +0 -462
  215. package/backend/node_modules/@types/node/buffer.d.ts +0 -1932
  216. package/backend/node_modules/@types/node/child_process.d.ts +0 -1452
  217. package/backend/node_modules/@types/node/cluster.d.ts +0 -578
  218. package/backend/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
  219. package/backend/node_modules/@types/node/compatibility/index.d.ts +0 -9
  220. package/backend/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
  221. package/backend/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
  222. package/backend/node_modules/@types/node/console.d.ts +0 -452
  223. package/backend/node_modules/@types/node/constants.d.ts +0 -21
  224. package/backend/node_modules/@types/node/crypto.d.ts +0 -4570
  225. package/backend/node_modules/@types/node/dgram.d.ts +0 -596
  226. package/backend/node_modules/@types/node/diagnostics_channel.d.ts +0 -578
  227. package/backend/node_modules/@types/node/dns/promises.d.ts +0 -479
  228. package/backend/node_modules/@types/node/dns.d.ts +0 -871
  229. package/backend/node_modules/@types/node/domain.d.ts +0 -170
  230. package/backend/node_modules/@types/node/events.d.ts +0 -931
  231. package/backend/node_modules/@types/node/fs/promises.d.ts +0 -1248
  232. package/backend/node_modules/@types/node/fs.d.ts +0 -4362
  233. package/backend/node_modules/@types/node/globals.d.ts +0 -170
  234. package/backend/node_modules/@types/node/globals.typedarray.d.ts +0 -21
  235. package/backend/node_modules/@types/node/http.d.ts +0 -2031
  236. package/backend/node_modules/@types/node/http2.d.ts +0 -2623
  237. package/backend/node_modules/@types/node/https.d.ts +0 -549
  238. package/backend/node_modules/@types/node/index.d.ts +0 -93
  239. package/backend/node_modules/@types/node/inspector.generated.d.ts +0 -3966
  240. package/backend/node_modules/@types/node/module.d.ts +0 -539
  241. package/backend/node_modules/@types/node/net.d.ts +0 -1011
  242. package/backend/node_modules/@types/node/os.d.ts +0 -495
  243. package/backend/node_modules/@types/node/package.json +0 -140
  244. package/backend/node_modules/@types/node/path.d.ts +0 -200
  245. package/backend/node_modules/@types/node/perf_hooks.d.ts +0 -963
  246. package/backend/node_modules/@types/node/process.d.ts +0 -1956
  247. package/backend/node_modules/@types/node/punycode.d.ts +0 -117
  248. package/backend/node_modules/@types/node/querystring.d.ts +0 -152
  249. package/backend/node_modules/@types/node/readline/promises.d.ts +0 -162
  250. package/backend/node_modules/@types/node/readline.d.ts +0 -589
  251. package/backend/node_modules/@types/node/repl.d.ts +0 -430
  252. package/backend/node_modules/@types/node/sea.d.ts +0 -153
  253. package/backend/node_modules/@types/node/stream/consumers.d.ts +0 -38
  254. package/backend/node_modules/@types/node/stream/promises.d.ts +0 -90
  255. package/backend/node_modules/@types/node/stream/web.d.ts +0 -533
  256. package/backend/node_modules/@types/node/stream.d.ts +0 -1668
  257. package/backend/node_modules/@types/node/string_decoder.d.ts +0 -67
  258. package/backend/node_modules/@types/node/test.d.ts +0 -1807
  259. package/backend/node_modules/@types/node/timers/promises.d.ts +0 -108
  260. package/backend/node_modules/@types/node/timers.d.ts +0 -286
  261. package/backend/node_modules/@types/node/tls.d.ts +0 -1231
  262. package/backend/node_modules/@types/node/trace_events.d.ts +0 -197
  263. package/backend/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -460
  264. package/backend/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -19
  265. package/backend/node_modules/@types/node/ts5.6/index.d.ts +0 -93
  266. package/backend/node_modules/@types/node/tty.d.ts +0 -208
  267. package/backend/node_modules/@types/node/url.d.ts +0 -964
  268. package/backend/node_modules/@types/node/util.d.ts +0 -2331
  269. package/backend/node_modules/@types/node/v8.d.ts +0 -808
  270. package/backend/node_modules/@types/node/vm.d.ts +0 -1030
  271. package/backend/node_modules/@types/node/wasi.d.ts +0 -181
  272. package/backend/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -34
  273. package/backend/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
  274. package/backend/node_modules/@types/node/web-globals/events.d.ts +0 -94
  275. package/backend/node_modules/@types/node/web-globals/fetch.d.ts +0 -46
  276. package/backend/node_modules/@types/node/worker_threads.d.ts +0 -743
  277. package/backend/node_modules/@types/node/zlib.d.ts +0 -539
  278. package/backend/node_modules/debug/LICENSE +0 -20
  279. package/backend/node_modules/debug/README.md +0 -481
  280. package/backend/node_modules/debug/package.json +0 -64
  281. package/backend/node_modules/debug/src/browser.js +0 -272
  282. package/backend/node_modules/debug/src/common.js +0 -292
  283. package/backend/node_modules/debug/src/index.js +0 -10
  284. package/backend/node_modules/debug/src/node.js +0 -263
  285. package/backend/node_modules/undici-types/LICENSE +0 -21
  286. package/backend/node_modules/undici-types/README.md +0 -6
  287. package/backend/node_modules/undici-types/agent.d.ts +0 -31
  288. package/backend/node_modules/undici-types/api.d.ts +0 -43
  289. package/backend/node_modules/undici-types/balanced-pool.d.ts +0 -29
  290. package/backend/node_modules/undici-types/cache.d.ts +0 -36
  291. package/backend/node_modules/undici-types/client.d.ts +0 -108
  292. package/backend/node_modules/undici-types/connector.d.ts +0 -34
  293. package/backend/node_modules/undici-types/content-type.d.ts +0 -21
  294. package/backend/node_modules/undici-types/cookies.d.ts +0 -28
  295. package/backend/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
  296. package/backend/node_modules/undici-types/dispatcher.d.ts +0 -256
  297. package/backend/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
  298. package/backend/node_modules/undici-types/errors.d.ts +0 -149
  299. package/backend/node_modules/undici-types/eventsource.d.ts +0 -61
  300. package/backend/node_modules/undici-types/fetch.d.ts +0 -209
  301. package/backend/node_modules/undici-types/file.d.ts +0 -39
  302. package/backend/node_modules/undici-types/filereader.d.ts +0 -54
  303. package/backend/node_modules/undici-types/formdata.d.ts +0 -108
  304. package/backend/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  305. package/backend/node_modules/undici-types/global-origin.d.ts +0 -7
  306. package/backend/node_modules/undici-types/handlers.d.ts +0 -15
  307. package/backend/node_modules/undici-types/header.d.ts +0 -4
  308. package/backend/node_modules/undici-types/index.d.ts +0 -71
  309. package/backend/node_modules/undici-types/interceptors.d.ts +0 -17
  310. package/backend/node_modules/undici-types/mock-agent.d.ts +0 -50
  311. package/backend/node_modules/undici-types/mock-client.d.ts +0 -25
  312. package/backend/node_modules/undici-types/mock-errors.d.ts +0 -12
  313. package/backend/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  314. package/backend/node_modules/undici-types/mock-pool.d.ts +0 -25
  315. package/backend/node_modules/undici-types/package.json +0 -55
  316. package/backend/node_modules/undici-types/patch.d.ts +0 -33
  317. package/backend/node_modules/undici-types/pool-stats.d.ts +0 -19
  318. package/backend/node_modules/undici-types/pool.d.ts +0 -39
  319. package/backend/node_modules/undici-types/proxy-agent.d.ts +0 -28
  320. package/backend/node_modules/undici-types/readable.d.ts +0 -65
  321. package/backend/node_modules/undici-types/retry-agent.d.ts +0 -8
  322. package/backend/node_modules/undici-types/retry-handler.d.ts +0 -116
  323. package/backend/node_modules/undici-types/util.d.ts +0 -18
  324. package/backend/node_modules/undici-types/webidl.d.ts +0 -228
  325. package/backend/node_modules/undici-types/websocket.d.ts +0 -150
  326. package/daemon/node_modules/@types/node/LICENSE +0 -21
  327. package/daemon/node_modules/@types/node/README.md +0 -15
  328. package/daemon/node_modules/@types/node/assert/strict.d.ts +0 -8
  329. package/daemon/node_modules/@types/node/assert.d.ts +0 -1044
  330. package/daemon/node_modules/@types/node/async_hooks.d.ts +0 -605
  331. package/daemon/node_modules/@types/node/buffer.buffer.d.ts +0 -462
  332. package/daemon/node_modules/@types/node/buffer.d.ts +0 -1932
  333. package/daemon/node_modules/@types/node/child_process.d.ts +0 -1452
  334. package/daemon/node_modules/@types/node/cluster.d.ts +0 -578
  335. package/daemon/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
  336. package/daemon/node_modules/@types/node/compatibility/index.d.ts +0 -9
  337. package/daemon/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
  338. package/daemon/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
  339. package/daemon/node_modules/@types/node/console.d.ts +0 -452
  340. package/daemon/node_modules/@types/node/constants.d.ts +0 -21
  341. package/daemon/node_modules/@types/node/crypto.d.ts +0 -4570
  342. package/daemon/node_modules/@types/node/dgram.d.ts +0 -596
  343. package/daemon/node_modules/@types/node/diagnostics_channel.d.ts +0 -578
  344. package/daemon/node_modules/@types/node/dns/promises.d.ts +0 -479
  345. package/daemon/node_modules/@types/node/dns.d.ts +0 -871
  346. package/daemon/node_modules/@types/node/domain.d.ts +0 -170
  347. package/daemon/node_modules/@types/node/events.d.ts +0 -931
  348. package/daemon/node_modules/@types/node/fs/promises.d.ts +0 -1248
  349. package/daemon/node_modules/@types/node/fs.d.ts +0 -4362
  350. package/daemon/node_modules/@types/node/globals.d.ts +0 -170
  351. package/daemon/node_modules/@types/node/globals.typedarray.d.ts +0 -21
  352. package/daemon/node_modules/@types/node/http.d.ts +0 -2031
  353. package/daemon/node_modules/@types/node/http2.d.ts +0 -2623
  354. package/daemon/node_modules/@types/node/https.d.ts +0 -549
  355. package/daemon/node_modules/@types/node/index.d.ts +0 -93
  356. package/daemon/node_modules/@types/node/inspector.generated.d.ts +0 -3966
  357. package/daemon/node_modules/@types/node/module.d.ts +0 -539
  358. package/daemon/node_modules/@types/node/net.d.ts +0 -1011
  359. package/daemon/node_modules/@types/node/os.d.ts +0 -495
  360. package/daemon/node_modules/@types/node/package.json +0 -140
  361. package/daemon/node_modules/@types/node/path.d.ts +0 -200
  362. package/daemon/node_modules/@types/node/perf_hooks.d.ts +0 -963
  363. package/daemon/node_modules/@types/node/process.d.ts +0 -1956
  364. package/daemon/node_modules/@types/node/punycode.d.ts +0 -117
  365. package/daemon/node_modules/@types/node/querystring.d.ts +0 -152
  366. package/daemon/node_modules/@types/node/readline/promises.d.ts +0 -162
  367. package/daemon/node_modules/@types/node/readline.d.ts +0 -589
  368. package/daemon/node_modules/@types/node/repl.d.ts +0 -430
  369. package/daemon/node_modules/@types/node/sea.d.ts +0 -153
  370. package/daemon/node_modules/@types/node/stream/consumers.d.ts +0 -38
  371. package/daemon/node_modules/@types/node/stream/promises.d.ts +0 -90
  372. package/daemon/node_modules/@types/node/stream/web.d.ts +0 -533
  373. package/daemon/node_modules/@types/node/stream.d.ts +0 -1668
  374. package/daemon/node_modules/@types/node/string_decoder.d.ts +0 -67
  375. package/daemon/node_modules/@types/node/test.d.ts +0 -1807
  376. package/daemon/node_modules/@types/node/timers/promises.d.ts +0 -108
  377. package/daemon/node_modules/@types/node/timers.d.ts +0 -286
  378. package/daemon/node_modules/@types/node/tls.d.ts +0 -1231
  379. package/daemon/node_modules/@types/node/trace_events.d.ts +0 -197
  380. package/daemon/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -460
  381. package/daemon/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -19
  382. package/daemon/node_modules/@types/node/ts5.6/index.d.ts +0 -93
  383. package/daemon/node_modules/@types/node/tty.d.ts +0 -208
  384. package/daemon/node_modules/@types/node/url.d.ts +0 -964
  385. package/daemon/node_modules/@types/node/util.d.ts +0 -2331
  386. package/daemon/node_modules/@types/node/v8.d.ts +0 -808
  387. package/daemon/node_modules/@types/node/vm.d.ts +0 -1030
  388. package/daemon/node_modules/@types/node/wasi.d.ts +0 -181
  389. package/daemon/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -34
  390. package/daemon/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
  391. package/daemon/node_modules/@types/node/web-globals/events.d.ts +0 -94
  392. package/daemon/node_modules/@types/node/web-globals/fetch.d.ts +0 -46
  393. package/daemon/node_modules/@types/node/worker_threads.d.ts +0 -743
  394. package/daemon/node_modules/@types/node/zlib.d.ts +0 -539
  395. package/daemon/node_modules/undici-types/README.md +0 -6
  396. package/daemon/node_modules/undici-types/agent.d.ts +0 -31
  397. package/daemon/node_modules/undici-types/api.d.ts +0 -43
  398. package/daemon/node_modules/undici-types/balanced-pool.d.ts +0 -29
  399. package/daemon/node_modules/undici-types/cache.d.ts +0 -36
  400. package/daemon/node_modules/undici-types/client.d.ts +0 -108
  401. package/daemon/node_modules/undici-types/connector.d.ts +0 -34
  402. package/daemon/node_modules/undici-types/content-type.d.ts +0 -21
  403. package/daemon/node_modules/undici-types/cookies.d.ts +0 -28
  404. package/daemon/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
  405. package/daemon/node_modules/undici-types/dispatcher.d.ts +0 -256
  406. package/daemon/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
  407. package/daemon/node_modules/undici-types/errors.d.ts +0 -149
  408. package/daemon/node_modules/undici-types/eventsource.d.ts +0 -61
  409. package/daemon/node_modules/undici-types/fetch.d.ts +0 -209
  410. package/daemon/node_modules/undici-types/file.d.ts +0 -39
  411. package/daemon/node_modules/undici-types/filereader.d.ts +0 -54
  412. package/daemon/node_modules/undici-types/formdata.d.ts +0 -108
  413. package/daemon/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  414. package/daemon/node_modules/undici-types/global-origin.d.ts +0 -7
  415. package/daemon/node_modules/undici-types/handlers.d.ts +0 -15
  416. package/daemon/node_modules/undici-types/header.d.ts +0 -4
  417. package/daemon/node_modules/undici-types/index.d.ts +0 -71
  418. package/daemon/node_modules/undici-types/interceptors.d.ts +0 -17
  419. package/daemon/node_modules/undici-types/mock-agent.d.ts +0 -50
  420. package/daemon/node_modules/undici-types/mock-client.d.ts +0 -25
  421. package/daemon/node_modules/undici-types/mock-errors.d.ts +0 -12
  422. package/daemon/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  423. package/daemon/node_modules/undici-types/mock-pool.d.ts +0 -25
  424. package/daemon/node_modules/undici-types/package.json +0 -55
  425. package/daemon/node_modules/undici-types/patch.d.ts +0 -33
  426. package/daemon/node_modules/undici-types/pool-stats.d.ts +0 -19
  427. package/daemon/node_modules/undici-types/pool.d.ts +0 -39
  428. package/daemon/node_modules/undici-types/proxy-agent.d.ts +0 -28
  429. package/daemon/node_modules/undici-types/readable.d.ts +0 -65
  430. package/daemon/node_modules/undici-types/retry-agent.d.ts +0 -8
  431. package/daemon/node_modules/undici-types/retry-handler.d.ts +0 -116
  432. package/daemon/node_modules/undici-types/util.d.ts +0 -18
  433. package/daemon/node_modules/undici-types/webidl.d.ts +0 -228
  434. package/daemon/node_modules/undici-types/websocket.d.ts +0 -150
  435. package/visual-editor-proxy/node_modules/@types/node/LICENSE +0 -21
  436. package/visual-editor-proxy/node_modules/@types/node/README.md +0 -15
  437. package/visual-editor-proxy/node_modules/@types/node/assert/strict.d.ts +0 -8
  438. package/visual-editor-proxy/node_modules/@types/node/assert.d.ts +0 -1062
  439. package/visual-editor-proxy/node_modules/@types/node/async_hooks.d.ts +0 -605
  440. package/visual-editor-proxy/node_modules/@types/node/buffer.buffer.d.ts +0 -462
  441. package/visual-editor-proxy/node_modules/@types/node/buffer.d.ts +0 -1932
  442. package/visual-editor-proxy/node_modules/@types/node/child_process.d.ts +0 -1458
  443. package/visual-editor-proxy/node_modules/@types/node/cluster.d.ts +0 -577
  444. package/visual-editor-proxy/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
  445. package/visual-editor-proxy/node_modules/@types/node/compatibility/index.d.ts +0 -9
  446. package/visual-editor-proxy/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
  447. package/visual-editor-proxy/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
  448. package/visual-editor-proxy/node_modules/@types/node/console.d.ts +0 -452
  449. package/visual-editor-proxy/node_modules/@types/node/constants.d.ts +0 -21
  450. package/visual-editor-proxy/node_modules/@types/node/crypto.d.ts +0 -4570
  451. package/visual-editor-proxy/node_modules/@types/node/dgram.d.ts +0 -596
  452. package/visual-editor-proxy/node_modules/@types/node/diagnostics_channel.d.ts +0 -578
  453. package/visual-editor-proxy/node_modules/@types/node/dns/promises.d.ts +0 -479
  454. package/visual-editor-proxy/node_modules/@types/node/dns.d.ts +0 -871
  455. package/visual-editor-proxy/node_modules/@types/node/domain.d.ts +0 -170
  456. package/visual-editor-proxy/node_modules/@types/node/events.d.ts +0 -977
  457. package/visual-editor-proxy/node_modules/@types/node/fs/promises.d.ts +0 -1248
  458. package/visual-editor-proxy/node_modules/@types/node/fs.d.ts +0 -4362
  459. package/visual-editor-proxy/node_modules/@types/node/globals.d.ts +0 -172
  460. package/visual-editor-proxy/node_modules/@types/node/globals.typedarray.d.ts +0 -21
  461. package/visual-editor-proxy/node_modules/@types/node/http.d.ts +0 -2030
  462. package/visual-editor-proxy/node_modules/@types/node/http2.d.ts +0 -2624
  463. package/visual-editor-proxy/node_modules/@types/node/https.d.ts +0 -546
  464. package/visual-editor-proxy/node_modules/@types/node/index.d.ts +0 -93
  465. package/visual-editor-proxy/node_modules/@types/node/inspector.generated.d.ts +0 -3966
  466. package/visual-editor-proxy/node_modules/@types/node/module.d.ts +0 -539
  467. package/visual-editor-proxy/node_modules/@types/node/net.d.ts +0 -1011
  468. package/visual-editor-proxy/node_modules/@types/node/os.d.ts +0 -505
  469. package/visual-editor-proxy/node_modules/@types/node/package.json +0 -140
  470. package/visual-editor-proxy/node_modules/@types/node/path.d.ts +0 -200
  471. package/visual-editor-proxy/node_modules/@types/node/perf_hooks.d.ts +0 -961
  472. package/visual-editor-proxy/node_modules/@types/node/process.d.ts +0 -1944
  473. package/visual-editor-proxy/node_modules/@types/node/punycode.d.ts +0 -117
  474. package/visual-editor-proxy/node_modules/@types/node/querystring.d.ts +0 -152
  475. package/visual-editor-proxy/node_modules/@types/node/readline/promises.d.ts +0 -162
  476. package/visual-editor-proxy/node_modules/@types/node/readline.d.ts +0 -589
  477. package/visual-editor-proxy/node_modules/@types/node/repl.d.ts +0 -430
  478. package/visual-editor-proxy/node_modules/@types/node/sea.d.ts +0 -153
  479. package/visual-editor-proxy/node_modules/@types/node/stream/consumers.d.ts +0 -38
  480. package/visual-editor-proxy/node_modules/@types/node/stream/promises.d.ts +0 -90
  481. package/visual-editor-proxy/node_modules/@types/node/stream/web.d.ts +0 -533
  482. package/visual-editor-proxy/node_modules/@types/node/stream.d.ts +0 -1675
  483. package/visual-editor-proxy/node_modules/@types/node/string_decoder.d.ts +0 -67
  484. package/visual-editor-proxy/node_modules/@types/node/test.d.ts +0 -1787
  485. package/visual-editor-proxy/node_modules/@types/node/timers/promises.d.ts +0 -108
  486. package/visual-editor-proxy/node_modules/@types/node/timers.d.ts +0 -286
  487. package/visual-editor-proxy/node_modules/@types/node/tls.d.ts +0 -1231
  488. package/visual-editor-proxy/node_modules/@types/node/trace_events.d.ts +0 -197
  489. package/visual-editor-proxy/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -460
  490. package/visual-editor-proxy/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -19
  491. package/visual-editor-proxy/node_modules/@types/node/ts5.6/index.d.ts +0 -93
  492. package/visual-editor-proxy/node_modules/@types/node/tty.d.ts +0 -208
  493. package/visual-editor-proxy/node_modules/@types/node/url.d.ts +0 -964
  494. package/visual-editor-proxy/node_modules/@types/node/util.d.ts +0 -2331
  495. package/visual-editor-proxy/node_modules/@types/node/v8.d.ts +0 -808
  496. package/visual-editor-proxy/node_modules/@types/node/vm.d.ts +0 -1000
  497. package/visual-editor-proxy/node_modules/@types/node/wasi.d.ts +0 -181
  498. package/visual-editor-proxy/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -34
  499. package/visual-editor-proxy/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
  500. package/visual-editor-proxy/node_modules/@types/node/web-globals/events.d.ts +0 -97
  501. package/visual-editor-proxy/node_modules/@types/node/web-globals/fetch.d.ts +0 -46
  502. package/visual-editor-proxy/node_modules/@types/node/worker_threads.d.ts +0 -715
  503. package/visual-editor-proxy/node_modules/@types/node/zlib.d.ts +0 -539
  504. package/visual-editor-proxy/node_modules/undici-types/LICENSE +0 -21
  505. package/visual-editor-proxy/node_modules/undici-types/README.md +0 -6
  506. package/visual-editor-proxy/node_modules/undici-types/agent.d.ts +0 -31
  507. package/visual-editor-proxy/node_modules/undici-types/api.d.ts +0 -43
  508. package/visual-editor-proxy/node_modules/undici-types/balanced-pool.d.ts +0 -29
  509. package/visual-editor-proxy/node_modules/undici-types/cache.d.ts +0 -36
  510. package/visual-editor-proxy/node_modules/undici-types/client.d.ts +0 -108
  511. package/visual-editor-proxy/node_modules/undici-types/connector.d.ts +0 -34
  512. package/visual-editor-proxy/node_modules/undici-types/content-type.d.ts +0 -21
  513. package/visual-editor-proxy/node_modules/undici-types/cookies.d.ts +0 -28
  514. package/visual-editor-proxy/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
  515. package/visual-editor-proxy/node_modules/undici-types/dispatcher.d.ts +0 -256
  516. package/visual-editor-proxy/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
  517. package/visual-editor-proxy/node_modules/undici-types/errors.d.ts +0 -149
  518. package/visual-editor-proxy/node_modules/undici-types/eventsource.d.ts +0 -61
  519. package/visual-editor-proxy/node_modules/undici-types/fetch.d.ts +0 -209
  520. package/visual-editor-proxy/node_modules/undici-types/file.d.ts +0 -39
  521. package/visual-editor-proxy/node_modules/undici-types/filereader.d.ts +0 -54
  522. package/visual-editor-proxy/node_modules/undici-types/formdata.d.ts +0 -108
  523. package/visual-editor-proxy/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  524. package/visual-editor-proxy/node_modules/undici-types/global-origin.d.ts +0 -7
  525. package/visual-editor-proxy/node_modules/undici-types/handlers.d.ts +0 -15
  526. package/visual-editor-proxy/node_modules/undici-types/header.d.ts +0 -4
  527. package/visual-editor-proxy/node_modules/undici-types/index.d.ts +0 -71
  528. package/visual-editor-proxy/node_modules/undici-types/interceptors.d.ts +0 -17
  529. package/visual-editor-proxy/node_modules/undici-types/mock-agent.d.ts +0 -50
  530. package/visual-editor-proxy/node_modules/undici-types/mock-client.d.ts +0 -25
  531. package/visual-editor-proxy/node_modules/undici-types/mock-errors.d.ts +0 -12
  532. package/visual-editor-proxy/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  533. package/visual-editor-proxy/node_modules/undici-types/mock-pool.d.ts +0 -25
  534. package/visual-editor-proxy/node_modules/undici-types/package.json +0 -55
  535. package/visual-editor-proxy/node_modules/undici-types/patch.d.ts +0 -33
  536. package/visual-editor-proxy/node_modules/undici-types/pool-stats.d.ts +0 -19
  537. package/visual-editor-proxy/node_modules/undici-types/pool.d.ts +0 -39
  538. package/visual-editor-proxy/node_modules/undici-types/proxy-agent.d.ts +0 -28
  539. package/visual-editor-proxy/node_modules/undici-types/readable.d.ts +0 -65
  540. package/visual-editor-proxy/node_modules/undici-types/retry-agent.d.ts +0 -8
  541. package/visual-editor-proxy/node_modules/undici-types/retry-handler.d.ts +0 -116
  542. package/visual-editor-proxy/node_modules/undici-types/util.d.ts +0 -18
  543. package/visual-editor-proxy/node_modules/undici-types/webidl.d.ts +0 -228
  544. package/visual-editor-proxy/node_modules/undici-types/websocket.d.ts +0 -150
@@ -1,964 +0,0 @@
1
- /**
2
- * The `node:url` module provides utilities for URL resolution and parsing. It can
3
- * be accessed using:
4
- *
5
- * ```js
6
- * import url from 'node:url';
7
- * ```
8
- * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/url.js)
9
- */
10
- declare module "url" {
11
- import { Blob as NodeBlob } from "node:buffer";
12
- import { ClientRequestArgs } from "node:http";
13
- import { ParsedUrlQuery, ParsedUrlQueryInput } from "node:querystring";
14
- // Input to `url.format`
15
- interface UrlObject {
16
- auth?: string | null | undefined;
17
- hash?: string | null | undefined;
18
- host?: string | null | undefined;
19
- hostname?: string | null | undefined;
20
- href?: string | null | undefined;
21
- pathname?: string | null | undefined;
22
- protocol?: string | null | undefined;
23
- search?: string | null | undefined;
24
- slashes?: boolean | null | undefined;
25
- port?: string | number | null | undefined;
26
- query?: string | null | ParsedUrlQueryInput | undefined;
27
- }
28
- // Output of `url.parse`
29
- interface Url {
30
- auth: string | null;
31
- hash: string | null;
32
- host: string | null;
33
- hostname: string | null;
34
- href: string;
35
- path: string | null;
36
- pathname: string | null;
37
- protocol: string | null;
38
- search: string | null;
39
- slashes: boolean | null;
40
- port: string | null;
41
- query: string | null | ParsedUrlQuery;
42
- }
43
- interface UrlWithParsedQuery extends Url {
44
- query: ParsedUrlQuery;
45
- }
46
- interface UrlWithStringQuery extends Url {
47
- query: string | null;
48
- }
49
- interface FileUrlToPathOptions {
50
- /**
51
- * `true` if the `path` should be return as a windows filepath, `false` for posix, and `undefined` for the system default.
52
- * @default undefined
53
- */
54
- windows?: boolean | undefined;
55
- }
56
- interface PathToFileUrlOptions extends FileUrlToPathOptions {}
57
- /**
58
- * The `url.parse()` method takes a URL string, parses it, and returns a URL
59
- * object.
60
- *
61
- * A `TypeError` is thrown if `urlString` is not a string.
62
- *
63
- * A `URIError` is thrown if the `auth` property is present but cannot be decoded.
64
- *
65
- * `url.parse()` uses a lenient, non-standard algorithm for parsing URL
66
- * strings. It is prone to security issues such as [host name spoofing](https://hackerone.com/reports/678487) and incorrect handling of usernames and passwords. Do not use with untrusted
67
- * input. CVEs are not issued for `url.parse()` vulnerabilities. Use the `WHATWG URL` API instead.
68
- * @since v0.1.25
69
- * @deprecated Use the WHATWG URL API instead.
70
- * @param urlString The URL string to parse.
71
- * @param [parseQueryString=false] If `true`, the `query` property will always be set to an object returned by the {@link querystring} module's `parse()` method. If `false`, the `query` property
72
- * on the returned URL object will be an unparsed, undecoded string.
73
- * @param [slashesDenoteHost=false] If `true`, the first token after the literal string `//` and preceding the next `/` will be interpreted as the `host`. For instance, given `//foo/bar`, the
74
- * result would be `{host: 'foo', pathname: '/bar'}` rather than `{pathname: '//foo/bar'}`.
75
- */
76
- function parse(urlString: string): UrlWithStringQuery;
77
- function parse(
78
- urlString: string,
79
- parseQueryString: false | undefined,
80
- slashesDenoteHost?: boolean,
81
- ): UrlWithStringQuery;
82
- function parse(urlString: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
83
- function parse(urlString: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
84
- /**
85
- * The `url.format()` method returns a formatted URL string derived from `urlObject`.
86
- *
87
- * ```js
88
- * import url from 'node:url';
89
- * url.format({
90
- * protocol: 'https',
91
- * hostname: 'example.com',
92
- * pathname: '/some/path',
93
- * query: {
94
- * page: 1,
95
- * format: 'json',
96
- * },
97
- * });
98
- *
99
- * // => 'https://example.com/some/path?page=1&format=json'
100
- * ```
101
- *
102
- * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`.
103
- *
104
- * The formatting process operates as follows:
105
- *
106
- * * A new empty string `result` is created.
107
- * * If `urlObject.protocol` is a string, it is appended as-is to `result`.
108
- * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown.
109
- * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII
110
- * colon (`:`) character, the literal string `:` will be appended to `result`.
111
- * * If either of the following conditions is true, then the literal string `//` will be appended to `result`:
112
- * * `urlObject.slashes` property is true;
113
- * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or `file`;
114
- * * If the value of the `urlObject.auth` property is truthy, and either `urlObject.host` or `urlObject.hostname` are not `undefined`, the value of `urlObject.auth` will be coerced into a string
115
- * and appended to `result` followed by the literal string `@`.
116
- * * If the `urlObject.host` property is `undefined` then:
117
- * * If the `urlObject.hostname` is a string, it is appended to `result`.
118
- * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string,
119
- * an `Error` is thrown.
120
- * * If the `urlObject.port` property value is truthy, and `urlObject.hostname` is not `undefined`:
121
- * * The literal string `:` is appended to `result`, and
122
- * * The value of `urlObject.port` is coerced to a string and appended to `result`.
123
- * * Otherwise, if the `urlObject.host` property value is truthy, the value of `urlObject.host` is coerced to a string and appended to `result`.
124
- * * If the `urlObject.pathname` property is a string that is not an empty string:
125
- * * If the `urlObject.pathname` _does not start_ with an ASCII forward slash
126
- * (`/`), then the literal string `'/'` is appended to `result`.
127
- * * The value of `urlObject.pathname` is appended to `result`.
128
- * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown.
129
- * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result` followed by the output of calling the
130
- * `querystring` module's `stringify()` method passing the value of `urlObject.query`.
131
- * * Otherwise, if `urlObject.search` is a string:
132
- * * If the value of `urlObject.search` _does not start_ with the ASCII question
133
- * mark (`?`) character, the literal string `?` is appended to `result`.
134
- * * The value of `urlObject.search` is appended to `result`.
135
- * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown.
136
- * * If the `urlObject.hash` property is a string:
137
- * * If the value of `urlObject.hash` _does not start_ with the ASCII hash (`#`)
138
- * character, the literal string `#` is appended to `result`.
139
- * * The value of `urlObject.hash` is appended to `result`.
140
- * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a
141
- * string, an `Error` is thrown.
142
- * * `result` is returned.
143
- * @since v0.1.25
144
- * @legacy Use the WHATWG URL API instead.
145
- * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`.
146
- */
147
- function format(urlObject: URL, options?: URLFormatOptions): string;
148
- /**
149
- * The `url.format()` method returns a formatted URL string derived from `urlObject`.
150
- *
151
- * ```js
152
- * import url from 'node:url';
153
- * url.format({
154
- * protocol: 'https',
155
- * hostname: 'example.com',
156
- * pathname: '/some/path',
157
- * query: {
158
- * page: 1,
159
- * format: 'json',
160
- * },
161
- * });
162
- *
163
- * // => 'https://example.com/some/path?page=1&format=json'
164
- * ```
165
- *
166
- * If `urlObject` is not an object or a string, `url.format()` will throw a `TypeError`.
167
- *
168
- * The formatting process operates as follows:
169
- *
170
- * * A new empty string `result` is created.
171
- * * If `urlObject.protocol` is a string, it is appended as-is to `result`.
172
- * * Otherwise, if `urlObject.protocol` is not `undefined` and is not a string, an `Error` is thrown.
173
- * * For all string values of `urlObject.protocol` that _do not end_ with an ASCII
174
- * colon (`:`) character, the literal string `:` will be appended to `result`.
175
- * * If either of the following conditions is true, then the literal string `//` will be appended to `result`:
176
- * * `urlObject.slashes` property is true;
177
- * * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or `file`;
178
- * * If the value of the `urlObject.auth` property is truthy, and either `urlObject.host` or `urlObject.hostname` are not `undefined`, the value of `urlObject.auth` will be coerced into a string
179
- * and appended to `result` followed by the literal string `@`.
180
- * * If the `urlObject.host` property is `undefined` then:
181
- * * If the `urlObject.hostname` is a string, it is appended to `result`.
182
- * * Otherwise, if `urlObject.hostname` is not `undefined` and is not a string,
183
- * an `Error` is thrown.
184
- * * If the `urlObject.port` property value is truthy, and `urlObject.hostname` is not `undefined`:
185
- * * The literal string `:` is appended to `result`, and
186
- * * The value of `urlObject.port` is coerced to a string and appended to `result`.
187
- * * Otherwise, if the `urlObject.host` property value is truthy, the value of `urlObject.host` is coerced to a string and appended to `result`.
188
- * * If the `urlObject.pathname` property is a string that is not an empty string:
189
- * * If the `urlObject.pathname` _does not start_ with an ASCII forward slash
190
- * (`/`), then the literal string `'/'` is appended to `result`.
191
- * * The value of `urlObject.pathname` is appended to `result`.
192
- * * Otherwise, if `urlObject.pathname` is not `undefined` and is not a string, an `Error` is thrown.
193
- * * If the `urlObject.search` property is `undefined` and if the `urlObject.query`property is an `Object`, the literal string `?` is appended to `result` followed by the output of calling the
194
- * `querystring` module's `stringify()` method passing the value of `urlObject.query`.
195
- * * Otherwise, if `urlObject.search` is a string:
196
- * * If the value of `urlObject.search` _does not start_ with the ASCII question
197
- * mark (`?`) character, the literal string `?` is appended to `result`.
198
- * * The value of `urlObject.search` is appended to `result`.
199
- * * Otherwise, if `urlObject.search` is not `undefined` and is not a string, an `Error` is thrown.
200
- * * If the `urlObject.hash` property is a string:
201
- * * If the value of `urlObject.hash` _does not start_ with the ASCII hash (`#`)
202
- * character, the literal string `#` is appended to `result`.
203
- * * The value of `urlObject.hash` is appended to `result`.
204
- * * Otherwise, if the `urlObject.hash` property is not `undefined` and is not a
205
- * string, an `Error` is thrown.
206
- * * `result` is returned.
207
- * @since v0.1.25
208
- * @legacy Use the WHATWG URL API instead.
209
- * @param urlObject A URL object (as returned by `url.parse()` or constructed otherwise). If a string, it is converted to an object by passing it to `url.parse()`.
210
- */
211
- function format(urlObject: UrlObject | string): string;
212
- /**
213
- * The `url.resolve()` method resolves a target URL relative to a base URL in a
214
- * manner similar to that of a web browser resolving an anchor tag.
215
- *
216
- * ```js
217
- * import url from 'node:url';
218
- * url.resolve('/one/two/three', 'four'); // '/one/two/four'
219
- * url.resolve('http://example.com/', '/one'); // 'http://example.com/one'
220
- * url.resolve('http://example.com/one', '/two'); // 'http://example.com/two'
221
- * ```
222
- *
223
- * To achieve the same result using the WHATWG URL API:
224
- *
225
- * ```js
226
- * function resolve(from, to) {
227
- * const resolvedUrl = new URL(to, new URL(from, 'resolve://'));
228
- * if (resolvedUrl.protocol === 'resolve:') {
229
- * // `from` is a relative URL.
230
- * const { pathname, search, hash } = resolvedUrl;
231
- * return pathname + search + hash;
232
- * }
233
- * return resolvedUrl.toString();
234
- * }
235
- *
236
- * resolve('/one/two/three', 'four'); // '/one/two/four'
237
- * resolve('http://example.com/', '/one'); // 'http://example.com/one'
238
- * resolve('http://example.com/one', '/two'); // 'http://example.com/two'
239
- * ```
240
- * @since v0.1.25
241
- * @legacy Use the WHATWG URL API instead.
242
- * @param from The base URL to use if `to` is a relative URL.
243
- * @param to The target URL to resolve.
244
- */
245
- function resolve(from: string, to: string): string;
246
- /**
247
- * Returns the [Punycode](https://tools.ietf.org/html/rfc5891#section-4.4) ASCII serialization of the `domain`. If `domain` is an
248
- * invalid domain, the empty string is returned.
249
- *
250
- * It performs the inverse operation to {@link domainToUnicode}.
251
- *
252
- * ```js
253
- * import url from 'node:url';
254
- *
255
- * console.log(url.domainToASCII('español.com'));
256
- * // Prints xn--espaol-zwa.com
257
- * console.log(url.domainToASCII('中文.com'));
258
- * // Prints xn--fiq228c.com
259
- * console.log(url.domainToASCII('xn--iñvalid.com'));
260
- * // Prints an empty string
261
- * ```
262
- * @since v7.4.0, v6.13.0
263
- */
264
- function domainToASCII(domain: string): string;
265
- /**
266
- * Returns the Unicode serialization of the `domain`. If `domain` is an invalid
267
- * domain, the empty string is returned.
268
- *
269
- * It performs the inverse operation to {@link domainToASCII}.
270
- *
271
- * ```js
272
- * import url from 'node:url';
273
- *
274
- * console.log(url.domainToUnicode('xn--espaol-zwa.com'));
275
- * // Prints español.com
276
- * console.log(url.domainToUnicode('xn--fiq228c.com'));
277
- * // Prints 中文.com
278
- * console.log(url.domainToUnicode('xn--iñvalid.com'));
279
- * // Prints an empty string
280
- * ```
281
- * @since v7.4.0, v6.13.0
282
- */
283
- function domainToUnicode(domain: string): string;
284
- /**
285
- * This function ensures the correct decodings of percent-encoded characters as
286
- * well as ensuring a cross-platform valid absolute path string.
287
- *
288
- * ```js
289
- * import { fileURLToPath } from 'node:url';
290
- *
291
- * const __filename = fileURLToPath(import.meta.url);
292
- *
293
- * new URL('file:///C:/path/').pathname; // Incorrect: /C:/path/
294
- * fileURLToPath('file:///C:/path/'); // Correct: C:\path\ (Windows)
295
- *
296
- * new URL('file://nas/foo.txt').pathname; // Incorrect: /foo.txt
297
- * fileURLToPath('file://nas/foo.txt'); // Correct: \\nas\foo.txt (Windows)
298
- *
299
- * new URL('file:///你好.txt').pathname; // Incorrect: /%E4%BD%A0%E5%A5%BD.txt
300
- * fileURLToPath('file:///你好.txt'); // Correct: /你好.txt (POSIX)
301
- *
302
- * new URL('file:///hello world').pathname; // Incorrect: /hello%20world
303
- * fileURLToPath('file:///hello world'); // Correct: /hello world (POSIX)
304
- * ```
305
- * @since v10.12.0
306
- * @param url The file URL string or URL object to convert to a path.
307
- * @return The fully-resolved platform-specific Node.js file path.
308
- */
309
- function fileURLToPath(url: string | URL, options?: FileUrlToPathOptions): string;
310
- /**
311
- * This function ensures that `path` is resolved absolutely, and that the URL
312
- * control characters are correctly encoded when converting into a File URL.
313
- *
314
- * ```js
315
- * import { pathToFileURL } from 'node:url';
316
- *
317
- * new URL('/foo#1', 'file:'); // Incorrect: file:///foo#1
318
- * pathToFileURL('/foo#1'); // Correct: file:///foo%231 (POSIX)
319
- *
320
- * new URL('/some/path%.c', 'file:'); // Incorrect: file:///some/path%.c
321
- * pathToFileURL('/some/path%.c'); // Correct: file:///some/path%25.c (POSIX)
322
- * ```
323
- * @since v10.12.0
324
- * @param path The path to convert to a File URL.
325
- * @return The file URL object.
326
- */
327
- function pathToFileURL(path: string, options?: PathToFileUrlOptions): URL;
328
- /**
329
- * This utility function converts a URL object into an ordinary options object as
330
- * expected by the `http.request()` and `https.request()` APIs.
331
- *
332
- * ```js
333
- * import { urlToHttpOptions } from 'node:url';
334
- * const myURL = new URL('https://a:b@測試?abc#foo');
335
- *
336
- * console.log(urlToHttpOptions(myURL));
337
- * /*
338
- * {
339
- * protocol: 'https:',
340
- * hostname: 'xn--g6w251d',
341
- * hash: '#foo',
342
- * search: '?abc',
343
- * pathname: '/',
344
- * path: '/?abc',
345
- * href: 'https://a:b@xn--g6w251d/?abc#foo',
346
- * auth: 'a:b'
347
- * }
348
- *
349
- * ```
350
- * @since v15.7.0, v14.18.0
351
- * @param url The `WHATWG URL` object to convert to an options object.
352
- * @return Options object
353
- */
354
- function urlToHttpOptions(url: URL): ClientRequestArgs;
355
- interface URLFormatOptions {
356
- /**
357
- * `true` if the serialized URL string should include the username and password, `false` otherwise.
358
- * @default true
359
- */
360
- auth?: boolean | undefined;
361
- /**
362
- * `true` if the serialized URL string should include the fragment, `false` otherwise.
363
- * @default true
364
- */
365
- fragment?: boolean | undefined;
366
- /**
367
- * `true` if the serialized URL string should include the search query, `false` otherwise.
368
- * @default true
369
- */
370
- search?: boolean | undefined;
371
- /**
372
- * `true` if Unicode characters appearing in the host component of the URL string should be encoded directly as opposed to
373
- * being Punycode encoded.
374
- * @default false
375
- */
376
- unicode?: boolean | undefined;
377
- }
378
- /**
379
- * Browser-compatible `URL` class, implemented by following the WHATWG URL
380
- * Standard. [Examples of parsed URLs](https://url.spec.whatwg.org/#example-url-parsing) may be found in the Standard itself.
381
- * The `URL` class is also available on the global object.
382
- *
383
- * In accordance with browser conventions, all properties of `URL` objects
384
- * are implemented as getters and setters on the class prototype, rather than as
385
- * data properties on the object itself. Thus, unlike `legacy urlObject`s,
386
- * using the `delete` keyword on any properties of `URL` objects (e.g. `delete myURL.protocol`, `delete myURL.pathname`, etc) has no effect but will still
387
- * return `true`.
388
- * @since v7.0.0, v6.13.0
389
- */
390
- class URL {
391
- /**
392
- * Creates a `'blob:nodedata:...'` URL string that represents the given `Blob` object and can be used to retrieve the `Blob` later.
393
- *
394
- * ```js
395
- * import {
396
- * Blob,
397
- * resolveObjectURL,
398
- * } from 'node:buffer';
399
- *
400
- * const blob = new Blob(['hello']);
401
- * const id = URL.createObjectURL(blob);
402
- *
403
- * // later...
404
- *
405
- * const otherBlob = resolveObjectURL(id);
406
- * console.log(otherBlob.size);
407
- * ```
408
- *
409
- * The data stored by the registered `Blob` will be retained in memory until `URL.revokeObjectURL()` is called to remove it.
410
- *
411
- * `Blob` objects are registered within the current thread. If using Worker
412
- * Threads, `Blob` objects registered within one Worker will not be available
413
- * to other workers or the main thread.
414
- * @since v16.7.0
415
- * @experimental
416
- */
417
- static createObjectURL(blob: NodeBlob): string;
418
- /**
419
- * Removes the stored `Blob` identified by the given ID. Attempting to revoke a
420
- * ID that isn't registered will silently fail.
421
- * @since v16.7.0
422
- * @experimental
423
- * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.
424
- */
425
- static revokeObjectURL(id: string): void;
426
- /**
427
- * Checks if an `input` relative to the `base` can be parsed to a `URL`.
428
- *
429
- * ```js
430
- * const isValid = URL.canParse('/foo', 'https://example.org/'); // true
431
- *
432
- * const isNotValid = URL.canParse('/foo'); // false
433
- * ```
434
- * @since v19.9.0
435
- * @param input The absolute or relative input URL to parse. If `input` is relative, then `base` is required. If `input` is absolute, the `base` is ignored. If `input` is not a string, it is
436
- * `converted to a string` first.
437
- * @param base The base URL to resolve against if the `input` is not absolute. If `base` is not a string, it is `converted to a string` first.
438
- */
439
- static canParse(input: string, base?: string): boolean;
440
- /**
441
- * Parses a string as a URL. If `base` is provided, it will be used as the base URL for the purpose of resolving non-absolute `input` URLs.
442
- * Returns `null` if `input` is not a valid.
443
- * @param input The absolute or relative input URL to parse. If `input` is relative, then `base` is required. If `input` is absolute, the `base` is ignored. If `input` is not a string, it is
444
- * `converted to a string` first.
445
- * @param base The base URL to resolve against if the `input` is not absolute. If `base` is not a string, it is `converted to a string` first.
446
- * @since v20.18.0
447
- */
448
- static parse(input: string, base?: string): URL | null;
449
- constructor(input: string | { toString: () => string }, base?: string | URL);
450
- /**
451
- * Gets and sets the fragment portion of the URL.
452
- *
453
- * ```js
454
- * const myURL = new URL('https://example.org/foo#bar');
455
- * console.log(myURL.hash);
456
- * // Prints #bar
457
- *
458
- * myURL.hash = 'baz';
459
- * console.log(myURL.href);
460
- * // Prints https://example.org/foo#baz
461
- * ```
462
- *
463
- * Invalid URL characters included in the value assigned to the `hash` property
464
- * are `percent-encoded`. The selection of which characters to
465
- * percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
466
- */
467
- hash: string;
468
- /**
469
- * Gets and sets the host portion of the URL.
470
- *
471
- * ```js
472
- * const myURL = new URL('https://example.org:81/foo');
473
- * console.log(myURL.host);
474
- * // Prints example.org:81
475
- *
476
- * myURL.host = 'example.com:82';
477
- * console.log(myURL.href);
478
- * // Prints https://example.com:82/foo
479
- * ```
480
- *
481
- * Invalid host values assigned to the `host` property are ignored.
482
- */
483
- host: string;
484
- /**
485
- * Gets and sets the host name portion of the URL. The key difference between`url.host` and `url.hostname` is that `url.hostname` does _not_ include the
486
- * port.
487
- *
488
- * ```js
489
- * const myURL = new URL('https://example.org:81/foo');
490
- * console.log(myURL.hostname);
491
- * // Prints example.org
492
- *
493
- * // Setting the hostname does not change the port
494
- * myURL.hostname = 'example.com';
495
- * console.log(myURL.href);
496
- * // Prints https://example.com:81/foo
497
- *
498
- * // Use myURL.host to change the hostname and port
499
- * myURL.host = 'example.org:82';
500
- * console.log(myURL.href);
501
- * // Prints https://example.org:82/foo
502
- * ```
503
- *
504
- * Invalid host name values assigned to the `hostname` property are ignored.
505
- */
506
- hostname: string;
507
- /**
508
- * Gets and sets the serialized URL.
509
- *
510
- * ```js
511
- * const myURL = new URL('https://example.org/foo');
512
- * console.log(myURL.href);
513
- * // Prints https://example.org/foo
514
- *
515
- * myURL.href = 'https://example.com/bar';
516
- * console.log(myURL.href);
517
- * // Prints https://example.com/bar
518
- * ```
519
- *
520
- * Getting the value of the `href` property is equivalent to calling {@link toString}.
521
- *
522
- * Setting the value of this property to a new value is equivalent to creating a
523
- * new `URL` object using `new URL(value)`. Each of the `URL` object's properties will be modified.
524
- *
525
- * If the value assigned to the `href` property is not a valid URL, a `TypeError` will be thrown.
526
- */
527
- href: string;
528
- /**
529
- * Gets the read-only serialization of the URL's origin.
530
- *
531
- * ```js
532
- * const myURL = new URL('https://example.org/foo/bar?baz');
533
- * console.log(myURL.origin);
534
- * // Prints https://example.org
535
- * ```
536
- *
537
- * ```js
538
- * const idnURL = new URL('https://測試');
539
- * console.log(idnURL.origin);
540
- * // Prints https://xn--g6w251d
541
- *
542
- * console.log(idnURL.hostname);
543
- * // Prints xn--g6w251d
544
- * ```
545
- */
546
- readonly origin: string;
547
- /**
548
- * Gets and sets the password portion of the URL.
549
- *
550
- * ```js
551
- * const myURL = new URL('https://abc:xyz@example.com');
552
- * console.log(myURL.password);
553
- * // Prints xyz
554
- *
555
- * myURL.password = '123';
556
- * console.log(myURL.href);
557
- * // Prints https://abc:123@example.com/
558
- * ```
559
- *
560
- * Invalid URL characters included in the value assigned to the `password` property
561
- * are `percent-encoded`. The selection of which characters to
562
- * percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
563
- */
564
- password: string;
565
- /**
566
- * Gets and sets the path portion of the URL.
567
- *
568
- * ```js
569
- * const myURL = new URL('https://example.org/abc/xyz?123');
570
- * console.log(myURL.pathname);
571
- * // Prints /abc/xyz
572
- *
573
- * myURL.pathname = '/abcdef';
574
- * console.log(myURL.href);
575
- * // Prints https://example.org/abcdef?123
576
- * ```
577
- *
578
- * Invalid URL characters included in the value assigned to the `pathname` property are `percent-encoded`. The selection of which characters
579
- * to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
580
- */
581
- pathname: string;
582
- /**
583
- * Gets and sets the port portion of the URL.
584
- *
585
- * The port value may be a number or a string containing a number in the range `0` to `65535` (inclusive). Setting the value to the default port of the `URL` objects given `protocol` will
586
- * result in the `port` value becoming
587
- * the empty string (`''`).
588
- *
589
- * The port value can be an empty string in which case the port depends on
590
- * the protocol/scheme:
591
- *
592
- * <omitted>
593
- *
594
- * Upon assigning a value to the port, the value will first be converted to a
595
- * string using `.toString()`.
596
- *
597
- * If that string is invalid but it begins with a number, the leading number is
598
- * assigned to `port`.
599
- * If the number lies outside the range denoted above, it is ignored.
600
- *
601
- * ```js
602
- * const myURL = new URL('https://example.org:8888');
603
- * console.log(myURL.port);
604
- * // Prints 8888
605
- *
606
- * // Default ports are automatically transformed to the empty string
607
- * // (HTTPS protocol's default port is 443)
608
- * myURL.port = '443';
609
- * console.log(myURL.port);
610
- * // Prints the empty string
611
- * console.log(myURL.href);
612
- * // Prints https://example.org/
613
- *
614
- * myURL.port = 1234;
615
- * console.log(myURL.port);
616
- * // Prints 1234
617
- * console.log(myURL.href);
618
- * // Prints https://example.org:1234/
619
- *
620
- * // Completely invalid port strings are ignored
621
- * myURL.port = 'abcd';
622
- * console.log(myURL.port);
623
- * // Prints 1234
624
- *
625
- * // Leading numbers are treated as a port number
626
- * myURL.port = '5678abcd';
627
- * console.log(myURL.port);
628
- * // Prints 5678
629
- *
630
- * // Non-integers are truncated
631
- * myURL.port = 1234.5678;
632
- * console.log(myURL.port);
633
- * // Prints 1234
634
- *
635
- * // Out-of-range numbers which are not represented in scientific notation
636
- * // will be ignored.
637
- * myURL.port = 1e10; // 10000000000, will be range-checked as described below
638
- * console.log(myURL.port);
639
- * // Prints 1234
640
- * ```
641
- *
642
- * Numbers which contain a decimal point,
643
- * such as floating-point numbers or numbers in scientific notation,
644
- * are not an exception to this rule.
645
- * Leading numbers up to the decimal point will be set as the URL's port,
646
- * assuming they are valid:
647
- *
648
- * ```js
649
- * myURL.port = 4.567e21;
650
- * console.log(myURL.port);
651
- * // Prints 4 (because it is the leading number in the string '4.567e21')
652
- * ```
653
- */
654
- port: string;
655
- /**
656
- * Gets and sets the protocol portion of the URL.
657
- *
658
- * ```js
659
- * const myURL = new URL('https://example.org');
660
- * console.log(myURL.protocol);
661
- * // Prints https:
662
- *
663
- * myURL.protocol = 'ftp';
664
- * console.log(myURL.href);
665
- * // Prints ftp://example.org/
666
- * ```
667
- *
668
- * Invalid URL protocol values assigned to the `protocol` property are ignored.
669
- */
670
- protocol: string;
671
- /**
672
- * Gets and sets the serialized query portion of the URL.
673
- *
674
- * ```js
675
- * const myURL = new URL('https://example.org/abc?123');
676
- * console.log(myURL.search);
677
- * // Prints ?123
678
- *
679
- * myURL.search = 'abc=xyz';
680
- * console.log(myURL.href);
681
- * // Prints https://example.org/abc?abc=xyz
682
- * ```
683
- *
684
- * Any invalid URL characters appearing in the value assigned the `search` property will be `percent-encoded`. The selection of which
685
- * characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
686
- */
687
- search: string;
688
- /**
689
- * Gets the `URLSearchParams` object representing the query parameters of the
690
- * URL. This property is read-only but the `URLSearchParams` object it provides
691
- * can be used to mutate the URL instance; to replace the entirety of query
692
- * parameters of the URL, use the {@link search} setter. See `URLSearchParams` documentation for details.
693
- *
694
- * Use care when using `.searchParams` to modify the `URL` because,
695
- * per the WHATWG specification, the `URLSearchParams` object uses
696
- * different rules to determine which characters to percent-encode. For
697
- * instance, the `URL` object will not percent encode the ASCII tilde (`~`)
698
- * character, while `URLSearchParams` will always encode it:
699
- *
700
- * ```js
701
- * const myURL = new URL('https://example.org/abc?foo=~bar');
702
- *
703
- * console.log(myURL.search); // prints ?foo=~bar
704
- *
705
- * // Modify the URL via searchParams...
706
- * myURL.searchParams.sort();
707
- *
708
- * console.log(myURL.search); // prints ?foo=%7Ebar
709
- * ```
710
- */
711
- readonly searchParams: URLSearchParams;
712
- /**
713
- * Gets and sets the username portion of the URL.
714
- *
715
- * ```js
716
- * const myURL = new URL('https://abc:xyz@example.com');
717
- * console.log(myURL.username);
718
- * // Prints abc
719
- *
720
- * myURL.username = '123';
721
- * console.log(myURL.href);
722
- * // Prints https://123:xyz@example.com/
723
- * ```
724
- *
725
- * Any invalid URL characters appearing in the value assigned the `username` property will be `percent-encoded`. The selection of which
726
- * characters to percent-encode may vary somewhat from what the {@link parse} and {@link format} methods would produce.
727
- */
728
- username: string;
729
- /**
730
- * The `toString()` method on the `URL` object returns the serialized URL. The
731
- * value returned is equivalent to that of {@link href} and {@link toJSON}.
732
- */
733
- toString(): string;
734
- /**
735
- * The `toJSON()` method on the `URL` object returns the serialized URL. The
736
- * value returned is equivalent to that of {@link href} and {@link toString}.
737
- *
738
- * This method is automatically called when an `URL` object is serialized
739
- * with [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify).
740
- *
741
- * ```js
742
- * const myURLs = [
743
- * new URL('https://www.example.com'),
744
- * new URL('https://test.example.org'),
745
- * ];
746
- * console.log(JSON.stringify(myURLs));
747
- * // Prints ["https://www.example.com/","https://test.example.org/"]
748
- * ```
749
- */
750
- toJSON(): string;
751
- }
752
- interface URLSearchParamsIterator<T> extends NodeJS.Iterator<T, NodeJS.BuiltinIteratorReturn, unknown> {
753
- [Symbol.iterator](): URLSearchParamsIterator<T>;
754
- }
755
- /**
756
- * The `URLSearchParams` API provides read and write access to the query of a `URL`. The `URLSearchParams` class can also be used standalone with one of the
757
- * four following constructors.
758
- * The `URLSearchParams` class is also available on the global object.
759
- *
760
- * The WHATWG `URLSearchParams` interface and the `querystring` module have
761
- * similar purpose, but the purpose of the `querystring` module is more
762
- * general, as it allows the customization of delimiter characters (`&#x26;` and `=`).
763
- * On the other hand, this API is designed purely for URL query strings.
764
- *
765
- * ```js
766
- * const myURL = new URL('https://example.org/?abc=123');
767
- * console.log(myURL.searchParams.get('abc'));
768
- * // Prints 123
769
- *
770
- * myURL.searchParams.append('abc', 'xyz');
771
- * console.log(myURL.href);
772
- * // Prints https://example.org/?abc=123&#x26;abc=xyz
773
- *
774
- * myURL.searchParams.delete('abc');
775
- * myURL.searchParams.set('a', 'b');
776
- * console.log(myURL.href);
777
- * // Prints https://example.org/?a=b
778
- *
779
- * const newSearchParams = new URLSearchParams(myURL.searchParams);
780
- * // The above is equivalent to
781
- * // const newSearchParams = new URLSearchParams(myURL.search);
782
- *
783
- * newSearchParams.append('a', 'c');
784
- * console.log(myURL.href);
785
- * // Prints https://example.org/?a=b
786
- * console.log(newSearchParams.toString());
787
- * // Prints a=b&#x26;a=c
788
- *
789
- * // newSearchParams.toString() is implicitly called
790
- * myURL.search = newSearchParams;
791
- * console.log(myURL.href);
792
- * // Prints https://example.org/?a=b&#x26;a=c
793
- * newSearchParams.delete('a');
794
- * console.log(myURL.href);
795
- * // Prints https://example.org/?a=b&#x26;a=c
796
- * ```
797
- * @since v7.5.0, v6.13.0
798
- */
799
- class URLSearchParams implements Iterable<[string, string]> {
800
- constructor(
801
- init?:
802
- | URLSearchParams
803
- | string
804
- | Record<string, string | readonly string[]>
805
- | Iterable<[string, string]>
806
- | ReadonlyArray<[string, string]>,
807
- );
808
- /**
809
- * Append a new name-value pair to the query string.
810
- */
811
- append(name: string, value: string): void;
812
- /**
813
- * If `value` is provided, removes all name-value pairs
814
- * where name is `name` and value is `value`.
815
- *
816
- * If `value` is not provided, removes all name-value pairs whose name is `name`.
817
- */
818
- delete(name: string, value?: string): void;
819
- /**
820
- * Returns an ES6 `Iterator` over each of the name-value pairs in the query.
821
- * Each item of the iterator is a JavaScript `Array`. The first item of the `Array` is the `name`, the second item of the `Array` is the `value`.
822
- *
823
- * Alias for `urlSearchParams[@@iterator]()`.
824
- */
825
- entries(): URLSearchParamsIterator<[string, string]>;
826
- /**
827
- * Iterates over each name-value pair in the query and invokes the given function.
828
- *
829
- * ```js
830
- * const myURL = new URL('https://example.org/?a=b&#x26;c=d');
831
- * myURL.searchParams.forEach((value, name, searchParams) => {
832
- * console.log(name, value, myURL.searchParams === searchParams);
833
- * });
834
- * // Prints:
835
- * // a b true
836
- * // c d true
837
- * ```
838
- * @param fn Invoked for each name-value pair in the query
839
- * @param thisArg To be used as `this` value for when `fn` is called
840
- */
841
- forEach<TThis = this>(
842
- fn: (this: TThis, value: string, name: string, searchParams: URLSearchParams) => void,
843
- thisArg?: TThis,
844
- ): void;
845
- /**
846
- * Returns the value of the first name-value pair whose name is `name`. If there
847
- * are no such pairs, `null` is returned.
848
- * @return or `null` if there is no name-value pair with the given `name`.
849
- */
850
- get(name: string): string | null;
851
- /**
852
- * Returns the values of all name-value pairs whose name is `name`. If there are
853
- * no such pairs, an empty array is returned.
854
- */
855
- getAll(name: string): string[];
856
- /**
857
- * Checks if the `URLSearchParams` object contains key-value pair(s) based on `name` and an optional `value` argument.
858
- *
859
- * If `value` is provided, returns `true` when name-value pair with
860
- * same `name` and `value` exists.
861
- *
862
- * If `value` is not provided, returns `true` if there is at least one name-value
863
- * pair whose name is `name`.
864
- */
865
- has(name: string, value?: string): boolean;
866
- /**
867
- * Returns an ES6 `Iterator` over the names of each name-value pair.
868
- *
869
- * ```js
870
- * const params = new URLSearchParams('foo=bar&#x26;foo=baz');
871
- * for (const name of params.keys()) {
872
- * console.log(name);
873
- * }
874
- * // Prints:
875
- * // foo
876
- * // foo
877
- * ```
878
- */
879
- keys(): URLSearchParamsIterator<string>;
880
- /**
881
- * Sets the value in the `URLSearchParams` object associated with `name` to `value`. If there are any pre-existing name-value pairs whose names are `name`,
882
- * set the first such pair's value to `value` and remove all others. If not,
883
- * append the name-value pair to the query string.
884
- *
885
- * ```js
886
- * const params = new URLSearchParams();
887
- * params.append('foo', 'bar');
888
- * params.append('foo', 'baz');
889
- * params.append('abc', 'def');
890
- * console.log(params.toString());
891
- * // Prints foo=bar&#x26;foo=baz&#x26;abc=def
892
- *
893
- * params.set('foo', 'def');
894
- * params.set('xyz', 'opq');
895
- * console.log(params.toString());
896
- * // Prints foo=def&#x26;abc=def&#x26;xyz=opq
897
- * ```
898
- */
899
- set(name: string, value: string): void;
900
- /**
901
- * The total number of parameter entries.
902
- * @since v19.8.0
903
- */
904
- readonly size: number;
905
- /**
906
- * Sort all existing name-value pairs in-place by their names. Sorting is done
907
- * with a [stable sorting algorithm](https://en.wikipedia.org/wiki/Sorting_algorithm#Stability), so relative order between name-value pairs
908
- * with the same name is preserved.
909
- *
910
- * This method can be used, in particular, to increase cache hits.
911
- *
912
- * ```js
913
- * const params = new URLSearchParams('query[]=abc&#x26;type=search&#x26;query[]=123');
914
- * params.sort();
915
- * console.log(params.toString());
916
- * // Prints query%5B%5D=abc&#x26;query%5B%5D=123&#x26;type=search
917
- * ```
918
- * @since v7.7.0, v6.13.0
919
- */
920
- sort(): void;
921
- /**
922
- * Returns the search parameters serialized as a string, with characters
923
- * percent-encoded where necessary.
924
- */
925
- toString(): string;
926
- /**
927
- * Returns an ES6 `Iterator` over the values of each name-value pair.
928
- */
929
- values(): URLSearchParamsIterator<string>;
930
- [Symbol.iterator](): URLSearchParamsIterator<[string, string]>;
931
- }
932
- import { URL as _URL, URLSearchParams as _URLSearchParams } from "url";
933
- global {
934
- interface URLSearchParams extends _URLSearchParams {}
935
- interface URL extends _URL {}
936
- interface Global {
937
- URL: typeof _URL;
938
- URLSearchParams: typeof _URLSearchParams;
939
- }
940
- /**
941
- * `URL` class is a global reference for `import { URL } from 'node:url'`
942
- * https://nodejs.org/api/url.html#the-whatwg-url-api
943
- * @since v10.0.0
944
- */
945
- var URL: typeof globalThis extends {
946
- onmessage: any;
947
- URL: infer T;
948
- } ? T
949
- : typeof _URL;
950
- /**
951
- * `URLSearchParams` class is a global reference for `import { URLSearchParams } from 'node:url'`
952
- * https://nodejs.org/api/url.html#class-urlsearchparams
953
- * @since v10.0.0
954
- */
955
- var URLSearchParams: typeof globalThis extends {
956
- onmessage: any;
957
- URLSearchParams: infer T;
958
- } ? T
959
- : typeof _URLSearchParams;
960
- }
961
- }
962
- declare module "node:url" {
963
- export * from "url";
964
- }