sandcovery 0.5.0 → 0.6.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 +13 -5
- package/dist/{Schema-fLas6rbA.mjs → Schema-CoX0a2_o.mjs} +133 -9
- package/dist/cli/index.mjs +1 -1
- package/dist/cli/sandcovery-docker.mjs +1 -1
- package/dist/cli/sandcovery-kubectl.d.mts +1 -0
- package/dist/cli/sandcovery-kubectl.mjs +8 -0
- package/dist/{handlers-qYjkPftS.mjs → handlers-U3pqRNro.mjs} +13013 -11632
- package/dist/index.d.mts +42 -1
- package/dist/index.mjs +1 -1
- package/dist/{spec-cGDeWJ3v.mjs → port-forwarder-Du1VlKxg.mjs} +2301 -95
- package/dist/{src-zWk1RjrB.mjs → src-lrpT0LG_.mjs} +1178 -153
- package/dist/{start-B8ruSPVb.mjs → start-Dg7sRQ28.mjs} +35 -423
- package/dist/{telemetry-delivery-8t5RXWli.mjs → telemetry-delivery-BSGibWPJ.mjs} +3 -3
- package/dist/{types-ZqbGCXKy.d.mts → types-C7lGEXT5.d.mts} +110 -5
- package/dist/types.d.mts +2 -2
- package/package.json +7 -4
- package/dist/origin-5maEGWRg.mjs +0 -444
- package/dist/{telemetry-BYnuVdoZ.mjs → telemetry-DBPKT8Ap.mjs} +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $ as FileList, $t as SandboxList, An as XPostRequest, B as DetachedExec, C as CiJob, Ct as Pricing, Dt as Process, Et as ProblemReportRequest, I as CredentialFields, It as ProviderCredential, J as ExecEvent, K as EstimateList, L as CreditCheckout, Lt as ProviderCredentialList, M as CreateSandboxRequest, Mt as ProviderBoard, N as CreateUsageShareRequest, Nt as ProviderBoardEntry, On as XAccountLink, Ot as ProcessRequest, P as CreatedKey, Pt as ProviderCatalog, R as CreditPurchaseRequest, S as CiInstallationList, Sn as UsageShareList, St as PortPreview, T as CiJobList, V as DetachedExecRequest, X as ExecResult, Xt as Sandbox, Y as ExecRequest, Z as FileEntry, _n as Usage, bn as UsageShare, c as AutoTopUpRequest, dn as Stats, en as SandboxStatus, gn as UpdateKeyRequest, ht as MonthlyCostList, i as ActivityList, j as CreateKeyRequest, jt as Provider, kn as XAccountStatus, o as AutoTopUp, on as Snapshot, pt as LiveUsage, q as EstimateRequest, rn as SharedUsage, s as AutoTopUpChange, st as Key, u as Billing, ut as KeyList, vt as Offer, wn as UsageTotals } from "./types-C7lGEXT5.mjs";
|
|
2
|
+
interface ProcessExit {
|
|
3
|
+
readonly code: number;
|
|
4
|
+
readonly signal: string | null;
|
|
5
|
+
}
|
|
6
|
+
interface AttachOptions {
|
|
7
|
+
readonly signal?: AbortSignal;
|
|
8
|
+
readonly stderr?: (data: Uint8Array) => void;
|
|
9
|
+
readonly stdout?: (data: Uint8Array) => void;
|
|
10
|
+
}
|
|
11
|
+
interface ProcessAttachment {
|
|
12
|
+
readonly endStdin: () => void;
|
|
13
|
+
readonly exit: Promise<ProcessExit>;
|
|
14
|
+
readonly resize: (cols: number, rows: number) => void;
|
|
15
|
+
readonly sendSignal: (name: string) => void;
|
|
16
|
+
readonly write: (data: Uint8Array) => Promise<void>;
|
|
17
|
+
}
|
|
2
18
|
interface RequestOptions {
|
|
3
19
|
readonly signal?: AbortSignal;
|
|
4
20
|
}
|
|
@@ -12,6 +28,10 @@ interface PageQuery {
|
|
|
12
28
|
interface ListSandboxesQuery extends PageQuery {
|
|
13
29
|
readonly status?: SandboxStatus;
|
|
14
30
|
}
|
|
31
|
+
interface MonthlyCostQuery {
|
|
32
|
+
readonly hours_per_day: number;
|
|
33
|
+
readonly size: string;
|
|
34
|
+
}
|
|
15
35
|
interface UsageQuery {
|
|
16
36
|
readonly api_key_id?: string;
|
|
17
37
|
readonly from: string;
|
|
@@ -21,6 +41,7 @@ type FileContent = Blob | Uint8Array | string;
|
|
|
21
41
|
type SandboxCall<Result> = (sandboxId: string, options?: RequestOptions) => Promise<Result>;
|
|
22
42
|
type FileCall<Result> = (sandboxId: string, path: string, options?: RequestOptions) => Promise<Result>;
|
|
23
43
|
interface SandboxesApi {
|
|
44
|
+
readonly attachProcess: (sandboxId: string, processId: string, options?: AttachOptions) => ProcessAttachment;
|
|
24
45
|
readonly create: (request?: CreateSandboxRequest, options?: CreateSandboxOptions) => Promise<Sandbox>;
|
|
25
46
|
readonly destroy: SandboxCall<Sandbox>;
|
|
26
47
|
readonly downloadFile: FileCall<ReadableStream<Uint8Array>>;
|
|
@@ -28,6 +49,7 @@ interface SandboxesApi {
|
|
|
28
49
|
readonly execDetached: (sandboxId: string, request: DetachedExecRequest, options?: RequestOptions) => Promise<DetachedExec>;
|
|
29
50
|
readonly execStream: (sandboxId: string, request: ExecRequest, options?: RequestOptions) => AsyncGenerator<ExecEvent>;
|
|
30
51
|
readonly get: SandboxCall<Sandbox>;
|
|
52
|
+
readonly getProcess: (sandboxId: string, processId: string, options?: RequestOptions) => Promise<Process>;
|
|
31
53
|
readonly list: (query?: ListSandboxesQuery, options?: RequestOptions) => Promise<SandboxList>;
|
|
32
54
|
readonly listFiles: FileCall<FileList>;
|
|
33
55
|
readonly pause: SandboxCall<Sandbox>;
|
|
@@ -35,6 +57,7 @@ interface SandboxesApi {
|
|
|
35
57
|
readonly readFile: FileCall<Uint8Array>;
|
|
36
58
|
readonly resume: SandboxCall<Sandbox>;
|
|
37
59
|
readonly snapshot: SandboxCall<Snapshot>;
|
|
60
|
+
readonly startProcess: (sandboxId: string, request: ProcessRequest, options?: RequestOptions) => Promise<Process>;
|
|
38
61
|
readonly writeFile: (sandboxId: string, path: string, content: FileContent, options?: RequestOptions) => Promise<FileEntry>;
|
|
39
62
|
}
|
|
40
63
|
interface KeysApi {
|
|
@@ -46,6 +69,7 @@ interface KeysApi {
|
|
|
46
69
|
}
|
|
47
70
|
interface CredentialsApi {
|
|
48
71
|
readonly add: (provider: Provider, fields: CredentialFields, options?: RequestOptions) => Promise<ProviderCredential>;
|
|
72
|
+
readonly countXPost: (request: XPostRequest, options?: RequestOptions) => Promise<Offer>;
|
|
49
73
|
readonly delete: (provider: Provider, options?: RequestOptions) => Promise<void>;
|
|
50
74
|
readonly deleteOne: (provider: Provider, credentialId: string, options?: RequestOptions) => Promise<void>;
|
|
51
75
|
readonly list: (options?: RequestOptions) => Promise<ProviderCredentialList>;
|
|
@@ -58,6 +82,8 @@ interface ActivityApi {
|
|
|
58
82
|
interface BillingApi {
|
|
59
83
|
readonly buyCredits: (request: CreditPurchaseRequest, options?: RequestOptions) => Promise<CreditCheckout>;
|
|
60
84
|
readonly get: (options?: RequestOptions) => Promise<Billing>;
|
|
85
|
+
readonly setAutoTopUp: (request: AutoTopUpRequest, options?: RequestOptions) => Promise<AutoTopUpChange>;
|
|
86
|
+
readonly stopAutoTopUp: (options?: RequestOptions) => Promise<AutoTopUp>;
|
|
61
87
|
}
|
|
62
88
|
interface CiApi {
|
|
63
89
|
readonly getJob: (jobId: string, options?: RequestOptions) => Promise<CiJob>;
|
|
@@ -67,6 +93,10 @@ interface CiApi {
|
|
|
67
93
|
}
|
|
68
94
|
interface PricingApi {
|
|
69
95
|
readonly get: (options?: RequestOptions) => Promise<Pricing>;
|
|
96
|
+
readonly monthly: (query: MonthlyCostQuery, options?: RequestOptions) => Promise<MonthlyCostList>;
|
|
97
|
+
}
|
|
98
|
+
interface ProblemsApi {
|
|
99
|
+
readonly report: (request: ProblemReportRequest, options?: RequestOptions) => Promise<void>;
|
|
70
100
|
}
|
|
71
101
|
interface ProvidersApi {
|
|
72
102
|
readonly catalog: (options?: RequestOptions) => Promise<ProviderCatalog>;
|
|
@@ -82,9 +112,18 @@ interface UsageKeyQuery {
|
|
|
82
112
|
interface UsageApi {
|
|
83
113
|
readonly estimate: (request: EstimateRequest, options?: RequestOptions) => Promise<EstimateList>;
|
|
84
114
|
readonly get: (query: UsageQuery, options?: RequestOptions) => Promise<Usage>;
|
|
115
|
+
readonly getShared: (token: string, options?: RequestOptions) => Promise<SharedUsage>;
|
|
116
|
+
readonly listShares: (options?: RequestOptions) => Promise<UsageShareList>;
|
|
85
117
|
readonly live: (query?: UsageKeyQuery, options?: RequestOptions) => Promise<LiveUsage>;
|
|
118
|
+
readonly revokeShare: (shareId: string, options?: RequestOptions) => Promise<void>;
|
|
119
|
+
readonly share: (request: CreateUsageShareRequest, options?: RequestOptions) => Promise<UsageShare>;
|
|
86
120
|
readonly totals: (query?: UsageKeyQuery, options?: RequestOptions) => Promise<UsageTotals>;
|
|
87
121
|
}
|
|
122
|
+
interface XAccountApi {
|
|
123
|
+
readonly get: (options?: RequestOptions) => Promise<XAccountStatus>;
|
|
124
|
+
readonly link: (options?: RequestOptions) => Promise<XAccountLink>;
|
|
125
|
+
readonly unlink: (options?: RequestOptions) => Promise<void>;
|
|
126
|
+
}
|
|
88
127
|
export interface SandcoveryOptions {
|
|
89
128
|
readonly apiKey?: string;
|
|
90
129
|
readonly baseUrl?: string | URL;
|
|
@@ -97,10 +136,12 @@ export declare class Sandcovery {
|
|
|
97
136
|
readonly credentials: CredentialsApi;
|
|
98
137
|
readonly keys: KeysApi;
|
|
99
138
|
readonly pricing: PricingApi;
|
|
139
|
+
readonly problems: ProblemsApi;
|
|
100
140
|
readonly providers: ProvidersApi;
|
|
101
141
|
readonly sandboxes: SandboxesApi;
|
|
102
142
|
readonly stats: StatsApi;
|
|
103
143
|
readonly usage: UsageApi;
|
|
144
|
+
readonly xAccount: XAccountApi;
|
|
104
145
|
constructor(options?: SandcoveryOptions);
|
|
105
146
|
}
|
|
106
147
|
export {};
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as Sandcovery } from "./src-
|
|
1
|
+
export { t as Sandcovery } from "./src-lrpT0LG_.mjs";
|