@void/platform 1.4.0 → 1.6.0
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/browser-page.d.mts +1 -3
- package/dist/browser-page.mjs +1 -2
- package/dist/email-protocol.d.mts +1 -3
- package/dist/email-protocol.mjs +1 -2
- package/dist/index.d.mts +10 -20
- package/dist/index.mjs +30 -27
- package/dist/installer.d.mts +3 -3
- package/dist/installer.mjs +4 -3
- package/dist/plans.d.mts +1 -3
- package/dist/plans.mjs +2 -3
- package/dist/runtime/api/assets/admin/client.js +44 -42
- package/dist/runtime/api/assets/admin/style.css +1 -1
- package/dist/runtime/api/index.js +317 -305
- package/dist/runtime/dispatch/index.js +2 -2
- package/dist/runtime/drizzle/0063_oauth_refresh_tokens.sql +13 -0
- package/dist/runtime/drizzle/compatibility.json +12 -0
- package/dist/runtime/drizzle/meta/_journal.json +7 -0
- package/dist/runtime/emailGateway/index.js +5 -5
- package/dist/runtime/manifest.json +37 -18
- package/dist/runtime/proxy/index.js +5 -5
- package/dist/runtime/tail/index.js +1 -1
- package/dist/{validate-DbJR7Q0Z.mjs → validate-CTKcW3Vp.mjs} +1 -2
- package/package.json +4 -4
package/dist/browser-page.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/browser-page.d.ts
|
|
2
1
|
/** Shared, dependency-free presentation for browser onboarding and authentication pages. */
|
|
3
2
|
export declare const browserPageLogo: string;
|
|
4
3
|
export declare const browserPageStyles: string;
|
|
@@ -15,5 +14,4 @@ export declare function renderBrowserPage({ title, platformName, content }: {
|
|
|
15
14
|
platformName?: string;
|
|
16
15
|
content: string;
|
|
17
16
|
}): string;
|
|
18
|
-
export declare function browserPageLead(title: string, description: string): string;
|
|
19
|
-
//#endregion
|
|
17
|
+
export declare function browserPageLead(title: string, description: string): string;
|
package/dist/browser-page.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/browser-page.ts
|
|
2
2
|
/** Shared, dependency-free presentation for browser onboarding and authentication pages. */
|
|
3
3
|
const browserPageLogo = "<svg role=\"img\" aria-label=\"Void\" viewBox=\"0 0 270 58\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<circle cx=\"262\" cy=\"48.96\" r=\"8\" fill=\"currentColor\"/>\n<path d=\"M20.72 0.959999L35.52 41.28L50.08 0.959999H70L47.92 56.96H22.32L0.24 0.959999H20.72ZM106.542 57.92C82.9419 57.92 70.6219 48 70.6219 28.96C70.6219 9.92 82.9419 1.90735e-06 106.542 1.90735e-06C130.142 1.90735e-06 142.542 9.92 142.542 28.96C142.542 48 130.142 57.92 106.542 57.92ZM106.542 44.08C117.662 44.08 122.862 39.36 122.862 28.96C122.862 18.48 117.662 13.76 106.542 13.76C95.4219 13.76 90.2219 18.48 90.2219 28.96C90.2219 39.36 95.4219 44.08 106.542 44.08ZM152.265 56.96V0.959999H171.465V56.96H152.265ZM184.687 56.96V0.959999H219.887C239.327 0.959999 250.447 9.84 250.447 28.96C250.447 48.16 239.247 56.96 219.807 56.96H184.687ZM230.767 28.96C230.767 18.48 226.287 14.56 217.167 14.56H203.887V43.36H217.167C226.287 43.36 230.767 39.44 230.767 28.96Z\" fill=\"currentColor\"/>\n</svg>";
|
|
4
4
|
const browserPageStyles = `
|
|
@@ -87,5 +87,4 @@ function renderBrowserPage({ title, platformName = "Void", content }) {
|
|
|
87
87
|
function browserPageLead(title, description) {
|
|
88
88
|
return "<div class=\"void-auth-lead\"><h1 id=\"void-auth-title\">" + escapeBrowserHtml(title) + "</h1><p>" + escapeBrowserHtml(description) + "</p></div>";
|
|
89
89
|
}
|
|
90
|
-
//#endregion
|
|
91
90
|
export { browserPageIdentity, browserPageLead, browserPageLogo, browserPageStatus, browserPageStyles, escapeBrowserHtml, renderBrowserPage };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/email-protocol.d.ts
|
|
2
1
|
/** Worker-safe wire contract shared by the platform gateway and tenant entry. */
|
|
3
2
|
export declare const EMAIL_PROTOCOL_VERSION = 1;
|
|
4
3
|
export declare const EMAIL_RECEIPT_PATH = "/__void/email/receipt/v1";
|
|
@@ -44,5 +43,4 @@ export declare function signEmailReceipt(claims: EmailReceiptClaims, signingSecr
|
|
|
44
43
|
export declare function verifyEmailReceipt(token: string, signingSecret: string, expected: Pick<EmailReceiptClaims, "projectId" | "deploymentId" | "recipient">, now?: number): Promise<EmailReceiptClaims | null>;
|
|
45
44
|
export declare function encodeEmailActions(actions: ReadonlyArray<EmailWireAction>): ReadableStream<Uint8Array>;
|
|
46
45
|
/** Read each frame with fixed ceilings before parsing metadata or allocating a reply. */
|
|
47
|
-
export declare function readEmailActions(stream: ReadableStream<Uint8Array>, deadlineMs?: number): Promise<Array<EmailWireAction>>;
|
|
48
|
-
//#endregion
|
|
46
|
+
export declare function readEmailActions(stream: ReadableStream<Uint8Array>, deadlineMs?: number): Promise<Array<EmailWireAction>>;
|
package/dist/email-protocol.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/email-protocol.ts
|
|
2
2
|
/** Worker-safe wire contract shared by the platform gateway and tenant entry. */
|
|
3
3
|
const EMAIL_PROTOCOL_VERSION = 1;
|
|
4
4
|
const EMAIL_RECEIPT_PATH = "/__void/email/receipt/v1";
|
|
@@ -268,5 +268,4 @@ async function withReader(stream, read) {
|
|
|
268
268
|
} catch {}
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
|
-
//#endregion
|
|
272
271
|
export { EMAIL_MAX_ACTIONS, EMAIL_MAX_INBOUND_BYTES, EMAIL_MAX_INBOUND_HEADERS, EMAIL_MAX_INBOUND_HEADER_BYTES, EMAIL_MAX_METADATA_BYTES, EMAIL_MAX_REPLY_BYTES, EMAIL_MAX_RESPONSE_BYTES, EMAIL_PROTOCOL_VERSION, EMAIL_RECEIPT_PATH, encodeEmailActions, encodeEmailEnvelope, readEmailActions, readEmailEnvelope, signEmailReceipt, verifyEmailReceipt };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { BUILD_INSTANCE_FREE, BUILD_INSTANCE_LARGE, BuildInstanceType, BuiltinPlanId, EditablePlanLimit, PLAN_EDITABLE_LIMIT_KEYS, PLAN_LIMITS, PlanId, PlanLimits, PlanLimitsPatch, PlatformPlanCatalog, PlatformPlanDefinition, PlatformPlanReconciliation, createDefaultPlanCatalog, parseBuildInstanceType, parsePlanLimitsPatch, parsePlanName, parsePlatformPlanCatalog, parsePlatformPlanId, validatePlanLimits } from "./plans.mjs";
|
|
2
|
-
//#region src/access-policy.d.ts
|
|
3
2
|
/** An exact email domain, such as `example.com`, without wildcards or an `@`. */
|
|
4
3
|
export declare function isPlatformAccessEmailDomain(value: unknown): value is string;
|
|
5
4
|
/** Whether signing in with this Access identity provider proves a company identity. */
|
|
@@ -13,8 +12,6 @@ export declare function isPlatformAccessCompanyIdentityProvider(provider: Readon
|
|
|
13
12
|
* names, so it counts only when `companyLoginMethod` accepts that provider ID.
|
|
14
13
|
*/
|
|
15
14
|
export declare function isPlatformAccessIdentityRule(rule: Readonly<Record<string, unknown>>, companyLoginMethod: (identityProviderId: string) => boolean): boolean;
|
|
16
|
-
//#endregion
|
|
17
|
-
//#region src/app-access.d.ts
|
|
18
15
|
export declare const PLATFORM_APP_ACCESS_SETUP_PROOF_PREFIX = "void-platform-app-access-v1";
|
|
19
16
|
/** Uninstall handoff that turns off installer-managed project Zero Trust before any user exists. */
|
|
20
17
|
export declare const PLATFORM_APP_ACCESS_TURN_OFF_PROOF_PREFIX = "void-platform-app-access-turn-off-v1";
|
|
@@ -29,8 +26,6 @@ type PlatformAppAccessSetup = Readonly<{
|
|
|
29
26
|
policyIds: ReadonlyArray<string>;
|
|
30
27
|
}>;
|
|
31
28
|
export declare function parsePlatformAppAccessSetup(value: unknown): PlatformAppAccessSetup;
|
|
32
|
-
//#endregion
|
|
33
|
-
//#region src/authentication-recovery.d.ts
|
|
34
29
|
/** Owner recovery capabilities authorize a provider test, never a platform session. */
|
|
35
30
|
type PlatformAuthenticationRecovery = Readonly<{
|
|
36
31
|
installationId: string;
|
|
@@ -43,8 +38,6 @@ type PlatformAuthenticationRecovery = Readonly<{
|
|
|
43
38
|
signature: string;
|
|
44
39
|
}>;
|
|
45
40
|
export declare function platformAuthenticationRecoveryMessage(value: Omit<PlatformAuthenticationRecovery, "signature">): string;
|
|
46
|
-
//#endregion
|
|
47
|
-
//#region src/authentication.d.ts
|
|
48
41
|
/** Platform login and perimeter configuration are independent of app authentication. */
|
|
49
42
|
export declare const PLATFORM_LOGIN_KINDS: readonly ["github", "google", "oidc", "cloudflare-access"];
|
|
50
43
|
type PlatformLoginKind = (typeof PLATFORM_LOGIN_KINDS)[number];
|
|
@@ -141,8 +134,6 @@ export declare function parsePlatformAccessProtection(value: unknown): PlatformA
|
|
|
141
134
|
export declare function parsePlatformAdmissionPolicy(value: unknown): PlatformAdmissionPolicy;
|
|
142
135
|
/** Run inside the settings mutation transaction, using the resulting enabled connections. */
|
|
143
136
|
export declare function validatePlatformAdmissionPolicy(policy: PlatformAdmissionPolicy, enabledConnections: ReadonlyArray<PlatformLoginConfiguration>, protection: PlatformAccessProtection | null): void;
|
|
144
|
-
//#endregion
|
|
145
|
-
//#region src/application.d.ts
|
|
146
137
|
/** Public application addressing, independent of the platform API's origin. */
|
|
147
138
|
type PlatformApplication = Readonly<{
|
|
148
139
|
baseDomain: string;
|
|
@@ -190,8 +181,6 @@ export declare const PLATFORM_HEALTH_HOSTNAME_LABEL = "void-platform-health";
|
|
|
190
181
|
export declare function platformHealthHostname(application: PlatformApplication): string | null;
|
|
191
182
|
export declare function platformProjectHostname(project: PlatformApplicationProject, application: PlatformApplication): string;
|
|
192
183
|
export declare function platformProjectHostnames(project: PlatformApplicationProject, application: PlatformApplication): ReadonlyArray<string>;
|
|
193
|
-
//#endregion
|
|
194
|
-
//#region src/manifest.d.ts
|
|
195
184
|
export declare const PLATFORM_DEPLOYMENT_SCHEMA_VERSION: 1;
|
|
196
185
|
type PlatformCapabilities = Readonly<{
|
|
197
186
|
ai: boolean;
|
|
@@ -231,6 +220,11 @@ type PlatformResourceNames = Readonly<{
|
|
|
231
220
|
usageQueue: string;
|
|
232
221
|
}>;
|
|
233
222
|
type PlatformAppAccess = "public" | "platform" | "custom";
|
|
223
|
+
/**
|
|
224
|
+
* `minimal` keeps request URLs, console messages and exception messages out of
|
|
225
|
+
* Workers Logs and the platform's request log rows. Omitted means `full`.
|
|
226
|
+
*/
|
|
227
|
+
type PlatformRuntimeLogs = "minimal";
|
|
234
228
|
type PlatformDeploymentManifest = Readonly<{
|
|
235
229
|
/** Initial app-access choice. Omitted on installations created before guided setup. */
|
|
236
230
|
appAccess?: PlatformAppAccess;
|
|
@@ -249,7 +243,9 @@ type PlatformDeploymentManifest = Readonly<{
|
|
|
249
243
|
displayName: string;
|
|
250
244
|
installationSlug: string;
|
|
251
245
|
resources: PlatformResourceNames;
|
|
252
|
-
|
|
246
|
+
/** Requires schema version 5, so an older CLI refuses the manifest instead of dropping it. */
|
|
247
|
+
runtimeLogs?: PlatformRuntimeLogs;
|
|
248
|
+
schemaVersion: typeof PLATFORM_DEPLOYMENT_SCHEMA_VERSION | 2 | 3 | 4 | 5;
|
|
253
249
|
}>;
|
|
254
250
|
type PlatformDeploymentManifestInput = Readonly<{
|
|
255
251
|
appAccess?: PlatformAppAccess;
|
|
@@ -272,6 +268,7 @@ type PlatformDeploymentManifestInput = Readonly<{
|
|
|
272
268
|
displayName: string;
|
|
273
269
|
installationSlug: string;
|
|
274
270
|
resources?: Partial<PlatformResourceNames>;
|
|
271
|
+
runtimeLogs?: PlatformRuntimeLogs;
|
|
275
272
|
}>;
|
|
276
273
|
type PlatformApplicationRoute = Readonly<{
|
|
277
274
|
pattern: string;
|
|
@@ -285,8 +282,6 @@ export declare function createPlatformResourceNames(installationSlug: string): P
|
|
|
285
282
|
export declare function createApplicationRoutes(application: PlatformDeploymentManifest["application"]): ReadonlyArray<PlatformApplicationRoute>;
|
|
286
283
|
export declare function createPlatformDeploymentManifest(input: PlatformDeploymentManifestInput): PlatformDeploymentManifest;
|
|
287
284
|
export declare function parsePlatformDeploymentManifest(value: unknown): PlatformDeploymentManifest;
|
|
288
|
-
//#endregion
|
|
289
|
-
//#region src/installation.d.ts
|
|
290
285
|
export declare const PLATFORM_INSTALLATION_SCHEMA_VERSION: 1;
|
|
291
286
|
export declare const PLATFORM_DISABLED_KEY = "__void/platform/disabled/v1";
|
|
292
287
|
export declare const PLATFORM_DISABLED_VALUE = "disabled";
|
|
@@ -415,8 +410,6 @@ export declare function transitionInstallation(manifest: PlatformInstallationMan
|
|
|
415
410
|
export declare function recordInstallationResource(manifest: PlatformInstallationManifest, resource: InstallationResource, updatedAt: string): PlatformInstallationManifest;
|
|
416
411
|
export declare function recordInstallationStep(manifest: PlatformInstallationManifest, step: InstallationStep, updatedAt: string): PlatformInstallationManifest;
|
|
417
412
|
export declare function parsePlatformInstallationManifest(value: unknown): PlatformInstallationManifest;
|
|
418
|
-
//#endregion
|
|
419
|
-
//#region src/discovery.d.ts
|
|
420
413
|
export declare const PLATFORM_DISCOVERY_SCHEMA_VERSION: 1;
|
|
421
414
|
type PlatformAuthenticationDiscovery = Readonly<{
|
|
422
415
|
methods: ReadonlyArray<PlatformLoginDescriptor>;
|
|
@@ -452,8 +445,6 @@ type PlatformDiscoveryInput = Omit<PlatformDiscoveryDocument, "directWorkerUploa
|
|
|
452
445
|
*/
|
|
453
446
|
export declare function createPlatformDiscoveryDocument(input: PlatformDiscoveryInput): PlatformDiscoveryDocument;
|
|
454
447
|
export declare function parsePlatformDiscoveryDocument(value: unknown): PlatformDiscoveryDocument;
|
|
455
|
-
//#endregion
|
|
456
|
-
//#region src/worker-config.d.ts
|
|
457
448
|
type PlatformProvisionedResourceIds = Readonly<{
|
|
458
449
|
hyperdrive: string;
|
|
459
450
|
isrCacheKv: string;
|
|
@@ -482,5 +473,4 @@ export declare function createPlatformWorkerConfigs(input: {
|
|
|
482
473
|
runtimeApiAssetsDirectory?: string;
|
|
483
474
|
trafficState?: "enabled" | "sandbox-drain" | "staging";
|
|
484
475
|
}): PlatformWorkerConfigSet;
|
|
485
|
-
|
|
486
|
-
export { BUILD_INSTANCE_FREE, BUILD_INSTANCE_LARGE, BuildInstanceType, BuiltinPlanId, EditablePlanLimit, type InstallationResource, type InstallationResourceKind, type InstallationStatus, type InstallationStep, PLAN_EDITABLE_LIMIT_KEYS, PLAN_LIMITS, PlanId, PlanLimits, PlanLimitsPatch, type PlatformAccessProtection, type PlatformAdmissionPolicy, type PlatformAppAccess, type PlatformAppAccessSetup, type PlatformApplication, type PlatformApplicationProject, type PlatformApplicationRoute, type PlatformAuthenticationDiscovery, type PlatformAuthenticationRecovery, type PlatformAuthenticationSetup, type PlatformCapabilities, type PlatformControlPlane, type PlatformDeploymentManifest, type PlatformDeploymentManifestInput, type PlatformDiscoveryDocument, type PlatformInstallationEndpoints, type PlatformInstallationManifest, type PlatformLifecycleOperation, type PlatformLoginConfiguration, type PlatformLoginDescriptor, type PlatformLoginKind, PlatformPlanCatalog, PlatformPlanDefinition, PlatformPlanReconciliation, type PlatformProvisionedResourceIds, type PlatformResourceNames, type PlatformResourceOwnershipMarker, type PlatformRuntimeProvenance, type PlatformSignupAllowlistEntry, type PlatformSignupIdentity, type PlatformWorkerConfigSet, type ResourceOwnership, createDefaultPlanCatalog, parseBuildInstanceType, parsePlanLimitsPatch, parsePlanName, parsePlatformPlanCatalog, parsePlatformPlanId, validatePlanLimits };
|
|
476
|
+
export { BUILD_INSTANCE_FREE, BUILD_INSTANCE_LARGE, BuildInstanceType, BuiltinPlanId, EditablePlanLimit, type InstallationResource, type InstallationResourceKind, type InstallationStatus, type InstallationStep, PLAN_EDITABLE_LIMIT_KEYS, PLAN_LIMITS, PlanId, PlanLimits, PlanLimitsPatch, type PlatformAccessProtection, type PlatformAdmissionPolicy, type PlatformAppAccess, type PlatformAppAccessSetup, type PlatformApplication, type PlatformApplicationProject, type PlatformApplicationRoute, type PlatformAuthenticationDiscovery, type PlatformAuthenticationRecovery, type PlatformAuthenticationSetup, type PlatformCapabilities, type PlatformControlPlane, type PlatformDeploymentManifest, type PlatformDeploymentManifestInput, type PlatformDiscoveryDocument, type PlatformInstallationEndpoints, type PlatformInstallationManifest, type PlatformLifecycleOperation, type PlatformLoginConfiguration, type PlatformLoginDescriptor, type PlatformLoginKind, PlatformPlanCatalog, PlatformPlanDefinition, PlatformPlanReconciliation, type PlatformProvisionedResourceIds, type PlatformResourceNames, type PlatformResourceOwnershipMarker, type PlatformRuntimeLogs, type PlatformRuntimeProvenance, type PlatformSignupAllowlistEntry, type PlatformSignupIdentity, type PlatformWorkerConfigSet, type ResourceOwnership, createDefaultPlanCatalog, parseBuildInstanceType, parsePlanLimitsPatch, parsePlanName, parsePlatformPlanCatalog, parsePlatformPlanId, validatePlanLimits };
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as isSourceRevision, c as requiredString, i as isSandboxDrainProtocol, n as isPrintableText, o as isUsageProtocolVersion, s as record, t as assertRecord } from "./validate-
|
|
1
|
+
import { a as isSourceRevision, c as requiredString, i as isSandboxDrainProtocol, n as isPrintableText, o as isUsageProtocolVersion, s as record, t as assertRecord } from "./validate-CTKcW3Vp.mjs";
|
|
2
2
|
import { BUILD_INSTANCE_FREE, BUILD_INSTANCE_LARGE, PLAN_EDITABLE_LIMIT_KEYS, PLAN_LIMITS, createDefaultPlanCatalog, parseBuildInstanceType, parsePlanLimitsPatch, parsePlanName, parsePlatformPlanCatalog, parsePlatformPlanId, validatePlanLimits } from "./plans.mjs";
|
|
3
|
-
|
|
3
|
+
// src/access-policy.ts
|
|
4
4
|
const COMPANY_IDENTITY_RULES = [
|
|
5
5
|
"email_list",
|
|
6
6
|
"gsuite",
|
|
@@ -52,8 +52,7 @@ function isPlatformAccessIdentityRule(rule, companyLoginMethod) {
|
|
|
52
52
|
return plainObject(value) && Object.keys(value).length > 0;
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
|
-
|
|
56
|
-
//#region src/app-access.ts
|
|
55
|
+
// src/app-access.ts
|
|
57
56
|
const PLATFORM_APP_ACCESS_SETUP_PROOF_PREFIX = "void-platform-app-access-v1";
|
|
58
57
|
/** Uninstall handoff that turns off installer-managed project Zero Trust before any user exists. */
|
|
59
58
|
const PLATFORM_APP_ACCESS_TURN_OFF_PROOF_PREFIX = "void-platform-app-access-turn-off-v1";
|
|
@@ -81,8 +80,7 @@ function parsePlatformAppAccessSetup(value) {
|
|
|
81
80
|
policyIds
|
|
82
81
|
};
|
|
83
82
|
}
|
|
84
|
-
|
|
85
|
-
//#region src/authentication-recovery.ts
|
|
83
|
+
// src/authentication-recovery.ts
|
|
86
84
|
function platformAuthenticationRecoveryMessage(value) {
|
|
87
85
|
return JSON.stringify([
|
|
88
86
|
"void-platform-auth-recovery-v1",
|
|
@@ -95,8 +93,7 @@ function platformAuthenticationRecoveryMessage(value) {
|
|
|
95
93
|
value.expiresAt
|
|
96
94
|
]);
|
|
97
95
|
}
|
|
98
|
-
|
|
99
|
-
//#region src/authentication.ts
|
|
96
|
+
// src/authentication.ts
|
|
100
97
|
/** Platform login and perimeter configuration are independent of app authentication. */
|
|
101
98
|
const PLATFORM_LOGIN_KINDS = [
|
|
102
99
|
"github",
|
|
@@ -296,8 +293,7 @@ function validatePlatformAdmissionPolicy(policy, enabledConnections, protection)
|
|
|
296
293
|
if (connection.kind === "github" || connection.kind === "google" && connection.allowedDomains.length === 0) throw new Error("Unrestricted social login does not establish company membership.");
|
|
297
294
|
}
|
|
298
295
|
}
|
|
299
|
-
|
|
300
|
-
//#region src/manifest.ts
|
|
296
|
+
// src/manifest.ts
|
|
301
297
|
const PLATFORM_DEPLOYMENT_SCHEMA_VERSION = 1;
|
|
302
298
|
const CORE_CAPABILITIES = {
|
|
303
299
|
ai: true,
|
|
@@ -415,6 +411,7 @@ function createPlatformDeploymentManifest(input) {
|
|
|
415
411
|
"platform",
|
|
416
412
|
"custom"
|
|
417
413
|
].includes(input.appAccess)) throw new Error("appAccess must be public, platform, or custom.");
|
|
414
|
+
if (input.runtimeLogs !== void 0 && input.runtimeLogs !== "minimal") throw new Error("runtimeLogs must be minimal when set.");
|
|
418
415
|
const providers = input.authentication?.providers ?? ["github"];
|
|
419
416
|
if (providers.some((provider) => !PLATFORM_LOGIN_KINDS.includes(provider)) || new Set(providers).size !== providers.length) throw new Error("Authentication providers must be unique supported login kinds.");
|
|
420
417
|
const configurable = input.authentication?.configurable === true || input.authentication?.accessProtection === true || providers.some((provider) => provider === "oidc" || provider === "cloudflare-access");
|
|
@@ -450,7 +447,8 @@ function createPlatformDeploymentManifest(input) {
|
|
|
450
447
|
displayName: requiredString(input.displayName, "displayName").trim(),
|
|
451
448
|
installationSlug,
|
|
452
449
|
resources,
|
|
453
|
-
|
|
450
|
+
...input.runtimeLogs ? { runtimeLogs: input.runtimeLogs } : {},
|
|
451
|
+
schemaVersion: input.runtimeLogs ? 5 : input.appAccess !== void 0 ? 4 : configurable ? 3 : workersDev ? 2 : 1
|
|
454
452
|
};
|
|
455
453
|
createApplicationRoutes(manifest.application);
|
|
456
454
|
for (const [key, value] of Object.entries(manifest.controlPlane)) {
|
|
@@ -466,7 +464,7 @@ function createPlatformDeploymentManifest(input) {
|
|
|
466
464
|
}
|
|
467
465
|
function parsePlatformDeploymentManifest(value) {
|
|
468
466
|
assertRecord(value, "Platform deployment manifest");
|
|
469
|
-
if (value.schemaVersion !== 1 && value.schemaVersion !== 2 && value.schemaVersion !== 3 && value.schemaVersion !== 4) throw new Error(`Unsupported platform deployment schema version: ${String(value.schemaVersion)}.`);
|
|
467
|
+
if (value.schemaVersion !== 1 && value.schemaVersion !== 2 && value.schemaVersion !== 3 && value.schemaVersion !== 4 && value.schemaVersion !== 5) throw new Error(`Unsupported platform deployment schema version: ${String(value.schemaVersion)}.`);
|
|
470
468
|
const application = value.application;
|
|
471
469
|
const authentication = value.authentication;
|
|
472
470
|
const rawCapabilities = value.capabilities;
|
|
@@ -474,7 +472,7 @@ function parsePlatformDeploymentManifest(value) {
|
|
|
474
472
|
const rawResources = value.resources;
|
|
475
473
|
assertRecord(application, "application");
|
|
476
474
|
let workersDev;
|
|
477
|
-
if (value.schemaVersion === 2 || (value.schemaVersion
|
|
475
|
+
if (value.schemaVersion === 2 || Number(value.schemaVersion) >= 3 && application.workersDev !== void 0) {
|
|
478
476
|
assertRecord(application.workersDev, "application.workersDev");
|
|
479
477
|
workersDev = {
|
|
480
478
|
subdomain: requiredString(application.workersDev.subdomain, "workersDev.subdomain"),
|
|
@@ -493,14 +491,19 @@ function parsePlatformDeploymentManifest(value) {
|
|
|
493
491
|
capabilities[key] = entry;
|
|
494
492
|
}
|
|
495
493
|
const providers = authentication.providers;
|
|
496
|
-
if (!Array.isArray(providers) || providers.some((provider) => !PLATFORM_LOGIN_KINDS.includes(provider) || value.schemaVersion
|
|
497
|
-
if (value.schemaVersion === 3 && authentication.configurable !== true || value.schemaVersion
|
|
494
|
+
if (!Array.isArray(providers) || providers.some((provider) => !PLATFORM_LOGIN_KINDS.includes(provider) || Number(value.schemaVersion) < 3 && provider !== "github" && provider !== "google")) throw new Error("authentication.providers must contain only github or google.");
|
|
495
|
+
if (value.schemaVersion === 3 && authentication.configurable !== true || Number(value.schemaVersion) < 3 && (authentication.configurable !== void 0 || authentication.accessProtection !== void 0) || authentication.accessProtection !== void 0 && authentication.accessProtection !== true) throw new Error("Configurable authentication requires deployment schema version 3.");
|
|
498
496
|
if (value.schemaVersion === 4 ? ![
|
|
499
497
|
"public",
|
|
500
498
|
"platform",
|
|
501
499
|
"custom"
|
|
500
|
+
].includes(String(value.appAccess)) : value.schemaVersion === 5 ? value.appAccess !== void 0 && ![
|
|
501
|
+
"public",
|
|
502
|
+
"platform",
|
|
503
|
+
"custom"
|
|
502
504
|
].includes(String(value.appAccess)) : value.appAccess !== void 0) throw new Error("Guided app access requires deployment schema version 4 and a valid appAccess choice.");
|
|
503
505
|
if (authentication.configurable !== void 0 && authentication.configurable !== true) throw new Error("Invalid configurable authentication flag.");
|
|
506
|
+
if (value.schemaVersion === 5 ? value.runtimeLogs !== "minimal" : value.runtimeLogs !== void 0) throw new Error("Minimal runtime logs require deployment schema version 5.");
|
|
504
507
|
const resourceDefaults = createPlatformResourceNames(requiredString(value.installationSlug, "installationSlug"));
|
|
505
508
|
const resources = {};
|
|
506
509
|
for (const key of Object.keys(resourceDefaults)) resources[key] = requiredString(rawResources[key] ?? (key === "emailGatewayWorker" || key === "deploymentQueue" ? resourceDefaults[key] : void 0), `resources.${key}`);
|
|
@@ -509,7 +512,7 @@ function parsePlatformDeploymentManifest(value) {
|
|
|
509
512
|
return hostname === null ? null : requiredString(hostname, `controlPlane.${key}`);
|
|
510
513
|
};
|
|
511
514
|
return createPlatformDeploymentManifest({
|
|
512
|
-
...value.schemaVersion
|
|
515
|
+
...Number(value.schemaVersion) >= 4 && value.appAccess !== void 0 ? { appAccess: value.appAccess } : {},
|
|
513
516
|
application: {
|
|
514
517
|
baseDomain: requiredString(application.baseDomain, "application.baseDomain"),
|
|
515
518
|
dedicatedZone: application.dedicatedZone === true,
|
|
@@ -533,11 +536,11 @@ function parsePlatformDeploymentManifest(value) {
|
|
|
533
536
|
},
|
|
534
537
|
displayName: requiredString(value.displayName, "displayName"),
|
|
535
538
|
installationSlug: requiredString(value.installationSlug, "installationSlug"),
|
|
536
|
-
resources
|
|
539
|
+
resources,
|
|
540
|
+
...value.schemaVersion === 5 ? { runtimeLogs: "minimal" } : {}
|
|
537
541
|
});
|
|
538
542
|
}
|
|
539
|
-
|
|
540
|
-
//#region src/installation.ts
|
|
543
|
+
// src/installation.ts
|
|
541
544
|
const PLATFORM_INSTALLATION_SCHEMA_VERSION = 1;
|
|
542
545
|
const PLATFORM_DISABLED_KEY = "__void/platform/disabled/v1";
|
|
543
546
|
const PLATFORM_DISABLED_VALUE = "disabled";
|
|
@@ -909,8 +912,7 @@ function parsePlatformRuntimeProvenance(value) {
|
|
|
909
912
|
sourceRevision
|
|
910
913
|
};
|
|
911
914
|
}
|
|
912
|
-
|
|
913
|
-
//#region src/application.ts
|
|
915
|
+
// src/application.ts
|
|
914
916
|
/** Minimal public-origin adapter; request policy remains in the service-bound dispatcher. */
|
|
915
917
|
const PLATFORM_PROJECT_INGRESS_SOURCE = `export default {
|
|
916
918
|
fetch(request, env) {
|
|
@@ -987,8 +989,7 @@ function platformProjectHostname(project, application) {
|
|
|
987
989
|
function platformProjectHostnames(project, application) {
|
|
988
990
|
return [.../* @__PURE__ */ new Set([platformProjectHostname(project, application), ...application.workersDev ? [platformProjectWorkersDevHostname(project, application.workersDev)] : []])];
|
|
989
991
|
}
|
|
990
|
-
|
|
991
|
-
//#region src/discovery.ts
|
|
992
|
+
// src/discovery.ts
|
|
992
993
|
const PLATFORM_DISCOVERY_SCHEMA_VERSION = 1;
|
|
993
994
|
function normalizeOrigin(value, name) {
|
|
994
995
|
let url;
|
|
@@ -1111,8 +1112,7 @@ function parseAuthentication(value) {
|
|
|
1111
1112
|
...authentication.setupPending === true ? { setupPending: true } : {}
|
|
1112
1113
|
};
|
|
1113
1114
|
}
|
|
1114
|
-
|
|
1115
|
-
//#region src/worker-config.ts
|
|
1115
|
+
// src/worker-config.ts
|
|
1116
1116
|
function createPlatformWorkerConfigs(input) {
|
|
1117
1117
|
const { accountId, apiUrl, deployment, healthProbeToken, installationId, ownershipNonce, platformVersion, proxyUrl, emailGatewayUrl, resources, runtimeEntrypoints } = input;
|
|
1118
1118
|
const publicEndpoints = input.publicEndpoints ?? true;
|
|
@@ -1134,10 +1134,11 @@ function createPlatformWorkerConfigs(input) {
|
|
|
1134
1134
|
resourceKind: "worker",
|
|
1135
1135
|
resourceName
|
|
1136
1136
|
})) });
|
|
1137
|
+
const runtimeLogs = deployment.runtimeLogs ? { PLATFORM_RUNTIME_LOGS: deployment.runtimeLogs } : {};
|
|
1137
1138
|
const common = {
|
|
1138
1139
|
account_id: accountId,
|
|
1139
1140
|
compatibility_date: "2026-02-24",
|
|
1140
|
-
observability: { enabled:
|
|
1141
|
+
observability: { enabled: !deployment.runtimeLogs },
|
|
1141
1142
|
preview_urls: publicEndpoints && !deployment.authentication.accessProtection,
|
|
1142
1143
|
workers_dev: publicEndpoints
|
|
1143
1144
|
};
|
|
@@ -1283,6 +1284,7 @@ function createPlatformWorkerConfigs(input) {
|
|
|
1283
1284
|
PLATFORM_HEALTH_PROBE_TOKEN: healthProbeToken,
|
|
1284
1285
|
...deployment.appAccess ? { PLATFORM_APP_ACCESS: deployment.appAccess } : {},
|
|
1285
1286
|
PLATFORM_INSTALLATION_ID: installationId,
|
|
1287
|
+
...runtimeLogs,
|
|
1286
1288
|
PLATFORM_TRAFFIC_STATE: trafficState,
|
|
1287
1289
|
...ownershipVars("api-worker", names.apiWorker),
|
|
1288
1290
|
PLATFORM_VERSION: platformVersion,
|
|
@@ -1378,6 +1380,7 @@ function createPlatformWorkerConfigs(input) {
|
|
|
1378
1380
|
}],
|
|
1379
1381
|
vars: {
|
|
1380
1382
|
PLATFORM_DISPATCH_WORKER_NAME: names.dispatchWorker,
|
|
1383
|
+
...runtimeLogs,
|
|
1381
1384
|
...ownershipVars("tail-worker", names.tailWorker)
|
|
1382
1385
|
}
|
|
1383
1386
|
},
|
|
@@ -1415,10 +1418,10 @@ function createPlatformWorkerConfigs(input) {
|
|
|
1415
1418
|
PLATFORM_HEALTH_PROBE_TOKEN: healthProbeToken,
|
|
1416
1419
|
PLATFORM_INSTALLATION_ID: installationId,
|
|
1417
1420
|
PLATFORM_TRAFFIC_STATE: trafficState,
|
|
1421
|
+
...runtimeLogs,
|
|
1418
1422
|
...ownershipVars("dispatch-worker", names.dispatchWorker)
|
|
1419
1423
|
}
|
|
1420
1424
|
}
|
|
1421
1425
|
};
|
|
1422
1426
|
}
|
|
1423
|
-
//#endregion
|
|
1424
1427
|
export { BUILD_INSTANCE_FREE, BUILD_INSTANCE_LARGE, DEFAULT_PLATFORM_SESSION_SECONDS, GOOGLE_OIDC_ISSUER, PLAN_EDITABLE_LIMIT_KEYS, PLAN_LIMITS, PLATFORM_APPLICATION_KEY, PLATFORM_APP_ACCESS_SETUP_PROOF_PREFIX, PLATFORM_APP_ACCESS_TURN_OFF_PROOF_PREFIX, PLATFORM_AUTH_SETUP_PROOF_PREFIX, PLATFORM_DEPLOYMENT_SCHEMA_VERSION, PLATFORM_DISABLED_KEY, PLATFORM_DISABLED_VALUE, PLATFORM_DISCOVERY_SCHEMA_VERSION, PLATFORM_HEALTH_HOSTNAME_LABEL, PLATFORM_INSTALLATION_SCHEMA_VERSION, PLATFORM_LOGIN_KINDS, PLATFORM_PROJECT_INGRESS_SOURCE, PLATFORM_R2_OWNERSHIP_MARKER_KEY, PLATFORM_REMOTE_INSTALLATION_MANIFEST_KEY, PLATFORM_RESOURCE_OWNERSHIP_SCHEMA_VERSION, PLATFORM_SANDBOX_DRAIN_KEY, PLATFORM_USAGE_PROTOCOL_VERSION, createApplicationRoutes, createDefaultPlanCatalog, createPlatformDeploymentManifest, createPlatformDiscoveryDocument, createPlatformInstallationManifest, createPlatformResourceNames, createPlatformResourceOwnershipMarker, createPlatformWorkerConfigs, isPlatformAccessCompanyIdentityProvider, isPlatformAccessEmailDomain, isPlatformAccessIdentityRule, isPlatformSignupAllowed, normalizeApplicationDomain, normalizeInstallationSlug, normalizePlatformDashboardUrl, parseBuildInstanceType, parsePlanLimitsPatch, parsePlanName, parsePlatformAccessProtection, parsePlatformAdmissionPolicy, parsePlatformAppAccessSetup, parsePlatformAuthenticationSetup, parsePlatformDeploymentManifest, parsePlatformDiscoveryDocument, parsePlatformIdentityUrl, parsePlatformInstallationManifest, parsePlatformLifecycleOperation, parsePlatformLoginConfiguration, parsePlatformLoginDescriptor, parsePlatformLoginId, parsePlatformPlanCatalog, parsePlatformPlanId, parsePlatformResourceOwnershipMarker, parsePlatformSignupAllowlistEntry, platformAuthenticationRecoveryMessage, platformDashboardUrl, platformHealthHostname, platformProjectHostname, platformProjectHostnames, platformProjectIngressName, platformProjectIngressPrefix, platformProjectWorkersDevHostname, platformProtectionProofMessage, platformWorkersDevAliasKey, readPlatformApplication, recordInstallationResource, recordInstallationStep, resolvePlatformApplicationEnvironment, setInstallationDesiredState, setInstallationEndpoints, transitionInstallation, validatePlanLimits, validatePlatformAdmissionPolicy };
|
package/dist/installer.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/installer.d.ts
|
|
2
1
|
export type PlatformRuntimeArtifact = Readonly<{
|
|
3
2
|
path: string;
|
|
4
3
|
sha256: string;
|
|
@@ -27,6 +26,8 @@ export type PlatformRuntimeDatabaseManifest = Readonly<{
|
|
|
27
26
|
}>;
|
|
28
27
|
export type PlatformRuntimeManifest = Readonly<{
|
|
29
28
|
appAccessSetup?: 1;
|
|
29
|
+
/** The runtime honours `runtimeLogs: minimal` (PLATFORM_RUNTIME_LOGS). */
|
|
30
|
+
runtimeLogs?: 1;
|
|
30
31
|
/** Durable deployment Queue payload and PostgreSQL operation journal contract. */
|
|
31
32
|
deploymentExecution?: 1;
|
|
32
33
|
authenticationProtocolVersion?: 1;
|
|
@@ -58,5 +59,4 @@ export declare function platformDatabaseSchemaDigest(lineage: string, migrations
|
|
|
58
59
|
export declare function parsePlatformRuntimeManifest(value: unknown): PlatformRuntimeManifest;
|
|
59
60
|
export declare function getPlatformRuntimeDirectory(): string;
|
|
60
61
|
export declare function readPlatformRuntimeManifest(runtimeDirectory?: string): PlatformRuntimeManifest;
|
|
61
|
-
export declare function resolvePlatformRuntime(customRuntimeDirectory?: string, baseDirectory?: string): PlatformRuntime;
|
|
62
|
-
//#endregion
|
|
62
|
+
export declare function resolvePlatformRuntime(customRuntimeDirectory?: string, baseDirectory?: string): PlatformRuntime;
|
package/dist/installer.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as isSourceRevision, i as isSandboxDrainProtocol, o as isUsageProtocolVersion, r as isRecord } from "./validate-
|
|
1
|
+
import { a as isSourceRevision, i as isSandboxDrainProtocol, o as isUsageProtocolVersion, r as isRecord } from "./validate-CTKcW3Vp.mjs";
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
3
|
import { readFileSync, realpathSync, statSync } from "node:fs";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
import { dirname, isAbsolute, join, resolve } from "pathslash";
|
|
6
|
-
|
|
6
|
+
// src/installer.ts
|
|
7
7
|
const PLATFORM_ADMIN_ASSETS_DIRECTORY = "api/assets";
|
|
8
8
|
const PLATFORM_ADMIN_CLIENT_ASSET_PATH = `${PLATFORM_ADMIN_ASSETS_DIRECTORY}/admin/client.js`;
|
|
9
9
|
const PLATFORM_ADMIN_STYLE_ASSET_PATH = `${PLATFORM_ADMIN_ASSETS_DIRECTORY}/admin/style.css`;
|
|
@@ -25,6 +25,7 @@ function parsePlatformRuntimeManifest(value) {
|
|
|
25
25
|
if (root.privatePreviews !== void 0 && root.privatePreviews !== 1) throw new Error("Unsupported private preview protocol.");
|
|
26
26
|
if (root.schemaVersion !== 2) throw new Error("runtime manifest schemaVersion must be 2");
|
|
27
27
|
if (root.appAccessSetup !== void 0 && root.appAccessSetup !== 1) throw new Error("Unsupported app access setup protocol.");
|
|
28
|
+
if (root.runtimeLogs !== void 0 && root.runtimeLogs !== 1) throw new Error("Unsupported runtime logs protocol.");
|
|
28
29
|
if (root.deploymentExecution !== void 0 && root.deploymentExecution !== 1) throw new Error("Unsupported deployment execution protocol.");
|
|
29
30
|
if (root.authenticationProtocolVersion !== void 0 && root.authenticationProtocolVersion !== 1) throw new Error("Unsupported authentication protocol version.");
|
|
30
31
|
if (root.emailProtocolVersion !== void 0 && root.emailProtocolVersion !== 1) throw new Error("Unsupported email protocol version.");
|
|
@@ -85,6 +86,7 @@ function parsePlatformRuntimeManifest(value) {
|
|
|
85
86
|
return {
|
|
86
87
|
artifacts,
|
|
87
88
|
...root.appAccessSetup === 1 ? { appAccessSetup: 1 } : {},
|
|
89
|
+
...root.runtimeLogs === 1 ? { runtimeLogs: 1 } : {},
|
|
88
90
|
...root.deploymentExecution === 1 ? { deploymentExecution: 1 } : {},
|
|
89
91
|
...assets ? { assets } : {},
|
|
90
92
|
...root.authenticationProtocolVersion === 1 ? { authenticationProtocolVersion: 1 } : {},
|
|
@@ -203,5 +205,4 @@ function sha256(value, name) {
|
|
|
203
205
|
if (typeof value !== "string" || !SHA256_PATTERN.test(value)) throw new Error(`${name} must be a lowercase SHA-256 digest`);
|
|
204
206
|
return value;
|
|
205
207
|
}
|
|
206
|
-
//#endregion
|
|
207
208
|
export { PLATFORM_ADMIN_ASSETS_DIRECTORY, PLATFORM_ADMIN_CLIENT_ASSET_PATH, PLATFORM_ADMIN_STYLE_ASSET_PATH, getPlatformRuntimeDirectory, parsePlatformRuntimeManifest, platformDatabaseSchemaDigest, readPlatformRuntimeManifest, resolvePlatformRuntime };
|
package/dist/plans.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/plans.d.ts
|
|
2
1
|
/** Installation-defined plan IDs are stable even when a display name changes. */
|
|
3
2
|
export type PlanId = string;
|
|
4
3
|
export type BuiltinPlanId = "free" | "solo" | "pro" | "sponsored" | "custom";
|
|
@@ -73,5 +72,4 @@ export declare function parsePlanLimitsPatch(value: unknown): PlanLimitsPatch;
|
|
|
73
72
|
export declare function validatePlanLimits(limits: PlanLimits): void;
|
|
74
73
|
export declare function parseBuildInstanceType(value: unknown): BuildInstanceType;
|
|
75
74
|
/** Strict saved-state validation: invalid configuration must not silently lift quotas. */
|
|
76
|
-
export declare function parsePlatformPlanCatalog(value: unknown): PlatformPlanCatalog;
|
|
77
|
-
//#endregion
|
|
75
|
+
export declare function parsePlatformPlanCatalog(value: unknown): PlatformPlanCatalog;
|
package/dist/plans.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as isPrintableText, s as record } from "./validate-
|
|
2
|
-
|
|
1
|
+
import { n as isPrintableText, s as record } from "./validate-CTKcW3Vp.mjs";
|
|
2
|
+
// src/plans.ts
|
|
3
3
|
const GB = 1073741824;
|
|
4
4
|
const PLAN_LIMITS = {
|
|
5
5
|
free: {
|
|
@@ -199,5 +199,4 @@ function parsePlatformPlanCatalog(value) {
|
|
|
199
199
|
reconciliation
|
|
200
200
|
};
|
|
201
201
|
}
|
|
202
|
-
//#endregion
|
|
203
202
|
export { BUILD_INSTANCE_FREE, BUILD_INSTANCE_LARGE, PLAN_EDITABLE_LIMIT_KEYS, PLAN_LIMITS, createDefaultPlanCatalog, parseBuildInstanceType, parsePlanLimitsPatch, parsePlanName, parsePlatformPlanCatalog, parsePlatformPlanId, validatePlanLimits };
|