Emdash source with visual editor image upload fix

Fixes:
1. media.ts: wrap placeholder generation in try-catch
2. toolbar.ts: check r.ok, display error message in popover
This commit is contained in:
2026-05-03 10:44:54 +07:00
parent 78f81bebb6
commit 2d1be52177
2352 changed files with 662964 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
/**
* Type definitions for Cloudflare event subscription messages.
* See: https://developers.cloudflare.com/queues/event-subscriptions/events-schemas/
*/
/** Workers Builds `build.succeeded` event. */
export interface BuildSucceededEvent {
type: "cf.workersBuilds.worker.build.succeeded";
source: {
type: "workersBuilds.worker";
workerName: string;
};
payload: {
buildUuid: string;
status: "success";
buildOutcome: "success";
createdAt: string;
initializingAt: string;
runningAt: string;
stoppedAt: string;
buildTriggerMetadata: {
buildTriggerSource: string;
branch: string;
commitHash: string;
commitMessage: string;
author: string;
buildCommand: string;
deployCommand: string;
rootDirectory: string;
repoName: string;
providerAccountName: string;
providerType: string;
};
};
metadata: {
accountId: string;
eventSubscriptionId: string;
eventSchemaVersion: number;
eventTimestamp: string;
};
}
/**
* Other event types we may receive from the subscription but ignore.
* Kept loose (string `type`) so we don't block on schema updates.
*/
export interface UnknownEvent {
type: string;
source?: unknown;
payload?: unknown;
metadata?: unknown;
}
export type PerfQueueMessage = BuildSucceededEvent | UnknownEvent;
/** Type guard for the only event we actually act on. */
export function isBuildSucceeded(event: PerfQueueMessage): event is BuildSucceededEvent {
return event.type === "cf.workersBuilds.worker.build.succeeded";
}