withruntime 0.49.0 → 1.0.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/dist/generated/apps.d.ts +309 -0
- package/dist/generated/apps.js +333 -0
- package/dist/generated/audit.d.ts +47 -0
- package/dist/generated/audit.js +14 -0
- package/dist/generated/browsers.d.ts +309 -0
- package/dist/generated/browsers.js +333 -0
- package/dist/generated/builds.d.ts +309 -0
- package/dist/generated/builds.js +333 -0
- package/dist/generated/ci.d.ts +309 -0
- package/dist/generated/ci.js +333 -0
- package/dist/generated/containers.d.ts +309 -0
- package/dist/generated/containers.js +333 -0
- package/dist/generated/desktops.d.ts +309 -0
- package/dist/generated/desktops.js +333 -0
- package/dist/generated/domains.d.ts +80 -0
- package/dist/generated/domains.js +58 -0
- package/dist/generated/egressIps.d.ts +36 -0
- package/dist/generated/egressIps.js +14 -0
- package/dist/generated/events.d.ts +37 -0
- package/dist/generated/events.js +14 -0
- package/dist/generated/feedback.d.ts +44 -0
- package/dist/generated/feedback.js +13 -0
- package/dist/generated/functions.d.ts +309 -0
- package/dist/generated/functions.js +333 -0
- package/dist/generated/identities.d.ts +36 -0
- package/dist/generated/identities.js +22 -0
- package/dist/generated/images.d.ts +200 -0
- package/dist/generated/images.js +65 -0
- package/dist/generated/index.d.ts +143 -0
- package/dist/generated/index.js +184 -0
- package/dist/generated/jobRuns.d.ts +68 -0
- package/dist/generated/jobRuns.js +22 -0
- package/dist/generated/jobs.d.ts +144 -0
- package/dist/generated/jobs.js +85 -0
- package/dist/generated/keys.d.ts +105 -0
- package/dist/generated/keys.js +26 -0
- package/dist/generated/me.d.ts +33 -0
- package/dist/generated/me.js +13 -0
- package/dist/generated/networks.d.ts +32 -0
- package/dist/generated/networks.js +14 -0
- package/dist/generated/notebooks.d.ts +309 -0
- package/dist/generated/notebooks.js +333 -0
- package/dist/generated/otel.d.ts +46 -0
- package/dist/generated/otel.js +22 -0
- package/dist/generated/ports.d.ts +55 -0
- package/dist/generated/ports.js +22 -0
- package/dist/generated/previews.d.ts +86 -0
- package/dist/generated/previews.js +67 -0
- package/dist/generated/projects.d.ts +47 -0
- package/dist/generated/projects.js +26 -0
- package/dist/generated/roles.d.ts +36 -0
- package/dist/generated/roles.js +22 -0
- package/dist/generated/routes.d.ts +3 -0
- package/dist/generated/routes.js +4 -0
- package/dist/generated/runtime.d.ts +176 -0
- package/dist/generated/runtime.js +416 -0
- package/dist/generated/sandboxes.d.ts +952 -0
- package/dist/generated/sandboxes.js +342 -0
- package/dist/generated/secrets.d.ts +116 -0
- package/dist/generated/secrets.js +54 -0
- package/dist/generated/sessions.d.ts +47 -0
- package/dist/generated/sessions.js +17 -0
- package/dist/generated/signing.d.ts +68 -0
- package/dist/generated/signing.js +187 -0
- package/dist/generated/sites.d.ts +309 -0
- package/dist/generated/sites.js +333 -0
- package/dist/generated/snapshots.d.ts +27 -0
- package/dist/generated/snapshots.js +22 -0
- package/dist/generated/tunnels.d.ts +68 -0
- package/dist/generated/tunnels.js +14 -0
- package/dist/generated/usage.d.ts +155 -0
- package/dist/generated/usage.js +17 -0
- package/dist/generated/volumes.d.ts +36 -0
- package/dist/generated/volumes.js +26 -0
- package/dist/generated/webhooks.d.ts +44 -0
- package/dist/generated/webhooks.js +22 -0
- package/dist/generated/workspaces.d.ts +309 -0
- package/dist/generated/workspaces.js +333 -0
- package/dist/v2/cli.d.ts +7 -0
- package/dist/v2/cli.js +283 -0
- package/dist/v2/index.d.ts +1 -0
- package/dist/v2/index.js +4 -0
- package/dist/v2/login.d.ts +35 -0
- package/dist/v2/login.js +225 -0
- package/dist/v2/mcp.d.ts +1 -0
- package/dist/v2/mcp.js +49 -0
- package/dist/v2/openapi.json +75750 -0
- package/dist/v2/shims/base.d.ts +33 -0
- package/dist/v2/shims/base.js +54 -0
- package/dist/v2/shims/blaxel.d.ts +60 -0
- package/dist/v2/shims/blaxel.js +71 -0
- package/dist/v2/shims/cloudflare.d.ts +52 -0
- package/dist/v2/shims/cloudflare.js +55 -0
- package/dist/v2/shims/daytona.d.ts +58 -0
- package/dist/v2/shims/daytona.js +74 -0
- package/dist/v2/shims/e2b.d.ts +142 -0
- package/dist/v2/shims/e2b.js +238 -0
- package/dist/v2/shims/fly.d.ts +6 -0
- package/dist/v2/shims/fly.js +91 -0
- package/dist/v2/shims/modal.d.ts +54 -0
- package/dist/v2/shims/modal.js +79 -0
- package/dist/v2/shims/morph.d.ts +60 -0
- package/dist/v2/shims/morph.js +87 -0
- package/dist/v2/shims/vercel.d.ts +53 -0
- package/dist/v2/shims/vercel.js +90 -0
- package/dist/v2/table.d.ts +53 -0
- package/dist/v2/table.js +122 -0
- package/package.json +20 -310
- package/BLAXEL.md +0 -290
- package/COMPATIBILITY.md +0 -447
- package/DAYTONA.md +0 -237
- package/E2B.md +0 -314
- package/README.md +0 -331
- package/README.src.md +0 -333
- package/VERCEL.md +0 -230
- package/agent-platforms-inventory.json +0 -387
- package/compatibility-lock.json +0 -305
- package/dist/agents/browser.d.ts +0 -12
- package/dist/agents/browser.js +0 -12
- package/dist/agents/index.d.ts +0 -11
- package/dist/agents/index.js +0 -11
- package/dist/agents-cli.d.ts +0 -16
- package/dist/agents-cli.js +0 -1237
- package/dist/agents-deploy.d.ts +0 -196
- package/dist/agents-deploy.js +0 -872
- package/dist/agents-file.d.ts +0 -19
- package/dist/agents-file.js +0 -135
- package/dist/ai/index.d.ts +0 -49
- package/dist/ai/index.js +0 -31
- package/dist/ai-harness/index.d.ts +0 -194
- package/dist/ai-harness/index.js +0 -522
- package/dist/api-defaults.d.ts +0 -17
- package/dist/api-defaults.js +0 -22
- package/dist/apps/index.d.ts +0 -10
- package/dist/apps/index.js +0 -11
- package/dist/apps-cli.d.ts +0 -16
- package/dist/apps-cli.js +0 -1021
- package/dist/billing-cli.d.ts +0 -23
- package/dist/billing-cli.js +0 -264
- package/dist/blaxel/client.d.ts +0 -59
- package/dist/blaxel/client.js +0 -86
- package/dist/blaxel/context.d.ts +0 -59
- package/dist/blaxel/context.js +0 -162
- package/dist/blaxel/errors.d.ts +0 -130
- package/dist/blaxel/errors.js +0 -315
- package/dist/blaxel/filesystem.d.ts +0 -147
- package/dist/blaxel/filesystem.js +0 -585
- package/dist/blaxel/index.d.ts +0 -287
- package/dist/blaxel/index.js +0 -351
- package/dist/blaxel/interpreter.d.ts +0 -71
- package/dist/blaxel/interpreter.js +0 -256
- package/dist/blaxel/lookup.d.ts +0 -39
- package/dist/blaxel/lookup.js +0 -84
- package/dist/blaxel/pagination.d.ts +0 -39
- package/dist/blaxel/pagination.js +0 -88
- package/dist/blaxel/preview.d.ts +0 -136
- package/dist/blaxel/preview.js +0 -304
- package/dist/blaxel/process.d.ts +0 -126
- package/dist/blaxel/process.js +0 -581
- package/dist/blaxel/sandbox.d.ts +0 -198
- package/dist/blaxel/sandbox.js +0 -856
- package/dist/blaxel/session.d.ts +0 -31
- package/dist/blaxel/session.js +0 -136
- package/dist/blaxel/snapshot.d.ts +0 -123
- package/dist/blaxel/snapshot.js +0 -199
- package/dist/blaxel/types.d.ts +0 -145
- package/dist/blaxel/types.js +0 -60
- package/dist/blaxel/unsupported.d.ts +0 -20
- package/dist/blaxel/unsupported.js +0 -32
- package/dist/browser-stub.d.ts +0 -1
- package/dist/browser-stub.js +0 -1
- package/dist/browsers/index.d.ts +0 -9
- package/dist/browsers/index.js +0 -10
- package/dist/browsers-cli.d.ts +0 -13
- package/dist/browsers-cli.js +0 -279
- package/dist/builds/index.d.ts +0 -10
- package/dist/builds/index.js +0 -11
- package/dist/ci/index.d.ts +0 -13
- package/dist/ci/index.js +0 -14
- package/dist/ci-cli.d.ts +0 -20
- package/dist/ci-cli.js +0 -537
- package/dist/ci-import.d.ts +0 -23
- package/dist/ci-import.js +0 -565
- package/dist/claude-agent-sdk/index.d.ts +0 -7
- package/dist/claude-agent-sdk/index.js +0 -65
- package/dist/cli/logs.d.ts +0 -21
- package/dist/cli/logs.js +0 -188
- package/dist/cli-extras.d.ts +0 -39
- package/dist/cli-extras.js +0 -267
- package/dist/cli-name.d.ts +0 -6
- package/dist/cli-name.js +0 -8
- package/dist/cli-update.d.ts +0 -11
- package/dist/cli-update.js +0 -46
- package/dist/cli-words.d.ts +0 -36
- package/dist/cli-words.js +0 -167
- package/dist/cli.d.ts +0 -92
- package/dist/cli.js +0 -5463
- package/dist/client.d.ts +0 -189
- package/dist/client.js +0 -205
- package/dist/cloudflare/errors.d.ts +0 -166
- package/dist/cloudflare/errors.js +0 -183
- package/dist/cloudflare/identity.d.ts +0 -7
- package/dist/cloudflare/identity.js +0 -13
- package/dist/cloudflare/index.d.ts +0 -545
- package/dist/cloudflare/index.js +0 -1106
- package/dist/cloudflare/interpreter.d.ts +0 -119
- package/dist/cloudflare/interpreter.js +0 -232
- package/dist/cloudflare/mime.d.ts +0 -1
- package/dist/cloudflare/mime.js +0 -66
- package/dist/cloudflare/streams.d.ts +0 -46
- package/dist/cloudflare/streams.js +0 -175
- package/dist/cloudflare/types.d.ts +0 -338
- package/dist/cloudflare/types.js +0 -80
- package/dist/cloudflare/watch.d.ts +0 -9
- package/dist/cloudflare/watch.js +0 -24
- package/dist/cloudflare/worker.d.ts +0 -706
- package/dist/cloudflare/worker.js +0 -633
- package/dist/codesandbox/guest-service.d.ts +0 -31
- package/dist/codesandbox/guest-service.js +0 -490
- package/dist/codesandbox/index.d.ts +0 -574
- package/dist/codesandbox/index.js +0 -1747
- package/dist/compat/core.d.ts +0 -58
- package/dist/compat/core.js +0 -267
- package/dist/compat/files.d.ts +0 -27
- package/dist/compat/files.js +0 -157
- package/dist/compat/lease.d.ts +0 -37
- package/dist/compat/lease.js +0 -93
- package/dist/compat/shell.d.ts +0 -4
- package/dist/compat/shell.js +0 -165
- package/dist/containers/index.d.ts +0 -10
- package/dist/containers/index.js +0 -11
- package/dist/credentials.d.ts +0 -71
- package/dist/credentials.js +0 -340
- package/dist/daytona/client.d.ts +0 -48
- package/dist/daytona/client.js +0 -45
- package/dist/daytona/computer-use.d.ts +0 -171
- package/dist/daytona/computer-use.js +0 -382
- package/dist/daytona/context.d.ts +0 -41
- package/dist/daytona/context.js +0 -50
- package/dist/daytona/daytona.d.ts +0 -213
- package/dist/daytona/daytona.js +0 -578
- package/dist/daytona/errors.d.ts +0 -117
- package/dist/daytona/errors.js +0 -201
- package/dist/daytona/filesystem.d.ts +0 -99
- package/dist/daytona/filesystem.js +0 -300
- package/dist/daytona/git.d.ts +0 -33
- package/dist/daytona/git.js +0 -128
- package/dist/daytona/image.d.ts +0 -49
- package/dist/daytona/image.js +0 -146
- package/dist/daytona/index.d.ts +0 -87
- package/dist/daytona/index.js +0 -102
- package/dist/daytona/process.d.ts +0 -143
- package/dist/daytona/process.js +0 -565
- package/dist/daytona/sandbox.d.ts +0 -222
- package/dist/daytona/sandbox.js +0 -505
- package/dist/desktops/index.d.ts +0 -9
- package/dist/desktops/index.js +0 -10
- package/dist/domains/index.d.ts +0 -9
- package/dist/domains/index.js +0 -10
- package/dist/e2b/client.d.ts +0 -76
- package/dist/e2b/client.js +0 -124
- package/dist/e2b/code-interpreter.d.ts +0 -134
- package/dist/e2b/code-interpreter.js +0 -239
- package/dist/e2b/commands.d.ts +0 -135
- package/dist/e2b/commands.js +0 -452
- package/dist/e2b/errors.d.ts +0 -125
- package/dist/e2b/errors.js +0 -247
- package/dist/e2b/filesystem.d.ts +0 -111
- package/dist/e2b/filesystem.js +0 -374
- package/dist/e2b/index.d.ts +0 -35
- package/dist/e2b/index.js +0 -69
- package/dist/e2b/pty.d.ts +0 -24
- package/dist/e2b/pty.js +0 -83
- package/dist/e2b/sandbox.d.ts +0 -248
- package/dist/e2b/sandbox.js +0 -781
- package/dist/e2b/unsupported.d.ts +0 -38
- package/dist/e2b/unsupported.js +0 -48
- package/dist/e2b/users.d.ts +0 -39
- package/dist/e2b/users.js +0 -207
- package/dist/errors.d.ts +0 -100
- package/dist/errors.js +0 -198
- package/dist/file-source.d.ts +0 -16
- package/dist/file-source.js +0 -162
- package/dist/fly/index.d.ts +0 -102
- package/dist/fly/index.js +0 -930
- package/dist/freestyle/index.d.ts +0 -629
- package/dist/freestyle/index.js +0 -1187
- package/dist/functions/index.d.ts +0 -10
- package/dist/functions/index.js +0 -11
- package/dist/identity.d.ts +0 -30
- package/dist/identity.js +0 -141
- package/dist/image-context.d.ts +0 -39
- package/dist/image-context.js +0 -176
- package/dist/images/index.d.ts +0 -9
- package/dist/images/index.js +0 -10
- package/dist/index.d.ts +0 -87
- package/dist/index.js +0 -51
- package/dist/inngest/index.d.ts +0 -96
- package/dist/inngest/index.js +0 -183
- package/dist/ips/index.d.ts +0 -9
- package/dist/ips/index.js +0 -10
- package/dist/jobs/index.d.ts +0 -9
- package/dist/jobs/index.js +0 -10
- package/dist/jobs-code/cron.d.ts +0 -12
- package/dist/jobs-code/cron.js +0 -93
- package/dist/jobs-code/registry.d.ts +0 -31
- package/dist/jobs-code/registry.js +0 -30
- package/dist/jobs-code/runner.d.ts +0 -1
- package/dist/jobs-code/runner.js +0 -74
- package/dist/jobs-deploy.d.ts +0 -22
- package/dist/jobs-deploy.js +0 -247
- package/dist/jobs-import.d.ts +0 -15
- package/dist/jobs-import.js +0 -231
- package/dist/keys.d.ts +0 -55
- package/dist/keys.js +0 -211
- package/dist/login.d.ts +0 -88
- package/dist/login.js +0 -369
- package/dist/machine.d.ts +0 -222
- package/dist/machine.js +0 -578
- package/dist/mcp.d.ts +0 -16
- package/dist/mcp.js +0 -377
- package/dist/modal/index.d.ts +0 -532
- package/dist/modal/index.js +0 -1284
- package/dist/morph/index.d.ts +0 -255
- package/dist/morph/index.js +0 -641
- package/dist/network-cli.d.ts +0 -17
- package/dist/network-cli.js +0 -523
- package/dist/networks/index.d.ts +0 -11
- package/dist/networks/index.js +0 -10
- package/dist/openai-agents/index.d.ts +0 -132
- package/dist/openai-agents/index.js +0 -738
- package/dist/page.d.ts +0 -13
- package/dist/page.js +0 -39
- package/dist/ports/index.d.ts +0 -9
- package/dist/ports/index.js +0 -10
- package/dist/product-names.d.ts +0 -52
- package/dist/product-names.js +0 -174
- package/dist/product-renames.d.ts +0 -103
- package/dist/product-renames.js +0 -189
- package/dist/products/agents.d.ts +0 -935
- package/dist/products/agents.js +0 -581
- package/dist/products/api-keys.d.ts +0 -113
- package/dist/products/api-keys.js +0 -32
- package/dist/products/apps.d.ts +0 -409
- package/dist/products/apps.js +0 -231
- package/dist/products/audit.d.ts +0 -51
- package/dist/products/audit.js +0 -10
- package/dist/products/balancers.d.ts +0 -87
- package/dist/products/balancers.js +0 -8
- package/dist/products/billing.d.ts +0 -76
- package/dist/products/billing.js +0 -26
- package/dist/products/browser.d.ts +0 -73
- package/dist/products/browser.js +0 -29
- package/dist/products/browsers.d.ts +0 -184
- package/dist/products/browsers.js +0 -180
- package/dist/products/builds.d.ts +0 -175
- package/dist/products/builds.js +0 -234
- package/dist/products/ci.d.ts +0 -406
- package/dist/products/ci.js +0 -133
- package/dist/products/containers.d.ts +0 -71
- package/dist/products/containers.js +0 -6
- package/dist/products/desktop.d.ts +0 -141
- package/dist/products/desktop.js +0 -83
- package/dist/products/desktops.d.ts +0 -71
- package/dist/products/desktops.js +0 -27
- package/dist/products/functions.d.ts +0 -2
- package/dist/products/functions.js +0 -5
- package/dist/products/images.d.ts +0 -229
- package/dist/products/images.js +0 -235
- package/dist/products/index.d.ts +0 -84
- package/dist/products/index.js +0 -105
- package/dist/products/interpreter.d.ts +0 -97
- package/dist/products/interpreter.js +0 -106
- package/dist/products/jobs.d.ts +0 -408
- package/dist/products/jobs.js +0 -256
- package/dist/products/limits.d.ts +0 -61
- package/dist/products/limits.js +0 -10
- package/dist/products/logs.d.ts +0 -245
- package/dist/products/logs.js +0 -274
- package/dist/products/mcp.d.ts +0 -88
- package/dist/products/mcp.js +0 -58
- package/dist/products/mounts.d.ts +0 -49
- package/dist/products/mounts.js +0 -21
- package/dist/products/network-products.d.ts +0 -268
- package/dist/products/network-products.js +0 -127
- package/dist/products/network.d.ts +0 -62
- package/dist/products/network.js +0 -19
- package/dist/products/observability.d.ts +0 -264
- package/dist/products/observability.js +0 -123
- package/dist/products/plans.d.ts +0 -133
- package/dist/products/plans.js +0 -24
- package/dist/products/previews.d.ts +0 -70
- package/dist/products/previews.js +0 -39
- package/dist/products/private-network.d.ts +0 -22
- package/dist/products/private-network.js +0 -10
- package/dist/products/queues.d.ts +0 -149
- package/dist/products/queues.js +0 -213
- package/dist/products/referrals.d.ts +0 -50
- package/dist/products/referrals.js +0 -8
- package/dist/products/reservations.d.ts +0 -108
- package/dist/products/reservations.js +0 -41
- package/dist/products/resources.d.ts +0 -55
- package/dist/products/resources.js +0 -122
- package/dist/products/secrets.d.ts +0 -316
- package/dist/products/secrets.js +0 -333
- package/dist/products/signed-requests.d.ts +0 -21
- package/dist/products/signed-requests.js +0 -11
- package/dist/products/sso.d.ts +0 -44
- package/dist/products/sso.js +0 -8
- package/dist/products/streams.d.ts +0 -73
- package/dist/products/streams.js +0 -17
- package/dist/products/switching.d.ts +0 -123
- package/dist/products/switching.js +0 -26
- package/dist/products/tailscale.d.ts +0 -57
- package/dist/products/tailscale.js +0 -17
- package/dist/products/uptime.d.ts +0 -97
- package/dist/products/uptime.js +0 -42
- package/dist/products/volumes.d.ts +0 -190
- package/dist/products/volumes.js +0 -114
- package/dist/products/watch.d.ts +0 -112
- package/dist/products/watch.js +0 -249
- package/dist/proxy.d.ts +0 -30
- package/dist/proxy.js +0 -200
- package/dist/record-cli.d.ts +0 -23
- package/dist/record-cli.js +0 -308
- package/dist/renamed-products.d.ts +0 -38
- package/dist/renamed-products.js +0 -34
- package/dist/resumable.d.ts +0 -32
- package/dist/resumable.js +0 -201
- package/dist/runloop/index.d.ts +0 -333
- package/dist/runloop/index.js +0 -560
- package/dist/runloop/pagination.d.ts +0 -46
- package/dist/runloop/pagination.js +0 -82
- package/dist/runloop/sdk.d.ts +0 -131
- package/dist/runloop/sdk.js +0 -167
- package/dist/runloop/snapshots.d.ts +0 -52
- package/dist/runloop/snapshots.js +0 -244
- package/dist/sandbox.d.ts +0 -371
- package/dist/sandbox.js +0 -1500
- package/dist/sandboxes/index.d.ts +0 -11
- package/dist/sandboxes/index.js +0 -12
- package/dist/sealing.d.ts +0 -6
- package/dist/sealing.js +0 -14
- package/dist/snapshots/index.d.ts +0 -9
- package/dist/snapshots/index.js +0 -11
- package/dist/snapshots.d.ts +0 -82
- package/dist/snapshots.js +0 -65
- package/dist/sprites/index.d.ts +0 -563
- package/dist/sprites/index.js +0 -1370
- package/dist/ssh.d.ts +0 -56
- package/dist/ssh.js +0 -416
- package/dist/switched-off.d.ts +0 -5
- package/dist/switched-off.js +0 -8
- package/dist/tar.d.ts +0 -15
- package/dist/tar.js +0 -526
- package/dist/terminal.d.ts +0 -24
- package/dist/terminal.js +0 -32
- package/dist/tools/index.d.ts +0 -62
- package/dist/tools/index.js +0 -181
- package/dist/transport.d.ts +0 -165
- package/dist/transport.js +0 -883
- package/dist/trigger/index.d.ts +0 -202
- package/dist/trigger/index.js +0 -244
- package/dist/tunnel.d.ts +0 -70
- package/dist/tunnel.js +0 -316
- package/dist/types.d.ts +0 -574
- package/dist/types.js +0 -1
- package/dist/vercel/client.d.ts +0 -40
- package/dist/vercel/client.js +0 -39
- package/dist/vercel/command.d.ts +0 -117
- package/dist/vercel/command.js +0 -391
- package/dist/vercel/errors.d.ts +0 -53
- package/dist/vercel/errors.js +0 -131
- package/dist/vercel/filesystem.d.ts +0 -153
- package/dist/vercel/filesystem.js +0 -297
- package/dist/vercel/index.d.ts +0 -24
- package/dist/vercel/index.js +0 -36
- package/dist/vercel/sandbox-user.d.ts +0 -70
- package/dist/vercel/sandbox-user.js +0 -207
- package/dist/vercel/sandbox.d.ts +0 -372
- package/dist/vercel/sandbox.js +0 -1037
- package/dist/vercel/snapshot.d.ts +0 -94
- package/dist/vercel/snapshot.js +0 -137
- package/dist/volumes/index.d.ts +0 -9
- package/dist/volumes/index.js +0 -10
- package/dist/wait.d.ts +0 -12
- package/dist/wait.js +0 -47
- package/dist/wallet.d.ts +0 -45
- package/dist/wallet.js +0 -56
- package/dist/wireguard.d.ts +0 -7
- package/dist/wireguard.js +0 -13
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
import { Page } from "../page.js";
|
|
2
|
-
import type { RequestOptions, Transport } from "../transport.js";
|
|
3
|
-
/** A file for a small build context sent inline, or a recipe. */
|
|
4
|
-
export type ImageFile = {
|
|
5
|
-
path: string;
|
|
6
|
-
content: string;
|
|
7
|
-
encoding?: "utf8" | "base64";
|
|
8
|
-
mode?: number;
|
|
9
|
-
};
|
|
10
|
-
export type ImageRecipe = {
|
|
11
|
-
/** "runtime" (the default) or an image reference. */
|
|
12
|
-
base?: string;
|
|
13
|
-
apt?: string[];
|
|
14
|
-
pip?: string[];
|
|
15
|
-
npm?: string[];
|
|
16
|
-
commands?: string[];
|
|
17
|
-
env?: Record<string, string>;
|
|
18
|
-
files?: ImageFile[];
|
|
19
|
-
workdir?: string;
|
|
20
|
-
};
|
|
21
|
-
export type ImageBuildLimits = {
|
|
22
|
-
vcpu?: number;
|
|
23
|
-
memoryMiB?: number;
|
|
24
|
-
diskMiB?: number;
|
|
25
|
-
maxImageMiB?: number;
|
|
26
|
-
timeoutSeconds?: number;
|
|
27
|
-
/** The most this build's layer cache may keep. */
|
|
28
|
-
cacheMiB?: number;
|
|
29
|
-
};
|
|
30
|
-
/** What a sandbox from the image runs as it starts, and when its create
|
|
31
|
-
* answers: once `readyPort` is listened on, or `readyCommand` exits 0. */
|
|
32
|
-
export type ImageStart = {
|
|
33
|
-
command?: string;
|
|
34
|
-
argv?: string[];
|
|
35
|
-
cwd?: string;
|
|
36
|
-
env?: Record<string, string>;
|
|
37
|
-
readyCommand?: string;
|
|
38
|
-
readyPort?: number;
|
|
39
|
-
readyTimeoutSeconds?: number;
|
|
40
|
-
};
|
|
41
|
-
/** An uploaded build context: its archive's chunks and the files it holds. */
|
|
42
|
-
export type ImageContext = {
|
|
43
|
-
archive: {
|
|
44
|
-
sha256: string;
|
|
45
|
-
size: number;
|
|
46
|
-
chunks: string[];
|
|
47
|
-
};
|
|
48
|
-
files: {
|
|
49
|
-
path: string;
|
|
50
|
-
sha256: string;
|
|
51
|
-
size: number;
|
|
52
|
-
mode?: number;
|
|
53
|
-
}[];
|
|
54
|
-
};
|
|
55
|
-
/** Exactly one of `image`, `dockerfile` or `recipe`. */
|
|
56
|
-
export type CreateImage = {
|
|
57
|
-
/** Each build of a name is its next version. */
|
|
58
|
-
name?: string;
|
|
59
|
-
/** Tags the build takes when ready; a named image with none takes `latest`. */
|
|
60
|
-
tags?: string[];
|
|
61
|
-
labels?: Record<string, string>;
|
|
62
|
-
region?: string;
|
|
63
|
-
build?: ImageBuildLimits;
|
|
64
|
-
env?: Record<string, string>;
|
|
65
|
-
/** Overrides a Dockerfile's CMD and HEALTHCHECK; null runs nothing. */
|
|
66
|
-
start?: ImageStart | null;
|
|
67
|
-
/** false: build every step afresh and keep no cache. */
|
|
68
|
-
cache?: boolean;
|
|
69
|
-
} & ({
|
|
70
|
-
image: string;
|
|
71
|
-
dockerfile?: never;
|
|
72
|
-
recipe?: never;
|
|
73
|
-
} | {
|
|
74
|
-
dockerfile: string;
|
|
75
|
-
/** A small context sent inline (1 MiB in all). */
|
|
76
|
-
files?: ImageFile[];
|
|
77
|
-
/** A folder to send as the context, with its .dockerignore; uploaded
|
|
78
|
-
* as chunks, and only the ones the server does not have. */
|
|
79
|
-
contextDir?: string;
|
|
80
|
-
/** An already uploaded context (`uploadContext`). */
|
|
81
|
-
context?: ImageContext;
|
|
82
|
-
dockerignore?: string;
|
|
83
|
-
buildArgs?: Record<string, string>;
|
|
84
|
-
/** Build this stage instead of the last. */
|
|
85
|
-
target?: string;
|
|
86
|
-
image?: never;
|
|
87
|
-
recipe?: never;
|
|
88
|
-
} | {
|
|
89
|
-
recipe: ImageRecipe;
|
|
90
|
-
image?: never;
|
|
91
|
-
dockerfile?: never;
|
|
92
|
-
});
|
|
93
|
-
export type ImageState = "queued" | "building" | "ready" | "failed" | "deleting" | "deleted";
|
|
94
|
-
export type Image = {
|
|
95
|
-
id: string;
|
|
96
|
-
kind: "image";
|
|
97
|
-
status: string;
|
|
98
|
-
state: ImageState;
|
|
99
|
-
name: string | null;
|
|
100
|
-
version: number | null;
|
|
101
|
-
tags: string[];
|
|
102
|
-
pendingTags?: string[];
|
|
103
|
-
labels: Record<string, string>;
|
|
104
|
-
region: string;
|
|
105
|
-
source: {
|
|
106
|
-
kind: "dockerfile" | "oci" | "recipe";
|
|
107
|
-
digest: string;
|
|
108
|
-
base: unknown;
|
|
109
|
-
steps: number;
|
|
110
|
-
planVersion?: number;
|
|
111
|
-
stages?: number;
|
|
112
|
-
contextBytes?: number | null;
|
|
113
|
-
};
|
|
114
|
-
build: ImageBuildLimits & {
|
|
115
|
-
startedAt: string | null;
|
|
116
|
-
endedAt: string | null;
|
|
117
|
-
cachedSteps: number;
|
|
118
|
-
builderVersion: string | null;
|
|
119
|
-
};
|
|
120
|
-
cache?: {
|
|
121
|
-
enabled: boolean;
|
|
122
|
-
maxMiB: number;
|
|
123
|
-
from: string | null;
|
|
124
|
-
checkpoints: number;
|
|
125
|
-
bytes: number;
|
|
126
|
-
};
|
|
127
|
-
start?: ImageStart | null;
|
|
128
|
-
sizeBytes: number | null;
|
|
129
|
-
sizeMiB: number | null;
|
|
130
|
-
storedBytes: number | null;
|
|
131
|
-
rootfsSha256: string | null;
|
|
132
|
-
env: Record<string, string>;
|
|
133
|
-
workdir: string;
|
|
134
|
-
error: string | null;
|
|
135
|
-
logs: {
|
|
136
|
-
bytes: number;
|
|
137
|
-
lines: number;
|
|
138
|
-
truncated: boolean;
|
|
139
|
-
};
|
|
140
|
-
createdAt: string;
|
|
141
|
-
readyAt: string | null;
|
|
142
|
-
/** What the source asked for that an image does not carry (on create). */
|
|
143
|
-
notes?: string[];
|
|
144
|
-
};
|
|
145
|
-
export type ImageLogLine = {
|
|
146
|
-
seq: number;
|
|
147
|
-
at: string;
|
|
148
|
-
stream: "build" | "system";
|
|
149
|
-
text: string;
|
|
150
|
-
};
|
|
151
|
-
export type ImageLogs = {
|
|
152
|
-
lines: ImageLogLine[];
|
|
153
|
-
nextAfter: number;
|
|
154
|
-
state: ImageState;
|
|
155
|
-
truncated: boolean;
|
|
156
|
-
done: boolean;
|
|
157
|
-
};
|
|
158
|
-
export type ImageRegistry = {
|
|
159
|
-
id: string;
|
|
160
|
-
registry: string;
|
|
161
|
-
kind: "basic" | "ecr";
|
|
162
|
-
username: string;
|
|
163
|
-
region: string | null;
|
|
164
|
-
createdAt: string;
|
|
165
|
-
};
|
|
166
|
-
/** Credentials for pulling private images: a user name and token or password
|
|
167
|
-
* (Docker Hub, GitHub, Google with username `_json_key`), or an AWS access
|
|
168
|
-
* key for Amazon ECR. Sealed for Runtime's hosts; never returned. */
|
|
169
|
-
export type SetImageRegistry = {
|
|
170
|
-
registry: string;
|
|
171
|
-
username: string;
|
|
172
|
-
password: string;
|
|
173
|
-
} | {
|
|
174
|
-
registry: string;
|
|
175
|
-
accessKeyId: string;
|
|
176
|
-
secretAccessKey: string;
|
|
177
|
-
};
|
|
178
|
-
/** Custom images: `runtime.images.build({ recipe: { pip: ["pandas"] } })`, or
|
|
179
|
-
* `runtime.images.build({ name: "app", dockerfile, contextDir: "." })`, then
|
|
180
|
-
* `runtime.sandboxes.create({ image: "app" })`. */
|
|
181
|
-
export declare function images(t: Transport): {
|
|
182
|
-
/** Queue a build and return at once, state "queued". With `contextDir`,
|
|
183
|
-
* the folder is packed and its missing chunks uploaded first. */
|
|
184
|
-
create(input: CreateImage, options?: RequestOptions): Promise<Image>;
|
|
185
|
-
/** Build and wait until the image is ready or failed, streaming log lines
|
|
186
|
-
* to `onLog`. Throws when the build fails, with the build's own error. */
|
|
187
|
-
build(input: CreateImage, options?: RequestOptions & {
|
|
188
|
-
onLog?: (line: ImageLogLine) => void;
|
|
189
|
-
pollMs?: number;
|
|
190
|
-
}): Promise<Image>;
|
|
191
|
-
uploadContext: (folder: string, options?: RequestOptions & {
|
|
192
|
-
dockerignore?: string;
|
|
193
|
-
dockerfile?: string;
|
|
194
|
-
}) => Promise<ImageContext & {
|
|
195
|
-
dockerignore?: string;
|
|
196
|
-
}>;
|
|
197
|
-
get: (id: string, options?: RequestOptions) => Promise<Image>;
|
|
198
|
-
resolve: (ref: string, options?: RequestOptions) => Promise<Image>;
|
|
199
|
-
logs: (id: string, after?: number, options?: RequestOptions) => Promise<ImageLogs>;
|
|
200
|
-
followLogs: (id: string, onLog: (line: ImageLogLine) => void, options?: RequestOptions & {
|
|
201
|
-
after?: number;
|
|
202
|
-
pollMs?: number;
|
|
203
|
-
}) => Promise<Image>;
|
|
204
|
-
list: (query?: {
|
|
205
|
-
state?: ImageState;
|
|
206
|
-
name?: string;
|
|
207
|
-
limit?: number;
|
|
208
|
-
cursor?: string;
|
|
209
|
-
}, options?: RequestOptions) => Promise<Page<Image>>;
|
|
210
|
-
/** Every version of a name, newest first. */
|
|
211
|
-
versions: (name: string, options?: RequestOptions) => Promise<Page<Image>>;
|
|
212
|
-
/** Point `tag` of the image's name at this version. */
|
|
213
|
-
tag(ref: string, tag: string, options?: RequestOptions): Promise<Image>;
|
|
214
|
-
untag(ref: string, tag: string, options?: RequestOptions): Promise<Image>;
|
|
215
|
-
/** Delete one version (by id, name:tag or name@version) and its tags. A
|
|
216
|
-
* bare name deletes its latest tag's version, or its only version when
|
|
217
|
-
* it has one and no latest tag; with several, the error names its tags. */
|
|
218
|
-
delete(ref: string, options?: RequestOptions): Promise<Image>;
|
|
219
|
-
/** Credentials for private registries. The secret is sealed on arrival
|
|
220
|
-
* and never returned. */
|
|
221
|
-
registries: {
|
|
222
|
-
list: (options?: RequestOptions) => Promise<ImageRegistry[]>;
|
|
223
|
-
set: (input: SetImageRegistry, options?: RequestOptions) => Promise<ImageRegistry>;
|
|
224
|
-
delete: (registry: string, options?: RequestOptions) => Promise<{
|
|
225
|
-
registry: string;
|
|
226
|
-
deleted: boolean;
|
|
227
|
-
}>;
|
|
228
|
-
};
|
|
229
|
-
};
|
package/dist/products/images.js
DELETED
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
import { RuntimeError } from "../errors.js";
|
|
2
|
-
import { Page } from "../page.js";
|
|
3
|
-
const UUID = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i;
|
|
4
|
-
const PARALLEL_UPLOADS = 4;
|
|
5
|
-
/** Custom images: `runtime.images.build({ recipe: { pip: ["pandas"] } })`, or
|
|
6
|
-
* `runtime.images.build({ name: "app", dockerfile, contextDir: "." })`, then
|
|
7
|
-
* `runtime.sandboxes.create({ image: "app" })`. */
|
|
8
|
-
export function images(t) {
|
|
9
|
-
const enc = encodeURIComponent;
|
|
10
|
-
const get = (id, options) => t.json({ method: "GET", path: `/v1/images/${enc(id)}`, ...options });
|
|
11
|
-
/** An image by id, name (its latest tag), name:tag or name@version. */
|
|
12
|
-
const resolve = (ref, options) => UUID.test(ref)
|
|
13
|
-
? get(ref, options)
|
|
14
|
-
: t.json({ method: "GET", path: "/v1/images/resolve", query: { ref }, ...options });
|
|
15
|
-
const idOf = async (ref, options) => UUID.test(ref) ? ref : (await resolve(ref, options)).id;
|
|
16
|
-
const logs = (id, after = 0, options) => t.json({
|
|
17
|
-
method: "GET",
|
|
18
|
-
path: `/v1/images/${enc(id)}/logs`,
|
|
19
|
-
query: { after },
|
|
20
|
-
...options,
|
|
21
|
-
});
|
|
22
|
-
const list = async (query = {}, options) => {
|
|
23
|
-
const page = await t.json({
|
|
24
|
-
method: "GET",
|
|
25
|
-
path: "/v1/images",
|
|
26
|
-
query,
|
|
27
|
-
...options,
|
|
28
|
-
});
|
|
29
|
-
return new Page(page.data, page.nextCursor, (cursor) => list({ ...query, cursor }, options));
|
|
30
|
-
};
|
|
31
|
-
/** Pack a folder as a build context and upload the chunks the server does
|
|
32
|
-
* not have yet. Node and Bun. */
|
|
33
|
-
async function uploadContext(folder, options = {}) {
|
|
34
|
-
const { dockerignore, dockerfile, ...request } = options;
|
|
35
|
-
const { packContext, chunkArchive } = await import("../image-context.js");
|
|
36
|
-
const packed = await packContext(folder, {
|
|
37
|
-
...(dockerignore === undefined ? {} : { dockerignore }),
|
|
38
|
-
...(dockerfile === undefined ? {} : { dockerfile }),
|
|
39
|
-
});
|
|
40
|
-
const archive = await chunkArchive(packed.archive);
|
|
41
|
-
const { missing } = await t.json({
|
|
42
|
-
method: "POST",
|
|
43
|
-
path: "/v1/images/context/missing",
|
|
44
|
-
body: { digests: archive.chunks.map((c) => c.sha256) },
|
|
45
|
-
...request,
|
|
46
|
-
});
|
|
47
|
-
const wanted = new Set(missing);
|
|
48
|
-
const queue = archive.chunks.filter((chunk) => wanted.has(chunk.sha256));
|
|
49
|
-
const upload = async () => {
|
|
50
|
-
for (let chunk = queue.shift(); chunk; chunk = queue.shift())
|
|
51
|
-
await t.json({
|
|
52
|
-
method: "PUT",
|
|
53
|
-
path: `/v1/images/context/${chunk.sha256}`,
|
|
54
|
-
bytes: chunk.bytes,
|
|
55
|
-
...request,
|
|
56
|
-
});
|
|
57
|
-
};
|
|
58
|
-
await Promise.all(Array.from({ length: PARALLEL_UPLOADS }, upload));
|
|
59
|
-
return {
|
|
60
|
-
archive: {
|
|
61
|
-
sha256: archive.sha256,
|
|
62
|
-
size: archive.size,
|
|
63
|
-
chunks: archive.chunks.map((c) => c.sha256),
|
|
64
|
-
},
|
|
65
|
-
files: packed.files,
|
|
66
|
-
...(packed.dockerignore === undefined ? {} : { dockerignore: packed.dockerignore }),
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
/** The request, with a context folder uploaded and named instead. */
|
|
70
|
-
async function prepare(input, options) {
|
|
71
|
-
if (!("contextDir" in input) || input.contextDir === undefined)
|
|
72
|
-
return input;
|
|
73
|
-
const { contextDir, ...rest } = input;
|
|
74
|
-
const uploaded = await uploadContext(contextDir, {
|
|
75
|
-
...(rest.dockerignore === undefined ? {} : { dockerignore: rest.dockerignore }),
|
|
76
|
-
...(options?.signal ? { signal: options.signal } : {}),
|
|
77
|
-
});
|
|
78
|
-
const { dockerignore, ...context } = uploaded;
|
|
79
|
-
return {
|
|
80
|
-
...rest,
|
|
81
|
-
context,
|
|
82
|
-
...(dockerignore === undefined ? {} : { dockerignore }),
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
/** Build log lines as they are written, until the build ends. Streams when
|
|
86
|
-
* the server can, and polls when it cannot. */
|
|
87
|
-
async function followLogs(id, onLog, options = {}) {
|
|
88
|
-
const { after: from = 0, pollMs = 1000, ...request } = options;
|
|
89
|
-
let after = from;
|
|
90
|
-
try {
|
|
91
|
-
for (;;) {
|
|
92
|
-
let resume = false;
|
|
93
|
-
for await (const event of t.events({
|
|
94
|
-
method: "GET",
|
|
95
|
-
path: `/v1/images/${enc(id)}/logs`,
|
|
96
|
-
query: { after, follow: true },
|
|
97
|
-
...request,
|
|
98
|
-
})) {
|
|
99
|
-
if (event.type === "line") {
|
|
100
|
-
onLog(event);
|
|
101
|
-
after = event.seq;
|
|
102
|
-
}
|
|
103
|
-
else if (event.type === "done")
|
|
104
|
-
return event.image;
|
|
105
|
-
else if (event.type === "continue") {
|
|
106
|
-
after = event.after;
|
|
107
|
-
resume = true;
|
|
108
|
-
}
|
|
109
|
-
else if (event.type === "error")
|
|
110
|
-
throw new Error(event.error.message);
|
|
111
|
-
}
|
|
112
|
-
if (!resume)
|
|
113
|
-
break;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
catch (error) {
|
|
117
|
-
if (request.signal?.aborted)
|
|
118
|
-
throw error;
|
|
119
|
-
}
|
|
120
|
-
// A server without streamed logs, or a stream that broke: poll.
|
|
121
|
-
for (;;) {
|
|
122
|
-
const page = await logs(id, after, request);
|
|
123
|
-
for (const line of page.lines)
|
|
124
|
-
onLog(line);
|
|
125
|
-
after = page.nextAfter;
|
|
126
|
-
if (page.done)
|
|
127
|
-
return get(id, request);
|
|
128
|
-
const image = await get(id, request);
|
|
129
|
-
if (image.state !== "queued" && image.state !== "building") {
|
|
130
|
-
for (const line of (await logs(id, after, request)).lines)
|
|
131
|
-
onLog(line);
|
|
132
|
-
return image;
|
|
133
|
-
}
|
|
134
|
-
await new Promise((resolve) => setTimeout(resolve, pollMs));
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
return {
|
|
138
|
-
/** Queue a build and return at once, state "queued". With `contextDir`,
|
|
139
|
-
* the folder is packed and its missing chunks uploaded first. */
|
|
140
|
-
async create(input, options) {
|
|
141
|
-
return t.json({
|
|
142
|
-
method: "POST",
|
|
143
|
-
path: "/v1/images",
|
|
144
|
-
body: await prepare(input, options),
|
|
145
|
-
...options,
|
|
146
|
-
});
|
|
147
|
-
},
|
|
148
|
-
/** Build and wait until the image is ready or failed, streaming log lines
|
|
149
|
-
* to `onLog`. Throws when the build fails, with the build's own error. */
|
|
150
|
-
async build(input, options = {}) {
|
|
151
|
-
const { onLog, pollMs = 1000, ...request } = options;
|
|
152
|
-
let image = await t.json({
|
|
153
|
-
method: "POST",
|
|
154
|
-
path: "/v1/images",
|
|
155
|
-
body: await prepare(input, request),
|
|
156
|
-
...request,
|
|
157
|
-
});
|
|
158
|
-
if (onLog)
|
|
159
|
-
image = await followLogs(image.id, onLog, { ...request, pollMs });
|
|
160
|
-
while (image.state === "queued" || image.state === "building") {
|
|
161
|
-
await new Promise((resolve) => setTimeout(resolve, pollMs));
|
|
162
|
-
image = await get(image.id, { ...(request.signal ? { signal: request.signal } : {}) });
|
|
163
|
-
}
|
|
164
|
-
if (image.state !== "ready")
|
|
165
|
-
throw new Error(`Image ${image.id} ${image.state}: ${image.error ?? "no error given"}`);
|
|
166
|
-
return image;
|
|
167
|
-
},
|
|
168
|
-
uploadContext,
|
|
169
|
-
get,
|
|
170
|
-
resolve,
|
|
171
|
-
logs,
|
|
172
|
-
followLogs,
|
|
173
|
-
list,
|
|
174
|
-
/** Every version of a name, newest first. */
|
|
175
|
-
versions: (name, options) => list({ name, limit: 100 }, options),
|
|
176
|
-
/** Point `tag` of the image's name at this version. */
|
|
177
|
-
async tag(ref, tag, options) {
|
|
178
|
-
return t.json({
|
|
179
|
-
method: "POST",
|
|
180
|
-
path: `/v1/images/${enc(await idOf(ref, options))}:tag`,
|
|
181
|
-
body: { tag },
|
|
182
|
-
...options,
|
|
183
|
-
});
|
|
184
|
-
},
|
|
185
|
-
async untag(ref, tag, options) {
|
|
186
|
-
return t.json({
|
|
187
|
-
method: "POST",
|
|
188
|
-
path: `/v1/images/${enc(await idOf(ref, options))}:untag`,
|
|
189
|
-
body: { tag },
|
|
190
|
-
...options,
|
|
191
|
-
});
|
|
192
|
-
},
|
|
193
|
-
/** Delete one version (by id, name:tag or name@version) and its tags. A
|
|
194
|
-
* bare name deletes its latest tag's version, or its only version when
|
|
195
|
-
* it has one and no latest tag; with several, the error names its tags. */
|
|
196
|
-
async delete(ref, options) {
|
|
197
|
-
const id = await idOf(ref, options).catch(async (error) => {
|
|
198
|
-
if (!(error instanceof RuntimeError && error.code === "image_not_found") ||
|
|
199
|
-
/[:@]/.test(ref))
|
|
200
|
-
throw error;
|
|
201
|
-
const live = (await list({ name: ref, limit: 100 }, options)).data.filter((image) => image.state !== "deleted" && image.state !== "deleting");
|
|
202
|
-
if (live.length !== 1)
|
|
203
|
-
throw error;
|
|
204
|
-
return live[0].id;
|
|
205
|
-
});
|
|
206
|
-
return t.json({
|
|
207
|
-
method: "POST",
|
|
208
|
-
path: `/v1/images/${enc(id)}:delete`,
|
|
209
|
-
body: {},
|
|
210
|
-
...options,
|
|
211
|
-
});
|
|
212
|
-
},
|
|
213
|
-
/** Credentials for private registries. The secret is sealed on arrival
|
|
214
|
-
* and never returned. */
|
|
215
|
-
registries: {
|
|
216
|
-
list: async (options) => (await t.json({
|
|
217
|
-
method: "GET",
|
|
218
|
-
path: "/v1/images/registries",
|
|
219
|
-
...options,
|
|
220
|
-
})).data,
|
|
221
|
-
set: (input, options) => t.json({
|
|
222
|
-
method: "POST",
|
|
223
|
-
path: "/v1/images/registries",
|
|
224
|
-
body: input,
|
|
225
|
-
...options,
|
|
226
|
-
}),
|
|
227
|
-
delete: (registry, options) => t.json({
|
|
228
|
-
method: "POST",
|
|
229
|
-
path: "/v1/images/registries:delete",
|
|
230
|
-
body: { registry },
|
|
231
|
-
...options,
|
|
232
|
-
}),
|
|
233
|
-
},
|
|
234
|
-
};
|
|
235
|
-
}
|
package/dist/products/index.d.ts
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import type { Transport } from "../transport.js";
|
|
2
|
-
import type { Sandbox } from "../sandbox.js";
|
|
3
|
-
import { images } from "./images.js";
|
|
4
|
-
import { sandboxDesktop } from "./desktop.js";
|
|
5
|
-
import { sandboxBrowser } from "./browser.js";
|
|
6
|
-
import { sandboxInterpreter } from "./interpreter.js";
|
|
7
|
-
import { sandboxNetwork } from "./network.js";
|
|
8
|
-
import { domains, ips, networks, ports } from "./network-products.js";
|
|
9
|
-
import { sandboxPreviews } from "./previews.js";
|
|
10
|
-
import { referrals } from "./referrals.js";
|
|
11
|
-
import { plans } from "./plans.js";
|
|
12
|
-
import { billing } from "./billing.js";
|
|
13
|
-
import { audit } from "./audit.js";
|
|
14
|
-
import { sso } from "./sso.js";
|
|
15
|
-
import { switching } from "./switching.js";
|
|
16
|
-
import { limits } from "./limits.js";
|
|
17
|
-
import { keys } from "./api-keys.js";
|
|
18
|
-
import { reservations } from "./reservations.js";
|
|
19
|
-
import { volumes } from "./volumes.js";
|
|
20
|
-
import { jobs } from "./jobs.js";
|
|
21
|
-
import { sandboxMounts } from "./mounts.js";
|
|
22
|
-
import { sandboxTailscale } from "./tailscale.js";
|
|
23
|
-
import { secrets } from "./secrets.js";
|
|
24
|
-
import { mcp, sandboxMcp } from "./mcp.js";
|
|
25
|
-
import { events, otel, sandboxMetrics, webhooks } from "./observability.js";
|
|
26
|
-
import { agents } from "./agents.js";
|
|
27
|
-
import { builds } from "./builds.js";
|
|
28
|
-
import { ci } from "./ci.js";
|
|
29
|
-
import { containers } from "./containers.js";
|
|
30
|
-
import { browsers } from "./browsers.js";
|
|
31
|
-
import { desktops } from "./desktops.js";
|
|
32
|
-
import { apps } from "./apps.js";
|
|
33
|
-
import { functions } from "./functions.js";
|
|
34
|
-
export declare const clientExtensions: {
|
|
35
|
-
images: typeof images;
|
|
36
|
-
volumes: typeof volumes;
|
|
37
|
-
jobs: typeof jobs;
|
|
38
|
-
referrals: typeof referrals;
|
|
39
|
-
plans: typeof plans;
|
|
40
|
-
billing: typeof billing;
|
|
41
|
-
limits: typeof limits;
|
|
42
|
-
keys: typeof keys;
|
|
43
|
-
reservations: typeof reservations;
|
|
44
|
-
switching: typeof switching;
|
|
45
|
-
secrets: typeof secrets;
|
|
46
|
-
webhooks: typeof webhooks;
|
|
47
|
-
otel: typeof otel;
|
|
48
|
-
events: typeof events;
|
|
49
|
-
audit: typeof audit;
|
|
50
|
-
mcp: typeof mcp;
|
|
51
|
-
sso: typeof sso;
|
|
52
|
-
domains: typeof domains;
|
|
53
|
-
ports: typeof ports;
|
|
54
|
-
ips: typeof ips;
|
|
55
|
-
networks: typeof networks;
|
|
56
|
-
agents: typeof agents;
|
|
57
|
-
builds: typeof builds;
|
|
58
|
-
ci: typeof ci;
|
|
59
|
-
containers: typeof containers;
|
|
60
|
-
browsers: typeof browsers;
|
|
61
|
-
desktops: typeof desktops;
|
|
62
|
-
apps: typeof apps;
|
|
63
|
-
functions: typeof functions;
|
|
64
|
-
};
|
|
65
|
-
export declare const sandboxExtensions: {
|
|
66
|
-
interpreter: typeof sandboxInterpreter;
|
|
67
|
-
previews: typeof sandboxPreviews;
|
|
68
|
-
network: typeof sandboxNetwork;
|
|
69
|
-
desktop: typeof sandboxDesktop;
|
|
70
|
-
browser: typeof sandboxBrowser;
|
|
71
|
-
mounts: typeof sandboxMounts;
|
|
72
|
-
tailscale: typeof sandboxTailscale;
|
|
73
|
-
metrics: typeof sandboxMetrics;
|
|
74
|
-
mcp: typeof sandboxMcp;
|
|
75
|
-
};
|
|
76
|
-
export type ClientExtensions = {
|
|
77
|
-
readonly [K in keyof typeof clientExtensions]: ReturnType<(typeof clientExtensions)[K]>;
|
|
78
|
-
};
|
|
79
|
-
export type SandboxExtensions = {
|
|
80
|
-
readonly [K in keyof typeof sandboxExtensions]: ReturnType<(typeof sandboxExtensions)[K]>;
|
|
81
|
-
};
|
|
82
|
-
/** The factories as plain pairs, for the constructors that install them. */
|
|
83
|
-
export declare function clientFactories(): Array<[string, (t: Transport) => unknown]>;
|
|
84
|
-
export declare function sandboxFactories(): Array<[string, (t: Transport, sandbox: Sandbox) => unknown]>;
|
package/dist/products/index.js
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { images } from "./images.js";
|
|
2
|
-
import { sandboxDesktop } from "./desktop.js";
|
|
3
|
-
import { sandboxBrowser } from "./browser.js";
|
|
4
|
-
import { sandboxInterpreter } from "./interpreter.js";
|
|
5
|
-
import { sandboxNetwork } from "./network.js";
|
|
6
|
-
import { domains, ips, networks, ports } from "./network-products.js";
|
|
7
|
-
import { sandboxPreviews } from "./previews.js";
|
|
8
|
-
import { referrals } from "./referrals.js";
|
|
9
|
-
import { plans } from "./plans.js";
|
|
10
|
-
import { billing } from "./billing.js";
|
|
11
|
-
import { audit } from "./audit.js";
|
|
12
|
-
import { sso } from "./sso.js";
|
|
13
|
-
import { switching } from "./switching.js";
|
|
14
|
-
import { limits } from "./limits.js";
|
|
15
|
-
import { keys } from "./api-keys.js";
|
|
16
|
-
import { reservations } from "./reservations.js";
|
|
17
|
-
import { volumes } from "./volumes.js";
|
|
18
|
-
import { jobs } from "./jobs.js";
|
|
19
|
-
import { sandboxMounts } from "./mounts.js";
|
|
20
|
-
import { sandboxTailscale } from "./tailscale.js";
|
|
21
|
-
import { secrets } from "./secrets.js";
|
|
22
|
-
import { mcp, sandboxMcp } from "./mcp.js";
|
|
23
|
-
import { events, otel, sandboxMetrics, webhooks } from "./observability.js";
|
|
24
|
-
import { agents } from "./agents.js";
|
|
25
|
-
import { builds } from "./builds.js";
|
|
26
|
-
import { ci } from "./ci.js";
|
|
27
|
-
import { containers } from "./containers.js";
|
|
28
|
-
import { browsers } from "./browsers.js";
|
|
29
|
-
import { desktops } from "./desktops.js";
|
|
30
|
-
// The hub loads this file, so it loads apps.ts and resources.ts too: request
|
|
31
|
-
// builders over Transport whose top level holds only types, functions and
|
|
32
|
-
// imports of files the hub loads, so importing them runs nothing in the hub
|
|
33
|
-
// (agents/hub-sdk-products.test.ts parses every product file the hub loads).
|
|
34
|
-
import { apps } from "./apps.js";
|
|
35
|
-
import { functions } from "./functions.js";
|
|
36
|
-
/* HOW A LANE ADDS A PRODUCT TO THE SDK
|
|
37
|
-
*
|
|
38
|
-
* 1. Write src/products/<name>.ts exporting a factory:
|
|
39
|
-
* export function images(t: Transport) {
|
|
40
|
-
* return {
|
|
41
|
-
* create: (input: CreateImage, options?: RequestOptions) =>
|
|
42
|
-
* t.json<Image>({ method: "POST", path: "/v1/images", body: input, ...options }),
|
|
43
|
-
* ...
|
|
44
|
-
* };
|
|
45
|
-
* }
|
|
46
|
-
* and, for methods that belong on a sandbox (sbx.previews.create(3000)):
|
|
47
|
-
* export function sandboxPreviews(t: Transport, sandbox: Sandbox) { return { ... } }
|
|
48
|
-
* 2. Add ONE line to the matching object below. The Runtime client and every
|
|
49
|
-
* Sandbox pick it up, typed, with the shared auth, retries, keys and errors.
|
|
50
|
-
*/
|
|
51
|
-
export const clientExtensions = {
|
|
52
|
-
images,
|
|
53
|
-
volumes,
|
|
54
|
-
jobs,
|
|
55
|
-
referrals,
|
|
56
|
-
plans,
|
|
57
|
-
billing,
|
|
58
|
-
limits,
|
|
59
|
-
keys,
|
|
60
|
-
reservations,
|
|
61
|
-
switching,
|
|
62
|
-
secrets,
|
|
63
|
-
webhooks,
|
|
64
|
-
otel,
|
|
65
|
-
events,
|
|
66
|
-
audit,
|
|
67
|
-
mcp,
|
|
68
|
-
sso,
|
|
69
|
-
domains,
|
|
70
|
-
ports,
|
|
71
|
-
ips,
|
|
72
|
-
networks,
|
|
73
|
-
agents,
|
|
74
|
-
// Builds (beta): the API answers product_in_beta outside its list.
|
|
75
|
-
builds,
|
|
76
|
-
// CI/CD (beta): the API answers product_in_beta outside its list.
|
|
77
|
-
ci,
|
|
78
|
-
containers,
|
|
79
|
-
// Browsers and Desktops (beta): the API answers product_in_beta outside its list.
|
|
80
|
-
browsers,
|
|
81
|
-
desktops,
|
|
82
|
-
// A private beta (PRODUCT_BETAS): an account outside it is refused with
|
|
83
|
-
// product_in_beta until Apps launches.
|
|
84
|
-
apps,
|
|
85
|
-
// The same until Functions launches.
|
|
86
|
-
functions,
|
|
87
|
-
};
|
|
88
|
-
export const sandboxExtensions = {
|
|
89
|
-
interpreter: sandboxInterpreter,
|
|
90
|
-
previews: sandboxPreviews,
|
|
91
|
-
network: sandboxNetwork,
|
|
92
|
-
desktop: sandboxDesktop,
|
|
93
|
-
browser: sandboxBrowser,
|
|
94
|
-
mounts: sandboxMounts,
|
|
95
|
-
tailscale: sandboxTailscale,
|
|
96
|
-
metrics: sandboxMetrics,
|
|
97
|
-
mcp: sandboxMcp,
|
|
98
|
-
};
|
|
99
|
-
/** The factories as plain pairs, for the constructors that install them. */
|
|
100
|
-
export function clientFactories() {
|
|
101
|
-
return Object.entries(clientExtensions);
|
|
102
|
-
}
|
|
103
|
-
export function sandboxFactories() {
|
|
104
|
-
return Object.entries(sandboxExtensions);
|
|
105
|
-
}
|