eve 0.12.1 → 0.12.2
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/CHANGELOG.md +6 -0
- package/dist/src/compiled/.vendor-stamp.json +1 -1
- package/dist/src/compiled/@vercel/sandbox/_async-retry.d.ts +8 -0
- package/dist/src/compiled/@vercel/sandbox/_workflow-serde.d.ts +5 -0
- package/dist/src/compiled/@vercel/sandbox/api-client/api-client.d.ts +1442 -0
- package/dist/src/compiled/@vercel/sandbox/api-client/api-error.d.ts +29 -0
- package/dist/src/compiled/@vercel/sandbox/api-client/base-client.d.ts +39 -0
- package/dist/src/compiled/@vercel/sandbox/api-client/file-writer.d.ts +66 -0
- package/dist/src/compiled/@vercel/sandbox/api-client/index.d.ts +2 -0
- package/dist/src/compiled/@vercel/sandbox/api-client/validators.d.ts +878 -0
- package/dist/src/compiled/@vercel/sandbox/api-client/with-retry.d.ts +10 -0
- package/dist/src/compiled/@vercel/sandbox/auth/error.d.ts +15 -0
- package/dist/src/compiled/@vercel/sandbox/auth/file.d.ts +18 -0
- package/dist/src/compiled/@vercel/sandbox/auth/index.d.ts +6 -0
- package/dist/src/compiled/@vercel/sandbox/auth/oauth.d.ts +111 -0
- package/dist/src/compiled/@vercel/sandbox/auth/poll-for-token.d.ts +28 -0
- package/dist/src/compiled/@vercel/sandbox/auth/project.d.ts +40 -0
- package/dist/src/compiled/@vercel/sandbox/command.d.ts +290 -0
- package/dist/src/compiled/@vercel/sandbox/constants.d.ts +5 -0
- package/dist/src/compiled/@vercel/sandbox/filesystem.d.ts +258 -0
- package/dist/src/compiled/@vercel/sandbox/index.d.ts +10 -129
- package/dist/src/compiled/@vercel/sandbox/proxy.d.ts +55 -0
- package/dist/src/compiled/@vercel/sandbox/sandbox.d.ts +1058 -0
- package/dist/src/compiled/@vercel/sandbox/session.d.ts +432 -0
- package/dist/src/compiled/@vercel/sandbox/snapshot.d.ts +229 -0
- package/dist/src/compiled/@vercel/sandbox/utils/get-credentials.d.ts +21 -0
- package/dist/src/compiled/@vercel/sandbox/utils/paginator.d.ts +16 -0
- package/dist/src/compiled/@vercel/sandbox/utils/resolveSignal.d.ts +15 -0
- package/dist/src/compiled/@vercel/sandbox/utils/sandbox-snapshot.d.ts +11 -0
- package/dist/src/compiled/@vercel/sandbox/utils/types.d.ts +11 -0
- package/dist/src/compiled/chat/_workflow-serde.d.ts +3 -0
- package/dist/src/compiled/chat/index.d.ts +1 -1
- package/dist/src/execution/sandbox/bindings/vercel-base-runtime.d.ts +3 -3
- package/dist/src/execution/sandbox/bindings/vercel-create-sdk.d.ts +8 -13
- package/dist/src/execution/sandbox/bindings/vercel-credentials.d.ts +3 -3
- package/dist/src/execution/sandbox/bindings/vercel-lookup.d.ts +4 -5
- package/dist/src/execution/sandbox/bindings/vercel-read-stream.d.ts +5 -0
- package/dist/src/execution/sandbox/bindings/vercel-read-stream.js +1 -0
- package/dist/src/execution/sandbox/bindings/vercel-sdk-types.d.ts +6 -0
- package/dist/src/execution/sandbox/bindings/vercel-sdk-types.js +1 -0
- package/dist/src/execution/sandbox/bindings/vercel.d.ts +4 -4
- package/dist/src/execution/sandbox/bindings/vercel.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/public/sandbox/vercel-sandbox.d.ts +12 -9
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/shared/sandbox-network-policy.d.ts +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region src/api-client/api-error.d.ts
|
|
2
|
+
interface Options<ErrorData> {
|
|
3
|
+
message?: string;
|
|
4
|
+
json?: ErrorData;
|
|
5
|
+
text?: string;
|
|
6
|
+
sandboxName?: string;
|
|
7
|
+
sessionId?: string;
|
|
8
|
+
}
|
|
9
|
+
declare class APIError<ErrorData> extends Error {
|
|
10
|
+
response: Response;
|
|
11
|
+
message: string;
|
|
12
|
+
json?: ErrorData;
|
|
13
|
+
text?: string;
|
|
14
|
+
sandboxName?: string;
|
|
15
|
+
sessionId?: string;
|
|
16
|
+
constructor(response: Response, options?: Options<ErrorData>);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Error thrown when a stream error is received streaming.
|
|
20
|
+
* This typically occurs when the sandbox is stopped while streaming.
|
|
21
|
+
*/
|
|
22
|
+
declare class StreamError extends Error {
|
|
23
|
+
code: string;
|
|
24
|
+
sessionId: string;
|
|
25
|
+
constructor(code: string, message: string, sessionId: string);
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { APIError, StreamError };
|
|
29
|
+
//# sourceMappingURL=api-error.d.ts.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { RequestOptions } from "./with-retry.js";
|
|
2
|
+
import { Options } from "../_async-retry.js";
|
|
3
|
+
import "#compiled/zod/index.js";
|
|
4
|
+
|
|
5
|
+
//#region src/api-client/base-client.d.ts
|
|
6
|
+
interface RequestParams extends RequestInit {
|
|
7
|
+
headers?: Record<string, string>;
|
|
8
|
+
method?: string;
|
|
9
|
+
onRetry?(error: any, options: RequestOptions): void;
|
|
10
|
+
query?: Record<string, number | string | null | undefined | string[]>;
|
|
11
|
+
retry?: Partial<Options>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A base API client that provides a convenience wrapper for fetching where
|
|
15
|
+
* we can pass query parameters as an object, support retries, debugging
|
|
16
|
+
* and automatic authorization.
|
|
17
|
+
*/
|
|
18
|
+
declare class BaseClient {
|
|
19
|
+
protected token?: string;
|
|
20
|
+
private fetch;
|
|
21
|
+
private debug;
|
|
22
|
+
private baseUrl;
|
|
23
|
+
private agent;
|
|
24
|
+
constructor(params: {
|
|
25
|
+
debug?: boolean;
|
|
26
|
+
baseUrl: string;
|
|
27
|
+
token?: string;
|
|
28
|
+
fetch?: typeof globalThis.fetch;
|
|
29
|
+
});
|
|
30
|
+
protected request(path: string, opts?: RequestParams): Promise<Response>;
|
|
31
|
+
}
|
|
32
|
+
interface Parsed<Data> {
|
|
33
|
+
response: Response;
|
|
34
|
+
text: string;
|
|
35
|
+
json: Data;
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { BaseClient, Parsed, RequestParams };
|
|
39
|
+
//# sourceMappingURL=base-client.d.ts.map
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Readable } from "stream";
|
|
2
|
+
|
|
3
|
+
//#region src/api-client/file-writer.d.ts
|
|
4
|
+
interface FileData {
|
|
5
|
+
/**
|
|
6
|
+
* The name (path) of the file to write.
|
|
7
|
+
*/
|
|
8
|
+
name: string;
|
|
9
|
+
/**
|
|
10
|
+
* The content of the file.
|
|
11
|
+
*/
|
|
12
|
+
content: string | Uint8Array;
|
|
13
|
+
/**
|
|
14
|
+
* The file mode (permissions) to set on the file.
|
|
15
|
+
* For example, 0o755 for executable files.
|
|
16
|
+
*/
|
|
17
|
+
mode?: number;
|
|
18
|
+
}
|
|
19
|
+
interface FileStream {
|
|
20
|
+
/**
|
|
21
|
+
* The name (path) of the file to write.
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
/**
|
|
25
|
+
* A Readable stream to consume the content of the file.
|
|
26
|
+
*/
|
|
27
|
+
content: Readable;
|
|
28
|
+
/**
|
|
29
|
+
* The expected size of the file. This is required to write
|
|
30
|
+
* the header of the compressed file.
|
|
31
|
+
*/
|
|
32
|
+
size: number;
|
|
33
|
+
/**
|
|
34
|
+
* The file mode (permissions) to set on the file.
|
|
35
|
+
* For example, 0o755 for executable files.
|
|
36
|
+
*/
|
|
37
|
+
mode?: number;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Allows to create a Readable stream with methods to write files
|
|
41
|
+
* to it and to finish it. Files written are compressed together
|
|
42
|
+
* and gzipped in the stream.
|
|
43
|
+
*/
|
|
44
|
+
declare class FileWriter {
|
|
45
|
+
readable: Readable;
|
|
46
|
+
private pack;
|
|
47
|
+
constructor();
|
|
48
|
+
/**
|
|
49
|
+
* Allows to add a file to the stream. Size is required to write
|
|
50
|
+
* the tarball header so when content is a stream it must be
|
|
51
|
+
* provided.
|
|
52
|
+
*
|
|
53
|
+
* Returns a Promise resolved once the file is written in the
|
|
54
|
+
* stream.
|
|
55
|
+
*/
|
|
56
|
+
addFile(file: FileData | FileStream): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Allows to finish the stream returning a Promise that will
|
|
59
|
+
* resolve once the readable is effectively closed or
|
|
60
|
+
* errored.
|
|
61
|
+
*/
|
|
62
|
+
end(): Promise<void>;
|
|
63
|
+
}
|
|
64
|
+
//#endregion
|
|
65
|
+
export { FileWriter };
|
|
66
|
+
//# sourceMappingURL=file-writer.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { Command, CommandData, CommandFinishedData, CommandFinishedResponse, CommandResponse, CreateSnapshotResponse, InteractiveSessionResponse, LogLineStderr, LogLineStdout, Sandbox, SandboxMetaData, SandboxRoute, SandboxRouteData, Session, SessionMetaData, SessionResponse, Snapshot, SnapshotMetadata, SnapshotResponse, SnapshotTreeNode, SnapshotTreeNodeData, StopSessionResponse } from "./validators.js";
|
|
2
|
+
import { APIClient } from "./api-client.js";
|