@fnndsc/brasa 0.56.1 → 0.56.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 (361) hide show
  1. package/dist/buildinfo.json +1 -1
  2. package/dist/builtins/berth/berth.d.ts +90 -3
  3. package/dist/builtins/berth/berth.js +129 -76
  4. package/dist/builtins/berth/berth.js.map +1 -1
  5. package/dist/builtins/berth/berthClose.d.ts +25 -6
  6. package/dist/builtins/berth/berthClose.js +8 -64
  7. package/dist/builtins/berth/berthClose.js.map +1 -1
  8. package/dist/builtins/berth/berthCube.d.ts +3 -2
  9. package/dist/builtins/berth/berthCube.js +9 -16
  10. package/dist/builtins/berth/berthCube.js.map +1 -1
  11. package/dist/builtins/berth/berthProcesses.js +33 -3
  12. package/dist/builtins/berth/berthProcesses.js.map +1 -1
  13. package/dist/builtins/debug.d.ts +24 -3
  14. package/dist/builtins/debug.js +66 -13
  15. package/dist/builtins/debug.js.map +1 -1
  16. package/dist/builtins/fs/acl.args.d.ts +5 -38
  17. package/dist/builtins/fs/acl.args.js +6 -72
  18. package/dist/builtins/fs/acl.args.js.map +1 -1
  19. package/dist/builtins/fs/acl.d.ts +100 -10
  20. package/dist/builtins/fs/acl.js +222 -68
  21. package/dist/builtins/fs/acl.js.map +1 -1
  22. package/dist/builtins/fs/cat.args.d.ts +14 -15
  23. package/dist/builtins/fs/cat.args.js +13 -40
  24. package/dist/builtins/fs/cat.args.js.map +1 -1
  25. package/dist/builtins/fs/cat.d.ts +40 -3
  26. package/dist/builtins/fs/cat.js +92 -13
  27. package/dist/builtins/fs/cat.js.map +1 -1
  28. package/dist/builtins/fs/cd.d.ts +24 -6
  29. package/dist/builtins/fs/cd.js +71 -18
  30. package/dist/builtins/fs/cd.js.map +1 -1
  31. package/dist/builtins/fs/configWrite.d.ts +24 -8
  32. package/dist/builtins/fs/configWrite.js +77 -36
  33. package/dist/builtins/fs/configWrite.js.map +1 -1
  34. package/dist/builtins/fs/cp.d.ts +39 -4
  35. package/dist/builtins/fs/cp.js +122 -56
  36. package/dist/builtins/fs/cp.js.map +1 -1
  37. package/dist/builtins/fs/download.d.ts +31 -4
  38. package/dist/builtins/fs/download.js +75 -38
  39. package/dist/builtins/fs/download.js.map +1 -1
  40. package/dist/builtins/fs/du.d.ts +59 -33
  41. package/dist/builtins/fs/du.js +111 -79
  42. package/dist/builtins/fs/du.js.map +1 -1
  43. package/dist/builtins/fs/edit.d.ts +19 -4
  44. package/dist/builtins/fs/edit.js +77 -16
  45. package/dist/builtins/fs/edit.js.map +1 -1
  46. package/dist/builtins/fs/find.d.ts +25 -0
  47. package/dist/builtins/fs/find.js +76 -5
  48. package/dist/builtins/fs/find.js.map +1 -1
  49. package/dist/builtins/fs/ls.d.ts +69 -4
  50. package/dist/builtins/fs/ls.js +84 -45
  51. package/dist/builtins/fs/ls.js.map +1 -1
  52. package/dist/builtins/fs/mkdir.d.ts +28 -18
  53. package/dist/builtins/fs/mkdir.js +95 -66
  54. package/dist/builtins/fs/mkdir.js.map +1 -1
  55. package/dist/builtins/fs/mv.d.ts +34 -4
  56. package/dist/builtins/fs/mv.js +129 -64
  57. package/dist/builtins/fs/mv.js.map +1 -1
  58. package/dist/builtins/fs/pull.args.d.ts +56 -17
  59. package/dist/builtins/fs/pull.args.js +16 -66
  60. package/dist/builtins/fs/pull.args.js.map +1 -1
  61. package/dist/builtins/fs/pull.d.ts +62 -0
  62. package/dist/builtins/fs/pull.js +123 -31
  63. package/dist/builtins/fs/pull.js.map +1 -1
  64. package/dist/builtins/fs/pwd.d.ts +19 -5
  65. package/dist/builtins/fs/pwd.js +62 -8
  66. package/dist/builtins/fs/pwd.js.map +1 -1
  67. package/dist/builtins/fs/rm.d.ts +58 -21
  68. package/dist/builtins/fs/rm.js +99 -82
  69. package/dist/builtins/fs/rm.js.map +1 -1
  70. package/dist/builtins/fs/rmdir.d.ts +29 -11
  71. package/dist/builtins/fs/rmdir.js +87 -36
  72. package/dist/builtins/fs/rmdir.js.map +1 -1
  73. package/dist/builtins/fs/touch.d.ts +44 -9
  74. package/dist/builtins/fs/touch.js +91 -27
  75. package/dist/builtins/fs/touch.js.map +1 -1
  76. package/dist/builtins/fs/tree.d.ts +36 -9
  77. package/dist/builtins/fs/tree.js +126 -36
  78. package/dist/builtins/fs/tree.js.map +1 -1
  79. package/dist/builtins/fs/upload.d.ts +22 -3
  80. package/dist/builtins/fs/upload.js +82 -14
  81. package/dist/builtins/fs/upload.js.map +1 -1
  82. package/dist/builtins/fs/xattr.args.d.ts +12 -33
  83. package/dist/builtins/fs/xattr.args.js +17 -95
  84. package/dist/builtins/fs/xattr.args.js.map +1 -1
  85. package/dist/builtins/fs/xattr.d.ts +98 -8
  86. package/dist/builtins/fs/xattr.js +163 -24
  87. package/dist/builtins/fs/xattr.js.map +1 -1
  88. package/dist/builtins/games/bytes.d.ts +201 -5
  89. package/dist/builtins/games/bytes.js +255 -54
  90. package/dist/builtins/games/bytes.js.map +1 -1
  91. package/dist/builtins/games/chimes.d.ts +180 -3
  92. package/dist/builtins/games/chimes.js +203 -26
  93. package/dist/builtins/games/chimes.js.map +1 -1
  94. package/dist/builtins/games/chrislab.d.ts +101 -3
  95. package/dist/builtins/games/chrislab.js +117 -17
  96. package/dist/builtins/games/chrislab.js.map +1 -1
  97. package/dist/builtins/games/cowsay.d.ts +93 -2
  98. package/dist/builtins/games/cowsay.js +90 -31
  99. package/dist/builtins/games/cowsay.js.map +1 -1
  100. package/dist/builtins/games/figlet.d.ts +70 -2
  101. package/dist/builtins/games/figlet.js +83 -6
  102. package/dist/builtins/games/figlet.js.map +1 -1
  103. package/dist/builtins/games/lab.d.ts +104 -5
  104. package/dist/builtins/games/lab.js +144 -6
  105. package/dist/builtins/games/lab.js.map +1 -1
  106. package/dist/builtins/games/lolcat.d.ts +61 -1
  107. package/dist/builtins/games/lolcat.js +59 -24
  108. package/dist/builtins/games/lolcat.js.map +1 -1
  109. package/dist/builtins/games/morse.d.ts +36 -1
  110. package/dist/builtins/games/morse.js +50 -2
  111. package/dist/builtins/games/morse.js.map +1 -1
  112. package/dist/builtins/games/numbers.d.ts +241 -5
  113. package/dist/builtins/games/numbers.js +298 -23
  114. package/dist/builtins/games/numbers.js.map +1 -1
  115. package/dist/builtins/games/play.d.ts +96 -6
  116. package/dist/builtins/games/play.js +137 -6
  117. package/dist/builtins/games/play.js.map +1 -1
  118. package/dist/builtins/games/qr.d.ts +40 -1
  119. package/dist/builtins/games/qr.js +51 -2
  120. package/dist/builtins/games/qr.js.map +1 -1
  121. package/dist/builtins/games/show.d.ts +131 -6
  122. package/dist/builtins/games/show.js +208 -20
  123. package/dist/builtins/games/show.js.map +1 -1
  124. package/dist/builtins/games/sky.d.ts +178 -4
  125. package/dist/builtins/games/sky.js +228 -12
  126. package/dist/builtins/games/sky.js.map +1 -1
  127. package/dist/builtins/games/text.d.ts +258 -7
  128. package/dist/builtins/games/text.js +310 -29
  129. package/dist/builtins/games/text.js.map +1 -1
  130. package/dist/builtins/games/trek.d.ts +67 -3
  131. package/dist/builtins/games/trek.js +63 -10
  132. package/dist/builtins/games/trek.js.map +1 -1
  133. package/dist/builtins/games/wtf.d.ts +58 -1
  134. package/dist/builtins/games/wtf.js +67 -6
  135. package/dist/builtins/games/wtf.js.map +1 -1
  136. package/dist/builtins/help.d.ts +41 -3
  137. package/dist/builtins/help.js +92 -796
  138. package/dist/builtins/help.js.map +1 -1
  139. package/dist/builtins/net/connect.d.ts +36 -3
  140. package/dist/builtins/net/connect.js +84 -26
  141. package/dist/builtins/net/connect.js.map +1 -1
  142. package/dist/builtins/net/cubepath.d.ts +49 -5
  143. package/dist/builtins/net/cubepath.js +69 -27
  144. package/dist/builtins/net/cubepath.js.map +1 -1
  145. package/dist/builtins/net/logout.d.ts +13 -4
  146. package/dist/builtins/net/logout.js +49 -3
  147. package/dist/builtins/net/logout.js.map +1 -1
  148. package/dist/builtins/net/netstat.d.ts +29 -4
  149. package/dist/builtins/net/netstat.js +64 -23
  150. package/dist/builtins/net/netstat.js.map +1 -1
  151. package/dist/builtins/net/pacs.d.ts +169 -15
  152. package/dist/builtins/net/pacs.js +92 -33
  153. package/dist/builtins/net/pacs.js.map +1 -1
  154. package/dist/builtins/net/query.args.d.ts +95 -0
  155. package/dist/builtins/net/query.args.js +26 -0
  156. package/dist/builtins/net/query.args.js.map +1 -0
  157. package/dist/builtins/net/query.d.ts +98 -5
  158. package/dist/builtins/net/query.js +89 -83
  159. package/dist/builtins/net/query.js.map +1 -1
  160. package/dist/builtins/net/status.d.ts +5 -3
  161. package/dist/builtins/net/status.js +5 -12
  162. package/dist/builtins/net/status.js.map +1 -1
  163. package/dist/builtins/parametersofplugin.d.ts +82 -3
  164. package/dist/builtins/parametersofplugin.js +79 -23
  165. package/dist/builtins/parametersofplugin.js.map +1 -1
  166. package/dist/builtins/proc.d.ts +210 -3
  167. package/dist/builtins/proc.js +210 -119
  168. package/dist/builtins/proc.js.map +1 -1
  169. package/dist/builtins/res/compute.d.ts +67 -3
  170. package/dist/builtins/res/compute.js +121 -35
  171. package/dist/builtins/res/compute.js.map +1 -1
  172. package/dist/builtins/res/dicom.d.ts +55 -7
  173. package/dist/builtins/res/dicom.js +86 -52
  174. package/dist/builtins/res/dicom.js.map +1 -1
  175. package/dist/builtins/res/expect.d.ts +52 -3
  176. package/dist/builtins/res/expect.js +92 -29
  177. package/dist/builtins/res/expect.js.map +1 -1
  178. package/dist/builtins/res/feed.d.ts +475 -3
  179. package/dist/builtins/res/feed.js +253 -158
  180. package/dist/builtins/res/feed.js.map +1 -1
  181. package/dist/builtins/res/files.d.ts +517 -3
  182. package/dist/builtins/res/files.js +124 -44
  183. package/dist/builtins/res/files.js.map +1 -1
  184. package/dist/builtins/res/gather.d.ts +113 -3
  185. package/dist/builtins/res/gather.js +153 -44
  186. package/dist/builtins/res/gather.js.map +1 -1
  187. package/dist/builtins/res/gather.process.d.ts +27 -19
  188. package/dist/builtins/res/gather.process.js +29 -59
  189. package/dist/builtins/res/gather.process.js.map +1 -1
  190. package/dist/builtins/res/group.d.ts +284 -3
  191. package/dist/builtins/res/group.js +147 -76
  192. package/dist/builtins/res/group.js.map +1 -1
  193. package/dist/builtins/res/image.d.ts +30 -2
  194. package/dist/builtins/res/image.js +62 -10
  195. package/dist/builtins/res/image.js.map +1 -1
  196. package/dist/builtins/res/play.d.ts +71 -9
  197. package/dist/builtins/res/play.js +124 -82
  198. package/dist/builtins/res/play.js.map +1 -1
  199. package/dist/builtins/res/plugininstance.d.ts +307 -2
  200. package/dist/builtins/res/plugininstance.js +122 -50
  201. package/dist/builtins/res/plugininstance.js.map +1 -1
  202. package/dist/builtins/res/pluginmeta.d.ts +244 -2
  203. package/dist/builtins/res/pluginmeta.js +98 -40
  204. package/dist/builtins/res/pluginmeta.js.map +1 -1
  205. package/dist/builtins/res/record.d.ts +37 -3
  206. package/dist/builtins/res/record.js +127 -57
  207. package/dist/builtins/res/record.js.map +1 -1
  208. package/dist/builtins/res/resourceList.d.ts +136 -0
  209. package/dist/builtins/res/resourceList.js +51 -0
  210. package/dist/builtins/res/resourceList.js.map +1 -0
  211. package/dist/builtins/res/tag.d.ts +244 -3
  212. package/dist/builtins/res/tag.js +97 -41
  213. package/dist/builtins/res/tag.js.map +1 -1
  214. package/dist/builtins/res/user.d.ts +122 -3
  215. package/dist/builtins/res/user.js +83 -21
  216. package/dist/builtins/res/user.js.map +1 -1
  217. package/dist/builtins/res/workflow.d.ts +244 -2
  218. package/dist/builtins/res/workflow.js +97 -40
  219. package/dist/builtins/res/workflow.js.map +1 -1
  220. package/dist/builtins/store.d.ts +85 -3
  221. package/dist/builtins/store.js +135 -68
  222. package/dist/builtins/store.js.map +1 -1
  223. package/dist/builtins/sys/apropos.d.ts +80 -5
  224. package/dist/builtins/sys/apropos.js +121 -15
  225. package/dist/builtins/sys/apropos.js.map +1 -1
  226. package/dist/builtins/sys/cal.d.ts +44 -5
  227. package/dist/builtins/sys/cal.js +57 -10
  228. package/dist/builtins/sys/cal.js.map +1 -1
  229. package/dist/builtins/sys/command.d.ts +20 -0
  230. package/dist/builtins/sys/command.js +31 -0
  231. package/dist/builtins/sys/command.js.map +1 -1
  232. package/dist/builtins/sys/context.d.ts +13 -3
  233. package/dist/builtins/sys/context.js +51 -4
  234. package/dist/builtins/sys/context.js.map +1 -1
  235. package/dist/builtins/sys/date.d.ts +56 -5
  236. package/dist/builtins/sys/date.js +63 -9
  237. package/dist/builtins/sys/date.js.map +1 -1
  238. package/dist/builtins/sys/echo.d.ts +63 -2
  239. package/dist/builtins/sys/echo.js +87 -8
  240. package/dist/builtins/sys/echo.js.map +1 -1
  241. package/dist/builtins/sys/fortune.d.ts +27 -2
  242. package/dist/builtins/sys/fortune.js +44 -2
  243. package/dist/builtins/sys/fortune.js.map +1 -1
  244. package/dist/builtins/sys/grep.d.ts +245 -11
  245. package/dist/builtins/sys/grep.js +418 -131
  246. package/dist/builtins/sys/grep.js.map +1 -1
  247. package/dist/builtins/sys/joblets.d.ts +66 -7
  248. package/dist/builtins/sys/joblets.js +101 -14
  249. package/dist/builtins/sys/joblets.js.map +1 -1
  250. package/dist/builtins/sys/motd.d.ts +37 -3
  251. package/dist/builtins/sys/motd.js +49 -8
  252. package/dist/builtins/sys/motd.js.map +1 -1
  253. package/dist/builtins/sys/notes.d.ts +75 -3
  254. package/dist/builtins/sys/notes.js +90 -29
  255. package/dist/builtins/sys/notes.js.map +1 -1
  256. package/dist/builtins/sys/physicalmode.d.ts +24 -3
  257. package/dist/builtins/sys/physicalmode.js +68 -14
  258. package/dist/builtins/sys/physicalmode.js.map +1 -1
  259. package/dist/builtins/sys/tasks.d.ts +74 -5
  260. package/dist/builtins/sys/tasks.js +102 -14
  261. package/dist/builtins/sys/tasks.js.map +1 -1
  262. package/dist/builtins/sys/textFilters.d.ts +673 -41
  263. package/dist/builtins/sys/textFilters.js +719 -264
  264. package/dist/builtins/sys/textFilters.js.map +1 -1
  265. package/dist/builtins/sys/timing.d.ts +24 -3
  266. package/dist/builtins/sys/timing.js +67 -14
  267. package/dist/builtins/sys/timing.js.map +1 -1
  268. package/dist/builtins/sys/variables.d.ts +70 -4
  269. package/dist/builtins/sys/variables.js +103 -31
  270. package/dist/builtins/sys/variables.js.map +1 -1
  271. package/dist/builtins/sys/version.d.ts +27 -2
  272. package/dist/builtins/sys/version.js +48 -3
  273. package/dist/builtins/sys/version.js.map +1 -1
  274. package/dist/builtins/sys/weather.d.ts +92 -15
  275. package/dist/builtins/sys/weather.js +71 -45
  276. package/dist/builtins/sys/weather.js.map +1 -1
  277. package/dist/builtins/sys/whoami.d.ts +38 -18
  278. package/dist/builtins/sys/whoami.js +112 -8
  279. package/dist/builtins/sys/whoami.js.map +1 -1
  280. package/dist/builtins/utils.d.ts +1 -38
  281. package/dist/builtins/utils.js +1 -87
  282. package/dist/builtins/utils.js.map +1 -1
  283. package/dist/chris/backend.js +2 -0
  284. package/dist/chris/backend.js.map +1 -1
  285. package/dist/chris/chrisCommands.js +62 -159
  286. package/dist/chris/chrisCommands.js.map +1 -1
  287. package/dist/chris/commandFallback.d.ts +12 -0
  288. package/dist/chris/commandFallback.js +47 -0
  289. package/dist/chris/commandFallback.js.map +1 -1
  290. package/dist/chris/files.js +24 -85
  291. package/dist/chris/files.js.map +1 -1
  292. package/dist/chris/filesystem.js +7 -5
  293. package/dist/chris/filesystem.js.map +1 -1
  294. package/dist/chris/help.js +0 -1082
  295. package/dist/chris/help.js.map +1 -1
  296. package/dist/chris/kinds.d.ts +30 -0
  297. package/dist/chris/kinds.js +154 -0
  298. package/dist/chris/kinds.js.map +1 -0
  299. package/dist/chris/mounts.d.ts +4 -4
  300. package/dist/chris/mounts.js +9 -16
  301. package/dist/chris/mounts.js.map +1 -1
  302. package/dist/chris/navigation.d.ts +2 -3
  303. package/dist/chris/navigation.js +6 -20
  304. package/dist/chris/navigation.js.map +1 -1
  305. package/dist/chris/pacsResources.d.ts +259 -0
  306. package/dist/chris/pacsResources.js +168 -0
  307. package/dist/chris/pacsResources.js.map +1 -0
  308. package/dist/chris/promptContext.d.ts +6 -0
  309. package/dist/chris/promptContext.js +3 -1
  310. package/dist/chris/promptContext.js.map +1 -1
  311. package/dist/core/argumentKinds.d.ts +107 -0
  312. package/dist/core/argumentKinds.js +223 -0
  313. package/dist/core/argumentKinds.js.map +1 -0
  314. package/dist/core/backend.d.ts +4 -1
  315. package/dist/core/backend.js.map +1 -1
  316. package/dist/core/commandDeclaration.d.ts +453 -0
  317. package/dist/core/commandDeclaration.js +52 -0
  318. package/dist/core/commandDeclaration.js.map +1 -0
  319. package/dist/core/commandParse.d.ts +64 -0
  320. package/dist/core/commandParse.js +468 -0
  321. package/dist/core/commandParse.js.map +1 -0
  322. package/dist/core/commandRegistry.d.ts +37 -0
  323. package/dist/core/commandRegistry.js +100 -3
  324. package/dist/core/commandRegistry.js.map +1 -1
  325. package/dist/core/commandSchema.d.ts +32 -0
  326. package/dist/core/commandSchema.js +117 -0
  327. package/dist/core/commandSchema.js.map +1 -0
  328. package/dist/core/commandUsage.d.ts +62 -0
  329. package/dist/core/commandUsage.js +247 -0
  330. package/dist/core/commandUsage.js.map +1 -0
  331. package/dist/core/coreCommands.js +66 -214
  332. package/dist/core/coreCommands.js.map +1 -1
  333. package/dist/core/dispatch.js +15 -8
  334. package/dist/core/dispatch.js.map +1 -1
  335. package/dist/core/paths.d.ts +51 -0
  336. package/dist/core/paths.js +86 -2
  337. package/dist/core/paths.js.map +1 -1
  338. package/dist/core/preprocess.d.ts +10 -9
  339. package/dist/core/preprocess.js +10 -20
  340. package/dist/core/preprocess.js.map +1 -1
  341. package/dist/core/warmupFailures.d.ts +34 -2
  342. package/dist/core/warmupFailures.js +43 -2
  343. package/dist/core/warmupFailures.js.map +1 -1
  344. package/dist/lib/completer/cfsPaths.d.ts +14 -0
  345. package/dist/lib/completer/cfsPaths.js +91 -0
  346. package/dist/lib/completer/cfsPaths.js.map +1 -0
  347. package/dist/lib/completer/declared.d.ts +15 -0
  348. package/dist/lib/completer/declared.js +189 -0
  349. package/dist/lib/completer/declared.js.map +1 -0
  350. package/dist/lib/completer/index.js +33 -79
  351. package/dist/lib/completer/index.js.map +1 -1
  352. package/dist/lib/parser.d.ts +5 -8
  353. package/dist/lib/parser.js +2 -11
  354. package/dist/lib/parser.js.map +1 -1
  355. package/dist/lib/vfs/vfs.d.ts +2 -1
  356. package/dist/lib/vfs/vfs.js +9 -6
  357. package/dist/lib/vfs/vfs.js.map +1 -1
  358. package/dist/lib/wildcard.js +2 -3
  359. package/dist/lib/wildcard.js.map +1 -1
  360. package/dist/notes.json +1 -1
  361. package/package.json +6 -5
@@ -2,24 +2,69 @@
2
2
  * @file Builtin version.
3
3
  * Reports the mise stack versions (the chell surface, the brasa engine, its
4
4
  * chili/salsa/cumin layers, and the calypso sibling surface) as a command
5
- * envelope — the in-shell counterpart of `chell --version`.
5
+ * envelope — the in-shell counterpart of `chell --version`. Declared in one
6
+ * record (`versionCommand`).
7
+ *
8
+ * @module
6
9
  */
7
10
  import { versionReport_build, versions_get } from '../../core/version.js';
8
11
  import { envelope_ok } from '@fnndsc/menu';
12
+ import { command_declare } from '../../core/commandDeclaration.js';
13
+ import { declaredCommand_run } from '../../core/commandParse.js';
14
+ /** What a `version` line may hold: nothing. */
15
+ const VERSION_GRAMMAR = {};
16
+ /**
17
+ * `version`: the declaration.
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * commands_register({ declarations: [versionCommand] });
22
+ * ```
23
+ */
24
+ export const versionCommand = command_declare({
25
+ name: 'version',
26
+ grammar: VERSION_GRAMMAR,
27
+ help: {
28
+ summary: 'Report the versions of the mise stack layers running this session',
29
+ description: 'Report the versions of the mise stack layers running this session',
30
+ category: 'General',
31
+ examples: ['version'],
32
+ },
33
+ holds: [],
34
+ handler: async () => version_run(),
35
+ });
9
36
  /**
10
37
  * Reports the version of chell and the brasa engine, its layers, and the
11
38
  * calypso sibling surface it runs with — the same report as `chell --version`,
12
39
  * available from inside the shell.
13
40
  *
14
- * @param _args - Unused.
15
41
  * @returns An envelope carrying the multi-line version report and a typed model
16
42
  * of each layer's version.
43
+ *
44
+ * @example
45
+ * ```ts
46
+ * (await version_run()).model?.kind; // 'sys.version'
47
+ * ```
17
48
  */
18
- export async function builtin_version(_args) {
49
+ export async function version_run() {
19
50
  const versions = versions_get();
20
51
  return envelope_ok(`${versionReport_build()}\n`, {
21
52
  kind: 'sys.version',
22
53
  data: versions,
23
54
  });
24
55
  }
56
+ /**
57
+ * `version` over words already split: the declaration's parse and handler.
58
+ *
59
+ * @param args - The words after `version` (none).
60
+ * @returns The report, or the refusal of a bad line.
61
+ *
62
+ * @example
63
+ * ```ts
64
+ * await builtin_version([]);
65
+ * ```
66
+ */
67
+ export async function builtin_version(args) {
68
+ return declaredCommand_run(versionCommand, args);
69
+ }
25
70
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/builtins/sys/version.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAsB,MAAM,uBAAuB,CAAC;AAC9F,OAAO,EAAmB,WAAW,EAAE,MAAM,cAAc,CAAC;AAE5D;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,KAAe;IACnD,MAAM,QAAQ,GAAkB,YAAY,EAAE,CAAC;IAC/C,OAAO,WAAW,CAAC,GAAG,mBAAmB,EAAE,IAAI,EAAE;QAC/C,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,QAAQ;KACf,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/builtins/sys/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAsB,MAAM,uBAAuB,CAAC;AAC9F,OAAO,EAAmB,WAAW,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAuB,MAAM,kCAAkC,CAAC;AACxF,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,+CAA+C;AAC/C,MAAM,eAAe,GAAG,EAAoC,CAAC;AAE7D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,eAAe,CAAC;IAC5C,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,eAAe;IACxB,IAAI,EAAE;QACJ,OAAO,EAAE,mEAAmE;QAC5E,WAAW,EAAE,mEAAmE;QAChF,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,CAAC,SAAS,CAAC;KACtB;IACD,KAAK,EAAE,EAAE;IACT,OAAO,EAAE,KAAK,IAA8B,EAAE,CAAC,WAAW,EAAE;CAC7D,CAAC,CAAC;AAEH;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW;IAC/B,MAAM,QAAQ,GAAkB,YAAY,EAAE,CAAC;IAC/C,OAAO,WAAW,CAAC,GAAG,mBAAmB,EAAE,IAAI,EAAE;QAC/C,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,QAAQ;KACf,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,IAAc;IAClD,OAAO,mBAAmB,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;AACnD,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { CommandEnvelope } from '@fnndsc/menu';
2
+ import { type CommandArguments } from '../../core/commandDeclaration.js';
2
3
  /**
3
4
  * @file Builtin weather.
4
5
  *
@@ -62,12 +63,6 @@ export interface WeatherReport {
62
63
  now: WeatherNow;
63
64
  days: WeatherDay[];
64
65
  }
65
- /** The words a call line was parsed into. */
66
- interface WeatherArgs {
67
- place: string;
68
- units: WeatherUnits;
69
- days: number;
70
- }
71
66
  /**
72
67
  * Words a WMO weather code.
73
68
  *
@@ -82,15 +77,6 @@ export declare function condition_resolve(code: number): string;
82
77
  * @returns The compass point.
83
78
  */
84
79
  export declare function compass_convertFromDegrees(degrees: number): string;
85
- /**
86
- * Parses the call line: a place in as many words as it takes, `--units`
87
- * for the system, `-d N` for the days shown. Any other flag is refused by
88
- * name.
89
- *
90
- * @param args - The words after `weather`.
91
- * @returns The parsed call, or the refusal to print.
92
- */
93
- export declare function weatherArgs_parse(args: string[]): WeatherArgs | string;
94
80
  /**
95
81
  * Finds a place by name.
96
82
  *
@@ -118,6 +104,79 @@ export declare function report_fetch(fetchFn: WeatherFetch, place: WeatherPlace,
118
104
  * @returns The text, with a trailing newline.
119
105
  */
120
106
  export declare function report_render(report: WeatherReport): string;
107
+ /** What a `weather` line may hold. */
108
+ declare const WEATHER_GRAMMAR: {
109
+ readonly operands: readonly [{
110
+ readonly name: "place";
111
+ readonly kind: "word";
112
+ readonly optional: true;
113
+ readonly repeat: true;
114
+ readonly summary: "The place, in as many words as it takes (default Boston)";
115
+ }];
116
+ readonly options: {
117
+ readonly units: {
118
+ readonly short: "u";
119
+ readonly long: "units";
120
+ readonly summary: "metric (default: °C, km/h) or imperial (°F, mph)";
121
+ readonly value: {
122
+ readonly name: "system";
123
+ readonly kind: "enum";
124
+ readonly values: readonly ["metric", "imperial"];
125
+ };
126
+ };
127
+ readonly days: {
128
+ readonly short: "d";
129
+ readonly long: "days";
130
+ readonly summary: "Days of forecast to show (default 3, at most 16)";
131
+ readonly value: {
132
+ readonly name: "N";
133
+ readonly kind: "int";
134
+ readonly min: 1;
135
+ readonly max: number;
136
+ };
137
+ };
138
+ };
139
+ };
140
+ /**
141
+ * `weather [place] [-u|--units metric|imperial] [-d|--days N]`: the declaration.
142
+ *
143
+ * @example
144
+ * ```ts
145
+ * commands_register({ declarations: [weatherCommand] });
146
+ * ```
147
+ */
148
+ export declare const weatherCommand: import("../../core/commandDeclaration.js").CommandDeclaration<{
149
+ readonly operands: readonly [{
150
+ readonly name: "place";
151
+ readonly kind: "word";
152
+ readonly optional: true;
153
+ readonly repeat: true;
154
+ readonly summary: "The place, in as many words as it takes (default Boston)";
155
+ }];
156
+ readonly options: {
157
+ readonly units: {
158
+ readonly short: "u";
159
+ readonly long: "units";
160
+ readonly summary: "metric (default: °C, km/h) or imperial (°F, mph)";
161
+ readonly value: {
162
+ readonly name: "system";
163
+ readonly kind: "enum";
164
+ readonly values: readonly ["metric", "imperial"];
165
+ };
166
+ };
167
+ readonly days: {
168
+ readonly short: "d";
169
+ readonly long: "days";
170
+ readonly summary: "Days of forecast to show (default 3, at most 16)";
171
+ readonly value: {
172
+ readonly name: "N";
173
+ readonly kind: "int";
174
+ readonly min: 1;
175
+ readonly max: number;
176
+ };
177
+ };
178
+ };
179
+ }>;
121
180
  /**
122
181
  * Reports the weather at a place.
123
182
  *
@@ -127,6 +186,24 @@ export declare function report_render(report: WeatherReport): string;
127
186
  * @returns An envelope carrying the rendered report and the typed report
128
187
  * beneath it; an error envelope when a flag is unknown, the place is not
129
188
  * found, or the service cannot be reached.
189
+ *
190
+ * @example
191
+ * ```ts
192
+ * await builtin_weather(['Paris', '-d', '7']);
193
+ * ```
130
194
  */
131
195
  export declare function builtin_weather(args: string[], fetchFn?: WeatherFetch): Promise<CommandEnvelope>;
196
+ /**
197
+ * Reports the weather for a line already parsed.
198
+ *
199
+ * @param args - The typed line.
200
+ * @param fetchFn - The fetch to go through.
201
+ * @returns The report, or an error envelope when the place is not found or the service cannot be reached.
202
+ *
203
+ * @example
204
+ * ```ts
205
+ * await weather_run({ subcommand: null, operands: { place: ['Paris'] }, options: { units: undefined, days: 7 }, expanded: {} }, fetch);
206
+ * ```
207
+ */
208
+ export declare function weather_run(args: CommandArguments<typeof WEATHER_GRAMMAR>, fetchFn: WeatherFetch): Promise<CommandEnvelope>;
132
209
  export {};
@@ -1,4 +1,6 @@
1
1
  import { envelope_error, envelope_ok } from '@fnndsc/menu';
2
+ import { command_declare } from '../../core/commandDeclaration.js';
3
+ import { declaredCommand_run } from '../../core/commandParse.js';
2
4
  /**
3
5
  * @file Builtin weather.
4
6
  *
@@ -100,44 +102,6 @@ function number_read(value) {
100
102
  function string_read(value) {
101
103
  return typeof value === 'string' ? value : '';
102
104
  }
103
- /**
104
- * Parses the call line: a place in as many words as it takes, `--units`
105
- * for the system, `-d N` for the days shown. Any other flag is refused by
106
- * name.
107
- *
108
- * @param args - The words after `weather`.
109
- * @returns The parsed call, or the refusal to print.
110
- */
111
- export function weatherArgs_parse(args) {
112
- const words = [];
113
- let units = WEATHER_UNITS_DEFAULT;
114
- let days = DAYS_DEFAULT;
115
- for (let i = 0; i < args.length; i++) {
116
- const arg = args[i];
117
- if (arg === '-u' || arg === '--units' || arg.startsWith('--units=')) {
118
- const value = arg.startsWith('--units=') ? arg.slice('--units='.length) : (args[++i] ?? '');
119
- if (value !== 'metric' && value !== 'imperial') {
120
- return `weather: --units takes metric or imperial, not '${value}'`;
121
- }
122
- units = value;
123
- }
124
- else if (arg === '-d' || arg === '--days') {
125
- const value = parseInt(args[i + 1] ?? '', 10);
126
- if (!Number.isFinite(value) || value < 1 || value > DAYS_MAX) {
127
- return `weather: ${arg} takes a number of days, 1 to ${DAYS_MAX}`;
128
- }
129
- days = value;
130
- i++;
131
- }
132
- else if (arg.startsWith('-')) {
133
- return `weather: unknown option '${arg}' (usage: weather [place] [-u|--units metric|imperial] [-d|--days N])`;
134
- }
135
- else {
136
- words.push(arg);
137
- }
138
- }
139
- return { place: words.length > 0 ? words.join(' ') : WEATHER_DEFAULT_PLACE, units, days };
140
- }
141
105
  /**
142
106
  * Fetches one JSON answer, bounded in time.
143
107
  *
@@ -268,6 +232,48 @@ export function report_render(report) {
268
232
  });
269
233
  return `${lines.join('\n')}\n`;
270
234
  }
235
+ /** What a `weather` line may hold. */
236
+ const WEATHER_GRAMMAR = {
237
+ operands: [{ name: 'place', kind: 'word', optional: true, repeat: true, summary: 'The place, in as many words as it takes (default Boston)' }],
238
+ options: {
239
+ units: { short: 'u', long: 'units', summary: 'metric (default: °C, km/h) or imperial (°F, mph)', value: { name: 'system', kind: 'enum', values: ['metric', 'imperial'] } },
240
+ days: { short: 'd', long: 'days', summary: 'Days of forecast to show (default 3, at most 16)', value: { name: 'N', kind: 'int', min: 1, max: DAYS_MAX } },
241
+ },
242
+ };
243
+ /**
244
+ * `weather [place] [-u|--units metric|imperial] [-d|--days N]`: the declaration.
245
+ *
246
+ * @example
247
+ * ```ts
248
+ * commands_register({ declarations: [weatherCommand] });
249
+ * ```
250
+ */
251
+ export const weatherCommand = command_declare({
252
+ name: 'weather',
253
+ grammar: WEATHER_GRAMMAR,
254
+ help: {
255
+ summary: 'The weather at a place, now and the next few days',
256
+ description: 'Reports the current conditions and a short forecast for a place, from Open-Meteo (no key, no account). The place is found by name; with none given it is Boston. Metric (°C, km/h) unless --units imperial asks for °F and mph. The call is made from the session host, so it needs that host to reach the internet.',
257
+ examples: ['weather', 'weather Cape Town', 'weather Boston --units imperial', 'weather Paris -d 7'],
258
+ category: 'Games',
259
+ },
260
+ handler: async (args) => weather_run(args, fetch_global),
261
+ });
262
+ /**
263
+ * The global fetch, as the report goes through it unless a test hands in its own.
264
+ *
265
+ * @param url - What to ask.
266
+ * @param init - The request's options.
267
+ * @returns The answer.
268
+ *
269
+ * @example
270
+ * ```ts
271
+ * const answer: Response = await fetch_global('https://example.org');
272
+ * ```
273
+ */
274
+ function fetch_global(url, init) {
275
+ return fetch(url, init);
276
+ }
271
277
  /**
272
278
  * Reports the weather at a place.
273
279
  *
@@ -277,16 +283,36 @@ export function report_render(report) {
277
283
  * @returns An envelope carrying the rendered report and the typed report
278
284
  * beneath it; an error envelope when a flag is unknown, the place is not
279
285
  * found, or the service cannot be reached.
286
+ *
287
+ * @example
288
+ * ```ts
289
+ * await builtin_weather(['Paris', '-d', '7']);
290
+ * ```
291
+ */
292
+ export async function builtin_weather(args, fetchFn = fetch_global) {
293
+ return declaredCommand_run({ ...weatherCommand, handler: (typed) => weather_run(typed, fetchFn) }, args);
294
+ }
295
+ /**
296
+ * Reports the weather for a line already parsed.
297
+ *
298
+ * @param args - The typed line.
299
+ * @param fetchFn - The fetch to go through.
300
+ * @returns The report, or an error envelope when the place is not found or the service cannot be reached.
301
+ *
302
+ * @example
303
+ * ```ts
304
+ * await weather_run({ subcommand: null, operands: { place: ['Paris'] }, options: { units: undefined, days: 7 }, expanded: {} }, fetch);
305
+ * ```
280
306
  */
281
- export async function builtin_weather(args, fetchFn = (url, init) => fetch(url, init)) {
282
- const parsed = weatherArgs_parse(args);
283
- if (typeof parsed === 'string')
284
- return envelope_error(`${parsed}\n`);
307
+ export async function weather_run(args, fetchFn) {
308
+ const placeName = args.operands.place.length > 0 ? args.operands.place.join(' ') : WEATHER_DEFAULT_PLACE;
309
+ const units = args.options.units ?? WEATHER_UNITS_DEFAULT;
310
+ const days = args.options.days ?? DAYS_DEFAULT;
285
311
  try {
286
- const place = await place_find(fetchFn, parsed.place);
312
+ const place = await place_find(fetchFn, placeName);
287
313
  if (place === null)
288
- return envelope_error(`weather: no such place '${parsed.place}'\n`);
289
- const report = await report_fetch(fetchFn, place, parsed.units, parsed.days);
314
+ return envelope_error(`weather: no such place '${placeName}'\n`);
315
+ const report = await report_fetch(fetchFn, place, units, days);
290
316
  return envelope_ok(report_render(report), { kind: 'sys.weather', data: report });
291
317
  }
292
318
  catch (error) {
@@ -1 +1 @@
1
- {"version":3,"file":"weather.js","sourceRoot":"","sources":["../../../src/builtins/sys/weather.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,cAAc,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC5E;;;;;;;;;;;;;;;;GAgBG;AAEH,iDAAiD;AACjD,MAAM,CAAC,MAAM,qBAAqB,GAAW,QAAQ,CAAC;AAEtD,sDAAsD;AACtD,MAAM,YAAY,GAAW,CAAC,CAAC;AAK/B,yEAAyE;AACzE,MAAM,CAAC,MAAM,qBAAqB,GAAiB,QAAQ,CAAC;AAE5D,iDAAiD;AACjD,MAAM,QAAQ,GAAW,EAAE,CAAC;AAE5B,6DAA6D;AAC7D,MAAM,gBAAgB,GAAW,KAAK,CAAC;AAEvC,2CAA2C;AAC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Ac,CAAC,2BAA2B,SAAS,KAAK,CAAC,CAAC;QACrF,MAAM,MAAM,GAAkB,MAAM,YAAY,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QAC9E,OAAO,WAAW,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IACnF,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACxB,MAAM,MAAM,GAAW,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC9E,OAAO,cAAc,CAAC,YAAY,MAAM,IAAI,CAAC,CAAC;IAChD,CAAC;AACH,CAAC"}
@@ -1,29 +1,49 @@
1
1
  import { type CommandEnvelope } from '@fnndsc/menu';
2
2
  /**
3
- * Reports the current ChRIS identity using Unix `id` notation.
3
+ * `id`: the declaration.
4
4
  *
5
- * CUBE exposes a numeric user ID but no primary-group field. ChELL therefore
6
- * uses the same POSIX projection as `/etc/passwd`: the primary GID and group
7
- * name equal the user's ID and username.
5
+ * @example
6
+ * ```ts
7
+ * commands_register({ declarations: [idCommand] }, 'backend');
8
+ * ```
9
+ */
10
+ export declare const idCommand: import("../../core/commandDeclaration.js").CommandDeclaration<{}>;
11
+ /**
12
+ * `whoami`: the declaration.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * commands_register({ declarations: [whoamiCommand] }, 'backend');
17
+ * ```
18
+ */
19
+ export declare const whoamiCommand: import("../../core/commandDeclaration.js").CommandDeclaration<{}>;
20
+ /**
21
+ * `whereami`: the declaration.
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * commands_register({ declarations: [whereamiCommand] }, 'backend');
26
+ * ```
27
+ */
28
+ export declare const whereamiCommand: import("../../core/commandDeclaration.js").CommandDeclaration<{}>;
29
+ /**
30
+ * `id` over words already split: the declaration's parse and handler.
8
31
  *
9
- * @param _args - Unused.
10
- * @returns An envelope carrying numeric UID/GID identity and every CUBE group
11
- * membership, or an error envelope when identity cannot be resolved.
32
+ * @param args - The words after `id`: none.
33
+ * @returns The identity, or the refusal of a bad line.
12
34
  */
13
- export declare function builtin_id(_args: string[]): Promise<CommandEnvelope>;
35
+ export declare function builtin_id(args: string[]): Promise<CommandEnvelope>;
14
36
  /**
15
- * Reports the current authenticated ChRIS username.
37
+ * `whoami` over words already split: the declaration's parse and handler.
16
38
  *
17
- * @param _args - Unused.
18
- * @returns An envelope carrying the username, or an error envelope with a
19
- * not-connected notice when no user is authenticated.
39
+ * @param args - The words after `whoami`: none.
40
+ * @returns The username, or the refusal of a bad line.
20
41
  */
21
- export declare function builtin_whoami(_args: string[]): Promise<CommandEnvelope>;
42
+ export declare function builtin_whoami(args: string[]): Promise<CommandEnvelope>;
22
43
  /**
23
- * Reports the current CUBE URI.
44
+ * `whereami` over words already split: the declaration's parse and handler.
24
45
  *
25
- * @param _args - Unused.
26
- * @returns An envelope carrying the CUBE URL, or an error envelope with a
27
- * not-connected notice when no connection exists.
46
+ * @param args - The words after `whereami`: none.
47
+ * @returns The CUBE URL, or the refusal of a bad line.
28
48
  */
29
- export declare function builtin_whereami(_args: string[]): Promise<CommandEnvelope>;
49
+ export declare function builtin_whereami(args: string[]): Promise<CommandEnvelope>;
@@ -1,12 +1,32 @@
1
1
  /**
2
- * @file Builtins id, whoami, and whereami.
3
- * Quick single-line identity queries, reported as command envelopes.
2
+ * @file `id`, `whoami` and `whereami`: who the session is on CUBE, and
3
+ * which CUBE, each in a line.
4
+ *
5
+ * Declared in one record each (`idCommand`, `whoamiCommand`,
6
+ * `whereamiCommand`): none takes an operand or an option.
7
+ *
8
+ * Key components:
9
+ * - idCommand, whoamiCommand, whereamiCommand: the declarations.
10
+ * - builtin_id, builtin_whoami, builtin_whereami: each declaration run over words already split.
11
+ *
12
+ * Typical usage:
13
+ * ```ts
14
+ * await builtin_whoami([]);
15
+ * ```
16
+ *
17
+ * Dependencies: the session's context and identity (salsa, cumin).
18
+ *
19
+ * @module
4
20
  */
5
21
  import chalk from 'chalk';
6
22
  import { context_getSingle } from '@fnndsc/salsa';
7
23
  import { currentIdentity_get } from '@fnndsc/cumin';
8
24
  import { envelope_error, envelope_ok } from '@fnndsc/menu';
9
25
  import { exitCode_set } from '../../core/handlerRun.js';
26
+ import { command_declare } from '../../core/commandDeclaration.js';
27
+ import { declaredCommand_run } from '../../core/commandParse.js';
28
+ /** What an `id`, `whoami` or `whereami` line may hold: nothing after the command. */
29
+ const IDENTITY_GRAMMAR = {};
10
30
  /**
11
31
  * Reports the current ChRIS identity using Unix `id` notation.
12
32
  *
@@ -14,11 +34,10 @@ import { exitCode_set } from '../../core/handlerRun.js';
14
34
  * uses the same POSIX projection as `/etc/passwd`: the primary GID and group
15
35
  * name equal the user's ID and username.
16
36
  *
17
- * @param _args - Unused.
18
37
  * @returns An envelope carrying numeric UID/GID identity and every CUBE group
19
38
  * membership, or an error envelope when identity cannot be resolved.
20
39
  */
21
- export async function builtin_id(_args) {
40
+ async function id_run() {
22
41
  const result = await currentIdentity_get();
23
42
  if (!result.ok) {
24
43
  exitCode_set(1);
@@ -55,11 +74,10 @@ export async function builtin_id(_args) {
55
74
  /**
56
75
  * Reports the current authenticated ChRIS username.
57
76
  *
58
- * @param _args - Unused.
59
77
  * @returns An envelope carrying the username, or an error envelope with a
60
78
  * not-connected notice when no user is authenticated.
61
79
  */
62
- export async function builtin_whoami(_args) {
80
+ async function whoami_run() {
63
81
  const context = await context_getSingle();
64
82
  if (context.user) {
65
83
  return envelope_ok(`${chalk.cyan(context.user)}\n`, {
@@ -73,11 +91,10 @@ export async function builtin_whoami(_args) {
73
91
  /**
74
92
  * Reports the current CUBE URI.
75
93
  *
76
- * @param _args - Unused.
77
94
  * @returns An envelope carrying the CUBE URL, or an error envelope with a
78
95
  * not-connected notice when no connection exists.
79
96
  */
80
- export async function builtin_whereami(_args) {
97
+ async function whereami_run() {
81
98
  const context = await context_getSingle();
82
99
  if (context.URL) {
83
100
  return envelope_ok(`${chalk.blue(context.URL)}\n`, {
@@ -88,4 +105,91 @@ export async function builtin_whereami(_args) {
88
105
  exitCode_set(1);
89
106
  return envelope_error(`${chalk.gray('(not connected)')}\n`);
90
107
  }
108
+ /**
109
+ * `id`: the declaration.
110
+ *
111
+ * @example
112
+ * ```ts
113
+ * commands_register({ declarations: [idCommand] }, 'backend');
114
+ * ```
115
+ */
116
+ export const idCommand = command_declare({
117
+ name: 'id',
118
+ grammar: IDENTITY_GRAMMAR,
119
+ help: {
120
+ summary: 'Print the CUBE user as a Unix-style uid, gid and groups',
121
+ description: 'Print the current CUBE user as a Unix-style UID, projected primary GID, and complete list of CUBE group memberships.',
122
+ category: 'Connection',
123
+ examples: ['id'],
124
+ },
125
+ holds: [],
126
+ handler: async () => id_run(),
127
+ });
128
+ /**
129
+ * `whoami`: the declaration.
130
+ *
131
+ * @example
132
+ * ```ts
133
+ * commands_register({ declarations: [whoamiCommand] }, 'backend');
134
+ * ```
135
+ */
136
+ export const whoamiCommand = command_declare({
137
+ name: 'whoami',
138
+ grammar: IDENTITY_GRAMMAR,
139
+ help: {
140
+ summary: 'Print the currently authenticated ChRIS username',
141
+ description: 'Print the currently authenticated ChRIS username; a session not connected says so.',
142
+ category: 'Connection',
143
+ examples: ['whoami'],
144
+ },
145
+ holds: [],
146
+ handler: async () => whoami_run(),
147
+ });
148
+ /**
149
+ * `whereami`: the declaration.
150
+ *
151
+ * @example
152
+ * ```ts
153
+ * commands_register({ declarations: [whereamiCommand] }, 'backend');
154
+ * ```
155
+ */
156
+ export const whereamiCommand = command_declare({
157
+ name: 'whereami',
158
+ grammar: IDENTITY_GRAMMAR,
159
+ help: {
160
+ summary: 'Print the current CUBE URL',
161
+ description: 'Print the URL of the CUBE this session talks to; a session not connected says so.',
162
+ category: 'Connection',
163
+ examples: ['whereami'],
164
+ },
165
+ holds: [],
166
+ handler: async () => whereami_run(),
167
+ });
168
+ /**
169
+ * `id` over words already split: the declaration's parse and handler.
170
+ *
171
+ * @param args - The words after `id`: none.
172
+ * @returns The identity, or the refusal of a bad line.
173
+ */
174
+ export async function builtin_id(args) {
175
+ return declaredCommand_run(idCommand, args);
176
+ }
177
+ /**
178
+ * `whoami` over words already split: the declaration's parse and handler.
179
+ *
180
+ * @param args - The words after `whoami`: none.
181
+ * @returns The username, or the refusal of a bad line.
182
+ */
183
+ export async function builtin_whoami(args) {
184
+ return declaredCommand_run(whoamiCommand, args);
185
+ }
186
+ /**
187
+ * `whereami` over words already split: the declaration's parse and handler.
188
+ *
189
+ * @param args - The words after `whereami`: none.
190
+ * @returns The CUBE URL, or the refusal of a bad line.
191
+ */
192
+ export async function builtin_whereami(args) {
193
+ return declaredCommand_run(whereamiCommand, args);
194
+ }
91
195
  //# sourceMappingURL=whoami.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"whoami.js","sourceRoot":"","sources":["../../../src/builtins/sys/whoami.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAA2D,MAAM,eAAe,CAAC;AAE7G,OAAO,EAAE,cAAc,EAAE,WAAW,EAAwB,MAAM,cAAc,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAQxD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,KAAe;IAC9C,MAAM,MAAM,GAA0B,MAAM,mBAAmB,EAAE,CAAC;IAClE,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,YAAY,CAAC,CAAC,CAAC,CAAC;QAChB,OAAO,cAAc,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;IACrE,CAAC;IAED,MAAM,QAAQ,GAAkB,MAAM,CAAC,KAAK,C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