diff --git a/DOCS_WRITING_QA.md b/DOCS_WRITING_QA.md index 6c2a363..ef6b820 100644 --- a/DOCS_WRITING_QA.md +++ b/DOCS_WRITING_QA.md @@ -60,7 +60,7 @@ The first review fixed eight findings covering stats, caching, routing, anonymou | Agent reach | Keep supported-client detection, skill installation, permission ceilings, human-only actions, and team-automation revocation exceptions | `content/cli/agents.mdx`; `content/agents/skills.mdx`; `content/agents/permissions.mdx` | | Ownership and billing | Distinguish self-serve teams from partner customer ownership; billing reads differ from plan changes; key rotation depends on switching consumers first | `createSpace` public reference; `content/platforms/partner-api/customers.mdx`; `content/(account)/billing.mdx`; `content/(account)/api-keys.mdx` | | Cache and schedule application | Repeat public-cache exceptions in troubleshooting; crons follow the live version | `content/(serve)/caching.mdx`; `listSpaceCrons` public reference | -| Sentence splitting | Limit missing generated CSS to the dynamic class instead of declaring the whole app unstyled | `content/(dynamic)/zero-runtime.mdx`, Styling | +| Sentence splitting | Limit missing generated CSS to the dynamic class instead of declaring the whole app unstyled | `content/(dynamic)/zero.mdx`, Styling | Coverage by original PR section: @@ -68,7 +68,7 @@ Coverage by original PR section: | --- | --- | | Account | 3: api-keys, authentication, billing | | Concepts | 3: spaces, teams, versions | -| Dynamic | 8: crons, database, environment-variables, functions, logs, storage, wordpress, zero-runtime | +| Dynamic | 8: crons, database, environment-variables, functions, logs, storage, wordpress, zero | | Publishing | 8: anonymous-and-claim, ci, frameworks, git, publish, recipes/html, recipes/next, wordpress-data-sources | | Reference | 3: config-file, glossary, limits | | Serving | 8: access, caching, customization, domains, routing, site-pages, stats, urls | diff --git a/content/(dynamic)/crons.mdx b/content/(dynamic)/crons.mdx index ee25e15..8440cf0 100644 --- a/content/(dynamic)/crons.mdx +++ b/content/(dynamic)/crons.mdx @@ -9,7 +9,7 @@ There's no dashboard editor for crons. Declare schedules in `sf.jsonc`, then pub ## How a run happens -A cron is a scheduled `GET` against a path on your own site. It goes through the same front door a visitor gets, so whatever serves that path answers it: a [Zero](/zero-runtime) endpoint, a [Functions](/functions) route, or a static file. +A cron is a scheduled `GET` against a path on your own site. It goes through the same front door a visitor gets, so whatever serves that path answers it: a [Zero](/zero) endpoint, a [Functions](/functions) route, or a static file. A response under 400 is a success and is silent. A response of 400 or worse, or a fatal error, is a failure and is reported. diff --git a/content/(dynamic)/database.mdx b/content/(dynamic)/database.mdx index f49b794..a26f75c 100644 --- a/content/(dynamic)/database.mdx +++ b/content/(dynamic)/database.mdx @@ -8,12 +8,12 @@ sidebar: There's no connection string for this database — your code reaches it through `ctx.db` or `env.DB`, or through a single-use SQL console when you need raw SQL. :::note[Don't have a database yet?] -For [Zero](/zero-runtime), start with `sf init --runtime zero`, or add the full [runtime block](/zero-runtime#declare-it) to `sf.jsonc`, including `kind: "zero"`, `server`, and `client` entry paths. The server file is required; Zero can generate a client shell. Publish the app before querying its live database. A [Functions](/functions#what-is-on-env) worker also gets a database through `env.DB`, but the Zero table commands do not apply to it. +For [Zero](/zero), start with `sf init --runtime zero`, or add the full [runtime block](/zero#declare-it) to `sf.jsonc`, including `kind: "zero"`, `server`, and `client` entry paths. The server file is required; Zero can generate a client shell. Publish the app before querying its live database. A [Functions](/functions#what-is-on-env) worker also gets a database through `env.DB`, but the Zero table commands do not apply to it. ::: ## What it is -Every Space that runs [Zero](/zero-runtime) gets one database, the MySQL that lives on the machine serving the site. A [Functions](/functions) worker gets one too, as `env.DB`. +Every Space that runs [Zero](/zero) gets one database, the MySQL that lives on the machine serving the site. A [Functions](/functions) worker gets one too, as `env.DB`. You do not create it, size it, or connect to it. Your capsule declares the tables. The platform applies the migration when a version finalizes. diff --git a/content/(dynamic)/functions.mdx b/content/(dynamic)/functions.mdx index 8f96dcb..1c1b57d 100644 --- a/content/(dynamic)/functions.mdx +++ b/content/(dynamic)/functions.mdx @@ -5,9 +5,9 @@ sidebar: order: 1 --- -Functions can detect a supported worker layout when you publish, without an explicit `runtime` block. Custom layouts need a declaration, and [Zero](/zero-runtime#declare-it) is always declared explicitly. +Functions can detect a supported worker layout when you publish, without an explicit `runtime` block. Custom layouts need a declaration, and [Zero](/zero#declare-it) is always declared explicitly. -Functions runs your code as a worker. Use it when you need npm packages or framework output like OpenNext Next.js. If you want live queries in the browser and a schema the platform migrates for you, use [Zero](/zero-runtime) instead. Both can call `fetch()`. One version declares one runtime. +Functions runs your code as a worker. Use it when you need npm packages or framework output like OpenNext Next.js. If you want live queries in the browser and a schema the platform migrates for you, use [Zero](/zero) instead. Both can call `fetch()`. One version declares one runtime. Functions is on for every account. diff --git a/content/(dynamic)/meta.ts b/content/(dynamic)/meta.ts index d0c68f8..02ce09b 100644 --- a/content/(dynamic)/meta.ts +++ b/content/(dynamic)/meta.ts @@ -4,5 +4,5 @@ export default defineMeta({ title: "Dynamic", collapsed: false, order: 5, - pages: ["zero-runtime", "functions", "database", "environment-variables", "crons", "object-storage", "logs", "wordpress"], + pages: ["zero", "functions", "database", "environment-variables", "crons", "object-storage", "logs", "wordpress"], }); diff --git a/content/(dynamic)/object-storage.mdx b/content/(dynamic)/object-storage.mdx index 58681a1..02135be 100644 --- a/content/(dynamic)/object-storage.mdx +++ b/content/(dynamic)/object-storage.mdx @@ -30,7 +30,7 @@ An object is addressed by a bare 32-character hexadecimal id. There is no key, n ## Upload from a capsule -The client SDK is the upload path for a [Zero](/zero-runtime) app. +The client SDK is the upload path for a [Zero](/zero) app. ```tsx client/upload.tsx import { storage } from "@spacefast/zero/client"; diff --git a/content/(dynamic)/wordpress.mdx b/content/(dynamic)/wordpress.mdx index f1f28c5..4c44021 100644 --- a/content/(dynamic)/wordpress.mdx +++ b/content/(dynamic)/wordpress.mdx @@ -5,7 +5,7 @@ description: Every Space runs a WordPress behind its static files. Run WP-CLI ag Every Space includes a WordPress install behind its published files. Reach it through `sf wp` or its published Abilities. -Your published files serve in front of WordPress, so a static Space never touches it and never pays for it. It is there because it is what makes a Space more than a bucket: [Zero](/zero-runtime) apps run on it, [Storage](/object-storage) is its media library, and [Database](/database) is its MySQL. This page covers the two ways to reach that WordPress directly. +Your published files serve in front of WordPress, so a static Space never touches it and never pays for it. It is there because it is what makes a Space more than a bucket: [Zero](/zero) apps run on it, [Storage](/object-storage) is its media library, and [Database](/database) is its MySQL. This page covers the two ways to reach that WordPress directly. ## `sf wp` diff --git a/content/(dynamic)/zero-runtime.mdx b/content/(dynamic)/zero.mdx similarity index 100% rename from content/(dynamic)/zero-runtime.mdx rename to content/(dynamic)/zero.mdx diff --git a/content/(reference)/config-file.mdx b/content/(reference)/config-file.mdx index cbc05dc..3ee4ec7 100644 --- a/content/(reference)/config-file.mdx +++ b/content/(reference)/config-file.mdx @@ -121,7 +121,7 @@ While `name` is set in the file, the API refuses to rename the Space. The file w Colors accept hex, `rgb()`, `rgba()`, `hsl()`, `hsla()`, and CSS color names. `theme` is a closed object, so an unknown key is an error. -A `theme.json` file next to `sf.jsonc` is an inference input rather than configuration. Only `settings.color.palette` and `settings.typography.fontFamilies` are read from it. A [Zero](/zero-runtime) capsule's Tailwind compile reads the same file. +A `theme.json` file next to `sf.jsonc` is an inference input rather than configuration. Only `settings.color.palette` and `settings.typography.fontFamilies` are read from it. A [Zero](/zero) capsule's Tailwind compile reads the same file. What these tokens paint, and how to replace those pages outright, is on [Layout, theme, and site pages](/site-pages). @@ -187,7 +187,7 @@ One runtime per version, discriminated on `kind`. Omit the block for a static si | `runtime.server` | string, required | none | Server entry, relative to the published directory | | `runtime.client` | string, required | none | Client entry, relative to the published directory | -Both are required. Zero is never inferred. See [Dynamic sites with Zero](/zero-runtime). +Both are required. Zero is never inferred. See [Dynamic sites with Zero](/zero). ### `kind: "functions"` diff --git a/content/(reference)/glossary.mdx b/content/(reference)/glossary.mdx index c7682bc..7a5032d 100644 --- a/content/(reference)/glossary.mdx +++ b/content/(reference)/glossary.mdx @@ -17,7 +17,7 @@ A build turns source code into publishable output. You can build locally or let ## Capsule -The compiled form of a Zero app. `sf publish` turns your TypeScript server code into a capsule, which the platform installs on the Space. See [Dynamic sites with Zero](/zero-runtime). +The compiled form of a Zero app. `sf publish` turns your TypeScript server code into a capsule, which the platform installs on the Space. See [Dynamic sites with Zero](/zero). ## Claim / claiming @@ -53,4 +53,4 @@ An immutable snapshot created when a publish produces a new version. A ready ver ## Zero -The runtime for an app with live queries and a declared database schema. One TypeScript app compiles into a [capsule](#capsule) with a MySQL database next to your code. [Functions](#functions) also provides a database, and [crons](/crons) can call either runtime or static files. See [Dynamic sites with Zero](/zero-runtime). +The runtime for an app with live queries and a declared database schema. One TypeScript app compiles into a [capsule](#capsule) with a MySQL database next to your code. [Functions](#functions) also provides a database, and [crons](/crons) can call either runtime or static files. See [Dynamic sites with Zero](/zero). diff --git a/content/(serve)/site-pages.mdx b/content/(serve)/site-pages.mdx index e7b409a..ae10836 100644 --- a/content/(serve)/site-pages.mdx +++ b/content/(serve)/site-pages.mdx @@ -59,7 +59,7 @@ A WordPress-compatible `theme.json` next to your config is read as an inference Every other WordPress key rides through and is never read. Slugs are lowercase letters, digits, and dashes, up to 64 characters. The palette takes at most 64 entries and `fontFamilies` at most 32. The file is read up to 64 KiB at publish; a larger one is ignored rather than failing the publish. -`theme.json` is the weakest of the three theme sources. What `sf.jsonc` sets under `theme` overrides it, and what the Space's [Customization](/customization) tab sets overrides both. A [Zero](/zero-runtime) capsule's Tailwind compile reads the same file, so one file styles both. +`theme.json` is the weakest of the three theme sources. What `sf.jsonc` sets under `theme` overrides it, and what the Space's [Customization](/customization) tab sets overrides both. A [Zero](/zero) capsule's Tailwind compile reads the same file, so one file styles both. ## `_layout.html` diff --git a/content/index.mdx b/content/index.mdx index 5cceb0e..62ba341 100644 --- a/content/index.mdx +++ b/content/index.mdx @@ -41,7 +41,7 @@ Publish this folder to Spacefast and give me the live URL. A **Space** holds a site and its **versions**, immutable snapshots with their own URLs. A publish with no changes can reuse the current version. The `live` channel points at the version visitors see, or is empty before the first publish. Promoting or rolling back to a retained, ready version moves that pointer without rebuilding. Preview publishes and manual promotion policies leave `live` alone. (New terms piling up? See the [glossary](/glossary).) -Static output is the default path. Point `sf publish` at a build directory and it uploads only the files that changed. If you'd rather publish source, Spacefast detects the framework and builds it. Sites that need a database, server functions, or scheduled jobs declare a [Zero runtime](/zero-runtime#declare-it) and server entry. +Static output is the default path. Point `sf publish` at a build directory and it uploads only the files that changed. If you'd rather publish source, Spacefast detects the framework and builds it. Sites that need a database, server functions, or scheduled jobs declare a [Zero runtime](/zero#declare-it) and server entry. In a self-serve account, your team owns the Spaces you claim, even when you are its only member. On [Plus](/billing#seats), you can add members who publish and roll back without sharing your login. Free and Go allow only the owner. Team roles control who can manage domains, credentials, and billing. See [Teams and members](/teams) to invite people and choose how new Spaces are shared. diff --git a/content/quickstart.mdx b/content/quickstart.mdx index 9f9819b..623a646 100644 --- a/content/quickstart.mdx +++ b/content/quickstart.mdx @@ -107,7 +107,7 @@ Working with other people? If your Space is still anonymous, [claim it first](/a Push to a remote or connect GitHub and let Spacefast build. - + Add a database, functions, and crons with the Zero runtime. diff --git a/evals.yaml b/evals.yaml index 96005bb..baa6e6a 100644 --- a/evals.yaml +++ b/evals.yaml @@ -71,7 +71,7 @@ questions: - id: zero-declare question: How do I turn on the Zero runtime for a project? expected: ["runtime.kind set to zero in sf.jsonc", "a server entry"] - routes: /zero-runtime + routes: /zero - id: routing-precedence question: If both a _redirects file and sf.jsonc rules match a path, which wins? expected: ["_redirects"] diff --git a/redirects.ts b/redirects.ts index 482c476..adf1185 100644 --- a/redirects.ts +++ b/redirects.ts @@ -60,9 +60,9 @@ export const redirects: { from: string; to: string; status: 301 }[] = [ { from: "/recipes/preview-channels", to: "/versions", status: 301 }, { from: "/recipes/redirects", to: "/routing", status: 301 }, { from: "/redirects", to: "/routing", status: 301 }, - { from: "/runtimes", to: "/zero-runtime", status: 301 }, + { from: "/runtimes", to: "/zero", status: 301 }, { from: "/runtimes/functions", to: "/functions", status: 301 }, - { from: "/runtimes/zero", to: "/zero-runtime", status: 301 }, + { from: "/runtimes/zero", to: "/zero", status: 301 }, { from: "/sdk", to: "/api/sdk", status: 301 }, { from: "/spaces/rename", to: "/spaces", status: 301 }, { from: "/versions-and-rollback", to: "/versions", status: 301 }, diff --git a/scripts/docs-experience.test.mjs b/scripts/docs-experience.test.mjs index 7ef9a37..52c4769 100644 --- a/scripts/docs-experience.test.mjs +++ b/scripts/docs-experience.test.mjs @@ -70,9 +70,9 @@ test("Database gives the Zero prerequisite before query instructions", async () const prerequisite = database.indexOf("Don't have a database yet?"); const query = database.indexOf("## Query it from code"); assert.ok(prerequisite >= 0 && query > prerequisite); - assert.match(database.slice(prerequisite, query), /\[Zero\]\(\/docs\/zero-runtime\/\)/u); + assert.match(database.slice(prerequisite, query), /\[Zero\]\(\/docs\/zero\/\)/u); assert.match(database.slice(prerequisite, query), /kind: "zero"/u); - assert.match(database.slice(prerequisite, query), /\[runtime block\]\(\/docs\/zero-runtime\/#declare-it\)/u); + assert.match(database.slice(prerequisite, query), /\[runtime block\]\(\/docs\/zero\/#declare-it\)/u); assert.match(database.slice(prerequisite, query), /`server`/u); assert.match(database.slice(prerequisite, query), /server file is required/iu); assert.match(database.slice(prerequisite, query), /sf init --runtime zero/u); diff --git a/scripts/redirect-rules.mjs b/scripts/redirect-rules.mjs index 403aec6..ac39d7e 100644 --- a/scripts/redirect-rules.mjs +++ b/scripts/redirect-rules.mjs @@ -23,12 +23,12 @@ const authoredRedirectRules = [ { from: `${deploymentBase}/apps/zero`, status: 301, - to: `${deploymentBase}/zero-runtime/`, + to: `${deploymentBase}/zero/`, }, { - from: `${deploymentBase}/zero`, + from: `${deploymentBase}/zero-runtime`, status: 301, - to: `${deploymentBase}/zero-runtime/`, + to: `${deploymentBase}/zero/`, }, { from: `${deploymentBase}/storage`, diff --git a/scripts/verify-routes.mjs b/scripts/verify-routes.mjs index acf634d..526130d 100644 --- a/scripts/verify-routes.mjs +++ b/scripts/verify-routes.mjs @@ -149,7 +149,7 @@ const representativePages = [ ["errors/index.html", `${docsRoot}/errors`, "Error reference"], ["errors/rate_limited/index.html", `${docsRoot}/errors/rate_limited`, "rate_limited"], ["recipes/vite/index.html", `${docsRoot}/recipes/vite`, "Vite"], - ["zero-runtime/index.html", `${docsRoot}/zero-runtime`, "What Zero is"], + ["zero/index.html", `${docsRoot}/zero`, "What Zero is"], ]; for (const page of representativePages) { await requirePage(...page);