@fnndsc/brasa 0.56.2 → 0.56.4
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 +11 -0
- package/dist/builtins/berth/berth.js +53 -22
- package/dist/builtins/berth/berth.js.map +1 -1
- package/dist/builtins/berth/berthCube.d.ts +17 -2
- package/dist/builtins/berth/berthCube.js +22 -10
- package/dist/builtins/berth/berthCube.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 +89 -10
- 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 +120 -55
- package/dist/builtins/fs/cp.js.map +1 -1
- package/dist/builtins/fs/download.d.ts +12 -1
- package/dist/builtins/fs/download.js +24 -4
- 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/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 +86 -22
- 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/transferJobs.d.ts +64 -0
- package/dist/builtins/fs/transferJobs.js +98 -0
- package/dist/builtins/fs/transferJobs.js.map +1 -0
- 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 +35 -3
- package/dist/builtins/fs/upload.js +99 -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 +38 -2
- package/dist/builtins/help.js +76 -769
- package/dist/builtins/help.js.map +1 -1
- package/dist/builtins/helpSections.js +4 -1
- package/dist/builtins/helpSections.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 +52 -3
- package/dist/builtins/res/dicom.js +82 -34
- 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 +718 -263
- 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 +0 -37
- package/dist/builtins/utils.js +0 -86
- package/dist/builtins/utils.js.map +1 -1
- package/dist/chris/chrisCommands.js +58 -152
- 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/filesystem.js +7 -5
- package/dist/chris/filesystem.js.map +1 -1
- package/dist/chris/help.js +0 -1018
- package/dist/chris/help.js.map +1 -1
- package/dist/chris/kinds.d.ts +21 -0
- package/dist/chris/kinds.js +114 -2
- package/dist/chris/kinds.js.map +1 -1
- 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/core/commandDeclaration.d.ts +97 -7
- package/dist/core/commandDeclaration.js +21 -0
- package/dist/core/commandDeclaration.js.map +1 -1
- package/dist/core/commandParse.js +65 -17
- package/dist/core/commandParse.js.map +1 -1
- package/dist/core/commandRegistry.d.ts +4 -3
- package/dist/core/commandRegistry.js +36 -8
- package/dist/core/commandRegistry.js.map +1 -1
- package/dist/core/commandSchema.js +5 -2
- package/dist/core/commandSchema.js.map +1 -1
- package/dist/core/commandUsage.d.ts +15 -0
- package/dist/core/commandUsage.js +59 -7
- package/dist/core/commandUsage.js.map +1 -1
- package/dist/core/coreCommands.js +63 -212
- package/dist/core/coreCommands.js.map +1 -1
- package/dist/core/paths.d.ts +29 -1
- package/dist/core/paths.js +15 -2
- package/dist/core/paths.js.map +1 -1
- package/dist/core/preprocess.d.ts +3 -4
- package/dist/core/preprocess.js +4 -5
- package/dist/core/preprocess.js.map +1 -1
- package/dist/lib/completer/declared.js +7 -4
- package/dist/lib/completer/declared.js.map +1 -1
- package/dist/lib/completer/index.js +2 -7
- package/dist/lib/completer/index.js.map +1 -1
- package/dist/lib/parser.d.ts +0 -8
- package/dist/lib/parser.js +0 -11
- package/dist/lib/parser.js.map +1 -1
- package/dist/lib/vfs/vfs.d.ts +2 -1
- package/dist/lib/vfs/vfs.js +5 -4
- package/dist/lib/vfs/vfs.js.map +1 -1
- package/dist/notes.json +1 -1
- package/package.json +5 -5
|
@@ -20,7 +20,98 @@ export declare function bubble_draw(lines: string[], thought: boolean): string[]
|
|
|
20
20
|
* @param width - Wrap width.
|
|
21
21
|
*/
|
|
22
22
|
export declare function cowsay_render(text: string, thought?: boolean, width?: number): string;
|
|
23
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* `cowsay [-W N] [text]`: the declaration.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* commands_register({ declarations: [cowsayCommand] });
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare const cowsayCommand: import("../../core/commandDeclaration.js").CommandDeclaration<{
|
|
32
|
+
readonly operands: readonly [{
|
|
33
|
+
readonly name: "text";
|
|
34
|
+
readonly kind: "word";
|
|
35
|
+
readonly optional: true;
|
|
36
|
+
readonly repeat: true;
|
|
37
|
+
readonly summary: "What to say (default: what is piped in)";
|
|
38
|
+
}];
|
|
39
|
+
readonly options: {
|
|
40
|
+
readonly width: {
|
|
41
|
+
readonly short: "W";
|
|
42
|
+
readonly summary: "Wrap the bubble at N columns (8 or more)";
|
|
43
|
+
readonly value: {
|
|
44
|
+
readonly name: "N";
|
|
45
|
+
readonly kind: "int";
|
|
46
|
+
readonly min: 8;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
}>;
|
|
51
|
+
/**
|
|
52
|
+
* `cowthink [-W N] [text]`: the declaration.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* commands_register({ declarations: [cowthinkCommand] });
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
export declare const cowthinkCommand: import("../../core/commandDeclaration.js").CommandDeclaration<{
|
|
60
|
+
readonly operands: readonly [{
|
|
61
|
+
readonly name: "text";
|
|
62
|
+
readonly kind: "word";
|
|
63
|
+
readonly optional: true;
|
|
64
|
+
readonly repeat: true;
|
|
65
|
+
readonly summary: "What to say (default: what is piped in)";
|
|
66
|
+
}];
|
|
67
|
+
readonly options: {
|
|
68
|
+
readonly width: {
|
|
69
|
+
readonly short: "W";
|
|
70
|
+
readonly summary: "Wrap the bubble at N columns (8 or more)";
|
|
71
|
+
readonly value: {
|
|
72
|
+
readonly name: "N";
|
|
73
|
+
readonly kind: "int";
|
|
74
|
+
readonly min: 8;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
}>;
|
|
79
|
+
/**
|
|
80
|
+
* Draws the brain saying or thinking the piped text, else the words.
|
|
81
|
+
*
|
|
82
|
+
* @param name - The command's name, for its refusal.
|
|
83
|
+
* @param words - The words given.
|
|
84
|
+
* @param thought - Thought bubble rather than speech.
|
|
85
|
+
* @param width - The wrap width asked for, or undefined for the default.
|
|
86
|
+
* @returns The picture, or a refusal when there is nothing to say.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```ts
|
|
90
|
+
* await cow_run('cowsay', ['moo'], false, 20);
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
export declare function cow_run(name: string, words: ReadonlyArray<string>, thought: boolean, width: number | undefined): Promise<CommandEnvelope>;
|
|
94
|
+
/**
|
|
95
|
+
* `cowsay` over words already split: the declaration's parse and handler.
|
|
96
|
+
*
|
|
97
|
+
* @param args - The words after `cowsay`.
|
|
98
|
+
* @returns The picture, or the refusal of a bad line.
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```ts
|
|
102
|
+
* await builtin_cowsay(['-W', '20', 'moo']);
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
24
105
|
export declare function builtin_cowsay(args: string[]): Promise<CommandEnvelope>;
|
|
25
|
-
/**
|
|
106
|
+
/**
|
|
107
|
+
* `cowthink` over words already split: the declaration's parse and handler.
|
|
108
|
+
*
|
|
109
|
+
* @param args - The words after `cowthink`.
|
|
110
|
+
* @returns The picture, or the refusal of a bad line.
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* ```ts
|
|
114
|
+
* await builtin_cowthink(['hmm']);
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
26
117
|
export declare function builtin_cowthink(args: string[]): Promise<CommandEnvelope>;
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { text_input } from './stdin.js';
|
|
12
12
|
import { envelope_ok, envelope_error } from '@fnndsc/menu';
|
|
13
|
+
import { command_declare } from '../../core/commandDeclaration.js';
|
|
14
|
+
import { declaredCommand_run } from '../../core/commandParse.js';
|
|
13
15
|
/** The brain, as ASCII has long drawn it. */
|
|
14
16
|
export const BRAIN = [
|
|
15
17
|
' _---~~(~~-_.',
|
|
@@ -85,43 +87,100 @@ export function cowsay_render(text, thought = false, width = COWSAY_WIDTH) {
|
|
|
85
87
|
const trail = thought ? [' o', ' o'] : [' \\', ' \\'];
|
|
86
88
|
return [...bubble_draw(lines, thought), ...trail, ...BRAIN].join('\n') + '\n';
|
|
87
89
|
}
|
|
88
|
-
/**
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
90
|
+
/** The words a cow says: what is piped in, else these. */
|
|
91
|
+
const COW_TEXT = { name: 'text', kind: 'word', optional: true, repeat: true, summary: 'What to say (default: what is piped in)' };
|
|
92
|
+
/** What a `cowsay` or `cowthink` line may hold. */
|
|
93
|
+
const COW_GRAMMAR = {
|
|
94
|
+
operands: [COW_TEXT],
|
|
95
|
+
options: {
|
|
96
|
+
width: { short: 'W', summary: 'Wrap the bubble at N columns (8 or more)', value: { name: 'N', kind: 'int', min: 8 } },
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* `cowsay [-W N] [text]`: the declaration.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```ts
|
|
104
|
+
* commands_register({ declarations: [cowsayCommand] });
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
export const cowsayCommand = command_declare({
|
|
108
|
+
name: 'cowsay',
|
|
109
|
+
grammar: COW_GRAMMAR,
|
|
110
|
+
help: {
|
|
111
|
+
summary: 'The ChRIS brain says it — fortune | cowsay',
|
|
112
|
+
description: 'The classic, with the ChRIS brain for a cow: a speech bubble over the mascot. Says what is piped in, else the words given; -W N wraps at N columns (40 by default).',
|
|
113
|
+
examples: ['fortune | cowsay', 'cowsay hello, world', 'motd | cowsay -W 60'],
|
|
114
|
+
},
|
|
115
|
+
holds: [],
|
|
116
|
+
handler: async (args) => cow_run('cowsay', args.operands.text, false, args.options.width),
|
|
117
|
+
});
|
|
118
|
+
/**
|
|
119
|
+
* `cowthink [-W N] [text]`: the declaration.
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* ```ts
|
|
123
|
+
* commands_register({ declarations: [cowthinkCommand] });
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
126
|
+
export const cowthinkCommand = command_declare({
|
|
127
|
+
name: 'cowthink',
|
|
128
|
+
grammar: COW_GRAMMAR,
|
|
129
|
+
help: {
|
|
130
|
+
summary: 'The ChRIS brain thinks it',
|
|
131
|
+
description: 'cowsay with a thought bubble.',
|
|
132
|
+
examples: ['fortune | cowthink'],
|
|
133
|
+
},
|
|
134
|
+
holds: [],
|
|
135
|
+
handler: async (args) => cow_run('cowthink', args.operands.text, true, args.options.width),
|
|
136
|
+
});
|
|
137
|
+
/**
|
|
138
|
+
* Draws the brain saying or thinking the piped text, else the words.
|
|
139
|
+
*
|
|
140
|
+
* @param name - The command's name, for its refusal.
|
|
141
|
+
* @param words - The words given.
|
|
142
|
+
* @param thought - Thought bubble rather than speech.
|
|
143
|
+
* @param width - The wrap width asked for, or undefined for the default.
|
|
144
|
+
* @returns The picture, or a refusal when there is nothing to say.
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* ```ts
|
|
148
|
+
* await cow_run('cowsay', ['moo'], false, 20);
|
|
149
|
+
* ```
|
|
150
|
+
*/
|
|
151
|
+
export async function cow_run(name, words, thought, width) {
|
|
152
|
+
const text = text_input(words);
|
|
114
153
|
if (text === null)
|
|
115
154
|
return envelope_error('', undefined, `${name}: nothing to say (pipe text in, or give it: fortune | ${name})\n`);
|
|
116
155
|
const said = text.replace(/\n$/, '');
|
|
117
|
-
return envelope_ok(cowsay_render(said, thought,
|
|
156
|
+
return envelope_ok(cowsay_render(said, thought, width ?? COWSAY_WIDTH), { kind: 'games.cowsay', data: { text: said, thought } });
|
|
118
157
|
}
|
|
119
|
-
/**
|
|
158
|
+
/**
|
|
159
|
+
* `cowsay` over words already split: the declaration's parse and handler.
|
|
160
|
+
*
|
|
161
|
+
* @param args - The words after `cowsay`.
|
|
162
|
+
* @returns The picture, or the refusal of a bad line.
|
|
163
|
+
*
|
|
164
|
+
* @example
|
|
165
|
+
* ```ts
|
|
166
|
+
* await builtin_cowsay(['-W', '20', 'moo']);
|
|
167
|
+
* ```
|
|
168
|
+
*/
|
|
120
169
|
export async function builtin_cowsay(args) {
|
|
121
|
-
return
|
|
170
|
+
return declaredCommand_run(cowsayCommand, args);
|
|
122
171
|
}
|
|
123
|
-
/**
|
|
172
|
+
/**
|
|
173
|
+
* `cowthink` over words already split: the declaration's parse and handler.
|
|
174
|
+
*
|
|
175
|
+
* @param args - The words after `cowthink`.
|
|
176
|
+
* @returns The picture, or the refusal of a bad line.
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* ```ts
|
|
180
|
+
* await builtin_cowthink(['hmm']);
|
|
181
|
+
* ```
|
|
182
|
+
*/
|
|
124
183
|
export async function builtin_cowthink(args) {
|
|
125
|
-
return
|
|
184
|
+
return declaredCommand_run(cowthinkCommand, args);
|
|
126
185
|
}
|
|
127
186
|
//# sourceMappingURL=cowsay.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cowsay.js","sourceRoot":"","sources":["../../../src/builtins/games/cowsay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAmB,WAAW,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"cowsay.js","sourceRoot":"","sources":["../../../src/builtins/games/cowsay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAmB,WAAW,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,eAAe,EAA8C,MAAM,kCAAkC,CAAC;AAC/G,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,6CAA6C;AAC7C,MAAM,CAAC,MAAM,KAAK,GAA0B;IAC1C,sBAAsB;IACtB,uBAAuB;IACvB,0BAA0B;IAC1B,2BAA2B;IAC3B,2BAA2B;IAC3B,4BAA4B;IAC5B,2BAA2B;IAC3B,0BAA0B;IAC1B,yBAAyB;IACzB,wBAAwB;CACzB,CAAC;AAEF,uCAAuC;AACvC,MAAM,CAAC,MAAM,YAAY,GAAW,EAAE,CAAC;AAEvC,+DAA+D;AAC/D,MAAM,UAAU,SAAS,CAAC,IAAY,EAAE,KAAa;IACnD,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,KAAK,MAAM,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACzC,MAAM,KAAK,GAAa,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAS,EAAW,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC5F,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAAC,GAAG,CAAC,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E,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;CAC3J,CAAC,CAAC;AAEH;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,IAAY,EAAE,KAA4B,EAAE,OAAgB,EAAE,KAAyB;IACnH,MAAM,IAAI,GAAkB,UAAU,CAAC,KAAK,CAAC,CAAC;IAC9C,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,cAAc,CAAC,EAAE,EAAE,SAAS,EAAE,GAAG,IAAI,yDAAyD,IAAI,KAAK,CAAC,CAAC;IACnI,MAAM,IAAI,GAAW,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC7C,OAAO,WAAW,CAAC,aAAa,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,YAAY,CAAC,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;AACnI,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,IAAc;IACjD,OAAO,mBAAmB,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;AAClD,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,IAAc;IACnD,OAAO,mBAAmB,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -9,7 +9,75 @@ export declare const FACE_ROWS: number;
|
|
|
9
9
|
* @returns The five rows (more for several lines).
|
|
10
10
|
*/
|
|
11
11
|
export declare function figlet_render(text: string, ink?: string): string[];
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* `figlet [text]`: the declaration.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* commands_register({ declarations: [figletCommand] });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare const figletCommand: import("../../core/commandDeclaration.js").CommandDeclaration<{
|
|
21
|
+
readonly operands: readonly [{
|
|
22
|
+
readonly name: "text";
|
|
23
|
+
readonly kind: "word";
|
|
24
|
+
readonly optional: true;
|
|
25
|
+
readonly repeat: true;
|
|
26
|
+
readonly summary: "The words to set (default: what is piped in)";
|
|
27
|
+
}];
|
|
28
|
+
}>;
|
|
29
|
+
/**
|
|
30
|
+
* `banner [text]`: the declaration.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* commands_register({ declarations: [bannerCommand] });
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare const bannerCommand: import("../../core/commandDeclaration.js").CommandDeclaration<{
|
|
38
|
+
readonly operands: readonly [{
|
|
39
|
+
readonly name: "text";
|
|
40
|
+
readonly kind: "word";
|
|
41
|
+
readonly optional: true;
|
|
42
|
+
readonly repeat: true;
|
|
43
|
+
readonly summary: "The words to set (default: what is piped in)";
|
|
44
|
+
}];
|
|
45
|
+
}>;
|
|
46
|
+
/**
|
|
47
|
+
* Sets the piped text, else the words, in big letters.
|
|
48
|
+
*
|
|
49
|
+
* @param name - The command's name, for its refusal.
|
|
50
|
+
* @param words - The words given.
|
|
51
|
+
* @param ink - The character to draw with.
|
|
52
|
+
* @returns The big letters, or a refusal when there is nothing to set.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* await big_run('banner', ['hi'], '#');
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
export declare function big_run(name: string, words: ReadonlyArray<string>, ink: string): Promise<CommandEnvelope>;
|
|
60
|
+
/**
|
|
61
|
+
* `figlet` over words already split: the declaration's parse and handler.
|
|
62
|
+
*
|
|
63
|
+
* @param args - The words after `figlet`.
|
|
64
|
+
* @returns The big letters, or the refusal of a bad line.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```ts
|
|
68
|
+
* await builtin_figlet(['LCARS']);
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
13
71
|
export declare function builtin_figlet(args: string[]): Promise<CommandEnvelope>;
|
|
14
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* `banner` over words already split: the declaration's parse and handler.
|
|
74
|
+
*
|
|
75
|
+
* @param args - The words after `banner`.
|
|
76
|
+
* @returns The big letters, or the refusal of a bad line.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```ts
|
|
80
|
+
* await builtin_banner(['ChRIS']);
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
15
83
|
export declare function builtin_banner(args: string[]): Promise<CommandEnvelope>;
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { text_input } from './stdin.js';
|
|
12
12
|
import { envelope_ok, envelope_error } from '@fnndsc/menu';
|
|
13
|
+
import { command_declare } from '../../core/commandDeclaration.js';
|
|
14
|
+
import { declaredCommand_run } from '../../core/commandParse.js';
|
|
13
15
|
/** The face: each glyph five rows, `#` for ink. */
|
|
14
16
|
const FACE = {
|
|
15
17
|
A: [' ### ', '# #', '#####', '# #', '# #'],
|
|
@@ -91,19 +93,94 @@ export function figlet_render(text, ink = '#') {
|
|
|
91
93
|
rows.pop();
|
|
92
94
|
return rows;
|
|
93
95
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
+
/** The words to set in big letters: what is piped in, else these. */
|
|
97
|
+
const BIG_TEXT = { name: 'text', kind: 'word', optional: true, repeat: true, summary: 'The words to set (default: what is piped in)' };
|
|
98
|
+
/** What a `figlet` or `banner` line may hold. */
|
|
99
|
+
const BIG_GRAMMAR = { operands: [BIG_TEXT] };
|
|
100
|
+
/**
|
|
101
|
+
* `figlet [text]`: the declaration.
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```ts
|
|
105
|
+
* commands_register({ declarations: [figletCommand] });
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
export const figletCommand = command_declare({
|
|
109
|
+
name: 'figlet',
|
|
110
|
+
grammar: BIG_GRAMMAR,
|
|
111
|
+
help: {
|
|
112
|
+
summary: 'Big letters, solid',
|
|
113
|
+
description: 'Sets words in a five-row face of solid blocks. Letters, digits and the punctuation a title needs; lowercase is set as capitals. Reads what is piped in, else the words given.',
|
|
114
|
+
examples: ['figlet LCARS', 'date +%H:%M | figlet'],
|
|
115
|
+
},
|
|
116
|
+
holds: [],
|
|
117
|
+
handler: async (args) => big_run('figlet', args.operands.text, '█'),
|
|
118
|
+
});
|
|
119
|
+
/**
|
|
120
|
+
* `banner [text]`: the declaration.
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* ```ts
|
|
124
|
+
* commands_register({ declarations: [bannerCommand] });
|
|
125
|
+
* ```
|
|
126
|
+
*/
|
|
127
|
+
export const bannerCommand = command_declare({
|
|
128
|
+
name: 'banner',
|
|
129
|
+
grammar: BIG_GRAMMAR,
|
|
130
|
+
help: {
|
|
131
|
+
summary: 'Big letters in #, as banner drew them',
|
|
132
|
+
description: 'figlet in the face banner used: # for ink.',
|
|
133
|
+
examples: ['banner ChRIS'],
|
|
134
|
+
},
|
|
135
|
+
holds: [],
|
|
136
|
+
handler: async (args) => big_run('banner', args.operands.text, '#'),
|
|
137
|
+
});
|
|
138
|
+
/**
|
|
139
|
+
* Sets the piped text, else the words, in big letters.
|
|
140
|
+
*
|
|
141
|
+
* @param name - The command's name, for its refusal.
|
|
142
|
+
* @param words - The words given.
|
|
143
|
+
* @param ink - The character to draw with.
|
|
144
|
+
* @returns The big letters, or a refusal when there is nothing to set.
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* ```ts
|
|
148
|
+
* await big_run('banner', ['hi'], '#');
|
|
149
|
+
* ```
|
|
150
|
+
*/
|
|
151
|
+
export async function big_run(name, words, ink) {
|
|
152
|
+
const text = text_input(words);
|
|
96
153
|
if (text === null)
|
|
97
154
|
return envelope_error('', undefined, `${name}: nothing to set (give words, or pipe them in)\n`);
|
|
98
155
|
const said = text.replace(/\n$/, '');
|
|
99
156
|
return envelope_ok(`${figlet_render(said, ink).join('\n')}\n`, { kind: 'games.figlet', data: { text: said, ink } });
|
|
100
157
|
}
|
|
101
|
-
/**
|
|
158
|
+
/**
|
|
159
|
+
* `figlet` over words already split: the declaration's parse and handler.
|
|
160
|
+
*
|
|
161
|
+
* @param args - The words after `figlet`.
|
|
162
|
+
* @returns The big letters, or the refusal of a bad line.
|
|
163
|
+
*
|
|
164
|
+
* @example
|
|
165
|
+
* ```ts
|
|
166
|
+
* await builtin_figlet(['LCARS']);
|
|
167
|
+
* ```
|
|
168
|
+
*/
|
|
102
169
|
export async function builtin_figlet(args) {
|
|
103
|
-
return
|
|
170
|
+
return declaredCommand_run(figletCommand, args);
|
|
104
171
|
}
|
|
105
|
-
/**
|
|
172
|
+
/**
|
|
173
|
+
* `banner` over words already split: the declaration's parse and handler.
|
|
174
|
+
*
|
|
175
|
+
* @param args - The words after `banner`.
|
|
176
|
+
* @returns The big letters, or the refusal of a bad line.
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* ```ts
|
|
180
|
+
* await builtin_banner(['ChRIS']);
|
|
181
|
+
* ```
|
|
182
|
+
*/
|
|
106
183
|
export async function builtin_banner(args) {
|
|
107
|
-
return
|
|
184
|
+
return declaredCommand_run(bannerCommand, args);
|
|
108
185
|
}
|
|
109
186
|
//# sourceMappingURL=figlet.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"figlet.js","sourceRoot":"","sources":["../../../src/builtins/games/figlet.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAmB,WAAW,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"figlet.js","sourceRoot":"","sources":["../../../src/builtins/games/figlet.ts"],"names":[],"mappings":"AAA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,CAAC,GAAG,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;AACtH,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,IAAc;IACjD,OAAO,mBAAmB,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;AAClD,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,IAAc;IACjD,OAAO,mBAAmB,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -1,9 +1,108 @@
|
|
|
1
1
|
import { CommandEnvelope } from '@fnndsc/menu';
|
|
2
2
|
/** A span of seconds in words: `2d 3h 04m`, `17m 05s`. */
|
|
3
3
|
export declare function uptime_words(seconds: number): string;
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
/**
|
|
5
|
+
* `who`: the declaration.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* commands_register({ declarations: [whoCommand] });
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export declare const whoCommand: import("../../core/commandDeclaration.js").CommandDeclaration<{}>;
|
|
13
|
+
/**
|
|
14
|
+
* `who` over words already split: the declaration's parse and handler.
|
|
15
|
+
*
|
|
16
|
+
* @param args - The words after `who`: none.
|
|
17
|
+
* @returns The surfaces, or the refusal of a bad line.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* await builtin_who([]);
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare function builtin_who(args: string[]): Promise<CommandEnvelope>;
|
|
25
|
+
/**
|
|
26
|
+
* Lists the surfaces attached to this session.
|
|
27
|
+
*
|
|
28
|
+
* @returns The surfaces.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* await who_run();
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare function who_run(): Promise<CommandEnvelope>;
|
|
36
|
+
/**
|
|
37
|
+
* `uptime`: the declaration.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* commands_register({ declarations: [uptimeCommand] });
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export declare const uptimeCommand: import("../../core/commandDeclaration.js").CommandDeclaration<{}>;
|
|
45
|
+
/**
|
|
46
|
+
* `uptime` over words already split: the declaration's parse and handler.
|
|
47
|
+
*
|
|
48
|
+
* @param args - The words after `uptime`: none.
|
|
49
|
+
* @returns The uptime, or the refusal of a bad line.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```ts
|
|
53
|
+
* await builtin_uptime([]);
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
export declare function builtin_uptime(args: string[]): Promise<CommandEnvelope>;
|
|
57
|
+
/**
|
|
58
|
+
* Says how long this process has been up, and who is here.
|
|
59
|
+
*
|
|
60
|
+
* @returns The uptime.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* await uptime_run();
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
export declare function uptime_run(): Promise<CommandEnvelope>;
|
|
68
|
+
/**
|
|
69
|
+
* `say [text]`: the declaration.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* commands_register({ declarations: [sayCommand] });
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
export declare const sayCommand: import("../../core/commandDeclaration.js").CommandDeclaration<{
|
|
77
|
+
readonly operands: readonly [{
|
|
78
|
+
readonly name: "text";
|
|
79
|
+
readonly kind: "word";
|
|
80
|
+
readonly optional: true;
|
|
81
|
+
readonly repeat: true;
|
|
82
|
+
readonly summary: "What to say (default: what is piped in)";
|
|
83
|
+
}];
|
|
84
|
+
}>;
|
|
85
|
+
/**
|
|
86
|
+
* `say` over words already split: the declaration's parse and handler.
|
|
87
|
+
*
|
|
88
|
+
* @param args - The words after `say`.
|
|
89
|
+
* @returns The words said, or the refusal of a bad line.
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```ts
|
|
93
|
+
* await builtin_say(['hello', 'there']);
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
9
96
|
export declare function builtin_say(args: string[]): Promise<CommandEnvelope>;
|
|
97
|
+
/**
|
|
98
|
+
* Says words: what was piped in, else the words given.
|
|
99
|
+
*
|
|
100
|
+
* @param words - The operand words.
|
|
101
|
+
* @returns The words as said, or a refusal when there are none.
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```ts
|
|
105
|
+
* await say_run(['hello']);
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
export declare function say_run(words: readonly string[]): Promise<CommandEnvelope>;
|