@ykdz/template 0.0.38 → 0.0.41

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 (227) hide show
  1. package/dist/application.d.ts +1 -52
  2. package/dist/application.js +0 -81
  3. package/dist/cli.js +14 -28
  4. package/dist/input-schemas.d.ts +30 -0
  5. package/dist/input-schemas.js +75 -0
  6. package/dist/main.d.ts +3 -14
  7. package/dist/main.js +496 -378
  8. package/dist/result-schemas.d.ts +222 -0
  9. package/dist/result-schemas.js +74 -0
  10. package/dist/standard-schema.d.ts +3 -0
  11. package/dist/standard-schema.js +29 -0
  12. package/node_modules/@standard-schema/spec/LICENSE +21 -0
  13. package/node_modules/@standard-schema/spec/README.md +198 -0
  14. package/node_modules/@standard-schema/spec/dist/index.cjs +18 -0
  15. package/node_modules/@standard-schema/spec/dist/index.d.cts +119 -0
  16. package/node_modules/@standard-schema/spec/dist/index.d.ts +119 -0
  17. package/node_modules/@standard-schema/spec/dist/index.js +0 -0
  18. package/node_modules/@standard-schema/spec/package.json +52 -0
  19. package/node_modules/@types/node/LICENSE +21 -0
  20. package/node_modules/@types/node/README.md +15 -0
  21. package/node_modules/@types/node/assert/strict.d.ts +111 -0
  22. package/node_modules/@types/node/assert.d.ts +1115 -0
  23. package/node_modules/@types/node/async_hooks.d.ts +619 -0
  24. package/node_modules/@types/node/buffer.buffer.d.ts +477 -0
  25. package/node_modules/@types/node/buffer.d.ts +1941 -0
  26. package/node_modules/@types/node/child_process.d.ts +1480 -0
  27. package/node_modules/@types/node/cluster.d.ts +578 -0
  28. package/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  29. package/node_modules/@types/node/console.d.ts +453 -0
  30. package/node_modules/@types/node/constants.d.ts +21 -0
  31. package/node_modules/@types/node/crypto.d.ts +5484 -0
  32. package/node_modules/@types/node/dgram.d.ts +715 -0
  33. package/node_modules/@types/node/diagnostics_channel.d.ts +576 -0
  34. package/node_modules/@types/node/dns/promises.d.ts +503 -0
  35. package/node_modules/@types/node/dns.d.ts +923 -0
  36. package/node_modules/@types/node/domain.d.ts +166 -0
  37. package/node_modules/@types/node/events.d.ts +967 -0
  38. package/node_modules/@types/node/fs/promises.d.ts +1354 -0
  39. package/node_modules/@types/node/fs.d.ts +4777 -0
  40. package/node_modules/@types/node/globals.d.ts +170 -0
  41. package/node_modules/@types/node/globals.typedarray.d.ts +41 -0
  42. package/node_modules/@types/node/http.d.ts +2246 -0
  43. package/node_modules/@types/node/http2.d.ts +2882 -0
  44. package/node_modules/@types/node/https.d.ts +585 -0
  45. package/node_modules/@types/node/index.d.ts +101 -0
  46. package/node_modules/@types/node/inspector.d.ts +323 -0
  47. package/node_modules/@types/node/inspector.generated.d.ts +4406 -0
  48. package/node_modules/@types/node/module.d.ts +844 -0
  49. package/node_modules/@types/node/net.d.ts +1197 -0
  50. package/node_modules/@types/node/os.d.ts +507 -0
  51. package/node_modules/@types/node/package.json +140 -0
  52. package/node_modules/@types/node/path.d.ts +200 -0
  53. package/node_modules/@types/node/perf_hooks.d.ts +1054 -0
  54. package/node_modules/@types/node/process.d.ts +2101 -0
  55. package/node_modules/@types/node/punycode.d.ts +117 -0
  56. package/node_modules/@types/node/querystring.d.ts +152 -0
  57. package/node_modules/@types/node/readline/promises.d.ts +161 -0
  58. package/node_modules/@types/node/readline.d.ts +600 -0
  59. package/node_modules/@types/node/repl.d.ts +438 -0
  60. package/node_modules/@types/node/sea.d.ts +162 -0
  61. package/node_modules/@types/node/sqlite.d.ts +1182 -0
  62. package/node_modules/@types/node/stream/consumers.d.ts +45 -0
  63. package/node_modules/@types/node/stream/promises.d.ts +90 -0
  64. package/node_modules/@types/node/stream/web.d.ts +596 -0
  65. package/node_modules/@types/node/stream.d.ts +1707 -0
  66. package/node_modules/@types/node/string_decoder.d.ts +67 -0
  67. package/node_modules/@types/node/test.d.ts +2656 -0
  68. package/node_modules/@types/node/timers/promises.d.ts +108 -0
  69. package/node_modules/@types/node/timers.d.ts +285 -0
  70. package/node_modules/@types/node/tls.d.ts +1314 -0
  71. package/node_modules/@types/node/trace_events.d.ts +197 -0
  72. package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +473 -0
  73. package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
  74. package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +36 -0
  75. package/node_modules/@types/node/ts5.6/index.d.ts +103 -0
  76. package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
  77. package/node_modules/@types/node/ts5.7/index.d.ts +103 -0
  78. package/node_modules/@types/node/tty.d.ts +209 -0
  79. package/node_modules/@types/node/url.d.ts +1103 -0
  80. package/node_modules/@types/node/util.d.ts +2376 -0
  81. package/node_modules/@types/node/v8.d.ts +1010 -0
  82. package/node_modules/@types/node/vm.d.ts +1160 -0
  83. package/node_modules/@types/node/wasi.d.ts +202 -0
  84. package/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
  85. package/node_modules/@types/node/web-globals/crypto.d.ts +32 -0
  86. package/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
  87. package/node_modules/@types/node/web-globals/events.d.ts +97 -0
  88. package/node_modules/@types/node/web-globals/fetch.d.ts +62 -0
  89. package/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
  90. package/node_modules/@types/node/web-globals/storage.d.ts +24 -0
  91. package/node_modules/@types/node/web-globals/streams.d.ts +22 -0
  92. package/node_modules/@types/node/worker_threads.d.ts +894 -0
  93. package/node_modules/@types/node/zlib.d.ts +768 -0
  94. package/node_modules/@valibot/to-json-schema/LICENSE.md +9 -0
  95. package/node_modules/@valibot/to-json-schema/README.md +475 -0
  96. package/node_modules/@valibot/to-json-schema/dist/index.cjs +800 -0
  97. package/node_modules/@valibot/to-json-schema/dist/index.d.cts +991 -0
  98. package/node_modules/@valibot/to-json-schema/dist/index.d.mts +991 -0
  99. package/node_modules/@valibot/to-json-schema/dist/index.min.cjs +1 -0
  100. package/node_modules/@valibot/to-json-schema/dist/index.min.mjs +1 -0
  101. package/node_modules/@valibot/to-json-schema/dist/index.mjs +795 -0
  102. package/node_modules/@valibot/to-json-schema/package.json +75 -0
  103. package/node_modules/@ykdz/cli-contract/LICENSE +21 -0
  104. package/node_modules/@ykdz/cli-contract/dist/atomic-variant-compiler.d.ts +17 -0
  105. package/node_modules/@ykdz/cli-contract/dist/atomic-variant-compiler.js +55 -0
  106. package/node_modules/@ykdz/cli-contract/dist/cli-contract.d.ts +1164 -0
  107. package/node_modules/@ykdz/cli-contract/dist/cli-contract.js +1408 -0
  108. package/node_modules/@ykdz/cli-contract/dist/cli-execution.d.ts +54 -0
  109. package/node_modules/@ykdz/cli-contract/dist/cli-execution.js +708 -0
  110. package/node_modules/@ykdz/cli-contract/dist/cli-invocation.d.ts +174 -0
  111. package/node_modules/@ykdz/cli-contract/dist/cli-invocation.js +524 -0
  112. package/node_modules/@ykdz/cli-contract/dist/cli-write-error.d.ts +10 -0
  113. package/node_modules/@ykdz/cli-contract/dist/cli-write-error.js +14 -0
  114. package/node_modules/@ykdz/cli-contract/dist/contract-definition-error.d.ts +260 -0
  115. package/node_modules/@ykdz/cli-contract/dist/contract-definition-error.js +130 -0
  116. package/node_modules/@ykdz/cli-contract/dist/contract-execution-error.d.ts +63 -0
  117. package/node_modules/@ykdz/cli-contract/dist/contract-execution-error.js +17 -0
  118. package/node_modules/@ykdz/cli-contract/dist/contract-schema-compiler.d.ts +6 -0
  119. package/node_modules/@ykdz/cli-contract/dist/contract-schema-compiler.js +532 -0
  120. package/node_modules/@ykdz/cli-contract/dist/contract-schema.d.ts +14 -0
  121. package/node_modules/@ykdz/cli-contract/dist/contract-schema.js +1 -0
  122. package/node_modules/@ykdz/cli-contract/dist/description.d.ts +2 -0
  123. package/node_modules/@ykdz/cli-contract/dist/description.js +13 -0
  124. package/node_modules/@ykdz/cli-contract/dist/index.d.ts +8 -0
  125. package/node_modules/@ykdz/cli-contract/dist/index.js +7 -0
  126. package/node_modules/@ykdz/cli-contract/dist/json-value.d.ts +4 -0
  127. package/node_modules/@ykdz/cli-contract/dist/json-value.js +64 -0
  128. package/node_modules/@ykdz/cli-contract/dist/node.d.ts +21 -0
  129. package/node_modules/@ykdz/cli-contract/dist/node.js +109 -0
  130. package/node_modules/@ykdz/cli-contract/dist/outcome-fact.d.ts +162 -0
  131. package/node_modules/@ykdz/cli-contract/dist/outcome-fact.js +113 -0
  132. package/node_modules/@ykdz/cli-contract/dist/outcome-wire.d.ts +53 -0
  133. package/node_modules/@ykdz/cli-contract/dist/outcome-wire.js +189 -0
  134. package/node_modules/@ykdz/cli-contract/dist/stream-variant-compiler.d.ts +16 -0
  135. package/node_modules/@ykdz/cli-contract/dist/stream-variant-compiler.js +45 -0
  136. package/node_modules/@ykdz/cli-contract/package.json +69 -0
  137. package/node_modules/@ykdz/template-builtin-presets/dist/src/foundation.d.ts +20 -0
  138. package/node_modules/@ykdz/template-builtin-presets/dist/src/foundation.js +38 -2
  139. package/node_modules/@ykdz/template-builtin-presets/dist/src/generation-record.d.ts +19 -0
  140. package/node_modules/@ykdz/template-builtin-presets/dist/src/generation-record.js +1 -1
  141. package/node_modules/@ykdz/template-builtin-presets/dist/src/index.d.ts +2 -1
  142. package/node_modules/@ykdz/template-builtin-presets/dist/src/index.js +2 -1
  143. package/node_modules/@ykdz/template-builtin-presets/dist/src/ts-cli/definition.js +9 -5
  144. package/node_modules/@ykdz/template-builtin-presets/package.json +2 -1
  145. package/node_modules/@ykdz/template-builtin-presets/templates/foundation/AGENTS.md.template +5 -3
  146. package/node_modules/@ykdz/template-builtin-presets/templates/{shared/devcontainer/node-pnpm.Dockerfile → foundation/devcontainer/base.Dockerfile} +14 -1
  147. package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/devcontainer/rust.Dockerfile +1 -5
  148. package/node_modules/@ykdz/template-builtin-presets/templates/shared/devcontainer/github-cli.Dockerfile +1 -3
  149. package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/artifact.ts +128 -59
  150. package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/handoff.ts +80 -8
  151. package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/readiness.ts +7 -3
  152. package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/src/cli.ts +9 -19
  153. package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/src/main.ts +144 -60
  154. package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/src/standard-schema.ts +37 -0
  155. package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/test/e2e/journeys/lookup.journey.ts +71 -0
  156. package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/test/integration/command.test.ts +118 -59
  157. package/node_modules/@ykdz/template-core/dist/dependency-catalog.d.ts +0 -1
  158. package/node_modules/@ykdz/template-core/dist/dependency-catalog.js +0 -19
  159. package/node_modules/@ykdz/template-core/dist/pnpm-workspace.yaml +3 -2
  160. package/node_modules/@ykdz/template-core/dist/project-blueprint.d.ts +15 -0
  161. package/node_modules/@ykdz/template-core/dist/project-blueprint.js +1 -1
  162. package/node_modules/@ykdz/template-core/dist/project-github.d.ts +0 -59
  163. package/node_modules/@ykdz/template-core/dist/project-github.js +0 -67
  164. package/node_modules/undici-types/LICENSE +21 -0
  165. package/node_modules/undici-types/README.md +6 -0
  166. package/node_modules/undici-types/agent.d.ts +32 -0
  167. package/node_modules/undici-types/api.d.ts +43 -0
  168. package/node_modules/undici-types/balanced-pool.d.ts +30 -0
  169. package/node_modules/undici-types/cache-interceptor.d.ts +179 -0
  170. package/node_modules/undici-types/cache.d.ts +36 -0
  171. package/node_modules/undici-types/client-stats.d.ts +15 -0
  172. package/node_modules/undici-types/client.d.ts +123 -0
  173. package/node_modules/undici-types/connector.d.ts +36 -0
  174. package/node_modules/undici-types/content-type.d.ts +21 -0
  175. package/node_modules/undici-types/cookies.d.ts +30 -0
  176. package/node_modules/undici-types/diagnostics-channel.d.ts +74 -0
  177. package/node_modules/undici-types/dispatcher.d.ts +279 -0
  178. package/node_modules/undici-types/env-http-proxy-agent.d.ts +22 -0
  179. package/node_modules/undici-types/errors.d.ts +177 -0
  180. package/node_modules/undici-types/eventsource.d.ts +66 -0
  181. package/node_modules/undici-types/fetch.d.ts +211 -0
  182. package/node_modules/undici-types/formdata.d.ts +108 -0
  183. package/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  184. package/node_modules/undici-types/global-origin.d.ts +7 -0
  185. package/node_modules/undici-types/h2c-client.d.ts +73 -0
  186. package/node_modules/undici-types/handlers.d.ts +15 -0
  187. package/node_modules/undici-types/header.d.ts +160 -0
  188. package/node_modules/undici-types/index.d.ts +91 -0
  189. package/node_modules/undici-types/interceptors.d.ts +80 -0
  190. package/node_modules/undici-types/mock-agent.d.ts +68 -0
  191. package/node_modules/undici-types/mock-call-history.d.ts +111 -0
  192. package/node_modules/undici-types/mock-client.d.ts +27 -0
  193. package/node_modules/undici-types/mock-errors.d.ts +12 -0
  194. package/node_modules/undici-types/mock-interceptor.d.ts +94 -0
  195. package/node_modules/undici-types/mock-pool.d.ts +27 -0
  196. package/node_modules/undici-types/package.json +55 -0
  197. package/node_modules/undici-types/patch.d.ts +29 -0
  198. package/node_modules/undici-types/pool-stats.d.ts +19 -0
  199. package/node_modules/undici-types/pool.d.ts +41 -0
  200. package/node_modules/undici-types/proxy-agent.d.ts +29 -0
  201. package/node_modules/undici-types/readable.d.ts +68 -0
  202. package/node_modules/undici-types/retry-agent.d.ts +8 -0
  203. package/node_modules/undici-types/retry-handler.d.ts +125 -0
  204. package/node_modules/undici-types/round-robin-pool.d.ts +41 -0
  205. package/node_modules/undici-types/snapshot-agent.d.ts +109 -0
  206. package/node_modules/undici-types/socks5-proxy-agent.d.ts +25 -0
  207. package/node_modules/undici-types/util.d.ts +18 -0
  208. package/node_modules/undici-types/utility.d.ts +7 -0
  209. package/node_modules/undici-types/webidl.d.ts +347 -0
  210. package/node_modules/undici-types/websocket.d.ts +188 -0
  211. package/package.json +5 -3
  212. package/dist/command-result.d.ts +0 -9
  213. package/dist/command-result.js +0 -231
  214. package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/test/e2e/journeys/greet.journey.ts +0 -46
  215. package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/test/unit/greet.test.ts +0 -15
  216. package/node_modules/commander/LICENSE +0 -22
  217. package/node_modules/commander/Readme.md +0 -1172
  218. package/node_modules/commander/index.js +0 -21
  219. package/node_modules/commander/lib/argument.js +0 -147
  220. package/node_modules/commander/lib/command.js +0 -2790
  221. package/node_modules/commander/lib/error.js +0 -36
  222. package/node_modules/commander/lib/help.js +0 -731
  223. package/node_modules/commander/lib/option.js +0 -377
  224. package/node_modules/commander/lib/suggestSimilar.js +0 -99
  225. package/node_modules/commander/package-support.json +0 -19
  226. package/node_modules/commander/package.json +0 -64
  227. package/node_modules/commander/typings/index.d.ts +0 -1113
@@ -0,0 +1,101 @@
1
+ /**
2
+ * License for programmatically and manually incorporated
3
+ * documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc
4
+ *
5
+ * Copyright Node.js contributors. All rights reserved.
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to
8
+ * deal in the Software without restriction, including without limitation the
9
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10
+ * sell copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in
14
+ * all copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22
+ * IN THE SOFTWARE.
23
+ */
24
+
25
+ // NOTE: These definitions support Node.js and TypeScript 5.8+.
26
+
27
+ // Reference required TypeScript libraries:
28
+ /// <reference lib="es2020" />
29
+ /// <reference lib="esnext.disposable" />
30
+ /// <reference lib="esnext.float16" />
31
+
32
+ // Iterator definitions required for compatibility with TypeScript <5.6:
33
+ /// <reference path="compatibility/iterators.d.ts" />
34
+
35
+ // Definitions for Node.js modules specific to TypeScript 5.7+:
36
+ /// <reference path="globals.typedarray.d.ts" />
37
+ /// <reference path="buffer.buffer.d.ts" />
38
+
39
+ // Definitions for Node.js modules that are not specific to any version of TypeScript:
40
+ /// <reference path="globals.d.ts" />
41
+ /// <reference path="web-globals/abortcontroller.d.ts" />
42
+ /// <reference path="web-globals/crypto.d.ts" />
43
+ /// <reference path="web-globals/domexception.d.ts" />
44
+ /// <reference path="web-globals/events.d.ts" />
45
+ /// <reference path="web-globals/fetch.d.ts" />
46
+ /// <reference path="web-globals/navigator.d.ts" />
47
+ /// <reference path="web-globals/storage.d.ts" />
48
+ /// <reference path="web-globals/streams.d.ts" />
49
+ /// <reference path="assert.d.ts" />
50
+ /// <reference path="assert/strict.d.ts" />
51
+ /// <reference path="async_hooks.d.ts" />
52
+ /// <reference path="buffer.d.ts" />
53
+ /// <reference path="child_process.d.ts" />
54
+ /// <reference path="cluster.d.ts" />
55
+ /// <reference path="console.d.ts" />
56
+ /// <reference path="constants.d.ts" />
57
+ /// <reference path="crypto.d.ts" />
58
+ /// <reference path="dgram.d.ts" />
59
+ /// <reference path="diagnostics_channel.d.ts" />
60
+ /// <reference path="dns.d.ts" />
61
+ /// <reference path="dns/promises.d.ts" />
62
+ /// <reference path="domain.d.ts" />
63
+ /// <reference path="events.d.ts" />
64
+ /// <reference path="fs.d.ts" />
65
+ /// <reference path="fs/promises.d.ts" />
66
+ /// <reference path="http.d.ts" />
67
+ /// <reference path="http2.d.ts" />
68
+ /// <reference path="https.d.ts" />
69
+ /// <reference path="inspector.d.ts" />
70
+ /// <reference path="inspector.generated.d.ts" />
71
+ /// <reference path="module.d.ts" />
72
+ /// <reference path="net.d.ts" />
73
+ /// <reference path="os.d.ts" />
74
+ /// <reference path="path.d.ts" />
75
+ /// <reference path="perf_hooks.d.ts" />
76
+ /// <reference path="process.d.ts" />
77
+ /// <reference path="punycode.d.ts" />
78
+ /// <reference path="querystring.d.ts" />
79
+ /// <reference path="readline.d.ts" />
80
+ /// <reference path="readline/promises.d.ts" />
81
+ /// <reference path="repl.d.ts" />
82
+ /// <reference path="sea.d.ts" />
83
+ /// <reference path="sqlite.d.ts" />
84
+ /// <reference path="stream.d.ts" />
85
+ /// <reference path="stream/promises.d.ts" />
86
+ /// <reference path="stream/consumers.d.ts" />
87
+ /// <reference path="stream/web.d.ts" />
88
+ /// <reference path="string_decoder.d.ts" />
89
+ /// <reference path="test.d.ts" />
90
+ /// <reference path="timers.d.ts" />
91
+ /// <reference path="timers/promises.d.ts" />
92
+ /// <reference path="tls.d.ts" />
93
+ /// <reference path="trace_events.d.ts" />
94
+ /// <reference path="tty.d.ts" />
95
+ /// <reference path="url.d.ts" />
96
+ /// <reference path="util.d.ts" />
97
+ /// <reference path="v8.d.ts" />
98
+ /// <reference path="vm.d.ts" />
99
+ /// <reference path="wasi.d.ts" />
100
+ /// <reference path="worker_threads.d.ts" />
101
+ /// <reference path="zlib.d.ts" />
@@ -0,0 +1,323 @@
1
+ /**
2
+ * The `node:inspector` module provides an API for interacting with the V8
3
+ * inspector.
4
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/inspector.js)
5
+ */
6
+ declare module "inspector" {
7
+ import EventEmitter = require("node:events");
8
+ /**
9
+ * The `inspector.Session` is used for dispatching messages to the V8 inspector
10
+ * back-end and receiving message responses and notifications.
11
+ */
12
+ class Session extends EventEmitter {
13
+ /**
14
+ * Create a new instance of the inspector.Session class.
15
+ * The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend.
16
+ */
17
+ constructor();
18
+ /**
19
+ * Connects a session to the inspector back-end.
20
+ */
21
+ connect(): void;
22
+ /**
23
+ * Connects a session to the inspector back-end.
24
+ * An exception will be thrown if this API was not called on a Worker thread.
25
+ * @since v12.11.0
26
+ */
27
+ connectToMainThread(): void;
28
+ /**
29
+ * Immediately close the session. All pending message callbacks will be called with an error.
30
+ * `session.connect()` will need to be called to be able to send messages again.
31
+ * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints.
32
+ */
33
+ disconnect(): void;
34
+ }
35
+ /**
36
+ * Activate inspector on host and port. Equivalent to `node --inspect=[[host:]port]`, but can be done programmatically after node has
37
+ * started.
38
+ *
39
+ * If wait is `true`, will block until a client has connected to the inspect port
40
+ * and flow control has been passed to the debugger client.
41
+ *
42
+ * See the [security warning](https://nodejs.org/docs/latest-v24.x/api/cli.html#warning-binding-inspector-to-a-public-ipport-combination-is-insecure)
43
+ * regarding the `host` parameter usage.
44
+ * @param port Port to listen on for inspector connections. Defaults to what was specified on the CLI.
45
+ * @param host Host to listen on for inspector connections. Defaults to what was specified on the CLI.
46
+ * @param wait Block until a client has connected. Defaults to what was specified on the CLI.
47
+ * @returns Disposable that calls `inspector.close()`.
48
+ */
49
+ function open(port?: number, host?: string, wait?: boolean): Disposable;
50
+ /**
51
+ * Deactivates the inspector. If there are active connections, they are forcibly
52
+ * terminated. Blocks until the inspector server has fully stopped.
53
+ */
54
+ function close(): void;
55
+ /**
56
+ * Return the URL of the active inspector, or `undefined` if there is none.
57
+ *
58
+ * ```console
59
+ * $ node --inspect -p 'inspector.url()'
60
+ * Debugger listening on ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34
61
+ * For help, see: https://nodejs.org/en/docs/inspector
62
+ * ws://127.0.0.1:9229/166e272e-7a30-4d09-97ce-f1c012b43c34
63
+ *
64
+ * $ node --inspect=localhost:3000 -p 'inspector.url()'
65
+ * Debugger listening on ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a
66
+ * For help, see: https://nodejs.org/en/docs/inspector
67
+ * ws://localhost:3000/51cf8d0e-3c36-4c59-8efd-54519839e56a
68
+ *
69
+ * $ node -p 'inspector.url()'
70
+ * undefined
71
+ * ```
72
+ */
73
+ function url(): string | undefined;
74
+ /**
75
+ * Blocks until a client (existing or connected later) has sent `Runtime.runIfWaitingForDebugger` command.
76
+ *
77
+ * An exception will be thrown if there is no active inspector.
78
+ * @since v12.7.0
79
+ */
80
+ function waitForDebugger(): void;
81
+ // These methods are exposed by the V8 inspector console API (inspector/v8-console.h).
82
+ // The method signatures differ from those of the Node.js console, and are deliberately
83
+ // typed permissively.
84
+ interface InspectorConsole {
85
+ debug(...data: any[]): void;
86
+ error(...data: any[]): void;
87
+ info(...data: any[]): void;
88
+ log(...data: any[]): void;
89
+ warn(...data: any[]): void;
90
+ dir(...data: any[]): void;
91
+ dirxml(...data: any[]): void;
92
+ table(...data: any[]): void;
93
+ trace(...data: any[]): void;
94
+ group(...data: any[]): void;
95
+ groupCollapsed(...data: any[]): void;
96
+ groupEnd(...data: any[]): void;
97
+ clear(...data: any[]): void;
98
+ count(label?: any): void;
99
+ countReset(label?: any): void;
100
+ assert(value?: any, ...data: any[]): void;
101
+ profile(label?: any): void;
102
+ profileEnd(label?: any): void;
103
+ time(label?: any): void;
104
+ timeLog(label?: any): void;
105
+ timeStamp(label?: any): void;
106
+ }
107
+ /**
108
+ * An object to send messages to the remote inspector console.
109
+ * @since v11.0.0
110
+ */
111
+ const console: InspectorConsole;
112
+ // DevTools protocol event broadcast methods
113
+ namespace Network {
114
+ /**
115
+ * This feature is only available with the `--experimental-network-inspection` flag enabled.
116
+ *
117
+ * Broadcasts the `Network.requestWillBeSent` event to connected frontends. This event indicates that
118
+ * the application is about to send an HTTP request.
119
+ * @since v22.6.0
120
+ */
121
+ function requestWillBeSent(params: RequestWillBeSentEventDataType): void;
122
+ /**
123
+ * This feature is only available with the `--experimental-network-inspection` flag enabled.
124
+ *
125
+ * Broadcasts the `Network.dataReceived` event to connected frontends, or buffers the data if
126
+ * `Network.streamResourceContent` command was not invoked for the given request yet.
127
+ *
128
+ * Also enables `Network.getResponseBody` command to retrieve the response data.
129
+ * @since v24.2.0
130
+ */
131
+ function dataReceived(params: DataReceivedEventDataType): void;
132
+ /**
133
+ * This feature is only available with the `--experimental-network-inspection` flag enabled.
134
+ *
135
+ * Enables `Network.getRequestPostData` command to retrieve the request data.
136
+ * @since v24.3.0
137
+ */
138
+ function dataSent(params: unknown): void;
139
+ /**
140
+ * This feature is only available with the `--experimental-network-inspection` flag enabled.
141
+ *
142
+ * Broadcasts the `Network.responseReceived` event to connected frontends. This event indicates that
143
+ * HTTP response is available.
144
+ * @since v22.6.0
145
+ */
146
+ function responseReceived(params: ResponseReceivedEventDataType): void;
147
+ /**
148
+ * This feature is only available with the `--experimental-network-inspection` flag enabled.
149
+ *
150
+ * Broadcasts the `Network.loadingFinished` event to connected frontends. This event indicates that
151
+ * HTTP request has finished loading.
152
+ * @since v22.6.0
153
+ */
154
+ function loadingFinished(params: LoadingFinishedEventDataType): void;
155
+ /**
156
+ * This feature is only available with the `--experimental-network-inspection` flag enabled.
157
+ *
158
+ * Broadcasts the `Network.loadingFailed` event to connected frontends. This event indicates that
159
+ * HTTP request has failed to load.
160
+ * @since v22.7.0
161
+ */
162
+ function loadingFailed(params: LoadingFailedEventDataType): void;
163
+ /**
164
+ * This feature is only available with the `--experimental-network-inspection` flag enabled.
165
+ *
166
+ * Broadcasts the `Network.webSocketCreated` event to connected frontends. This event indicates that
167
+ * a WebSocket connection has been initiated.
168
+ * @since v24.7.0
169
+ */
170
+ function webSocketCreated(params: WebSocketCreatedEventDataType): void;
171
+ /**
172
+ * This feature is only available with the `--experimental-network-inspection` flag enabled.
173
+ *
174
+ * Broadcasts the `Network.webSocketHandshakeResponseReceived` event to connected frontends.
175
+ * This event indicates that the WebSocket handshake response has been received.
176
+ * @since v24.7.0
177
+ */
178
+ function webSocketHandshakeResponseReceived(params: WebSocketHandshakeResponseReceivedEventDataType): void;
179
+ /**
180
+ * This feature is only available with the `--experimental-network-inspection` flag enabled.
181
+ *
182
+ * Broadcasts the `Network.webSocketClosed` event to connected frontends.
183
+ * This event indicates that a WebSocket connection has been closed.
184
+ * @since v24.7.0
185
+ */
186
+ function webSocketClosed(params: WebSocketClosedEventDataType): void;
187
+ }
188
+ namespace NetworkResources {
189
+ /**
190
+ * This feature is only available with the `--experimental-inspector-network-resource` flag enabled.
191
+ *
192
+ * The inspector.NetworkResources.put method is used to provide a response for a loadNetworkResource
193
+ * request issued via the Chrome DevTools Protocol (CDP).
194
+ * This is typically triggered when a source map is specified by URL, and a DevTools frontend—such as
195
+ * Chrome—requests the resource to retrieve the source map.
196
+ *
197
+ * This method allows developers to predefine the resource content to be served in response to such CDP requests.
198
+ *
199
+ * ```js
200
+ * const inspector = require('node:inspector');
201
+ * // By preemptively calling put to register the resource, a source map can be resolved when
202
+ * // a loadNetworkResource request is made from the frontend.
203
+ * async function setNetworkResources() {
204
+ * const mapUrl = 'http://localhost:3000/dist/app.js.map';
205
+ * const tsUrl = 'http://localhost:3000/src/app.ts';
206
+ * const distAppJsMap = await fetch(mapUrl).then((res) => res.text());
207
+ * const srcAppTs = await fetch(tsUrl).then((res) => res.text());
208
+ * inspector.NetworkResources.put(mapUrl, distAppJsMap);
209
+ * inspector.NetworkResources.put(tsUrl, srcAppTs);
210
+ * };
211
+ * setNetworkResources().then(() => {
212
+ * require('./dist/app');
213
+ * });
214
+ * ```
215
+ *
216
+ * For more details, see the official CDP documentation: [Network.loadNetworkResource](https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-loadNetworkResource)
217
+ * @since v24.5.0
218
+ * @experimental
219
+ */
220
+ function put(url: string, data: string): void;
221
+ }
222
+ namespace DOMStorage {
223
+ /**
224
+ * This feature is only available with the
225
+ * `--experimental-storage-inspection` flag enabled.
226
+ *
227
+ * Broadcasts the `DOMStorage.domStorageItemAdded` event to connected frontends.
228
+ * This event indicates that a new item has been added to the storage.
229
+ * @since v24.16.0
230
+ */
231
+ function domStorageItemAdded(params: DomStorageItemAddedEventDataType): void;
232
+ /**
233
+ * This feature is only available with the
234
+ * `--experimental-storage-inspection` flag enabled.
235
+ *
236
+ * Broadcasts the `DOMStorage.domStorageItemRemoved` event to connected frontends.
237
+ * This event indicates that an item has been removed from the storage.
238
+ * @since v24.16.0
239
+ */
240
+ function domStorageItemRemoved(params: DomStorageItemRemovedEventDataType): void;
241
+ /**
242
+ * This feature is only available with the
243
+ * `--experimental-storage-inspection` flag enabled.
244
+
245
+ * Broadcasts the `DOMStorage.domStorageItemUpdated` event to connected frontends.
246
+ * This event indicates that a storage item has been updated.
247
+ * @since v24.16.0
248
+ */
249
+ function domStorageItemUpdated(params: DomStorageItemUpdatedEventDataType): void;
250
+ /**
251
+ * This feature is only available with the
252
+ * `--experimental-storage-inspection` flag enabled.
253
+ *
254
+ * Broadcasts the `DOMStorage.domStorageItemsCleared` event to connected
255
+ * frontends. This event indicates that all items have been cleared from the
256
+ * storage.
257
+ * @since v24.16.0
258
+ */
259
+ function domStorageItemsCleared(params: DomStorageItemsClearedEventDataType): void;
260
+ /**
261
+ * This feature is only available with the
262
+ * `--experimental-storage-inspection` flag enabled.
263
+ * @since v24.16.0
264
+ */
265
+ function registerStorage(params: unknown): void;
266
+ }
267
+ }
268
+
269
+ /**
270
+ * The `node:inspector` module provides an API for interacting with the V8
271
+ * inspector.
272
+ */
273
+ declare module "node:inspector" {
274
+ export * from "inspector";
275
+ }
276
+
277
+ /**
278
+ * The `node:inspector/promises` module provides an API for interacting with the V8
279
+ * inspector.
280
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/inspector/promises.js)
281
+ * @since v19.0.0
282
+ */
283
+ declare module "inspector/promises" {
284
+ import EventEmitter = require("node:events");
285
+ export { close, console, NetworkResources, open, url, waitForDebugger } from "inspector";
286
+ /**
287
+ * The `inspector.Session` is used for dispatching messages to the V8 inspector
288
+ * back-end and receiving message responses and notifications.
289
+ * @since v19.0.0
290
+ */
291
+ export class Session extends EventEmitter {
292
+ /**
293
+ * Create a new instance of the inspector.Session class.
294
+ * The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend.
295
+ */
296
+ constructor();
297
+ /**
298
+ * Connects a session to the inspector back-end.
299
+ */
300
+ connect(): void;
301
+ /**
302
+ * Connects a session to the inspector back-end.
303
+ * An exception will be thrown if this API was not called on a Worker thread.
304
+ * @since v12.11.0
305
+ */
306
+ connectToMainThread(): void;
307
+ /**
308
+ * Immediately close the session. All pending message callbacks will be called with an error.
309
+ * `session.connect()` will need to be called to be able to send messages again.
310
+ * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints.
311
+ */
312
+ disconnect(): void;
313
+ }
314
+ }
315
+
316
+ /**
317
+ * The `node:inspector/promises` module provides an API for interacting with the V8
318
+ * inspector.
319
+ * @since v19.0.0
320
+ */
321
+ declare module "node:inspector/promises" {
322
+ export * from "inspector/promises";
323
+ }