@homeflare/alchemy 0.25.1 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/launchd/index.js +51 -47
- package/dist/launchd/index.js.map +5 -4
- package/dist/launchd/sudo-guard-mode.d.ts +62 -0
- package/dist/launchd/sudo-guard-mode.d.ts.map +1 -0
- package/dist/launchd/sudo-guard.d.ts +1 -38
- package/dist/launchd/sudo-guard.d.ts.map +1 -1
- package/dist/linux/fake-sudo-root.d.ts +26 -0
- package/dist/linux/fake-sudo-root.d.ts.map +1 -0
- package/dist/linux/fake-sudo.d.ts +56 -0
- package/dist/linux/fake-sudo.d.ts.map +1 -0
- package/dist/linux/index.d.ts +2 -0
- package/dist/linux/index.d.ts.map +1 -1
- package/dist/linux/index.js +1134 -2
- package/dist/linux/index.js.map +22 -5
- package/dist/linux/sudo-allowlist-chown.d.ts +12 -0
- package/dist/linux/sudo-allowlist-chown.d.ts.map +1 -0
- package/dist/linux/sudo-allowlist-dir.d.ts +6 -0
- package/dist/linux/sudo-allowlist-dir.d.ts.map +1 -0
- package/dist/linux/sudo-allowlist.d.ts +40 -0
- package/dist/linux/sudo-allowlist.d.ts.map +1 -0
- package/dist/linux/sudo-exec.d.ts +31 -0
- package/dist/linux/sudo-exec.d.ts.map +1 -0
- package/dist/linux/sudo-guard.d.ts +36 -0
- package/dist/linux/sudo-guard.d.ts.map +1 -0
- package/dist/linux/sudo-runner.d.ts +37 -0
- package/dist/linux/sudo-runner.d.ts.map +1 -0
- package/dist/linux/sudo-stage.d.ts +22 -0
- package/dist/linux/sudo-stage.d.ts.map +1 -0
- package/dist/linux/sudo-write.d.ts +25 -0
- package/dist/linux/sudo-write.d.ts.map +1 -0
- package/dist/linux/unit-form.d.ts +2 -0
- package/dist/linux/unit-form.d.ts.map +1 -1
- package/dist/litellm/fake-litellm.d.ts.map +1 -1
- package/dist/proxmox/fake-pve-lxc.d.ts.map +1 -1
- package/docs/launchd-sudo.md +12 -3
- package/docs/linux-host.md +3 -3
- package/docs/linux-sudo.md +187 -0
- package/package.json +1 -1
- package/src/launchd/sudo-guard-mode.ts +111 -0
- package/src/launchd/sudo-guard.ts +3 -79
- package/src/launchd/sudo-modes.test.ts +38 -1
- package/src/linux/fake-sudo-root.ts +157 -0
- package/src/linux/fake-sudo.ts +142 -0
- package/src/linux/index.ts +2 -0
- package/src/linux/sudo-allowlist-chown.ts +71 -0
- package/src/linux/sudo-allowlist-dir.ts +103 -0
- package/src/linux/sudo-allowlist.test.ts +252 -0
- package/src/linux/sudo-allowlist.ts +223 -0
- package/src/linux/sudo-exec.ts +118 -0
- package/src/linux/sudo-guard.test.ts +136 -0
- package/src/linux/sudo-guard.ts +142 -0
- package/src/linux/sudo-lifecycle.test.ts +151 -0
- package/src/linux/sudo-runner.test.ts +206 -0
- package/src/linux/sudo-runner.ts +164 -0
- package/src/linux/sudo-stage.ts +50 -0
- package/src/linux/sudo-write.ts +167 -0
- package/src/linux/unit-form.ts +2 -1
- package/src/litellm/fake-litellm.ts +2 -0
- package/src/proxmox/client.test.ts +17 -3
- package/src/proxmox/fake-pve-lxc.ts +10 -1
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The mode/owner and read-back half of sudo-guard.ts, split out to keep that file under the
|
|
3
|
+
* house's 250-line cap. `assertPlainPath` (path chain) stays there; this is "is the mode/owner
|
|
4
|
+
* safe, and can the deploying user read the result back" — re-exported from sudo-guard.ts so
|
|
5
|
+
* nothing importing from there has to know this file exists.
|
|
6
|
+
*/
|
|
7
|
+
import type { HostRunner, WriteOptions } from './runner.ts';
|
|
8
|
+
/**
|
|
9
|
+
* ⛔ A ROOT-OWNED FILE UNDER A PREFIX IS ROOT'S TO CHANGE, AND ONLY ROOT'S (decided 2026-09-21).
|
|
10
|
+
* Group- or world-writable, anyone in that class rewrites a file root installed — a daemon's
|
|
11
|
+
* config, a script a LaunchDaemon runs as root — which is root by another name. Setuid or setgid,
|
|
12
|
+
* it runs as root (or its group) for whoever executes it. install(1) would apply either, as root.
|
|
13
|
+
* ★ Root-owned is an omitted owner (the runner installs as root under a prefix) or uid 0. A file
|
|
14
|
+
* handed to another user is that user's to change; the sticky bit changes nothing on a file.
|
|
15
|
+
* 🔴 MEASURED (adversarial review, 2026-09-23, round 1): "handed to another user" checked only
|
|
16
|
+
* `uid`, never `gid`. `{ uid: 501, gid: 0, mode: 0o2775 }` — a setgid file owned by an
|
|
17
|
+
* unprivileged uid but GROUPED to root — passed untouched, because a non-zero uid alone skipped
|
|
18
|
+
* every check below. Fixed by also treating `gid: 0` as root-adjacent.
|
|
19
|
+
* 🔴 MEASURED (adversarial review, round 2, same day): the round-1 fix still missed an OMITTED
|
|
20
|
+
* `gid`. `remote-file-plan.ts`'s `identity()` returns no `gid` key at all when a `RemoteFile`
|
|
21
|
+
* declares no `group`, so `{ uid: 501, mode: 0o2775 }` reaches this check with `gid: undefined`
|
|
22
|
+
* — neither `0` nor genuinely someone else's. `sudo-write.ts` then omits `-g` from `install`
|
|
23
|
+
* entirely, and GNU `install`, run as root via `sudo -n`, defaults an omitted `-g` to the
|
|
24
|
+
* INVOKING PROCESS's group — root's own — whenever the destination directory is not itself
|
|
25
|
+
* setgid (which none of this runner's declared prefixes are, measured in linux-host-measured.md).
|
|
26
|
+
* The file lands exactly as `{ uid: 501, gid: 0, mode: 0o2775 }` — the identical escalation the
|
|
27
|
+
* round-1 fix closed, reached by OMISSION instead of an explicit `group: 0`. So "root-adjacent"
|
|
28
|
+
* now also means an omitted `gid`: only a file with a genuinely non-root, EXPLICITLY GIVEN owner
|
|
29
|
+
* AND group is someone else's alone to make setuid/setgid or writable — an omission is never
|
|
30
|
+
* read as a safe default on either side, uid or gid.
|
|
31
|
+
*/
|
|
32
|
+
export declare const modeProblem: (options: WriteOptions) => string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* POSIX read permission for one uid: owner class, else group class, else other. `undefined` when
|
|
35
|
+
* only group membership could decide and the groups are unknown.
|
|
36
|
+
* ⚠️ EXACTLY ONE CLASS APPLIES. A group member gets the group bits even when the other bits are
|
|
37
|
+
* wider (`0604` hides a file from its group), so "other can read" is not enough on its own.
|
|
38
|
+
*/
|
|
39
|
+
export declare const canRead: (file: {
|
|
40
|
+
readonly uid: number;
|
|
41
|
+
readonly gid: number;
|
|
42
|
+
readonly mode: number;
|
|
43
|
+
}, uid: number, groups: readonly number[] | undefined) => boolean | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* ⛔ REFUSE A FILE THE DEPLOYING USER COULD NOT READ BACK, before writing it. Both providers read
|
|
46
|
+
* every write back to verify it (host-file-lifecycle.ts, job-lifecycle.ts) and read it again at
|
|
47
|
+
* every plan, as the deploying user; this runner elevates writes, never reads. A root-only
|
|
48
|
+
* `0600` would be installed, then fail the read-back with EACCES and stay on disk with no state,
|
|
49
|
+
* so every later plan would fail too.
|
|
50
|
+
* ★ An omitted owner is root (under a prefix the runner writes as root). An omitted group is the
|
|
51
|
+
* parent directory's, which is the group a new file gets on macOS.
|
|
52
|
+
* ⚠️ Unknown groups never refuse: the read-back after the write stays the final judge.
|
|
53
|
+
*/
|
|
54
|
+
export declare const assertReadableBack: (base: HostRunner, path: string, options: WriteOptions, groups: readonly number[] | undefined) => Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* The deploying user's groups, from `id -G`; `undefined` when that fails.
|
|
57
|
+
* ⚠️ NOT process.getgroups(). MEASURED 2026-09-21 on macOS 27.2: getgroups() returned 16 groups
|
|
58
|
+
* where `id -G` returned 18, because macOS caps a process's own list at 16. A group past the
|
|
59
|
+
* 16th would read as "not a member" and refuse a file the user can in fact read.
|
|
60
|
+
*/
|
|
61
|
+
export declare const operatorGroups: (base: HostRunner) => Promise<readonly number[] | undefined>;
|
|
62
|
+
//# sourceMappingURL=sudo-guard-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sudo-guard-mode.d.ts","sourceRoot":"","sources":["../../src/launchd/sudo-guard-mode.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAM5D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,WAAW,YAAa,YAAY,KAAG,MAAM,GAAG,SAY5D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,OAAO,SACZ;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,OACtE,MAAM,UACH,SAAS,MAAM,EAAE,GAAG,SAAS,KACpC,OAAO,GAAG,SASZ,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB,SACvB,UAAU,QACV,MAAM,WACH,YAAY,UACb,SAAS,MAAM,EAAE,GAAG,SAAS,KACpC,OAAO,CAAC,IAAI,CAYd,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,SAAgB,UAAU,KAAG,OAAO,CAAC,SAAS,MAAM,EAAE,GAAG,SAAS,CAI5F,CAAC"}
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
* in that window.
|
|
22
22
|
*/
|
|
23
23
|
import type { HostRunner, WriteOptions } from './runner.ts';
|
|
24
|
+
export { assertReadableBack, canRead, modeProblem, operatorGroups } from './sudo-guard-mode.ts';
|
|
24
25
|
/** The directories strictly between `prefix` and the file at `path`. */
|
|
25
26
|
export declare const betweenDirs: (prefix: string, path: string) => string[];
|
|
26
27
|
/** The directories strictly above `prefix`: `/`, then each one down to the prefix's parent. */
|
|
@@ -36,48 +37,10 @@ export type Expect = 'file' | 'file-or-absent';
|
|
|
36
37
|
* prefix and `path`, and anything but a file at it.
|
|
37
38
|
*/
|
|
38
39
|
export declare const assertPlainPath: (base: HostRunner, prefix: string, path: string, expect: Expect) => Promise<'file' | 'absent'>;
|
|
39
|
-
/**
|
|
40
|
-
* ⛔ A ROOT-OWNED FILE UNDER A PREFIX IS ROOT'S TO CHANGE, AND ONLY ROOT'S (decided 2026-09-21).
|
|
41
|
-
* Group- or world-writable, anyone in that class rewrites a file root installed — a daemon's
|
|
42
|
-
* config, a script a LaunchDaemon runs as root — which is root by another name. Setuid or setgid,
|
|
43
|
-
* it runs as root (or its group) for whoever executes it. install(1) would apply either, as root.
|
|
44
|
-
* ★ Root-owned is an omitted owner (the runner installs as root under a prefix) or uid 0. A file
|
|
45
|
-
* handed to another user is that user's to change; the sticky bit changes nothing on a file.
|
|
46
|
-
*/
|
|
47
|
-
export declare const modeProblem: (options: WriteOptions) => string | undefined;
|
|
48
40
|
/**
|
|
49
41
|
* Every check a write under `prefix` meets before anything is staged or run as root: the mode, the
|
|
50
42
|
* path (assertPlainPath) and the read-back (assertReadableBack). ★ Reads only, as the deploying
|
|
51
43
|
* user — so sudoRunner's `checkWrite` runs it at PLAN time too, and a plan still never calls sudo.
|
|
52
44
|
*/
|
|
53
45
|
export declare const assertInstallable: (base: HostRunner, prefix: string, path: string, options: WriteOptions, groups: readonly number[] | undefined) => Promise<void>;
|
|
54
|
-
/**
|
|
55
|
-
* POSIX read permission for one uid: owner class, else group class, else other. `undefined` when
|
|
56
|
-
* only group membership could decide and the groups are unknown.
|
|
57
|
-
* ⚠️ EXACTLY ONE CLASS APPLIES. A group member gets the group bits even when the other bits are
|
|
58
|
-
* wider (`0604` hides a file from its group), so "other can read" is not enough on its own.
|
|
59
|
-
*/
|
|
60
|
-
export declare const canRead: (file: {
|
|
61
|
-
readonly uid: number;
|
|
62
|
-
readonly gid: number;
|
|
63
|
-
readonly mode: number;
|
|
64
|
-
}, uid: number, groups: readonly number[] | undefined) => boolean | undefined;
|
|
65
|
-
/**
|
|
66
|
-
* ⛔ REFUSE A FILE THE DEPLOYING USER COULD NOT READ BACK, before writing it. Both providers read
|
|
67
|
-
* every write back to verify it (host-file-lifecycle.ts, job-lifecycle.ts) and read it again at
|
|
68
|
-
* every plan, as the deploying user; this runner elevates writes, never reads. A root-only
|
|
69
|
-
* `0600` would be installed, then fail the read-back with EACCES and stay on disk with no state,
|
|
70
|
-
* so every later plan would fail too.
|
|
71
|
-
* ★ An omitted owner is root (under a prefix the runner writes as root). An omitted group is the
|
|
72
|
-
* parent directory's, which is the group a new file gets on macOS.
|
|
73
|
-
* ⚠️ Unknown groups never refuse: the read-back after the write stays the final judge.
|
|
74
|
-
*/
|
|
75
|
-
export declare const assertReadableBack: (base: HostRunner, path: string, options: WriteOptions, groups: readonly number[] | undefined) => Promise<void>;
|
|
76
|
-
/**
|
|
77
|
-
* The deploying user's groups, from `id -G`; `undefined` when that fails.
|
|
78
|
-
* ⚠️ NOT process.getgroups(). MEASURED 2026-09-21 on macOS 27.2: getgroups() returned 16 groups
|
|
79
|
-
* where `id -G` returned 18, because macOS caps a process's own list at 16. A group past the
|
|
80
|
-
* 16th would read as "not a member" and refuse a file the user can in fact read.
|
|
81
|
-
*/
|
|
82
|
-
export declare const operatorGroups: (base: HostRunner) => Promise<readonly number[] | undefined>;
|
|
83
46
|
//# sourceMappingURL=sudo-guard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sudo-guard.d.ts","sourceRoot":"","sources":["../../src/launchd/sudo-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EAAY,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"sudo-guard.d.ts","sourceRoot":"","sources":["../../src/launchd/sudo-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EAAY,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAKtE,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAKhG,wEAAwE;AACxE,eAAO,MAAM,WAAW,WAAY,MAAM,QAAQ,MAAM,KAAG,MAAM,EAMhE,CAAC;AAEF,+FAA+F;AAC/F,eAAO,MAAM,SAAS,WAAY,MAAM,KAAG,MAAM,EAGhD,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,gBAAgB,CAAC;AAuB/C;;;GAGG;AACH,eAAO,MAAM,eAAe,SACpB,UAAU,UACR,MAAM,QACR,MAAM,UACJ,MAAM,KACb,OAAO,CAAC,MAAM,GAAG,QAAQ,CA6C3B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,SACtB,UAAU,UACR,MAAM,QACR,MAAM,WACH,YAAY,UACb,SAAS,MAAM,EAAE,GAAG,SAAS,KACpC,OAAO,CAAC,IAAI,CAWd,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The "as root" half of fake-sudo.ts: what each allowlisted program does against the SAME
|
|
3
|
+
* in-memory host `fake-linux-host.ts` builds, once `/usr/bin/sudo` has decided to run it.
|
|
4
|
+
*
|
|
5
|
+
* ⛔ TEST-ONLY, like fake-linux-host.ts: no provider imports it, it is not on the barrel.
|
|
6
|
+
* ★ CHOWN AND MKDIR ARE HANDLED HERE, NOT BY DELEGATING TO `fake.runner.exec()` — the fake's own
|
|
7
|
+
* `chown` refuses when its FIXED `root` flag is false (which it is: the base host models an
|
|
8
|
+
* unprivileged operator), and `mkdir`/`chmod`/`rmdir` do not check ownership at all. Only a
|
|
9
|
+
* handler that writes `fake.dirs` / `fake.modes` / `fake.files` directly proves the runner's
|
|
10
|
+
* OWN allowlist and guard are what gate root, not a permission check the fake happens to have.
|
|
11
|
+
* ★ INSTALL AND MV READ AND WRITE `fake.files` DIRECTLY TOO, because the staged file the operator
|
|
12
|
+
* wrote (via `stageRemote`'s ordinary `writeFileAtomic`) already lives there — there is no
|
|
13
|
+
* separate "staged bytes" side-channel to model, unlike the Mac fake's local temp files.
|
|
14
|
+
*/
|
|
15
|
+
import type { ExecResult } from '../launchd/runner.ts';
|
|
16
|
+
import type { fakeLinuxHost } from './fake-linux-host.ts';
|
|
17
|
+
type Fake = ReturnType<typeof fakeLinuxHost>;
|
|
18
|
+
/** What a test can force `sudo`'s next `mv` / `rm` to answer instead of actually running it. */
|
|
19
|
+
export type RootState = {
|
|
20
|
+
mvFailure?: ExecResult;
|
|
21
|
+
rmFailure?: ExecResult;
|
|
22
|
+
};
|
|
23
|
+
/** Everything `/usr/bin/sudo -n --` may run, dispatched as root against the same fake host. */
|
|
24
|
+
export declare const asRoot: (fake: Fake, argv: readonly string[], state?: RootState) => Promise<ExecResult>;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=fake-sudo-root.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fake-sudo-root.d.ts","sourceRoot":"","sources":["../../src/linux/fake-sudo-root.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,UAAU,EAAY,MAAM,sBAAsB,CAAC;AAEjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,KAAK,IAAI,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AAE7C,gGAAgG;AAChG,MAAM,MAAM,SAAS,GAAG;IAAE,SAAS,CAAC,EAAE,UAAU,CAAC;IAAC,SAAS,CAAC,EAAE,UAAU,CAAA;CAAE,CAAC;AAyH3E,+FAA+F;AAC/F,eAAO,MAAM,MAAM,SACX,IAAI,QACJ,SAAS,MAAM,EAAE,UAChB,SAAS,KACf,OAAO,CAAC,UAAU,CASpB,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* sshSudoRunner over fake-linux-host.ts, for the tests beside it: the operator is uid 1000 and
|
|
3
|
+
* unprivileged, and `/usr/bin/sudo` is a tiny interpreter (fake-sudo-root.ts) that runs the
|
|
4
|
+
* allowlisted programs against the SAME in-memory host, as root. No test anywhere runs ssh or a
|
|
5
|
+
* real sudo.
|
|
6
|
+
*
|
|
7
|
+
* ⛔ TEST-ONLY, like fake-linux-host.ts: no provider imports it, it is not on the barrel.
|
|
8
|
+
* ★ `ls -ldn` AND `mktemp -d` ARE MODELLED HERE, AS THE OPERATOR — sudo-guard.ts's chain read and
|
|
9
|
+
* sudo-stage.ts's staging both run unprivileged, so both need a host that answers them without
|
|
10
|
+
* sudo. `ls` reads through `fake.runner.stat()` (already correct for declared dirs, their
|
|
11
|
+
* implied root-owned ancestors, and files) and formats one `ls -ldn`-shaped line per path;
|
|
12
|
+
* `mktemp -d` registers a fresh 0700 directory the operator owns.
|
|
13
|
+
* ★ SUDO REFUSES A CALL THAT WAS NOT LOGGED FIRST, so every test holds the runner to "logged
|
|
14
|
+
* before it runs", exactly as the Mac fake does.
|
|
15
|
+
*/
|
|
16
|
+
import type { FileStat, HostRunner } from '../launchd/runner.ts';
|
|
17
|
+
import { SUDO_SAYS } from '../launchd/fake-sudo.ts';
|
|
18
|
+
import { type RootState } from './fake-sudo-root.ts';
|
|
19
|
+
export { SUDO_SAYS } from '../launchd/fake-sudo.ts';
|
|
20
|
+
export declare const OPERATOR = 1000;
|
|
21
|
+
export declare const PREFIXES: string[];
|
|
22
|
+
/**
|
|
23
|
+
* `extraDirs` adds more directories to the fake filesystem (a pre-existing tree outside every
|
|
24
|
+
* prefix, say); it never changes the runner's OWN prefixes, which stay `PREFIXES` throughout.
|
|
25
|
+
* `acl` is the set of directory paths a test wants to carry the `+` (POSIX ACL) flag.
|
|
26
|
+
*/
|
|
27
|
+
export declare const fakeSudoHost: (extraDirs?: Record<string, number>, acl?: ReadonlySet<string>) => {
|
|
28
|
+
base: HostRunner;
|
|
29
|
+
fake: {
|
|
30
|
+
calls: string[][];
|
|
31
|
+
dirs: Map<string, number>;
|
|
32
|
+
expectUnit: (path: string) => void;
|
|
33
|
+
files: Map<string, {
|
|
34
|
+
bytes: Uint8Array;
|
|
35
|
+
mode: number;
|
|
36
|
+
uid: number;
|
|
37
|
+
gid: number;
|
|
38
|
+
kind: FileStat['kind'];
|
|
39
|
+
}>;
|
|
40
|
+
modes: Map<string, {
|
|
41
|
+
mode: number;
|
|
42
|
+
uid: number;
|
|
43
|
+
gid: number;
|
|
44
|
+
}>;
|
|
45
|
+
placeUnit: (path: string, text: string, state?: Partial<import("./fake-systemd.ts").UnitState>) => void;
|
|
46
|
+
runner: HostRunner;
|
|
47
|
+
units: Map<string, import("./fake-systemd.ts").UnitState>;
|
|
48
|
+
};
|
|
49
|
+
logs: string[];
|
|
50
|
+
privileged: () => string[][];
|
|
51
|
+
runner: HostRunner;
|
|
52
|
+
state: RootState & {
|
|
53
|
+
sudo: 'ok' | keyof typeof SUDO_SAYS;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=fake-sudo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fake-sudo.d.ts","sourceRoot":"","sources":["../../src/linux/fake-sudo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAc,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,KAAK,SAAS,EAAU,MAAM,qBAAqB,CAAC;AAK7D,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,eAAO,MAAM,QAAQ,OAAO,CAAC;AAC7B,eAAO,MAAM,QAAQ,UAA4C,CAAC;AAyBlE;;;;GAIG;AACH,eAAO,MAAM,YAAY,eACZ,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,QAC5B,WAAW,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;cAUS,IAAI,GAAG,MAAM,OAAO,SAAS;;CAyE/D,CAAC"}
|
package/dist/linux/index.d.ts
CHANGED
|
@@ -19,6 +19,8 @@ export type { RemoteFileAttributes, RemoteFileProps } from './remote-file-form.t
|
|
|
19
19
|
export { RemoteFile, RemoteFileProvider } from './remote-file.ts';
|
|
20
20
|
export type { SshRunnerOptions } from './ssh-runner.ts';
|
|
21
21
|
export { sshRunner } from './ssh-runner.ts';
|
|
22
|
+
export type { SshSudoRunnerOptions } from './sudo-runner.ts';
|
|
23
|
+
export { sshSudoRunner } from './sudo-runner.ts';
|
|
22
24
|
export type { ExecResult, FileStat, HostRunner, HostUser, WriteOptions, } from '../launchd/runner.ts';
|
|
23
25
|
export { HostRunnerService, canActAsRoot, hostRunnerLayer } from '../launchd/runner.ts';
|
|
24
26
|
export type { SystemdUnitAttributes, SystemdUnitProps, UnitSection } from './unit-form.ts';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/linux/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,YAAY,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC5F,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,YAAY,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAClE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EACV,UAAU,EACV,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,YAAY,GACb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACxF,YAAY,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC3F,OAAO,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/linux/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,YAAY,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC5F,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,YAAY,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAClE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,YAAY,EACV,UAAU,EACV,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,YAAY,GACb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACxF,YAAY,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC3F,OAAO,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC"}
|