diff --git a/package-lock.json b/package-lock.json index debfb557..78c00640 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "@junobuild/admin": "^2.3.0", "@junobuild/cdn": "^1.3.2", "@junobuild/cli-tools": "^0.8.0", - "@junobuild/config": "^2.4.3", + "@junobuild/config": "^2.5.0", "@junobuild/config-loader": "^0.4.5", "@junobuild/core": "^2.2.0", "@junobuild/did-tools": "^0.3.3", @@ -1506,9 +1506,9 @@ } }, "node_modules/@junobuild/config": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/@junobuild/config/-/config-2.4.3.tgz", - "integrity": "sha512-tR26bxTycF4wCJx96wGPsdRrEu2Z0FNwvgC2gjlAuQEDweg5yvqCCenHfyswSIjcBFHOOTKSDLsUy3pHDlcMRw==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@junobuild/config/-/config-2.5.0.tgz", + "integrity": "sha512-R3l3Vy74Il+GQRwOuVib/vL8j83zBMbdEXDMgMgFIuSmn0O1UHr1P4xRyQs6s/i6pup2HTq/0AjemLscywS5TA==", "license": "MIT", "peerDependencies": { "@dfinity/zod-schemas": "^2", @@ -7388,9 +7388,9 @@ } }, "@junobuild/config": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/@junobuild/config/-/config-2.4.3.tgz", - "integrity": "sha512-tR26bxTycF4wCJx96wGPsdRrEu2Z0FNwvgC2gjlAuQEDweg5yvqCCenHfyswSIjcBFHOOTKSDLsUy3pHDlcMRw==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@junobuild/config/-/config-2.5.0.tgz", + "integrity": "sha512-R3l3Vy74Il+GQRwOuVib/vL8j83zBMbdEXDMgMgFIuSmn0O1UHr1P4xRyQs6s/i6pup2HTq/0AjemLscywS5TA==", "requires": {} }, "@junobuild/config-loader": { diff --git a/package.json b/package.json index 0711e315..746ed5ab 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "@junobuild/admin": "^2.3.0", "@junobuild/cdn": "^1.3.2", "@junobuild/cli-tools": "^0.8.0", - "@junobuild/config": "^2.4.3", + "@junobuild/config": "^2.5.0", "@junobuild/config-loader": "^0.4.5", "@junobuild/core": "^2.2.0", "@junobuild/did-tools": "^0.3.3", diff --git a/src/services/emulator/_runner.services.ts b/src/services/emulator/_runner.services.ts index 1f56ab9d..81948f2a 100644 --- a/src/services/emulator/_runner.services.ts +++ b/src/services/emulator/_runner.services.ts @@ -175,11 +175,13 @@ const startEmulator = async ({config: extendedConfig}: {config: CliEmulatorConfi return; } - const ports: Required = { + const ports: Required> = { server: config[emulatorType]?.ports?.server ?? EMULATOR_SKYLAB.ports.server, admin: config[emulatorType]?.ports?.admin ?? EMULATOR_SKYLAB.ports.admin }; + const portTimeoutInSeconds = config[emulatorType]?.ports?.timeoutInSeconds; + // Support Ctrl+C: // -i: Keeps STDIN open for the container. Equivalent to `--interactive`. // -t: Allocates a pseudo-TTY, enabling terminal-like behavior. Equivalent to `--tty`. @@ -230,6 +232,9 @@ const startEmulator = async ({config: extendedConfig}: {config: CliEmulatorConfi `${config.skylab.ports?.console ?? EMULATOR_SKYLAB.ports.console}:${EMULATOR_PORT_CONSOLE}` ] : []), + ...(nonNullish(portTimeoutInSeconds) + ? ['-e', `PORT_TIMEOUT_SECONDS=${portTimeoutInSeconds}`] + : []), '-v', `${volume}:/juno/.juno`, ...(nonNullish(configFile) && nonNullish(configFilePath)