@ship.zone/runner 5.2.0 → 5.4.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/ts/runner.ts CHANGED
@@ -903,6 +903,12 @@ export class ShipRunner {
903
903
  const transferSignal = timedOut ? guard.controller.signal : executionSignal;
904
904
 
905
905
  if (!cleanupFailure && !guard.controller.signal.aborted) {
906
+ if (systemFailure !== undefined && executionAbort.signal.reason !== 'log_delivery_failed') {
907
+ const failureMsg = systemFailure instanceof Error ? systemFailure.message : String(systemFailure);
908
+ if (failureMsg) {
909
+ await logs.writeRunnerMessage(`[runner] ${failureMsg}\n`).catch(() => {});
910
+ }
911
+ }
906
912
  try {
907
913
  await logs.flush();
908
914
  } catch (error) {
@@ -39,6 +39,7 @@ export interface IGuestStepRequest {
39
39
  uid: number;
40
40
  gid: number;
41
41
  rootMode?: boolean;
42
+ egressEnabled?: boolean;
42
43
  timeoutMs: number;
43
44
  memoryBytes: number;
44
45
  cpus: number;
@@ -66,6 +67,7 @@ export interface IGuestImageBuildRequest {
66
67
  importCacheDir?: string;
67
68
  exportCacheDir?: string;
68
69
  buildctlPath?: string;
70
+ egressProxyUrl?: string;
69
71
  }
70
72
 
71
73
  export interface IGuestImageBuildResult {
@@ -259,9 +261,13 @@ export class GuestVsockClient {
259
261
  gid: number;
260
262
  mode?: 'oci' | 'vm' | 'oci-image';
261
263
  npmrcContent?: string;
262
- }): Promise<void> {
264
+ enableEgress?: boolean;
265
+ }): Promise<{ egressProxyPort?: number }> {
263
266
  await this.sendJson({ op: 'prepare_workspace', ...options });
264
- await this.readJsonResponse<{ ok: true }>();
267
+ const res = await this.readJsonResponse<{ ok: true; egressProxyPort?: number }>();
268
+ return {
269
+ ...(typeof res.egressProxyPort === 'number' ? { egressProxyPort: res.egressProxyPort } : {}),
270
+ };
265
271
  }
266
272
 
267
273
  async importTar(