sandcovery 0.1.0 → 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/LICENSE +21 -0
- package/README.md +91 -0
- package/dist/Schema-C4ay0Aif.mjs +11473 -0
- package/dist/cli/index.d.mts +1 -0
- package/dist/cli/index.mjs +1710 -0
- package/dist/handlers-BxhSLDGk.mjs +2217 -0
- package/dist/index.d.mts +76 -1
- package/dist/index.mjs +1 -5
- package/dist/origin-Dj-n4EQa.mjs +356 -0
- package/dist/posthog-project-B0jmQTwy.mjs +1 -0
- package/dist/posthog-project-Bb0IFKUv.mjs +20 -0
- package/dist/spec-ClAX0dAN.mjs +1910 -0
- package/dist/src-D3WZodpF.mjs +572 -0
- package/dist/telemetry-BYnuVdoZ.mjs +43 -0
- package/dist/telemetry-delivery-1a7C-8DK.mjs +8712 -0
- package/dist/types-Dxh7amZB.d.mts +345 -0
- package/dist/types.d.mts +2 -0
- package/dist/types.mjs +51 -0
- package/package.json +46 -4
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
declare const ACTIVITY_ACTIONS: readonly ["sandbox.create", "sandbox.create_attempt", "sandbox.destroy", "sandbox.expire", "sandbox.pause", "sandbox.resume", "sandbox.snapshot"];
|
|
2
|
+
type ActivityAction = (typeof ACTIVITY_ACTIONS)[number] | (string & Record<never, never>);
|
|
3
|
+
interface ActivityEvent {
|
|
4
|
+
readonly action: ActivityAction;
|
|
5
|
+
readonly api_key_id: string | null;
|
|
6
|
+
readonly at: string;
|
|
7
|
+
readonly error: string | null;
|
|
8
|
+
readonly id: string;
|
|
9
|
+
readonly outcome: "failed" | "succeeded";
|
|
10
|
+
readonly provider: Provider | null;
|
|
11
|
+
readonly sandbox_id: string | null;
|
|
12
|
+
}
|
|
13
|
+
interface ActivityList {
|
|
14
|
+
readonly data: readonly ActivityEvent[];
|
|
15
|
+
readonly next_cursor: string | null;
|
|
16
|
+
}
|
|
17
|
+
interface ConcurrencyLimitReachedError {
|
|
18
|
+
readonly concurrency_cap: number;
|
|
19
|
+
readonly error: "concurrency_limit_reached";
|
|
20
|
+
readonly message: string;
|
|
21
|
+
}
|
|
22
|
+
interface ConflictError {
|
|
23
|
+
readonly error: "conflict";
|
|
24
|
+
readonly message: string;
|
|
25
|
+
}
|
|
26
|
+
interface CreateAttempt {
|
|
27
|
+
readonly duration_ms: number;
|
|
28
|
+
readonly failure: {
|
|
29
|
+
readonly message: string;
|
|
30
|
+
readonly reason: CreateFailureReason;
|
|
31
|
+
} | null;
|
|
32
|
+
readonly provider: Provider;
|
|
33
|
+
readonly started_at: string;
|
|
34
|
+
}
|
|
35
|
+
interface CreatedKey {
|
|
36
|
+
readonly key: Key;
|
|
37
|
+
readonly secret: string;
|
|
38
|
+
}
|
|
39
|
+
type CreateFailureReason = "capacity" | "quota" | "rejected" | "server_error" | "timeout";
|
|
40
|
+
interface CreateKeyRequest {
|
|
41
|
+
readonly allowed_providers?: readonly Provider[] | null;
|
|
42
|
+
readonly expires_at?: string | null;
|
|
43
|
+
readonly kind?: KeyKind_1;
|
|
44
|
+
readonly max_concurrent_sandboxes?: number | null;
|
|
45
|
+
readonly max_ttl_seconds?: number | null;
|
|
46
|
+
readonly name: string;
|
|
47
|
+
readonly spend_limit?: SpendLimit | null;
|
|
48
|
+
}
|
|
49
|
+
interface CreateSandboxRequest {
|
|
50
|
+
readonly disk_mib?: number;
|
|
51
|
+
readonly egress?: EgressPolicy;
|
|
52
|
+
readonly env?: Readonly<Record<string, string>>;
|
|
53
|
+
readonly idle_timeout_seconds?: number;
|
|
54
|
+
readonly image?: string;
|
|
55
|
+
readonly memory_mib?: number;
|
|
56
|
+
readonly ports?: readonly number[];
|
|
57
|
+
readonly region?: Region;
|
|
58
|
+
readonly size?: SizeName;
|
|
59
|
+
readonly ttl_seconds?: number;
|
|
60
|
+
readonly vcpu?: number;
|
|
61
|
+
readonly provider?: ProviderPreferences;
|
|
62
|
+
readonly snapshot_id?: string;
|
|
63
|
+
}
|
|
64
|
+
interface CredentialField {
|
|
65
|
+
readonly label: string;
|
|
66
|
+
readonly name: string;
|
|
67
|
+
readonly secret: boolean;
|
|
68
|
+
}
|
|
69
|
+
type CredentialFields = Readonly<Record<string, string>>;
|
|
70
|
+
declare const EGRESS_MODES: readonly ["allow_all", "allowlist", "deny_all"];
|
|
71
|
+
type EgressMode = (typeof EGRESS_MODES)[number] | (string & Record<never, never>);
|
|
72
|
+
type EgressPolicy = {
|
|
73
|
+
readonly mode: "allow_all";
|
|
74
|
+
} | {
|
|
75
|
+
readonly mode: "deny_all";
|
|
76
|
+
} | {
|
|
77
|
+
readonly destinations: readonly string[];
|
|
78
|
+
readonly mode: "allowlist";
|
|
79
|
+
};
|
|
80
|
+
interface Estimate {
|
|
81
|
+
readonly hourly_micro_usd: number;
|
|
82
|
+
readonly provider: Provider;
|
|
83
|
+
readonly rate_card_version: string;
|
|
84
|
+
readonly ttl_micro_usd: number;
|
|
85
|
+
}
|
|
86
|
+
interface EstimateList {
|
|
87
|
+
readonly data: readonly Estimate[];
|
|
88
|
+
}
|
|
89
|
+
interface EstimateRequest {
|
|
90
|
+
readonly disk_mib?: number;
|
|
91
|
+
readonly egress?: EgressPolicy;
|
|
92
|
+
readonly env?: Readonly<Record<string, string>>;
|
|
93
|
+
readonly idle_timeout_seconds?: number;
|
|
94
|
+
readonly image?: string;
|
|
95
|
+
readonly memory_mib?: number;
|
|
96
|
+
readonly ports?: readonly number[];
|
|
97
|
+
readonly region?: Region;
|
|
98
|
+
readonly size?: SizeName;
|
|
99
|
+
readonly ttl_seconds?: number;
|
|
100
|
+
readonly vcpu?: number;
|
|
101
|
+
readonly provider?: ProviderPreferences;
|
|
102
|
+
}
|
|
103
|
+
type ExecEvent = {
|
|
104
|
+
readonly data: string;
|
|
105
|
+
readonly type: "stdout";
|
|
106
|
+
} | {
|
|
107
|
+
readonly data: string;
|
|
108
|
+
readonly type: "stderr";
|
|
109
|
+
} | {
|
|
110
|
+
readonly duration_ms: number;
|
|
111
|
+
readonly exit_code: number;
|
|
112
|
+
readonly type: "exit";
|
|
113
|
+
} | {
|
|
114
|
+
readonly message: string;
|
|
115
|
+
readonly provider: Provider;
|
|
116
|
+
readonly type: "error";
|
|
117
|
+
};
|
|
118
|
+
interface ExecRequest {
|
|
119
|
+
readonly command: string;
|
|
120
|
+
readonly cwd?: string;
|
|
121
|
+
readonly env?: Readonly<Record<string, string>>;
|
|
122
|
+
readonly timeout_seconds?: number;
|
|
123
|
+
}
|
|
124
|
+
interface ExecResult {
|
|
125
|
+
readonly duration_ms: number;
|
|
126
|
+
readonly exit_code: number;
|
|
127
|
+
readonly stderr: string;
|
|
128
|
+
readonly stdout: string;
|
|
129
|
+
}
|
|
130
|
+
interface FileEntry {
|
|
131
|
+
readonly modified_at: string | null;
|
|
132
|
+
readonly name: string;
|
|
133
|
+
readonly path: string;
|
|
134
|
+
readonly size_bytes: number | null;
|
|
135
|
+
readonly type: FileEntryType;
|
|
136
|
+
}
|
|
137
|
+
type FileEntryType = "directory" | "file" | "other" | "symlink";
|
|
138
|
+
interface FileList {
|
|
139
|
+
readonly entries: readonly FileEntry[];
|
|
140
|
+
readonly path: string;
|
|
141
|
+
}
|
|
142
|
+
interface ForbiddenError {
|
|
143
|
+
readonly error: "forbidden";
|
|
144
|
+
readonly message: string;
|
|
145
|
+
}
|
|
146
|
+
interface Health {
|
|
147
|
+
readonly ok: true;
|
|
148
|
+
}
|
|
149
|
+
interface InvalidRequestError {
|
|
150
|
+
readonly error: "invalid_request";
|
|
151
|
+
readonly message: string;
|
|
152
|
+
}
|
|
153
|
+
interface Key {
|
|
154
|
+
readonly allowed_providers: readonly Provider[] | null;
|
|
155
|
+
readonly max_concurrent_sandboxes: number | null;
|
|
156
|
+
readonly max_ttl_seconds: number | null;
|
|
157
|
+
readonly spend_limit: SpendLimit | null;
|
|
158
|
+
readonly created_at: string;
|
|
159
|
+
readonly expires_at: string | null;
|
|
160
|
+
readonly id: string;
|
|
161
|
+
readonly kind: KeyKind;
|
|
162
|
+
readonly last_used_at: string | null;
|
|
163
|
+
readonly name: string;
|
|
164
|
+
readonly revoked_at: string | null;
|
|
165
|
+
readonly spend: {
|
|
166
|
+
readonly resets_at: string | null;
|
|
167
|
+
readonly spent_micro_usd: number;
|
|
168
|
+
};
|
|
169
|
+
readonly start: string;
|
|
170
|
+
}
|
|
171
|
+
type KeyKind = "api" | "management";
|
|
172
|
+
type KeyKind_1 = "api" | "management";
|
|
173
|
+
interface KeyList {
|
|
174
|
+
readonly data: readonly Key[];
|
|
175
|
+
}
|
|
176
|
+
interface NoProviderAvailableError {
|
|
177
|
+
readonly attempts: readonly CreateAttempt[];
|
|
178
|
+
readonly error: "no_provider_available";
|
|
179
|
+
readonly message: string;
|
|
180
|
+
}
|
|
181
|
+
interface NotFoundError {
|
|
182
|
+
readonly error: "not_found";
|
|
183
|
+
readonly message: string;
|
|
184
|
+
}
|
|
185
|
+
interface PortPreview {
|
|
186
|
+
readonly expires_at: string | null;
|
|
187
|
+
readonly headers: Readonly<Record<string, string>>;
|
|
188
|
+
readonly port: number;
|
|
189
|
+
readonly url: string;
|
|
190
|
+
}
|
|
191
|
+
declare const PROVIDERS: readonly ["daytona", "depot", "e2b", "vercel"];
|
|
192
|
+
type Provider = (typeof PROVIDERS)[number] | (string & Record<never, never>);
|
|
193
|
+
interface ProviderBoard {
|
|
194
|
+
readonly data: readonly ProviderBoardEntry[];
|
|
195
|
+
}
|
|
196
|
+
interface ProviderBoardEntry {
|
|
197
|
+
readonly create_latency_ms: {
|
|
198
|
+
readonly p50: number | null;
|
|
199
|
+
readonly p95: number | null;
|
|
200
|
+
};
|
|
201
|
+
readonly credential_fields: readonly CredentialField[];
|
|
202
|
+
readonly features: ProviderFeatures;
|
|
203
|
+
readonly name: string;
|
|
204
|
+
readonly prices: readonly {
|
|
205
|
+
readonly hourly_micro_usd: number;
|
|
206
|
+
readonly size: StandardSize;
|
|
207
|
+
}[];
|
|
208
|
+
readonly provider: Provider;
|
|
209
|
+
readonly rate_card_source_url: string;
|
|
210
|
+
readonly rate_card_version: string;
|
|
211
|
+
readonly status: ProviderStatus;
|
|
212
|
+
readonly updated_at: string;
|
|
213
|
+
readonly uptime: {
|
|
214
|
+
readonly last_15_minutes: number | null;
|
|
215
|
+
readonly last_24_hours: number | null;
|
|
216
|
+
readonly last_7_days: number | null;
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
interface ProviderCredential {
|
|
220
|
+
readonly created_at: string;
|
|
221
|
+
readonly hint: string;
|
|
222
|
+
readonly provider: Provider;
|
|
223
|
+
readonly updated_at: string;
|
|
224
|
+
}
|
|
225
|
+
interface ProviderCredentialList {
|
|
226
|
+
readonly data: readonly ProviderCredential[];
|
|
227
|
+
}
|
|
228
|
+
interface ProviderError {
|
|
229
|
+
readonly error: "provider_error";
|
|
230
|
+
readonly message: string;
|
|
231
|
+
readonly provider: Provider;
|
|
232
|
+
}
|
|
233
|
+
interface ProviderFeatures {
|
|
234
|
+
readonly custom_image: boolean;
|
|
235
|
+
readonly egress_modes: readonly EgressMode[];
|
|
236
|
+
readonly idle_timeout: boolean;
|
|
237
|
+
readonly max_disk_mib: number | null;
|
|
238
|
+
readonly max_memory_mib: number;
|
|
239
|
+
readonly max_ttl_seconds: number;
|
|
240
|
+
readonly max_vcpu: number;
|
|
241
|
+
readonly pause: boolean;
|
|
242
|
+
readonly ports: boolean;
|
|
243
|
+
readonly regions: readonly Region[];
|
|
244
|
+
readonly snapshot: boolean;
|
|
245
|
+
readonly streamed_exec: boolean;
|
|
246
|
+
}
|
|
247
|
+
interface ProviderPreferences {
|
|
248
|
+
readonly allow_fallbacks?: boolean;
|
|
249
|
+
readonly ignore?: readonly Provider[];
|
|
250
|
+
readonly only?: readonly Provider[];
|
|
251
|
+
readonly order?: readonly Provider[];
|
|
252
|
+
readonly sort?: ProviderSort;
|
|
253
|
+
}
|
|
254
|
+
type ProviderSort = "latency" | "price" | "uptime";
|
|
255
|
+
type ProviderStatus = "degraded" | "down" | "operational" | "unknown";
|
|
256
|
+
declare const REGIONS: readonly ["asia", "eu", "us"];
|
|
257
|
+
type Region = (typeof REGIONS)[number] | (string & Record<never, never>);
|
|
258
|
+
interface Sandbox {
|
|
259
|
+
readonly api_key_id: string;
|
|
260
|
+
readonly attempts: readonly CreateAttempt[];
|
|
261
|
+
readonly cost: SandboxCost;
|
|
262
|
+
readonly created_at: string;
|
|
263
|
+
readonly disk_mib: number | null;
|
|
264
|
+
readonly egress: EgressPolicy;
|
|
265
|
+
readonly end_reason: SandboxEndReason | null;
|
|
266
|
+
readonly ended_at: string | null;
|
|
267
|
+
readonly expires_at: string;
|
|
268
|
+
readonly id: string;
|
|
269
|
+
readonly idle_timeout_seconds: number | null;
|
|
270
|
+
readonly image: string | null;
|
|
271
|
+
readonly memory_mib: number;
|
|
272
|
+
readonly ports: readonly number[];
|
|
273
|
+
readonly provider: Provider | null;
|
|
274
|
+
readonly provider_sandbox_id: string | null;
|
|
275
|
+
readonly region: Region | null;
|
|
276
|
+
readonly size: SizeName | null;
|
|
277
|
+
readonly started_at: string | null;
|
|
278
|
+
readonly status: SandboxStatus;
|
|
279
|
+
readonly ttl_seconds: number;
|
|
280
|
+
readonly vcpu: number;
|
|
281
|
+
}
|
|
282
|
+
interface SandboxCost {
|
|
283
|
+
readonly estimated_micro_usd: number;
|
|
284
|
+
readonly hourly_micro_usd: number;
|
|
285
|
+
readonly rate_card_version: string;
|
|
286
|
+
}
|
|
287
|
+
type SandboxEndReason = "create_failed" | "destroyed" | "expired" | "gone";
|
|
288
|
+
interface SandboxList {
|
|
289
|
+
readonly data: readonly Sandbox[];
|
|
290
|
+
readonly next_cursor: string | null;
|
|
291
|
+
}
|
|
292
|
+
type SandboxStatus = "creating" | "destroyed" | "destroying" | "failed" | "paused" | "running";
|
|
293
|
+
declare const SIZE_NAMES: readonly ["1x2", "1x2:cheapest", "1x2:fastest", "1x2:most-reliable", "2x4", "2x4:cheapest", "2x4:fastest", "2x4:most-reliable", "4x8", "4x8:cheapest", "4x8:fastest", "4x8:most-reliable", "8x16", "8x16:cheapest", "8x16:fastest", "8x16:most-reliable"];
|
|
294
|
+
type SizeName = (typeof SIZE_NAMES)[number] | (string & Record<never, never>);
|
|
295
|
+
interface Snapshot {
|
|
296
|
+
readonly created_at: string;
|
|
297
|
+
readonly id: string;
|
|
298
|
+
readonly provider: Provider;
|
|
299
|
+
readonly sandbox_id: string;
|
|
300
|
+
}
|
|
301
|
+
interface SpendLimit {
|
|
302
|
+
readonly limit_micro_usd: number;
|
|
303
|
+
readonly period: SpendLimitPeriod;
|
|
304
|
+
}
|
|
305
|
+
type SpendLimitPeriod = "day" | "month" | "total" | "week";
|
|
306
|
+
interface SpendLimitReachedError {
|
|
307
|
+
readonly error: "spend_limit_reached";
|
|
308
|
+
readonly limit_micro_usd: number;
|
|
309
|
+
readonly message: string;
|
|
310
|
+
readonly resets_at: string | null;
|
|
311
|
+
readonly spent_micro_usd: number;
|
|
312
|
+
}
|
|
313
|
+
declare const STANDARD_SIZES: readonly ["1x2", "2x4", "4x8", "8x16"];
|
|
314
|
+
type StandardSize = (typeof STANDARD_SIZES)[number] | (string & Record<never, never>);
|
|
315
|
+
interface UnauthorizedError {
|
|
316
|
+
readonly error: "unauthorized";
|
|
317
|
+
readonly message: string;
|
|
318
|
+
}
|
|
319
|
+
interface UnsupportedError {
|
|
320
|
+
readonly error: "unsupported";
|
|
321
|
+
readonly message: string;
|
|
322
|
+
readonly options: readonly string[];
|
|
323
|
+
readonly provider: Provider | null;
|
|
324
|
+
}
|
|
325
|
+
interface UpdateKeyRequest {
|
|
326
|
+
readonly allowed_providers?: readonly Provider[] | null;
|
|
327
|
+
readonly expires_at?: string | null;
|
|
328
|
+
readonly max_concurrent_sandboxes?: number | null;
|
|
329
|
+
readonly max_ttl_seconds?: number | null;
|
|
330
|
+
readonly name?: string;
|
|
331
|
+
readonly spend_limit?: SpendLimit | null;
|
|
332
|
+
}
|
|
333
|
+
interface Usage {
|
|
334
|
+
readonly data: readonly UsageDay[];
|
|
335
|
+
}
|
|
336
|
+
interface UsageDay {
|
|
337
|
+
readonly api_key_id: string;
|
|
338
|
+
readonly date: string;
|
|
339
|
+
readonly estimated_micro_usd: number;
|
|
340
|
+
readonly provider: Provider;
|
|
341
|
+
readonly sandbox_count: number;
|
|
342
|
+
readonly sandbox_seconds: number;
|
|
343
|
+
}
|
|
344
|
+
type ApiError = ConcurrencyLimitReachedError | ConflictError | ForbiddenError | InvalidRequestError | NoProviderAvailableError | NotFoundError | ProviderError | SpendLimitReachedError | UnauthorizedError | UnsupportedError;
|
|
345
|
+
export { SandboxCost as $, Key as A, ProviderBoardEntry as B, ExecResult as C, ForbiddenError as D, FileList as E, NotFoundError as F, ProviderPreferences as G, ProviderCredentialList as H, PROVIDERS as I, REGIONS as J, ProviderSort as K, PortPreview as L, KeyKind_1 as M, KeyList as N, Health as O, NoProviderAvailableError as P, Sandbox as Q, Provider as R, ExecRequest as S, FileEntryType as T, ProviderError as U, ProviderCredential as V, ProviderFeatures as W, SIZE_NAMES as X, Region as Y, STANDARD_SIZES as Z, EgressPolicy as _, ApiError as a, SpendLimit as at, EstimateRequest as b, CreateAttempt as c, StandardSize as ct, CreateSandboxRequest as d, UpdateKeyRequest as dt, SandboxEndReason as et, CreatedKey as f, Usage as ft, EgressMode as g, EGRESS_MODES as h, ActivityList as i, Snapshot as it, KeyKind as j, InvalidRequestError as k, CreateFailureReason as l, UnauthorizedError as lt, CredentialFields as m, ActivityAction as n, SandboxStatus as nt, ConcurrencyLimitReachedError as o, SpendLimitPeriod as ot, CredentialField as p, UsageDay as pt, ProviderStatus as q, ActivityEvent as r, SizeName as rt, ConflictError as s, SpendLimitReachedError as st, ACTIVITY_ACTIONS as t, SandboxList as tt, CreateKeyRequest as u, UnsupportedError as ut, Estimate as v, FileEntry as w, ExecEvent as x, EstimateList as y, ProviderBoard as z };
|
package/dist/types.d.mts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { $ as SandboxCost, A as Key, B as ProviderBoardEntry, C as ExecResult, D as ForbiddenError, E as FileList, F as NotFoundError, G as ProviderPreferences, H as ProviderCredentialList, I as PROVIDERS, J as REGIONS, K as ProviderSort, L as PortPreview, M as KeyKind_1, N as KeyList, O as Health, P as NoProviderAvailableError, Q as Sandbox, R as Provider, S as ExecRequest, T as FileEntryType, U as ProviderError, V as ProviderCredential, W as ProviderFeatures, X as SIZE_NAMES, Y as Region, Z as STANDARD_SIZES, _ as EgressPolicy, a as ApiError, at as SpendLimit, b as EstimateRequest, c as CreateAttempt, ct as StandardSize, d as CreateSandboxRequest, dt as UpdateKeyRequest, et as SandboxEndReason, f as CreatedKey, ft as Usage, g as EgressMode, h as EGRESS_MODES, i as ActivityList, it as Snapshot, j as KeyKind, k as InvalidRequestError, l as CreateFailureReason, lt as UnauthorizedError, m as CredentialFields, n as ActivityAction, nt as SandboxStatus, o as ConcurrencyLimitReachedError, ot as SpendLimitPeriod, p as CredentialField, pt as UsageDay, q as ProviderStatus, r as ActivityEvent, rt as SizeName, s as ConflictError, st as SpendLimitReachedError, t as ACTIVITY_ACTIONS, tt as SandboxList, u as CreateKeyRequest, ut as UnsupportedError, v as Estimate, w as FileEntry, x as ExecEvent, y as EstimateList, z as ProviderBoard } from "./types-Dxh7amZB.mjs";
|
|
2
|
+
export { ACTIVITY_ACTIONS, ActivityAction, ActivityEvent, ActivityList, ApiError, ConcurrencyLimitReachedError, ConflictError, CreateAttempt, CreateFailureReason, CreateKeyRequest, CreateSandboxRequest, CreatedKey, CredentialField, CredentialFields, EGRESS_MODES, EgressMode, EgressPolicy, Estimate, EstimateList, EstimateRequest, ExecEvent, ExecRequest, ExecResult, FileEntry, FileEntryType, FileList, ForbiddenError, Health, InvalidRequestError, Key, KeyKind, KeyKind_1, KeyList, NoProviderAvailableError, NotFoundError, PROVIDERS, PortPreview, Provider, ProviderBoard, ProviderBoardEntry, ProviderCredential, ProviderCredentialList, ProviderError, ProviderFeatures, ProviderPreferences, ProviderSort, ProviderStatus, REGIONS, Region, SIZE_NAMES, STANDARD_SIZES, Sandbox, SandboxCost, SandboxEndReason, SandboxList, SandboxStatus, SizeName, Snapshot, SpendLimit, SpendLimitPeriod, SpendLimitReachedError, StandardSize, UnauthorizedError, UnsupportedError, UpdateKeyRequest, Usage, UsageDay };
|
package/dist/types.mjs
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// src/types.ts
|
|
2
|
+
const ACTIVITY_ACTIONS = [
|
|
3
|
+
"sandbox.create",
|
|
4
|
+
"sandbox.create_attempt",
|
|
5
|
+
"sandbox.destroy",
|
|
6
|
+
"sandbox.expire",
|
|
7
|
+
"sandbox.pause",
|
|
8
|
+
"sandbox.resume",
|
|
9
|
+
"sandbox.snapshot"
|
|
10
|
+
];
|
|
11
|
+
const EGRESS_MODES = [
|
|
12
|
+
"allow_all",
|
|
13
|
+
"allowlist",
|
|
14
|
+
"deny_all"
|
|
15
|
+
];
|
|
16
|
+
const PROVIDERS = [
|
|
17
|
+
"daytona",
|
|
18
|
+
"depot",
|
|
19
|
+
"e2b",
|
|
20
|
+
"vercel"
|
|
21
|
+
];
|
|
22
|
+
const REGIONS = [
|
|
23
|
+
"asia",
|
|
24
|
+
"eu",
|
|
25
|
+
"us"
|
|
26
|
+
];
|
|
27
|
+
const SIZE_NAMES = [
|
|
28
|
+
"1x2",
|
|
29
|
+
"1x2:cheapest",
|
|
30
|
+
"1x2:fastest",
|
|
31
|
+
"1x2:most-reliable",
|
|
32
|
+
"2x4",
|
|
33
|
+
"2x4:cheapest",
|
|
34
|
+
"2x4:fastest",
|
|
35
|
+
"2x4:most-reliable",
|
|
36
|
+
"4x8",
|
|
37
|
+
"4x8:cheapest",
|
|
38
|
+
"4x8:fastest",
|
|
39
|
+
"4x8:most-reliable",
|
|
40
|
+
"8x16",
|
|
41
|
+
"8x16:cheapest",
|
|
42
|
+
"8x16:fastest",
|
|
43
|
+
"8x16:most-reliable"
|
|
44
|
+
];
|
|
45
|
+
const STANDARD_SIZES = [
|
|
46
|
+
"1x2",
|
|
47
|
+
"2x4",
|
|
48
|
+
"4x8",
|
|
49
|
+
"8x16"
|
|
50
|
+
];
|
|
51
|
+
export { ACTIVITY_ACTIONS, EGRESS_MODES, PROVIDERS, REGIONS, SIZE_NAMES, STANDARD_SIZES };
|
package/package.json
CHANGED
|
@@ -1,14 +1,56 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sandcovery",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "TypeScript client for the Sandcovery API: one API and one key for ephemeral sandboxes across providers.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"daytona",
|
|
7
|
+
"depot",
|
|
8
|
+
"e2b",
|
|
9
|
+
"sandbox",
|
|
10
|
+
"sandcovery",
|
|
11
|
+
"vercel"
|
|
12
|
+
],
|
|
13
|
+
"homepage": "https://www.sandcovery.com",
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/starcovery/starcovery.git",
|
|
18
|
+
"directory": "packages/sdk-node"
|
|
19
|
+
},
|
|
20
|
+
"bin": {
|
|
21
|
+
"sandcovery": "dist/cli/index.mjs"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist"
|
|
25
|
+
],
|
|
4
26
|
"type": "module",
|
|
5
27
|
"exports": {
|
|
6
28
|
".": {
|
|
7
29
|
"types": "./dist/index.d.mts",
|
|
8
30
|
"default": "./dist/index.mjs"
|
|
31
|
+
},
|
|
32
|
+
"./types": {
|
|
33
|
+
"types": "./dist/types.d.mts",
|
|
34
|
+
"default": "./dist/types.mjs"
|
|
9
35
|
}
|
|
10
36
|
},
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "vp pack src/index.ts src/types.ts src/cli/index.ts --dts",
|
|
39
|
+
"prepack": "pnpm run build --env.SANDCOVERY_RELEASE true",
|
|
40
|
+
"typecheck": "tsc"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@coveries/cli-core": "workspace:*",
|
|
44
|
+
"@coveries/sandcovery-contract": "workspace:*",
|
|
45
|
+
"@starcovery/schema": "workspace:*",
|
|
46
|
+
"@types/node": "^26.6.6",
|
|
47
|
+
"effect": "^4.1.1",
|
|
48
|
+
"es-toolkit": "^1.53.1",
|
|
49
|
+
"typescript": "^7.0.2",
|
|
50
|
+
"uuid": "^14.0.3",
|
|
51
|
+
"vite-plus": "catalog:"
|
|
52
|
+
},
|
|
53
|
+
"engines": {
|
|
54
|
+
"node": ">=24"
|
|
55
|
+
}
|
|
14
56
|
}
|