Updates
This commit is contained in:
+44
-1
@@ -1,6 +1,8 @@
|
||||
import { ToastStyles } from "@/twui/components/elements/Toast";
|
||||
import { DATASQUIREL_LoggedInUser } from "@moduletrace/datasquirel/dist/package-shared/types";
|
||||
import useAppInit from "../hooks/use-app-init";
|
||||
import { ServerWebSocket } from "bun";
|
||||
import { ChildProcess } from "child_process";
|
||||
|
||||
export type User = DATASQUIREL_LoggedInUser & {};
|
||||
|
||||
@@ -119,8 +121,15 @@ export type TCIConfigServiceConfig = {
|
||||
* Commoands to Run on first run
|
||||
*/
|
||||
init?: string[];
|
||||
logs?: TCIConfigServiceConfigLog[];
|
||||
};
|
||||
|
||||
export type TCIConfigServiceConfigLog =
|
||||
| string
|
||||
| {
|
||||
cmd: string;
|
||||
};
|
||||
|
||||
export type TCIConfigServiceHealthcheck = {
|
||||
cmd: string;
|
||||
test: string;
|
||||
@@ -183,6 +192,8 @@ export type PagePropsType = {
|
||||
deployment_id?: string | null;
|
||||
service?: ParsedDeploymentServiceConfig | null;
|
||||
children_services?: ParsedDeploymentServiceConfig[] | null;
|
||||
ws_url?: string | null;
|
||||
host?: string | null;
|
||||
};
|
||||
|
||||
export type APIReqObject = {
|
||||
@@ -219,6 +230,8 @@ export type TurboCIAdminAppContextType = ReturnType<typeof useAppInit>;
|
||||
|
||||
export const WebSocketEvents = [
|
||||
"client:ping",
|
||||
"client:service-server-logs",
|
||||
"client:kill-port",
|
||||
|
||||
"server:ping",
|
||||
"server:error",
|
||||
@@ -226,13 +239,23 @@ export const WebSocketEvents = [
|
||||
"server:ready",
|
||||
"server:success",
|
||||
"server:update",
|
||||
"server:service-server-logs",
|
||||
"server:killed-port",
|
||||
] as const;
|
||||
|
||||
export type WebSocketDataType = {
|
||||
event: (typeof WebSocketEvents)[number];
|
||||
message?: string;
|
||||
service?: ParsedDeploymentServiceConfig;
|
||||
service?: Omit<ParsedDeploymentServiceConfig, "servers">;
|
||||
server?: NormalizedServerObject;
|
||||
ttyd?: TtydInfoObject;
|
||||
port?: string | number;
|
||||
};
|
||||
|
||||
export type WebSocketMessageParam = {
|
||||
ws: ServerWebSocket<WebSocketData>;
|
||||
message?: string | Buffer;
|
||||
data?: WebSocketDataType;
|
||||
};
|
||||
|
||||
export type WebSocketType = {
|
||||
@@ -248,3 +271,23 @@ export type ToastType = {
|
||||
toastOpen: boolean;
|
||||
closeDelay?: number;
|
||||
};
|
||||
|
||||
export type TtydInfoObject = {
|
||||
url: string;
|
||||
port: number;
|
||||
};
|
||||
|
||||
export const PrivateServerTtydParadigms = [
|
||||
{
|
||||
name: "logs",
|
||||
},
|
||||
{
|
||||
name: "terminal",
|
||||
},
|
||||
] as const;
|
||||
|
||||
export type WebSocketConnectedUserData = {
|
||||
user: User;
|
||||
child_processes: ChildProcess[];
|
||||
ports: (string | number)[];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user