@alineo-labs/sandbox 0.4.0 → 0.4.1
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/dist/index.d.mts +16 -11
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { BashSession, CheckpointInfo, CommandError, CredentialBinding, CredentialBroker, CredentialBroker as CredentialBroker$1, CredentialResolver, DiagnosticEvent, DiagnosticLog, EnvironmentRecord, EnvironmentRecord as EnvironmentRecord$1, EnvironmentRecord as EnvironmentRecord$2, ExecCodeOptions, ExecConnectionError, ExecHandle, ExecOptions, ExecResult, FileInfo, IStorageAdapter, IStorageAdapter as IStorageAdapter$1, InteractiveExecHandle, LedgerEntry, LedgerEvent, ListSandboxOptions, ListSandboxOptions as ListSandboxOptions$1, Metrics, PendingInteractiveExec, SandboxDetails, SandboxDetails as SandboxDetails$1, SandboxError, SandboxHandle, SandboxHandle as SandboxHandle$1, SandboxHooks, SandboxStatus, StepTimeoutError } from "@alineo-labs/core";
|
|
2
2
|
import { CodeLanguage, CredentialProxyConfig, NetworkPolicy, NetworkPolicy as NetworkPolicy$1, NetworkRule } from "@alineo-labs/opensandbox";
|
|
3
3
|
import { OpenSandboxCredentialBroker } from "@alineo-labs/vault";
|
|
4
|
-
|
|
5
4
|
//#region src/types.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* Client-side SDK error carrying an HTTP-style status code, thrown for
|
|
@@ -11,7 +10,7 @@ import { OpenSandboxCredentialBroker } from "@alineo-labs/vault";
|
|
|
11
10
|
* `OpenSandboxError` from `@alineo-labs/opensandbox`, which is never rethrown as a
|
|
12
11
|
* `SandboxClientError`.
|
|
13
12
|
*/
|
|
14
|
-
declare class SandboxClientError extends Error {
|
|
13
|
+
export declare class SandboxClientError extends Error {
|
|
15
14
|
readonly status: number;
|
|
16
15
|
constructor(message: string, status: number);
|
|
17
16
|
}
|
|
@@ -229,13 +228,13 @@ interface EnvironmentSandboxOptions {
|
|
|
229
228
|
* }
|
|
230
229
|
* ```
|
|
231
230
|
*/
|
|
232
|
-
declare class Environment {
|
|
231
|
+
export declare class Environment {
|
|
233
232
|
/** The environment name, as passed to `client.environment()`. */
|
|
234
233
|
readonly name: string;
|
|
235
234
|
private readonly opts;
|
|
236
235
|
private readonly client;
|
|
237
|
-
constructor(
|
|
238
|
-
|
|
236
|
+
constructor(
|
|
237
|
+
/** The environment name, as passed to `client.environment()`. */
|
|
239
238
|
name: string, opts: EnvironmentOptions, client: Sandbox);
|
|
240
239
|
/**
|
|
241
240
|
* Return a sandbox pre-configured with this environment.
|
|
@@ -278,7 +277,7 @@ declare class Environment {
|
|
|
278
277
|
* await sb.close();
|
|
279
278
|
* ```
|
|
280
279
|
*/
|
|
281
|
-
declare class Sandbox {
|
|
280
|
+
export declare class Sandbox {
|
|
282
281
|
private readonly _control;
|
|
283
282
|
private readonly _adapter;
|
|
284
283
|
private readonly _credentialBroker;
|
|
@@ -436,9 +435,13 @@ declare class Sandbox {
|
|
|
436
435
|
* ```
|
|
437
436
|
*/
|
|
438
437
|
readonly sandboxes: {
|
|
439
|
-
/** List all sandbox records across all names, newest first. */
|
|
440
|
-
|
|
441
|
-
|
|
438
|
+
/** List all sandbox records across all names, newest first. */
|
|
439
|
+
list: (opts?: ListSandboxOptions$1) => Promise<SandboxDetails$1[]>;
|
|
440
|
+
/** List sandbox records for a specific name, newest first. */
|
|
441
|
+
listByName: (name: string, opts?: ListSandboxOptions$1) => Promise<SandboxDetails$1[]>;
|
|
442
|
+
/** Return details for a single sandbox record. Returns `null` if not found. */
|
|
443
|
+
get: (name: string, sandboxId: string) => Promise<SandboxDetails$1 | null>;
|
|
444
|
+
/** Delete all ledger events for a sandbox. */
|
|
442
445
|
delete: (name: string, sandboxId: string) => Promise<void>;
|
|
443
446
|
};
|
|
444
447
|
/**
|
|
@@ -478,7 +481,9 @@ declare class Sandbox {
|
|
|
478
481
|
* ```
|
|
479
482
|
*/
|
|
480
483
|
readonly environments: {
|
|
481
|
-
/** Return all environment records, newest first. */
|
|
484
|
+
/** Return all environment records, newest first. */
|
|
485
|
+
list: () => Promise<EnvironmentRecord$1[]>;
|
|
486
|
+
/** Remove the ledger record for a named environment. Does not delete the server-side snapshot. */
|
|
482
487
|
delete: (name: string) => Promise<void>;
|
|
483
488
|
};
|
|
484
489
|
_envInfo(name: string): Promise<EnvironmentRecord$1 | null>;
|
|
@@ -497,4 +502,4 @@ declare class Sandbox {
|
|
|
497
502
|
private _releaseSlot;
|
|
498
503
|
}
|
|
499
504
|
//#endregion
|
|
500
|
-
export { BashSession, type CheckpointInfo, CodeLanguage, CommandError, type CredentialBinding, type CredentialBroker, type CredentialProxyConfig, type DiagnosticEvent, type DiagnosticLog,
|
|
505
|
+
export { BashSession, type CheckpointInfo, CodeLanguage, CommandError, type CredentialBinding, type CredentialBroker, type CredentialProxyConfig, type DiagnosticEvent, type DiagnosticLog, type EnvironmentOptions, type EnvironmentRecord, type EnvironmentSandboxOptions, type ExecCodeOptions, ExecConnectionError, type ExecHandle, type ExecOptions, type ExecResult, type FileInfo, type IStorageAdapter, type InteractiveExecHandle, type LedgerEntry, LedgerEvent, type ListSandboxOptions, type Metrics, type NetworkPolicy, type NetworkRule, OpenSandboxCredentialBroker, type PendingInteractiveExec, type ResumeOptions, type SandboxClientOptions, type SandboxDetails, SandboxError, SandboxHandle, type SandboxOptions, SandboxStatus, StepTimeoutError };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alineo-labs/sandbox",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
"test:watch": "vitest"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@alineo-labs/core": "0.4.
|
|
32
|
+
"@alineo-labs/core": "0.4.1",
|
|
33
33
|
"@alineo-labs/opensandbox": "0.3.0",
|
|
34
|
-
"@alineo-labs/vault": "0.3.
|
|
34
|
+
"@alineo-labs/vault": "0.3.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"bun-types": "1.
|
|
38
|
-
"tsdown": "0.
|
|
37
|
+
"bun-types": "1.4.2",
|
|
38
|
+
"tsdown": "0.23.0",
|
|
39
39
|
"typescript": "6.0.3",
|
|
40
|
-
"vitest": "
|
|
40
|
+
"vitest": "5.0.0"
|
|
41
41
|
}
|
|
42
42
|
}
|