@fnndsc/brasa 0.56.1 → 0.56.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/buildinfo.json +1 -1
- package/dist/builtins/berth/berth.d.ts +90 -3
- package/dist/builtins/berth/berth.js +129 -76
- package/dist/builtins/berth/berth.js.map +1 -1
- package/dist/builtins/berth/berthClose.d.ts +25 -6
- package/dist/builtins/berth/berthClose.js +8 -64
- package/dist/builtins/berth/berthClose.js.map +1 -1
- package/dist/builtins/berth/berthCube.d.ts +3 -2
- package/dist/builtins/berth/berthCube.js +9 -16
- package/dist/builtins/berth/berthCube.js.map +1 -1
- package/dist/builtins/berth/berthProcesses.js +33 -3
- package/dist/builtins/berth/berthProcesses.js.map +1 -1
- package/dist/builtins/debug.d.ts +24 -3
- package/dist/builtins/debug.js +66 -13
- package/dist/builtins/debug.js.map +1 -1
- package/dist/builtins/fs/acl.args.d.ts +5 -38
- package/dist/builtins/fs/acl.args.js +6 -72
- package/dist/builtins/fs/acl.args.js.map +1 -1
- package/dist/builtins/fs/acl.d.ts +100 -10
- package/dist/builtins/fs/acl.js +222 -68
- package/dist/builtins/fs/acl.js.map +1 -1
- package/dist/builtins/fs/cat.args.d.ts +14 -15
- package/dist/builtins/fs/cat.args.js +13 -40
- package/dist/builtins/fs/cat.args.js.map +1 -1
- package/dist/builtins/fs/cat.d.ts +40 -3
- package/dist/builtins/fs/cat.js +92 -13
- package/dist/builtins/fs/cat.js.map +1 -1
- package/dist/builtins/fs/cd.d.ts +24 -6
- package/dist/builtins/fs/cd.js +71 -18
- package/dist/builtins/fs/cd.js.map +1 -1
- package/dist/builtins/fs/configWrite.d.ts +24 -8
- package/dist/builtins/fs/configWrite.js +77 -36
- package/dist/builtins/fs/configWrite.js.map +1 -1
- package/dist/builtins/fs/cp.d.ts +39 -4
- package/dist/builtins/fs/cp.js +122 -56
- package/dist/builtins/fs/cp.js.map +1 -1
- package/dist/builtins/fs/download.d.ts +31 -4
- package/dist/builtins/fs/download.js +75 -38
- package/dist/builtins/fs/download.js.map +1 -1
- package/dist/builtins/fs/du.d.ts +59 -33
- package/dist/builtins/fs/du.js +111 -79
- package/dist/builtins/fs/du.js.map +1 -1
- package/dist/builtins/fs/edit.d.ts +19 -4
- package/dist/builtins/fs/edit.js +77 -16
- package/dist/builtins/fs/edit.js.map +1 -1
- package/dist/builtins/fs/find.d.ts +25 -0
- package/dist/builtins/fs/find.js +76 -5
- package/dist/builtins/fs/find.js.map +1 -1
- package/dist/builtins/fs/ls.d.ts +69 -4
- package/dist/builtins/fs/ls.js +84 -45
- package/dist/builtins/fs/ls.js.map +1 -1
- package/dist/builtins/fs/mkdir.d.ts +28 -18
- package/dist/builtins/fs/mkdir.js +95 -66
- package/dist/builtins/fs/mkdir.js.map +1 -1
- package/dist/builtins/fs/mv.d.ts +34 -4
- package/dist/builtins/fs/mv.js +129 -64
- package/dist/builtins/fs/mv.js.map +1 -1
- package/dist/builtins/fs/pull.args.d.ts +56 -17
- package/dist/builtins/fs/pull.args.js +16 -66
- package/dist/builtins/fs/pull.args.js.map +1 -1
- package/dist/builtins/fs/pull.d.ts +62 -0
- package/dist/builtins/fs/pull.js +123 -31
- package/dist/builtins/fs/pull.js.map +1 -1
- package/dist/builtins/fs/pwd.d.ts +19 -5
- package/dist/builtins/fs/pwd.js +62 -8
- package/dist/builtins/fs/pwd.js.map +1 -1
- package/dist/builtins/fs/rm.d.ts +58 -21
- package/dist/builtins/fs/rm.js +99 -82
- package/dist/builtins/fs/rm.js.map +1 -1
- package/dist/builtins/fs/rmdir.d.ts +29 -11
- package/dist/builtins/fs/rmdir.js +87 -36
- package/dist/builtins/fs/rmdir.js.map +1 -1
- package/dist/builtins/fs/touch.d.ts +44 -9
- package/dist/builtins/fs/touch.js +91 -27
- package/dist/builtins/fs/touch.js.map +1 -1
- package/dist/builtins/fs/tree.d.ts +36 -9
- package/dist/builtins/fs/tree.js +126 -36
- package/dist/builtins/fs/tree.js.map +1 -1
- package/dist/builtins/fs/upload.d.ts +22 -3
- package/dist/builtins/fs/upload.js +82 -14
- package/dist/builtins/fs/upload.js.map +1 -1
- package/dist/builtins/fs/xattr.args.d.ts +12 -33
- package/dist/builtins/fs/xattr.args.js +17 -95
- package/dist/builtins/fs/xattr.args.js.map +1 -1
- package/dist/builtins/fs/xattr.d.ts +98 -8
- package/dist/builtins/fs/xattr.js +163 -24
- package/dist/builtins/fs/xattr.js.map +1 -1
- package/dist/builtins/games/bytes.d.ts +201 -5
- package/dist/builtins/games/bytes.js +255 -54
- package/dist/builtins/games/bytes.js.map +1 -1
- package/dist/builtins/games/chimes.d.ts +180 -3
- package/dist/builtins/games/chimes.js +203 -26
- package/dist/builtins/games/chimes.js.map +1 -1
- package/dist/builtins/games/chrislab.d.ts +101 -3
- package/dist/builtins/games/chrislab.js +117 -17
- package/dist/builtins/games/chrislab.js.map +1 -1
- package/dist/builtins/games/cowsay.d.ts +93 -2
- package/dist/builtins/games/cowsay.js +90 -31
- package/dist/builtins/games/cowsay.js.map +1 -1
- package/dist/builtins/games/figlet.d.ts +70 -2
- package/dist/builtins/games/figlet.js +83 -6
- package/dist/builtins/games/figlet.js.map +1 -1
- package/dist/builtins/games/lab.d.ts +104 -5
- package/dist/builtins/games/lab.js +144 -6
- package/dist/builtins/games/lab.js.map +1 -1
- package/dist/builtins/games/lolcat.d.ts +61 -1
- package/dist/builtins/games/lolcat.js +59 -24
- package/dist/builtins/games/lolcat.js.map +1 -1
- package/dist/builtins/games/morse.d.ts +36 -1
- package/dist/builtins/games/morse.js +50 -2
- package/dist/builtins/games/morse.js.map +1 -1
- package/dist/builtins/games/numbers.d.ts +241 -5
- package/dist/builtins/games/numbers.js +298 -23
- package/dist/builtins/games/numbers.js.map +1 -1
- package/dist/builtins/games/play.d.ts +96 -6
- package/dist/builtins/games/play.js +137 -6
- package/dist/builtins/games/play.js.map +1 -1
- package/dist/builtins/games/qr.d.ts +40 -1
- package/dist/builtins/games/qr.js +51 -2
- package/dist/builtins/games/qr.js.map +1 -1
- package/dist/builtins/games/show.d.ts +131 -6
- package/dist/builtins/games/show.js +208 -20
- package/dist/builtins/games/show.js.map +1 -1
- package/dist/builtins/games/sky.d.ts +178 -4
- package/dist/builtins/games/sky.js +228 -12
- package/dist/builtins/games/sky.js.map +1 -1
- package/dist/builtins/games/text.d.ts +258 -7
- package/dist/builtins/games/text.js +310 -29
- package/dist/builtins/games/text.js.map +1 -1
- package/dist/builtins/games/trek.d.ts +67 -3
- package/dist/builtins/games/trek.js +63 -10
- package/dist/builtins/games/trek.js.map +1 -1
- package/dist/builtins/games/wtf.d.ts +58 -1
- package/dist/builtins/games/wtf.js +67 -6
- package/dist/builtins/games/wtf.js.map +1 -1
- package/dist/builtins/help.d.ts +41 -3
- package/dist/builtins/help.js +92 -796
- package/dist/builtins/help.js.map +1 -1
- package/dist/builtins/net/connect.d.ts +36 -3
- package/dist/builtins/net/connect.js +84 -26
- package/dist/builtins/net/connect.js.map +1 -1
- package/dist/builtins/net/cubepath.d.ts +49 -5
- package/dist/builtins/net/cubepath.js +69 -27
- package/dist/builtins/net/cubepath.js.map +1 -1
- package/dist/builtins/net/logout.d.ts +13 -4
- package/dist/builtins/net/logout.js +49 -3
- package/dist/builtins/net/logout.js.map +1 -1
- package/dist/builtins/net/netstat.d.ts +29 -4
- package/dist/builtins/net/netstat.js +64 -23
- package/dist/builtins/net/netstat.js.map +1 -1
- package/dist/builtins/net/pacs.d.ts +169 -15
- package/dist/builtins/net/pacs.js +92 -33
- package/dist/builtins/net/pacs.js.map +1 -1
- package/dist/builtins/net/query.args.d.ts +95 -0
- package/dist/builtins/net/query.args.js +26 -0
- package/dist/builtins/net/query.args.js.map +1 -0
- package/dist/builtins/net/query.d.ts +98 -5
- package/dist/builtins/net/query.js +89 -83
- package/dist/builtins/net/query.js.map +1 -1
- package/dist/builtins/net/status.d.ts +5 -3
- package/dist/builtins/net/status.js +5 -12
- package/dist/builtins/net/status.js.map +1 -1
- package/dist/builtins/parametersofplugin.d.ts +82 -3
- package/dist/builtins/parametersofplugin.js +79 -23
- package/dist/builtins/parametersofplugin.js.map +1 -1
- package/dist/builtins/proc.d.ts +210 -3
- package/dist/builtins/proc.js +210 -119
- package/dist/builtins/proc.js.map +1 -1
- package/dist/builtins/res/compute.d.ts +67 -3
- package/dist/builtins/res/compute.js +121 -35
- package/dist/builtins/res/compute.js.map +1 -1
- package/dist/builtins/res/dicom.d.ts +55 -7
- package/dist/builtins/res/dicom.js +86 -52
- package/dist/builtins/res/dicom.js.map +1 -1
- package/dist/builtins/res/expect.d.ts +52 -3
- package/dist/builtins/res/expect.js +92 -29
- package/dist/builtins/res/expect.js.map +1 -1
- package/dist/builtins/res/feed.d.ts +475 -3
- package/dist/builtins/res/feed.js +253 -158
- package/dist/builtins/res/feed.js.map +1 -1
- package/dist/builtins/res/files.d.ts +517 -3
- package/dist/builtins/res/files.js +124 -44
- package/dist/builtins/res/files.js.map +1 -1
- package/dist/builtins/res/gather.d.ts +113 -3
- package/dist/builtins/res/gather.js +153 -44
- package/dist/builtins/res/gather.js.map +1 -1
- package/dist/builtins/res/gather.process.d.ts +27 -19
- package/dist/builtins/res/gather.process.js +29 -59
- package/dist/builtins/res/gather.process.js.map +1 -1
- package/dist/builtins/res/group.d.ts +284 -3
- package/dist/builtins/res/group.js +147 -76
- package/dist/builtins/res/group.js.map +1 -1
- package/dist/builtins/res/image.d.ts +30 -2
- package/dist/builtins/res/image.js +62 -10
- package/dist/builtins/res/image.js.map +1 -1
- package/dist/builtins/res/play.d.ts +71 -9
- package/dist/builtins/res/play.js +124 -82
- package/dist/builtins/res/play.js.map +1 -1
- package/dist/builtins/res/plugininstance.d.ts +307 -2
- package/dist/builtins/res/plugininstance.js +122 -50
- package/dist/builtins/res/plugininstance.js.map +1 -1
- package/dist/builtins/res/pluginmeta.d.ts +244 -2
- package/dist/builtins/res/pluginmeta.js +98 -40
- package/dist/builtins/res/pluginmeta.js.map +1 -1
- package/dist/builtins/res/record.d.ts +37 -3
- package/dist/builtins/res/record.js +127 -57
- package/dist/builtins/res/record.js.map +1 -1
- package/dist/builtins/res/resourceList.d.ts +136 -0
- package/dist/builtins/res/resourceList.js +51 -0
- package/dist/builtins/res/resourceList.js.map +1 -0
- package/dist/builtins/res/tag.d.ts +244 -3
- package/dist/builtins/res/tag.js +97 -41
- package/dist/builtins/res/tag.js.map +1 -1
- package/dist/builtins/res/user.d.ts +122 -3
- package/dist/builtins/res/user.js +83 -21
- package/dist/builtins/res/user.js.map +1 -1
- package/dist/builtins/res/workflow.d.ts +244 -2
- package/dist/builtins/res/workflow.js +97 -40
- package/dist/builtins/res/workflow.js.map +1 -1
- package/dist/builtins/store.d.ts +85 -3
- package/dist/builtins/store.js +135 -68
- package/dist/builtins/store.js.map +1 -1
- package/dist/builtins/sys/apropos.d.ts +80 -5
- package/dist/builtins/sys/apropos.js +121 -15
- package/dist/builtins/sys/apropos.js.map +1 -1
- package/dist/builtins/sys/cal.d.ts +44 -5
- package/dist/builtins/sys/cal.js +57 -10
- package/dist/builtins/sys/cal.js.map +1 -1
- package/dist/builtins/sys/command.d.ts +20 -0
- package/dist/builtins/sys/command.js +31 -0
- package/dist/builtins/sys/command.js.map +1 -1
- package/dist/builtins/sys/context.d.ts +13 -3
- package/dist/builtins/sys/context.js +51 -4
- package/dist/builtins/sys/context.js.map +1 -1
- package/dist/builtins/sys/date.d.ts +56 -5
- package/dist/builtins/sys/date.js +63 -9
- package/dist/builtins/sys/date.js.map +1 -1
- package/dist/builtins/sys/echo.d.ts +63 -2
- package/dist/builtins/sys/echo.js +87 -8
- package/dist/builtins/sys/echo.js.map +1 -1
- package/dist/builtins/sys/fortune.d.ts +27 -2
- package/dist/builtins/sys/fortune.js +44 -2
- package/dist/builtins/sys/fortune.js.map +1 -1
- package/dist/builtins/sys/grep.d.ts +245 -11
- package/dist/builtins/sys/grep.js +418 -131
- package/dist/builtins/sys/grep.js.map +1 -1
- package/dist/builtins/sys/joblets.d.ts +66 -7
- package/dist/builtins/sys/joblets.js +101 -14
- package/dist/builtins/sys/joblets.js.map +1 -1
- package/dist/builtins/sys/motd.d.ts +37 -3
- package/dist/builtins/sys/motd.js +49 -8
- package/dist/builtins/sys/motd.js.map +1 -1
- package/dist/builtins/sys/notes.d.ts +75 -3
- package/dist/builtins/sys/notes.js +90 -29
- package/dist/builtins/sys/notes.js.map +1 -1
- package/dist/builtins/sys/physicalmode.d.ts +24 -3
- package/dist/builtins/sys/physicalmode.js +68 -14
- package/dist/builtins/sys/physicalmode.js.map +1 -1
- package/dist/builtins/sys/tasks.d.ts +74 -5
- package/dist/builtins/sys/tasks.js +102 -14
- package/dist/builtins/sys/tasks.js.map +1 -1
- package/dist/builtins/sys/textFilters.d.ts +673 -41
- package/dist/builtins/sys/textFilters.js +719 -264
- package/dist/builtins/sys/textFilters.js.map +1 -1
- package/dist/builtins/sys/timing.d.ts +24 -3
- package/dist/builtins/sys/timing.js +67 -14
- package/dist/builtins/sys/timing.js.map +1 -1
- package/dist/builtins/sys/variables.d.ts +70 -4
- package/dist/builtins/sys/variables.js +103 -31
- package/dist/builtins/sys/variables.js.map +1 -1
- package/dist/builtins/sys/version.d.ts +27 -2
- package/dist/builtins/sys/version.js +48 -3
- package/dist/builtins/sys/version.js.map +1 -1
- package/dist/builtins/sys/weather.d.ts +92 -15
- package/dist/builtins/sys/weather.js +71 -45
- package/dist/builtins/sys/weather.js.map +1 -1
- package/dist/builtins/sys/whoami.d.ts +38 -18
- package/dist/builtins/sys/whoami.js +112 -8
- package/dist/builtins/sys/whoami.js.map +1 -1
- package/dist/builtins/utils.d.ts +1 -38
- package/dist/builtins/utils.js +1 -87
- package/dist/builtins/utils.js.map +1 -1
- package/dist/chris/backend.js +2 -0
- package/dist/chris/backend.js.map +1 -1
- package/dist/chris/chrisCommands.js +62 -159
- package/dist/chris/chrisCommands.js.map +1 -1
- package/dist/chris/commandFallback.d.ts +12 -0
- package/dist/chris/commandFallback.js +47 -0
- package/dist/chris/commandFallback.js.map +1 -1
- package/dist/chris/files.js +24 -85
- package/dist/chris/files.js.map +1 -1
- package/dist/chris/filesystem.js +7 -5
- package/dist/chris/filesystem.js.map +1 -1
- package/dist/chris/help.js +0 -1082
- package/dist/chris/help.js.map +1 -1
- package/dist/chris/kinds.d.ts +30 -0
- package/dist/chris/kinds.js +154 -0
- package/dist/chris/kinds.js.map +1 -0
- package/dist/chris/mounts.d.ts +4 -4
- package/dist/chris/mounts.js +9 -16
- package/dist/chris/mounts.js.map +1 -1
- package/dist/chris/navigation.d.ts +2 -3
- package/dist/chris/navigation.js +6 -20
- package/dist/chris/navigation.js.map +1 -1
- package/dist/chris/pacsResources.d.ts +259 -0
- package/dist/chris/pacsResources.js +168 -0
- package/dist/chris/pacsResources.js.map +1 -0
- package/dist/chris/promptContext.d.ts +6 -0
- package/dist/chris/promptContext.js +3 -1
- package/dist/chris/promptContext.js.map +1 -1
- package/dist/core/argumentKinds.d.ts +107 -0
- package/dist/core/argumentKinds.js +223 -0
- package/dist/core/argumentKinds.js.map +1 -0
- package/dist/core/backend.d.ts +4 -1
- package/dist/core/backend.js.map +1 -1
- package/dist/core/commandDeclaration.d.ts +453 -0
- package/dist/core/commandDeclaration.js +52 -0
- package/dist/core/commandDeclaration.js.map +1 -0
- package/dist/core/commandParse.d.ts +64 -0
- package/dist/core/commandParse.js +468 -0
- package/dist/core/commandParse.js.map +1 -0
- package/dist/core/commandRegistry.d.ts +37 -0
- package/dist/core/commandRegistry.js +100 -3
- package/dist/core/commandRegistry.js.map +1 -1
- package/dist/core/commandSchema.d.ts +32 -0
- package/dist/core/commandSchema.js +117 -0
- package/dist/core/commandSchema.js.map +1 -0
- package/dist/core/commandUsage.d.ts +62 -0
- package/dist/core/commandUsage.js +247 -0
- package/dist/core/commandUsage.js.map +1 -0
- package/dist/core/coreCommands.js +66 -214
- package/dist/core/coreCommands.js.map +1 -1
- package/dist/core/dispatch.js +15 -8
- package/dist/core/dispatch.js.map +1 -1
- package/dist/core/paths.d.ts +51 -0
- package/dist/core/paths.js +86 -2
- package/dist/core/paths.js.map +1 -1
- package/dist/core/preprocess.d.ts +10 -9
- package/dist/core/preprocess.js +10 -20
- package/dist/core/preprocess.js.map +1 -1
- package/dist/core/warmupFailures.d.ts +34 -2
- package/dist/core/warmupFailures.js +43 -2
- package/dist/core/warmupFailures.js.map +1 -1
- package/dist/lib/completer/cfsPaths.d.ts +14 -0
- package/dist/lib/completer/cfsPaths.js +91 -0
- package/dist/lib/completer/cfsPaths.js.map +1 -0
- package/dist/lib/completer/declared.d.ts +15 -0
- package/dist/lib/completer/declared.js +189 -0
- package/dist/lib/completer/declared.js.map +1 -0
- package/dist/lib/completer/index.js +33 -79
- package/dist/lib/completer/index.js.map +1 -1
- package/dist/lib/parser.d.ts +5 -8
- package/dist/lib/parser.js +2 -11
- package/dist/lib/parser.js.map +1 -1
- package/dist/lib/vfs/vfs.d.ts +2 -1
- package/dist/lib/vfs/vfs.js +9 -6
- package/dist/lib/vfs/vfs.js.map +1 -1
- package/dist/lib/wildcard.js +2 -3
- package/dist/lib/wildcard.js.map +1 -1
- package/dist/notes.json +1 -1
- package/package.json +6 -5
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* disk the daemon runs from (a-readout-names-the-release-it-reads), groups
|
|
10
10
|
* them by the day they were released, and answers a `session.notes` model
|
|
11
11
|
* beneath the text. A change written "Internal: …" is ours alone and is
|
|
12
|
-
* hidden unless `--all` asks.
|
|
12
|
+
* hidden unless `--all` asks. Declared in one record (`notesCommand`).
|
|
13
13
|
*
|
|
14
14
|
* @module
|
|
15
15
|
*/
|
|
@@ -18,6 +18,8 @@ import * as fs from 'node:fs';
|
|
|
18
18
|
import path from 'node:path';
|
|
19
19
|
import { SESSION_NOTES_MODEL_KIND, envelope_ok, envelope_error } from '@fnndsc/menu';
|
|
20
20
|
import chalk from 'chalk';
|
|
21
|
+
import { command_declare } from '../../core/commandDeclaration.js';
|
|
22
|
+
import { declaredCommand_run } from '../../core/commandParse.js';
|
|
21
23
|
/** The packages whose notes an operator reads, in the order a release lists them. */
|
|
22
24
|
export const NOTES_PACKAGES = ['@fnndsc/argus', '@fnndsc/brasa', '@fnndsc/chell', '@fnndsc/calypso', '@fnndsc/porter'];
|
|
23
25
|
/** The default loader: node resolution from here, so a hoisted or nested install both answer. */
|
|
@@ -79,33 +81,66 @@ export function notes_gather(loader = notes_load) {
|
|
|
79
81
|
const dated = [...byMerge.values()].sort((a, b) => (a.date < b.date ? 1 : a.date > b.date ? -1 : 0));
|
|
80
82
|
return { releases: [...dated, ...undated], installed };
|
|
81
83
|
}
|
|
82
|
-
/**
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
84
|
+
/** What a `notes` line may hold. */
|
|
85
|
+
const NOTES_GRAMMAR = {
|
|
86
|
+
options: {
|
|
87
|
+
since: { short: 's', long: 'since', summary: 'The last N releases, or every release from a day (YYYY-MM-DD) on', value: { name: 'N|DATE', kind: 'word' } },
|
|
88
|
+
all: { short: 'a', long: 'all', summary: 'The changes marked Internal too' },
|
|
89
|
+
long: { short: 'l', long: 'long', summary: 'Each change unfolded beneath its first sentence' },
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* What the options ask for: `--since` read as a count or a day; a refusal
|
|
94
|
+
* names a value that is neither.
|
|
95
|
+
*
|
|
96
|
+
* @param options - The line's options.
|
|
97
|
+
* @returns The ask, or the refusal.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```ts
|
|
101
|
+
* notesAsk_make({ since: '3', all: true, long: false }); // { since: 3, all: true, long: false }
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
export function notesAsk_make(options) {
|
|
105
|
+
const ask = { since: 1, all: options.all, long: options.long };
|
|
106
|
+
const since = options.since;
|
|
107
|
+
if (since === undefined)
|
|
108
|
+
return ask;
|
|
109
|
+
if (/^\d+$/.test(since))
|
|
110
|
+
return { ...ask, since: Number(since) };
|
|
111
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(since))
|
|
112
|
+
return { ...ask, since };
|
|
113
|
+
return { refusal: `notes: --since wants a count or a date (YYYY-MM-DD), not '${since}'` };
|
|
108
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* The `notes` declaration, reading the notes with a loader.
|
|
117
|
+
*
|
|
118
|
+
* @param loader - Reads one package's notes.
|
|
119
|
+
* @returns The declaration.
|
|
120
|
+
*/
|
|
121
|
+
function notesDeclaration_make(loader) {
|
|
122
|
+
return command_declare({
|
|
123
|
+
name: 'notes',
|
|
124
|
+
grammar: NOTES_GRAMMAR,
|
|
125
|
+
help: {
|
|
126
|
+
summary: 'What the installed releases changed, for the operator',
|
|
127
|
+
description: 'Reads the release notes shipped with the packages installed where this session runs — argus, brasa, chell, calypso, porter — and lists the newest release: one row per change, the package tagged. --since N shows the last N releases, --since DATE everything from a day on; --long unfolds each change beneath its first sentence; --all includes the changes marked Internal. help notes is the same. In ARGUS the WHAT\'S NEW block opens them as a listing.',
|
|
128
|
+
category: 'General',
|
|
129
|
+
examples: ['notes', 'notes --since 3', 'notes --since 2026-10-01 --long', 'notes --all'],
|
|
130
|
+
},
|
|
131
|
+
holds: [],
|
|
132
|
+
handler: async (args) => notes_run(args.options, loader),
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* `notes [--since N|DATE] [--all] [--long]`: the declaration.
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* ```ts
|
|
140
|
+
* commands_register({ declarations: [notesCommand] });
|
|
141
|
+
* ```
|
|
142
|
+
*/
|
|
143
|
+
export const notesCommand = notesDeclaration_make(notes_load);
|
|
109
144
|
/** The releases the ask selects, internal changes dropped unless asked for. */
|
|
110
145
|
export function notes_select(releases, ask) {
|
|
111
146
|
const chosen = typeof ask.since === 'number'
|
|
@@ -145,9 +180,35 @@ export function notes_render(releases, ask) {
|
|
|
145
180
|
}
|
|
146
181
|
return `${lines.join('\n')}\n`;
|
|
147
182
|
}
|
|
148
|
-
/**
|
|
183
|
+
/**
|
|
184
|
+
* `notes` over words already split: the declaration's parse and handler.
|
|
185
|
+
*
|
|
186
|
+
* @param args - The words after `notes`.
|
|
187
|
+
* @param loader - Reads one package's notes; the installed packages' by default.
|
|
188
|
+
* @returns The notes, or the refusal of a bad line.
|
|
189
|
+
*
|
|
190
|
+
* @example
|
|
191
|
+
* ```ts
|
|
192
|
+
* await builtin_notes(['--since', '3']);
|
|
193
|
+
* ```
|
|
194
|
+
*/
|
|
149
195
|
export async function builtin_notes(args, loader = notes_load) {
|
|
150
|
-
|
|
196
|
+
return declaredCommand_run(loader === notes_load ? notesCommand : notesDeclaration_make(loader), args);
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* The notes the options ask for, as text over a `session.notes` model.
|
|
200
|
+
*
|
|
201
|
+
* @param options - The line's options.
|
|
202
|
+
* @param loader - Reads one package's notes.
|
|
203
|
+
* @returns The notes, or the refusal of a `--since` that is neither a count nor a day.
|
|
204
|
+
*
|
|
205
|
+
* @example
|
|
206
|
+
* ```ts
|
|
207
|
+
* await notes_run({ since: undefined, all: false, long: false }, notes_load);
|
|
208
|
+
* ```
|
|
209
|
+
*/
|
|
210
|
+
export async function notes_run(options, loader) {
|
|
211
|
+
const ask = notesAsk_make(options);
|
|
151
212
|
if ('refusal' in ask)
|
|
152
213
|
return envelope_error('', undefined, `${ask.refusal}\n`);
|
|
153
214
|
const gathered = notes_gather(loader);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notes.js","sourceRoot":"","sources":["../../../src/builtins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'backend');
|
|
8
|
+
* ```
|
|
9
|
+
*/
|
|
10
|
+
export declare const physicalmodeCommand: import("../../core/commandDeclaration.js").CommandDeclaration<{
|
|
11
|
+
readonly bare: {
|
|
12
|
+
readonly summary: "Show whether physical mode is on";
|
|
13
|
+
};
|
|
14
|
+
readonly subcommands: {
|
|
15
|
+
readonly on: {
|
|
16
|
+
readonly summary: "Enable physical mode (paths used directly)";
|
|
17
|
+
};
|
|
18
|
+
readonly off: {
|
|
19
|
+
readonly summary: "Disable physical mode (use logical-to-physical mapping)";
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
}>;
|
|
23
|
+
/**
|
|
24
|
+
* `physicalmode` over words already split: the declaration's parse and handler.
|
|
25
|
+
*
|
|
26
|
+
* @param args - The words after `physicalmode`.
|
|
27
|
+
* @returns The physical mode state, or the refusal of a bad line.
|
|
7
28
|
*/
|
|
8
29
|
export declare function builtin_physicalmode(args: string[]): Promise<CommandEnvelope>;
|
|
@@ -1,19 +1,44 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @file
|
|
3
|
-
*
|
|
2
|
+
* @file `physicalmode`: shows or sets whether paths are used as CUBE stores
|
|
3
|
+
* them, past the logical-to-physical mapping.
|
|
4
|
+
*
|
|
5
|
+
* Declared in one record (`physicalmodeCommand`): `on` and `off` are its
|
|
6
|
+
* subcommands; with neither it says how it stands.
|
|
7
|
+
*
|
|
8
|
+
* Key components:
|
|
9
|
+
* - physicalmodeCommand: the declaration.
|
|
10
|
+
* - builtin_physicalmode: the declaration run over words already split.
|
|
11
|
+
*
|
|
12
|
+
* Typical usage:
|
|
13
|
+
* ```ts
|
|
14
|
+
* await builtin_physicalmode(['on']);
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* Dependencies: the session's physical-mode flag.
|
|
18
|
+
*
|
|
19
|
+
* @module
|
|
4
20
|
*/
|
|
5
21
|
import chalk from 'chalk';
|
|
6
22
|
import { session } from '../../session/index.js';
|
|
7
|
-
import { envelope_ok
|
|
23
|
+
import { envelope_ok } from '@fnndsc/menu';
|
|
24
|
+
import { command_declare } from '../../core/commandDeclaration.js';
|
|
25
|
+
import { declaredCommand_run } from '../../core/commandParse.js';
|
|
26
|
+
/** What a `physicalmode` line may hold. */
|
|
27
|
+
const PHYSICALMODE_GRAMMAR = {
|
|
28
|
+
bare: { summary: 'Show whether physical mode is on' },
|
|
29
|
+
subcommands: {
|
|
30
|
+
on: { summary: 'Enable physical mode (paths used directly)' },
|
|
31
|
+
off: { summary: 'Disable physical mode (use logical-to-physical mapping)' },
|
|
32
|
+
},
|
|
33
|
+
};
|
|
8
34
|
/**
|
|
9
|
-
*
|
|
35
|
+
* Shows or sets physical filesystem mode.
|
|
10
36
|
*
|
|
11
|
-
* @param args -
|
|
37
|
+
* @param args - The line, parsed: `on`, `off`, or neither.
|
|
12
38
|
* @returns An envelope describing the (possibly updated) physical mode state.
|
|
13
39
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
if (!subcommand) {
|
|
40
|
+
async function physicalmode_run(args) {
|
|
41
|
+
if (args.subcommand === null) {
|
|
17
42
|
const enabled = session.physicalMode_get();
|
|
18
43
|
const status = enabled ? 'enabled' : 'disabled';
|
|
19
44
|
const detail = enabled
|
|
@@ -21,14 +46,43 @@ export async function builtin_physicalmode(args) {
|
|
|
21
46
|
: chalk.gray(' Paths are resolved through logical-to-physical mapping.');
|
|
22
47
|
return envelope_ok(`Physical filesystem mode: ${chalk.yellow(status)}\n${detail}\n${chalk.gray('\nUsage: physicalmode [on|off]')}\n`, { kind: 'sys.physicalMode', data: { enabled } });
|
|
23
48
|
}
|
|
24
|
-
if (subcommand === 'on') {
|
|
49
|
+
if (args.subcommand === 'on') {
|
|
25
50
|
session.physicalMode_set(true);
|
|
26
51
|
return envelope_ok(`${chalk.yellow('[!] Physical filesystem mode enabled')}\n${chalk.gray(' Paths will be used directly without logical-to-physical mapping.')}\n`, { kind: 'sys.physicalMode', data: { enabled: true } });
|
|
27
52
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
53
|
+
session.physicalMode_set(false);
|
|
54
|
+
return envelope_ok(`${chalk.green('[+] Physical filesystem mode disabled')}\n${chalk.gray(' Paths will be resolved through logical-to-physical mapping.')}\n`, { kind: 'sys.physicalMode', data: { enabled: false } });
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* `physicalmode [on | off]`: the declaration.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* commands_register({ declarations: [physicalmodeCommand] }, 'backend');
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
export const physicalmodeCommand = command_declare({
|
|
65
|
+
name: 'physicalmode',
|
|
66
|
+
grammar: PHYSICALMODE_GRAMMAR,
|
|
67
|
+
help: {
|
|
68
|
+
summary: 'Toggle or display physical filesystem mode',
|
|
69
|
+
description: 'Shows whether paths are used directly, as CUBE stores them, or resolved through the logical-to-physical mapping; or turns physical mode on or off.',
|
|
70
|
+
category: 'Settings',
|
|
71
|
+
examples: [
|
|
72
|
+
'physicalmode # Show current status',
|
|
73
|
+
'physicalmode on # Enable physical mode',
|
|
74
|
+
'physicalmode off # Disable physical mode',
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
handler: physicalmode_run,
|
|
78
|
+
});
|
|
79
|
+
/**
|
|
80
|
+
* `physicalmode` over words already split: the declaration's parse and handler.
|
|
81
|
+
*
|
|
82
|
+
* @param args - The words after `physicalmode`.
|
|
83
|
+
* @returns The physical mode state, or the refusal of a bad line.
|
|
84
|
+
*/
|
|
85
|
+
export async function builtin_physicalmode(args) {
|
|
86
|
+
return declaredCommand_run(physicalmodeCommand, args);
|
|
33
87
|
}
|
|
34
88
|
//# sourceMappingURL=physicalmode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"physicalmode.js","sourceRoot":"","sources":["../../../src/builtins/sys/physicalmode.ts"],"names":[],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AAC;IACJ,CAAC;IAED,IAAI,IAAI,CAAC,UAAU,KAAK,IAAI,EAAE,CAAC;QAC7B,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAC/B,OAAO,WAAW,CAChB,GAAG,KAAK,CAAC,MAAM,CAAC,sCAAsC,CAAC,KAAK,KAAK,CAAC,IAAI,CAAC,sEAAsE,CAAC,IAAI,EAClJ,EAAE,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CACtD,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAChC,OAAO,WAAW,CAChB,GAAG,KAAK,CAAC,KAAK,CAAC,uCAAuC,CAAC,KAAK,KAAK,CAAC,IAAI,CAAC,iEAAiE,CAAC,IAAI,EAC7I,EAAE,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,CACvD,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,eAAe,CAAC;IACjD,IAAI,EAAE,cAAc;IACpB,OAAO,EAAE,oBAAoB;IAC7B,IAAI,EAAE;QACJ,OAAO,EAAE,4CAA4C;QACrD,WAAW,EAAE,oJAAoJ;QACjK,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE;YACR,6CAA6C;YAC7C,8CAA8C;YAC9C,+CAA+C;SAChD;KACF;IACD,OAAO,EAAE,gBAAgB;CAC1B,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,IAAc;IACvD,OAAO,mBAAmB,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAAC;AACxD,CAAC"}
|
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
* its current operation does, and a second `kill` says so rather than
|
|
9
9
|
* forcing it, because a cloud job cut short can leave its state locked.
|
|
10
10
|
* `wait` follows a job's log until it ends, and its status is the job's:
|
|
11
|
-
* Ctrl-C stops following, never the job.
|
|
11
|
+
* Ctrl-C stops following, never the job. Declared in one record each
|
|
12
|
+
* (`killCommand`, `waitCommand`); neither takes an option, so `kill -9` is
|
|
13
|
+
* refused before it runs.
|
|
12
14
|
*
|
|
13
15
|
* @module
|
|
14
16
|
*/
|
|
@@ -30,17 +32,84 @@ export declare function jobName_resolve(runner: JobRunner, word: string): JobNam
|
|
|
30
32
|
error: string;
|
|
31
33
|
};
|
|
32
34
|
/**
|
|
33
|
-
* `kill <task>…`:
|
|
35
|
+
* `kill <task>…`: the declaration.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* commands_register({ declarations: [killCommand] });
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare const killCommand: import("../../core/commandDeclaration.js").CommandDeclaration<{
|
|
43
|
+
readonly operands: readonly [{
|
|
44
|
+
readonly name: "task";
|
|
45
|
+
readonly kind: "word";
|
|
46
|
+
readonly repeat: true;
|
|
47
|
+
readonly summary: "Each task: /proc/<source>/<id>, <source>/<id>, %N, or its name";
|
|
48
|
+
}];
|
|
49
|
+
}>;
|
|
50
|
+
/**
|
|
51
|
+
* `wait [<task>…]`: the declaration.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```ts
|
|
55
|
+
* commands_register({ declarations: [waitCommand] });
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
export declare const waitCommand: import("../../core/commandDeclaration.js").CommandDeclaration<{
|
|
59
|
+
readonly operands: readonly [{
|
|
60
|
+
readonly name: "task";
|
|
61
|
+
readonly kind: "word";
|
|
62
|
+
readonly optional: true;
|
|
63
|
+
readonly repeat: true;
|
|
64
|
+
readonly summary: "Each task, as kill names it; bare, every running task";
|
|
65
|
+
}];
|
|
66
|
+
}>;
|
|
67
|
+
/**
|
|
68
|
+
* `kill` over words already split: the declaration's parse and handler.
|
|
34
69
|
*
|
|
35
70
|
* @param args - The words after `kill`.
|
|
36
|
-
* @returns
|
|
71
|
+
* @returns Quiet on success, a line per job that could not be asked, or the refusal of a bad line.
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```ts
|
|
75
|
+
* await builtin_kill(['%1']);
|
|
76
|
+
* ```
|
|
37
77
|
*/
|
|
38
78
|
export declare function builtin_kill(args: string[]): Promise<CommandEnvelope>;
|
|
39
79
|
/**
|
|
40
|
-
* `wait
|
|
80
|
+
* `wait` over words already split: the declaration's parse and handler.
|
|
41
81
|
*
|
|
42
82
|
* @param args - The words after `wait`.
|
|
43
|
-
* @returns
|
|
83
|
+
* @returns Failed when a job did not end done or following was stopped, or the refusal of a bad line.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```ts
|
|
87
|
+
* await builtin_wait(['trial-build']);
|
|
88
|
+
* ```
|
|
44
89
|
*/
|
|
45
90
|
export declare function builtin_wait(args: string[]): Promise<CommandEnvelope>;
|
|
91
|
+
/**
|
|
92
|
+
* Asks each job to stop.
|
|
93
|
+
*
|
|
94
|
+
* @param args - The tasks, as words name them.
|
|
95
|
+
* @returns The envelope: quiet on success, a line per job that could not be asked.
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```ts
|
|
99
|
+
* await kill_run(['/proc/steps/trial-build']);
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
export declare function kill_run(args: readonly string[]): Promise<CommandEnvelope>;
|
|
103
|
+
/**
|
|
104
|
+
* Follows each job's log until it ends; bare, every running job.
|
|
105
|
+
*
|
|
106
|
+
* @param args - The tasks, as words name them; none for every running one.
|
|
107
|
+
* @returns The envelope: failed when a job did not end done, or following was stopped.
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* ```ts
|
|
111
|
+
* await wait_run([]);
|
|
112
|
+
* ```
|
|
113
|
+
*/
|
|
114
|
+
export declare function wait_run(args: readonly string[]): Promise<CommandEnvelope>;
|
|
46
115
|
export {};
|
|
@@ -8,11 +8,15 @@
|
|
|
8
8
|
* its current operation does, and a second `kill` says so rather than
|
|
9
9
|
* forcing it, because a cloud job cut short can leave its state locked.
|
|
10
10
|
* `wait` follows a job's log until it ends, and its status is the job's:
|
|
11
|
-
* Ctrl-C stops following, never the job.
|
|
11
|
+
* Ctrl-C stops following, never the job. Declared in one record each
|
|
12
|
+
* (`killCommand`, `waitCommand`); neither takes an option, so `kill -9` is
|
|
13
|
+
* refused before it runs.
|
|
12
14
|
*
|
|
13
15
|
* @module
|
|
14
16
|
*/
|
|
15
17
|
import { envelope_error, envelope_ok, taskState_isOver } from '@fnndsc/menu';
|
|
18
|
+
import { command_declare } from '../../core/commandDeclaration.js';
|
|
19
|
+
import { declaredCommand_run } from '../../core/commandParse.js';
|
|
16
20
|
import { runner_get } from '../../core/runner.js';
|
|
17
21
|
import { commandCancellation_enable, commandCancellation_signalGet } from '../../core/cancellation.js';
|
|
18
22
|
import { sink_dataLine } from '../../core/sink.js';
|
|
@@ -48,18 +52,100 @@ const STOP_WORDS = {
|
|
|
48
52
|
'not-running': (record) => `not running (${record?.state ?? 'ended'})`,
|
|
49
53
|
unknown: () => 'no such task',
|
|
50
54
|
};
|
|
55
|
+
/** What a `kill` line may hold. */
|
|
56
|
+
const KILL_GRAMMAR = {
|
|
57
|
+
operands: [
|
|
58
|
+
{ name: 'task', kind: 'word', repeat: true, summary: 'Each task: /proc/<source>/<id>, <source>/<id>, %N, or its name' },
|
|
59
|
+
],
|
|
60
|
+
};
|
|
61
|
+
/** What a `wait` line may hold. */
|
|
62
|
+
const WAIT_GRAMMAR = {
|
|
63
|
+
operands: [
|
|
64
|
+
{ name: 'task', kind: 'word', optional: true, repeat: true, summary: 'Each task, as kill names it; bare, every running task' },
|
|
65
|
+
],
|
|
66
|
+
};
|
|
51
67
|
/**
|
|
52
|
-
* `kill <task>…`:
|
|
68
|
+
* `kill <task>…`: the declaration.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```ts
|
|
72
|
+
* commands_register({ declarations: [killCommand] });
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
export const killCommand = command_declare({
|
|
76
|
+
name: 'kill',
|
|
77
|
+
grammar: KILL_GRAMMAR,
|
|
78
|
+
help: {
|
|
79
|
+
summary: 'Ask a running task to stop',
|
|
80
|
+
description: 'Asks each task to stop: /proc/<source>/<id>, <source>/<id>, a joblet\'s %N, or its name alone when one source has it. Quiet when it is asked, as kill is. The task ends when its current operation does: a cloud job cut short can leave its state locked, so a task is never forced, there is no -9, and a second kill says so instead.',
|
|
81
|
+
category: 'General',
|
|
82
|
+
posix: { group: 'System', differs: 'stops a session task (/proc/<source>/<id>), never a process; asks, never forces' },
|
|
83
|
+
examples: ['kill /proc/steps/trial-build', 'kill trial-build', 'kill %1'],
|
|
84
|
+
},
|
|
85
|
+
holds: [],
|
|
86
|
+
handler: async (args) => kill_run(args.operands.task),
|
|
87
|
+
});
|
|
88
|
+
/**
|
|
89
|
+
* `wait [<task>…]`: the declaration.
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```ts
|
|
93
|
+
* commands_register({ declarations: [waitCommand] });
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
export const waitCommand = command_declare({
|
|
97
|
+
name: 'wait',
|
|
98
|
+
grammar: WAIT_GRAMMAR,
|
|
99
|
+
help: {
|
|
100
|
+
summary: 'Follow a task until it ends',
|
|
101
|
+
description: 'Follows each task\'s log until it ends, then says how it ended; bare, every running task. The status is the tasks\': 0 when all ended done. Ctrl-C stops following and leaves the task running; wait again picks it up.',
|
|
102
|
+
category: 'General',
|
|
103
|
+
posix: { group: 'System', differs: 'waits on session tasks, following each one\'s log' },
|
|
104
|
+
examples: ['wait trial-build', 'wait %1', 'wait'],
|
|
105
|
+
},
|
|
106
|
+
holds: [],
|
|
107
|
+
handler: async (args) => wait_run(args.operands.task),
|
|
108
|
+
});
|
|
109
|
+
/**
|
|
110
|
+
* `kill` over words already split: the declaration's parse and handler.
|
|
53
111
|
*
|
|
54
112
|
* @param args - The words after `kill`.
|
|
55
|
-
* @returns
|
|
113
|
+
* @returns Quiet on success, a line per job that could not be asked, or the refusal of a bad line.
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```ts
|
|
117
|
+
* await builtin_kill(['%1']);
|
|
118
|
+
* ```
|
|
56
119
|
*/
|
|
57
120
|
export async function builtin_kill(args) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
121
|
+
return declaredCommand_run(killCommand, args);
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* `wait` over words already split: the declaration's parse and handler.
|
|
125
|
+
*
|
|
126
|
+
* @param args - The words after `wait`.
|
|
127
|
+
* @returns Failed when a job did not end done or following was stopped, or the refusal of a bad line.
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* ```ts
|
|
131
|
+
* await builtin_wait(['trial-build']);
|
|
132
|
+
* ```
|
|
133
|
+
*/
|
|
134
|
+
export async function builtin_wait(args) {
|
|
135
|
+
return declaredCommand_run(waitCommand, args);
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Asks each job to stop.
|
|
139
|
+
*
|
|
140
|
+
* @param args - The tasks, as words name them.
|
|
141
|
+
* @returns The envelope: quiet on success, a line per job that could not be asked.
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
* ```ts
|
|
145
|
+
* await kill_run(['/proc/steps/trial-build']);
|
|
146
|
+
* ```
|
|
147
|
+
*/
|
|
148
|
+
export async function kill_run(args) {
|
|
63
149
|
const runner = runner_get();
|
|
64
150
|
if (runner === null)
|
|
65
151
|
return envelope_error('', undefined, 'kill: this session runs no tasks\n');
|
|
@@ -84,15 +170,17 @@ export async function builtin_kill(args) {
|
|
|
84
170
|
return envelope_ok('', { kind: 'tasks.kill', data });
|
|
85
171
|
}
|
|
86
172
|
/**
|
|
87
|
-
*
|
|
173
|
+
* Follows each job's log until it ends; bare, every running job.
|
|
88
174
|
*
|
|
89
|
-
* @param args - The words
|
|
175
|
+
* @param args - The tasks, as words name them; none for every running one.
|
|
90
176
|
* @returns The envelope: failed when a job did not end done, or following was stopped.
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* ```ts
|
|
180
|
+
* await wait_run([]);
|
|
181
|
+
* ```
|
|
91
182
|
*/
|
|
92
|
-
export async function
|
|
93
|
-
const flag = args.find((word) => word.startsWith('-'));
|
|
94
|
-
if (flag !== undefined)
|
|
95
|
-
return envelope_error('', undefined, `wait: ${flag}: unknown option\n`);
|
|
183
|
+
export async function wait_run(args) {
|
|
96
184
|
const runner = runner_get();
|
|
97
185
|
if (runner === null)
|
|
98
186
|
return args.length === 0 ? envelope_ok('') : envelope_error('', undefined, 'wait: this session runs no tasks\n');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tasks.js","sourceRoot":"","sources":["../../../src/builtins/sys/tasks.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"tasks.js","sourceRoot":"","sources":["../../../src/builtins/sys/tasks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,gBAAgB,EAAwB,MAAM,cAAc,CAAC;AACnG,OAAO,EAAE,eAAe,EAA8C,MAAM,kCAAkC,CAAC;AAC/G,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAsD,MAAM,sBAAsB,CAAC;AACtG,OAAO,EAAE,0BAA0B,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AACvG,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAQ5E;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,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