mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
style(sdk): apply prettier with single quotes
Run prettier across sdk/base and sdk/package to apply the standardized quote style (single quotes matching web).
This commit is contained in:
@@ -16,14 +16,14 @@ import {
|
|||||||
MountParams,
|
MountParams,
|
||||||
StatusInfo,
|
StatusInfo,
|
||||||
Manifest,
|
Manifest,
|
||||||
} from "./osBindings"
|
} from './osBindings'
|
||||||
import {
|
import {
|
||||||
PackageId,
|
PackageId,
|
||||||
Dependencies,
|
Dependencies,
|
||||||
ServiceInterfaceId,
|
ServiceInterfaceId,
|
||||||
SmtpValue,
|
SmtpValue,
|
||||||
ActionResult,
|
ActionResult,
|
||||||
} from "./types"
|
} from './types'
|
||||||
|
|
||||||
/** Used to reach out from the pure js runtime */
|
/** Used to reach out from the pure js runtime */
|
||||||
|
|
||||||
@@ -155,13 +155,13 @@ export type Effects = {
|
|||||||
/** Returns a PEM encoded fullchain for the hostnames specified */
|
/** Returns a PEM encoded fullchain for the hostnames specified */
|
||||||
getSslCertificate: (options: {
|
getSslCertificate: (options: {
|
||||||
hostnames: string[]
|
hostnames: string[]
|
||||||
algorithm?: "ecdsa" | "ed25519"
|
algorithm?: 'ecdsa' | 'ed25519'
|
||||||
callback?: () => void
|
callback?: () => void
|
||||||
}) => Promise<[string, string, string]>
|
}) => Promise<[string, string, string]>
|
||||||
/** Returns a PEM encoded private key corresponding to the certificate for the hostnames specified */
|
/** Returns a PEM encoded private key corresponding to the certificate for the hostnames specified */
|
||||||
getSslKey: (options: {
|
getSslKey: (options: {
|
||||||
hostnames: string[]
|
hostnames: string[]
|
||||||
algorithm?: "ecdsa" | "ed25519"
|
algorithm?: 'ecdsa' | 'ed25519'
|
||||||
}) => Promise<string>
|
}) => Promise<string>
|
||||||
|
|
||||||
/** sets the version that this service's data has been migrated to */
|
/** sets the version that this service's data has been migrated to */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import * as T from "../types"
|
import * as T from '../types'
|
||||||
import * as IST from "../actions/input/inputSpecTypes"
|
import * as IST from '../actions/input/inputSpecTypes'
|
||||||
import { Action, ActionInfo } from "./setupActions"
|
import { Action, ActionInfo } from './setupActions'
|
||||||
import { ExtractInputSpecType } from "./input/builder/inputSpec"
|
import { ExtractInputSpecType } from './input/builder/inputSpec'
|
||||||
|
|
||||||
export type RunActionInput<Input> =
|
export type RunActionInput<Input> =
|
||||||
| Input
|
| Input
|
||||||
@@ -53,17 +53,17 @@ type TaskBase = {
|
|||||||
replayId?: string
|
replayId?: string
|
||||||
}
|
}
|
||||||
type TaskInput<T extends ActionInfo<T.ActionId, any>> = {
|
type TaskInput<T extends ActionInfo<T.ActionId, any>> = {
|
||||||
kind: "partial"
|
kind: 'partial'
|
||||||
value: T.DeepPartial<GetActionInputType<T>>
|
value: T.DeepPartial<GetActionInputType<T>>
|
||||||
}
|
}
|
||||||
export type TaskOptions<T extends ActionInfo<T.ActionId, any>> = TaskBase &
|
export type TaskOptions<T extends ActionInfo<T.ActionId, any>> = TaskBase &
|
||||||
(
|
(
|
||||||
| {
|
| {
|
||||||
when?: Exclude<T.TaskTrigger, { condition: "input-not-matches" }>
|
when?: Exclude<T.TaskTrigger, { condition: 'input-not-matches' }>
|
||||||
input?: TaskInput<T>
|
input?: TaskInput<T>
|
||||||
}
|
}
|
||||||
| {
|
| {
|
||||||
when: T.TaskTrigger & { condition: "input-not-matches" }
|
when: T.TaskTrigger & { condition: 'input-not-matches' }
|
||||||
input: TaskInput<T>
|
input: TaskInput<T>
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { InputSpec } from "./inputSpec"
|
import { InputSpec } from './inputSpec'
|
||||||
import { List } from "./list"
|
import { List } from './list'
|
||||||
import { Value } from "./value"
|
import { Value } from './value'
|
||||||
import { Variants } from "./variants"
|
import { Variants } from './variants'
|
||||||
|
|
||||||
export { InputSpec as InputSpec, List, Value, Variants }
|
export { InputSpec as InputSpec, List, Value, Variants }
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { ValueSpec } from "../inputSpecTypes"
|
import { ValueSpec } from '../inputSpecTypes'
|
||||||
import { Value } from "./value"
|
import { Value } from './value'
|
||||||
import { _ } from "../../../util"
|
import { _ } from '../../../util'
|
||||||
import { Effects } from "../../../Effects"
|
import { Effects } from '../../../Effects'
|
||||||
import { Parser, object } from "ts-matches"
|
import { Parser, object } from 'ts-matches'
|
||||||
import { DeepPartial } from "../../../types"
|
import { DeepPartial } from '../../../types'
|
||||||
|
|
||||||
export type LazyBuildOptions = {
|
export type LazyBuildOptions = {
|
||||||
effects: Effects
|
effects: Effects
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { InputSpec, LazyBuild } from "./inputSpec"
|
import { InputSpec, LazyBuild } from './inputSpec'
|
||||||
import {
|
import {
|
||||||
ListValueSpecText,
|
ListValueSpecText,
|
||||||
Pattern,
|
Pattern,
|
||||||
@@ -6,8 +6,8 @@ import {
|
|||||||
UniqueBy,
|
UniqueBy,
|
||||||
ValueSpecList,
|
ValueSpecList,
|
||||||
ValueSpecListOf,
|
ValueSpecListOf,
|
||||||
} from "../inputSpecTypes"
|
} from '../inputSpecTypes'
|
||||||
import { Parser, arrayOf, string } from "ts-matches"
|
import { Parser, arrayOf, string } from 'ts-matches'
|
||||||
|
|
||||||
export class List<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
export class List<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
||||||
private constructor(
|
private constructor(
|
||||||
@@ -55,7 +55,7 @@ export class List<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
* @description Informs the browser how to behave and which keyboard to display on mobile
|
* @description Informs the browser how to behave and which keyboard to display on mobile
|
||||||
* @default "text"
|
* @default "text"
|
||||||
*/
|
*/
|
||||||
inputmode?: ListValueSpecText["inputmode"]
|
inputmode?: ListValueSpecText['inputmode']
|
||||||
/**
|
/**
|
||||||
* @description Displays a button that will generate a random string according to the provided charset and len attributes.
|
* @description Displays a button that will generate a random string according to the provided charset and len attributes.
|
||||||
*/
|
*/
|
||||||
@@ -65,21 +65,21 @@ export class List<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
const validator = arrayOf(string)
|
const validator = arrayOf(string)
|
||||||
return new List<string[]>(() => {
|
return new List<string[]>(() => {
|
||||||
const spec = {
|
const spec = {
|
||||||
type: "text" as const,
|
type: 'text' as const,
|
||||||
placeholder: null,
|
placeholder: null,
|
||||||
minLength: null,
|
minLength: null,
|
||||||
maxLength: null,
|
maxLength: null,
|
||||||
masked: false,
|
masked: false,
|
||||||
inputmode: "text" as const,
|
inputmode: 'text' as const,
|
||||||
generate: null,
|
generate: null,
|
||||||
patterns: aSpec.patterns || [],
|
patterns: aSpec.patterns || [],
|
||||||
...aSpec,
|
...aSpec,
|
||||||
}
|
}
|
||||||
const built: ValueSpecListOf<"text"> = {
|
const built: ValueSpecListOf<'text'> = {
|
||||||
description: null,
|
description: null,
|
||||||
warning: null,
|
warning: null,
|
||||||
default: [],
|
default: [],
|
||||||
type: "list" as const,
|
type: 'list' as const,
|
||||||
minLength: null,
|
minLength: null,
|
||||||
maxLength: null,
|
maxLength: null,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
@@ -106,7 +106,7 @@ export class List<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
minLength?: number | null
|
minLength?: number | null
|
||||||
maxLength?: number | null
|
maxLength?: number | null
|
||||||
patterns?: Pattern[]
|
patterns?: Pattern[]
|
||||||
inputmode?: ListValueSpecText["inputmode"]
|
inputmode?: ListValueSpecText['inputmode']
|
||||||
}
|
}
|
||||||
}>,
|
}>,
|
||||||
) {
|
) {
|
||||||
@@ -114,21 +114,21 @@ export class List<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
return new List<string[]>(async (options) => {
|
return new List<string[]>(async (options) => {
|
||||||
const { spec: aSpec, ...a } = await getA(options)
|
const { spec: aSpec, ...a } = await getA(options)
|
||||||
const spec = {
|
const spec = {
|
||||||
type: "text" as const,
|
type: 'text' as const,
|
||||||
placeholder: null,
|
placeholder: null,
|
||||||
minLength: null,
|
minLength: null,
|
||||||
maxLength: null,
|
maxLength: null,
|
||||||
masked: false,
|
masked: false,
|
||||||
inputmode: "text" as const,
|
inputmode: 'text' as const,
|
||||||
generate: null,
|
generate: null,
|
||||||
patterns: aSpec.patterns || [],
|
patterns: aSpec.patterns || [],
|
||||||
...aSpec,
|
...aSpec,
|
||||||
}
|
}
|
||||||
const built: ValueSpecListOf<"text"> = {
|
const built: ValueSpecListOf<'text'> = {
|
||||||
description: null,
|
description: null,
|
||||||
warning: null,
|
warning: null,
|
||||||
default: [],
|
default: [],
|
||||||
type: "list" as const,
|
type: 'list' as const,
|
||||||
minLength: null,
|
minLength: null,
|
||||||
maxLength: null,
|
maxLength: null,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
@@ -162,7 +162,7 @@ export class List<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
const { spec: previousSpecSpec, ...restSpec } = aSpec
|
const { spec: previousSpecSpec, ...restSpec } = aSpec
|
||||||
const built = await previousSpecSpec.build(options)
|
const built = await previousSpecSpec.build(options)
|
||||||
const spec = {
|
const spec = {
|
||||||
type: "object" as const,
|
type: 'object' as const,
|
||||||
displayAs: null,
|
displayAs: null,
|
||||||
uniqueBy: null,
|
uniqueBy: null,
|
||||||
...restSpec,
|
...restSpec,
|
||||||
@@ -179,7 +179,7 @@ export class List<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
warning: null,
|
warning: null,
|
||||||
minLength: null,
|
minLength: null,
|
||||||
maxLength: null,
|
maxLength: null,
|
||||||
type: "list" as const,
|
type: 'list' as const,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
...value,
|
...value,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { InputSpec, LazyBuild } from "./inputSpec"
|
import { InputSpec, LazyBuild } from './inputSpec'
|
||||||
import { List } from "./list"
|
import { List } from './list'
|
||||||
import { UnionRes, UnionResStaticValidatedAs, Variants } from "./variants"
|
import { UnionRes, UnionResStaticValidatedAs, Variants } from './variants'
|
||||||
import {
|
import {
|
||||||
Pattern,
|
Pattern,
|
||||||
RandomString,
|
RandomString,
|
||||||
@@ -9,9 +9,9 @@ import {
|
|||||||
ValueSpecHidden,
|
ValueSpecHidden,
|
||||||
ValueSpecText,
|
ValueSpecText,
|
||||||
ValueSpecTextarea,
|
ValueSpecTextarea,
|
||||||
} from "../inputSpecTypes"
|
} from '../inputSpecTypes'
|
||||||
import { DefaultString } from "../inputSpecTypes"
|
import { DefaultString } from '../inputSpecTypes'
|
||||||
import { _, once } from "../../../util"
|
import { _, once } from '../../../util'
|
||||||
import {
|
import {
|
||||||
Parser,
|
Parser,
|
||||||
any,
|
any,
|
||||||
@@ -23,8 +23,8 @@ import {
|
|||||||
number,
|
number,
|
||||||
object,
|
object,
|
||||||
string,
|
string,
|
||||||
} from "ts-matches"
|
} from 'ts-matches'
|
||||||
import { DeepPartial } from "../../../types"
|
import { DeepPartial } from '../../../types'
|
||||||
|
|
||||||
export const fileInfoParser = object({
|
export const fileInfoParser = object({
|
||||||
path: string,
|
path: string,
|
||||||
@@ -42,7 +42,7 @@ const testForAsRequiredParser = once(
|
|||||||
function asRequiredParser<Type, Input extends { required: boolean }>(
|
function asRequiredParser<Type, Input extends { required: boolean }>(
|
||||||
parser: Parser<unknown, Type>,
|
parser: Parser<unknown, Type>,
|
||||||
input: Input,
|
input: Input,
|
||||||
): Parser<unknown, AsRequired<Type, Input["required"]>> {
|
): Parser<unknown, AsRequired<Type, Input['required']>> {
|
||||||
if (testForAsRequiredParser()(input)) return parser as any
|
if (testForAsRequiredParser()(input)) return parser as any
|
||||||
return parser.nullable() as any
|
return parser.nullable() as any
|
||||||
}
|
}
|
||||||
@@ -92,7 +92,7 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
spec: {
|
spec: {
|
||||||
description: null,
|
description: null,
|
||||||
warning: null,
|
warning: null,
|
||||||
type: "toggle" as const,
|
type: 'toggle' as const,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
immutable: a.immutable ?? false,
|
immutable: a.immutable ?? false,
|
||||||
...a,
|
...a,
|
||||||
@@ -117,7 +117,7 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
spec: {
|
spec: {
|
||||||
description: null,
|
description: null,
|
||||||
warning: null,
|
warning: null,
|
||||||
type: "toggle" as const,
|
type: 'toggle' as const,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
immutable: false,
|
immutable: false,
|
||||||
...(await a(options)),
|
...(await a(options)),
|
||||||
@@ -191,7 +191,7 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
* @description Informs the browser how to behave and which keyboard to display on mobile
|
* @description Informs the browser how to behave and which keyboard to display on mobile
|
||||||
* @default "text"
|
* @default "text"
|
||||||
*/
|
*/
|
||||||
inputmode?: ValueSpecText["inputmode"]
|
inputmode?: ValueSpecText['inputmode']
|
||||||
/**
|
/**
|
||||||
* @description Once set, the value can never be changed.
|
* @description Once set, the value can never be changed.
|
||||||
* @default false
|
* @default false
|
||||||
@@ -206,7 +206,7 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
return new Value<AsRequired<string, Required>>(
|
return new Value<AsRequired<string, Required>>(
|
||||||
async () => ({
|
async () => ({
|
||||||
spec: {
|
spec: {
|
||||||
type: "text" as const,
|
type: 'text' as const,
|
||||||
description: null,
|
description: null,
|
||||||
warning: null,
|
warning: null,
|
||||||
masked: false,
|
masked: false,
|
||||||
@@ -214,7 +214,7 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
minLength: null,
|
minLength: null,
|
||||||
maxLength: null,
|
maxLength: null,
|
||||||
patterns: [],
|
patterns: [],
|
||||||
inputmode: "text",
|
inputmode: 'text',
|
||||||
disabled: false,
|
disabled: false,
|
||||||
immutable: a.immutable ?? false,
|
immutable: a.immutable ?? false,
|
||||||
generate: a.generate ?? null,
|
generate: a.generate ?? null,
|
||||||
@@ -237,7 +237,7 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
minLength?: number | null
|
minLength?: number | null
|
||||||
maxLength?: number | null
|
maxLength?: number | null
|
||||||
patterns?: Pattern[]
|
patterns?: Pattern[]
|
||||||
inputmode?: ValueSpecText["inputmode"]
|
inputmode?: ValueSpecText['inputmode']
|
||||||
disabled?: string | false
|
disabled?: string | false
|
||||||
generate?: null | RandomString
|
generate?: null | RandomString
|
||||||
}>,
|
}>,
|
||||||
@@ -247,7 +247,7 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
const a = await getA(options)
|
const a = await getA(options)
|
||||||
return {
|
return {
|
||||||
spec: {
|
spec: {
|
||||||
type: "text" as const,
|
type: 'text' as const,
|
||||||
description: null,
|
description: null,
|
||||||
warning: null,
|
warning: null,
|
||||||
masked: false,
|
masked: false,
|
||||||
@@ -255,7 +255,7 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
minLength: null,
|
minLength: null,
|
||||||
maxLength: null,
|
maxLength: null,
|
||||||
patterns: [],
|
patterns: [],
|
||||||
inputmode: "text",
|
inputmode: 'text',
|
||||||
disabled: false,
|
disabled: false,
|
||||||
immutable: false,
|
immutable: false,
|
||||||
generate: a.generate ?? null,
|
generate: a.generate ?? null,
|
||||||
@@ -334,7 +334,7 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
minRows: 3,
|
minRows: 3,
|
||||||
maxRows: 6,
|
maxRows: 6,
|
||||||
placeholder: null,
|
placeholder: null,
|
||||||
type: "textarea" as const,
|
type: 'textarea' as const,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
immutable: a.immutable ?? false,
|
immutable: a.immutable ?? false,
|
||||||
...a,
|
...a,
|
||||||
@@ -371,7 +371,7 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
minRows: 3,
|
minRows: 3,
|
||||||
maxRows: 6,
|
maxRows: 6,
|
||||||
placeholder: null,
|
placeholder: null,
|
||||||
type: "textarea" as const,
|
type: 'textarea' as const,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
immutable: false,
|
immutable: false,
|
||||||
...a,
|
...a,
|
||||||
@@ -444,7 +444,7 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
return new Value<AsRequired<number, Required>>(
|
return new Value<AsRequired<number, Required>>(
|
||||||
() => ({
|
() => ({
|
||||||
spec: {
|
spec: {
|
||||||
type: "number" as const,
|
type: 'number' as const,
|
||||||
description: null,
|
description: null,
|
||||||
warning: null,
|
warning: null,
|
||||||
min: null,
|
min: null,
|
||||||
@@ -482,7 +482,7 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
const a = await getA(options)
|
const a = await getA(options)
|
||||||
return {
|
return {
|
||||||
spec: {
|
spec: {
|
||||||
type: "number" as const,
|
type: 'number' as const,
|
||||||
description: null,
|
description: null,
|
||||||
warning: null,
|
warning: null,
|
||||||
min: null,
|
min: null,
|
||||||
@@ -540,7 +540,7 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
return new Value<AsRequired<string, Required>>(
|
return new Value<AsRequired<string, Required>>(
|
||||||
() => ({
|
() => ({
|
||||||
spec: {
|
spec: {
|
||||||
type: "color" as const,
|
type: 'color' as const,
|
||||||
description: null,
|
description: null,
|
||||||
warning: null,
|
warning: null,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
@@ -568,7 +568,7 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
const a = await getA(options)
|
const a = await getA(options)
|
||||||
return {
|
return {
|
||||||
spec: {
|
spec: {
|
||||||
type: "color" as const,
|
type: 'color' as const,
|
||||||
description: null,
|
description: null,
|
||||||
warning: null,
|
warning: null,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
@@ -618,7 +618,7 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
* @description Informs the browser how to behave and which date/time component to display.
|
* @description Informs the browser how to behave and which date/time component to display.
|
||||||
* @default "datetime-local"
|
* @default "datetime-local"
|
||||||
*/
|
*/
|
||||||
inputmode?: ValueSpecDatetime["inputmode"]
|
inputmode?: ValueSpecDatetime['inputmode']
|
||||||
min?: string | null
|
min?: string | null
|
||||||
max?: string | null
|
max?: string | null
|
||||||
/**
|
/**
|
||||||
@@ -631,10 +631,10 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
return new Value<AsRequired<string, Required>>(
|
return new Value<AsRequired<string, Required>>(
|
||||||
() => ({
|
() => ({
|
||||||
spec: {
|
spec: {
|
||||||
type: "datetime" as const,
|
type: 'datetime' as const,
|
||||||
description: null,
|
description: null,
|
||||||
warning: null,
|
warning: null,
|
||||||
inputmode: "datetime-local",
|
inputmode: 'datetime-local',
|
||||||
min: null,
|
min: null,
|
||||||
max: null,
|
max: null,
|
||||||
step: null,
|
step: null,
|
||||||
@@ -654,7 +654,7 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
warning?: string | null
|
warning?: string | null
|
||||||
default: string | null
|
default: string | null
|
||||||
required: Required
|
required: Required
|
||||||
inputmode?: ValueSpecDatetime["inputmode"]
|
inputmode?: ValueSpecDatetime['inputmode']
|
||||||
min?: string | null
|
min?: string | null
|
||||||
max?: string | null
|
max?: string | null
|
||||||
disabled?: false | string
|
disabled?: false | string
|
||||||
@@ -665,10 +665,10 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
const a = await getA(options)
|
const a = await getA(options)
|
||||||
return {
|
return {
|
||||||
spec: {
|
spec: {
|
||||||
type: "datetime" as const,
|
type: 'datetime' as const,
|
||||||
description: null,
|
description: null,
|
||||||
warning: null,
|
warning: null,
|
||||||
inputmode: "datetime-local",
|
inputmode: 'datetime-local',
|
||||||
min: null,
|
min: null,
|
||||||
max: null,
|
max: null,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
@@ -740,7 +740,7 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
spec: {
|
spec: {
|
||||||
description: null,
|
description: null,
|
||||||
warning: null,
|
warning: null,
|
||||||
type: "select" as const,
|
type: 'select' as const,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
immutable: a.immutable ?? false,
|
immutable: a.immutable ?? false,
|
||||||
...a,
|
...a,
|
||||||
@@ -766,7 +766,7 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
spec: {
|
spec: {
|
||||||
description: null,
|
description: null,
|
||||||
warning: null,
|
warning: null,
|
||||||
type: "select" as const,
|
type: 'select' as const,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
immutable: false,
|
immutable: false,
|
||||||
...a,
|
...a,
|
||||||
@@ -837,7 +837,7 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
return new Value<(keyof Values & string)[]>(
|
return new Value<(keyof Values & string)[]>(
|
||||||
() => ({
|
() => ({
|
||||||
spec: {
|
spec: {
|
||||||
type: "multiselect" as const,
|
type: 'multiselect' as const,
|
||||||
minLength: null,
|
minLength: null,
|
||||||
maxLength: null,
|
maxLength: null,
|
||||||
warning: null,
|
warning: null,
|
||||||
@@ -867,7 +867,7 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
const a = await getA(options)
|
const a = await getA(options)
|
||||||
return {
|
return {
|
||||||
spec: {
|
spec: {
|
||||||
type: "multiselect" as const,
|
type: 'multiselect' as const,
|
||||||
minLength: null,
|
minLength: null,
|
||||||
maxLength: null,
|
maxLength: null,
|
||||||
warning: null,
|
warning: null,
|
||||||
@@ -915,7 +915,7 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
const built = await spec.build(options as any)
|
const built = await spec.build(options as any)
|
||||||
return {
|
return {
|
||||||
spec: {
|
spec: {
|
||||||
type: "object" as const,
|
type: 'object' as const,
|
||||||
description: null,
|
description: null,
|
||||||
warning: null,
|
warning: null,
|
||||||
...a,
|
...a,
|
||||||
@@ -933,7 +933,7 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
required: Required
|
required: Required
|
||||||
}) {
|
}) {
|
||||||
const buildValue = {
|
const buildValue = {
|
||||||
type: "file" as const,
|
type: 'file' as const,
|
||||||
description: null,
|
description: null,
|
||||||
warning: null,
|
warning: null,
|
||||||
...a,
|
...a,
|
||||||
@@ -960,7 +960,7 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
return new Value<AsRequired<FileInfo, Required>, FileInfo | null>(
|
return new Value<AsRequired<FileInfo, Required>, FileInfo | null>(
|
||||||
async (options) => {
|
async (options) => {
|
||||||
const spec = {
|
const spec = {
|
||||||
type: "file" as const,
|
type: 'file' as const,
|
||||||
description: null,
|
description: null,
|
||||||
warning: null,
|
warning: null,
|
||||||
...(await a(options)),
|
...(await a(options)),
|
||||||
@@ -1034,7 +1034,7 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
const built = await a.variants.build(options as any)
|
const built = await a.variants.build(options as any)
|
||||||
return {
|
return {
|
||||||
spec: {
|
spec: {
|
||||||
type: "union" as const,
|
type: 'union' as const,
|
||||||
description: null,
|
description: null,
|
||||||
warning: null,
|
warning: null,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
@@ -1109,7 +1109,7 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
const built = await newValues.variants.build(options as any)
|
const built = await newValues.variants.build(options as any)
|
||||||
return {
|
return {
|
||||||
spec: {
|
spec: {
|
||||||
type: "union" as const,
|
type: 'union' as const,
|
||||||
description: null,
|
description: null,
|
||||||
warning: null,
|
warning: null,
|
||||||
...newValues,
|
...newValues,
|
||||||
@@ -1202,7 +1202,7 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
return new Value<T, typeof parser._TYPE>(async () => {
|
return new Value<T, typeof parser._TYPE>(async () => {
|
||||||
return {
|
return {
|
||||||
spec: {
|
spec: {
|
||||||
type: "hidden" as const,
|
type: 'hidden' as const,
|
||||||
} as ValueSpecHidden,
|
} as ValueSpecHidden,
|
||||||
validator: parser,
|
validator: parser,
|
||||||
}
|
}
|
||||||
@@ -1221,7 +1221,7 @@ export class Value<Type extends StaticValidatedAs, StaticValidatedAs = Type> {
|
|||||||
const validator = await getParser(options)
|
const validator = await getParser(options)
|
||||||
return {
|
return {
|
||||||
spec: {
|
spec: {
|
||||||
type: "hidden" as const,
|
type: 'hidden' as const,
|
||||||
} as ValueSpecHidden,
|
} as ValueSpecHidden,
|
||||||
validator,
|
validator,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import { DeepPartial } from "../../../types"
|
import { DeepPartial } from '../../../types'
|
||||||
import { ValueSpec, ValueSpecUnion } from "../inputSpecTypes"
|
import { ValueSpec, ValueSpecUnion } from '../inputSpecTypes'
|
||||||
import {
|
import {
|
||||||
LazyBuild,
|
LazyBuild,
|
||||||
InputSpec,
|
InputSpec,
|
||||||
ExtractInputSpecType,
|
ExtractInputSpecType,
|
||||||
ExtractInputSpecStaticValidatedAs,
|
ExtractInputSpecStaticValidatedAs,
|
||||||
} from "./inputSpec"
|
} from './inputSpec'
|
||||||
import { Parser, any, anyOf, literal, object } from "ts-matches"
|
import { Parser, any, anyOf, literal, object } from 'ts-matches'
|
||||||
|
|
||||||
export type UnionRes<
|
export type UnionRes<
|
||||||
VariantValues extends {
|
VariantValues extends {
|
||||||
@@ -19,10 +19,10 @@ export type UnionRes<
|
|||||||
> = {
|
> = {
|
||||||
[key in keyof VariantValues]: {
|
[key in keyof VariantValues]: {
|
||||||
selection: key
|
selection: key
|
||||||
value: ExtractInputSpecType<VariantValues[key]["spec"]>
|
value: ExtractInputSpecType<VariantValues[key]['spec']>
|
||||||
other?: {
|
other?: {
|
||||||
[key2 in Exclude<keyof VariantValues & string, key>]?: DeepPartial<
|
[key2 in Exclude<keyof VariantValues & string, key>]?: DeepPartial<
|
||||||
ExtractInputSpecType<VariantValues[key2]["spec"]>
|
ExtractInputSpecType<VariantValues[key2]['spec']>
|
||||||
>
|
>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -39,10 +39,10 @@ export type UnionResStaticValidatedAs<
|
|||||||
> = {
|
> = {
|
||||||
[key in keyof VariantValues]: {
|
[key in keyof VariantValues]: {
|
||||||
selection: key
|
selection: key
|
||||||
value: ExtractInputSpecStaticValidatedAs<VariantValues[key]["spec"]>
|
value: ExtractInputSpecStaticValidatedAs<VariantValues[key]['spec']>
|
||||||
other?: {
|
other?: {
|
||||||
[key2 in Exclude<keyof VariantValues & string, key>]?: DeepPartial<
|
[key2 in Exclude<keyof VariantValues & string, key>]?: DeepPartial<
|
||||||
ExtractInputSpecStaticValidatedAs<VariantValues[key2]["spec"]>
|
ExtractInputSpecStaticValidatedAs<VariantValues[key2]['spec']>
|
||||||
>
|
>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -106,7 +106,7 @@ export class Variants<
|
|||||||
> {
|
> {
|
||||||
private constructor(
|
private constructor(
|
||||||
public build: LazyBuild<{
|
public build: LazyBuild<{
|
||||||
spec: ValueSpecUnion["variants"]
|
spec: ValueSpecUnion['variants']
|
||||||
validator: Parser<unknown, UnionRes<VariantValues>>
|
validator: Parser<unknown, UnionRes<VariantValues>>
|
||||||
}>,
|
}>,
|
||||||
public readonly validator: Parser<
|
public readonly validator: Parser<
|
||||||
@@ -126,7 +126,7 @@ export class Variants<
|
|||||||
const staticValidators = {} as {
|
const staticValidators = {} as {
|
||||||
[K in keyof VariantValues]: Parser<
|
[K in keyof VariantValues]: Parser<
|
||||||
unknown,
|
unknown,
|
||||||
ExtractInputSpecStaticValidatedAs<VariantValues[K]["spec"]>
|
ExtractInputSpecStaticValidatedAs<VariantValues[K]['spec']>
|
||||||
>
|
>
|
||||||
}
|
}
|
||||||
for (const key in a) {
|
for (const key in a) {
|
||||||
@@ -143,7 +143,7 @@ export class Variants<
|
|||||||
const validators = {} as {
|
const validators = {} as {
|
||||||
[K in keyof VariantValues]: Parser<
|
[K in keyof VariantValues]: Parser<
|
||||||
unknown,
|
unknown,
|
||||||
ExtractInputSpecType<VariantValues[K]["spec"]>
|
ExtractInputSpecType<VariantValues[K]['spec']>
|
||||||
>
|
>
|
||||||
}
|
}
|
||||||
const variants = {} as {
|
const variants = {} as {
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
export * as constants from "./inputSpecConstants"
|
export * as constants from './inputSpecConstants'
|
||||||
export * as types from "./inputSpecTypes"
|
export * as types from './inputSpecTypes'
|
||||||
export * as builder from "./builder"
|
export * as builder from './builder'
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { SmtpValue } from "../../types"
|
import { SmtpValue } from '../../types'
|
||||||
import { GetSystemSmtp, Patterns } from "../../util"
|
import { GetSystemSmtp, Patterns } from '../../util'
|
||||||
import { InputSpec, InputSpecOf } from "./builder/inputSpec"
|
import { InputSpec, InputSpecOf } from './builder/inputSpec'
|
||||||
import { Value } from "./builder/value"
|
import { Value } from './builder/value'
|
||||||
import { Variants } from "./builder/variants"
|
import { Variants } from './builder/variants'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base SMTP settings, to be used by StartOS for system wide SMTP
|
* Base SMTP settings, to be used by StartOS for system wide SMTP
|
||||||
@@ -11,12 +11,12 @@ export const customSmtp: InputSpec<SmtpValue> = InputSpec.of<
|
|||||||
InputSpecOf<SmtpValue>
|
InputSpecOf<SmtpValue>
|
||||||
>({
|
>({
|
||||||
server: Value.text({
|
server: Value.text({
|
||||||
name: "SMTP Server",
|
name: 'SMTP Server',
|
||||||
required: true,
|
required: true,
|
||||||
default: null,
|
default: null,
|
||||||
}),
|
}),
|
||||||
port: Value.number({
|
port: Value.number({
|
||||||
name: "Port",
|
name: 'Port',
|
||||||
required: true,
|
required: true,
|
||||||
default: 587,
|
default: 587,
|
||||||
min: 1,
|
min: 1,
|
||||||
@@ -24,20 +24,20 @@ export const customSmtp: InputSpec<SmtpValue> = InputSpec.of<
|
|||||||
integer: true,
|
integer: true,
|
||||||
}),
|
}),
|
||||||
from: Value.text({
|
from: Value.text({
|
||||||
name: "From Address",
|
name: 'From Address',
|
||||||
required: true,
|
required: true,
|
||||||
default: null,
|
default: null,
|
||||||
placeholder: "Example Name <test@example.com>",
|
placeholder: 'Example Name <test@example.com>',
|
||||||
inputmode: "email",
|
inputmode: 'email',
|
||||||
patterns: [Patterns.emailWithName],
|
patterns: [Patterns.emailWithName],
|
||||||
}),
|
}),
|
||||||
login: Value.text({
|
login: Value.text({
|
||||||
name: "Login",
|
name: 'Login',
|
||||||
required: true,
|
required: true,
|
||||||
default: null,
|
default: null,
|
||||||
}),
|
}),
|
||||||
password: Value.text({
|
password: Value.text({
|
||||||
name: "Password",
|
name: 'Password',
|
||||||
required: false,
|
required: false,
|
||||||
default: null,
|
default: null,
|
||||||
masked: true,
|
masked: true,
|
||||||
@@ -45,24 +45,24 @@ export const customSmtp: InputSpec<SmtpValue> = InputSpec.of<
|
|||||||
})
|
})
|
||||||
|
|
||||||
const smtpVariants = Variants.of({
|
const smtpVariants = Variants.of({
|
||||||
disabled: { name: "Disabled", spec: InputSpec.of({}) },
|
disabled: { name: 'Disabled', spec: InputSpec.of({}) },
|
||||||
system: {
|
system: {
|
||||||
name: "System Credentials",
|
name: 'System Credentials',
|
||||||
spec: InputSpec.of({
|
spec: InputSpec.of({
|
||||||
customFrom: Value.text({
|
customFrom: Value.text({
|
||||||
name: "Custom From Address",
|
name: 'Custom From Address',
|
||||||
description:
|
description:
|
||||||
"A custom from address for this service. If not provided, the system from address will be used.",
|
'A custom from address for this service. If not provided, the system from address will be used.',
|
||||||
required: false,
|
required: false,
|
||||||
default: null,
|
default: null,
|
||||||
placeholder: "<name>test@example.com",
|
placeholder: '<name>test@example.com',
|
||||||
inputmode: "email",
|
inputmode: 'email',
|
||||||
patterns: [Patterns.email],
|
patterns: [Patterns.email],
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
custom: {
|
custom: {
|
||||||
name: "Custom Credentials",
|
name: 'Custom Credentials',
|
||||||
spec: customSmtp,
|
spec: customSmtp,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@@ -71,11 +71,11 @@ const smtpVariants = Variants.of({
|
|||||||
*/
|
*/
|
||||||
export const smtpInputSpec = Value.dynamicUnion(async ({ effects }) => {
|
export const smtpInputSpec = Value.dynamicUnion(async ({ effects }) => {
|
||||||
const smtp = await new GetSystemSmtp(effects).once()
|
const smtp = await new GetSystemSmtp(effects).once()
|
||||||
const disabled = smtp ? [] : ["system"]
|
const disabled = smtp ? [] : ['system']
|
||||||
return {
|
return {
|
||||||
name: "SMTP",
|
name: 'SMTP',
|
||||||
description: "Optionally provide an SMTP server for sending emails",
|
description: 'Optionally provide an SMTP server for sending emails',
|
||||||
default: "disabled",
|
default: 'disabled',
|
||||||
disabled,
|
disabled,
|
||||||
variants: smtpVariants,
|
variants: smtpVariants,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
export type InputSpec = Record<string, ValueSpec>
|
export type InputSpec = Record<string, ValueSpec>
|
||||||
export type ValueType =
|
export type ValueType =
|
||||||
| "text"
|
| 'text'
|
||||||
| "textarea"
|
| 'textarea'
|
||||||
| "number"
|
| 'number'
|
||||||
| "color"
|
| 'color'
|
||||||
| "datetime"
|
| 'datetime'
|
||||||
| "toggle"
|
| 'toggle'
|
||||||
| "select"
|
| 'select'
|
||||||
| "multiselect"
|
| 'multiselect'
|
||||||
| "list"
|
| 'list'
|
||||||
| "object"
|
| 'object'
|
||||||
| "file"
|
| 'file'
|
||||||
| "union"
|
| 'union'
|
||||||
| "hidden"
|
| 'hidden'
|
||||||
export type ValueSpec = ValueSpecOf<ValueType>
|
export type ValueSpec = ValueSpecOf<ValueType>
|
||||||
/** core spec types. These types provide the metadata for performing validations */
|
/** core spec types. These types provide the metadata for performing validations */
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
@@ -37,13 +37,13 @@ export type ValueSpecText = {
|
|||||||
description: string | null
|
description: string | null
|
||||||
warning: string | null
|
warning: string | null
|
||||||
|
|
||||||
type: "text"
|
type: 'text'
|
||||||
patterns: Pattern[]
|
patterns: Pattern[]
|
||||||
minLength: number | null
|
minLength: number | null
|
||||||
maxLength: number | null
|
maxLength: number | null
|
||||||
masked: boolean
|
masked: boolean
|
||||||
|
|
||||||
inputmode: "text" | "email" | "tel" | "url"
|
inputmode: 'text' | 'email' | 'tel' | 'url'
|
||||||
placeholder: string | null
|
placeholder: string | null
|
||||||
|
|
||||||
required: boolean
|
required: boolean
|
||||||
@@ -57,7 +57,7 @@ export type ValueSpecTextarea = {
|
|||||||
description: string | null
|
description: string | null
|
||||||
warning: string | null
|
warning: string | null
|
||||||
|
|
||||||
type: "textarea"
|
type: 'textarea'
|
||||||
patterns: Pattern[]
|
patterns: Pattern[]
|
||||||
placeholder: string | null
|
placeholder: string | null
|
||||||
minLength: number | null
|
minLength: number | null
|
||||||
@@ -71,7 +71,7 @@ export type ValueSpecTextarea = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export type ValueSpecNumber = {
|
export type ValueSpecNumber = {
|
||||||
type: "number"
|
type: 'number'
|
||||||
min: number | null
|
min: number | null
|
||||||
max: number | null
|
max: number | null
|
||||||
integer: boolean
|
integer: boolean
|
||||||
@@ -91,7 +91,7 @@ export type ValueSpecColor = {
|
|||||||
description: string | null
|
description: string | null
|
||||||
warning: string | null
|
warning: string | null
|
||||||
|
|
||||||
type: "color"
|
type: 'color'
|
||||||
required: boolean
|
required: boolean
|
||||||
default: string | null
|
default: string | null
|
||||||
disabled: false | string
|
disabled: false | string
|
||||||
@@ -101,9 +101,9 @@ export type ValueSpecDatetime = {
|
|||||||
name: string
|
name: string
|
||||||
description: string | null
|
description: string | null
|
||||||
warning: string | null
|
warning: string | null
|
||||||
type: "datetime"
|
type: 'datetime'
|
||||||
required: boolean
|
required: boolean
|
||||||
inputmode: "date" | "time" | "datetime-local"
|
inputmode: 'date' | 'time' | 'datetime-local'
|
||||||
min: string | null
|
min: string | null
|
||||||
max: string | null
|
max: string | null
|
||||||
default: string | null
|
default: string | null
|
||||||
@@ -115,7 +115,7 @@ export type ValueSpecSelect = {
|
|||||||
name: string
|
name: string
|
||||||
description: string | null
|
description: string | null
|
||||||
warning: string | null
|
warning: string | null
|
||||||
type: "select"
|
type: 'select'
|
||||||
default: string | null
|
default: string | null
|
||||||
disabled: false | string | string[]
|
disabled: false | string | string[]
|
||||||
immutable: boolean
|
immutable: boolean
|
||||||
@@ -127,7 +127,7 @@ export type ValueSpecMultiselect = {
|
|||||||
description: string | null
|
description: string | null
|
||||||
warning: string | null
|
warning: string | null
|
||||||
|
|
||||||
type: "multiselect"
|
type: 'multiselect'
|
||||||
minLength: number | null
|
minLength: number | null
|
||||||
maxLength: number | null
|
maxLength: number | null
|
||||||
disabled: false | string | string[]
|
disabled: false | string | string[]
|
||||||
@@ -139,7 +139,7 @@ export type ValueSpecToggle = {
|
|||||||
description: string | null
|
description: string | null
|
||||||
warning: string | null
|
warning: string | null
|
||||||
|
|
||||||
type: "toggle"
|
type: 'toggle'
|
||||||
default: boolean | null
|
default: boolean | null
|
||||||
disabled: false | string
|
disabled: false | string
|
||||||
immutable: boolean
|
immutable: boolean
|
||||||
@@ -149,7 +149,7 @@ export type ValueSpecUnion = {
|
|||||||
description: string | null
|
description: string | null
|
||||||
warning: string | null
|
warning: string | null
|
||||||
|
|
||||||
type: "union"
|
type: 'union'
|
||||||
variants: Record<
|
variants: Record<
|
||||||
string,
|
string,
|
||||||
{
|
{
|
||||||
@@ -165,7 +165,7 @@ export type ValueSpecFile = {
|
|||||||
name: string
|
name: string
|
||||||
description: string | null
|
description: string | null
|
||||||
warning: string | null
|
warning: string | null
|
||||||
type: "file"
|
type: 'file'
|
||||||
extensions: string[]
|
extensions: string[]
|
||||||
required: boolean
|
required: boolean
|
||||||
}
|
}
|
||||||
@@ -173,13 +173,13 @@ export type ValueSpecObject = {
|
|||||||
name: string
|
name: string
|
||||||
description: string | null
|
description: string | null
|
||||||
warning: string | null
|
warning: string | null
|
||||||
type: "object"
|
type: 'object'
|
||||||
spec: InputSpec
|
spec: InputSpec
|
||||||
}
|
}
|
||||||
export type ValueSpecHidden = {
|
export type ValueSpecHidden = {
|
||||||
type: "hidden"
|
type: 'hidden'
|
||||||
}
|
}
|
||||||
export type ListValueSpecType = "text" | "object"
|
export type ListValueSpecType = 'text' | 'object'
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
export type ListValueSpecOf<T extends ListValueSpecType> =
|
export type ListValueSpecOf<T extends ListValueSpecType> =
|
||||||
T extends "text" ? ListValueSpecText :
|
T extends "text" ? ListValueSpecText :
|
||||||
@@ -190,7 +190,7 @@ export type ValueSpecListOf<T extends ListValueSpecType> = {
|
|||||||
name: string
|
name: string
|
||||||
description: string | null
|
description: string | null
|
||||||
warning: string | null
|
warning: string | null
|
||||||
type: "list"
|
type: 'list'
|
||||||
spec: ListValueSpecOf<T>
|
spec: ListValueSpecOf<T>
|
||||||
minLength: number | null
|
minLength: number | null
|
||||||
maxLength: number | null
|
maxLength: number | null
|
||||||
@@ -208,18 +208,18 @@ export type Pattern = {
|
|||||||
description: string
|
description: string
|
||||||
}
|
}
|
||||||
export type ListValueSpecText = {
|
export type ListValueSpecText = {
|
||||||
type: "text"
|
type: 'text'
|
||||||
patterns: Pattern[]
|
patterns: Pattern[]
|
||||||
minLength: number | null
|
minLength: number | null
|
||||||
maxLength: number | null
|
maxLength: number | null
|
||||||
masked: boolean
|
masked: boolean
|
||||||
|
|
||||||
generate: null | RandomString
|
generate: null | RandomString
|
||||||
inputmode: "text" | "email" | "tel" | "url"
|
inputmode: 'text' | 'email' | 'tel' | 'url'
|
||||||
placeholder: string | null
|
placeholder: string | null
|
||||||
}
|
}
|
||||||
export type ListValueSpecObject = {
|
export type ListValueSpecObject = {
|
||||||
type: "object"
|
type: 'object'
|
||||||
spec: InputSpec
|
spec: InputSpec
|
||||||
uniqueBy: UniqueBy
|
uniqueBy: UniqueBy
|
||||||
displayAs: string | null
|
displayAs: string | null
|
||||||
@@ -244,5 +244,5 @@ export function isValueSpecListOf<S extends ListValueSpecType>(
|
|||||||
t: ValueSpec,
|
t: ValueSpec,
|
||||||
s: S,
|
s: S,
|
||||||
): t is ValueSpecListOf<S> & { spec: ListValueSpecOf<S> } {
|
): t is ValueSpecListOf<S> & { spec: ListValueSpecOf<S> } {
|
||||||
return "spec" in t && t.spec.type === s
|
return 'spec' in t && t.spec.type === s
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
import { InputSpec } from "./input/builder"
|
import { InputSpec } from './input/builder'
|
||||||
import { ExtractInputSpecType } from "./input/builder/inputSpec"
|
import { ExtractInputSpecType } from './input/builder/inputSpec'
|
||||||
import * as T from "../types"
|
import * as T from '../types'
|
||||||
import { once } from "../util"
|
import { once } from '../util'
|
||||||
import { InitScript } from "../inits"
|
import { InitScript } from '../inits'
|
||||||
import { Parser } from "ts-matches"
|
import { Parser } from 'ts-matches'
|
||||||
|
|
||||||
type MaybeInputSpec<Type> = {} extends Type ? null : InputSpec<Type>
|
type MaybeInputSpec<Type> = {} extends Type ? null : InputSpec<Type>
|
||||||
export type Run<A extends Record<string, any>> = (options: {
|
export type Run<A extends Record<string, any>> = (options: {
|
||||||
effects: T.Effects
|
effects: T.Effects
|
||||||
input: A
|
input: A
|
||||||
spec: T.inputSpecTypes.InputSpec
|
spec: T.inputSpecTypes.InputSpec
|
||||||
}) => Promise<(T.ActionResult & { version: "1" }) | null | void | undefined>
|
}) => Promise<(T.ActionResult & { version: '1' }) | null | void | undefined>
|
||||||
export type GetInput<A extends Record<string, any>> = (options: {
|
export type GetInput<A extends Record<string, any>> = (options: {
|
||||||
effects: T.Effects
|
effects: T.Effects
|
||||||
}) => Promise<null | void | undefined | T.DeepPartial<A>>
|
}) => Promise<null | void | undefined | T.DeepPartial<A>>
|
||||||
@@ -65,7 +65,7 @@ export class Action<Id extends T.ActionId, Type extends Record<string, any>>
|
|||||||
InputSpecType extends InputSpec<Record<string, any>>,
|
InputSpecType extends InputSpec<Record<string, any>>,
|
||||||
>(
|
>(
|
||||||
id: Id,
|
id: Id,
|
||||||
metadata: MaybeFn<Omit<T.ActionMetadata, "hasInput">>,
|
metadata: MaybeFn<Omit<T.ActionMetadata, 'hasInput'>>,
|
||||||
inputSpec: InputSpecType,
|
inputSpec: InputSpecType,
|
||||||
getInput: GetInput<ExtractInputSpecType<InputSpecType>>,
|
getInput: GetInput<ExtractInputSpecType<InputSpecType>>,
|
||||||
run: Run<ExtractInputSpecType<InputSpecType>>,
|
run: Run<ExtractInputSpecType<InputSpecType>>,
|
||||||
@@ -80,7 +80,7 @@ export class Action<Id extends T.ActionId, Type extends Record<string, any>>
|
|||||||
}
|
}
|
||||||
static withoutInput<Id extends T.ActionId>(
|
static withoutInput<Id extends T.ActionId>(
|
||||||
id: Id,
|
id: Id,
|
||||||
metadata: MaybeFn<Omit<T.ActionMetadata, "hasInput">>,
|
metadata: MaybeFn<Omit<T.ActionMetadata, 'hasInput'>>,
|
||||||
run: Run<{}>,
|
run: Run<{}>,
|
||||||
): Action<Id, {}> {
|
): Action<Id, {}> {
|
||||||
return new Action(
|
return new Action(
|
||||||
@@ -156,7 +156,7 @@ export class Actions<
|
|||||||
}
|
}
|
||||||
addAction<A extends Action<T.ActionId, any>>(
|
addAction<A extends Action<T.ActionId, any>>(
|
||||||
action: A, // TODO: prevent duplicates
|
action: A, // TODO: prevent duplicates
|
||||||
): Actions<AllActions & { [id in A["id"]]: A }> {
|
): Actions<AllActions & { [id in A['id']]: A }> {
|
||||||
return new Actions({ ...this.actions, [action.id]: action })
|
return new Actions({ ...this.actions, [action.id]: action })
|
||||||
}
|
}
|
||||||
async init(effects: T.Effects): Promise<void> {
|
async init(effects: T.Effects): Promise<void> {
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { ExtendedVersion, VersionRange } from "../exver"
|
import { ExtendedVersion, VersionRange } from '../exver'
|
||||||
import {
|
import {
|
||||||
PackageId,
|
PackageId,
|
||||||
HealthCheckId,
|
HealthCheckId,
|
||||||
DependencyRequirement,
|
DependencyRequirement,
|
||||||
CheckDependenciesResult,
|
CheckDependenciesResult,
|
||||||
} from "../types"
|
} from '../types'
|
||||||
import { Effects } from "../Effects"
|
import { Effects } from '../Effects'
|
||||||
|
|
||||||
export type CheckDependencies<DependencyId extends PackageId = PackageId> = {
|
export type CheckDependencies<DependencyId extends PackageId = PackageId> = {
|
||||||
infoFor: (packageId: DependencyId) => {
|
infoFor: (packageId: DependencyId) => {
|
||||||
@@ -73,11 +73,11 @@ export async function checkDependencies<
|
|||||||
}
|
}
|
||||||
const runningSatisfied = (packageId: DependencyId) => {
|
const runningSatisfied = (packageId: DependencyId) => {
|
||||||
const dep = infoFor(packageId)
|
const dep = infoFor(packageId)
|
||||||
return dep.requirement.kind !== "running" || dep.result.isRunning
|
return dep.requirement.kind !== 'running' || dep.result.isRunning
|
||||||
}
|
}
|
||||||
const tasksSatisfied = (packageId: DependencyId) =>
|
const tasksSatisfied = (packageId: DependencyId) =>
|
||||||
Object.entries(infoFor(packageId).result.tasks).filter(
|
Object.entries(infoFor(packageId).result.tasks).filter(
|
||||||
([_, t]) => t?.active && t.task.severity === "critical",
|
([_, t]) => t?.active && t.task.severity === 'critical',
|
||||||
).length === 0
|
).length === 0
|
||||||
const healthCheckSatisfied = (
|
const healthCheckSatisfied = (
|
||||||
packageId: DependencyId,
|
packageId: DependencyId,
|
||||||
@@ -86,17 +86,17 @@ export async function checkDependencies<
|
|||||||
const dep = infoFor(packageId)
|
const dep = infoFor(packageId)
|
||||||
if (
|
if (
|
||||||
healthCheckId &&
|
healthCheckId &&
|
||||||
(dep.requirement.kind !== "running" ||
|
(dep.requirement.kind !== 'running' ||
|
||||||
!dep.requirement.healthChecks.includes(healthCheckId))
|
!dep.requirement.healthChecks.includes(healthCheckId))
|
||||||
) {
|
) {
|
||||||
throw new Error(`Unknown HealthCheckId ${healthCheckId}`)
|
throw new Error(`Unknown HealthCheckId ${healthCheckId}`)
|
||||||
}
|
}
|
||||||
const errors =
|
const errors =
|
||||||
dep.requirement.kind === "running"
|
dep.requirement.kind === 'running'
|
||||||
? dep.requirement.healthChecks
|
? dep.requirement.healthChecks
|
||||||
.map((id) => [id, dep.result.healthChecks[id] ?? null] as const)
|
.map((id) => [id, dep.result.healthChecks[id] ?? null] as const)
|
||||||
.filter(([id, _]) => (healthCheckId ? id === healthCheckId : true))
|
.filter(([id, _]) => (healthCheckId ? id === healthCheckId : true))
|
||||||
.filter(([_, res]) => res?.result !== "success")
|
.filter(([_, res]) => res?.result !== 'success')
|
||||||
: []
|
: []
|
||||||
return errors.length === 0
|
return errors.length === 0
|
||||||
}
|
}
|
||||||
@@ -138,7 +138,7 @@ export async function checkDependencies<
|
|||||||
}
|
}
|
||||||
const throwIfRunningNotSatisfied = (packageId: DependencyId) => {
|
const throwIfRunningNotSatisfied = (packageId: DependencyId) => {
|
||||||
const dep = infoFor(packageId)
|
const dep = infoFor(packageId)
|
||||||
if (dep.requirement.kind === "running" && !dep.result.isRunning) {
|
if (dep.requirement.kind === 'running' && !dep.result.isRunning) {
|
||||||
throw new Error(`${dep.result.title || packageId} is not running`)
|
throw new Error(`${dep.result.title || packageId} is not running`)
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
@@ -146,11 +146,11 @@ export async function checkDependencies<
|
|||||||
const throwIfTasksNotSatisfied = (packageId: DependencyId) => {
|
const throwIfTasksNotSatisfied = (packageId: DependencyId) => {
|
||||||
const dep = infoFor(packageId)
|
const dep = infoFor(packageId)
|
||||||
const reqs = Object.entries(dep.result.tasks)
|
const reqs = Object.entries(dep.result.tasks)
|
||||||
.filter(([_, t]) => t?.active && t.task.severity === "critical")
|
.filter(([_, t]) => t?.active && t.task.severity === 'critical')
|
||||||
.map(([id, _]) => id)
|
.map(([id, _]) => id)
|
||||||
if (reqs.length) {
|
if (reqs.length) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`The following action requests have not been fulfilled: ${reqs.join(", ")}`,
|
`The following action requests have not been fulfilled: ${reqs.join(', ')}`,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
@@ -162,27 +162,27 @@ export async function checkDependencies<
|
|||||||
const dep = infoFor(packageId)
|
const dep = infoFor(packageId)
|
||||||
if (
|
if (
|
||||||
healthCheckId &&
|
healthCheckId &&
|
||||||
(dep.requirement.kind !== "running" ||
|
(dep.requirement.kind !== 'running' ||
|
||||||
!dep.requirement.healthChecks.includes(healthCheckId))
|
!dep.requirement.healthChecks.includes(healthCheckId))
|
||||||
) {
|
) {
|
||||||
throw new Error(`Unknown HealthCheckId ${healthCheckId}`)
|
throw new Error(`Unknown HealthCheckId ${healthCheckId}`)
|
||||||
}
|
}
|
||||||
const errors =
|
const errors =
|
||||||
dep.requirement.kind === "running"
|
dep.requirement.kind === 'running'
|
||||||
? dep.requirement.healthChecks
|
? dep.requirement.healthChecks
|
||||||
.map((id) => [id, dep.result.healthChecks[id] ?? null] as const)
|
.map((id) => [id, dep.result.healthChecks[id] ?? null] as const)
|
||||||
.filter(([id, _]) => (healthCheckId ? id === healthCheckId : true))
|
.filter(([id, _]) => (healthCheckId ? id === healthCheckId : true))
|
||||||
.filter(([_, res]) => res?.result !== "success")
|
.filter(([_, res]) => res?.result !== 'success')
|
||||||
: []
|
: []
|
||||||
if (errors.length) {
|
if (errors.length) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
errors
|
errors
|
||||||
.map(([id, e]) =>
|
.map(([id, e]) =>
|
||||||
e
|
e
|
||||||
? `Health Check ${e.name} of ${dep.result.title || packageId} failed with status ${e.result}${e.message ? `: ${e.message}` : ""}`
|
? `Health Check ${e.name} of ${dep.result.title || packageId} failed with status ${e.result}${e.message ? `: ${e.message}` : ''}`
|
||||||
: `Health Check ${id} of ${dep.result.title} does not exist`,
|
: `Health Check ${id} of ${dep.result.title} does not exist`,
|
||||||
)
|
)
|
||||||
.join("; "),
|
.join('; '),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
@@ -209,7 +209,7 @@ export async function checkDependencies<
|
|||||||
return []
|
return []
|
||||||
})
|
})
|
||||||
if (err.length) {
|
if (err.length) {
|
||||||
throw new Error(err.join("; "))
|
throw new Error(err.join('; '))
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
})()
|
})()
|
||||||
|
|||||||
@@ -1,27 +1,27 @@
|
|||||||
import * as T from "../types"
|
import * as T from '../types'
|
||||||
import { once } from "../util"
|
import { once } from '../util'
|
||||||
|
|
||||||
export type RequiredDependenciesOf<Manifest extends T.SDKManifest> = {
|
export type RequiredDependenciesOf<Manifest extends T.SDKManifest> = {
|
||||||
[K in keyof Manifest["dependencies"]]: Exclude<
|
[K in keyof Manifest['dependencies']]: Exclude<
|
||||||
Manifest["dependencies"][K],
|
Manifest['dependencies'][K],
|
||||||
undefined
|
undefined
|
||||||
>["optional"] extends false
|
>['optional'] extends false
|
||||||
? K
|
? K
|
||||||
: never
|
: never
|
||||||
}[keyof Manifest["dependencies"]]
|
}[keyof Manifest['dependencies']]
|
||||||
export type OptionalDependenciesOf<Manifest extends T.SDKManifest> = Exclude<
|
export type OptionalDependenciesOf<Manifest extends T.SDKManifest> = Exclude<
|
||||||
keyof Manifest["dependencies"],
|
keyof Manifest['dependencies'],
|
||||||
RequiredDependenciesOf<Manifest>
|
RequiredDependenciesOf<Manifest>
|
||||||
>
|
>
|
||||||
|
|
||||||
type DependencyRequirement =
|
type DependencyRequirement =
|
||||||
| {
|
| {
|
||||||
kind: "running"
|
kind: 'running'
|
||||||
healthChecks: Array<T.HealthCheckId>
|
healthChecks: Array<T.HealthCheckId>
|
||||||
versionRange: string
|
versionRange: string
|
||||||
}
|
}
|
||||||
| {
|
| {
|
||||||
kind: "exists"
|
kind: 'exists'
|
||||||
versionRange: string
|
versionRange: string
|
||||||
}
|
}
|
||||||
type Matches<T, U> = T extends U ? (U extends T ? null : never) : never
|
type Matches<T, U> = T extends U ? (U extends T ? null : never) : never
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
|||||||
import { DeepMap } from "deep-equality-data-structures"
|
import { DeepMap } from 'deep-equality-data-structures'
|
||||||
import * as P from "./exver"
|
import * as P from './exver'
|
||||||
|
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
export type ValidateVersion<T extends String> =
|
export type ValidateVersion<T extends String> =
|
||||||
@@ -22,35 +22,35 @@ export type ValidateExVers<T> =
|
|||||||
never[]
|
never[]
|
||||||
|
|
||||||
type Anchor = {
|
type Anchor = {
|
||||||
type: "Anchor"
|
type: 'Anchor'
|
||||||
operator: P.CmpOp
|
operator: P.CmpOp
|
||||||
version: ExtendedVersion
|
version: ExtendedVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
type And = {
|
type And = {
|
||||||
type: "And"
|
type: 'And'
|
||||||
left: VersionRange
|
left: VersionRange
|
||||||
right: VersionRange
|
right: VersionRange
|
||||||
}
|
}
|
||||||
|
|
||||||
type Or = {
|
type Or = {
|
||||||
type: "Or"
|
type: 'Or'
|
||||||
left: VersionRange
|
left: VersionRange
|
||||||
right: VersionRange
|
right: VersionRange
|
||||||
}
|
}
|
||||||
|
|
||||||
type Not = {
|
type Not = {
|
||||||
type: "Not"
|
type: 'Not'
|
||||||
value: VersionRange
|
value: VersionRange
|
||||||
}
|
}
|
||||||
|
|
||||||
type Flavor = {
|
type Flavor = {
|
||||||
type: "Flavor"
|
type: 'Flavor'
|
||||||
flavor: string | null
|
flavor: string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
type FlavorNot = {
|
type FlavorNot = {
|
||||||
type: "FlavorNot"
|
type: 'FlavorNot'
|
||||||
flavors: Set<string | null>
|
flavors: Set<string | null>
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,8 +107,8 @@ function adjacentVersionRangePoints(
|
|||||||
}
|
}
|
||||||
|
|
||||||
function flavorAnd(a: FlavorAtom, b: FlavorAtom): FlavorAtom | null {
|
function flavorAnd(a: FlavorAtom, b: FlavorAtom): FlavorAtom | null {
|
||||||
if (a.type == "Flavor") {
|
if (a.type == 'Flavor') {
|
||||||
if (b.type == "Flavor") {
|
if (b.type == 'Flavor') {
|
||||||
if (a.flavor == b.flavor) {
|
if (a.flavor == b.flavor) {
|
||||||
return a
|
return a
|
||||||
} else {
|
} else {
|
||||||
@@ -122,7 +122,7 @@ function flavorAnd(a: FlavorAtom, b: FlavorAtom): FlavorAtom | null {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (b.type == "Flavor") {
|
if (b.type == 'Flavor') {
|
||||||
if (a.flavors.has(b.flavor)) {
|
if (a.flavors.has(b.flavor)) {
|
||||||
return null
|
return null
|
||||||
} else {
|
} else {
|
||||||
@@ -131,7 +131,7 @@ function flavorAnd(a: FlavorAtom, b: FlavorAtom): FlavorAtom | null {
|
|||||||
} else {
|
} else {
|
||||||
// TODO: use Set.union if targeting esnext or later
|
// TODO: use Set.union if targeting esnext or later
|
||||||
return {
|
return {
|
||||||
type: "FlavorNot",
|
type: 'FlavorNot',
|
||||||
flavors: new Set([...a.flavors, ...b.flavors]),
|
flavors: new Set([...a.flavors, ...b.flavors]),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -218,12 +218,12 @@ class VersionRangeTable {
|
|||||||
static eqFlavor(flavor: string | null): VersionRangeTables {
|
static eqFlavor(flavor: string | null): VersionRangeTables {
|
||||||
return new DeepMap([
|
return new DeepMap([
|
||||||
[
|
[
|
||||||
{ type: "Flavor", flavor } as FlavorAtom,
|
{ type: 'Flavor', flavor } as FlavorAtom,
|
||||||
new VersionRangeTable([], [true]),
|
new VersionRangeTable([], [true]),
|
||||||
],
|
],
|
||||||
// make sure the truth table is exhaustive, or `not` will not work properly.
|
// make sure the truth table is exhaustive, or `not` will not work properly.
|
||||||
[
|
[
|
||||||
{ type: "FlavorNot", flavors: new Set([flavor]) } as FlavorAtom,
|
{ type: 'FlavorNot', flavors: new Set([flavor]) } as FlavorAtom,
|
||||||
new VersionRangeTable([], [false]),
|
new VersionRangeTable([], [false]),
|
||||||
],
|
],
|
||||||
])
|
])
|
||||||
@@ -241,12 +241,12 @@ class VersionRangeTable {
|
|||||||
): VersionRangeTables {
|
): VersionRangeTables {
|
||||||
return new DeepMap([
|
return new DeepMap([
|
||||||
[
|
[
|
||||||
{ type: "Flavor", flavor } as FlavorAtom,
|
{ type: 'Flavor', flavor } as FlavorAtom,
|
||||||
new VersionRangeTable([point], [left, right]),
|
new VersionRangeTable([point], [left, right]),
|
||||||
],
|
],
|
||||||
// make sure the truth table is exhaustive, or `not` will not work properly.
|
// make sure the truth table is exhaustive, or `not` will not work properly.
|
||||||
[
|
[
|
||||||
{ type: "FlavorNot", flavors: new Set([flavor]) } as FlavorAtom,
|
{ type: 'FlavorNot', flavors: new Set([flavor]) } as FlavorAtom,
|
||||||
new VersionRangeTable([], [false]),
|
new VersionRangeTable([], [false]),
|
||||||
],
|
],
|
||||||
])
|
])
|
||||||
@@ -383,7 +383,7 @@ class VersionRangeTable {
|
|||||||
let sum_terms: VersionRange[] = []
|
let sum_terms: VersionRange[] = []
|
||||||
for (let [flavor, table] of tables) {
|
for (let [flavor, table] of tables) {
|
||||||
let cmp_flavor = null
|
let cmp_flavor = null
|
||||||
if (flavor.type == "Flavor") {
|
if (flavor.type == 'Flavor') {
|
||||||
cmp_flavor = flavor.flavor
|
cmp_flavor = flavor.flavor
|
||||||
}
|
}
|
||||||
for (let i = 0; i < table.values.length; i++) {
|
for (let i = 0; i < table.values.length; i++) {
|
||||||
@@ -392,7 +392,7 @@ class VersionRangeTable {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flavor.type == "FlavorNot") {
|
if (flavor.type == 'FlavorNot') {
|
||||||
for (let not_flavor of flavor.flavors) {
|
for (let not_flavor of flavor.flavors) {
|
||||||
term.push(VersionRange.flavor(not_flavor).not())
|
term.push(VersionRange.flavor(not_flavor).not())
|
||||||
}
|
}
|
||||||
@@ -410,7 +410,7 @@ class VersionRangeTable {
|
|||||||
if (p != null && q != null && adjacentVersionRangePoints(p, q)) {
|
if (p != null && q != null && adjacentVersionRangePoints(p, q)) {
|
||||||
term.push(
|
term.push(
|
||||||
VersionRange.anchor(
|
VersionRange.anchor(
|
||||||
"=",
|
'=',
|
||||||
new ExtendedVersion(cmp_flavor, p.upstream, p.downstream),
|
new ExtendedVersion(cmp_flavor, p.upstream, p.downstream),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@@ -418,7 +418,7 @@ class VersionRangeTable {
|
|||||||
if (p != null && p.side < 0) {
|
if (p != null && p.side < 0) {
|
||||||
term.push(
|
term.push(
|
||||||
VersionRange.anchor(
|
VersionRange.anchor(
|
||||||
">=",
|
'>=',
|
||||||
new ExtendedVersion(cmp_flavor, p.upstream, p.downstream),
|
new ExtendedVersion(cmp_flavor, p.upstream, p.downstream),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@@ -426,7 +426,7 @@ class VersionRangeTable {
|
|||||||
if (p != null && p.side >= 0) {
|
if (p != null && p.side >= 0) {
|
||||||
term.push(
|
term.push(
|
||||||
VersionRange.anchor(
|
VersionRange.anchor(
|
||||||
">",
|
'>',
|
||||||
new ExtendedVersion(cmp_flavor, p.upstream, p.downstream),
|
new ExtendedVersion(cmp_flavor, p.upstream, p.downstream),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@@ -434,7 +434,7 @@ class VersionRangeTable {
|
|||||||
if (q != null && q.side < 0) {
|
if (q != null && q.side < 0) {
|
||||||
term.push(
|
term.push(
|
||||||
VersionRange.anchor(
|
VersionRange.anchor(
|
||||||
"<",
|
'<',
|
||||||
new ExtendedVersion(cmp_flavor, q.upstream, q.downstream),
|
new ExtendedVersion(cmp_flavor, q.upstream, q.downstream),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@@ -442,7 +442,7 @@ class VersionRangeTable {
|
|||||||
if (q != null && q.side >= 0) {
|
if (q != null && q.side >= 0) {
|
||||||
term.push(
|
term.push(
|
||||||
VersionRange.anchor(
|
VersionRange.anchor(
|
||||||
"<=",
|
'<=',
|
||||||
new ExtendedVersion(cmp_flavor, q.upstream, q.downstream),
|
new ExtendedVersion(cmp_flavor, q.upstream, q.downstream),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@@ -463,26 +463,26 @@ class VersionRangeTable {
|
|||||||
export class VersionRange {
|
export class VersionRange {
|
||||||
constructor(public atom: Anchor | And | Or | Not | P.Any | P.None | Flavor) {}
|
constructor(public atom: Anchor | And | Or | Not | P.Any | P.None | Flavor) {}
|
||||||
|
|
||||||
toStringParens(parent: "And" | "Or" | "Not") {
|
toStringParens(parent: 'And' | 'Or' | 'Not') {
|
||||||
let needs = true
|
let needs = true
|
||||||
switch (this.atom.type) {
|
switch (this.atom.type) {
|
||||||
case "And":
|
case 'And':
|
||||||
case "Or":
|
case 'Or':
|
||||||
needs = parent != this.atom.type
|
needs = parent != this.atom.type
|
||||||
break
|
break
|
||||||
case "Anchor":
|
case 'Anchor':
|
||||||
case "Any":
|
case 'Any':
|
||||||
case "None":
|
case 'None':
|
||||||
needs = parent == "Not"
|
needs = parent == 'Not'
|
||||||
break
|
break
|
||||||
case "Not":
|
case 'Not':
|
||||||
case "Flavor":
|
case 'Flavor':
|
||||||
needs = false
|
needs = false
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
if (needs) {
|
if (needs) {
|
||||||
return "(" + this.toString() + ")"
|
return '(' + this.toString() + ')'
|
||||||
} else {
|
} else {
|
||||||
return this.toString()
|
return this.toString()
|
||||||
}
|
}
|
||||||
@@ -490,36 +490,36 @@ export class VersionRange {
|
|||||||
|
|
||||||
toString(): string {
|
toString(): string {
|
||||||
switch (this.atom.type) {
|
switch (this.atom.type) {
|
||||||
case "Anchor":
|
case 'Anchor':
|
||||||
return `${this.atom.operator}${this.atom.version}`
|
return `${this.atom.operator}${this.atom.version}`
|
||||||
case "And":
|
case 'And':
|
||||||
return `${this.atom.left.toStringParens(this.atom.type)} && ${this.atom.right.toStringParens(this.atom.type)}`
|
return `${this.atom.left.toStringParens(this.atom.type)} && ${this.atom.right.toStringParens(this.atom.type)}`
|
||||||
case "Or":
|
case 'Or':
|
||||||
return `${this.atom.left.toStringParens(this.atom.type)} || ${this.atom.right.toStringParens(this.atom.type)}`
|
return `${this.atom.left.toStringParens(this.atom.type)} || ${this.atom.right.toStringParens(this.atom.type)}`
|
||||||
case "Not":
|
case 'Not':
|
||||||
return `!${this.atom.value.toStringParens(this.atom.type)}`
|
return `!${this.atom.value.toStringParens(this.atom.type)}`
|
||||||
case "Flavor":
|
case 'Flavor':
|
||||||
return this.atom.flavor == null ? `#` : `#${this.atom.flavor}`
|
return this.atom.flavor == null ? `#` : `#${this.atom.flavor}`
|
||||||
case "Any":
|
case 'Any':
|
||||||
return "*"
|
return '*'
|
||||||
case "None":
|
case 'None':
|
||||||
return "!"
|
return '!'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static parseAtom(atom: P.VersionRangeAtom): VersionRange {
|
private static parseAtom(atom: P.VersionRangeAtom): VersionRange {
|
||||||
switch (atom.type) {
|
switch (atom.type) {
|
||||||
case "Not":
|
case 'Not':
|
||||||
return new VersionRange({
|
return new VersionRange({
|
||||||
type: "Not",
|
type: 'Not',
|
||||||
value: VersionRange.parseAtom(atom.value),
|
value: VersionRange.parseAtom(atom.value),
|
||||||
})
|
})
|
||||||
case "Parens":
|
case 'Parens':
|
||||||
return VersionRange.parseRange(atom.expr)
|
return VersionRange.parseRange(atom.expr)
|
||||||
case "Anchor":
|
case 'Anchor':
|
||||||
return new VersionRange({
|
return new VersionRange({
|
||||||
type: "Anchor",
|
type: 'Anchor',
|
||||||
operator: atom.operator || "^",
|
operator: atom.operator || '^',
|
||||||
version: new ExtendedVersion(
|
version: new ExtendedVersion(
|
||||||
atom.version.flavor,
|
atom.version.flavor,
|
||||||
new Version(
|
new Version(
|
||||||
@@ -532,7 +532,7 @@ export class VersionRange {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
})
|
})
|
||||||
case "Flavor":
|
case 'Flavor':
|
||||||
return VersionRange.flavor(atom.flavor)
|
return VersionRange.flavor(atom.flavor)
|
||||||
default:
|
default:
|
||||||
return new VersionRange(atom)
|
return new VersionRange(atom)
|
||||||
@@ -543,17 +543,17 @@ export class VersionRange {
|
|||||||
let result = VersionRange.parseAtom(range[0])
|
let result = VersionRange.parseAtom(range[0])
|
||||||
for (const next of range[1]) {
|
for (const next of range[1]) {
|
||||||
switch (next[1]?.[0]) {
|
switch (next[1]?.[0]) {
|
||||||
case "||":
|
case '||':
|
||||||
result = new VersionRange({
|
result = new VersionRange({
|
||||||
type: "Or",
|
type: 'Or',
|
||||||
left: result,
|
left: result,
|
||||||
right: VersionRange.parseAtom(next[2]),
|
right: VersionRange.parseAtom(next[2]),
|
||||||
})
|
})
|
||||||
break
|
break
|
||||||
case "&&":
|
case '&&':
|
||||||
default:
|
default:
|
||||||
result = new VersionRange({
|
result = new VersionRange({
|
||||||
type: "And",
|
type: 'And',
|
||||||
left: result,
|
left: result,
|
||||||
right: VersionRange.parseAtom(next[2]),
|
right: VersionRange.parseAtom(next[2]),
|
||||||
})
|
})
|
||||||
@@ -565,49 +565,49 @@ export class VersionRange {
|
|||||||
|
|
||||||
static parse(range: string): VersionRange {
|
static parse(range: string): VersionRange {
|
||||||
return VersionRange.parseRange(
|
return VersionRange.parseRange(
|
||||||
P.parse(range, { startRule: "VersionRange" }),
|
P.parse(range, { startRule: 'VersionRange' }),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
static anchor(operator: P.CmpOp, version: ExtendedVersion) {
|
static anchor(operator: P.CmpOp, version: ExtendedVersion) {
|
||||||
return new VersionRange({ type: "Anchor", operator, version })
|
return new VersionRange({ type: 'Anchor', operator, version })
|
||||||
}
|
}
|
||||||
|
|
||||||
static flavor(flavor: string | null) {
|
static flavor(flavor: string | null) {
|
||||||
return new VersionRange({ type: "Flavor", flavor })
|
return new VersionRange({ type: 'Flavor', flavor })
|
||||||
}
|
}
|
||||||
|
|
||||||
static parseEmver(range: string): VersionRange {
|
static parseEmver(range: string): VersionRange {
|
||||||
return VersionRange.parseRange(
|
return VersionRange.parseRange(
|
||||||
P.parse(range, { startRule: "EmverVersionRange" }),
|
P.parse(range, { startRule: 'EmverVersionRange' }),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
and(right: VersionRange) {
|
and(right: VersionRange) {
|
||||||
return new VersionRange({ type: "And", left: this, right })
|
return new VersionRange({ type: 'And', left: this, right })
|
||||||
}
|
}
|
||||||
|
|
||||||
or(right: VersionRange) {
|
or(right: VersionRange) {
|
||||||
return new VersionRange({ type: "Or", left: this, right })
|
return new VersionRange({ type: 'Or', left: this, right })
|
||||||
}
|
}
|
||||||
|
|
||||||
not() {
|
not() {
|
||||||
return new VersionRange({ type: "Not", value: this })
|
return new VersionRange({ type: 'Not', value: this })
|
||||||
}
|
}
|
||||||
|
|
||||||
static and(...xs: Array<VersionRange>) {
|
static and(...xs: Array<VersionRange>) {
|
||||||
let y = VersionRange.any()
|
let y = VersionRange.any()
|
||||||
for (let x of xs) {
|
for (let x of xs) {
|
||||||
if (x.atom.type == "Any") {
|
if (x.atom.type == 'Any') {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if (x.atom.type == "None") {
|
if (x.atom.type == 'None') {
|
||||||
return x
|
return x
|
||||||
}
|
}
|
||||||
if (y.atom.type == "Any") {
|
if (y.atom.type == 'Any') {
|
||||||
y = x
|
y = x
|
||||||
} else {
|
} else {
|
||||||
y = new VersionRange({ type: "And", left: y, right: x })
|
y = new VersionRange({ type: 'And', left: y, right: x })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return y
|
return y
|
||||||
@@ -616,27 +616,27 @@ export class VersionRange {
|
|||||||
static or(...xs: Array<VersionRange>) {
|
static or(...xs: Array<VersionRange>) {
|
||||||
let y = VersionRange.none()
|
let y = VersionRange.none()
|
||||||
for (let x of xs) {
|
for (let x of xs) {
|
||||||
if (x.atom.type == "None") {
|
if (x.atom.type == 'None') {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if (x.atom.type == "Any") {
|
if (x.atom.type == 'Any') {
|
||||||
return x
|
return x
|
||||||
}
|
}
|
||||||
if (y.atom.type == "None") {
|
if (y.atom.type == 'None') {
|
||||||
y = x
|
y = x
|
||||||
} else {
|
} else {
|
||||||
y = new VersionRange({ type: "Or", left: y, right: x })
|
y = new VersionRange({ type: 'Or', left: y, right: x })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return y
|
return y
|
||||||
}
|
}
|
||||||
|
|
||||||
static any() {
|
static any() {
|
||||||
return new VersionRange({ type: "Any" })
|
return new VersionRange({ type: 'Any' })
|
||||||
}
|
}
|
||||||
|
|
||||||
static none() {
|
static none() {
|
||||||
return new VersionRange({ type: "None" })
|
return new VersionRange({ type: 'None' })
|
||||||
}
|
}
|
||||||
|
|
||||||
satisfiedBy(version: Version | ExtendedVersion) {
|
satisfiedBy(version: Version | ExtendedVersion) {
|
||||||
@@ -645,23 +645,23 @@ export class VersionRange {
|
|||||||
|
|
||||||
tables(): VersionRangeTables {
|
tables(): VersionRangeTables {
|
||||||
switch (this.atom.type) {
|
switch (this.atom.type) {
|
||||||
case "Anchor":
|
case 'Anchor':
|
||||||
switch (this.atom.operator) {
|
switch (this.atom.operator) {
|
||||||
case "=":
|
case '=':
|
||||||
// `=1.2.3` is equivalent to `>=1.2.3 && <=1.2.4 && #flavor`
|
// `=1.2.3` is equivalent to `>=1.2.3 && <=1.2.4 && #flavor`
|
||||||
return VersionRangeTable.and(
|
return VersionRangeTable.and(
|
||||||
VersionRangeTable.cmp(this.atom.version, -1, false, true),
|
VersionRangeTable.cmp(this.atom.version, -1, false, true),
|
||||||
VersionRangeTable.cmp(this.atom.version, 1, true, false),
|
VersionRangeTable.cmp(this.atom.version, 1, true, false),
|
||||||
)
|
)
|
||||||
case ">":
|
case '>':
|
||||||
return VersionRangeTable.cmp(this.atom.version, 1, false, true)
|
return VersionRangeTable.cmp(this.atom.version, 1, false, true)
|
||||||
case "<":
|
case '<':
|
||||||
return VersionRangeTable.cmp(this.atom.version, -1, true, false)
|
return VersionRangeTable.cmp(this.atom.version, -1, true, false)
|
||||||
case ">=":
|
case '>=':
|
||||||
return VersionRangeTable.cmp(this.atom.version, -1, false, true)
|
return VersionRangeTable.cmp(this.atom.version, -1, false, true)
|
||||||
case "<=":
|
case '<=':
|
||||||
return VersionRangeTable.cmp(this.atom.version, 1, true, false)
|
return VersionRangeTable.cmp(this.atom.version, 1, true, false)
|
||||||
case "!=":
|
case '!=':
|
||||||
// `!=1.2.3` is equivalent to `!(>=1.2.3 && <=1.2.3 && #flavor)`
|
// `!=1.2.3` is equivalent to `!(>=1.2.3 && <=1.2.3 && #flavor)`
|
||||||
// **not** equivalent to `(<1.2.3 || >1.2.3) && #flavor`
|
// **not** equivalent to `(<1.2.3 || >1.2.3) && #flavor`
|
||||||
return VersionRangeTable.not(
|
return VersionRangeTable.not(
|
||||||
@@ -670,7 +670,7 @@ export class VersionRange {
|
|||||||
VersionRangeTable.cmp(this.atom.version, 1, true, false),
|
VersionRangeTable.cmp(this.atom.version, 1, true, false),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
case "^":
|
case '^':
|
||||||
// `^1.2.3` is equivalent to `>=1.2.3 && <2.0.0 && #flavor`
|
// `^1.2.3` is equivalent to `>=1.2.3 && <2.0.0 && #flavor`
|
||||||
return VersionRangeTable.and(
|
return VersionRangeTable.and(
|
||||||
VersionRangeTable.cmp(this.atom.version, -1, false, true),
|
VersionRangeTable.cmp(this.atom.version, -1, false, true),
|
||||||
@@ -681,7 +681,7 @@ export class VersionRange {
|
|||||||
false,
|
false,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
case "~":
|
case '~':
|
||||||
// `~1.2.3` is equivalent to `>=1.2.3 && <1.3.0 && #flavor`
|
// `~1.2.3` is equivalent to `>=1.2.3 && <1.3.0 && #flavor`
|
||||||
return VersionRangeTable.and(
|
return VersionRangeTable.and(
|
||||||
VersionRangeTable.cmp(this.atom.version, -1, false, true),
|
VersionRangeTable.cmp(this.atom.version, -1, false, true),
|
||||||
@@ -693,23 +693,23 @@ export class VersionRange {
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
case "Flavor":
|
case 'Flavor':
|
||||||
return VersionRangeTable.eqFlavor(this.atom.flavor)
|
return VersionRangeTable.eqFlavor(this.atom.flavor)
|
||||||
case "Not":
|
case 'Not':
|
||||||
return VersionRangeTable.not(this.atom.value.tables())
|
return VersionRangeTable.not(this.atom.value.tables())
|
||||||
case "And":
|
case 'And':
|
||||||
return VersionRangeTable.and(
|
return VersionRangeTable.and(
|
||||||
this.atom.left.tables(),
|
this.atom.left.tables(),
|
||||||
this.atom.right.tables(),
|
this.atom.right.tables(),
|
||||||
)
|
)
|
||||||
case "Or":
|
case 'Or':
|
||||||
return VersionRangeTable.or(
|
return VersionRangeTable.or(
|
||||||
this.atom.left.tables(),
|
this.atom.left.tables(),
|
||||||
this.atom.right.tables(),
|
this.atom.right.tables(),
|
||||||
)
|
)
|
||||||
case "Any":
|
case 'Any':
|
||||||
return true
|
return true
|
||||||
case "None":
|
case 'None':
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -734,23 +734,23 @@ export class Version {
|
|||||||
) {}
|
) {}
|
||||||
|
|
||||||
toString(): string {
|
toString(): string {
|
||||||
return `${this.number.join(".")}${this.prerelease.length > 0 ? `-${this.prerelease.join(".")}` : ""}`
|
return `${this.number.join('.')}${this.prerelease.length > 0 ? `-${this.prerelease.join('.')}` : ''}`
|
||||||
}
|
}
|
||||||
|
|
||||||
compare(other: Version): "greater" | "equal" | "less" {
|
compare(other: Version): 'greater' | 'equal' | 'less' {
|
||||||
const numLen = Math.max(this.number.length, other.number.length)
|
const numLen = Math.max(this.number.length, other.number.length)
|
||||||
for (let i = 0; i < numLen; i++) {
|
for (let i = 0; i < numLen; i++) {
|
||||||
if ((this.number[i] || 0) > (other.number[i] || 0)) {
|
if ((this.number[i] || 0) > (other.number[i] || 0)) {
|
||||||
return "greater"
|
return 'greater'
|
||||||
} else if ((this.number[i] || 0) < (other.number[i] || 0)) {
|
} else if ((this.number[i] || 0) < (other.number[i] || 0)) {
|
||||||
return "less"
|
return 'less'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.prerelease.length === 0 && other.prerelease.length !== 0) {
|
if (this.prerelease.length === 0 && other.prerelease.length !== 0) {
|
||||||
return "greater"
|
return 'greater'
|
||||||
} else if (this.prerelease.length !== 0 && other.prerelease.length === 0) {
|
} else if (this.prerelease.length !== 0 && other.prerelease.length === 0) {
|
||||||
return "less"
|
return 'less'
|
||||||
}
|
}
|
||||||
|
|
||||||
const prereleaseLen = Math.max(
|
const prereleaseLen = Math.max(
|
||||||
@@ -760,42 +760,42 @@ export class Version {
|
|||||||
for (let i = 0; i < prereleaseLen; i++) {
|
for (let i = 0; i < prereleaseLen; i++) {
|
||||||
if (typeof this.prerelease[i] === typeof other.prerelease[i]) {
|
if (typeof this.prerelease[i] === typeof other.prerelease[i]) {
|
||||||
if (this.prerelease[i] > other.prerelease[i]) {
|
if (this.prerelease[i] > other.prerelease[i]) {
|
||||||
return "greater"
|
return 'greater'
|
||||||
} else if (this.prerelease[i] < other.prerelease[i]) {
|
} else if (this.prerelease[i] < other.prerelease[i]) {
|
||||||
return "less"
|
return 'less'
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
switch (`${typeof this.prerelease[1]}:${typeof other.prerelease[i]}`) {
|
switch (`${typeof this.prerelease[1]}:${typeof other.prerelease[i]}`) {
|
||||||
case "number:string":
|
case 'number:string':
|
||||||
return "less"
|
return 'less'
|
||||||
case "string:number":
|
case 'string:number':
|
||||||
return "greater"
|
return 'greater'
|
||||||
case "number:undefined":
|
case 'number:undefined':
|
||||||
case "string:undefined":
|
case 'string:undefined':
|
||||||
return "greater"
|
return 'greater'
|
||||||
case "undefined:number":
|
case 'undefined:number':
|
||||||
case "undefined:string":
|
case 'undefined:string':
|
||||||
return "less"
|
return 'less'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return "equal"
|
return 'equal'
|
||||||
}
|
}
|
||||||
|
|
||||||
compareForSort(other: Version): -1 | 0 | 1 {
|
compareForSort(other: Version): -1 | 0 | 1 {
|
||||||
switch (this.compare(other)) {
|
switch (this.compare(other)) {
|
||||||
case "greater":
|
case 'greater':
|
||||||
return 1
|
return 1
|
||||||
case "equal":
|
case 'equal':
|
||||||
return 0
|
return 0
|
||||||
case "less":
|
case 'less':
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static parse(version: string): Version {
|
static parse(version: string): Version {
|
||||||
const parsed = P.parse(version, { startRule: "Version" })
|
const parsed = P.parse(version, { startRule: 'Version' })
|
||||||
return new Version(parsed.number, parsed.prerelease)
|
return new Version(parsed.number, parsed.prerelease)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -815,25 +815,25 @@ export class ExtendedVersion {
|
|||||||
) {}
|
) {}
|
||||||
|
|
||||||
toString(): string {
|
toString(): string {
|
||||||
return `${this.flavor ? `#${this.flavor}:` : ""}${this.upstream.toString()}:${this.downstream.toString()}`
|
return `${this.flavor ? `#${this.flavor}:` : ''}${this.upstream.toString()}:${this.downstream.toString()}`
|
||||||
}
|
}
|
||||||
|
|
||||||
compare(other: ExtendedVersion): "greater" | "equal" | "less" | null {
|
compare(other: ExtendedVersion): 'greater' | 'equal' | 'less' | null {
|
||||||
if (this.flavor !== other.flavor) {
|
if (this.flavor !== other.flavor) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
const upstreamCmp = this.upstream.compare(other.upstream)
|
const upstreamCmp = this.upstream.compare(other.upstream)
|
||||||
if (upstreamCmp !== "equal") {
|
if (upstreamCmp !== 'equal') {
|
||||||
return upstreamCmp
|
return upstreamCmp
|
||||||
}
|
}
|
||||||
return this.downstream.compare(other.downstream)
|
return this.downstream.compare(other.downstream)
|
||||||
}
|
}
|
||||||
|
|
||||||
compareLexicographic(other: ExtendedVersion): "greater" | "equal" | "less" {
|
compareLexicographic(other: ExtendedVersion): 'greater' | 'equal' | 'less' {
|
||||||
if ((this.flavor || "") > (other.flavor || "")) {
|
if ((this.flavor || '') > (other.flavor || '')) {
|
||||||
return "greater"
|
return 'greater'
|
||||||
} else if ((this.flavor || "") > (other.flavor || "")) {
|
} else if ((this.flavor || '') > (other.flavor || '')) {
|
||||||
return "less"
|
return 'less'
|
||||||
} else {
|
} else {
|
||||||
return this.compare(other)!
|
return this.compare(other)!
|
||||||
}
|
}
|
||||||
@@ -841,37 +841,37 @@ export class ExtendedVersion {
|
|||||||
|
|
||||||
compareForSort(other: ExtendedVersion): 1 | 0 | -1 {
|
compareForSort(other: ExtendedVersion): 1 | 0 | -1 {
|
||||||
switch (this.compareLexicographic(other)) {
|
switch (this.compareLexicographic(other)) {
|
||||||
case "greater":
|
case 'greater':
|
||||||
return 1
|
return 1
|
||||||
case "equal":
|
case 'equal':
|
||||||
return 0
|
return 0
|
||||||
case "less":
|
case 'less':
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
greaterThan(other: ExtendedVersion): boolean {
|
greaterThan(other: ExtendedVersion): boolean {
|
||||||
return this.compare(other) === "greater"
|
return this.compare(other) === 'greater'
|
||||||
}
|
}
|
||||||
|
|
||||||
greaterThanOrEqual(other: ExtendedVersion): boolean {
|
greaterThanOrEqual(other: ExtendedVersion): boolean {
|
||||||
return ["greater", "equal"].includes(this.compare(other) as string)
|
return ['greater', 'equal'].includes(this.compare(other) as string)
|
||||||
}
|
}
|
||||||
|
|
||||||
equals(other: ExtendedVersion): boolean {
|
equals(other: ExtendedVersion): boolean {
|
||||||
return this.compare(other) === "equal"
|
return this.compare(other) === 'equal'
|
||||||
}
|
}
|
||||||
|
|
||||||
lessThan(other: ExtendedVersion): boolean {
|
lessThan(other: ExtendedVersion): boolean {
|
||||||
return this.compare(other) === "less"
|
return this.compare(other) === 'less'
|
||||||
}
|
}
|
||||||
|
|
||||||
lessThanOrEqual(other: ExtendedVersion): boolean {
|
lessThanOrEqual(other: ExtendedVersion): boolean {
|
||||||
return ["less", "equal"].includes(this.compare(other) as string)
|
return ['less', 'equal'].includes(this.compare(other) as string)
|
||||||
}
|
}
|
||||||
|
|
||||||
static parse(extendedVersion: string): ExtendedVersion {
|
static parse(extendedVersion: string): ExtendedVersion {
|
||||||
const parsed = P.parse(extendedVersion, { startRule: "ExtendedVersion" })
|
const parsed = P.parse(extendedVersion, { startRule: 'ExtendedVersion' })
|
||||||
return new ExtendedVersion(
|
return new ExtendedVersion(
|
||||||
parsed.flavor || null,
|
parsed.flavor || null,
|
||||||
new Version(parsed.upstream.number, parsed.upstream.prerelease),
|
new Version(parsed.upstream.number, parsed.upstream.prerelease),
|
||||||
@@ -881,7 +881,7 @@ export class ExtendedVersion {
|
|||||||
|
|
||||||
static parseEmver(extendedVersion: string): ExtendedVersion {
|
static parseEmver(extendedVersion: string): ExtendedVersion {
|
||||||
try {
|
try {
|
||||||
const parsed = P.parse(extendedVersion, { startRule: "Emver" })
|
const parsed = P.parse(extendedVersion, { startRule: 'Emver' })
|
||||||
return new ExtendedVersion(
|
return new ExtendedVersion(
|
||||||
parsed.flavor || null,
|
parsed.flavor || null,
|
||||||
new Version(parsed.upstream.number, parsed.upstream.prerelease),
|
new Version(parsed.upstream.number, parsed.upstream.prerelease),
|
||||||
@@ -956,22 +956,22 @@ export class ExtendedVersion {
|
|||||||
*/
|
*/
|
||||||
satisfies(versionRange: VersionRange): boolean {
|
satisfies(versionRange: VersionRange): boolean {
|
||||||
switch (versionRange.atom.type) {
|
switch (versionRange.atom.type) {
|
||||||
case "Anchor":
|
case 'Anchor':
|
||||||
const otherVersion = versionRange.atom.version
|
const otherVersion = versionRange.atom.version
|
||||||
switch (versionRange.atom.operator) {
|
switch (versionRange.atom.operator) {
|
||||||
case "=":
|
case '=':
|
||||||
return this.equals(otherVersion)
|
return this.equals(otherVersion)
|
||||||
case ">":
|
case '>':
|
||||||
return this.greaterThan(otherVersion)
|
return this.greaterThan(otherVersion)
|
||||||
case "<":
|
case '<':
|
||||||
return this.lessThan(otherVersion)
|
return this.lessThan(otherVersion)
|
||||||
case ">=":
|
case '>=':
|
||||||
return this.greaterThanOrEqual(otherVersion)
|
return this.greaterThanOrEqual(otherVersion)
|
||||||
case "<=":
|
case '<=':
|
||||||
return this.lessThanOrEqual(otherVersion)
|
return this.lessThanOrEqual(otherVersion)
|
||||||
case "!=":
|
case '!=':
|
||||||
return !this.equals(otherVersion)
|
return !this.equals(otherVersion)
|
||||||
case "^":
|
case '^':
|
||||||
const nextMajor = versionRange.atom.version.incrementMajor()
|
const nextMajor = versionRange.atom.version.incrementMajor()
|
||||||
if (
|
if (
|
||||||
this.greaterThanOrEqual(otherVersion) &&
|
this.greaterThanOrEqual(otherVersion) &&
|
||||||
@@ -981,7 +981,7 @@ export class ExtendedVersion {
|
|||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
case "~":
|
case '~':
|
||||||
const nextMinor = versionRange.atom.version.incrementMinor()
|
const nextMinor = versionRange.atom.version.incrementMinor()
|
||||||
if (
|
if (
|
||||||
this.greaterThanOrEqual(otherVersion) &&
|
this.greaterThanOrEqual(otherVersion) &&
|
||||||
@@ -992,23 +992,23 @@ export class ExtendedVersion {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case "Flavor":
|
case 'Flavor':
|
||||||
return versionRange.atom.flavor == this.flavor
|
return versionRange.atom.flavor == this.flavor
|
||||||
case "And":
|
case 'And':
|
||||||
return (
|
return (
|
||||||
this.satisfies(versionRange.atom.left) &&
|
this.satisfies(versionRange.atom.left) &&
|
||||||
this.satisfies(versionRange.atom.right)
|
this.satisfies(versionRange.atom.right)
|
||||||
)
|
)
|
||||||
case "Or":
|
case 'Or':
|
||||||
return (
|
return (
|
||||||
this.satisfies(versionRange.atom.left) ||
|
this.satisfies(versionRange.atom.left) ||
|
||||||
this.satisfies(versionRange.atom.right)
|
this.satisfies(versionRange.atom.right)
|
||||||
)
|
)
|
||||||
case "Not":
|
case 'Not':
|
||||||
return !this.satisfies(versionRange.atom.value)
|
return !this.satisfies(versionRange.atom.value)
|
||||||
case "Any":
|
case 'Any':
|
||||||
return true
|
return true
|
||||||
case "None":
|
case 'None':
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1020,34 +1020,34 @@ export const testTypeVersion = <T extends string>(t: T & ValidateVersion<T>) =>
|
|||||||
t
|
t
|
||||||
|
|
||||||
function tests() {
|
function tests() {
|
||||||
testTypeVersion("1.2.3")
|
testTypeVersion('1.2.3')
|
||||||
testTypeVersion("1")
|
testTypeVersion('1')
|
||||||
testTypeVersion("12.34.56")
|
testTypeVersion('12.34.56')
|
||||||
testTypeVersion("1.2-3")
|
testTypeVersion('1.2-3')
|
||||||
testTypeVersion("1-3")
|
testTypeVersion('1-3')
|
||||||
testTypeVersion("1-alpha")
|
testTypeVersion('1-alpha')
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
testTypeVersion("-3")
|
testTypeVersion('-3')
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
testTypeVersion("1.2.3:1")
|
testTypeVersion('1.2.3:1')
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
testTypeVersion("#cat:1:1")
|
testTypeVersion('#cat:1:1')
|
||||||
|
|
||||||
testTypeExVer("1.2.3:1.2.3")
|
testTypeExVer('1.2.3:1.2.3')
|
||||||
testTypeExVer("1.2.3.4.5.6.7.8.9.0:1")
|
testTypeExVer('1.2.3.4.5.6.7.8.9.0:1')
|
||||||
testTypeExVer("100:1")
|
testTypeExVer('100:1')
|
||||||
testTypeExVer("#cat:1:1")
|
testTypeExVer('#cat:1:1')
|
||||||
testTypeExVer("1.2.3.4.5.6.7.8.9.11.22.33:1")
|
testTypeExVer('1.2.3.4.5.6.7.8.9.11.22.33:1')
|
||||||
testTypeExVer("1-0:1")
|
testTypeExVer('1-0:1')
|
||||||
testTypeExVer("1-0:1")
|
testTypeExVer('1-0:1')
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
testTypeExVer("1.2-3")
|
testTypeExVer('1.2-3')
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
testTypeExVer("1-3")
|
testTypeExVer('1-3')
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
testTypeExVer("1.2.3.4.5.6.7.8.9.0.10:1" as string)
|
testTypeExVer('1.2.3.4.5.6.7.8.9.0.10:1' as string)
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
testTypeExVer("1.-2:1")
|
testTypeExVer('1.-2:1')
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
testTypeExVer("1..2.3:3")
|
testTypeExVer('1..2.3:3')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
export { S9pk } from "./s9pk"
|
export { S9pk } from './s9pk'
|
||||||
export { VersionRange, ExtendedVersion, Version } from "./exver"
|
export { VersionRange, ExtendedVersion, Version } from './exver'
|
||||||
|
|
||||||
export * as inputSpec from "./actions/input"
|
export * as inputSpec from './actions/input'
|
||||||
export * as ISB from "./actions/input/builder"
|
export * as ISB from './actions/input/builder'
|
||||||
export * as IST from "./actions/input/inputSpecTypes"
|
export * as IST from './actions/input/inputSpecTypes'
|
||||||
export * as types from "./types"
|
export * as types from './types'
|
||||||
export * as T from "./types"
|
export * as T from './types'
|
||||||
export * as yaml from "yaml"
|
export * as yaml from 'yaml'
|
||||||
export * as inits from "./inits"
|
export * as inits from './inits'
|
||||||
export * as matches from "ts-matches"
|
export * as matches from 'ts-matches'
|
||||||
|
|
||||||
export * as utils from "./util"
|
export * as utils from './util'
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
export * from "./setupInit"
|
export * from './setupInit'
|
||||||
export * from "./setupUninit"
|
export * from './setupUninit'
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { VersionRange } from "../../../base/lib/exver"
|
import { VersionRange } from '../../../base/lib/exver'
|
||||||
import * as T from "../../../base/lib/types"
|
import * as T from '../../../base/lib/types'
|
||||||
import { once } from "../util"
|
import { once } from '../util'
|
||||||
|
|
||||||
export type InitKind = "install" | "update" | "restore" | null
|
export type InitKind = 'install' | 'update' | 'restore' | null
|
||||||
|
|
||||||
export type InitFn<Kind extends InitKind = InitKind> = (
|
export type InitFn<Kind extends InitKind = InitKind> = (
|
||||||
effects: T.Effects,
|
effects: T.Effects,
|
||||||
@@ -31,7 +31,7 @@ export function setupInit(...inits: InitScriptOrFn[]): T.ExpectedExports.init {
|
|||||||
complete.then(() => fn()).catch(console.error),
|
complete.then(() => fn()).catch(console.error),
|
||||||
)
|
)
|
||||||
try {
|
try {
|
||||||
if ("init" in init) await init.init(e, opts.kind)
|
if ('init' in init) await init.init(e, opts.kind)
|
||||||
else await init(e, opts.kind)
|
else await init(e, opts.kind)
|
||||||
} finally {
|
} finally {
|
||||||
res()
|
res()
|
||||||
@@ -43,7 +43,7 @@ export function setupInit(...inits: InitScriptOrFn[]): T.ExpectedExports.init {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function setupOnInit(onInit: InitScriptOrFn): InitScript {
|
export function setupOnInit(onInit: InitScriptOrFn): InitScript {
|
||||||
return "init" in onInit
|
return 'init' in onInit
|
||||||
? onInit
|
? onInit
|
||||||
: {
|
: {
|
||||||
init: async (effects, kind) => {
|
init: async (effects, kind) => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { ExtendedVersion, VersionRange } from "../../../base/lib/exver"
|
import { ExtendedVersion, VersionRange } from '../../../base/lib/exver'
|
||||||
import * as T from "../../../base/lib/types"
|
import * as T from '../../../base/lib/types'
|
||||||
|
|
||||||
export type UninitFn = (
|
export type UninitFn = (
|
||||||
effects: T.Effects,
|
effects: T.Effects,
|
||||||
@@ -34,14 +34,14 @@ export function setupUninit(
|
|||||||
): T.ExpectedExports.uninit {
|
): T.ExpectedExports.uninit {
|
||||||
return async (opts) => {
|
return async (opts) => {
|
||||||
for (const uninit of uninits) {
|
for (const uninit of uninits) {
|
||||||
if ("uninit" in uninit) await uninit.uninit(opts.effects, opts.target)
|
if ('uninit' in uninit) await uninit.uninit(opts.effects, opts.target)
|
||||||
else await uninit(opts.effects, opts.target)
|
else await uninit(opts.effects, opts.target)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function setupOnUninit(onUninit: UninitScriptOrFn): UninitScript {
|
export function setupOnUninit(onUninit: UninitScriptOrFn): UninitScript {
|
||||||
return "uninit" in onUninit
|
return 'uninit' in onUninit
|
||||||
? onUninit
|
? onUninit
|
||||||
: {
|
: {
|
||||||
uninit: async (effects, target) => {
|
uninit: async (effects, target) => {
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { object, string } from "ts-matches"
|
import { object, string } from 'ts-matches'
|
||||||
import { Effects } from "../Effects"
|
import { Effects } from '../Effects'
|
||||||
import { Origin } from "./Origin"
|
import { Origin } from './Origin'
|
||||||
import { AddSslOptions, BindParams } from "../osBindings"
|
import { AddSslOptions, BindParams } from '../osBindings'
|
||||||
import { Security } from "../osBindings"
|
import { Security } from '../osBindings'
|
||||||
import { BindOptions } from "../osBindings"
|
import { BindOptions } from '../osBindings'
|
||||||
import { AlpnInfo } from "../osBindings"
|
import { AlpnInfo } from '../osBindings'
|
||||||
|
|
||||||
export { AddSslOptions, Security, BindOptions }
|
export { AddSslOptions, Security, BindOptions }
|
||||||
|
|
||||||
@@ -12,8 +12,8 @@ export const knownProtocols = {
|
|||||||
http: {
|
http: {
|
||||||
secure: null,
|
secure: null,
|
||||||
defaultPort: 80,
|
defaultPort: 80,
|
||||||
withSsl: "https",
|
withSsl: 'https',
|
||||||
alpn: { specified: ["http/1.1"] } as AlpnInfo,
|
alpn: { specified: ['http/1.1'] } as AlpnInfo,
|
||||||
},
|
},
|
||||||
https: {
|
https: {
|
||||||
secure: { ssl: true },
|
secure: { ssl: true },
|
||||||
@@ -22,8 +22,8 @@ export const knownProtocols = {
|
|||||||
ws: {
|
ws: {
|
||||||
secure: null,
|
secure: null,
|
||||||
defaultPort: 80,
|
defaultPort: 80,
|
||||||
withSsl: "wss",
|
withSsl: 'wss',
|
||||||
alpn: { specified: ["http/1.1"] } as AlpnInfo,
|
alpn: { specified: ['http/1.1'] } as AlpnInfo,
|
||||||
},
|
},
|
||||||
wss: {
|
wss: {
|
||||||
secure: { ssl: true },
|
secure: { ssl: true },
|
||||||
@@ -140,8 +140,8 @@ export class MultiHost {
|
|||||||
addXForwardedHeaders: false,
|
addXForwardedHeaders: false,
|
||||||
preferredExternalPort: knownProtocols[sslProto].defaultPort,
|
preferredExternalPort: knownProtocols[sslProto].defaultPort,
|
||||||
scheme: sslProto,
|
scheme: sslProto,
|
||||||
alpn: "alpn" in protoInfo ? protoInfo.alpn : null,
|
alpn: 'alpn' in protoInfo ? protoInfo.alpn : null,
|
||||||
...("addSsl" in options ? options.addSsl : null),
|
...('addSsl' in options ? options.addSsl : null),
|
||||||
}
|
}
|
||||||
: options.addSsl
|
: options.addSsl
|
||||||
? {
|
? {
|
||||||
@@ -149,7 +149,7 @@ export class MultiHost {
|
|||||||
preferredExternalPort: 443,
|
preferredExternalPort: 443,
|
||||||
scheme: sslProto,
|
scheme: sslProto,
|
||||||
alpn: null,
|
alpn: null,
|
||||||
...("addSsl" in options ? options.addSsl : null),
|
...('addSsl' in options ? options.addSsl : null),
|
||||||
}
|
}
|
||||||
: null
|
: null
|
||||||
|
|
||||||
@@ -169,8 +169,8 @@ export class MultiHost {
|
|||||||
private getSslProto(options: BindOptionsByKnownProtocol) {
|
private getSslProto(options: BindOptionsByKnownProtocol) {
|
||||||
const proto = options.protocol
|
const proto = options.protocol
|
||||||
const protoInfo = knownProtocols[proto]
|
const protoInfo = knownProtocols[proto]
|
||||||
if (inObject("noAddSsl", options) && options.noAddSsl) return null
|
if (inObject('noAddSsl', options) && options.noAddSsl) return null
|
||||||
if ("withSsl" in protoInfo && protoInfo.withSsl) return protoInfo.withSsl
|
if ('withSsl' in protoInfo && protoInfo.withSsl) return protoInfo.withSsl
|
||||||
if (protoInfo.secure?.ssl) return proto
|
if (protoInfo.secure?.ssl) return proto
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { AddressInfo } from "../types"
|
import { AddressInfo } from '../types'
|
||||||
import { AddressReceipt } from "./AddressReceipt"
|
import { AddressReceipt } from './AddressReceipt'
|
||||||
import { MultiHost, Scheme } from "./Host"
|
import { MultiHost, Scheme } from './Host'
|
||||||
import { ServiceInterfaceBuilder } from "./ServiceInterfaceBuilder"
|
import { ServiceInterfaceBuilder } from './ServiceInterfaceBuilder'
|
||||||
|
|
||||||
export class Origin {
|
export class Origin {
|
||||||
constructor(
|
constructor(
|
||||||
@@ -21,9 +21,9 @@ export class Origin {
|
|||||||
.map(
|
.map(
|
||||||
([key, val]) => `${encodeURIComponent(key)}=${encodeURIComponent(val)}`,
|
([key, val]) => `${encodeURIComponent(key)}=${encodeURIComponent(val)}`,
|
||||||
)
|
)
|
||||||
.join("&")
|
.join('&')
|
||||||
|
|
||||||
const qp = qpEntries.length ? `?${qpEntries}` : ""
|
const qp = qpEntries.length ? `?${qpEntries}` : ''
|
||||||
|
|
||||||
return {
|
return {
|
||||||
hostId: this.host.options.id,
|
hostId: this.host.options.id,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { ServiceInterfaceType } from "../types"
|
import { ServiceInterfaceType } from '../types'
|
||||||
import { Effects } from "../Effects"
|
import { Effects } from '../Effects'
|
||||||
import { Scheme } from "./Host"
|
import { Scheme } from './Host'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A helper class for creating a Network Interface
|
* A helper class for creating a Network Interface
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import * as T from "../types"
|
import * as T from '../types'
|
||||||
import { once } from "../util"
|
import { once } from '../util'
|
||||||
import { AddressReceipt } from "./AddressReceipt"
|
import { AddressReceipt } from './AddressReceipt'
|
||||||
|
|
||||||
declare const UpdateServiceInterfacesProof: unique symbol
|
declare const UpdateServiceInterfacesProof: unique symbol
|
||||||
export type UpdateServiceInterfacesReceipt = {
|
export type UpdateServiceInterfacesReceipt = {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { AnyVerifyingKey } from "./AnyVerifyingKey"
|
import type { AnyVerifyingKey } from './AnyVerifyingKey'
|
||||||
|
|
||||||
export type AcceptSigners =
|
export type AcceptSigners =
|
||||||
| { signer: AnyVerifyingKey }
|
| { signer: AnyVerifyingKey }
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { Guid } from "./Guid"
|
import type { Guid } from './Guid'
|
||||||
|
|
||||||
export type ActionInput = {
|
export type ActionInput = {
|
||||||
eventId: Guid
|
eventId: Guid
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { ActionVisibility } from "./ActionVisibility"
|
import type { ActionVisibility } from './ActionVisibility'
|
||||||
import type { AllowedStatuses } from "./AllowedStatuses"
|
import type { AllowedStatuses } from './AllowedStatuses'
|
||||||
|
|
||||||
export type ActionMetadata = {
|
export type ActionMetadata = {
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { ActionResultV0 } from "./ActionResultV0"
|
import type { ActionResultV0 } from './ActionResultV0'
|
||||||
import type { ActionResultV1 } from "./ActionResultV1"
|
import type { ActionResultV1 } from './ActionResultV1'
|
||||||
|
|
||||||
export type ActionResult =
|
export type ActionResult =
|
||||||
| ({ version: "0" } & ActionResultV0)
|
| ({ version: '0' } & ActionResultV0)
|
||||||
| ({ version: "1" } & ActionResultV1)
|
| ({ version: '1' } & ActionResultV1)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export type ActionResultMember = {
|
|||||||
description: string | null
|
description: string | null
|
||||||
} & (
|
} & (
|
||||||
| {
|
| {
|
||||||
type: "single"
|
type: 'single'
|
||||||
/**
|
/**
|
||||||
* The actual string value to display
|
* The actual string value to display
|
||||||
*/
|
*/
|
||||||
@@ -30,7 +30,7 @@ export type ActionResultMember = {
|
|||||||
masked: boolean
|
masked: boolean
|
||||||
}
|
}
|
||||||
| {
|
| {
|
||||||
type: "group"
|
type: 'group'
|
||||||
/**
|
/**
|
||||||
* An new group of nested values, experienced by the user as an accordion dropdown
|
* An new group of nested values, experienced by the user as an accordion dropdown
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { ActionResultValue } from "./ActionResultValue"
|
import type { ActionResultValue } from './ActionResultValue'
|
||||||
|
|
||||||
export type ActionResultV1 = {
|
export type ActionResultV1 = {
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { ActionResultMember } from "./ActionResultMember"
|
import type { ActionResultMember } from './ActionResultMember'
|
||||||
|
|
||||||
export type ActionResultValue =
|
export type ActionResultValue =
|
||||||
| {
|
| {
|
||||||
type: "single"
|
type: 'single'
|
||||||
/**
|
/**
|
||||||
* The actual string value to display
|
* The actual string value to display
|
||||||
*/
|
*/
|
||||||
@@ -22,7 +22,7 @@ export type ActionResultValue =
|
|||||||
masked: boolean
|
masked: boolean
|
||||||
}
|
}
|
||||||
| {
|
| {
|
||||||
type: "group"
|
type: 'group'
|
||||||
/**
|
/**
|
||||||
* An new group of nested values, experienced by the user as an accordion dropdown
|
* An new group of nested values, experienced by the user as an accordion dropdown
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
export type ActionVisibility = "hidden" | { disabled: string } | "enabled"
|
export type ActionVisibility = 'hidden' | { disabled: string } | 'enabled'
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { Guid } from "./Guid"
|
import type { Guid } from './Guid'
|
||||||
|
|
||||||
export type AddAdminParams = { signer: Guid }
|
export type AddAdminParams = { signer: Guid }
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { AnySignature } from "./AnySignature"
|
import type { AnySignature } from './AnySignature'
|
||||||
import type { Blake3Commitment } from "./Blake3Commitment"
|
import type { Blake3Commitment } from './Blake3Commitment'
|
||||||
|
|
||||||
export type AddAssetParams = {
|
export type AddAssetParams = {
|
||||||
version: string
|
version: string
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { LocaleString } from "./LocaleString"
|
import type { LocaleString } from './LocaleString'
|
||||||
|
|
||||||
export type AddCategoryParams = { id: string; name: LocaleString }
|
export type AddCategoryParams = { id: string; name: LocaleString }
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { AnySignature } from "./AnySignature"
|
import type { AnySignature } from './AnySignature'
|
||||||
import type { MerkleArchiveCommitment } from "./MerkleArchiveCommitment"
|
import type { MerkleArchiveCommitment } from './MerkleArchiveCommitment'
|
||||||
|
|
||||||
export type AddMirrorParams = {
|
export type AddMirrorParams = {
|
||||||
url: string
|
url: string
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { AnySignature } from "./AnySignature"
|
import type { AnySignature } from './AnySignature'
|
||||||
import type { MerkleArchiveCommitment } from "./MerkleArchiveCommitment"
|
import type { MerkleArchiveCommitment } from './MerkleArchiveCommitment'
|
||||||
|
|
||||||
export type AddPackageParams = {
|
export type AddPackageParams = {
|
||||||
urls: string[]
|
urls: string[]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { Guid } from "./Guid"
|
import type { Guid } from './Guid'
|
||||||
import type { PackageId } from "./PackageId"
|
import type { PackageId } from './PackageId'
|
||||||
|
|
||||||
export type AddPackageSignerParams = {
|
export type AddPackageSignerParams = {
|
||||||
id: PackageId
|
id: PackageId
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { PackageId } from "./PackageId"
|
import type { PackageId } from './PackageId'
|
||||||
|
|
||||||
export type AddPackageToCategoryParams = { id: string; package: PackageId }
|
export type AddPackageToCategoryParams = { id: string; package: PackageId }
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { AlpnInfo } from "./AlpnInfo"
|
import type { AlpnInfo } from './AlpnInfo'
|
||||||
|
|
||||||
export type AddSslOptions = {
|
export type AddSslOptions = {
|
||||||
preferredExternalPort: number
|
preferredExternalPort: number
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { HostId } from "./HostId"
|
import type { HostId } from './HostId'
|
||||||
|
|
||||||
export type AddressInfo = {
|
export type AddressInfo = {
|
||||||
username: string | null
|
username: string | null
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { LocaleString } from "./LocaleString"
|
import type { LocaleString } from './LocaleString'
|
||||||
|
|
||||||
export type Alerts = {
|
export type Alerts = {
|
||||||
install: LocaleString | null
|
install: LocaleString | null
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
export type Algorithm = "ecdsa" | "ed25519"
|
export type Algorithm = 'ecdsa' | 'ed25519'
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { PackageDataEntry } from "./PackageDataEntry"
|
import type { PackageDataEntry } from './PackageDataEntry'
|
||||||
import type { PackageId } from "./PackageId"
|
import type { PackageId } from './PackageId'
|
||||||
|
|
||||||
export type AllPackageData = { [key: PackageId]: PackageDataEntry }
|
export type AllPackageData = { [key: PackageId]: PackageDataEntry }
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
export type AllowedStatuses = "only-running" | "only-stopped" | "any"
|
export type AllowedStatuses = 'only-running' | 'only-stopped' | 'any'
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { MaybeUtf8String } from "./MaybeUtf8String"
|
import type { MaybeUtf8String } from './MaybeUtf8String'
|
||||||
|
|
||||||
export type AlpnInfo = "reflect" | { specified: Array<MaybeUtf8String> }
|
export type AlpnInfo = 'reflect' | { specified: Array<MaybeUtf8String> }
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
export type ApiState = "error" | "initializing" | "running"
|
export type ApiState = 'error' | 'initializing' | 'running'
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { EncryptedWire } from "./EncryptedWire"
|
import type { EncryptedWire } from './EncryptedWire'
|
||||||
|
|
||||||
export type AttachParams = {
|
export type AttachParams = {
|
||||||
password: EncryptedWire | null
|
password: EncryptedWire | null
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { BlockDev } from "./BlockDev"
|
import type { BlockDev } from './BlockDev'
|
||||||
import type { Cifs } from "./Cifs"
|
import type { Cifs } from './Cifs'
|
||||||
|
|
||||||
export type BackupTargetFS =
|
export type BackupTargetFS =
|
||||||
| ({ type: "disk" } & BlockDev)
|
| ({ type: 'disk' } & BlockDev)
|
||||||
| ({ type: "cifs" } & Cifs)
|
| ({ type: 'cifs' } & Cifs)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { HostId } from "./HostId"
|
import type { HostId } from './HostId'
|
||||||
|
|
||||||
export type BindId = { id: HostId; internalPort: number }
|
export type BindId = { id: HostId; internalPort: number }
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { BindOptions } from "./BindOptions"
|
import type { BindOptions } from './BindOptions'
|
||||||
import type { NetInfo } from "./NetInfo"
|
import type { NetInfo } from './NetInfo'
|
||||||
|
|
||||||
export type BindInfo = { enabled: boolean; options: BindOptions; net: NetInfo }
|
export type BindInfo = { enabled: boolean; options: BindOptions; net: NetInfo }
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { AddSslOptions } from "./AddSslOptions"
|
import type { AddSslOptions } from './AddSslOptions'
|
||||||
import type { Security } from "./Security"
|
import type { Security } from './Security'
|
||||||
|
|
||||||
export type BindOptions = {
|
export type BindOptions = {
|
||||||
preferredExternalPort: number
|
preferredExternalPort: number
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { AddSslOptions } from "./AddSslOptions"
|
import type { AddSslOptions } from './AddSslOptions'
|
||||||
import type { HostId } from "./HostId"
|
import type { HostId } from './HostId'
|
||||||
import type { Security } from "./Security"
|
import type { Security } from './Security'
|
||||||
|
|
||||||
export type BindParams = {
|
export type BindParams = {
|
||||||
id: HostId
|
id: HostId
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { GatewayId } from "./GatewayId"
|
import type { GatewayId } from './GatewayId'
|
||||||
|
|
||||||
export type BindingGatewaySetEnabledParams = {
|
export type BindingGatewaySetEnabledParams = {
|
||||||
internalPort: number
|
internalPort: number
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { Base64 } from "./Base64"
|
import type { Base64 } from './Base64'
|
||||||
|
|
||||||
export type Blake3Commitment = { hash: Base64; size: number }
|
export type Blake3Commitment = { hash: Base64; size: number }
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { LocaleString } from "./LocaleString"
|
import type { LocaleString } from './LocaleString'
|
||||||
|
|
||||||
export type Category = { name: LocaleString }
|
export type Category = { name: LocaleString }
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { PackageId } from "./PackageId"
|
import type { PackageId } from './PackageId'
|
||||||
|
|
||||||
export type CheckDependenciesParam = { packageIds?: Array<PackageId> }
|
export type CheckDependenciesParam = { packageIds?: Array<PackageId> }
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { HealthCheckId } from "./HealthCheckId"
|
import type { HealthCheckId } from './HealthCheckId'
|
||||||
import type { NamedHealthCheckResult } from "./NamedHealthCheckResult"
|
import type { NamedHealthCheckResult } from './NamedHealthCheckResult'
|
||||||
import type { PackageId } from "./PackageId"
|
import type { PackageId } from './PackageId'
|
||||||
import type { ReplayId } from "./ReplayId"
|
import type { ReplayId } from './ReplayId'
|
||||||
import type { TaskEntry } from "./TaskEntry"
|
import type { TaskEntry } from './TaskEntry'
|
||||||
import type { Version } from "./Version"
|
import type { Version } from './Version'
|
||||||
|
|
||||||
export type CheckDependenciesResult = {
|
export type CheckDependenciesResult = {
|
||||||
packageId: PackageId
|
packageId: PackageId
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { ActionId } from "./ActionId"
|
import type { ActionId } from './ActionId'
|
||||||
|
|
||||||
export type ClearActionsParams = { except: Array<ActionId> }
|
export type ClearActionsParams = { except: Array<ActionId> }
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { BindId } from "./BindId"
|
import type { BindId } from './BindId'
|
||||||
|
|
||||||
export type ClearBindingsParams = { except: Array<BindId> }
|
export type ClearBindingsParams = { except: Array<BindId> }
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { ServiceInterfaceId } from "./ServiceInterfaceId"
|
import type { ServiceInterfaceId } from './ServiceInterfaceId'
|
||||||
|
|
||||||
export type ClearServiceInterfacesParams = { except: Array<ServiceInterfaceId> }
|
export type ClearServiceInterfacesParams = { except: Array<ServiceInterfaceId> }
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { ImageId } from "./ImageId"
|
import type { ImageId } from './ImageId'
|
||||||
|
|
||||||
export type CreateSubcontainerFsParams = {
|
export type CreateSubcontainerFsParams = {
|
||||||
imageId: ImageId
|
imageId: ImageId
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { ActionId } from "./ActionId"
|
import type { ActionId } from './ActionId'
|
||||||
import type { PackageId } from "./PackageId"
|
import type { PackageId } from './PackageId'
|
||||||
import type { ReplayId } from "./ReplayId"
|
import type { ReplayId } from './ReplayId'
|
||||||
import type { TaskInput } from "./TaskInput"
|
import type { TaskInput } from './TaskInput'
|
||||||
import type { TaskSeverity } from "./TaskSeverity"
|
import type { TaskSeverity } from './TaskSeverity'
|
||||||
import type { TaskTrigger } from "./TaskTrigger"
|
import type { TaskTrigger } from './TaskTrigger'
|
||||||
|
|
||||||
export type CreateTaskParams = {
|
export type CreateTaskParams = {
|
||||||
replayId: ReplayId
|
replayId: ReplayId
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { CurrentDependencyInfo } from "./CurrentDependencyInfo"
|
import type { CurrentDependencyInfo } from './CurrentDependencyInfo'
|
||||||
import type { PackageId } from "./PackageId"
|
import type { PackageId } from './PackageId'
|
||||||
|
|
||||||
export type CurrentDependencies = { [key: PackageId]: CurrentDependencyInfo }
|
export type CurrentDependencies = { [key: PackageId]: CurrentDependencyInfo }
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { DataUrl } from "./DataUrl"
|
import type { DataUrl } from './DataUrl'
|
||||||
import type { LocaleString } from "./LocaleString"
|
import type { LocaleString } from './LocaleString'
|
||||||
|
|
||||||
export type CurrentDependencyInfo = {
|
export type CurrentDependencyInfo = {
|
||||||
title: LocaleString | null
|
title: LocaleString | null
|
||||||
icon: DataUrl | null
|
icon: DataUrl | null
|
||||||
versionRange: string
|
versionRange: string
|
||||||
} & ({ kind: "exists" } | { kind: "running"; healthChecks: string[] })
|
} & ({ kind: 'exists' } | { kind: 'running'; healthChecks: string[] })
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { MetadataSrc } from "./MetadataSrc"
|
import type { MetadataSrc } from './MetadataSrc'
|
||||||
|
|
||||||
export type DepInfo = {
|
export type DepInfo = {
|
||||||
description: string | null
|
description: string | null
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { DepInfo } from "./DepInfo"
|
import type { DepInfo } from './DepInfo'
|
||||||
import type { PackageId } from "./PackageId"
|
import type { PackageId } from './PackageId'
|
||||||
|
|
||||||
export type Dependencies = { [key: PackageId]: DepInfo }
|
export type Dependencies = { [key: PackageId]: DepInfo }
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { DataUrl } from "./DataUrl"
|
import type { DataUrl } from './DataUrl'
|
||||||
import type { LocaleString } from "./LocaleString"
|
import type { LocaleString } from './LocaleString'
|
||||||
|
|
||||||
export type DependencyMetadata = {
|
export type DependencyMetadata = {
|
||||||
title: LocaleString | null
|
title: LocaleString | null
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { HealthCheckId } from "./HealthCheckId"
|
import type { HealthCheckId } from './HealthCheckId'
|
||||||
import type { PackageId } from "./PackageId"
|
import type { PackageId } from './PackageId'
|
||||||
|
|
||||||
export type DependencyRequirement =
|
export type DependencyRequirement =
|
||||||
| {
|
| {
|
||||||
kind: "running"
|
kind: 'running'
|
||||||
id: PackageId
|
id: PackageId
|
||||||
healthChecks: Array<HealthCheckId>
|
healthChecks: Array<HealthCheckId>
|
||||||
versionRange: string
|
versionRange: string
|
||||||
}
|
}
|
||||||
| { kind: "exists"; id: PackageId; versionRange: string }
|
| { kind: 'exists'; id: PackageId; versionRange: string }
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { LocaleString } from "./LocaleString"
|
import type { LocaleString } from './LocaleString'
|
||||||
|
|
||||||
export type Description = { short: LocaleString; long: LocaleString }
|
export type Description = { short: LocaleString; long: LocaleString }
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { StartStop } from "./StartStop"
|
import type { StartStop } from './StartStop'
|
||||||
|
|
||||||
export type DesiredStatus =
|
export type DesiredStatus =
|
||||||
| { main: "stopped" }
|
| { main: 'stopped' }
|
||||||
| { main: "restarting" }
|
| { main: 'restarting' }
|
||||||
| { main: "running" }
|
| { main: 'running' }
|
||||||
| { main: "backing-up"; onComplete: StartStop }
|
| { main: 'backing-up'; onComplete: StartStop }
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { Guid } from "./Guid"
|
import type { Guid } from './Guid'
|
||||||
|
|
||||||
export type DestroySubcontainerFsParams = { guid: Guid }
|
export type DestroySubcontainerFsParams = { guid: Guid }
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
export type DeviceFilter = {
|
export type DeviceFilter = {
|
||||||
description: string
|
description: string
|
||||||
class: "processor" | "display"
|
class: 'processor' | 'display'
|
||||||
product: string | null
|
product: string | null
|
||||||
vendor: string | null
|
vendor: string | null
|
||||||
capabilities?: Array<string>
|
capabilities?: Array<string>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { GatewayId } from "./GatewayId"
|
import type { GatewayId } from './GatewayId'
|
||||||
|
|
||||||
export type DomainSettings = { gateway: GatewayId }
|
export type DomainSettings = { gateway: GatewayId }
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { AnyVerifyingKey } from "./AnyVerifyingKey"
|
import type { AnyVerifyingKey } from './AnyVerifyingKey'
|
||||||
import type { ContactInfo } from "./ContactInfo"
|
import type { ContactInfo } from './ContactInfo'
|
||||||
import type { Guid } from "./Guid"
|
import type { Guid } from './Guid'
|
||||||
|
|
||||||
export type EditSignerParams = {
|
export type EditSignerParams = {
|
||||||
id: Guid
|
id: Guid
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { Guid } from "./Guid"
|
import type { Guid } from './Guid'
|
||||||
|
|
||||||
export type EventId = { eventId: Guid }
|
export type EventId = { eventId: Guid }
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { ActionId } from "./ActionId"
|
import type { ActionId } from './ActionId'
|
||||||
import type { ActionMetadata } from "./ActionMetadata"
|
import type { ActionMetadata } from './ActionMetadata'
|
||||||
|
|
||||||
export type ExportActionParams = { id: ActionId; metadata: ActionMetadata }
|
export type ExportActionParams = { id: ActionId; metadata: ActionMetadata }
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { AddressInfo } from "./AddressInfo"
|
import type { AddressInfo } from './AddressInfo'
|
||||||
import type { ServiceInterfaceId } from "./ServiceInterfaceId"
|
import type { ServiceInterfaceId } from './ServiceInterfaceId'
|
||||||
import type { ServiceInterfaceType } from "./ServiceInterfaceType"
|
import type { ServiceInterfaceType } from './ServiceInterfaceType'
|
||||||
|
|
||||||
export type ExportServiceInterfaceParams = {
|
export type ExportServiceInterfaceParams = {
|
||||||
id: ServiceInterfaceId
|
id: ServiceInterfaceId
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
export type FileType = "file" | "directory" | "infer"
|
export type FileType = 'file' | 'directory' | 'infer'
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { DataUrl } from "./DataUrl"
|
import type { DataUrl } from './DataUrl'
|
||||||
import type { Guid } from "./Guid"
|
import type { Guid } from './Guid'
|
||||||
import type { OsIndex } from "./OsIndex"
|
import type { OsIndex } from './OsIndex'
|
||||||
import type { PackageIndex } from "./PackageIndex"
|
import type { PackageIndex } from './PackageIndex'
|
||||||
import type { SignerInfo } from "./SignerInfo"
|
import type { SignerInfo } from './SignerInfo'
|
||||||
|
|
||||||
export type FullIndex = {
|
export type FullIndex = {
|
||||||
name: string | null
|
name: string | null
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { NamedProgress } from "./NamedProgress"
|
import type { NamedProgress } from './NamedProgress'
|
||||||
import type { Progress } from "./Progress"
|
import type { Progress } from './Progress'
|
||||||
|
|
||||||
export type FullProgress = { overall: Progress; phases: Array<NamedProgress> }
|
export type FullProgress = { overall: Progress; phases: Array<NamedProgress> }
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { GatewayId } from "./GatewayId"
|
import type { GatewayId } from './GatewayId'
|
||||||
|
|
||||||
export type GatewayInfo = { id: GatewayId; name: string; public: boolean }
|
export type GatewayInfo = { id: GatewayId; name: string; public: boolean }
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { ActionId } from "./ActionId"
|
import type { ActionId } from './ActionId'
|
||||||
import type { PackageId } from "./PackageId"
|
import type { PackageId } from './PackageId'
|
||||||
|
|
||||||
export type GetActionInputParams = { packageId?: PackageId; actionId: ActionId }
|
export type GetActionInputParams = { packageId?: PackageId; actionId: ActionId }
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { CallbackId } from "./CallbackId"
|
import type { CallbackId } from './CallbackId'
|
||||||
import type { PackageId } from "./PackageId"
|
import type { PackageId } from './PackageId'
|
||||||
|
|
||||||
export type GetContainerIpParams = {
|
export type GetContainerIpParams = {
|
||||||
packageId?: PackageId
|
packageId?: PackageId
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { CallbackId } from "./CallbackId"
|
import type { CallbackId } from './CallbackId'
|
||||||
import type { HostId } from "./HostId"
|
import type { HostId } from './HostId'
|
||||||
import type { PackageId } from "./PackageId"
|
import type { PackageId } from './PackageId'
|
||||||
|
|
||||||
export type GetHostInfoParams = {
|
export type GetHostInfoParams = {
|
||||||
hostId: HostId
|
hostId: HostId
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { PackageDetailLevel } from "./PackageDetailLevel"
|
import type { PackageDetailLevel } from './PackageDetailLevel'
|
||||||
import type { PackageId } from "./PackageId"
|
import type { PackageId } from './PackageId'
|
||||||
import type { Version } from "./Version"
|
import type { Version } from './Version'
|
||||||
|
|
||||||
export type GetPackageParams = {
|
export type GetPackageParams = {
|
||||||
id: PackageId | null
|
id: PackageId | null
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { PackageInfoShort } from "./PackageInfoShort"
|
import type { PackageInfoShort } from './PackageInfoShort'
|
||||||
import type { PackageVersionInfo } from "./PackageVersionInfo"
|
import type { PackageVersionInfo } from './PackageVersionInfo'
|
||||||
import type { Version } from "./Version"
|
import type { Version } from './Version'
|
||||||
|
|
||||||
export type GetPackageResponse = {
|
export type GetPackageResponse = {
|
||||||
categories: string[]
|
categories: string[]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { PackageVersionInfo } from "./PackageVersionInfo"
|
import type { PackageVersionInfo } from './PackageVersionInfo'
|
||||||
import type { Version } from "./Version"
|
import type { Version } from './Version'
|
||||||
|
|
||||||
export type GetPackageResponseFull = {
|
export type GetPackageResponseFull = {
|
||||||
categories: string[]
|
categories: string[]
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { CallbackId } from "./CallbackId"
|
import type { CallbackId } from './CallbackId'
|
||||||
import type { PackageId } from "./PackageId"
|
import type { PackageId } from './PackageId'
|
||||||
import type { ServiceInterfaceId } from "./ServiceInterfaceId"
|
import type { ServiceInterfaceId } from './ServiceInterfaceId'
|
||||||
|
|
||||||
export type GetServiceInterfaceParams = {
|
export type GetServiceInterfaceParams = {
|
||||||
packageId?: PackageId
|
packageId?: PackageId
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { CallbackId } from "./CallbackId"
|
import type { CallbackId } from './CallbackId'
|
||||||
import type { PackageId } from "./PackageId"
|
import type { PackageId } from './PackageId'
|
||||||
|
|
||||||
export type GetServiceManifestParams = {
|
export type GetServiceManifestParams = {
|
||||||
packageId: PackageId
|
packageId: PackageId
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { HostId } from "./HostId"
|
import type { HostId } from './HostId'
|
||||||
import type { PackageId } from "./PackageId"
|
import type { PackageId } from './PackageId'
|
||||||
|
|
||||||
export type GetServicePortForwardParams = {
|
export type GetServicePortForwardParams = {
|
||||||
packageId?: PackageId
|
packageId?: PackageId
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { Algorithm } from "./Algorithm"
|
import type { Algorithm } from './Algorithm'
|
||||||
import type { CallbackId } from "./CallbackId"
|
import type { CallbackId } from './CallbackId'
|
||||||
|
|
||||||
export type GetSslCertificateParams = {
|
export type GetSslCertificateParams = {
|
||||||
hostnames: string[]
|
hostnames: string[]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { Algorithm } from "./Algorithm"
|
import type { Algorithm } from './Algorithm'
|
||||||
|
|
||||||
export type GetSslKeyParams = { hostnames: string[]; algorithm?: Algorithm }
|
export type GetSslKeyParams = { hostnames: string[]; algorithm?: Algorithm }
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { CallbackId } from "./CallbackId"
|
import type { CallbackId } from './CallbackId'
|
||||||
import type { PackageId } from "./PackageId"
|
import type { PackageId } from './PackageId'
|
||||||
|
|
||||||
export type GetStatusParams = { packageId?: PackageId; callback?: CallbackId }
|
export type GetStatusParams = { packageId?: PackageId; callback?: CallbackId }
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { CallbackId } from "./CallbackId"
|
import type { CallbackId } from './CallbackId'
|
||||||
|
|
||||||
export type GetSystemSmtpParams = { callback: CallbackId | null }
|
export type GetSystemSmtpParams = { callback: CallbackId | null }
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { DeviceFilter } from "./DeviceFilter"
|
import type { DeviceFilter } from './DeviceFilter'
|
||||||
|
|
||||||
export type HardwareRequirements = {
|
export type HardwareRequirements = {
|
||||||
device: Array<DeviceFilter>
|
device: Array<DeviceFilter>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { BindInfo } from "./BindInfo"
|
import type { BindInfo } from './BindInfo'
|
||||||
import type { HostnameInfo } from "./HostnameInfo"
|
import type { HostnameInfo } from './HostnameInfo'
|
||||||
import type { PublicDomainConfig } from "./PublicDomainConfig"
|
import type { PublicDomainConfig } from './PublicDomainConfig'
|
||||||
|
|
||||||
export type Host = {
|
export type Host = {
|
||||||
bindings: { [key: number]: BindInfo }
|
bindings: { [key: number]: BindInfo }
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { GatewayInfo } from "./GatewayInfo"
|
import type { GatewayInfo } from './GatewayInfo'
|
||||||
import type { IpHostname } from "./IpHostname"
|
import type { IpHostname } from './IpHostname'
|
||||||
import type { OnionHostname } from "./OnionHostname"
|
import type { OnionHostname } from './OnionHostname'
|
||||||
|
|
||||||
export type HostnameInfo =
|
export type HostnameInfo =
|
||||||
| { kind: "ip"; gateway: GatewayInfo; public: boolean; hostname: IpHostname }
|
| { kind: 'ip'; gateway: GatewayInfo; public: boolean; hostname: IpHostname }
|
||||||
| { kind: "onion"; hostname: OnionHostname }
|
| { kind: 'onion'; hostname: OnionHostname }
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { Host } from "./Host"
|
import type { Host } from './Host'
|
||||||
import type { HostId } from "./HostId"
|
import type { HostId } from './HostId'
|
||||||
|
|
||||||
export type Hosts = { [key: HostId]: Host }
|
export type Hosts = { [key: HostId]: Host }
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { ImageSource } from "./ImageSource"
|
import type { ImageSource } from './ImageSource'
|
||||||
|
|
||||||
export type ImageConfig = {
|
export type ImageConfig = {
|
||||||
source: ImageSource
|
source: ImageSource
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
import type { BuildArg } from "./BuildArg"
|
import type { BuildArg } from './BuildArg'
|
||||||
|
|
||||||
export type ImageSource =
|
export type ImageSource =
|
||||||
| "packed"
|
| 'packed'
|
||||||
| {
|
| {
|
||||||
dockerBuild: {
|
dockerBuild: {
|
||||||
workdir?: string
|
workdir?: string
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user