@miosa/cli 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +327 -0
- package/dist/bin/miosa.d.ts +3 -0
- package/dist/bin/miosa.d.ts.map +1 -0
- package/dist/bin/miosa.js +139 -0
- package/dist/bin/miosa.js.map +1 -0
- package/dist/client.d.ts +74 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +523 -0
- package/dist/client.js.map +1 -0
- package/dist/commands/agent.d.ts +18 -0
- package/dist/commands/agent.d.ts.map +1 -0
- package/dist/commands/agent.js +468 -0
- package/dist/commands/agent.js.map +1 -0
- package/dist/commands/alerts.d.ts +3 -0
- package/dist/commands/alerts.d.ts.map +1 -0
- package/dist/commands/alerts.js +41 -0
- package/dist/commands/alerts.js.map +1 -0
- package/dist/commands/api-keys.d.ts +3 -0
- package/dist/commands/api-keys.d.ts.map +1 -0
- package/dist/commands/api-keys.js +119 -0
- package/dist/commands/api-keys.js.map +1 -0
- package/dist/commands/api-resource.d.ts +20 -0
- package/dist/commands/api-resource.d.ts.map +1 -0
- package/dist/commands/api-resource.js +120 -0
- package/dist/commands/api-resource.js.map +1 -0
- package/dist/commands/apps.d.ts +3 -0
- package/dist/commands/apps.d.ts.map +1 -0
- package/dist/commands/apps.js +218 -0
- package/dist/commands/apps.js.map +1 -0
- package/dist/commands/audit.d.ts +3 -0
- package/dist/commands/audit.d.ts.map +1 -0
- package/dist/commands/audit.js +25 -0
- package/dist/commands/audit.js.map +1 -0
- package/dist/commands/auth.d.ts +3 -0
- package/dist/commands/auth.d.ts.map +1 -0
- package/dist/commands/auth.js +363 -0
- package/dist/commands/auth.js.map +1 -0
- package/dist/commands/backups.d.ts +3 -0
- package/dist/commands/backups.d.ts.map +1 -0
- package/dist/commands/backups.js +23 -0
- package/dist/commands/backups.js.map +1 -0
- package/dist/commands/checkpoints.d.ts +3 -0
- package/dist/commands/checkpoints.d.ts.map +1 -0
- package/dist/commands/checkpoints.js +33 -0
- package/dist/commands/checkpoints.js.map +1 -0
- package/dist/commands/computers.d.ts +3 -0
- package/dist/commands/computers.d.ts.map +1 -0
- package/dist/commands/computers.js +118 -0
- package/dist/commands/computers.js.map +1 -0
- package/dist/commands/config.d.ts +3 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +114 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/connect.d.ts +3 -0
- package/dist/commands/connect.d.ts.map +1 -0
- package/dist/commands/connect.js +96 -0
- package/dist/commands/connect.js.map +1 -0
- package/dist/commands/containers.d.ts +3 -0
- package/dist/commands/containers.d.ts.map +1 -0
- package/dist/commands/containers.js +20 -0
- package/dist/commands/containers.js.map +1 -0
- package/dist/commands/cp.d.ts +3 -0
- package/dist/commands/cp.d.ts.map +1 -0
- package/dist/commands/cp.js +102 -0
- package/dist/commands/cp.js.map +1 -0
- package/dist/commands/cron.d.ts +3 -0
- package/dist/commands/cron.d.ts.map +1 -0
- package/dist/commands/cron.js +65 -0
- package/dist/commands/cron.js.map +1 -0
- package/dist/commands/databases.d.ts +3 -0
- package/dist/commands/databases.d.ts.map +1 -0
- package/dist/commands/databases.js +222 -0
- package/dist/commands/databases.js.map +1 -0
- package/dist/commands/db.d.ts +3 -0
- package/dist/commands/db.d.ts.map +1 -0
- package/dist/commands/db.js +174 -0
- package/dist/commands/db.js.map +1 -0
- package/dist/commands/deploy.d.ts +3 -0
- package/dist/commands/deploy.d.ts.map +1 -0
- package/dist/commands/deploy.js +579 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/desktop.d.ts +3 -0
- package/dist/commands/desktop.d.ts.map +1 -0
- package/dist/commands/desktop.js +276 -0
- package/dist/commands/desktop.js.map +1 -0
- package/dist/commands/dev.d.ts +3 -0
- package/dist/commands/dev.d.ts.map +1 -0
- package/dist/commands/dev.js +246 -0
- package/dist/commands/dev.js.map +1 -0
- package/dist/commands/doctor.d.ts +3 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +241 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/domains.d.ts +3 -0
- package/dist/commands/domains.d.ts.map +1 -0
- package/dist/commands/domains.js +31 -0
- package/dist/commands/domains.js.map +1 -0
- package/dist/commands/enterprise-util.d.ts +37 -0
- package/dist/commands/enterprise-util.d.ts.map +1 -0
- package/dist/commands/enterprise-util.js +185 -0
- package/dist/commands/enterprise-util.js.map +1 -0
- package/dist/commands/exec.d.ts +3 -0
- package/dist/commands/exec.d.ts.map +1 -0
- package/dist/commands/exec.js +68 -0
- package/dist/commands/exec.js.map +1 -0
- package/dist/commands/functions.d.ts +3 -0
- package/dist/commands/functions.d.ts.map +1 -0
- package/dist/commands/functions.js +47 -0
- package/dist/commands/functions.js.map +1 -0
- package/dist/commands/gha-runners.d.ts +3 -0
- package/dist/commands/gha-runners.d.ts.map +1 -0
- package/dist/commands/gha-runners.js +33 -0
- package/dist/commands/gha-runners.js.map +1 -0
- package/dist/commands/groups.d.ts +3 -0
- package/dist/commands/groups.d.ts.map +1 -0
- package/dist/commands/groups.js +38 -0
- package/dist/commands/groups.js.map +1 -0
- package/dist/commands/host.d.ts +3 -0
- package/dist/commands/host.d.ts.map +1 -0
- package/dist/commands/host.js +74 -0
- package/dist/commands/host.js.map +1 -0
- package/dist/commands/hosts.d.ts +3 -0
- package/dist/commands/hosts.d.ts.map +1 -0
- package/dist/commands/hosts.js +90 -0
- package/dist/commands/hosts.js.map +1 -0
- package/dist/commands/link.d.ts +8 -0
- package/dist/commands/link.d.ts.map +1 -0
- package/dist/commands/link.js +124 -0
- package/dist/commands/link.js.map +1 -0
- package/dist/commands/login.d.ts +3 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +172 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logout.d.ts +3 -0
- package/dist/commands/logout.d.ts.map +1 -0
- package/dist/commands/logout.js +17 -0
- package/dist/commands/logout.js.map +1 -0
- package/dist/commands/logs.d.ts +3 -0
- package/dist/commands/logs.d.ts.map +1 -0
- package/dist/commands/logs.js +94 -0
- package/dist/commands/logs.js.map +1 -0
- package/dist/commands/ls.d.ts +3 -0
- package/dist/commands/ls.d.ts.map +1 -0
- package/dist/commands/ls.js +67 -0
- package/dist/commands/ls.js.map +1 -0
- package/dist/commands/machines.d.ts +3 -0
- package/dist/commands/machines.d.ts.map +1 -0
- package/dist/commands/machines.js +29 -0
- package/dist/commands/machines.js.map +1 -0
- package/dist/commands/mcp.d.ts +21 -0
- package/dist/commands/mcp.d.ts.map +1 -0
- package/dist/commands/mcp.js +1021 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/commands/meshes.d.ts +3 -0
- package/dist/commands/meshes.d.ts.map +1 -0
- package/dist/commands/meshes.js +27 -0
- package/dist/commands/meshes.js.map +1 -0
- package/dist/commands/network-policy.d.ts +3 -0
- package/dist/commands/network-policy.d.ts.map +1 -0
- package/dist/commands/network-policy.js +40 -0
- package/dist/commands/network-policy.js.map +1 -0
- package/dist/commands/project.d.ts +4 -0
- package/dist/commands/project.d.ts.map +1 -0
- package/dist/commands/project.js +25 -0
- package/dist/commands/project.js.map +1 -0
- package/dist/commands/pull.d.ts +3 -0
- package/dist/commands/pull.d.ts.map +1 -0
- package/dist/commands/pull.js +155 -0
- package/dist/commands/pull.js.map +1 -0
- package/dist/commands/regions.d.ts +3 -0
- package/dist/commands/regions.d.ts.map +1 -0
- package/dist/commands/regions.js +67 -0
- package/dist/commands/regions.js.map +1 -0
- package/dist/commands/releases.d.ts +3 -0
- package/dist/commands/releases.d.ts.map +1 -0
- package/dist/commands/releases.js +176 -0
- package/dist/commands/releases.js.map +1 -0
- package/dist/commands/rm.d.ts +3 -0
- package/dist/commands/rm.d.ts.map +1 -0
- package/dist/commands/rm.js +42 -0
- package/dist/commands/rm.js.map +1 -0
- package/dist/commands/run.d.ts +3 -0
- package/dist/commands/run.d.ts.map +1 -0
- package/dist/commands/run.js +131 -0
- package/dist/commands/run.js.map +1 -0
- package/dist/commands/sandbox.d.ts +3 -0
- package/dist/commands/sandbox.d.ts.map +1 -0
- package/dist/commands/sandbox.js +352 -0
- package/dist/commands/sandbox.js.map +1 -0
- package/dist/commands/schedules.d.ts +3 -0
- package/dist/commands/schedules.d.ts.map +1 -0
- package/dist/commands/schedules.js +37 -0
- package/dist/commands/schedules.js.map +1 -0
- package/dist/commands/secrets.d.ts +3 -0
- package/dist/commands/secrets.d.ts.map +1 -0
- package/dist/commands/secrets.js +194 -0
- package/dist/commands/secrets.js.map +1 -0
- package/dist/commands/services.d.ts +3 -0
- package/dist/commands/services.d.ts.map +1 -0
- package/dist/commands/services.js +70 -0
- package/dist/commands/services.js.map +1 -0
- package/dist/commands/shell.d.ts +16 -0
- package/dist/commands/shell.d.ts.map +1 -0
- package/dist/commands/shell.js +527 -0
- package/dist/commands/shell.js.map +1 -0
- package/dist/commands/snapshot.d.ts +10 -0
- package/dist/commands/snapshot.d.ts.map +1 -0
- package/dist/commands/snapshot.js +181 -0
- package/dist/commands/snapshot.js.map +1 -0
- package/dist/commands/ssh.d.ts +3 -0
- package/dist/commands/ssh.d.ts.map +1 -0
- package/dist/commands/ssh.js +37 -0
- package/dist/commands/ssh.js.map +1 -0
- package/dist/commands/status.d.ts +3 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +300 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/storage.d.ts +3 -0
- package/dist/commands/storage.d.ts.map +1 -0
- package/dist/commands/storage.js +180 -0
- package/dist/commands/storage.js.map +1 -0
- package/dist/commands/tenant.d.ts +3 -0
- package/dist/commands/tenant.d.ts.map +1 -0
- package/dist/commands/tenant.js +87 -0
- package/dist/commands/tenant.js.map +1 -0
- package/dist/commands/tunnel.d.ts +3 -0
- package/dist/commands/tunnel.d.ts.map +1 -0
- package/dist/commands/tunnel.js +418 -0
- package/dist/commands/tunnel.js.map +1 -0
- package/dist/commands/up.d.ts +14 -0
- package/dist/commands/up.d.ts.map +1 -0
- package/dist/commands/up.js +703 -0
- package/dist/commands/up.js.map +1 -0
- package/dist/commands/util.d.ts +19 -0
- package/dist/commands/util.d.ts.map +1 -0
- package/dist/commands/util.js +116 -0
- package/dist/commands/util.js.map +1 -0
- package/dist/commands/volumes.d.ts +3 -0
- package/dist/commands/volumes.d.ts.map +1 -0
- package/dist/commands/volumes.js +196 -0
- package/dist/commands/volumes.js.map +1 -0
- package/dist/commands/watch.d.ts +3 -0
- package/dist/commands/watch.d.ts.map +1 -0
- package/dist/commands/watch.js +398 -0
- package/dist/commands/watch.js.map +1 -0
- package/dist/commands/webhooks.d.ts +3 -0
- package/dist/commands/webhooks.d.ts.map +1 -0
- package/dist/commands/webhooks.js +23 -0
- package/dist/commands/webhooks.js.map +1 -0
- package/dist/commands/whoami.d.ts +3 -0
- package/dist/commands/whoami.d.ts.map +1 -0
- package/dist/commands/whoami.js +84 -0
- package/dist/commands/whoami.js.map +1 -0
- package/dist/commands/workspaces.d.ts +3 -0
- package/dist/commands/workspaces.d.ts.map +1 -0
- package/dist/commands/workspaces.js +87 -0
- package/dist/commands/workspaces.js.map +1 -0
- package/dist/config.d.ts +28 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +129 -0
- package/dist/config.js.map +1 -0
- package/dist/errors.d.ts +22 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +62 -0
- package/dist/errors.js.map +1 -0
- package/dist/framework-detector.d.ts +22 -0
- package/dist/framework-detector.d.ts.map +1 -0
- package/dist/framework-detector.js +373 -0
- package/dist/framework-detector.js.map +1 -0
- package/dist/pty/raw-mode.d.ts +7 -0
- package/dist/pty/raw-mode.d.ts.map +1 -0
- package/dist/pty/raw-mode.js +22 -0
- package/dist/pty/raw-mode.js.map +1 -0
- package/dist/pty/ws-pty-client.d.ts +12 -0
- package/dist/pty/ws-pty-client.d.ts.map +1 -0
- package/dist/pty/ws-pty-client.js +69 -0
- package/dist/pty/ws-pty-client.js.map +1 -0
- package/dist/types.d.ts +326 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +16 -0
- package/dist/types.js.map +1 -0
- package/dist/ui/progress.d.ts +10 -0
- package/dist/ui/progress.d.ts.map +1 -0
- package/dist/ui/progress.js +36 -0
- package/dist/ui/progress.js.map +1 -0
- package/dist/ui/spinner.d.ts +4 -0
- package/dist/ui/spinner.d.ts.map +1 -0
- package/dist/ui/spinner.js +7 -0
- package/dist/ui/spinner.js.map +1 -0
- package/dist/ui/table.d.ts +8 -0
- package/dist/ui/table.d.ts.map +1 -0
- package/dist/ui/table.js +46 -0
- package/dist/ui/table.js.map +1 -0
- package/package.json +53 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
export interface ComputerCheckpoint {
|
|
2
|
+
id: string;
|
|
3
|
+
computer_id: string;
|
|
4
|
+
comment: string | null;
|
|
5
|
+
size_bytes: number | null;
|
|
6
|
+
state: "creating" | "ready" | "restoring" | "error";
|
|
7
|
+
inserted_at: string;
|
|
8
|
+
updated_at: string;
|
|
9
|
+
}
|
|
10
|
+
export type HostId = string & {
|
|
11
|
+
__brand: "HostId";
|
|
12
|
+
};
|
|
13
|
+
export type TenantId = string & {
|
|
14
|
+
__brand: "TenantId";
|
|
15
|
+
};
|
|
16
|
+
export type JobId = string & {
|
|
17
|
+
__brand: "JobId";
|
|
18
|
+
};
|
|
19
|
+
export type TunnelSlug = string & {
|
|
20
|
+
__brand: "TunnelSlug";
|
|
21
|
+
};
|
|
22
|
+
export type ApiKey = string & {
|
|
23
|
+
__brand: "ApiKey";
|
|
24
|
+
};
|
|
25
|
+
export type ComputerId = string & {
|
|
26
|
+
__brand: "ComputerId";
|
|
27
|
+
};
|
|
28
|
+
export declare function toHostId(s: string): HostId;
|
|
29
|
+
export declare function toComputerId(s: string): ComputerId;
|
|
30
|
+
export interface ComputerFsEntry {
|
|
31
|
+
name: string;
|
|
32
|
+
path: string;
|
|
33
|
+
type: "file" | "dir" | "symlink";
|
|
34
|
+
size: number | null;
|
|
35
|
+
mode: string | null;
|
|
36
|
+
modified_at: string | null;
|
|
37
|
+
}
|
|
38
|
+
export interface ComputerStatResult {
|
|
39
|
+
path: string;
|
|
40
|
+
type: "file" | "dir" | "symlink" | "not_found";
|
|
41
|
+
size: number | null;
|
|
42
|
+
mode: string | null;
|
|
43
|
+
modified_at: string | null;
|
|
44
|
+
}
|
|
45
|
+
export interface ComputerExecResult {
|
|
46
|
+
stdout: string;
|
|
47
|
+
stderr: string;
|
|
48
|
+
exit_code: number;
|
|
49
|
+
}
|
|
50
|
+
export interface MiosaConfig {
|
|
51
|
+
endpoint: string;
|
|
52
|
+
api_key: ApiKey | null;
|
|
53
|
+
default_host: string | null;
|
|
54
|
+
region: string | null;
|
|
55
|
+
output: string;
|
|
56
|
+
}
|
|
57
|
+
export interface Host {
|
|
58
|
+
id: HostId;
|
|
59
|
+
name: string;
|
|
60
|
+
state: HostState;
|
|
61
|
+
os: string | null;
|
|
62
|
+
platform: string | null;
|
|
63
|
+
arch: string | null;
|
|
64
|
+
hostname: string | null;
|
|
65
|
+
last_heartbeat: string | null;
|
|
66
|
+
host_key: string | null;
|
|
67
|
+
install_command: string | null;
|
|
68
|
+
tenant_id: TenantId;
|
|
69
|
+
inserted_at: string;
|
|
70
|
+
updated_at: string;
|
|
71
|
+
telemetry?: HostTelemetry | null;
|
|
72
|
+
}
|
|
73
|
+
export type HostState = "pending" | "online" | "offline" | "error" | "disconnected";
|
|
74
|
+
export interface HostTelemetry {
|
|
75
|
+
cpu_percent: number | null;
|
|
76
|
+
ram_used_mb: number | null;
|
|
77
|
+
ram_total_mb: number | null;
|
|
78
|
+
disk_used_gb: number | null;
|
|
79
|
+
disk_total_gb: number | null;
|
|
80
|
+
}
|
|
81
|
+
export interface Tenant {
|
|
82
|
+
id: TenantId;
|
|
83
|
+
name: string;
|
|
84
|
+
slug: string;
|
|
85
|
+
plan: string;
|
|
86
|
+
credit_balance: number;
|
|
87
|
+
inserted_at: string;
|
|
88
|
+
}
|
|
89
|
+
export interface TerminalTicket {
|
|
90
|
+
token: string;
|
|
91
|
+
url: string;
|
|
92
|
+
expires_at: string;
|
|
93
|
+
}
|
|
94
|
+
export interface Job {
|
|
95
|
+
id: JobId;
|
|
96
|
+
cmd: string;
|
|
97
|
+
args: string[];
|
|
98
|
+
state: "pending" | "running" | "completed" | "failed";
|
|
99
|
+
exit_code: number | null;
|
|
100
|
+
cwd: string | null;
|
|
101
|
+
}
|
|
102
|
+
export interface JobCreateParams {
|
|
103
|
+
cmd: string;
|
|
104
|
+
args?: string[];
|
|
105
|
+
cwd?: string;
|
|
106
|
+
env?: Record<string, string>;
|
|
107
|
+
stream?: boolean;
|
|
108
|
+
timeout_ms?: number;
|
|
109
|
+
}
|
|
110
|
+
export interface Tunnel {
|
|
111
|
+
slug: TunnelSlug;
|
|
112
|
+
port: number;
|
|
113
|
+
public_url: string;
|
|
114
|
+
state: "active" | "closed";
|
|
115
|
+
inserted_at: string;
|
|
116
|
+
}
|
|
117
|
+
export interface TunnelCreateParams {
|
|
118
|
+
port: number;
|
|
119
|
+
name?: string;
|
|
120
|
+
}
|
|
121
|
+
export interface FsEntry {
|
|
122
|
+
name: string;
|
|
123
|
+
path: string;
|
|
124
|
+
type: "file" | "dir" | "symlink";
|
|
125
|
+
size: number | null;
|
|
126
|
+
mode: string | null;
|
|
127
|
+
modified_at: string | null;
|
|
128
|
+
}
|
|
129
|
+
export interface AgentDispatchParams {
|
|
130
|
+
task: string;
|
|
131
|
+
tools?: string[];
|
|
132
|
+
model?: string;
|
|
133
|
+
budget?: {
|
|
134
|
+
max_steps?: number;
|
|
135
|
+
timeout_ms?: number;
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
export type SseEvent = {
|
|
139
|
+
type: "stdout";
|
|
140
|
+
data: string;
|
|
141
|
+
} | {
|
|
142
|
+
type: "stderr";
|
|
143
|
+
data: string;
|
|
144
|
+
} | {
|
|
145
|
+
type: "exit";
|
|
146
|
+
exit_code: number;
|
|
147
|
+
} | {
|
|
148
|
+
type: "error";
|
|
149
|
+
message: string;
|
|
150
|
+
} | {
|
|
151
|
+
type: "thought";
|
|
152
|
+
content: string;
|
|
153
|
+
} | {
|
|
154
|
+
type: "tool_call";
|
|
155
|
+
tool: string;
|
|
156
|
+
input: unknown;
|
|
157
|
+
} | {
|
|
158
|
+
type: "tool_result";
|
|
159
|
+
tool: string;
|
|
160
|
+
output: unknown;
|
|
161
|
+
} | {
|
|
162
|
+
type: "done";
|
|
163
|
+
result?: unknown;
|
|
164
|
+
} | {
|
|
165
|
+
type: "heartbeat";
|
|
166
|
+
} | {
|
|
167
|
+
type: "unknown";
|
|
168
|
+
raw: string;
|
|
169
|
+
};
|
|
170
|
+
export interface ApiErrorBody {
|
|
171
|
+
error?: {
|
|
172
|
+
code?: string;
|
|
173
|
+
message?: string;
|
|
174
|
+
details?: unknown;
|
|
175
|
+
};
|
|
176
|
+
message?: string;
|
|
177
|
+
}
|
|
178
|
+
export type DeploymentId = string & {
|
|
179
|
+
__brand: "DeploymentId";
|
|
180
|
+
};
|
|
181
|
+
export type BuildId = string & {
|
|
182
|
+
__brand: "BuildId";
|
|
183
|
+
};
|
|
184
|
+
export declare function toDeploymentId(s: string): DeploymentId;
|
|
185
|
+
export type DeploymentState = "pending" | "building" | "running" | "stopped" | "failed";
|
|
186
|
+
export type BuildState = "queued" | "building" | "succeeded" | "failed" | "cancelled";
|
|
187
|
+
export interface Deployment {
|
|
188
|
+
id: DeploymentId;
|
|
189
|
+
tenant_id: TenantId;
|
|
190
|
+
owner_id: string;
|
|
191
|
+
name: string;
|
|
192
|
+
slug: string;
|
|
193
|
+
repo_url: string;
|
|
194
|
+
repo_provider: "github";
|
|
195
|
+
branch: string;
|
|
196
|
+
build_command: string | null;
|
|
197
|
+
run_command: string | null;
|
|
198
|
+
runtime_image: string | null;
|
|
199
|
+
current_build_id: BuildId | null;
|
|
200
|
+
state: DeploymentState;
|
|
201
|
+
auto_deploy: boolean;
|
|
202
|
+
custom_domain_id: string | null;
|
|
203
|
+
metadata: Record<string, unknown>;
|
|
204
|
+
created_at: string;
|
|
205
|
+
updated_at: string;
|
|
206
|
+
}
|
|
207
|
+
export interface DeploymentBuild {
|
|
208
|
+
id: BuildId;
|
|
209
|
+
deployment_id: DeploymentId;
|
|
210
|
+
commit_sha: string | null;
|
|
211
|
+
commit_message: string | null;
|
|
212
|
+
triggered_by: "webhook" | "manual" | "scheduled";
|
|
213
|
+
state: BuildState;
|
|
214
|
+
started_at: string | null;
|
|
215
|
+
finished_at: string | null;
|
|
216
|
+
duration_ms: number | null;
|
|
217
|
+
log_url: string | null;
|
|
218
|
+
image_digest: string | null;
|
|
219
|
+
error_message: string | null;
|
|
220
|
+
created_at: string;
|
|
221
|
+
}
|
|
222
|
+
export interface EnvVarPreview {
|
|
223
|
+
name: string;
|
|
224
|
+
preview: string;
|
|
225
|
+
created_at: string;
|
|
226
|
+
updated_at: string;
|
|
227
|
+
}
|
|
228
|
+
export interface CreateDeploymentParams {
|
|
229
|
+
name: string;
|
|
230
|
+
repo_url: string;
|
|
231
|
+
branch?: string;
|
|
232
|
+
build_command?: string;
|
|
233
|
+
run_command?: string;
|
|
234
|
+
auto_deploy?: boolean;
|
|
235
|
+
env?: Record<string, string>;
|
|
236
|
+
metadata?: Record<string, unknown>;
|
|
237
|
+
}
|
|
238
|
+
/** Shape of the on-disk .miosa.json project config (created by `miosa deploy`) */
|
|
239
|
+
export interface MiosaProjectConfig {
|
|
240
|
+
version: 1;
|
|
241
|
+
deploymentId: DeploymentId;
|
|
242
|
+
name: string;
|
|
243
|
+
framework: string;
|
|
244
|
+
buildCommand: string;
|
|
245
|
+
runCommand: string;
|
|
246
|
+
branch: string;
|
|
247
|
+
}
|
|
248
|
+
/** Shape of the on-disk .miosa.json written by `miosa link` */
|
|
249
|
+
export interface LocalProjectLink {
|
|
250
|
+
version: 1;
|
|
251
|
+
deploymentId: DeploymentId;
|
|
252
|
+
name: string;
|
|
253
|
+
environment: string;
|
|
254
|
+
}
|
|
255
|
+
/** Discriminated union of all event types emitted by the computer event stream. */
|
|
256
|
+
export type ComputerEventType = "desktop_action" | "exec" | "file" | "screenshot" | "error" | "heartbeat" | "unknown";
|
|
257
|
+
export type DesktopActionKind = "click" | "double_click" | "right_click" | "type" | "key" | "scroll" | "move" | "drag";
|
|
258
|
+
export interface DesktopActionEvent {
|
|
259
|
+
type: "desktop_action";
|
|
260
|
+
kind: DesktopActionKind;
|
|
261
|
+
/** For click/move/drag events */
|
|
262
|
+
x?: number;
|
|
263
|
+
y?: number;
|
|
264
|
+
/** For click events */
|
|
265
|
+
button?: "left" | "right" | "middle";
|
|
266
|
+
/** For type events */
|
|
267
|
+
text?: string;
|
|
268
|
+
/** For key events */
|
|
269
|
+
key?: string;
|
|
270
|
+
/** For scroll events */
|
|
271
|
+
dx?: number;
|
|
272
|
+
dy?: number;
|
|
273
|
+
timestamp: string;
|
|
274
|
+
}
|
|
275
|
+
export interface ExecEvent {
|
|
276
|
+
type: "exec";
|
|
277
|
+
command: string;
|
|
278
|
+
/** Present only when the command has completed */
|
|
279
|
+
exit_code?: number;
|
|
280
|
+
/** Milliseconds, present only when command has completed */
|
|
281
|
+
duration_ms?: number;
|
|
282
|
+
/** Whether this is the start or end of an exec */
|
|
283
|
+
phase: "start" | "done";
|
|
284
|
+
timestamp: string;
|
|
285
|
+
}
|
|
286
|
+
export interface FileEvent {
|
|
287
|
+
type: "file";
|
|
288
|
+
operation: "read" | "write" | "delete" | "rename" | "mkdir";
|
|
289
|
+
path: string;
|
|
290
|
+
/** Bytes, if known */
|
|
291
|
+
size?: number;
|
|
292
|
+
timestamp: string;
|
|
293
|
+
}
|
|
294
|
+
export interface ScreenshotEvent {
|
|
295
|
+
type: "screenshot";
|
|
296
|
+
width: number;
|
|
297
|
+
height: number;
|
|
298
|
+
/** Bytes */
|
|
299
|
+
size: number;
|
|
300
|
+
/** Base64-encoded PNG, only present when data is requested */
|
|
301
|
+
data?: string;
|
|
302
|
+
timestamp: string;
|
|
303
|
+
}
|
|
304
|
+
export interface ComputerErrorEvent {
|
|
305
|
+
type: "error";
|
|
306
|
+
message: string;
|
|
307
|
+
code?: string;
|
|
308
|
+
timestamp: string;
|
|
309
|
+
}
|
|
310
|
+
export interface HeartbeatEvent {
|
|
311
|
+
type: "heartbeat";
|
|
312
|
+
timestamp: string;
|
|
313
|
+
}
|
|
314
|
+
export interface UnknownComputerEvent {
|
|
315
|
+
type: "unknown";
|
|
316
|
+
raw: string;
|
|
317
|
+
}
|
|
318
|
+
export type ComputerEvent = DesktopActionEvent | ExecEvent | FileEvent | ScreenshotEvent | ComputerErrorEvent | HeartbeatEvent | UnknownComputerEvent;
|
|
319
|
+
/** Filter category names accepted by --filter */
|
|
320
|
+
export type WatchFilterCategory = "desktop" | "exec" | "file" | "screenshot" | "error";
|
|
321
|
+
export declare const EXIT_SUCCESS = 0;
|
|
322
|
+
export declare const EXIT_USER_ERROR = 1;
|
|
323
|
+
export declare const EXIT_NETWORK_ERROR = 2;
|
|
324
|
+
export declare const EXIT_AUTH_ERROR = 3;
|
|
325
|
+
export declare const EXIT_SERVER_ERROR = 4;
|
|
326
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,KAAK,EAAE,UAAU,GAAG,OAAO,GAAG,WAAW,GAAG,OAAO,CAAC;IACpD,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAGD,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG;IAAE,OAAO,EAAE,QAAQ,CAAA;CAAE,CAAC;AACpD,MA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
2
|
+
return s;
|
|
3
|
+
}
|
|
4
|
+
export function toComputerId(s) {
|
|
5
|
+
return s;
|
|
6
|
+
}
|
|
7
|
+
export function toDeploymentId(s) {
|
|
8
|
+
return s;
|
|
9
|
+
}
|
|
10
|
+
// Exit codes — documented contract
|
|
11
|
+
export const EXIT_SUCCESS = 0;
|
|
12
|
+
export const EXIT_USER_ERROR = 1;
|
|
13
|
+
export const EXIT_NETWORK_ERROR = 2;
|
|
14
|
+
export const EXIT_AUTH_ERROR = 3;
|
|
15
|
+
export const EXIT_SERVER_ERROR = 4;
|
|
16
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAkBA,MAAM,UAAU,QAAQ,CAAC,CAAS;IAChC,OAAO,CAAW,CAAC;AACrB,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,CAAS;IACpC,OAAO,CAAe,CAAC;AACzB,CAAC;AAgKD,MAAM,UAAU,cAAc,CAAC,CAAS;IACtC,OAAO,CAAiB,CAAC;AAC3B,CAAC;AAoMD,mCAAmC;AACnC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC;AAC9B,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC;AACjC,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC;AACpC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC;AACjC,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class ProgressBar {
|
|
2
|
+
private current;
|
|
3
|
+
private readonly width;
|
|
4
|
+
private readonly label;
|
|
5
|
+
constructor(label: string, width?: number);
|
|
6
|
+
update(current: number, total: number): void;
|
|
7
|
+
done(): void;
|
|
8
|
+
}
|
|
9
|
+
export declare function formatBytes(bytes: number): string;
|
|
10
|
+
//# sourceMappingURL=progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/ui/progress.ts"],"names":[],"mappings":"AAEA,qBAAa,WAAW;IACtB,OAAO,CAAC,OAAO,CAAK;IACpB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;gBAEnB,KAAK,EAAE,MAAM,EAAE,KAAK,SAAK;IAKrC,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAgB5C,IAAI,IAAI,IAAI;CAGb;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMjD"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import process from "node:process";
|
|
2
|
+
export class ProgressBar {
|
|
3
|
+
current = 0;
|
|
4
|
+
width;
|
|
5
|
+
label;
|
|
6
|
+
constructor(label, width = 30) {
|
|
7
|
+
this.label = label;
|
|
8
|
+
this.width = width;
|
|
9
|
+
}
|
|
10
|
+
update(current, total) {
|
|
11
|
+
this.current = current;
|
|
12
|
+
const pct = total > 0 ? Math.min(1, current / total) : 0;
|
|
13
|
+
const filled = Math.round(this.width * pct);
|
|
14
|
+
const empty = this.width - filled;
|
|
15
|
+
const bar = "█".repeat(filled) + "░".repeat(empty);
|
|
16
|
+
const pctStr = Math.round(pct * 100)
|
|
17
|
+
.toString()
|
|
18
|
+
.padStart(3);
|
|
19
|
+
const transferred = formatBytes(current);
|
|
20
|
+
const totalStr = formatBytes(total);
|
|
21
|
+
process.stdout.write(`\r${this.label} [${bar}] ${pctStr}% ${transferred}/${totalStr}`);
|
|
22
|
+
}
|
|
23
|
+
done() {
|
|
24
|
+
process.stdout.write("\n");
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export function formatBytes(bytes) {
|
|
28
|
+
if (bytes < 1024)
|
|
29
|
+
return `${bytes}B`;
|
|
30
|
+
if (bytes < 1024 * 1024)
|
|
31
|
+
return `${(bytes / 1024).toFixed(1)}KB`;
|
|
32
|
+
if (bytes < 1024 * 1024 * 1024)
|
|
33
|
+
return `${(bytes / 1024 / 1024).toFixed(1)}MB`;
|
|
34
|
+
return `${(bytes / 1024 / 1024 / 1024).toFixed(2)}GB`;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.js","sourceRoot":"","sources":["../../src/ui/progress.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,cAAc,CAAC;AAEnC,MAAM,OAAO,WAAW;IACd,OAAO,GAAG,CAAC,CAAC;IACH,KAAK,CAAS;IACd,KAAK,CAAS;IAE/B,YAAY,KAAa,EAAE,KAAK,GAAG,EAAE;QACnC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,MAAM,CAAC,OAAe,EAAE,KAAa;QACnC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,MAAM,GAAG,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACzD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC;QAC5C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC;QAClC,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACnD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC;aACjC,QAAQ,EAAE;aACV,QAAQ,CAAC,CAAC,CAAC,CAAC;QACf,MAAM,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;QACzC,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;QACpC,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,KAAK,IAAI,CAAC,KAAK,KAAK,GAAG,KAAK,MAAM,KAAK,WAAW,IAAI,QAAQ,EAAE,CACjE,CAAC;IACJ,CAAC;IAED,IAAI;QACF,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;CACF;AAED,MAAM,UAAU,WAAW,CAAC,KAAa;IACvC,IAAI,KAAK,GAAG,IAAI;QAAE,OAAO,GAAG,KAAK,GAAG,CAAC;IACrC,IAAI,KAAK,GAAG,IAAI,GAAG,IAAI;QAAE,OAAO,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;IACjE,IAAI,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI;QAC5B,OAAO,GAAG,CAAC,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;IACjD,OAAO,GAAG,CAAC,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;AACxD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../src/ui/spinner.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,KAAK,CAAC;AAErC,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC,OAAO,GAAG,CAAC,CAEzD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.js","sourceRoot":"","sources":["../../src/ui/spinner.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,KAAK,CAAC;AAErC,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,MAAM,UAAU,IAAI,CAAC,IAAY;IAC/B,OAAO,GAAG,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;AAChD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface Column<T> {
|
|
2
|
+
header: string;
|
|
3
|
+
key: keyof T | ((row: T) => string);
|
|
4
|
+
width?: number;
|
|
5
|
+
color?: (val: string, row: T) => string;
|
|
6
|
+
}
|
|
7
|
+
export declare function renderTable<T extends object>(rows: T[], columns: Column<T>[]): void;
|
|
8
|
+
//# sourceMappingURL=table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/ui/table.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,MAAM,CAAC,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAC,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,MAAM,CAAC;CACzC;AAED,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAC1C,IAAI,EAAE,CAAC,EAAE,EACT,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,GACnB,IAAI,CAwCN"}
|
package/dist/ui/table.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import chalk from "chalk";
|
|
2
|
+
export function renderTable(rows, columns) {
|
|
3
|
+
if (rows.length === 0) {
|
|
4
|
+
console.log(chalk.dim("(no results)"));
|
|
5
|
+
return;
|
|
6
|
+
}
|
|
7
|
+
// Compute column widths
|
|
8
|
+
const widths = columns.map((col) => {
|
|
9
|
+
const headerLen = col.header.length;
|
|
10
|
+
const maxData = rows.reduce((max, row) => {
|
|
11
|
+
const val = getCellValue(row, col);
|
|
12
|
+
return Math.max(max, val.length);
|
|
13
|
+
}, 0);
|
|
14
|
+
return col.width ?? Math.max(headerLen, maxData);
|
|
15
|
+
});
|
|
16
|
+
// Header row
|
|
17
|
+
const header = columns
|
|
18
|
+
.map((col, i) => chalk.bold(col.header.padEnd(widths[i] ?? col.header.length)))
|
|
19
|
+
.join(" ");
|
|
20
|
+
console.log(header);
|
|
21
|
+
// Separator
|
|
22
|
+
const sep = widths.map((w) => "─".repeat(w)).join(" ");
|
|
23
|
+
console.log(chalk.dim(sep));
|
|
24
|
+
// Data rows
|
|
25
|
+
for (const row of rows) {
|
|
26
|
+
const line = columns
|
|
27
|
+
.map((col, i) => {
|
|
28
|
+
const w = widths[i] ?? 0;
|
|
29
|
+
const val = getCellValue(row, col);
|
|
30
|
+
const padded = val.padEnd(w);
|
|
31
|
+
return col.color ? col.color(padded, row) : padded;
|
|
32
|
+
})
|
|
33
|
+
.join(" ");
|
|
34
|
+
console.log(line);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function getCellValue(row, col) {
|
|
38
|
+
if (typeof col.key === "function") {
|
|
39
|
+
return col.key(row);
|
|
40
|
+
}
|
|
41
|
+
const val = row[col.key];
|
|
42
|
+
if (val === null || val === undefined)
|
|
43
|
+
return chalk.dim("—");
|
|
44
|
+
return String(val);
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.js","sourceRoot":"","sources":["../../src/ui/table.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,MAAM,UAAU,WAAW,CACzB,IAAS,EACT,OAAoB;IAEpB,IAAI,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AC;IAE5B,YAAY;IACZ,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,IAAI,GAAG,OAAO;aACjB,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;YACd,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YACzB,MAAM,GAAG,GAAG,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YACnC,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAC7B,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QACrD,CAAC,CAAC;aACD,IAAI,CAAC,IAAI,CAAC,CAAC;QACd,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;AACH,CAAC;AAED,SAAS,YAAY,CAAmB,GAAM,EAAE,GAAc;IAC5D,IAAI,OAAO,GAAG,CAAC,GAAG,KAAK,UAAU,EAAE,CAAC;QAClC,OAAO,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACtB,CAAC;IACD,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACzB,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7D,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;AACrB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@miosa/cli",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "MIOSA platform CLI — projects, sandboxes, deploys, databases, more",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"miosa": "./dist/bin/miosa.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "tsc",
|
|
11
|
+
"dev": "tsx src/bin/miosa.ts",
|
|
12
|
+
"test": "vitest run",
|
|
13
|
+
"test:watch": "vitest",
|
|
14
|
+
"typecheck": "tsc --noEmit",
|
|
15
|
+
"prepublishOnly": "npm run build"
|
|
16
|
+
},
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": ">=20"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist",
|
|
22
|
+
"README.md"
|
|
23
|
+
],
|
|
24
|
+
"keywords": [
|
|
25
|
+
"miosa",
|
|
26
|
+
"cli",
|
|
27
|
+
"platform",
|
|
28
|
+
"paas",
|
|
29
|
+
"deploy",
|
|
30
|
+
"sandbox",
|
|
31
|
+
"serverless",
|
|
32
|
+
"opencomputers",
|
|
33
|
+
"devtools"
|
|
34
|
+
],
|
|
35
|
+
"author": "MIOSA",
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"chalk": "^5.3.0",
|
|
39
|
+
"commander": "^12.1.0",
|
|
40
|
+
"inquirer": "^9.3.7",
|
|
41
|
+
"ora": "^8.1.1",
|
|
42
|
+
"undici": "^6.19.7",
|
|
43
|
+
"ws": "^8.18.0"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@types/inquirer": "^9.0.8",
|
|
47
|
+
"@types/node": "^20.17.9",
|
|
48
|
+
"@types/ws": "^8.5.13",
|
|
49
|
+
"tsx": "^4.19.2",
|
|
50
|
+
"typescript": "^5.7.2",
|
|
51
|
+
"vitest": "^2.1.8"
|
|
52
|
+
}
|
|
53
|
+
}
|