@fnndsc/brasa 0.56.2 → 0.56.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/buildinfo.json +1 -1
- package/dist/builtins/berth/berthCube.d.ts +3 -2
- package/dist/builtins/berth/berthCube.js +5 -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/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/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 +38 -2
- package/dist/builtins/help.js +76 -769
- 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 +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 +3 -3
package/dist/buildinfo.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"hash":"
|
|
1
|
+
{"hash":"9a508e"}
|
|
@@ -53,8 +53,9 @@ export interface RemoteBytes {
|
|
|
53
53
|
export declare function berthHome_get(): Promise<string>;
|
|
54
54
|
/**
|
|
55
55
|
* A typed path as an absolute ChRIS path: relative to the working directory,
|
|
56
|
-
* `~` for the home, and a `/proc/jobs/…/data` path
|
|
57
|
-
*
|
|
56
|
+
* `~` for the home, and a `/proc/jobs/…/data` path as the folder in its
|
|
57
|
+
* feed that it stands for (`storePath_resolve`, the mounts alone: a link
|
|
58
|
+
* inside the output is not followed, so a path under a node stays under it).
|
|
58
59
|
*
|
|
59
60
|
* @param typed - The path as typed.
|
|
60
61
|
* @returns The absolute path.
|
|
@@ -48,8 +48,6 @@ import { error_stripDebugPrefix } from '../../core/errorText.js';
|
|
|
48
48
|
import { vfsDispatcher_get } from '../../core/filesystem.js';
|
|
49
49
|
import { path_resolve, storePath_resolve } from '../../core/paths.js';
|
|
50
50
|
import { sink_get } from '../../core/sink.js';
|
|
51
|
-
/** A `/proc/jobs` path at or under a job's `data` link: the link, and what follows it. */
|
|
52
|
-
const PROC_DATA_PATH = /^(\/proc\/jobs\/feed_\d+(?:\/[^/]+_\d+)+\/data)(\/.*)?$/;
|
|
53
51
|
/** Listing kinds that are folders to walk into. */
|
|
54
52
|
const FOLDER_KINDS = new Set(['dir', 'vfs']);
|
|
55
53
|
/**
|
|
@@ -67,8 +65,9 @@ export async function berthHome_get() {
|
|
|
67
65
|
}
|
|
68
66
|
/**
|
|
69
67
|
* A typed path as an absolute ChRIS path: relative to the working directory,
|
|
70
|
-
* `~` for the home, and a `/proc/jobs/…/data` path
|
|
71
|
-
*
|
|
68
|
+
* `~` for the home, and a `/proc/jobs/…/data` path as the folder in its
|
|
69
|
+
* feed that it stands for (`storePath_resolve`, the mounts alone: a link
|
|
70
|
+
* inside the output is not followed, so a path under a node stays under it).
|
|
72
71
|
*
|
|
73
72
|
* @param typed - The path as typed.
|
|
74
73
|
* @returns The absolute path.
|
|
@@ -79,12 +78,8 @@ export async function berthHome_get() {
|
|
|
79
78
|
* ```
|
|
80
79
|
*/
|
|
81
80
|
export async function berthPath_resolve(typed) {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
if (link === null)
|
|
85
|
-
return resolved;
|
|
86
|
-
const target = await vfsDispatcher_get().linkTarget_resolve(link[1]);
|
|
87
|
-
return target.ok ? `${target.value}${link[2] ?? ''}` : resolved;
|
|
81
|
+
// The mounts alone: a link inside a run's output stays under its node.
|
|
82
|
+
return storePath_resolve(await path_resolve(typed), { links: false });
|
|
88
83
|
}
|
|
89
84
|
/**
|
|
90
85
|
* The path CUBE stores a logical path at, as every reader resolves it
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"berthCube.js","sourceRoot":"","sources":["../../../src/builtins/berth/berthCube.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,EAAE,UAAU,EAAgD,MAAM,cAAc,CAAC;AAExF,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,
|
|
1
|
+
{"version":3,"file":"berthCube.js","sourceRoot":"","sources":["../../../src/builtins/berth/berthCube.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,EAAE,UAAU,EAAgD,MAAM,cAAc,CAAC;AAExF,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAA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AAK,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7H,MAAM,QAAQ,GAAY,IAAI,EAAE,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;IACvD,IAAI,IAAI,KAAK,IAAI,IAAI,OAAO,QAAQ,KAAK,QAAQ;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,CAAC,IAAI,EAAE,mBAAmB,CAAC,EAAE,CAAC;IAC5H,UAAU,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAClC,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;AACzE,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,IAAY,EAAE,IAAY;IAC3D,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,CAAC;IACtD,MAAM,IAAI,GAAW,UAAU,CAAC,eAAe,EAAE,CAAC;IAClD,MAAM,OAAO,GAAoB,MAAM,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC/D,IAAI,CAAC,OAAO,CAAC,EAAE;QAAE,OAAO,eAAe,CAAC,IAAI,EAAE,0BAA0B,IAAI,EAAE,CAAC,CAAC;IAChF,UAAU,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAClC,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/builtins/debug.d.ts
CHANGED
|
@@ -1,8 +1,29 @@
|
|
|
1
1
|
import { CommandEnvelope } from '@fnndsc/menu';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* `debug [on | off]`: the declaration.
|
|
4
4
|
*
|
|
5
|
-
* @
|
|
6
|
-
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* commands_register({ declarations: [debugCommand] });
|
|
8
|
+
* ```
|
|
9
|
+
*/
|
|
10
|
+
export declare const debugCommand: import("../core/commandDeclaration.js").CommandDeclaration<{
|
|
11
|
+
readonly bare: {
|
|
12
|
+
readonly summary: "Show whether debug mode is on";
|
|
13
|
+
};
|
|
14
|
+
readonly subcommands: {
|
|
15
|
+
readonly on: {
|
|
16
|
+
readonly summary: "Enable debug logging";
|
|
17
|
+
};
|
|
18
|
+
readonly off: {
|
|
19
|
+
readonly summary: "Disable debug logging";
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
}>;
|
|
23
|
+
/**
|
|
24
|
+
* `debug` over words already split: the declaration's parse and handler.
|
|
25
|
+
*
|
|
26
|
+
* @param args - The words after `debug`.
|
|
27
|
+
* @returns The debug state, or the refusal of a bad line.
|
|
7
28
|
*/
|
|
8
29
|
export declare function builtin_debug(args: string[]): Promise<CommandEnvelope>;
|
package/dist/builtins/debug.js
CHANGED
|
@@ -1,19 +1,43 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @file
|
|
2
|
+
* @file `debug`: shows or sets the backend's debug mode (verbose error
|
|
3
|
+
* logging).
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
+
* Declared in one record (`debugCommand`): `on` and `off` are its
|
|
6
|
+
* subcommands; with neither it says how it stands.
|
|
7
|
+
*
|
|
8
|
+
* Key components:
|
|
9
|
+
* - debugCommand: the declaration.
|
|
10
|
+
* - builtin_debug: the declaration run over words already split.
|
|
11
|
+
*
|
|
12
|
+
* Typical usage:
|
|
13
|
+
* ```ts
|
|
14
|
+
* await builtin_debug(['on']);
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* Dependencies: the installed backend's debug flag.
|
|
18
|
+
*
|
|
19
|
+
* @module
|
|
5
20
|
*/
|
|
6
21
|
import chalk from 'chalk';
|
|
7
22
|
import { backendInstalled_get } from '../core/backend.js';
|
|
8
23
|
import { envelope_ok, envelope_error } from '@fnndsc/menu';
|
|
24
|
+
import { command_declare } from '../core/commandDeclaration.js';
|
|
25
|
+
import { declaredCommand_run } from '../core/commandParse.js';
|
|
26
|
+
/** What a `debug` line may hold. */
|
|
27
|
+
const DEBUG_GRAMMAR = {
|
|
28
|
+
bare: { summary: 'Show whether debug mode is on' },
|
|
29
|
+
subcommands: {
|
|
30
|
+
on: { summary: 'Enable debug logging' },
|
|
31
|
+
off: { summary: 'Disable debug logging' },
|
|
32
|
+
},
|
|
33
|
+
};
|
|
9
34
|
/**
|
|
10
|
-
*
|
|
35
|
+
* Shows or sets debug mode.
|
|
11
36
|
*
|
|
12
|
-
* @param args -
|
|
37
|
+
* @param args - The line, parsed: `on`, `off`, or neither.
|
|
13
38
|
* @returns An envelope describing the (possibly updated) debug state.
|
|
14
39
|
*/
|
|
15
|
-
|
|
16
|
-
const subcommand = args[0];
|
|
40
|
+
async function debug_run(args) {
|
|
17
41
|
const backend = backendInstalled_get();
|
|
18
42
|
if (backend?.debug_get === undefined || backend.debug_set === undefined) {
|
|
19
43
|
return envelope_error('', undefined, `${chalk.red('debug: this session has no debug mode.')}\n`);
|
|
@@ -22,7 +46,7 @@ export async function builtin_debug(args) {
|
|
|
22
46
|
if (enabledNow === null) {
|
|
23
47
|
return envelope_error('', [{ type: 'error', message: 'Error: Connection configuration not initialized.' }], `${chalk.red('Error: Connection configuration not initialized.')}\n`);
|
|
24
48
|
}
|
|
25
|
-
if (
|
|
49
|
+
if (args.subcommand === null) {
|
|
26
50
|
const enabled = enabledNow;
|
|
27
51
|
const status = enabled ? 'enabled' : 'disabled';
|
|
28
52
|
const detail = enabled
|
|
@@ -30,14 +54,43 @@ export async function builtin_debug(args) {
|
|
|
30
54
|
: chalk.gray(' Verbose error logging is disabled.');
|
|
31
55
|
return envelope_ok(`Debug mode: ${chalk.yellow(status)}\n${detail}\n${chalk.gray('\nUsage: debug [on|off]')}\n`, { kind: 'sys.debug', data: { enabled } });
|
|
32
56
|
}
|
|
33
|
-
if (subcommand === 'on') {
|
|
57
|
+
if (args.subcommand === 'on') {
|
|
34
58
|
backend.debug_set(true);
|
|
35
59
|
return envelope_ok(`${chalk.yellow('[!] Debug mode enabled')}\n${chalk.gray(' Verbose error logging activated.')}\n`, { kind: 'sys.debug', data: { enabled: true } });
|
|
36
60
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
61
|
+
backend.debug_set(false);
|
|
62
|
+
return envelope_ok(`${chalk.green('[+] Debug mode disabled')}\n${chalk.gray(' Verbose error logging deactivated.')}\n`, { kind: 'sys.debug', data: { enabled: false } });
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* `debug [on | off]`: the declaration.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* commands_register({ declarations: [debugCommand] });
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
export const debugCommand = command_declare({
|
|
73
|
+
name: 'debug',
|
|
74
|
+
grammar: DEBUG_GRAMMAR,
|
|
75
|
+
help: {
|
|
76
|
+
summary: 'Toggle or display debug mode (verbose logging)',
|
|
77
|
+
description: "Shows whether the session's debug mode, verbose error logging, is on, or turns it on or off. A session whose backend has no debug mode says so.",
|
|
78
|
+
category: 'Settings',
|
|
79
|
+
examples: [
|
|
80
|
+
'debug # Show current status',
|
|
81
|
+
'debug on # Enable debug mode',
|
|
82
|
+
'debug off # Disable debug mode',
|
|
83
|
+
],
|
|
84
|
+
},
|
|
85
|
+
handler: debug_run,
|
|
86
|
+
});
|
|
87
|
+
/**
|
|
88
|
+
* `debug` over words already split: the declaration's parse and handler.
|
|
89
|
+
*
|
|
90
|
+
* @param args - The words after `debug`.
|
|
91
|
+
* @returns The debug state, or the refusal of a bad line.
|
|
92
|
+
*/
|
|
93
|
+
export async function builtin_debug(args) {
|
|
94
|
+
return declaredCommand_run(debugCommand, args);
|
|
42
95
|
}
|
|
43
96
|
//# sourceMappingURL=debug.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug.js","sourceRoot":"","sources":["../../src/builtins/debug.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"debug.js","sourceRoot":"","sources":["../../src/builtins/debug.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAgB,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAmB,WAAW,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,eAAe,EAA8C,MAAM,+BAA+B,CAAC;AAC5G,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,oCAAoC;AACpC,MAAM,aAAa,GAAG;IACpB,IAAI,EAAE,EAAE,OAAO,EAAE,+BAA+B,EAAE;IAClD,WAAW,EAAE;QACX,EAAE,EAAE,EAAE,OAAO,EAAE,sBAAsB,EAAE;QACvC,GAAG,EAAE,EAAE,OAAO,EAAE,uBAAuB,EAAE;KAC1C;CACgC,CAAC;AAEpC;;;;;GAKG;AACH,KAAK,UAAU,SAAS,CAAC,IAA4C;IACnE,MAAM,OAAO,GAAmB,oBAAoB,EAAE,CAAC;IACvD,IAAI,OAAO,EAAE,SAAS,KAAK,SAAS,IAAI,OAAO,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;QACxE,OAAO,cAAc,CAAC,EAAE,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,wCAAwC,CAAC,IAAI,CAAC,CAAC;IACnG,CAAC;IACD,MAAM,UAAU,GAAmB,OAAO,CAAC,SAAS,EAAE,CAAC;IAEvD,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;QACxB,OAAO,cAAc,CACnB,EAAE,EACF,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,kDAAkD,EAAE,CAAC,EAChF,GAAG,KAAK,CAAC,GAAG,CAAC,kDAAkD,CAAC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Y,GAAG,eAAe,CAAC;IAC1C,IAAI,EAAE,OAAO;IACb,OAAO,EAAE,aAAa;IACtB,IAAI,EAAE;QACJ,OAAO,EAAE,gDAAgD;QACzD,WAAW,EAAE,iJAAiJ;QAC9J,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE;YACR,6CAA6C;YAC7C,2CAA2C;YAC3C,4CAA4C;SAC7C;KACF;IACD,OAAO,EAAE,SAAS;CACnB,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,IAAc;IAChD,OAAO,mBAAmB,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @file
|
|
2
|
+
* @file The words of a feed's access list: `setfacl`'s entries, the
|
|
3
|
+
* targets a feed is named by, and `getfacl`'s block.
|
|
3
4
|
*
|
|
4
5
|
* A feed shared with another identity is, in POSIX terms, an access
|
|
5
6
|
* control entry: `setfacl -m u:someone:r <path>`, `setfacl -m g:lab:r`,
|
|
@@ -7,8 +8,9 @@
|
|
|
7
8
|
* is the verb a terminal already knows. "Share X with Y" is a sentence — it
|
|
8
9
|
* belongs to a natural-language assist, not to a shell.
|
|
9
10
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
11
|
+
* The line itself is parsed against each command's declaration (`acl.ts`);
|
|
12
|
+
* these read the words inside its values. Dependency-free, so they are
|
|
13
|
+
* tested without the engine.
|
|
12
14
|
*
|
|
13
15
|
* @module
|
|
14
16
|
*/
|
|
@@ -27,29 +29,12 @@ export interface AclRemoval {
|
|
|
27
29
|
kind: 'user' | 'group';
|
|
28
30
|
name: string;
|
|
29
31
|
}
|
|
30
|
-
/** A parsed `setfacl` invocation. */
|
|
31
|
-
export interface SetfaclArgs {
|
|
32
|
-
/** The entry to add or modify, when `-m` was given. */
|
|
33
|
-
modify: AclEntry | null;
|
|
34
|
-
/** The grant to withdraw, when `-x` was given. */
|
|
35
|
-
remove: AclRemoval | null;
|
|
36
|
-
/** Paths the entry applies to. */
|
|
37
|
-
paths: string[];
|
|
38
|
-
/** What was wrong with the invocation, when something was. */
|
|
39
|
-
error: string | null;
|
|
40
|
-
}
|
|
41
32
|
/** Who can read a feed besides its owner, as `getfacl` shows it. */
|
|
42
33
|
export interface AclView {
|
|
43
34
|
users: readonly string[];
|
|
44
35
|
groups: readonly string[];
|
|
45
36
|
public: boolean;
|
|
46
37
|
}
|
|
47
|
-
/** How `setfacl` is spelled, for help and for errors. */
|
|
48
|
-
export declare const SETFACL_USAGE: string;
|
|
49
|
-
/** How `getfacl` is spelled. */
|
|
50
|
-
export declare const GETFACL_USAGE: string;
|
|
51
|
-
/** How `chmod` is spelled on a feed. */
|
|
52
|
-
export declare const CHMOD_USAGE: string;
|
|
53
38
|
/**
|
|
54
39
|
* Reads an access control entry: `u:<user>:<perms>`, `g:<group>:<perms>`,
|
|
55
40
|
* or the other entry `o::<perms>` (also `o:<perms>`); long kinds read too.
|
|
@@ -66,24 +51,6 @@ export declare function aclEntry_parse(spec: string): AclEntry | null;
|
|
|
66
51
|
* @returns The grant, or the refusal's words.
|
|
67
52
|
*/
|
|
68
53
|
export declare function aclRemoval_parse(spec: string): AclRemoval | string;
|
|
69
|
-
/**
|
|
70
|
-
* Reads a `setfacl` invocation.
|
|
71
|
-
*
|
|
72
|
-
* @param args - Raw argument tokens.
|
|
73
|
-
* @returns The requested change and its targets, or the reason it cannot be read.
|
|
74
|
-
*/
|
|
75
|
-
export declare function setfaclArgs_parse(args: string[]): SetfaclArgs;
|
|
76
|
-
/**
|
|
77
|
-
* Reads a `chmod` on feeds: `o+r` makes them public, `o-r` private, and
|
|
78
|
-
* either is the other entry `setfacl` writes.
|
|
79
|
-
*
|
|
80
|
-
* @param args - Raw argument tokens.
|
|
81
|
-
* @returns The entry and the feeds, or the refusal's words.
|
|
82
|
-
*/
|
|
83
|
-
export declare function chmodArgs_parse(args: string[]): {
|
|
84
|
-
entry: AclEntry;
|
|
85
|
-
paths: string[];
|
|
86
|
-
} | string;
|
|
87
54
|
/**
|
|
88
55
|
* Resolves a feed id from an id, a `feed_N` name, a path through `/feeds/`,
|
|
89
56
|
* or its projection `/proc/jobs/feed_N`.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @file
|
|
2
|
+
* @file The words of a feed's access list: `setfacl`'s entries, the
|
|
3
|
+
* targets a feed is named by, and `getfacl`'s block.
|
|
3
4
|
*
|
|
4
5
|
* A feed shared with another identity is, in POSIX terms, an access
|
|
5
6
|
* control entry: `setfacl -m u:someone:r <path>`, `setfacl -m g:lab:r`,
|
|
@@ -7,17 +8,12 @@
|
|
|
7
8
|
* is the verb a terminal already knows. "Share X with Y" is a sentence — it
|
|
8
9
|
* belongs to a natural-language assist, not to a shell.
|
|
9
10
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
11
|
+
* The line itself is parsed against each command's declaration (`acl.ts`);
|
|
12
|
+
* these read the words inside its values. Dependency-free, so they are
|
|
13
|
+
* tested without the engine.
|
|
12
14
|
*
|
|
13
15
|
* @module
|
|
14
16
|
*/
|
|
15
|
-
/** How `setfacl` is spelled, for help and for errors. */
|
|
16
|
-
export const SETFACL_USAGE = 'setfacl: usage: setfacl -m u:<user>:r|g:<group>:r|o::r|o::- <path>... | setfacl -x u:<user>|g:<group> <path>...';
|
|
17
|
-
/** How `getfacl` is spelled. */
|
|
18
|
-
export const GETFACL_USAGE = 'getfacl: usage: getfacl <path>...';
|
|
19
|
-
/** How `chmod` is spelled on a feed. */
|
|
20
|
-
export const CHMOD_USAGE = 'chmod: usage: chmod o+r|o-r <feed>... (a feed is public or private; nothing else is a mode it has)';
|
|
21
17
|
/** The words for an entry's kind, short and long. */
|
|
22
18
|
const KIND_OF = { u: 'user', user: 'user', g: 'group', group: 'group', o: 'other', other: 'other' };
|
|
23
19
|
/**
|
|
@@ -61,71 +57,9 @@ export function aclRemoval_parse(spec) {
|
|
|
61
57
|
if (kind === 'other')
|
|
62
58
|
return "setfacl: the other entry cannot be removed; make the feed private with setfacl -m o::- (or chmod o-r)";
|
|
63
59
|
if (kind === undefined || name === '')
|
|
64
|
-
return
|
|
60
|
+
return `setfacl: '${spec}' names no user or group (want u:<user> or g:<group>)`;
|
|
65
61
|
return { kind, name };
|
|
66
62
|
}
|
|
67
|
-
/**
|
|
68
|
-
* Reads a `setfacl` invocation.
|
|
69
|
-
*
|
|
70
|
-
* @param args - Raw argument tokens.
|
|
71
|
-
* @returns The requested change and its targets, or the reason it cannot be read.
|
|
72
|
-
*/
|
|
73
|
-
export function setfaclArgs_parse(args) {
|
|
74
|
-
const empty = { modify: null, remove: null, paths: [], error: null };
|
|
75
|
-
let modify = null;
|
|
76
|
-
let remove = null;
|
|
77
|
-
const paths = [];
|
|
78
|
-
for (let index = 0; index < args.length; index++) {
|
|
79
|
-
const token = args[index] ?? '';
|
|
80
|
-
if (token === '-m' || token === '--modify') {
|
|
81
|
-
const spec = args[++index];
|
|
82
|
-
if (spec === undefined)
|
|
83
|
-
return { ...empty, error: SETFACL_USAGE };
|
|
84
|
-
const entry = aclEntry_parse(spec);
|
|
85
|
-
if (entry === null) {
|
|
86
|
-
return { ...empty, error: `setfacl: '${spec}' is not an entry (want u:<user>:r, g:<group>:r, o::r or o::-)` };
|
|
87
|
-
}
|
|
88
|
-
modify = entry;
|
|
89
|
-
continue;
|
|
90
|
-
}
|
|
91
|
-
if (token === '-x' || token === '--remove') {
|
|
92
|
-
const spec = args[++index];
|
|
93
|
-
if (spec === undefined)
|
|
94
|
-
return { ...empty, error: SETFACL_USAGE };
|
|
95
|
-
const removal = aclRemoval_parse(spec);
|
|
96
|
-
if (typeof removal === 'string')
|
|
97
|
-
return { ...empty, error: removal };
|
|
98
|
-
remove = removal;
|
|
99
|
-
continue;
|
|
100
|
-
}
|
|
101
|
-
if (token.startsWith('-')) {
|
|
102
|
-
return { ...empty, error: `setfacl: unsupported option '${token}'` };
|
|
103
|
-
}
|
|
104
|
-
paths.push(token);
|
|
105
|
-
}
|
|
106
|
-
if (modify === null && remove === null)
|
|
107
|
-
return { ...empty, error: SETFACL_USAGE };
|
|
108
|
-
if (paths.length === 0)
|
|
109
|
-
return { ...empty, error: SETFACL_USAGE };
|
|
110
|
-
return { modify, remove, paths, error: null };
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Reads a `chmod` on feeds: `o+r` makes them public, `o-r` private, and
|
|
114
|
-
* either is the other entry `setfacl` writes.
|
|
115
|
-
*
|
|
116
|
-
* @param args - Raw argument tokens.
|
|
117
|
-
* @returns The entry and the feeds, or the refusal's words.
|
|
118
|
-
*/
|
|
119
|
-
export function chmodArgs_parse(args) {
|
|
120
|
-
const [mode, ...paths] = args;
|
|
121
|
-
if (mode === undefined || paths.length === 0)
|
|
122
|
-
return CHMOD_USAGE;
|
|
123
|
-
if (mode === 'o+r')
|
|
124
|
-
return { entry: { kind: 'other', name: '', perms: 'r' }, paths };
|
|
125
|
-
if (mode === 'o-r')
|
|
126
|
-
return { entry: { kind: 'other', name: '', perms: '-' }, paths };
|
|
127
|
-
return `chmod: mode '${mode}' is not one a feed has: o+r makes it public, o-r private`;
|
|
128
|
-
}
|
|
129
63
|
/**
|
|
130
64
|
* Resolves a feed id from an id, a `feed_N` name, a path through `/feeds/`,
|
|
131
65
|
* or its projection `/proc/jobs/feed_N`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acl.args.js","sourceRoot":"","sources":["../../../src/builtins/fs/acl.args.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"acl.args.js","sourceRoot":"","sources":["../../../src/builtins/fs/acl.args.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AA2BH,qDAAqD;AACrD,MAAM,OAAO,GAAsC,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE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M,MAAM,GAA4B,MAAM,CAAC,KAAK,CAAC,4CAA4C,CAAC,CAAC;IACnG,OAAO,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACpD,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,KAAoB,EAAE,MAAe;IAC5E,MAAM,IAAI,GAAW,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC7C,MAAM,KAAK,GAAa,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC;IAC5C,IAAI,KAAK,KAAK,IAAI;QAAE,KAAK,CAAC,IAAI,CAAC,YAAY,KAAK,EAAE,CAAC,CAAC;IACpD,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACxB,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,KAAK;QAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAC,CAAC;IAChE,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM;QAAE,KAAK,CAAC,IAAI,CAAC,SAAS,KAAK,MAAM,CAAC,CAAC;IACpE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;IACxD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -1,23 +1,113 @@
|
|
|
1
1
|
import { CommandEnvelope } from '@fnndsc/menu';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* `setfacl [-m <entry>] [-x <entry>] <path>…`: the declaration.
|
|
4
4
|
*
|
|
5
|
-
* @
|
|
6
|
-
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* commands_register({ declarations: [setfaclCommand] }, 'backend');
|
|
8
|
+
* ```
|
|
9
|
+
*/
|
|
10
|
+
export declare const setfaclCommand: import("../../core/commandDeclaration.js").CommandDeclaration<{
|
|
11
|
+
readonly operands: readonly [{
|
|
12
|
+
readonly name: "path";
|
|
13
|
+
readonly kind: "cfsPath";
|
|
14
|
+
readonly repeat: true;
|
|
15
|
+
readonly glob: true;
|
|
16
|
+
readonly summary: "The feeds: an id, feed_N, any path through /feeds/, or /proc/jobs/feed_N";
|
|
17
|
+
}];
|
|
18
|
+
readonly options: {
|
|
19
|
+
readonly modify: {
|
|
20
|
+
readonly short: "m";
|
|
21
|
+
readonly long: "modify";
|
|
22
|
+
readonly summary: "Add an entry: u:<user>:r, g:<group>:r, o::r (public) or o::- (private)";
|
|
23
|
+
readonly value: {
|
|
24
|
+
readonly name: "entry";
|
|
25
|
+
readonly kind: "word";
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
readonly remove: {
|
|
29
|
+
readonly short: "x";
|
|
30
|
+
readonly long: "remove";
|
|
31
|
+
readonly summary: "Withdraw a grant: u:<user> or g:<group>";
|
|
32
|
+
readonly value: {
|
|
33
|
+
readonly name: "entry";
|
|
34
|
+
readonly kind: "word";
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
}>;
|
|
39
|
+
/**
|
|
40
|
+
* `setfacl` over words already split: the declaration's parse and handler.
|
|
41
|
+
*
|
|
42
|
+
* @param args - The words after `setfacl`.
|
|
43
|
+
* @returns An envelope naming what was granted, or the refusal of a bad line.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* await builtin_setfacl(['-x', 'u:someone', 'feed_12']);
|
|
48
|
+
* ```
|
|
7
49
|
*/
|
|
8
50
|
export declare function builtin_setfacl(args: string[]): Promise<CommandEnvelope>;
|
|
9
51
|
/**
|
|
10
|
-
* `chmod o+r
|
|
11
|
-
*
|
|
52
|
+
* `chmod <o+r|o-r> <path>…`: the declaration.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* commands_register({ declarations: [chmodCommand] }, 'backend');
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
export declare const chmodCommand: import("../../core/commandDeclaration.js").CommandDeclaration<{
|
|
60
|
+
readonly operands: readonly [{
|
|
61
|
+
readonly name: "mode";
|
|
62
|
+
readonly kind: "enum";
|
|
63
|
+
readonly values: readonly ["o+r", "o-r"];
|
|
64
|
+
readonly summary: "o+r makes the feeds public, o-r private: no other mode is one a feed has";
|
|
65
|
+
}, {
|
|
66
|
+
readonly name: "path";
|
|
67
|
+
readonly kind: "cfsPath";
|
|
68
|
+
readonly repeat: true;
|
|
69
|
+
readonly glob: true;
|
|
70
|
+
readonly summary: "The feeds: an id, feed_N, any path through /feeds/, or /proc/jobs/feed_N";
|
|
71
|
+
}];
|
|
72
|
+
}>;
|
|
73
|
+
/**
|
|
74
|
+
* `chmod` over words already split: the declaration's parse and handler.
|
|
75
|
+
*
|
|
76
|
+
* @param args - The words after `chmod`.
|
|
77
|
+
* @returns An envelope naming what changed, or the refusal of a bad line.
|
|
12
78
|
*
|
|
13
|
-
* @
|
|
14
|
-
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```ts
|
|
81
|
+
* await builtin_chmod(['o+r', 'feed_12']);
|
|
82
|
+
* ```
|
|
15
83
|
*/
|
|
16
84
|
export declare function builtin_chmod(args: string[]): Promise<CommandEnvelope>;
|
|
17
85
|
/**
|
|
18
|
-
*
|
|
86
|
+
* `getfacl <path>…`: the declaration.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```ts
|
|
90
|
+
* commands_register({ declarations: [getfaclCommand] }, 'backend');
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
export declare const getfaclCommand: import("../../core/commandDeclaration.js").CommandDeclaration<{
|
|
94
|
+
readonly operands: readonly [{
|
|
95
|
+
readonly name: "path";
|
|
96
|
+
readonly kind: "cfsPath";
|
|
97
|
+
readonly repeat: true;
|
|
98
|
+
readonly glob: true;
|
|
99
|
+
readonly summary: "The feeds: an id, feed_N, any path through /feeds/, or /proc/jobs/feed_N";
|
|
100
|
+
}];
|
|
101
|
+
}>;
|
|
102
|
+
/**
|
|
103
|
+
* `getfacl` over words already split: the declaration's parse and handler.
|
|
104
|
+
*
|
|
105
|
+
* @param args - The words after `getfacl`.
|
|
106
|
+
* @returns The access lists, or the refusal of a bad line.
|
|
19
107
|
*
|
|
20
|
-
* @
|
|
21
|
-
*
|
|
108
|
+
* @example
|
|
109
|
+
* ```ts
|
|
110
|
+
* await builtin_getfacl(['feed_12']);
|
|
111
|
+
* ```
|
|
22
112
|
*/
|
|
23
113
|
export declare function builtin_getfacl(args: string[]): Promise<CommandEnvelope>;
|