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,1044 +0,0 @@
1
- /**
2
- * The `node:assert` module provides a set of assertion functions for verifying
3
- * invariants.
4
- * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/assert.js)
5
- */
6
- declare module "assert" {
7
- /**
8
- * An alias of {@link ok}.
9
- * @since v0.5.9
10
- * @param value The input that is checked for being truthy.
11
- */
12
- function assert(value: unknown, message?: string | Error): asserts value;
13
- namespace assert {
14
- /**
15
- * Indicates the failure of an assertion. All errors thrown by the `node:assert` module will be instances of the `AssertionError` class.
16
- */
17
- class AssertionError extends Error {
18
- /**
19
- * Set to the `actual` argument for methods such as {@link assert.strictEqual()}.
20
- */
21
- actual: unknown;
22
- /**
23
- * Set to the `expected` argument for methods such as {@link assert.strictEqual()}.
24
- */
25
- expected: unknown;
26
- /**
27
- * Set to the passed in operator value.
28
- */
29
- operator: string;
30
- /**
31
- * Indicates if the message was auto-generated (`true`) or not.
32
- */
33
- generatedMessage: boolean;
34
- /**
35
- * Value is always `ERR_ASSERTION` to show that the error is an assertion error.
36
- */
37
- code: "ERR_ASSERTION";
38
- constructor(options?: {
39
- /** If provided, the error message is set to this value. */
40
- message?: string | undefined;
41
- /** The `actual` property on the error instance. */
42
- actual?: unknown | undefined;
43
- /** The `expected` property on the error instance. */
44
- expected?: unknown | undefined;
45
- /** The `operator` property on the error instance. */
46
- operator?: string | undefined;
47
- /** If provided, the generated stack trace omits frames before this function. */
48
- // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
49
- stackStartFn?: Function | undefined;
50
- });
51
- }
52
- /**
53
- * This feature is deprecated and will be removed in a future version.
54
- * Please consider using alternatives such as the `mock` helper function.
55
- * @since v14.2.0, v12.19.0
56
- * @deprecated Deprecated
57
- */
58
- class CallTracker {
59
- /**
60
- * The wrapper function is expected to be called exactly `exact` times. If the
61
- * function has not been called exactly `exact` times when `tracker.verify()` is called, then `tracker.verify()` will throw an
62
- * error.
63
- *
64
- * ```js
65
- * import assert from 'node:assert';
66
- *
67
- * // Creates call tracker.
68
- * const tracker = new assert.CallTracker();
69
- *
70
- * function func() {}
71
- *
72
- * // Returns a function that wraps func() that must be called exact times
73
- * // before tracker.verify().
74
- * const callsfunc = tracker.calls(func);
75
- * ```
76
- * @since v14.2.0, v12.19.0
77
- * @param [fn='A no-op function']
78
- * @param [exact=1]
79
- * @return A function that wraps `fn`.
80
- */
81
- calls(exact?: number): () => void;
82
- calls(fn: undefined, exact?: number): () => void;
83
- calls<Func extends (...args: any[]) => any>(fn: Func, exact?: number): Func;
84
- calls<Func extends (...args: any[]) => any>(fn?: Func, exact?: number): Func | (() => void);
85
- /**
86
- * Example:
87
- *
88
- * ```js
89
- * import assert from 'node:assert';
90
- *
91
- * const tracker = new assert.CallTracker();
92
- *
93
- * function func() {}
94
- * const callsfunc = tracker.calls(func);
95
- * callsfunc(1, 2, 3);
96
- *
97
- * assert.deepStrictEqual(tracker.getCalls(callsfunc),
98
- * [{ thisArg: undefined, arguments: [1, 2, 3] }]);
99
- * ```
100
- * @since v18.8.0, v16.18.0
101
- * @return An array with all the calls to a tracked function.
102
- */
103
- getCalls(fn: Function): CallTrackerCall[];
104
- /**
105
- * The arrays contains information about the expected and actual number of calls of
106
- * the functions that have not been called the expected number of times.
107
- *
108
- * ```js
109
- * import assert from 'node:assert';
110
- *
111
- * // Creates call tracker.
112
- * const tracker = new assert.CallTracker();
113
- *
114
- * function func() {}
115
- *
116
- * // Returns a function that wraps func() that must be called exact times
117
- * // before tracker.verify().
118
- * const callsfunc = tracker.calls(func, 2);
119
- *
120
- * // Returns an array containing information on callsfunc()
121
- * console.log(tracker.report());
122
- * // [
123
- * // {
124
- * // message: 'Expected the func function to be executed 2 time(s) but was
125
- * // executed 0 time(s).',
126
- * // actual: 0,
127
- * // expected: 2,
128
- * // operator: 'func',
129
- * // stack: stack trace
130
- * // }
131
- * // ]
132
- * ```
133
- * @since v14.2.0, v12.19.0
134
- * @return An array of objects containing information about the wrapper functions returned by {@link tracker.calls()}.
135
- */
136
- report(): CallTrackerReportInformation[];
137
- /**
138
- * Reset calls of the call tracker. If a tracked function is passed as an argument, the calls will be reset for it.
139
- * If no arguments are passed, all tracked functions will be reset.
140
- *
141
- * ```js
142
- * import assert from 'node:assert';
143
- *
144
- * const tracker = new assert.CallTracker();
145
- *
146
- * function func() {}
147
- * const callsfunc = tracker.calls(func);
148
- *
149
- * callsfunc();
150
- * // Tracker was called once
151
- * assert.strictEqual(tracker.getCalls(callsfunc).length, 1);
152
- *
153
- * tracker.reset(callsfunc);
154
- * assert.strictEqual(tracker.getCalls(callsfunc).length, 0);
155
- * ```
156
- * @since v18.8.0, v16.18.0
157
- * @param fn a tracked function to reset.
158
- */
159
- reset(fn?: Function): void;
160
- /**
161
- * Iterates through the list of functions passed to {@link tracker.calls()} and will throw an error for functions that
162
- * have not been called the expected number of times.
163
- *
164
- * ```js
165
- * import assert from 'node:assert';
166
- *
167
- * // Creates call tracker.
168
- * const tracker = new assert.CallTracker();
169
- *
170
- * function func() {}
171
- *
172
- * // Returns a function that wraps func() that must be called exact times
173
- * // before tracker.verify().
174
- * const callsfunc = tracker.calls(func, 2);
175
- *
176
- * callsfunc();
177
- *
178
- * // Will throw an error since callsfunc() was only called once.
179
- * tracker.verify();
180
- * ```
181
- * @since v14.2.0, v12.19.0
182
- */
183
- verify(): void;
184
- }
185
- interface CallTrackerCall {
186
- thisArg: object;
187
- arguments: unknown[];
188
- }
189
- interface CallTrackerReportInformation {
190
- message: string;
191
- /** The actual number of times the function was called. */
192
- actual: number;
193
- /** The number of times the function was expected to be called. */
194
- expected: number;
195
- /** The name of the function that is wrapped. */
196
- operator: string;
197
- /** A stack trace of the function. */
198
- stack: object;
199
- }
200
- type AssertPredicate = RegExp | (new() => object) | ((thrown: unknown) => boolean) | object | Error;
201
- /**
202
- * Throws an `AssertionError` with the provided error message or a default
203
- * error message. If the `message` parameter is an instance of an `Error` then
204
- * it will be thrown instead of the `AssertionError`.
205
- *
206
- * ```js
207
- * import assert from 'node:assert/strict';
208
- *
209
- * assert.fail();
210
- * // AssertionError [ERR_ASSERTION]: Failed
211
- *
212
- * assert.fail('boom');
213
- * // AssertionError [ERR_ASSERTION]: boom
214
- *
215
- * assert.fail(new TypeError('need array'));
216
- * // TypeError: need array
217
- * ```
218
- *
219
- * Using `assert.fail()` with more than two arguments is possible but deprecated.
220
- * See below for further details.
221
- * @since v0.1.21
222
- * @param [message='Failed']
223
- */
224
- function fail(message?: string | Error): never;
225
- /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
226
- function fail(
227
- actual: unknown,
228
- expected: unknown,
229
- message?: string | Error,
230
- operator?: string,
231
- // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
232
- stackStartFn?: Function,
233
- ): never;
234
- /**
235
- * Tests if `value` is truthy. It is equivalent to `assert.equal(!!value, true, message)`.
236
- *
237
- * If `value` is not truthy, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is `undefined`, a default
238
- * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`.
239
- * If no arguments are passed in at all `message` will be set to the string:`` 'No value argument passed to `assert.ok()`' ``.
240
- *
241
- * Be aware that in the `repl` the error message will be different to the one
242
- * thrown in a file! See below for further details.
243
- *
244
- * ```js
245
- * import assert from 'node:assert/strict';
246
- *
247
- * assert.ok(true);
248
- * // OK
249
- * assert.ok(1);
250
- * // OK
251
- *
252
- * assert.ok();
253
- * // AssertionError: No value argument passed to `assert.ok()`
254
- *
255
- * assert.ok(false, 'it\'s false');
256
- * // AssertionError: it's false
257
- *
258
- * // In the repl:
259
- * assert.ok(typeof 123 === 'string');
260
- * // AssertionError: false == true
261
- *
262
- * // In a file (e.g. test.js):
263
- * assert.ok(typeof 123 === 'string');
264
- * // AssertionError: The expression evaluated to a falsy value:
265
- * //
266
- * // assert.ok(typeof 123 === 'string')
267
- *
268
- * assert.ok(false);
269
- * // AssertionError: The expression evaluated to a falsy value:
270
- * //
271
- * // assert.ok(false)
272
- *
273
- * assert.ok(0);
274
- * // AssertionError: The expression evaluated to a falsy value:
275
- * //
276
- * // assert.ok(0)
277
- * ```
278
- *
279
- * ```js
280
- * import assert from 'node:assert/strict';
281
- *
282
- * // Using `assert()` works the same:
283
- * assert(0);
284
- * // AssertionError: The expression evaluated to a falsy value:
285
- * //
286
- * // assert(0)
287
- * ```
288
- * @since v0.1.21
289
- */
290
- function ok(value: unknown, message?: string | Error): asserts value;
291
- /**
292
- * **Strict assertion mode**
293
- *
294
- * An alias of {@link strictEqual}.
295
- *
296
- * **Legacy assertion mode**
297
- *
298
- * > Stability: 3 - Legacy: Use {@link strictEqual} instead.
299
- *
300
- * Tests shallow, coercive equality between the `actual` and `expected` parameters
301
- * using the [`==` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality). `NaN` is specially handled
302
- * and treated as being identical if both sides are `NaN`.
303
- *
304
- * ```js
305
- * import assert from 'node:assert';
306
- *
307
- * assert.equal(1, 1);
308
- * // OK, 1 == 1
309
- * assert.equal(1, '1');
310
- * // OK, 1 == '1'
311
- * assert.equal(NaN, NaN);
312
- * // OK
313
- *
314
- * assert.equal(1, 2);
315
- * // AssertionError: 1 == 2
316
- * assert.equal({ a: { b: 1 } }, { a: { b: 1 } });
317
- * // AssertionError: { a: { b: 1 } } == { a: { b: 1 } }
318
- * ```
319
- *
320
- * If the values are not equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default
321
- * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`.
322
- * @since v0.1.21
323
- */
324
- function equal(actual: unknown, expected: unknown, message?: string | Error): void;
325
- /**
326
- * **Strict assertion mode**
327
- *
328
- * An alias of {@link notStrictEqual}.
329
- *
330
- * **Legacy assertion mode**
331
- *
332
- * > Stability: 3 - Legacy: Use {@link notStrictEqual} instead.
333
- *
334
- * Tests shallow, coercive inequality with the [`!=` operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Inequality). `NaN` is
335
- * specially handled and treated as being identical if both sides are `NaN`.
336
- *
337
- * ```js
338
- * import assert from 'node:assert';
339
- *
340
- * assert.notEqual(1, 2);
341
- * // OK
342
- *
343
- * assert.notEqual(1, 1);
344
- * // AssertionError: 1 != 1
345
- *
346
- * assert.notEqual(1, '1');
347
- * // AssertionError: 1 != '1'
348
- * ```
349
- *
350
- * If the values are equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default error
351
- * message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`.
352
- * @since v0.1.21
353
- */
354
- function notEqual(actual: unknown, expected: unknown, message?: string | Error): void;
355
- /**
356
- * **Strict assertion mode**
357
- *
358
- * An alias of {@link deepStrictEqual}.
359
- *
360
- * **Legacy assertion mode**
361
- *
362
- * > Stability: 3 - Legacy: Use {@link deepStrictEqual} instead.
363
- *
364
- * Tests for deep equality between the `actual` and `expected` parameters. Consider
365
- * using {@link deepStrictEqual} instead. {@link deepEqual} can have
366
- * surprising results.
367
- *
368
- * _Deep equality_ means that the enumerable "own" properties of child objects
369
- * are also recursively evaluated by the following rules.
370
- * @since v0.1.21
371
- */
372
- function deepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
373
- /**
374
- * **Strict assertion mode**
375
- *
376
- * An alias of {@link notDeepStrictEqual}.
377
- *
378
- * **Legacy assertion mode**
379
- *
380
- * > Stability: 3 - Legacy: Use {@link notDeepStrictEqual} instead.
381
- *
382
- * Tests for any deep inequality. Opposite of {@link deepEqual}.
383
- *
384
- * ```js
385
- * import assert from 'node:assert';
386
- *
387
- * const obj1 = {
388
- * a: {
389
- * b: 1,
390
- * },
391
- * };
392
- * const obj2 = {
393
- * a: {
394
- * b: 2,
395
- * },
396
- * };
397
- * const obj3 = {
398
- * a: {
399
- * b: 1,
400
- * },
401
- * };
402
- * const obj4 = { __proto__: obj1 };
403
- *
404
- * assert.notDeepEqual(obj1, obj1);
405
- * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
406
- *
407
- * assert.notDeepEqual(obj1, obj2);
408
- * // OK
409
- *
410
- * assert.notDeepEqual(obj1, obj3);
411
- * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
412
- *
413
- * assert.notDeepEqual(obj1, obj4);
414
- * // OK
415
- * ```
416
- *
417
- * If the values are deeply equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a default
418
- * error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown
419
- * instead of the `AssertionError`.
420
- * @since v0.1.21
421
- */
422
- function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
423
- /**
424
- * Tests strict equality between the `actual` and `expected` parameters as
425
- * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
426
- *
427
- * ```js
428
- * import assert from 'node:assert/strict';
429
- *
430
- * assert.strictEqual(1, 2);
431
- * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
432
- * //
433
- * // 1 !== 2
434
- *
435
- * assert.strictEqual(1, 1);
436
- * // OK
437
- *
438
- * assert.strictEqual('Hello foobar', 'Hello World!');
439
- * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
440
- * // + actual - expected
441
- * //
442
- * // + 'Hello foobar'
443
- * // - 'Hello World!'
444
- * // ^
445
- *
446
- * const apples = 1;
447
- * const oranges = 2;
448
- * assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`);
449
- * // AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2
450
- *
451
- * assert.strictEqual(1, '1', new TypeError('Inputs are not identical'));
452
- * // TypeError: Inputs are not identical
453
- * ```
454
- *
455
- * If the values are not strictly equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a
456
- * default error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown
457
- * instead of the `AssertionError`.
458
- * @since v0.1.21
459
- */
460
- function strictEqual<T>(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
461
- /**
462
- * Tests strict inequality between the `actual` and `expected` parameters as
463
- * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
464
- *
465
- * ```js
466
- * import assert from 'node:assert/strict';
467
- *
468
- * assert.notStrictEqual(1, 2);
469
- * // OK
470
- *
471
- * assert.notStrictEqual(1, 1);
472
- * // AssertionError [ERR_ASSERTION]: Expected "actual" to be strictly unequal to:
473
- * //
474
- * // 1
475
- *
476
- * assert.notStrictEqual(1, '1');
477
- * // OK
478
- * ```
479
- *
480
- * If the values are strictly equal, an `AssertionError` is thrown with a `message` property set equal to the value of the `message` parameter. If the `message` parameter is undefined, a
481
- * default error message is assigned. If the `message` parameter is an instance of an `Error` then it will be thrown
482
- * instead of the `AssertionError`.
483
- * @since v0.1.21
484
- */
485
- function notStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
486
- /**
487
- * Tests for deep equality between the `actual` and `expected` parameters.
488
- * "Deep" equality means that the enumerable "own" properties of child objects
489
- * are recursively evaluated also by the following rules.
490
- * @since v1.2.0
491
- */
492
- function deepStrictEqual<T>(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
493
- /**
494
- * Tests for deep strict inequality. Opposite of {@link deepStrictEqual}.
495
- *
496
- * ```js
497
- * import assert from 'node:assert/strict';
498
- *
499
- * assert.notDeepStrictEqual({ a: 1 }, { a: '1' });
500
- * // OK
501
- * ```
502
- *
503
- * If the values are deeply and strictly equal, an `AssertionError` is thrown
504
- * with a `message` property set equal to the value of the `message` parameter. If
505
- * the `message` parameter is undefined, a default error message is assigned. If
506
- * the `message` parameter is an instance of an `Error` then it will be thrown
507
- * instead of the `AssertionError`.
508
- * @since v1.2.0
509
- */
510
- function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
511
- /**
512
- * Expects the function `fn` to throw an error.
513
- *
514
- * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
515
- * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
516
- * a validation object where each property will be tested for strict deep equality,
517
- * or an instance of error where each property will be tested for strict deep
518
- * equality including the non-enumerable `message` and `name` properties. When
519
- * using an object, it is also possible to use a regular expression, when
520
- * validating against a string property. See below for examples.
521
- *
522
- * If specified, `message` will be appended to the message provided by the `AssertionError` if the `fn` call fails to throw or in case the error validation
523
- * fails.
524
- *
525
- * Custom validation object/error instance:
526
- *
527
- * ```js
528
- * import assert from 'node:assert/strict';
529
- *
530
- * const err = new TypeError('Wrong value');
531
- * err.code = 404;
532
- * err.foo = 'bar';
533
- * err.info = {
534
- * nested: true,
535
- * baz: 'text',
536
- * };
537
- * err.reg = /abc/i;
538
- *
539
- * assert.throws(
540
- * () => {
541
- * throw err;
542
- * },
543
- * {
544
- * name: 'TypeError',
545
- * message: 'Wrong value',
546
- * info: {
547
- * nested: true,
548
- * baz: 'text',
549
- * },
550
- * // Only properties on the validation object will be tested for.
551
- * // Using nested objects requires all properties to be present. Otherwise
552
- * // the validation is going to fail.
553
- * },
554
- * );
555
- *
556
- * // Using regular expressions to validate error properties:
557
- * assert.throws(
558
- * () => {
559
- * throw err;
560
- * },
561
- * {
562
- * // The `name` and `message` properties are strings and using regular
563
- * // expressions on those will match against the string. If they fail, an
564
- * // error is thrown.
565
- * name: /^TypeError$/,
566
- * message: /Wrong/,
567
- * foo: 'bar',
568
- * info: {
569
- * nested: true,
570
- * // It is not possible to use regular expressions for nested properties!
571
- * baz: 'text',
572
- * },
573
- * // The `reg` property contains a regular expression and only if the
574
- * // validation object contains an identical regular expression, it is going
575
- * // to pass.
576
- * reg: /abc/i,
577
- * },
578
- * );
579
- *
580
- * // Fails due to the different `message` and `name` properties:
581
- * assert.throws(
582
- * () => {
583
- * const otherErr = new Error('Not found');
584
- * // Copy all enumerable properties from `err` to `otherErr`.
585
- * for (const [key, value] of Object.entries(err)) {
586
- * otherErr[key] = value;
587
- * }
588
- * throw otherErr;
589
- * },
590
- * // The error's `message` and `name` properties will also be checked when using
591
- * // an error as validation object.
592
- * err,
593
- * );
594
- * ```
595
- *
596
- * Validate instanceof using constructor:
597
- *
598
- * ```js
599
- * import assert from 'node:assert/strict';
600
- *
601
- * assert.throws(
602
- * () => {
603
- * throw new Error('Wrong value');
604
- * },
605
- * Error,
606
- * );
607
- * ```
608
- *
609
- * Validate error message using [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions):
610
- *
611
- * Using a regular expression runs `.toString` on the error object, and will
612
- * therefore also include the error name.
613
- *
614
- * ```js
615
- * import assert from 'node:assert/strict';
616
- *
617
- * assert.throws(
618
- * () => {
619
- * throw new Error('Wrong value');
620
- * },
621
- * /^Error: Wrong value$/,
622
- * );
623
- * ```
624
- *
625
- * Custom error validation:
626
- *
627
- * The function must return `true` to indicate all internal validations passed.
628
- * It will otherwise fail with an `AssertionError`.
629
- *
630
- * ```js
631
- * import assert from 'node:assert/strict';
632
- *
633
- * assert.throws(
634
- * () => {
635
- * throw new Error('Wrong value');
636
- * },
637
- * (err) => {
638
- * assert(err instanceof Error);
639
- * assert(/value/.test(err));
640
- * // Avoid returning anything from validation functions besides `true`.
641
- * // Otherwise, it's not clear what part of the validation failed. Instead,
642
- * // throw an error about the specific validation that failed (as done in this
643
- * // example) and add as much helpful debugging information to that error as
644
- * // possible.
645
- * return true;
646
- * },
647
- * 'unexpected error',
648
- * );
649
- * ```
650
- *
651
- * `error` cannot be a string. If a string is provided as the second
652
- * argument, then `error` is assumed to be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes. Using the same
653
- * message as the thrown error message is going to result in an `ERR_AMBIGUOUS_ARGUMENT` error. Please read the example below carefully if using
654
- * a string as the second argument gets considered:
655
- *
656
- * ```js
657
- * import assert from 'node:assert/strict';
658
- *
659
- * function throwingFirst() {
660
- * throw new Error('First');
661
- * }
662
- *
663
- * function throwingSecond() {
664
- * throw new Error('Second');
665
- * }
666
- *
667
- * function notThrowing() {}
668
- *
669
- * // The second argument is a string and the input function threw an Error.
670
- * // The first case will not throw as it does not match for the error message
671
- * // thrown by the input function!
672
- * assert.throws(throwingFirst, 'Second');
673
- * // In the next example the message has no benefit over the message from the
674
- * // error and since it is not clear if the user intended to actually match
675
- * // against the error message, Node.js throws an `ERR_AMBIGUOUS_ARGUMENT` error.
676
- * assert.throws(throwingSecond, 'Second');
677
- * // TypeError [ERR_AMBIGUOUS_ARGUMENT]
678
- *
679
- * // The string is only used (as message) in case the function does not throw:
680
- * assert.throws(notThrowing, 'Second');
681
- * // AssertionError [ERR_ASSERTION]: Missing expected exception: Second
682
- *
683
- * // If it was intended to match for the error message do this instead:
684
- * // It does not throw because the error messages match.
685
- * assert.throws(throwingSecond, /Second$/);
686
- *
687
- * // If the error message does not match, an AssertionError is thrown.
688
- * assert.throws(throwingFirst, /Second$/);
689
- * // AssertionError [ERR_ASSERTION]
690
- * ```
691
- *
692
- * Due to the confusing error-prone notation, avoid a string as the second
693
- * argument.
694
- * @since v0.1.21
695
- */
696
- function throws(block: () => unknown, message?: string | Error): void;
697
- function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
698
- /**
699
- * Asserts that the function `fn` does not throw an error.
700
- *
701
- * Using `assert.doesNotThrow()` is actually not useful because there
702
- * is no benefit in catching an error and then rethrowing it. Instead, consider
703
- * adding a comment next to the specific code path that should not throw and keep
704
- * error messages as expressive as possible.
705
- *
706
- * When `assert.doesNotThrow()` is called, it will immediately call the `fn` function.
707
- *
708
- * If an error is thrown and it is the same type as that specified by the `error` parameter, then an `AssertionError` is thrown. If the error is of a
709
- * different type, or if the `error` parameter is undefined, the error is
710
- * propagated back to the caller.
711
- *
712
- * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
713
- * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation
714
- * function. See {@link throws} for more details.
715
- *
716
- * The following, for instance, will throw the `TypeError` because there is no
717
- * matching error type in the assertion:
718
- *
719
- * ```js
720
- * import assert from 'node:assert/strict';
721
- *
722
- * assert.doesNotThrow(
723
- * () => {
724
- * throw new TypeError('Wrong value');
725
- * },
726
- * SyntaxError,
727
- * );
728
- * ```
729
- *
730
- * However, the following will result in an `AssertionError` with the message
731
- * 'Got unwanted exception...':
732
- *
733
- * ```js
734
- * import assert from 'node:assert/strict';
735
- *
736
- * assert.doesNotThrow(
737
- * () => {
738
- * throw new TypeError('Wrong value');
739
- * },
740
- * TypeError,
741
- * );
742
- * ```
743
- *
744
- * If an `AssertionError` is thrown and a value is provided for the `message` parameter, the value of `message` will be appended to the `AssertionError` message:
745
- *
746
- * ```js
747
- * import assert from 'node:assert/strict';
748
- *
749
- * assert.doesNotThrow(
750
- * () => {
751
- * throw new TypeError('Wrong value');
752
- * },
753
- * /Wrong value/,
754
- * 'Whoops',
755
- * );
756
- * // Throws: AssertionError: Got unwanted exception: Whoops
757
- * ```
758
- * @since v0.1.21
759
- */
760
- function doesNotThrow(block: () => unknown, message?: string | Error): void;
761
- function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
762
- /**
763
- * Throws `value` if `value` is not `undefined` or `null`. This is useful when
764
- * testing the `error` argument in callbacks. The stack trace contains all frames
765
- * from the error passed to `ifError()` including the potential new frames for `ifError()` itself.
766
- *
767
- * ```js
768
- * import assert from 'node:assert/strict';
769
- *
770
- * assert.ifError(null);
771
- * // OK
772
- * assert.ifError(0);
773
- * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 0
774
- * assert.ifError('error');
775
- * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 'error'
776
- * assert.ifError(new Error());
777
- * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Error
778
- *
779
- * // Create some random error frames.
780
- * let err;
781
- * (function errorFrame() {
782
- * err = new Error('test error');
783
- * })();
784
- *
785
- * (function ifErrorFrame() {
786
- * assert.ifError(err);
787
- * })();
788
- * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error
789
- * // at ifErrorFrame
790
- * // at errorFrame
791
- * ```
792
- * @since v0.1.97
793
- */
794
- function ifError(value: unknown): asserts value is null | undefined;
795
- /**
796
- * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
797
- * calls the function and awaits the returned promise to complete. It will then
798
- * check that the promise is rejected.
799
- *
800
- * If `asyncFn` is a function and it throws an error synchronously, `assert.rejects()` will return a rejected `Promise` with that error. If the
801
- * function does not return a promise, `assert.rejects()` will return a rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v20.x/api/errors.html#err_invalid_return_value)
802
- * error. In both cases the error handler is skipped.
803
- *
804
- * Besides the async nature to await the completion behaves identically to {@link throws}.
805
- *
806
- * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
807
- * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
808
- * an object where each property will be tested for, or an instance of error where
809
- * each property will be tested for including the non-enumerable `message` and `name` properties.
810
- *
811
- * If specified, `message` will be the message provided by the `{@link AssertionError}` if the `asyncFn` fails to reject.
812
- *
813
- * ```js
814
- * import assert from 'node:assert/strict';
815
- *
816
- * await assert.rejects(
817
- * async () => {
818
- * throw new TypeError('Wrong value');
819
- * },
820
- * {
821
- * name: 'TypeError',
822
- * message: 'Wrong value',
823
- * },
824
- * );
825
- * ```
826
- *
827
- * ```js
828
- * import assert from 'node:assert/strict';
829
- *
830
- * await assert.rejects(
831
- * async () => {
832
- * throw new TypeError('Wrong value');
833
- * },
834
- * (err) => {
835
- * assert.strictEqual(err.name, 'TypeError');
836
- * assert.strictEqual(err.message, 'Wrong value');
837
- * return true;
838
- * },
839
- * );
840
- * ```
841
- *
842
- * ```js
843
- * import assert from 'node:assert/strict';
844
- *
845
- * assert.rejects(
846
- * Promise.reject(new Error('Wrong value')),
847
- * Error,
848
- * ).then(() => {
849
- * // ...
850
- * });
851
- * ```
852
- *
853
- * `error` cannot be a string. If a string is provided as the second argument, then `error` is assumed to
854
- * be omitted and the string will be used for `message` instead. This can lead to easy-to-miss mistakes. Please read the
855
- * example in {@link throws} carefully if using a string as the second argument gets considered.
856
- * @since v10.0.0
857
- */
858
- function rejects(block: (() => Promise<unknown>) | Promise<unknown>, message?: string | Error): Promise<void>;
859
- function rejects(
860
- block: (() => Promise<unknown>) | Promise<unknown>,
861
- error: AssertPredicate,
862
- message?: string | Error,
863
- ): Promise<void>;
864
- /**
865
- * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
866
- * calls the function and awaits the returned promise to complete. It will then
867
- * check that the promise is not rejected.
868
- *
869
- * If `asyncFn` is a function and it throws an error synchronously, `assert.doesNotReject()` will return a rejected `Promise` with that error. If
870
- * the function does not return a promise, `assert.doesNotReject()` will return a
871
- * rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v20.x/api/errors.html#err_invalid_return_value) error. In both cases
872
- * the error handler is skipped.
873
- *
874
- * Using `assert.doesNotReject()` is actually not useful because there is little
875
- * benefit in catching a rejection and then rejecting it again. Instead, consider
876
- * adding a comment next to the specific code path that should not reject and keep
877
- * error messages as expressive as possible.
878
- *
879
- * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
880
- * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation
881
- * function. See {@link throws} for more details.
882
- *
883
- * Besides the async nature to await the completion behaves identically to {@link doesNotThrow}.
884
- *
885
- * ```js
886
- * import assert from 'node:assert/strict';
887
- *
888
- * await assert.doesNotReject(
889
- * async () => {
890
- * throw new TypeError('Wrong value');
891
- * },
892
- * SyntaxError,
893
- * );
894
- * ```
895
- *
896
- * ```js
897
- * import assert from 'node:assert/strict';
898
- *
899
- * assert.doesNotReject(Promise.reject(new TypeError('Wrong value')))
900
- * .then(() => {
901
- * // ...
902
- * });
903
- * ```
904
- * @since v10.0.0
905
- */
906
- function doesNotReject(
907
- block: (() => Promise<unknown>) | Promise<unknown>,
908
- message?: string | Error,
909
- ): Promise<void>;
910
- function doesNotReject(
911
- block: (() => Promise<unknown>) | Promise<unknown>,
912
- error: AssertPredicate,
913
- message?: string | Error,
914
- ): Promise<void>;
915
- /**
916
- * Expects the `string` input to match the regular expression.
917
- *
918
- * ```js
919
- * import assert from 'node:assert/strict';
920
- *
921
- * assert.match('I will fail', /pass/);
922
- * // AssertionError [ERR_ASSERTION]: The input did not match the regular ...
923
- *
924
- * assert.match(123, /pass/);
925
- * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
926
- *
927
- * assert.match('I will pass', /pass/);
928
- * // OK
929
- * ```
930
- *
931
- * If the values do not match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal
932
- * to the value of the `message` parameter. If the `message` parameter is
933
- * undefined, a default error message is assigned. If the `message` parameter is an
934
- * instance of an [Error](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`.
935
- * @since v13.6.0, v12.16.0
936
- */
937
- function match(value: string, regExp: RegExp, message?: string | Error): void;
938
- /**
939
- * Expects the `string` input not to match the regular expression.
940
- *
941
- * ```js
942
- * import assert from 'node:assert/strict';
943
- *
944
- * assert.doesNotMatch('I will fail', /fail/);
945
- * // AssertionError [ERR_ASSERTION]: The input was expected to not match the ...
946
- *
947
- * assert.doesNotMatch(123, /pass/);
948
- * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
949
- *
950
- * assert.doesNotMatch('I will pass', /different/);
951
- * // OK
952
- * ```
953
- *
954
- * If the values do match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal
955
- * to the value of the `message` parameter. If the `message` parameter is
956
- * undefined, a default error message is assigned. If the `message` parameter is an
957
- * instance of an [Error](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`.
958
- * @since v13.6.0, v12.16.0
959
- */
960
- function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
961
- /**
962
- * In strict assertion mode, non-strict methods behave like their corresponding strict methods. For example,
963
- * {@link deepEqual} will behave like {@link deepStrictEqual}.
964
- *
965
- * In strict assertion mode, error messages for objects display a diff. In legacy assertion mode, error
966
- * messages for objects display the objects, often truncated.
967
- *
968
- * To use strict assertion mode:
969
- *
970
- * ```js
971
- * import { strict as assert } from 'node:assert';COPY
972
- * import assert from 'node:assert/strict';
973
- * ```
974
- *
975
- * Example error diff:
976
- *
977
- * ```js
978
- * import { strict as assert } from 'node:assert';
979
- *
980
- * assert.deepEqual([[[1, 2, 3]], 4, 5], [[[1, 2, '3']], 4, 5]);
981
- * // AssertionError: Expected inputs to be strictly deep-equal:
982
- * // + actual - expected ... Lines skipped
983
- * //
984
- * // [
985
- * // [
986
- * // ...
987
- * // 2,
988
- * // + 3
989
- * // - '3'
990
- * // ],
991
- * // ...
992
- * // 5
993
- * // ]
994
- * ```
995
- *
996
- * To deactivate the colors, use the `NO_COLOR` or `NODE_DISABLE_COLORS` environment variables. This will also
997
- * deactivate the colors in the REPL. For more on color support in terminal environments, read the tty
998
- * `getColorDepth()` documentation.
999
- *
1000
- * @since v15.0.0, v13.9.0, v12.16.2, v9.9.0
1001
- */
1002
- namespace strict {
1003
- type AssertionError = assert.AssertionError;
1004
- type AssertPredicate = assert.AssertPredicate;
1005
- type CallTrackerCall = assert.CallTrackerCall;
1006
- type CallTrackerReportInformation = assert.CallTrackerReportInformation;
1007
- }
1008
- const strict:
1009
- & Omit<
1010
- typeof assert,
1011
- | "equal"
1012
- | "notEqual"
1013
- | "deepEqual"
1014
- | "notDeepEqual"
1015
- | "ok"
1016
- | "strictEqual"
1017
- | "deepStrictEqual"
1018
- | "ifError"
1019
- | "strict"
1020
- | "AssertionError"
1021
- >
1022
- & {
1023
- (value: unknown, message?: string | Error): asserts value;
1024
- equal: typeof strictEqual;
1025
- notEqual: typeof notStrictEqual;
1026
- deepEqual: typeof deepStrictEqual;
1027
- notDeepEqual: typeof notDeepStrictEqual;
1028
- // Mapped types and assertion functions are incompatible?
1029
- // TS2775: Assertions require every name in the call target
1030
- // to be declared with an explicit type annotation.
1031
- ok: typeof ok;
1032
- strictEqual: typeof strictEqual;
1033
- deepStrictEqual: typeof deepStrictEqual;
1034
- ifError: typeof ifError;
1035
- strict: typeof strict;
1036
- AssertionError: typeof AssertionError;
1037
- };
1038
- }
1039
- export = assert;
1040
- }
1041
- declare module "node:assert" {
1042
- import assert = require("assert");
1043
- export = assert;
1044
- }