@alanszp/express-common-fn 12.0.1 → 12.0.3

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 (951) hide show
  1. package/package.json +6 -10
  2. package/.gitignore +0 -3
  3. package/.npmignore +0 -3
  4. package/node_modules/@alanszp/audit/.gitignore +0 -3
  5. package/node_modules/@alanszp/audit/.npmignore +0 -3
  6. package/node_modules/@alanszp/audit/LICENSE +0 -21
  7. package/node_modules/@alanszp/audit/dist/audit.d.ts +0 -9
  8. package/node_modules/@alanszp/audit/dist/audit.js +0 -25
  9. package/node_modules/@alanszp/audit/dist/audit.js.map +0 -1
  10. package/node_modules/@alanszp/audit/dist/auditWithState.d.ts +0 -10
  11. package/node_modules/@alanszp/audit/dist/auditWithState.js +0 -22
  12. package/node_modules/@alanszp/audit/dist/auditWithState.js.map +0 -1
  13. package/node_modules/@alanszp/audit/dist/errors/AuditError.d.ts +0 -3
  14. package/node_modules/@alanszp/audit/dist/errors/AuditError.js +0 -8
  15. package/node_modules/@alanszp/audit/dist/errors/AuditError.js.map +0 -1
  16. package/node_modules/@alanszp/audit/dist/errors/MissingAuditFieldsError.d.ts +0 -9
  17. package/node_modules/@alanszp/audit/dist/errors/MissingAuditFieldsError.js +0 -23
  18. package/node_modules/@alanszp/audit/dist/errors/MissingAuditFieldsError.js.map +0 -1
  19. package/node_modules/@alanszp/audit/dist/errors/index.d.ts +0 -2
  20. package/node_modules/@alanszp/audit/dist/errors/index.js +0 -19
  21. package/node_modules/@alanszp/audit/dist/errors/index.js.map +0 -1
  22. package/node_modules/@alanszp/audit/dist/factory.d.ts +0 -4
  23. package/node_modules/@alanszp/audit/dist/factory.js +0 -16
  24. package/node_modules/@alanszp/audit/dist/factory.js.map +0 -1
  25. package/node_modules/@alanszp/audit/dist/index.d.ts +0 -5
  26. package/node_modules/@alanszp/audit/dist/index.js +0 -22
  27. package/node_modules/@alanszp/audit/dist/index.js.map +0 -1
  28. package/node_modules/@alanszp/audit/dist/interfaces.d.ts +0 -22
  29. package/node_modules/@alanszp/audit/dist/interfaces.js +0 -18
  30. package/node_modules/@alanszp/audit/dist/interfaces.js.map +0 -1
  31. package/node_modules/@alanszp/audit/node_modules/@types/node/LICENSE +0 -21
  32. package/node_modules/@alanszp/audit/node_modules/@types/node/README.md +0 -15
  33. package/node_modules/@alanszp/audit/node_modules/@types/node/assert/strict.d.ts +0 -8
  34. package/node_modules/@alanszp/audit/node_modules/@types/node/assert.d.ts +0 -996
  35. package/node_modules/@alanszp/audit/node_modules/@types/node/async_hooks.d.ts +0 -539
  36. package/node_modules/@alanszp/audit/node_modules/@types/node/buffer.d.ts +0 -2362
  37. package/node_modules/@alanszp/audit/node_modules/@types/node/child_process.d.ts +0 -1540
  38. package/node_modules/@alanszp/audit/node_modules/@types/node/cluster.d.ts +0 -432
  39. package/node_modules/@alanszp/audit/node_modules/@types/node/console.d.ts +0 -415
  40. package/node_modules/@alanszp/audit/node_modules/@types/node/constants.d.ts +0 -19
  41. package/node_modules/@alanszp/audit/node_modules/@types/node/crypto.d.ts +0 -4487
  42. package/node_modules/@alanszp/audit/node_modules/@types/node/dgram.d.ts +0 -596
  43. package/node_modules/@alanszp/audit/node_modules/@types/node/diagnostics_channel.d.ts +0 -545
  44. package/node_modules/@alanszp/audit/node_modules/@types/node/dns/promises.d.ts +0 -425
  45. package/node_modules/@alanszp/audit/node_modules/@types/node/dns.d.ts +0 -809
  46. package/node_modules/@alanszp/audit/node_modules/@types/node/dom-events.d.ts +0 -122
  47. package/node_modules/@alanszp/audit/node_modules/@types/node/domain.d.ts +0 -170
  48. package/node_modules/@alanszp/audit/node_modules/@types/node/events.d.ts +0 -879
  49. package/node_modules/@alanszp/audit/node_modules/@types/node/fs/promises.d.ts +0 -1239
  50. package/node_modules/@alanszp/audit/node_modules/@types/node/fs.d.ts +0 -4311
  51. package/node_modules/@alanszp/audit/node_modules/@types/node/globals.d.ts +0 -411
  52. package/node_modules/@alanszp/audit/node_modules/@types/node/globals.global.d.ts +0 -1
  53. package/node_modules/@alanszp/audit/node_modules/@types/node/http.d.ts +0 -1887
  54. package/node_modules/@alanszp/audit/node_modules/@types/node/http2.d.ts +0 -2382
  55. package/node_modules/@alanszp/audit/node_modules/@types/node/https.d.ts +0 -550
  56. package/node_modules/@alanszp/audit/node_modules/@types/node/index.d.ts +0 -88
  57. package/node_modules/@alanszp/audit/node_modules/@types/node/inspector.d.ts +0 -2747
  58. package/node_modules/@alanszp/audit/node_modules/@types/node/module.d.ts +0 -315
  59. package/node_modules/@alanszp/audit/node_modules/@types/node/net.d.ts +0 -949
  60. package/node_modules/@alanszp/audit/node_modules/@types/node/os.d.ts +0 -478
  61. package/node_modules/@alanszp/audit/node_modules/@types/node/package.json +0 -229
  62. package/node_modules/@alanszp/audit/node_modules/@types/node/path.d.ts +0 -191
  63. package/node_modules/@alanszp/audit/node_modules/@types/node/perf_hooks.d.ts +0 -645
  64. package/node_modules/@alanszp/audit/node_modules/@types/node/process.d.ts +0 -1561
  65. package/node_modules/@alanszp/audit/node_modules/@types/node/punycode.d.ts +0 -117
  66. package/node_modules/@alanszp/audit/node_modules/@types/node/querystring.d.ts +0 -141
  67. package/node_modules/@alanszp/audit/node_modules/@types/node/readline/promises.d.ts +0 -150
  68. package/node_modules/@alanszp/audit/node_modules/@types/node/readline.d.ts +0 -539
  69. package/node_modules/@alanszp/audit/node_modules/@types/node/repl.d.ts +0 -430
  70. package/node_modules/@alanszp/audit/node_modules/@types/node/stream/consumers.d.ts +0 -12
  71. package/node_modules/@alanszp/audit/node_modules/@types/node/stream/promises.d.ts +0 -83
  72. package/node_modules/@alanszp/audit/node_modules/@types/node/stream/web.d.ts +0 -366
  73. package/node_modules/@alanszp/audit/node_modules/@types/node/stream.d.ts +0 -1701
  74. package/node_modules/@alanszp/audit/node_modules/@types/node/string_decoder.d.ts +0 -67
  75. package/node_modules/@alanszp/audit/node_modules/@types/node/test.d.ts +0 -1465
  76. package/node_modules/@alanszp/audit/node_modules/@types/node/timers/promises.d.ts +0 -93
  77. package/node_modules/@alanszp/audit/node_modules/@types/node/timers.d.ts +0 -240
  78. package/node_modules/@alanszp/audit/node_modules/@types/node/tls.d.ts +0 -1210
  79. package/node_modules/@alanszp/audit/node_modules/@types/node/trace_events.d.ts +0 -182
  80. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
  81. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
  82. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
  83. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2362
  84. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
  85. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
  86. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/console.d.ts +0 -415
  87. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
  88. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4487
  89. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/dgram.d.ts +0 -596
  90. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -545
  91. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
  92. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
  93. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
  94. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
  95. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/events.d.ts +0 -879
  96. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1239
  97. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/fs.d.ts +0 -4311
  98. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/globals.d.ts +0 -411
  99. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
  100. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/http.d.ts +0 -1887
  101. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
  102. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/https.d.ts +0 -550
  103. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/index.d.ts +0 -88
  104. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
  105. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/module.d.ts +0 -315
  106. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/net.d.ts +0 -949
  107. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/os.d.ts +0 -478
  108. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/path.d.ts +0 -191
  109. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -645
  110. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/process.d.ts +0 -1561
  111. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
  112. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
  113. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
  114. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
  115. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
  116. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
  117. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
  118. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -366
  119. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
  120. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
  121. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/test.d.ts +0 -1465
  122. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
  123. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
  124. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
  125. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
  126. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
  127. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/url.d.ts +0 -927
  128. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/util.d.ts +0 -2183
  129. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/v8.d.ts +0 -764
  130. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/vm.d.ts +0 -903
  131. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/wasi.d.ts +0 -179
  132. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
  133. package/node_modules/@alanszp/audit/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
  134. package/node_modules/@alanszp/audit/node_modules/@types/node/tty.d.ts +0 -208
  135. package/node_modules/@alanszp/audit/node_modules/@types/node/url.d.ts +0 -927
  136. package/node_modules/@alanszp/audit/node_modules/@types/node/util.d.ts +0 -2183
  137. package/node_modules/@alanszp/audit/node_modules/@types/node/v8.d.ts +0 -764
  138. package/node_modules/@alanszp/audit/node_modules/@types/node/vm.d.ts +0 -903
  139. package/node_modules/@alanszp/audit/node_modules/@types/node/wasi.d.ts +0 -179
  140. package/node_modules/@alanszp/audit/node_modules/@types/node/worker_threads.d.ts +0 -691
  141. package/node_modules/@alanszp/audit/node_modules/@types/node/zlib.d.ts +0 -517
  142. package/node_modules/@alanszp/audit/package.json +0 -33
  143. package/node_modules/@alanszp/audit/src/audit.ts +0 -31
  144. package/node_modules/@alanszp/audit/src/auditWithState.ts +0 -27
  145. package/node_modules/@alanszp/audit/src/errors/AuditError.ts +0 -3
  146. package/node_modules/@alanszp/audit/src/errors/MissingAuditFieldsError.ts +0 -25
  147. package/node_modules/@alanszp/audit/src/errors/index.ts +0 -2
  148. package/node_modules/@alanszp/audit/src/factory.ts +0 -16
  149. package/node_modules/@alanszp/audit/src/index.ts +0 -5
  150. package/node_modules/@alanszp/audit/src/interfaces.ts +0 -38
  151. package/node_modules/@alanszp/audit/tsconfig.json +0 -15
  152. package/node_modules/@alanszp/errors/.gitignore +0 -3
  153. package/node_modules/@alanszp/errors/.npmignore +0 -3
  154. package/node_modules/@alanszp/errors/LICENSE +0 -21
  155. package/node_modules/@alanszp/errors/dist/BaseError.d.ts +0 -3
  156. package/node_modules/@alanszp/errors/dist/BaseError.js +0 -18
  157. package/node_modules/@alanszp/errors/dist/BaseError.js.map +0 -1
  158. package/node_modules/@alanszp/errors/dist/HttpRenderableError.d.ts +0 -4
  159. package/node_modules/@alanszp/errors/dist/HttpRenderableError.js +0 -8
  160. package/node_modules/@alanszp/errors/dist/HttpRenderableError.js.map +0 -1
  161. package/node_modules/@alanszp/errors/dist/InternalServerError.d.ts +0 -8
  162. package/node_modules/@alanszp/errors/dist/InternalServerError.js +0 -24
  163. package/node_modules/@alanszp/errors/dist/InternalServerError.js.map +0 -1
  164. package/node_modules/@alanszp/errors/dist/RenderableError.d.ts +0 -15
  165. package/node_modules/@alanszp/errors/dist/RenderableError.js +0 -27
  166. package/node_modules/@alanszp/errors/dist/RenderableError.js.map +0 -1
  167. package/node_modules/@alanszp/errors/dist/index.d.ts +0 -4
  168. package/node_modules/@alanszp/errors/dist/index.js +0 -17
  169. package/node_modules/@alanszp/errors/dist/index.js.map +0 -1
  170. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/.gitignore +0 -3
  171. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/.npmignore +0 -3
  172. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/LICENSE +0 -21
  173. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/app/appIdentifier.d.ts +0 -1
  174. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/app/appIdentifier.js +0 -10
  175. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/app/appIdentifier.js.map +0 -1
  176. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/app/index.d.ts +0 -1
  177. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/app/index.js +0 -18
  178. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/app/index.js.map +0 -1
  179. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/assignKey.d.ts +0 -2
  180. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/assignKey.js +0 -20
  181. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/assignKey.js.map +0 -1
  182. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/editable/index.d.ts +0 -2
  183. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/editable/index.js +0 -19
  184. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/editable/index.js.map +0 -1
  185. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/editable/keepOrUpdate.d.ts +0 -3
  186. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/editable/keepOrUpdate.js +0 -26
  187. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/editable/keepOrUpdate.js.map +0 -1
  188. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/editable/types.d.ts +0 -6
  189. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/editable/types.js +0 -3
  190. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/editable/types.js.map +0 -1
  191. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/index.d.ts +0 -4
  192. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/index.js +0 -21
  193. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/index.js.map +0 -1
  194. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/lists/ListResult.d.ts +0 -7
  195. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/lists/ListResult.js +0 -8
  196. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/lists/ListResult.js.map +0 -1
  197. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/lists/Orderable.d.ts +0 -11
  198. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/lists/Orderable.js +0 -13
  199. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/lists/Orderable.js.map +0 -1
  200. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/lists/Paginable.d.ts +0 -14
  201. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/lists/Paginable.js +0 -22
  202. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/lists/Paginable.js.map +0 -1
  203. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/lists/index.d.ts +0 -3
  204. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/lists/index.js +0 -20
  205. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/dist/lists/index.js.map +0 -1
  206. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/package.json +0 -25
  207. package/node_modules/@alanszp/errors/node_modules/@alanszp/core/tsconfig.json +0 -15
  208. package/node_modules/@alanszp/errors/node_modules/@types/node/LICENSE +0 -21
  209. package/node_modules/@alanszp/errors/node_modules/@types/node/README.md +0 -15
  210. package/node_modules/@alanszp/errors/node_modules/@types/node/assert/strict.d.ts +0 -8
  211. package/node_modules/@alanszp/errors/node_modules/@types/node/assert.d.ts +0 -996
  212. package/node_modules/@alanszp/errors/node_modules/@types/node/async_hooks.d.ts +0 -539
  213. package/node_modules/@alanszp/errors/node_modules/@types/node/buffer.d.ts +0 -2362
  214. package/node_modules/@alanszp/errors/node_modules/@types/node/child_process.d.ts +0 -1540
  215. package/node_modules/@alanszp/errors/node_modules/@types/node/cluster.d.ts +0 -432
  216. package/node_modules/@alanszp/errors/node_modules/@types/node/console.d.ts +0 -415
  217. package/node_modules/@alanszp/errors/node_modules/@types/node/constants.d.ts +0 -19
  218. package/node_modules/@alanszp/errors/node_modules/@types/node/crypto.d.ts +0 -4487
  219. package/node_modules/@alanszp/errors/node_modules/@types/node/dgram.d.ts +0 -596
  220. package/node_modules/@alanszp/errors/node_modules/@types/node/diagnostics_channel.d.ts +0 -545
  221. package/node_modules/@alanszp/errors/node_modules/@types/node/dns/promises.d.ts +0 -425
  222. package/node_modules/@alanszp/errors/node_modules/@types/node/dns.d.ts +0 -809
  223. package/node_modules/@alanszp/errors/node_modules/@types/node/dom-events.d.ts +0 -122
  224. package/node_modules/@alanszp/errors/node_modules/@types/node/domain.d.ts +0 -170
  225. package/node_modules/@alanszp/errors/node_modules/@types/node/events.d.ts +0 -879
  226. package/node_modules/@alanszp/errors/node_modules/@types/node/fs/promises.d.ts +0 -1239
  227. package/node_modules/@alanszp/errors/node_modules/@types/node/fs.d.ts +0 -4311
  228. package/node_modules/@alanszp/errors/node_modules/@types/node/globals.d.ts +0 -411
  229. package/node_modules/@alanszp/errors/node_modules/@types/node/globals.global.d.ts +0 -1
  230. package/node_modules/@alanszp/errors/node_modules/@types/node/http.d.ts +0 -1887
  231. package/node_modules/@alanszp/errors/node_modules/@types/node/http2.d.ts +0 -2382
  232. package/node_modules/@alanszp/errors/node_modules/@types/node/https.d.ts +0 -550
  233. package/node_modules/@alanszp/errors/node_modules/@types/node/index.d.ts +0 -88
  234. package/node_modules/@alanszp/errors/node_modules/@types/node/inspector.d.ts +0 -2747
  235. package/node_modules/@alanszp/errors/node_modules/@types/node/module.d.ts +0 -315
  236. package/node_modules/@alanszp/errors/node_modules/@types/node/net.d.ts +0 -949
  237. package/node_modules/@alanszp/errors/node_modules/@types/node/os.d.ts +0 -478
  238. package/node_modules/@alanszp/errors/node_modules/@types/node/package.json +0 -229
  239. package/node_modules/@alanszp/errors/node_modules/@types/node/path.d.ts +0 -191
  240. package/node_modules/@alanszp/errors/node_modules/@types/node/perf_hooks.d.ts +0 -645
  241. package/node_modules/@alanszp/errors/node_modules/@types/node/process.d.ts +0 -1561
  242. package/node_modules/@alanszp/errors/node_modules/@types/node/punycode.d.ts +0 -117
  243. package/node_modules/@alanszp/errors/node_modules/@types/node/querystring.d.ts +0 -141
  244. package/node_modules/@alanszp/errors/node_modules/@types/node/readline/promises.d.ts +0 -150
  245. package/node_modules/@alanszp/errors/node_modules/@types/node/readline.d.ts +0 -539
  246. package/node_modules/@alanszp/errors/node_modules/@types/node/repl.d.ts +0 -430
  247. package/node_modules/@alanszp/errors/node_modules/@types/node/stream/consumers.d.ts +0 -12
  248. package/node_modules/@alanszp/errors/node_modules/@types/node/stream/promises.d.ts +0 -83
  249. package/node_modules/@alanszp/errors/node_modules/@types/node/stream/web.d.ts +0 -366
  250. package/node_modules/@alanszp/errors/node_modules/@types/node/stream.d.ts +0 -1701
  251. package/node_modules/@alanszp/errors/node_modules/@types/node/string_decoder.d.ts +0 -67
  252. package/node_modules/@alanszp/errors/node_modules/@types/node/test.d.ts +0 -1465
  253. package/node_modules/@alanszp/errors/node_modules/@types/node/timers/promises.d.ts +0 -93
  254. package/node_modules/@alanszp/errors/node_modules/@types/node/timers.d.ts +0 -240
  255. package/node_modules/@alanszp/errors/node_modules/@types/node/tls.d.ts +0 -1210
  256. package/node_modules/@alanszp/errors/node_modules/@types/node/trace_events.d.ts +0 -182
  257. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
  258. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
  259. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
  260. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2362
  261. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
  262. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
  263. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/console.d.ts +0 -415
  264. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
  265. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4487
  266. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/dgram.d.ts +0 -596
  267. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -545
  268. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
  269. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
  270. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
  271. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
  272. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/events.d.ts +0 -879
  273. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1239
  274. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/fs.d.ts +0 -4311
  275. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/globals.d.ts +0 -411
  276. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
  277. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/http.d.ts +0 -1887
  278. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
  279. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/https.d.ts +0 -550
  280. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/index.d.ts +0 -88
  281. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
  282. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/module.d.ts +0 -315
  283. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/net.d.ts +0 -949
  284. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/os.d.ts +0 -478
  285. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/path.d.ts +0 -191
  286. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -645
  287. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/process.d.ts +0 -1561
  288. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
  289. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
  290. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
  291. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
  292. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
  293. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
  294. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
  295. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -366
  296. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
  297. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
  298. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/test.d.ts +0 -1465
  299. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
  300. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
  301. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
  302. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
  303. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
  304. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/url.d.ts +0 -927
  305. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/util.d.ts +0 -2183
  306. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/v8.d.ts +0 -764
  307. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/vm.d.ts +0 -903
  308. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/wasi.d.ts +0 -179
  309. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
  310. package/node_modules/@alanszp/errors/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
  311. package/node_modules/@alanszp/errors/node_modules/@types/node/tty.d.ts +0 -208
  312. package/node_modules/@alanszp/errors/node_modules/@types/node/url.d.ts +0 -927
  313. package/node_modules/@alanszp/errors/node_modules/@types/node/util.d.ts +0 -2183
  314. package/node_modules/@alanszp/errors/node_modules/@types/node/v8.d.ts +0 -764
  315. package/node_modules/@alanszp/errors/node_modules/@types/node/vm.d.ts +0 -903
  316. package/node_modules/@alanszp/errors/node_modules/@types/node/wasi.d.ts +0 -179
  317. package/node_modules/@alanszp/errors/node_modules/@types/node/worker_threads.d.ts +0 -691
  318. package/node_modules/@alanszp/errors/node_modules/@types/node/zlib.d.ts +0 -517
  319. package/node_modules/@alanszp/errors/package.json +0 -34
  320. package/node_modules/@alanszp/errors/src/BaseError.ts +0 -14
  321. package/node_modules/@alanszp/errors/src/HttpRenderableError.ts +0 -5
  322. package/node_modules/@alanszp/errors/src/InternalServerError.ts +0 -32
  323. package/node_modules/@alanszp/errors/src/RenderableError.ts +0 -37
  324. package/node_modules/@alanszp/errors/src/index.ts +0 -4
  325. package/node_modules/@alanszp/errors/tsconfig.json +0 -15
  326. package/node_modules/@alanszp/express/.gitignore +0 -3
  327. package/node_modules/@alanszp/express/.npmignore +0 -3
  328. package/node_modules/@alanszp/express/LICENSE +0 -21
  329. package/node_modules/@alanszp/express/babel.config.js +0 -7
  330. package/node_modules/@alanszp/express/dist/helpers/getIp.d.ts +0 -2
  331. package/node_modules/@alanszp/express/dist/helpers/getIp.js +0 -9
  332. package/node_modules/@alanszp/express/dist/helpers/getIp.js.map +0 -1
  333. package/node_modules/@alanszp/express/dist/helpers/getRequestLogger.d.ts +0 -2
  334. package/node_modules/@alanszp/express/dist/helpers/getRequestLogger.js +0 -10
  335. package/node_modules/@alanszp/express/dist/helpers/getRequestLogger.js.map +0 -1
  336. package/node_modules/@alanszp/express/dist/helpers/now.d.ts +0 -1
  337. package/node_modules/@alanszp/express/dist/helpers/now.js +0 -8
  338. package/node_modules/@alanszp/express/dist/helpers/now.js.map +0 -1
  339. package/node_modules/@alanszp/express/dist/helpers/renderErrorJson.d.ts +0 -4
  340. package/node_modules/@alanszp/express/dist/helpers/renderErrorJson.js +0 -32
  341. package/node_modules/@alanszp/express/dist/helpers/renderErrorJson.js.map +0 -1
  342. package/node_modules/@alanszp/express/dist/index.d.ts +0 -10
  343. package/node_modules/@alanszp/express/dist/index.js +0 -23
  344. package/node_modules/@alanszp/express/dist/index.js.map +0 -1
  345. package/node_modules/@alanszp/express/dist/middlewares/accessLogger.d.ts +0 -3
  346. package/node_modules/@alanszp/express/dist/middlewares/accessLogger.js +0 -30
  347. package/node_modules/@alanszp/express/dist/middlewares/accessLogger.js.map +0 -1
  348. package/node_modules/@alanszp/express/dist/middlewares/auditLog.d.ts +0 -8
  349. package/node_modules/@alanszp/express/dist/middlewares/auditLog.js +0 -44
  350. package/node_modules/@alanszp/express/dist/middlewares/auditLog.js.map +0 -1
  351. package/node_modules/@alanszp/express/dist/middlewares/authedForOrg.d.ts +0 -3
  352. package/node_modules/@alanszp/express/dist/middlewares/authedForOrg.js +0 -45
  353. package/node_modules/@alanszp/express/dist/middlewares/authedForOrg.js.map +0 -1
  354. package/node_modules/@alanszp/express/dist/middlewares/authenticateUser.d.ts +0 -25
  355. package/node_modules/@alanszp/express/dist/middlewares/authenticateUser.js +0 -115
  356. package/node_modules/@alanszp/express/dist/middlewares/authenticateUser.js.map +0 -1
  357. package/node_modules/@alanszp/express/dist/middlewares/authenticateUser.test.d.ts +0 -1
  358. package/node_modules/@alanszp/express/dist/middlewares/authenticateUser.test.js +0 -308
  359. package/node_modules/@alanszp/express/dist/middlewares/authenticateUser.test.js.map +0 -1
  360. package/node_modules/@alanszp/express/dist/middlewares/createContext.d.ts +0 -6
  361. package/node_modules/@alanszp/express/dist/middlewares/createContext.js +0 -35
  362. package/node_modules/@alanszp/express/dist/middlewares/createContext.js.map +0 -1
  363. package/node_modules/@alanszp/express/dist/middlewares/createContext.test.d.ts +0 -1
  364. package/node_modules/@alanszp/express/dist/middlewares/createContext.test.js +0 -50
  365. package/node_modules/@alanszp/express/dist/middlewares/createContext.test.js.map +0 -1
  366. package/node_modules/@alanszp/express/dist/middlewares/hasRoles.d.ts +0 -3
  367. package/node_modules/@alanszp/express/dist/middlewares/hasRoles.js +0 -21
  368. package/node_modules/@alanszp/express/dist/middlewares/hasRoles.js.map +0 -1
  369. package/node_modules/@alanszp/express/dist/middlewares/jsonBodyParser.d.ts +0 -4
  370. package/node_modules/@alanszp/express/dist/middlewares/jsonBodyParser.js +0 -22
  371. package/node_modules/@alanszp/express/dist/middlewares/jsonBodyParser.js.map +0 -1
  372. package/node_modules/@alanszp/express/dist/middlewares/returnInternalServerError.d.ts +0 -4
  373. package/node_modules/@alanszp/express/dist/middlewares/returnInternalServerError.js +0 -10
  374. package/node_modules/@alanszp/express/dist/middlewares/returnInternalServerError.js.map +0 -1
  375. package/node_modules/@alanszp/express/dist/middlewares/returnNotFound.d.ts +0 -3
  376. package/node_modules/@alanszp/express/dist/middlewares/returnNotFound.js +0 -9
  377. package/node_modules/@alanszp/express/dist/middlewares/returnNotFound.js.map +0 -1
  378. package/node_modules/@alanszp/express/dist/test/mocks/authOptionsMocks.d.ts +0 -8
  379. package/node_modules/@alanszp/express/dist/test/mocks/authOptionsMocks.js +0 -30
  380. package/node_modules/@alanszp/express/dist/test/mocks/authOptionsMocks.js.map +0 -1
  381. package/node_modules/@alanszp/express/dist/test/mocks/expressMocks.d.ts +0 -6
  382. package/node_modules/@alanszp/express/dist/test/mocks/expressMocks.js +0 -26
  383. package/node_modules/@alanszp/express/dist/test/mocks/expressMocks.js.map +0 -1
  384. package/node_modules/@alanszp/express/dist/test/mocks/jwtUserMocks.d.ts +0 -3
  385. package/node_modules/@alanszp/express/dist/test/mocks/jwtUserMocks.js +0 -21
  386. package/node_modules/@alanszp/express/dist/test/mocks/jwtUserMocks.js.map +0 -1
  387. package/node_modules/@alanszp/express/dist/test/setup.d.ts +0 -1
  388. package/node_modules/@alanszp/express/dist/test/setup.js +0 -5
  389. package/node_modules/@alanszp/express/dist/test/setup.js.map +0 -1
  390. package/node_modules/@alanszp/express/dist/test/setup.test.d.ts +0 -1
  391. package/node_modules/@alanszp/express/dist/test/setup.test.js +0 -14
  392. package/node_modules/@alanszp/express/dist/test/setup.test.js.map +0 -1
  393. package/node_modules/@alanszp/express/dist/types/AuthMethod.d.ts +0 -10
  394. package/node_modules/@alanszp/express/dist/types/AuthMethod.js +0 -3
  395. package/node_modules/@alanszp/express/dist/types/AuthMethod.js.map +0 -1
  396. package/node_modules/@alanszp/express/dist/types/GenericRequest.d.ts +0 -2
  397. package/node_modules/@alanszp/express/dist/types/GenericRequest.js +0 -3
  398. package/node_modules/@alanszp/express/dist/types/GenericRequest.js.map +0 -1
  399. package/node_modules/@alanszp/express/jest.config.js +0 -10
  400. package/node_modules/@alanszp/express/node_modules/@jest/expect-utils/LICENSE +0 -21
  401. package/node_modules/@alanszp/express/node_modules/@jest/expect-utils/README.md +0 -5
  402. package/node_modules/@alanszp/express/node_modules/@jest/expect-utils/build/index.d.ts +0 -93
  403. package/node_modules/@alanszp/express/node_modules/@jest/expect-utils/build/index.js +0 -37
  404. package/node_modules/@alanszp/express/node_modules/@jest/expect-utils/build/jasmineUtils.js +0 -282
  405. package/node_modules/@alanszp/express/node_modules/@jest/expect-utils/build/types.js +0 -1
  406. package/node_modules/@alanszp/express/node_modules/@jest/expect-utils/build/utils.js +0 -457
  407. package/node_modules/@alanszp/express/node_modules/@jest/expect-utils/package.json +0 -33
  408. package/node_modules/@alanszp/express/node_modules/@jest/types/LICENSE +0 -21
  409. package/node_modules/@alanszp/express/node_modules/@jest/types/README.md +0 -30
  410. package/node_modules/@alanszp/express/node_modules/@jest/types/build/Circus.js +0 -1
  411. package/node_modules/@alanszp/express/node_modules/@jest/types/build/Config.js +0 -1
  412. package/node_modules/@alanszp/express/node_modules/@jest/types/build/Global.js +0 -1
  413. package/node_modules/@alanszp/express/node_modules/@jest/types/build/TestResult.js +0 -1
  414. package/node_modules/@alanszp/express/node_modules/@jest/types/build/Transform.js +0 -1
  415. package/node_modules/@alanszp/express/node_modules/@jest/types/build/index.d.ts +0 -1166
  416. package/node_modules/@alanszp/express/node_modules/@jest/types/build/index.js +0 -1
  417. package/node_modules/@alanszp/express/node_modules/@jest/types/package.json +0 -38
  418. package/node_modules/@alanszp/express/node_modules/@types/jest/LICENSE +0 -21
  419. package/node_modules/@alanszp/express/node_modules/@types/jest/README.md +0 -17
  420. package/node_modules/@alanszp/express/node_modules/@types/jest/index.d.ts +0 -1608
  421. package/node_modules/@alanszp/express/node_modules/@types/jest/package.json +0 -159
  422. package/node_modules/@alanszp/express/node_modules/@types/node/LICENSE +0 -21
  423. package/node_modules/@alanszp/express/node_modules/@types/node/README.md +0 -15
  424. package/node_modules/@alanszp/express/node_modules/@types/node/assert/strict.d.ts +0 -8
  425. package/node_modules/@alanszp/express/node_modules/@types/node/assert.d.ts +0 -996
  426. package/node_modules/@alanszp/express/node_modules/@types/node/async_hooks.d.ts +0 -539
  427. package/node_modules/@alanszp/express/node_modules/@types/node/buffer.d.ts +0 -2362
  428. package/node_modules/@alanszp/express/node_modules/@types/node/child_process.d.ts +0 -1540
  429. package/node_modules/@alanszp/express/node_modules/@types/node/cluster.d.ts +0 -432
  430. package/node_modules/@alanszp/express/node_modules/@types/node/console.d.ts +0 -415
  431. package/node_modules/@alanszp/express/node_modules/@types/node/constants.d.ts +0 -19
  432. package/node_modules/@alanszp/express/node_modules/@types/node/crypto.d.ts +0 -4487
  433. package/node_modules/@alanszp/express/node_modules/@types/node/dgram.d.ts +0 -596
  434. package/node_modules/@alanszp/express/node_modules/@types/node/diagnostics_channel.d.ts +0 -545
  435. package/node_modules/@alanszp/express/node_modules/@types/node/dns/promises.d.ts +0 -425
  436. package/node_modules/@alanszp/express/node_modules/@types/node/dns.d.ts +0 -809
  437. package/node_modules/@alanszp/express/node_modules/@types/node/dom-events.d.ts +0 -122
  438. package/node_modules/@alanszp/express/node_modules/@types/node/domain.d.ts +0 -170
  439. package/node_modules/@alanszp/express/node_modules/@types/node/events.d.ts +0 -879
  440. package/node_modules/@alanszp/express/node_modules/@types/node/fs/promises.d.ts +0 -1239
  441. package/node_modules/@alanszp/express/node_modules/@types/node/fs.d.ts +0 -4311
  442. package/node_modules/@alanszp/express/node_modules/@types/node/globals.d.ts +0 -411
  443. package/node_modules/@alanszp/express/node_modules/@types/node/globals.global.d.ts +0 -1
  444. package/node_modules/@alanszp/express/node_modules/@types/node/http.d.ts +0 -1887
  445. package/node_modules/@alanszp/express/node_modules/@types/node/http2.d.ts +0 -2382
  446. package/node_modules/@alanszp/express/node_modules/@types/node/https.d.ts +0 -550
  447. package/node_modules/@alanszp/express/node_modules/@types/node/index.d.ts +0 -88
  448. package/node_modules/@alanszp/express/node_modules/@types/node/inspector.d.ts +0 -2747
  449. package/node_modules/@alanszp/express/node_modules/@types/node/module.d.ts +0 -315
  450. package/node_modules/@alanszp/express/node_modules/@types/node/net.d.ts +0 -949
  451. package/node_modules/@alanszp/express/node_modules/@types/node/os.d.ts +0 -478
  452. package/node_modules/@alanszp/express/node_modules/@types/node/package.json +0 -229
  453. package/node_modules/@alanszp/express/node_modules/@types/node/path.d.ts +0 -191
  454. package/node_modules/@alanszp/express/node_modules/@types/node/perf_hooks.d.ts +0 -645
  455. package/node_modules/@alanszp/express/node_modules/@types/node/process.d.ts +0 -1561
  456. package/node_modules/@alanszp/express/node_modules/@types/node/punycode.d.ts +0 -117
  457. package/node_modules/@alanszp/express/node_modules/@types/node/querystring.d.ts +0 -141
  458. package/node_modules/@alanszp/express/node_modules/@types/node/readline/promises.d.ts +0 -150
  459. package/node_modules/@alanszp/express/node_modules/@types/node/readline.d.ts +0 -539
  460. package/node_modules/@alanszp/express/node_modules/@types/node/repl.d.ts +0 -430
  461. package/node_modules/@alanszp/express/node_modules/@types/node/stream/consumers.d.ts +0 -12
  462. package/node_modules/@alanszp/express/node_modules/@types/node/stream/promises.d.ts +0 -83
  463. package/node_modules/@alanszp/express/node_modules/@types/node/stream/web.d.ts +0 -366
  464. package/node_modules/@alanszp/express/node_modules/@types/node/stream.d.ts +0 -1701
  465. package/node_modules/@alanszp/express/node_modules/@types/node/string_decoder.d.ts +0 -67
  466. package/node_modules/@alanszp/express/node_modules/@types/node/test.d.ts +0 -1465
  467. package/node_modules/@alanszp/express/node_modules/@types/node/timers/promises.d.ts +0 -93
  468. package/node_modules/@alanszp/express/node_modules/@types/node/timers.d.ts +0 -240
  469. package/node_modules/@alanszp/express/node_modules/@types/node/tls.d.ts +0 -1210
  470. package/node_modules/@alanszp/express/node_modules/@types/node/trace_events.d.ts +0 -182
  471. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
  472. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
  473. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
  474. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2362
  475. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
  476. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
  477. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/console.d.ts +0 -415
  478. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
  479. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4487
  480. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/dgram.d.ts +0 -596
  481. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -545
  482. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
  483. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
  484. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
  485. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
  486. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/events.d.ts +0 -879
  487. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1239
  488. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/fs.d.ts +0 -4311
  489. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/globals.d.ts +0 -411
  490. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
  491. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/http.d.ts +0 -1887
  492. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
  493. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/https.d.ts +0 -550
  494. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/index.d.ts +0 -88
  495. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
  496. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/module.d.ts +0 -315
  497. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/net.d.ts +0 -949
  498. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/os.d.ts +0 -478
  499. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/path.d.ts +0 -191
  500. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -645
  501. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/process.d.ts +0 -1561
  502. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
  503. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
  504. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
  505. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
  506. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
  507. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
  508. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
  509. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -366
  510. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
  511. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
  512. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/test.d.ts +0 -1465
  513. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
  514. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
  515. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
  516. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
  517. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
  518. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/url.d.ts +0 -927
  519. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/util.d.ts +0 -2183
  520. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/v8.d.ts +0 -764
  521. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/vm.d.ts +0 -903
  522. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/wasi.d.ts +0 -179
  523. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
  524. package/node_modules/@alanszp/express/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
  525. package/node_modules/@alanszp/express/node_modules/@types/node/tty.d.ts +0 -208
  526. package/node_modules/@alanszp/express/node_modules/@types/node/url.d.ts +0 -927
  527. package/node_modules/@alanszp/express/node_modules/@types/node/util.d.ts +0 -2183
  528. package/node_modules/@alanszp/express/node_modules/@types/node/v8.d.ts +0 -764
  529. package/node_modules/@alanszp/express/node_modules/@types/node/vm.d.ts +0 -903
  530. package/node_modules/@alanszp/express/node_modules/@types/node/wasi.d.ts +0 -179
  531. package/node_modules/@alanszp/express/node_modules/@types/node/worker_threads.d.ts +0 -691
  532. package/node_modules/@alanszp/express/node_modules/@types/node/zlib.d.ts +0 -517
  533. package/node_modules/@alanszp/express/package.json +0 -50
  534. package/node_modules/@alanszp/express/src/helpers/getIp.ts +0 -5
  535. package/node_modules/@alanszp/express/src/helpers/getRequestLogger.ts +0 -6
  536. package/node_modules/@alanszp/express/src/helpers/now.ts +0 -3
  537. package/node_modules/@alanszp/express/src/helpers/renderErrorJson.ts +0 -29
  538. package/node_modules/@alanszp/express/src/index.ts +0 -10
  539. package/node_modules/@alanszp/express/src/middlewares/accessLogger.ts +0 -34
  540. package/node_modules/@alanszp/express/src/middlewares/auditLog.ts +0 -52
  541. package/node_modules/@alanszp/express/src/middlewares/authedForOrg.ts +0 -50
  542. package/node_modules/@alanszp/express/src/middlewares/authenticateUser.test.ts +0 -403
  543. package/node_modules/@alanszp/express/src/middlewares/authenticateUser.ts +0 -171
  544. package/node_modules/@alanszp/express/src/middlewares/createContext.test.ts +0 -85
  545. package/node_modules/@alanszp/express/src/middlewares/createContext.ts +0 -49
  546. package/node_modules/@alanszp/express/src/middlewares/hasRoles.ts +0 -24
  547. package/node_modules/@alanszp/express/src/middlewares/jsonBodyParser.ts +0 -22
  548. package/node_modules/@alanszp/express/src/middlewares/returnInternalServerError.ts +0 -15
  549. package/node_modules/@alanszp/express/src/middlewares/returnNotFound.ts +0 -11
  550. package/node_modules/@alanszp/express/src/test/mocks/authOptionsMocks.ts +0 -35
  551. package/node_modules/@alanszp/express/src/test/mocks/expressMocks.ts +0 -33
  552. package/node_modules/@alanszp/express/src/test/mocks/jwtUserMocks.ts +0 -19
  553. package/node_modules/@alanszp/express/src/test/setup.test.ts +0 -15
  554. package/node_modules/@alanszp/express/src/test/setup.ts +0 -3
  555. package/node_modules/@alanszp/express/src/types/AuthMethod.ts +0 -27
  556. package/node_modules/@alanszp/express/src/types/GenericRequest.ts +0 -3
  557. package/node_modules/@alanszp/express/src/types/custom.d.ts +0 -20
  558. package/node_modules/@alanszp/express/tsconfig.json +0 -18
  559. package/node_modules/@alanszp/jwt/.gitignore +0 -3
  560. package/node_modules/@alanszp/jwt/.npmignore +0 -3
  561. package/node_modules/@alanszp/jwt/LICENSE +0 -21
  562. package/node_modules/@alanszp/jwt/dist/JWTUser.d.ts +0 -31
  563. package/node_modules/@alanszp/jwt/dist/JWTUser.js +0 -62
  564. package/node_modules/@alanszp/jwt/dist/JWTUser.js.map +0 -1
  565. package/node_modules/@alanszp/jwt/dist/index.d.ts +0 -3
  566. package/node_modules/@alanszp/jwt/dist/index.js +0 -16
  567. package/node_modules/@alanszp/jwt/dist/index.js.map +0 -1
  568. package/node_modules/@alanszp/jwt/dist/jwt.d.ts +0 -11
  569. package/node_modules/@alanszp/jwt/dist/jwt.js +0 -67
  570. package/node_modules/@alanszp/jwt/dist/jwt.js.map +0 -1
  571. package/node_modules/@alanszp/jwt/dist/types.d.ts +0 -26
  572. package/node_modules/@alanszp/jwt/dist/types.js +0 -3
  573. package/node_modules/@alanszp/jwt/dist/types.js.map +0 -1
  574. package/node_modules/@alanszp/jwt/node_modules/@types/node/LICENSE +0 -21
  575. package/node_modules/@alanszp/jwt/node_modules/@types/node/README.md +0 -15
  576. package/node_modules/@alanszp/jwt/node_modules/@types/node/assert/strict.d.ts +0 -8
  577. package/node_modules/@alanszp/jwt/node_modules/@types/node/assert.d.ts +0 -996
  578. package/node_modules/@alanszp/jwt/node_modules/@types/node/async_hooks.d.ts +0 -539
  579. package/node_modules/@alanszp/jwt/node_modules/@types/node/buffer.d.ts +0 -2362
  580. package/node_modules/@alanszp/jwt/node_modules/@types/node/child_process.d.ts +0 -1540
  581. package/node_modules/@alanszp/jwt/node_modules/@types/node/cluster.d.ts +0 -432
  582. package/node_modules/@alanszp/jwt/node_modules/@types/node/console.d.ts +0 -415
  583. package/node_modules/@alanszp/jwt/node_modules/@types/node/constants.d.ts +0 -19
  584. package/node_modules/@alanszp/jwt/node_modules/@types/node/crypto.d.ts +0 -4487
  585. package/node_modules/@alanszp/jwt/node_modules/@types/node/dgram.d.ts +0 -596
  586. package/node_modules/@alanszp/jwt/node_modules/@types/node/diagnostics_channel.d.ts +0 -545
  587. package/node_modules/@alanszp/jwt/node_modules/@types/node/dns/promises.d.ts +0 -425
  588. package/node_modules/@alanszp/jwt/node_modules/@types/node/dns.d.ts +0 -809
  589. package/node_modules/@alanszp/jwt/node_modules/@types/node/dom-events.d.ts +0 -122
  590. package/node_modules/@alanszp/jwt/node_modules/@types/node/domain.d.ts +0 -170
  591. package/node_modules/@alanszp/jwt/node_modules/@types/node/events.d.ts +0 -879
  592. package/node_modules/@alanszp/jwt/node_modules/@types/node/fs/promises.d.ts +0 -1239
  593. package/node_modules/@alanszp/jwt/node_modules/@types/node/fs.d.ts +0 -4311
  594. package/node_modules/@alanszp/jwt/node_modules/@types/node/globals.d.ts +0 -411
  595. package/node_modules/@alanszp/jwt/node_modules/@types/node/globals.global.d.ts +0 -1
  596. package/node_modules/@alanszp/jwt/node_modules/@types/node/http.d.ts +0 -1887
  597. package/node_modules/@alanszp/jwt/node_modules/@types/node/http2.d.ts +0 -2382
  598. package/node_modules/@alanszp/jwt/node_modules/@types/node/https.d.ts +0 -550
  599. package/node_modules/@alanszp/jwt/node_modules/@types/node/index.d.ts +0 -88
  600. package/node_modules/@alanszp/jwt/node_modules/@types/node/inspector.d.ts +0 -2747
  601. package/node_modules/@alanszp/jwt/node_modules/@types/node/module.d.ts +0 -315
  602. package/node_modules/@alanszp/jwt/node_modules/@types/node/net.d.ts +0 -949
  603. package/node_modules/@alanszp/jwt/node_modules/@types/node/os.d.ts +0 -478
  604. package/node_modules/@alanszp/jwt/node_modules/@types/node/package.json +0 -229
  605. package/node_modules/@alanszp/jwt/node_modules/@types/node/path.d.ts +0 -191
  606. package/node_modules/@alanszp/jwt/node_modules/@types/node/perf_hooks.d.ts +0 -645
  607. package/node_modules/@alanszp/jwt/node_modules/@types/node/process.d.ts +0 -1561
  608. package/node_modules/@alanszp/jwt/node_modules/@types/node/punycode.d.ts +0 -117
  609. package/node_modules/@alanszp/jwt/node_modules/@types/node/querystring.d.ts +0 -141
  610. package/node_modules/@alanszp/jwt/node_modules/@types/node/readline/promises.d.ts +0 -150
  611. package/node_modules/@alanszp/jwt/node_modules/@types/node/readline.d.ts +0 -539
  612. package/node_modules/@alanszp/jwt/node_modules/@types/node/repl.d.ts +0 -430
  613. package/node_modules/@alanszp/jwt/node_modules/@types/node/stream/consumers.d.ts +0 -12
  614. package/node_modules/@alanszp/jwt/node_modules/@types/node/stream/promises.d.ts +0 -83
  615. package/node_modules/@alanszp/jwt/node_modules/@types/node/stream/web.d.ts +0 -366
  616. package/node_modules/@alanszp/jwt/node_modules/@types/node/stream.d.ts +0 -1701
  617. package/node_modules/@alanszp/jwt/node_modules/@types/node/string_decoder.d.ts +0 -67
  618. package/node_modules/@alanszp/jwt/node_modules/@types/node/test.d.ts +0 -1465
  619. package/node_modules/@alanszp/jwt/node_modules/@types/node/timers/promises.d.ts +0 -93
  620. package/node_modules/@alanszp/jwt/node_modules/@types/node/timers.d.ts +0 -240
  621. package/node_modules/@alanszp/jwt/node_modules/@types/node/tls.d.ts +0 -1210
  622. package/node_modules/@alanszp/jwt/node_modules/@types/node/trace_events.d.ts +0 -182
  623. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
  624. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
  625. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
  626. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2362
  627. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
  628. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
  629. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/console.d.ts +0 -415
  630. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
  631. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4487
  632. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/dgram.d.ts +0 -596
  633. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -545
  634. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
  635. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
  636. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
  637. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
  638. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/events.d.ts +0 -879
  639. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1239
  640. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/fs.d.ts +0 -4311
  641. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/globals.d.ts +0 -411
  642. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
  643. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/http.d.ts +0 -1887
  644. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
  645. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/https.d.ts +0 -550
  646. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/index.d.ts +0 -88
  647. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
  648. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/module.d.ts +0 -315
  649. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/net.d.ts +0 -949
  650. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/os.d.ts +0 -478
  651. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/path.d.ts +0 -191
  652. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -645
  653. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/process.d.ts +0 -1561
  654. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
  655. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
  656. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
  657. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
  658. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
  659. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
  660. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
  661. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -366
  662. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
  663. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
  664. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/test.d.ts +0 -1465
  665. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
  666. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
  667. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
  668. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
  669. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
  670. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/url.d.ts +0 -927
  671. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/util.d.ts +0 -2183
  672. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/v8.d.ts +0 -764
  673. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/vm.d.ts +0 -903
  674. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/wasi.d.ts +0 -179
  675. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
  676. package/node_modules/@alanszp/jwt/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
  677. package/node_modules/@alanszp/jwt/node_modules/@types/node/tty.d.ts +0 -208
  678. package/node_modules/@alanszp/jwt/node_modules/@types/node/url.d.ts +0 -927
  679. package/node_modules/@alanszp/jwt/node_modules/@types/node/util.d.ts +0 -2183
  680. package/node_modules/@alanszp/jwt/node_modules/@types/node/v8.d.ts +0 -764
  681. package/node_modules/@alanszp/jwt/node_modules/@types/node/vm.d.ts +0 -903
  682. package/node_modules/@alanszp/jwt/node_modules/@types/node/wasi.d.ts +0 -179
  683. package/node_modules/@alanszp/jwt/node_modules/@types/node/worker_threads.d.ts +0 -691
  684. package/node_modules/@alanszp/jwt/node_modules/@types/node/zlib.d.ts +0 -517
  685. package/node_modules/@alanszp/jwt/package.json +0 -29
  686. package/node_modules/@alanszp/jwt/src/JWTUser.ts +0 -85
  687. package/node_modules/@alanszp/jwt/src/index.ts +0 -3
  688. package/node_modules/@alanszp/jwt/src/jwt.ts +0 -81
  689. package/node_modules/@alanszp/jwt/src/types.ts +0 -31
  690. package/node_modules/@alanszp/jwt/tsconfig.json +0 -15
  691. package/node_modules/@alanszp/logger/.gitignore +0 -3
  692. package/node_modules/@alanszp/logger/.npmignore +0 -3
  693. package/node_modules/@alanszp/logger/LICENSE +0 -21
  694. package/node_modules/@alanszp/logger/dist/config.d.ts +0 -28
  695. package/node_modules/@alanszp/logger/dist/config.js +0 -3
  696. package/node_modules/@alanszp/logger/dist/config.js.map +0 -1
  697. package/node_modules/@alanszp/logger/dist/factory.d.ts +0 -5
  698. package/node_modules/@alanszp/logger/dist/factory.js +0 -55
  699. package/node_modules/@alanszp/logger/dist/factory.js.map +0 -1
  700. package/node_modules/@alanszp/logger/dist/index.d.ts +0 -5
  701. package/node_modules/@alanszp/logger/dist/index.js +0 -20
  702. package/node_modules/@alanszp/logger/dist/index.js.map +0 -1
  703. package/node_modules/@alanszp/logger/dist/interfaces.d.ts +0 -23
  704. package/node_modules/@alanszp/logger/dist/interfaces.js +0 -18
  705. package/node_modules/@alanszp/logger/dist/interfaces.js.map +0 -1
  706. package/node_modules/@alanszp/logger/dist/logger.d.ts +0 -14
  707. package/node_modules/@alanszp/logger/dist/logger.js +0 -45
  708. package/node_modules/@alanszp/logger/dist/logger.js.map +0 -1
  709. package/node_modules/@alanszp/logger/dist/mock.d.ts +0 -11
  710. package/node_modules/@alanszp/logger/dist/mock.js +0 -32
  711. package/node_modules/@alanszp/logger/dist/mock.js.map +0 -1
  712. package/node_modules/@alanszp/logger/dist/serializer.d.ts +0 -5
  713. package/node_modules/@alanszp/logger/dist/serializer.js +0 -67
  714. package/node_modules/@alanszp/logger/dist/serializer.js.map +0 -1
  715. package/node_modules/@alanszp/logger/dist/slackBunyan.d.ts +0 -16
  716. package/node_modules/@alanszp/logger/dist/slackBunyan.js +0 -108
  717. package/node_modules/@alanszp/logger/dist/slackBunyan.js.map +0 -1
  718. package/node_modules/@alanszp/logger/node_modules/@types/node/LICENSE +0 -21
  719. package/node_modules/@alanszp/logger/node_modules/@types/node/README.md +0 -15
  720. package/node_modules/@alanszp/logger/node_modules/@types/node/assert/strict.d.ts +0 -8
  721. package/node_modules/@alanszp/logger/node_modules/@types/node/assert.d.ts +0 -996
  722. package/node_modules/@alanszp/logger/node_modules/@types/node/async_hooks.d.ts +0 -539
  723. package/node_modules/@alanszp/logger/node_modules/@types/node/buffer.d.ts +0 -2362
  724. package/node_modules/@alanszp/logger/node_modules/@types/node/child_process.d.ts +0 -1540
  725. package/node_modules/@alanszp/logger/node_modules/@types/node/cluster.d.ts +0 -432
  726. package/node_modules/@alanszp/logger/node_modules/@types/node/console.d.ts +0 -415
  727. package/node_modules/@alanszp/logger/node_modules/@types/node/constants.d.ts +0 -19
  728. package/node_modules/@alanszp/logger/node_modules/@types/node/crypto.d.ts +0 -4487
  729. package/node_modules/@alanszp/logger/node_modules/@types/node/dgram.d.ts +0 -596
  730. package/node_modules/@alanszp/logger/node_modules/@types/node/diagnostics_channel.d.ts +0 -545
  731. package/node_modules/@alanszp/logger/node_modules/@types/node/dns/promises.d.ts +0 -425
  732. package/node_modules/@alanszp/logger/node_modules/@types/node/dns.d.ts +0 -809
  733. package/node_modules/@alanszp/logger/node_modules/@types/node/dom-events.d.ts +0 -122
  734. package/node_modules/@alanszp/logger/node_modules/@types/node/domain.d.ts +0 -170
  735. package/node_modules/@alanszp/logger/node_modules/@types/node/events.d.ts +0 -879
  736. package/node_modules/@alanszp/logger/node_modules/@types/node/fs/promises.d.ts +0 -1239
  737. package/node_modules/@alanszp/logger/node_modules/@types/node/fs.d.ts +0 -4311
  738. package/node_modules/@alanszp/logger/node_modules/@types/node/globals.d.ts +0 -411
  739. package/node_modules/@alanszp/logger/node_modules/@types/node/globals.global.d.ts +0 -1
  740. package/node_modules/@alanszp/logger/node_modules/@types/node/http.d.ts +0 -1887
  741. package/node_modules/@alanszp/logger/node_modules/@types/node/http2.d.ts +0 -2382
  742. package/node_modules/@alanszp/logger/node_modules/@types/node/https.d.ts +0 -550
  743. package/node_modules/@alanszp/logger/node_modules/@types/node/index.d.ts +0 -88
  744. package/node_modules/@alanszp/logger/node_modules/@types/node/inspector.d.ts +0 -2747
  745. package/node_modules/@alanszp/logger/node_modules/@types/node/module.d.ts +0 -315
  746. package/node_modules/@alanszp/logger/node_modules/@types/node/net.d.ts +0 -949
  747. package/node_modules/@alanszp/logger/node_modules/@types/node/os.d.ts +0 -478
  748. package/node_modules/@alanszp/logger/node_modules/@types/node/package.json +0 -229
  749. package/node_modules/@alanszp/logger/node_modules/@types/node/path.d.ts +0 -191
  750. package/node_modules/@alanszp/logger/node_modules/@types/node/perf_hooks.d.ts +0 -645
  751. package/node_modules/@alanszp/logger/node_modules/@types/node/process.d.ts +0 -1561
  752. package/node_modules/@alanszp/logger/node_modules/@types/node/punycode.d.ts +0 -117
  753. package/node_modules/@alanszp/logger/node_modules/@types/node/querystring.d.ts +0 -141
  754. package/node_modules/@alanszp/logger/node_modules/@types/node/readline/promises.d.ts +0 -150
  755. package/node_modules/@alanszp/logger/node_modules/@types/node/readline.d.ts +0 -539
  756. package/node_modules/@alanszp/logger/node_modules/@types/node/repl.d.ts +0 -430
  757. package/node_modules/@alanszp/logger/node_modules/@types/node/stream/consumers.d.ts +0 -12
  758. package/node_modules/@alanszp/logger/node_modules/@types/node/stream/promises.d.ts +0 -83
  759. package/node_modules/@alanszp/logger/node_modules/@types/node/stream/web.d.ts +0 -366
  760. package/node_modules/@alanszp/logger/node_modules/@types/node/stream.d.ts +0 -1701
  761. package/node_modules/@alanszp/logger/node_modules/@types/node/string_decoder.d.ts +0 -67
  762. package/node_modules/@alanszp/logger/node_modules/@types/node/test.d.ts +0 -1465
  763. package/node_modules/@alanszp/logger/node_modules/@types/node/timers/promises.d.ts +0 -93
  764. package/node_modules/@alanszp/logger/node_modules/@types/node/timers.d.ts +0 -240
  765. package/node_modules/@alanszp/logger/node_modules/@types/node/tls.d.ts +0 -1210
  766. package/node_modules/@alanszp/logger/node_modules/@types/node/trace_events.d.ts +0 -182
  767. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
  768. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
  769. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
  770. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2362
  771. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
  772. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
  773. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/console.d.ts +0 -415
  774. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
  775. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4487
  776. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/dgram.d.ts +0 -596
  777. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -545
  778. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
  779. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
  780. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
  781. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
  782. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/events.d.ts +0 -879
  783. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1239
  784. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/fs.d.ts +0 -4311
  785. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/globals.d.ts +0 -411
  786. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
  787. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/http.d.ts +0 -1887
  788. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
  789. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/https.d.ts +0 -550
  790. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/index.d.ts +0 -88
  791. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
  792. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/module.d.ts +0 -315
  793. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/net.d.ts +0 -949
  794. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/os.d.ts +0 -478
  795. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/path.d.ts +0 -191
  796. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -645
  797. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/process.d.ts +0 -1561
  798. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
  799. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
  800. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
  801. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
  802. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
  803. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
  804. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
  805. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -366
  806. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
  807. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
  808. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/test.d.ts +0 -1465
  809. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
  810. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
  811. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
  812. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
  813. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
  814. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/url.d.ts +0 -927
  815. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/util.d.ts +0 -2183
  816. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/v8.d.ts +0 -764
  817. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/vm.d.ts +0 -903
  818. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/wasi.d.ts +0 -179
  819. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
  820. package/node_modules/@alanszp/logger/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
  821. package/node_modules/@alanszp/logger/node_modules/@types/node/tty.d.ts +0 -208
  822. package/node_modules/@alanszp/logger/node_modules/@types/node/url.d.ts +0 -927
  823. package/node_modules/@alanszp/logger/node_modules/@types/node/util.d.ts +0 -2183
  824. package/node_modules/@alanszp/logger/node_modules/@types/node/v8.d.ts +0 -764
  825. package/node_modules/@alanszp/logger/node_modules/@types/node/vm.d.ts +0 -903
  826. package/node_modules/@alanszp/logger/node_modules/@types/node/wasi.d.ts +0 -179
  827. package/node_modules/@alanszp/logger/node_modules/@types/node/worker_threads.d.ts +0 -691
  828. package/node_modules/@alanszp/logger/node_modules/@types/node/zlib.d.ts +0 -517
  829. package/node_modules/@alanszp/logger/package.json +0 -35
  830. package/node_modules/@alanszp/logger/src/config.ts +0 -34
  831. package/node_modules/@alanszp/logger/src/factory.ts +0 -68
  832. package/node_modules/@alanszp/logger/src/index.ts +0 -5
  833. package/node_modules/@alanszp/logger/src/interfaces.ts +0 -26
  834. package/node_modules/@alanszp/logger/src/logger.ts +0 -54
  835. package/node_modules/@alanszp/logger/src/mock.ts +0 -35
  836. package/node_modules/@alanszp/logger/src/serializer.ts +0 -65
  837. package/node_modules/@alanszp/logger/src/slackBunyan.ts +0 -133
  838. package/node_modules/@alanszp/logger/tsconfig.json +0 -15
  839. package/node_modules/@types/node/LICENSE +0 -21
  840. package/node_modules/@types/node/README.md +0 -15
  841. package/node_modules/@types/node/assert/strict.d.ts +0 -8
  842. package/node_modules/@types/node/assert.d.ts +0 -996
  843. package/node_modules/@types/node/async_hooks.d.ts +0 -539
  844. package/node_modules/@types/node/buffer.d.ts +0 -2362
  845. package/node_modules/@types/node/child_process.d.ts +0 -1540
  846. package/node_modules/@types/node/cluster.d.ts +0 -432
  847. package/node_modules/@types/node/console.d.ts +0 -415
  848. package/node_modules/@types/node/constants.d.ts +0 -19
  849. package/node_modules/@types/node/crypto.d.ts +0 -4487
  850. package/node_modules/@types/node/dgram.d.ts +0 -596
  851. package/node_modules/@types/node/diagnostics_channel.d.ts +0 -545
  852. package/node_modules/@types/node/dns/promises.d.ts +0 -425
  853. package/node_modules/@types/node/dns.d.ts +0 -809
  854. package/node_modules/@types/node/dom-events.d.ts +0 -122
  855. package/node_modules/@types/node/domain.d.ts +0 -170
  856. package/node_modules/@types/node/events.d.ts +0 -879
  857. package/node_modules/@types/node/fs/promises.d.ts +0 -1239
  858. package/node_modules/@types/node/fs.d.ts +0 -4311
  859. package/node_modules/@types/node/globals.d.ts +0 -411
  860. package/node_modules/@types/node/globals.global.d.ts +0 -1
  861. package/node_modules/@types/node/http.d.ts +0 -1887
  862. package/node_modules/@types/node/http2.d.ts +0 -2382
  863. package/node_modules/@types/node/https.d.ts +0 -550
  864. package/node_modules/@types/node/index.d.ts +0 -88
  865. package/node_modules/@types/node/inspector.d.ts +0 -2747
  866. package/node_modules/@types/node/module.d.ts +0 -315
  867. package/node_modules/@types/node/net.d.ts +0 -949
  868. package/node_modules/@types/node/os.d.ts +0 -478
  869. package/node_modules/@types/node/package.json +0 -229
  870. package/node_modules/@types/node/path.d.ts +0 -191
  871. package/node_modules/@types/node/perf_hooks.d.ts +0 -645
  872. package/node_modules/@types/node/process.d.ts +0 -1561
  873. package/node_modules/@types/node/punycode.d.ts +0 -117
  874. package/node_modules/@types/node/querystring.d.ts +0 -141
  875. package/node_modules/@types/node/readline/promises.d.ts +0 -150
  876. package/node_modules/@types/node/readline.d.ts +0 -539
  877. package/node_modules/@types/node/repl.d.ts +0 -430
  878. package/node_modules/@types/node/stream/consumers.d.ts +0 -12
  879. package/node_modules/@types/node/stream/promises.d.ts +0 -83
  880. package/node_modules/@types/node/stream/web.d.ts +0 -366
  881. package/node_modules/@types/node/stream.d.ts +0 -1701
  882. package/node_modules/@types/node/string_decoder.d.ts +0 -67
  883. package/node_modules/@types/node/test.d.ts +0 -1465
  884. package/node_modules/@types/node/timers/promises.d.ts +0 -93
  885. package/node_modules/@types/node/timers.d.ts +0 -240
  886. package/node_modules/@types/node/tls.d.ts +0 -1210
  887. package/node_modules/@types/node/trace_events.d.ts +0 -182
  888. package/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
  889. package/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
  890. package/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
  891. package/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2362
  892. package/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
  893. package/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
  894. package/node_modules/@types/node/ts4.8/console.d.ts +0 -415
  895. package/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
  896. package/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4487
  897. package/node_modules/@types/node/ts4.8/dgram.d.ts +0 -596
  898. package/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -545
  899. package/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
  900. package/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
  901. package/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
  902. package/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
  903. package/node_modules/@types/node/ts4.8/events.d.ts +0 -879
  904. package/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1239
  905. package/node_modules/@types/node/ts4.8/fs.d.ts +0 -4311
  906. package/node_modules/@types/node/ts4.8/globals.d.ts +0 -411
  907. package/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
  908. package/node_modules/@types/node/ts4.8/http.d.ts +0 -1887
  909. package/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
  910. package/node_modules/@types/node/ts4.8/https.d.ts +0 -550
  911. package/node_modules/@types/node/ts4.8/index.d.ts +0 -88
  912. package/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
  913. package/node_modules/@types/node/ts4.8/module.d.ts +0 -315
  914. package/node_modules/@types/node/ts4.8/net.d.ts +0 -949
  915. package/node_modules/@types/node/ts4.8/os.d.ts +0 -478
  916. package/node_modules/@types/node/ts4.8/path.d.ts +0 -191
  917. package/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -645
  918. package/node_modules/@types/node/ts4.8/process.d.ts +0 -1561
  919. package/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
  920. package/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
  921. package/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
  922. package/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
  923. package/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
  924. package/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
  925. package/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
  926. package/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -366
  927. package/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
  928. package/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
  929. package/node_modules/@types/node/ts4.8/test.d.ts +0 -1465
  930. package/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
  931. package/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
  932. package/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
  933. package/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
  934. package/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
  935. package/node_modules/@types/node/ts4.8/url.d.ts +0 -927
  936. package/node_modules/@types/node/ts4.8/util.d.ts +0 -2183
  937. package/node_modules/@types/node/ts4.8/v8.d.ts +0 -764
  938. package/node_modules/@types/node/ts4.8/vm.d.ts +0 -903
  939. package/node_modules/@types/node/ts4.8/wasi.d.ts +0 -179
  940. package/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
  941. package/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
  942. package/node_modules/@types/node/tty.d.ts +0 -208
  943. package/node_modules/@types/node/url.d.ts +0 -927
  944. package/node_modules/@types/node/util.d.ts +0 -2183
  945. package/node_modules/@types/node/v8.d.ts +0 -764
  946. package/node_modules/@types/node/vm.d.ts +0 -903
  947. package/node_modules/@types/node/wasi.d.ts +0 -179
  948. package/node_modules/@types/node/worker_threads.d.ts +0 -691
  949. package/node_modules/@types/node/zlib.d.ts +0 -517
  950. package/src/commonErrorsHandler.ts +0 -105
  951. package/src/index.ts +0 -1
@@ -1,1465 +0,0 @@
1
- /**
2
- * The `node:test` module facilitates the creation of JavaScript tests.
3
- * To access it:
4
- *
5
- * ```js
6
- * import test from 'node:test';
7
- * ```
8
- *
9
- * This module is only available under the `node:` scheme. The following will not
10
- * work:
11
- *
12
- * ```js
13
- * import test from 'test';
14
- * ```
15
- *
16
- * Tests created via the `test` module consist of a single function that is
17
- * processed in one of three ways:
18
- *
19
- * 1. A synchronous function that is considered failing if it throws an exception,
20
- * and is considered passing otherwise.
21
- * 2. A function that returns a `Promise` that is considered failing if the`Promise` rejects, and is considered passing if the `Promise` fulfills.
22
- * 3. A function that receives a callback function. If the callback receives any
23
- * truthy value as its first argument, the test is considered failing. If a
24
- * falsy value is passed as the first argument to the callback, the test is
25
- * considered passing. If the test function receives a callback function and
26
- * also returns a `Promise`, the test will fail.
27
- *
28
- * The following example illustrates how tests are written using the`test` module.
29
- *
30
- * ```js
31
- * test('synchronous passing test', (t) => {
32
- * // This test passes because it does not throw an exception.
33
- * assert.strictEqual(1, 1);
34
- * });
35
- *
36
- * test('synchronous failing test', (t) => {
37
- * // This test fails because it throws an exception.
38
- * assert.strictEqual(1, 2);
39
- * });
40
- *
41
- * test('asynchronous passing test', async (t) => {
42
- * // This test passes because the Promise returned by the async
43
- * // function is settled and not rejected.
44
- * assert.strictEqual(1, 1);
45
- * });
46
- *
47
- * test('asynchronous failing test', async (t) => {
48
- * // This test fails because the Promise returned by the async
49
- * // function is rejected.
50
- * assert.strictEqual(1, 2);
51
- * });
52
- *
53
- * test('failing test using Promises', (t) => {
54
- * // Promises can be used directly as well.
55
- * return new Promise((resolve, reject) => {
56
- * setImmediate(() => {
57
- * reject(new Error('this will cause the test to fail'));
58
- * });
59
- * });
60
- * });
61
- *
62
- * test('callback passing test', (t, done) => {
63
- * // done() is the callback function. When the setImmediate() runs, it invokes
64
- * // done() with no arguments.
65
- * setImmediate(done);
66
- * });
67
- *
68
- * test('callback failing test', (t, done) => {
69
- * // When the setImmediate() runs, done() is invoked with an Error object and
70
- * // the test fails.
71
- * setImmediate(() => {
72
- * done(new Error('callback failure'));
73
- * });
74
- * });
75
- * ```
76
- *
77
- * If any tests fail, the process exit code is set to `1`.
78
- * @since v18.0.0, v16.17.0
79
- * @see [source](https://github.com/nodejs/node/blob/v20.4.0/lib/test.js)
80
- */
81
- declare module "node:test" {
82
- import { Readable } from "node:stream";
83
- import { AsyncResource } from "node:async_hooks";
84
- /**
85
- * **Note:**`shard` is used to horizontally parallelize test running across
86
- * machines or processes, ideal for large-scale executions across varied
87
- * environments. It's incompatible with `watch` mode, tailored for rapid
88
- * code iteration by automatically rerunning tests on file changes.
89
- *
90
- * ```js
91
- * import { tap } from 'node:test/reporters';
92
- * import { run } from 'node:test';
93
- * import process from 'node:process';
94
- * import path from 'node:path';
95
- *
96
- * run({ files: [path.resolve('./tests/test.js')] })
97
- * .compose(tap)
98
- * .pipe(process.stdout);
99
- * ```
100
- * @since v18.9.0, v16.19.0
101
- * @param options Configuration options for running tests. The following properties are supported:
102
- */
103
- function run(options?: RunOptions): TestsStream;
104
- /**
105
- * The `test()` function is the value imported from the `test` module. Each
106
- * invocation of this function results in reporting the test to the `TestsStream`.
107
- *
108
- * The `TestContext` object passed to the `fn` argument can be used to perform
109
- * actions related to the current test. Examples include skipping the test, adding
110
- * additional diagnostic information, or creating subtests.
111
- *
112
- * `test()` returns a `Promise` that fulfills once the test completes.
113
- * if `test()` is called within a `describe()` block, it fulfills immediately.
114
- * The return value can usually be discarded for top level tests.
115
- * However, the return value from subtests should be used to prevent the parent
116
- * test from finishing first and cancelling the subtest
117
- * as shown in the following example.
118
- *
119
- * ```js
120
- * test('top level test', async (t) => {
121
- * // The setTimeout() in the following subtest would cause it to outlive its
122
- * // parent test if 'await' is removed on the next line. Once the parent test
123
- * // completes, it will cancel any outstanding subtests.
124
- * await t.test('longer running subtest', async (t) => {
125
- * return new Promise((resolve, reject) => {
126
- * setTimeout(resolve, 1000);
127
- * });
128
- * });
129
- * });
130
- * ```
131
- *
132
- * The `timeout` option can be used to fail the test if it takes longer than`timeout` milliseconds to complete. However, it is not a reliable mechanism for
133
- * canceling tests because a running test might block the application thread and
134
- * thus prevent the scheduled cancellation.
135
- * @since v18.0.0, v16.17.0
136
- * @param [name='The name'] The name of the test, which is displayed when reporting test results.
137
- * @param options Configuration options for the test. The following properties are supported:
138
- * @param [fn='A no-op function'] The function under test. The first argument to this function is a {@link TestContext} object. If the test uses callbacks, the callback function is passed as the
139
- * second argument.
140
- * @return Fulfilled with `undefined` once the test completes, or immediately if the test runs within {@link describe}.
141
- */
142
- function test(name?: string, fn?: TestFn): Promise<void>;
143
- function test(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
144
- function test(options?: TestOptions, fn?: TestFn): Promise<void>;
145
- function test(fn?: TestFn): Promise<void>;
146
- namespace test {
147
- export { after, afterEach, before, beforeEach, describe, it, mock, only, run, skip, test, todo };
148
- }
149
- /**
150
- * The `describe()` function imported from the `node:test` module. Each
151
- * invocation of this function results in the creation of a Subtest.
152
- * After invocation of top level `describe` functions,
153
- * all top level tests and suites will execute.
154
- * @param [name='The name'] The name of the suite, which is displayed when reporting test results.
155
- * @param options Configuration options for the suite. supports the same options as `test([name][, options][, fn])`.
156
- * @param [fn='A no-op function'] The function under suite declaring all subtests and subsuites. The first argument to this function is a {@link SuiteContext} object.
157
- * @return Immediately fulfilled with `undefined`.
158
- */
159
- function describe(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
160
- function describe(name?: string, fn?: SuiteFn): Promise<void>;
161
- function describe(options?: TestOptions, fn?: SuiteFn): Promise<void>;
162
- function describe(fn?: SuiteFn): Promise<void>;
163
- namespace describe {
164
- /**
165
- * Shorthand for skipping a suite, same as `describe([name], { skip: true }[, fn])`.
166
- */
167
- function skip(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
168
- function skip(name?: string, fn?: SuiteFn): Promise<void>;
169
- function skip(options?: TestOptions, fn?: SuiteFn): Promise<void>;
170
- function skip(fn?: SuiteFn): Promise<void>;
171
- /**
172
- * Shorthand for marking a suite as `TODO`, same as `describe([name], { todo: true }[, fn])`.
173
- */
174
- function todo(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
175
- function todo(name?: string, fn?: SuiteFn): Promise<void>;
176
- function todo(options?: TestOptions, fn?: SuiteFn): Promise<void>;
177
- function todo(fn?: SuiteFn): Promise<void>;
178
- /**
179
- * Shorthand for marking a suite as `only`, same as `describe([name], { only: true }[, fn])`.
180
- * @since v18.15.0
181
- */
182
- function only(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
183
- function only(name?: string, fn?: SuiteFn): Promise<void>;
184
- function only(options?: TestOptions, fn?: SuiteFn): Promise<void>;
185
- function only(fn?: SuiteFn): Promise<void>;
186
- }
187
- /**
188
- * Shorthand for `test()`.
189
- *
190
- * The `it()` function is imported from the `node:test` module.
191
- * @since v18.6.0, v16.17.0
192
- */
193
- function it(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
194
- function it(name?: string, fn?: TestFn): Promise<void>;
195
- function it(options?: TestOptions, fn?: TestFn): Promise<void>;
196
- function it(fn?: TestFn): Promise<void>;
197
- namespace it {
198
- /**
199
- * Shorthand for skipping a test, same as `it([name], { skip: true }[, fn])`.
200
- */
201
- function skip(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
202
- function skip(name?: string, fn?: TestFn): Promise<void>;
203
- function skip(options?: TestOptions, fn?: TestFn): Promise<void>;
204
- function skip(fn?: TestFn): Promise<void>;
205
- /**
206
- * Shorthand for marking a test as `TODO`, same as `it([name], { todo: true }[, fn])`.
207
- */
208
- function todo(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
209
- function todo(name?: string, fn?: TestFn): Promise<void>;
210
- function todo(options?: TestOptions, fn?: TestFn): Promise<void>;
211
- function todo(fn?: TestFn): Promise<void>;
212
- /**
213
- * Shorthand for marking a test as `only`, same as `it([name], { only: true }[, fn])`.
214
- * @since v18.15.0
215
- */
216
- function only(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
217
- function only(name?: string, fn?: TestFn): Promise<void>;
218
- function only(options?: TestOptions, fn?: TestFn): Promise<void>;
219
- function only(fn?: TestFn): Promise<void>;
220
- }
221
- /**
222
- * Shorthand for skipping a test, same as `test([name], { skip: true }[, fn])`.
223
- * @since v20.2.0
224
- */
225
- function skip(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
226
- function skip(name?: string, fn?: TestFn): Promise<void>;
227
- function skip(options?: TestOptions, fn?: TestFn): Promise<void>;
228
- function skip(fn?: TestFn): Promise<void>;
229
- /**
230
- * Shorthand for marking a test as `TODO`, same as `test([name], { todo: true }[, fn])`.
231
- * @since v20.2.0
232
- */
233
- function todo(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
234
- function todo(name?: string, fn?: TestFn): Promise<void>;
235
- function todo(options?: TestOptions, fn?: TestFn): Promise<void>;
236
- function todo(fn?: TestFn): Promise<void>;
237
- /**
238
- * Shorthand for marking a test as `only`, same as `test([name], { only: true }[, fn])`.
239
- * @since v20.2.0
240
- */
241
- function only(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
242
- function only(name?: string, fn?: TestFn): Promise<void>;
243
- function only(options?: TestOptions, fn?: TestFn): Promise<void>;
244
- function only(fn?: TestFn): Promise<void>;
245
- /**
246
- * The type of a function under test. The first argument to this function is a
247
- * {@link TestContext} object. If the test uses callbacks, the callback function is passed as
248
- * the second argument.
249
- */
250
- type TestFn = (t: TestContext, done: (result?: any) => void) => void | Promise<void>;
251
- /**
252
- * The type of a function under Suite.
253
- */
254
- type SuiteFn = (s: SuiteContext) => void | Promise<void>;
255
- interface TestShard {
256
- /**
257
- * A positive integer between 1 and `<total>` that specifies the index of the shard to run.
258
- */
259
- index: number;
260
- /**
261
- * A positive integer that specifies the total number of shards to split the test files to.
262
- */
263
- total: number;
264
- }
265
- interface RunOptions {
266
- /**
267
- * If a number is provided, then that many files would run in parallel.
268
- * If truthy, it would run (number of cpu cores - 1) files in parallel.
269
- * If falsy, it would only run one file at a time.
270
- * If unspecified, subtests inherit this value from their parent.
271
- * @default true
272
- */
273
- concurrency?: number | boolean | undefined;
274
- /**
275
- * An array containing the list of files to run.
276
- * If unspecified, the test runner execution model will be used.
277
- */
278
- files?: readonly string[] | undefined;
279
- /**
280
- * Allows aborting an in-progress test execution.
281
- * @default undefined
282
- */
283
- signal?: AbortSignal | undefined;
284
- /**
285
- * A number of milliseconds the test will fail after.
286
- * If unspecified, subtests inherit this value from their parent.
287
- * @default Infinity
288
- */
289
- timeout?: number | undefined;
290
- /**
291
- * Sets inspector port of test child process.
292
- * If a nullish value is provided, each process gets its own port,
293
- * incremented from the primary's `process.debugPort`.
294
- */
295
- inspectPort?: number | (() => number) | undefined;
296
- /**
297
- * That can be used to only run tests whose name matches the provided pattern.
298
- * Test name patterns are interpreted as JavaScript regular expressions.
299
- * For each test that is executed, any corresponding test hooks, such as `beforeEach()`, are also run.
300
- */
301
- testNamePatterns?: string | RegExp | string[] | RegExp[];
302
- /**
303
- * If truthy, the test context will only run tests that have the `only` option set
304
- */
305
- only?: boolean;
306
- /**
307
- * A function that accepts the TestsStream instance and can be used to setup listeners before any tests are run.
308
- */
309
- setup?: (root: Test) => void | Promise<void>;
310
- /**
311
- * Whether to run in watch mode or not.
312
- * @default false
313
- */
314
- watch?: boolean | undefined;
315
- /**
316
- * Running tests in a specific shard.
317
- * @default undefined
318
- */
319
- shard?: TestShard | undefined;
320
- }
321
- class Test extends AsyncResource {
322
- concurrency: number;
323
- nesting: number;
324
- only: boolean;
325
- reporter: TestsStream;
326
- runOnlySubtests: boolean;
327
- testNumber: number;
328
- timeout: number | null;
329
- }
330
- /**
331
- * A successful call to `run()` method will return a new `TestsStream` object, streaming a series of events representing the execution of the tests.`TestsStream` will emit events, in the
332
- * order of the tests definition
333
- * @since v18.9.0, v16.19.0
334
- */
335
- class TestsStream extends Readable implements NodeJS.ReadableStream {
336
- addListener(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this;
337
- addListener(event: "test:fail", listener: (data: TestFail) => void): this;
338
- addListener(event: "test:pass", listener: (data: TestPass) => void): this;
339
- addListener(event: "test:plan", listener: (data: TestPlan) => void): this;
340
- addListener(event: "test:start", listener: (data: TestStart) => void): this;
341
- addListener(event: "test:stderr", listener: (data: TestStderr) => void): this;
342
- addListener(event: "test:stdout", listener: (data: TestStdout) => void): this;
343
- addListener(event: string, listener: (...args: any[]) => void): this;
344
- emit(event: "test:diagnostic", data: DiagnosticData): boolean;
345
- emit(event: "test:fail", data: TestFail): boolean;
346
- emit(event: "test:pass", data: TestPass): boolean;
347
- emit(event: "test:plan", data: TestPlan): boolean;
348
- emit(event: "test:start", data: TestStart): boolean;
349
- emit(event: "test:stderr", data: TestStderr): boolean;
350
- emit(event: "test:stdout", data: TestStdout): boolean;
351
- emit(event: string | symbol, ...args: any[]): boolean;
352
- on(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this;
353
- on(event: "test:fail", listener: (data: TestFail) => void): this;
354
- on(event: "test:pass", listener: (data: TestPass) => void): this;
355
- on(event: "test:plan", listener: (data: TestPlan) => void): this;
356
- on(event: "test:start", listener: (data: TestStart) => void): this;
357
- on(event: "test:stderr", listener: (data: TestStderr) => void): this;
358
- on(event: "test:stdout", listener: (data: TestStdout) => void): this;
359
- on(event: string, listener: (...args: any[]) => void): this;
360
- once(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this;
361
- once(event: "test:fail", listener: (data: TestFail) => void): this;
362
- once(event: "test:pass", listener: (data: TestPass) => void): this;
363
- once(event: "test:plan", listener: (data: TestPlan) => void): this;
364
- once(event: "test:start", listener: (data: TestStart) => void): this;
365
- once(event: "test:stderr", listener: (data: TestStderr) => void): this;
366
- once(event: "test:stdout", listener: (data: TestStdout) => void): this;
367
- once(event: string, listener: (...args: any[]) => void): this;
368
- prependListener(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this;
369
- prependListener(event: "test:fail", listener: (data: TestFail) => void): this;
370
- prependListener(event: "test:pass", listener: (data: TestPass) => void): this;
371
- prependListener(event: "test:plan", listener: (data: TestPlan) => void): this;
372
- prependListener(event: "test:start", listener: (data: TestStart) => void): this;
373
- prependListener(event: "test:stderr", listener: (data: TestStderr) => void): this;
374
- prependListener(event: "test:stdout", listener: (data: TestStdout) => void): this;
375
- prependListener(event: string, listener: (...args: any[]) => void): this;
376
- prependOnceListener(event: "test:diagnostic", listener: (data: DiagnosticData) => void): this;
377
- prependOnceListener(event: "test:fail", listener: (data: TestFail) => void): this;
378
- prependOnceListener(event: "test:pass", listener: (data: TestPass) => void): this;
379
- prependOnceListener(event: "test:plan", listener: (data: TestPlan) => void): this;
380
- prependOnceListener(event: "test:start", listener: (data: TestStart) => void): this;
381
- prependOnceListener(event: "test:stderr", listener: (data: TestStderr) => void): this;
382
- prependOnceListener(event: "test:stdout", listener: (data: TestStdout) => void): this;
383
- prependOnceListener(event: string, listener: (...args: any[]) => void): this;
384
- }
385
- /**
386
- * An instance of `TestContext` is passed to each test function in order to
387
- * interact with the test runner. However, the `TestContext` constructor is not
388
- * exposed as part of the API.
389
- * @since v18.0.0, v16.17.0
390
- */
391
- class TestContext {
392
- /**
393
- * This function is used to create a hook running before subtest of the current test.
394
- * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
395
- * the second argument. Default: A no-op function.
396
- * @param options Configuration options for the hook.
397
- * @since v20.1.0
398
- */
399
- before: typeof before;
400
- /**
401
- * This function is used to create a hook running before each subtest of the current test.
402
- * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
403
- * the second argument. Default: A no-op function.
404
- * @param options Configuration options for the hook.
405
- * @since v18.8.0
406
- */
407
- beforeEach: typeof beforeEach;
408
- /**
409
- * This function is used to create a hook that runs after the current test finishes.
410
- * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
411
- * the second argument. Default: A no-op function.
412
- * @param options Configuration options for the hook.
413
- * @since v18.13.0
414
- */
415
- after: typeof after;
416
- /**
417
- * This function is used to create a hook running after each subtest of the current test.
418
- * @param fn The hook function. If the hook uses callbacks, the callback function is passed as
419
- * the second argument. Default: A no-op function.
420
- * @param options Configuration options for the hook.
421
- * @since v18.8.0
422
- */
423
- afterEach: typeof afterEach;
424
- /**
425
- * This function is used to write diagnostics to the output. Any diagnostic
426
- * information is included at the end of the test's results. This function does
427
- * not return a value.
428
- *
429
- * ```js
430
- * test('top level test', (t) => {
431
- * t.diagnostic('A diagnostic message');
432
- * });
433
- * ```
434
- * @since v18.0.0, v16.17.0
435
- * @param message Message to be reported.
436
- */
437
- diagnostic(message: string): void;
438
- /**
439
- * The name of the test.
440
- * @since v18.8.0, v16.18.0
441
- */
442
- readonly name: string;
443
- /**
444
- * If `shouldRunOnlyTests` is truthy, the test context will only run tests that
445
- * have the `only` option set. Otherwise, all tests are run. If Node.js was not
446
- * started with the `--test-only` command-line option, this function is a
447
- * no-op.
448
- *
449
- * ```js
450
- * test('top level test', (t) => {
451
- * // The test context can be set to run subtests with the 'only' option.
452
- * t.runOnly(true);
453
- * return Promise.all([
454
- * t.test('this subtest is now skipped'),
455
- * t.test('this subtest is run', { only: true }),
456
- * ]);
457
- * });
458
- * ```
459
- * @since v18.0.0, v16.17.0
460
- * @param shouldRunOnlyTests Whether or not to run `only` tests.
461
- */
462
- runOnly(shouldRunOnlyTests: boolean): void;
463
- /**
464
- * ```js
465
- * test('top level test', async (t) => {
466
- * await fetch('some/uri', { signal: t.signal });
467
- * });
468
- * ```
469
- * @since v18.7.0, v16.17.0
470
- */
471
- readonly signal: AbortSignal;
472
- /**
473
- * This function causes the test's output to indicate the test as skipped. If`message` is provided, it is included in the output. Calling `skip()` does
474
- * not terminate execution of the test function. This function does not return a
475
- * value.
476
- *
477
- * ```js
478
- * test('top level test', (t) => {
479
- * // Make sure to return here as well if the test contains additional logic.
480
- * t.skip('this is skipped');
481
- * });
482
- * ```
483
- * @since v18.0.0, v16.17.0
484
- * @param message Optional skip message.
485
- */
486
- skip(message?: string): void;
487
- /**
488
- * This function adds a `TODO` directive to the test's output. If `message` is
489
- * provided, it is included in the output. Calling `todo()` does not terminate
490
- * execution of the test function. This function does not return a value.
491
- *
492
- * ```js
493
- * test('top level test', (t) => {
494
- * // This test is marked as `TODO`
495
- * t.todo('this is a todo');
496
- * });
497
- * ```
498
- * @since v18.0.0, v16.17.0
499
- * @param message Optional `TODO` message.
500
- */
501
- todo(message?: string): void;
502
- /**
503
- * This function is used to create subtests under the current test. This function behaves in
504
- * the same fashion as the top level {@link test} function.
505
- * @since v18.0.0
506
- * @param name The name of the test, which is displayed when reporting test results.
507
- * Default: The `name` property of fn, or `'<anonymous>'` if `fn` does not have a name.
508
- * @param options Configuration options for the test
509
- * @param fn The function under test. This first argument to this function is a
510
- * {@link TestContext} object. If the test uses callbacks, the callback function is
511
- * passed as the second argument. Default: A no-op function.
512
- * @returns A {@link Promise} resolved with `undefined` once the test completes.
513
- */
514
- test: typeof test;
515
- /**
516
- * Each test provides its own MockTracker instance.
517
- */
518
- readonly mock: MockTracker;
519
- }
520
- /**
521
- * An instance of `SuiteContext` is passed to each suite function in order to
522
- * interact with the test runner. However, the `SuiteContext` constructor is not
523
- * exposed as part of the API.
524
- * @since v18.7.0, v16.17.0
525
- */
526
- class SuiteContext {
527
- /**
528
- * The name of the suite.
529
- * @since v18.8.0, v16.18.0
530
- */
531
- readonly name: string;
532
- /**
533
- * Can be used to abort test subtasks when the test has been aborted.
534
- * @since v18.7.0, v16.17.0
535
- */
536
- readonly signal: AbortSignal;
537
- }
538
- interface TestOptions {
539
- /**
540
- * If a number is provided, then that many tests would run in parallel.
541
- * If truthy, it would run (number of cpu cores - 1) tests in parallel.
542
- * For subtests, it will be `Infinity` tests in parallel.
543
- * If falsy, it would only run one test at a time.
544
- * If unspecified, subtests inherit this value from their parent.
545
- * @default false
546
- */
547
- concurrency?: number | boolean | undefined;
548
- /**
549
- * If truthy, and the test context is configured to run `only` tests, then this test will be
550
- * run. Otherwise, the test is skipped.
551
- * @default false
552
- */
553
- only?: boolean | undefined;
554
- /**
555
- * Allows aborting an in-progress test.
556
- * @since v18.8.0
557
- */
558
- signal?: AbortSignal | undefined;
559
- /**
560
- * If truthy, the test is skipped. If a string is provided, that string is displayed in the
561
- * test results as the reason for skipping the test.
562
- * @default false
563
- */
564
- skip?: boolean | string | undefined;
565
- /**
566
- * A number of milliseconds the test will fail after. If unspecified, subtests inherit this
567
- * value from their parent.
568
- * @default Infinity
569
- * @since v18.7.0
570
- */
571
- timeout?: number | undefined;
572
- /**
573
- * If truthy, the test marked as `TODO`. If a string is provided, that string is displayed in
574
- * the test results as the reason why the test is `TODO`.
575
- * @default false
576
- */
577
- todo?: boolean | string | undefined;
578
- }
579
- /**
580
- * This function is used to create a hook running before running a suite.
581
- *
582
- * ```js
583
- * describe('tests', async () => {
584
- * before(() => console.log('about to run some test'));
585
- * it('is a subtest', () => {
586
- * assert.ok('some relevant assertion here');
587
- * });
588
- * });
589
- * ```
590
- * @since v18.8.0, v16.18.0
591
- * @param [fn='A no-op function'] The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
592
- * @param options Configuration options for the hook. The following properties are supported:
593
- */
594
- function before(fn?: HookFn, options?: HookOptions): void;
595
- /**
596
- * This function is used to create a hook running after running a suite.
597
- *
598
- * ```js
599
- * describe('tests', async () => {
600
- * after(() => console.log('finished running tests'));
601
- * it('is a subtest', () => {
602
- * assert.ok('some relevant assertion here');
603
- * });
604
- * });
605
- * ```
606
- * @since v18.8.0, v16.18.0
607
- * @param [fn='A no-op function'] The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
608
- * @param options Configuration options for the hook. The following properties are supported:
609
- */
610
- function after(fn?: HookFn, options?: HookOptions): void;
611
- /**
612
- * This function is used to create a hook running
613
- * before each subtest of the current suite.
614
- *
615
- * ```js
616
- * describe('tests', async () => {
617
- * beforeEach(() => console.log('about to run a test'));
618
- * it('is a subtest', () => {
619
- * assert.ok('some relevant assertion here');
620
- * });
621
- * });
622
- * ```
623
- * @since v18.8.0, v16.18.0
624
- * @param [fn='A no-op function'] The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
625
- * @param options Configuration options for the hook. The following properties are supported:
626
- */
627
- function beforeEach(fn?: HookFn, options?: HookOptions): void;
628
- /**
629
- * This function is used to create a hook running
630
- * after each subtest of the current test.
631
- *
632
- * ```js
633
- * describe('tests', async () => {
634
- * afterEach(() => console.log('finished running a test'));
635
- * it('is a subtest', () => {
636
- * assert.ok('some relevant assertion here');
637
- * });
638
- * });
639
- * ```
640
- * @since v18.8.0, v16.18.0
641
- * @param [fn='A no-op function'] The hook function. If the hook uses callbacks, the callback function is passed as the second argument.
642
- * @param options Configuration options for the hook. The following properties are supported:
643
- */
644
- function afterEach(fn?: HookFn, options?: HookOptions): void;
645
- /**
646
- * The hook function. If the hook uses callbacks, the callback function is passed as the
647
- * second argument.
648
- */
649
- type HookFn = (s: SuiteContext, done: (result?: any) => void) => any;
650
- /**
651
- * Configuration options for hooks.
652
- * @since v18.8.0
653
- */
654
- interface HookOptions {
655
- /**
656
- * Allows aborting an in-progress hook.
657
- */
658
- signal?: AbortSignal | undefined;
659
- /**
660
- * A number of milliseconds the hook will fail after. If unspecified, subtests inherit this
661
- * value from their parent.
662
- * @default Infinity
663
- */
664
- timeout?: number | undefined;
665
- }
666
- interface MockFunctionOptions {
667
- /**
668
- * The number of times that the mock will use the behavior of `implementation`.
669
- * Once the mock function has been called `times` times,
670
- * it will automatically restore the behavior of `original`.
671
- * This value must be an integer greater than zero.
672
- * @default Infinity
673
- */
674
- times?: number | undefined;
675
- }
676
- interface MockMethodOptions extends MockFunctionOptions {
677
- /**
678
- * If `true`, `object[methodName]` is treated as a getter.
679
- * This option cannot be used with the `setter` option.
680
- */
681
- getter?: boolean | undefined;
682
- /**
683
- * If `true`, `object[methodName]` is treated as a setter.
684
- * This option cannot be used with the `getter` option.
685
- */
686
- setter?: boolean | undefined;
687
- }
688
- type Mock<F extends Function> = F & {
689
- mock: MockFunctionContext<F>;
690
- };
691
- type NoOpFunction = (...args: any[]) => undefined;
692
- type FunctionPropertyNames<T> = {
693
- [K in keyof T]: T[K] extends Function ? K : never;
694
- }[keyof T];
695
- /**
696
- * The `MockTracker` class is used to manage mocking functionality. The test runner
697
- * module provides a top level `mock` export which is a `MockTracker` instance.
698
- * Each test also provides its own `MockTracker` instance via the test context's`mock` property.
699
- * @since v19.1.0, v18.13.0
700
- */
701
- class MockTracker {
702
- /**
703
- * This function is used to create a mock function.
704
- *
705
- * The following example creates a mock function that increments a counter by one
706
- * on each invocation. The `times` option is used to modify the mock behavior such
707
- * that the first two invocations add two to the counter instead of one.
708
- *
709
- * ```js
710
- * test('mocks a counting function', (t) => {
711
- * let cnt = 0;
712
- *
713
- * function addOne() {
714
- * cnt++;
715
- * return cnt;
716
- * }
717
- *
718
- * function addTwo() {
719
- * cnt += 2;
720
- * return cnt;
721
- * }
722
- *
723
- * const fn = t.mock.fn(addOne, addTwo, { times: 2 });
724
- *
725
- * assert.strictEqual(fn(), 2);
726
- * assert.strictEqual(fn(), 4);
727
- * assert.strictEqual(fn(), 5);
728
- * assert.strictEqual(fn(), 6);
729
- * });
730
- * ```
731
- * @since v19.1.0, v18.13.0
732
- * @param [original='A no-op function'] An optional function to create a mock on.
733
- * @param implementation An optional function used as the mock implementation for `original`. This is useful for creating mocks that exhibit one behavior for a specified number of calls and
734
- * then restore the behavior of `original`.
735
- * @param options Optional configuration options for the mock function. The following properties are supported:
736
- * @return The mocked function. The mocked function contains a special `mock` property, which is an instance of {@link MockFunctionContext}, and can be used for inspecting and changing the
737
- * behavior of the mocked function.
738
- */
739
- fn<F extends Function = NoOpFunction>(original?: F, options?: MockFunctionOptions): Mock<F>;
740
- fn<F extends Function = NoOpFunction, Implementation extends Function = F>(
741
- original?: F,
742
- implementation?: Implementation,
743
- options?: MockFunctionOptions,
744
- ): Mock<F | Implementation>;
745
- /**
746
- * This function is used to create a mock on an existing object method. The
747
- * following example demonstrates how a mock is created on an existing object
748
- * method.
749
- *
750
- * ```js
751
- * test('spies on an object method', (t) => {
752
- * const number = {
753
- * value: 5,
754
- * subtract(a) {
755
- * return this.value - a;
756
- * },
757
- * };
758
- *
759
- * t.mock.method(number, 'subtract');
760
- * assert.strictEqual(number.subtract.mock.calls.length, 0);
761
- * assert.strictEqual(number.subtract(3), 2);
762
- * assert.strictEqual(number.subtract.mock.calls.length, 1);
763
- *
764
- * const call = number.subtract.mock.calls[0];
765
- *
766
- * assert.deepStrictEqual(call.arguments, [3]);
767
- * assert.strictEqual(call.result, 2);
768
- * assert.strictEqual(call.error, undefined);
769
- * assert.strictEqual(call.target, undefined);
770
- * assert.strictEqual(call.this, number);
771
- * });
772
- * ```
773
- * @since v19.1.0, v18.13.0
774
- * @param object The object whose method is being mocked.
775
- * @param methodName The identifier of the method on `object` to mock. If `object[methodName]` is not a function, an error is thrown.
776
- * @param implementation An optional function used as the mock implementation for `object[methodName]`.
777
- * @param options Optional configuration options for the mock method. The following properties are supported:
778
- * @return The mocked method. The mocked method contains a special `mock` property, which is an instance of {@link MockFunctionContext}, and can be used for inspecting and changing the
779
- * behavior of the mocked method.
780
- */
781
- method<
782
- MockedObject extends object,
783
- MethodName extends FunctionPropertyNames<MockedObject>,
784
- >(
785
- object: MockedObject,
786
- methodName: MethodName,
787
- options?: MockFunctionOptions,
788
- ): MockedObject[MethodName] extends Function ? Mock<MockedObject[MethodName]>
789
- : never;
790
- method<
791
- MockedObject extends object,
792
- MethodName extends FunctionPropertyNames<MockedObject>,
793
- Implementation extends Function,
794
- >(
795
- object: MockedObject,
796
- methodName: MethodName,
797
- implementation: Implementation,
798
- options?: MockFunctionOptions,
799
- ): MockedObject[MethodName] extends Function ? Mock<MockedObject[MethodName] | Implementation>
800
- : never;
801
- method<MockedObject extends object>(
802
- object: MockedObject,
803
- methodName: keyof MockedObject,
804
- options: MockMethodOptions,
805
- ): Mock<Function>;
806
- method<MockedObject extends object>(
807
- object: MockedObject,
808
- methodName: keyof MockedObject,
809
- implementation: Function,
810
- options: MockMethodOptions,
811
- ): Mock<Function>;
812
-
813
- /**
814
- * This function is syntax sugar for `MockTracker.method` with `options.getter`set to `true`.
815
- * @since v19.3.0, v18.13.0
816
- */
817
- getter<
818
- MockedObject extends object,
819
- MethodName extends keyof MockedObject,
820
- >(
821
- object: MockedObject,
822
- methodName: MethodName,
823
- options?: MockFunctionOptions,
824
- ): Mock<() => MockedObject[MethodName]>;
825
- getter<
826
- MockedObject extends object,
827
- MethodName extends keyof MockedObject,
828
- Implementation extends Function,
829
- >(
830
- object: MockedObject,
831
- methodName: MethodName,
832
- implementation?: Implementation,
833
- options?: MockFunctionOptions,
834
- ): Mock<(() => MockedObject[MethodName]) | Implementation>;
835
- /**
836
- * This function is syntax sugar for `MockTracker.method` with `options.setter`set to `true`.
837
- * @since v19.3.0, v18.13.0
838
- */
839
- setter<
840
- MockedObject extends object,
841
- MethodName extends keyof MockedObject,
842
- >(
843
- object: MockedObject,
844
- methodName: MethodName,
845
- options?: MockFunctionOptions,
846
- ): Mock<(value: MockedObject[MethodName]) => void>;
847
- setter<
848
- MockedObject extends object,
849
- MethodName extends keyof MockedObject,
850
- Implementation extends Function,
851
- >(
852
- object: MockedObject,
853
- methodName: MethodName,
854
- implementation?: Implementation,
855
- options?: MockFunctionOptions,
856
- ): Mock<((value: MockedObject[MethodName]) => void) | Implementation>;
857
- /**
858
- * This function restores the default behavior of all mocks that were previously
859
- * created by this `MockTracker` and disassociates the mocks from the`MockTracker` instance. Once disassociated, the mocks can still be used, but the`MockTracker` instance can no longer be
860
- * used to reset their behavior or
861
- * otherwise interact with them.
862
- *
863
- * After each test completes, this function is called on the test context's`MockTracker`. If the global `MockTracker` is used extensively, calling this
864
- * function manually is recommended.
865
- * @since v19.1.0, v18.13.0
866
- */
867
- reset(): void;
868
- /**
869
- * This function restores the default behavior of all mocks that were previously
870
- * created by this `MockTracker`. Unlike `mock.reset()`, `mock.restoreAll()` does
871
- * not disassociate the mocks from the `MockTracker` instance.
872
- * @since v19.1.0, v18.13.0
873
- */
874
- restoreAll(): void;
875
- timers: MockTimers;
876
- }
877
- const mock: MockTracker;
878
- interface MockFunctionCall<
879
- F extends Function,
880
- ReturnType = F extends (...args: any) => infer T ? T
881
- : F extends abstract new(...args: any) => infer T ? T
882
- : unknown,
883
- Args = F extends (...args: infer Y) => any ? Y
884
- : F extends abstract new(...args: infer Y) => any ? Y
885
- : unknown[],
886
- > {
887
- /**
888
- * An array of the arguments passed to the mock function.
889
- */
890
- arguments: Args;
891
- /**
892
- * If the mocked function threw then this property contains the thrown value.
893
- */
894
- error: unknown | undefined;
895
- /**
896
- * The value returned by the mocked function.
897
- *
898
- * If the mocked function threw, it will be `undefined`.
899
- */
900
- result: ReturnType | undefined;
901
- /**
902
- * An `Error` object whose stack can be used to determine the callsite of the mocked function invocation.
903
- */
904
- stack: Error;
905
- /**
906
- * If the mocked function is a constructor, this field contains the class being constructed.
907
- * Otherwise this will be `undefined`.
908
- */
909
- target: F extends abstract new(...args: any) => any ? F : undefined;
910
- /**
911
- * The mocked function's `this` value.
912
- */
913
- this: unknown;
914
- }
915
- /**
916
- * The `MockFunctionContext` class is used to inspect or manipulate the behavior of
917
- * mocks created via the `MockTracker` APIs.
918
- * @since v19.1.0, v18.13.0
919
- */
920
- class MockFunctionContext<F extends Function> {
921
- /**
922
- * A getter that returns a copy of the internal array used to track calls to the
923
- * mock. Each entry in the array is an object with the following properties.
924
- * @since v19.1.0, v18.13.0
925
- */
926
- readonly calls: Array<MockFunctionCall<F>>;
927
- /**
928
- * This function returns the number of times that this mock has been invoked. This
929
- * function is more efficient than checking `ctx.calls.length` because `ctx.calls`is a getter that creates a copy of the internal call tracking array.
930
- * @since v19.1.0, v18.13.0
931
- * @return The number of times that this mock has been invoked.
932
- */
933
- callCount(): number;
934
- /**
935
- * This function is used to change the behavior of an existing mock.
936
- *
937
- * The following example creates a mock function using `t.mock.fn()`, calls the
938
- * mock function, and then changes the mock implementation to a different function.
939
- *
940
- * ```js
941
- * test('changes a mock behavior', (t) => {
942
- * let cnt = 0;
943
- *
944
- * function addOne() {
945
- * cnt++;
946
- * return cnt;
947
- * }
948
- *
949
- * function addTwo() {
950
- * cnt += 2;
951
- * return cnt;
952
- * }
953
- *
954
- * const fn = t.mock.fn(addOne);
955
- *
956
- * assert.strictEqual(fn(), 1);
957
- * fn.mock.mockImplementation(addTwo);
958
- * assert.strictEqual(fn(), 3);
959
- * assert.strictEqual(fn(), 5);
960
- * });
961
- * ```
962
- * @since v19.1.0, v18.13.0
963
- * @param implementation The function to be used as the mock's new implementation.
964
- */
965
- mockImplementation(implementation: Function): void;
966
- /**
967
- * This function is used to change the behavior of an existing mock for a single
968
- * invocation. Once invocation `onCall` has occurred, the mock will revert to
969
- * whatever behavior it would have used had `mockImplementationOnce()` not been
970
- * called.
971
- *
972
- * The following example creates a mock function using `t.mock.fn()`, calls the
973
- * mock function, changes the mock implementation to a different function for the
974
- * next invocation, and then resumes its previous behavior.
975
- *
976
- * ```js
977
- * test('changes a mock behavior once', (t) => {
978
- * let cnt = 0;
979
- *
980
- * function addOne() {
981
- * cnt++;
982
- * return cnt;
983
- * }
984
- *
985
- * function addTwo() {
986
- * cnt += 2;
987
- * return cnt;
988
- * }
989
- *
990
- * const fn = t.mock.fn(addOne);
991
- *
992
- * assert.strictEqual(fn(), 1);
993
- * fn.mock.mockImplementationOnce(addTwo);
994
- * assert.strictEqual(fn(), 3);
995
- * assert.strictEqual(fn(), 4);
996
- * });
997
- * ```
998
- * @since v19.1.0, v18.13.0
999
- * @param implementation The function to be used as the mock's implementation for the invocation number specified by `onCall`.
1000
- * @param onCall The invocation number that will use `implementation`. If the specified invocation has already occurred then an exception is thrown.
1001
- */
1002
- mockImplementationOnce(implementation: Function, onCall?: number): void;
1003
- /**
1004
- * Resets the call history of the mock function.
1005
- * @since v19.3.0, v18.13.0
1006
- */
1007
- resetCalls(): void;
1008
- /**
1009
- * Resets the implementation of the mock function to its original behavior. The
1010
- * mock can still be used after calling this function.
1011
- * @since v19.1.0, v18.13.0
1012
- */
1013
- restore(): void;
1014
- }
1015
- type Timer = "setInterval" | "setTimeout" | "setImmediate" | "Date";
1016
-
1017
- interface MockTimersOptions {
1018
- apis: Timer[];
1019
- now?: number | Date;
1020
- }
1021
- /**
1022
- * Mocking timers is a technique commonly used in software testing to simulate and
1023
- * control the behavior of timers, such as `setInterval` and `setTimeout`,
1024
- * without actually waiting for the specified time intervals.
1025
- *
1026
- * The MockTimers API also allows for mocking of the `Date` constructor and
1027
- * `setImmediate`/`clearImmediate` functions.
1028
- *
1029
- * The `MockTracker` provides a top-level `timers` export
1030
- * which is a `MockTimers` instance.
1031
- * @since v20.4.0
1032
- * @experimental
1033
- */
1034
- class MockTimers {
1035
- /**
1036
- * Enables timer mocking for the specified timers.
1037
- *
1038
- * **Note:** When you enable mocking for a specific timer, its associated
1039
- * clear function will also be implicitly mocked.
1040
- *
1041
- * **Note:** Mocking `Date` will affect the behavior of the mocked timers
1042
- * as they use the same internal clock.
1043
- *
1044
- * Example usage without setting initial time:
1045
- *
1046
- * ```js
1047
- * import { mock } from 'node:test';
1048
- * mock.timers.enable({ apis: ['setInterval', 'Date'], now: 1234 });
1049
- * ```
1050
- *
1051
- * The above example enables mocking for the `Date` constructor, `setInterval` timer and
1052
- * implicitly mocks the `clearInterval` function. Only the `Date` constructor from `globalThis`,
1053
- * `setInterval` and `clearInterval` functions from `node:timers`,`node:timers/promises`, and `globalThis` will be mocked.
1054
- *
1055
- * Example usage with initial time set
1056
- *
1057
- * ```js
1058
- * import { mock } from 'node:test';
1059
- * mock.timers.enable({ apis: ['Date'], now: 1000 });
1060
- * ```
1061
- *
1062
- * Example usage with initial Date object as time set
1063
- *
1064
- * ```js
1065
- * import { mock } from 'node:test';
1066
- * mock.timers.enable({ apis: ['Date'], now: new Date() });
1067
- * ```
1068
- *
1069
- * Alternatively, if you call `mock.timers.enable()` without any parameters:
1070
- *
1071
- * All timers (`'setInterval'`, `'clearInterval'`, `'Date'`, `'setImmediate'`, `'clearImmediate'`, `'setTimeout'`, and `'clearTimeout'`)
1072
- * will be mocked.
1073
- *
1074
- * The `setInterval`, `clearInterval`, `setTimeout`, and `clearTimeout` functions from `node:timers`, `node:timers/promises`,
1075
- * and `globalThis` will be mocked.
1076
- * The `Date` constructor from `globalThis` will be mocked.
1077
- *
1078
- * If there is no initial epoch set, the initial date will be based on 0 in the Unix epoch. This is `January 1st, 1970, 00:00:00 UTC`. You can set an initial date by passing a now property to the `.enable()` method. This value will be used as the initial date for the mocked Date object. It can either be a positive integer, or another Date object.
1079
- * @since v20.4.0
1080
- */
1081
- enable(options?: MockTimersOptions): void;
1082
- /**
1083
- * You can use the `.setTime()` method to manually move the mocked date to another time. This method only accepts a positive integer.
1084
- * Note: This method will execute any mocked timers that are in the past from the new time.
1085
- * In the below example we are setting a new time for the mocked date.
1086
- * ```js
1087
- * import assert from 'node:assert';
1088
- * import { test } from 'node:test';
1089
- * test('sets the time of a date object', (context) => {
1090
- * // Optionally choose what to mock
1091
- * context.mock.timers.enable({ apis: ['Date'], now: 100 });
1092
- * assert.strictEqual(Date.now(), 100);
1093
- * // Advance in time will also advance the date
1094
- * context.mock.timers.setTime(1000);
1095
- * context.mock.timers.tick(200);
1096
- * assert.strictEqual(Date.now(), 1200);
1097
- * });
1098
- * ```
1099
- */
1100
- setTime(time: number): void;
1101
- /**
1102
- * This function restores the default behavior of all mocks that were previously
1103
- * created by this `MockTimers` instance and disassociates the mocks
1104
- * from the `MockTracker` instance.
1105
- *
1106
- * **Note:** After each test completes, this function is called on
1107
- * the test context's `MockTracker`.
1108
- *
1109
- * ```js
1110
- * import { mock } from 'node:test';
1111
- * mock.timers.reset();
1112
- * ```
1113
- * @since v20.4.0
1114
- */
1115
- reset(): void;
1116
- /**
1117
- * Advances time for all mocked timers.
1118
- *
1119
- * **Note:** This diverges from how `setTimeout` in Node.js behaves and accepts
1120
- * only positive numbers. In Node.js, `setTimeout` with negative numbers is
1121
- * only supported for web compatibility reasons.
1122
- *
1123
- * The following example mocks a `setTimeout` function and
1124
- * by using `.tick` advances in
1125
- * time triggering all pending timers.
1126
- *
1127
- * ```js
1128
- * import assert from 'node:assert';
1129
- * import { test } from 'node:test';
1130
- *
1131
- * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => {
1132
- * const fn = context.mock.fn();
1133
- *
1134
- * context.mock.timers.enable({ apis: ['setTimeout'] });
1135
- *
1136
- * setTimeout(fn, 9999);
1137
- *
1138
- * assert.strictEqual(fn.mock.callCount(), 0);
1139
- *
1140
- * // Advance in time
1141
- * context.mock.timers.tick(9999);
1142
- *
1143
- * assert.strictEqual(fn.mock.callCount(), 1);
1144
- * });
1145
- * ```
1146
- *
1147
- * Alternativelly, the `.tick` function can be called many times
1148
- *
1149
- * ```js
1150
- * import assert from 'node:assert';
1151
- * import { test } from 'node:test';
1152
- *
1153
- * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => {
1154
- * const fn = context.mock.fn();
1155
- * context.mock.timers.enable({ apis: ['setTimeout'] });
1156
- * const nineSecs = 9000;
1157
- * setTimeout(fn, nineSecs);
1158
- *
1159
- * const twoSeconds = 3000;
1160
- * context.mock.timers.tick(twoSeconds);
1161
- * context.mock.timers.tick(twoSeconds);
1162
- * context.mock.timers.tick(twoSeconds);
1163
- *
1164
- * assert.strictEqual(fn.mock.callCount(), 1);
1165
- * });
1166
- * ```
1167
- *
1168
- * Advancing time using `.tick` will also advance the time for any `Date` object
1169
- * created after the mock was enabled (if `Date` was also set to be mocked).
1170
- *
1171
- * ```js
1172
- * import assert from 'node:assert';
1173
- * import { test } from 'node:test';
1174
- *
1175
- * test('mocks setTimeout to be executed synchronously without having to actually wait for it', (context) => {
1176
- * const fn = context.mock.fn();
1177
- *
1178
- * context.mock.timers.enable({ apis: ['setTimeout', 'Date'] });
1179
- * setTimeout(fn, 9999);
1180
- *
1181
- * assert.strictEqual(fn.mock.callCount(), 0);
1182
- * assert.strictEqual(Date.now(), 0);
1183
- *
1184
- * // Advance in time
1185
- * context.mock.timers.tick(9999);
1186
- * assert.strictEqual(fn.mock.callCount(), 1);
1187
- * assert.strictEqual(Date.now(), 9999);
1188
- * });
1189
- * ```
1190
- * @since v20.4.0
1191
- */
1192
- tick(milliseconds: number): void;
1193
- /**
1194
- * Triggers all pending mocked timers immediately. If the `Date` object is also
1195
- * mocked, it will also advance the `Date` object to the furthest timer's time.
1196
- *
1197
- * The example below triggers all pending timers immediately,
1198
- * causing them to execute without any delay.
1199
- *
1200
- * ```js
1201
- * import assert from 'node:assert';
1202
- * import { test } from 'node:test';
1203
- *
1204
- * test('runAll functions following the given order', (context) => {
1205
- * context.mock.timers.enable({ apis: ['setTimeout', 'Date'] });
1206
- * const results = [];
1207
- * setTimeout(() => results.push(1), 9999);
1208
- *
1209
- * // Notice that if both timers have the same timeout,
1210
- * // the order of execution is guaranteed
1211
- * setTimeout(() => results.push(3), 8888);
1212
- * setTimeout(() => results.push(2), 8888);
1213
- *
1214
- * assert.deepStrictEqual(results, []);
1215
- *
1216
- * context.mock.timers.runAll();
1217
- * assert.deepStrictEqual(results, [3, 2, 1]);
1218
- * // The Date object is also advanced to the furthest timer's time
1219
- * assert.strictEqual(Date.now(), 9999);
1220
- * });
1221
- * ```
1222
- *
1223
- * **Note:** The `runAll()` function is specifically designed for
1224
- * triggering timers in the context of timer mocking.
1225
- * It does not have any effect on real-time system
1226
- * clocks or actual timers outside of the mocking environment.
1227
- * @since v20.4.0
1228
- */
1229
- runAll(): void;
1230
- /**
1231
- * Calls {@link MockTimers.reset()}.
1232
- */
1233
- [Symbol.dispose](): void;
1234
- }
1235
- export {
1236
- after,
1237
- afterEach,
1238
- before,
1239
- beforeEach,
1240
- describe,
1241
- it,
1242
- Mock,
1243
- mock,
1244
- only,
1245
- run,
1246
- skip,
1247
- test,
1248
- test as default,
1249
- todo,
1250
- };
1251
- }
1252
-
1253
- interface TestLocationInfo {
1254
- /**
1255
- * The column number where the test is defined, or
1256
- * `undefined` if the test was run through the REPL.
1257
- */
1258
- column?: number;
1259
- /**
1260
- * The path of the test file, `undefined` if test is not ran through a file.
1261
- */
1262
- file?: string;
1263
- /**
1264
- * The line number where the test is defined, or
1265
- * `undefined` if the test was run through the REPL.
1266
- */
1267
- line?: number;
1268
- }
1269
- interface DiagnosticData extends TestLocationInfo {
1270
- /**
1271
- * The diagnostic message.
1272
- */
1273
- message: string;
1274
- /**
1275
- * The nesting level of the test.
1276
- */
1277
- nesting: number;
1278
- }
1279
- interface TestFail extends TestLocationInfo {
1280
- /**
1281
- * Additional execution metadata.
1282
- */
1283
- details: {
1284
- /**
1285
- * The duration of the test in milliseconds.
1286
- */
1287
- duration_ms: number;
1288
- /**
1289
- * The error thrown by the test.
1290
- */
1291
- error: Error;
1292
- /**
1293
- * The type of the test, used to denote whether this is a suite.
1294
- * @since 20.0.0, 19.9.0, 18.17.0
1295
- */
1296
- type?: "suite";
1297
- };
1298
- /**
1299
- * The test name.
1300
- */
1301
- name: string;
1302
- /**
1303
- * The nesting level of the test.
1304
- */
1305
- nesting: number;
1306
- /**
1307
- * The ordinal number of the test.
1308
- */
1309
- testNumber: number;
1310
- /**
1311
- * Present if `context.todo` is called.
1312
- */
1313
- todo?: string | boolean;
1314
- /**
1315
- * Present if `context.skip` is called.
1316
- */
1317
- skip?: string | boolean;
1318
- }
1319
- interface TestPass extends TestLocationInfo {
1320
- /**
1321
- * Additional execution metadata.
1322
- */
1323
- details: {
1324
- /**
1325
- * The duration of the test in milliseconds.
1326
- */
1327
- duration_ms: number;
1328
- /**
1329
- * The type of the test, used to denote whether this is a suite.
1330
- * @since 20.0.0, 19.9.0, 18.17.0
1331
- */
1332
- type?: "suite";
1333
- };
1334
- /**
1335
- * The test name.
1336
- */
1337
- name: string;
1338
- /**
1339
- * The nesting level of the test.
1340
- */
1341
- nesting: number;
1342
- /**
1343
- * The ordinal number of the test.
1344
- */
1345
- testNumber: number;
1346
- /**
1347
- * Present if `context.todo` is called.
1348
- */
1349
- todo?: string | boolean;
1350
- /**
1351
- * Present if `context.skip` is called.
1352
- */
1353
- skip?: string | boolean;
1354
- }
1355
- interface TestPlan extends TestLocationInfo {
1356
- /**
1357
- * The nesting level of the test.
1358
- */
1359
- nesting: number;
1360
- /**
1361
- * The number of subtests that have ran.
1362
- */
1363
- count: number;
1364
- }
1365
- interface TestStart extends TestLocationInfo {
1366
- /**
1367
- * The test name.
1368
- */
1369
- name: string;
1370
- /**
1371
- * The nesting level of the test.
1372
- */
1373
- nesting: number;
1374
- }
1375
- interface TestStderr extends TestLocationInfo {
1376
- /**
1377
- * The message written to `stderr`
1378
- */
1379
- message: string;
1380
- }
1381
- interface TestStdout extends TestLocationInfo {
1382
- /**
1383
- * The message written to `stdout`
1384
- */
1385
- message: string;
1386
- }
1387
- interface TestEnqueue extends TestLocationInfo {
1388
- /**
1389
- * The test name
1390
- */
1391
- name: string;
1392
- /**
1393
- * The nesting level of the test.
1394
- */
1395
- nesting: number;
1396
- }
1397
- interface TestDequeue extends TestLocationInfo {
1398
- /**
1399
- * The test name
1400
- */
1401
- name: string;
1402
- /**
1403
- * The nesting level of the test.
1404
- */
1405
- nesting: number;
1406
- }
1407
-
1408
- /**
1409
- * The `node:test/reporters` module exposes the builtin-reporters for `node:test`.
1410
- * To access it:
1411
- *
1412
- * ```js
1413
- * import test from 'node:test/reporters';
1414
- * ```
1415
- *
1416
- * This module is only available under the `node:` scheme. The following will not
1417
- * work:
1418
- *
1419
- * ```js
1420
- * import test from 'test/reporters';
1421
- * ```
1422
- * @since v19.9.0
1423
- * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/test/reporters.js)
1424
- */
1425
- declare module "node:test/reporters" {
1426
- import { Transform, TransformOptions } from "node:stream";
1427
-
1428
- type TestEvent =
1429
- | { type: "test:diagnostic"; data: DiagnosticData }
1430
- | { type: "test:fail"; data: TestFail }
1431
- | { type: "test:pass"; data: TestPass }
1432
- | { type: "test:plan"; data: TestPlan }
1433
- | { type: "test:start"; data: TestStart }
1434
- | { type: "test:stderr"; data: TestStderr }
1435
- | { type: "test:stdout"; data: TestStdout }
1436
- | { type: "test:enqueue"; data: TestEnqueue }
1437
- | { type: "test:dequeue"; data: TestDequeue }
1438
- | { type: "test:watch:drained" };
1439
- type TestEventGenerator = AsyncGenerator<TestEvent, void>;
1440
-
1441
- /**
1442
- * The `dot` reporter outputs the test results in a compact format,
1443
- * where each passing test is represented by a `.`,
1444
- * and each failing test is represented by a `X`.
1445
- */
1446
- function dot(source: TestEventGenerator): AsyncGenerator<"\n" | "." | "X", void>;
1447
- /**
1448
- * The `tap` reporter outputs the test results in the [TAP](https://testanything.org/) format.
1449
- */
1450
- function tap(source: TestEventGenerator): AsyncGenerator<string, void>;
1451
- /**
1452
- * The `spec` reporter outputs the test results in a human-readable format.
1453
- */
1454
- class Spec extends Transform {
1455
- constructor();
1456
- }
1457
- /**
1458
- * The `junit` reporter outputs test results in a jUnit XML format
1459
- */
1460
- function junit(source: TestEventGenerator): AsyncGenerator<string, void>;
1461
- class Lcov extends Transform {
1462
- constructor(opts?: TransformOptions);
1463
- }
1464
- export { dot, junit, Lcov as lcov, Spec as spec, tap, TestEvent };
1465
- }