Skip to content
4 changes: 2 additions & 2 deletions packages/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ References:

| Constant | Type |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `EmulatorConfigSchema` | `ZodUnion<readonly [ZodObject<{ runner: ZodOptional<ZodObject<{ type: ZodEnum<{ docker: "docker"; podman: "podman"; }>; image: ZodOptional<ZodString>; name: ZodOptional<ZodString>; volume: ZodOptional<...>; target: ZodOptional<...>; platform: ZodOptional<...>; extraHosts: ZodOptional<...>; }, $strict>>; network: ZodO...` |
| `EmulatorConfigSchema` | `ZodUnion<readonly [ZodObject<{ runner: ZodOptional<ZodObject<{ type: ZodEnum<{ docker: "docker"; podman: "podman"; container: "container"; }>; image: ZodOptional<ZodString>; name: ZodOptional<ZodString>; volume: ZodOptional<...>; target: ZodOptional<...>; platform: ZodOptional<...>; extraHosts: ZodOptional<...>; }, ...` |

References:

Expand Down Expand Up @@ -518,7 +518,7 @@ Shared options for all runner variants.

| Property | Type | Description |
| ------------ | --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `type` | `"docker" or "podman"` | The containerization tool to run the emulator. |
| `type` | `"docker" or "podman" or "container"` | The containerization tool to run the emulator. |
| `image` | `string or undefined` | Image reference. default: depends on emulator type, e.g. "junobuild/skylab:latest" |
| `name` | `string or undefined` | Optional container name to use for the emulator. Useful for reusing or managing a specific container. |
| `volume` | `string or undefined` | Persistent volume to store internal state. default: "juno" |
Expand Down
4 changes: 2 additions & 2 deletions packages/config/src/satellite/configs/emulator.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export type Hostname = string;
* @see EmulatorRunner
*/
const EmulatorRunnerSchema = z.strictObject({
type: z.enum(['docker', 'podman']),
type: z.enum(['docker', 'podman', 'container']),
image: z.string().optional(),
name: z.string().optional(),
volume: z.string().optional(),
Expand All @@ -145,7 +145,7 @@ export interface EmulatorRunner {
/**
* The containerization tool to run the emulator.
*/
type: 'docker' | 'podman';
type: 'docker' | 'podman' | 'container';

/**
* Image reference.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,16 @@ describe('emulator.config', () => {
expect(result.success).toBe(true);
});

it('accepts runner with type container', () => {
const result = EmulatorConfigSchema.safeParse({
runner: {
type: 'container'
},
console: {}
});
expect(result.success).toBe(true);
});

it('rejects runner with invalid type value', () => {
const result = EmulatorConfigSchema.safeParse({
runner: {
Expand Down
Loading