sandcovery 0.5.1 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/cli/index.mjs +1 -1
- package/dist/cli/sandcovery-docker.mjs +1 -1
- package/dist/cli/sandcovery-kubectl.mjs +1 -1
- package/dist/{handlers-CGHTslWU.mjs → handlers-B6NdmgQM.mjs} +440 -97
- package/dist/index.d.mts +3 -1
- package/dist/index.mjs +1 -1
- package/dist/{port-forwarder-Dot4oNtz.mjs → port-forwarder-DxnuUTsW.mjs} +183 -73
- package/dist/{src-BoT9S6C3.mjs → src-BqfeIyqj.mjs} +1148 -1108
- package/dist/{start-C2p7R_Hj.mjs → start-aOWo5B3M.mjs} +3 -3
- package/dist/{types-BGjvzP6q.d.mts → types-C4amb2QE.d.mts} +20 -3
- package/dist/types.d.mts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -63,12 +63,12 @@ sandcovery sandboxes destroy "$id" --yes
|
|
|
63
63
|
- `sandcovery login` shows a URL and a code to approve in a browser signed in to Sandcovery, then saves a login, readable only by you, that commands send when neither `--token` nor `SANDCOVERY_API_KEY` is set. `sandcovery logout` revokes it and deletes it.
|
|
64
64
|
- `sandcovery sandboxes exec` streams the command's output and exits with the command's exit code.
|
|
65
65
|
- `sandcovery docker <args>` runs `docker <args>` in a sandbox on a provider that runs Docker, streams its output, and exits with its exit code, so a computer with no Docker can build and run containers. Later `sandcovery docker` commands reuse that sandbox until its TTL ends. Before Docker runs, it copies the local files the command reads into the sandbox at the same absolute paths, up to 100 MiB packed, and runs Docker in the same working directory there: build contexts without what `.dockerignore` leaves out, bind mount sources, env files, the files `cp`, `load -i`, and `import` read, and a Compose project's files, build contexts, and bind mounts. It copies only paths under your home folder or the working directory. When stdin is not a terminal and Docker reads it, as with `login --password-stdin` or `load`, it hands stdin to Docker, and when stdout is not a terminal and Docker writes an archive there, as with `save`, the archive arrives byte for byte. Docker gets a terminal wherever yours is one, so `docker run -it`, `docker exec -it`, and `docker attach` work, and a command runs until it exits.
|
|
66
|
-
- `sandcovery-docker <args>` does the same in the same sandbox, takes Docker's arguments alone, and adds nothing to Docker's stdout or stderr, so `alias docker=sandcovery-docker` runs `docker` in the sandbox. It reads the key from `SANDCOVERY_API_KEY` or the saved login. Docker's environment
|
|
66
|
+
- `sandcovery-docker <args>` does the same in the same sandbox, takes Docker's arguments alone, and adds nothing to Docker's stdout or stderr, so `alias docker=sandcovery-docker` runs `docker` in the sandbox. It reads the key from `SANDCOVERY_API_KEY` or the saved login. The variables Docker reads come from your computer's environment, such as a name given to `-e` with no value, `DOCKER_DEFAULT_PLATFORM`, and the shell variables a Compose file names, and the command sends the sandbox only those. A TCP port a container publishes answers on the same address and port of your computer.
|
|
67
67
|
- `sandcovery kubectl <args>` runs your own `kubectl <args>` against a one-node Kubernetes cluster in a sandbox on Freestyle, or on boxd when Freestyle cannot create it, and exits with its exit code. The first command that reaches the cluster starts it, which takes a few minutes, and later commands reuse it. It stops 15 minutes after the last command that reached it ends, or at its TTL, whichever comes first, and a command that keeps running, such as `port-forward` or `logs -f`, keeps it running. `kubectl` must be on `PATH` and runs on your computer, so local files, `port-forward`, `exec -it`, and `logs -f` work as they do with a local cluster. `completion`, `config`, `version --client`, and `--help` start no cluster.
|
|
68
68
|
- `sandcovery-kubectl <args>` does the same on the same cluster, takes `kubectl`'s arguments alone, and adds nothing to `kubectl`'s stdout or stderr, so `alias kubectl=sandcovery-kubectl` runs `kubectl` on the sandbox's cluster. It reads the key from `SANDCOVERY_API_KEY` or the saved login.
|
|
69
69
|
- `--json` prints one JSON document on stdout, and every failure prints a JSON error with a stable `reason` on stderr.
|
|
70
70
|
- `sandboxes destroy`, `keys revoke`, `credentials delete`, and `x-account unlink` ask first, and need `--yes` without a terminal.
|
|
71
|
-
- `sandcovery providers list --routed` lists only the providers Sandcovery routes to, `sandcovery credentials offer` shows the free vCPU-hours your keys have earned, `sandcovery credentials count-x-post <URL>` counts your post on X that tags @Sandcovery as one key, `sandcovery pricing inspect` shows the Pro price and the credit terms with no key, `sandcovery pricing monthly --size 2x4 --hours-per-day 8` prices a size for a month on each provider Sandcovery routes to with no key,
|
|
71
|
+
- `sandcovery providers list --routed` lists only the providers Sandcovery routes to, `sandcovery credentials offer` shows the free vCPU-hours your keys have earned, `sandcovery credentials count-x-post <URL>` counts your post on X that tags @Sandcovery as one key, `sandcovery pricing inspect` shows the Pro price and the credit terms with no key, `sandcovery pricing monthly --size 2x4 --hours-per-day 8` prices a size for a month on each provider Sandcovery routes to with no key, `sandcovery billing inspect` and `sandcovery billing buy-credits --amount <USD>` show the plan and start a credit payment, and `sandcovery billing set-auto-top-up --amount <USD> --threshold <USD>` and `sandcovery billing stop-auto-top-up` turn auto top-up on and off.
|
|
72
72
|
- `sandcovery x-account inspect` shows the X account linked to you, `sandcovery x-account link` prints the dashboard page where you link one, since X confirms the link in the browser, and `sandcovery x-account unlink` unlinks it.
|
|
73
73
|
- `sandcovery problems report <text> --page <path>` tells the Sandcovery team about a problem with no key, as `sandcovery.problems.report({ message, path })` does from code.
|
|
74
74
|
- `sandcovery help search <words>` finds a command, and `--help` works on every command.
|
|
@@ -94,7 +94,7 @@ await admin.credentials.set('e2b', { api_key: process.env.E2B_API_KEY })
|
|
|
94
94
|
|
|
95
95
|
An organization holds as many credentials as it needs: `credentials.add(provider, fields)` adds another, a create tries a provider's credentials in the order they were added, and `credentials.deleteOne(provider, id)` deletes one. A Free organization routes only its oldest credential, and `paused` is `true` on each other one until it has Pro.
|
|
96
96
|
|
|
97
|
-
The fields each provider takes are its `credential_fields` on `sandcovery.providers.get(provider)`. `sandcovery.providers.catalog()` lists every provider on the [provider board](https://www.sandcovery.com/providers), where `routed` is `false` for a provider that is coming soon. `credentials.offer()` reads the free vCPU-hours your keys have earned, `credentials.countXPost({ url })` counts your post on X that tags @Sandcovery as one key, `billing.get()` reads the plan
|
|
97
|
+
The fields each provider takes are its `credential_fields` on `sandcovery.providers.get(provider)`. `sandcovery.providers.catalog()` lists every provider on the [provider board](https://www.sandcovery.com/providers), where `routed` is `false` for a provider that is coming soon. `credentials.offer()` reads the free vCPU-hours your keys have earned, `credentials.countXPost({ url })` counts your post on X that tags @Sandcovery as one key, `billing.get()` reads the plan, the credit balance, and auto top-up, `billing.buyCredits({ amount_micro_usd })` answers the Stripe Checkout page that takes a credit payment, `billing.setAutoTopUp({ amount_micro_usd, threshold_micro_usd })` sets the amount Sandcovery charges the saved card each time the credit balance falls below the threshold and answers the Stripe Checkout page that saves a card when none is saved, and `billing.stopAutoTopUp()` turns auto top-up off.
|
|
98
98
|
|
|
99
99
|
## X account
|
|
100
100
|
|
package/dist/cli/index.mjs
CHANGED