repoburg 1.3.87 → 1.3.91

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 (568) 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/app.module.d.ts +3 -1
  8. package/backend/dist/src/app.module.js +17 -1
  9. package/backend/dist/src/app.module.js.map +1 -1
  10. package/backend/dist/src/application-state/application-state.controller.js +123 -0
  11. package/backend/dist/src/application-state/application-state.controller.js.map +1 -1
  12. package/backend/dist/src/application-state/application-state.service.d.ts +3 -0
  13. package/backend/dist/src/application-state/application-state.service.js +18 -1
  14. package/backend/dist/src/application-state/application-state.service.js.map +1 -1
  15. package/backend/dist/src/application-state/dto/set-alibaba-config.dto.js +2 -0
  16. package/backend/dist/src/application-state/dto/set-alibaba-config.dto.js.map +1 -1
  17. package/backend/dist/src/application-state/dto/set-auto-context-fetch-enabled.dto.js +4 -0
  18. package/backend/dist/src/application-state/dto/set-auto-context-fetch-enabled.dto.js.map +1 -1
  19. package/backend/dist/src/application-state/dto/set-auto-send-to-ai-studio-enabled.dto.js +2 -0
  20. package/backend/dist/src/application-state/dto/set-auto-send-to-ai-studio-enabled.dto.js.map +1 -1
  21. package/backend/dist/src/application-state/dto/set-context-token-limit.dto.js +6 -0
  22. package/backend/dist/src/application-state/dto/set-context-token-limit.dto.js.map +1 -1
  23. package/backend/dist/src/application-state/dto/set-execution-strategy.dto.js +6 -0
  24. package/backend/dist/src/application-state/dto/set-execution-strategy.dto.js.map +1 -1
  25. package/backend/dist/src/application-state/dto/set-followup-token-limit.dto.js +5 -0
  26. package/backend/dist/src/application-state/dto/set-followup-token-limit.dto.js.map +1 -1
  27. package/backend/dist/src/application-state/dto/set-history-compression-enabled.dto.js +4 -0
  28. package/backend/dist/src/application-state/dto/set-history-compression-enabled.dto.js.map +1 -1
  29. package/backend/dist/src/application-state/dto/set-llm-retry-enabled.dto.js +4 -0
  30. package/backend/dist/src/application-state/dto/set-llm-retry-enabled.dto.js.map +1 -1
  31. package/backend/dist/src/application-state/dto/set-llm-retry-max-attempts.dto.js +6 -0
  32. package/backend/dist/src/application-state/dto/set-llm-retry-max-attempts.dto.js.map +1 -1
  33. package/backend/dist/src/application-state/dto/set-manual-llm-enabled.dto.js +4 -0
  34. package/backend/dist/src/application-state/dto/set-manual-llm-enabled.dto.js.map +1 -1
  35. package/backend/dist/src/application-state/dto/set-openrouter-config.dto.js +2 -0
  36. package/backend/dist/src/application-state/dto/set-openrouter-config.dto.js.map +1 -1
  37. package/backend/dist/src/application-state/dto/set-streaming-enabled.dto.js +2 -0
  38. package/backend/dist/src/application-state/dto/set-streaming-enabled.dto.js.map +1 -1
  39. package/backend/dist/src/application-state/dto/set-syntax-validation-enabled.dto.js +4 -0
  40. package/backend/dist/src/application-state/dto/set-syntax-validation-enabled.dto.js.map +1 -1
  41. package/backend/dist/src/application-state/dto/set-theme.dto.js +6 -0
  42. package/backend/dist/src/application-state/dto/set-theme.dto.js.map +1 -1
  43. package/backend/dist/src/application-state/dto/set-tools-enabled.dto.js +4 -0
  44. package/backend/dist/src/application-state/dto/set-tools-enabled.dto.js.map +1 -1
  45. package/backend/dist/src/application-state/dto/set-websocket-enabled.dto.js +2 -0
  46. package/backend/dist/src/application-state/dto/set-websocket-enabled.dto.js.map +1 -1
  47. package/backend/dist/src/application-state/dto/set-yolo-mode-message.dto.js +5 -0
  48. package/backend/dist/src/application-state/dto/set-yolo-mode-message.dto.js.map +1 -1
  49. package/backend/dist/src/application-state/dto/set-yolo-mode.dto.js +4 -0
  50. package/backend/dist/src/application-state/dto/set-yolo-mode.dto.js.map +1 -1
  51. package/backend/dist/src/application-state/dto/set-zai-config.dto.js +2 -0
  52. package/backend/dist/src/application-state/dto/set-zai-config.dto.js.map +1 -1
  53. package/backend/dist/src/common/cache/etag-cache.service.d.ts +18 -0
  54. package/backend/dist/src/common/cache/etag-cache.service.js +98 -0
  55. package/backend/dist/src/common/cache/etag-cache.service.js.map +1 -0
  56. package/backend/dist/src/common/common.module.d.ts +2 -0
  57. package/backend/dist/src/common/common.module.js +22 -0
  58. package/backend/dist/src/common/common.module.js.map +1 -0
  59. package/backend/dist/src/common/interceptors/etag-cache.interceptor.d.ts +14 -0
  60. package/backend/dist/src/common/interceptors/etag-cache.interceptor.js +69 -0
  61. package/backend/dist/src/common/interceptors/etag-cache.interceptor.js.map +1 -0
  62. package/backend/dist/src/common/middleware/cache.middleware.d.ts +8 -0
  63. package/backend/dist/src/common/middleware/cache.middleware.js +44 -0
  64. package/backend/dist/src/common/middleware/cache.middleware.js.map +1 -0
  65. package/backend/dist/src/context-snippets/context-snippets.controller.js +38 -0
  66. package/backend/dist/src/context-snippets/context-snippets.controller.js.map +1 -1
  67. package/backend/dist/src/context-templates/context-templates.controller.js +104 -0
  68. package/backend/dist/src/context-templates/context-templates.controller.js.map +1 -1
  69. package/backend/dist/src/context-templates/dto/context-template.dto.d.ts +1 -1
  70. package/backend/dist/src/context-templates/dto/context-template.dto.js +44 -1
  71. package/backend/dist/src/context-templates/dto/context-template.dto.js.map +1 -1
  72. package/backend/dist/src/core-entities/ai-action.entity.js +73 -0
  73. package/backend/dist/src/core-entities/ai-action.entity.js.map +1 -1
  74. package/backend/dist/src/core-entities/base.entity.js +18 -0
  75. package/backend/dist/src/core-entities/base.entity.js.map +1 -1
  76. package/backend/dist/src/core-entities/context-snippet.entity.js +12 -0
  77. package/backend/dist/src/core-entities/context-snippet.entity.js.map +1 -1
  78. package/backend/dist/src/core-entities/context-template.entity.d.ts +2 -4
  79. package/backend/dist/src/core-entities/context-template.entity.js +50 -7
  80. package/backend/dist/src/core-entities/context-template.entity.js.map +1 -1
  81. package/backend/dist/src/core-entities/custom-snippet.entity.js +16 -0
  82. package/backend/dist/src/core-entities/custom-snippet.entity.js.map +1 -1
  83. package/backend/dist/src/core-entities/custom-variable.entity.js +24 -0
  84. package/backend/dist/src/core-entities/custom-variable.entity.js.map +1 -1
  85. package/backend/dist/src/core-entities/enums.d.ts +64 -0
  86. package/backend/dist/src/core-entities/enums.js +77 -0
  87. package/backend/dist/src/core-entities/enums.js.map +1 -0
  88. package/backend/dist/src/core-entities/execution-log.entity.js +15 -0
  89. package/backend/dist/src/core-entities/execution-log.entity.js.map +1 -1
  90. package/backend/dist/src/core-entities/index.d.ts +1 -2
  91. package/backend/dist/src/core-entities/index.js +1 -2
  92. package/backend/dist/src/core-entities/index.js.map +1 -1
  93. package/backend/dist/src/core-entities/llm-call-log.entity.js +43 -0
  94. package/backend/dist/src/core-entities/llm-call-log.entity.js.map +1 -1
  95. package/backend/dist/src/core-entities/mcp-config.entity.js +27 -0
  96. package/backend/dist/src/core-entities/mcp-config.entity.js.map +1 -1
  97. package/backend/dist/src/core-entities/mcp-tool.entity.js +26 -0
  98. package/backend/dist/src/core-entities/mcp-tool.entity.js.map +1 -1
  99. package/backend/dist/src/core-entities/project.entity.js +13 -0
  100. package/backend/dist/src/core-entities/project.entity.js.map +1 -1
  101. package/backend/dist/src/core-entities/session-input.entity.js +95 -0
  102. package/backend/dist/src/core-entities/session-input.entity.js.map +1 -1
  103. package/backend/dist/src/core-entities/session.entity.d.ts +1 -1
  104. package/backend/dist/src/core-entities/session.entity.js +96 -1
  105. package/backend/dist/src/core-entities/session.entity.js.map +1 -1
  106. package/backend/dist/src/core-entities/system-prompt.entity.js +29 -0
  107. package/backend/dist/src/core-entities/system-prompt.entity.js.map +1 -1
  108. package/backend/dist/src/core-entities/tool-hook.entity.js +21 -0
  109. package/backend/dist/src/core-entities/tool-hook.entity.js.map +1 -1
  110. package/backend/dist/src/custom-snippets/custom-snippets.controller.js +48 -0
  111. package/backend/dist/src/custom-snippets/custom-snippets.controller.js.map +1 -1
  112. package/backend/dist/src/custom-variables/custom-variables.controller.js +46 -0
  113. package/backend/dist/src/custom-variables/custom-variables.controller.js.map +1 -1
  114. package/backend/dist/src/global-config/global-config.controller.js +12 -0
  115. package/backend/dist/src/global-config/global-config.controller.js.map +1 -1
  116. package/backend/dist/src/global-config/global-config.service.d.ts +1 -0
  117. package/backend/dist/src/global-config/global-config.service.js.map +1 -1
  118. package/backend/dist/src/interactive-chat/streaming.controller.js +38 -0
  119. package/backend/dist/src/interactive-chat/streaming.controller.js.map +1 -1
  120. package/backend/dist/src/llm-call-logs/llm-call-logs.controller.js +96 -0
  121. package/backend/dist/src/llm-call-logs/llm-call-logs.controller.js.map +1 -1
  122. package/backend/dist/src/llm-provider/llm-provider.controller.js +18 -0
  123. package/backend/dist/src/llm-provider/llm-provider.controller.js.map +1 -1
  124. package/backend/dist/src/llm-provider/zai-llm.provider.js +1 -1
  125. package/backend/dist/src/llm-provider/zai-llm.provider.js.map +1 -1
  126. package/backend/dist/src/llm-responses/dto/submit-llm-response.dto.js +45 -0
  127. package/backend/dist/src/llm-responses/dto/submit-llm-response.dto.js.map +1 -1
  128. package/backend/dist/src/llm-responses/dto/sync-conversation.dto.js +24 -0
  129. package/backend/dist/src/llm-responses/dto/sync-conversation.dto.js.map +1 -1
  130. package/backend/dist/src/llm-responses/llm-responses.controller.js +32 -0
  131. package/backend/dist/src/llm-responses/llm-responses.controller.js.map +1 -1
  132. package/backend/dist/src/main.js +9 -0
  133. package/backend/dist/src/main.js.map +1 -1
  134. package/backend/dist/src/mcp/dto/batch-update-mcp-tools.dto.js +8 -0
  135. package/backend/dist/src/mcp/dto/batch-update-mcp-tools.dto.js.map +1 -1
  136. package/backend/dist/src/mcp/dto/create-mcp-config.dto.js +5 -0
  137. package/backend/dist/src/mcp/dto/create-mcp-config.dto.js.map +1 -1
  138. package/backend/dist/src/mcp/dto/update-mcp-config.dto.js +2 -0
  139. package/backend/dist/src/mcp/dto/update-mcp-config.dto.js.map +1 -1
  140. package/backend/dist/src/mcp/mcp.controller.js +21 -0
  141. package/backend/dist/src/mcp/mcp.controller.js.map +1 -1
  142. package/backend/dist/src/projects/dto/project.dto.js +14 -0
  143. package/backend/dist/src/projects/dto/project.dto.js.map +1 -1
  144. package/backend/dist/src/projects/projects.controller.js +31 -0
  145. package/backend/dist/src/projects/projects.controller.js.map +1 -1
  146. package/backend/dist/src/session-inputs/dto/session-input.dto.d.ts +12 -1
  147. package/backend/dist/src/session-inputs/dto/session-input.dto.js +103 -1
  148. package/backend/dist/src/session-inputs/dto/session-input.dto.js.map +1 -1
  149. package/backend/dist/src/session-inputs/session-input.subscriber.js.map +1 -1
  150. package/backend/dist/src/session-inputs/session-inputs.controller.d.ts +2 -1
  151. package/backend/dist/src/session-inputs/session-inputs.controller.js +84 -0
  152. package/backend/dist/src/session-inputs/session-inputs.controller.js.map +1 -1
  153. package/backend/dist/src/session-inputs/session-inputs.module.js +1 -0
  154. package/backend/dist/src/session-inputs/session-inputs.module.js.map +1 -1
  155. package/backend/dist/src/session-inputs/session-inputs.service.d.ts +7 -3
  156. package/backend/dist/src/session-inputs/session-inputs.service.js +51 -4
  157. package/backend/dist/src/session-inputs/session-inputs.service.js.map +1 -1
  158. package/backend/dist/src/sessions/dto/session.dto.js +91 -0
  159. package/backend/dist/src/sessions/dto/session.dto.js.map +1 -1
  160. package/backend/dist/src/sessions/sessions.controller.d.ts +1 -1
  161. package/backend/dist/src/sessions/sessions.controller.js +123 -3
  162. package/backend/dist/src/sessions/sessions.controller.js.map +1 -1
  163. package/backend/dist/src/sessions/sessions.service.d.ts +2 -1
  164. package/backend/dist/src/sessions/sessions.service.js +47 -18
  165. package/backend/dist/src/sessions/sessions.service.js.map +1 -1
  166. package/backend/dist/src/sub-agents/dto/create-sub-agent.dto.js +26 -0
  167. package/backend/dist/src/sub-agents/dto/create-sub-agent.dto.js.map +1 -1
  168. package/backend/dist/src/sub-agents/dto/update-sub-agent.dto.js +22 -0
  169. package/backend/dist/src/sub-agents/dto/update-sub-agent.dto.js.map +1 -1
  170. package/backend/dist/src/sub-agents/sub-agent-run.entity.d.ts +2 -7
  171. package/backend/dist/src/sub-agents/sub-agent-run.entity.js +63 -9
  172. package/backend/dist/src/sub-agents/sub-agent-run.entity.js.map +1 -1
  173. package/backend/dist/src/sub-agents/sub-agent-runs.controller.js +63 -0
  174. package/backend/dist/src/sub-agents/sub-agent-runs.controller.js.map +1 -1
  175. package/backend/dist/src/sub-agents/sub-agent.entity.js +47 -0
  176. package/backend/dist/src/sub-agents/sub-agent.entity.js.map +1 -1
  177. package/backend/dist/src/sub-agents/sub-agents.controller.js +25 -0
  178. package/backend/dist/src/sub-agents/sub-agents.controller.js.map +1 -1
  179. package/backend/dist/src/system-prompts/dto/set-enabled-tools.dto.js +9 -0
  180. package/backend/dist/src/system-prompts/dto/set-enabled-tools.dto.js.map +1 -1
  181. package/backend/dist/src/system-prompts/dto/system-prompt.dto.js +43 -0
  182. package/backend/dist/src/system-prompts/dto/system-prompt.dto.js.map +1 -1
  183. package/backend/dist/src/system-prompts/dto/toggle-tool.dto.js +5 -0
  184. package/backend/dist/src/system-prompts/dto/toggle-tool.dto.js.map +1 -1
  185. package/backend/dist/src/system-prompts/system-prompts.controller.js +80 -0
  186. package/backend/dist/src/system-prompts/system-prompts.controller.js.map +1 -1
  187. package/backend/dist/src/tool-hooks/dto/create-tool-hook.dto.js +14 -0
  188. package/backend/dist/src/tool-hooks/dto/create-tool-hook.dto.js.map +1 -1
  189. package/backend/dist/src/tool-hooks/dto/update-tool-hook.dto.js +11 -0
  190. package/backend/dist/src/tool-hooks/dto/update-tool-hook.dto.js.map +1 -1
  191. package/backend/dist/src/tool-hooks/tool-hooks.controller.js +52 -0
  192. package/backend/dist/src/tool-hooks/tool-hooks.controller.js.map +1 -1
  193. package/backend/dist/src/visual-editor/visual-editor.controller.js +15 -0
  194. package/backend/dist/src/visual-editor/visual-editor.controller.js.map +1 -1
  195. package/backend/dist/src/workspace/workspace.controller.js +41 -0
  196. package/backend/dist/src/workspace/workspace.controller.js.map +1 -1
  197. package/backend/dist/tsconfig.build.tsbuildinfo +1 -1
  198. package/{daemon/node_modules/undici-types → backend/node_modules/@eslint/eslintrc}/LICENSE +5 -7
  199. package/backend/node_modules/@eslint/eslintrc/README.md +115 -0
  200. package/backend/node_modules/@eslint/eslintrc/conf/config-schema.js +79 -0
  201. package/backend/node_modules/@eslint/eslintrc/conf/environments.js +215 -0
  202. package/backend/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs +1104 -0
  203. package/backend/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs.map +1 -0
  204. package/backend/node_modules/@eslint/eslintrc/dist/eslintrc.cjs +4344 -0
  205. package/backend/node_modules/@eslint/eslintrc/dist/eslintrc.cjs.map +1 -0
  206. package/backend/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js +532 -0
  207. package/backend/node_modules/@eslint/eslintrc/lib/config-array/config-array.js +523 -0
  208. package/backend/node_modules/@eslint/eslintrc/lib/config-array/config-dependency.js +124 -0
  209. package/backend/node_modules/@eslint/eslintrc/lib/config-array/extracted-config.js +145 -0
  210. package/backend/node_modules/@eslint/eslintrc/lib/config-array/ignore-pattern.js +238 -0
  211. package/backend/node_modules/@eslint/eslintrc/lib/config-array/index.js +19 -0
  212. package/backend/node_modules/@eslint/eslintrc/lib/config-array/override-tester.js +225 -0
  213. package/backend/node_modules/@eslint/eslintrc/lib/config-array-factory.js +1151 -0
  214. package/backend/node_modules/@eslint/eslintrc/lib/flat-compat.js +318 -0
  215. package/backend/node_modules/@eslint/eslintrc/lib/index-universal.js +29 -0
  216. package/backend/node_modules/@eslint/eslintrc/lib/index.js +56 -0
  217. package/backend/node_modules/@eslint/eslintrc/lib/shared/ajv.js +191 -0
  218. package/backend/node_modules/@eslint/eslintrc/lib/shared/config-ops.js +135 -0
  219. package/backend/node_modules/@eslint/eslintrc/lib/shared/config-validator.js +325 -0
  220. package/backend/node_modules/@eslint/eslintrc/lib/shared/deprecation-warnings.js +63 -0
  221. package/backend/node_modules/@eslint/eslintrc/lib/shared/naming.js +96 -0
  222. package/backend/node_modules/@eslint/eslintrc/lib/shared/relative-module-resolver.js +42 -0
  223. package/backend/node_modules/@eslint/eslintrc/lib/shared/types.js +149 -0
  224. package/backend/node_modules/@eslint/eslintrc/package.json +82 -0
  225. package/backend/node_modules/@eslint/eslintrc/universal.js +9 -0
  226. package/backend/package.json +2 -4
  227. package/daemon/dist/api/system.js +25 -0
  228. package/daemon/dist/daemon.blob +0 -0
  229. package/daemon/dist/index.js +0 -0
  230. package/package.json +3 -1
  231. package/visual-editor-proxy/.repoburg/data.sqlite +0 -0
  232. package/visual-editor-proxy/dist/tsconfig.tsbuildinfo +1 -1
  233. package/backend/node_modules/@types/node/LICENSE +0 -21
  234. package/backend/node_modules/@types/node/README.md +0 -15
  235. package/backend/node_modules/@types/node/assert/strict.d.ts +0 -8
  236. package/backend/node_modules/@types/node/assert.d.ts +0 -1044
  237. package/backend/node_modules/@types/node/async_hooks.d.ts +0 -605
  238. package/backend/node_modules/@types/node/buffer.buffer.d.ts +0 -462
  239. package/backend/node_modules/@types/node/buffer.d.ts +0 -1932
  240. package/backend/node_modules/@types/node/child_process.d.ts +0 -1452
  241. package/backend/node_modules/@types/node/cluster.d.ts +0 -578
  242. package/backend/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
  243. package/backend/node_modules/@types/node/compatibility/index.d.ts +0 -9
  244. package/backend/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
  245. package/backend/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
  246. package/backend/node_modules/@types/node/console.d.ts +0 -452
  247. package/backend/node_modules/@types/node/constants.d.ts +0 -21
  248. package/backend/node_modules/@types/node/crypto.d.ts +0 -4570
  249. package/backend/node_modules/@types/node/dgram.d.ts +0 -596
  250. package/backend/node_modules/@types/node/diagnostics_channel.d.ts +0 -578
  251. package/backend/node_modules/@types/node/dns/promises.d.ts +0 -479
  252. package/backend/node_modules/@types/node/dns.d.ts +0 -871
  253. package/backend/node_modules/@types/node/domain.d.ts +0 -170
  254. package/backend/node_modules/@types/node/events.d.ts +0 -931
  255. package/backend/node_modules/@types/node/fs/promises.d.ts +0 -1248
  256. package/backend/node_modules/@types/node/fs.d.ts +0 -4362
  257. package/backend/node_modules/@types/node/globals.d.ts +0 -170
  258. package/backend/node_modules/@types/node/globals.typedarray.d.ts +0 -21
  259. package/backend/node_modules/@types/node/http.d.ts +0 -2031
  260. package/backend/node_modules/@types/node/http2.d.ts +0 -2623
  261. package/backend/node_modules/@types/node/https.d.ts +0 -549
  262. package/backend/node_modules/@types/node/index.d.ts +0 -93
  263. package/backend/node_modules/@types/node/inspector.generated.d.ts +0 -3966
  264. package/backend/node_modules/@types/node/module.d.ts +0 -539
  265. package/backend/node_modules/@types/node/net.d.ts +0 -1011
  266. package/backend/node_modules/@types/node/os.d.ts +0 -495
  267. package/backend/node_modules/@types/node/package.json +0 -140
  268. package/backend/node_modules/@types/node/path.d.ts +0 -200
  269. package/backend/node_modules/@types/node/perf_hooks.d.ts +0 -963
  270. package/backend/node_modules/@types/node/process.d.ts +0 -1956
  271. package/backend/node_modules/@types/node/punycode.d.ts +0 -117
  272. package/backend/node_modules/@types/node/querystring.d.ts +0 -152
  273. package/backend/node_modules/@types/node/readline/promises.d.ts +0 -162
  274. package/backend/node_modules/@types/node/readline.d.ts +0 -589
  275. package/backend/node_modules/@types/node/repl.d.ts +0 -430
  276. package/backend/node_modules/@types/node/sea.d.ts +0 -153
  277. package/backend/node_modules/@types/node/stream/consumers.d.ts +0 -38
  278. package/backend/node_modules/@types/node/stream/promises.d.ts +0 -90
  279. package/backend/node_modules/@types/node/stream/web.d.ts +0 -533
  280. package/backend/node_modules/@types/node/stream.d.ts +0 -1668
  281. package/backend/node_modules/@types/node/string_decoder.d.ts +0 -67
  282. package/backend/node_modules/@types/node/test.d.ts +0 -1807
  283. package/backend/node_modules/@types/node/timers/promises.d.ts +0 -108
  284. package/backend/node_modules/@types/node/timers.d.ts +0 -286
  285. package/backend/node_modules/@types/node/tls.d.ts +0 -1231
  286. package/backend/node_modules/@types/node/trace_events.d.ts +0 -197
  287. package/backend/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -460
  288. package/backend/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -19
  289. package/backend/node_modules/@types/node/ts5.6/index.d.ts +0 -93
  290. package/backend/node_modules/@types/node/tty.d.ts +0 -208
  291. package/backend/node_modules/@types/node/url.d.ts +0 -964
  292. package/backend/node_modules/@types/node/util.d.ts +0 -2331
  293. package/backend/node_modules/@types/node/v8.d.ts +0 -808
  294. package/backend/node_modules/@types/node/vm.d.ts +0 -1030
  295. package/backend/node_modules/@types/node/wasi.d.ts +0 -181
  296. package/backend/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -34
  297. package/backend/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
  298. package/backend/node_modules/@types/node/web-globals/events.d.ts +0 -94
  299. package/backend/node_modules/@types/node/web-globals/fetch.d.ts +0 -46
  300. package/backend/node_modules/@types/node/worker_threads.d.ts +0 -743
  301. package/backend/node_modules/@types/node/zlib.d.ts +0 -539
  302. package/backend/node_modules/debug/LICENSE +0 -20
  303. package/backend/node_modules/debug/README.md +0 -481
  304. package/backend/node_modules/debug/package.json +0 -64
  305. package/backend/node_modules/debug/src/browser.js +0 -272
  306. package/backend/node_modules/debug/src/common.js +0 -292
  307. package/backend/node_modules/debug/src/index.js +0 -10
  308. package/backend/node_modules/debug/src/node.js +0 -263
  309. package/backend/node_modules/undici-types/LICENSE +0 -21
  310. package/backend/node_modules/undici-types/README.md +0 -6
  311. package/backend/node_modules/undici-types/agent.d.ts +0 -31
  312. package/backend/node_modules/undici-types/api.d.ts +0 -43
  313. package/backend/node_modules/undici-types/balanced-pool.d.ts +0 -29
  314. package/backend/node_modules/undici-types/cache.d.ts +0 -36
  315. package/backend/node_modules/undici-types/client.d.ts +0 -108
  316. package/backend/node_modules/undici-types/connector.d.ts +0 -34
  317. package/backend/node_modules/undici-types/content-type.d.ts +0 -21
  318. package/backend/node_modules/undici-types/cookies.d.ts +0 -28
  319. package/backend/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
  320. package/backend/node_modules/undici-types/dispatcher.d.ts +0 -256
  321. package/backend/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
  322. package/backend/node_modules/undici-types/errors.d.ts +0 -149
  323. package/backend/node_modules/undici-types/eventsource.d.ts +0 -61
  324. package/backend/node_modules/undici-types/fetch.d.ts +0 -209
  325. package/backend/node_modules/undici-types/file.d.ts +0 -39
  326. package/backend/node_modules/undici-types/filereader.d.ts +0 -54
  327. package/backend/node_modules/undici-types/formdata.d.ts +0 -108
  328. package/backend/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  329. package/backend/node_modules/undici-types/global-origin.d.ts +0 -7
  330. package/backend/node_modules/undici-types/handlers.d.ts +0 -15
  331. package/backend/node_modules/undici-types/header.d.ts +0 -4
  332. package/backend/node_modules/undici-types/index.d.ts +0 -71
  333. package/backend/node_modules/undici-types/interceptors.d.ts +0 -17
  334. package/backend/node_modules/undici-types/mock-agent.d.ts +0 -50
  335. package/backend/node_modules/undici-types/mock-client.d.ts +0 -25
  336. package/backend/node_modules/undici-types/mock-errors.d.ts +0 -12
  337. package/backend/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  338. package/backend/node_modules/undici-types/mock-pool.d.ts +0 -25
  339. package/backend/node_modules/undici-types/package.json +0 -55
  340. package/backend/node_modules/undici-types/patch.d.ts +0 -33
  341. package/backend/node_modules/undici-types/pool-stats.d.ts +0 -19
  342. package/backend/node_modules/undici-types/pool.d.ts +0 -39
  343. package/backend/node_modules/undici-types/proxy-agent.d.ts +0 -28
  344. package/backend/node_modules/undici-types/readable.d.ts +0 -65
  345. package/backend/node_modules/undici-types/retry-agent.d.ts +0 -8
  346. package/backend/node_modules/undici-types/retry-handler.d.ts +0 -116
  347. package/backend/node_modules/undici-types/util.d.ts +0 -18
  348. package/backend/node_modules/undici-types/webidl.d.ts +0 -228
  349. package/backend/node_modules/undici-types/websocket.d.ts +0 -150
  350. package/daemon/node_modules/@types/node/LICENSE +0 -21
  351. package/daemon/node_modules/@types/node/README.md +0 -15
  352. package/daemon/node_modules/@types/node/assert/strict.d.ts +0 -8
  353. package/daemon/node_modules/@types/node/assert.d.ts +0 -1044
  354. package/daemon/node_modules/@types/node/async_hooks.d.ts +0 -605
  355. package/daemon/node_modules/@types/node/buffer.buffer.d.ts +0 -462
  356. package/daemon/node_modules/@types/node/buffer.d.ts +0 -1932
  357. package/daemon/node_modules/@types/node/child_process.d.ts +0 -1452
  358. package/daemon/node_modules/@types/node/cluster.d.ts +0 -578
  359. package/daemon/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
  360. package/daemon/node_modules/@types/node/compatibility/index.d.ts +0 -9
  361. package/daemon/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
  362. package/daemon/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
  363. package/daemon/node_modules/@types/node/console.d.ts +0 -452
  364. package/daemon/node_modules/@types/node/constants.d.ts +0 -21
  365. package/daemon/node_modules/@types/node/crypto.d.ts +0 -4570
  366. package/daemon/node_modules/@types/node/dgram.d.ts +0 -596
  367. package/daemon/node_modules/@types/node/diagnostics_channel.d.ts +0 -578
  368. package/daemon/node_modules/@types/node/dns/promises.d.ts +0 -479
  369. package/daemon/node_modules/@types/node/dns.d.ts +0 -871
  370. package/daemon/node_modules/@types/node/domain.d.ts +0 -170
  371. package/daemon/node_modules/@types/node/events.d.ts +0 -931
  372. package/daemon/node_modules/@types/node/fs/promises.d.ts +0 -1248
  373. package/daemon/node_modules/@types/node/fs.d.ts +0 -4362
  374. package/daemon/node_modules/@types/node/globals.d.ts +0 -170
  375. package/daemon/node_modules/@types/node/globals.typedarray.d.ts +0 -21
  376. package/daemon/node_modules/@types/node/http.d.ts +0 -2031
  377. package/daemon/node_modules/@types/node/http2.d.ts +0 -2623
  378. package/daemon/node_modules/@types/node/https.d.ts +0 -549
  379. package/daemon/node_modules/@types/node/index.d.ts +0 -93
  380. package/daemon/node_modules/@types/node/inspector.generated.d.ts +0 -3966
  381. package/daemon/node_modules/@types/node/module.d.ts +0 -539
  382. package/daemon/node_modules/@types/node/net.d.ts +0 -1011
  383. package/daemon/node_modules/@types/node/os.d.ts +0 -495
  384. package/daemon/node_modules/@types/node/package.json +0 -140
  385. package/daemon/node_modules/@types/node/path.d.ts +0 -200
  386. package/daemon/node_modules/@types/node/perf_hooks.d.ts +0 -963
  387. package/daemon/node_modules/@types/node/process.d.ts +0 -1956
  388. package/daemon/node_modules/@types/node/punycode.d.ts +0 -117
  389. package/daemon/node_modules/@types/node/querystring.d.ts +0 -152
  390. package/daemon/node_modules/@types/node/readline/promises.d.ts +0 -162
  391. package/daemon/node_modules/@types/node/readline.d.ts +0 -589
  392. package/daemon/node_modules/@types/node/repl.d.ts +0 -430
  393. package/daemon/node_modules/@types/node/sea.d.ts +0 -153
  394. package/daemon/node_modules/@types/node/stream/consumers.d.ts +0 -38
  395. package/daemon/node_modules/@types/node/stream/promises.d.ts +0 -90
  396. package/daemon/node_modules/@types/node/stream/web.d.ts +0 -533
  397. package/daemon/node_modules/@types/node/stream.d.ts +0 -1668
  398. package/daemon/node_modules/@types/node/string_decoder.d.ts +0 -67
  399. package/daemon/node_modules/@types/node/test.d.ts +0 -1807
  400. package/daemon/node_modules/@types/node/timers/promises.d.ts +0 -108
  401. package/daemon/node_modules/@types/node/timers.d.ts +0 -286
  402. package/daemon/node_modules/@types/node/tls.d.ts +0 -1231
  403. package/daemon/node_modules/@types/node/trace_events.d.ts +0 -197
  404. package/daemon/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -460
  405. package/daemon/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -19
  406. package/daemon/node_modules/@types/node/ts5.6/index.d.ts +0 -93
  407. package/daemon/node_modules/@types/node/tty.d.ts +0 -208
  408. package/daemon/node_modules/@types/node/url.d.ts +0 -964
  409. package/daemon/node_modules/@types/node/util.d.ts +0 -2331
  410. package/daemon/node_modules/@types/node/v8.d.ts +0 -808
  411. package/daemon/node_modules/@types/node/vm.d.ts +0 -1030
  412. package/daemon/node_modules/@types/node/wasi.d.ts +0 -181
  413. package/daemon/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -34
  414. package/daemon/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
  415. package/daemon/node_modules/@types/node/web-globals/events.d.ts +0 -94
  416. package/daemon/node_modules/@types/node/web-globals/fetch.d.ts +0 -46
  417. package/daemon/node_modules/@types/node/worker_threads.d.ts +0 -743
  418. package/daemon/node_modules/@types/node/zlib.d.ts +0 -539
  419. package/daemon/node_modules/undici-types/README.md +0 -6
  420. package/daemon/node_modules/undici-types/agent.d.ts +0 -31
  421. package/daemon/node_modules/undici-types/api.d.ts +0 -43
  422. package/daemon/node_modules/undici-types/balanced-pool.d.ts +0 -29
  423. package/daemon/node_modules/undici-types/cache.d.ts +0 -36
  424. package/daemon/node_modules/undici-types/client.d.ts +0 -108
  425. package/daemon/node_modules/undici-types/connector.d.ts +0 -34
  426. package/daemon/node_modules/undici-types/content-type.d.ts +0 -21
  427. package/daemon/node_modules/undici-types/cookies.d.ts +0 -28
  428. package/daemon/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
  429. package/daemon/node_modules/undici-types/dispatcher.d.ts +0 -256
  430. package/daemon/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
  431. package/daemon/node_modules/undici-types/errors.d.ts +0 -149
  432. package/daemon/node_modules/undici-types/eventsource.d.ts +0 -61
  433. package/daemon/node_modules/undici-types/fetch.d.ts +0 -209
  434. package/daemon/node_modules/undici-types/file.d.ts +0 -39
  435. package/daemon/node_modules/undici-types/filereader.d.ts +0 -54
  436. package/daemon/node_modules/undici-types/formdata.d.ts +0 -108
  437. package/daemon/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  438. package/daemon/node_modules/undici-types/global-origin.d.ts +0 -7
  439. package/daemon/node_modules/undici-types/handlers.d.ts +0 -15
  440. package/daemon/node_modules/undici-types/header.d.ts +0 -4
  441. package/daemon/node_modules/undici-types/index.d.ts +0 -71
  442. package/daemon/node_modules/undici-types/interceptors.d.ts +0 -17
  443. package/daemon/node_modules/undici-types/mock-agent.d.ts +0 -50
  444. package/daemon/node_modules/undici-types/mock-client.d.ts +0 -25
  445. package/daemon/node_modules/undici-types/mock-errors.d.ts +0 -12
  446. package/daemon/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  447. package/daemon/node_modules/undici-types/mock-pool.d.ts +0 -25
  448. package/daemon/node_modules/undici-types/package.json +0 -55
  449. package/daemon/node_modules/undici-types/patch.d.ts +0 -33
  450. package/daemon/node_modules/undici-types/pool-stats.d.ts +0 -19
  451. package/daemon/node_modules/undici-types/pool.d.ts +0 -39
  452. package/daemon/node_modules/undici-types/proxy-agent.d.ts +0 -28
  453. package/daemon/node_modules/undici-types/readable.d.ts +0 -65
  454. package/daemon/node_modules/undici-types/retry-agent.d.ts +0 -8
  455. package/daemon/node_modules/undici-types/retry-handler.d.ts +0 -116
  456. package/daemon/node_modules/undici-types/util.d.ts +0 -18
  457. package/daemon/node_modules/undici-types/webidl.d.ts +0 -228
  458. package/daemon/node_modules/undici-types/websocket.d.ts +0 -150
  459. package/visual-editor-proxy/node_modules/@types/node/LICENSE +0 -21
  460. package/visual-editor-proxy/node_modules/@types/node/README.md +0 -15
  461. package/visual-editor-proxy/node_modules/@types/node/assert/strict.d.ts +0 -8
  462. package/visual-editor-proxy/node_modules/@types/node/assert.d.ts +0 -1062
  463. package/visual-editor-proxy/node_modules/@types/node/async_hooks.d.ts +0 -605
  464. package/visual-editor-proxy/node_modules/@types/node/buffer.buffer.d.ts +0 -462
  465. package/visual-editor-proxy/node_modules/@types/node/buffer.d.ts +0 -1932
  466. package/visual-editor-proxy/node_modules/@types/node/child_process.d.ts +0 -1458
  467. package/visual-editor-proxy/node_modules/@types/node/cluster.d.ts +0 -577
  468. package/visual-editor-proxy/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
  469. package/visual-editor-proxy/node_modules/@types/node/compatibility/index.d.ts +0 -9
  470. package/visual-editor-proxy/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
  471. package/visual-editor-proxy/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
  472. package/visual-editor-proxy/node_modules/@types/node/console.d.ts +0 -452
  473. package/visual-editor-proxy/node_modules/@types/node/constants.d.ts +0 -21
  474. package/visual-editor-proxy/node_modules/@types/node/crypto.d.ts +0 -4570
  475. package/visual-editor-proxy/node_modules/@types/node/dgram.d.ts +0 -596
  476. package/visual-editor-proxy/node_modules/@types/node/diagnostics_channel.d.ts +0 -578
  477. package/visual-editor-proxy/node_modules/@types/node/dns/promises.d.ts +0 -479
  478. package/visual-editor-proxy/node_modules/@types/node/dns.d.ts +0 -871
  479. package/visual-editor-proxy/node_modules/@types/node/domain.d.ts +0 -170
  480. package/visual-editor-proxy/node_modules/@types/node/events.d.ts +0 -977
  481. package/visual-editor-proxy/node_modules/@types/node/fs/promises.d.ts +0 -1248
  482. package/visual-editor-proxy/node_modules/@types/node/fs.d.ts +0 -4362
  483. package/visual-editor-proxy/node_modules/@types/node/globals.d.ts +0 -172
  484. package/visual-editor-proxy/node_modules/@types/node/globals.typedarray.d.ts +0 -21
  485. package/visual-editor-proxy/node_modules/@types/node/http.d.ts +0 -2030
  486. package/visual-editor-proxy/node_modules/@types/node/http2.d.ts +0 -2624
  487. package/visual-editor-proxy/node_modules/@types/node/https.d.ts +0 -546
  488. package/visual-editor-proxy/node_modules/@types/node/index.d.ts +0 -93
  489. package/visual-editor-proxy/node_modules/@types/node/inspector.generated.d.ts +0 -3966
  490. package/visual-editor-proxy/node_modules/@types/node/module.d.ts +0 -539
  491. package/visual-editor-proxy/node_modules/@types/node/net.d.ts +0 -1011
  492. package/visual-editor-proxy/node_modules/@types/node/os.d.ts +0 -505
  493. package/visual-editor-proxy/node_modules/@types/node/package.json +0 -140
  494. package/visual-editor-proxy/node_modules/@types/node/path.d.ts +0 -200
  495. package/visual-editor-proxy/node_modules/@types/node/perf_hooks.d.ts +0 -961
  496. package/visual-editor-proxy/node_modules/@types/node/process.d.ts +0 -1944
  497. package/visual-editor-proxy/node_modules/@types/node/punycode.d.ts +0 -117
  498. package/visual-editor-proxy/node_modules/@types/node/querystring.d.ts +0 -152
  499. package/visual-editor-proxy/node_modules/@types/node/readline/promises.d.ts +0 -162
  500. package/visual-editor-proxy/node_modules/@types/node/readline.d.ts +0 -589
  501. package/visual-editor-proxy/node_modules/@types/node/repl.d.ts +0 -430
  502. package/visual-editor-proxy/node_modules/@types/node/sea.d.ts +0 -153
  503. package/visual-editor-proxy/node_modules/@types/node/stream/consumers.d.ts +0 -38
  504. package/visual-editor-proxy/node_modules/@types/node/stream/promises.d.ts +0 -90
  505. package/visual-editor-proxy/node_modules/@types/node/stream/web.d.ts +0 -533
  506. package/visual-editor-proxy/node_modules/@types/node/stream.d.ts +0 -1675
  507. package/visual-editor-proxy/node_modules/@types/node/string_decoder.d.ts +0 -67
  508. package/visual-editor-proxy/node_modules/@types/node/test.d.ts +0 -1787
  509. package/visual-editor-proxy/node_modules/@types/node/timers/promises.d.ts +0 -108
  510. package/visual-editor-proxy/node_modules/@types/node/timers.d.ts +0 -286
  511. package/visual-editor-proxy/node_modules/@types/node/tls.d.ts +0 -1231
  512. package/visual-editor-proxy/node_modules/@types/node/trace_events.d.ts +0 -197
  513. package/visual-editor-proxy/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -460
  514. package/visual-editor-proxy/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -19
  515. package/visual-editor-proxy/node_modules/@types/node/ts5.6/index.d.ts +0 -93
  516. package/visual-editor-proxy/node_modules/@types/node/tty.d.ts +0 -208
  517. package/visual-editor-proxy/node_modules/@types/node/url.d.ts +0 -964
  518. package/visual-editor-proxy/node_modules/@types/node/util.d.ts +0 -2331
  519. package/visual-editor-proxy/node_modules/@types/node/v8.d.ts +0 -808
  520. package/visual-editor-proxy/node_modules/@types/node/vm.d.ts +0 -1000
  521. package/visual-editor-proxy/node_modules/@types/node/wasi.d.ts +0 -181
  522. package/visual-editor-proxy/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -34
  523. package/visual-editor-proxy/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
  524. package/visual-editor-proxy/node_modules/@types/node/web-globals/events.d.ts +0 -97
  525. package/visual-editor-proxy/node_modules/@types/node/web-globals/fetch.d.ts +0 -46
  526. package/visual-editor-proxy/node_modules/@types/node/worker_threads.d.ts +0 -715
  527. package/visual-editor-proxy/node_modules/@types/node/zlib.d.ts +0 -539
  528. package/visual-editor-proxy/node_modules/undici-types/LICENSE +0 -21
  529. package/visual-editor-proxy/node_modules/undici-types/README.md +0 -6
  530. package/visual-editor-proxy/node_modules/undici-types/agent.d.ts +0 -31
  531. package/visual-editor-proxy/node_modules/undici-types/api.d.ts +0 -43
  532. package/visual-editor-proxy/node_modules/undici-types/balanced-pool.d.ts +0 -29
  533. package/visual-editor-proxy/node_modules/undici-types/cache.d.ts +0 -36
  534. package/visual-editor-proxy/node_modules/undici-types/client.d.ts +0 -108
  535. package/visual-editor-proxy/node_modules/undici-types/connector.d.ts +0 -34
  536. package/visual-editor-proxy/node_modules/undici-types/content-type.d.ts +0 -21
  537. package/visual-editor-proxy/node_modules/undici-types/cookies.d.ts +0 -28
  538. package/visual-editor-proxy/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
  539. package/visual-editor-proxy/node_modules/undici-types/dispatcher.d.ts +0 -256
  540. package/visual-editor-proxy/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
  541. package/visual-editor-proxy/node_modules/undici-types/errors.d.ts +0 -149
  542. package/visual-editor-proxy/node_modules/undici-types/eventsource.d.ts +0 -61
  543. package/visual-editor-proxy/node_modules/undici-types/fetch.d.ts +0 -209
  544. package/visual-editor-proxy/node_modules/undici-types/file.d.ts +0 -39
  545. package/visual-editor-proxy/node_modules/undici-types/filereader.d.ts +0 -54
  546. package/visual-editor-proxy/node_modules/undici-types/formdata.d.ts +0 -108
  547. package/visual-editor-proxy/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  548. package/visual-editor-proxy/node_modules/undici-types/global-origin.d.ts +0 -7
  549. package/visual-editor-proxy/node_modules/undici-types/handlers.d.ts +0 -15
  550. package/visual-editor-proxy/node_modules/undici-types/header.d.ts +0 -4
  551. package/visual-editor-proxy/node_modules/undici-types/index.d.ts +0 -71
  552. package/visual-editor-proxy/node_modules/undici-types/interceptors.d.ts +0 -17
  553. package/visual-editor-proxy/node_modules/undici-types/mock-agent.d.ts +0 -50
  554. package/visual-editor-proxy/node_modules/undici-types/mock-client.d.ts +0 -25
  555. package/visual-editor-proxy/node_modules/undici-types/mock-errors.d.ts +0 -12
  556. package/visual-editor-proxy/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  557. package/visual-editor-proxy/node_modules/undici-types/mock-pool.d.ts +0 -25
  558. package/visual-editor-proxy/node_modules/undici-types/package.json +0 -55
  559. package/visual-editor-proxy/node_modules/undici-types/patch.d.ts +0 -33
  560. package/visual-editor-proxy/node_modules/undici-types/pool-stats.d.ts +0 -19
  561. package/visual-editor-proxy/node_modules/undici-types/pool.d.ts +0 -39
  562. package/visual-editor-proxy/node_modules/undici-types/proxy-agent.d.ts +0 -28
  563. package/visual-editor-proxy/node_modules/undici-types/readable.d.ts +0 -65
  564. package/visual-editor-proxy/node_modules/undici-types/retry-agent.d.ts +0 -8
  565. package/visual-editor-proxy/node_modules/undici-types/retry-handler.d.ts +0 -116
  566. package/visual-editor-proxy/node_modules/undici-types/util.d.ts +0 -18
  567. package/visual-editor-proxy/node_modules/undici-types/webidl.d.ts +0 -228
  568. package/visual-editor-proxy/node_modules/undici-types/websocket.d.ts +0 -150
@@ -1,1011 +0,0 @@
1
- /**
2
- * > Stability: 2 - Stable
3
- *
4
- * The `node:net` module provides an asynchronous network API for creating stream-based
5
- * TCP or `IPC` servers ({@link createServer}) and clients
6
- * ({@link createConnection}).
7
- *
8
- * It can be accessed using:
9
- *
10
- * ```js
11
- * import net from 'node:net';
12
- * ```
13
- * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/net.js)
14
- */
15
- declare module "net" {
16
- import * as stream from "node:stream";
17
- import { Abortable, EventEmitter } from "node:events";
18
- import * as dns from "node:dns";
19
- type LookupFunction = (
20
- hostname: string,
21
- options: dns.LookupOptions,
22
- callback: (err: NodeJS.ErrnoException | null, address: string | dns.LookupAddress[], family?: number) => void,
23
- ) => void;
24
- interface AddressInfo {
25
- address: string;
26
- family: string;
27
- port: number;
28
- }
29
- interface SocketConstructorOpts {
30
- fd?: number | undefined;
31
- allowHalfOpen?: boolean | undefined;
32
- readable?: boolean | undefined;
33
- writable?: boolean | undefined;
34
- signal?: AbortSignal | undefined;
35
- }
36
- interface OnReadOpts {
37
- buffer: Uint8Array | (() => Uint8Array);
38
- /**
39
- * This function is called for every chunk of incoming data.
40
- * Two arguments are passed to it: the number of bytes written to buffer and a reference to buffer.
41
- * Return false from this function to implicitly pause() the socket.
42
- */
43
- callback(bytesWritten: number, buf: Uint8Array): boolean;
44
- }
45
- interface ConnectOpts {
46
- /**
47
- * If specified, incoming data is stored in a single buffer and passed to the supplied callback when data arrives on the socket.
48
- * Note: this will cause the streaming functionality to not provide any data, however events like 'error', 'end', and 'close' will
49
- * still be emitted as normal and methods like pause() and resume() will also behave as expected.
50
- */
51
- onread?: OnReadOpts | undefined;
52
- }
53
- interface TcpSocketConnectOpts extends ConnectOpts {
54
- port: number;
55
- host?: string | undefined;
56
- localAddress?: string | undefined;
57
- localPort?: number | undefined;
58
- hints?: number | undefined;
59
- family?: number | undefined;
60
- lookup?: LookupFunction | undefined;
61
- noDelay?: boolean | undefined;
62
- keepAlive?: boolean | undefined;
63
- keepAliveInitialDelay?: number | undefined;
64
- /**
65
- * @since v18.13.0
66
- */
67
- autoSelectFamily?: boolean | undefined;
68
- /**
69
- * @since v18.13.0
70
- */
71
- autoSelectFamilyAttemptTimeout?: number | undefined;
72
- }
73
- interface IpcSocketConnectOpts extends ConnectOpts {
74
- path: string;
75
- }
76
- type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts;
77
- type SocketReadyState = "opening" | "open" | "readOnly" | "writeOnly" | "closed";
78
- /**
79
- * This class is an abstraction of a TCP socket or a streaming `IPC` endpoint
80
- * (uses named pipes on Windows, and Unix domain sockets otherwise). It is also
81
- * an `EventEmitter`.
82
- *
83
- * A `net.Socket` can be created by the user and used directly to interact with
84
- * a server. For example, it is returned by {@link createConnection},
85
- * so the user can use it to talk to the server.
86
- *
87
- * It can also be created by Node.js and passed to the user when a connection
88
- * is received. For example, it is passed to the listeners of a `'connection'` event emitted on a {@link Server}, so the user can use
89
- * it to interact with the client.
90
- * @since v0.3.4
91
- */
92
- class Socket extends stream.Duplex {
93
- constructor(options?: SocketConstructorOpts);
94
- /**
95
- * Destroys the socket after all data is written. If the `finish` event was already emitted the socket is destroyed immediately.
96
- * If the socket is still writable it implicitly calls `socket.end()`.
97
- * @since v0.3.4
98
- */
99
- destroySoon(): void;
100
- /**
101
- * Sends data on the socket. The second parameter specifies the encoding in the
102
- * case of a string. It defaults to UTF8 encoding.
103
- *
104
- * Returns `true` if the entire data was flushed successfully to the kernel
105
- * buffer. Returns `false` if all or part of the data was queued in user memory.`'drain'` will be emitted when the buffer is again free.
106
- *
107
- * The optional `callback` parameter will be executed when the data is finally
108
- * written out, which may not be immediately.
109
- *
110
- * See `Writable` stream `write()` method for more
111
- * information.
112
- * @since v0.1.90
113
- * @param [encoding='utf8'] Only used when data is `string`.
114
- */
115
- write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
116
- write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
117
- /**
118
- * Initiate a connection on a given socket.
119
- *
120
- * Possible signatures:
121
- *
122
- * * `socket.connect(options[, connectListener])`
123
- * * `socket.connect(path[, connectListener])` for `IPC` connections.
124
- * * `socket.connect(port[, host][, connectListener])` for TCP connections.
125
- * * Returns: `net.Socket` The socket itself.
126
- *
127
- * This function is asynchronous. When the connection is established, the `'connect'` event will be emitted. If there is a problem connecting,
128
- * instead of a `'connect'` event, an `'error'` event will be emitted with
129
- * the error passed to the `'error'` listener.
130
- * The last parameter `connectListener`, if supplied, will be added as a listener
131
- * for the `'connect'` event **once**.
132
- *
133
- * This function should only be used for reconnecting a socket after`'close'` has been emitted or otherwise it may lead to undefined
134
- * behavior.
135
- */
136
- connect(options: SocketConnectOpts, connectionListener?: () => void): this;
137
- connect(port: number, host: string, connectionListener?: () => void): this;
138
- connect(port: number, connectionListener?: () => void): this;
139
- connect(path: string, connectionListener?: () => void): this;
140
- /**
141
- * Set the encoding for the socket as a `Readable Stream`. See `readable.setEncoding()` for more information.
142
- * @since v0.1.90
143
- * @return The socket itself.
144
- */
145
- setEncoding(encoding?: BufferEncoding): this;
146
- /**
147
- * Pauses the reading of data. That is, `'data'` events will not be emitted.
148
- * Useful to throttle back an upload.
149
- * @return The socket itself.
150
- */
151
- pause(): this;
152
- /**
153
- * Close the TCP connection by sending an RST packet and destroy the stream.
154
- * If this TCP socket is in connecting status, it will send an RST packet and destroy this TCP socket once it is connected.
155
- * Otherwise, it will call `socket.destroy` with an `ERR_SOCKET_CLOSED` Error.
156
- * If this is not a TCP socket (for example, a pipe), calling this method will immediately throw an `ERR_INVALID_HANDLE_TYPE` Error.
157
- * @since v18.3.0, v16.17.0
158
- */
159
- resetAndDestroy(): this;
160
- /**
161
- * Resumes reading after a call to `socket.pause()`.
162
- * @return The socket itself.
163
- */
164
- resume(): this;
165
- /**
166
- * Sets the socket to timeout after `timeout` milliseconds of inactivity on
167
- * the socket. By default `net.Socket` do not have a timeout.
168
- *
169
- * When an idle timeout is triggered the socket will receive a `'timeout'` event but the connection will not be severed. The user must manually call `socket.end()` or `socket.destroy()` to
170
- * end the connection.
171
- *
172
- * ```js
173
- * socket.setTimeout(3000);
174
- * socket.on('timeout', () => {
175
- * console.log('socket timeout');
176
- * socket.end();
177
- * });
178
- * ```
179
- *
180
- * If `timeout` is 0, then the existing idle timeout is disabled.
181
- *
182
- * The optional `callback` parameter will be added as a one-time listener for the `'timeout'` event.
183
- * @since v0.1.90
184
- * @return The socket itself.
185
- */
186
- setTimeout(timeout: number, callback?: () => void): this;
187
- /**
188
- * Enable/disable the use of Nagle's algorithm.
189
- *
190
- * When a TCP connection is created, it will have Nagle's algorithm enabled.
191
- *
192
- * Nagle's algorithm delays data before it is sent via the network. It attempts
193
- * to optimize throughput at the expense of latency.
194
- *
195
- * Passing `true` for `noDelay` or not passing an argument will disable Nagle's
196
- * algorithm for the socket. Passing `false` for `noDelay` will enable Nagle's
197
- * algorithm.
198
- * @since v0.1.90
199
- * @param [noDelay=true]
200
- * @return The socket itself.
201
- */
202
- setNoDelay(noDelay?: boolean): this;
203
- /**
204
- * Enable/disable keep-alive functionality, and optionally set the initial
205
- * delay before the first keepalive probe is sent on an idle socket.
206
- *
207
- * Set `initialDelay` (in milliseconds) to set the delay between the last
208
- * data packet received and the first keepalive probe. Setting `0` for`initialDelay` will leave the value unchanged from the default
209
- * (or previous) setting.
210
- *
211
- * Enabling the keep-alive functionality will set the following socket options:
212
- *
213
- * * `SO_KEEPALIVE=1`
214
- * * `TCP_KEEPIDLE=initialDelay`
215
- * * `TCP_KEEPCNT=10`
216
- * * `TCP_KEEPINTVL=1`
217
- * @since v0.1.92
218
- * @param [enable=false]
219
- * @param [initialDelay=0]
220
- * @return The socket itself.
221
- */
222
- setKeepAlive(enable?: boolean, initialDelay?: number): this;
223
- /**
224
- * Returns the bound `address`, the address `family` name and `port` of the
225
- * socket as reported by the operating system:`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`
226
- * @since v0.1.90
227
- */
228
- address(): AddressInfo | {};
229
- /**
230
- * Calling `unref()` on a socket will allow the program to exit if this is the only
231
- * active socket in the event system. If the socket is already `unref`ed calling`unref()` again will have no effect.
232
- * @since v0.9.1
233
- * @return The socket itself.
234
- */
235
- unref(): this;
236
- /**
237
- * Opposite of `unref()`, calling `ref()` on a previously `unref`ed socket will _not_ let the program exit if it's the only socket left (the default behavior).
238
- * If the socket is `ref`ed calling `ref` again will have no effect.
239
- * @since v0.9.1
240
- * @return The socket itself.
241
- */
242
- ref(): this;
243
- /**
244
- * This property is only present if the family autoselection algorithm is enabled in `socket.connect(options)`
245
- * and it is an array of the addresses that have been attempted.
246
- *
247
- * Each address is a string in the form of `$IP:$PORT`.
248
- * If the connection was successful, then the last address is the one that the socket is currently connected to.
249
- * @since v19.4.0
250
- */
251
- readonly autoSelectFamilyAttemptedAddresses: string[];
252
- /**
253
- * This property shows the number of characters buffered for writing. The buffer
254
- * may contain strings whose length after encoding is not yet known. So this number
255
- * is only an approximation of the number of bytes in the buffer.
256
- *
257
- * `net.Socket` has the property that `socket.write()` always works. This is to
258
- * help users get up and running quickly. The computer cannot always keep up
259
- * with the amount of data that is written to a socket. The network connection
260
- * simply might be too slow. Node.js will internally queue up the data written to a
261
- * socket and send it out over the wire when it is possible.
262
- *
263
- * The consequence of this internal buffering is that memory may grow.
264
- * Users who experience large or growing `bufferSize` should attempt to
265
- * "throttle" the data flows in their program with `socket.pause()` and `socket.resume()`.
266
- * @since v0.3.8
267
- * @deprecated Since v14.6.0 - Use `writableLength` instead.
268
- */
269
- readonly bufferSize: number;
270
- /**
271
- * The amount of received bytes.
272
- * @since v0.5.3
273
- */
274
- readonly bytesRead: number;
275
- /**
276
- * The amount of bytes sent.
277
- * @since v0.5.3
278
- */
279
- readonly bytesWritten: number;
280
- /**
281
- * If `true`, `socket.connect(options[, connectListener])` was
282
- * called and has not yet finished. It will stay `true` until the socket becomes
283
- * connected, then it is set to `false` and the `'connect'` event is emitted. Note
284
- * that the `socket.connect(options[, connectListener])` callback is a listener for the `'connect'` event.
285
- * @since v6.1.0
286
- */
287
- readonly connecting: boolean;
288
- /**
289
- * This is `true` if the socket is not connected yet, either because `.connect()`has not yet been called or because it is still in the process of connecting
290
- * (see `socket.connecting`).
291
- * @since v11.2.0, v10.16.0
292
- */
293
- readonly pending: boolean;
294
- /**
295
- * See `writable.destroyed` for further details.
296
- */
297
- readonly destroyed: boolean;
298
- /**
299
- * The string representation of the local IP address the remote client is
300
- * connecting on. For example, in a server listening on `'0.0.0.0'`, if a client
301
- * connects on `'192.168.1.1'`, the value of `socket.localAddress` would be`'192.168.1.1'`.
302
- * @since v0.9.6
303
- */
304
- readonly localAddress?: string;
305
- /**
306
- * The numeric representation of the local port. For example, `80` or `21`.
307
- * @since v0.9.6
308
- */
309
- readonly localPort?: number;
310
- /**
311
- * The string representation of the local IP family. `'IPv4'` or `'IPv6'`.
312
- * @since v18.8.0, v16.18.0
313
- */
314
- readonly localFamily?: string;
315
- /**
316
- * This property represents the state of the connection as a string.
317
- *
318
- * * If the stream is connecting `socket.readyState` is `opening`.
319
- * * If the stream is readable and writable, it is `open`.
320
- * * If the stream is readable and not writable, it is `readOnly`.
321
- * * If the stream is not readable and writable, it is `writeOnly`.
322
- * @since v0.5.0
323
- */
324
- readonly readyState: SocketReadyState;
325
- /**
326
- * The string representation of the remote IP address. For example,`'74.125.127.100'` or `'2001:4860:a005::68'`. Value may be `undefined` if
327
- * the socket is destroyed (for example, if the client disconnected).
328
- * @since v0.5.10
329
- */
330
- readonly remoteAddress: string | undefined;
331
- /**
332
- * The string representation of the remote IP family. `'IPv4'` or `'IPv6'`. Value may be `undefined` if
333
- * the socket is destroyed (for example, if the client disconnected).
334
- * @since v0.11.14
335
- */
336
- readonly remoteFamily: string | undefined;
337
- /**
338
- * The numeric representation of the remote port. For example, `80` or `21`. Value may be `undefined` if
339
- * the socket is destroyed (for example, if the client disconnected).
340
- * @since v0.5.10
341
- */
342
- readonly remotePort: number | undefined;
343
- /**
344
- * The socket timeout in milliseconds as set by `socket.setTimeout()`.
345
- * It is `undefined` if a timeout has not been set.
346
- * @since v10.7.0
347
- */
348
- readonly timeout?: number;
349
- /**
350
- * Half-closes the socket. i.e., it sends a FIN packet. It is possible the
351
- * server will still send some data.
352
- *
353
- * See `writable.end()` for further details.
354
- * @since v0.1.90
355
- * @param [encoding='utf8'] Only used when data is `string`.
356
- * @param callback Optional callback for when the socket is finished.
357
- * @return The socket itself.
358
- */
359
- end(callback?: () => void): this;
360
- end(buffer: Uint8Array | string, callback?: () => void): this;
361
- end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): this;
362
- /**
363
- * events.EventEmitter
364
- * 1. close
365
- * 2. connect
366
- * 3. connectionAttempt
367
- * 4. connectionAttemptFailed
368
- * 5. connectionAttemptTimeout
369
- * 6. data
370
- * 7. drain
371
- * 8. end
372
- * 9. error
373
- * 10. lookup
374
- * 11. ready
375
- * 12. timeout
376
- */
377
- addListener(event: string, listener: (...args: any[]) => void): this;
378
- addListener(event: "close", listener: (hadError: boolean) => void): this;
379
- addListener(event: "connect", listener: () => void): this;
380
- addListener(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this;
381
- addListener(
382
- event: "connectionAttemptFailed",
383
- listener: (ip: string, port: number, family: number, error: Error) => void,
384
- ): this;
385
- addListener(
386
- event: "connectionAttemptTimeout",
387
- listener: (ip: string, port: number, family: number) => void,
388
- ): this;
389
- addListener(event: "data", listener: (data: Buffer) => void): this;
390
- addListener(event: "drain", listener: () => void): this;
391
- addListener(event: "end", listener: () => void): this;
392
- addListener(event: "error", listener: (err: Error) => void): this;
393
- addListener(
394
- event: "lookup",
395
- listener: (err: Error, address: string, family: string | number, host: string) => void,
396
- ): this;
397
- addListener(event: "ready", listener: () => void): this;
398
- addListener(event: "timeout", listener: () => void): this;
399
- emit(event: string | symbol, ...args: any[]): boolean;
400
- emit(event: "close", hadError: boolean): boolean;
401
- emit(event: "connect"): boolean;
402
- emit(event: "connectionAttempt", ip: string, port: number, family: number): boolean;
403
- emit(event: "connectionAttemptFailed", ip: string, port: number, family: number, error: Error): boolean;
404
- emit(event: "connectionAttemptTimeout", ip: string, port: number, family: number): boolean;
405
- emit(event: "data", data: Buffer): boolean;
406
- emit(event: "drain"): boolean;
407
- emit(event: "end"): boolean;
408
- emit(event: "error", err: Error): boolean;
409
- emit(event: "lookup", err: Error, address: string, family: string | number, host: string): boolean;
410
- emit(event: "ready"): boolean;
411
- emit(event: "timeout"): boolean;
412
- on(event: string, listener: (...args: any[]) => void): this;
413
- on(event: "close", listener: (hadError: boolean) => void): this;
414
- on(event: "connect", listener: () => void): this;
415
- on(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this;
416
- on(
417
- event: "connectionAttemptFailed",
418
- listener: (ip: string, port: number, family: number, error: Error) => void,
419
- ): this;
420
- on(event: "connectionAttemptTimeout", listener: (ip: string, port: number, family: number) => void): this;
421
- on(event: "data", listener: (data: Buffer) => void): this;
422
- on(event: "drain", listener: () => void): this;
423
- on(event: "end", listener: () => void): this;
424
- on(event: "error", listener: (err: Error) => void): this;
425
- on(
426
- event: "lookup",
427
- listener: (err: Error, address: string, family: string | number, host: string) => void,
428
- ): this;
429
- on(event: "ready", listener: () => void): this;
430
- on(event: "timeout", listener: () => void): this;
431
- once(event: string, listener: (...args: any[]) => void): this;
432
- once(event: "close", listener: (hadError: boolean) => void): this;
433
- once(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this;
434
- once(
435
- event: "connectionAttemptFailed",
436
- listener: (ip: string, port: number, family: number, error: Error) => void,
437
- ): this;
438
- once(event: "connectionAttemptTimeout", listener: (ip: string, port: number, family: number) => void): this;
439
- once(event: "connect", listener: () => void): this;
440
- once(event: "data", listener: (data: Buffer) => void): this;
441
- once(event: "drain", listener: () => void): this;
442
- once(event: "end", listener: () => void): this;
443
- once(event: "error", listener: (err: Error) => void): this;
444
- once(
445
- event: "lookup",
446
- listener: (err: Error, address: string, family: string | number, host: string) => void,
447
- ): this;
448
- once(event: "ready", listener: () => void): this;
449
- once(event: "timeout", listener: () => void): this;
450
- prependListener(event: string, listener: (...args: any[]) => void): this;
451
- prependListener(event: "close", listener: (hadError: boolean) => void): this;
452
- prependListener(event: "connect", listener: () => void): this;
453
- prependListener(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this;
454
- prependListener(
455
- event: "connectionAttemptFailed",
456
- listener: (ip: string, port: number, family: number, error: Error) => void,
457
- ): this;
458
- prependListener(
459
- event: "connectionAttemptTimeout",
460
- listener: (ip: string, port: number, family: number) => void,
461
- ): this;
462
- prependListener(event: "data", listener: (data: Buffer) => void): this;
463
- prependListener(event: "drain", listener: () => void): this;
464
- prependListener(event: "end", listener: () => void): this;
465
- prependListener(event: "error", listener: (err: Error) => void): this;
466
- prependListener(
467
- event: "lookup",
468
- listener: (err: Error, address: string, family: string | number, host: string) => void,
469
- ): this;
470
- prependListener(event: "ready", listener: () => void): this;
471
- prependListener(event: "timeout", listener: () => void): this;
472
- prependOnceListener(event: string, listener: (...args: any[]) => void): this;
473
- prependOnceListener(event: "close", listener: (hadError: boolean) => void): this;
474
- prependOnceListener(event: "connect", listener: () => void): this;
475
- prependOnceListener(
476
- event: "connectionAttempt",
477
- listener: (ip: string, port: number, family: number) => void,
478
- ): this;
479
- prependOnceListener(
480
- event: "connectionAttemptFailed",
481
- listener: (ip: string, port: number, family: number, error: Error) => void,
482
- ): this;
483
- prependOnceListener(
484
- event: "connectionAttemptTimeout",
485
- listener: (ip: string, port: number, family: number) => void,
486
- ): this;
487
- prependOnceListener(event: "data", listener: (data: Buffer) => void): this;
488
- prependOnceListener(event: "drain", listener: () => void): this;
489
- prependOnceListener(event: "end", listener: () => void): this;
490
- prependOnceListener(event: "error", listener: (err: Error) => void): this;
491
- prependOnceListener(
492
- event: "lookup",
493
- listener: (err: Error, address: string, family: string | number, host: string) => void,
494
- ): this;
495
- prependOnceListener(event: "ready", listener: () => void): this;
496
- prependOnceListener(event: "timeout", listener: () => void): this;
497
- }
498
- interface ListenOptions extends Abortable {
499
- port?: number | undefined;
500
- host?: string | undefined;
501
- backlog?: number | undefined;
502
- path?: string | undefined;
503
- exclusive?: boolean | undefined;
504
- readableAll?: boolean | undefined;
505
- writableAll?: boolean | undefined;
506
- /**
507
- * @default false
508
- */
509
- ipv6Only?: boolean | undefined;
510
- }
511
- interface ServerOpts {
512
- /**
513
- * Indicates whether half-opened TCP connections are allowed.
514
- * @default false
515
- */
516
- allowHalfOpen?: boolean | undefined;
517
- /**
518
- * Indicates whether the socket should be paused on incoming connections.
519
- * @default false
520
- */
521
- pauseOnConnect?: boolean | undefined;
522
- /**
523
- * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received.
524
- * @default false
525
- * @since v16.5.0
526
- */
527
- noDelay?: boolean | undefined;
528
- /**
529
- * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received,
530
- * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`.
531
- * @default false
532
- * @since v16.5.0
533
- */
534
- keepAlive?: boolean | undefined;
535
- /**
536
- * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket.
537
- * @default 0
538
- * @since v16.5.0
539
- */
540
- keepAliveInitialDelay?: number | undefined;
541
- /**
542
- * Optionally overrides all `net.Socket`s' `readableHighWaterMark` and `writableHighWaterMark`.
543
- * @default See [stream.getDefaultHighWaterMark()](https://nodejs.org/docs/latest-v20.x/api/stream.html#streamgetdefaulthighwatermarkobjectmode).
544
- * @since v18.17.0, v20.1.0
545
- */
546
- highWaterMark?: number | undefined;
547
- }
548
- interface DropArgument {
549
- localAddress?: string;
550
- localPort?: number;
551
- localFamily?: string;
552
- remoteAddress?: string;
553
- remotePort?: number;
554
- remoteFamily?: string;
555
- }
556
- /**
557
- * This class is used to create a TCP or `IPC` server.
558
- * @since v0.1.90
559
- */
560
- class Server extends EventEmitter {
561
- constructor(connectionListener?: (socket: Socket) => void);
562
- constructor(options?: ServerOpts, connectionListener?: (socket: Socket) => void);
563
- /**
564
- * Start a server listening for connections. A `net.Server` can be a TCP or
565
- * an `IPC` server depending on what it listens to.
566
- *
567
- * Possible signatures:
568
- *
569
- * * `server.listen(handle[, backlog][, callback])`
570
- * * `server.listen(options[, callback])`
571
- * * `server.listen(path[, backlog][, callback])` for `IPC` servers
572
- * * `server.listen([port[, host[, backlog]]][, callback])` for TCP servers
573
- *
574
- * This function is asynchronous. When the server starts listening, the `'listening'` event will be emitted. The last parameter `callback`will be added as a listener for the `'listening'`
575
- * event.
576
- *
577
- * All `listen()` methods can take a `backlog` parameter to specify the maximum
578
- * length of the queue of pending connections. The actual length will be determined
579
- * by the OS through sysctl settings such as `tcp_max_syn_backlog` and `somaxconn` on Linux. The default value of this parameter is 511 (not 512).
580
- *
581
- * All {@link Socket} are set to `SO_REUSEADDR` (see [`socket(7)`](https://man7.org/linux/man-pages/man7/socket.7.html) for
582
- * details).
583
- *
584
- * The `server.listen()` method can be called again if and only if there was an
585
- * error during the first `server.listen()` call or `server.close()` has been
586
- * called. Otherwise, an `ERR_SERVER_ALREADY_LISTEN` error will be thrown.
587
- *
588
- * One of the most common errors raised when listening is `EADDRINUSE`.
589
- * This happens when another server is already listening on the requested`port`/`path`/`handle`. One way to handle this would be to retry
590
- * after a certain amount of time:
591
- *
592
- * ```js
593
- * server.on('error', (e) => {
594
- * if (e.code === 'EADDRINUSE') {
595
- * console.error('Address in use, retrying...');
596
- * setTimeout(() => {
597
- * server.close();
598
- * server.listen(PORT, HOST);
599
- * }, 1000);
600
- * }
601
- * });
602
- * ```
603
- */
604
- listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this;
605
- listen(port?: number, hostname?: string, listeningListener?: () => void): this;
606
- listen(port?: number, backlog?: number, listeningListener?: () => void): this;
607
- listen(port?: number, listeningListener?: () => void): this;
608
- listen(path: string, backlog?: number, listeningListener?: () => void): this;
609
- listen(path: string, listeningListener?: () => void): this;
610
- listen(options: ListenOptions, listeningListener?: () => void): this;
611
- listen(handle: any, backlog?: number, listeningListener?: () => void): this;
612
- listen(handle: any, listeningListener?: () => void): this;
613
- /**
614
- * Stops the server from accepting new connections and keeps existing
615
- * connections. This function is asynchronous, the server is finally closed
616
- * when all connections are ended and the server emits a `'close'` event.
617
- * The optional `callback` will be called once the `'close'` event occurs. Unlike
618
- * that event, it will be called with an `Error` as its only argument if the server
619
- * was not open when it was closed.
620
- * @since v0.1.90
621
- * @param callback Called when the server is closed.
622
- */
623
- close(callback?: (err?: Error) => void): this;
624
- /**
625
- * Returns the bound `address`, the address `family` name, and `port` of the server
626
- * as reported by the operating system if listening on an IP socket
627
- * (useful to find which port was assigned when getting an OS-assigned address):`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`.
628
- *
629
- * For a server listening on a pipe or Unix domain socket, the name is returned
630
- * as a string.
631
- *
632
- * ```js
633
- * const server = net.createServer((socket) => {
634
- * socket.end('goodbye\n');
635
- * }).on('error', (err) => {
636
- * // Handle errors here.
637
- * throw err;
638
- * });
639
- *
640
- * // Grab an arbitrary unused port.
641
- * server.listen(() => {
642
- * console.log('opened server on', server.address());
643
- * });
644
- * ```
645
- *
646
- * `server.address()` returns `null` before the `'listening'` event has been
647
- * emitted or after calling `server.close()`.
648
- * @since v0.1.90
649
- */
650
- address(): AddressInfo | string | null;
651
- /**
652
- * Asynchronously get the number of concurrent connections on the server. Works
653
- * when sockets were sent to forks.
654
- *
655
- * Callback should take two arguments `err` and `count`.
656
- * @since v0.9.7
657
- */
658
- getConnections(cb: (error: Error | null, count: number) => void): this;
659
- /**
660
- * Opposite of `unref()`, calling `ref()` on a previously `unref`ed server will _not_ let the program exit if it's the only server left (the default behavior).
661
- * If the server is `ref`ed calling `ref()` again will have no effect.
662
- * @since v0.9.1
663
- */
664
- ref(): this;
665
- /**
666
- * Calling `unref()` on a server will allow the program to exit if this is the only
667
- * active server in the event system. If the server is already `unref`ed calling`unref()` again will have no effect.
668
- * @since v0.9.1
669
- */
670
- unref(): this;
671
- /**
672
- * Set this property to reject connections when the server's connection count gets
673
- * high.
674
- *
675
- * It is not recommended to use this option once a socket has been sent to a child
676
- * with `child_process.fork()`.
677
- * @since v0.2.0
678
- */
679
- maxConnections: number;
680
- connections: number;
681
- /**
682
- * Indicates whether or not the server is listening for connections.
683
- * @since v5.7.0
684
- */
685
- readonly listening: boolean;
686
- /**
687
- * events.EventEmitter
688
- * 1. close
689
- * 2. connection
690
- * 3. error
691
- * 4. listening
692
- * 5. drop
693
- */
694
- addListener(event: string, listener: (...args: any[]) => void): this;
695
- addListener(event: "close", listener: () => void): this;
696
- addListener(event: "connection", listener: (socket: Socket) => void): this;
697
- addListener(event: "error", listener: (err: Error) => void): this;
698
- addListener(event: "listening", listener: () => void): this;
699
- addListener(event: "drop", listener: (data?: DropArgument) => void): this;
700
- emit(event: string | symbol, ...args: any[]): boolean;
701
- emit(event: "close"): boolean;
702
- emit(event: "connection", socket: Socket): boolean;
703
- emit(event: "error", err: Error): boolean;
704
- emit(event: "listening"): boolean;
705
- emit(event: "drop", data?: DropArgument): boolean;
706
- on(event: string, listener: (...args: any[]) => void): this;
707
- on(event: "close", listener: () => void): this;
708
- on(event: "connection", listener: (socket: Socket) => void): this;
709
- on(event: "error", listener: (err: Error) => void): this;
710
- on(event: "listening", listener: () => void): this;
711
- on(event: "drop", listener: (data?: DropArgument) => void): this;
712
- once(event: string, listener: (...args: any[]) => void): this;
713
- once(event: "close", listener: () => void): this;
714
- once(event: "connection", listener: (socket: Socket) => void): this;
715
- once(event: "error", listener: (err: Error) => void): this;
716
- once(event: "listening", listener: () => void): this;
717
- once(event: "drop", listener: (data?: DropArgument) => void): this;
718
- prependListener(event: string, listener: (...args: any[]) => void): this;
719
- prependListener(event: "close", listener: () => void): this;
720
- prependListener(event: "connection", listener: (socket: Socket) => void): this;
721
- prependListener(event: "error", listener: (err: Error) => void): this;
722
- prependListener(event: "listening", listener: () => void): this;
723
- prependListener(event: "drop", listener: (data?: DropArgument) => void): this;
724
- prependOnceListener(event: string, listener: (...args: any[]) => void): this;
725
- prependOnceListener(event: "close", listener: () => void): this;
726
- prependOnceListener(event: "connection", listener: (socket: Socket) => void): this;
727
- prependOnceListener(event: "error", listener: (err: Error) => void): this;
728
- prependOnceListener(event: "listening", listener: () => void): this;
729
- prependOnceListener(event: "drop", listener: (data?: DropArgument) => void): this;
730
- /**
731
- * Calls {@link Server.close()} and returns a promise that fulfills when the server has closed.
732
- * @since v20.5.0
733
- */
734
- [Symbol.asyncDispose](): Promise<void>;
735
- }
736
- type IPVersion = "ipv4" | "ipv6";
737
- /**
738
- * The `BlockList` object can be used with some network APIs to specify rules for
739
- * disabling inbound or outbound access to specific IP addresses, IP ranges, or
740
- * IP subnets.
741
- * @since v15.0.0, v14.18.0
742
- */
743
- class BlockList {
744
- /**
745
- * Adds a rule to block the given IP address.
746
- * @since v15.0.0, v14.18.0
747
- * @param address An IPv4 or IPv6 address.
748
- * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
749
- */
750
- addAddress(address: string, type?: IPVersion): void;
751
- addAddress(address: SocketAddress): void;
752
- /**
753
- * Adds a rule to block a range of IP addresses from `start` (inclusive) to`end` (inclusive).
754
- * @since v15.0.0, v14.18.0
755
- * @param start The starting IPv4 or IPv6 address in the range.
756
- * @param end The ending IPv4 or IPv6 address in the range.
757
- * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
758
- */
759
- addRange(start: string, end: string, type?: IPVersion): void;
760
- addRange(start: SocketAddress, end: SocketAddress): void;
761
- /**
762
- * Adds a rule to block a range of IP addresses specified as a subnet mask.
763
- * @since v15.0.0, v14.18.0
764
- * @param net The network IPv4 or IPv6 address.
765
- * @param prefix The number of CIDR prefix bits. For IPv4, this must be a value between `0` and `32`. For IPv6, this must be between `0` and `128`.
766
- * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
767
- */
768
- addSubnet(net: SocketAddress, prefix: number): void;
769
- addSubnet(net: string, prefix: number, type?: IPVersion): void;
770
- /**
771
- * Returns `true` if the given IP address matches any of the rules added to the`BlockList`.
772
- *
773
- * ```js
774
- * const blockList = new net.BlockList();
775
- * blockList.addAddress('123.123.123.123');
776
- * blockList.addRange('10.0.0.1', '10.0.0.10');
777
- * blockList.addSubnet('8592:757c:efae:4e45::', 64, 'ipv6');
778
- *
779
- * console.log(blockList.check('123.123.123.123')); // Prints: true
780
- * console.log(blockList.check('10.0.0.3')); // Prints: true
781
- * console.log(blockList.check('222.111.111.222')); // Prints: false
782
- *
783
- * // IPv6 notation for IPv4 addresses works:
784
- * console.log(blockList.check('::ffff:7b7b:7b7b', 'ipv6')); // Prints: true
785
- * console.log(blockList.check('::ffff:123.123.123.123', 'ipv6')); // Prints: true
786
- * ```
787
- * @since v15.0.0, v14.18.0
788
- * @param address The IP address to check
789
- * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
790
- */
791
- check(address: SocketAddress): boolean;
792
- check(address: string, type?: IPVersion): boolean;
793
- /**
794
- * The list of rules added to the blocklist.
795
- * @since v15.0.0, v14.18.0
796
- */
797
- rules: readonly string[];
798
- }
799
- interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts {
800
- timeout?: number | undefined;
801
- }
802
- interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts {
803
- timeout?: number | undefined;
804
- }
805
- type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts;
806
- /**
807
- * Creates a new TCP or `IPC` server.
808
- *
809
- * If `allowHalfOpen` is set to `true`, when the other end of the socket
810
- * signals the end of transmission, the server will only send back the end of
811
- * transmission when `socket.end()` is explicitly called. For example, in the
812
- * context of TCP, when a FIN packed is received, a FIN packed is sent
813
- * back only when `socket.end()` is explicitly called. Until then the
814
- * connection is half-closed (non-readable but still writable). See `'end'` event and [RFC 1122](https://tools.ietf.org/html/rfc1122) (section 4.2.2.13) for more information.
815
- *
816
- * If `pauseOnConnect` is set to `true`, then the socket associated with each
817
- * incoming connection will be paused, and no data will be read from its handle.
818
- * This allows connections to be passed between processes without any data being
819
- * read by the original process. To begin reading data from a paused socket, call `socket.resume()`.
820
- *
821
- * The server can be a TCP server or an `IPC` server, depending on what it `listen()` to.
822
- *
823
- * Here is an example of a TCP echo server which listens for connections
824
- * on port 8124:
825
- *
826
- * ```js
827
- * import net from 'node:net';
828
- * const server = net.createServer((c) => {
829
- * // 'connection' listener.
830
- * console.log('client connected');
831
- * c.on('end', () => {
832
- * console.log('client disconnected');
833
- * });
834
- * c.write('hello\r\n');
835
- * c.pipe(c);
836
- * });
837
- * server.on('error', (err) => {
838
- * throw err;
839
- * });
840
- * server.listen(8124, () => {
841
- * console.log('server bound');
842
- * });
843
- * ```
844
- *
845
- * Test this by using `telnet`:
846
- *
847
- * ```bash
848
- * telnet localhost 8124
849
- * ```
850
- *
851
- * To listen on the socket `/tmp/echo.sock`:
852
- *
853
- * ```js
854
- * server.listen('/tmp/echo.sock', () => {
855
- * console.log('server bound');
856
- * });
857
- * ```
858
- *
859
- * Use `nc` to connect to a Unix domain socket server:
860
- *
861
- * ```bash
862
- * nc -U /tmp/echo.sock
863
- * ```
864
- * @since v0.5.0
865
- * @param connectionListener Automatically set as a listener for the {@link 'connection'} event.
866
- */
867
- function createServer(connectionListener?: (socket: Socket) => void): Server;
868
- function createServer(options?: ServerOpts, connectionListener?: (socket: Socket) => void): Server;
869
- /**
870
- * Aliases to {@link createConnection}.
871
- *
872
- * Possible signatures:
873
- *
874
- * * {@link connect}
875
- * * {@link connect} for `IPC` connections.
876
- * * {@link connect} for TCP connections.
877
- */
878
- function connect(options: NetConnectOpts, connectionListener?: () => void): Socket;
879
- function connect(port: number, host?: string, connectionListener?: () => void): Socket;
880
- function connect(path: string, connectionListener?: () => void): Socket;
881
- /**
882
- * A factory function, which creates a new {@link Socket},
883
- * immediately initiates connection with `socket.connect()`,
884
- * then returns the `net.Socket` that starts the connection.
885
- *
886
- * When the connection is established, a `'connect'` event will be emitted
887
- * on the returned socket. The last parameter `connectListener`, if supplied,
888
- * will be added as a listener for the `'connect'` event **once**.
889
- *
890
- * Possible signatures:
891
- *
892
- * * {@link createConnection}
893
- * * {@link createConnection} for `IPC` connections.
894
- * * {@link createConnection} for TCP connections.
895
- *
896
- * The {@link connect} function is an alias to this function.
897
- */
898
- function createConnection(options: NetConnectOpts, connectionListener?: () => void): Socket;
899
- function createConnection(port: number, host?: string, connectionListener?: () => void): Socket;
900
- function createConnection(path: string, connectionListener?: () => void): Socket;
901
- /**
902
- * Gets the current default value of the `autoSelectFamily` option of `socket.connect(options)`.
903
- * The initial default value is `true`, unless the command line option`--no-network-family-autoselection` is provided.
904
- * @since v19.4.0
905
- */
906
- function getDefaultAutoSelectFamily(): boolean;
907
- /**
908
- * Sets the default value of the `autoSelectFamily` option of `socket.connect(options)`.
909
- * @since v19.4.0
910
- */
911
- function setDefaultAutoSelectFamily(value: boolean): void;
912
- /**
913
- * Gets the current default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`.
914
- * The initial default value is `250` or the value specified via the command line option `--network-family-autoselection-attempt-timeout`.
915
- * @returns The current default value of the `autoSelectFamilyAttemptTimeout` option.
916
- * @since v19.8.0, v18.8.0
917
- */
918
- function getDefaultAutoSelectFamilyAttemptTimeout(): number;
919
- /**
920
- * Sets the default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`.
921
- * @param value The new default value, which must be a positive number. If the number is less than `10`, the value `10` is used instead. The initial default value is `250` or the value specified via the command line
922
- * option `--network-family-autoselection-attempt-timeout`.
923
- * @since v19.8.0, v18.8.0
924
- */
925
- function setDefaultAutoSelectFamilyAttemptTimeout(value: number): void;
926
- /**
927
- * Returns `6` if `input` is an IPv6 address. Returns `4` if `input` is an IPv4
928
- * address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no leading zeroes. Otherwise, returns`0`.
929
- *
930
- * ```js
931
- * net.isIP('::1'); // returns 6
932
- * net.isIP('127.0.0.1'); // returns 4
933
- * net.isIP('127.000.000.001'); // returns 0
934
- * net.isIP('127.0.0.1/24'); // returns 0
935
- * net.isIP('fhqwhgads'); // returns 0
936
- * ```
937
- * @since v0.3.0
938
- */
939
- function isIP(input: string): number;
940
- /**
941
- * Returns `true` if `input` is an IPv4 address in [dot-decimal notation](https://en.wikipedia.org/wiki/Dot-decimal_notation) with no
942
- * leading zeroes. Otherwise, returns `false`.
943
- *
944
- * ```js
945
- * net.isIPv4('127.0.0.1'); // returns true
946
- * net.isIPv4('127.000.000.001'); // returns false
947
- * net.isIPv4('127.0.0.1/24'); // returns false
948
- * net.isIPv4('fhqwhgads'); // returns false
949
- * ```
950
- * @since v0.3.0
951
- */
952
- function isIPv4(input: string): boolean;
953
- /**
954
- * Returns `true` if `input` is an IPv6 address. Otherwise, returns `false`.
955
- *
956
- * ```js
957
- * net.isIPv6('::1'); // returns true
958
- * net.isIPv6('fhqwhgads'); // returns false
959
- * ```
960
- * @since v0.3.0
961
- */
962
- function isIPv6(input: string): boolean;
963
- interface SocketAddressInitOptions {
964
- /**
965
- * The network address as either an IPv4 or IPv6 string.
966
- * @default 127.0.0.1
967
- */
968
- address?: string | undefined;
969
- /**
970
- * @default `'ipv4'`
971
- */
972
- family?: IPVersion | undefined;
973
- /**
974
- * An IPv6 flow-label used only if `family` is `'ipv6'`.
975
- * @default 0
976
- */
977
- flowlabel?: number | undefined;
978
- /**
979
- * An IP port.
980
- * @default 0
981
- */
982
- port?: number | undefined;
983
- }
984
- /**
985
- * @since v15.14.0, v14.18.0
986
- */
987
- class SocketAddress {
988
- constructor(options: SocketAddressInitOptions);
989
- /**
990
- * Either \`'ipv4'\` or \`'ipv6'\`.
991
- * @since v15.14.0, v14.18.0
992
- */
993
- readonly address: string;
994
- /**
995
- * Either \`'ipv4'\` or \`'ipv6'\`.
996
- * @since v15.14.0, v14.18.0
997
- */
998
- readonly family: IPVersion;
999
- /**
1000
- * @since v15.14.0, v14.18.0
1001
- */
1002
- readonly port: number;
1003
- /**
1004
- * @since v15.14.0, v14.18.0
1005
- */
1006
- readonly flowlabel: number;
1007
- }
1008
- }
1009
- declare module "node:net" {
1010
- export * from "net";
1011
- }