Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions content/(account)/authentication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ To create a Spacefast account, you need an email address and the six-digit code

## Create an account

Type your email address on the sign-in page and press **Continue**. If the address has no account yet, Spacefast mails you a six-digit code. Enter the code and the account exists. That is the whole signup.
Type your email address on the sign-in page and press **Continue**. If the address has no account yet, Spacefast mails you a six-digit code. Enter the code to finish signing up.

There is no password signup. Passwords are something you add later, from settings, once you already have an account.

Expand All @@ -20,7 +20,7 @@ Two other ways in create an account for you:

## Sign in

One field, one button. Type the address, press **Continue**, and Spacefast picks the method for that account.
Enter your email address and press **Continue**. Spacefast picks the right sign-in method for that account:

| What you see | When |
|---|---|
Expand Down Expand Up @@ -132,7 +132,7 @@ Inside each team, the credential can't do more than your current role allows the

## Account settings

The whole `/account` branch opens as a dialog over the dashboard.
Every `/account` page opens as a dialog over the dashboard.

| Page | Path | What lives there |
|---|---|---|
Expand Down
4 changes: 2 additions & 2 deletions content/(concepts)/spaces.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ sidebar:
order: 1
---

A Space is what you publish to: one stable hostname. Publishing creates versions inside it, and the Space decides which one visitors see.
A Space is what you publish to, with one stable hostname. Publishing creates versions inside it, and the Space decides which one visitors see.

## What a Space is

A Space owns a slug, a hostname, an owner, and one pointer that says which version visitors get. A publish can create a new immutable version or report no changes, and the Space decides which version is live.
Each Space has a slug, a managed hostname, an owner, and a pointer to the version visitors see. A publish creates a new immutable version or reports no changes, and the Space controls which version is live.

Ids are `spc_` plus 32 hex characters:

Expand Down
6 changes: 3 additions & 3 deletions content/(concepts)/teams.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ A team has a name and a slug. The slug is the first segment of its dashboard URL

## Roles

Three roles, and the one you hold in a team caps everything you do there, whether through the dashboard, the CLI, the API, or an agent acting for you.
Your team role caps what you can do across the dashboard, CLI, API, and any agent acting on your behalf.

| Action | Owner | Admin | Member |
|---|---|---|---|
Expand All @@ -60,7 +60,7 @@ Three roles, and the one you hold in a team caps everything you do there, whethe

A credential with the `teams:members.write` scope, such as Agent access, can invite people. Cancelling or resending an invitation and every other membership change need a signed-in person in the dashboard, even for an owner or admin. See [credential limits](/api-keys#what-an-agent-grant-cannot-do).

Owner and admin differ in exactly one place. An admin can hand out `admin` and `member`, but only an owner can make someone else an owner.
Admins can assign the `admin` and `member` roles, while only owners can grant the `owner` role or transfer ownership.

## Invite someone

Expand Down Expand Up @@ -95,7 +95,7 @@ On **Members**, each row has role and removal actions for owners and admins. Rem

If the team uses [Connectors](/connectors), the removal review lists the departing member's connector dependencies. Their personal connections disconnect automatically along with any Space bindings pointing to them. Team connections they created stay active while their existing Space bindings stay in place; if an owner or admin rebinds a role on a public, link-shared, or password-protected Space, restore its public-serving allowance before expecting calls to succeed.

Two guards you cannot talk your way past:
Two rules always apply:

- The last owner cannot be removed, and cannot be demoted. Add another owner first.
- An admin cannot create an owner.
Expand Down
6 changes: 3 additions & 3 deletions content/(concepts)/versions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ A rollback points `live` back at a retained, ready version and doesn't rebuild i

## A version is a snapshot

A publish that changes the files creates a version. A version is the exact set of files plus the config it finalized with, frozen. Nothing rewrites a version after it is ready. A publish with no changes can return `noop_publish` without creating a version.
A publish that changes files creates a version, a frozen snapshot of those files and the config they finalized with. Nothing modifies a version after it is ready. A publish with no changes can return `noop_publish` without creating a version.

Ids are `ver_` plus 32 hex characters. Once a version reaches `ready` it also gets a number, and the CLI and dashboard call it by that number.

Expand All @@ -27,7 +27,7 @@ Numbers are handed out in the order versions become ready, not the order they we
| `uploading` | Bytes are landing |
| `uploaded` | Every declared file arrived |
| `finalizing` | The version is being compiled into its served form |
| `ready` | Done, numbered, addressable, promotable |
| `ready` | Ready to serve, numbered, and promotable |
| `failed` | Finalize or the build that fed it failed |
| `canceled` | Stopped before it finished |
| `expired` | A draft that ran out of time before finalize |
Expand Down Expand Up @@ -74,7 +74,7 @@ Both take a version id, a ref such as `v12`, or a bare number. Both wait for the

Open **Versions**, find the row, and hit **Make live**. Confirm on **Make v12 live?**. The Overview page carries the same action as **Roll back to** next to the previous version.

Afterwards the list narrates the state you are in, for example *Rolled back from v13. Make it live below to roll forward.*
Afterward, the list shows the rollback state, for example *Rolled back from v13. Make it live below to roll forward.*

</Tab>
<Tab title="API">
Expand Down
4 changes: 2 additions & 2 deletions content/(dynamic)/crons.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Validation is blocking. A bad cron fails the publish rather than shipping a sche

## Schedule syntax

Three grammars in two kinds. Named and shorthand schedules are **simple** crons. Five-field crontab schedules are **advanced** crons, and your plan sets how many of each a Space runs.
Crons support three schedule formats across two tiers. Named and shorthand schedules are **simple** crons. Five-field crontab schedules are **advanced** crons, and your plan sets how many of each a Space runs.

| Kind | Examples | Notes |
| --- | --- | --- |
Expand Down Expand Up @@ -87,7 +87,7 @@ Advanced crons also run at their closest simple schedule for now, until advanced

A raised limit applies right away. After an upgrade or Boost, crons that were waiting start running without a publish.

A lowered limit applies at your next publish, promote or rollback. Until then, a downgrade or Boost ending changes nothing: crons that are running keep running.
A lowered limit applies at your next publish, promote or rollback. Until then, a downgrade or Boost ending changes nothing, and crons that are running keep running.

For now, whatever the plan, a Space can declare at most **8** crons, and past that the publish fails validation. `allowance` in the API reports the capped numbers. The ceiling rises to the plan limits above as the runtime update reaches every box.

Expand Down
2 changes: 1 addition & 1 deletion content/(dynamic)/database.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ sf db migrate --rename
| `drop_table`, `drop_column`, `drop_index` | `--drop` |
| `rename_table`, `rename_column` | `--rename` |

`sf db migrate` decides Zero-ness from your local `sf.jsonc` before it contacts the API. A static or Functions project fails with `runtime_kind_mismatch` and exit code `30`, having sent no request. `--previous-artifact` diffs against a named artifact instead of the live schema.
`sf db migrate` checks whether the project uses Zero from your local `sf.jsonc` before it contacts the API. A static or Functions project fails with `runtime_kind_mismatch` and exit code `30`, having sent no request. `--previous-artifact` diffs against a named artifact instead of the live schema.

`sf db`, `sf db dump`, and `sf db migrate` are Zero-only. A worker declares no table set, so they answer `runtime_kind_mismatch` for one.

Expand Down
6 changes: 3 additions & 3 deletions content/(dynamic)/environment-variables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ So a brand new variable with no flag is write-only. Pass `--no-secret` when you
| Reserved | Names starting with `SPACEFAST_` |
| Empty values | Refused. A variable always has a value |

## Build time and runtime are different lanes
## Build time and runtime are separate

A plain variable reaches both lanes. It is filled into template files when a version finalizes, and server code reads it at runtime. A secret reaches server code only. A template that references one is blocked with `secret_variable_in_template`.
A plain variable reaches both stages. It is filled into template files when a version finalizes, and server code reads it at runtime. A secret reaches server code only. A template that references one is blocked with `secret_variable_in_template`.

### Build time, `{{ vars.NAME }}`

Expand Down Expand Up @@ -109,7 +109,7 @@ export default capsule({

A [Functions](/functions) worker reads the same values from `env`, its second handler argument.

`.env.lakebed.server` is also accepted, for capsule portability. That file is treated as the full list: publishing also deletes Space-scope variables it doesn't name, even when the file is empty.
`.env.lakebed.server` is also accepted, for capsule portability. That file is treated as the full list, so publishing also deletes Space-scope variables it doesn't name, even when the file is empty.


An anonymous first publish, before you have an account, syncs nothing and reports `skipped: "anonymous"`.
Expand Down
4 changes: 2 additions & 2 deletions content/(dynamic)/functions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Detection is the normal case. `sf publish` looks at the tree and picks the first

A directory matching none of these is a static site, which is the safe default.

The OpenNext build wins over a stray `handler.ts`, because framework output is the thing the build produced while a loose file may be a leftover.
The OpenNext build wins over a stray `handler.ts`, because a framework build takes precedence over a leftover handler file.

### The `functions/` file router

Expand Down Expand Up @@ -132,7 +132,7 @@ Outbound requests from a worker leave from Cloudflare's shared network addresses

`env.CONNECTORS` calls your Space's [connector roles](/space-connectors#call-it-from-functions) when the version declares any.

`env.DB` is always there. It is D1-shaped, so `env.DB.prepare(sql).bind(...).all()` is the call you already know. It reaches the space's own database through a broker, so no connection string ever lands in the bundle.
`env.DB` is always there. It uses the D1 API (`env.DB.prepare(sql).bind(...).all()`) and reaches the space's own database through a broker, so no connection string ever lands in the bundle.

Two groups of variable names never reach a worker, dropped rather than blanked so your code reads them as absent instead of as "configured, but empty".

Expand Down
2 changes: 1 addition & 1 deletion content/(dynamic)/wordpress.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Your published files are served in front of WordPress, so a static Space never u

## `sf wp`

`sf wp` is the escape hatch under every named surface: whatever WP-CLI can do that Spacefast has not given its own command.
`sf wp` runs WP-CLI directly for anything Spacefast doesn't have a dedicated command for.

```bash
sf wp option get blogname
Expand Down
6 changes: 3 additions & 3 deletions content/(dynamic)/zero-runtime.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The other runtime is [Functions](/functions), a worker for npm-heavy code and fr

## Declare it

Zero is never inferred. A runtime that owns a database does not spring into existence from a directory shape, so both entry paths are required.
Zero is never inferred. Because Zero provisions a database, Spacefast never enables it from directory detection; both entry paths are required.

```jsonc sf.jsonc
{
Expand Down Expand Up @@ -160,7 +160,7 @@ Return one of the response helpers: `json(value)`, `text(value)`, `empty()` for
3. Your endpoint table matches. A hit runs the handler in the QuickJS runner on the space's own machine, in one transaction with the database.
4. Everything else falls to the app shell, which serves your client bundle.

Queries, mutations, and actions do not get their own URLs. The client sends them over `/__zero/run`. When a mutation commits, the runtime publishes an invalidation event. Every browser holding a matching subscription re-runs its query. That is the whole realtime story. Do not poll.
Queries, mutations, and actions do not get their own URLs. The client sends them over `/__zero/run`. When a mutation commits, the runtime publishes an invalidation event and every browser holding a matching subscription re-runs its query automatically, so you don't need to poll.

An endpoint cannot claim `/`, `/index.html`, `/client.js`, `/auth/callback`, anything under `/auth/`, or anything under `/_spacefast/`. The shell, the client bundle, and the sign-in flow already answer those.

Expand Down Expand Up @@ -257,7 +257,7 @@ Call them from the client with `useAction("invite")`. `scope: "/"` covers the wh

## Styling

Write Tailwind classes in your JSX. Zero compiles them at publish, so do not add a CSS, PostCSS, or Tailwind pipeline. `@plugin` and `@config` directives are rejected, and `theme.json` plus utility classes are the whole styling story.
Write Tailwind classes in your JSX. Zero compiles them at publish, so do not add a CSS, PostCSS, or Tailwind pipeline. `@plugin` and `@config` directives are rejected; use `theme.json` and utility classes for styling.

Class names must be static strings. The compiler finds them by scanning source text, so `bg-${tone}-500` produces no CSS for that class. Branch to whole literals instead.

Expand Down
8 changes: 4 additions & 4 deletions content/(publish)/anonymous-and-claim.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ To get a warning before the clock runs out, leave an address. Set `email` on the

## Caps

Anonymous publishing runs a tighter table than Personal on every axis.
Anonymous publishing has stricter limits than the Personal plan.

| Cap | Value |
| --- | --- |
Expand Down Expand Up @@ -112,13 +112,13 @@ After the claim lands the page says **&lt;space&gt; is yours.** and offers a **C
| Space key | The only credential | Demoted, see below |
| Explicit people and links | Active | Survive unchanged |

The dashboard says the last row out loud, under **Sharing that stays with this space**. Claiming changes ownership, not who you already shared with.
The dashboard lists those people and links under **Sharing that stays with this space**. Claiming changes ownership, not who already has access.

Two things can block a claim. A claim lands the Space in the team, so it counts against that team's space limit like any other create — a team already at its Space limit answers `quota_exceeded`. And the slug is re-checked against the receiving team's namespace, so an anonymous Space whose slug collides there answers `slug_unavailable` and you pick a new one.
Two things can block a claim. A claim lands the Space in the team, so it counts against that team's space limit like any other create. A team already at its Space limit answers `quota_exceeded`. And the slug is re-checked against the receiving team's namespace, so an anonymous Space whose slug collides there answers `slug_unavailable` and you pick a new one.

## Keeping your agent publishing

An agent that published the Space for you loses its credential the moment you claim, which would leave it unable to ship the next change. So a claim does not destroy the space key, it demotes it into a one-time voucher.
An agent that published the Space for you loses its credential the moment you claim, which would leave it unable to ship the next change. Instead of destroying the space key, claiming demotes it into a one-time voucher.

On the claim page that is the **Claim & keep access** button. On the CLI it is `sf spaces claim --keep-publishing`. Either way the choice is yours, explicitly, and the server decides whether the Space is even eligible.

Expand Down
2 changes: 1 addition & 1 deletion content/(publish)/ci.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Credentials also behave differently under `CI`. The plaintext credential store i

## Version provenance

You do not pass any of it. On GitHub Actions the CLI reads the branch, commit SHA, ref, repository, run id, run attempt, run URL, workflow, job, actor, and event name from the environment, plus the pull request number when the ref starts `refs/pull/`. On GitLab CI it reads the equivalents, and takes the commit title as the version message. Bitbucket Pipelines is detected too.
The CLI collects build provenance automatically. On GitHub Actions it reads the branch, commit SHA, ref, repository, run id, run attempt, run URL, workflow, job, actor, and event name from the environment, plus the pull request number when the ref starts `refs/pull/`. On GitLab CI it reads the equivalents, and takes the commit title as the version message. Bitbucket Pipelines is detected too.

Every value shows up on the version, so version history says which commit and which run produced each build. Override any of them with `--git-branch`, `--git-commit`, `--git-ref`, `--git-repository`, or `--message`. Full flag table on [`sf publish`](/cli/publish).

Expand Down
4 changes: 2 additions & 2 deletions content/(publish)/frameworks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ npm run build
sf publish ./dist
```

**Let Spacefast build.** You hand over source. Spacefast installs dependencies, runs the build in a sandbox, and publishes the output as a version. Use it when the source is the thing you have, especially on a push to a connected repository.
**Let Spacefast build.** You hand over source. Spacefast installs dependencies, runs the build in a sandbox, and publishes the output as a version. Use it when you only have source code, or when building from a connected repository.

```bash
sf publish --remote
Expand Down Expand Up @@ -139,7 +139,7 @@ Two variables are injected for you on builds that target no channel, such as pla
| `canceled` | You stopped it |
| `skipped` | The runner decided not to run it at all |

`skipped` is normal, not an error. A push that touched nothing under `rootDirectory` is skipped, and so is a build a newer build for the same branch has already overtaken.
`skipped` is normal, not an error. A push that touched nothing under `rootDirectory` is skipped, and so is a build superseded by a newer push on the same branch.

A build whose output is byte-identical to the live version succeeds without minting a version. It records the version it reused, and the dashboard shows **No changes. Reused v12.**

Expand Down
4 changes: 2 additions & 2 deletions content/(publish)/publish.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Two artifacts that claim the same request route also stop the publish, so visito
| Manifest request body | 16 MiB | `manifest_body_too_large` |
| Inline archive body | 128 MiB | `publish_archive_too_large` |

The file count is a platform ceiling: every claimed plan gets the same 100,000. Anonymous publishes run a tighter table, on [Limits](/limits).
The file count is a platform ceiling, and every claimed plan gets the same 100,000. Anonymous publishes use stricter limits; see [Limits](/limits).

Every plan publishes every file type. A PDF, a video, or a zip lands in the version like an HTML page does; only the size and count table above applies.

Expand Down Expand Up @@ -204,7 +204,7 @@ An archive that needs a build returns a receipt with a `build` object and `next.
| `invalid_file_path` | A path Spacefast cannot canonicalize | Remove backslashes, doubled slashes, and trailing dots or spaces |
| `static_control_file_not_supported` | An `.htaccess` or `.user.ini` shipped | Delete it. Use `_redirects` and `_headers` instead |
| `unsupported_publish_media_type` | The content type is not one of the five above | Send a zip or a JSON manifest |
| `publish_archive_compression_ratio_exceeded` | The archive expands over 100 times its size | Repack without the zip bomb shaped content |
| `publish_archive_compression_ratio_exceeded` | The archive expands over 100 times its size | Repack without highly compressed or recursive entries |
| `slug_reserved`, `slug_unavailable` | The slug you asked for is taken or held | Take the `details.suggestion` |
| `space_selection_conflict` | You passed both a Space and a creation-only flag such as `--access` | Drop the creation flag |

Expand Down
Loading
Loading