@fnndsc/brasa 0.56.2 → 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 (322) hide show
  1. package/dist/buildinfo.json +1 -1
  2. package/dist/builtins/berth/berthCube.d.ts +3 -2
  3. package/dist/builtins/berth/berthCube.js +5 -10
  4. package/dist/builtins/berth/berthCube.js.map +1 -1
  5. package/dist/builtins/debug.d.ts +24 -3
  6. package/dist/builtins/debug.js +66 -13
  7. package/dist/builtins/debug.js.map +1 -1
  8. package/dist/builtins/fs/acl.args.d.ts +5 -38
  9. package/dist/builtins/fs/acl.args.js +6 -72
  10. package/dist/builtins/fs/acl.args.js.map +1 -1
  11. package/dist/builtins/fs/acl.d.ts +100 -10
  12. package/dist/builtins/fs/acl.js +222 -68
  13. package/dist/builtins/fs/acl.js.map +1 -1
  14. package/dist/builtins/fs/cat.args.d.ts +14 -15
  15. package/dist/builtins/fs/cat.args.js +13 -40
  16. package/dist/builtins/fs/cat.args.js.map +1 -1
  17. package/dist/builtins/fs/cat.d.ts +40 -3
  18. package/dist/builtins/fs/cat.js +89 -10
  19. package/dist/builtins/fs/cat.js.map +1 -1
  20. package/dist/builtins/fs/cd.d.ts +24 -6
  21. package/dist/builtins/fs/cd.js +71 -18
  22. package/dist/builtins/fs/cd.js.map +1 -1
  23. package/dist/builtins/fs/configWrite.d.ts +24 -8
  24. package/dist/builtins/fs/configWrite.js +77 -36
  25. package/dist/builtins/fs/configWrite.js.map +1 -1
  26. package/dist/builtins/fs/cp.d.ts +39 -4
  27. package/dist/builtins/fs/cp.js +120 -55
  28. package/dist/builtins/fs/cp.js.map +1 -1
  29. package/dist/builtins/fs/du.d.ts +59 -33
  30. package/dist/builtins/fs/du.js +111 -79
  31. package/dist/builtins/fs/du.js.map +1 -1
  32. package/dist/builtins/fs/edit.d.ts +19 -4
  33. package/dist/builtins/fs/edit.js +77 -16
  34. package/dist/builtins/fs/edit.js.map +1 -1
  35. package/dist/builtins/fs/find.d.ts +25 -0
  36. package/dist/builtins/fs/find.js +76 -5
  37. package/dist/builtins/fs/find.js.map +1 -1
  38. package/dist/builtins/fs/mkdir.d.ts +28 -18
  39. package/dist/builtins/fs/mkdir.js +95 -66
  40. package/dist/builtins/fs/mkdir.js.map +1 -1
  41. package/dist/builtins/fs/mv.d.ts +34 -4
  42. package/dist/builtins/fs/mv.js +129 -64
  43. package/dist/builtins/fs/mv.js.map +1 -1
  44. package/dist/builtins/fs/pull.args.d.ts +56 -17
  45. package/dist/builtins/fs/pull.args.js +16 -66
  46. package/dist/builtins/fs/pull.args.js.map +1 -1
  47. package/dist/builtins/fs/pull.d.ts +62 -0
  48. package/dist/builtins/fs/pull.js +86 -22
  49. package/dist/builtins/fs/pull.js.map +1 -1
  50. package/dist/builtins/fs/pwd.d.ts +19 -5
  51. package/dist/builtins/fs/pwd.js +62 -8
  52. package/dist/builtins/fs/pwd.js.map +1 -1
  53. package/dist/builtins/fs/rm.d.ts +58 -21
  54. package/dist/builtins/fs/rm.js +99 -82
  55. package/dist/builtins/fs/rm.js.map +1 -1
  56. package/dist/builtins/fs/rmdir.d.ts +29 -11
  57. package/dist/builtins/fs/rmdir.js +87 -36
  58. package/dist/builtins/fs/rmdir.js.map +1 -1
  59. package/dist/builtins/fs/touch.d.ts +44 -9
  60. package/dist/builtins/fs/touch.js +91 -27
  61. package/dist/builtins/fs/touch.js.map +1 -1
  62. package/dist/builtins/fs/tree.d.ts +36 -9
  63. package/dist/builtins/fs/tree.js +126 -36
  64. package/dist/builtins/fs/tree.js.map +1 -1
  65. package/dist/builtins/fs/upload.d.ts +22 -3
  66. package/dist/builtins/fs/upload.js +82 -14
  67. package/dist/builtins/fs/upload.js.map +1 -1
  68. package/dist/builtins/fs/xattr.args.d.ts +12 -33
  69. package/dist/builtins/fs/xattr.args.js +17 -95
  70. package/dist/builtins/fs/xattr.args.js.map +1 -1
  71. package/dist/builtins/fs/xattr.d.ts +98 -8
  72. package/dist/builtins/fs/xattr.js +163 -24
  73. package/dist/builtins/fs/xattr.js.map +1 -1
  74. package/dist/builtins/games/bytes.d.ts +201 -5
  75. package/dist/builtins/games/bytes.js +255 -54
  76. package/dist/builtins/games/bytes.js.map +1 -1
  77. package/dist/builtins/games/chimes.d.ts +180 -3
  78. package/dist/builtins/games/chimes.js +203 -26
  79. package/dist/builtins/games/chimes.js.map +1 -1
  80. package/dist/builtins/games/chrislab.d.ts +101 -3
  81. package/dist/builtins/games/chrislab.js +117 -17
  82. package/dist/builtins/games/chrislab.js.map +1 -1
  83. package/dist/builtins/games/cowsay.d.ts +93 -2
  84. package/dist/builtins/games/cowsay.js +90 -31
  85. package/dist/builtins/games/cowsay.js.map +1 -1
  86. package/dist/builtins/games/figlet.d.ts +70 -2
  87. package/dist/builtins/games/figlet.js +83 -6
  88. package/dist/builtins/games/figlet.js.map +1 -1
  89. package/dist/builtins/games/lab.d.ts +104 -5
  90. package/dist/builtins/games/lab.js +144 -6
  91. package/dist/builtins/games/lab.js.map +1 -1
  92. package/dist/builtins/games/lolcat.d.ts +61 -1
  93. package/dist/builtins/games/lolcat.js +59 -24
  94. package/dist/builtins/games/lolcat.js.map +1 -1
  95. package/dist/builtins/games/morse.d.ts +36 -1
  96. package/dist/builtins/games/morse.js +50 -2
  97. package/dist/builtins/games/morse.js.map +1 -1
  98. package/dist/builtins/games/numbers.d.ts +241 -5
  99. package/dist/builtins/games/numbers.js +298 -23
  100. package/dist/builtins/games/numbers.js.map +1 -1
  101. package/dist/builtins/games/play.d.ts +96 -6
  102. package/dist/builtins/games/play.js +137 -6
  103. package/dist/builtins/games/play.js.map +1 -1
  104. package/dist/builtins/games/qr.d.ts +40 -1
  105. package/dist/builtins/games/qr.js +51 -2
  106. package/dist/builtins/games/qr.js.map +1 -1
  107. package/dist/builtins/games/show.d.ts +131 -6
  108. package/dist/builtins/games/show.js +208 -20
  109. package/dist/builtins/games/show.js.map +1 -1
  110. package/dist/builtins/games/sky.d.ts +178 -4
  111. package/dist/builtins/games/sky.js +228 -12
  112. package/dist/builtins/games/sky.js.map +1 -1
  113. package/dist/builtins/games/text.d.ts +258 -7
  114. package/dist/builtins/games/text.js +310 -29
  115. package/dist/builtins/games/text.js.map +1 -1
  116. package/dist/builtins/games/trek.d.ts +67 -3
  117. package/dist/builtins/games/trek.js +63 -10
  118. package/dist/builtins/games/trek.js.map +1 -1
  119. package/dist/builtins/games/wtf.d.ts +58 -1
  120. package/dist/builtins/games/wtf.js +67 -6
  121. package/dist/builtins/games/wtf.js.map +1 -1
  122. package/dist/builtins/help.d.ts +38 -2
  123. package/dist/builtins/help.js +76 -769
  124. package/dist/builtins/help.js.map +1 -1
  125. package/dist/builtins/net/connect.d.ts +36 -3
  126. package/dist/builtins/net/connect.js +84 -26
  127. package/dist/builtins/net/connect.js.map +1 -1
  128. package/dist/builtins/net/cubepath.d.ts +49 -5
  129. package/dist/builtins/net/cubepath.js +69 -27
  130. package/dist/builtins/net/cubepath.js.map +1 -1
  131. package/dist/builtins/net/logout.d.ts +13 -4
  132. package/dist/builtins/net/logout.js +49 -3
  133. package/dist/builtins/net/logout.js.map +1 -1
  134. package/dist/builtins/net/netstat.d.ts +29 -4
  135. package/dist/builtins/net/netstat.js +64 -23
  136. package/dist/builtins/net/netstat.js.map +1 -1
  137. package/dist/builtins/net/pacs.d.ts +169 -15
  138. package/dist/builtins/net/pacs.js +92 -33
  139. package/dist/builtins/net/pacs.js.map +1 -1
  140. package/dist/builtins/net/query.args.d.ts +95 -0
  141. package/dist/builtins/net/query.args.js +26 -0
  142. package/dist/builtins/net/query.args.js.map +1 -0
  143. package/dist/builtins/net/query.d.ts +98 -5
  144. package/dist/builtins/net/query.js +89 -83
  145. package/dist/builtins/net/query.js.map +1 -1
  146. package/dist/builtins/net/status.d.ts +5 -3
  147. package/dist/builtins/net/status.js +5 -12
  148. package/dist/builtins/net/status.js.map +1 -1
  149. package/dist/builtins/parametersofplugin.d.ts +82 -3
  150. package/dist/builtins/parametersofplugin.js +79 -23
  151. package/dist/builtins/parametersofplugin.js.map +1 -1
  152. package/dist/builtins/proc.d.ts +210 -3
  153. package/dist/builtins/proc.js +210 -119
  154. package/dist/builtins/proc.js.map +1 -1
  155. package/dist/builtins/res/compute.d.ts +67 -3
  156. package/dist/builtins/res/compute.js +121 -35
  157. package/dist/builtins/res/compute.js.map +1 -1
  158. package/dist/builtins/res/dicom.d.ts +52 -3
  159. package/dist/builtins/res/dicom.js +82 -34
  160. package/dist/builtins/res/dicom.js.map +1 -1
  161. package/dist/builtins/res/expect.d.ts +52 -3
  162. package/dist/builtins/res/expect.js +92 -29
  163. package/dist/builtins/res/expect.js.map +1 -1
  164. package/dist/builtins/res/feed.d.ts +475 -3
  165. package/dist/builtins/res/feed.js +253 -158
  166. package/dist/builtins/res/feed.js.map +1 -1
  167. package/dist/builtins/res/files.d.ts +517 -3
  168. package/dist/builtins/res/files.js +124 -44
  169. package/dist/builtins/res/files.js.map +1 -1
  170. package/dist/builtins/res/gather.d.ts +113 -3
  171. package/dist/builtins/res/gather.js +153 -44
  172. package/dist/builtins/res/gather.js.map +1 -1
  173. package/dist/builtins/res/gather.process.d.ts +27 -19
  174. package/dist/builtins/res/gather.process.js +29 -59
  175. package/dist/builtins/res/gather.process.js.map +1 -1
  176. package/dist/builtins/res/group.d.ts +284 -3
  177. package/dist/builtins/res/group.js +147 -76
  178. package/dist/builtins/res/group.js.map +1 -1
  179. package/dist/builtins/res/image.d.ts +30 -2
  180. package/dist/builtins/res/image.js +62 -10
  181. package/dist/builtins/res/image.js.map +1 -1
  182. package/dist/builtins/res/play.d.ts +71 -9
  183. package/dist/builtins/res/play.js +124 -82
  184. package/dist/builtins/res/play.js.map +1 -1
  185. package/dist/builtins/res/plugininstance.d.ts +307 -2
  186. package/dist/builtins/res/plugininstance.js +122 -50
  187. package/dist/builtins/res/plugininstance.js.map +1 -1
  188. package/dist/builtins/res/pluginmeta.d.ts +244 -2
  189. package/dist/builtins/res/pluginmeta.js +98 -40
  190. package/dist/builtins/res/pluginmeta.js.map +1 -1
  191. package/dist/builtins/res/record.d.ts +37 -3
  192. package/dist/builtins/res/record.js +127 -57
  193. package/dist/builtins/res/record.js.map +1 -1
  194. package/dist/builtins/res/resourceList.d.ts +136 -0
  195. package/dist/builtins/res/resourceList.js +51 -0
  196. package/dist/builtins/res/resourceList.js.map +1 -0
  197. package/dist/builtins/res/tag.d.ts +244 -3
  198. package/dist/builtins/res/tag.js +97 -41
  199. package/dist/builtins/res/tag.js.map +1 -1
  200. package/dist/builtins/res/user.d.ts +122 -3
  201. package/dist/builtins/res/user.js +83 -21
  202. package/dist/builtins/res/user.js.map +1 -1
  203. package/dist/builtins/res/workflow.d.ts +244 -2
  204. package/dist/builtins/res/workflow.js +97 -40
  205. package/dist/builtins/res/workflow.js.map +1 -1
  206. package/dist/builtins/store.d.ts +85 -3
  207. package/dist/builtins/store.js +135 -68
  208. package/dist/builtins/store.js.map +1 -1
  209. package/dist/builtins/sys/apropos.d.ts +80 -5
  210. package/dist/builtins/sys/apropos.js +121 -15
  211. package/dist/builtins/sys/apropos.js.map +1 -1
  212. package/dist/builtins/sys/cal.d.ts +44 -5
  213. package/dist/builtins/sys/cal.js +57 -10
  214. package/dist/builtins/sys/cal.js.map +1 -1
  215. package/dist/builtins/sys/command.d.ts +20 -0
  216. package/dist/builtins/sys/command.js +31 -0
  217. package/dist/builtins/sys/command.js.map +1 -1
  218. package/dist/builtins/sys/context.d.ts +13 -3
  219. package/dist/builtins/sys/context.js +51 -4
  220. package/dist/builtins/sys/context.js.map +1 -1
  221. package/dist/builtins/sys/date.d.ts +56 -5
  222. package/dist/builtins/sys/date.js +63 -9
  223. package/dist/builtins/sys/date.js.map +1 -1
  224. package/dist/builtins/sys/echo.d.ts +63 -2
  225. package/dist/builtins/sys/echo.js +87 -8
  226. package/dist/builtins/sys/echo.js.map +1 -1
  227. package/dist/builtins/sys/fortune.d.ts +27 -2
  228. package/dist/builtins/sys/fortune.js +44 -2
  229. package/dist/builtins/sys/fortune.js.map +1 -1
  230. package/dist/builtins/sys/grep.d.ts +245 -11
  231. package/dist/builtins/sys/grep.js +418 -131
  232. package/dist/builtins/sys/grep.js.map +1 -1
  233. package/dist/builtins/sys/joblets.d.ts +66 -7
  234. package/dist/builtins/sys/joblets.js +101 -14
  235. package/dist/builtins/sys/joblets.js.map +1 -1
  236. package/dist/builtins/sys/motd.d.ts +37 -3
  237. package/dist/builtins/sys/motd.js +49 -8
  238. package/dist/builtins/sys/motd.js.map +1 -1
  239. package/dist/builtins/sys/notes.d.ts +75 -3
  240. package/dist/builtins/sys/notes.js +90 -29
  241. package/dist/builtins/sys/notes.js.map +1 -1
  242. package/dist/builtins/sys/physicalmode.d.ts +24 -3
  243. package/dist/builtins/sys/physicalmode.js +68 -14
  244. package/dist/builtins/sys/physicalmode.js.map +1 -1
  245. package/dist/builtins/sys/tasks.d.ts +74 -5
  246. package/dist/builtins/sys/tasks.js +102 -14
  247. package/dist/builtins/sys/tasks.js.map +1 -1
  248. package/dist/builtins/sys/textFilters.d.ts +673 -41
  249. package/dist/builtins/sys/textFilters.js +718 -263
  250. package/dist/builtins/sys/textFilters.js.map +1 -1
  251. package/dist/builtins/sys/timing.d.ts +24 -3
  252. package/dist/builtins/sys/timing.js +67 -14
  253. package/dist/builtins/sys/timing.js.map +1 -1
  254. package/dist/builtins/sys/variables.d.ts +70 -4
  255. package/dist/builtins/sys/variables.js +103 -31
  256. package/dist/builtins/sys/variables.js.map +1 -1
  257. package/dist/builtins/sys/version.d.ts +27 -2
  258. package/dist/builtins/sys/version.js +48 -3
  259. package/dist/builtins/sys/version.js.map +1 -1
  260. package/dist/builtins/sys/weather.d.ts +92 -15
  261. package/dist/builtins/sys/weather.js +71 -45
  262. package/dist/builtins/sys/weather.js.map +1 -1
  263. package/dist/builtins/sys/whoami.d.ts +38 -18
  264. package/dist/builtins/sys/whoami.js +112 -8
  265. package/dist/builtins/sys/whoami.js.map +1 -1
  266. package/dist/builtins/utils.d.ts +0 -37
  267. package/dist/builtins/utils.js +0 -86
  268. package/dist/builtins/utils.js.map +1 -1
  269. package/dist/chris/chrisCommands.js +58 -152
  270. package/dist/chris/chrisCommands.js.map +1 -1
  271. package/dist/chris/commandFallback.d.ts +12 -0
  272. package/dist/chris/commandFallback.js +47 -0
  273. package/dist/chris/commandFallback.js.map +1 -1
  274. package/dist/chris/filesystem.js +7 -5
  275. package/dist/chris/filesystem.js.map +1 -1
  276. package/dist/chris/help.js +0 -1018
  277. package/dist/chris/help.js.map +1 -1
  278. package/dist/chris/kinds.d.ts +21 -0
  279. package/dist/chris/kinds.js +114 -2
  280. package/dist/chris/kinds.js.map +1 -1
  281. package/dist/chris/mounts.d.ts +4 -4
  282. package/dist/chris/mounts.js +9 -16
  283. package/dist/chris/mounts.js.map +1 -1
  284. package/dist/chris/navigation.d.ts +2 -3
  285. package/dist/chris/navigation.js +6 -20
  286. package/dist/chris/navigation.js.map +1 -1
  287. package/dist/chris/pacsResources.d.ts +259 -0
  288. package/dist/chris/pacsResources.js +168 -0
  289. package/dist/chris/pacsResources.js.map +1 -0
  290. package/dist/core/commandDeclaration.d.ts +97 -7
  291. package/dist/core/commandDeclaration.js +21 -0
  292. package/dist/core/commandDeclaration.js.map +1 -1
  293. package/dist/core/commandParse.js +65 -17
  294. package/dist/core/commandParse.js.map +1 -1
  295. package/dist/core/commandRegistry.d.ts +4 -3
  296. package/dist/core/commandRegistry.js +36 -8
  297. package/dist/core/commandRegistry.js.map +1 -1
  298. package/dist/core/commandSchema.js +5 -2
  299. package/dist/core/commandSchema.js.map +1 -1
  300. package/dist/core/commandUsage.d.ts +15 -0
  301. package/dist/core/commandUsage.js +59 -7
  302. package/dist/core/commandUsage.js.map +1 -1
  303. package/dist/core/coreCommands.js +63 -212
  304. package/dist/core/coreCommands.js.map +1 -1
  305. package/dist/core/paths.d.ts +29 -1
  306. package/dist/core/paths.js +15 -2
  307. package/dist/core/paths.js.map +1 -1
  308. package/dist/core/preprocess.d.ts +3 -4
  309. package/dist/core/preprocess.js +4 -5
  310. package/dist/core/preprocess.js.map +1 -1
  311. package/dist/lib/completer/declared.js +7 -4
  312. package/dist/lib/completer/declared.js.map +1 -1
  313. package/dist/lib/completer/index.js +2 -7
  314. package/dist/lib/completer/index.js.map +1 -1
  315. package/dist/lib/parser.d.ts +0 -8
  316. package/dist/lib/parser.js +0 -11
  317. package/dist/lib/parser.js.map +1 -1
  318. package/dist/lib/vfs/vfs.d.ts +2 -1
  319. package/dist/lib/vfs/vfs.js +5 -4
  320. package/dist/lib/vfs/vfs.js.map +1 -1
  321. package/dist/notes.json +1 -1
  322. package/package.json +3 -3
@@ -1,16 +1,27 @@
1
1
  /**
2
- * @file Builtin plugininstance command.
2
+ * @file `plugininstance` and its other names (`plugininstances`, `instance`,
3
+ * `instances`, `job`, `jobs`): CUBE's plugin instances, the jobs, listed,
4
+ * searched, and their fields named. A job is worked where it lives, in
5
+ * /proc/jobs; the verbs that would do it here say how instead.
3
6
  *
4
- * Subcommands: list, search, inspect
5
- * Aliases: plugininstance / plugininstances / instance / instances / job / jobs
7
+ * Declared in one record (`plugininstanceCommand`, its other names as aliases): the
8
+ * subcommands and the listing options every resource command reads.
9
+ *
10
+ * Key components:
11
+ * - plugininstanceCommand: the declaration, answered under each of its names.
12
+ * - builtin_plugininstance: the declaration run over words already split.
13
+ *
14
+ * @module
6
15
  */
7
16
  import chalk from 'chalk';
8
- import { commandArgs_process, cliOptions_extract, resourceListOptions_refusal, resourceSearchTerm_refusal, resourceSearch_args } from '../utils.js';
9
17
  import { pluginInstances_fetchList } from '@fnndsc/chili/commands/plugininstances/list.js';
10
18
  import { pluginInstanceFields_fetch } from '@fnndsc/chili/commands/plugininstances/fields.js';
11
19
  import { table_render } from '@fnndsc/chili/screen/screen.js';
12
20
  import { envelope_ok, envelope_error } from '@fnndsc/menu';
13
21
  import { exitCode_set } from '../../core/handlerRun.js';
22
+ import { command_declare } from '../../core/commandDeclaration.js';
23
+ import { declaredCommand_run } from '../../core/commandParse.js';
24
+ import { RESOURCE_LIST_OPTIONS_GRAMMAR, resourceListBag_build } from './resourceList.js';
14
25
  /**
15
26
  * Projects a listed row onto the wire's instance model: the fields the
16
27
  * listing selected, typed; a field the listing did not select is absent.
@@ -54,58 +65,119 @@ const PROC_WAYS = {
54
65
  log: '`cat <path>/log` is its log',
55
66
  };
56
67
  /**
57
- * Builtin handler for the `plugininstance` command.
68
+ * Lists the plugin instances a listing's options ask for, as a table and as
69
+ * the run history a surface reads (a catalogue's RECENT block) rather than scrapes.
58
70
  *
59
- * @param args - Parsed command arguments for the plugin-instance command.
71
+ * @param options - The bag chili's listing reads.
72
+ * @returns The table and model, or that there are none, or the error.
60
73
  */
61
- export async function builtin_plugininstance(args) {
62
- const parsed = commandArgs_process(args);
63
- const subcommand = parsed._[0];
64
- if (!subcommand || subcommand === 'list') {
65
- const refusal = resourceListOptions_refusal('plugininstance', parsed);
66
- if (refusal !== null) {
67
- exitCode_set(1);
68
- return envelope_error('', undefined, `${chalk.red(refusal)}\n`);
69
- }
70
- try {
71
- const { pluginInstances, selectedFields, totalCount } = await pluginInstances_fetchList(cliOptions_extract(parsed));
72
- // The listing is a model as well as a table: the run history a surface
73
- // reads (a catalogue's RECENT block) rather than scrapes.
74
- const model = { kind: 'plugininstance.list', data: pluginInstances.map(instanceRow_project) };
75
- if (pluginInstances.length === 0) {
76
- return envelope_ok(`${chalk.gray('No plugin instances found.')}\n`, model);
77
- }
78
- return envelope_ok(table_render(pluginInstances, selectedFields, { title: { title: 'Plugin Instances', justification: 'center' }, pagination: totalCount !== undefined ? { shown: pluginInstances.length, total: totalCount } : undefined }), model);
79
- }
80
- catch (e) {
81
- exitCode_set(1);
82
- return envelope_error('', undefined, `${chalk.red(`plugininstance error: ${e instanceof Error ? e.message : String(e)}`)}\n`);
83
- }
84
- }
85
- if (subcommand === 'search') {
86
- const refusal = resourceSearchTerm_refusal('plugininstance', parsed);
87
- if (refusal !== null) {
88
- exitCode_set(1);
89
- return envelope_error('', undefined, `${chalk.red(refusal)}\n`);
90
- }
91
- return builtin_plugininstance(resourceSearch_args(parsed));
92
- }
93
- if (subcommand === 'inspect') {
94
- const fields = await pluginInstanceFields_fetch();
95
- if (fields && fields.length > 0) {
96
- return envelope_ok(table_render(fields.map((f) => ({ field: f })), ['field'], { title: { title: 'Plugin Instance fields', justification: 'center' } }));
74
+ async function plugininstanceList_render(options) {
75
+ try {
76
+ const { pluginInstances, selectedFields, totalCount } = await pluginInstances_fetchList(options);
77
+ const model = { kind: 'plugininstance.list', data: pluginInstances.map(instanceRow_project) };
78
+ if (pluginInstances.length === 0) {
79
+ return envelope_ok(`${chalk.gray('No plugin instances found.')}\n`, model);
97
80
  }
98
- return envelope_ok(`${chalk.gray('No fields found for plugin instances.')}\n`);
81
+ return envelope_ok(table_render(pluginInstances, selectedFields, { title: { title: 'Plugin Instances', justification: 'center' }, pagination: totalCount !== undefined ? { shown: pluginInstances.length, total: totalCount } : undefined }), model);
99
82
  }
100
- // A job is worked where it lives, in /proc/jobs: these verbs name the path
101
- // rather than keep a second way to do what the tree already does.
102
- const where = PROC_WAYS[subcommand];
103
- if (where !== undefined) {
104
- const id = String(parsed._[1] ?? '<id>');
83
+ catch (e) {
105
84
  exitCode_set(1);
106
- return envelope_error('', undefined, `${chalk.red(`plugininstance ${subcommand}: a job is worked in /proc/jobs; \`proc find ${id}\` names its path, then ${where}`)}\n`);
85
+ return envelope_error('', undefined, `${chalk.red(`plugininstance error: ${e instanceof Error ? e.message : String(e)}`)}\n`);
107
86
  }
87
+ }
88
+ /**
89
+ * Names the fields a plugin instance has.
90
+ *
91
+ * @returns The fields' table, or that there are none.
92
+ */
93
+ async function plugininstanceFields_render() {
94
+ const fields = await pluginInstanceFields_fetch();
95
+ if (fields && fields.length > 0) {
96
+ return envelope_ok(table_render(fields.map((f) => ({ field: f })), ['field'], { title: { title: 'Plugin Instance fields', justification: 'center' } }));
97
+ }
98
+ return envelope_ok(`${chalk.gray('No fields found for plugin instances.')}\n`);
99
+ }
100
+ /**
101
+ * A job verb the tree already answers: names the /proc/jobs path and what to
102
+ * do there, rather than keep a second way to do what the tree does.
103
+ *
104
+ * @param verb - The verb asked for.
105
+ * @param id - The job's id as typed, if any.
106
+ * @returns The refusal that says how.
107
+ */
108
+ function procWay_say(verb, id) {
108
109
  exitCode_set(1);
109
- return envelope_error(`${chalk.red(`Unknown subcommand: ${subcommand}. Usage: plugininstances <list|search|inspect>`)}\n`);
110
+ return envelope_error('', undefined, `${chalk.red(`plugininstance ${verb}: a job is worked in /proc/jobs; \`proc find ${id ?? '<id>'}\` names its path, then ${PROC_WAYS[verb]}`)}\n`);
111
+ }
112
+ /** The operand of a job verb /proc/jobs answers: the job's id, which it names in the way it says. */
113
+ const JOB_ID_OPERANDS = [{ name: 'id', kind: 'word', optional: true, summary: "The job's id" }];
114
+ /** What a `plugininstance` line may hold. */
115
+ const PLUGININSTANCE_GRAMMAR = {
116
+ bare: { summary: 'List the plugin instances, as list does', options: RESOURCE_LIST_OPTIONS_GRAMMAR },
117
+ subcommands: {
118
+ list: { summary: 'List the plugin instances, 20 to a page', options: RESOURCE_LIST_OPTIONS_GRAMMAR },
119
+ search: {
120
+ summary: 'List the plugin instances a filter matches (list --search <term>)',
121
+ operands: [{ name: 'term', kind: 'word', summary: 'The filter, field:value (inspect names the fields)' }],
122
+ options: RESOURCE_LIST_OPTIONS_GRAMMAR,
123
+ },
124
+ inspect: { summary: 'Name the fields a plugin instance has' },
125
+ cancel: { summary: 'Says how: rm <path> in /proc/jobs cancels a running job', operands: JOB_ID_OPERANDS },
126
+ delete: { summary: 'Says how: rm <path> in /proc/jobs removes a finished job', operands: JOB_ID_OPERANDS },
127
+ rm: { summary: 'Says how: rm <path> in /proc/jobs removes a finished job', operands: JOB_ID_OPERANDS },
128
+ output: { summary: 'Says how: <path>/data in /proc/jobs is its output folder', operands: JOB_ID_OPERANDS },
129
+ parameters: { summary: 'Says how: cat <path>/params in /proc/jobs lists its parameters', operands: JOB_ID_OPERANDS },
130
+ params: { summary: 'Says how: cat <path>/params in /proc/jobs lists its parameters', operands: JOB_ID_OPERANDS },
131
+ log: { summary: 'Says how: cat <path>/log in /proc/jobs is its log', operands: JOB_ID_OPERANDS },
132
+ },
133
+ };
134
+ /**
135
+ * Runs one `plugininstance` line.
136
+ *
137
+ * @param args - The line, parsed.
138
+ * @returns The listing, the fields, or the way /proc/jobs does it.
139
+ */
140
+ async function plugininstance_run(args) {
141
+ switch (args.subcommand) {
142
+ case null:
143
+ case 'list': return plugininstanceList_render(resourceListBag_build(args.options));
144
+ case 'search': return plugininstanceList_render(resourceListBag_build(args.options, args.operands.term));
145
+ case 'inspect': return plugininstanceFields_render();
146
+ default: return procWay_say(args.subcommand, args.operands.id);
147
+ }
148
+ }
149
+ /**
150
+ * `plugininstance [[listing options] | list [listing options] | search <term> [listing options] | inspect | <job verb> [id]]`: the declaration.
151
+ *
152
+ * @example
153
+ * ```ts
154
+ * commands_register({ declarations: [plugininstanceCommand] }, 'backend');
155
+ * ```
156
+ */
157
+ export const plugininstanceCommand = command_declare({
158
+ name: 'plugininstance',
159
+ aliases: [{ name: 'plugininstances', holds: [] }, 'instance', 'instances', 'job', 'jobs'],
160
+ grammar: PLUGININSTANCE_GRAMMAR,
161
+ help: {
162
+ summary: "CUBE's plugin instances, the jobs: list them, search them, name their fields",
163
+ description: 'List the plugin instances in CUBE, the jobs, a page at a time or every page, filtered by a field:value search and in the columns asked for; inspect names the fields a job has. A job is worked in /proc/jobs: proc find <id> names its path, rm <path> cancels it while it runs and removes it once done, cat <path>/params and cat <path>/log read it, and <path>/data is its output; the verbs that would do these here say so. plugininstance, plugininstances, instance, instances, job and jobs are one command.',
164
+ category: 'Resources',
165
+ examples: ['jobs list', 'jobs list --all', 'jobs search status:started', 'jobs list --search feed_id:5536', 'jobs inspect', 'proc find 42'],
166
+ },
167
+ handler: plugininstance_run,
168
+ });
169
+ /**
170
+ * `plugininstance` over words already split: the declaration's parse and handler.
171
+ *
172
+ * @param args - The words after `plugininstance`.
173
+ * @returns The answer, or the refusal of a bad line.
174
+ *
175
+ * @example
176
+ * ```ts
177
+ * await builtin_plugininstance(['search', 'status:started']);
178
+ * ```
179
+ */
180
+ export async function builtin_plugininstance(args) {
181
+ return declaredCommand_run(plugininstanceCommand, args);
110
182
  }
111
183
  //# sourceMappingURL=plugininstance.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugininstance.js","sourceRoot":"","sources":["../../../src/builtins/res/plugininstance.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAc,kBAAkB,EAAE,2BAA2B,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAChK,OAAO,EAAE,yBAAyB,EAA4B,MAAM,gDAAgD,CAAC;AACrH,OAAO,EAAE,0BAA0B,EAAE,MAAM,kDAAkD,CAAC;AAC9F,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAG9D,OAAO,EAAmB,WAAW,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD;;;;;;GAMG;AACH,SAAS,mBAAmB,CAAC,GAA4B;IACvD,MAAM,IAAI,GAAG,CAAC,GAAW,EAAsB,EAAE,CAAC,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,KAAK,QAAQ,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACnI,MAAM,OAAO,GAAG,CAAC,GAAW,EAAsB,EAAE;QAClD,MAAM,KAAK,GAAY,GAAG,CAAC,GAAG,CAAC,CAAC;QAChC,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,EAAE;YAAE,OAAO,SAAS,CAAC;QAC5E,MAAM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AAE,MAAM,CAAC;IACzF,OAAO,EAAE,sBAAsB;IAC/B,IAAI,EAAE;QACJ,OAAO,EAAE,8EAA8E;QACvF,WAAW,EAAE,wfAAwf;QACrgB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,CAAC,WAAW,EAAE,iBAAiB,EAAE,4BAA4B,EAAE,iCAAiC,EAAE,cAAc,EAAE,cAAc,CAAC;KAC5I;IACD,OAAO,EAAE,kBAAkB;CAC5B,CAAC,CAAC;AAEH;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,IAAc;IACzD,OAAO,mBAAmB,CAAC,qBAAqB,EAAE,IAAI,CAAC,CAAC;AAC1D,CAAC"}
@@ -1,7 +1,249 @@
1
1
  import { CommandEnvelope } from '@fnndsc/menu';
2
2
  /**
3
- * Builtin handler for the `pluginmeta` command.
3
+ * `pluginmeta [[listing options] | list [listing options] | search <term> [listing options] | inspect]`: the declaration.
4
4
  *
5
- * @param args - Parsed command arguments for the plugin-meta command.
5
+ * @example
6
+ * ```ts
7
+ * commands_register({ declarations: [pluginmetaCommand] }, 'backend');
8
+ * ```
9
+ */
10
+ export declare const pluginmetaCommand: import("../../core/commandDeclaration.js").CommandDeclaration<{
11
+ readonly bare: {
12
+ readonly summary: "List the plugin metas, as list does";
13
+ readonly options: {
14
+ readonly all: {
15
+ readonly long: "all";
16
+ readonly summary: "Fetch every page";
17
+ };
18
+ readonly limit: {
19
+ readonly long: "limit";
20
+ readonly summary: "Page size (default 20)";
21
+ readonly value: {
22
+ readonly name: "n";
23
+ readonly kind: "int";
24
+ readonly min: 1;
25
+ };
26
+ };
27
+ readonly offset: {
28
+ readonly long: "offset";
29
+ readonly summary: "Start this many rows in";
30
+ readonly value: {
31
+ readonly name: "n";
32
+ readonly kind: "int";
33
+ readonly min: 0;
34
+ };
35
+ };
36
+ readonly page: {
37
+ readonly long: "page";
38
+ readonly summary: "Page size, when --limit is not given";
39
+ readonly value: {
40
+ readonly name: "n";
41
+ readonly kind: "int";
42
+ readonly min: 1;
43
+ };
44
+ };
45
+ readonly fields: {
46
+ readonly long: "fields";
47
+ readonly summary: "The columns to show, comma-separated (inspect names them)";
48
+ readonly value: {
49
+ readonly name: "field,…";
50
+ readonly kind: "word";
51
+ };
52
+ };
53
+ readonly search: {
54
+ readonly long: "search";
55
+ readonly summary: "Filter by field:value, comma-separated (inspect names the fields)";
56
+ readonly value: {
57
+ readonly name: "field:value";
58
+ readonly kind: "word";
59
+ };
60
+ };
61
+ readonly sort: {
62
+ readonly long: "sort";
63
+ readonly summary: "Sort by a field";
64
+ readonly value: {
65
+ readonly name: "field";
66
+ readonly kind: "word";
67
+ };
68
+ };
69
+ readonly reverse: {
70
+ readonly long: "reverse";
71
+ readonly summary: "Reverse the sort";
72
+ };
73
+ readonly table: {
74
+ readonly long: "table";
75
+ readonly summary: "Tabular output";
76
+ };
77
+ readonly csv: {
78
+ readonly long: "csv";
79
+ readonly summary: "CSV output";
80
+ };
81
+ };
82
+ };
83
+ readonly subcommands: {
84
+ readonly list: {
85
+ readonly summary: "List the plugin metas, 20 to a page";
86
+ readonly options: {
87
+ readonly all: {
88
+ readonly long: "all";
89
+ readonly summary: "Fetch every page";
90
+ };
91
+ readonly limit: {
92
+ readonly long: "limit";
93
+ readonly summary: "Page size (default 20)";
94
+ readonly value: {
95
+ readonly name: "n";
96
+ readonly kind: "int";
97
+ readonly min: 1;
98
+ };
99
+ };
100
+ readonly offset: {
101
+ readonly long: "offset";
102
+ readonly summary: "Start this many rows in";
103
+ readonly value: {
104
+ readonly name: "n";
105
+ readonly kind: "int";
106
+ readonly min: 0;
107
+ };
108
+ };
109
+ readonly page: {
110
+ readonly long: "page";
111
+ readonly summary: "Page size, when --limit is not given";
112
+ readonly value: {
113
+ readonly name: "n";
114
+ readonly kind: "int";
115
+ readonly min: 1;
116
+ };
117
+ };
118
+ readonly fields: {
119
+ readonly long: "fields";
120
+ readonly summary: "The columns to show, comma-separated (inspect names them)";
121
+ readonly value: {
122
+ readonly name: "field,…";
123
+ readonly kind: "word";
124
+ };
125
+ };
126
+ readonly search: {
127
+ readonly long: "search";
128
+ readonly summary: "Filter by field:value, comma-separated (inspect names the fields)";
129
+ readonly value: {
130
+ readonly name: "field:value";
131
+ readonly kind: "word";
132
+ };
133
+ };
134
+ readonly sort: {
135
+ readonly long: "sort";
136
+ readonly summary: "Sort by a field";
137
+ readonly value: {
138
+ readonly name: "field";
139
+ readonly kind: "word";
140
+ };
141
+ };
142
+ readonly reverse: {
143
+ readonly long: "reverse";
144
+ readonly summary: "Reverse the sort";
145
+ };
146
+ readonly table: {
147
+ readonly long: "table";
148
+ readonly summary: "Tabular output";
149
+ };
150
+ readonly csv: {
151
+ readonly long: "csv";
152
+ readonly summary: "CSV output";
153
+ };
154
+ };
155
+ };
156
+ readonly search: {
157
+ readonly summary: "List the plugin metas a filter matches (list --search <term>)";
158
+ readonly operands: readonly [{
159
+ readonly name: "term";
160
+ readonly kind: "word";
161
+ readonly summary: "The filter, field:value (inspect names the fields)";
162
+ }];
163
+ readonly options: {
164
+ readonly all: {
165
+ readonly long: "all";
166
+ readonly summary: "Fetch every page";
167
+ };
168
+ readonly limit: {
169
+ readonly long: "limit";
170
+ readonly summary: "Page size (default 20)";
171
+ readonly value: {
172
+ readonly name: "n";
173
+ readonly kind: "int";
174
+ readonly min: 1;
175
+ };
176
+ };
177
+ readonly offset: {
178
+ readonly long: "offset";
179
+ readonly summary: "Start this many rows in";
180
+ readonly value: {
181
+ readonly name: "n";
182
+ readonly kind: "int";
183
+ readonly min: 0;
184
+ };
185
+ };
186
+ readonly page: {
187
+ readonly long: "page";
188
+ readonly summary: "Page size, when --limit is not given";
189
+ readonly value: {
190
+ readonly name: "n";
191
+ readonly kind: "int";
192
+ readonly min: 1;
193
+ };
194
+ };
195
+ readonly fields: {
196
+ readonly long: "fields";
197
+ readonly summary: "The columns to show, comma-separated (inspect names them)";
198
+ readonly value: {
199
+ readonly name: "field,…";
200
+ readonly kind: "word";
201
+ };
202
+ };
203
+ readonly search: {
204
+ readonly long: "search";
205
+ readonly summary: "Filter by field:value, comma-separated (inspect names the fields)";
206
+ readonly value: {
207
+ readonly name: "field:value";
208
+ readonly kind: "word";
209
+ };
210
+ };
211
+ readonly sort: {
212
+ readonly long: "sort";
213
+ readonly summary: "Sort by a field";
214
+ readonly value: {
215
+ readonly name: "field";
216
+ readonly kind: "word";
217
+ };
218
+ };
219
+ readonly reverse: {
220
+ readonly long: "reverse";
221
+ readonly summary: "Reverse the sort";
222
+ };
223
+ readonly table: {
224
+ readonly long: "table";
225
+ readonly summary: "Tabular output";
226
+ };
227
+ readonly csv: {
228
+ readonly long: "csv";
229
+ readonly summary: "CSV output";
230
+ };
231
+ };
232
+ };
233
+ readonly inspect: {
234
+ readonly summary: "Name the fields a plugin meta has";
235
+ };
236
+ };
237
+ }>;
238
+ /**
239
+ * `pluginmeta` over words already split: the declaration's parse and handler.
240
+ *
241
+ * @param args - The words after `pluginmeta`.
242
+ * @returns The answer, or the refusal of a bad line.
243
+ *
244
+ * @example
245
+ * ```ts
246
+ * await builtin_pluginmeta(['search', 'name:dircopy']);
247
+ * ```
6
248
  */
7
249
  export declare function builtin_pluginmeta(args: string[]): Promise<CommandEnvelope>;
@@ -1,58 +1,116 @@
1
1
  /**
2
- * @file Builtin pluginmeta command.
2
+ * @file `pluginmeta`, `pluginmetas`, `meta` and `metas`: CUBE's plugin
3
+ * metas, each a plugin's identity across its versions, listed, searched, and
4
+ * their fields named.
3
5
  *
4
- * Subcommands: list, search, inspect
5
- * Aliases: pluginmeta / pluginmetas / meta / metas
6
+ * Declared in one record (`pluginmetaCommand`, its other names as aliases): the
7
+ * subcommands and the listing options every resource command reads.
8
+ *
9
+ * Key components:
10
+ * - pluginmetaCommand: the declaration, answered under each of its names.
11
+ * - builtin_pluginmeta: the declaration run over words already split.
12
+ *
13
+ * @module
6
14
  */
7
15
  import chalk from 'chalk';
8
- import { commandArgs_process, cliOptions_extract, resourceListOptions_refusal, resourceSearchTerm_refusal, resourceSearch_args } from '../utils.js';
9
16
  import { pluginMetas_fetchList } from '@fnndsc/chili/commands/pluginmetas/list.js';
10
17
  import { pluginMetaFields_fetch } from '@fnndsc/chili/commands/pluginmetas/fields.js';
11
18
  import { table_render } from '@fnndsc/chili/screen/screen.js';
12
19
  import { envelope_ok, envelope_error } from '@fnndsc/menu';
13
20
  import { exitCode_set } from '../../core/handlerRun.js';
21
+ import { command_declare } from '../../core/commandDeclaration.js';
22
+ import { declaredCommand_run } from '../../core/commandParse.js';
23
+ import { RESOURCE_LIST_OPTIONS_GRAMMAR, resourceListBag_build } from './resourceList.js';
14
24
  /**
15
- * Builtin handler for the `pluginmeta` command.
25
+ * Lists the plugin metas a listing's options ask for.
16
26
  *
17
- * @param args - Parsed command arguments for the plugin-meta command.
27
+ * @param options - The bag chili's listing reads.
28
+ * @returns The table, or that there are none, or the error.
18
29
  */
19
- export async function builtin_pluginmeta(args) {
20
- const parsed = commandArgs_process(args);
21
- const subcommand = parsed._[0];
22
- if (!subcommand || subcommand === 'list') {
23
- const refusal = resourceListOptions_refusal('pluginmeta', parsed);
24
- if (refusal !== null) {
25
- exitCode_set(1);
26
- return envelope_error('', undefined, `${chalk.red(refusal)}\n`);
27
- }
28
- try {
29
- const { pluginMetas, selectedFields, totalCount } = await pluginMetas_fetchList(cliOptions_extract(parsed));
30
- if (pluginMetas.length === 0) {
31
- return envelope_ok(`${chalk.gray('No plugin metas found.')}\n`);
32
- }
33
- return envelope_ok(table_render(pluginMetas, selectedFields, { title: { title: 'Plugin Metas', justification: 'center' }, pagination: totalCount !== undefined ? { shown: pluginMetas.length, total: totalCount } : undefined }));
34
- }
35
- catch (e) {
36
- exitCode_set(1);
37
- return envelope_error('', undefined, `${chalk.red(`pluginmeta error: ${e instanceof Error ? e.message : String(e)}`)}\n`);
30
+ async function pluginmetaList_render(options) {
31
+ try {
32
+ const { pluginMetas, selectedFields, totalCount } = await pluginMetas_fetchList(options);
33
+ if (pluginMetas.length === 0) {
34
+ return envelope_ok(`${chalk.gray('No plugin metas found.')}\n`);
38
35
  }
36
+ return envelope_ok(table_render(pluginMetas, selectedFields, { title: { title: 'Plugin Metas', justification: 'center' }, pagination: totalCount !== undefined ? { shown: pluginMetas.length, total: totalCount } : undefined }));
39
37
  }
40
- if (subcommand === 'search') {
41
- const refusal = resourceSearchTerm_refusal('pluginmeta', parsed);
42
- if (refusal !== null) {
43
- exitCode_set(1);
44
- return envelope_error('', undefined, `${chalk.red(refusal)}\n`);
45
- }
46
- return builtin_pluginmeta(resourceSearch_args(parsed));
38
+ catch (e) {
39
+ exitCode_set(1);
40
+ return envelope_error('', undefined, `${chalk.red(`pluginmeta error: ${e instanceof Error ? e.message : String(e)}`)}\n`);
47
41
  }
48
- if (subcommand === 'inspect') {
49
- const fields = await pluginMetaFields_fetch();
50
- if (fields && fields.length > 0) {
51
- return envelope_ok(table_render(fields.map((f) => ({ field: f })), ['field'], { title: { title: 'Plugin Meta fields', justification: 'center' } }));
52
- }
53
- return envelope_ok(`${chalk.gray('No fields found for plugin metas.')}\n`);
42
+ }
43
+ /**
44
+ * Names the fields a plugin meta has.
45
+ *
46
+ * @returns The fields' table, or that there are none.
47
+ */
48
+ async function pluginmetaFields_render() {
49
+ const fields = await pluginMetaFields_fetch();
50
+ if (fields && fields.length > 0) {
51
+ return envelope_ok(table_render(fields.map((f) => ({ field: f })), ['field'], { title: { title: 'Plugin Meta fields', justification: 'center' } }));
54
52
  }
55
- exitCode_set(1);
56
- return envelope_error(`${chalk.red(`Unknown subcommand: ${subcommand}. Usage: pluginmetas <list|search|inspect>`)}\n`);
53
+ return envelope_ok(`${chalk.gray('No fields found for plugin metas.')}\n`);
54
+ }
55
+ /** What a `pluginmeta` line may hold. */
56
+ const PLUGINMETA_GRAMMAR = {
57
+ bare: { summary: 'List the plugin metas, as list does', options: RESOURCE_LIST_OPTIONS_GRAMMAR },
58
+ subcommands: {
59
+ list: { summary: 'List the plugin metas, 20 to a page', options: RESOURCE_LIST_OPTIONS_GRAMMAR },
60
+ search: {
61
+ summary: 'List the plugin metas a filter matches (list --search <term>)',
62
+ operands: [{ name: 'term', kind: 'word', summary: 'The filter, field:value (inspect names the fields)' }],
63
+ options: RESOURCE_LIST_OPTIONS_GRAMMAR,
64
+ },
65
+ inspect: { summary: 'Name the fields a plugin meta has' },
66
+ },
67
+ };
68
+ /**
69
+ * Runs one `pluginmeta` line.
70
+ *
71
+ * @param args - The line, parsed.
72
+ * @returns The listing, the fields, or the error.
73
+ */
74
+ async function pluginmeta_run(args) {
75
+ switch (args.subcommand) {
76
+ case null:
77
+ case 'list': return pluginmetaList_render(resourceListBag_build(args.options));
78
+ case 'search': return pluginmetaList_render(resourceListBag_build(args.options, args.operands.term));
79
+ case 'inspect': return pluginmetaFields_render();
80
+ }
81
+ }
82
+ /**
83
+ * `pluginmeta [[listing options] | list [listing options] | search <term> [listing options] | inspect]`: the declaration.
84
+ *
85
+ * @example
86
+ * ```ts
87
+ * commands_register({ declarations: [pluginmetaCommand] }, 'backend');
88
+ * ```
89
+ */
90
+ export const pluginmetaCommand = command_declare({
91
+ name: 'pluginmeta',
92
+ aliases: ['pluginmetas', 'meta', 'metas'],
93
+ grammar: PLUGINMETA_GRAMMAR,
94
+ help: {
95
+ summary: "CUBE's plugin metas, each a plugin across its versions: list them, search them, name their fields",
96
+ description: 'List the plugin metas in CUBE, a page at a time or every page, filtered by a field:value search and in the columns asked for; inspect names the fields a plugin meta has. A plugin meta is a tool across its versions (pl-dircopy); a plugin is one version of it. pluginmeta, pluginmetas, meta and metas are one command.',
97
+ category: 'Resources',
98
+ examples: ['pluginmetas list', 'pluginmetas search name:dircopy', 'metas list --fields name,category', 'meta inspect'],
99
+ },
100
+ handler: pluginmeta_run,
101
+ });
102
+ /**
103
+ * `pluginmeta` over words already split: the declaration's parse and handler.
104
+ *
105
+ * @param args - The words after `pluginmeta`.
106
+ * @returns The answer, or the refusal of a bad line.
107
+ *
108
+ * @example
109
+ * ```ts
110
+ * await builtin_pluginmeta(['search', 'name:dircopy']);
111
+ * ```
112
+ */
113
+ export async function builtin_pluginmeta(args) {
114
+ return declaredCommand_run(pluginmetaCommand, args);
57
115
  }
58
116
  //# sourceMappingURL=pluginmeta.js.map