@spacefast/common 0.0.11 → 0.0.13
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 +4 -4
- package/dist/agents/connect-targets.js +3 -3
- package/dist/agents/private-key-oauth.d.ts +37 -0
- package/dist/agents/private-key-oauth.js +158 -0
- package/dist/config/domains.js +1 -1
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.js +1 -0
- package/dist/config/postgres-budget.d.ts +126 -0
- package/dist/config/postgres-budget.js +135 -0
- package/dist/config/postgres-budget.json +50 -0
- package/dist/contracts/access.d.ts +386 -1183
- package/dist/contracts/access.js +240 -1018
- package/dist/contracts/activity.d.ts +1 -1
- package/dist/contracts/activity.js +11 -19
- package/dist/contracts/api-keys.d.ts +69 -45
- package/dist/contracts/api-keys.js +3 -0
- package/dist/contracts/archives.d.ts +9 -10
- package/dist/contracts/archives.js +4 -6
- package/dist/contracts/builds.d.ts +8 -8
- package/dist/contracts/builds.js +28 -48
- package/dist/contracts/channels.js +1 -2
- package/dist/contracts/comments.d.ts +102 -93
- package/dist/contracts/comments.js +121 -63
- package/dist/contracts/common.d.ts +4 -3
- package/dist/contracts/common.js +2 -0
- package/dist/contracts/countries.js +2 -7
- package/dist/contracts/data-source-routes.d.ts +20 -0
- package/dist/contracts/data-source-routes.js +15 -0
- package/dist/contracts/deployments.d.ts +3 -3
- package/dist/contracts/device-auth.d.ts +21 -15
- package/dist/contracts/docs.d.ts +5 -5
- package/dist/contracts/domains.d.ts +261 -1330
- package/dist/contracts/domains.js +39 -301
- package/dist/contracts/email-preferences.d.ts +50 -0
- package/dist/contracts/email-preferences.js +44 -0
- package/dist/contracts/enums.d.ts +3 -5
- package/dist/contracts/enums.js +3 -8
- package/dist/contracts/error-code-meta.d.ts +99 -33
- package/dist/contracts/error-code-meta.js +36 -9
- package/dist/contracts/error-codes.d.ts +1 -1
- package/dist/contracts/error-codes.js +28 -11
- package/dist/contracts/execution.d.ts +212 -0
- package/dist/contracts/execution.js +288 -0
- package/dist/contracts/feature-lifecycle.d.ts +498 -2
- package/dist/contracts/feature-lifecycle.js +539 -2
- package/dist/contracts/features.d.ts +184 -74
- package/dist/contracts/features.js +4 -303
- package/dist/contracts/functions.d.ts +729 -0
- package/dist/contracts/functions.js +485 -0
- package/dist/contracts/git.d.ts +1 -1
- package/dist/contracts/grants.d.ts +1158 -0
- package/dist/contracts/grants.js +696 -0
- package/dist/contracts/ids.d.ts +6 -5
- package/dist/contracts/ids.js +6 -5
- package/dist/contracts/internal.d.ts +3 -3
- package/dist/contracts/mcp.d.ts +12 -12
- package/dist/contracts/me.js +1 -1
- package/dist/contracts/mounts.d.ts +142 -0
- package/dist/contracts/mounts.js +56 -0
- package/dist/contracts/oauth-resources.d.ts +5 -5
- package/dist/contracts/oauth-resources.js +2 -0
- package/dist/contracts/operations.d.ts +4 -4
- package/dist/contracts/pages.d.ts +6 -14
- package/dist/contracts/pages.js +11 -23
- package/dist/contracts/plan-policy.d.ts +2 -9
- package/dist/contracts/plan-policy.js +1 -4
- package/dist/contracts/platform.d.ts +80 -32
- package/dist/contracts/platform.js +59 -12
- package/dist/contracts/push-new.d.ts +26 -2
- package/dist/contracts/push-new.js +8 -0
- package/dist/contracts/quotas.d.ts +0 -1
- package/dist/contracts/quotas.js +0 -5
- package/dist/contracts/repository-connections.d.ts +1 -1
- package/dist/contracts/resources.d.ts +21 -85
- package/dist/contracts/resources.js +17 -47
- package/dist/contracts/runtime-api.d.ts +799 -192
- package/dist/contracts/runtime-api.js +231 -100
- package/dist/contracts/runtime-app.d.ts +138 -0
- package/dist/contracts/runtime-app.js +21 -0
- package/dist/contracts/sf-config-v1.d.ts +5 -0
- package/dist/contracts/sf-config-v1.js +1 -1
- package/dist/contracts/sites.d.ts +17 -12
- package/dist/contracts/sites.js +30 -12
- package/dist/contracts/space-config.d.ts +46 -117
- package/dist/contracts/space-config.js +323 -25
- package/dist/contracts/spaces.d.ts +392 -256
- package/dist/contracts/spaces.js +163 -83
- package/dist/contracts/superadmin-emails.d.ts +27 -3
- package/dist/contracts/superadmin-emails.js +10 -15
- package/dist/contracts/superadmin-runtime.d.ts +2 -2
- package/dist/contracts/superadmin-spaces.d.ts +19 -142
- package/dist/contracts/superadmin-spaces.js +7 -0
- package/dist/contracts/tags.d.ts +66 -36
- package/dist/contracts/tags.js +195 -11
- package/dist/contracts/teams.d.ts +9 -9
- package/dist/contracts/transfers.d.ts +1 -2
- package/dist/contracts/variables.d.ts +4 -4
- package/dist/contracts/variables.js +4 -3
- package/dist/contracts/webhooks.d.ts +2 -2
- package/dist/contracts/zero.d.ts +437 -193
- package/dist/contracts/zero.js +149 -158
- package/dist/dashboard-paths/index.d.ts +3 -3
- package/dist/dashboard-paths/index.js +1 -0
- package/dist/docs/agent-prose.js +10 -8
- package/dist/docs/agent-setup.d.ts +6 -4
- package/dist/docs/agent-setup.js +26 -16
- package/dist/docs/agent-solutions.js +1 -1
- package/dist/docs/catalog.d.ts +35 -37
- package/dist/docs/catalog.js +36 -38
- package/dist/docs/error-docs.js +108 -44
- package/dist/utils/asset-fingerprint.d.ts +11 -0
- package/dist/utils/asset-fingerprint.js +46 -0
- package/dist/utils/auth-redirect.d.ts +1 -3
- package/dist/utils/auth-redirect.js +1 -21
- package/dist/utils/build-settings.d.ts +2 -0
- package/dist/utils/build-settings.js +61 -9
- package/dist/utils/credential-policy.d.ts +1 -1
- package/dist/utils/credential-policy.js +4 -0
- package/dist/utils/dns-instructions.d.ts +29 -0
- package/dist/utils/dns-instructions.js +78 -0
- package/dist/utils/domain-diagnostics.d.ts +29 -0
- package/dist/utils/domain-diagnostics.js +63 -0
- package/dist/utils/egress-policy.fixtures.json +51 -0
- package/dist/utils/grants.d.ts +53 -0
- package/dist/utils/grants.js +160 -0
- package/dist/utils/id-hints.d.ts +1 -0
- package/dist/utils/id-hints.js +55 -13
- package/dist/utils/local-space-state.js +1 -0
- package/dist/utils/page-colors.d.ts +50 -0
- package/dist/utils/page-colors.js +167 -0
- package/dist/utils/page-fonts.d.ts +2 -0
- package/dist/utils/page-fonts.js +4 -0
- package/dist/utils/pages.d.ts +19 -6
- package/dist/utils/pages.js +122 -49
- package/dist/utils/production-runtime.d.ts +18 -0
- package/dist/utils/production-runtime.js +28 -0
- package/dist/utils/publish-policy.d.ts +34 -4
- package/dist/utils/publish-policy.js +132 -61
- package/dist/utils/query-keys.d.ts +7 -13
- package/dist/utils/query-keys.js +12 -18
- package/dist/utils/source-archive-policy.d.ts +2 -0
- package/dist/utils/source-archive-policy.js +2 -0
- package/dist/utils/space-config.d.ts +5 -1
- package/dist/utils/space-config.js +35 -0
- package/dist/utils/static-runtime-policy.d.ts +5 -0
- package/dist/utils/static-runtime-policy.fixtures.json +57 -0
- package/dist/utils/static-runtime-policy.js +54 -10
- package/dist/utils/upload-session.d.ts +3 -0
- package/dist/utils/upload-session.js +31 -0
- package/package.json +6 -4
- package/dist/contracts/annotations.d.ts +0 -327
- package/dist/contracts/annotations.js +0 -235
- package/dist/contracts/generated-feature-launch-entries.d.ts +0 -2
- package/dist/contracts/generated-feature-launch-entries.js +0 -518
- package/dist/contracts/publishes.d.ts +0 -135
- package/dist/contracts/publishes.js +0 -162
- package/dist/utils/access-match.d.ts +0 -39
- package/dist/utils/access-match.js +0 -296
- package/dist/utils/sf-config-v1.d.ts +0 -2
- package/dist/utils/sf-config-v1.js +0 -542
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { functionsAppSchema } from "./functions.js";
|
|
3
|
+
import { zeroAppSchema } from "./zero.js";
|
|
4
|
+
/**
|
|
5
|
+
* The one answer to "what is running on this space".
|
|
6
|
+
*
|
|
7
|
+
* A space is exactly one runtime kind — `versionRuntimeKind()` returns a single
|
|
8
|
+
* value and a publish carrying both declarations is refused at finalize — so
|
|
9
|
+
* this is a discriminated union rather than a bag of optional per-product
|
|
10
|
+
* fields. Anything that is not an execution tier has no member here and reads
|
|
11
|
+
* as `null`, which is the overwhelmingly common answer: a static space is not a
|
|
12
|
+
* degenerate app, it is the absence of one.
|
|
13
|
+
*
|
|
14
|
+
* It lives in its own module because it is the only place that needs to know
|
|
15
|
+
* about both products at once. `spaces.ts` imports it to describe runtime
|
|
16
|
+
* status; neither `zero.ts` nor `functions.ts` has to learn about the other.
|
|
17
|
+
*/
|
|
18
|
+
export const runtimeAppSchema = z.discriminatedUnion("runtimeKind", [
|
|
19
|
+
zeroAppSchema,
|
|
20
|
+
functionsAppSchema,
|
|
21
|
+
]);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Grant } from "./grants.js";
|
|
1
2
|
export declare const SF_CONFIG_V1_CANONICAL_FILE = "sf.jsonc";
|
|
2
3
|
export declare const SF_CONFIG_V1_FILES: readonly ["sf.jsonc", "spacefast.jsonc", "spacefast.json", "sf.json", ".sf/sf.json", ".sf/config.jsonc", ".sf/config.json"];
|
|
3
4
|
/** Published JSON Schema URL for the strict `sf.jsonc` v1 contract. */
|
|
@@ -26,6 +27,9 @@ export type SfConfigV1 = {
|
|
|
26
27
|
substitute?: {
|
|
27
28
|
files: string[];
|
|
28
29
|
};
|
|
30
|
+
access?: {
|
|
31
|
+
public: string[];
|
|
32
|
+
};
|
|
29
33
|
};
|
|
30
34
|
export type EffectiveConfigV1 = {
|
|
31
35
|
version: 1;
|
|
@@ -41,6 +45,7 @@ export type EffectiveConfigV1 = {
|
|
|
41
45
|
};
|
|
42
46
|
metadata?: SfConfigV1["metadata"];
|
|
43
47
|
substitute?: SfConfigV1["substitute"];
|
|
48
|
+
grants?: Grant[];
|
|
44
49
|
};
|
|
45
50
|
export type SfConfigV1Issue = {
|
|
46
51
|
code: "config_alias" | "config_conflict" | "config_identity_moved" | "config_invalid" | "config_key_removed" | "config_unknown_key" | "serve_index_required" | "template_syntax_retired";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BRAND } from "../brand.js";
|
|
2
|
-
import { SPACE_CONFIG_ACCEPTED_FILES, SPACE_CONFIG_CANONICAL_FILE
|
|
2
|
+
import { SPACE_CONFIG_ACCEPTED_FILES, SPACE_CONFIG_CANONICAL_FILE } from "./space-config.js";
|
|
3
3
|
export const SF_CONFIG_V1_CANONICAL_FILE = SPACE_CONFIG_CANONICAL_FILE;
|
|
4
4
|
export const SF_CONFIG_V1_FILES = SPACE_CONFIG_ACCEPTED_FILES;
|
|
5
5
|
/** Published JSON Schema URL for the strict `sf.jsonc` v1 contract. */
|
|
@@ -14,6 +14,7 @@ export declare const SitePressureSchema: z.ZodObject<{
|
|
|
14
14
|
lastSampleAt: z.ZodOptional<z.ZodString>;
|
|
15
15
|
consecutivePressured: z.ZodOptional<z.ZodNumber>;
|
|
16
16
|
consecutiveClean: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
placementHoldRevision: z.ZodOptional<z.ZodNumber>;
|
|
17
18
|
pressureHoldUntil: z.ZodOptional<z.ZodString>;
|
|
18
19
|
lastBulkLaneActivityAt: z.ZodOptional<z.ZodString>;
|
|
19
20
|
}, z.core.$loose>;
|
|
@@ -76,8 +77,8 @@ export declare const SiteSchema: z.ZodObject<{
|
|
|
76
77
|
code: z.ZodString;
|
|
77
78
|
severity: z.ZodEnum<{
|
|
78
79
|
info: "info";
|
|
79
|
-
warning: "warning";
|
|
80
80
|
error: "error";
|
|
81
|
+
warning: "warning";
|
|
81
82
|
}>;
|
|
82
83
|
message: z.ZodString;
|
|
83
84
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -98,9 +99,10 @@ export declare const SiteSchema: z.ZodObject<{
|
|
|
98
99
|
updatedAt: z.ZodString;
|
|
99
100
|
}, z.core.$strip>;
|
|
100
101
|
export type Site = z.infer<typeof SiteSchema>;
|
|
101
|
-
export declare const
|
|
102
|
+
export declare const operatorSiteProvisioningSchema: z.ZodOptional<z.ZodObject<{
|
|
102
103
|
importProviderSiteId: z.ZodOptional<z.ZodString>;
|
|
103
104
|
}, z.core.$strip>>;
|
|
105
|
+
export declare const tenantSiteProvisioningSchema: z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
|
|
104
106
|
export declare const siteCreateSchema: z.ZodObject<{
|
|
105
107
|
kind: z.ZodDefault<z.ZodEnum<{
|
|
106
108
|
static_runtime: "static_runtime";
|
|
@@ -110,10 +112,8 @@ export declare const siteCreateSchema: z.ZodObject<{
|
|
|
110
112
|
space: "space";
|
|
111
113
|
}>>;
|
|
112
114
|
region: z.ZodOptional<z.ZodString>;
|
|
113
|
-
provisioning: z.ZodOptional<z.ZodObject<{
|
|
114
|
-
|
|
115
|
-
}, z.core.$strip>>;
|
|
116
|
-
}, z.core.$strip>;
|
|
115
|
+
provisioning: z.ZodOptional<z.ZodObject<{}, z.core.$strict>>;
|
|
116
|
+
}, z.core.$strict>;
|
|
117
117
|
export declare const siteListSchema: z.ZodObject<{
|
|
118
118
|
data: z.ZodArray<z.ZodObject<{
|
|
119
119
|
id: z.ZodString;
|
|
@@ -173,8 +173,8 @@ export declare const siteListSchema: z.ZodObject<{
|
|
|
173
173
|
code: z.ZodString;
|
|
174
174
|
severity: z.ZodEnum<{
|
|
175
175
|
info: "info";
|
|
176
|
-
warning: "warning";
|
|
177
176
|
error: "error";
|
|
177
|
+
warning: "warning";
|
|
178
178
|
}>;
|
|
179
179
|
message: z.ZodString;
|
|
180
180
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -264,8 +264,8 @@ export declare const SuperadminSiteSchema: z.ZodObject<{
|
|
|
264
264
|
code: z.ZodString;
|
|
265
265
|
severity: z.ZodEnum<{
|
|
266
266
|
info: "info";
|
|
267
|
-
warning: "warning";
|
|
268
267
|
error: "error";
|
|
268
|
+
warning: "warning";
|
|
269
269
|
}>;
|
|
270
270
|
message: z.ZodString;
|
|
271
271
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -353,8 +353,8 @@ export declare const SuperadminSiteListSchema: z.ZodObject<{
|
|
|
353
353
|
code: z.ZodString;
|
|
354
354
|
severity: z.ZodEnum<{
|
|
355
355
|
info: "info";
|
|
356
|
-
warning: "warning";
|
|
357
356
|
error: "error";
|
|
357
|
+
warning: "warning";
|
|
358
358
|
}>;
|
|
359
359
|
message: z.ZodString;
|
|
360
360
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -388,16 +388,16 @@ export declare const superadminSiteCreateSchema: z.ZodObject<{
|
|
|
388
388
|
kind: z.ZodDefault<z.ZodEnum<{
|
|
389
389
|
static_runtime: "static_runtime";
|
|
390
390
|
}>>;
|
|
391
|
+
region: z.ZodOptional<z.ZodString>;
|
|
391
392
|
isolation: z.ZodDefault<z.ZodEnum<{
|
|
392
393
|
site: "site";
|
|
393
394
|
space: "space";
|
|
394
395
|
}>>;
|
|
395
|
-
|
|
396
|
+
tenantId: z.ZodString;
|
|
396
397
|
provisioning: z.ZodOptional<z.ZodObject<{
|
|
397
398
|
importProviderSiteId: z.ZodOptional<z.ZodString>;
|
|
398
399
|
}, z.core.$strip>>;
|
|
399
|
-
|
|
400
|
-
}, z.core.$strip>;
|
|
400
|
+
}, z.core.$strict>;
|
|
401
401
|
export declare const siteRebalanceRequestSchema: z.ZodObject<{
|
|
402
402
|
spaceIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
403
403
|
}, z.core.$strip>;
|
|
@@ -407,4 +407,9 @@ export declare const SiteRebalanceResultSchema: z.ZodObject<{
|
|
|
407
407
|
spaceId: z.ZodString;
|
|
408
408
|
operationId: z.ZodString;
|
|
409
409
|
}, z.core.$strip>>;
|
|
410
|
+
warning: z.ZodString;
|
|
411
|
+
domainsRequiringReverification: z.ZodArray<z.ZodObject<{
|
|
412
|
+
spaceId: z.ZodString;
|
|
413
|
+
hostname: z.ZodString;
|
|
414
|
+
}, z.core.$strip>>;
|
|
410
415
|
}, z.core.$strip>;
|
package/dist/contracts/sites.js
CHANGED
|
@@ -36,6 +36,10 @@ export const SitePressureSchema = z
|
|
|
36
36
|
lastSampleAt: z.string().datetime().optional(),
|
|
37
37
|
consecutivePressured: z.number().int().nonnegative().optional(),
|
|
38
38
|
consecutiveClean: z.number().int().nonnegative().optional(),
|
|
39
|
+
// Monotonic CAS token shared by explicit operator hold actions and the
|
|
40
|
+
// pressure sampler. Every durable hold transition advances it, including
|
|
41
|
+
// transitions that restore a prior timestamp.
|
|
42
|
+
placementHoldRevision: z.number().int().nonnegative().optional(),
|
|
39
43
|
// Provenance stamp for the sampler's automatic hold: set on trip to the
|
|
40
44
|
// exact hold instant it wrote, so release only clears holds the pressure
|
|
41
45
|
// pipeline itself set — never an operator-set placement hold.
|
|
@@ -70,13 +74,10 @@ export const SiteSchema = z.object({
|
|
|
70
74
|
createdAt: z.string().datetime(),
|
|
71
75
|
updatedAt: z.string().datetime(),
|
|
72
76
|
});
|
|
73
|
-
//
|
|
74
|
-
//
|
|
75
|
-
//
|
|
76
|
-
|
|
77
|
-
// workers, and alias canonicalization are intentionally not exposed here; the
|
|
78
|
-
// control plane sets them from Spacefast runtime invariants.
|
|
79
|
-
export const siteProvisioningSchema = z
|
|
77
|
+
// Operator-only WP.Cloud provisioning controls. Tenant site creation never
|
|
78
|
+
// accepts provider object identifiers: authority to create a Spacefast site
|
|
79
|
+
// must not imply authority to adopt existing provider infrastructure.
|
|
80
|
+
export const operatorSiteProvisioningSchema = z
|
|
80
81
|
.object({
|
|
81
82
|
importProviderSiteId: z
|
|
82
83
|
.string()
|
|
@@ -86,12 +87,17 @@ export const siteProvisioningSchema = z
|
|
|
86
87
|
.describe("Import an existing WP.Cloud site by its atomic_site_id (operator flows)."),
|
|
87
88
|
})
|
|
88
89
|
.optional();
|
|
89
|
-
|
|
90
|
+
// An explicit empty object requests fresh provider provisioning while keeping
|
|
91
|
+
// every provider identity and runtime knob outside tenant control.
|
|
92
|
+
export const tenantSiteProvisioningSchema = z.object({}).strict().optional();
|
|
93
|
+
export const siteCreateSchema = z
|
|
94
|
+
.object({
|
|
90
95
|
kind: siteKind.default("static_runtime"),
|
|
91
96
|
isolation: siteIsolation.default("site"),
|
|
92
97
|
region: z.string().trim().min(1).optional().describe('Placement region; defaults to `"auto"`.'),
|
|
93
|
-
provisioning:
|
|
94
|
-
})
|
|
98
|
+
provisioning: tenantSiteProvisioningSchema,
|
|
99
|
+
})
|
|
100
|
+
.strict();
|
|
95
101
|
export const siteListSchema = z.object({
|
|
96
102
|
data: z.array(SiteSchema),
|
|
97
103
|
pagination: CursorPaginationSchema,
|
|
@@ -114,8 +120,9 @@ export const SuperadminSiteListSchema = z.object({
|
|
|
114
120
|
});
|
|
115
121
|
// Superadmin site create targets an explicit tenant (the tenant-facing
|
|
116
122
|
// `siteCreateSchema` derives the tenant from the principal).
|
|
117
|
-
export const superadminSiteCreateSchema = siteCreateSchema.extend({
|
|
123
|
+
export const superadminSiteCreateSchema = siteCreateSchema.omit({ provisioning: true }).extend({
|
|
118
124
|
tenantId: z.string().trim().min(1),
|
|
125
|
+
provisioning: operatorSiteProvisioningSchema,
|
|
119
126
|
});
|
|
120
127
|
// Operator rebalance trigger (internal-docs/platform.md "Space placement and
|
|
121
128
|
// moves": operator rebalancing is a move trigger). Queues `space_move`
|
|
@@ -128,7 +135,7 @@ export const siteRebalanceRequestSchema = z
|
|
|
128
135
|
.optional()
|
|
129
136
|
.describe("Limit the rebalance to these space ids; omitted means every live space on the site."),
|
|
130
137
|
})
|
|
131
|
-
.describe("Operator-only rebalance trigger: move spaces off this site.");
|
|
138
|
+
.describe("Operator-only rebalance trigger: move spaces off this site. This is the ONLY path that relocates an existing Space, and it is not free — see the reverification warning on the result.");
|
|
132
139
|
export const SiteRebalanceResultSchema = z
|
|
133
140
|
.object({
|
|
134
141
|
siteId: z.string().describe("The site spaces are being moved off."),
|
|
@@ -138,5 +145,16 @@ export const SiteRebalanceResultSchema = z
|
|
|
138
145
|
operationId: z.string().describe("The queued `space_move` operation id (`op_...`)."),
|
|
139
146
|
}))
|
|
140
147
|
.describe("One queued move operation per affected space."),
|
|
148
|
+
warning: z
|
|
149
|
+
.string()
|
|
150
|
+
.describe("Consequence of relocating these Spaces: each hostname is handed to another provider site, which re-runs the provider's domain-exclusivity check and is rejected unless the domain's ownership TXT record is still live in DNS."),
|
|
151
|
+
domainsRequiringReverification: z
|
|
152
|
+
.array(z.object({
|
|
153
|
+
spaceId: z.string().describe("Space the hostname serves."),
|
|
154
|
+
hostname: z
|
|
155
|
+
.string()
|
|
156
|
+
.describe("Custom hostname whose provider ownership check re-runs during the move."),
|
|
157
|
+
}))
|
|
158
|
+
.describe("Live custom hostnames on the moved Spaces. Empty means nothing customer-visible is at risk."),
|
|
141
159
|
})
|
|
142
160
|
.describe("Queued rebalance moves; track each operation for completion.");
|
|
@@ -17,8 +17,8 @@ export declare const SPACE_CONFIG_CAPS: {
|
|
|
17
17
|
readonly injectSnippetBytes: number;
|
|
18
18
|
/** Max snippets per `inject` array. */
|
|
19
19
|
readonly injectSnippets: 16;
|
|
20
|
-
/** Max
|
|
21
|
-
readonly
|
|
20
|
+
/** Max public WordPress sources exposed to repository builds. */
|
|
21
|
+
readonly dataSources: 32;
|
|
22
22
|
/** Max `theme` color token length. */
|
|
23
23
|
readonly themeColorChars: 64;
|
|
24
24
|
/** Max `theme.logo` URL/path length. */
|
|
@@ -56,7 +56,6 @@ export declare const spacePlacementModeSchema: z.ZodEnum<{
|
|
|
56
56
|
dedicated: "dedicated";
|
|
57
57
|
}>;
|
|
58
58
|
export declare const spacePlacementConfigSchema: z.ZodObject<{
|
|
59
|
-
region: z.ZodOptional<z.ZodString>;
|
|
60
59
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
61
60
|
shared: "shared";
|
|
62
61
|
dedicated: "dedicated";
|
|
@@ -64,6 +63,17 @@ export declare const spacePlacementConfigSchema: z.ZodObject<{
|
|
|
64
63
|
burstable: z.ZodOptional<z.ZodBoolean>;
|
|
65
64
|
}, z.core.$strict>;
|
|
66
65
|
export type SpacePlacementConfig = z.infer<typeof spacePlacementConfigSchema>;
|
|
66
|
+
export declare const dataSourceNameSchema: z.ZodString;
|
|
67
|
+
export declare const wordpressDataSourceUrlSchema: z.ZodString;
|
|
68
|
+
export declare const wordpressDataSourceSchema: z.ZodObject<{
|
|
69
|
+
kind: z.ZodLiteral<"wordpress">;
|
|
70
|
+
url: z.ZodString;
|
|
71
|
+
}, z.core.$strict>;
|
|
72
|
+
export type WordPressDataSource = z.infer<typeof wordpressDataSourceSchema>;
|
|
73
|
+
export declare const spaceDataSourcesSchema: z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
74
|
+
kind: z.ZodLiteral<"wordpress">;
|
|
75
|
+
url: z.ZodString;
|
|
76
|
+
}, z.core.$strict>>>;
|
|
67
77
|
export declare const spaceConfigSchema: z.ZodObject<{
|
|
68
78
|
index: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
69
79
|
fallback: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
@@ -128,7 +138,6 @@ export declare const spaceConfigSchema: z.ZodObject<{
|
|
|
128
138
|
timeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
129
139
|
}, z.core.$strict>>;
|
|
130
140
|
placement: z.ZodOptional<z.ZodObject<{
|
|
131
|
-
region: z.ZodOptional<z.ZodString>;
|
|
132
141
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
133
142
|
shared: "shared";
|
|
134
143
|
dedicated: "dedicated";
|
|
@@ -143,69 +152,38 @@ export declare const spaceConfigSchema: z.ZodObject<{
|
|
|
143
152
|
bodyEnd: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
144
153
|
noscript: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
145
154
|
}, z.core.$strip>>;
|
|
155
|
+
dataSources: z.ZodOptional<z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
156
|
+
kind: z.ZodLiteral<"wordpress">;
|
|
157
|
+
url: z.ZodString;
|
|
158
|
+
}, z.core.$strict>>>>;
|
|
159
|
+
defaultDataSource: z.ZodOptional<z.ZodString>;
|
|
146
160
|
}, z.core.$strip>;
|
|
147
161
|
export type SpaceConfig = z.infer<typeof spaceConfigSchema>;
|
|
162
|
+
export declare function compareDataSourceNames(left: string, right: string): number;
|
|
163
|
+
export declare function resolveDefaultDataSourceName(config: Pick<SpaceConfig, "dataSources" | "defaultDataSource"> | null | undefined): string | null;
|
|
148
164
|
export declare function spaceSuperpowersEnabled(config: SpaceConfig | null | undefined): boolean;
|
|
149
|
-
export declare const spaceAccessConfigSchema: z.ZodObject<{
|
|
150
|
-
rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
151
|
-
id: z.ZodOptional<z.ZodString>;
|
|
152
|
-
match: z.ZodDefault<z.ZodObject<{
|
|
153
|
-
host: z.ZodOptional<z.ZodString>;
|
|
154
|
-
hostPattern: z.ZodOptional<z.ZodString>;
|
|
155
|
-
hostTemplate: z.ZodOptional<z.ZodString>;
|
|
156
|
-
pathPattern: z.ZodOptional<z.ZodString>;
|
|
157
|
-
channel: z.ZodOptional<z.ZodString>;
|
|
158
|
-
ipCidrs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
159
|
-
agent: z.ZodOptional<z.ZodString>;
|
|
160
|
-
country: z.ZodOptional<z.ZodString>;
|
|
161
|
-
header: z.ZodOptional<z.ZodObject<{
|
|
162
|
-
name: z.ZodString;
|
|
163
|
-
value: z.ZodString;
|
|
164
|
-
}, z.core.$strip>>;
|
|
165
|
-
}, z.core.$strip>>;
|
|
166
|
-
effect: z.ZodEnum<{
|
|
167
|
-
allow: "allow";
|
|
168
|
-
deny: "deny";
|
|
169
|
-
challenge: "challenge";
|
|
170
|
-
}>;
|
|
171
|
-
auth: z.ZodOptional<z.ZodObject<{
|
|
172
|
-
requiredGrants: z.ZodArray<z.ZodString>;
|
|
173
|
-
issuers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
174
|
-
kid: z.ZodString;
|
|
175
|
-
alg: z.ZodLiteral<"EdDSA">;
|
|
176
|
-
publicKey: z.ZodString;
|
|
177
|
-
grantNamespaces: z.ZodArray<z.ZodString>;
|
|
178
|
-
}, z.core.$strip>>>;
|
|
179
|
-
acquire: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
180
|
-
type: z.ZodLiteral<"password">;
|
|
181
|
-
ref: z.ZodString;
|
|
182
|
-
transport: z.ZodEnum<{
|
|
183
|
-
basic: "basic";
|
|
184
|
-
form: "form";
|
|
185
|
-
}>;
|
|
186
|
-
username: z.ZodOptional<z.ZodString>;
|
|
187
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
188
|
-
type: z.ZodLiteral<"login">;
|
|
189
|
-
url: z.ZodString;
|
|
190
|
-
label: z.ZodOptional<z.ZodString>;
|
|
191
|
-
}, z.core.$strip>], "type">>>;
|
|
192
|
-
}, z.core.$strip>>;
|
|
193
|
-
managedBy: z.ZodOptional<z.ZodEnum<{
|
|
194
|
-
sharing: "sharing";
|
|
195
|
-
firewall: "firewall";
|
|
196
|
-
file_share: "file_share";
|
|
197
|
-
cast_reviewer: "cast_reviewer";
|
|
198
|
-
team_default: "team_default";
|
|
199
|
-
}>>;
|
|
200
|
-
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
201
|
-
reasonCode: z.ZodOptional<z.ZodString>;
|
|
202
|
-
message: z.ZodOptional<z.ZodString>;
|
|
203
|
-
}, z.core.$strip>>>;
|
|
204
|
-
}, z.core.$strip>;
|
|
205
165
|
export declare const spacePublishOptionsSchema: z.ZodObject<{
|
|
206
166
|
fingerprint: z.ZodOptional<z.ZodBoolean>;
|
|
207
167
|
}, z.core.$strip>;
|
|
208
168
|
export type SpacePublishOptions = z.infer<typeof spacePublishOptionsSchema>;
|
|
169
|
+
export declare const spaceConfigFileAccessSchema: z.ZodObject<{
|
|
170
|
+
public: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
171
|
+
}, z.core.$strict>;
|
|
172
|
+
export type SpaceConfigFileAccess = z.infer<typeof spaceConfigFileAccessSchema>;
|
|
173
|
+
/**
|
|
174
|
+
* Overrides for the worker `sf publish` compiles.
|
|
175
|
+
*
|
|
176
|
+
* Every field is optional because the normal case is detection: a project with
|
|
177
|
+
* `handler.ts` or an OpenNext build needs no configuration at all. These exist
|
|
178
|
+
* for the layouts detection cannot guess — a worker somewhere unusual, or a
|
|
179
|
+
* compatibility date the author wants pinned rather than defaulted.
|
|
180
|
+
*/
|
|
181
|
+
export declare const spaceFunctionsOptionsSchema: z.ZodObject<{
|
|
182
|
+
entry: z.ZodOptional<z.ZodString>;
|
|
183
|
+
database: z.ZodDefault<z.ZodBoolean>;
|
|
184
|
+
compatibilityDate: z.ZodOptional<z.ZodString>;
|
|
185
|
+
}, z.core.$strip>;
|
|
186
|
+
export type SpaceFunctionsOptions = z.infer<typeof spaceFunctionsOptionsSchema>;
|
|
209
187
|
export declare const spaceConfigFileSchema: z.ZodObject<{
|
|
210
188
|
index: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
211
189
|
fallback: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
@@ -270,7 +248,6 @@ export declare const spaceConfigFileSchema: z.ZodObject<{
|
|
|
270
248
|
timeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
271
249
|
}, z.core.$strict>>;
|
|
272
250
|
placement: z.ZodOptional<z.ZodObject<{
|
|
273
|
-
region: z.ZodOptional<z.ZodString>;
|
|
274
251
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
275
252
|
shared: "shared";
|
|
276
253
|
dedicated: "dedicated";
|
|
@@ -287,65 +264,17 @@ export declare const spaceConfigFileSchema: z.ZodObject<{
|
|
|
287
264
|
}, z.core.$strip>>;
|
|
288
265
|
$schema: z.ZodOptional<z.ZodString>;
|
|
289
266
|
space: z.ZodOptional<z.ZodString>;
|
|
290
|
-
access: z.ZodOptional<z.ZodObject<{
|
|
291
|
-
rules: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
292
|
-
id: z.ZodOptional<z.ZodString>;
|
|
293
|
-
match: z.ZodDefault<z.ZodObject<{
|
|
294
|
-
host: z.ZodOptional<z.ZodString>;
|
|
295
|
-
hostPattern: z.ZodOptional<z.ZodString>;
|
|
296
|
-
hostTemplate: z.ZodOptional<z.ZodString>;
|
|
297
|
-
pathPattern: z.ZodOptional<z.ZodString>;
|
|
298
|
-
channel: z.ZodOptional<z.ZodString>;
|
|
299
|
-
ipCidrs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
300
|
-
agent: z.ZodOptional<z.ZodString>;
|
|
301
|
-
country: z.ZodOptional<z.ZodString>;
|
|
302
|
-
header: z.ZodOptional<z.ZodObject<{
|
|
303
|
-
name: z.ZodString;
|
|
304
|
-
value: z.ZodString;
|
|
305
|
-
}, z.core.$strip>>;
|
|
306
|
-
}, z.core.$strip>>;
|
|
307
|
-
effect: z.ZodEnum<{
|
|
308
|
-
allow: "allow";
|
|
309
|
-
deny: "deny";
|
|
310
|
-
challenge: "challenge";
|
|
311
|
-
}>;
|
|
312
|
-
auth: z.ZodOptional<z.ZodObject<{
|
|
313
|
-
requiredGrants: z.ZodArray<z.ZodString>;
|
|
314
|
-
issuers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
315
|
-
kid: z.ZodString;
|
|
316
|
-
alg: z.ZodLiteral<"EdDSA">;
|
|
317
|
-
publicKey: z.ZodString;
|
|
318
|
-
grantNamespaces: z.ZodArray<z.ZodString>;
|
|
319
|
-
}, z.core.$strip>>>;
|
|
320
|
-
acquire: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
321
|
-
type: z.ZodLiteral<"password">;
|
|
322
|
-
ref: z.ZodString;
|
|
323
|
-
transport: z.ZodEnum<{
|
|
324
|
-
basic: "basic";
|
|
325
|
-
form: "form";
|
|
326
|
-
}>;
|
|
327
|
-
username: z.ZodOptional<z.ZodString>;
|
|
328
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
329
|
-
type: z.ZodLiteral<"login">;
|
|
330
|
-
url: z.ZodString;
|
|
331
|
-
label: z.ZodOptional<z.ZodString>;
|
|
332
|
-
}, z.core.$strip>], "type">>>;
|
|
333
|
-
}, z.core.$strip>>;
|
|
334
|
-
managedBy: z.ZodOptional<z.ZodEnum<{
|
|
335
|
-
sharing: "sharing";
|
|
336
|
-
firewall: "firewall";
|
|
337
|
-
file_share: "file_share";
|
|
338
|
-
cast_reviewer: "cast_reviewer";
|
|
339
|
-
team_default: "team_default";
|
|
340
|
-
}>>;
|
|
341
|
-
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
342
|
-
reasonCode: z.ZodOptional<z.ZodString>;
|
|
343
|
-
message: z.ZodOptional<z.ZodString>;
|
|
344
|
-
}, z.core.$strip>>>;
|
|
345
|
-
}, z.core.$strip>>;
|
|
346
267
|
publish: z.ZodOptional<z.ZodObject<{
|
|
347
268
|
fingerprint: z.ZodOptional<z.ZodBoolean>;
|
|
348
269
|
}, z.core.$strip>>;
|
|
270
|
+
access: z.ZodOptional<z.ZodObject<{
|
|
271
|
+
public: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
272
|
+
}, z.core.$strict>>;
|
|
273
|
+
functions: z.ZodOptional<z.ZodObject<{
|
|
274
|
+
entry: z.ZodOptional<z.ZodString>;
|
|
275
|
+
database: z.ZodDefault<z.ZodBoolean>;
|
|
276
|
+
compatibilityDate: z.ZodOptional<z.ZodString>;
|
|
277
|
+
}, z.core.$strip>>;
|
|
349
278
|
}, z.core.$strip>;
|
|
350
279
|
export type SpaceConfigFile = z.infer<typeof spaceConfigFileSchema>;
|
|
351
280
|
/**
|