mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-31 04:33:40 +00:00
chore: Fix some types
This commit is contained in:
@@ -3,7 +3,6 @@ import { CheckResult } from "../health/checkFns";
|
|||||||
import { Trigger } from "../health/trigger";
|
import { Trigger } from "../health/trigger";
|
||||||
import { Effects, ValidIfNoStupidEscape } from "../types";
|
import { Effects, ValidIfNoStupidEscape } from "../types";
|
||||||
import { InterfaceReceipt } from "./interfaceReceipt";
|
import { InterfaceReceipt } from "./interfaceReceipt";
|
||||||
import { RunningMainRet } from "./RunningMainRet";
|
|
||||||
type Daemon<
|
type Daemon<
|
||||||
Ids extends string | never,
|
Ids extends string | never,
|
||||||
Command extends string,
|
Command extends string,
|
||||||
@@ -54,10 +53,10 @@ export class Daemons<Ids extends string | never> {
|
|||||||
private constructor(
|
private constructor(
|
||||||
readonly effects: Effects,
|
readonly effects: Effects,
|
||||||
readonly started: (onTerm: () => void) => null,
|
readonly started: (onTerm: () => void) => null,
|
||||||
readonly daemons?: Daemon<Ids, "command", never>[]
|
readonly daemons?: Daemon<Ids, "command", any>[]
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
static with(config: {
|
static of(config: {
|
||||||
effects: Effects;
|
effects: Effects;
|
||||||
started: (onTerm: () => void) => null;
|
started: (onTerm: () => void) => null;
|
||||||
interfaceReceipt: InterfaceReceipt;
|
interfaceReceipt: InterfaceReceipt;
|
||||||
@@ -74,6 +73,6 @@ export class Daemons<Ids extends string | never> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
return todo<RunningMainRet>();
|
return todo<any>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
import { Daemon } from "../types";
|
|
||||||
import { ReadyProof } from "./ReadyProof";
|
|
||||||
|
|
||||||
export type RunningMainRet = {
|
|
||||||
[ReadyProof]: never;
|
|
||||||
daemon: Daemon;
|
|
||||||
};
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import { RunningMainRet } from "./RunningMainRet";
|
|
||||||
import { Effects, ExpectedExports } from "../types";
|
import { Effects, ExpectedExports } from "../types";
|
||||||
|
import { Daemons } from "./Daemons";
|
||||||
export * as network from "./exportInterfaces";
|
export * as network from "./exportInterfaces";
|
||||||
export { LocalBinding } from "./LocalBinding";
|
export { LocalBinding } from "./LocalBinding";
|
||||||
export { LocalPort } from "./LocalPort";
|
export { LocalPort } from "./LocalPort";
|
||||||
@@ -25,10 +25,10 @@ export const runningMain: (
|
|||||||
fn: (o: {
|
fn: (o: {
|
||||||
effects: Effects;
|
effects: Effects;
|
||||||
started(onTerm: () => void): null;
|
started(onTerm: () => void): null;
|
||||||
}) => Promise<RunningMainRet>
|
}) => Promise<Daemons<any>>
|
||||||
) => ExpectedExports.main = (fn) => {
|
) => ExpectedExports.main = (fn) => {
|
||||||
return async (options) => {
|
return async (options) => {
|
||||||
const { daemon } = await fn(options);
|
/// TODO BLUJ
|
||||||
daemon.wait();
|
return null as any;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "start-sdk",
|
"name": "start-sdk",
|
||||||
"version": "0.4.0-lib0.charlie11",
|
"version": "0.4.0-lib0.charlie12",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "start-sdk",
|
"name": "start-sdk",
|
||||||
"version": "0.4.0-lib0.charlie11",
|
"version": "0.4.0-lib0.charlie12",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@iarna/toml": "^2.2.5",
|
"@iarna/toml": "^2.2.5",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "start-sdk",
|
"name": "start-sdk",
|
||||||
"version": "0.4.0-lib0.charlie11",
|
"version": "0.4.0-lib0.charlie12",
|
||||||
"description": "For making the patterns that are wanted in making services for the startOS.",
|
"description": "For making the patterns that are wanted in making services for the startOS.",
|
||||||
"main": "./lib/index.js",
|
"main": "./lib/index.js",
|
||||||
"types": "./lib/index.d.ts",
|
"types": "./lib/index.d.ts",
|
||||||
|
|||||||
Reference in New Issue
Block a user