mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
feat(cli): manage workspace scripts (#1992)
* feat(cli): manage workspace scripts * docs: document workspace script management --------- Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
This commit is contained in:
@@ -2179,6 +2179,47 @@ export class DaemonClient {
|
||||
});
|
||||
}
|
||||
|
||||
async listWorkspaceScripts(
|
||||
workspaceId: string,
|
||||
requestId?: string,
|
||||
): Promise<
|
||||
Extract<SessionOutboundMessage, { type: "workspace.script.list.response" }>["payload"]
|
||||
> {
|
||||
return this.sendCorrelatedSessionRequest({
|
||||
requestId,
|
||||
message: { type: "workspace.script.list.request", workspaceId },
|
||||
responseType: "workspace.script.list.response",
|
||||
});
|
||||
}
|
||||
|
||||
async startWorkspaceScriptWithStatus(
|
||||
workspaceId: string,
|
||||
scriptName: string,
|
||||
requestId?: string,
|
||||
): Promise<
|
||||
Extract<SessionOutboundMessage, { type: "workspace.script.start.response" }>["payload"]
|
||||
> {
|
||||
return this.sendCorrelatedSessionRequest({
|
||||
requestId,
|
||||
message: { type: "workspace.script.start.request", workspaceId, scriptName },
|
||||
responseType: "workspace.script.start.response",
|
||||
});
|
||||
}
|
||||
|
||||
async stopWorkspaceScript(
|
||||
workspaceId: string,
|
||||
scriptName: string,
|
||||
requestId?: string,
|
||||
): Promise<
|
||||
Extract<SessionOutboundMessage, { type: "workspace.script.stop.response" }>["payload"]
|
||||
> {
|
||||
return this.sendCorrelatedSessionRequest({
|
||||
requestId,
|
||||
message: { type: "workspace.script.stop.request", workspaceId, scriptName },
|
||||
responseType: "workspace.script.stop.response",
|
||||
});
|
||||
}
|
||||
|
||||
async archiveWorkspace(
|
||||
workspaceId: string,
|
||||
requestId?: string,
|
||||
|
||||
Reference in New Issue
Block a user