omegon 0.6.32 → 0.7.0

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 (591) hide show
  1. package/bin/omegon.mjs +74 -1
  2. package/extensions/00-secrets/index.ts +6 -0
  3. package/extensions/00-splash/index.ts +338 -0
  4. package/extensions/00-splash/logo.ts +194 -0
  5. package/extensions/bootstrap/index.ts +19 -2
  6. package/extensions/effort/index.ts +10 -0
  7. package/extensions/lib/splash-state.ts +25 -0
  8. package/extensions/mcp-bridge/index.ts +5 -0
  9. package/extensions/project-memory/index.ts +10 -0
  10. package/extensions/tool-profile/index.ts +7 -2
  11. package/node_modules/@smithy/core/package.json +2 -2
  12. package/node_modules/@smithy/middleware-endpoint/package.json +3 -3
  13. package/node_modules/@smithy/middleware-retry/package.json +2 -2
  14. package/node_modules/@smithy/middleware-serde/package.json +2 -2
  15. package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +44 -37
  16. package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +38 -31
  17. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +1 -1
  18. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +1 -1
  19. package/node_modules/@smithy/node-http-handler/dist-es/readable.mock.js +1 -1
  20. package/node_modules/@smithy/node-http-handler/dist-es/server.mock.js +6 -6
  21. package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js +1 -1
  22. package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/readable.mock.js +1 -1
  23. package/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +1 -1
  24. package/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts +1 -1
  25. package/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +4 -4
  26. package/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +1 -1
  27. package/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +1 -1
  28. package/node_modules/@smithy/node-http-handler/dist-types/readable.mock.d.ts +2 -2
  29. package/node_modules/@smithy/node-http-handler/dist-types/server.mock.d.ts +3 -3
  30. package/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +1 -1
  31. package/node_modules/@smithy/node-http-handler/dist-types/set-request-timeout.d.ts +1 -1
  32. package/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +1 -1
  33. package/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +1 -1
  34. package/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts +1 -1
  35. package/node_modules/@smithy/node-http-handler/dist-types/stream-collector/readable.mock.d.ts +2 -2
  36. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/get-transformed-headers.d.ts +1 -1
  37. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +4 -4
  38. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +1 -1
  39. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +1 -1
  40. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/readable.mock.d.ts +2 -2
  41. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/server.mock.d.ts +3 -3
  42. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +1 -1
  43. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-request-timeout.d.ts +1 -1
  44. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +1 -1
  45. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +1 -1
  46. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/collector.d.ts +1 -1
  47. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/readable.mock.d.ts +2 -2
  48. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +2 -2
  49. package/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +2 -2
  50. package/node_modules/@smithy/node-http-handler/package.json +1 -1
  51. package/node_modules/@smithy/smithy-client/package.json +4 -4
  52. package/node_modules/@smithy/util-defaults-mode-browser/package.json +2 -2
  53. package/node_modules/@smithy/util-defaults-mode-node/package.json +2 -2
  54. package/node_modules/@smithy/util-stream/package.json +2 -2
  55. package/node_modules/file-type/core.js +86 -9
  56. package/node_modules/file-type/index.js +17 -1
  57. package/node_modules/file-type/package.json +1 -1
  58. package/node_modules/file-type/readme.md +3 -0
  59. package/node_modules/gaxios/build/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  60. package/node_modules/gaxios/build/esm/tsconfig.tsbuildinfo +1 -1
  61. package/node_modules/gaxios/package.json +13 -14
  62. package/node_modules/google-auth-library/package.json +2 -2
  63. package/package.json +5 -5
  64. package/node_modules/@isaacs/cliui/LICENSE.txt +0 -14
  65. package/node_modules/@isaacs/cliui/README.md +0 -143
  66. package/node_modules/@isaacs/cliui/build/index.cjs +0 -317
  67. package/node_modules/@isaacs/cliui/build/index.d.cts +0 -43
  68. package/node_modules/@isaacs/cliui/build/lib/index.js +0 -302
  69. package/node_modules/@isaacs/cliui/index.mjs +0 -14
  70. package/node_modules/@isaacs/cliui/node_modules/ansi-styles/index.d.ts +0 -236
  71. package/node_modules/@isaacs/cliui/node_modules/ansi-styles/index.js +0 -223
  72. package/node_modules/@isaacs/cliui/node_modules/ansi-styles/license +0 -9
  73. package/node_modules/@isaacs/cliui/node_modules/ansi-styles/package.json +0 -54
  74. package/node_modules/@isaacs/cliui/node_modules/ansi-styles/readme.md +0 -173
  75. package/node_modules/@isaacs/cliui/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
  76. package/node_modules/@isaacs/cliui/node_modules/emoji-regex/README.md +0 -137
  77. package/node_modules/@isaacs/cliui/node_modules/emoji-regex/RGI_Emoji.d.ts +0 -5
  78. package/node_modules/@isaacs/cliui/node_modules/emoji-regex/RGI_Emoji.js +0 -6
  79. package/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/RGI_Emoji.d.ts +0 -5
  80. package/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/RGI_Emoji.js +0 -6
  81. package/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/index.d.ts +0 -5
  82. package/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/index.js +0 -6
  83. package/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/text.d.ts +0 -5
  84. package/node_modules/@isaacs/cliui/node_modules/emoji-regex/es2015/text.js +0 -6
  85. package/node_modules/@isaacs/cliui/node_modules/emoji-regex/index.d.ts +0 -5
  86. package/node_modules/@isaacs/cliui/node_modules/emoji-regex/index.js +0 -6
  87. package/node_modules/@isaacs/cliui/node_modules/emoji-regex/package.json +0 -52
  88. package/node_modules/@isaacs/cliui/node_modules/emoji-regex/text.d.ts +0 -5
  89. package/node_modules/@isaacs/cliui/node_modules/emoji-regex/text.js +0 -6
  90. package/node_modules/@isaacs/cliui/node_modules/string-width/index.d.ts +0 -29
  91. package/node_modules/@isaacs/cliui/node_modules/string-width/index.js +0 -54
  92. package/node_modules/@isaacs/cliui/node_modules/string-width/license +0 -9
  93. package/node_modules/@isaacs/cliui/node_modules/string-width/package.json +0 -59
  94. package/node_modules/@isaacs/cliui/node_modules/string-width/readme.md +0 -67
  95. package/node_modules/@isaacs/cliui/node_modules/wrap-ansi/index.d.ts +0 -41
  96. package/node_modules/@isaacs/cliui/node_modules/wrap-ansi/index.js +0 -214
  97. package/node_modules/@isaacs/cliui/node_modules/wrap-ansi/license +0 -9
  98. package/node_modules/@isaacs/cliui/node_modules/wrap-ansi/package.json +0 -69
  99. package/node_modules/@isaacs/cliui/node_modules/wrap-ansi/readme.md +0 -91
  100. package/node_modules/@isaacs/cliui/package.json +0 -86
  101. package/node_modules/@pkgjs/parseargs/.editorconfig +0 -14
  102. package/node_modules/@pkgjs/parseargs/CHANGELOG.md +0 -147
  103. package/node_modules/@pkgjs/parseargs/LICENSE +0 -201
  104. package/node_modules/@pkgjs/parseargs/README.md +0 -413
  105. package/node_modules/@pkgjs/parseargs/examples/is-default-value.js +0 -25
  106. package/node_modules/@pkgjs/parseargs/examples/limit-long-syntax.js +0 -35
  107. package/node_modules/@pkgjs/parseargs/examples/negate.js +0 -43
  108. package/node_modules/@pkgjs/parseargs/examples/no-repeated-options.js +0 -31
  109. package/node_modules/@pkgjs/parseargs/examples/ordered-options.mjs +0 -41
  110. package/node_modules/@pkgjs/parseargs/examples/simple-hard-coded.js +0 -26
  111. package/node_modules/@pkgjs/parseargs/index.js +0 -396
  112. package/node_modules/@pkgjs/parseargs/internal/errors.js +0 -47
  113. package/node_modules/@pkgjs/parseargs/internal/primordials.js +0 -393
  114. package/node_modules/@pkgjs/parseargs/internal/util.js +0 -14
  115. package/node_modules/@pkgjs/parseargs/internal/validators.js +0 -89
  116. package/node_modules/@pkgjs/parseargs/package.json +0 -36
  117. package/node_modules/@pkgjs/parseargs/utils.js +0 -198
  118. package/node_modules/cross-spawn/LICENSE +0 -21
  119. package/node_modules/cross-spawn/README.md +0 -89
  120. package/node_modules/cross-spawn/index.js +0 -39
  121. package/node_modules/cross-spawn/lib/enoent.js +0 -59
  122. package/node_modules/cross-spawn/lib/parse.js +0 -91
  123. package/node_modules/cross-spawn/lib/util/escape.js +0 -47
  124. package/node_modules/cross-spawn/lib/util/readShebang.js +0 -23
  125. package/node_modules/cross-spawn/lib/util/resolveCommand.js +0 -52
  126. package/node_modules/cross-spawn/package.json +0 -73
  127. package/node_modules/eastasianwidth/README.md +0 -32
  128. package/node_modules/eastasianwidth/eastasianwidth.js +0 -311
  129. package/node_modules/eastasianwidth/package.json +0 -18
  130. package/node_modules/foreground-child/LICENSE +0 -15
  131. package/node_modules/foreground-child/README.md +0 -128
  132. package/node_modules/foreground-child/dist/commonjs/all-signals.d.ts +0 -2
  133. package/node_modules/foreground-child/dist/commonjs/all-signals.d.ts.map +0 -1
  134. package/node_modules/foreground-child/dist/commonjs/all-signals.js +0 -58
  135. package/node_modules/foreground-child/dist/commonjs/all-signals.js.map +0 -1
  136. package/node_modules/foreground-child/dist/commonjs/index.d.ts +0 -58
  137. package/node_modules/foreground-child/dist/commonjs/index.d.ts.map +0 -1
  138. package/node_modules/foreground-child/dist/commonjs/index.js +0 -123
  139. package/node_modules/foreground-child/dist/commonjs/index.js.map +0 -1
  140. package/node_modules/foreground-child/dist/commonjs/package.json +0 -3
  141. package/node_modules/foreground-child/dist/commonjs/proxy-signals.d.ts +0 -6
  142. package/node_modules/foreground-child/dist/commonjs/proxy-signals.d.ts.map +0 -1
  143. package/node_modules/foreground-child/dist/commonjs/proxy-signals.js +0 -38
  144. package/node_modules/foreground-child/dist/commonjs/proxy-signals.js.map +0 -1
  145. package/node_modules/foreground-child/dist/commonjs/watchdog.d.ts +0 -10
  146. package/node_modules/foreground-child/dist/commonjs/watchdog.d.ts.map +0 -1
  147. package/node_modules/foreground-child/dist/commonjs/watchdog.js +0 -50
  148. package/node_modules/foreground-child/dist/commonjs/watchdog.js.map +0 -1
  149. package/node_modules/foreground-child/dist/esm/all-signals.d.ts +0 -2
  150. package/node_modules/foreground-child/dist/esm/all-signals.d.ts.map +0 -1
  151. package/node_modules/foreground-child/dist/esm/all-signals.js +0 -52
  152. package/node_modules/foreground-child/dist/esm/all-signals.js.map +0 -1
  153. package/node_modules/foreground-child/dist/esm/index.d.ts +0 -58
  154. package/node_modules/foreground-child/dist/esm/index.d.ts.map +0 -1
  155. package/node_modules/foreground-child/dist/esm/index.js +0 -115
  156. package/node_modules/foreground-child/dist/esm/index.js.map +0 -1
  157. package/node_modules/foreground-child/dist/esm/package.json +0 -3
  158. package/node_modules/foreground-child/dist/esm/proxy-signals.d.ts +0 -6
  159. package/node_modules/foreground-child/dist/esm/proxy-signals.d.ts.map +0 -1
  160. package/node_modules/foreground-child/dist/esm/proxy-signals.js +0 -34
  161. package/node_modules/foreground-child/dist/esm/proxy-signals.js.map +0 -1
  162. package/node_modules/foreground-child/dist/esm/watchdog.d.ts +0 -10
  163. package/node_modules/foreground-child/dist/esm/watchdog.d.ts.map +0 -1
  164. package/node_modules/foreground-child/dist/esm/watchdog.js +0 -46
  165. package/node_modules/foreground-child/dist/esm/watchdog.js.map +0 -1
  166. package/node_modules/foreground-child/node_modules/signal-exit/LICENSE.txt +0 -16
  167. package/node_modules/foreground-child/node_modules/signal-exit/README.md +0 -74
  168. package/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/browser.d.ts +0 -12
  169. package/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/browser.d.ts.map +0 -1
  170. package/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/browser.js +0 -10
  171. package/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/browser.js.map +0 -1
  172. package/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/index.d.ts +0 -48
  173. package/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/index.d.ts.map +0 -1
  174. package/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/index.js +0 -279
  175. package/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/index.js.map +0 -1
  176. package/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/package.json +0 -3
  177. package/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/signals.d.ts +0 -29
  178. package/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/signals.d.ts.map +0 -1
  179. package/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/signals.js +0 -42
  180. package/node_modules/foreground-child/node_modules/signal-exit/dist/cjs/signals.js.map +0 -1
  181. package/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/browser.d.ts +0 -12
  182. package/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/browser.d.ts.map +0 -1
  183. package/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/browser.js +0 -4
  184. package/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/browser.js.map +0 -1
  185. package/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/index.d.ts +0 -48
  186. package/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/index.d.ts.map +0 -1
  187. package/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/index.js +0 -275
  188. package/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/index.js.map +0 -1
  189. package/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/package.json +0 -3
  190. package/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/signals.d.ts +0 -29
  191. package/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/signals.d.ts.map +0 -1
  192. package/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/signals.js +0 -39
  193. package/node_modules/foreground-child/node_modules/signal-exit/dist/mjs/signals.js.map +0 -1
  194. package/node_modules/foreground-child/node_modules/signal-exit/package.json +0 -106
  195. package/node_modules/foreground-child/package.json +0 -106
  196. package/node_modules/isexe/.npmignore +0 -2
  197. package/node_modules/isexe/LICENSE +0 -15
  198. package/node_modules/isexe/README.md +0 -51
  199. package/node_modules/isexe/index.js +0 -57
  200. package/node_modules/isexe/mode.js +0 -41
  201. package/node_modules/isexe/package.json +0 -31
  202. package/node_modules/isexe/test/basic.js +0 -221
  203. package/node_modules/isexe/windows.js +0 -42
  204. package/node_modules/jackspeak/LICENSE.md +0 -55
  205. package/node_modules/jackspeak/README.md +0 -357
  206. package/node_modules/jackspeak/dist/commonjs/index.d.ts +0 -315
  207. package/node_modules/jackspeak/dist/commonjs/index.d.ts.map +0 -1
  208. package/node_modules/jackspeak/dist/commonjs/index.js +0 -1010
  209. package/node_modules/jackspeak/dist/commonjs/index.js.map +0 -1
  210. package/node_modules/jackspeak/dist/commonjs/package.json +0 -3
  211. package/node_modules/jackspeak/dist/commonjs/parse-args-cjs.cjs.map +0 -1
  212. package/node_modules/jackspeak/dist/commonjs/parse-args-cjs.d.cts.map +0 -1
  213. package/node_modules/jackspeak/dist/commonjs/parse-args.d.ts +0 -4
  214. package/node_modules/jackspeak/dist/commonjs/parse-args.js +0 -50
  215. package/node_modules/jackspeak/dist/esm/index.d.ts +0 -315
  216. package/node_modules/jackspeak/dist/esm/index.d.ts.map +0 -1
  217. package/node_modules/jackspeak/dist/esm/index.js +0 -1000
  218. package/node_modules/jackspeak/dist/esm/index.js.map +0 -1
  219. package/node_modules/jackspeak/dist/esm/package.json +0 -3
  220. package/node_modules/jackspeak/dist/esm/parse-args.d.ts +0 -4
  221. package/node_modules/jackspeak/dist/esm/parse-args.d.ts.map +0 -1
  222. package/node_modules/jackspeak/dist/esm/parse-args.js +0 -26
  223. package/node_modules/jackspeak/dist/esm/parse-args.js.map +0 -1
  224. package/node_modules/jackspeak/package.json +0 -95
  225. package/node_modules/package-json-from-dist/LICENSE.md +0 -63
  226. package/node_modules/package-json-from-dist/README.md +0 -110
  227. package/node_modules/package-json-from-dist/dist/commonjs/index.d.ts +0 -89
  228. package/node_modules/package-json-from-dist/dist/commonjs/index.d.ts.map +0 -1
  229. package/node_modules/package-json-from-dist/dist/commonjs/index.js +0 -134
  230. package/node_modules/package-json-from-dist/dist/commonjs/index.js.map +0 -1
  231. package/node_modules/package-json-from-dist/dist/commonjs/package.json +0 -3
  232. package/node_modules/package-json-from-dist/dist/esm/index.d.ts +0 -89
  233. package/node_modules/package-json-from-dist/dist/esm/index.d.ts.map +0 -1
  234. package/node_modules/package-json-from-dist/dist/esm/index.js +0 -129
  235. package/node_modules/package-json-from-dist/dist/esm/index.js.map +0 -1
  236. package/node_modules/package-json-from-dist/dist/esm/package.json +0 -3
  237. package/node_modules/package-json-from-dist/package.json +0 -68
  238. package/node_modules/path-key/index.d.ts +0 -40
  239. package/node_modules/path-key/index.js +0 -16
  240. package/node_modules/path-key/license +0 -9
  241. package/node_modules/path-key/package.json +0 -39
  242. package/node_modules/path-key/readme.md +0 -61
  243. package/node_modules/rimraf/LICENSE +0 -15
  244. package/node_modules/rimraf/README.md +0 -220
  245. package/node_modules/rimraf/dist/commonjs/default-tmp.d.ts +0 -3
  246. package/node_modules/rimraf/dist/commonjs/default-tmp.d.ts.map +0 -1
  247. package/node_modules/rimraf/dist/commonjs/default-tmp.js +0 -61
  248. package/node_modules/rimraf/dist/commonjs/default-tmp.js.map +0 -1
  249. package/node_modules/rimraf/dist/commonjs/fix-eperm.d.ts +0 -3
  250. package/node_modules/rimraf/dist/commonjs/fix-eperm.d.ts.map +0 -1
  251. package/node_modules/rimraf/dist/commonjs/fix-eperm.js +0 -58
  252. package/node_modules/rimraf/dist/commonjs/fix-eperm.js.map +0 -1
  253. package/node_modules/rimraf/dist/commonjs/fs.d.ts +0 -17
  254. package/node_modules/rimraf/dist/commonjs/fs.d.ts.map +0 -1
  255. package/node_modules/rimraf/dist/commonjs/fs.js +0 -46
  256. package/node_modules/rimraf/dist/commonjs/fs.js.map +0 -1
  257. package/node_modules/rimraf/dist/commonjs/ignore-enoent.d.ts +0 -3
  258. package/node_modules/rimraf/dist/commonjs/ignore-enoent.d.ts.map +0 -1
  259. package/node_modules/rimraf/dist/commonjs/ignore-enoent.js +0 -21
  260. package/node_modules/rimraf/dist/commonjs/ignore-enoent.js.map +0 -1
  261. package/node_modules/rimraf/dist/commonjs/index.d.ts +0 -50
  262. package/node_modules/rimraf/dist/commonjs/index.d.ts.map +0 -1
  263. package/node_modules/rimraf/dist/commonjs/index.js +0 -78
  264. package/node_modules/rimraf/dist/commonjs/index.js.map +0 -1
  265. package/node_modules/rimraf/dist/commonjs/opt-arg.d.ts +0 -34
  266. package/node_modules/rimraf/dist/commonjs/opt-arg.d.ts.map +0 -1
  267. package/node_modules/rimraf/dist/commonjs/opt-arg.js +0 -53
  268. package/node_modules/rimraf/dist/commonjs/opt-arg.js.map +0 -1
  269. package/node_modules/rimraf/dist/commonjs/package.json +0 -3
  270. package/node_modules/rimraf/dist/commonjs/path-arg.d.ts +0 -4
  271. package/node_modules/rimraf/dist/commonjs/path-arg.d.ts.map +0 -1
  272. package/node_modules/rimraf/dist/commonjs/path-arg.js +0 -52
  273. package/node_modules/rimraf/dist/commonjs/path-arg.js.map +0 -1
  274. package/node_modules/rimraf/dist/commonjs/platform.d.ts +0 -3
  275. package/node_modules/rimraf/dist/commonjs/platform.d.ts.map +0 -1
  276. package/node_modules/rimraf/dist/commonjs/platform.js +0 -4
  277. package/node_modules/rimraf/dist/commonjs/platform.js.map +0 -1
  278. package/node_modules/rimraf/dist/commonjs/readdir-or-error.d.ts +0 -3
  279. package/node_modules/rimraf/dist/commonjs/readdir-or-error.d.ts.map +0 -1
  280. package/node_modules/rimraf/dist/commonjs/readdir-or-error.js +0 -19
  281. package/node_modules/rimraf/dist/commonjs/readdir-or-error.js.map +0 -1
  282. package/node_modules/rimraf/dist/commonjs/retry-busy.d.ts +0 -8
  283. package/node_modules/rimraf/dist/commonjs/retry-busy.d.ts.map +0 -1
  284. package/node_modules/rimraf/dist/commonjs/retry-busy.js +0 -68
  285. package/node_modules/rimraf/dist/commonjs/retry-busy.js.map +0 -1
  286. package/node_modules/rimraf/dist/commonjs/rimraf-manual.d.ts +0 -3
  287. package/node_modules/rimraf/dist/commonjs/rimraf-manual.d.ts.map +0 -1
  288. package/node_modules/rimraf/dist/commonjs/rimraf-manual.js +0 -12
  289. package/node_modules/rimraf/dist/commonjs/rimraf-manual.js.map +0 -1
  290. package/node_modules/rimraf/dist/commonjs/rimraf-move-remove.d.ts +0 -4
  291. package/node_modules/rimraf/dist/commonjs/rimraf-move-remove.d.ts.map +0 -1
  292. package/node_modules/rimraf/dist/commonjs/rimraf-move-remove.js +0 -192
  293. package/node_modules/rimraf/dist/commonjs/rimraf-move-remove.js.map +0 -1
  294. package/node_modules/rimraf/dist/commonjs/rimraf-native.d.ts +0 -4
  295. package/node_modules/rimraf/dist/commonjs/rimraf-native.d.ts.map +0 -1
  296. package/node_modules/rimraf/dist/commonjs/rimraf-native.js +0 -24
  297. package/node_modules/rimraf/dist/commonjs/rimraf-native.js.map +0 -1
  298. package/node_modules/rimraf/dist/commonjs/rimraf-posix.d.ts +0 -4
  299. package/node_modules/rimraf/dist/commonjs/rimraf-posix.d.ts.map +0 -1
  300. package/node_modules/rimraf/dist/commonjs/rimraf-posix.js +0 -123
  301. package/node_modules/rimraf/dist/commonjs/rimraf-posix.js.map +0 -1
  302. package/node_modules/rimraf/dist/commonjs/rimraf-windows.d.ts +0 -4
  303. package/node_modules/rimraf/dist/commonjs/rimraf-windows.d.ts.map +0 -1
  304. package/node_modules/rimraf/dist/commonjs/rimraf-windows.js +0 -182
  305. package/node_modules/rimraf/dist/commonjs/rimraf-windows.js.map +0 -1
  306. package/node_modules/rimraf/dist/commonjs/use-native.d.ts +0 -4
  307. package/node_modules/rimraf/dist/commonjs/use-native.d.ts.map +0 -1
  308. package/node_modules/rimraf/dist/commonjs/use-native.js +0 -22
  309. package/node_modules/rimraf/dist/commonjs/use-native.js.map +0 -1
  310. package/node_modules/rimraf/dist/esm/bin.d.mts +0 -8
  311. package/node_modules/rimraf/dist/esm/bin.d.mts.map +0 -1
  312. package/node_modules/rimraf/dist/esm/bin.mjs +0 -256
  313. package/node_modules/rimraf/dist/esm/bin.mjs.map +0 -1
  314. package/node_modules/rimraf/dist/esm/default-tmp.d.ts +0 -3
  315. package/node_modules/rimraf/dist/esm/default-tmp.d.ts.map +0 -1
  316. package/node_modules/rimraf/dist/esm/default-tmp.js +0 -55
  317. package/node_modules/rimraf/dist/esm/default-tmp.js.map +0 -1
  318. package/node_modules/rimraf/dist/esm/fix-eperm.d.ts +0 -3
  319. package/node_modules/rimraf/dist/esm/fix-eperm.d.ts.map +0 -1
  320. package/node_modules/rimraf/dist/esm/fix-eperm.js +0 -53
  321. package/node_modules/rimraf/dist/esm/fix-eperm.js.map +0 -1
  322. package/node_modules/rimraf/dist/esm/fs.d.ts +0 -17
  323. package/node_modules/rimraf/dist/esm/fs.d.ts.map +0 -1
  324. package/node_modules/rimraf/dist/esm/fs.js +0 -31
  325. package/node_modules/rimraf/dist/esm/fs.js.map +0 -1
  326. package/node_modules/rimraf/dist/esm/ignore-enoent.d.ts +0 -3
  327. package/node_modules/rimraf/dist/esm/ignore-enoent.d.ts.map +0 -1
  328. package/node_modules/rimraf/dist/esm/ignore-enoent.js +0 -16
  329. package/node_modules/rimraf/dist/esm/ignore-enoent.js.map +0 -1
  330. package/node_modules/rimraf/dist/esm/index.d.ts +0 -50
  331. package/node_modules/rimraf/dist/esm/index.d.ts.map +0 -1
  332. package/node_modules/rimraf/dist/esm/index.js +0 -70
  333. package/node_modules/rimraf/dist/esm/index.js.map +0 -1
  334. package/node_modules/rimraf/dist/esm/opt-arg.d.ts +0 -34
  335. package/node_modules/rimraf/dist/esm/opt-arg.d.ts.map +0 -1
  336. package/node_modules/rimraf/dist/esm/opt-arg.js +0 -46
  337. package/node_modules/rimraf/dist/esm/opt-arg.js.map +0 -1
  338. package/node_modules/rimraf/dist/esm/package.json +0 -3
  339. package/node_modules/rimraf/dist/esm/path-arg.d.ts +0 -4
  340. package/node_modules/rimraf/dist/esm/path-arg.d.ts.map +0 -1
  341. package/node_modules/rimraf/dist/esm/path-arg.js +0 -47
  342. package/node_modules/rimraf/dist/esm/path-arg.js.map +0 -1
  343. package/node_modules/rimraf/dist/esm/platform.d.ts +0 -3
  344. package/node_modules/rimraf/dist/esm/platform.d.ts.map +0 -1
  345. package/node_modules/rimraf/dist/esm/platform.js +0 -2
  346. package/node_modules/rimraf/dist/esm/platform.js.map +0 -1
  347. package/node_modules/rimraf/dist/esm/readdir-or-error.d.ts +0 -3
  348. package/node_modules/rimraf/dist/esm/readdir-or-error.d.ts.map +0 -1
  349. package/node_modules/rimraf/dist/esm/readdir-or-error.js +0 -14
  350. package/node_modules/rimraf/dist/esm/readdir-or-error.js.map +0 -1
  351. package/node_modules/rimraf/dist/esm/retry-busy.d.ts +0 -8
  352. package/node_modules/rimraf/dist/esm/retry-busy.d.ts.map +0 -1
  353. package/node_modules/rimraf/dist/esm/retry-busy.js +0 -63
  354. package/node_modules/rimraf/dist/esm/retry-busy.js.map +0 -1
  355. package/node_modules/rimraf/dist/esm/rimraf-manual.d.ts +0 -3
  356. package/node_modules/rimraf/dist/esm/rimraf-manual.d.ts.map +0 -1
  357. package/node_modules/rimraf/dist/esm/rimraf-manual.js +0 -6
  358. package/node_modules/rimraf/dist/esm/rimraf-manual.js.map +0 -1
  359. package/node_modules/rimraf/dist/esm/rimraf-move-remove.d.ts +0 -4
  360. package/node_modules/rimraf/dist/esm/rimraf-move-remove.d.ts.map +0 -1
  361. package/node_modules/rimraf/dist/esm/rimraf-move-remove.js +0 -187
  362. package/node_modules/rimraf/dist/esm/rimraf-move-remove.js.map +0 -1
  363. package/node_modules/rimraf/dist/esm/rimraf-native.d.ts +0 -4
  364. package/node_modules/rimraf/dist/esm/rimraf-native.d.ts.map +0 -1
  365. package/node_modules/rimraf/dist/esm/rimraf-native.js +0 -19
  366. package/node_modules/rimraf/dist/esm/rimraf-native.js.map +0 -1
  367. package/node_modules/rimraf/dist/esm/rimraf-posix.d.ts +0 -4
  368. package/node_modules/rimraf/dist/esm/rimraf-posix.d.ts.map +0 -1
  369. package/node_modules/rimraf/dist/esm/rimraf-posix.js +0 -118
  370. package/node_modules/rimraf/dist/esm/rimraf-posix.js.map +0 -1
  371. package/node_modules/rimraf/dist/esm/rimraf-windows.d.ts +0 -4
  372. package/node_modules/rimraf/dist/esm/rimraf-windows.d.ts.map +0 -1
  373. package/node_modules/rimraf/dist/esm/rimraf-windows.js +0 -177
  374. package/node_modules/rimraf/dist/esm/rimraf-windows.js.map +0 -1
  375. package/node_modules/rimraf/dist/esm/use-native.d.ts +0 -4
  376. package/node_modules/rimraf/dist/esm/use-native.d.ts.map +0 -1
  377. package/node_modules/rimraf/dist/esm/use-native.js +0 -16
  378. package/node_modules/rimraf/dist/esm/use-native.js.map +0 -1
  379. package/node_modules/rimraf/node_modules/balanced-match/.github/FUNDING.yml +0 -2
  380. package/node_modules/rimraf/node_modules/balanced-match/LICENSE.md +0 -21
  381. package/node_modules/rimraf/node_modules/balanced-match/README.md +0 -97
  382. package/node_modules/rimraf/node_modules/balanced-match/index.js +0 -62
  383. package/node_modules/rimraf/node_modules/balanced-match/package.json +0 -48
  384. package/node_modules/rimraf/node_modules/brace-expansion/.github/FUNDING.yml +0 -2
  385. package/node_modules/rimraf/node_modules/brace-expansion/LICENSE +0 -21
  386. package/node_modules/rimraf/node_modules/brace-expansion/README.md +0 -135
  387. package/node_modules/rimraf/node_modules/brace-expansion/index.js +0 -203
  388. package/node_modules/rimraf/node_modules/brace-expansion/package.json +0 -49
  389. package/node_modules/rimraf/node_modules/glob/LICENSE +0 -15
  390. package/node_modules/rimraf/node_modules/glob/README.md +0 -1265
  391. package/node_modules/rimraf/node_modules/glob/dist/commonjs/glob.d.ts +0 -388
  392. package/node_modules/rimraf/node_modules/glob/dist/commonjs/glob.d.ts.map +0 -1
  393. package/node_modules/rimraf/node_modules/glob/dist/commonjs/glob.js +0 -247
  394. package/node_modules/rimraf/node_modules/glob/dist/commonjs/glob.js.map +0 -1
  395. package/node_modules/rimraf/node_modules/glob/dist/commonjs/has-magic.d.ts +0 -14
  396. package/node_modules/rimraf/node_modules/glob/dist/commonjs/has-magic.d.ts.map +0 -1
  397. package/node_modules/rimraf/node_modules/glob/dist/commonjs/has-magic.js +0 -27
  398. package/node_modules/rimraf/node_modules/glob/dist/commonjs/has-magic.js.map +0 -1
  399. package/node_modules/rimraf/node_modules/glob/dist/commonjs/ignore.d.ts +0 -24
  400. package/node_modules/rimraf/node_modules/glob/dist/commonjs/ignore.d.ts.map +0 -1
  401. package/node_modules/rimraf/node_modules/glob/dist/commonjs/ignore.js +0 -119
  402. package/node_modules/rimraf/node_modules/glob/dist/commonjs/ignore.js.map +0 -1
  403. package/node_modules/rimraf/node_modules/glob/dist/commonjs/index.d.ts +0 -97
  404. package/node_modules/rimraf/node_modules/glob/dist/commonjs/index.d.ts.map +0 -1
  405. package/node_modules/rimraf/node_modules/glob/dist/commonjs/index.js +0 -68
  406. package/node_modules/rimraf/node_modules/glob/dist/commonjs/index.js.map +0 -1
  407. package/node_modules/rimraf/node_modules/glob/dist/commonjs/package.json +0 -3
  408. package/node_modules/rimraf/node_modules/glob/dist/commonjs/pattern.d.ts +0 -76
  409. package/node_modules/rimraf/node_modules/glob/dist/commonjs/pattern.d.ts.map +0 -1
  410. package/node_modules/rimraf/node_modules/glob/dist/commonjs/pattern.js +0 -219
  411. package/node_modules/rimraf/node_modules/glob/dist/commonjs/pattern.js.map +0 -1
  412. package/node_modules/rimraf/node_modules/glob/dist/commonjs/processor.d.ts +0 -59
  413. package/node_modules/rimraf/node_modules/glob/dist/commonjs/processor.d.ts.map +0 -1
  414. package/node_modules/rimraf/node_modules/glob/dist/commonjs/processor.js +0 -301
  415. package/node_modules/rimraf/node_modules/glob/dist/commonjs/processor.js.map +0 -1
  416. package/node_modules/rimraf/node_modules/glob/dist/commonjs/walker.d.ts +0 -97
  417. package/node_modules/rimraf/node_modules/glob/dist/commonjs/walker.d.ts.map +0 -1
  418. package/node_modules/rimraf/node_modules/glob/dist/commonjs/walker.js +0 -387
  419. package/node_modules/rimraf/node_modules/glob/dist/commonjs/walker.js.map +0 -1
  420. package/node_modules/rimraf/node_modules/glob/dist/esm/bin.d.mts +0 -3
  421. package/node_modules/rimraf/node_modules/glob/dist/esm/bin.d.mts.map +0 -1
  422. package/node_modules/rimraf/node_modules/glob/dist/esm/bin.mjs +0 -346
  423. package/node_modules/rimraf/node_modules/glob/dist/esm/bin.mjs.map +0 -1
  424. package/node_modules/rimraf/node_modules/glob/dist/esm/glob.d.ts +0 -388
  425. package/node_modules/rimraf/node_modules/glob/dist/esm/glob.d.ts.map +0 -1
  426. package/node_modules/rimraf/node_modules/glob/dist/esm/glob.js +0 -243
  427. package/node_modules/rimraf/node_modules/glob/dist/esm/glob.js.map +0 -1
  428. package/node_modules/rimraf/node_modules/glob/dist/esm/has-magic.d.ts +0 -14
  429. package/node_modules/rimraf/node_modules/glob/dist/esm/has-magic.d.ts.map +0 -1
  430. package/node_modules/rimraf/node_modules/glob/dist/esm/has-magic.js +0 -23
  431. package/node_modules/rimraf/node_modules/glob/dist/esm/has-magic.js.map +0 -1
  432. package/node_modules/rimraf/node_modules/glob/dist/esm/ignore.d.ts +0 -24
  433. package/node_modules/rimraf/node_modules/glob/dist/esm/ignore.d.ts.map +0 -1
  434. package/node_modules/rimraf/node_modules/glob/dist/esm/ignore.js +0 -115
  435. package/node_modules/rimraf/node_modules/glob/dist/esm/ignore.js.map +0 -1
  436. package/node_modules/rimraf/node_modules/glob/dist/esm/index.d.ts +0 -97
  437. package/node_modules/rimraf/node_modules/glob/dist/esm/index.d.ts.map +0 -1
  438. package/node_modules/rimraf/node_modules/glob/dist/esm/index.js +0 -55
  439. package/node_modules/rimraf/node_modules/glob/dist/esm/index.js.map +0 -1
  440. package/node_modules/rimraf/node_modules/glob/dist/esm/package.json +0 -3
  441. package/node_modules/rimraf/node_modules/glob/dist/esm/pattern.d.ts +0 -76
  442. package/node_modules/rimraf/node_modules/glob/dist/esm/pattern.d.ts.map +0 -1
  443. package/node_modules/rimraf/node_modules/glob/dist/esm/pattern.js +0 -215
  444. package/node_modules/rimraf/node_modules/glob/dist/esm/pattern.js.map +0 -1
  445. package/node_modules/rimraf/node_modules/glob/dist/esm/processor.d.ts +0 -59
  446. package/node_modules/rimraf/node_modules/glob/dist/esm/processor.d.ts.map +0 -1
  447. package/node_modules/rimraf/node_modules/glob/dist/esm/processor.js +0 -294
  448. package/node_modules/rimraf/node_modules/glob/dist/esm/processor.js.map +0 -1
  449. package/node_modules/rimraf/node_modules/glob/dist/esm/walker.d.ts +0 -97
  450. package/node_modules/rimraf/node_modules/glob/dist/esm/walker.d.ts.map +0 -1
  451. package/node_modules/rimraf/node_modules/glob/dist/esm/walker.js +0 -381
  452. package/node_modules/rimraf/node_modules/glob/dist/esm/walker.js.map +0 -1
  453. package/node_modules/rimraf/node_modules/glob/package.json +0 -99
  454. package/node_modules/rimraf/node_modules/lru-cache/LICENSE +0 -15
  455. package/node_modules/rimraf/node_modules/lru-cache/README.md +0 -331
  456. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/index.d.ts +0 -1277
  457. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/index.d.ts.map +0 -1
  458. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/index.js +0 -1546
  459. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/index.js.map +0 -1
  460. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/index.min.js +0 -2
  461. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/index.min.js.map +0 -7
  462. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/package.json +0 -3
  463. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/index.d.ts +0 -1277
  464. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/index.d.ts.map +0 -1
  465. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/index.js +0 -1542
  466. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/index.js.map +0 -1
  467. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/index.min.js +0 -2
  468. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/index.min.js.map +0 -7
  469. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/package.json +0 -3
  470. package/node_modules/rimraf/node_modules/lru-cache/package.json +0 -116
  471. package/node_modules/rimraf/node_modules/minimatch/LICENSE +0 -15
  472. package/node_modules/rimraf/node_modules/minimatch/README.md +0 -491
  473. package/node_modules/rimraf/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts +0 -2
  474. package/node_modules/rimraf/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map +0 -1
  475. package/node_modules/rimraf/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +0 -14
  476. package/node_modules/rimraf/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map +0 -1
  477. package/node_modules/rimraf/node_modules/minimatch/dist/commonjs/ast.d.ts +0 -20
  478. package/node_modules/rimraf/node_modules/minimatch/dist/commonjs/ast.d.ts.map +0 -1
  479. package/node_modules/rimraf/node_modules/minimatch/dist/commonjs/ast.js +0 -747
  480. package/node_modules/rimraf/node_modules/minimatch/dist/commonjs/ast.js.map +0 -1
  481. package/node_modules/rimraf/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts +0 -8
  482. package/node_modules/rimraf/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map +0 -1
  483. package/node_modules/rimraf/node_modules/minimatch/dist/commonjs/brace-expressions.js +0 -152
  484. package/node_modules/rimraf/node_modules/minimatch/dist/commonjs/brace-expressions.js.map +0 -1
  485. package/node_modules/rimraf/node_modules/minimatch/dist/commonjs/escape.d.ts +0 -12
  486. package/node_modules/rimraf/node_modules/minimatch/dist/commonjs/escape.d.ts.map +0 -1
  487. package/node_modules/rimraf/node_modules/minimatch/dist/commonjs/escape.js +0 -22
  488. package/node_modules/rimraf/node_modules/minimatch/dist/commonjs/escape.js.map +0 -1
  489. package/node_modules/rimraf/node_modules/minimatch/dist/commonjs/index.d.ts +0 -98
  490. package/node_modules/rimraf/node_modules/minimatch/dist/commonjs/index.d.ts.map +0 -1
  491. package/node_modules/rimraf/node_modules/minimatch/dist/commonjs/index.js +0 -1023
  492. package/node_modules/rimraf/node_modules/minimatch/dist/commonjs/index.js.map +0 -1
  493. package/node_modules/rimraf/node_modules/minimatch/dist/commonjs/package.json +0 -3
  494. package/node_modules/rimraf/node_modules/minimatch/dist/commonjs/unescape.d.ts +0 -17
  495. package/node_modules/rimraf/node_modules/minimatch/dist/commonjs/unescape.d.ts.map +0 -1
  496. package/node_modules/rimraf/node_modules/minimatch/dist/commonjs/unescape.js +0 -24
  497. package/node_modules/rimraf/node_modules/minimatch/dist/commonjs/unescape.js.map +0 -1
  498. package/node_modules/rimraf/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts +0 -2
  499. package/node_modules/rimraf/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map +0 -1
  500. package/node_modules/rimraf/node_modules/minimatch/dist/esm/assert-valid-pattern.js +0 -10
  501. package/node_modules/rimraf/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map +0 -1
  502. package/node_modules/rimraf/node_modules/minimatch/dist/esm/ast.d.ts +0 -20
  503. package/node_modules/rimraf/node_modules/minimatch/dist/esm/ast.d.ts.map +0 -1
  504. package/node_modules/rimraf/node_modules/minimatch/dist/esm/ast.js +0 -743
  505. package/node_modules/rimraf/node_modules/minimatch/dist/esm/ast.js.map +0 -1
  506. package/node_modules/rimraf/node_modules/minimatch/dist/esm/brace-expressions.d.ts +0 -8
  507. package/node_modules/rimraf/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map +0 -1
  508. package/node_modules/rimraf/node_modules/minimatch/dist/esm/brace-expressions.js +0 -148
  509. package/node_modules/rimraf/node_modules/minimatch/dist/esm/brace-expressions.js.map +0 -1
  510. package/node_modules/rimraf/node_modules/minimatch/dist/esm/escape.d.ts +0 -12
  511. package/node_modules/rimraf/node_modules/minimatch/dist/esm/escape.d.ts.map +0 -1
  512. package/node_modules/rimraf/node_modules/minimatch/dist/esm/escape.js +0 -18
  513. package/node_modules/rimraf/node_modules/minimatch/dist/esm/escape.js.map +0 -1
  514. package/node_modules/rimraf/node_modules/minimatch/dist/esm/index.d.ts +0 -98
  515. package/node_modules/rimraf/node_modules/minimatch/dist/esm/index.d.ts.map +0 -1
  516. package/node_modules/rimraf/node_modules/minimatch/dist/esm/index.js +0 -1007
  517. package/node_modules/rimraf/node_modules/minimatch/dist/esm/index.js.map +0 -1
  518. package/node_modules/rimraf/node_modules/minimatch/dist/esm/package.json +0 -3
  519. package/node_modules/rimraf/node_modules/minimatch/dist/esm/unescape.d.ts +0 -17
  520. package/node_modules/rimraf/node_modules/minimatch/dist/esm/unescape.d.ts.map +0 -1
  521. package/node_modules/rimraf/node_modules/minimatch/dist/esm/unescape.js +0 -20
  522. package/node_modules/rimraf/node_modules/minimatch/dist/esm/unescape.js.map +0 -1
  523. package/node_modules/rimraf/node_modules/minimatch/package.json +0 -82
  524. package/node_modules/rimraf/node_modules/path-scurry/LICENSE.md +0 -55
  525. package/node_modules/rimraf/node_modules/path-scurry/README.md +0 -636
  526. package/node_modules/rimraf/node_modules/path-scurry/dist/commonjs/index.d.ts +0 -1116
  527. package/node_modules/rimraf/node_modules/path-scurry/dist/commonjs/index.d.ts.map +0 -1
  528. package/node_modules/rimraf/node_modules/path-scurry/dist/commonjs/index.js +0 -2014
  529. package/node_modules/rimraf/node_modules/path-scurry/dist/commonjs/index.js.map +0 -1
  530. package/node_modules/rimraf/node_modules/path-scurry/dist/commonjs/package.json +0 -3
  531. package/node_modules/rimraf/node_modules/path-scurry/dist/esm/index.d.ts +0 -1116
  532. package/node_modules/rimraf/node_modules/path-scurry/dist/esm/index.d.ts.map +0 -1
  533. package/node_modules/rimraf/node_modules/path-scurry/dist/esm/index.js +0 -1979
  534. package/node_modules/rimraf/node_modules/path-scurry/dist/esm/index.js.map +0 -1
  535. package/node_modules/rimraf/node_modules/path-scurry/dist/esm/package.json +0 -3
  536. package/node_modules/rimraf/node_modules/path-scurry/package.json +0 -89
  537. package/node_modules/rimraf/package.json +0 -89
  538. package/node_modules/shebang-command/index.js +0 -19
  539. package/node_modules/shebang-command/license +0 -9
  540. package/node_modules/shebang-command/package.json +0 -34
  541. package/node_modules/shebang-command/readme.md +0 -34
  542. package/node_modules/shebang-regex/index.d.ts +0 -22
  543. package/node_modules/shebang-regex/index.js +0 -2
  544. package/node_modules/shebang-regex/license +0 -9
  545. package/node_modules/shebang-regex/package.json +0 -35
  546. package/node_modules/shebang-regex/readme.md +0 -33
  547. package/node_modules/string-width-cjs/index.d.ts +0 -29
  548. package/node_modules/string-width-cjs/index.js +0 -47
  549. package/node_modules/string-width-cjs/license +0 -9
  550. package/node_modules/string-width-cjs/node_modules/ansi-regex/index.d.ts +0 -37
  551. package/node_modules/string-width-cjs/node_modules/ansi-regex/index.js +0 -10
  552. package/node_modules/string-width-cjs/node_modules/ansi-regex/license +0 -9
  553. package/node_modules/string-width-cjs/node_modules/ansi-regex/package.json +0 -55
  554. package/node_modules/string-width-cjs/node_modules/ansi-regex/readme.md +0 -78
  555. package/node_modules/string-width-cjs/node_modules/strip-ansi/index.d.ts +0 -17
  556. package/node_modules/string-width-cjs/node_modules/strip-ansi/index.js +0 -4
  557. package/node_modules/string-width-cjs/node_modules/strip-ansi/license +0 -9
  558. package/node_modules/string-width-cjs/node_modules/strip-ansi/package.json +0 -54
  559. package/node_modules/string-width-cjs/node_modules/strip-ansi/readme.md +0 -46
  560. package/node_modules/string-width-cjs/package.json +0 -56
  561. package/node_modules/string-width-cjs/readme.md +0 -50
  562. package/node_modules/strip-ansi-cjs/index.d.ts +0 -17
  563. package/node_modules/strip-ansi-cjs/index.js +0 -4
  564. package/node_modules/strip-ansi-cjs/license +0 -9
  565. package/node_modules/strip-ansi-cjs/node_modules/ansi-regex/index.d.ts +0 -37
  566. package/node_modules/strip-ansi-cjs/node_modules/ansi-regex/index.js +0 -10
  567. package/node_modules/strip-ansi-cjs/node_modules/ansi-regex/license +0 -9
  568. package/node_modules/strip-ansi-cjs/node_modules/ansi-regex/package.json +0 -55
  569. package/node_modules/strip-ansi-cjs/node_modules/ansi-regex/readme.md +0 -78
  570. package/node_modules/strip-ansi-cjs/package.json +0 -54
  571. package/node_modules/strip-ansi-cjs/readme.md +0 -46
  572. package/node_modules/which/CHANGELOG.md +0 -166
  573. package/node_modules/which/LICENSE +0 -15
  574. package/node_modules/which/README.md +0 -54
  575. package/node_modules/which/bin/node-which +0 -52
  576. package/node_modules/which/package.json +0 -43
  577. package/node_modules/which/which.js +0 -125
  578. package/node_modules/wrap-ansi-cjs/index.js +0 -216
  579. package/node_modules/wrap-ansi-cjs/license +0 -9
  580. package/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/index.d.ts +0 -37
  581. package/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/index.js +0 -10
  582. package/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/license +0 -9
  583. package/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/package.json +0 -55
  584. package/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/readme.md +0 -78
  585. package/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/index.d.ts +0 -17
  586. package/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/index.js +0 -4
  587. package/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/license +0 -9
  588. package/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/package.json +0 -54
  589. package/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/readme.md +0 -46
  590. package/node_modules/wrap-ansi-cjs/package.json +0 -62
  591. package/node_modules/wrap-ansi-cjs/readme.md +0 -91
@@ -1,1000 +0,0 @@
1
- import { inspect } from 'node:util';
2
- import { parseArgs } from './parse-args.js';
3
- // it's a tiny API, just cast it inline, it's fine
4
- //@ts-ignore
5
- import cliui from '@isaacs/cliui';
6
- import { basename } from 'node:path';
7
- const width = Math.min((process && process.stdout && process.stdout.columns) || 80, 80);
8
- // indentation spaces from heading level
9
- const indent = (n) => (n - 1) * 2;
10
- const toEnvKey = (pref, key) => {
11
- return [pref, key.replace(/[^a-zA-Z0-9]+/g, ' ')]
12
- .join(' ')
13
- .trim()
14
- .toUpperCase()
15
- .replace(/ /g, '_');
16
- };
17
- const toEnvVal = (value, delim = '\n') => {
18
- const str = typeof value === 'string' ? value
19
- : typeof value === 'boolean' ?
20
- value ? '1'
21
- : '0'
22
- : typeof value === 'number' ? String(value)
23
- : Array.isArray(value) ?
24
- value.map((v) => toEnvVal(v)).join(delim)
25
- : /* c8 ignore start */ undefined;
26
- if (typeof str !== 'string') {
27
- throw new Error(`could not serialize value to environment: ${JSON.stringify(value)}`);
28
- }
29
- /* c8 ignore stop */
30
- return str;
31
- };
32
- const fromEnvVal = (env, type, multiple, delim = '\n') => (multiple ?
33
- env ? env.split(delim).map(v => fromEnvVal(v, type, false))
34
- : []
35
- : type === 'string' ? env
36
- : type === 'boolean' ? env === '1'
37
- : +env.trim());
38
- export const isConfigType = (t) => typeof t === 'string' &&
39
- (t === 'string' || t === 'number' || t === 'boolean');
40
- const undefOrType = (v, t) => v === undefined || typeof v === t;
41
- const undefOrTypeArray = (v, t) => v === undefined || (Array.isArray(v) && v.every(x => typeof x === t));
42
- const isValidOption = (v, vo) => Array.isArray(v) ? v.every(x => isValidOption(x, vo)) : vo.includes(v);
43
- // print the value type, for error message reporting
44
- const valueType = (v) => typeof v === 'string' ? 'string'
45
- : typeof v === 'boolean' ? 'boolean'
46
- : typeof v === 'number' ? 'number'
47
- : Array.isArray(v) ?
48
- joinTypes([...new Set(v.map(v => valueType(v)))]) + '[]'
49
- : `${v.type}${v.multiple ? '[]' : ''}`;
50
- const joinTypes = (types) => types.length === 1 && typeof types[0] === 'string' ?
51
- types[0]
52
- : `(${types.join('|')})`;
53
- const isValidValue = (v, type, multi) => {
54
- if (multi) {
55
- if (!Array.isArray(v))
56
- return false;
57
- return !v.some((v) => !isValidValue(v, type, false));
58
- }
59
- if (Array.isArray(v))
60
- return false;
61
- return typeof v === type;
62
- };
63
- export const isConfigOption = (o, type, multi) => !!o &&
64
- typeof o === 'object' &&
65
- isConfigType(o.type) &&
66
- o.type === type &&
67
- undefOrType(o.short, 'string') &&
68
- undefOrType(o.description, 'string') &&
69
- undefOrType(o.hint, 'string') &&
70
- undefOrType(o.validate, 'function') &&
71
- (o.type === 'boolean' ?
72
- o.validOptions === undefined
73
- : undefOrTypeArray(o.validOptions, o.type)) &&
74
- (o.default === undefined || isValidValue(o.default, type, multi)) &&
75
- !!o.multiple === multi;
76
- function num(o = {}) {
77
- const { default: def, validate: val, validOptions, ...rest } = o;
78
- if (def !== undefined && !isValidValue(def, 'number', false)) {
79
- throw new TypeError('invalid default value', {
80
- cause: {
81
- found: def,
82
- wanted: 'number',
83
- },
84
- });
85
- }
86
- if (!undefOrTypeArray(validOptions, 'number')) {
87
- throw new TypeError('invalid validOptions', {
88
- cause: {
89
- found: validOptions,
90
- wanted: 'number[]',
91
- },
92
- });
93
- }
94
- const validate = val ?
95
- val
96
- : undefined;
97
- return {
98
- ...rest,
99
- default: def,
100
- validate,
101
- validOptions,
102
- type: 'number',
103
- multiple: false,
104
- };
105
- }
106
- function numList(o = {}) {
107
- const { default: def, validate: val, validOptions, ...rest } = o;
108
- if (def !== undefined && !isValidValue(def, 'number', true)) {
109
- throw new TypeError('invalid default value', {
110
- cause: {
111
- found: def,
112
- wanted: 'number[]',
113
- },
114
- });
115
- }
116
- if (!undefOrTypeArray(validOptions, 'number')) {
117
- throw new TypeError('invalid validOptions', {
118
- cause: {
119
- found: validOptions,
120
- wanted: 'number[]',
121
- },
122
- });
123
- }
124
- const validate = val ?
125
- val
126
- : undefined;
127
- return {
128
- ...rest,
129
- default: def,
130
- validate,
131
- validOptions,
132
- type: 'number',
133
- multiple: true,
134
- };
135
- }
136
- function opt(o = {}) {
137
- const { default: def, validate: val, validOptions, ...rest } = o;
138
- if (def !== undefined && !isValidValue(def, 'string', false)) {
139
- throw new TypeError('invalid default value', {
140
- cause: {
141
- found: def,
142
- wanted: 'string',
143
- },
144
- });
145
- }
146
- if (!undefOrTypeArray(validOptions, 'string')) {
147
- throw new TypeError('invalid validOptions', {
148
- cause: {
149
- found: validOptions,
150
- wanted: 'string[]',
151
- },
152
- });
153
- }
154
- const validate = val ?
155
- val
156
- : undefined;
157
- return {
158
- ...rest,
159
- default: def,
160
- validate,
161
- validOptions,
162
- type: 'string',
163
- multiple: false,
164
- };
165
- }
166
- function optList(o = {}) {
167
- const { default: def, validate: val, validOptions, ...rest } = o;
168
- if (def !== undefined && !isValidValue(def, 'string', true)) {
169
- throw new TypeError('invalid default value', {
170
- cause: {
171
- found: def,
172
- wanted: 'string[]',
173
- },
174
- });
175
- }
176
- if (!undefOrTypeArray(validOptions, 'string')) {
177
- throw new TypeError('invalid validOptions', {
178
- cause: {
179
- found: validOptions,
180
- wanted: 'string[]',
181
- },
182
- });
183
- }
184
- const validate = val ?
185
- val
186
- : undefined;
187
- return {
188
- ...rest,
189
- default: def,
190
- validate,
191
- validOptions,
192
- type: 'string',
193
- multiple: true,
194
- };
195
- }
196
- function flag(o = {}) {
197
- const { hint, default: def, validate: val, ...rest } = o;
198
- delete rest.validOptions;
199
- if (def !== undefined && !isValidValue(def, 'boolean', false)) {
200
- throw new TypeError('invalid default value');
201
- }
202
- const validate = val ?
203
- val
204
- : undefined;
205
- if (hint !== undefined) {
206
- throw new TypeError('cannot provide hint for flag');
207
- }
208
- return {
209
- ...rest,
210
- default: def,
211
- validate,
212
- type: 'boolean',
213
- multiple: false,
214
- };
215
- }
216
- function flagList(o = {}) {
217
- const { hint, default: def, validate: val, ...rest } = o;
218
- delete rest.validOptions;
219
- if (def !== undefined && !isValidValue(def, 'boolean', true)) {
220
- throw new TypeError('invalid default value');
221
- }
222
- const validate = val ?
223
- val
224
- : undefined;
225
- if (hint !== undefined) {
226
- throw new TypeError('cannot provide hint for flag list');
227
- }
228
- return {
229
- ...rest,
230
- default: def,
231
- validate,
232
- type: 'boolean',
233
- multiple: true,
234
- };
235
- }
236
- const toParseArgsOptionsConfig = (options) => {
237
- const c = {};
238
- for (const longOption in options) {
239
- const config = options[longOption];
240
- /* c8 ignore start */
241
- if (!config) {
242
- throw new Error('config must be an object: ' + longOption);
243
- }
244
- /* c8 ignore start */
245
- if (isConfigOption(config, 'number', true)) {
246
- c[longOption] = {
247
- type: 'string',
248
- multiple: true,
249
- default: config.default?.map(c => String(c)),
250
- };
251
- }
252
- else if (isConfigOption(config, 'number', false)) {
253
- c[longOption] = {
254
- type: 'string',
255
- multiple: false,
256
- default: config.default === undefined ?
257
- undefined
258
- : String(config.default),
259
- };
260
- }
261
- else {
262
- const conf = config;
263
- c[longOption] = {
264
- type: conf.type,
265
- multiple: !!conf.multiple,
266
- default: conf.default,
267
- };
268
- }
269
- const clo = c[longOption];
270
- if (typeof config.short === 'string') {
271
- clo.short = config.short;
272
- }
273
- if (config.type === 'boolean' &&
274
- !longOption.startsWith('no-') &&
275
- !options[`no-${longOption}`]) {
276
- c[`no-${longOption}`] = {
277
- type: 'boolean',
278
- multiple: config.multiple,
279
- };
280
- }
281
- }
282
- return c;
283
- };
284
- const isHeading = (r) => r.type === 'heading';
285
- const isDescription = (r) => r.type === 'description';
286
- /**
287
- * Class returned by the {@link jack} function and all configuration
288
- * definition methods. This is what gets chained together.
289
- */
290
- export class Jack {
291
- #configSet;
292
- #shorts;
293
- #options;
294
- #fields = [];
295
- #env;
296
- #envPrefix;
297
- #allowPositionals;
298
- #usage;
299
- #usageMarkdown;
300
- constructor(options = {}) {
301
- this.#options = options;
302
- this.#allowPositionals = options.allowPositionals !== false;
303
- this.#env =
304
- this.#options.env === undefined ? process.env : this.#options.env;
305
- this.#envPrefix = options.envPrefix;
306
- // We need to fib a little, because it's always the same object, but it
307
- // starts out as having an empty config set. Then each method that adds
308
- // fields returns `this as Jack<C & { ...newConfigs }>`
309
- this.#configSet = Object.create(null);
310
- this.#shorts = Object.create(null);
311
- }
312
- /**
313
- * Set the default value (which will still be overridden by env or cli)
314
- * as if from a parsed config file. The optional `source` param, if
315
- * provided, will be included in error messages if a value is invalid or
316
- * unknown.
317
- */
318
- setConfigValues(values, source = '') {
319
- try {
320
- this.validate(values);
321
- }
322
- catch (er) {
323
- const e = er;
324
- if (source && e && typeof e === 'object') {
325
- if (e.cause && typeof e.cause === 'object') {
326
- Object.assign(e.cause, { path: source });
327
- }
328
- else {
329
- e.cause = { path: source };
330
- }
331
- }
332
- throw e;
333
- }
334
- for (const [field, value] of Object.entries(values)) {
335
- const my = this.#configSet[field];
336
- // already validated, just for TS's benefit
337
- /* c8 ignore start */
338
- if (!my) {
339
- throw new Error('unexpected field in config set: ' + field, {
340
- cause: { found: field },
341
- });
342
- }
343
- /* c8 ignore stop */
344
- my.default = value;
345
- }
346
- return this;
347
- }
348
- /**
349
- * Parse a string of arguments, and return the resulting
350
- * `{ values, positionals }` object.
351
- *
352
- * If an {@link JackOptions#envPrefix} is set, then it will read default
353
- * values from the environment, and write the resulting values back
354
- * to the environment as well.
355
- *
356
- * Environment values always take precedence over any other value, except
357
- * an explicit CLI setting.
358
- */
359
- parse(args = process.argv) {
360
- this.loadEnvDefaults();
361
- const p = this.parseRaw(args);
362
- this.applyDefaults(p);
363
- this.writeEnv(p);
364
- return p;
365
- }
366
- loadEnvDefaults() {
367
- if (this.#envPrefix) {
368
- for (const [field, my] of Object.entries(this.#configSet)) {
369
- const ek = toEnvKey(this.#envPrefix, field);
370
- const env = this.#env[ek];
371
- if (env !== undefined) {
372
- my.default = fromEnvVal(env, my.type, !!my.multiple, my.delim);
373
- }
374
- }
375
- }
376
- }
377
- applyDefaults(p) {
378
- for (const [field, c] of Object.entries(this.#configSet)) {
379
- if (c.default !== undefined && !(field in p.values)) {
380
- //@ts-ignore
381
- p.values[field] = c.default;
382
- }
383
- }
384
- }
385
- /**
386
- * Only parse the command line arguments passed in.
387
- * Does not strip off the `node script.js` bits, so it must be just the
388
- * arguments you wish to have parsed.
389
- * Does not read from or write to the environment, or set defaults.
390
- */
391
- parseRaw(args) {
392
- if (args === process.argv) {
393
- args = args.slice(process._eval !== undefined ? 1 : 2);
394
- }
395
- const options = toParseArgsOptionsConfig(this.#configSet);
396
- const result = parseArgs({
397
- args,
398
- options,
399
- // always strict, but using our own logic
400
- strict: false,
401
- allowPositionals: this.#allowPositionals,
402
- tokens: true,
403
- });
404
- const p = {
405
- values: {},
406
- positionals: [],
407
- };
408
- for (const token of result.tokens) {
409
- if (token.kind === 'positional') {
410
- p.positionals.push(token.value);
411
- if (this.#options.stopAtPositional ||
412
- this.#options.stopAtPositionalTest?.(token.value)) {
413
- p.positionals.push(...args.slice(token.index + 1));
414
- break;
415
- }
416
- }
417
- else if (token.kind === 'option') {
418
- let value = undefined;
419
- if (token.name.startsWith('no-')) {
420
- const my = this.#configSet[token.name];
421
- const pname = token.name.substring('no-'.length);
422
- const pos = this.#configSet[pname];
423
- if (pos &&
424
- pos.type === 'boolean' &&
425
- (!my ||
426
- (my.type === 'boolean' && !!my.multiple === !!pos.multiple))) {
427
- value = false;
428
- token.name = pname;
429
- }
430
- }
431
- const my = this.#configSet[token.name];
432
- if (!my) {
433
- throw new Error(`Unknown option '${token.rawName}'. ` +
434
- `To specify a positional argument starting with a '-', ` +
435
- `place it at the end of the command after '--', as in ` +
436
- `'-- ${token.rawName}'`, {
437
- cause: {
438
- found: token.rawName + (token.value ? `=${token.value}` : ''),
439
- },
440
- });
441
- }
442
- if (value === undefined) {
443
- if (token.value === undefined) {
444
- if (my.type !== 'boolean') {
445
- throw new Error(`No value provided for ${token.rawName}, expected ${my.type}`, {
446
- cause: {
447
- name: token.rawName,
448
- wanted: valueType(my),
449
- },
450
- });
451
- }
452
- value = true;
453
- }
454
- else {
455
- if (my.type === 'boolean') {
456
- throw new Error(`Flag ${token.rawName} does not take a value, received '${token.value}'`, { cause: { found: token } });
457
- }
458
- if (my.type === 'string') {
459
- value = token.value;
460
- }
461
- else {
462
- value = +token.value;
463
- if (value !== value) {
464
- throw new Error(`Invalid value '${token.value}' provided for ` +
465
- `'${token.rawName}' option, expected number`, {
466
- cause: {
467
- name: token.rawName,
468
- found: token.value,
469
- wanted: 'number',
470
- },
471
- });
472
- }
473
- }
474
- }
475
- }
476
- if (my.multiple) {
477
- const pv = p.values;
478
- const tn = pv[token.name] ?? [];
479
- pv[token.name] = tn;
480
- tn.push(value);
481
- }
482
- else {
483
- const pv = p.values;
484
- pv[token.name] = value;
485
- }
486
- }
487
- }
488
- for (const [field, value] of Object.entries(p.values)) {
489
- const valid = this.#configSet[field]?.validate;
490
- const validOptions = this.#configSet[field]?.validOptions;
491
- let cause;
492
- if (validOptions && !isValidOption(value, validOptions)) {
493
- cause = { name: field, found: value, validOptions: validOptions };
494
- }
495
- if (valid && !valid(value)) {
496
- cause = cause || { name: field, found: value };
497
- }
498
- if (cause) {
499
- throw new Error(`Invalid value provided for --${field}: ${JSON.stringify(value)}`, { cause });
500
- }
501
- }
502
- return p;
503
- }
504
- /**
505
- * do not set fields as 'no-foo' if 'foo' exists and both are bools
506
- * just set foo.
507
- */
508
- #noNoFields(f, val, s = f) {
509
- if (!f.startsWith('no-') || typeof val !== 'boolean')
510
- return;
511
- const yes = f.substring('no-'.length);
512
- // recurse so we get the core config key we care about.
513
- this.#noNoFields(yes, val, s);
514
- if (this.#configSet[yes]?.type === 'boolean') {
515
- throw new Error(`do not set '${s}', instead set '${yes}' as desired.`, { cause: { found: s, wanted: yes } });
516
- }
517
- }
518
- /**
519
- * Validate that any arbitrary object is a valid configuration `values`
520
- * object. Useful when loading config files or other sources.
521
- */
522
- validate(o) {
523
- if (!o || typeof o !== 'object') {
524
- throw new Error('Invalid config: not an object', {
525
- cause: { found: o },
526
- });
527
- }
528
- const opts = o;
529
- for (const field in o) {
530
- const value = opts[field];
531
- /* c8 ignore next - for TS */
532
- if (value === undefined)
533
- continue;
534
- this.#noNoFields(field, value);
535
- const config = this.#configSet[field];
536
- if (!config) {
537
- throw new Error(`Unknown config option: ${field}`, {
538
- cause: { found: field },
539
- });
540
- }
541
- if (!isValidValue(value, config.type, !!config.multiple)) {
542
- throw new Error(`Invalid value ${valueType(value)} for ${field}, expected ${valueType(config)}`, {
543
- cause: {
544
- name: field,
545
- found: value,
546
- wanted: valueType(config),
547
- },
548
- });
549
- }
550
- let cause;
551
- if (config.validOptions &&
552
- !isValidOption(value, config.validOptions)) {
553
- cause = {
554
- name: field,
555
- found: value,
556
- validOptions: config.validOptions,
557
- };
558
- }
559
- if (config.validate && !config.validate(value)) {
560
- cause = cause || { name: field, found: value };
561
- }
562
- if (cause) {
563
- throw new Error(`Invalid config value for ${field}: ${value}`, {
564
- cause,
565
- });
566
- }
567
- }
568
- }
569
- writeEnv(p) {
570
- if (!this.#env || !this.#envPrefix)
571
- return;
572
- for (const [field, value] of Object.entries(p.values)) {
573
- const my = this.#configSet[field];
574
- this.#env[toEnvKey(this.#envPrefix, field)] = toEnvVal(value, my?.delim);
575
- }
576
- }
577
- /**
578
- * Add a heading to the usage output banner
579
- */
580
- heading(text, level, { pre = false } = {}) {
581
- if (level === undefined) {
582
- level = this.#fields.some(r => isHeading(r)) ? 2 : 1;
583
- }
584
- this.#fields.push({ type: 'heading', text, level, pre });
585
- return this;
586
- }
587
- /**
588
- * Add a long-form description to the usage output at this position.
589
- */
590
- description(text, { pre } = {}) {
591
- this.#fields.push({ type: 'description', text, pre });
592
- return this;
593
- }
594
- /**
595
- * Add one or more number fields.
596
- */
597
- num(fields) {
598
- return this.#addFields(fields, num);
599
- }
600
- /**
601
- * Add one or more multiple number fields.
602
- */
603
- numList(fields) {
604
- return this.#addFields(fields, numList);
605
- }
606
- /**
607
- * Add one or more string option fields.
608
- */
609
- opt(fields) {
610
- return this.#addFields(fields, opt);
611
- }
612
- /**
613
- * Add one or more multiple string option fields.
614
- */
615
- optList(fields) {
616
- return this.#addFields(fields, optList);
617
- }
618
- /**
619
- * Add one or more flag fields.
620
- */
621
- flag(fields) {
622
- return this.#addFields(fields, flag);
623
- }
624
- /**
625
- * Add one or more multiple flag fields.
626
- */
627
- flagList(fields) {
628
- return this.#addFields(fields, flagList);
629
- }
630
- /**
631
- * Generic field definition method. Similar to flag/flagList/number/etc,
632
- * but you must specify the `type` (and optionally `multiple` and `delim`)
633
- * fields on each one, or Jack won't know how to define them.
634
- */
635
- addFields(fields) {
636
- const next = this;
637
- for (const [name, field] of Object.entries(fields)) {
638
- this.#validateName(name, field);
639
- next.#fields.push({
640
- type: 'config',
641
- name,
642
- value: field,
643
- });
644
- }
645
- Object.assign(next.#configSet, fields);
646
- return next;
647
- }
648
- #addFields(fields, fn) {
649
- const next = this;
650
- Object.assign(next.#configSet, Object.fromEntries(Object.entries(fields).map(([name, field]) => {
651
- this.#validateName(name, field);
652
- const option = fn(field);
653
- next.#fields.push({
654
- type: 'config',
655
- name,
656
- value: option,
657
- });
658
- return [name, option];
659
- })));
660
- return next;
661
- }
662
- #validateName(name, field) {
663
- if (!/^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?$/.test(name)) {
664
- throw new TypeError(`Invalid option name: ${name}, ` +
665
- `must be '-' delimited ASCII alphanumeric`);
666
- }
667
- if (this.#configSet[name]) {
668
- throw new TypeError(`Cannot redefine option ${field}`);
669
- }
670
- if (this.#shorts[name]) {
671
- throw new TypeError(`Cannot redefine option ${name}, already ` +
672
- `in use for ${this.#shorts[name]}`);
673
- }
674
- if (field.short) {
675
- if (!/^[a-zA-Z0-9]$/.test(field.short)) {
676
- throw new TypeError(`Invalid ${name} short option: ${field.short}, ` +
677
- 'must be 1 ASCII alphanumeric character');
678
- }
679
- if (this.#shorts[field.short]) {
680
- throw new TypeError(`Invalid ${name} short option: ${field.short}, ` +
681
- `already in use for ${this.#shorts[field.short]}`);
682
- }
683
- this.#shorts[field.short] = name;
684
- this.#shorts[name] = name;
685
- }
686
- }
687
- /**
688
- * Return the usage banner for the given configuration
689
- */
690
- usage() {
691
- if (this.#usage)
692
- return this.#usage;
693
- let headingLevel = 1;
694
- const ui = cliui({ width });
695
- const first = this.#fields[0];
696
- let start = first?.type === 'heading' ? 1 : 0;
697
- if (first?.type === 'heading') {
698
- ui.div({
699
- padding: [0, 0, 0, 0],
700
- text: normalize(first.text),
701
- });
702
- }
703
- ui.div({ padding: [0, 0, 0, 0], text: 'Usage:' });
704
- if (this.#options.usage) {
705
- ui.div({
706
- text: this.#options.usage,
707
- padding: [0, 0, 0, 2],
708
- });
709
- }
710
- else {
711
- const cmd = basename(String(process.argv[1]));
712
- const shortFlags = [];
713
- const shorts = [];
714
- const flags = [];
715
- const opts = [];
716
- for (const [field, config] of Object.entries(this.#configSet)) {
717
- if (config.short) {
718
- if (config.type === 'boolean')
719
- shortFlags.push(config.short);
720
- else
721
- shorts.push([config.short, config.hint || field]);
722
- }
723
- else {
724
- if (config.type === 'boolean')
725
- flags.push(field);
726
- else
727
- opts.push([field, config.hint || field]);
728
- }
729
- }
730
- const sf = shortFlags.length ? ' -' + shortFlags.join('') : '';
731
- const so = shorts.map(([k, v]) => ` --${k}=<${v}>`).join('');
732
- const lf = flags.map(k => ` --${k}`).join('');
733
- const lo = opts.map(([k, v]) => ` --${k}=<${v}>`).join('');
734
- const usage = `${cmd}${sf}${so}${lf}${lo}`.trim();
735
- ui.div({
736
- text: usage,
737
- padding: [0, 0, 0, 2],
738
- });
739
- }
740
- ui.div({ padding: [0, 0, 0, 0], text: '' });
741
- const maybeDesc = this.#fields[start];
742
- if (maybeDesc && isDescription(maybeDesc)) {
743
- const print = normalize(maybeDesc.text, maybeDesc.pre);
744
- start++;
745
- ui.div({ padding: [0, 0, 0, 0], text: print });
746
- ui.div({ padding: [0, 0, 0, 0], text: '' });
747
- }
748
- const { rows, maxWidth } = this.#usageRows(start);
749
- // every heading/description after the first gets indented by 2
750
- // extra spaces.
751
- for (const row of rows) {
752
- if (row.left) {
753
- // If the row is too long, don't wrap it
754
- // Bump the right-hand side down a line to make room
755
- const configIndent = indent(Math.max(headingLevel, 2));
756
- if (row.left.length > maxWidth - 3) {
757
- ui.div({ text: row.left, padding: [0, 0, 0, configIndent] });
758
- ui.div({ text: row.text, padding: [0, 0, 0, maxWidth] });
759
- }
760
- else {
761
- ui.div({
762
- text: row.left,
763
- padding: [0, 1, 0, configIndent],
764
- width: maxWidth,
765
- }, { padding: [0, 0, 0, 0], text: row.text });
766
- }
767
- if (row.skipLine) {
768
- ui.div({ padding: [0, 0, 0, 0], text: '' });
769
- }
770
- }
771
- else {
772
- if (isHeading(row)) {
773
- const { level } = row;
774
- headingLevel = level;
775
- // only h1 and h2 have bottom padding
776
- // h3-h6 do not
777
- const b = level <= 2 ? 1 : 0;
778
- ui.div({ ...row, padding: [0, 0, b, indent(level)] });
779
- }
780
- else {
781
- ui.div({ ...row, padding: [0, 0, 1, indent(headingLevel + 1)] });
782
- }
783
- }
784
- }
785
- return (this.#usage = ui.toString());
786
- }
787
- /**
788
- * Return the usage banner markdown for the given configuration
789
- */
790
- usageMarkdown() {
791
- if (this.#usageMarkdown)
792
- return this.#usageMarkdown;
793
- const out = [];
794
- let headingLevel = 1;
795
- const first = this.#fields[0];
796
- let start = first?.type === 'heading' ? 1 : 0;
797
- if (first?.type === 'heading') {
798
- out.push(`# ${normalizeOneLine(first.text)}`);
799
- }
800
- out.push('Usage:');
801
- if (this.#options.usage) {
802
- out.push(normalizeMarkdown(this.#options.usage, true));
803
- }
804
- else {
805
- const cmd = basename(String(process.argv[1]));
806
- const shortFlags = [];
807
- const shorts = [];
808
- const flags = [];
809
- const opts = [];
810
- for (const [field, config] of Object.entries(this.#configSet)) {
811
- if (config.short) {
812
- if (config.type === 'boolean')
813
- shortFlags.push(config.short);
814
- else
815
- shorts.push([config.short, config.hint || field]);
816
- }
817
- else {
818
- if (config.type === 'boolean')
819
- flags.push(field);
820
- else
821
- opts.push([field, config.hint || field]);
822
- }
823
- }
824
- const sf = shortFlags.length ? ' -' + shortFlags.join('') : '';
825
- const so = shorts.map(([k, v]) => ` --${k}=<${v}>`).join('');
826
- const lf = flags.map(k => ` --${k}`).join('');
827
- const lo = opts.map(([k, v]) => ` --${k}=<${v}>`).join('');
828
- const usage = `${cmd}${sf}${so}${lf}${lo}`.trim();
829
- out.push(normalizeMarkdown(usage, true));
830
- }
831
- const maybeDesc = this.#fields[start];
832
- if (maybeDesc && isDescription(maybeDesc)) {
833
- out.push(normalizeMarkdown(maybeDesc.text, maybeDesc.pre));
834
- start++;
835
- }
836
- const { rows } = this.#usageRows(start);
837
- // heading level in markdown is number of # ahead of text
838
- for (const row of rows) {
839
- if (row.left) {
840
- out.push('#'.repeat(headingLevel + 1) +
841
- ' ' +
842
- normalizeOneLine(row.left, true));
843
- if (row.text)
844
- out.push(normalizeMarkdown(row.text));
845
- }
846
- else if (isHeading(row)) {
847
- const { level } = row;
848
- headingLevel = level;
849
- out.push(`${'#'.repeat(headingLevel)} ${normalizeOneLine(row.text, row.pre)}`);
850
- }
851
- else {
852
- out.push(normalizeMarkdown(row.text, !!row.pre));
853
- }
854
- }
855
- return (this.#usageMarkdown = out.join('\n\n') + '\n');
856
- }
857
- #usageRows(start) {
858
- // turn each config type into a row, and figure out the width of the
859
- // left hand indentation for the option descriptions.
860
- let maxMax = Math.max(12, Math.min(26, Math.floor(width / 3)));
861
- let maxWidth = 8;
862
- let prev = undefined;
863
- const rows = [];
864
- for (const field of this.#fields.slice(start)) {
865
- if (field.type !== 'config') {
866
- if (prev?.type === 'config')
867
- prev.skipLine = true;
868
- prev = undefined;
869
- field.text = normalize(field.text, !!field.pre);
870
- rows.push(field);
871
- continue;
872
- }
873
- const { value } = field;
874
- const desc = value.description || '';
875
- const mult = value.multiple ? 'Can be set multiple times' : '';
876
- const opts = value.validOptions?.length ?
877
- `Valid options:${value.validOptions.map(v => ` ${JSON.stringify(v)}`)}`
878
- : '';
879
- const dmDelim = desc.includes('\n') ? '\n\n' : '\n';
880
- const extra = [opts, mult].join(dmDelim).trim();
881
- const text = (normalize(desc) + dmDelim + extra).trim();
882
- const hint = value.hint ||
883
- (value.type === 'number' ? 'n'
884
- : value.type === 'string' ? field.name
885
- : undefined);
886
- const short = !value.short ? ''
887
- : value.type === 'boolean' ? `-${value.short} `
888
- : `-${value.short}<${hint}> `;
889
- const left = value.type === 'boolean' ?
890
- `${short}--${field.name}`
891
- : `${short}--${field.name}=<${hint}>`;
892
- const row = { text, left, type: 'config' };
893
- if (text.length > width - maxMax) {
894
- row.skipLine = true;
895
- }
896
- if (prev && left.length > maxMax)
897
- prev.skipLine = true;
898
- prev = row;
899
- const len = left.length + 4;
900
- if (len > maxWidth && len < maxMax) {
901
- maxWidth = len;
902
- }
903
- rows.push(row);
904
- }
905
- return { rows, maxWidth };
906
- }
907
- /**
908
- * Return the configuration options as a plain object
909
- */
910
- toJSON() {
911
- return Object.fromEntries(Object.entries(this.#configSet).map(([field, def]) => [
912
- field,
913
- {
914
- type: def.type,
915
- ...(def.multiple ? { multiple: true } : {}),
916
- ...(def.delim ? { delim: def.delim } : {}),
917
- ...(def.short ? { short: def.short } : {}),
918
- ...(def.description ?
919
- { description: normalize(def.description) }
920
- : {}),
921
- ...(def.validate ? { validate: def.validate } : {}),
922
- ...(def.validOptions ? { validOptions: def.validOptions } : {}),
923
- ...(def.default !== undefined ? { default: def.default } : {}),
924
- ...(def.hint ? { hint: def.hint } : {}),
925
- },
926
- ]));
927
- }
928
- /**
929
- * Custom printer for `util.inspect`
930
- */
931
- [inspect.custom](_, options) {
932
- return `Jack ${inspect(this.toJSON(), options)}`;
933
- }
934
- }
935
- // Unwrap and un-indent, so we can wrap description
936
- // strings however makes them look nice in the code.
937
- const normalize = (s, pre = false) => {
938
- if (pre)
939
- // prepend a ZWSP to each line so cliui doesn't strip it.
940
- return s
941
- .split('\n')
942
- .map(l => `\u200b${l}`)
943
- .join('\n');
944
- return s
945
- .split(/^\s*```\s*$/gm)
946
- .map((s, i) => {
947
- if (i % 2 === 1) {
948
- if (!s.trim()) {
949
- return `\`\`\`\n\`\`\`\n`;
950
- }
951
- // outdent the ``` blocks, but preserve whitespace otherwise.
952
- const split = s.split('\n');
953
- // throw out the \n at the start and end
954
- split.pop();
955
- split.shift();
956
- const si = split.reduce((shortest, l) => {
957
- /* c8 ignore next */
958
- const ind = l.match(/^\s*/)?.[0] ?? '';
959
- if (ind.length)
960
- return Math.min(ind.length, shortest);
961
- else
962
- return shortest;
963
- }, Infinity);
964
- /* c8 ignore next */
965
- const i = isFinite(si) ? si : 0;
966
- return ('\n```\n' +
967
- split.map(s => `\u200b${s.substring(i)}`).join('\n') +
968
- '\n```\n');
969
- }
970
- return (s
971
- // remove single line breaks, except for lists
972
- .replace(/([^\n])\n[ \t]*([^\n])/g, (_, $1, $2) => !/^[-*]/.test($2) ? `${$1} ${$2}` : `${$1}\n${$2}`)
973
- // normalize mid-line whitespace
974
- .replace(/([^\n])[ \t]+([^\n])/g, '$1 $2')
975
- // two line breaks are enough
976
- .replace(/\n{3,}/g, '\n\n')
977
- // remove any spaces at the start of a line
978
- .replace(/\n[ \t]+/g, '\n')
979
- .trim());
980
- })
981
- .join('\n');
982
- };
983
- // normalize for markdown printing, remove leading spaces on lines
984
- const normalizeMarkdown = (s, pre = false) => {
985
- const n = normalize(s, pre).replace(/\\/g, '\\\\');
986
- return pre ?
987
- `\`\`\`\n${n.replace(/\u200b/g, '')}\n\`\`\``
988
- : n.replace(/\n +/g, '\n').trim();
989
- };
990
- const normalizeOneLine = (s, pre = false) => {
991
- const n = normalize(s, pre)
992
- .replace(/[\s\u200b]+/g, ' ')
993
- .trim();
994
- return pre ? `\`${n}\`` : n;
995
- };
996
- /**
997
- * Main entry point. Create and return a {@link Jack} object.
998
- */
999
- export const jack = (options = {}) => new Jack(options);
1000
- //# sourceMappingURL=index.js.map