@fnndsc/brasa 0.34.0 → 0.35.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.
- package/dist/api/models.d.ts +1 -2
- package/dist/api/models.js.map +1 -1
- package/dist/buildinfo.json +1 -1
- package/dist/builtins/debug.d.ts +1 -1
- package/dist/builtins/debug.js +12 -8
- package/dist/builtins/debug.js.map +1 -1
- package/dist/builtins/executable.d.ts +1 -1
- package/dist/builtins/executable.js +2 -1
- package/dist/builtins/executable.js.map +1 -1
- package/dist/builtins/fs/acl.d.ts +1 -16
- package/dist/builtins/fs/acl.js +3 -1
- package/dist/builtins/fs/acl.js.map +1 -1
- package/dist/builtins/fs/archive.js +1 -1
- package/dist/builtins/fs/archive.js.map +1 -1
- package/dist/builtins/fs/cat.d.ts +1 -1
- package/dist/builtins/fs/cat.js +47 -7
- package/dist/builtins/fs/cat.js.map +1 -1
- package/dist/builtins/fs/cd.d.ts +1 -19
- package/dist/builtins/fs/cd.js +45 -94
- package/dist/builtins/fs/cd.js.map +1 -1
- package/dist/builtins/fs/configWrite.d.ts +1 -1
- package/dist/builtins/fs/configWrite.js +1 -1
- package/dist/builtins/fs/configWrite.js.map +1 -1
- package/dist/builtins/fs/cp.d.ts +1 -1
- package/dist/builtins/fs/cp.js +19 -13
- package/dist/builtins/fs/cp.js.map +1 -1
- package/dist/builtins/fs/download.d.ts +1 -1
- package/dist/builtins/fs/download.js +2 -1
- package/dist/builtins/fs/download.js.map +1 -1
- package/dist/builtins/fs/du.d.ts +10 -1
- package/dist/builtins/fs/du.js +36 -2
- package/dist/builtins/fs/du.js.map +1 -1
- package/dist/builtins/fs/edit.d.ts +1 -1
- package/dist/builtins/fs/edit.js +10 -4
- package/dist/builtins/fs/edit.js.map +1 -1
- package/dist/builtins/fs/entries.d.ts +43 -0
- package/dist/builtins/fs/entries.js +81 -0
- package/dist/builtins/fs/entries.js.map +1 -0
- package/dist/builtins/fs/ls.d.ts +1 -2
- package/dist/builtins/fs/ls.js +70 -10
- package/dist/builtins/fs/ls.js.map +1 -1
- package/dist/builtins/fs/mkdir.d.ts +1 -1
- package/dist/builtins/fs/mkdir.js +29 -20
- package/dist/builtins/fs/mkdir.js.map +1 -1
- package/dist/builtins/fs/mv.d.ts +1 -1
- package/dist/builtins/fs/mv.js +40 -23
- package/dist/builtins/fs/mv.js.map +1 -1
- package/dist/builtins/fs/pull.d.ts +1 -1
- package/dist/builtins/fs/pull.js +2 -1
- package/dist/builtins/fs/pull.js.map +1 -1
- package/dist/builtins/fs/pwd.d.ts +1 -1
- package/dist/builtins/fs/pwd.js +9 -45
- package/dist/builtins/fs/pwd.js.map +1 -1
- package/dist/builtins/fs/rm.d.ts +1 -22
- package/dist/builtins/fs/rm.js +33 -58
- package/dist/builtins/fs/rm.js.map +1 -1
- package/dist/builtins/fs/rmdir.d.ts +1 -1
- package/dist/builtins/fs/rmdir.js +21 -40
- package/dist/builtins/fs/rmdir.js.map +1 -1
- package/dist/builtins/fs/touch.d.ts +1 -1
- package/dist/builtins/fs/touch.js +64 -25
- package/dist/builtins/fs/touch.js.map +1 -1
- package/dist/builtins/fs/tree.d.ts +1 -1
- package/dist/builtins/fs/tree.js +26 -3
- package/dist/builtins/fs/tree.js.map +1 -1
- package/dist/builtins/fs/upload.d.ts +1 -1
- package/dist/builtins/fs/upload.js +3 -1
- package/dist/builtins/fs/upload.js.map +1 -1
- package/dist/builtins/fs/xattr.d.ts +1 -10
- package/dist/builtins/fs/xattr.js +3 -1
- package/dist/builtins/fs/xattr.js.map +1 -1
- package/dist/builtins/games/bytes.d.ts +1 -1
- package/dist/builtins/games/bytes.js +2 -1
- package/dist/builtins/games/bytes.js.map +1 -1
- package/dist/builtins/games/chimes.d.ts +1 -13
- package/dist/builtins/games/chimes.js +1 -1
- package/dist/builtins/games/chimes.js.map +1 -1
- package/dist/builtins/games/chrislab.d.ts +33 -0
- package/dist/builtins/games/chrislab.js +117 -0
- package/dist/builtins/games/chrislab.js.map +1 -0
- package/dist/builtins/games/cowsay.d.ts +1 -11
- package/dist/builtins/games/cowsay.js +1 -1
- package/dist/builtins/games/cowsay.js.map +1 -1
- package/dist/builtins/games/figlet.d.ts +1 -11
- package/dist/builtins/games/figlet.js +1 -1
- package/dist/builtins/games/figlet.js.map +1 -1
- package/dist/builtins/games/lab.d.ts +1 -43
- package/dist/builtins/games/lab.js +7 -111
- package/dist/builtins/games/lab.js.map +1 -1
- package/dist/builtins/games/lolcat.d.ts +1 -11
- package/dist/builtins/games/lolcat.js +1 -1
- package/dist/builtins/games/lolcat.js.map +1 -1
- package/dist/builtins/games/morse.d.ts +1 -10
- package/dist/builtins/games/morse.js +1 -1
- package/dist/builtins/games/morse.js.map +1 -1
- package/dist/builtins/games/numbers.d.ts +1 -10
- package/dist/builtins/games/numbers.js +1 -1
- package/dist/builtins/games/numbers.js.map +1 -1
- package/dist/builtins/games/play.d.ts +1 -11
- package/dist/builtins/games/play.js +1 -1
- package/dist/builtins/games/play.js.map +1 -1
- package/dist/builtins/games/qr.d.ts +1 -12
- package/dist/builtins/games/qr.js +1 -1
- package/dist/builtins/games/qr.js.map +1 -1
- package/dist/builtins/games/show.d.ts +1 -12
- package/dist/builtins/games/show.js +1 -1
- package/dist/builtins/games/show.js.map +1 -1
- package/dist/builtins/games/sky.d.ts +1 -11
- package/dist/builtins/games/sky.js +1 -1
- package/dist/builtins/games/sky.js.map +1 -1
- package/dist/builtins/games/text.d.ts +1 -10
- package/dist/builtins/games/text.js +1 -1
- package/dist/builtins/games/text.js.map +1 -1
- package/dist/builtins/games/wtf.d.ts +1 -9
- package/dist/builtins/games/wtf.js +1 -1
- package/dist/builtins/games/wtf.js.map +1 -1
- package/dist/builtins/help.d.ts +18 -15
- package/dist/builtins/help.js +51 -1200
- package/dist/builtins/help.js.map +1 -1
- package/dist/builtins/net/connect.d.ts +1 -1
- package/dist/builtins/net/connect.js +2 -1
- package/dist/builtins/net/connect.js.map +1 -1
- package/dist/builtins/net/cubepath.d.ts +1 -1
- package/dist/builtins/net/cubepath.js +1 -1
- package/dist/builtins/net/cubepath.js.map +1 -1
- package/dist/builtins/net/logout.d.ts +1 -1
- package/dist/builtins/net/logout.js +1 -1
- package/dist/builtins/net/logout.js.map +1 -1
- package/dist/builtins/net/netstat.d.ts +1 -1
- package/dist/builtins/net/netstat.js +1 -2
- package/dist/builtins/net/netstat.js.map +1 -1
- package/dist/builtins/net/pacs.d.ts +1 -1
- package/dist/builtins/net/pacs.js +3 -2
- package/dist/builtins/net/pacs.js.map +1 -1
- package/dist/builtins/net/pacsUtils.js +2 -1
- package/dist/builtins/net/pacsUtils.js.map +1 -1
- package/dist/builtins/net/query.csv.js +1 -1
- package/dist/builtins/net/query.csv.js.map +1 -1
- package/dist/builtins/net/query.d.ts +2 -2
- package/dist/builtins/net/query.fanout.d.ts +1 -1
- package/dist/builtins/net/query.fanout.js +1 -1
- package/dist/builtins/net/query.fanout.js.map +1 -1
- package/dist/builtins/net/query.js +3 -2
- package/dist/builtins/net/query.js.map +1 -1
- package/dist/builtins/net/status.d.ts +1 -1
- package/dist/builtins/net/status.js +2 -1
- package/dist/builtins/net/status.js.map +1 -1
- package/dist/builtins/parametersofplugin.d.ts +1 -1
- package/dist/builtins/parametersofplugin.js +1 -1
- package/dist/builtins/parametersofplugin.js.map +1 -1
- package/dist/builtins/pluginExecute.d.ts +1 -1
- package/dist/builtins/pluginExecute.js +3 -1
- package/dist/builtins/pluginExecute.js.map +1 -1
- package/dist/builtins/proc.d.ts +1 -2
- package/dist/builtins/proc.js +4 -3
- package/dist/builtins/proc.js.map +1 -1
- package/dist/builtins/res/compute.d.ts +1 -1
- package/dist/builtins/res/compute.js +2 -1
- package/dist/builtins/res/compute.js.map +1 -1
- package/dist/builtins/res/dicom.d.ts +2 -2
- package/dist/builtins/res/dicom.js +1 -2
- package/dist/builtins/res/dicom.js.map +1 -1
- package/dist/builtins/res/expect.d.ts +1 -1
- package/dist/builtins/res/expect.js +2 -1
- package/dist/builtins/res/expect.js.map +1 -1
- package/dist/builtins/res/feed.d.ts +1 -1
- package/dist/builtins/res/feed.diagram.d.ts +1 -2
- package/dist/builtins/res/feed.diagram.js +2 -2
- package/dist/builtins/res/feed.diagram.js.map +1 -1
- package/dist/builtins/res/feed.js +3 -1
- package/dist/builtins/res/feed.js.map +1 -1
- package/dist/builtins/res/feed.tree.d.ts +1 -1
- package/dist/builtins/res/feed.tree.js +1 -1
- package/dist/builtins/res/feed.tree.js.map +1 -1
- package/dist/builtins/res/files.d.ts +1 -1
- package/dist/builtins/res/files.js +1 -1
- package/dist/builtins/res/files.js.map +1 -1
- package/dist/builtins/res/gather.d.ts +1 -1
- package/dist/builtins/res/gather.js +1 -1
- package/dist/builtins/res/gather.js.map +1 -1
- package/dist/builtins/res/gather.store.js.map +1 -1
- package/dist/builtins/res/group.d.ts +1 -1
- package/dist/builtins/res/group.js +1 -1
- package/dist/builtins/res/group.js.map +1 -1
- package/dist/builtins/res/image.d.ts +1 -20
- package/dist/builtins/res/image.js +1 -2
- package/dist/builtins/res/image.js.map +1 -1
- package/dist/builtins/res/pipeline.d.ts +1 -1
- package/dist/builtins/res/pipeline.diagram.d.ts +1 -1
- package/dist/builtins/res/pipeline.diagram.js +2 -2
- package/dist/builtins/res/pipeline.diagram.js.map +1 -1
- package/dist/builtins/res/pipeline.js +3 -1
- package/dist/builtins/res/pipeline.js.map +1 -1
- package/dist/builtins/res/play.d.ts +1 -1
- package/dist/builtins/res/play.js +2 -1
- package/dist/builtins/res/play.js.map +1 -1
- package/dist/builtins/res/plugin.d.ts +1 -1
- package/dist/builtins/res/plugin.info.d.ts +1 -1
- package/dist/builtins/res/plugin.info.js +2 -1
- package/dist/builtins/res/plugin.info.js.map +1 -1
- package/dist/builtins/res/plugin.js +2 -2
- package/dist/builtins/res/plugin.js.map +1 -1
- package/dist/builtins/res/plugininstance.d.ts +1 -1
- package/dist/builtins/res/plugininstance.js +1 -1
- package/dist/builtins/res/plugininstance.js.map +1 -1
- package/dist/builtins/res/pluginmeta.d.ts +1 -1
- package/dist/builtins/res/pluginmeta.js +1 -1
- package/dist/builtins/res/pluginmeta.js.map +1 -1
- package/dist/builtins/res/record.d.ts +1 -1
- package/dist/builtins/res/record.js +1 -1
- package/dist/builtins/res/record.js.map +1 -1
- package/dist/builtins/res/tag.d.ts +1 -1
- package/dist/builtins/res/tag.js +1 -1
- package/dist/builtins/res/tag.js.map +1 -1
- package/dist/builtins/res/user.d.ts +1 -1
- package/dist/builtins/res/user.js +2 -1
- package/dist/builtins/res/user.js.map +1 -1
- package/dist/builtins/res/workflow.d.ts +1 -1
- package/dist/builtins/res/workflow.js +1 -1
- package/dist/builtins/res/workflow.js.map +1 -1
- package/dist/builtins/store.d.ts +1 -1
- package/dist/builtins/store.js +2 -1
- package/dist/builtins/store.js.map +1 -1
- package/dist/builtins/sys/cal.d.ts +1 -12
- package/dist/builtins/sys/cal.js +1 -1
- package/dist/builtins/sys/cal.js.map +1 -1
- package/dist/builtins/sys/context.d.ts +1 -1
- package/dist/builtins/sys/context.js +1 -1
- package/dist/builtins/sys/context.js.map +1 -1
- package/dist/builtins/sys/date.d.ts +1 -12
- package/dist/builtins/sys/date.js +1 -1
- package/dist/builtins/sys/date.js.map +1 -1
- package/dist/builtins/sys/fortune.d.ts +1 -11
- package/dist/builtins/sys/fortune.js +1 -1
- package/dist/builtins/sys/fortune.js.map +1 -1
- package/dist/builtins/sys/motd.d.ts +1 -18
- package/dist/builtins/sys/motd.js +3 -3
- package/dist/builtins/sys/motd.js.map +1 -1
- package/dist/builtins/sys/notes.d.ts +1 -2
- package/dist/builtins/sys/notes.js +1 -2
- package/dist/builtins/sys/notes.js.map +1 -1
- package/dist/builtins/sys/physicalmode.d.ts +1 -1
- package/dist/builtins/sys/physicalmode.js +1 -1
- package/dist/builtins/sys/physicalmode.js.map +1 -1
- package/dist/builtins/sys/timing.d.ts +1 -1
- package/dist/builtins/sys/timing.js +1 -1
- package/dist/builtins/sys/timing.js.map +1 -1
- package/dist/builtins/sys/version.d.ts +1 -7
- package/dist/builtins/sys/version.js +1 -1
- package/dist/builtins/sys/version.js.map +1 -1
- package/dist/builtins/sys/weather.d.ts +1 -1
- package/dist/builtins/sys/weather.js +1 -1
- package/dist/builtins/sys/weather.js.map +1 -1
- package/dist/builtins/sys/whoami.d.ts +1 -1
- package/dist/builtins/sys/whoami.js +2 -1
- package/dist/builtins/sys/whoami.js.map +1 -1
- package/dist/builtins/utils.d.ts +2 -19
- package/dist/builtins/utils.js +5 -55
- package/dist/builtins/utils.js.map +1 -1
- package/dist/builtins/wildcard.d.ts +4 -53
- package/dist/builtins/wildcard.js +3 -177
- package/dist/builtins/wildcard.js.map +1 -1
- package/dist/chris/backend.d.ts +22 -0
- package/dist/chris/backend.js +102 -0
- package/dist/chris/backend.js.map +1 -0
- package/dist/chris/binEntry.js.map +1 -0
- package/dist/chris/binMount.d.ts +60 -0
- package/dist/chris/binMount.js +154 -0
- package/dist/chris/binMount.js.map +1 -0
- package/dist/{core → chris}/chiliDelegate.d.ts +1 -1
- package/dist/{core → chris}/chiliDelegate.js +1 -1
- package/dist/chris/chiliDelegate.js.map +1 -0
- package/dist/chris/chrisCommands.d.ts +14 -0
- package/dist/chris/chrisCommands.js +168 -0
- package/dist/chris/chrisCommands.js.map +1 -0
- package/dist/chris/commandFallback.d.ts +3 -0
- package/dist/chris/commandFallback.js +113 -0
- package/dist/chris/commandFallback.js.map +1 -0
- package/dist/chris/completion.d.ts +3 -0
- package/dist/chris/completion.js +100 -0
- package/dist/chris/completion.js.map +1 -0
- package/dist/chris/connect.js.map +1 -0
- package/dist/chris/debug.d.ts +10 -0
- package/dist/chris/debug.js +9 -0
- package/dist/chris/debug.js.map +1 -0
- package/dist/chris/files.d.ts +16 -0
- package/dist/chris/files.js +141 -0
- package/dist/chris/files.js.map +1 -0
- package/dist/chris/filesystem.d.ts +3 -0
- package/dist/chris/filesystem.js +57 -0
- package/dist/chris/filesystem.js.map +1 -0
- package/dist/chris/help.d.ts +16 -0
- package/dist/chris/help.js +1193 -0
- package/dist/chris/help.js.map +1 -0
- package/dist/chris/jobsState.js.map +1 -0
- package/dist/chris/mounts.d.ts +7 -0
- package/dist/chris/mounts.js +34 -0
- package/dist/chris/mounts.js.map +1 -0
- package/dist/chris/navigation.d.ts +40 -0
- package/dist/chris/navigation.js +160 -0
- package/dist/chris/navigation.js.map +1 -0
- package/dist/{core → chris}/promptContext.d.ts +2 -2
- package/dist/{core → chris}/promptContext.js +3 -3
- package/dist/chris/promptContext.js.map +1 -0
- package/dist/chris/references.d.ts +14 -0
- package/dist/chris/references.js +113 -0
- package/dist/chris/references.js.map +1 -0
- package/dist/chris/tasks.d.ts +31 -0
- package/dist/chris/tasks.js +55 -0
- package/dist/chris/tasks.js.map +1 -0
- package/dist/chris/universeLayout.js.map +1 -0
- package/dist/chris/watch.d.ts +3 -0
- package/dist/chris/watch.js +15 -0
- package/dist/chris/watch.js.map +1 -0
- package/dist/core/answerKinds.d.ts +32 -0
- package/dist/core/answerKinds.js +56 -0
- package/dist/core/answerKinds.js.map +1 -0
- package/dist/core/backend.d.ts +261 -0
- package/dist/core/backend.js +32 -0
- package/dist/core/backend.js.map +1 -0
- package/dist/core/commandOrder.d.ts +16 -0
- package/dist/core/commandOrder.js +17 -0
- package/dist/core/commandOrder.js.map +1 -0
- package/dist/core/commandRegistry.d.ts +120 -0
- package/dist/core/commandRegistry.js +124 -0
- package/dist/core/commandRegistry.js.map +1 -0
- package/dist/core/coreCommands.d.ts +16 -0
- package/dist/core/coreCommands.js +156 -0
- package/dist/core/coreCommands.js.map +1 -0
- package/dist/core/dispatch.d.ts +2 -19
- package/dist/core/dispatch.js +86 -447
- package/dist/core/dispatch.js.map +1 -1
- package/dist/core/elevation.d.ts +5 -5
- package/dist/core/elevation.js +12 -7
- package/dist/core/elevation.js.map +1 -1
- package/dist/core/engine.d.ts +12 -18
- package/dist/core/engine.js +40 -117
- package/dist/core/engine.js.map +1 -1
- package/dist/core/errorText.d.ts +14 -0
- package/dist/core/errorText.js +26 -0
- package/dist/core/errorText.js.map +1 -0
- package/dist/core/expansion.d.ts +0 -2
- package/dist/core/expansion.js +43 -101
- package/dist/core/expansion.js.map +1 -1
- package/dist/core/fileRefusal.d.ts +4 -15
- package/dist/core/fileRefusal.js +4 -26
- package/dist/core/fileRefusal.js.map +1 -1
- package/dist/core/filesystem.d.ts +27 -0
- package/dist/core/filesystem.js +45 -0
- package/dist/core/filesystem.js.map +1 -0
- package/dist/core/handlerRun.d.ts +30 -0
- package/dist/core/handlerRun.js +34 -0
- package/dist/core/handlerRun.js.map +1 -0
- package/dist/core/paths.d.ts +18 -0
- package/dist/core/paths.js +49 -0
- package/dist/core/paths.js.map +1 -0
- package/dist/core/preprocess.d.ts +1 -1
- package/dist/core/preprocess.js +1 -1
- package/dist/core/preprocess.js.map +1 -1
- package/dist/core/sink.d.ts +1 -1
- package/dist/core/sink.js +0 -8
- package/dist/core/sink.js.map +1 -1
- package/dist/core/taskWatch.d.ts +42 -0
- package/dist/core/taskWatch.js +142 -0
- package/dist/core/taskWatch.js.map +1 -0
- package/dist/core/tasks.d.ts +46 -0
- package/dist/core/tasks.js +102 -0
- package/dist/core/tasks.js.map +1 -0
- package/dist/core.d.ts +22 -0
- package/dist/core.js +23 -0
- package/dist/core.js.map +1 -0
- package/dist/index.d.ts +8 -5
- package/dist/index.js +17 -5
- package/dist/index.js.map +1 -1
- package/dist/lib/completer/index.js +41 -99
- package/dist/lib/completer/index.js.map +1 -1
- package/dist/lib/prefetch.js +2 -2
- package/dist/lib/prefetch.js.map +1 -1
- package/dist/lib/vfs/listing.d.ts +1 -1
- package/dist/lib/vfs/providers/static.d.ts +15 -6
- package/dist/lib/vfs/providers/static.js +20 -43
- package/dist/lib/vfs/providers/static.js.map +1 -1
- package/dist/lib/vfs/providers/static_content.d.ts +4 -4
- package/dist/lib/vfs/providers/static_content.js +4 -24
- package/dist/lib/vfs/providers/static_content.js.map +1 -1
- package/dist/lib/vfs/vfs.d.ts +11 -2
- package/dist/lib/vfs/vfs.js +90 -51
- package/dist/lib/vfs/vfs.js.map +1 -1
- package/dist/lib/wildcard.d.ts +57 -0
- package/dist/lib/wildcard.js +183 -0
- package/dist/lib/wildcard.js.map +1 -0
- package/dist/notes.json +1 -1
- package/dist/null/backend.d.ts +29 -0
- package/dist/null/backend.js +41 -0
- package/dist/null/backend.js.map +1 -0
- package/dist/session/answer.d.ts +4 -4
- package/dist/session/answer.js +0 -2
- package/dist/session/answer.js.map +1 -1
- package/dist/session/index.d.ts +12 -10
- package/dist/session/index.js +9 -38
- package/dist/session/index.js.map +1 -1
- package/package.json +12 -6
- package/dist/builtins/fs/folderExists.d.ts +0 -8
- package/dist/builtins/fs/folderExists.js +0 -67
- package/dist/builtins/fs/folderExists.js.map +0 -1
- package/dist/command-keys.d.ts +0 -8
- package/dist/command-keys.js +0 -37
- package/dist/command-keys.js.map +0 -1
- package/dist/core/chiliDelegate.js.map +0 -1
- package/dist/core/connect.js.map +0 -1
- package/dist/core/jobsState.js.map +0 -1
- package/dist/core/promptContext.js.map +0 -1
- package/dist/lib/vfs/providers/binEntry.js.map +0 -1
- package/dist/universe/universeLayout.js.map +0 -1
- /package/dist/{lib/vfs/providers → chris}/binEntry.d.ts +0 -0
- /package/dist/{lib/vfs/providers → chris}/binEntry.js +0 -0
- /package/dist/{core → chris}/connect.d.ts +0 -0
- /package/dist/{core → chris}/connect.js +0 -0
- /package/dist/{core → chris}/jobsState.d.ts +0 -0
- /package/dist/{core → chris}/jobsState.js +0 -0
- /package/dist/{universe → chris}/universeLayout.d.ts +0 -0
- /package/dist/{universe → chris}/universeLayout.js +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file The kinds of row an index can name, and the kinds each verb takes.
|
|
3
|
+
*
|
|
4
|
+
* The core numbers files and folders; a backend adds the kinds its own
|
|
5
|
+
* listings carry (ChRIS: patients, studies, series) and says which of them its
|
|
6
|
+
* verbs take. Both are read when an index is resolved, so they follow the
|
|
7
|
+
* installed backend.
|
|
8
|
+
*
|
|
9
|
+
* @module
|
|
10
|
+
*/
|
|
11
|
+
import { type AnswerKindLook } from './backend.js';
|
|
12
|
+
/**
|
|
13
|
+
* Every kind an index may name: the backend's first, then the core's.
|
|
14
|
+
*
|
|
15
|
+
* @returns The kinds, in that order.
|
|
16
|
+
*/
|
|
17
|
+
export declare function answerKinds_get(): ReadonlyArray<AnswerKindLook>;
|
|
18
|
+
/**
|
|
19
|
+
* One kind, by its code.
|
|
20
|
+
*
|
|
21
|
+
* @param code - The three letters.
|
|
22
|
+
* @returns The kind, or undefined when nothing numbers it.
|
|
23
|
+
*/
|
|
24
|
+
export declare function answerKind_find(code: string): AnswerKindLook | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* What a verb can be handed by index: the core's kinds for it, then the
|
|
27
|
+
* backend's.
|
|
28
|
+
*
|
|
29
|
+
* @param verb - The command word.
|
|
30
|
+
* @returns The kinds, or undefined when the verb takes any kind.
|
|
31
|
+
*/
|
|
32
|
+
export declare function verbTakes_get(verb: string): ReadonlyArray<string> | undefined;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file The kinds of row an index can name, and the kinds each verb takes.
|
|
3
|
+
*
|
|
4
|
+
* The core numbers files and folders; a backend adds the kinds its own
|
|
5
|
+
* listings carry (ChRIS: patients, studies, series) and says which of them its
|
|
6
|
+
* verbs take. Both are read when an index is resolved, so they follow the
|
|
7
|
+
* installed backend.
|
|
8
|
+
*
|
|
9
|
+
* @module
|
|
10
|
+
*/
|
|
11
|
+
import { backendInstalled_get } from './backend.js';
|
|
12
|
+
/** The kinds the core numbers. */
|
|
13
|
+
const CORE_KINDS = [
|
|
14
|
+
{ code: 'FIL', word: 'a file', example: '@FIL2' },
|
|
15
|
+
{ code: 'DIR', word: 'a folder', example: '@DIR4' },
|
|
16
|
+
];
|
|
17
|
+
/** What the core's own verbs take by index. */
|
|
18
|
+
const CORE_TAKES = new Map([
|
|
19
|
+
['cat', ['FIL']],
|
|
20
|
+
['cd', ['DIR']],
|
|
21
|
+
]);
|
|
22
|
+
/**
|
|
23
|
+
* Every kind an index may name: the backend's first, then the core's.
|
|
24
|
+
*
|
|
25
|
+
* @returns The kinds, in that order.
|
|
26
|
+
*/
|
|
27
|
+
export function answerKinds_get() {
|
|
28
|
+
const backend = backendInstalled_get();
|
|
29
|
+
return [...(backend?.answerKinds ?? []), ...CORE_KINDS];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* One kind, by its code.
|
|
33
|
+
*
|
|
34
|
+
* @param code - The three letters.
|
|
35
|
+
* @returns The kind, or undefined when nothing numbers it.
|
|
36
|
+
*/
|
|
37
|
+
export function answerKind_find(code) {
|
|
38
|
+
return answerKinds_get().find((kind) => kind.code === code);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* What a verb can be handed by index: the core's kinds for it, then the
|
|
42
|
+
* backend's.
|
|
43
|
+
*
|
|
44
|
+
* @param verb - The command word.
|
|
45
|
+
* @returns The kinds, or undefined when the verb takes any kind.
|
|
46
|
+
*/
|
|
47
|
+
export function verbTakes_get(verb) {
|
|
48
|
+
const added = (backendInstalled_get()?.verbTakes ?? [])
|
|
49
|
+
.filter((entry) => entry.verb === verb)
|
|
50
|
+
.flatMap((entry) => entry.kinds);
|
|
51
|
+
const core = CORE_TAKES.get(verb);
|
|
52
|
+
if (core === undefined && added.length === 0)
|
|
53
|
+
return undefined;
|
|
54
|
+
return [...(core ?? []), ...added];
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=answerKinds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"answerKinds.js","sourceRoot":"","sources":["../../src/core/answerKinds.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,oBAAoB,EAAqC,MAAM,cAAc,CAAC;AAEvF,kCAAkC;AAClC,MAAM,UAAU,GAAkC;IAChD,EAAE,IAAI,EAAE,KAAK,EAAE,I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C,CAAC"}
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file The backend descriptor: everything a session needs that the core does
|
|
3
|
+
* not know.
|
|
4
|
+
*
|
|
5
|
+
* The engine runs over exactly one backend (docs/backend-neutral.adoc). The
|
|
6
|
+
* core asks it to prepare its own state, where the session's home is, and
|
|
7
|
+
* where the working directory was left, what the prompt shows and what the
|
|
8
|
+
* daemon heartbeats, which `${name}` references it answers and what kinds of
|
|
9
|
+
* row its listings number. ChRIS is one backend
|
|
10
|
+
* (`chris/backend.ts`), installed by the package entry; a host may install
|
|
11
|
+
* another before the engine boots.
|
|
12
|
+
*
|
|
13
|
+
* @module
|
|
14
|
+
*/
|
|
15
|
+
import type { PromptContext, CubeTelemetry, JobsStateTelemetry, CommandEnvelope, WatchState, Task } from '@fnndsc/menu';
|
|
16
|
+
import type { ReferenceValue } from '../lib/parser.js';
|
|
17
|
+
import type { ListingLook, VFSDispatcher } from '@fnndsc/fond';
|
|
18
|
+
import type { ListingItem } from '@fnndsc/menu';
|
|
19
|
+
/**
|
|
20
|
+
* Who a session is and where: the input a host keys the session by (calypso's
|
|
21
|
+
* berth name is `user@where`, normalised).
|
|
22
|
+
*
|
|
23
|
+
* A disconnected session still has one, so it stays discoverable; each
|
|
24
|
+
* backend names its own (`where` naming the backend), so two backends'
|
|
25
|
+
* disconnected sessions never share a name.
|
|
26
|
+
*/
|
|
27
|
+
export interface SessionIdentity {
|
|
28
|
+
/** The user, exactly as the backend knows them. */
|
|
29
|
+
readonly user: string;
|
|
30
|
+
/** Where the session lives: a server URL, or a name for no server. */
|
|
31
|
+
readonly where: string;
|
|
32
|
+
/** Whether the session is connected to `where`. */
|
|
33
|
+
readonly connected: boolean;
|
|
34
|
+
}
|
|
35
|
+
/** What a backend tells the core about the session it serves. */
|
|
36
|
+
export interface BackendSession {
|
|
37
|
+
/** Prepares the backend's own state (configuration, stored credentials) before the session starts. */
|
|
38
|
+
init(): Promise<void>;
|
|
39
|
+
/** Who the session is, connected or not. */
|
|
40
|
+
identity_get(): Promise<SessionIdentity>;
|
|
41
|
+
/** The session's user as the backend last knew them, or null when it knows none. */
|
|
42
|
+
user_get(): Promise<string | null>;
|
|
43
|
+
/** The session's home: where it begins before it has a working directory of its own. */
|
|
44
|
+
home_get(): Promise<string>;
|
|
45
|
+
/** The working directory the identity left, or null when it has none stored. */
|
|
46
|
+
cwd_load(): Promise<string | null>;
|
|
47
|
+
/** Stores the working directory for the identity. */
|
|
48
|
+
cwd_save(path: string): Promise<void>;
|
|
49
|
+
}
|
|
50
|
+
/** What the core knows about the previous command, for the prompt. */
|
|
51
|
+
export interface PromptLastCommand {
|
|
52
|
+
lastExitCode?: number;
|
|
53
|
+
lastCommandDurationMs?: number;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* What a daemon heartbeats about the backend's own state, in the wire's
|
|
57
|
+
* telemetry shape: the index counts, the server's pace, the work in flight.
|
|
58
|
+
*/
|
|
59
|
+
export interface BackendTelemetry {
|
|
60
|
+
jobs: number;
|
|
61
|
+
feeds: number;
|
|
62
|
+
cube?: CubeTelemetry;
|
|
63
|
+
state?: JobsStateTelemetry;
|
|
64
|
+
}
|
|
65
|
+
/** A name the session answers for in `${name}`, and the dotted names under it. */
|
|
66
|
+
export interface ReferenceSource {
|
|
67
|
+
/** The name (`feed`); a dotted name under it (`feed.x`) is asked of it too. */
|
|
68
|
+
readonly name: string;
|
|
69
|
+
/**
|
|
70
|
+
* What a name refers to now: its value, null when the session has none
|
|
71
|
+
* yet, or undefined when it is a dotted name this source does not answer
|
|
72
|
+
* (the manifest's parameters and the environment are asked next).
|
|
73
|
+
*/
|
|
74
|
+
readonly resolve: (name: string) => Promise<ReferenceValue | undefined>;
|
|
75
|
+
}
|
|
76
|
+
/** A kind of row a listing numbers, as an index writes it: `@SER3` is the third series. */
|
|
77
|
+
export interface AnswerKindLook {
|
|
78
|
+
/** Three capital letters. */
|
|
79
|
+
readonly code: string;
|
|
80
|
+
/** The kind in words, for a refusal: `a series`. */
|
|
81
|
+
readonly word: string;
|
|
82
|
+
/** An index of it, for the refusal that teaches the syntax (`@SER3`); a kind without one is not shown there. */
|
|
83
|
+
readonly example?: string;
|
|
84
|
+
}
|
|
85
|
+
/** The kinds a verb can be handed by index, beyond those the core declares for it. */
|
|
86
|
+
export interface VerbTakes {
|
|
87
|
+
readonly verb: string;
|
|
88
|
+
readonly kinds: ReadonlyArray<string>;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* What a backend does with a command word the registry does not answer.
|
|
92
|
+
*
|
|
93
|
+
* The core runs a line in one of two ways: directly, its output going to
|
|
94
|
+
* the surface, or captured, its output feeding a pipe or a redirect. Each
|
|
95
|
+
* asks the backend at fixed points, so a backend's words are found where
|
|
96
|
+
* they always were.
|
|
97
|
+
*/
|
|
98
|
+
export interface BackendFallback {
|
|
99
|
+
/**
|
|
100
|
+
* A word the backend runs ahead of the registry on a direct line, and
|
|
101
|
+
* after the registry's envelope commands on a captured one (ChRIS: a
|
|
102
|
+
* plugin named with its version). Null when the word is not one.
|
|
103
|
+
*/
|
|
104
|
+
readonly claim?: (command: string, args: string[]) => Promise<CommandEnvelope | null>;
|
|
105
|
+
/**
|
|
106
|
+
* A word nothing else answered. The envelope it returns has been
|
|
107
|
+
* delivered; null means the backend does not know the word either, and
|
|
108
|
+
* the core says `command not found`.
|
|
109
|
+
*/
|
|
110
|
+
readonly unknown?: (command: string, args: string[], captured: boolean) => Promise<CommandEnvelope | null>;
|
|
111
|
+
/** Help for a word the registry has no page for, or null to let the core say it has none. */
|
|
112
|
+
readonly help?: (command: string) => Promise<string | null>;
|
|
113
|
+
}
|
|
114
|
+
/** A listing cache: listings kept for a while, each saying whether it is still current. */
|
|
115
|
+
export interface ListingCache {
|
|
116
|
+
/** A kept listing and whether it is current, or null when none is kept. */
|
|
117
|
+
cache_get<T = unknown>(path: string): {
|
|
118
|
+
data: T;
|
|
119
|
+
fresh: boolean;
|
|
120
|
+
} | null;
|
|
121
|
+
/** Keeps a listing. */
|
|
122
|
+
cache_set<T = unknown>(path: string, data: T): void;
|
|
123
|
+
/** Forgets one folder's listing: something in it changed. */
|
|
124
|
+
cache_invalidate?(path: string): void;
|
|
125
|
+
/** Forgets a folder's listing and every one beneath it: the folder went. */
|
|
126
|
+
cache_invalidateTree?(path: string): void;
|
|
127
|
+
}
|
|
128
|
+
/** What entering a folder outside the mounts came to, for `cd`. */
|
|
129
|
+
export interface FolderEntry {
|
|
130
|
+
/** The working directory to stand in, or null when the path is not a folder one can. */
|
|
131
|
+
readonly cwd: string | null;
|
|
132
|
+
/** What `cd` shows on its way (a debugging trace). */
|
|
133
|
+
readonly rendered: string;
|
|
134
|
+
/** What `cd` says when it cannot, in full; empty to let the core say `No such file or directory`. */
|
|
135
|
+
readonly renderedErr: string;
|
|
136
|
+
}
|
|
137
|
+
/** The backend's filesystem, as the core's listings, globbing and completion read it. */
|
|
138
|
+
export interface BackendFilesystem {
|
|
139
|
+
/** Every path goes through it: the backend's mounts and its fallback. The core adds its own mounts. */
|
|
140
|
+
readonly dispatcher: VFSDispatcher;
|
|
141
|
+
/** Where listings are kept between reads; absent, every listing is read afresh. */
|
|
142
|
+
readonly cache?: ListingCache;
|
|
143
|
+
/** Whether a path's listing may be kept (ChRIS: not under `/proc`, which keeps its own); absent, every path may. */
|
|
144
|
+
readonly cache_holds?: (path: string) => boolean;
|
|
145
|
+
/** What a long listing's rows carry beyond the listing (ChRIS: a feed's tags). */
|
|
146
|
+
readonly longRows_annotate?: (items: ListingItem[]) => Promise<ListingItem[]>;
|
|
147
|
+
/**
|
|
148
|
+
* The folders whose links the last walk could not read, taken (and so
|
|
149
|
+
* cleared): a listing that fails says the path was walked as written.
|
|
150
|
+
*/
|
|
151
|
+
readonly unreadLinks_take?: () => Promise<string[]>;
|
|
152
|
+
/** A folder as the filesystem holds it, links followed, for globbing beneath it; absent, the path as given. */
|
|
153
|
+
readonly path_physical?: (path: string) => Promise<string>;
|
|
154
|
+
/** Paths that are always folders, entered without asking (beside the mounts and the folders above them). */
|
|
155
|
+
readonly structural?: ReadonlyArray<string>;
|
|
156
|
+
/**
|
|
157
|
+
* Enters a folder outside the mounts (`cd`): whether it is one, and where
|
|
158
|
+
* the session then stands. Absent, a path that lists is a folder.
|
|
159
|
+
*/
|
|
160
|
+
readonly folder_enter?: (logicalPath: string, pathArg: string) => Promise<FolderEntry>;
|
|
161
|
+
/** The title a path segment shows under `pwd --title` (ChRIS: a feed's name), or null for none. */
|
|
162
|
+
readonly segment_title?: (segment: string) => Promise<string | null>;
|
|
163
|
+
}
|
|
164
|
+
/** What a backend adds to completion. */
|
|
165
|
+
export interface BackendCompletion {
|
|
166
|
+
/** Command words beyond the registry's (ChRIS: its plugins). */
|
|
167
|
+
readonly commandWords?: () => Promise<string[]>;
|
|
168
|
+
/** The `--option` words for a line, or null when the line is not one the backend completes. */
|
|
169
|
+
readonly options?: (args: string[], word: string) => Promise<string[] | null>;
|
|
170
|
+
/** Names completed at `/` even when the root's listing lacks them; absent, the core's `usr`. */
|
|
171
|
+
readonly rootWords?: ReadonlyArray<string>;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Where a backend's long-running steps come from: one kind of task (ChRIS:
|
|
175
|
+
* its plugin instances; an infrastructure backend: its install steps).
|
|
176
|
+
*/
|
|
177
|
+
export interface TaskSource {
|
|
178
|
+
/** Its name, and its folder: `/proc/<id>`. */
|
|
179
|
+
readonly id: string;
|
|
180
|
+
/** What an operator reads it as. */
|
|
181
|
+
readonly label: string;
|
|
182
|
+
/**
|
|
183
|
+
* The backend mounts `/proc/<id>` itself (ChRIS's `/proc/jobs`, a tree of
|
|
184
|
+
* feeds and instances); otherwise the core mounts each task as a folder of
|
|
185
|
+
* its fields.
|
|
186
|
+
*/
|
|
187
|
+
readonly mounted?: boolean;
|
|
188
|
+
/** Its tasks, now. */
|
|
189
|
+
list(): Promise<Task[]>;
|
|
190
|
+
/** One task's log, whole; absent, its `logTail` is its log. */
|
|
191
|
+
log?(id: string): Promise<string | null>;
|
|
192
|
+
}
|
|
193
|
+
/** Administrator credentials, collected by the core from the surface. */
|
|
194
|
+
export interface ElevationCredentials {
|
|
195
|
+
username: string;
|
|
196
|
+
password: string;
|
|
197
|
+
}
|
|
198
|
+
/** One backend, as the core sees it. */
|
|
199
|
+
export interface Backend {
|
|
200
|
+
/** Stable id naming the backend. */
|
|
201
|
+
readonly id: string;
|
|
202
|
+
/** The session it serves. */
|
|
203
|
+
readonly session: BackendSession;
|
|
204
|
+
/** The session facts a prompt shows, in the wire's prompt context. */
|
|
205
|
+
readonly prompt?: (last?: PromptLastCommand) => Promise<PromptContext>;
|
|
206
|
+
/** The daemon's heartbeat about the backend's state; read often, so it is cheap. */
|
|
207
|
+
readonly telemetry?: () => BackendTelemetry;
|
|
208
|
+
/** The `${name}` references it answers, beside the core's `cwd`. */
|
|
209
|
+
readonly references?: ReadonlyArray<ReferenceSource>;
|
|
210
|
+
/** The kinds of row its listings number; they lead the core's (`FIL`, `DIR`) wherever kinds are listed. */
|
|
211
|
+
readonly answerKinds?: ReadonlyArray<AnswerKindLook>;
|
|
212
|
+
/** The kinds its verbs take by index, and those it adds to the core's verbs. */
|
|
213
|
+
readonly verbTakes?: ReadonlyArray<VerbTakes>;
|
|
214
|
+
/** What it does with words the registry does not answer. */
|
|
215
|
+
readonly fallback?: BackendFallback;
|
|
216
|
+
/** Runs one command with administrator rights (`sudo`); absent, `sudo` is refused. */
|
|
217
|
+
readonly elevate?: (credentials: ElevationCredentials, run: () => Promise<CommandEnvelope>) => Promise<CommandEnvelope>;
|
|
218
|
+
/** Watches a subject a surface named (ChRIS: a feed's jobs), on behalf of an owner. */
|
|
219
|
+
readonly watch?: {
|
|
220
|
+
readonly set: (subject: string, owner: string, on: boolean) => WatchState | null;
|
|
221
|
+
readonly release: (owner: string) => void;
|
|
222
|
+
};
|
|
223
|
+
/** Reads and writes one file's bytes for a surface, at a path the session resolves. */
|
|
224
|
+
readonly files?: {
|
|
225
|
+
readonly read: (path: string) => Promise<Buffer>;
|
|
226
|
+
readonly write: (path: string, bytes: Buffer) => Promise<void>;
|
|
227
|
+
};
|
|
228
|
+
/** Its long-running steps, by kind; the core mounts those that bring no mount of their own under `/proc`. */
|
|
229
|
+
readonly tasks?: ReadonlyArray<TaskSource>;
|
|
230
|
+
/** Its filesystem; absent, the session has only the core's own mounts. */
|
|
231
|
+
readonly vfs?: BackendFilesystem;
|
|
232
|
+
/** What it adds to completion. */
|
|
233
|
+
readonly completion?: BackendCompletion;
|
|
234
|
+
/** How its listings show: the kinds it lists beside the core's, and how a name is coloured. */
|
|
235
|
+
readonly listingLook?: ListingLook;
|
|
236
|
+
/** Whether the backend is debugging (error messages keep their function stamp), or null before it can say. */
|
|
237
|
+
readonly debug_get?: () => boolean | null;
|
|
238
|
+
/** Turns the backend's debugging on or off. */
|
|
239
|
+
readonly debug_set?: (on: boolean) => void;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Installs the session's backend. The last install wins; a host installs
|
|
243
|
+
* before the engine boots.
|
|
244
|
+
*
|
|
245
|
+
* @param backend - The backend the session runs over.
|
|
246
|
+
*/
|
|
247
|
+
export declare function backend_install(backend: Backend): void;
|
|
248
|
+
/**
|
|
249
|
+
* The installed backend, or null before one is installed: for a reader that
|
|
250
|
+
* has an answer without one (the core's own references and kinds).
|
|
251
|
+
*
|
|
252
|
+
* @returns The backend, or null.
|
|
253
|
+
*/
|
|
254
|
+
export declare function backendInstalled_get(): Backend | null;
|
|
255
|
+
/**
|
|
256
|
+
* The installed backend.
|
|
257
|
+
*
|
|
258
|
+
* @returns The backend the session runs over.
|
|
259
|
+
* @throws Error when no backend is installed: the session cannot run without one.
|
|
260
|
+
*/
|
|
261
|
+
export declare function backend_get(): Backend;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
let installed = null;
|
|
2
|
+
/**
|
|
3
|
+
* Installs the session's backend. The last install wins; a host installs
|
|
4
|
+
* before the engine boots.
|
|
5
|
+
*
|
|
6
|
+
* @param backend - The backend the session runs over.
|
|
7
|
+
*/
|
|
8
|
+
export function backend_install(backend) {
|
|
9
|
+
installed = backend;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The installed backend, or null before one is installed: for a reader that
|
|
13
|
+
* has an answer without one (the core's own references and kinds).
|
|
14
|
+
*
|
|
15
|
+
* @returns The backend, or null.
|
|
16
|
+
*/
|
|
17
|
+
export function backendInstalled_get() {
|
|
18
|
+
return installed;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The installed backend.
|
|
22
|
+
*
|
|
23
|
+
* @returns The backend the session runs over.
|
|
24
|
+
* @throws Error when no backend is installed: the session cannot run without one.
|
|
25
|
+
*/
|
|
26
|
+
export function backend_get() {
|
|
27
|
+
if (installed === null) {
|
|
28
|
+
throw new Error('brasa: no backend installed; install one with backend_install before the engine boots');
|
|
29
|
+
}
|
|
30
|
+
return installed;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=backend.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backend.js","sourceRoot":"","sources":["../../src/core/backend.ts"],"names":[],"mappings":"AA6PA,IAAI,SAAS,GAAmB,IAAI,CAAC;AAErC;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,OAAgB;IAC9C,SAAS,GAAG,OAAO,CAAC;AACtB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB;IAClC,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,WAAW;IACzB,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,uFAAuF,CAAC,CAAC;IAC3G,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file The order commands list in: tab completion offers matches in this order.
|
|
3
|
+
*
|
|
4
|
+
* Kept explicitly, apart from which group registers a name, so registering the
|
|
5
|
+
* core and a backend's commands separately does not reorder what the shell
|
|
6
|
+
* offers. A name registered but not listed here lists after these, in
|
|
7
|
+
* registration order.
|
|
8
|
+
*
|
|
9
|
+
* @module
|
|
10
|
+
*/
|
|
11
|
+
/** Help topics, which are also the `/bin` builtins and the completion candidates. */
|
|
12
|
+
export declare const HELP_ORDER: string[];
|
|
13
|
+
/** Names answered by an envelope handler. */
|
|
14
|
+
export declare const ENVELOPE_ORDER: string[];
|
|
15
|
+
/** Names answered by a plain handler. */
|
|
16
|
+
export declare const PLAIN_ORDER: string[];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file The order commands list in: tab completion offers matches in this order.
|
|
3
|
+
*
|
|
4
|
+
* Kept explicitly, apart from which group registers a name, so registering the
|
|
5
|
+
* core and a backend's commands separately does not reorder what the shell
|
|
6
|
+
* offers. A name registered but not listed here lists after these, in
|
|
7
|
+
* registration order.
|
|
8
|
+
*
|
|
9
|
+
* @module
|
|
10
|
+
*/
|
|
11
|
+
/** Help topics, which are also the `/bin` builtins and the completion candidates. */
|
|
12
|
+
export const HELP_ORDER = ["2048", "user", "sudo", "ls", "cd", "netstat", "pwd", "cat", "edit", "setfacl", "getfacl", "chmod", "setfattr", "getfattr", "rm", "cp", "mv", "touch", "config", "mkdir", "rmdir", "upload", "download", "connect", "logout", "plugin", "plugins", "feed", "feeds", "files", "links", "dirs", "pipeline", "pacs", "pacs query", "pacs pull", "pacs connect", "pacs disconnect", "pacs list", "pacsservers", "pacsqueries", "pacsretrieve", "exit", "context", "whoami", "version", "id", "fortune", "cowsay", "cowthink", "figlet", "banner", "lolcat", "rev", "tac", "yes", "seq", "factor", "primes", "shuf", "roll", "rot13", "morse", "calc", "units", "who", "uptime", "ping", "chrisfetch", "say", "wtf", "file", "xxd", "strings", "sha256sum", "md5sum", "qr", "pom", "stardate", "ddate", "sunrise", "timer", "leave", "stopwatch", "sl", "cmatrix", "rain", "asciiquarium", "tetris", "snake", "quiz", "hangman", "notes", "weather", "motd", "date", "cal", "whereami", "proc", "prompt", "physicalmode", "timing", "debug", "parametersofplugin", "tree", "du", "store", "compute", "tag", "tags", "record", "play", "expect", "gather", "group", "groups", "pluginmeta", "pluginmetas", "plugininstance", "plugininstances", "workflow", "workflows", "meta", "metas", "instance", "instances", "job", "jobs", "help", "!", "dcm", "image", "cubepath", "query", "pull"];
|
|
13
|
+
/** Names answered by an envelope handler. */
|
|
14
|
+
export const ENVELOPE_ORDER = ["2048", "cat", "cd", "cp", "mv", "rm", "setfacl", "getfacl", "chmod", "setfattr", "getfattr", "mkdir", "rmdir", "touch", "pwd", "netstat", "id", "whoami", "whereami", "timing", "physicalmode", "debug", "version", "fortune", "cowsay", "cowthink", "figlet", "banner", "lolcat", "rev", "tac", "yes", "seq", "factor", "primes", "shuf", "roll", "rot13", "morse", "calc", "units", "who", "uptime", "ping", "chrisfetch", "say", "wtf", "file", "xxd", "strings", "sha256sum", "md5sum", "qr", "pom", "stardate", "ddate", "sunrise", "timer", "leave", "stopwatch", "sl", "cmatrix", "rain", "asciiquarium", "tetris", "snake", "quiz", "hangman", "weather", "motd", "notes", "date", "cal", "ls", "tree", "du", "help", "proc", "logout", "cubepath", "dcm", "image", "query", "feed", "feeds", "compute", "computes", "tag", "tags", "expect", "play", "record", "gather", "group", "groups", "user", "users", "pluginmeta", "pluginmetas", "meta", "metas", "plugininstance", "plugininstances", "instance", "instances", "job", "jobs", "workflow", "workflows", "files", "links", "dirs", "context", "parametersofplugin", "plugin", "plugins", "pacsservers", "pacsqueries", "pacsretrieve", "connect", "upload", "download", "store", "edit", "config", "pacs", "pull", "pipeline", "pipelines"];
|
|
15
|
+
/** Names answered by a plain handler. */
|
|
16
|
+
export const PLAIN_ORDER = ["2048", "connect", "logout", "cd", "ls", "pwd", "netstat", "cat", "rm", "setfacl", "getfacl", "chmod", "setfattr", "getfattr", "cp", "mv", "touch", "mkdir", "rmdir", "upload", "pacs", "pipeline", "pipelines", "pull", "query", "cubepath", "dcm", "image", "download", "edit", "config", "context", "parametersofplugin", "physicalmode", "timing", "id", "whoami", "whereami", "debug", "fortune", "cowsay", "cowthink", "figlet", "banner", "lolcat", "rev", "tac", "yes", "seq", "factor", "primes", "shuf", "roll", "rot13", "morse", "calc", "units", "who", "uptime", "ping", "chrisfetch", "say", "wtf", "file", "xxd", "strings", "sha256sum", "md5sum", "qr", "pom", "stardate", "ddate", "sunrise", "timer", "leave", "stopwatch", "sl", "cmatrix", "rain", "asciiquarium", "tetris", "snake", "quiz", "hangman", "weather", "motd", "notes", "date", "cal", "help", "proc", "tree", "du", "store", "plugin", "plugins", "feed", "feeds", "compute", "computes", "tag", "tags", "expect", "play", "record", "gather", "group", "groups", "pluginmeta", "pluginmetas", "meta", "metas", "plugininstance", "plugininstances", "instance", "instances", "job", "jobs", "workflow", "workflows", "files", "links", "dirs", "pacsservers", "pacsqueries", "pacsretrieve"];
|
|
17
|
+
//# sourceMappingURL=commandOrder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commandOrder.js","sourceRoot":"","sources":["../../src/core/commandOrder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,qFAAqF;AACrF,MAAM,CAAC,MAAM,UAAU,GAAa,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,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AAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file The command registry: every name the engine answers in-process, and the
|
|
3
|
+
* handler that answers it.
|
|
4
|
+
*
|
|
5
|
+
* A command registers as an envelope handler (it returns its outcome as an
|
|
6
|
+
* envelope) or a plain handler (it may print, and returns an envelope or
|
|
7
|
+
* nothing). Dispatch, the capture path and the pipe's "is this a builtin" test
|
|
8
|
+
* read the registry, never a table of their own. So do `help`, the `/bin`
|
|
9
|
+
* builtin list and command completion, through the help a command registers.
|
|
10
|
+
*
|
|
11
|
+
* Handlers are kept in plain records and looked up by index, exactly as the
|
|
12
|
+
* dispatch tables were: a name is a builtin when it is `in` a record. A record
|
|
13
|
+
* inherits from `Object.prototype`, so a name such as `toString` counts as a
|
|
14
|
+
* builtin too; that is how the tables behaved, and changing it is a decision of
|
|
15
|
+
* its own, not a side effect of moving the lookup here.
|
|
16
|
+
*
|
|
17
|
+
* Listing order is kept explicitly (`commandOrder_set`), apart from which
|
|
18
|
+
* group registered a name, so the core's and a backend's commands registering
|
|
19
|
+
* separately do not reorder what the shell offers; an unlisted name lists
|
|
20
|
+
* after, in registration order. A later registration of a name replaces the
|
|
21
|
+
* earlier.
|
|
22
|
+
*
|
|
23
|
+
* @module
|
|
24
|
+
*/
|
|
25
|
+
import type { CommandEnvelope } from '@fnndsc/menu';
|
|
26
|
+
/** A builtin that returns its outcome as an envelope. */
|
|
27
|
+
export type EnvelopeHandler = (args: string[]) => Promise<CommandEnvelope>;
|
|
28
|
+
/** A builtin that may print, and returns an envelope or nothing. */
|
|
29
|
+
export type CommandHandler = (args: string[]) => Promise<void | CommandEnvelope>;
|
|
30
|
+
/** A command's help: what `help <name>` shows, and what the listings summarise. */
|
|
31
|
+
export interface CommandHelp {
|
|
32
|
+
usage: string;
|
|
33
|
+
/** One line for listings; the description stands in when there is none. */
|
|
34
|
+
summary?: string;
|
|
35
|
+
description: string;
|
|
36
|
+
subcommands?: string[];
|
|
37
|
+
options?: string[];
|
|
38
|
+
examples?: string[];
|
|
39
|
+
}
|
|
40
|
+
/** A group of commands registered together. */
|
|
41
|
+
export interface CommandGroup {
|
|
42
|
+
/** Commands answered by an envelope handler. */
|
|
43
|
+
envelope?: Record<string, EnvelopeHandler>;
|
|
44
|
+
/** Commands answered by a plain handler. */
|
|
45
|
+
plain?: Record<string, CommandHandler>;
|
|
46
|
+
/**
|
|
47
|
+
* Help, by name. Its names are the builtins `/bin` lists and the shell
|
|
48
|
+
* completes, in registration order.
|
|
49
|
+
*/
|
|
50
|
+
help?: Record<string, CommandHelp>;
|
|
51
|
+
}
|
|
52
|
+
/** Who registers a group: the core, or the session's backend. */
|
|
53
|
+
export type CommandOwner = 'core' | 'backend';
|
|
54
|
+
/**
|
|
55
|
+
* Every envelope handler registered, by name: the record the engine's
|
|
56
|
+
* `ENVELOPE_HANDLERS` export names. Read through {@link envelopeHandler_get}.
|
|
57
|
+
*/
|
|
58
|
+
export declare const ENVELOPE_HANDLERS: Readonly<Record<string, EnvelopeHandler>>;
|
|
59
|
+
/**
|
|
60
|
+
* Every plain handler registered, by name: the record the engine's
|
|
61
|
+
* `COMMAND_HANDLERS` export names. Read through {@link plainHandler_get}.
|
|
62
|
+
*/
|
|
63
|
+
export declare const COMMAND_HANDLERS: Readonly<Record<string, CommandHandler>>;
|
|
64
|
+
/**
|
|
65
|
+
* Sets the order names list in, by kind, apart from which group registered
|
|
66
|
+
* them: a registered name in the order lists there, and any other after,
|
|
67
|
+
* in registration order.
|
|
68
|
+
*
|
|
69
|
+
* @param order - The names, by kind, in listing order.
|
|
70
|
+
*/
|
|
71
|
+
export declare function commandOrder_set(order: {
|
|
72
|
+
envelope?: string[];
|
|
73
|
+
plain?: string[];
|
|
74
|
+
help?: string[];
|
|
75
|
+
}): void;
|
|
76
|
+
/**
|
|
77
|
+
* Registers a group of commands. The core's come first; a backend's are
|
|
78
|
+
* added beside them and may not replace one (a backend never overrides a
|
|
79
|
+
* core command).
|
|
80
|
+
*
|
|
81
|
+
* @param group - The commands, by name, in the order they list.
|
|
82
|
+
* @param owner - Whose commands they are: the core's, or a backend's.
|
|
83
|
+
* @throws {Error} When a backend's group names a core command.
|
|
84
|
+
*/
|
|
85
|
+
export declare function commands_register(group: CommandGroup, owner?: CommandOwner): void;
|
|
86
|
+
/**
|
|
87
|
+
* The envelope handler a name reaches, by index (as the tables were read).
|
|
88
|
+
*
|
|
89
|
+
* @param name - The command name.
|
|
90
|
+
* @returns The handler, or undefined.
|
|
91
|
+
*/
|
|
92
|
+
export declare function envelopeHandler_get(name: string): EnvelopeHandler | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* The plain handler a name reaches, by index (as the tables were read).
|
|
95
|
+
*
|
|
96
|
+
* @param name - The command name.
|
|
97
|
+
* @returns The handler, or undefined.
|
|
98
|
+
*/
|
|
99
|
+
export declare function plainHandler_get(name: string): CommandHandler | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* Whether a name is answered in-process, by either kind of handler: the pipe's
|
|
102
|
+
* test for running a segment in the engine rather than on the host.
|
|
103
|
+
*
|
|
104
|
+
* @param name - The command name.
|
|
105
|
+
* @returns True when the name is `in` either record.
|
|
106
|
+
*/
|
|
107
|
+
export declare function builtinCommand_has(name: string): boolean;
|
|
108
|
+
/** @returns The names answered by an envelope handler, in listing order. */
|
|
109
|
+
export declare function envelopeCommand_names(): string[];
|
|
110
|
+
/** @returns The names answered by a plain handler, in listing order. */
|
|
111
|
+
export declare function plainCommand_names(): string[];
|
|
112
|
+
/**
|
|
113
|
+
* A name's help, by index (as the help record was read).
|
|
114
|
+
*
|
|
115
|
+
* @param name - The command or topic name.
|
|
116
|
+
* @returns The help, or undefined.
|
|
117
|
+
*/
|
|
118
|
+
export declare function commandHelpEntry_get(name: string): CommandHelp | undefined;
|
|
119
|
+
/** @returns The names that have help, in listing order: `/bin`'s builtins and the shell's completions. */
|
|
120
|
+
export declare function helpTopic_names(): string[];
|