@spacefast/common 0.0.24 → 0.0.26
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/brand-assets/LICENSE-Haskoy.txt +93 -0
- package/brand-assets/haskoy-latin-variable.woff2 +0 -0
- package/brand-assets/spacefast-favicon.svg +4 -4
- package/brand-assets/spacefast-sf-full-bleed.svg +3 -3
- package/brand-assets/spacefast-wordmark.svg +2 -4
- package/dist/agents/connect-targets.js +1 -1
- package/dist/agents/private-key-oauth.d.ts +0 -1
- package/dist/agents/private-key-oauth.js +46 -63
- package/dist/brand-assets-build.js +4 -6
- package/dist/brand-assets.d.ts +5 -15
- package/dist/brand-assets.js +15 -14
- package/dist/config/domains.d.ts +47 -7
- package/dist/config/domains.js +65 -10
- package/dist/contracts/access.d.ts +3 -3
- package/dist/contracts/activity.d.ts +1 -1
- package/dist/contracts/activity.js +5 -3
- package/dist/contracts/api-keys.js +2 -2
- package/dist/contracts/billing.d.ts +2 -1
- package/dist/contracts/billing.js +30 -0
- package/dist/contracts/builds.d.ts +34 -22
- package/dist/contracts/builds.js +18 -6
- package/dist/contracts/channels.js +1 -1
- package/dist/contracts/comments.d.ts +1 -1
- package/dist/contracts/common.d.ts +6 -6
- package/dist/contracts/common.js +5 -5
- package/dist/contracts/crons.d.ts +35 -0
- package/dist/contracts/crons.js +42 -0
- package/dist/contracts/device-auth.js +1 -1
- package/dist/contracts/docs.d.ts +5 -5
- package/dist/contracts/docs.js +2 -2
- package/dist/contracts/domains.d.ts +74 -63
- package/dist/contracts/domains.js +29 -2
- package/dist/contracts/enums.d.ts +3 -2
- package/dist/contracts/enums.js +10 -10
- package/dist/contracts/error-code-meta.d.ts +14 -0
- package/dist/contracts/error-code-meta.js +17 -0
- package/dist/contracts/error-codes.d.ts +1 -1
- package/dist/contracts/error-codes.js +4 -1
- package/dist/contracts/execution.d.ts +15 -12
- package/dist/contracts/execution.js +15 -12
- package/dist/contracts/feature-lifecycle.d.ts +4 -14
- package/dist/contracts/feature-lifecycle.js +0 -11
- package/dist/contracts/features.d.ts +33 -47
- package/dist/contracts/features.js +27 -20
- package/dist/contracts/functions.d.ts +169 -2
- package/dist/contracts/functions.js +160 -4
- package/dist/contracts/git.d.ts +27 -33
- package/dist/contracts/git.js +10 -11
- package/dist/contracts/grants.d.ts +2 -2
- package/dist/contracts/ids.js +2 -2
- package/dist/contracts/internal.d.ts +5 -16
- package/dist/contracts/internal.js +2 -12
- package/dist/contracts/mcp.d.ts +11 -0
- package/dist/contracts/mcp.js +5 -0
- package/dist/contracts/me.js +1 -1
- package/dist/contracts/operations.d.ts +4 -4
- package/dist/contracts/operations.js +2 -2
- package/dist/contracts/pages.d.ts +6 -6
- package/dist/contracts/plan-policy.d.ts +1 -1
- package/dist/contracts/plan-policy.js +1 -1
- package/dist/contracts/platform.d.ts +4 -4
- package/dist/contracts/publish-archive.d.ts +170 -160
- package/dist/contracts/publish-archive.js +8 -1
- package/dist/contracts/push-new.d.ts +4 -4
- package/dist/contracts/quotas.js +2 -2
- package/dist/contracts/repository-connections.d.ts +43 -30
- package/dist/contracts/repository-connections.js +11 -3
- package/dist/contracts/resources.d.ts +8 -8
- package/dist/contracts/resources.js +6 -6
- package/dist/contracts/runtime-api.d.ts +103 -56
- package/dist/contracts/runtime-api.js +67 -26
- package/dist/contracts/runtime-app.d.ts +2 -2
- package/dist/contracts/runtime-db.d.ts +6 -6
- package/dist/contracts/runtime-db.js +2 -2
- package/dist/contracts/runtime-purge.d.ts +8 -0
- package/dist/contracts/runtime-purge.js +7 -0
- package/dist/contracts/runtime-storage.d.ts +3 -2
- package/dist/contracts/runtime-storage.js +2 -1
- package/dist/contracts/sf-config-v1.d.ts +48 -10
- package/dist/contracts/space-config.d.ts +60 -3
- package/dist/contracts/space-config.js +213 -18
- package/dist/contracts/spaces.d.ts +55 -74
- package/dist/contracts/spaces.js +11 -14
- package/dist/contracts/superadmin-spaces.d.ts +9 -9
- package/dist/contracts/superadmin-teams.d.ts +2 -2
- package/dist/contracts/superadmin-tenants.d.ts +0 -6
- package/dist/contracts/superadmin-tenants.js +1 -7
- package/dist/contracts/superadmin.d.ts +135 -22
- package/dist/contracts/superadmin.js +43 -12
- package/dist/contracts/tags.d.ts +21 -21
- package/dist/contracts/tags.js +3 -3
- package/dist/contracts/teams.d.ts +14 -17
- package/dist/contracts/teams.js +6 -6
- package/dist/contracts/transfers.js +2 -2
- package/dist/contracts/variables.d.ts +4 -4
- package/dist/contracts/variables.js +3 -3
- package/dist/contracts/webhooks.d.ts +4 -4
- package/dist/contracts/zero.d.ts +15 -17
- package/dist/contracts/zero.js +12 -12
- package/dist/docs/agent-prose.d.ts +1 -1
- package/dist/docs/agent-prose.js +11 -14
- package/dist/docs/agent-setup.js +5 -2
- package/dist/docs/catalog.d.ts +7 -7
- package/dist/docs/catalog.js +7 -7
- package/dist/docs/error-docs.js +145 -133
- package/dist/docs/skills.d.ts +12 -12
- package/dist/docs/skills.js +4 -4
- package/dist/test-helpers/fetch-stub.js +1 -0
- package/dist/utils/build-settings.d.ts +5 -1
- package/dist/utils/build-settings.js +82 -10
- package/dist/utils/canonical-json.js +1 -0
- package/dist/utils/concurrency.js +1 -0
- package/dist/utils/credential-policy.js +4 -3
- package/dist/utils/dns-instructions.js +9 -9
- package/dist/utils/error-code.js +1 -0
- package/dist/utils/grant-decision.fixtures.json +2 -2
- package/dist/utils/grants.js +3 -1
- package/dist/utils/local-space-state.d.ts +8 -11
- package/dist/utils/local-space-state.js +13 -24
- package/dist/utils/one-shot-replay.d.ts +4 -1
- package/dist/utils/page-colors.d.ts +14 -12
- package/dist/utils/page-colors.js +15 -13
- package/dist/utils/page-fonts.d.ts +1 -1
- package/dist/utils/page-fonts.js +11 -18
- package/dist/utils/pages.d.ts +20 -1
- package/dist/utils/pages.js +22 -9
- package/dist/utils/publish-policy.d.ts +7 -0
- package/dist/utils/publish-policy.fixtures.json +11 -5
- package/dist/utils/publish-policy.js +9 -1
- package/dist/utils/query-keys.d.ts +4 -4
- package/dist/utils/query-keys.js +2 -2
- package/dist/utils/runtime-upload.d.ts +5 -0
- package/dist/utils/runtime-upload.js +7 -0
- package/dist/utils/secure-local-file.js +5 -16
- package/dist/utils/space-config.d.ts +1 -1
- package/dist/utils/space-config.js +3 -0
- package/dist/utils/static-runtime-policy.d.ts +9 -3
- package/dist/utils/static-runtime-policy.fixtures.json +38 -41
- package/dist/utils/static-runtime-policy.js +22 -56
- package/dist/utils/upload-session.d.ts +4 -1
- package/dist/utils/upload-session.js +33 -5
- package/dist/utils/version-path.js +1 -1
- package/dist/vocabulary.d.ts +8 -8
- package/dist/vocabulary.js +31 -20
- package/package.json +2 -17
package/dist/docs/catalog.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ export declare const DOCS_CATALOG: readonly [{
|
|
|
39
39
|
readonly kind: "guide";
|
|
40
40
|
readonly tier: "essential";
|
|
41
41
|
readonly summary: "How `sf publish` builds, uploads, and goes live.";
|
|
42
|
-
readonly keywords: readonly ["publish", "go live", "upload", "release", "
|
|
42
|
+
readonly keywords: readonly ["publish", "go live", "upload", "release", "artifact"];
|
|
43
43
|
readonly url: "https://spacefast.com/docs/publishing";
|
|
44
44
|
readonly body: "`sf publish` snapshots your output directory into an immutable version and promotes it to the production channel. Use `--no-wait` to return before serving finishes.";
|
|
45
45
|
}, {
|
|
@@ -86,7 +86,7 @@ export declare const DOCS_CATALOG: readonly [{
|
|
|
86
86
|
readonly summary: "Publish a file or zipped output folder directly to /v1/publish. No account, CLI install, or MCP setup is required for anonymous publishes.";
|
|
87
87
|
readonly keywords: readonly ["publish", "curl", "anonymous", "no install", "claim"];
|
|
88
88
|
readonly url: "https://spacefast.com/docs/agents#publish-with-curl";
|
|
89
|
-
readonly body: "curl publish
|
|
89
|
+
readonly body: "curl publish file folder archive zip anonymous no account no install live URL immutable version claim link /v1/publish";
|
|
90
90
|
}, {
|
|
91
91
|
readonly slug: "workflow/publish-receipt";
|
|
92
92
|
readonly title: "Publish receipt fields";
|
|
@@ -137,10 +137,10 @@ export declare const DOCS_CATALOG: readonly [{
|
|
|
137
137
|
readonly title: "Space file conventions";
|
|
138
138
|
readonly kind: "workflow";
|
|
139
139
|
readonly tier: "full";
|
|
140
|
-
readonly summary: "Spacefast recognizes _redirects, _headers, nearest 404.html, and sf.jsonc.
|
|
140
|
+
readonly summary: "Spacefast recognizes _redirects, _headers, nearest 404.html, and sf.jsonc. Published artifacts are served as files; server code is not executed.";
|
|
141
141
|
readonly keywords: readonly ["_redirects", "_headers", "sf.jsonc", "spacefast.jsonc", "404"];
|
|
142
142
|
readonly url: "https://spacefast.com/docs/configuration";
|
|
143
|
-
readonly body: "_redirects _headers 404.html sf.jsonc
|
|
143
|
+
readonly body: "_redirects _headers 404.html sf.jsonc artifact server code not executed proxy rewrite headers";
|
|
144
144
|
}, {
|
|
145
145
|
readonly slug: "workflow/domains-diagnostics";
|
|
146
146
|
readonly title: "Domains and DNS diagnostics";
|
|
@@ -239,7 +239,7 @@ export declare const DOCS_CATALOG: readonly [{
|
|
|
239
239
|
readonly summary: "Run code on a space with Zero or Functions.";
|
|
240
240
|
readonly keywords: readonly ["runtime", "zero", "functions", "server", "dynamic", "code", "backend", "sf.jsonc"];
|
|
241
241
|
readonly url: "https://spacefast.com/docs/runtimes";
|
|
242
|
-
readonly body: "A space serves
|
|
242
|
+
readonly body: "A space serves published files until you declare a `runtime` block in sf.jsonc. Every space has its own runtime site. Zero is a capsule with its own database and transactions; Functions is a Cloudflare worker with one `fetch` handler and any npm package. Both are available on every plan and compile during `sf publish`.";
|
|
243
243
|
}, {
|
|
244
244
|
readonly slug: "runtimes/zero";
|
|
245
245
|
readonly title: "Spacefast Zero";
|
|
@@ -284,7 +284,7 @@ export declare const DOCS_CATALOG: readonly [{
|
|
|
284
284
|
readonly summary: "Proxy selected paths to an upstream origin.";
|
|
285
285
|
readonly keywords: readonly ["proxy", "upstream", "route", "api", "backend", "rewrite"];
|
|
286
286
|
readonly url: "https://spacefast.com/docs/proxy-routes";
|
|
287
|
-
readonly body: "Forward specific path prefixes to an external upstream so a
|
|
287
|
+
readonly body: "Forward specific path prefixes to an external upstream so a space can front an external API without exposing its origin.";
|
|
288
288
|
}, {
|
|
289
289
|
readonly slug: "image-acceleration";
|
|
290
290
|
readonly title: "Image acceleration";
|
|
@@ -302,7 +302,7 @@ export declare const DOCS_CATALOG: readonly [{
|
|
|
302
302
|
readonly summary: "Build and publish a full Next.js app with OpenNext.";
|
|
303
303
|
readonly keywords: readonly ["nextjs", "next", "react", "framework", "integration", "opennext", "isr", "data cache", "revalidateTag", "revalidatePath"];
|
|
304
304
|
readonly url: "https://spacefast.com/docs/integrations/nextjs";
|
|
305
|
-
readonly body: "Run `sf publish` in a Next.js project. Spacefast builds it with pinned OpenNext and publishes the
|
|
305
|
+
readonly body: "Run `sf publish` in a Next.js project. Spacefast builds it with pinned OpenNext and publishes the browser assets plus its Functions worker. The automatic adapter keeps the Next Data Cache and tag invalidations in private origin storage scoped to the exact space and version, so cached data survives cold Worker isolates; `revalidateTag()` and `revalidatePath()` invalidate that same store. Concurrent stale ISR requests share a 30-second regeneration lease, with at most 4,096 leases active for one version. Each cached value is limited to 4 MiB; one version may retain 128 MiB, 4,096 entries, and 8,192 tags. A project with its own `open-next.config.ts` owns its adapters instead of receiving Spacefast's automatic cache config.";
|
|
306
306
|
}, {
|
|
307
307
|
readonly slug: "integrations/vite";
|
|
308
308
|
readonly title: "Vite integration";
|
package/dist/docs/catalog.js
CHANGED
|
@@ -40,7 +40,7 @@ const HAND_WRITTEN_DOCS_CATALOG = [
|
|
|
40
40
|
kind: "guide",
|
|
41
41
|
tier: "essential",
|
|
42
42
|
summary: "How `sf publish` builds, uploads, and goes live.",
|
|
43
|
-
keywords: ["publish", "go live", "upload", "release", "
|
|
43
|
+
keywords: ["publish", "go live", "upload", "release", "artifact"],
|
|
44
44
|
url: `${DOCS_BASE_URL}/publishing`,
|
|
45
45
|
body: "`sf publish` snapshots your output directory into an immutable version and promotes it to the production channel. Use `--no-wait` to return before serving finishes.",
|
|
46
46
|
},
|
|
@@ -93,7 +93,7 @@ const HAND_WRITTEN_DOCS_CATALOG = [
|
|
|
93
93
|
summary: "Publish a file or zipped output folder directly to /v1/publish. No account, CLI install, or MCP setup is required for anonymous publishes.",
|
|
94
94
|
keywords: ["publish", "curl", "anonymous", "no install", "claim"],
|
|
95
95
|
url: `${DOCS_BASE_URL}/agents#publish-with-curl`,
|
|
96
|
-
body: "curl publish
|
|
96
|
+
body: "curl publish file folder archive zip anonymous no account no install live URL immutable version claim link /v1/publish",
|
|
97
97
|
},
|
|
98
98
|
{
|
|
99
99
|
slug: "workflow/publish-receipt",
|
|
@@ -156,10 +156,10 @@ const HAND_WRITTEN_DOCS_CATALOG = [
|
|
|
156
156
|
title: "Space file conventions",
|
|
157
157
|
kind: "workflow",
|
|
158
158
|
tier: "full",
|
|
159
|
-
summary: "Spacefast recognizes _redirects, _headers, nearest 404.html, and sf.jsonc.
|
|
159
|
+
summary: "Spacefast recognizes _redirects, _headers, nearest 404.html, and sf.jsonc. Published artifacts are served as files; server code is not executed.",
|
|
160
160
|
keywords: ["_redirects", "_headers", "sf.jsonc", "spacefast.jsonc", "404"],
|
|
161
161
|
url: `${DOCS_BASE_URL}/configuration`,
|
|
162
|
-
body: "_redirects _headers 404.html sf.jsonc
|
|
162
|
+
body: "_redirects _headers 404.html sf.jsonc artifact server code not executed proxy rewrite headers",
|
|
163
163
|
},
|
|
164
164
|
{
|
|
165
165
|
slug: "workflow/domains-diagnostics",
|
|
@@ -269,7 +269,7 @@ const HAND_WRITTEN_DOCS_CATALOG = [
|
|
|
269
269
|
summary: "Run code on a space with Zero or Functions.",
|
|
270
270
|
keywords: ["runtime", "zero", "functions", "server", "dynamic", "code", "backend", "sf.jsonc"],
|
|
271
271
|
url: `${DOCS_BASE_URL}/runtimes`,
|
|
272
|
-
body: "A space serves
|
|
272
|
+
body: "A space serves published files until you declare a `runtime` block in sf.jsonc. Every space has its own runtime site. Zero is a capsule with its own database and transactions; Functions is a Cloudflare worker with one `fetch` handler and any npm package. Both are available on every plan and compile during `sf publish`.",
|
|
273
273
|
},
|
|
274
274
|
{
|
|
275
275
|
slug: "runtimes/zero",
|
|
@@ -340,7 +340,7 @@ const HAND_WRITTEN_DOCS_CATALOG = [
|
|
|
340
340
|
summary: "Proxy selected paths to an upstream origin.",
|
|
341
341
|
keywords: ["proxy", "upstream", "route", "api", "backend", "rewrite"],
|
|
342
342
|
url: `${DOCS_BASE_URL}/proxy-routes`,
|
|
343
|
-
body: "Forward specific path prefixes to an external upstream so a
|
|
343
|
+
body: "Forward specific path prefixes to an external upstream so a space can front an external API without exposing its origin.",
|
|
344
344
|
},
|
|
345
345
|
{
|
|
346
346
|
slug: "image-acceleration",
|
|
@@ -371,7 +371,7 @@ const HAND_WRITTEN_DOCS_CATALOG = [
|
|
|
371
371
|
"revalidatePath",
|
|
372
372
|
],
|
|
373
373
|
url: `${DOCS_BASE_URL}/integrations/nextjs`,
|
|
374
|
-
body: "Run `sf publish` in a Next.js project. Spacefast builds it with pinned OpenNext and publishes the
|
|
374
|
+
body: "Run `sf publish` in a Next.js project. Spacefast builds it with pinned OpenNext and publishes the browser assets plus its Functions worker. The automatic adapter keeps the Next Data Cache and tag invalidations in private origin storage scoped to the exact space and version, so cached data survives cold Worker isolates; `revalidateTag()` and `revalidatePath()` invalidate that same store. Concurrent stale ISR requests share a 30-second regeneration lease, with at most 4,096 leases active for one version. Each cached value is limited to 4 MiB; one version may retain 128 MiB, 4,096 entries, and 8,192 tags. A project with its own `open-next.config.ts` owns its adapters instead of receiving Spacefast's automatic cache config.",
|
|
375
375
|
},
|
|
376
376
|
{
|
|
377
377
|
slug: "integrations/vite",
|