mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-30 12:21:57 +00:00
chore: Do the migrations
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Effects, ExpectedExports } from "../types";
|
||||
import { Utils, utils } from "../util";
|
||||
import { Daemons } from "./Daemons";
|
||||
export * as network from "./exportInterfaces";
|
||||
export { LocalBinding } from "./LocalBinding";
|
||||
@@ -21,14 +22,18 @@ export { Daemons } from "./Daemons";
|
||||
* @param fn
|
||||
* @returns
|
||||
*/
|
||||
export const runningMain: (
|
||||
export const setupMain = <WrapperData>(
|
||||
fn: (o: {
|
||||
effects: Effects;
|
||||
started(onTerm: () => void): null;
|
||||
utils: Utils<WrapperData>;
|
||||
}) => Promise<Daemons<any>>,
|
||||
) => ExpectedExports.main = (fn) => {
|
||||
): ExpectedExports.main => {
|
||||
return async (options) => {
|
||||
const result = await fn(options);
|
||||
const result = await fn({
|
||||
...options,
|
||||
utils: utils<WrapperData>(options.effects),
|
||||
});
|
||||
await result.build().then((x) => x.wait());
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user