mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
remove file from input spec (#2782)
This commit is contained in:
@@ -689,47 +689,47 @@ export class Value<Type, Store> {
|
||||
}
|
||||
}, spec.validator)
|
||||
}
|
||||
static file<Store>(a: {
|
||||
name: string
|
||||
description?: string | null
|
||||
extensions: string[]
|
||||
required: boolean
|
||||
}) {
|
||||
const buildValue = {
|
||||
type: "file" as const,
|
||||
description: null,
|
||||
warning: null,
|
||||
...a,
|
||||
}
|
||||
return new Value<FilePath, Store>(
|
||||
() => ({
|
||||
...buildValue,
|
||||
}),
|
||||
asRequiredParser(object({ filePath: string }), a),
|
||||
)
|
||||
}
|
||||
static dynamicFile<Required extends boolean, Store>(
|
||||
a: LazyBuild<
|
||||
Store,
|
||||
{
|
||||
name: string
|
||||
description?: string | null
|
||||
warning?: string | null
|
||||
extensions: string[]
|
||||
required: Required
|
||||
}
|
||||
>,
|
||||
) {
|
||||
return new Value<string | null | undefined, Store>(
|
||||
async (options) => ({
|
||||
type: "file" as const,
|
||||
description: null,
|
||||
warning: null,
|
||||
...(await a(options)),
|
||||
}),
|
||||
string.optional(),
|
||||
)
|
||||
}
|
||||
// static file<Store>(a: {
|
||||
// name: string
|
||||
// description?: string | null
|
||||
// extensions: string[]
|
||||
// required: boolean
|
||||
// }) {
|
||||
// const buildValue = {
|
||||
// type: "file" as const,
|
||||
// description: null,
|
||||
// warning: null,
|
||||
// ...a,
|
||||
// }
|
||||
// return new Value<FilePath, Store>(
|
||||
// () => ({
|
||||
// ...buildValue,
|
||||
// }),
|
||||
// asRequiredParser(object({ filePath: string }), a),
|
||||
// )
|
||||
// }
|
||||
// static dynamicFile<Required extends boolean, Store>(
|
||||
// a: LazyBuild<
|
||||
// Store,
|
||||
// {
|
||||
// name: string
|
||||
// description?: string | null
|
||||
// warning?: string | null
|
||||
// extensions: string[]
|
||||
// required: Required
|
||||
// }
|
||||
// >,
|
||||
// ) {
|
||||
// return new Value<string | null | undefined, Store>(
|
||||
// async (options) => ({
|
||||
// type: "file" as const,
|
||||
// description: null,
|
||||
// warning: null,
|
||||
// ...(await a(options)),
|
||||
// }),
|
||||
// string.optional(),
|
||||
// )
|
||||
// }
|
||||
static union<Required extends RequiredDefault<string>, Type, Store>(
|
||||
a: {
|
||||
name: string
|
||||
|
||||
@@ -8,12 +8,10 @@ import {
|
||||
ClearServiceInterfacesParams,
|
||||
GetActionInputParams,
|
||||
GetStatusParams,
|
||||
GetStoreParams,
|
||||
RequestActionParams,
|
||||
RunActionParams,
|
||||
SetDataVersionParams,
|
||||
SetMainStatus,
|
||||
SetStoreParams,
|
||||
} from ".././osBindings"
|
||||
import { CreateSubcontainerFsParams } from ".././osBindings"
|
||||
import { DestroySubcontainerFsParams } from ".././osBindings"
|
||||
|
||||
Reference in New Issue
Block a user