From ddd5e4c76d13740f9d0c1a7db35c7b444808992e Mon Sep 17 00:00:00 2001 From: Shadowy Super Coder Date: Wed, 20 Mar 2024 13:43:34 -0600 Subject: [PATCH] blu-j paired changes --- core/startos/src/service/service_effect_handler.rs | 3 ++- sdk/lib/StartSdk.ts | 2 +- sdk/lib/dependencyConfig/setupDependencyConfig.ts | 2 +- sdk/lib/index.ts | 2 +- sdk/lib/inits/setupExports.ts | 4 ++-- sdk/lib/inits/setupInit.ts | 2 +- sdk/lib/types.ts | 2 +- sdk/lib/util/index.ts | 3 ++- 8 files changed, 11 insertions(+), 9 deletions(-) diff --git a/core/startos/src/service/service_effect_handler.rs b/core/startos/src/service/service_effect_handler.rs index 585da0d7d..e8082e99e 100644 --- a/core/startos/src/service/service_effect_handler.rs +++ b/core/startos/src/service/service_effect_handler.rs @@ -4,6 +4,7 @@ use std::os::unix::process::CommandExt; use std::path::{Path, PathBuf}; use std::str::FromStr; use std::sync::{Arc, Weak}; +use std::net::Ipv4Addr; use clap::builder::ValueParserFactory; use clap::Parser; @@ -335,7 +336,7 @@ async fn get_system_smtp( ) -> Result { todo!() } -async fn get_container_ip(context: EffectContext, _: Empty) -> Result { +async fn get_container_ip(context: EffectContext, _: Empty) -> Result { todo!() } async fn get_service_port_forward( diff --git a/sdk/lib/StartSdk.ts b/sdk/lib/StartSdk.ts index 315dacecf..660950b6c 100644 --- a/sdk/lib/StartSdk.ts +++ b/sdk/lib/StartSdk.ts @@ -275,7 +275,7 @@ export class StartSdk { Store, Input, any - > + > | null }, ) => setupDependencyConfig(config, autoConfigs), setupExports: (fn: SetupExports) => fn, diff --git a/sdk/lib/dependencyConfig/setupDependencyConfig.ts b/sdk/lib/dependencyConfig/setupDependencyConfig.ts index 3b6776945..c67c46a44 100644 --- a/sdk/lib/dependencyConfig/setupDependencyConfig.ts +++ b/sdk/lib/dependencyConfig/setupDependencyConfig.ts @@ -15,7 +15,7 @@ export function setupDependencyConfig< Store, Input, any - > + > | null }, ): ExpectedExports.dependencyConfig { return autoConfigs diff --git a/sdk/lib/index.ts b/sdk/lib/index.ts index dbdc2ce7d..35c58411f 100644 --- a/sdk/lib/index.ts +++ b/sdk/lib/index.ts @@ -19,10 +19,10 @@ export * as manifest from "./manifest" export * as toml from "@iarna/toml" export * as types from "./types" export * as T from "./types" -export * as util from "./util" export * as yaml from "yaml" export * as startSdk from "./StartSdk" +export * as utils from "./util" export * as matches from "ts-matches" export * as YAML from "yaml" export * as TOML from "@iarna/toml" diff --git a/sdk/lib/inits/setupExports.ts b/sdk/lib/inits/setupExports.ts index 5f7c2b23f..089f8a41d 100644 --- a/sdk/lib/inits/setupExports.ts +++ b/sdk/lib/inits/setupExports.ts @@ -3,11 +3,11 @@ import { Effects, ExposeServicePaths, ExposeUiPaths } from "../types" export type SetupExports = (opts: { effects: Effects }) => | { ui: { [k: string]: ExposeUiPaths } - services: ExposeServicePaths + services: ExposeServicePaths["paths"] } | Promise<{ ui: { [k: string]: ExposeUiPaths } - services: ExposeServicePaths + services: ExposeServicePaths["paths"] }> export const setupExports = (fn: (opts: SetupExports) => void) => diff --git a/sdk/lib/inits/setupInit.ts b/sdk/lib/inits/setupInit.ts index ed7ccaad8..80e1a202e 100644 --- a/sdk/lib/inits/setupInit.ts +++ b/sdk/lib/inits/setupInit.ts @@ -25,7 +25,7 @@ export function setupInit( input: null, }) const { services, ui } = await setupExports(opts) - await opts.effects.exposeForDependents(services) + await opts.effects.exposeForDependents({ paths: services }) await opts.effects.exposeUi(forExpose(ui)) }, uninit: async (opts) => { diff --git a/sdk/lib/types.ts b/sdk/lib/types.ts index 2da7a6fcc..add74a624 100644 --- a/sdk/lib/types.ts +++ b/sdk/lib/types.ts @@ -92,7 +92,7 @@ export namespace ExpectedExports { /** Auto configure is used to make sure that other dependencies have the values t * that this service could use. */ - export type dependencyConfig = Record + export type dependencyConfig = Record } export type TimeMs = number export type VersionString = string diff --git a/sdk/lib/util/index.ts b/sdk/lib/util/index.ts index 8cafa2cf6..aa69b9dc7 100644 --- a/sdk/lib/util/index.ts +++ b/sdk/lib/util/index.ts @@ -7,7 +7,6 @@ import "./deepEqual" import "./deepMerge" import "./Overlay" import "./once" -import { SDKManifest } from "../manifest/ManifestTypes" export { GetServiceInterface, getServiceInterface } from "./getServiceInterface" export { getServiceInterfaces } from "./getServiceInterfaces" @@ -30,3 +29,5 @@ export type NoAny = NeverPossible extends A ? never : A : A + +export { getDefaultString } from "./getDefaultString"