@superhq/shuru 0.4.1 → 0.4.2
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/package.json +1 -1
- package/src/sandbox.ts +6 -0
- package/src/types.ts +2 -0
package/package.json
CHANGED
package/src/sandbox.ts
CHANGED
|
@@ -219,6 +219,12 @@ export function buildArgs(bin: string, opts: StartOptions): string[] {
|
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
+
if (opts.exposeHost) {
|
|
223
|
+
for (const e of opts.exposeHost) {
|
|
224
|
+
args.push("--expose-host", e);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
222
228
|
if (opts.mounts) {
|
|
223
229
|
for (const [host, guest] of Object.entries(opts.mounts)) {
|
|
224
230
|
args.push("--mount", `${host}:${guest}`);
|
package/src/types.ts
CHANGED
|
@@ -19,6 +19,8 @@ export interface StartOptions {
|
|
|
19
19
|
/** Allow :rw mounts to write to host filesystem. Default: false. */
|
|
20
20
|
allowHostWrites?: boolean;
|
|
21
21
|
ports?: string[];
|
|
22
|
+
/** Host ports to expose to the guest via host.shuru.internal. Format: "HOST:GUEST" or "PORT". */
|
|
23
|
+
exposeHost?: string[];
|
|
22
24
|
/** Directory mounts. Key is host path, value is guest path or guest path with mode suffix (e.g. "/workspace" or "/workspace:rw"). */
|
|
23
25
|
mounts?: Record<string, string>;
|
|
24
26
|
secrets?: Record<string, SecretConfig>;
|