@computesdk/provider 1.0.31 → 1.0.33
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 +86 -1
- package/dist/index.d.ts +86 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -319,6 +319,91 @@ interface BlaxelProviderConfig {
|
|
|
319
319
|
/** Blaxel workspace */
|
|
320
320
|
workspace?: string;
|
|
321
321
|
}
|
|
322
|
+
/**
|
|
323
|
+
* Storage Provider Types
|
|
324
|
+
*
|
|
325
|
+
* Unified interface for object storage providers (S3, R2, Tigris, etc.)
|
|
326
|
+
*/
|
|
327
|
+
/**
|
|
328
|
+
* Storage object metadata
|
|
329
|
+
*/
|
|
330
|
+
interface StorageObject {
|
|
331
|
+
/** Bucket name */
|
|
332
|
+
bucket: string;
|
|
333
|
+
/** Object key/path */
|
|
334
|
+
key: string;
|
|
335
|
+
/** Object size in bytes */
|
|
336
|
+
size: number;
|
|
337
|
+
/** ETag (entity tag) for the object */
|
|
338
|
+
etag?: string;
|
|
339
|
+
/** Last modified date */
|
|
340
|
+
lastModified?: Date;
|
|
341
|
+
/** Optional metadata */
|
|
342
|
+
metadata?: Record<string, string>;
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Options for uploading objects
|
|
346
|
+
*/
|
|
347
|
+
interface UploadOptions {
|
|
348
|
+
/** MIME content type */
|
|
349
|
+
contentType?: string;
|
|
350
|
+
/** Custom metadata */
|
|
351
|
+
metadata?: Record<string, string>;
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Result from a download operation
|
|
355
|
+
*/
|
|
356
|
+
interface DownloadResult {
|
|
357
|
+
/** Object data as Uint8Array (cross-platform compatible) */
|
|
358
|
+
data: Uint8Array;
|
|
359
|
+
/** Object size in bytes */
|
|
360
|
+
size: number;
|
|
361
|
+
/** MIME content type */
|
|
362
|
+
contentType?: string;
|
|
363
|
+
/** ETag (entity tag) */
|
|
364
|
+
etag?: string;
|
|
365
|
+
/** Last modified date */
|
|
366
|
+
lastModified?: Date;
|
|
367
|
+
/** Custom metadata */
|
|
368
|
+
metadata?: Record<string, string>;
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Options for listing objects
|
|
372
|
+
*/
|
|
373
|
+
interface ListOptions {
|
|
374
|
+
/** Prefix to filter objects */
|
|
375
|
+
prefix?: string;
|
|
376
|
+
/** Maximum number of keys to return */
|
|
377
|
+
maxKeys?: number;
|
|
378
|
+
/** Continuation token for pagination */
|
|
379
|
+
continuationToken?: string;
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Result from a list operation
|
|
383
|
+
*/
|
|
384
|
+
interface ListResult {
|
|
385
|
+
/** List of objects */
|
|
386
|
+
objects: StorageObject[];
|
|
387
|
+
/** Whether there are more results */
|
|
388
|
+
truncated: boolean;
|
|
389
|
+
/** Continuation token for next page */
|
|
390
|
+
continuationToken?: string;
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* Base storage provider interface
|
|
394
|
+
*
|
|
395
|
+
* All storage providers (S3, R2, Tigris) implement this interface
|
|
396
|
+
*/
|
|
397
|
+
interface StorageProvider {
|
|
398
|
+
/** Upload data to storage */
|
|
399
|
+
upload(bucket: string, key: string, data: Uint8Array | string, options?: UploadOptions): Promise<StorageObject>;
|
|
400
|
+
/** Download data from storage */
|
|
401
|
+
download(bucket: string, key: string): Promise<DownloadResult>;
|
|
402
|
+
/** Delete object from storage */
|
|
403
|
+
delete(bucket: string, key: string): Promise<void>;
|
|
404
|
+
/** List objects in bucket */
|
|
405
|
+
list(bucket: string, options?: ListOptions): Promise<ListResult>;
|
|
406
|
+
}
|
|
322
407
|
|
|
323
408
|
/**
|
|
324
409
|
* Provider Factory - Creates providers from method definitions
|
|
@@ -670,4 +755,4 @@ declare function calculateBackoff(attempt: number, baseDelay?: number, jitterMax
|
|
|
670
755
|
*/
|
|
671
756
|
declare function escapeShellArg(arg: string): string;
|
|
672
757
|
|
|
673
|
-
export { type BlaxelProviderConfig, type CloudflareProviderConfig, type CodesandboxProviderConfig, type ComputeAPI, type ComputeConfig, type ComputeFactoryConfig, type CreateComputeConfig, type CreateSandboxParams, type CreateSandboxParamsWithOptionalProvider, type CreateSnapshotOptions, type CreateTemplateOptions, type DaemonConfig, type DaytonaProviderConfig, type E2BProviderConfig, type ExtendTimeoutOptions, type ExtractProviderSandboxType, type FindOrCreateSandboxOptions, type FindSandboxOptions, type InfraProvider, type InfraProviderConfig, type InfraProviderMethods, type ListSnapshotsOptions, type ListTemplatesOptions, type ModalProviderConfig, type Provider, type ProviderConfig, type ProviderSandbox, type ProviderSandboxManager, type ProviderSnapshotManager, type ProviderTemplateManager, type RailwayProviderConfig, type RunloopProviderConfig, type SandboxMethods, type SnapshotMethods, type TemplateMethods, type TypedComputeAPI, type TypedProviderSandbox, type VercelProviderConfig, calculateBackoff, createCompute, defineCompute, defineInfraProvider, defineProvider, escapeShellArg };
|
|
758
|
+
export { type BlaxelProviderConfig, type CloudflareProviderConfig, type CodesandboxProviderConfig, type ComputeAPI, type ComputeConfig, type ComputeFactoryConfig, type CreateComputeConfig, type CreateSandboxParams, type CreateSandboxParamsWithOptionalProvider, type CreateSnapshotOptions, type CreateTemplateOptions, type DaemonConfig, type DaytonaProviderConfig, type DownloadResult, type E2BProviderConfig, type ExtendTimeoutOptions, type ExtractProviderSandboxType, type FindOrCreateSandboxOptions, type FindSandboxOptions, type InfraProvider, type InfraProviderConfig, type InfraProviderMethods, type ListOptions, type ListResult, type ListSnapshotsOptions, type ListTemplatesOptions, type ModalProviderConfig, type Provider, type ProviderConfig, type ProviderSandbox, type ProviderSandboxManager, type ProviderSnapshotManager, type ProviderTemplateManager, type RailwayProviderConfig, type RunloopProviderConfig, type SandboxMethods, type SnapshotMethods, type StorageObject, type StorageProvider, type TemplateMethods, type TypedComputeAPI, type TypedProviderSandbox, type UploadOptions, type VercelProviderConfig, calculateBackoff, createCompute, defineCompute, defineInfraProvider, defineProvider, escapeShellArg };
|
package/dist/index.d.ts
CHANGED
|
@@ -319,6 +319,91 @@ interface BlaxelProviderConfig {
|
|
|
319
319
|
/** Blaxel workspace */
|
|
320
320
|
workspace?: string;
|
|
321
321
|
}
|
|
322
|
+
/**
|
|
323
|
+
* Storage Provider Types
|
|
324
|
+
*
|
|
325
|
+
* Unified interface for object storage providers (S3, R2, Tigris, etc.)
|
|
326
|
+
*/
|
|
327
|
+
/**
|
|
328
|
+
* Storage object metadata
|
|
329
|
+
*/
|
|
330
|
+
interface StorageObject {
|
|
331
|
+
/** Bucket name */
|
|
332
|
+
bucket: string;
|
|
333
|
+
/** Object key/path */
|
|
334
|
+
key: string;
|
|
335
|
+
/** Object size in bytes */
|
|
336
|
+
size: number;
|
|
337
|
+
/** ETag (entity tag) for the object */
|
|
338
|
+
etag?: string;
|
|
339
|
+
/** Last modified date */
|
|
340
|
+
lastModified?: Date;
|
|
341
|
+
/** Optional metadata */
|
|
342
|
+
metadata?: Record<string, string>;
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Options for uploading objects
|
|
346
|
+
*/
|
|
347
|
+
interface UploadOptions {
|
|
348
|
+
/** MIME content type */
|
|
349
|
+
contentType?: string;
|
|
350
|
+
/** Custom metadata */
|
|
351
|
+
metadata?: Record<string, string>;
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Result from a download operation
|
|
355
|
+
*/
|
|
356
|
+
interface DownloadResult {
|
|
357
|
+
/** Object data as Uint8Array (cross-platform compatible) */
|
|
358
|
+
data: Uint8Array;
|
|
359
|
+
/** Object size in bytes */
|
|
360
|
+
size: number;
|
|
361
|
+
/** MIME content type */
|
|
362
|
+
contentType?: string;
|
|
363
|
+
/** ETag (entity tag) */
|
|
364
|
+
etag?: string;
|
|
365
|
+
/** Last modified date */
|
|
366
|
+
lastModified?: Date;
|
|
367
|
+
/** Custom metadata */
|
|
368
|
+
metadata?: Record<string, string>;
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Options for listing objects
|
|
372
|
+
*/
|
|
373
|
+
interface ListOptions {
|
|
374
|
+
/** Prefix to filter objects */
|
|
375
|
+
prefix?: string;
|
|
376
|
+
/** Maximum number of keys to return */
|
|
377
|
+
maxKeys?: number;
|
|
378
|
+
/** Continuation token for pagination */
|
|
379
|
+
continuationToken?: string;
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Result from a list operation
|
|
383
|
+
*/
|
|
384
|
+
interface ListResult {
|
|
385
|
+
/** List of objects */
|
|
386
|
+
objects: StorageObject[];
|
|
387
|
+
/** Whether there are more results */
|
|
388
|
+
truncated: boolean;
|
|
389
|
+
/** Continuation token for next page */
|
|
390
|
+
continuationToken?: string;
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* Base storage provider interface
|
|
394
|
+
*
|
|
395
|
+
* All storage providers (S3, R2, Tigris) implement this interface
|
|
396
|
+
*/
|
|
397
|
+
interface StorageProvider {
|
|
398
|
+
/** Upload data to storage */
|
|
399
|
+
upload(bucket: string, key: string, data: Uint8Array | string, options?: UploadOptions): Promise<StorageObject>;
|
|
400
|
+
/** Download data from storage */
|
|
401
|
+
download(bucket: string, key: string): Promise<DownloadResult>;
|
|
402
|
+
/** Delete object from storage */
|
|
403
|
+
delete(bucket: string, key: string): Promise<void>;
|
|
404
|
+
/** List objects in bucket */
|
|
405
|
+
list(bucket: string, options?: ListOptions): Promise<ListResult>;
|
|
406
|
+
}
|
|
322
407
|
|
|
323
408
|
/**
|
|
324
409
|
* Provider Factory - Creates providers from method definitions
|
|
@@ -670,4 +755,4 @@ declare function calculateBackoff(attempt: number, baseDelay?: number, jitterMax
|
|
|
670
755
|
*/
|
|
671
756
|
declare function escapeShellArg(arg: string): string;
|
|
672
757
|
|
|
673
|
-
export { type BlaxelProviderConfig, type CloudflareProviderConfig, type CodesandboxProviderConfig, type ComputeAPI, type ComputeConfig, type ComputeFactoryConfig, type CreateComputeConfig, type CreateSandboxParams, type CreateSandboxParamsWithOptionalProvider, type CreateSnapshotOptions, type CreateTemplateOptions, type DaemonConfig, type DaytonaProviderConfig, type E2BProviderConfig, type ExtendTimeoutOptions, type ExtractProviderSandboxType, type FindOrCreateSandboxOptions, type FindSandboxOptions, type InfraProvider, type InfraProviderConfig, type InfraProviderMethods, type ListSnapshotsOptions, type ListTemplatesOptions, type ModalProviderConfig, type Provider, type ProviderConfig, type ProviderSandbox, type ProviderSandboxManager, type ProviderSnapshotManager, type ProviderTemplateManager, type RailwayProviderConfig, type RunloopProviderConfig, type SandboxMethods, type SnapshotMethods, type TemplateMethods, type TypedComputeAPI, type TypedProviderSandbox, type VercelProviderConfig, calculateBackoff, createCompute, defineCompute, defineInfraProvider, defineProvider, escapeShellArg };
|
|
758
|
+
export { type BlaxelProviderConfig, type CloudflareProviderConfig, type CodesandboxProviderConfig, type ComputeAPI, type ComputeConfig, type ComputeFactoryConfig, type CreateComputeConfig, type CreateSandboxParams, type CreateSandboxParamsWithOptionalProvider, type CreateSnapshotOptions, type CreateTemplateOptions, type DaemonConfig, type DaytonaProviderConfig, type DownloadResult, type E2BProviderConfig, type ExtendTimeoutOptions, type ExtractProviderSandboxType, type FindOrCreateSandboxOptions, type FindSandboxOptions, type InfraProvider, type InfraProviderConfig, type InfraProviderMethods, type ListOptions, type ListResult, type ListSnapshotsOptions, type ListTemplatesOptions, type ModalProviderConfig, type Provider, type ProviderConfig, type ProviderSandbox, type ProviderSandboxManager, type ProviderSnapshotManager, type ProviderTemplateManager, type RailwayProviderConfig, type RunloopProviderConfig, type SandboxMethods, type SnapshotMethods, type StorageObject, type StorageProvider, type TemplateMethods, type TypedComputeAPI, type TypedProviderSandbox, type UploadOptions, type VercelProviderConfig, calculateBackoff, createCompute, defineCompute, defineInfraProvider, defineProvider, escapeShellArg };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@computesdk/provider",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.33",
|
|
4
4
|
"description": "Provider framework for ComputeSDK - define custom sandbox providers",
|
|
5
5
|
"author": "Garrison",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@computesdk/cmd": "0.4.1",
|
|
39
|
-
"computesdk": "2.5.
|
|
39
|
+
"computesdk": "2.5.3"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/node": "^20.0.0",
|