chore: Add some of the fixes to make the build work !!!

This commit is contained in:
J H
2024-03-13 17:44:13 -06:00
parent b6fe0be1b2
commit a089d544a5
16 changed files with 48 additions and 33 deletions

View File

@@ -32,7 +32,14 @@ export function setupInit<Manifest extends SDKManifest, Store>(
utils,
})
await opts.effects.exposeForDependents(services)
await opts.effects.exposeUi({ paths: ui })
await opts.effects.exposeUi({
paths: ui.map((x) => ({
description: null,
copyable: null,
qr: null,
...x,
})),
})
},
uninit: async (opts) => {
await migrations.uninit(opts)

View File

@@ -57,7 +57,7 @@ describe("startosTypeValidation ", () => {
exists: {} as ParamsPackageId,
getConfigured: undefined,
stopped: {} as ParamsMaybePackageId,
running: {} as ParamsMaybePackageId,
running: {} as ParamsPackageId,
restart: undefined,
shutdown: undefined,
setConfigured: {} as SetConfigured,

View File

@@ -269,7 +269,7 @@ export type ExposeUiPaths<Store> = Array<{
/** A human readable description or explanation of the value */
description?: string
/** (string/number only) Whether or not to mask the value, for example, when displaying a password */
masked?: boolean
masked: boolean
/** (string/number only) Whether or not to include a button for copying the value to clipboard */
copyable?: boolean
/** (string/number only) Whether or not to include a button for displaying the value as a QR code */
@@ -278,7 +278,7 @@ export type ExposeUiPaths<Store> = Array<{
/** Used to reach out from the pure js runtime */
export type Effects = {
executeAction<Input>(opts: {
serviceId?: string
serviceId: string | null
input: Input
}): Promise<unknown>
@@ -362,10 +362,10 @@ export type Effects = {
/**
* Get the port address for another service
*/
getServicePortForward(
internalPort: number,
packageId?: string,
): Promise<number>
getServicePortForward(options: {
internalPort: number
packageId: string | null
}): Promise<number>
/** Removes all network interfaces */
clearServiceInterfaces(): Promise<void>
@@ -379,11 +379,11 @@ export type Effects = {
exposeUi<Store = never>(options: {
paths: {
path: string
title: string
description?: string | undefined
masked?: boolean | undefined
copyable?: boolean | undefined
qr?: boolean | undefined
title: string | null
description: string | null
masked: boolean | null
copyable: boolean | null
qr: boolean | null
}[]
}): Promise<void>
/**