@spacefast/common 0.0.23 → 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 +66 -10
- package/dist/config/index.d.ts +0 -1
- package/dist/config/index.js +0 -1
- package/dist/contracts/abuse.d.ts +2 -0
- package/dist/contracts/abuse.js +12 -0
- package/dist/contracts/access.d.ts +124 -12
- package/dist/contracts/access.js +73 -9
- package/dist/contracts/activity.d.ts +1 -1
- package/dist/contracts/activity.js +5 -12
- package/dist/contracts/api-keys.d.ts +21 -21
- package/dist/contracts/api-keys.js +2 -2
- package/dist/contracts/beta.js +1 -1
- package/dist/contracts/billing.d.ts +3 -35
- package/dist/contracts/billing.js +33 -52
- package/dist/contracts/builds.d.ts +30 -18
- package/dist/contracts/builds.js +28 -9
- package/dist/contracts/channels.js +1 -1
- package/dist/contracts/cli.d.ts +10 -0
- package/dist/contracts/cli.js +10 -0
- package/dist/contracts/collab-public.d.ts +63 -0
- package/dist/contracts/collab-public.js +46 -0
- package/dist/contracts/comments.d.ts +282 -53
- package/dist/contracts/comments.js +173 -52
- package/dist/contracts/common.d.ts +3 -3
- 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.d.ts +6 -6
- package/dist/contracts/device-auth.js +2 -2
- package/dist/contracts/docs.js +2 -2
- package/dist/contracts/domains.d.ts +38 -27
- package/dist/contracts/domains.js +29 -2
- package/dist/contracts/enums.d.ts +34 -30
- package/dist/contracts/enums.js +62 -48
- package/dist/contracts/error-code-meta.d.ts +50 -125
- package/dist/contracts/error-code-meta.js +29 -41
- package/dist/contracts/error-codes.d.ts +1 -1
- package/dist/contracts/error-codes.js +14 -33
- package/dist/contracts/execution.d.ts +47 -66
- package/dist/contracts/execution.js +53 -49
- package/dist/contracts/feature-lifecycle-core.d.ts +0 -6
- package/dist/contracts/feature-lifecycle-core.js +2 -31
- package/dist/contracts/feature-lifecycle.d.ts +12 -52
- package/dist/contracts/feature-lifecycle.js +16 -59
- package/dist/contracts/features.d.ts +48 -60
- package/dist/contracts/features.js +59 -51
- package/dist/contracts/functions.d.ts +266 -72
- package/dist/contracts/functions.js +260 -37
- package/dist/contracts/git.d.ts +28 -34
- package/dist/contracts/git.js +10 -11
- package/dist/contracts/grants.d.ts +9 -5
- package/dist/contracts/grants.js +18 -9
- package/dist/contracts/ids.js +2 -2
- package/dist/contracts/internal.d.ts +8 -6
- package/dist/contracts/internal.js +12 -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/oauth-resources.d.ts +4 -3
- package/dist/contracts/oauth-resources.js +12 -3
- package/dist/contracts/operations.d.ts +90 -5
- package/dist/contracts/operations.js +77 -3
- package/dist/contracts/pages.d.ts +12 -7
- package/dist/contracts/pages.js +24 -1
- package/dist/contracts/plan-policy.d.ts +0 -2
- package/dist/contracts/plan-policy.js +2 -3
- package/dist/contracts/platform.d.ts +61 -148
- package/dist/contracts/platform.js +70 -126
- package/dist/contracts/publish-archive.d.ts +508 -0
- package/dist/contracts/publish-archive.js +32 -0
- 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 +12 -24
- package/dist/contracts/resources.js +36 -16
- package/dist/contracts/runtime-api.d.ts +433 -192
- package/dist/contracts/runtime-api.js +421 -356
- package/dist/contracts/runtime-app.d.ts +127 -120
- package/dist/contracts/runtime-app.js +19 -10
- package/dist/contracts/runtime-db.d.ts +5 -5
- 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-services.d.ts +219 -0
- package/dist/contracts/runtime-services.js +437 -0
- package/dist/contracts/runtime-storage.d.ts +46 -32
- package/dist/contracts/runtime-storage.js +31 -8
- package/dist/contracts/sf-config-v1.d.ts +48 -10
- package/dist/contracts/space-config.d.ts +69 -18
- package/dist/contracts/space-config.js +226 -27
- package/dist/contracts/spaces.d.ts +236 -450
- package/dist/contracts/spaces.js +131 -151
- package/dist/contracts/superadmin-activity.d.ts +57 -4
- package/dist/contracts/superadmin-activity.js +48 -2
- package/dist/contracts/superadmin-search.d.ts +126 -0
- package/dist/contracts/superadmin-search.js +61 -0
- package/dist/contracts/superadmin-spaces.d.ts +361 -92
- package/dist/contracts/superadmin-spaces.js +97 -24
- package/dist/contracts/superadmin-teams.d.ts +28 -10
- package/dist/contracts/superadmin-teams.js +5 -8
- package/dist/contracts/superadmin-tenants.d.ts +0 -6
- package/dist/contracts/superadmin-tenants.js +1 -7
- package/dist/contracts/superadmin.d.ts +135 -54
- package/dist/contracts/superadmin.js +46 -23
- package/dist/contracts/tags.d.ts +12 -12
- package/dist/contracts/tags.js +3 -3
- package/dist/contracts/teams.d.ts +49 -14
- package/dist/contracts/teams.js +40 -22
- package/dist/contracts/transfers.d.ts +0 -49
- package/dist/contracts/transfers.js +4 -8
- package/dist/contracts/usage.d.ts +61 -0
- package/dist/contracts/usage.js +64 -0
- package/dist/contracts/variables.d.ts +2 -7
- package/dist/contracts/variables.js +9 -8
- package/dist/contracts/webhooks.d.ts +2 -2
- package/dist/contracts/zero.d.ts +102 -73
- package/dist/contracts/zero.js +94 -32
- package/dist/dashboard-paths/index.d.ts +1 -1
- package/dist/dashboard-paths/index.js +1 -0
- package/dist/docs/agent-prose.d.ts +2 -2
- package/dist/docs/agent-prose.js +63 -70
- package/dist/docs/agent-setup.js +45 -15
- package/dist/docs/catalog.d.ts +24 -24
- package/dist/docs/catalog.js +35 -24
- package/dist/docs/error-docs.js +194 -270
- package/dist/docs/skills.d.ts +12 -12
- package/dist/docs/skills.js +4 -4
- package/dist/test-helpers/fetch-stub.d.ts +16 -0
- package/dist/test-helpers/fetch-stub.js +25 -0
- package/dist/utils/build-settings.d.ts +5 -1
- package/dist/utils/build-settings.js +91 -13
- package/dist/utils/canonical-json.d.ts +10 -0
- package/dist/utils/canonical-json.js +22 -0
- package/dist/utils/cast-transport.d.ts +28 -0
- package/dist/utils/cast-transport.js +52 -0
- package/dist/utils/claim-token.d.ts +0 -8
- package/dist/utils/claim-token.js +3 -15
- package/dist/utils/concurrency.js +1 -0
- package/dist/utils/credential-policy.d.ts +1 -1
- package/dist/utils/credential-policy.js +4 -3
- package/dist/utils/dns-instructions.js +9 -9
- package/dist/utils/env-file.d.ts +17 -0
- package/dist/utils/env-file.js +96 -0
- package/dist/utils/error-code.d.ts +2 -0
- package/dist/utils/error-code.js +8 -0
- package/dist/utils/generate-space-name.d.ts +8 -10
- package/dist/utils/generate-space-name.js +206 -21
- package/dist/utils/grant-decision.fixtures.json +2938 -0
- package/dist/utils/grants.d.ts +2 -0
- package/dist/utils/grants.js +26 -1
- package/dist/utils/gravatar.d.ts +9 -0
- package/dist/utils/gravatar.js +31 -0
- package/dist/utils/idempotency.d.ts +6 -0
- package/dist/utils/idempotency.js +28 -0
- package/dist/utils/local-space-state.d.ts +9 -16
- package/dist/utils/local-space-state.js +20 -50
- 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 +2 -2
- package/dist/utils/page-fonts.js +15 -4
- package/dist/utils/pages.d.ts +21 -3
- package/dist/utils/pages.js +42 -13
- package/dist/utils/publish-form-data.d.ts +12 -0
- package/dist/utils/publish-form-data.js +10 -0
- package/dist/utils/publish-policy.d.ts +27 -0
- package/dist/utils/publish-policy.fixtures.json +403 -0
- package/dist/utils/publish-policy.js +45 -20
- package/dist/utils/push-new.d.ts +7 -0
- package/dist/utils/push-new.js +7 -0
- package/dist/utils/query-keys.d.ts +4 -5
- package/dist/utils/query-keys.js +2 -3
- package/dist/utils/runtime-paths.d.ts +5 -0
- package/dist/utils/runtime-paths.js +5 -0
- package/dist/utils/runtime-upload-batch.d.ts +0 -5
- package/dist/utils/runtime-upload-batch.js +1 -27
- package/dist/utils/runtime-upload.d.ts +6 -11
- package/dist/utils/runtime-upload.js +10 -13
- package/dist/utils/secure-local-file.js +5 -16
- package/dist/utils/space-config.d.ts +1 -34
- package/dist/utils/space-config.js +8 -326
- 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/storage-policy.d.ts +1 -1
- package/dist/utils/storage-policy.js +3 -1
- package/dist/utils/structured-error.d.ts +14 -0
- package/dist/utils/structured-error.js +22 -0
- package/dist/utils/upload-session.d.ts +4 -1
- package/dist/utils/upload-session.js +33 -5
- package/dist/utils/version-path.js +13 -4
- package/dist/vocabulary.d.ts +13 -11
- package/dist/vocabulary.js +42 -28
- package/package.json +7 -17
- package/dist/config/postgres-budget.d.ts +0 -129
- package/dist/config/postgres-budget.js +0 -140
- package/dist/config/postgres-budget.json +0 -51
- package/dist/contracts/archives.d.ts +0 -331
- package/dist/contracts/archives.js +0 -120
- package/dist/contracts/deployments.d.ts +0 -574
- package/dist/contracts/deployments.js +0 -97
- package/dist/contracts/sites.d.ts +0 -416
- package/dist/contracts/sites.js +0 -168
- package/dist/contracts/superadmin-queues.d.ts +0 -414
- package/dist/contracts/superadmin-queues.js +0 -202
- package/dist/contracts/superadmin-runtime.d.ts +0 -27
- package/dist/contracts/superadmin-runtime.js +0 -38
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/utils/api.d.ts +0 -4
- package/dist/utils/api.js +0 -13
|
@@ -4,10 +4,31 @@ export declare const SF_CONFIG_V1_FILES: readonly ["sf.jsonc", "spacefast.jsonc"
|
|
|
4
4
|
/** Published JSON Schema URL for the strict `sf.jsonc` v1 contract. */
|
|
5
5
|
export declare const SF_CONFIG_V1_SCHEMA_URL: `${string}/schemas/sf.v1.json`;
|
|
6
6
|
/**
|
|
7
|
-
* How a redirect answers. Omitting it means 302. There is no 200
|
|
8
|
-
* serves other content under the requested URL is a `rewrites`
|
|
7
|
+
* How a redirect answers. Omitting it means 302. There is no 200 and no 404:
|
|
8
|
+
* a rule that serves other content under the requested URL is a `rewrites`
|
|
9
|
+
* entry — with `notFound: true` when it should answer 404.
|
|
9
10
|
*/
|
|
10
11
|
export type SfConfigV1RedirectStatus = 301 | 302 | 303 | 307 | 308;
|
|
12
|
+
/**
|
|
13
|
+
* Query parameters a redirect or rewrite requires, as parameter name to
|
|
14
|
+
* capture name — `{ id: "id" }` is the `id=:id` token of a `_redirects` line,
|
|
15
|
+
* spelled the way the compiled rule (and the runtime matcher) carry it.
|
|
16
|
+
*/
|
|
17
|
+
export type SfConfigV1QueryMatch = Record<string, string>;
|
|
18
|
+
/**
|
|
19
|
+
* One header operation: `{ key, value }` sets, `{ key, remove: true }` is the
|
|
20
|
+
* `!Name` line of a `_headers` block. The shape is what tells the two apart,
|
|
21
|
+
* so a remove entry carries no value.
|
|
22
|
+
*/
|
|
23
|
+
export type SfConfigV1HeaderEntry = {
|
|
24
|
+
key: string;
|
|
25
|
+
value: string;
|
|
26
|
+
remove?: never;
|
|
27
|
+
} | {
|
|
28
|
+
key: string;
|
|
29
|
+
remove: true;
|
|
30
|
+
value?: never;
|
|
31
|
+
};
|
|
11
32
|
export type SfConfigV1 = {
|
|
12
33
|
$schema?: typeof SF_CONFIG_V1_SCHEMA_URL;
|
|
13
34
|
version: 1;
|
|
@@ -32,29 +53,36 @@ export type SfConfigV1 = {
|
|
|
32
53
|
source: string;
|
|
33
54
|
destination: string;
|
|
34
55
|
status?: SfConfigV1RedirectStatus;
|
|
56
|
+
/** Answer even when the request path resolves to a committed file — the `!` of a `_redirects` rule. */
|
|
57
|
+
force?: boolean;
|
|
58
|
+
query?: SfConfigV1QueryMatch;
|
|
35
59
|
}[];
|
|
36
60
|
/**
|
|
37
61
|
* Rewrite and proxy rules: the URL stays, the content comes from the
|
|
38
62
|
* destination. A path destination rewrites, an absolute URL proxies — the
|
|
39
63
|
* same 200 rules `_redirects` writes as `/from /to 200`, which is why they
|
|
40
|
-
* carry no status of their own.
|
|
64
|
+
* carry no status of their own. `notFound: true` answers 404 instead — the
|
|
65
|
+
* `/gone /404.html 404` rule, which is a rewrite in every way except the
|
|
66
|
+
* status; its destination must be a path.
|
|
41
67
|
*/
|
|
42
68
|
rewrites?: {
|
|
43
69
|
source: string;
|
|
44
70
|
destination: string;
|
|
45
71
|
/** Let shared caches store the proxy response. Absolute-URL destinations only. */
|
|
46
72
|
cache?: "shared";
|
|
73
|
+
/** Rewrite even when the request path resolves to a committed file — the `!` of a `200!` / `404!` file rule. */
|
|
74
|
+
force?: boolean;
|
|
75
|
+
query?: SfConfigV1QueryMatch;
|
|
76
|
+
notFound?: boolean;
|
|
47
77
|
}[];
|
|
48
78
|
/**
|
|
49
|
-
* Response headers to set on matching requests. Headers are a
|
|
50
|
-
* map, so repeated names (Set-Cookie) survive
|
|
79
|
+
* Response headers to set — or remove — on matching requests. Headers are a
|
|
80
|
+
* list, not a map, so repeated names (Set-Cookie) survive and operations
|
|
81
|
+
* keep their order.
|
|
51
82
|
*/
|
|
52
83
|
headers?: {
|
|
53
84
|
source: string;
|
|
54
|
-
headers:
|
|
55
|
-
key: string;
|
|
56
|
-
value: string;
|
|
57
|
-
}[];
|
|
85
|
+
headers: SfConfigV1HeaderEntry[];
|
|
58
86
|
}[];
|
|
59
87
|
metadata?: {
|
|
60
88
|
title?: string;
|
|
@@ -67,6 +95,15 @@ export type SfConfigV1 = {
|
|
|
67
95
|
access?: {
|
|
68
96
|
public: string[];
|
|
69
97
|
};
|
|
98
|
+
/**
|
|
99
|
+
* Scheduled requests against this space's own paths. Declarations pass
|
|
100
|
+
* through verbatim — the compiled `__spacefast/crons.json` derives each
|
|
101
|
+
* entry's key from its path, and the schedule is never normalized here.
|
|
102
|
+
*/
|
|
103
|
+
crons?: {
|
|
104
|
+
path: string;
|
|
105
|
+
schedule: string;
|
|
106
|
+
}[];
|
|
70
107
|
};
|
|
71
108
|
export type EffectiveConfigV1 = {
|
|
72
109
|
version: 1;
|
|
@@ -88,6 +125,7 @@ export type EffectiveConfigV1 = {
|
|
|
88
125
|
headers?: SfConfigV1["headers"];
|
|
89
126
|
metadata?: SfConfigV1["metadata"];
|
|
90
127
|
substitute?: SfConfigV1["substitute"];
|
|
128
|
+
crons?: SfConfigV1["crons"];
|
|
91
129
|
grants?: Grant[];
|
|
92
130
|
};
|
|
93
131
|
/**
|
|
@@ -96,7 +134,7 @@ export type EffectiveConfigV1 = {
|
|
|
96
134
|
* it is the same grammar and the same compiler.
|
|
97
135
|
*/
|
|
98
136
|
export type SfConfigV1Issue = {
|
|
99
|
-
code: "config_alias" | "config_conflict" | "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_rewrite_destination_invalid" | "redirect_source_invalid" | "redirect_status_unsupported" | "redirect_status_use_rewrites" | "serve_index_required" | "template_syntax_retired";
|
|
137
|
+
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";
|
|
100
138
|
severity: "error" | "warning";
|
|
101
139
|
path: string;
|
|
102
140
|
line: number;
|
|
@@ -2,6 +2,13 @@ import { z } from "zod";
|
|
|
2
2
|
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
|
+
/**
|
|
6
|
+
* Accepted config filenames in read precedence order, highest first. Kept in
|
|
7
|
+
* step with the finalizer's `CONFIG_ACCEPTED_FILES` (crates/stattic-runtime-core
|
|
8
|
+
* protocol.rs) — the runtime compile is the selection authority, and a local
|
|
9
|
+
* read choosing a different file than the publish serves is a split brain.
|
|
10
|
+
*/
|
|
11
|
+
export declare const SPACE_CONFIG_PRECEDENCE: readonly ["sf.jsonc", "spacefast.jsonc", "spacefast.json", "sf.json", ".sf/sf.json", ".sf/config.jsonc", ".sf/config.json"];
|
|
5
12
|
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"];
|
|
6
13
|
export declare const SPACE_CONFIG_CAPS: {
|
|
7
14
|
/** Max raw `sf.jsonc` size in bytes. */
|
|
@@ -12,6 +19,7 @@ export declare const SPACE_CONFIG_CAPS: {
|
|
|
12
19
|
readonly templates: 100;
|
|
13
20
|
readonly metaTitleChars: 300;
|
|
14
21
|
readonly metaDescriptionChars: 1000;
|
|
22
|
+
/** Max OG image or favicon path/URL length; enough for signed URLs while staying request-safe. */
|
|
15
23
|
readonly metaImageChars: 2000;
|
|
16
24
|
/** Max bytes per `inject` snippet. */
|
|
17
25
|
readonly injectSnippetBytes: number;
|
|
@@ -27,6 +35,10 @@ export declare const SPACE_CONFIG_CAPS: {
|
|
|
27
35
|
readonly themeNameChars: 120;
|
|
28
36
|
/** Max top-level `name` (space display name) length. Matches the stored column. */
|
|
29
37
|
readonly nameChars: 255;
|
|
38
|
+
/** Max `crons` entries. One provider crontab slot each, so the cap is small and hard. */
|
|
39
|
+
readonly crons: 8;
|
|
40
|
+
/** Max `crons[].path` length. */
|
|
41
|
+
readonly cronPathChars: 512;
|
|
30
42
|
};
|
|
31
43
|
/** Published JSON Schema URL for `sf.jsonc` ($schema autocomplete). */
|
|
32
44
|
export declare const SPACE_CONFIG_SCHEMA_URL: string;
|
|
@@ -53,15 +65,7 @@ export declare const spaceBuildSettingsSchema: z.ZodObject<{
|
|
|
53
65
|
timeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
54
66
|
}, z.core.$strict>;
|
|
55
67
|
export type SpaceBuildSettings = z.infer<typeof spaceBuildSettingsSchema>;
|
|
56
|
-
export declare const spacePlacementModeSchema: z.ZodEnum<{
|
|
57
|
-
shared: "shared";
|
|
58
|
-
dedicated: "dedicated";
|
|
59
|
-
}>;
|
|
60
68
|
export declare const spacePlacementConfigSchema: z.ZodObject<{
|
|
61
|
-
mode: z.ZodOptional<z.ZodEnum<{
|
|
62
|
-
shared: "shared";
|
|
63
|
-
dedicated: "dedicated";
|
|
64
|
-
}>>;
|
|
65
69
|
burstable: z.ZodOptional<z.ZodBoolean>;
|
|
66
70
|
}, z.core.$strict>;
|
|
67
71
|
export type SpacePlacementConfig = z.infer<typeof spacePlacementConfigSchema>;
|
|
@@ -71,7 +75,6 @@ export declare const wordpressDataSourceSchema: z.ZodObject<{
|
|
|
71
75
|
kind: z.ZodLiteral<"wordpress">;
|
|
72
76
|
url: z.ZodString;
|
|
73
77
|
}, z.core.$strict>;
|
|
74
|
-
export type WordPressDataSource = z.infer<typeof wordpressDataSourceSchema>;
|
|
75
78
|
export declare const spaceDataSourcesSchema: z.ZodPipe<z.ZodUnknown, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
76
79
|
kind: z.ZodLiteral<"wordpress">;
|
|
77
80
|
url: z.ZodString;
|
|
@@ -88,6 +91,7 @@ export declare const spaceConfigSchema: z.ZodObject<{
|
|
|
88
91
|
title: z.ZodOptional<z.ZodString>;
|
|
89
92
|
description: z.ZodOptional<z.ZodString>;
|
|
90
93
|
image: z.ZodOptional<z.ZodString>;
|
|
94
|
+
favicon: z.ZodOptional<z.ZodString>;
|
|
91
95
|
}, z.core.$strip>>;
|
|
92
96
|
superpowers: z.ZodOptional<z.ZodObject<{
|
|
93
97
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -140,10 +144,6 @@ export declare const spaceConfigSchema: z.ZodObject<{
|
|
|
140
144
|
timeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
141
145
|
}, z.core.$strict>>;
|
|
142
146
|
placement: z.ZodOptional<z.ZodObject<{
|
|
143
|
-
mode: z.ZodOptional<z.ZodEnum<{
|
|
144
|
-
shared: "shared";
|
|
145
|
-
dedicated: "dedicated";
|
|
146
|
-
}>>;
|
|
147
147
|
burstable: z.ZodOptional<z.ZodBoolean>;
|
|
148
148
|
}, z.core.$strict>>;
|
|
149
149
|
markdownNegotiation: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -169,7 +169,6 @@ export declare const spaceConfigFileAccessSchema: z.ZodUnion<readonly [z.ZodPipe
|
|
|
169
169
|
}, "public">>, z.ZodObject<{
|
|
170
170
|
public: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
171
171
|
}, z.core.$strict>]>;
|
|
172
|
-
export type SpaceConfigFileAccess = z.infer<typeof spaceConfigFileAccessSchema>;
|
|
173
172
|
/**
|
|
174
173
|
* Zero: a transactional app with its own database.
|
|
175
174
|
*
|
|
@@ -196,6 +195,7 @@ export declare const spaceRuntimeFunctionsSchema: z.ZodObject<{
|
|
|
196
195
|
kind: z.ZodLiteral<"functions">;
|
|
197
196
|
entry: z.ZodOptional<z.ZodString>;
|
|
198
197
|
database: z.ZodDefault<z.ZodBoolean>;
|
|
198
|
+
fetch: z.ZodOptional<z.ZodBoolean>;
|
|
199
199
|
compatibilityDate: z.ZodOptional<z.ZodString>;
|
|
200
200
|
}, z.core.$strip>;
|
|
201
201
|
/**
|
|
@@ -214,11 +214,60 @@ export declare const spaceRuntimeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
214
214
|
kind: z.ZodLiteral<"functions">;
|
|
215
215
|
entry: z.ZodOptional<z.ZodString>;
|
|
216
216
|
database: z.ZodDefault<z.ZodBoolean>;
|
|
217
|
+
fetch: z.ZodOptional<z.ZodBoolean>;
|
|
217
218
|
compatibilityDate: z.ZodOptional<z.ZodString>;
|
|
218
219
|
}, z.core.$strip>], "kind">;
|
|
219
220
|
export type SpaceRuntimeZeroConfig = z.infer<typeof spaceRuntimeZeroSchema>;
|
|
220
221
|
export type SpaceRuntimeFunctionsConfig = z.infer<typeof spaceRuntimeFunctionsSchema>;
|
|
221
222
|
export type SpaceRuntimeConfig = z.infer<typeof spaceRuntimeSchema>;
|
|
223
|
+
/**
|
|
224
|
+
* 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.
|
|
230
|
+
*
|
|
231
|
+
* The Rust config compiler is the selection authority for both fields; this
|
|
232
|
+
* schema exists so an editor and an agent get the same answer before publish.
|
|
233
|
+
*/
|
|
234
|
+
export declare const SPACE_CRON_NAMED_SCHEDULES: readonly ["hourly", "daily", "twicedaily", "weekly"];
|
|
235
|
+
/**
|
|
236
|
+
* 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
|
+
* the provider does not accept them either.
|
|
239
|
+
*/
|
|
240
|
+
export declare function isSpaceCronSchedule(schedule: string): boolean;
|
|
241
|
+
/**
|
|
242
|
+
* The artifact key for a cron path: lowercase, leading `/` stripped, every run
|
|
243
|
+
* of non-alphanumerics collapsed to one `-`, trimmed. Two paths that produce
|
|
244
|
+
* one key are rejected, so a key names exactly one schedule.
|
|
245
|
+
*/
|
|
246
|
+
export declare function spaceCronKey(path: string): string;
|
|
247
|
+
/** Generated runtime file the serving engine reads, written only when a version declares a cron. */
|
|
248
|
+
export declare const SPACE_CRONS_ARTIFACT_PATH = "__spacefast/crons.json";
|
|
249
|
+
export declare const SPACE_CRONS_ARTIFACT_VERSION = 1;
|
|
250
|
+
/** One compiled cron, as the artifact carries it. */
|
|
251
|
+
export type SpaceCronEntry = {
|
|
252
|
+
/** Slug of `path`; unique within a version. */
|
|
253
|
+
key: string;
|
|
254
|
+
path: string;
|
|
255
|
+
/** Verbatim as declared — never normalized or expanded. */
|
|
256
|
+
schedule: string;
|
|
257
|
+
};
|
|
258
|
+
export type SpaceCronsArtifact = {
|
|
259
|
+
version: typeof SPACE_CRONS_ARTIFACT_VERSION;
|
|
260
|
+
crons: SpaceCronEntry[];
|
|
261
|
+
};
|
|
262
|
+
export declare const spaceCronSchema: z.ZodObject<{
|
|
263
|
+
path: z.ZodString;
|
|
264
|
+
schedule: z.ZodString;
|
|
265
|
+
}, z.core.$strip>;
|
|
266
|
+
export declare const spaceCronsSchema: z.ZodArray<z.ZodObject<{
|
|
267
|
+
path: z.ZodString;
|
|
268
|
+
schedule: z.ZodString;
|
|
269
|
+
}, z.core.$strip>>;
|
|
270
|
+
export type SpaceCronConfig = z.infer<typeof spaceCronSchema>;
|
|
222
271
|
export declare const spaceConfigFileSchema: z.ZodObject<{
|
|
223
272
|
index: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
224
273
|
fallback: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
@@ -231,6 +280,7 @@ export declare const spaceConfigFileSchema: z.ZodObject<{
|
|
|
231
280
|
title: z.ZodOptional<z.ZodString>;
|
|
232
281
|
description: z.ZodOptional<z.ZodString>;
|
|
233
282
|
image: z.ZodOptional<z.ZodString>;
|
|
283
|
+
favicon: z.ZodOptional<z.ZodString>;
|
|
234
284
|
}, z.core.$strip>>;
|
|
235
285
|
superpowers: z.ZodOptional<z.ZodObject<{
|
|
236
286
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -283,10 +333,6 @@ export declare const spaceConfigFileSchema: z.ZodObject<{
|
|
|
283
333
|
timeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
284
334
|
}, z.core.$strict>>;
|
|
285
335
|
placement: z.ZodOptional<z.ZodObject<{
|
|
286
|
-
mode: z.ZodOptional<z.ZodEnum<{
|
|
287
|
-
shared: "shared";
|
|
288
|
-
dedicated: "dedicated";
|
|
289
|
-
}>>;
|
|
290
336
|
burstable: z.ZodOptional<z.ZodBoolean>;
|
|
291
337
|
}, z.core.$strict>>;
|
|
292
338
|
markdownNegotiation: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -313,8 +359,13 @@ export declare const spaceConfigFileSchema: z.ZodObject<{
|
|
|
313
359
|
kind: z.ZodLiteral<"functions">;
|
|
314
360
|
entry: z.ZodOptional<z.ZodString>;
|
|
315
361
|
database: z.ZodDefault<z.ZodBoolean>;
|
|
362
|
+
fetch: z.ZodOptional<z.ZodBoolean>;
|
|
316
363
|
compatibilityDate: z.ZodOptional<z.ZodString>;
|
|
317
364
|
}, z.core.$strip>], "kind">>;
|
|
365
|
+
crons: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
366
|
+
path: z.ZodString;
|
|
367
|
+
schedule: z.ZodString;
|
|
368
|
+
}, z.core.$strip>>>;
|
|
318
369
|
}, z.core.$strip>;
|
|
319
370
|
export type SpaceConfigFile = z.infer<typeof spaceConfigFileSchema>;
|
|
320
371
|
/**
|