From 35a343eebe769a7f2499dccf94e52ac66ea5fb47 Mon Sep 17 00:00:00 2001 From: Vladimir Vagaytsev <vladimir.vagaitsev@gmail.com> Date: Tue, 2 May 2023 10:44:17 +0200 Subject: [PATCH] refactor: add optional `timeout` field in `BaseActionConfig` --- core/src/actions/build.ts | 1 - core/src/actions/run.ts | 4 +--- core/src/actions/test.ts | 4 +--- core/src/actions/types.ts | 2 ++ 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/core/src/actions/build.ts b/core/src/actions/build.ts index d9cc67ed41b..fa3cfd8a9db 100644 --- a/core/src/actions/build.ts +++ b/core/src/actions/build.ts @@ -52,7 +52,6 @@ export interface BuildActionConfig<T extends string = string, S extends object = allowPublish?: boolean buildAtSource?: boolean copyFrom?: BuildCopyFrom[] - timeout?: number } export const copyFromSchema = createSchema({ diff --git a/core/src/actions/run.ts b/core/src/actions/run.ts index 7b98c747093..fbffdd9ea65 100644 --- a/core/src/actions/run.ts +++ b/core/src/actions/run.ts @@ -19,9 +19,7 @@ import { Action, BaseActionConfig } from "./types" import { DEFAULT_RUN_TIMEOUT_SEC } from "../constants" export interface RunActionConfig<N extends string = any, S extends object = any> - extends BaseRuntimeActionConfig<"Run", N, S> { - timeout?: number -} + extends BaseRuntimeActionConfig<"Run", N, S> {} export const runActionConfigSchema = memoize(() => baseRuntimeActionConfigSchema().keys({ diff --git a/core/src/actions/test.ts b/core/src/actions/test.ts index 7d6abcdfd9a..4fed8672b78 100644 --- a/core/src/actions/test.ts +++ b/core/src/actions/test.ts @@ -19,9 +19,7 @@ import { Action, BaseActionConfig } from "./types" import { DEFAULT_TEST_TIMEOUT_SEC } from "../constants" export interface TestActionConfig<N extends string = any, S extends object = any> - extends BaseRuntimeActionConfig<"Test", N, S> { - timeout?: number -} + extends BaseRuntimeActionConfig<"Test", N, S> {} export const testActionConfigSchema = memoize(() => baseRuntimeActionConfigSchema().keys({ diff --git a/core/src/actions/types.ts b/core/src/actions/types.ts index 7b5a5cc9374..3decfa61e09 100644 --- a/core/src/actions/types.ts +++ b/core/src/actions/types.ts @@ -79,6 +79,8 @@ export interface BaseActionConfig<K extends ActionKind = ActionKind, T = string, include?: string[] exclude?: string[] + timeout?: number + // Variables // -> Templating with ActionConfigContext allowed variables?: DeepPrimitiveMap