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,808 +0,0 @@
1
- /**
2
- * The `node:v8` module exposes APIs that are specific to the version of [V8](https://developers.google.com/v8/) built into the Node.js binary. It can be accessed using:
3
- *
4
- * ```js
5
- * import v8 from 'node:v8';
6
- * ```
7
- * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/v8.js)
8
- */
9
- declare module "v8" {
10
- import { Readable } from "node:stream";
11
- interface HeapSpaceInfo {
12
- space_name: string;
13
- space_size: number;
14
- space_used_size: number;
15
- space_available_size: number;
16
- physical_space_size: number;
17
- }
18
- // ** Signifies if the --zap_code_space option is enabled or not. 1 == enabled, 0 == disabled. */
19
- type DoesZapCodeSpaceFlag = 0 | 1;
20
- interface HeapInfo {
21
- total_heap_size: number;
22
- total_heap_size_executable: number;
23
- total_physical_size: number;
24
- total_available_size: number;
25
- used_heap_size: number;
26
- heap_size_limit: number;
27
- malloced_memory: number;
28
- peak_malloced_memory: number;
29
- does_zap_garbage: DoesZapCodeSpaceFlag;
30
- number_of_native_contexts: number;
31
- number_of_detached_contexts: number;
32
- total_global_handles_size: number;
33
- used_global_handles_size: number;
34
- external_memory: number;
35
- }
36
- interface HeapCodeStatistics {
37
- code_and_metadata_size: number;
38
- bytecode_and_metadata_size: number;
39
- external_script_source_size: number;
40
- }
41
- interface HeapSnapshotOptions {
42
- /**
43
- * If true, expose internals in the heap snapshot.
44
- * @default false
45
- */
46
- exposeInternals?: boolean;
47
- /**
48
- * If true, expose numeric values in artificial fields.
49
- * @default false
50
- */
51
- exposeNumericValues?: boolean;
52
- }
53
- /**
54
- * Returns an integer representing a version tag derived from the V8 version,
55
- * command-line flags, and detected CPU features. This is useful for determining
56
- * whether a `vm.Script` `cachedData` buffer is compatible with this instance
57
- * of V8.
58
- *
59
- * ```js
60
- * console.log(v8.cachedDataVersionTag()); // 3947234607
61
- * // The value returned by v8.cachedDataVersionTag() is derived from the V8
62
- * // version, command-line flags, and detected CPU features. Test that the value
63
- * // does indeed update when flags are toggled.
64
- * v8.setFlagsFromString('--allow_natives_syntax');
65
- * console.log(v8.cachedDataVersionTag()); // 183726201
66
- * ```
67
- * @since v8.0.0
68
- */
69
- function cachedDataVersionTag(): number;
70
- /**
71
- * Returns an object with the following properties:
72
- *
73
- * `does_zap_garbage` is a 0/1 boolean, which signifies whether the `--zap_code_space` option is enabled or not. This makes V8 overwrite heap
74
- * garbage with a bit pattern. The RSS footprint (resident set size) gets bigger
75
- * because it continuously touches all heap pages and that makes them less likely
76
- * to get swapped out by the operating system.
77
- *
78
- * `number_of_native_contexts` The value of native\_context is the number of the
79
- * top-level contexts currently active. Increase of this number over time indicates
80
- * a memory leak.
81
- *
82
- * `number_of_detached_contexts` The value of detached\_context is the number
83
- * of contexts that were detached and not yet garbage collected. This number
84
- * being non-zero indicates a potential memory leak.
85
- *
86
- * `total_global_handles_size` The value of total\_global\_handles\_size is the
87
- * total memory size of V8 global handles.
88
- *
89
- * `used_global_handles_size` The value of used\_global\_handles\_size is the
90
- * used memory size of V8 global handles.
91
- *
92
- * `external_memory` The value of external\_memory is the memory size of array
93
- * buffers and external strings.
94
- *
95
- * ```js
96
- * {
97
- * total_heap_size: 7326976,
98
- * total_heap_size_executable: 4194304,
99
- * total_physical_size: 7326976,
100
- * total_available_size: 1152656,
101
- * used_heap_size: 3476208,
102
- * heap_size_limit: 1535115264,
103
- * malloced_memory: 16384,
104
- * peak_malloced_memory: 1127496,
105
- * does_zap_garbage: 0,
106
- * number_of_native_contexts: 1,
107
- * number_of_detached_contexts: 0,
108
- * total_global_handles_size: 8192,
109
- * used_global_handles_size: 3296,
110
- * external_memory: 318824
111
- * }
112
- * ```
113
- * @since v1.0.0
114
- */
115
- function getHeapStatistics(): HeapInfo;
116
- /**
117
- * Returns statistics about the V8 heap spaces, i.e. the segments which make up
118
- * the V8 heap. Neither the ordering of heap spaces, nor the availability of a
119
- * heap space can be guaranteed as the statistics are provided via the
120
- * V8 [`GetHeapSpaceStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#ac673576f24fdc7a33378f8f57e1d13a4) function and may change from one V8 version to the
121
- * next.
122
- *
123
- * The value returned is an array of objects containing the following properties:
124
- *
125
- * ```json
126
- * [
127
- * {
128
- * "space_name": "new_space",
129
- * "space_size": 2063872,
130
- * "space_used_size": 951112,
131
- * "space_available_size": 80824,
132
- * "physical_space_size": 2063872
133
- * },
134
- * {
135
- * "space_name": "old_space",
136
- * "space_size": 3090560,
137
- * "space_used_size": 2493792,
138
- * "space_available_size": 0,
139
- * "physical_space_size": 3090560
140
- * },
141
- * {
142
- * "space_name": "code_space",
143
- * "space_size": 1260160,
144
- * "space_used_size": 644256,
145
- * "space_available_size": 960,
146
- * "physical_space_size": 1260160
147
- * },
148
- * {
149
- * "space_name": "map_space",
150
- * "space_size": 1094160,
151
- * "space_used_size": 201608,
152
- * "space_available_size": 0,
153
- * "physical_space_size": 1094160
154
- * },
155
- * {
156
- * "space_name": "large_object_space",
157
- * "space_size": 0,
158
- * "space_used_size": 0,
159
- * "space_available_size": 1490980608,
160
- * "physical_space_size": 0
161
- * }
162
- * ]
163
- * ```
164
- * @since v6.0.0
165
- */
166
- function getHeapSpaceStatistics(): HeapSpaceInfo[];
167
- /**
168
- * The `v8.setFlagsFromString()` method can be used to programmatically set
169
- * V8 command-line flags. This method should be used with care. Changing settings
170
- * after the VM has started may result in unpredictable behavior, including
171
- * crashes and data loss; or it may simply do nothing.
172
- *
173
- * The V8 options available for a version of Node.js may be determined by running `node --v8-options`.
174
- *
175
- * Usage:
176
- *
177
- * ```js
178
- * // Print GC events to stdout for one minute.
179
- * import v8 from 'node:v8';
180
- * v8.setFlagsFromString('--trace_gc');
181
- * setTimeout(() => { v8.setFlagsFromString('--notrace_gc'); }, 60e3);
182
- * ```
183
- * @since v1.0.0
184
- */
185
- function setFlagsFromString(flags: string): void;
186
- /**
187
- * This is similar to the [`queryObjects()` console API](https://developer.chrome.com/docs/devtools/console/utilities#queryObjects-function)
188
- * provided by the Chromium DevTools console. It can be used to search for objects that have the matching constructor on its prototype chain
189
- * in the heap after a full garbage collection, which can be useful for memory leak regression tests. To avoid surprising results, users should
190
- * avoid using this API on constructors whose implementation they don't control, or on constructors that can be invoked by other parties in the
191
- * application.
192
- *
193
- * To avoid accidental leaks, this API does not return raw references to the objects found. By default, it returns the count of the objects
194
- * found. If `options.format` is `'summary'`, it returns an array containing brief string representations for each object. The visibility provided
195
- * in this API is similar to what the heap snapshot provides, while users can save the cost of serialization and parsing and directly filter the
196
- * target objects during the search.
197
- *
198
- * Only objects created in the current execution context are included in the results.
199
- *
200
- * ```js
201
- * import { queryObjects } from 'node:v8';
202
- * class A { foo = 'bar'; }
203
- * console.log(queryObjects(A)); // 0
204
- * const a = new A();
205
- * console.log(queryObjects(A)); // 1
206
- * // [ "A { foo: 'bar' }" ]
207
- * console.log(queryObjects(A, { format: 'summary' }));
208
- *
209
- * class B extends A { bar = 'qux'; }
210
- * const b = new B();
211
- * console.log(queryObjects(B)); // 1
212
- * // [ "B { foo: 'bar', bar: 'qux' }" ]
213
- * console.log(queryObjects(B, { format: 'summary' }));
214
- *
215
- * // Note that, when there are child classes inheriting from a constructor,
216
- * // the constructor also shows up in the prototype chain of the child
217
- * // classes's prototoype, so the child classes's prototoype would also be
218
- * // included in the result.
219
- * console.log(queryObjects(A)); // 3
220
- * // [ "B { foo: 'bar', bar: 'qux' }", 'A {}', "A { foo: 'bar' }" ]
221
- * console.log(queryObjects(A, { format: 'summary' }));
222
- * ```
223
- * @param ctor The constructor that can be used to search on the prototype chain in order to filter target objects in the heap.
224
- * @since v20.13.0
225
- * @experimental
226
- */
227
- function queryObjects(ctor: Function): number | string[];
228
- function queryObjects(ctor: Function, options: { format: "count" }): number;
229
- function queryObjects(ctor: Function, options: { format: "summary" }): string[];
230
- /**
231
- * Generates a snapshot of the current V8 heap and returns a Readable
232
- * Stream that may be used to read the JSON serialized representation.
233
- * This JSON stream format is intended to be used with tools such as
234
- * Chrome DevTools. The JSON schema is undocumented and specific to the
235
- * V8 engine. Therefore, the schema may change from one version of V8 to the next.
236
- *
237
- * Creating a heap snapshot requires memory about twice the size of the heap at
238
- * the time the snapshot is created. This results in the risk of OOM killers
239
- * terminating the process.
240
- *
241
- * Generating a snapshot is a synchronous operation which blocks the event loop
242
- * for a duration depending on the heap size.
243
- *
244
- * ```js
245
- * // Print heap snapshot to the console
246
- * import v8 from 'node:v8';
247
- * const stream = v8.getHeapSnapshot();
248
- * stream.pipe(process.stdout);
249
- * ```
250
- * @since v11.13.0
251
- * @return A Readable containing the V8 heap snapshot.
252
- */
253
- function getHeapSnapshot(options?: HeapSnapshotOptions): Readable;
254
- /**
255
- * Generates a snapshot of the current V8 heap and writes it to a JSON
256
- * file. This file is intended to be used with tools such as Chrome
257
- * DevTools. The JSON schema is undocumented and specific to the V8
258
- * engine, and may change from one version of V8 to the next.
259
- *
260
- * A heap snapshot is specific to a single V8 isolate. When using `worker threads`, a heap snapshot generated from the main thread will
261
- * not contain any information about the workers, and vice versa.
262
- *
263
- * Creating a heap snapshot requires memory about twice the size of the heap at
264
- * the time the snapshot is created. This results in the risk of OOM killers
265
- * terminating the process.
266
- *
267
- * Generating a snapshot is a synchronous operation which blocks the event loop
268
- * for a duration depending on the heap size.
269
- *
270
- * ```js
271
- * import { writeHeapSnapshot } from 'node:v8';
272
- * import {
273
- * Worker,
274
- * isMainThread,
275
- * parentPort,
276
- * } from 'node:worker_threads';
277
- *
278
- * if (isMainThread) {
279
- * const worker = new Worker(__filename);
280
- *
281
- * worker.once('message', (filename) => {
282
- * console.log(`worker heapdump: ${filename}`);
283
- * // Now get a heapdump for the main thread.
284
- * console.log(`main thread heapdump: ${writeHeapSnapshot()}`);
285
- * });
286
- *
287
- * // Tell the worker to create a heapdump.
288
- * worker.postMessage('heapdump');
289
- * } else {
290
- * parentPort.once('message', (message) => {
291
- * if (message === 'heapdump') {
292
- * // Generate a heapdump for the worker
293
- * // and return the filename to the parent.
294
- * parentPort.postMessage(writeHeapSnapshot());
295
- * }
296
- * });
297
- * }
298
- * ```
299
- * @since v11.13.0
300
- * @param filename The file path where the V8 heap snapshot is to be saved. If not specified, a file name with the pattern `'Heap-${yyyymmdd}-${hhmmss}-${pid}-${thread_id}.heapsnapshot'` will be
301
- * generated, where `{pid}` will be the PID of the Node.js process, `{thread_id}` will be `0` when `writeHeapSnapshot()` is called from the main Node.js thread or the id of a
302
- * worker thread.
303
- * @return The filename where the snapshot was saved.
304
- */
305
- function writeHeapSnapshot(filename?: string, options?: HeapSnapshotOptions): string;
306
- /**
307
- * Get statistics about code and its metadata in the heap, see
308
- * V8 [`GetHeapCodeAndMetadataStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#a6079122af17612ef54ef3348ce170866) API. Returns an object with the
309
- * following properties:
310
- *
311
- * ```js
312
- * {
313
- * code_and_metadata_size: 212208,
314
- * bytecode_and_metadata_size: 161368,
315
- * external_script_source_size: 1410794,
316
- * cpu_profiler_metadata_size: 0,
317
- * }
318
- * ```
319
- * @since v12.8.0
320
- */
321
- function getHeapCodeStatistics(): HeapCodeStatistics;
322
- /**
323
- * @since v8.0.0
324
- */
325
- class Serializer {
326
- /**
327
- * Writes out a header, which includes the serialization format version.
328
- */
329
- writeHeader(): void;
330
- /**
331
- * Serializes a JavaScript value and adds the serialized representation to the
332
- * internal buffer.
333
- *
334
- * This throws an error if `value` cannot be serialized.
335
- */
336
- writeValue(val: any): boolean;
337
- /**
338
- * Returns the stored internal buffer. This serializer should not be used once
339
- * the buffer is released. Calling this method results in undefined behavior
340
- * if a previous write has failed.
341
- */
342
- releaseBuffer(): Buffer;
343
- /**
344
- * Marks an `ArrayBuffer` as having its contents transferred out of band.
345
- * Pass the corresponding `ArrayBuffer` in the deserializing context to `deserializer.transferArrayBuffer()`.
346
- * @param id A 32-bit unsigned integer.
347
- * @param arrayBuffer An `ArrayBuffer` instance.
348
- */
349
- transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
350
- /**
351
- * Write a raw 32-bit unsigned integer.
352
- * For use inside of a custom `serializer._writeHostObject()`.
353
- */
354
- writeUint32(value: number): void;
355
- /**
356
- * Write a raw 64-bit unsigned integer, split into high and low 32-bit parts.
357
- * For use inside of a custom `serializer._writeHostObject()`.
358
- */
359
- writeUint64(hi: number, lo: number): void;
360
- /**
361
- * Write a JS `number` value.
362
- * For use inside of a custom `serializer._writeHostObject()`.
363
- */
364
- writeDouble(value: number): void;
365
- /**
366
- * Write raw bytes into the serializer's internal buffer. The deserializer
367
- * will require a way to compute the length of the buffer.
368
- * For use inside of a custom `serializer._writeHostObject()`.
369
- */
370
- writeRawBytes(buffer: NodeJS.TypedArray): void;
371
- }
372
- /**
373
- * A subclass of `Serializer` that serializes `TypedArray`(in particular `Buffer`) and `DataView` objects as host objects, and only
374
- * stores the part of their underlying `ArrayBuffer`s that they are referring to.
375
- * @since v8.0.0
376
- */
377
- class DefaultSerializer extends Serializer {}
378
- /**
379
- * @since v8.0.0
380
- */
381
- class Deserializer {
382
- constructor(data: NodeJS.TypedArray);
383
- /**
384
- * Reads and validates a header (including the format version).
385
- * May, for example, reject an invalid or unsupported wire format. In that case,
386
- * an `Error` is thrown.
387
- */
388
- readHeader(): boolean;
389
- /**
390
- * Deserializes a JavaScript value from the buffer and returns it.
391
- */
392
- readValue(): any;
393
- /**
394
- * Marks an `ArrayBuffer` as having its contents transferred out of band.
395
- * Pass the corresponding `ArrayBuffer` in the serializing context to `serializer.transferArrayBuffer()` (or return the `id` from `serializer._getSharedArrayBufferId()` in the case of
396
- * `SharedArrayBuffer`s).
397
- * @param id A 32-bit unsigned integer.
398
- * @param arrayBuffer An `ArrayBuffer` instance.
399
- */
400
- transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
401
- /**
402
- * Reads the underlying wire format version. Likely mostly to be useful to
403
- * legacy code reading old wire format versions. May not be called before `.readHeader()`.
404
- */
405
- getWireFormatVersion(): number;
406
- /**
407
- * Read a raw 32-bit unsigned integer and return it.
408
- * For use inside of a custom `deserializer._readHostObject()`.
409
- */
410
- readUint32(): number;
411
- /**
412
- * Read a raw 64-bit unsigned integer and return it as an array `[hi, lo]` with two 32-bit unsigned integer entries.
413
- * For use inside of a custom `deserializer._readHostObject()`.
414
- */
415
- readUint64(): [number, number];
416
- /**
417
- * Read a JS `number` value.
418
- * For use inside of a custom `deserializer._readHostObject()`.
419
- */
420
- readDouble(): number;
421
- /**
422
- * Read raw bytes from the deserializer's internal buffer. The `length` parameter
423
- * must correspond to the length of the buffer that was passed to `serializer.writeRawBytes()`.
424
- * For use inside of a custom `deserializer._readHostObject()`.
425
- */
426
- readRawBytes(length: number): Buffer;
427
- }
428
- /**
429
- * A subclass of `Deserializer` corresponding to the format written by `DefaultSerializer`.
430
- * @since v8.0.0
431
- */
432
- class DefaultDeserializer extends Deserializer {}
433
- /**
434
- * Uses a `DefaultSerializer` to serialize `value` into a buffer.
435
- *
436
- * `ERR_BUFFER_TOO_LARGE` will be thrown when trying to
437
- * serialize a huge object which requires buffer
438
- * larger than `buffer.constants.MAX_LENGTH`.
439
- * @since v8.0.0
440
- */
441
- function serialize(value: any): Buffer;
442
- /**
443
- * Uses a `DefaultDeserializer` with default options to read a JS value
444
- * from a buffer.
445
- * @since v8.0.0
446
- * @param buffer A buffer returned by {@link serialize}.
447
- */
448
- function deserialize(buffer: NodeJS.ArrayBufferView): any;
449
- /**
450
- * The `v8.takeCoverage()` method allows the user to write the coverage started by `NODE_V8_COVERAGE` to disk on demand. This method can be invoked multiple
451
- * times during the lifetime of the process. Each time the execution counter will
452
- * be reset and a new coverage report will be written to the directory specified
453
- * by `NODE_V8_COVERAGE`.
454
- *
455
- * When the process is about to exit, one last coverage will still be written to
456
- * disk unless {@link stopCoverage} is invoked before the process exits.
457
- * @since v15.1.0, v14.18.0, v12.22.0
458
- */
459
- function takeCoverage(): void;
460
- /**
461
- * The `v8.stopCoverage()` method allows the user to stop the coverage collection
462
- * started by `NODE_V8_COVERAGE`, so that V8 can release the execution count
463
- * records and optimize code. This can be used in conjunction with {@link takeCoverage} if the user wants to collect the coverage on demand.
464
- * @since v15.1.0, v14.18.0, v12.22.0
465
- */
466
- function stopCoverage(): void;
467
- /**
468
- * The API is a no-op if `--heapsnapshot-near-heap-limit` is already set from the command line or the API is called more than once.
469
- * `limit` must be a positive integer. See [`--heapsnapshot-near-heap-limit`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--heapsnapshot-near-heap-limitmax_count) for more information.
470
- * @experimental
471
- * @since v18.10.0, v16.18.0
472
- */
473
- function setHeapSnapshotNearHeapLimit(limit: number): void;
474
- /**
475
- * This API collects GC data in current thread.
476
- * @since v19.6.0, v18.15.0
477
- */
478
- class GCProfiler {
479
- /**
480
- * Start collecting GC data.
481
- * @since v19.6.0, v18.15.0
482
- */
483
- start(): void;
484
- /**
485
- * Stop collecting GC data and return an object. The content of object
486
- * is as follows.
487
- *
488
- * ```json
489
- * {
490
- * "version": 1,
491
- * "startTime": 1674059033862,
492
- * "statistics": [
493
- * {
494
- * "gcType": "Scavenge",
495
- * "beforeGC": {
496
- * "heapStatistics": {
497
- * "totalHeapSize": 5005312,
498
- * "totalHeapSizeExecutable": 524288,
499
- * "totalPhysicalSize": 5226496,
500
- * "totalAvailableSize": 4341325216,
501
- * "totalGlobalHandlesSize": 8192,
502
- * "usedGlobalHandlesSize": 2112,
503
- * "usedHeapSize": 4883840,
504
- * "heapSizeLimit": 4345298944,
505
- * "mallocedMemory": 254128,
506
- * "externalMemory": 225138,
507
- * "peakMallocedMemory": 181760
508
- * },
509
- * "heapSpaceStatistics": [
510
- * {
511
- * "spaceName": "read_only_space",
512
- * "spaceSize": 0,
513
- * "spaceUsedSize": 0,
514
- * "spaceAvailableSize": 0,
515
- * "physicalSpaceSize": 0
516
- * }
517
- * ]
518
- * },
519
- * "cost": 1574.14,
520
- * "afterGC": {
521
- * "heapStatistics": {
522
- * "totalHeapSize": 6053888,
523
- * "totalHeapSizeExecutable": 524288,
524
- * "totalPhysicalSize": 5500928,
525
- * "totalAvailableSize": 4341101384,
526
- * "totalGlobalHandlesSize": 8192,
527
- * "usedGlobalHandlesSize": 2112,
528
- * "usedHeapSize": 4059096,
529
- * "heapSizeLimit": 4345298944,
530
- * "mallocedMemory": 254128,
531
- * "externalMemory": 225138,
532
- * "peakMallocedMemory": 181760
533
- * },
534
- * "heapSpaceStatistics": [
535
- * {
536
- * "spaceName": "read_only_space",
537
- * "spaceSize": 0,
538
- * "spaceUsedSize": 0,
539
- * "spaceAvailableSize": 0,
540
- * "physicalSpaceSize": 0
541
- * }
542
- * ]
543
- * }
544
- * }
545
- * ],
546
- * "endTime": 1674059036865
547
- * }
548
- * ```
549
- *
550
- * Here's an example.
551
- *
552
- * ```js
553
- * import { GCProfiler } from 'node:v8';
554
- * const profiler = new GCProfiler();
555
- * profiler.start();
556
- * setTimeout(() => {
557
- * console.log(profiler.stop());
558
- * }, 1000);
559
- * ```
560
- * @since v19.6.0, v18.15.0
561
- */
562
- stop(): GCProfilerResult;
563
- }
564
- interface GCProfilerResult {
565
- version: number;
566
- startTime: number;
567
- endTime: number;
568
- statistics: Array<{
569
- gcType: string;
570
- cost: number;
571
- beforeGC: {
572
- heapStatistics: HeapStatistics;
573
- heapSpaceStatistics: HeapSpaceStatistics[];
574
- };
575
- afterGC: {
576
- heapStatistics: HeapStatistics;
577
- heapSpaceStatistics: HeapSpaceStatistics[];
578
- };
579
- }>;
580
- }
581
- interface HeapStatistics {
582
- totalHeapSize: number;
583
- totalHeapSizeExecutable: number;
584
- totalPhysicalSize: number;
585
- totalAvailableSize: number;
586
- totalGlobalHandlesSize: number;
587
- usedGlobalHandlesSize: number;
588
- usedHeapSize: number;
589
- heapSizeLimit: number;
590
- mallocedMemory: number;
591
- externalMemory: number;
592
- peakMallocedMemory: number;
593
- }
594
- interface HeapSpaceStatistics {
595
- spaceName: string;
596
- spaceSize: number;
597
- spaceUsedSize: number;
598
- spaceAvailableSize: number;
599
- physicalSpaceSize: number;
600
- }
601
- /**
602
- * Called when a promise is constructed. This does not mean that corresponding before/after events will occur, only that the possibility exists. This will
603
- * happen if a promise is created without ever getting a continuation.
604
- * @since v17.1.0, v16.14.0
605
- * @param promise The promise being created.
606
- * @param parent The promise continued from, if applicable.
607
- */
608
- interface Init {
609
- (promise: Promise<unknown>, parent: Promise<unknown>): void;
610
- }
611
- /**
612
- * Called before a promise continuation executes. This can be in the form of `then()`, `catch()`, or `finally()` handlers or an await resuming.
613
- *
614
- * The before callback will be called 0 to N times. The before callback will typically be called 0 times if no continuation was ever made for the promise.
615
- * The before callback may be called many times in the case where many continuations have been made from the same promise.
616
- * @since v17.1.0, v16.14.0
617
- */
618
- interface Before {
619
- (promise: Promise<unknown>): void;
620
- }
621
- /**
622
- * Called immediately after a promise continuation executes. This may be after a `then()`, `catch()`, or `finally()` handler or before an await after another await.
623
- * @since v17.1.0, v16.14.0
624
- */
625
- interface After {
626
- (promise: Promise<unknown>): void;
627
- }
628
- /**
629
- * Called when the promise receives a resolution or rejection value. This may occur synchronously in the case of {@link Promise.resolve()} or
630
- * {@link Promise.reject()}.
631
- * @since v17.1.0, v16.14.0
632
- */
633
- interface Settled {
634
- (promise: Promise<unknown>): void;
635
- }
636
- /**
637
- * Key events in the lifetime of a promise have been categorized into four areas: creation of a promise, before/after a continuation handler is called or
638
- * around an await, and when the promise resolves or rejects.
639
- *
640
- * Because promises are asynchronous resources whose lifecycle is tracked via the promise hooks mechanism, the `init()`, `before()`, `after()`, and
641
- * `settled()` callbacks must not be async functions as they create more promises which would produce an infinite loop.
642
- * @since v17.1.0, v16.14.0
643
- */
644
- interface HookCallbacks {
645
- init?: Init;
646
- before?: Before;
647
- after?: After;
648
- settled?: Settled;
649
- }
650
- interface PromiseHooks {
651
- /**
652
- * The `init` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.
653
- * @since v17.1.0, v16.14.0
654
- * @param init The {@link Init | `init` callback} to call when a promise is created.
655
- * @return Call to stop the hook.
656
- */
657
- onInit: (init: Init) => Function;
658
- /**
659
- * The `settled` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.
660
- * @since v17.1.0, v16.14.0
661
- * @param settled The {@link Settled | `settled` callback} to call when a promise is created.
662
- * @return Call to stop the hook.
663
- */
664
- onSettled: (settled: Settled) => Function;
665
- /**
666
- * The `before` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.
667
- * @since v17.1.0, v16.14.0
668
- * @param before The {@link Before | `before` callback} to call before a promise continuation executes.
669
- * @return Call to stop the hook.
670
- */
671
- onBefore: (before: Before) => Function;
672
- /**
673
- * The `after` hook must be a plain function. Providing an async function will throw as it would produce an infinite microtask loop.
674
- * @since v17.1.0, v16.14.0
675
- * @param after The {@link After | `after` callback} to call after a promise continuation executes.
676
- * @return Call to stop the hook.
677
- */
678
- onAfter: (after: After) => Function;
679
- /**
680
- * Registers functions to be called for different lifetime events of each promise.
681
- * The callbacks `init()`/`before()`/`after()`/`settled()` are called for the respective events during a promise's lifetime.
682
- * All callbacks are optional. For example, if only promise creation needs to be tracked, then only the init callback needs to be passed.
683
- * The hook callbacks must be plain functions. Providing async functions will throw as it would produce an infinite microtask loop.
684
- * @since v17.1.0, v16.14.0
685
- * @param callbacks The {@link HookCallbacks | Hook Callbacks} to register
686
- * @return Used for disabling hooks
687
- */
688
- createHook: (callbacks: HookCallbacks) => Function;
689
- }
690
- /**
691
- * The `promiseHooks` interface can be used to track promise lifecycle events.
692
- * @since v17.1.0, v16.14.0
693
- */
694
- const promiseHooks: PromiseHooks;
695
- type StartupSnapshotCallbackFn = (args: any) => any;
696
- interface StartupSnapshot {
697
- /**
698
- * Add a callback that will be called when the Node.js instance is about to get serialized into a snapshot and exit.
699
- * This can be used to release resources that should not or cannot be serialized or to convert user data into a form more suitable for serialization.
700
- * @since v18.6.0, v16.17.0
701
- */
702
- addSerializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void;
703
- /**
704
- * Add a callback that will be called when the Node.js instance is deserialized from a snapshot.
705
- * The `callback` and the `data` (if provided) will be serialized into the snapshot, they can be used to re-initialize the state of the application or
706
- * to re-acquire resources that the application needs when the application is restarted from the snapshot.
707
- * @since v18.6.0, v16.17.0
708
- */
709
- addDeserializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void;
710
- /**
711
- * This sets the entry point of the Node.js application when it is deserialized from a snapshot. This can be called only once in the snapshot building script.
712
- * If called, the deserialized application no longer needs an additional entry point script to start up and will simply invoke the callback along with the deserialized
713
- * data (if provided), otherwise an entry point script still needs to be provided to the deserialized application.
714
- * @since v18.6.0, v16.17.0
715
- */
716
- setDeserializeMainFunction(callback: StartupSnapshotCallbackFn, data?: any): void;
717
- /**
718
- * Returns true if the Node.js instance is run to build a snapshot.
719
- * @since v18.6.0, v16.17.0
720
- */
721
- isBuildingSnapshot(): boolean;
722
- }
723
- /**
724
- * The `v8.startupSnapshot` interface can be used to add serialization and deserialization hooks for custom startup snapshots.
725
- *
726
- * ```bash
727
- * $ node --snapshot-blob snapshot.blob --build-snapshot entry.js
728
- * # This launches a process with the snapshot
729
- * $ node --snapshot-blob snapshot.blob
730
- * ```
731
- *
732
- * In the example above, `entry.js` can use methods from the `v8.startupSnapshot` interface to specify how to save information for custom objects
733
- * in the snapshot during serialization and how the information can be used to synchronize these objects during deserialization of the snapshot.
734
- * For example, if the `entry.js` contains the following script:
735
- *
736
- * ```js
737
- * 'use strict';
738
- *
739
- * import fs from 'node:fs';
740
- * import zlib from 'node:zlib';
741
- * import path from 'node:path';
742
- * import assert from 'node:assert';
743
- *
744
- * import v8 from 'node:v8';
745
- *
746
- * class BookShelf {
747
- * storage = new Map();
748
- *
749
- * // Reading a series of files from directory and store them into storage.
750
- * constructor(directory, books) {
751
- * for (const book of books) {
752
- * this.storage.set(book, fs.readFileSync(path.join(directory, book)));
753
- * }
754
- * }
755
- *
756
- * static compressAll(shelf) {
757
- * for (const [ book, content ] of shelf.storage) {
758
- * shelf.storage.set(book, zlib.gzipSync(content));
759
- * }
760
- * }
761
- *
762
- * static decompressAll(shelf) {
763
- * for (const [ book, content ] of shelf.storage) {
764
- * shelf.storage.set(book, zlib.gunzipSync(content));
765
- * }
766
- * }
767
- * }
768
- *
769
- * // __dirname here is where the snapshot script is placed
770
- * // during snapshot building time.
771
- * const shelf = new BookShelf(__dirname, [
772
- * 'book1.en_US.txt',
773
- * 'book1.es_ES.txt',
774
- * 'book2.zh_CN.txt',
775
- * ]);
776
- *
777
- * assert(v8.startupSnapshot.isBuildingSnapshot());
778
- * // On snapshot serialization, compress the books to reduce size.
779
- * v8.startupSnapshot.addSerializeCallback(BookShelf.compressAll, shelf);
780
- * // On snapshot deserialization, decompress the books.
781
- * v8.startupSnapshot.addDeserializeCallback(BookShelf.decompressAll, shelf);
782
- * v8.startupSnapshot.setDeserializeMainFunction((shelf) => {
783
- * // process.env and process.argv are refreshed during snapshot
784
- * // deserialization.
785
- * const lang = process.env.BOOK_LANG || 'en_US';
786
- * const book = process.argv[1];
787
- * const name = `${book}.${lang}.txt`;
788
- * console.log(shelf.storage.get(name));
789
- * }, shelf);
790
- * ```
791
- *
792
- * The resulted binary will get print the data deserialized from the snapshot during start up, using the refreshed `process.env` and `process.argv` of the launched process:
793
- *
794
- * ```bash
795
- * $ BOOK_LANG=es_ES node --snapshot-blob snapshot.blob book1
796
- * # Prints content of book1.es_ES.txt deserialized from the snapshot.
797
- * ```
798
- *
799
- * Currently the application deserialized from a user-land snapshot cannot be snapshotted again, so these APIs are only available to applications that are not deserialized from a user-land snapshot.
800
- *
801
- * @experimental
802
- * @since v18.6.0, v16.17.0
803
- */
804
- const startupSnapshot: StartupSnapshot;
805
- }
806
- declare module "node:v8" {
807
- export * from "v8";
808
- }