mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
Merge branch 'integration/new-container-runtime' of github.com:Start9Labs/start-os into integration/new-container-runtime
This commit is contained in:
@@ -228,7 +228,6 @@ export class SystemForEmbassy implements System {
|
||||
previousVersion: Optional<string>,
|
||||
): Promise<void> {
|
||||
if (previousVersion) await this.migration(effects, previousVersion)
|
||||
await this.properties(effects)
|
||||
await effects.setMainStatus({ status: "stopped" })
|
||||
}
|
||||
private async uninit(
|
||||
@@ -458,9 +457,12 @@ export class SystemForEmbassy implements System {
|
||||
path: "/properties",
|
||||
value: exposeUis.map((x) => x.value),
|
||||
})
|
||||
await effects.exposeUi(
|
||||
exposeUis.map((x, i) => ({ ...x, path: `/properties/${i}` }) as any),
|
||||
)
|
||||
await effects.exposeUi({
|
||||
paths: exposeUis.map((x, i) => ({
|
||||
...x,
|
||||
path: `/properties/${i}`,
|
||||
})) as any[],
|
||||
})
|
||||
} else if (setConfigValue.type === "script") {
|
||||
const moduleCode = this.moduleCode
|
||||
const method = moduleCode.properties
|
||||
@@ -479,9 +481,12 @@ export class SystemForEmbassy implements System {
|
||||
path: "/properties",
|
||||
value: exposeUis.map((x) => x.value),
|
||||
})
|
||||
await effects.exposeUi(
|
||||
exposeUis.map((x, i) => ({ ...x, path: `/properties/${i}` }) as any),
|
||||
)
|
||||
await effects.exposeUi({
|
||||
paths: exposeUis.map((x, i) => ({
|
||||
...x,
|
||||
path: `/properties/${i}`,
|
||||
})) as any[],
|
||||
})
|
||||
}
|
||||
}
|
||||
private async health(
|
||||
|
||||
@@ -340,6 +340,9 @@ async fn set_store(
|
||||
.or_not_found(&package_id)?
|
||||
.as_store_mut();
|
||||
let mut model_value = model.de()?;
|
||||
if model_value.is_null() {
|
||||
model_value = json!({});
|
||||
}
|
||||
path.set(&mut model_value, value, true)
|
||||
.with_kind(ErrorKind::ParseDbField)?;
|
||||
model.ser(&model_value)
|
||||
|
||||
@@ -32,7 +32,7 @@ export function setupInit<Manifest extends SDKManifest, Store>(
|
||||
utils,
|
||||
})
|
||||
await opts.effects.exposeForDependents(services)
|
||||
await opts.effects.exposeUi(ui)
|
||||
await opts.effects.exposeUi({ paths: ui })
|
||||
},
|
||||
uninit: async (opts) => {
|
||||
await migrations.uninit(opts)
|
||||
|
||||
@@ -372,7 +372,9 @@ export type Effects = {
|
||||
options: ExposeServicePaths<Store>,
|
||||
): Promise<void>
|
||||
|
||||
exposeUi<Store = never>(options: ExposeUiPaths<Store>): Promise<void>
|
||||
exposeUi<Store = never>(options: {
|
||||
paths: ExposeUiPaths<Store>
|
||||
}): Promise<void>
|
||||
/**
|
||||
* There are times that we want to see the addresses that where exported
|
||||
* @param options.addressId If we want to filter the address id
|
||||
|
||||
Reference in New Issue
Block a user