@meetploy/types 1.15.1 → 1.17.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.
@@ -0,0 +1,7 @@
1
+ export interface CacheSetOptions {
2
+ ttl?: number;
3
+ }
4
+ export interface CacheBinding {
5
+ get: (key: string) => Promise<string | null>;
6
+ set: (key: string, value: string, options?: CacheSetOptions) => Promise<void>;
7
+ }
package/dist/cache.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=cache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache.js","sourceRoot":"","sources":["../src/cache.ts"],"names":[],"mappings":""}
package/dist/index.d.ts CHANGED
@@ -3,8 +3,10 @@ export type { QueueBinding, QueueBatchMessage, QueueMessageEvent, QueueSendOptio
3
3
  export type { WorkflowBinding, WorkflowContext, WorkflowExecution, WorkflowExecutionStatus, WorkflowHandler, WorkflowHandlerConfig, WorkflowStep, WorkflowStepOptions, WorkflowTriggerResult, } from "./workflow.js";
4
4
  export type { TimerHandler, ExecutionContext, FetchHandler, MessageHandler, Ploy, PloyHandler, WorkflowHandlers, } from "./ploy.js";
5
5
  export type { TimerBinding, TimerEvent, TimerOptions } from "./timer.js";
6
+ export type { CacheBinding, CacheSetOptions } from "./cache.js";
6
7
  export type { KVNamespace, KVNamespaceGetOptions, KVNamespaceGetMethodOptions, KVNamespaceGetWithMetadataResult, KVNamespaceListKey, KVNamespaceListOptions, KVNamespaceListResult, KVNamespacePutOptions, StateBinding, StateUpdateDoc, } from "./state.js";
7
8
  export type { FileStorageBinding, FileStorageObject, FileStorageKey, FileStorageListResult, FileStoragePutOptions, FileStorageListOptions, } from "./fs.js";
9
+ export type { SandboxBinding, SandboxClient, SandboxSession, SandboxSessionOptions, SandboxExecResult, SandboxExecOptions, SandboxFileEntry, SandboxGitCheckoutOptions, } from "./sandbox.js";
8
10
  export type { ScheduledEvent, ScheduledHandler } from "./scheduled.js";
9
11
  export type { PloyAuth, PloyUser } from "./auth.js";
10
12
  export type { Ai, AiGateway, AiGatewayOptions, AiGatewayRetries, AiRunOptions, } from "./ai.js";
@@ -0,0 +1,63 @@
1
+ export interface SandboxExecResult {
2
+ stdout: string;
3
+ stderr: string;
4
+ exitCode: number;
5
+ success: boolean;
6
+ }
7
+ export interface SandboxExecOptions {
8
+ cwd?: string;
9
+ env?: Record<string, string>;
10
+ timeoutMs?: number;
11
+ }
12
+ export interface SandboxFileEntry {
13
+ name: string;
14
+ path: string;
15
+ type: "file" | "directory";
16
+ size?: number;
17
+ }
18
+ export interface SandboxGitCheckoutOptions {
19
+ branch?: string;
20
+ depth?: number;
21
+ targetDir?: string;
22
+ }
23
+ export interface SandboxSessionOptions {
24
+ cwd?: string;
25
+ env?: Record<string, string>;
26
+ }
27
+ export interface SandboxSession {
28
+ readonly sessionId: string;
29
+ exec: (command: string, options?: SandboxExecOptions) => Promise<SandboxExecResult>;
30
+ execStream: (command: string, options?: SandboxExecOptions) => Promise<ReadableStream<Uint8Array>>;
31
+ writeFile: (path: string, content: string) => Promise<void>;
32
+ readFile: (path: string) => Promise<{
33
+ content: string;
34
+ }>;
35
+ deleteFile: (path: string) => Promise<void>;
36
+ mkdir: (path: string, options?: {
37
+ recursive?: boolean;
38
+ }) => Promise<void>;
39
+ listFiles: (path: string) => Promise<SandboxFileEntry[]>;
40
+ gitCheckout: (repoUrl: string, options?: SandboxGitCheckoutOptions) => Promise<void>;
41
+ setEnvVars: (vars: Record<string, string>) => Promise<void>;
42
+ }
43
+ export interface SandboxClient {
44
+ readonly id: string;
45
+ exec: (command: string, options?: SandboxExecOptions) => Promise<SandboxExecResult>;
46
+ execStream: (command: string, options?: SandboxExecOptions) => Promise<ReadableStream<Uint8Array>>;
47
+ writeFile: (path: string, content: string) => Promise<void>;
48
+ readFile: (path: string) => Promise<{
49
+ content: string;
50
+ }>;
51
+ deleteFile: (path: string) => Promise<void>;
52
+ mkdir: (path: string, options?: {
53
+ recursive?: boolean;
54
+ }) => Promise<void>;
55
+ listFiles: (path: string) => Promise<SandboxFileEntry[]>;
56
+ gitCheckout: (repoUrl: string, options?: SandboxGitCheckoutOptions) => Promise<void>;
57
+ setEnvVars: (vars: Record<string, string>) => Promise<void>;
58
+ createSession: (options?: SandboxSessionOptions) => Promise<SandboxSession>;
59
+ destroy: () => Promise<void>;
60
+ }
61
+ export interface SandboxBinding {
62
+ get: (id: string) => SandboxClient;
63
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=sandbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sandbox.js","sourceRoot":"","sources":["../src/sandbox.ts"],"names":[],"mappings":""}
package/globals.d.ts CHANGED
@@ -36,10 +36,14 @@ declare global {
36
36
  type KVNamespace<Metadata = unknown> =
37
37
  import("@meetploy/types").KVNamespace<Metadata>;
38
38
  type QueueBinding = import("@meetploy/types").QueueBinding;
39
+ type CacheBinding = import("@meetploy/types").CacheBinding;
39
40
  type StateBinding = import("@meetploy/types").StateBinding;
40
41
  type WorkflowBinding = import("@meetploy/types").WorkflowBinding;
41
42
  type FileStorageBinding = import("@meetploy/types").FileStorageBinding;
42
43
  type TimerBinding = import("@meetploy/types").TimerBinding;
44
+ type SandboxBinding = import("@meetploy/types").SandboxBinding;
45
+ type SandboxClient = import("@meetploy/types").SandboxClient;
46
+ type SandboxSession = import("@meetploy/types").SandboxSession;
43
47
  type PloyAuth = import("@meetploy/types").PloyAuth;
44
48
  type PloyUser = import("@meetploy/types").PloyUser;
45
49
  type Ai = import("@meetploy/types").Ai;
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@meetploy/types",
3
- "version": "1.15.1",
3
+ "version": "1.17.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "git+https://github.com/polarlightsllc/ploy.git",
7
+ "url": "git+https://github.com/meetploy/ploy.git",
8
8
  "directory": "packages/types"
9
9
  },
10
10
  "license": "SEE LICENSE IN ../../LICENSE",