@computesdk/platform 0.0.0-stage → 0.2.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/LICENSE +21 -0
- package/README.md +153 -2
- package/dist/index.d.mts +334 -0
- package/dist/index.d.ts +334 -0
- package/dist/index.js +938 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +888 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +67 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/provider.ts","../src/client.ts"],"sourcesContent":["/**\n * The hosted-platform provider: `defineProvider({ name: 'platform', … })`\n * over the platform's `/api/v1/sandboxes` routes, sharing auth resolution,\n * host trust, SSE parsing and error handling with `@computesdk/cli`'s\n * transport in `client.ts`.\n */\nimport { randomUUID } from 'node:crypto';\nimport { defineProvider } from '@computesdk/provider';\nimport type {\n CommandResult,\n CreateInstanceOptions,\n FileEntry,\n InstanceInfo,\n RunCommandOptions,\n} from '@computesdk/provider';\nimport {\n MARKET_CODES,\n PlatformApiError,\n PlatformClient,\n PlatformClientError,\n readSseNamedEvents,\n resolvePlatformAuth,\n} from './client.js';\nimport type {\n CommandResult as PlatformCommandResult,\n PathView,\n SandboxDetail,\n SandboxSummary,\n} from './types.js';\n\nexport type PlatformSize = 'small' | 'medium' | 'large' | 'xlarge';\n\nexport interface PlatformConfig {\n /** An org API key or an OAuth access token; both are sent as Bearer. */\n apiKey?: string;\n /** baseUrl > COMPUTE_PLATFORM_URL > BENCHMARKS_PLATFORM_URL > the default host. */\n baseUrl?: string;\n /** Org slug, sent as X-Org-Slug (also COMPUTE_ORG); ignored for org API keys. */\n org?: string;\n /** Send credentials to a host outside computesdk.com/loopback. */\n allowUntrustedHost?: boolean;\n /** Applied to every create unless the call overrides it. */\n defaults?: {\n size?: PlatformSize;\n maxPrice?: { usd: number; per: 'second' | 'minute' | 'hour' };\n orderType?: 'market' | 'limit';\n providerOrder?: string[];\n };\n /** fetch override, for tests and proxies. */\n fetch?: typeof fetch;\n}\n\n/** Platform-specific create options, alongside the universal ones. */\nexport interface PlatformCreateOptions extends CreateInstanceOptions {\n size?: PlatformSize;\n maxPrice?: { usd: number; per: 'second' | 'minute' | 'hour' };\n orderType?: 'market' | 'limit';\n providerOrder?: string[];\n /** Org vault secret names to inject, up to 100. */\n secrets?: string[];\n /** Disk v1: `{ diskId, path, readonly?, branch? }`; diskId must be under `<orgSlug>/`. */\n disk?: { diskId: string; path: string; readonly?: boolean; branch?: string };\n /** Sandbox label (falls back to universal `name`); max 200 characters. */\n label?: string;\n /** Makes the create safe to replay across process restarts. */\n idempotencyKey?: string;\n}\n\n/** What the SDK's instance handle carries through to every method call. */\ninterface PlatformInstance {\n id: string;\n detail: SandboxDetail;\n client: PlatformClient;\n /** envs passed at create — merged under each command's env. */\n envs: Record<string, string>;\n /** The create's `timeout` — getInfo fallback when `summary.timeoutMs` is null. */\n createTimeout?: number;\n}\n\nconst SANDBOXES = '/api/v1/sandboxes';\nconst CREATE_REQUEST_TIMEOUT_MS = 310_000;\nconst CREATE_DEADLINE_MS = 6 * 60_000;\nconst CREATE_POLL_MS = 2_000;\nconst BOOTING_RETRY_WINDOW_MS = 60_000;\nconst COMMAND_TIMEOUT_LIMIT_MS = 290_000;\nconst COMMAND_LENGTH_LIMIT_BYTES = 64 * 1024;\nconst FILE_CONTENT_LIMIT_BYTES = 4 * 1024 * 1024;\n\nconst FILE_LIMIT_MESSAGE =\n 'The files API carries about 4 MB per request. Files larger than that need an upload/download URL (not yet implemented).';\nconst COMMAND_TIMEOUT_MESSAGE =\n \"Commands over 290s can't run in one request; use background: true or processes\";\n\nfunction invalidArgument(message: string): PlatformClientError {\n return new PlatformClientError('invalid_argument', message);\n}\n\nfunction sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\nfunction isNetworkError(error: unknown): boolean {\n return error instanceof TypeError && /fetch failed/i.test(error.message);\n}\n\nfunction isTimeoutError(error: unknown): boolean {\n return error instanceof DOMException && error.name === 'TimeoutError';\n}\n\n/** Combines a timeout with an optional caller signal (AbortSignal.any fallback). */\nfunction createSignal(timeoutMs: number, caller?: AbortSignal): AbortSignal {\n const controller = new AbortController();\n const timer = setTimeout(\n () => controller.abort(new DOMException('The create request timed out', 'TimeoutError')),\n timeoutMs,\n );\n (timer as { unref?: () => void }).unref?.();\n caller?.addEventListener('abort', () => controller.abort(caller.reason), { once: true });\n return controller.signal;\n}\n\n/**\n * One request with the SDK's retry policy: `sandbox_booting` exponential\n * backoff (up to ~60 s — matched on the code, not the status, so\n * `no_market_capacity` 503s are never retried), 429 honoring Retry-After,\n * and network retries on GET/DELETE only. No other POST is retried.\n */\nasync function request<T>(call: () => Promise<T>, retryOnNetworkError: boolean): Promise<T> {\n const bootingDeadline = Date.now() + BOOTING_RETRY_WINDOW_MS;\n let bootBackoff = 500;\n let rateLimited = 0;\n let networkAttempts = 0;\n for (;;) {\n try {\n return await call();\n } catch (error) {\n if (error instanceof PlatformApiError && error.code === 'sandbox_booting' && Date.now() < bootingDeadline) {\n await sleep(bootBackoff);\n bootBackoff = Math.min(bootBackoff * 2, 8_000);\n continue;\n }\n if (error instanceof PlatformApiError && error.status === 429 && rateLimited < 3) {\n rateLimited += 1;\n await sleep(error.retryAfterMs ?? Math.min(2_000 * rateLimited, 10_000));\n continue;\n }\n if (isNetworkError(error) && retryOnNetworkError && networkAttempts < 2) {\n networkAttempts += 1;\n await sleep(500 * (networkAttempts + 1));\n continue;\n }\n throw error;\n }\n }\n}\n\n// ─── Create-body mapping ────────────────────────────────────────────────────\n\nconst RESOURCE_ALIASES: Record<string, 'cpus' | 'memoryMb' | 'ephemeralDiskMb'> = {\n cpus: 'cpus',\n vcpus: 'cpus',\n memoryMb: 'memoryMb',\n memoryMiB: 'memoryMb',\n memMiB: 'memoryMb',\n memory: 'memoryMb',\n diskMb: 'ephemeralDiskMb',\n diskMiB: 'ephemeralDiskMb',\n};\n\n/** Keys consumed by this mapping or handled elsewhere — never resource keys. */\nconst KNOWN_CREATE_KEYS = new Set([\n 'size', 'maxPrice', 'orderType', 'providerOrder', 'secrets', 'disk', 'label',\n 'idempotencyKey', 'timeout', 'image', 'templateId', 'snapshotId', 'name',\n 'envs', 'signal', 'provider', 'kind',\n]);\n\nconst VALID_SIZES: ReadonlySet<string> = new Set(['small', 'medium', 'large', 'xlarge']);\n\nfunction buildCreateBody(config: PlatformConfig, options?: CreateInstanceOptions): Record<string, unknown> {\n const opts = (options ?? {}) as PlatformCreateOptions;\n if (opts.size !== undefined && !VALID_SIZES.has(opts.size)) {\n throw invalidArgument(`size must be one of ${[...VALID_SIZES].join('/')}`);\n }\n const body: Record<string, unknown> = {};\n\n // Resource options → body resources {cpus, memoryMb, ephemeralDiskMb}.\n const resources: Record<string, number> = {};\n for (const [key, value] of Object.entries(opts)) {\n if (value === undefined || KNOWN_CREATE_KEYS.has(key)) continue;\n const mapped = RESOURCE_ALIASES[key];\n if (mapped && typeof value === 'number') {\n resources[mapped] = value;\n } else if (!mapped) {\n throw invalidArgument('The platform provider supports size, or cpus/memoryMb/diskMb');\n }\n }\n const hasResources = Object.keys(resources).length > 0;\n\n const size = opts.size ?? (hasResources ? undefined : config.defaults?.size);\n if (size && hasResources) {\n throw invalidArgument('size and resources are mutually exclusive: pass one or the other');\n }\n\n if (size) body.size = size;\n if (hasResources) body.resources = resources;\n\n const maxPrice = opts.maxPrice ?? config.defaults?.maxPrice;\n if (maxPrice) body.maxPrice = maxPrice;\n const orderType = opts.orderType ?? config.defaults?.orderType;\n if (orderType) body.orderType = orderType;\n const providerOrder = opts.providerOrder ?? config.defaults?.providerOrder;\n if (providerOrder) body.providerOrder = providerOrder;\n\n if (opts.timeout !== undefined) body.timeoutMs = opts.timeout;\n const image = opts.image ?? opts.templateId;\n if (image !== undefined) body.image = image;\n if (opts.snapshotId !== undefined) body.snapshotId = opts.snapshotId;\n const label = opts.label ?? opts.name;\n if (label !== undefined) body.label = label;\n if (opts.secrets !== undefined) body.secrets = opts.secrets;\n if (opts.disk !== undefined) body.disk = opts.disk;\n\n body.idempotencyKey = opts.idempotencyKey ?? `sdk-create:${randomUUID()}`;\n return body;\n}\n\n// ─── Instance methods ───────────────────────────────────────────────────────\n\nfunction toInstance(detail: SandboxDetail, client: PlatformClient, envs?: Record<string, string>, createTimeout?: number): PlatformInstance {\n return { id: detail.id, detail, client, envs: envs ?? {}, createTimeout };\n}\n\nfunction toInfo(detail: SandboxDetail, createTimeout?: number): InstanceInfo {\n const status: InstanceInfo['status'] =\n detail.status === 'destroyed'\n ? detail.destroyError\n ? 'error'\n : 'stopped'\n : 'running';\n return {\n id: detail.id,\n provider: 'platform',\n status,\n createdAt: new Date(detail.createdAt),\n timeout: detail.timeoutMs ?? createTimeout ?? 0,\n metadata: {\n provider: detail.provider,\n providerSandboxId: detail.providerSandboxId,\n platformStatus: detail.status,\n placement: detail.placement,\n cost: detail.cost,\n label: detail.label,\n image: detail.image,\n secrets: detail.secrets,\n },\n };\n}\n\nfunction checkCommandLength(command: string): void {\n if (new TextEncoder().encode(command).length > COMMAND_LENGTH_LIMIT_BYTES) {\n throw invalidArgument(`Commands are limited to ${COMMAND_LENGTH_LIMIT_BYTES / 1024} KB on the platform`);\n }\n}\n\nfunction commandBody(\n inst: PlatformInstance,\n command: string,\n options?: RunCommandOptions,\n): Record<string, unknown> {\n checkCommandLength(command);\n const body: Record<string, unknown> = { command };\n if (options?.timeout !== undefined) {\n if (options.timeout > COMMAND_TIMEOUT_LIMIT_MS) throw invalidArgument(COMMAND_TIMEOUT_MESSAGE);\n body.timeoutMs = options.timeout;\n }\n if (options?.cwd !== undefined) body.cwd = options.cwd;\n const env = { ...inst.envs, ...(options?.env ?? {}) };\n if (Object.keys(env).length > 0) body.env = env;\n return body;\n}\n\nexport const platform = defineProvider<PlatformInstance, PlatformConfig>({\n name: 'platform',\n methods: {\n instances: {\n create: async (config: PlatformConfig, options?: CreateInstanceOptions) => {\n const client = await resolveClient(config);\n const body = buildCreateBody(config, options);\n const key = body.idempotencyKey as string;\n const deadline = Date.now() + CREATE_DEADLINE_MS;\n const signal = options?.signal;\n\n for (;;) {\n let detail: SandboxDetail | null = null;\n try {\n const res = await client.post<{ sandbox: SandboxDetail }>(\n SANDBOXES,\n body,\n { signal: createSignal(CREATE_REQUEST_TIMEOUT_MS, signal) },\n );\n detail = res.sandbox;\n } catch (error) {\n if (signal?.aborted) throw signal.reason ?? error;\n // Network error or client timeout: the row may exist — replay\n // the same request under the same idempotency key until the\n // deadline, then admit the outcome is unknowable rather than\n // let a fallback provider double-boot.\n if (isNetworkError(error) || isTimeoutError(error)) {\n if (Date.now() < deadline) continue;\n throw outcomeUnknown(key);\n }\n throw error;\n }\n\n if (detail.status === 'running') {\n return { instance: toInstance(detail, client, options?.envs, options?.timeout), instanceId: detail.id };\n }\n if (detail.status !== 'creating') {\n // A replay surfaced a row in another state (e.g. destroyed).\n return { instance: toInstance(detail, client, options?.envs, options?.timeout), instanceId: detail.id };\n }\n\n // The first attempt is still placing: poll until it lands, its\n // reservation row is cleaned up (404 → the key is free; replay the\n // create once more), or the deadline passes.\n while (Date.now() < deadline) {\n let current: SandboxDetail | null;\n try {\n const res: { sandbox: SandboxDetail } = await client.get<{ sandbox: SandboxDetail }>(\n `${SANDBOXES}/${detail.id}`,\n undefined,\n { signal },\n );\n current = res.sandbox;\n } catch (error) {\n if (signal?.aborted) throw signal.reason ?? error;\n if (error instanceof PlatformApiError && error.status === 404) {\n current = null;\n } else if (\n isNetworkError(error) ||\n (error instanceof PlatformApiError &&\n (error.retryable || (error.status >= 500 && !MARKET_CODES.has(error.code))))\n ) {\n // Transient — keep polling until the deadline, honoring\n // Retry-After on rate limits.\n const retryAfter = error instanceof PlatformApiError ? (error.retryAfterMs ?? 0) : 0;\n await sleep(Math.max(CREATE_POLL_MS, retryAfter));\n continue;\n } else {\n // A `creating` row exists and its fate is now unknown; it may\n // still land and bill. Whatever this error is, escaping\n // without fallback: false would let createWithFallback boot\n // the same sandbox on the next provider.\n (error as { fallback?: boolean }).fallback = false;\n throw error;\n }\n }\n if (current === null) break; // freed key → outer loop replays the create\n if (current.status === 'running') {\n return { instance: toInstance(current, client, options?.envs, options?.timeout), instanceId: current.id };\n }\n detail = current;\n await sleep(CREATE_POLL_MS);\n }\n\n // A box may exist and be billing — falling back to another\n // provider would boot a second one.\n if (Date.now() >= deadline) throw outcomeUnknown(key);\n }\n },\n\n getById: async (config: PlatformConfig, instanceId: string) => {\n const client = await resolveClient(config);\n try {\n const res = await request(\n () => client.get<{ sandbox: SandboxDetail }>(`${SANDBOXES}/${instanceId}`),\n true,\n );\n return { instance: toInstance(res.sandbox, client), instanceId: res.sandbox.id };\n } catch (error) {\n if (error instanceof PlatformApiError && error.status === 404) return null;\n throw error;\n }\n },\n\n list: async (config: PlatformConfig) => {\n const client = await resolveClient(config);\n const instances: { instance: PlatformInstance; instanceId: string }[] = [];\n let cursor: string | null = null;\n do {\n const res = await request(\n () =>\n client.get<{ sandboxes: SandboxSummary[]; nextCursor: string | null }>(SANDBOXES, {\n status: 'running',\n limit: '100',\n ...(cursor ? { cursor } : {}),\n }),\n true,\n );\n for (const summary of res.sandboxes) {\n const detail = summary as unknown as SandboxDetail;\n instances.push({ instance: toInstance(detail, client), instanceId: summary.id });\n }\n cursor = res.nextCursor;\n } while (cursor);\n return instances;\n },\n\n destroy: async (config: PlatformConfig, instanceId: string) => {\n const client = await resolveClient(config);\n try {\n await request(() => client.del(`${SANDBOXES}/${instanceId}`), true);\n } catch (error) {\n // Destroy is idempotent: a missing row is already gone.\n if (!(error instanceof PlatformApiError && error.status === 404)) throw error;\n }\n },\n\n runCommand: async (inst: PlatformInstance, command: string, options?: RunCommandOptions): Promise<CommandResult> => {\n if (options?.background) {\n // Same request-size guard the buffered path applies.\n checkCommandLength(command);\n await request(\n () =>\n inst.client.post(`${SANDBOXES}/${inst.id}/processes`, {\n command,\n ...(options.cwd !== undefined ? { cwd: options.cwd } : {}),\n ...(Object.keys({ ...inst.envs, ...(options.env ?? {}) }).length > 0\n ? { env: { ...inst.envs, ...(options.env ?? {}) } }\n : {}),\n }),\n false,\n );\n return { stdout: '', stderr: '', exitCode: 0, durationMs: 0 };\n }\n const res = await request(\n () => inst.client.post<PlatformCommandResult>(`${SANDBOXES}/${inst.id}/commands`, commandBody(inst, command, options)),\n false,\n );\n return { stdout: res.stdout, stderr: res.stderr, exitCode: res.exitCode, durationMs: res.durationMs };\n },\n\n streamCommand: async (inst: PlatformInstance, command: string, options: RunCommandOptions): Promise<CommandResult> => {\n const body = await request(\n () => inst.client.postStream(`${SANDBOXES}/${inst.id}/commands`, commandBody(inst, command, options)),\n false,\n );\n let stdout = '';\n let stderr = '';\n for await (const { event, data } of readSseNamedEvents(body)) {\n const d = data as Record<string, unknown>;\n if (event === 'stdout') {\n stdout += String(d.chunk ?? '');\n options.onStdout?.(String(d.chunk ?? ''));\n } else if (event === 'stderr') {\n stderr += String(d.chunk ?? '');\n options.onStderr?.(String(d.chunk ?? ''));\n } else if (event === 'exit') {\n return {\n stdout,\n stderr,\n // Killed by a signal → 128, as the CLI's followProcess does.\n exitCode: typeof d.exitCode === 'number' ? d.exitCode : 128,\n durationMs: typeof d.durationMs === 'number' ? d.durationMs : 0,\n };\n } else if (event === 'error') {\n throw new PlatformApiError(\n typeof d.status === 'number' ? d.status : 500,\n typeof d.error === 'string' ? d.error : 'Command stream failed',\n );\n }\n }\n throw new PlatformClientError('stream_ended', 'Command stream ended before the command exited');\n },\n\n getInfo: async (inst: PlatformInstance): Promise<InstanceInfo> => {\n const res = await request(\n () => inst.client.get<{ sandbox: SandboxDetail }>(`${SANDBOXES}/${inst.id}`),\n true,\n );\n inst.detail = res.sandbox;\n return toInfo(res.sandbox, inst.createTimeout);\n },\n\n getUrl: async (inst: PlatformInstance, options: { port: number; protocol?: string }): Promise<string> => {\n try {\n const res = await request(\n () =>\n inst.client.get<{ url: string }>(`${SANDBOXES}/${inst.id}/urls`, {\n port: String(options.port),\n ...(options.protocol !== undefined ? { protocol: options.protocol } : {}),\n }),\n true,\n );\n return res.url;\n } catch (error) {\n if (error instanceof PlatformApiError && error.status === 501) {\n throw new Error(\"This sandbox's provider has no public URLs\");\n }\n throw error;\n }\n },\n\n filesystem: {\n readFile: async (inst: PlatformInstance, path: string): Promise<string> => {\n let view: PathView;\n try {\n view = await request(\n () => inst.client.get<PathView>(`${SANDBOXES}/${inst.id}/files`, { path }),\n true,\n );\n } catch (error) {\n if (error instanceof PlatformApiError && error.status === 404) {\n throw enoent(path);\n }\n if (error instanceof PlatformApiError && error.status === 413) {\n throw invalidArgument(FILE_LIMIT_MESSAGE);\n }\n throw error;\n }\n if (view.type === 'directory') {\n throw new Error(`path is a directory: ${path}`);\n }\n return view.content;\n },\n\n writeFile: async (inst: PlatformInstance, path: string, content: string): Promise<void> => {\n // The platform's ~4 MB cap applies to the request on the wire,\n // not the raw string: JSON escaping expands quotes, backslashes\n // and newlines, so measure the body actually sent.\n const body = { path, content };\n if (new TextEncoder().encode(JSON.stringify(body)).length > FILE_CONTENT_LIMIT_BYTES) {\n throw invalidArgument(FILE_LIMIT_MESSAGE);\n }\n await request(\n () => inst.client.post(`${SANDBOXES}/${inst.id}/files`, body),\n false,\n );\n },\n\n mkdir: async (inst: PlatformInstance, path: string): Promise<void> => {\n await request(\n () => inst.client.post(`${SANDBOXES}/${inst.id}/files`, { path, mkdir: true }),\n false,\n );\n },\n\n readdir: async (inst: PlatformInstance, path: string): Promise<FileEntry[]> => {\n let view: PathView;\n try {\n view = await request(\n () => inst.client.get<PathView>(`${SANDBOXES}/${inst.id}/files`, { path }),\n true,\n );\n } catch (error) {\n if (error instanceof PlatformApiError && error.status === 404) throw enoent(path);\n throw error;\n }\n if (view.type !== 'directory') {\n throw new Error(`path is not a directory: ${path}`);\n }\n return view.entries.map((e) => ({\n name: e.name,\n type: e.type,\n ...(e.size !== undefined ? { size: e.size } : {}),\n ...(e.modified !== undefined ? { modified: new Date(e.modified) } : {}),\n }));\n },\n\n exists: async (inst: PlatformInstance, path: string): Promise<boolean> => {\n try {\n await request(\n () => inst.client.get<PathView>(`${SANDBOXES}/${inst.id}/files`, { path }),\n true,\n );\n return true;\n } catch (error) {\n if (error instanceof PlatformApiError && error.status === 404) return false;\n throw error;\n }\n },\n\n remove: async (inst: PlatformInstance, path: string): Promise<void> => {\n await request(\n () => inst.client.del(`${SANDBOXES}/${inst.id}/files?path=${encodeURIComponent(path)}`),\n true,\n );\n },\n },\n },\n },\n});\n\nfunction outcomeUnknown(key: string): PlatformClientError {\n const err = new PlatformClientError(\n 'create_outcome_unknown',\n `Sandbox create outcome unknown after 6 minutes (idempotencyKey: ${key}). ` +\n 'Check the org dashboard before retrying — the sandbox may still be creating.',\n );\n err.fallback = false;\n return err;\n}\n\nfunction enoent(path: string): Error {\n const error = new Error(`ENOENT: no such file or directory, open '${path}'`);\n (error as NodeJS.ErrnoException).code = 'ENOENT';\n return error;\n}\n\n/** Auth resolves once per provider config object and is cached. */\nconst resolvedClients = new WeakMap<PlatformConfig, Promise<PlatformClient>>();\n\nfunction resolveClient(config: PlatformConfig): Promise<PlatformClient> {\n let promise = resolvedClients.get(config);\n if (!promise) {\n promise = resolvePlatformAuth({\n apiKey: config.apiKey,\n baseUrl: config.baseUrl,\n allowUntrustedHost: config.allowUntrustedHost,\n org: config.org,\n }).then((auth) => new PlatformClient(auth, config.fetch));\n resolvedClients.set(config, promise);\n // A failed resolution (no_credentials, untrusted host) should not poison\n // the cache — the next call can succeed after env vars change.\n promise.catch(() => resolvedClients.delete(config));\n }\n return promise;\n}\n","/**\n * Thin client for the hosted ComputeSDK platform API.\n *\n * This is the single platform transport: `@computesdk/platform` (the SDK\n * provider) and `@computesdk/cli` both use it. Wire types for Actions and\n * sandboxes live in `types.ts` (sandboxes) and in the CLI (Actions); the API\n * is the contract.\n */\n\n\nexport const DEFAULT_BASE_URL = 'https://platform.computesdk.com';\n\n/** Bump with the package version — sent as `User-Agent: @computesdk/platform/<version>`. */\nconst SDK_VERSION = '0.1.0';\n\n/**\n * Market order codes the platform returns. Retrying never changes the\n * outcome, so errors carrying them are `retryable: false`.\n */\nexport const MARKET_CODES: ReadonlySet<string> = new Set([\n 'market_cap_required',\n 'market_access_required',\n 'limit_not_met',\n 'above_protection_limit',\n 'insufficient_credits',\n 'no_market_capacity',\n 'no_provider_configured',\n 'market_lane_not_approved',\n]);\n\n/**\n * Codes a `PlatformApiError` can carry — the market order codes, the sandbox\n * lifecycle codes, and `codeForStatus`'s status-table codes. Kept open for\n * codes added later; callers can `switch (err.code)`.\n */\nexport type PlatformApiErrorCode =\n | 'market_cap_required'\n | 'market_access_required'\n | 'limit_not_met'\n | 'above_protection_limit'\n | 'insufficient_credits'\n | 'no_market_capacity'\n | 'no_provider_configured'\n | 'market_lane_not_approved'\n | 'sandbox_booting'\n | 'idempotency_key_reused'\n | 'bad_request'\n | 'unauthenticated'\n | 'forbidden'\n | 'not_found'\n | 'conflict'\n | 'payload_too_large'\n | 'rate_limited'\n | 'server_error'\n | 'http_error'\n | (string & {});\n\nexport interface PlatformAuth {\n apiKey: string;\n baseUrl: string;\n /** Sent as `X-Org-Slug` when set (--org / COMPUTE_ORG / stored login org). */\n orgSlug?: string;\n}\nexport class PlatformApiError extends Error {\n /** details.code ?? body.code ?? codeForStatus(status) */\n readonly code: PlatformApiErrorCode;\n /** The body's `details` object, when the error response carried one. */\n readonly details?: Record<string, unknown>;\n /** 429/502/503/504 — except market codes, which don't change on retry. */\n readonly retryable: boolean;\n /** Parsed `Retry-After` in ms, when the response carried the header. */\n retryAfterMs?: number;\n\n constructor(\n public status: number,\n message: string,\n public body?: unknown,\n ) {\n super(message);\n this.name = 'PlatformApiError';\n const details = errorDetails(body);\n const bodyCode =\n body && typeof body === 'object' && 'code' in body && typeof (body as { code: unknown }).code === 'string'\n ? (body as { code: string }).code\n : undefined;\n this.details = details;\n this.code = (details && typeof details.code === 'string' ? details.code : undefined) ?? bodyCode ?? codeForStatus(status);\n this.retryable =\n !MARKET_CODES.has(this.code) &&\n (status === 429 || status === 502 || status === 503 || status === 504);\n }\n}\n\n/** Stable machine-readable codes for errors raised by the client itself. */\nexport type PlatformClientErrorCode =\n | 'no_credentials'\n | 'untrusted_host'\n | 'untrusted_host_stored_auth'\n | 'insecure_transport'\n | 'invalid_argument'\n | 'stream_ended'\n | 'create_outcome_unknown'\n | 'workflow_not_found'\n | (string & {});\n\n/** An error the client raised before or instead of an API call. */\nexport class PlatformClientError extends Error {\n /**\n * `false` means falling back to another provider is unsafe — e.g.\n * create_outcome_unknown, where a box may exist and be billing.\n */\n public fallback?: boolean;\n\n constructor(\n public code: PlatformClientErrorCode,\n message: string,\n ) {\n super(message);\n this.name = 'PlatformClientError';\n }\n}\n\n/** The `--json` error envelope; `code` is stable, `message` is for humans. */\nexport interface PlatformErrorEnvelope {\n ok: false;\n error: {\n code: string;\n message: string;\n /** Present when the platform answered; absent for local/transport failures. */\n httpStatus?: number;\n retryable: boolean;\n /** The platform's `details` object, when its error response carried one. */\n details?: Record<string, unknown>;\n };\n}\n\nexport function codeForStatus(status: number): string {\n switch (status) {\n case 400: return 'bad_request';\n case 401: return 'unauthenticated';\n case 403: return 'forbidden';\n case 404: return 'not_found';\n case 409: return 'conflict';\n case 413: return 'payload_too_large';\n case 429: return 'rate_limited';\n default: return status >= 500 ? 'server_error' : 'http_error';\n }\n}\n\nexport function errorDetails(body: unknown): Record<string, unknown> | undefined {\n if (body && typeof body === 'object' && 'details' in body) {\n const details = (body as { details: unknown }).details;\n if (details && typeof details === 'object' && !Array.isArray(details)) {\n return details as Record<string, unknown>;\n }\n }\n return undefined;\n}\n\n/**\n * Classify any error thrown by an Actions command. API errors carry the HTTP\n * status; CLI errors carry their own code; a fetch rejection (DNS, refused\n * connection, TLS) is `network`; anything else is `unknown`.\n */\nexport function toErrorEnvelope(error: unknown): PlatformErrorEnvelope {\n if (error instanceof PlatformApiError) {\n const details = errorDetails(error.body);\n return {\n ok: false,\n error: {\n code: error.code,\n message: error.message,\n httpStatus: error.status,\n retryable: error.retryable,\n ...(details !== undefined && { details }),\n },\n };\n }\n if (error instanceof PlatformClientError) {\n return { ok: false, error: { code: error.code, message: error.message, retryable: false } };\n }\n // undici/Node fetch rejects with a TypeError whose cause is the socket error.\n if (error instanceof TypeError && /fetch failed/i.test(error.message)) {\n const cause = (error as { cause?: unknown }).cause;\n const detail = cause instanceof Error ? `: ${cause.message}` : '';\n return {\n ok: false,\n error: { code: 'network', message: `${error.message}${detail}`, retryable: true },\n };\n }\n return {\n ok: false,\n error: {\n code: 'unknown',\n message: error instanceof Error ? error.message : String(error),\n retryable: false,\n },\n };\n}\n\nexport class PlatformClient {\n constructor(\n private readonly auth: PlatformAuth,\n private readonly fetchImpl: typeof fetch = fetch,\n ) {}\n\n get baseUrl(): string {\n return this.auth.baseUrl;\n }\n\n async get<T>(\n path: string,\n params?: Record<string, string | string[] | undefined>,\n opts?: RequestOpts,\n ): Promise<T> {\n const url = new URL(`${this.auth.baseUrl}${path}`);\n for (const [key, value] of Object.entries(params ?? {})) {\n if (value === undefined) continue;\n for (const v of Array.isArray(value) ? value : [value]) url.searchParams.append(key, v);\n }\n const res = await this.fetchImpl(url, { headers: this.headers(), signal: opts?.signal });\n return this.parse<T>(res);\n }\n\n async post<T>(path: string, body: Record<string, unknown> = {}, opts?: RequestOpts): Promise<T> {\n const res = await this.fetchImpl(`${this.auth.baseUrl}${path}`, {\n method: 'POST',\n headers: { ...this.headers(), 'content-type': 'application/json' },\n body: JSON.stringify(body),\n signal: opts?.signal,\n });\n return this.parse<T>(res);\n }\n\n /**\n * POST JSON and return the raw response body for SSE reading\n * (Accept: text/event-stream). Callers feed it to `readSseNamedEvents`.\n */\n async postStream(\n path: string,\n body: Record<string, unknown> = {},\n opts?: RequestOpts,\n ): Promise<ReadableStream<Uint8Array>> {\n const res = await this.fetchImpl(`${this.auth.baseUrl}${path}`, {\n method: 'POST',\n headers: { ...this.headers(), 'content-type': 'application/json', accept: 'text/event-stream' },\n body: JSON.stringify(body),\n signal: opts?.signal,\n });\n if (!res.ok) {\n await this.parse(res); // throws\n }\n if (!res.body) throw new PlatformClientError('stream_ended', 'SSE response has no body');\n return res.body;\n }\n\n /** POST a raw text body (e.g. a unified diff to `/api/v1/actions/patches`). */\n async postText<T>(path: string, body: string, contentType: string, opts?: RequestOpts): Promise<T> {\n const res = await this.fetchImpl(`${this.auth.baseUrl}${path}`, {\n method: 'POST',\n headers: { ...this.headers(), 'content-type': contentType },\n body,\n signal: opts?.signal,\n });\n return this.parse<T>(res);\n }\n\n async put<T>(path: string, body: Record<string, unknown> = {}, opts?: RequestOpts): Promise<T> {\n const res = await this.fetchImpl(`${this.auth.baseUrl}${path}`, {\n method: 'PUT',\n headers: { ...this.headers(), 'content-type': 'application/json' },\n body: JSON.stringify(body),\n signal: opts?.signal,\n });\n return this.parse<T>(res);\n }\n\n async patch<T>(path: string, body: Record<string, unknown> = {}, opts?: RequestOpts): Promise<T> {\n const res = await this.fetchImpl(`${this.auth.baseUrl}${path}`, {\n method: 'PATCH',\n headers: { ...this.headers(), 'content-type': 'application/json' },\n body: JSON.stringify(body),\n signal: opts?.signal,\n });\n return this.parse<T>(res);\n }\n\n async del<T>(path: string, opts?: RequestOpts): Promise<T> {\n const res = await this.fetchImpl(`${this.auth.baseUrl}${path}`, {\n method: 'DELETE',\n headers: this.headers(),\n signal: opts?.signal,\n });\n return this.parse<T>(res);\n }\n\n /**\n * One `data:` JSON payload per SSE event. `next()` resolves to the payload,\n * or null when the stream ends. Call `close()` to abort.\n */\n async *sse(\n path: string,\n params?: Record<string, string | string[] | undefined>,\n opts?: RequestOpts,\n ): AsyncGenerator<unknown> {\n const url = new URL(`${this.auth.baseUrl}${path}`);\n for (const [key, value] of Object.entries(params ?? {})) {\n if (value === undefined) continue;\n for (const v of Array.isArray(value) ? value : [value]) url.searchParams.append(key, v);\n }\n const res = await this.fetchImpl(url, {\n headers: { ...this.headers(), accept: 'text/event-stream' },\n signal: opts?.signal,\n });\n if (!res.ok) {\n await this.parse(res); // throws\n }\n if (!res.body) throw new Error('SSE response has no body');\n yield* readSseEvents(res.body);\n }\n\n /**\n * `sse()` with the frame's `event:` name preserved — for streams whose\n * events are distinguished by name rather than payload shape (process\n * follow: stdout/stderr share a `{chunk}` payload).\n */\n async *sseNamed(\n path: string,\n params?: Record<string, string | string[] | undefined>,\n opts?: RequestOpts,\n ): AsyncGenerator<{ event: string; data: unknown }> {\n const url = new URL(`${this.auth.baseUrl}${path}`);\n for (const [key, value] of Object.entries(params ?? {})) {\n if (value === undefined) continue;\n for (const v of Array.isArray(value) ? value : [value]) url.searchParams.append(key, v);\n }\n const res = await this.fetchImpl(url, {\n headers: { ...this.headers(), accept: 'text/event-stream' },\n signal: opts?.signal,\n });\n if (!res.ok) {\n await this.parse(res); // throws\n }\n if (!res.body) throw new Error('SSE response has no body');\n yield* readSseNamedEvents(res.body);\n }\n\n /** Download bytes following redirects (artifact URLs 302 to storage). */\n async download(path: string, opts?: RequestOpts): Promise<Uint8Array> {\n // Follow redirects manually: the bearer token is only ever sent to the\n // origin that authenticated this request — a redirect target elsewhere\n // (a signed storage URL carries its own credentials) must not see it.\n let url = `${this.auth.baseUrl}${path}`;\n let res = await this.fetchImpl(url, {\n headers: this.headers(),\n redirect: 'manual',\n signal: opts?.signal,\n });\n const baseOrigin = new URL(this.auth.baseUrl).origin;\n for (let hops = 0; hops < 5 && res.status >= 300 && res.status < 400; hops += 1) {\n const location = res.headers.get('location');\n if (!location) break;\n const target = new URL(location, url);\n const sameOrigin = target.origin === baseOrigin;\n res = await this.fetchImpl(target, {\n headers: sameOrigin ? this.headers() : { accept: '*/*' },\n redirect: 'manual',\n signal: opts?.signal,\n });\n url = target.toString();\n }\n if (!res.ok) {\n const body = await res.json().catch(() => undefined);\n throw apiError(res, body);\n }\n return new Uint8Array(await res.arrayBuffer());\n }\n\n private headers(): Record<string, string> {\n const headers: Record<string, string> = {\n authorization: `Bearer ${this.auth.apiKey}`,\n accept: 'application/json',\n 'user-agent': `@computesdk/platform/${SDK_VERSION}`,\n };\n if (this.auth.orgSlug) headers['X-Org-Slug'] = this.auth.orgSlug;\n return headers;\n }\n\n private async parse<T>(res: Response): Promise<T> {\n const body = await res.json().catch(() => undefined);\n if (!res.ok) throw apiError(res, body);\n return body as T;\n }\n}\n\nfunction apiError(res: Response, body: unknown): PlatformApiError {\n const error = new PlatformApiError(res.status, errorMessage(body, res.status), body);\n const retryAfter = res.headers.get('retry-after');\n if (retryAfter) {\n const seconds = Number(retryAfter);\n error.retryAfterMs = Number.isFinite(seconds)\n ? seconds * 1000\n : Math.max(0, new Date(retryAfter).getTime() - Date.now());\n }\n return error;\n}\n\nexport interface RequestOpts {\n signal?: AbortSignal;\n}\n\nfunction errorMessage(body: unknown, status: number): string {\n let message: string;\n if (body && typeof body === 'object' && 'error' in body && typeof (body as { error: unknown }).error === 'string') {\n message = (body as { error: string }).error;\n } else {\n message = `Request failed with status ${status}`;\n }\n // The OAuth layer answers 403 insufficient_scope when the stored login's\n // grant doesn't cover the call — point at re-login rather than leaving the\n // raw error.\n if (\n message.includes('insufficient_scope') ||\n (typeof body === 'object' && body !== null && JSON.stringify(body).includes('insufficient_scope'))\n ) {\n message += ' — run `compute login` to sign in again.';\n }\n const requestId =\n body && typeof body === 'object' && 'requestId' in body && typeof (body as { requestId: unknown }).requestId === 'string'\n ? (body as { requestId: string }).requestId\n : undefined;\n if (requestId) message += ` (requestId: ${requestId})`;\n return message;\n}\n\n/** Minimal SSE reader: yields the JSON payload of each `data:` event. */\nexport async function* readSseEvents(\n body: ReadableStream<Uint8Array>,\n): AsyncGenerator<unknown> {\n const reader = body.getReader();\n const decoder = new TextDecoder();\n let buffer = '';\n try {\n for (;;) {\n const { done, value } = await reader.read();\n if (done) break;\n buffer += decoder.decode(value, { stream: true });\n let idx;\n while ((idx = buffer.indexOf('\\n\\n')) !== -1) {\n const event = buffer.slice(0, idx);\n buffer = buffer.slice(idx + 2);\n for (const line of event.split('\\n')) {\n if (line.startsWith('data: ')) {\n yield JSON.parse(line.slice(6));\n }\n }\n }\n }\n } finally {\n // Cancel, not just releaseLock: an early exit (e.g. the command's `exit`\n // event) must close the HTTP stream rather than leave it dangling.\n await reader.cancel().catch(() => undefined);\n reader.releaseLock();\n }\n}\n\n/** `readSseEvents` with the `event:` name preserved alongside the JSON payload. */\nexport async function* readSseNamedEvents(\n body: ReadableStream<Uint8Array>,\n): AsyncGenerator<{ event: string; data: unknown }> {\n const reader = body.getReader();\n const decoder = new TextDecoder();\n let buffer = '';\n try {\n for (;;) {\n const { done, value } = await reader.read();\n if (done) break;\n buffer += decoder.decode(value, { stream: true });\n let idx;\n while ((idx = buffer.indexOf('\\n\\n')) !== -1) {\n const frame = buffer.slice(0, idx);\n buffer = buffer.slice(idx + 2);\n let event = 'message';\n const dataLines: string[] = [];\n for (const line of frame.split('\\n')) {\n if (line.startsWith('event: ')) event = line.slice(7);\n else if (line.startsWith('data: ')) dataLines.push(line.slice(6));\n }\n if (dataLines.length > 0) {\n yield { event, data: JSON.parse(dataLines.join('\\n')) };\n }\n }\n }\n } finally {\n await reader.cancel().catch(() => undefined);\n reader.releaseLock();\n }\n}\n\n\n/** The subset of `@benchsdk/cli`'s `resolveAuth` result Actions needs. */\nexport type StoredPlatformAuth = { apiKey?: string; token?: string; orgSlug?: string; orgId?: string };\nexport type StoredPlatformAuthResolver = (opts: { baseUrl: string }) => Promise<StoredPlatformAuth>;\n\nexport const NO_CREDENTIALS_HINT =\n 'Set COMPUTE_API_KEY, pass apiKey, or run `compute login`.';\n\n/**\n * Precedence: `--api-key` > `COMPUTE_API_KEY` > `BENCHMARKS_PLATFORM_API_KEY`\n * (legacy) > platform OAuth credentials stored by `compute login`\n * (`~/.benchsdk/credentials.json`, via `@benchsdk/cli`'s `resolveAuth`, which\n * refreshes an expired access token but never opens a browser). `compute\n * login` writes the same store, so a platform login covers these commands.\n */\nexport async function resolvePlatformAuth(\n opts: {\n apiKey?: string;\n baseUrl?: string;\n allowUntrustedHost?: boolean;\n /** One-off org override: sent as X-Org-Slug (also settable via COMPUTE_ORG). */\n org?: string;\n },\n resolveStored: StoredPlatformAuthResolver = resolveStoredPlatformAuth,\n /** Overrides the no-credentials message's credential hint (the CLI passes `--api-key`). */\n credentialsHint: string = NO_CREDENTIALS_HINT,\n): Promise<PlatformAuth> {\n const baseUrl = (\n opts.baseUrl ||\n process.env.COMPUTE_PLATFORM_URL ||\n process.env.BENCHMARKS_PLATFORM_URL || // legacy name\n DEFAULT_BASE_URL\n ).replace(/\\/+$/, '');\n\n // One-off org override: --org flag or COMPUTE_ORG sends X-Org-Slug on every\n // request. Falls back to the stored login's saved org. The platform ignores\n // the header for org API keys (they are already org-scoped).\n let orgSlug = opts.org || process.env.COMPUTE_ORG || undefined;\n\n // The bearer key is attached to every request, so an attacker-controlled\n // --base-url would exfiltrate it. Only trusted hosts are allowed silently;\n // anything else must be opted into with --allow-untrusted-host.\n if (!opts.allowUntrustedHost && !isTrustedPlatformHost(baseUrl)) {\n throw new PlatformClientError(\n 'untrusted_host',\n `Refusing to send the API key to ${baseUrl} — it is not a computesdk.com or localhost host. ` +\n 'If this is a self-hosted/dev deployment you trust, pass --allow-untrusted-host.',\n );\n }\n // Host trust and transport security are separate: --allow-untrusted-host\n // says who may receive the key, never that it may travel in plaintext.\n if (!isSecurePlatformTransport(baseUrl)) {\n throw new PlatformClientError(\n 'insecure_transport',\n `Refusing to send the API key over plaintext HTTP to ${baseUrl}. ` +\n 'Use an https:// base URL; http:// is only allowed for localhost/loopback.',\n );\n }\n\n // `||` not `??`: empty-string env vars (common in CI matrices) should fall\n // through to the next source, not count as configured.\n let apiKey =\n opts.apiKey ||\n process.env.COMPUTE_API_KEY ||\n process.env.BENCHMARKS_PLATFORM_API_KEY || // legacy name\n undefined;\n if (!apiKey) {\n // Stored platform OAuth is only ever resolved (and refreshed) for trusted\n // hosts. --allow-untrusted-host opts an explicit key into a host, not the\n // user's saved session.\n if (!isTrustedPlatformHost(baseUrl)) {\n throw new PlatformClientError(\n 'untrusted_host_stored_auth',\n `Refusing to use stored platform credentials with untrusted host ${baseUrl}. ` +\n 'Pass --api-key or set COMPUTE_API_KEY to use an explicit key with --allow-untrusted-host.',\n );\n }\n let stored: StoredPlatformAuth;\n try {\n stored = await resolveStored({ baseUrl });\n } catch (error) {\n const reason = error instanceof Error ? error.message : String(error);\n // `@benchsdk/cli`'s \"nothing stored\" message names `bench` commands and\n // env vars that only apply to that CLI; keep ours for that case and\n // surface the reason only for expired/failed-refresh sessions.\n const detail = reason.startsWith('No credentials found') ? 'No API key.' : reason;\n throw new PlatformClientError('no_credentials', `${detail} ${credentialsHint}`);\n }\n apiKey = stored.apiKey || stored.token || undefined;\n // The stored orgSlug is only a cache of the last `org use` on this\n // machine — the server's consent row is the source of truth, and\n // sending it would pin this machine to a stale org after a switch\n // elsewhere. Only --org/COMPUTE_ORG send X-Org-Slug.\n }\n if (!apiKey) {\n throw new PlatformClientError('no_credentials', `No API key. ${credentialsHint}`);\n }\n return { apiKey, baseUrl, ...(orgSlug && { orgSlug }) };\n}\n\nasync function resolveStoredPlatformAuth(opts: { baseUrl: string }): Promise<StoredPlatformAuth> {\n const { resolveAuth } = await import('@benchsdk/cli');\n const auth = await resolveAuth({ baseUrl: opts.baseUrl });\n return { apiKey: auth.apiKey, token: auth.token, orgSlug: auth.orgSlug, orgId: auth.orgId };\n}\n\nfunction isLoopbackHost(host: string): boolean {\n return host === 'localhost' || host === '127.0.0.1' || host === '[::1]' || host === '::1';\n}\n\n/** https://, or http:// to a loopback host only. */\nexport function isSecurePlatformTransport(baseUrl: string): boolean {\n let url: URL;\n try {\n url = new URL(baseUrl);\n } catch {\n return false;\n }\n if (url.protocol === 'https:') return true;\n return url.protocol === 'http:' && isLoopbackHost(url.hostname);\n}\n\n/** computesdk.com (and subdomains) or localhost — safe to receive the API key. */\nexport function isTrustedPlatformHost(baseUrl: string): boolean {\n let host: string;\n try {\n host = new URL(baseUrl).hostname;\n } catch {\n return false;\n }\n return host === 'computesdk.com' || host.endsWith('.computesdk.com') || isL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;AACT;AAGA,IAAM,kBAAkB,oBAAI,QAAiD;AAE7E,SAAS,cAAc,QAAiD;AACtE,MAAI,UAAU,gBAAgB,IAAI,MAAM;AACxC,MAAI,CAAC,SAAS;AACZ,cAAU,oBAAoB;AAAA,MAC5B,QAAQ,OAAO;AAAA,MACf,SAAS,OAAO;AAAA,MAChB,oBAAoB,OAAO;AAAA,MAC3B,KAAK,OAAO;AAAA,IACd,CAAC,EAAE,KAAK,CAAC,SAAS,IAAI,eAAe,MAAM,OAAO,KAAK,CAAC;AACxD,oBAAgB,IAAI,QAAQ,OAAO;AAGnC,YAAQ,MAAM,MAAM,gBAAgB,OAAO,MAAM,CAAC;AAAA,EACpD;AACA,SAAO;AACT;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,70 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@computesdk/platform",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Hosted ComputeSDK platform provider - sandboxes on your org's providers or the compute market, with market placement, credits, quotes and one bill",
|
|
5
|
+
"author": "ComputeSDK",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"module": "./dist/index.mjs",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.mjs",
|
|
14
|
+
"require": "./dist/index.js"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@computesdk/provider": "2.1.20"
|
|
22
|
+
},
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"@benchsdk/cli": "^0.7.1"
|
|
25
|
+
},
|
|
26
|
+
"peerDependenciesMeta": {
|
|
27
|
+
"@benchsdk/cli": {
|
|
28
|
+
"optional": true
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"keywords": [
|
|
32
|
+
"computesdk",
|
|
33
|
+
"platform",
|
|
34
|
+
"sandbox",
|
|
35
|
+
"code-execution",
|
|
36
|
+
"cloud",
|
|
37
|
+
"compute",
|
|
38
|
+
"provider",
|
|
39
|
+
"market"
|
|
40
|
+
],
|
|
41
|
+
"repository": {
|
|
42
|
+
"type": "git",
|
|
43
|
+
"url": "https://github.com/computesdk/computesdk.git",
|
|
44
|
+
"directory": "packages/platform"
|
|
45
|
+
},
|
|
46
|
+
"homepage": "https://www.computesdk.com",
|
|
47
|
+
"bugs": {
|
|
48
|
+
"url": "https://github.com/computesdk/computesdk/issues"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@types/node": "^20.0.0",
|
|
52
|
+
"@vitest/coverage-v8": "^1.0.0",
|
|
53
|
+
"eslint": "^8.37.0",
|
|
54
|
+
"rimraf": "^5.0.0",
|
|
55
|
+
"tsup": "^8.0.0",
|
|
56
|
+
"typescript": "^5.0.0",
|
|
57
|
+
"vitest": "^1.0.0",
|
|
58
|
+
"@computesdk/test-utils": "2.0.4"
|
|
59
|
+
},
|
|
60
|
+
"scripts": {
|
|
61
|
+
"build": "tsup",
|
|
62
|
+
"clean": "rimraf dist",
|
|
63
|
+
"dev": "tsup --watch",
|
|
64
|
+
"test": "vitest run",
|
|
65
|
+
"test:watch": "vitest watch",
|
|
66
|
+
"test:coverage": "vitest run --coverage",
|
|
67
|
+
"typecheck": "tsc --noEmit",
|
|
68
|
+
"lint": "eslint"
|
|
69
|
+
}
|
|
6
70
|
}
|