@spacefast/common 0.0.26 → 0.2.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/dist/agents/connect-targets.d.ts +6 -146
- package/dist/agents/connect-targets.js +63 -295
- package/dist/agents/private-key-oauth.d.ts +31 -1
- package/dist/agents/private-key-oauth.js +124 -33
- package/dist/agents/registry/core.d.ts +292 -0
- package/dist/agents/registry/core.js +1388 -0
- package/dist/agents/registry/deeplink-probes.d.ts +23 -0
- package/dist/agents/registry/deeplink-probes.js +18 -0
- package/dist/agents/registry/node.d.ts +56 -0
- package/dist/agents/registry/node.js +339 -0
- package/dist/brand-assets-build.js +1 -2
- package/dist/brand-assets.js +4 -7
- package/dist/brand.d.ts +17 -0
- package/dist/brand.js +24 -4
- package/dist/config/domains.d.ts +55 -28
- package/dist/config/domains.js +85 -41
- package/dist/config/index.js +1 -2
- package/dist/contracts/abuse.js +9 -24
- package/dist/contracts/access-profiles.d.ts +86 -0
- package/dist/contracts/access-profiles.js +89 -0
- package/dist/contracts/access.d.ts +21 -27
- package/dist/contracts/access.js +33 -64
- package/dist/contracts/activity.d.ts +18 -1
- package/dist/contracts/activity.js +70 -26
- package/dist/contracts/analytics.js +8 -10
- package/dist/contracts/api-keys.d.ts +77 -52
- package/dist/contracts/api-keys.js +44 -24
- package/dist/contracts/application-journal.d.ts +216 -0
- package/dist/contracts/application-journal.js +167 -0
- package/dist/contracts/auth.d.ts +90 -17
- package/dist/contracts/auth.js +86 -17
- package/dist/contracts/beta.d.ts +9 -4
- package/dist/contracts/beta.js +20 -16
- package/dist/contracts/billing.js +7 -11
- package/dist/contracts/bootstrap.d.ts +791 -0
- package/dist/contracts/bootstrap.js +51 -0
- package/dist/contracts/builds.d.ts +186 -7
- package/dist/contracts/builds.js +75 -21
- package/dist/contracts/channels.d.ts +43 -0
- package/dist/contracts/channels.js +25 -9
- package/dist/contracts/cli.d.ts +7 -0
- package/dist/contracts/cli.js +6 -0
- package/dist/contracts/collab-public.d.ts +1 -1
- package/dist/contracts/collab-public.js +5 -8
- package/dist/contracts/comments.d.ts +45 -35
- package/dist/contracts/comments.js +107 -77
- package/dist/contracts/commerce.d.ts +165 -0
- package/dist/contracts/commerce.js +146 -0
- package/dist/contracts/common.d.ts +3 -3
- package/dist/contracts/common.js +18 -29
- package/dist/contracts/content-contract-verification.d.ts +521 -0
- package/dist/contracts/content-contract-verification.js +320 -0
- package/dist/contracts/content-platform-fixture.d.ts +1278 -0
- package/dist/contracts/content-platform-fixture.js +44 -0
- package/dist/contracts/content-program.d.ts +994 -0
- package/dist/contracts/content-program.js +658 -0
- package/dist/contracts/content-sync.d.ts +290 -0
- package/dist/contracts/content-sync.js +167 -0
- package/dist/contracts/content.d.ts +432 -0
- package/dist/contracts/content.js +303 -0
- package/dist/contracts/continuation.d.ts +17 -1
- package/dist/contracts/continuation.js +23 -23
- package/dist/contracts/countries.js +3 -4
- package/dist/contracts/crons.d.ts +17 -0
- package/dist/contracts/crons.js +33 -15
- package/dist/contracts/dashboard-prefs.d.ts +56 -0
- package/dist/contracts/dashboard-prefs.js +51 -0
- package/dist/contracts/device-auth.d.ts +234 -37
- package/dist/contracts/device-auth.js +267 -53
- package/dist/contracts/docs.d.ts +6 -10
- package/dist/contracts/docs.js +5 -13
- package/dist/contracts/domains.d.ts +499 -102
- package/dist/contracts/domains.js +169 -58
- package/dist/contracts/email-preferences.d.ts +3 -3
- package/dist/contracts/email-preferences.js +6 -7
- package/dist/contracts/enums.d.ts +26 -26
- package/dist/contracts/enums.js +61 -54
- package/dist/contracts/error-code-meta.d.ts +269 -7
- package/dist/contracts/error-code-meta.js +80 -5
- package/dist/contracts/error-codes.d.ts +5 -5
- package/dist/contracts/error-codes.js +78 -16
- package/dist/contracts/events.d.ts +100 -20
- package/dist/contracts/events.js +107 -20
- package/dist/contracts/execution.d.ts +47 -66
- package/dist/contracts/execution.js +51 -64
- package/dist/contracts/feature-lifecycle.d.ts +70 -14
- package/dist/contracts/feature-lifecycle.js +86 -15
- package/dist/contracts/features.d.ts +100 -37
- package/dist/contracts/features.js +21 -27
- package/dist/contracts/fixtures/content-platform-v1.json +1108 -0
- package/dist/contracts/frame-session.d.ts +192 -0
- package/dist/contracts/frame-session.js +164 -0
- package/dist/contracts/functions.d.ts +218 -211
- package/dist/contracts/functions.js +273 -260
- package/dist/contracts/grant-copy.d.ts +43 -0
- package/dist/contracts/grant-copy.js +44 -0
- package/dist/contracts/grants.d.ts +64 -56
- package/dist/contracts/grants.js +124 -23
- package/dist/contracts/ids.d.ts +4 -1
- package/dist/contracts/ids.js +4 -1
- package/dist/contracts/internal.d.ts +5 -4
- package/dist/contracts/internal.js +12 -3
- package/dist/contracts/mcp.d.ts +17 -0
- package/dist/contracts/mcp.js +23 -0
- package/dist/contracts/me.d.ts +6 -1
- package/dist/contracts/me.js +12 -6
- package/dist/contracts/notifications.d.ts +27 -29
- package/dist/contracts/notifications.js +9 -4
- package/dist/contracts/oauth-resources.d.ts +112 -10
- package/dist/contracts/oauth-resources.js +116 -11
- package/dist/contracts/oauth-scope-actions.d.ts +90 -0
- package/dist/contracts/oauth-scope-actions.js +126 -0
- package/dist/contracts/operations.d.ts +27 -4
- package/dist/contracts/operations.js +11 -5
- package/dist/contracts/pages.d.ts +29 -5
- package/dist/contracts/pages.js +22 -5
- package/dist/contracts/partner-notifications.d.ts +3 -0
- package/dist/contracts/partner-notifications.js +65 -0
- package/dist/contracts/{platform.d.ts → partner.d.ts} +29 -42
- package/dist/contracts/{platform.js → partner.js} +27 -40
- package/dist/contracts/plan-policy.d.ts +1 -1
- package/dist/contracts/principal-assertion.d.ts +43 -0
- package/dist/contracts/principal-assertion.js +67 -0
- package/dist/contracts/principals.d.ts +73 -0
- package/dist/contracts/principals.js +59 -0
- package/dist/contracts/privacy.d.ts +11 -0
- package/dist/contracts/privacy.js +17 -0
- package/dist/contracts/problem-document.js +3 -4
- package/dist/contracts/publish-archive.d.ts +116 -18
- package/dist/contracts/publish-archive.js +6 -3
- package/dist/contracts/push-new.d.ts +4 -4
- package/dist/contracts/quotas.js +3 -3
- package/dist/contracts/realtime.d.ts +52 -0
- package/dist/contracts/realtime.js +54 -0
- package/dist/contracts/repository-connections.d.ts +1 -1
- package/dist/contracts/repository-connections.js +6 -2
- package/dist/contracts/resources.d.ts +105 -14
- package/dist/contracts/resources.js +145 -21
- package/dist/contracts/route-inventory.d.ts +358 -0
- package/dist/contracts/route-inventory.js +141 -0
- package/dist/contracts/runtime-api.d.ts +112 -35
- package/dist/contracts/runtime-api.js +86 -66
- package/dist/contracts/runtime-app.d.ts +11 -21
- package/dist/contracts/runtime-app.js +39 -24
- package/dist/contracts/runtime-components.d.ts +143 -0
- package/dist/contracts/runtime-components.js +199 -0
- package/dist/contracts/runtime-db.d.ts +45 -19
- package/dist/contracts/runtime-db.js +85 -20
- package/dist/contracts/runtime-purge.js +3 -5
- package/dist/contracts/runtime-services.d.ts +43 -75
- package/dist/contracts/runtime-services.js +29 -49
- package/dist/contracts/runtime-storage.d.ts +14 -14
- package/dist/contracts/runtime-storage.js +28 -13
- package/dist/contracts/sf-config-v1.d.ts +14 -18
- package/dist/contracts/slugs.js +13 -4
- package/dist/contracts/space-config.d.ts +235 -28
- package/dist/contracts/space-config.js +246 -91
- package/dist/contracts/spaces.d.ts +360 -255
- package/dist/contracts/spaces.js +190 -122
- package/dist/contracts/superadmin-activity.d.ts +3 -43
- package/dist/contracts/superadmin-activity.js +6 -30
- package/dist/contracts/superadmin-emails.d.ts +1 -0
- package/dist/contracts/superadmin-emails.js +17 -1
- package/dist/contracts/superadmin-runtime.d.ts +199 -0
- package/dist/contracts/superadmin-runtime.js +141 -0
- package/dist/contracts/superadmin-search.d.ts +22 -2
- package/dist/contracts/superadmin-search.js +14 -6
- package/dist/contracts/superadmin-spaces.d.ts +435 -186
- package/dist/contracts/superadmin-spaces.js +131 -25
- package/dist/contracts/superadmin-teams.d.ts +3 -0
- package/dist/contracts/superadmin-teams.js +1 -2
- package/dist/contracts/superadmin-tenants.d.ts +627 -6
- package/dist/contracts/superadmin-tenants.js +32 -7
- package/dist/contracts/superadmin.d.ts +98 -16
- package/dist/contracts/superadmin.js +63 -10
- package/dist/contracts/tags.d.ts +85 -58
- package/dist/contracts/tags.js +44 -34
- package/dist/contracts/teams.d.ts +72 -9
- package/dist/contracts/teams.js +84 -25
- package/dist/contracts/tenants.d.ts +135 -0
- package/dist/contracts/tenants.js +120 -0
- package/dist/contracts/test-triggers.d.ts +70 -0
- package/dist/contracts/test-triggers.js +116 -0
- package/dist/contracts/theme-json.js +3 -8
- package/dist/contracts/transfers.d.ts +1 -0
- package/dist/contracts/transfers.js +1 -0
- package/dist/contracts/usage.d.ts +209 -0
- package/dist/contracts/usage.js +124 -12
- package/dist/contracts/variables.d.ts +2 -2
- package/dist/contracts/variables.js +9 -13
- package/dist/contracts/webhooks.d.ts +13 -5
- package/dist/contracts/webhooks.js +3 -1
- package/dist/contracts/zero.d.ts +57 -64
- package/dist/contracts/zero.js +68 -66
- package/dist/dashboard-paths/index.d.ts +24 -21
- package/dist/dashboard-paths/index.js +35 -47
- package/dist/dashboard-paths/route-reservations.generated.d.ts +2 -0
- package/dist/dashboard-paths/route-reservations.generated.js +36 -0
- package/dist/docs/agent-arrival.d.ts +92 -0
- package/dist/docs/agent-arrival.js +227 -0
- package/dist/docs/agent-output-policy.d.ts +6 -0
- package/dist/docs/agent-output-policy.js +22 -0
- package/dist/docs/agent-prose.d.ts +11 -17
- package/dist/docs/agent-prose.js +62 -37
- package/dist/docs/agent-setup.d.ts +72 -41
- package/dist/docs/agent-setup.js +336 -436
- package/dist/docs/catalog.d.ts +147 -89
- package/dist/docs/catalog.js +157 -42
- package/dist/docs/error-docs.d.ts +2098 -1
- package/dist/docs/error-docs.js +281 -16
- package/dist/docs/index-build.d.ts +0 -1
- package/dist/docs/index-build.js +2 -3
- package/dist/docs/page-context-prompt.d.ts +77 -0
- package/dist/docs/page-context-prompt.js +131 -0
- package/dist/docs/reference-urls.d.ts +46 -0
- package/dist/docs/reference-urls.js +79 -0
- package/dist/docs/search.d.ts +6 -8
- package/dist/docs/search.js +10 -13
- package/dist/docs/skill-distribution.d.ts +4 -1
- package/dist/docs/skill-distribution.js +10 -5
- package/dist/docs/skills.d.ts +117 -117
- package/dist/docs/skills.js +120 -72
- package/dist/docs/start-prompts.d.ts +45 -0
- package/dist/docs/start-prompts.js +62 -0
- package/dist/domain-exploration.js +9 -13
- package/dist/og-template.d.ts +56 -0
- package/dist/og-template.js +56 -0
- package/dist/slug-policy/index.js +5 -11
- package/dist/utils/browser-credential.d.ts +13 -6
- package/dist/utils/browser-credential.js +14 -7
- package/dist/utils/build-settings.d.ts +16 -0
- package/dist/utils/build-settings.js +63 -17
- package/dist/utils/canonical-json.d.ts +3 -5
- package/dist/utils/canonical-json.js +3 -5
- package/dist/utils/cast-transport.d.ts +5 -17
- package/dist/utils/cast-transport.js +6 -19
- package/dist/utils/claim-token.js +1 -2
- package/dist/utils/comment-avatars.js +4 -6
- package/dist/utils/concurrency.js +2 -3
- package/dist/utils/content-type.d.ts +7 -6
- package/dist/utils/content-type.js +73 -51
- package/dist/utils/credential-policy.d.ts +50 -6
- package/dist/utils/credential-policy.js +123 -57
- package/dist/utils/egress-policy.fixtures.json +1 -1
- package/dist/utils/generate-space-name.d.ts +3 -8
- package/dist/utils/generate-space-name.js +3 -8
- package/dist/utils/grants.d.ts +0 -1
- package/dist/utils/grants.js +4 -7
- package/dist/utils/gravatar.d.ts +2 -4
- package/dist/utils/gravatar.js +6 -12
- package/dist/utils/id-hints.js +14 -23
- package/dist/utils/idempotency.d.ts +3 -3
- package/dist/utils/idempotency.js +6 -7
- package/dist/utils/local-space-state.d.ts +15 -15
- package/dist/utils/local-space-state.js +34 -23
- package/dist/utils/oauth-signed-query.d.ts +3 -5
- package/dist/utils/oauth-signed-query.js +6 -9
- package/dist/utils/one-shot-replay.d.ts +3 -5
- package/dist/utils/one-shot-replay.js +3 -5
- package/dist/utils/page-colors.d.ts +4 -10
- package/dist/utils/page-colors.js +11 -35
- package/dist/utils/page-fonts.js +6 -11
- package/dist/utils/page-preview.d.ts +0 -1
- package/dist/utils/page-preview.js +0 -1
- package/dist/utils/pages.d.ts +22 -11
- package/dist/utils/pages.js +70 -30
- package/dist/utils/privacy-regions.d.ts +19 -0
- package/dist/utils/privacy-regions.js +91 -0
- package/dist/utils/publish-form-data.d.ts +4 -5
- package/dist/utils/publish-form-data.js +2 -3
- package/dist/utils/publish-policy.d.ts +10 -23
- package/dist/utils/publish-policy.js +63 -116
- package/dist/utils/query-client.d.ts +2 -0
- package/dist/utils/query-client.js +10 -1
- package/dist/utils/runtime-paths.d.ts +4 -4
- package/dist/utils/runtime-paths.js +6 -8
- package/dist/utils/runtime-upload.d.ts +4 -0
- package/dist/utils/runtime-upload.js +5 -0
- package/dist/utils/secure-local-file.d.ts +3 -3
- package/dist/utils/secure-local-file.js +18 -24
- package/dist/utils/space-config.d.ts +11 -14
- package/dist/utils/space-config.js +10 -16
- package/dist/utils/static-runtime-policy.d.ts +5 -8
- package/dist/utils/static-runtime-policy.generated.d.ts +16 -0
- package/dist/utils/static-runtime-policy.generated.js +70 -0
- package/dist/utils/static-runtime-policy.js +17 -84
- package/dist/utils/storage-policy.js +1 -2
- package/dist/utils/upload-session.js +8 -14
- package/dist/utils/version-path.js +11 -19
- package/dist/utils/wpcom-auth-redirects.d.ts +5 -14
- package/dist/utils/wpcom-auth-redirects.js +1 -4
- package/dist/vocabulary.d.ts +7 -7
- package/dist/vocabulary.js +30 -16
- package/package.json +14 -2
- package/dist/agents/client-registry.d.ts +0 -22
- package/dist/agents/client-registry.js +0 -41
- package/dist/docs/agent-handoff-document.d.ts +0 -15
- package/dist/docs/agent-handoff-document.js +0 -180
- package/dist/docs/agent-solutions.d.ts +0 -110
- package/dist/docs/agent-solutions.js +0 -183
- package/dist/utils/query-keys.d.ts +0 -84
- package/dist/utils/query-keys.js +0 -108
|
@@ -6,19 +6,17 @@ export declare const SF_CONFIG_V1_SCHEMA_URL: `${string}/schemas/sf.v1.json`;
|
|
|
6
6
|
/**
|
|
7
7
|
* How a redirect answers. Omitting it means 302. There is no 200 and no 404:
|
|
8
8
|
* a rule that serves other content under the requested URL is a `rewrites`
|
|
9
|
-
* entry
|
|
9
|
+
* entry, with `notFound: true` when it should answer 404.
|
|
10
10
|
*/
|
|
11
11
|
export type SfConfigV1RedirectStatus = 301 | 302 | 303 | 307 | 308;
|
|
12
12
|
/**
|
|
13
13
|
* Query parameters a redirect or rewrite requires, as parameter name to
|
|
14
|
-
* capture name
|
|
15
|
-
* spelled the way the compiled rule (and the runtime matcher) carry it.
|
|
14
|
+
* capture name. `{ id: "id" }` is the `id=:id` token of a `_redirects` line.
|
|
16
15
|
*/
|
|
17
16
|
export type SfConfigV1QueryMatch = Record<string, string>;
|
|
18
17
|
/**
|
|
19
18
|
* One header operation: `{ key, value }` sets, `{ key, remove: true }` is the
|
|
20
|
-
* `!Name` line of a `_headers` block.
|
|
21
|
-
* so a remove entry carries no value.
|
|
19
|
+
* `!Name` line of a `_headers` block. A remove entry carries no value.
|
|
22
20
|
*/
|
|
23
21
|
export type SfConfigV1HeaderEntry = {
|
|
24
22
|
key: string;
|
|
@@ -53,30 +51,29 @@ export type SfConfigV1 = {
|
|
|
53
51
|
source: string;
|
|
54
52
|
destination: string;
|
|
55
53
|
status?: SfConfigV1RedirectStatus;
|
|
56
|
-
/** Answer even when the request path resolves to a committed file
|
|
54
|
+
/** Answer even when the request path resolves to a committed file, the `!` of a `_redirects` rule. */
|
|
57
55
|
force?: boolean;
|
|
58
56
|
query?: SfConfigV1QueryMatch;
|
|
59
57
|
}[];
|
|
60
58
|
/**
|
|
61
59
|
* Rewrite and proxy rules: the URL stays, the content comes from the
|
|
62
|
-
* destination. A path destination rewrites, an absolute URL proxies
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* status; its destination must be a path.
|
|
60
|
+
* destination. A path destination rewrites, an absolute URL proxies. Both are
|
|
61
|
+
* the `/from /to 200` rule of `_redirects`, so they carry no status of their
|
|
62
|
+
* own. `notFound: true` answers 404 instead, and then the destination must be
|
|
63
|
+
* a path.
|
|
67
64
|
*/
|
|
68
65
|
rewrites?: {
|
|
69
66
|
source: string;
|
|
70
67
|
destination: string;
|
|
71
68
|
/** Let shared caches store the proxy response. Absolute-URL destinations only. */
|
|
72
69
|
cache?: "shared";
|
|
73
|
-
/** Rewrite even when the request path resolves to a committed file
|
|
70
|
+
/** Rewrite even when the request path resolves to a committed file, the `!` of a `200!` / `404!` file rule. */
|
|
74
71
|
force?: boolean;
|
|
75
72
|
query?: SfConfigV1QueryMatch;
|
|
76
73
|
notFound?: boolean;
|
|
77
74
|
}[];
|
|
78
75
|
/**
|
|
79
|
-
* Response headers to set
|
|
76
|
+
* Response headers to set or remove on matching requests. Headers are a
|
|
80
77
|
* list, not a map, so repeated names (Set-Cookie) survive and operations
|
|
81
78
|
* keep their order.
|
|
82
79
|
*/
|
|
@@ -96,9 +93,9 @@ export type SfConfigV1 = {
|
|
|
96
93
|
public: string[];
|
|
97
94
|
};
|
|
98
95
|
/**
|
|
99
|
-
* Scheduled requests against this space's own paths.
|
|
100
|
-
*
|
|
101
|
-
*
|
|
96
|
+
* Scheduled requests against this space's own paths. The compiled
|
|
97
|
+
* `__spacefast/crons.json` derives each entry's key from its path; the
|
|
98
|
+
* schedule is never normalized.
|
|
102
99
|
*/
|
|
103
100
|
crons?: {
|
|
104
101
|
path: string;
|
|
@@ -130,8 +127,7 @@ export type EffectiveConfigV1 = {
|
|
|
130
127
|
};
|
|
131
128
|
/**
|
|
132
129
|
* Config-shape problems use the `config_*` codes; a bad routing rule reports
|
|
133
|
-
* the same code the `_redirects` / `_headers` compiler would give it
|
|
134
|
-
* it is the same grammar and the same compiler.
|
|
130
|
+
* the same code the `_redirects` / `_headers` compiler would give it.
|
|
135
131
|
*/
|
|
136
132
|
export type SfConfigV1Issue = {
|
|
137
133
|
code: "config_alias" | "config_conflict" | "config_cron_duplicate_path" | "config_cron_invalid_path" | "config_cron_invalid_schedule" | "config_cron_too_many" | "config_identity_moved" | "config_invalid" | "config_key_removed" | "config_unknown_key" | "header_basic_auth_unsupported" | "header_cache_control_platform_managed" | "header_cdn_cache_unsupported" | "header_name_invalid" | "header_name_unsupported" | "header_path_invalid" | "header_pattern_invalid" | "header_port_unsupported" | "header_value_invalid" | "redirect_cache_directive_invalid" | "redirect_cache_not_proxy" | "redirect_destination_invalid" | "redirect_destination_missing" | "redirect_host_invalid" | "redirect_loop_invalid" | "redirect_pattern_invalid" | "redirect_query_match_invalid" | "redirect_rewrite_destination_invalid" | "redirect_source_invalid" | "redirect_status_unsupported" | "redirect_status_use_rewrites" | "serve_index_required" | "template_syntax_retired";
|
package/dist/contracts/slugs.js
CHANGED
|
@@ -2,10 +2,19 @@ import { z } from "zod";
|
|
|
2
2
|
export const slugResourceKindValues = ["team", "space"];
|
|
3
3
|
export const slugResourceKind = z.enum(slugResourceKindValues);
|
|
4
4
|
export const slugAvailabilityQuerySchema = z.object({
|
|
5
|
-
kind: slugResourceKind,
|
|
6
|
-
slug: z
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
kind: slugResourceKind.describe("Which kind of slug to check: a space slug or a team slug."),
|
|
6
|
+
slug: z
|
|
7
|
+
.string()
|
|
8
|
+
.default("")
|
|
9
|
+
.describe("Slug to check. It is normalized first, and the verdict describes the normalized form."),
|
|
10
|
+
currentSlug: z
|
|
11
|
+
.string()
|
|
12
|
+
.optional()
|
|
13
|
+
.describe("The resource's current slug, when renaming. A slug that normalizes to this one stays available instead of colliding with itself."),
|
|
14
|
+
teamId: z
|
|
15
|
+
.string()
|
|
16
|
+
.optional()
|
|
17
|
+
.describe("Team the space would belong to. Space slugs and their managed hostnames are checked inside that team; ignored for `kind=team`."),
|
|
9
18
|
});
|
|
10
19
|
export const slugAvailabilityResponseSchema = z.object({
|
|
11
20
|
kind: slugResourceKind.describe("Resource kind the slug was checked for."),
|
|
@@ -3,10 +3,9 @@ export declare const SPACE_CONFIG_CANONICAL_FILE = "sf.jsonc";
|
|
|
3
3
|
export declare const SPACE_CONFIG_ALIAS_FILES: readonly ["spacefast.jsonc", "spacefast.json", "sf.json", ".sf/sf.json", ".sf/config.jsonc", ".sf/config.json"];
|
|
4
4
|
export declare const SPACE_CONFIG_ACCEPTED_FILES: readonly ["sf.jsonc", "spacefast.jsonc", "spacefast.json", "sf.json", ".sf/sf.json", ".sf/config.jsonc", ".sf/config.json"];
|
|
5
5
|
/**
|
|
6
|
-
* Accepted config filenames in read precedence order, highest first.
|
|
7
|
-
* step with the finalizer's `CONFIG_ACCEPTED_FILES`
|
|
8
|
-
* protocol.rs)
|
|
9
|
-
* read choosing a different file than the publish serves is a split brain.
|
|
6
|
+
* Accepted config filenames in read precedence order, highest first. Must stay
|
|
7
|
+
* in step with the finalizer's `CONFIG_ACCEPTED_FILES`
|
|
8
|
+
* (crates/stattic-runtime-core protocol.rs), which is the selection authority.
|
|
10
9
|
*/
|
|
11
10
|
export declare const SPACE_CONFIG_PRECEDENCE: readonly ["sf.jsonc", "spacefast.jsonc", "spacefast.json", "sf.json", ".sf/sf.json", ".sf/config.jsonc", ".sf/config.json"];
|
|
12
11
|
export declare const SPACE_CONFIG_PRIVATE_FILES: readonly ["sf.jsonc", "spacefast.jsonc", "spacefast.json", "sf.json", ".sf/sf.json", ".sf/config.jsonc", ".sf/config.json"];
|
|
@@ -39,6 +38,38 @@ export declare const SPACE_CONFIG_CAPS: {
|
|
|
39
38
|
readonly crons: 8;
|
|
40
39
|
/** Max `crons[].path` length. */
|
|
41
40
|
readonly cronPathChars: 512;
|
|
41
|
+
/** Max `system.presentation.name` display-name length. */
|
|
42
|
+
readonly systemNameChars: 255;
|
|
43
|
+
/** Max length of any https URL or origin in the `system` manifest. */
|
|
44
|
+
readonly systemUrlChars: 2048;
|
|
45
|
+
/** Max `system.hostnames.apex` length (a DNS name never exceeds 253). */
|
|
46
|
+
readonly systemHostnameChars: 253;
|
|
47
|
+
/** Max `system.presentation.contacts` entries. */
|
|
48
|
+
readonly systemContacts: 32;
|
|
49
|
+
/** Max length of a `system.presentation.contacts` key. */
|
|
50
|
+
readonly systemContactKeyChars: 64;
|
|
51
|
+
/** Max length of a `system.presentation.contacts` value. */
|
|
52
|
+
readonly systemContactValueChars: 2048;
|
|
53
|
+
/** Max `system.api.allowedOrigins` entries. */
|
|
54
|
+
readonly systemApiAllowedOrigins: 32;
|
|
55
|
+
/** Max `system.tokenIssuers` entries. */
|
|
56
|
+
readonly systemTokenIssuers: 16;
|
|
57
|
+
/** Max `system.tokenIssuers[].issuer` length. */
|
|
58
|
+
readonly systemIssuerChars: 512;
|
|
59
|
+
/** Max `system.tokenIssuers[].keys` entries. */
|
|
60
|
+
readonly systemIssuerKeys: 16;
|
|
61
|
+
/** Max `system.tokenIssuers[].keys[].kid` length. */
|
|
62
|
+
readonly systemKeyIdChars: 64;
|
|
63
|
+
/** Exact raw Ed25519 public-key length after base64url encoding. */
|
|
64
|
+
readonly systemPublicKeyChars: 43;
|
|
65
|
+
/** Max `system.tokenIssuers[].proof` length. */
|
|
66
|
+
readonly systemProofChars: 4096;
|
|
67
|
+
/** Max `system.subscriptions` entries. */
|
|
68
|
+
readonly systemSubscriptions: 32;
|
|
69
|
+
/** Max `system.subscriptions[].events` entries. */
|
|
70
|
+
readonly systemSubscriptionEvents: 64;
|
|
71
|
+
/** Max length of a `system.subscriptions[].events` name. */
|
|
72
|
+
readonly systemEventChars: 128;
|
|
42
73
|
};
|
|
43
74
|
/** Published JSON Schema URL for `sf.jsonc` ($schema autocomplete). */
|
|
44
75
|
export declare const SPACE_CONFIG_SCHEMA_URL: string;
|
|
@@ -172,10 +203,10 @@ export declare const spaceConfigFileAccessSchema: z.ZodUnion<readonly [z.ZodPipe
|
|
|
172
203
|
/**
|
|
173
204
|
* Zero: a transactional app with its own database.
|
|
174
205
|
*
|
|
175
|
-
* Both entries are required because Zero is never inferred
|
|
176
|
-
* a database must not spring into existence from a directory shape
|
|
177
|
-
*
|
|
178
|
-
*
|
|
206
|
+
* Both entries are required because Zero is never inferred: a runtime that owns
|
|
207
|
+
* a database must not spring into existence from a directory shape. Once
|
|
208
|
+
* declared, a server or client that cannot be resolved fails the publish rather
|
|
209
|
+
* than degrading to static files.
|
|
179
210
|
*/
|
|
180
211
|
export declare const spaceRuntimeZeroSchema: z.ZodObject<{
|
|
181
212
|
kind: z.ZodLiteral<"zero">;
|
|
@@ -186,10 +217,8 @@ export declare const spaceRuntimeZeroSchema: z.ZodObject<{
|
|
|
186
217
|
* Functions: the worker `sf publish` compiles.
|
|
187
218
|
*
|
|
188
219
|
* Every field beyond `kind` is optional because the normal case is detection: a
|
|
189
|
-
* project with `handler.ts` or an OpenNext build needs no configuration
|
|
190
|
-
*
|
|
191
|
-
* unusual, or a compatibility date the author wants pinned rather than
|
|
192
|
-
* defaulted.
|
|
220
|
+
* project with `handler.ts` or an OpenNext build needs no configuration. These
|
|
221
|
+
* exist for the layouts detection cannot guess.
|
|
193
222
|
*/
|
|
194
223
|
export declare const spaceRuntimeFunctionsSchema: z.ZodObject<{
|
|
195
224
|
kind: z.ZodLiteral<"functions">;
|
|
@@ -199,12 +228,12 @@ export declare const spaceRuntimeFunctionsSchema: z.ZodObject<{
|
|
|
199
228
|
compatibilityDate: z.ZodOptional<z.ZodString>;
|
|
200
229
|
}, z.core.$strip>;
|
|
201
230
|
/**
|
|
202
|
-
* The one runtime declaration, discriminated on `kind`.
|
|
231
|
+
* The one runtime declaration, discriminated on `kind`. A version cannot
|
|
232
|
+
* express two runtimes at once.
|
|
203
233
|
*
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
*
|
|
207
|
-
* back with the version instead of being set through the API config overlay.
|
|
234
|
+
* File-only on purpose: a runtime is a fact about the content of a version, so
|
|
235
|
+
* it rolls forward and back with the version instead of being set through the
|
|
236
|
+
* API config overlay.
|
|
208
237
|
*/
|
|
209
238
|
export declare const spaceRuntimeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
210
239
|
kind: z.ZodLiteral<"zero">;
|
|
@@ -222,11 +251,7 @@ export type SpaceRuntimeFunctionsConfig = z.infer<typeof spaceRuntimeFunctionsSc
|
|
|
222
251
|
export type SpaceRuntimeConfig = z.infer<typeof spaceRuntimeSchema>;
|
|
223
252
|
/**
|
|
224
253
|
* Scheduled requests: the provider crontab asks this space for these paths on
|
|
225
|
-
* these schedules.
|
|
226
|
-
*
|
|
227
|
-
* File-only for the same reason `runtime` is: what runs on a schedule is a fact
|
|
228
|
-
* about the content of a version, so it rolls forward and back with the version
|
|
229
|
-
* instead of being set through the API config overlay.
|
|
254
|
+
* these schedules. File-only for the same reason `runtime` is.
|
|
230
255
|
*
|
|
231
256
|
* The Rust config compiler is the selection authority for both fields; this
|
|
232
257
|
* schema exists so an editor and an agent get the same answer before publish.
|
|
@@ -234,14 +259,14 @@ export type SpaceRuntimeConfig = z.infer<typeof spaceRuntimeSchema>;
|
|
|
234
259
|
export declare const SPACE_CRON_NAMED_SCHEDULES: readonly ["hourly", "daily", "twicedaily", "weekly"];
|
|
235
260
|
/**
|
|
236
261
|
* The wp.cloud schedule grammar: a named interval, an `Nh`/`Nd`/`Nw` count, or
|
|
237
|
-
* a five-field crontab expression. No `@daily` macros and no month/day names
|
|
238
|
-
*
|
|
262
|
+
* a five-field crontab expression. No `@daily` macros and no month/day names.
|
|
263
|
+
* The provider does not accept them either.
|
|
239
264
|
*/
|
|
240
265
|
export declare function isSpaceCronSchedule(schedule: string): boolean;
|
|
241
266
|
/**
|
|
242
|
-
* The artifact key for a cron path
|
|
243
|
-
*
|
|
244
|
-
*
|
|
267
|
+
* The artifact key for a cron path — the shared slug normalizer, so an accented
|
|
268
|
+
* path folds the same way it does everywhere else. Two paths that produce one
|
|
269
|
+
* key are rejected, so a key names exactly one schedule.
|
|
245
270
|
*/
|
|
246
271
|
export declare function spaceCronKey(path: string): string;
|
|
247
272
|
/** Generated runtime file the serving engine reads, written only when a version declares a cron. */
|
|
@@ -252,7 +277,7 @@ export type SpaceCronEntry = {
|
|
|
252
277
|
/** Slug of `path`; unique within a version. */
|
|
253
278
|
key: string;
|
|
254
279
|
path: string;
|
|
255
|
-
/** Verbatim as declared
|
|
280
|
+
/** Verbatim as declared, never normalized or expanded. */
|
|
256
281
|
schedule: string;
|
|
257
282
|
};
|
|
258
283
|
export type SpaceCronsArtifact = {
|
|
@@ -268,6 +293,123 @@ export declare const spaceCronsSchema: z.ZodArray<z.ZodObject<{
|
|
|
268
293
|
schedule: z.ZodString;
|
|
269
294
|
}, z.core.$strip>>;
|
|
270
295
|
export type SpaceCronConfig = z.infer<typeof spaceCronSchema>;
|
|
296
|
+
export declare const systemPresentationSchema: z.ZodObject<{
|
|
297
|
+
name: z.ZodOptional<z.ZodString>;
|
|
298
|
+
logo: z.ZodOptional<z.ZodString>;
|
|
299
|
+
supportUrl: z.ZodOptional<z.ZodString>;
|
|
300
|
+
claimOrigin: z.ZodOptional<z.ZodString>;
|
|
301
|
+
accessHandoffOrigin: z.ZodOptional<z.ZodString>;
|
|
302
|
+
problemDocsBaseUrl: z.ZodOptional<z.ZodString>;
|
|
303
|
+
contacts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
304
|
+
}, z.core.$strict>;
|
|
305
|
+
export declare const systemHostnamesSchema: z.ZodObject<{
|
|
306
|
+
apex: z.ZodOptional<z.ZodString>;
|
|
307
|
+
}, z.core.$strict>;
|
|
308
|
+
export declare const systemApiSchema: z.ZodObject<{
|
|
309
|
+
origin: z.ZodOptional<z.ZodString>;
|
|
310
|
+
allowedOrigins: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
311
|
+
}, z.core.$strict>;
|
|
312
|
+
export declare const systemTokenIssuerSchema: z.ZodObject<{
|
|
313
|
+
issuer: z.ZodString;
|
|
314
|
+
keys: z.ZodArray<z.ZodObject<{
|
|
315
|
+
kid: z.ZodString;
|
|
316
|
+
publicKey: z.ZodString;
|
|
317
|
+
}, z.core.$strict>>;
|
|
318
|
+
proof: z.ZodOptional<z.ZodString>;
|
|
319
|
+
}, z.core.$strict>;
|
|
320
|
+
export declare const systemSubscriptionSchema: z.ZodObject<{
|
|
321
|
+
url: z.ZodString;
|
|
322
|
+
events: z.ZodArray<z.ZodString>;
|
|
323
|
+
}, z.core.$strict>;
|
|
324
|
+
export declare const spaceSystemManifestSchema: z.ZodObject<{
|
|
325
|
+
presentation: z.ZodOptional<z.ZodObject<{
|
|
326
|
+
name: z.ZodOptional<z.ZodString>;
|
|
327
|
+
logo: z.ZodOptional<z.ZodString>;
|
|
328
|
+
supportUrl: z.ZodOptional<z.ZodString>;
|
|
329
|
+
claimOrigin: z.ZodOptional<z.ZodString>;
|
|
330
|
+
accessHandoffOrigin: z.ZodOptional<z.ZodString>;
|
|
331
|
+
problemDocsBaseUrl: z.ZodOptional<z.ZodString>;
|
|
332
|
+
contacts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
333
|
+
}, z.core.$strict>>;
|
|
334
|
+
hostnames: z.ZodOptional<z.ZodObject<{
|
|
335
|
+
apex: z.ZodOptional<z.ZodString>;
|
|
336
|
+
}, z.core.$strict>>;
|
|
337
|
+
api: z.ZodOptional<z.ZodObject<{
|
|
338
|
+
origin: z.ZodOptional<z.ZodString>;
|
|
339
|
+
allowedOrigins: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
340
|
+
}, z.core.$strict>>;
|
|
341
|
+
tokenIssuers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
342
|
+
issuer: z.ZodString;
|
|
343
|
+
keys: z.ZodArray<z.ZodObject<{
|
|
344
|
+
kid: z.ZodString;
|
|
345
|
+
publicKey: z.ZodString;
|
|
346
|
+
}, z.core.$strict>>;
|
|
347
|
+
proof: z.ZodOptional<z.ZodString>;
|
|
348
|
+
}, z.core.$strict>>>;
|
|
349
|
+
subscriptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
350
|
+
url: z.ZodString;
|
|
351
|
+
events: z.ZodArray<z.ZodString>;
|
|
352
|
+
}, z.core.$strict>>>;
|
|
353
|
+
plans: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
354
|
+
features: z.ZodArray<z.ZodEnum<{
|
|
355
|
+
zero: "zero";
|
|
356
|
+
"plans.paid.available": "plans.paid.available";
|
|
357
|
+
"anonymous.publishing": "anonymous.publishing";
|
|
358
|
+
"beta.enrollment_gate": "beta.enrollment_gate";
|
|
359
|
+
"domains.search": "domains.search";
|
|
360
|
+
"domains.registration": "domains.registration";
|
|
361
|
+
"domains.dns_management": "domains.dns_management";
|
|
362
|
+
"domains.wpcom_dns": "domains.wpcom_dns";
|
|
363
|
+
"domains.domain_connect": "domains.domain_connect";
|
|
364
|
+
"domains.proxy_bindings": "domains.proxy_bindings";
|
|
365
|
+
"collab.notices": "collab.notices";
|
|
366
|
+
"collab.comments": "collab.comments";
|
|
367
|
+
"content.managed": "content.managed";
|
|
368
|
+
"sites.dedicated_runtime": "sites.dedicated_runtime";
|
|
369
|
+
"collab.drawing": "collab.drawing";
|
|
370
|
+
tags: "tags";
|
|
371
|
+
functions: "functions";
|
|
372
|
+
"spaces.slug_rename": "spaces.slug_rename";
|
|
373
|
+
"pages.templates": "pages.templates";
|
|
374
|
+
"branding.hide": "branding.hide";
|
|
375
|
+
}>>;
|
|
376
|
+
quotas: z.ZodObject<{
|
|
377
|
+
spaces: z.ZodOptional<z.ZodNumber>;
|
|
378
|
+
storageBytes: z.ZodOptional<z.ZodNumber>;
|
|
379
|
+
buildMinutesPerMonth: z.ZodOptional<z.ZodNumber>;
|
|
380
|
+
customDomains: z.ZodOptional<z.ZodNumber>;
|
|
381
|
+
}, z.core.$strict>;
|
|
382
|
+
quotaPolicy: z.ZodOptional<z.ZodEnum<{
|
|
383
|
+
warn: "warn";
|
|
384
|
+
block: "block";
|
|
385
|
+
}>>;
|
|
386
|
+
}, z.core.$strict>>>;
|
|
387
|
+
defaultPlan: z.ZodOptional<z.ZodString>;
|
|
388
|
+
}, z.core.$strict>;
|
|
389
|
+
export type SpaceSystemManifest = z.infer<typeof spaceSystemManifestSchema>;
|
|
390
|
+
/**
|
|
391
|
+
* The presentation slice of the system manifest, as a standalone schema.
|
|
392
|
+
* The presentation materializer re-parses the frozen declaration through this
|
|
393
|
+
* before storing it, so origins-https and within-schema bounds are re-asserted
|
|
394
|
+
* defensively at reconcile time and not just trusted from finalize.
|
|
395
|
+
*/
|
|
396
|
+
export type SpaceSystemPresentation = z.infer<typeof systemPresentationSchema>;
|
|
397
|
+
/**
|
|
398
|
+
* A single declared token issuer / event subscription, as standalone schemas.
|
|
399
|
+
* The issuer and subscription materializers re-parse the frozen declaration
|
|
400
|
+
* through these before materializing — key shape, issuer https, subscription
|
|
401
|
+
* url https, and within-schema bounds re-asserted defensively at reconcile
|
|
402
|
+
* time, not trusted from finalize.
|
|
403
|
+
*/
|
|
404
|
+
export type SpaceSystemTokenIssuer = z.infer<typeof systemTokenIssuerSchema>;
|
|
405
|
+
export type SpaceSystemSubscription = z.infer<typeof systemSubscriptionSchema>;
|
|
406
|
+
/**
|
|
407
|
+
* The `api` slice of the system manifest, as a standalone schema. The api-origin
|
|
408
|
+
* materializer re-parses the frozen declaration through this before storing it
|
|
409
|
+
* to `tenants.api_origins_json` — origins https and within-schema bounds
|
|
410
|
+
* re-asserted defensively at reconcile time, not trusted from finalize.
|
|
411
|
+
*/
|
|
412
|
+
export type SpaceSystemApi = z.infer<typeof systemApiSchema>;
|
|
271
413
|
export declare const spaceConfigFileSchema: z.ZodObject<{
|
|
272
414
|
index: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
273
415
|
fallback: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
@@ -366,6 +508,71 @@ export declare const spaceConfigFileSchema: z.ZodObject<{
|
|
|
366
508
|
path: z.ZodString;
|
|
367
509
|
schedule: z.ZodString;
|
|
368
510
|
}, z.core.$strip>>>;
|
|
511
|
+
system: z.ZodOptional<z.ZodObject<{
|
|
512
|
+
presentation: z.ZodOptional<z.ZodObject<{
|
|
513
|
+
name: z.ZodOptional<z.ZodString>;
|
|
514
|
+
logo: z.ZodOptional<z.ZodString>;
|
|
515
|
+
supportUrl: z.ZodOptional<z.ZodString>;
|
|
516
|
+
claimOrigin: z.ZodOptional<z.ZodString>;
|
|
517
|
+
accessHandoffOrigin: z.ZodOptional<z.ZodString>;
|
|
518
|
+
problemDocsBaseUrl: z.ZodOptional<z.ZodString>;
|
|
519
|
+
contacts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
520
|
+
}, z.core.$strict>>;
|
|
521
|
+
hostnames: z.ZodOptional<z.ZodObject<{
|
|
522
|
+
apex: z.ZodOptional<z.ZodString>;
|
|
523
|
+
}, z.core.$strict>>;
|
|
524
|
+
api: z.ZodOptional<z.ZodObject<{
|
|
525
|
+
origin: z.ZodOptional<z.ZodString>;
|
|
526
|
+
allowedOrigins: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
527
|
+
}, z.core.$strict>>;
|
|
528
|
+
tokenIssuers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
529
|
+
issuer: z.ZodString;
|
|
530
|
+
keys: z.ZodArray<z.ZodObject<{
|
|
531
|
+
kid: z.ZodString;
|
|
532
|
+
publicKey: z.ZodString;
|
|
533
|
+
}, z.core.$strict>>;
|
|
534
|
+
proof: z.ZodOptional<z.ZodString>;
|
|
535
|
+
}, z.core.$strict>>>;
|
|
536
|
+
subscriptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
537
|
+
url: z.ZodString;
|
|
538
|
+
events: z.ZodArray<z.ZodString>;
|
|
539
|
+
}, z.core.$strict>>>;
|
|
540
|
+
plans: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
541
|
+
features: z.ZodArray<z.ZodEnum<{
|
|
542
|
+
zero: "zero";
|
|
543
|
+
"plans.paid.available": "plans.paid.available";
|
|
544
|
+
"anonymous.publishing": "anonymous.publishing";
|
|
545
|
+
"beta.enrollment_gate": "beta.enrollment_gate";
|
|
546
|
+
"domains.search": "domains.search";
|
|
547
|
+
"domains.registration": "domains.registration";
|
|
548
|
+
"domains.dns_management": "domains.dns_management";
|
|
549
|
+
"domains.wpcom_dns": "domains.wpcom_dns";
|
|
550
|
+
"domains.domain_connect": "domains.domain_connect";
|
|
551
|
+
"domains.proxy_bindings": "domains.proxy_bindings";
|
|
552
|
+
"collab.notices": "collab.notices";
|
|
553
|
+
"collab.comments": "collab.comments";
|
|
554
|
+
"content.managed": "content.managed";
|
|
555
|
+
"sites.dedicated_runtime": "sites.dedicated_runtime";
|
|
556
|
+
"collab.drawing": "collab.drawing";
|
|
557
|
+
tags: "tags";
|
|
558
|
+
functions: "functions";
|
|
559
|
+
"spaces.slug_rename": "spaces.slug_rename";
|
|
560
|
+
"pages.templates": "pages.templates";
|
|
561
|
+
"branding.hide": "branding.hide";
|
|
562
|
+
}>>;
|
|
563
|
+
quotas: z.ZodObject<{
|
|
564
|
+
spaces: z.ZodOptional<z.ZodNumber>;
|
|
565
|
+
storageBytes: z.ZodOptional<z.ZodNumber>;
|
|
566
|
+
buildMinutesPerMonth: z.ZodOptional<z.ZodNumber>;
|
|
567
|
+
customDomains: z.ZodOptional<z.ZodNumber>;
|
|
568
|
+
}, z.core.$strict>;
|
|
569
|
+
quotaPolicy: z.ZodOptional<z.ZodEnum<{
|
|
570
|
+
warn: "warn";
|
|
571
|
+
block: "block";
|
|
572
|
+
}>>;
|
|
573
|
+
}, z.core.$strict>>>;
|
|
574
|
+
defaultPlan: z.ZodOptional<z.ZodString>;
|
|
575
|
+
}, z.core.$strict>>;
|
|
369
576
|
}, z.core.$strip>;
|
|
370
577
|
export type SpaceConfigFile = z.infer<typeof spaceConfigFileSchema>;
|
|
371
578
|
/**
|