From c088ab7a79665deef9f06f1d25e833edab592071 Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Mon, 11 Nov 2024 12:17:44 -0700 Subject: [PATCH] remove file from input spec (#2782) --- sdk/base/lib/actions/input/builder/value.ts | 82 +++++++++---------- .../lib/test/startosTypeValidation.test.ts | 2 - 2 files changed, 41 insertions(+), 43 deletions(-) diff --git a/sdk/base/lib/actions/input/builder/value.ts b/sdk/base/lib/actions/input/builder/value.ts index ad30f1376..78318f868 100644 --- a/sdk/base/lib/actions/input/builder/value.ts +++ b/sdk/base/lib/actions/input/builder/value.ts @@ -689,47 +689,47 @@ export class Value { } }, spec.validator) } - static file(a: { - name: string - description?: string | null - extensions: string[] - required: boolean - }) { - const buildValue = { - type: "file" as const, - description: null, - warning: null, - ...a, - } - return new Value( - () => ({ - ...buildValue, - }), - asRequiredParser(object({ filePath: string }), a), - ) - } - static dynamicFile( - a: LazyBuild< - Store, - { - name: string - description?: string | null - warning?: string | null - extensions: string[] - required: Required - } - >, - ) { - return new Value( - async (options) => ({ - type: "file" as const, - description: null, - warning: null, - ...(await a(options)), - }), - string.optional(), - ) - } + // static file(a: { + // name: string + // description?: string | null + // extensions: string[] + // required: boolean + // }) { + // const buildValue = { + // type: "file" as const, + // description: null, + // warning: null, + // ...a, + // } + // return new Value( + // () => ({ + // ...buildValue, + // }), + // asRequiredParser(object({ filePath: string }), a), + // ) + // } + // static dynamicFile( + // a: LazyBuild< + // Store, + // { + // name: string + // description?: string | null + // warning?: string | null + // extensions: string[] + // required: Required + // } + // >, + // ) { + // return new Value( + // async (options) => ({ + // type: "file" as const, + // description: null, + // warning: null, + // ...(await a(options)), + // }), + // string.optional(), + // ) + // } static union, Type, Store>( a: { name: string diff --git a/sdk/base/lib/test/startosTypeValidation.test.ts b/sdk/base/lib/test/startosTypeValidation.test.ts index 596da3b49..509da0894 100644 --- a/sdk/base/lib/test/startosTypeValidation.test.ts +++ b/sdk/base/lib/test/startosTypeValidation.test.ts @@ -8,12 +8,10 @@ import { ClearServiceInterfacesParams, GetActionInputParams, GetStatusParams, - GetStoreParams, RequestActionParams, RunActionParams, SetDataVersionParams, SetMainStatus, - SetStoreParams, } from ".././osBindings" import { CreateSubcontainerFsParams } from ".././osBindings" import { DestroySubcontainerFsParams } from ".././osBindings"