blu-j paired changes

This commit is contained in:
Shadowy Super Coder
2024-03-20 13:43:34 -06:00
parent 41bc519855
commit ddd5e4c76d
8 changed files with 11 additions and 9 deletions

View File

@@ -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<Value, Error> {
todo!()
}
async fn get_container_ip(context: EffectContext, _: Empty) -> Result<Value, Error> {
async fn get_container_ip(context: EffectContext, _: Empty) -> Result<Ipv4Addr, Error> {
todo!()
}
async fn get_service_port_forward(

View File

@@ -275,7 +275,7 @@ export class StartSdk<Manifest extends SDKManifest, Store> {
Store,
Input,
any
>
> | null
},
) => setupDependencyConfig<Store, Input, Manifest>(config, autoConfigs),
setupExports: (fn: SetupExports<Store>) => fn,

View File

@@ -15,7 +15,7 @@ export function setupDependencyConfig<
Store,
Input,
any
>
> | null
},
): ExpectedExports.dependencyConfig {
return autoConfigs

View File

@@ -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"

View File

@@ -3,11 +3,11 @@ import { Effects, ExposeServicePaths, ExposeUiPaths } from "../types"
export type SetupExports<Store> = (opts: { effects: Effects }) =>
| {
ui: { [k: string]: ExposeUiPaths<Store> }
services: ExposeServicePaths<Store>
services: ExposeServicePaths<Store>["paths"]
}
| Promise<{
ui: { [k: string]: ExposeUiPaths<Store> }
services: ExposeServicePaths<Store>
services: ExposeServicePaths<Store>["paths"]
}>
export const setupExports = <Store>(fn: (opts: SetupExports<Store>) => void) =>

View File

@@ -25,7 +25,7 @@ export function setupInit<Manifest extends SDKManifest, Store>(
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) => {

View File

@@ -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<PackageId, DependencyConfig>
export type dependencyConfig = Record<PackageId, DependencyConfig | null>
}
export type TimeMs = number
export type VersionString = string

View File

@@ -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<A> = NeverPossible extends A
? never
: A
: A
export { getDefaultString } from "./getDefaultString"