devflare 1.0.0-next.1 → 1.0.0-next.10
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/LLM.md +775 -637
- package/R2.md +200 -0
- package/README.md +285 -514
- package/bin/devflare.js +8 -8
- package/dist/{account-rvrj687w.js → account-8psavtg6.js} +27 -4
- package/dist/bridge/miniflare.d.ts +6 -0
- package/dist/bridge/miniflare.d.ts.map +1 -1
- package/dist/bridge/proxy.d.ts +5 -6
- package/dist/bridge/proxy.d.ts.map +1 -1
- package/dist/bridge/server.d.ts.map +1 -1
- package/dist/browser.d.ts +50 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/{build-mnf6v8gd.js → build-k36xrzvy.js} +26 -7
- package/dist/bundler/do-bundler.d.ts +7 -0
- package/dist/bundler/do-bundler.d.ts.map +1 -1
- package/dist/cli/commands/account.d.ts.map +1 -1
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/deploy.d.ts.map +1 -1
- package/dist/cli/commands/dev.d.ts.map +1 -1
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/types.d.ts.map +1 -1
- package/dist/cli/config-path.d.ts +5 -0
- package/dist/cli/config-path.d.ts.map +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/package-metadata.d.ts +16 -0
- package/dist/cli/package-metadata.d.ts.map +1 -0
- package/dist/config/compiler.d.ts +7 -0
- package/dist/config/compiler.d.ts.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/schema.d.ts +2575 -1221
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/{deploy-nhceck39.js → deploy-dbvfq8vq.js} +33 -15
- package/dist/{dev-qnxet3j9.js → dev-rk8p6pse.js} +900 -234
- package/dist/dev-server/miniflare-log.d.ts +12 -0
- package/dist/dev-server/miniflare-log.d.ts.map +1 -0
- package/dist/dev-server/runtime-stdio.d.ts +8 -0
- package/dist/dev-server/runtime-stdio.d.ts.map +1 -0
- package/dist/dev-server/server.d.ts +2 -0
- package/dist/dev-server/server.d.ts.map +1 -1
- package/dist/dev-server/vite-utils.d.ts +37 -0
- package/dist/dev-server/vite-utils.d.ts.map +1 -0
- package/dist/{doctor-e8fy6fj5.js → doctor-06y8nxd4.js} +73 -50
- package/dist/{durable-object-t4kbb0yt.js → durable-object-yt8v1dyn.js} +1 -1
- package/dist/index-05fyzwne.js +195 -0
- package/dist/index-1p814k7s.js +227 -0
- package/dist/{index-hcex3rgh.js → index-1phx14av.js} +84 -7
- package/dist/{index-tk6ej9dj.js → index-2q3pmzrx.js} +12 -16
- package/dist/{index-pf5s73n9.js → index-59df49vn.js} +11 -281
- package/dist/index-5yxg30va.js +304 -0
- package/dist/index-62b3gt2g.js +12 -0
- package/dist/index-6h8xbs75.js +44 -0
- package/dist/{index-67qcae0f.js → index-6v3wjg1r.js} +16 -1
- package/dist/index-8gtqgb3q.js +529 -0
- package/dist/{index-gz1gndna.js → index-9wt9x09k.js} +42 -62
- package/dist/index-fef08w43.js +231 -0
- package/dist/{index-ep3445yc.js → index-jht2j546.js} +393 -170
- package/dist/index-k7r18na8.js +0 -0
- package/dist/{index-m2q41jwa.js → index-n932ytmq.js} +9 -1
- package/dist/index-pwgyy2q9.js +39 -0
- package/dist/{index-07q6yxyc.js → index-v8vvsn9x.js} +1 -0
- package/dist/index-vky23txa.js +70 -0
- package/dist/index-vs49yxn4.js +322 -0
- package/dist/{index-z14anrqp.js → index-wfbfz02q.js} +14 -15
- package/dist/index-ws68xvq2.js +311 -0
- package/dist/index-y1d8za14.js +196 -0
- package/dist/{init-f9mgmew3.js → init-na2atvz2.js} +42 -55
- package/dist/router/types.d.ts +24 -0
- package/dist/router/types.d.ts.map +1 -0
- package/dist/runtime/context.d.ts +249 -8
- package/dist/runtime/context.d.ts.map +1 -1
- package/dist/runtime/exports.d.ts +50 -55
- package/dist/runtime/exports.d.ts.map +1 -1
- package/dist/runtime/index.d.ts +8 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/middleware.d.ts +77 -60
- package/dist/runtime/middleware.d.ts.map +1 -1
- package/dist/runtime/router.d.ts +7 -0
- package/dist/runtime/router.d.ts.map +1 -0
- package/dist/runtime/validation.d.ts +1 -1
- package/dist/runtime/validation.d.ts.map +1 -1
- package/dist/src/browser.js +150 -0
- package/dist/src/cli/index.js +10 -0
- package/dist/{cloudflare → src/cloudflare}/index.js +3 -3
- package/dist/{decorators → src/decorators}/index.js +2 -2
- package/dist/src/index.js +132 -0
- package/dist/src/runtime/index.js +111 -0
- package/dist/{sveltekit → src/sveltekit}/index.js +14 -6
- package/dist/{test → src/test}/index.js +22 -13
- package/dist/{vite → src/vite}/index.js +128 -59
- package/dist/sveltekit/platform.d.ts.map +1 -1
- package/dist/test/bridge-context.d.ts +5 -2
- package/dist/test/bridge-context.d.ts.map +1 -1
- package/dist/test/cf.d.ts +25 -11
- package/dist/test/cf.d.ts.map +1 -1
- package/dist/test/email.d.ts +16 -7
- package/dist/test/email.d.ts.map +1 -1
- package/dist/test/queue.d.ts.map +1 -1
- package/dist/test/resolve-service-bindings.d.ts.map +1 -1
- package/dist/test/scheduled.d.ts.map +1 -1
- package/dist/test/simple-context.d.ts +1 -1
- package/dist/test/simple-context.d.ts.map +1 -1
- package/dist/test/tail.d.ts +2 -1
- package/dist/test/tail.d.ts.map +1 -1
- package/dist/test/worker.d.ts +6 -0
- package/dist/test/worker.d.ts.map +1 -1
- package/dist/transform/durable-object.d.ts.map +1 -1
- package/dist/transform/worker-entrypoint.d.ts.map +1 -1
- package/dist/{types-5nyrz1sz.js → types-x9q7t491.js} +30 -16
- package/dist/utils/entrypoint-discovery.d.ts +6 -3
- package/dist/utils/entrypoint-discovery.d.ts.map +1 -1
- package/dist/utils/send-email.d.ts +15 -0
- package/dist/utils/send-email.d.ts.map +1 -0
- package/dist/vite/plugin.d.ts.map +1 -1
- package/dist/worker-entry/composed-worker.d.ts +13 -0
- package/dist/worker-entry/composed-worker.d.ts.map +1 -0
- package/dist/worker-entry/routes.d.ts +22 -0
- package/dist/worker-entry/routes.d.ts.map +1 -0
- package/dist/{worker-entrypoint-m9th0rg0.js → worker-entrypoint-c259fmfs.js} +1 -1
- package/package.json +21 -19
- package/dist/index.js +0 -298
- package/dist/runtime/index.js +0 -111
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type RouteSegment = {
|
|
2
|
+
readonly type: 'static';
|
|
3
|
+
readonly value: string;
|
|
4
|
+
} | {
|
|
5
|
+
readonly type: 'param';
|
|
6
|
+
readonly name: string;
|
|
7
|
+
} | {
|
|
8
|
+
readonly type: 'rest';
|
|
9
|
+
readonly name: string;
|
|
10
|
+
} | {
|
|
11
|
+
readonly type: 'optional-rest';
|
|
12
|
+
readonly name: string;
|
|
13
|
+
};
|
|
14
|
+
export interface RouteModuleDefinition {
|
|
15
|
+
readonly filePath: string;
|
|
16
|
+
readonly routePath: string;
|
|
17
|
+
readonly segments: readonly RouteSegment[];
|
|
18
|
+
readonly module: Record<string, unknown>;
|
|
19
|
+
}
|
|
20
|
+
export interface RouteMatchResult {
|
|
21
|
+
readonly route: RouteModuleDefinition;
|
|
22
|
+
readonly params: Record<string, string>;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/router/types.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,YAAY,GACrB;IACD,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACtB,GACC;IACD,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACrB,GACC;IACD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACrB,GACC;IACD,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAA;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACrB,CAAA;AAEF,MAAM,WAAW,qBAAqB;IACrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,QAAQ,EAAE,SAAS,YAAY,EAAE,CAAA;IAC1C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACxC;AAED,MAAM,WAAW,gBAAgB;IAChC,QAAQ,CAAC,KAAK,EAAE,qBAAqB,CAAA;IACrC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACvC"}
|
|
@@ -1,15 +1,195 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* All event surfaces that Devflare exposes through AsyncLocalStorage.
|
|
3
|
+
*/
|
|
4
|
+
export type RuntimeEventType = 'fetch' | 'scheduled' | 'queue' | 'email' | 'tail' | 'durable-object-fetch' | 'durable-object-alarm' | 'durable-object-websocket-message' | 'durable-object-websocket-close' | 'durable-object-websocket-error';
|
|
5
|
+
/**
|
|
6
|
+
* Shared base shape for all Devflare event objects.
|
|
7
|
+
*/
|
|
8
|
+
export interface EventContext<TEnv = unknown, TLocals extends Record<string, unknown> = Record<string, unknown>> {
|
|
9
|
+
readonly type: RuntimeEventType;
|
|
10
|
+
readonly env: TEnv;
|
|
11
|
+
readonly ctx: RuntimeContextValue;
|
|
12
|
+
readonly locals: TLocals;
|
|
13
|
+
readonly request?: Request | null;
|
|
14
|
+
readonly params?: Record<string, string>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Execution context shape exposed through `ctx`.
|
|
18
|
+
*
|
|
19
|
+
* Fetch/queue/scheduled/email/tail handlers receive the standard Cloudflare
|
|
20
|
+
* `ExecutionContext`. Durable Object handlers receive `DurableObjectState`.
|
|
21
|
+
*/
|
|
22
|
+
export type RuntimeContextValue = ExecutionContext | DurableObjectState | null;
|
|
23
|
+
/**
|
|
24
|
+
* Event-first fetch handler input.
|
|
25
|
+
*
|
|
26
|
+
* This intentionally behaves like both:
|
|
27
|
+
* - a real `Request`
|
|
28
|
+
* - an object with `{ request, env, ctx, params, locals }`
|
|
29
|
+
*
|
|
30
|
+
* That means old `fetch(request, env, ctx)` handlers keep working while new
|
|
31
|
+
* `fetch(event)` / `GET({ request, params })` handlers can destructure the
|
|
32
|
+
* richer event object.
|
|
33
|
+
*/
|
|
34
|
+
export interface FetchEvent<TEnv = unknown, TParams extends Record<string, string> = Record<string, string>, TLocals extends Record<string, unknown> = Record<string, unknown>> extends Request, EventContext<TEnv, TLocals> {
|
|
35
|
+
readonly type: 'fetch';
|
|
36
|
+
readonly request: Request;
|
|
37
|
+
readonly ctx: ExecutionContext;
|
|
38
|
+
readonly params: TParams;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Event-first queue handler input.
|
|
42
|
+
*/
|
|
43
|
+
export interface QueueEvent<TMessage = unknown, TEnv = unknown, TLocals extends Record<string, unknown> = Record<string, unknown>> extends MessageBatch<TMessage>, EventContext<TEnv, TLocals> {
|
|
44
|
+
readonly type: 'queue';
|
|
45
|
+
readonly batch: MessageBatch<TMessage>;
|
|
46
|
+
readonly ctx: ExecutionContext;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Event-first scheduled handler input.
|
|
50
|
+
*/
|
|
51
|
+
export interface ScheduledEvent<TEnv = unknown, TLocals extends Record<string, unknown> = Record<string, unknown>> extends ScheduledController, EventContext<TEnv, TLocals> {
|
|
52
|
+
readonly type: 'scheduled';
|
|
53
|
+
readonly controller: ScheduledController;
|
|
54
|
+
readonly ctx: ExecutionContext;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Event-first email handler input.
|
|
58
|
+
*/
|
|
59
|
+
export interface EmailEvent<TEnv = unknown, TLocals extends Record<string, unknown> = Record<string, unknown>> extends ForwardableEmailMessage, EventContext<TEnv, TLocals> {
|
|
60
|
+
readonly type: 'email';
|
|
61
|
+
readonly message: ForwardableEmailMessage;
|
|
62
|
+
readonly ctx: ExecutionContext;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Event-first tail handler input.
|
|
66
|
+
*/
|
|
67
|
+
export interface TailEvent<TEnv = unknown, TLocals extends Record<string, unknown> = Record<string, unknown>> extends Array<TraceItem>, EventContext<TEnv, TLocals> {
|
|
68
|
+
readonly type: 'tail';
|
|
69
|
+
readonly events: TraceItem[];
|
|
70
|
+
readonly ctx: ExecutionContext;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Shared base shape for Durable Object events.
|
|
74
|
+
*/
|
|
75
|
+
export interface DurableObjectEventContext<TType extends Extract<RuntimeEventType, `durable-object-${string}`>, TEnv = unknown, TLocals extends Record<string, unknown> = Record<string, unknown>> extends EventContext<TEnv, TLocals> {
|
|
76
|
+
readonly type: TType;
|
|
77
|
+
readonly ctx: DurableObjectState;
|
|
78
|
+
readonly state: DurableObjectState;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Event-first Durable Object fetch handler input.
|
|
82
|
+
*/
|
|
83
|
+
export interface DurableObjectFetchEvent<TEnv = unknown, TLocals extends Record<string, unknown> = Record<string, unknown>> extends Request, DurableObjectEventContext<'durable-object-fetch', TEnv, TLocals> {
|
|
84
|
+
readonly request: Request;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Event-first Durable Object alarm handler input.
|
|
88
|
+
*/
|
|
89
|
+
export interface DurableObjectAlarmEvent<TEnv = unknown, TLocals extends Record<string, unknown> = Record<string, unknown>> extends DurableObjectEventContext<'durable-object-alarm', TEnv, TLocals> {
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Event-first Durable Object websocket message handler input.
|
|
93
|
+
*/
|
|
94
|
+
export interface DurableObjectWebSocketMessageEvent<TEnv = unknown, TLocals extends Record<string, unknown> = Record<string, unknown>> extends WebSocket, DurableObjectEventContext<'durable-object-websocket-message', TEnv, TLocals> {
|
|
95
|
+
readonly ws: WebSocket;
|
|
96
|
+
readonly message: string | ArrayBuffer;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Event-first Durable Object websocket close handler input.
|
|
100
|
+
*/
|
|
101
|
+
export interface DurableObjectWebSocketCloseEvent<TEnv = unknown, TLocals extends Record<string, unknown> = Record<string, unknown>> extends WebSocket, DurableObjectEventContext<'durable-object-websocket-close', TEnv, TLocals> {
|
|
102
|
+
readonly ws: WebSocket;
|
|
103
|
+
readonly code: number;
|
|
104
|
+
readonly reason: string;
|
|
105
|
+
readonly wasClean: boolean;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Event-first Durable Object websocket error handler input.
|
|
109
|
+
*/
|
|
110
|
+
export interface DurableObjectWebSocketErrorEvent<TEnv = unknown, TLocals extends Record<string, unknown> = Record<string, unknown>> extends WebSocket, DurableObjectEventContext<'durable-object-websocket-error', TEnv, TLocals> {
|
|
111
|
+
readonly ws: WebSocket;
|
|
112
|
+
readonly error: unknown;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Union of all Durable Object event surfaces.
|
|
116
|
+
*/
|
|
117
|
+
export type DurableObjectEvent<TEnv = unknown, TLocals extends Record<string, unknown> = Record<string, unknown>> = DurableObjectFetchEvent<TEnv, TLocals> | DurableObjectAlarmEvent<TEnv, TLocals> | DurableObjectWebSocketMessageEvent<TEnv, TLocals> | DurableObjectWebSocketCloseEvent<TEnv, TLocals> | DurableObjectWebSocketErrorEvent<TEnv, TLocals>;
|
|
118
|
+
/**
|
|
119
|
+
* Union of all non-DO worker surfaces.
|
|
120
|
+
*/
|
|
121
|
+
export type WorkerEvent<TEnv = unknown, TLocals extends Record<string, unknown> = Record<string, unknown>> = FetchEvent<TEnv, Record<string, string>, TLocals> | QueueEvent<unknown, TEnv, TLocals> | ScheduledEvent<TEnv, TLocals> | EmailEvent<TEnv, TLocals> | TailEvent<TEnv, TLocals>;
|
|
122
|
+
/**
|
|
123
|
+
* Union of all concrete Devflare event objects.
|
|
124
|
+
*/
|
|
125
|
+
export type AnyEvent<TEnv = unknown, TLocals extends Record<string, unknown> = Record<string, unknown>> = WorkerEvent<TEnv, TLocals> | DurableObjectEvent<TEnv, TLocals>;
|
|
1
126
|
/**
|
|
2
127
|
* Context shape stored in AsyncLocalStorage
|
|
3
128
|
*/
|
|
4
|
-
export interface RequestContext<TEnv = unknown, TLocals = Record<string, unknown>> {
|
|
129
|
+
export interface RequestContext<TEnv = unknown, TLocals extends Record<string, unknown> = Record<string, unknown>> {
|
|
5
130
|
env: TEnv;
|
|
6
|
-
ctx:
|
|
131
|
+
ctx: RuntimeContextValue;
|
|
7
132
|
request: Request | null;
|
|
8
133
|
locals: TLocals;
|
|
9
|
-
type:
|
|
134
|
+
type: RuntimeEventType;
|
|
135
|
+
event: EventContext<TEnv, TLocals>;
|
|
136
|
+
}
|
|
137
|
+
type EventAccessor<TEvent> = (() => TEvent) & {
|
|
138
|
+
safe: () => TEvent | null;
|
|
139
|
+
};
|
|
140
|
+
interface EventInitOptions<TLocals extends Record<string, unknown> = Record<string, unknown>> {
|
|
141
|
+
locals?: TLocals;
|
|
142
|
+
}
|
|
143
|
+
interface FetchEventInit<TParams extends Record<string, string> = Record<string, string>, TLocals extends Record<string, unknown> = Record<string, unknown>> extends EventInitOptions<TLocals> {
|
|
144
|
+
params?: TParams;
|
|
10
145
|
}
|
|
11
146
|
/**
|
|
12
|
-
*
|
|
147
|
+
* Create a Devflare fetch event object.
|
|
148
|
+
*/
|
|
149
|
+
export declare function createFetchEvent<TEnv = unknown, TParams extends Record<string, string> = Record<string, string>, TLocals extends Record<string, unknown> = Record<string, unknown>>(request: Request, env: TEnv, ctx: ExecutionContext, options?: FetchEventInit<TParams, TLocals>): FetchEvent<TEnv, TParams, TLocals>;
|
|
150
|
+
/**
|
|
151
|
+
* Create a Devflare queue event object.
|
|
152
|
+
*/
|
|
153
|
+
export declare function createQueueEvent<TMessage = unknown, TEnv = unknown, TLocals extends Record<string, unknown> = Record<string, unknown>>(batch: MessageBatch<TMessage>, env: TEnv, ctx: ExecutionContext, options?: EventInitOptions<TLocals>): QueueEvent<TMessage, TEnv, TLocals>;
|
|
154
|
+
/**
|
|
155
|
+
* Create a Devflare scheduled event object.
|
|
156
|
+
*/
|
|
157
|
+
export declare function createScheduledEvent<TEnv = unknown, TLocals extends Record<string, unknown> = Record<string, unknown>>(controller: ScheduledController, env: TEnv, ctx: ExecutionContext, options?: EventInitOptions<TLocals>): ScheduledEvent<TEnv, TLocals>;
|
|
158
|
+
/**
|
|
159
|
+
* Create a Devflare email event object.
|
|
160
|
+
*/
|
|
161
|
+
export declare function createEmailEvent<TEnv = unknown, TLocals extends Record<string, unknown> = Record<string, unknown>>(message: ForwardableEmailMessage, env: TEnv, ctx: ExecutionContext, options?: EventInitOptions<TLocals>): EmailEvent<TEnv, TLocals>;
|
|
162
|
+
/**
|
|
163
|
+
* Create a Devflare tail event object.
|
|
164
|
+
*/
|
|
165
|
+
export declare function createTailEvent<TEnv = unknown, TLocals extends Record<string, unknown> = Record<string, unknown>>(events: TraceItem[], env: TEnv, ctx: ExecutionContext, options?: EventInitOptions<TLocals>): TailEvent<TEnv, TLocals>;
|
|
166
|
+
/**
|
|
167
|
+
* Create a Devflare Durable Object fetch event object.
|
|
168
|
+
*/
|
|
169
|
+
export declare function createDurableObjectFetchEvent<TEnv = unknown, TLocals extends Record<string, unknown> = Record<string, unknown>>(request: Request, env: TEnv, state: DurableObjectState, options?: EventInitOptions<TLocals>): DurableObjectFetchEvent<TEnv, TLocals>;
|
|
170
|
+
/**
|
|
171
|
+
* Create a Devflare Durable Object alarm event object.
|
|
172
|
+
*/
|
|
173
|
+
export declare function createDurableObjectAlarmEvent<TEnv = unknown, TLocals extends Record<string, unknown> = Record<string, unknown>>(env: TEnv, state: DurableObjectState, options?: EventInitOptions<TLocals>): DurableObjectAlarmEvent<TEnv, TLocals>;
|
|
174
|
+
/**
|
|
175
|
+
* Create a Devflare Durable Object websocket message event object.
|
|
176
|
+
*/
|
|
177
|
+
export declare function createDurableObjectWebSocketMessageEvent<TEnv = unknown, TLocals extends Record<string, unknown> = Record<string, unknown>>(ws: WebSocket, message: string | ArrayBuffer, env: TEnv, state: DurableObjectState, options?: EventInitOptions<TLocals>): DurableObjectWebSocketMessageEvent<TEnv, TLocals>;
|
|
178
|
+
/**
|
|
179
|
+
* Create a Devflare Durable Object websocket close event object.
|
|
180
|
+
*/
|
|
181
|
+
export declare function createDurableObjectWebSocketCloseEvent<TEnv = unknown, TLocals extends Record<string, unknown> = Record<string, unknown>>(ws: WebSocket, code: number, reason: string, wasClean: boolean, env: TEnv, state: DurableObjectState, options?: EventInitOptions<TLocals>): DurableObjectWebSocketCloseEvent<TEnv, TLocals>;
|
|
182
|
+
/**
|
|
183
|
+
* Create a Devflare Durable Object websocket error event object.
|
|
184
|
+
*/
|
|
185
|
+
export declare function createDurableObjectWebSocketErrorEvent<TEnv = unknown, TLocals extends Record<string, unknown> = Record<string, unknown>>(ws: WebSocket, error: unknown, env: TEnv, state: DurableObjectState, options?: EventInitOptions<TLocals>): DurableObjectWebSocketErrorEvent<TEnv, TLocals>;
|
|
186
|
+
/**
|
|
187
|
+
* Advanced: run a function with a compatibility context established.
|
|
188
|
+
*
|
|
189
|
+
* Normal Devflare application code should not need this directly.
|
|
190
|
+
* Generated worker wrappers, dev-server dispatch, router/middleware resolution,
|
|
191
|
+
* and `createTestContext()` helpers already establish context before invoking
|
|
192
|
+
* user handlers.
|
|
13
193
|
*
|
|
14
194
|
* @param env - Worker environment bindings
|
|
15
195
|
* @param ctx - Execution context (null for DO methods)
|
|
@@ -18,29 +198,90 @@ export interface RequestContext<TEnv = unknown, TLocals = Record<string, unknown
|
|
|
18
198
|
* @param type - Handler type
|
|
19
199
|
* @returns Result of function
|
|
20
200
|
*/
|
|
21
|
-
export declare function runWithContext<T, TEnv = unknown>(env: TEnv, ctx:
|
|
201
|
+
export declare function runWithContext<T, TEnv = unknown>(env: TEnv, ctx: RuntimeContextValue, request: Request | null, fn: () => T, type?: RequestContext['type']): T;
|
|
202
|
+
/**
|
|
203
|
+
* Advanced: run a function with a fully constructed event object established.
|
|
204
|
+
*
|
|
205
|
+
* Normal Devflare application code should not need this directly.
|
|
206
|
+
* Devflare uses it internally so getters like `getQueueEvent()` and
|
|
207
|
+
* `getEmailEvent()` work automatically inside user handlers.
|
|
208
|
+
*/
|
|
209
|
+
export declare function runWithEventContext<T, TEnv = unknown, TLocals extends Record<string, unknown> = Record<string, unknown>>(event: EventContext<TEnv, TLocals>, fn: () => T): T;
|
|
22
210
|
/**
|
|
23
211
|
* Get the current context
|
|
24
212
|
*
|
|
25
213
|
* @throws {ContextUnavailableError} When called outside of a request context
|
|
26
214
|
* @returns Current context
|
|
27
215
|
*/
|
|
28
|
-
export declare function getContext<TEnv = unknown, TLocals = Record<string, unknown>>(): RequestContext<TEnv, TLocals>;
|
|
216
|
+
export declare function getContext<TEnv = unknown, TLocals extends Record<string, unknown> = Record<string, unknown>>(): RequestContext<TEnv, TLocals>;
|
|
29
217
|
/**
|
|
30
218
|
* Get the current context, or null if not available
|
|
31
219
|
*
|
|
32
220
|
* @returns Current context or null
|
|
33
221
|
*/
|
|
34
|
-
export declare function getContextOrNull<TEnv = unknown, TLocals = Record<string, unknown>>(): RequestContext<TEnv, TLocals> | null;
|
|
222
|
+
export declare function getContextOrNull<TEnv = unknown, TLocals extends Record<string, unknown> = Record<string, unknown>>(): RequestContext<TEnv, TLocals> | null;
|
|
223
|
+
/**
|
|
224
|
+
* Get the current event object.
|
|
225
|
+
*/
|
|
226
|
+
export declare function getEventContext<TEnv = unknown, TLocals extends Record<string, unknown> = Record<string, unknown>>(): EventContext<TEnv, TLocals>;
|
|
227
|
+
/**
|
|
228
|
+
* Get the current event object, or null if not available.
|
|
229
|
+
*/
|
|
230
|
+
export declare function getEventContextOrNull<TEnv = unknown, TLocals extends Record<string, unknown> = Record<string, unknown>>(): EventContext<TEnv, TLocals> | null;
|
|
35
231
|
/**
|
|
36
232
|
* Check if currently running within a context
|
|
37
233
|
*/
|
|
38
234
|
export declare function hasContext(): boolean;
|
|
235
|
+
/**
|
|
236
|
+
* Get the current fetch event.
|
|
237
|
+
*/
|
|
238
|
+
export declare const getFetchEvent: EventAccessor<FetchEvent<unknown, Record<string, string>, Record<string, unknown>>>;
|
|
239
|
+
/**
|
|
240
|
+
* Get the current queue event.
|
|
241
|
+
*/
|
|
242
|
+
export declare const getQueueEvent: EventAccessor<QueueEvent<unknown, unknown, Record<string, unknown>>>;
|
|
243
|
+
/**
|
|
244
|
+
* Get the current scheduled event.
|
|
245
|
+
*/
|
|
246
|
+
export declare const getScheduledEvent: EventAccessor<ScheduledEvent<unknown, Record<string, unknown>>>;
|
|
247
|
+
/**
|
|
248
|
+
* Get the current email event.
|
|
249
|
+
*/
|
|
250
|
+
export declare const getEmailEvent: EventAccessor<EmailEvent<unknown, Record<string, unknown>>>;
|
|
251
|
+
/**
|
|
252
|
+
* Get the current tail event.
|
|
253
|
+
*/
|
|
254
|
+
export declare const getTailEvent: EventAccessor<TailEvent<unknown, Record<string, unknown>>>;
|
|
255
|
+
/**
|
|
256
|
+
* Get the current Durable Object event, regardless of surface.
|
|
257
|
+
*/
|
|
258
|
+
export declare const getDurableObjectEvent: EventAccessor<DurableObjectEvent<unknown, Record<string, unknown>>>;
|
|
259
|
+
/**
|
|
260
|
+
* Get the current Durable Object fetch event.
|
|
261
|
+
*/
|
|
262
|
+
export declare const getDurableObjectFetchEvent: EventAccessor<DurableObjectFetchEvent<unknown, Record<string, unknown>>>;
|
|
263
|
+
/**
|
|
264
|
+
* Get the current Durable Object alarm event.
|
|
265
|
+
*/
|
|
266
|
+
export declare const getDurableObjectAlarmEvent: EventAccessor<DurableObjectAlarmEvent<unknown, Record<string, unknown>>>;
|
|
267
|
+
/**
|
|
268
|
+
* Get the current Durable Object websocket message event.
|
|
269
|
+
*/
|
|
270
|
+
export declare const getDurableObjectWebSocketMessageEvent: EventAccessor<DurableObjectWebSocketMessageEvent<unknown, Record<string, unknown>>>;
|
|
271
|
+
/**
|
|
272
|
+
* Get the current Durable Object websocket close event.
|
|
273
|
+
*/
|
|
274
|
+
export declare const getDurableObjectWebSocketCloseEvent: EventAccessor<DurableObjectWebSocketCloseEvent<unknown, Record<string, unknown>>>;
|
|
275
|
+
/**
|
|
276
|
+
* Get the current Durable Object websocket error event.
|
|
277
|
+
*/
|
|
278
|
+
export declare const getDurableObjectWebSocketErrorEvent: EventAccessor<DurableObjectWebSocketErrorEvent<unknown, Record<string, unknown>>>;
|
|
39
279
|
/**
|
|
40
280
|
* Error thrown when context is accessed outside of a request handler
|
|
41
281
|
*/
|
|
42
282
|
export declare class ContextUnavailableError extends Error {
|
|
43
283
|
readonly code = "CONTEXT_UNAVAILABLE";
|
|
44
|
-
constructor();
|
|
284
|
+
constructor(message?: string);
|
|
45
285
|
}
|
|
286
|
+
export {};
|
|
46
287
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/runtime/context.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,MAAM,WAAW,cAAc,CAAC,IAAI,GAAG,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAChF,GAAG,EAAE,IAAI,CAAA;IACT,GAAG,EAAE,gBAAgB,GAAG,IAAI,CAAA;IAC5B,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;IACvB,MAAM,EAAE,OAAO,CAAA;IACf,IAAI,EAAE,OAAO,GAAG,WAAW,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAA;CACxD;AAOD;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,IAAI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AAI,GAAG,OAAO,EACd,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC7D,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,IAAI,CAEtC;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,OAAO,CAEpC;AA6ED;;GAEG;AACH,eAAO,MAAM,aAAa,qFAAmE,CAAA;AAE7F;;GAEG;AACH,eAAO,MAAM,aAAa,sEAAmE,CAAA;AAE7F;;GAEG;AACH,eAAO,MAAM,iBAAiB,iEAA+E,CAAA;AAE7G;;GAEG;AACH,eAAO,MAAM,aAAa,6DAAmE,CAAA;AAE7F;;GAEG;AACH,eAAO,MAAM,YAAY,4DAAgE,CAAA;AAEzF;;GAEG;AACH,eAAO,MAAM,qBAAqB,qEAA2F,CAAA;AAE7H;;GAEG;AACH,eAAO,MAAM,0BAA0B,0EAA0G,CAAA;AAEjJ;;GAEG;AACH,eAAO,MAAM,0BAA0B,0EAA0G,CAAA;AAEjJ;;GAEG;AACH,eAAO,MAAM,qCAAqC,qFAA2I,CAAA;AAE7L;;GAEG;AACH,eAAO,MAAM,mCAAmC,mFAAqI,CAAA;AAErL;;GAEG;AACH,eAAO,MAAM,mCAAmC,mFAAqI,CAAA;AAErL;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,KAAK;IACjD,QAAQ,CAAC,IAAI,yBAAwB;IAErC,YAAY,OAAO,CAAC,EAAE,MAAM,EAc3B;CACD"}
|
|
@@ -1,87 +1,83 @@
|
|
|
1
|
+
import { type EventContext, type RuntimeContextValue } from './context';
|
|
2
|
+
declare global {
|
|
3
|
+
interface DevflareEnv {
|
|
4
|
+
}
|
|
5
|
+
}
|
|
1
6
|
/**
|
|
2
7
|
* Access environment bindings (KV, D1, R2, etc.) and variables
|
|
3
8
|
*
|
|
4
9
|
* @remarks
|
|
5
10
|
* This is readonly - bindings cannot be reassigned at runtime.
|
|
6
|
-
* Available only within
|
|
11
|
+
* Available only within an active Devflare-managed handler or middleware call trail.
|
|
7
12
|
*
|
|
8
13
|
* @example
|
|
9
14
|
* ```ts
|
|
10
|
-
|
|
11
|
-
*
|
|
12
|
-
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
* import { env, type FetchEvent } from 'devflare/runtime'
|
|
16
|
+
*
|
|
17
|
+
* export async function fetch(event: FetchEvent) {
|
|
18
|
+
* const value = await env.MY_KV.get('key')
|
|
19
|
+
* const dbResult = await env.DB.prepare('SELECT * FROM users').all()
|
|
20
|
+
* return new Response(JSON.stringify({
|
|
21
|
+
* path: new URL(event.request.url).pathname,
|
|
22
|
+
* value,
|
|
23
|
+
* dbResult
|
|
24
|
+
* }))
|
|
18
25
|
* }
|
|
19
26
|
* ```
|
|
20
27
|
*
|
|
21
|
-
* @throws {ContextAccessError} When accessed outside
|
|
28
|
+
* @throws {ContextAccessError} When accessed outside an active Devflare-managed handler trail
|
|
22
29
|
*/
|
|
23
|
-
export declare const env: Readonly<
|
|
30
|
+
export declare const env: Readonly<DevflareEnv>;
|
|
24
31
|
/**
|
|
25
32
|
* Access the ExecutionContext for background tasks
|
|
26
33
|
*
|
|
27
34
|
* @remarks
|
|
28
35
|
* Provides `waitUntil()` for background processing and
|
|
29
|
-
* `passThroughOnException()` for error handling.
|
|
36
|
+
* `passThroughOnException()` for error handling on worker surfaces.
|
|
37
|
+
* When running inside a Durable Object, this proxy exposes the current
|
|
38
|
+
* `DurableObjectState` instead.
|
|
30
39
|
* This is readonly.
|
|
31
40
|
*
|
|
32
41
|
* @example
|
|
33
42
|
* ```ts
|
|
34
|
-
|
|
35
|
-
*
|
|
36
|
-
* export default {
|
|
37
|
-
* async fetch(request) {
|
|
38
|
-
* // Process request quickly
|
|
39
|
-
* const response = new Response('OK')
|
|
43
|
+
* import { ctx, type FetchEvent } from 'devflare/runtime'
|
|
40
44
|
*
|
|
41
|
-
|
|
42
|
-
*
|
|
43
|
-
|
|
44
|
-
*
|
|
45
|
-
* }
|
|
45
|
+
* export async function fetch(event: FetchEvent) {
|
|
46
|
+
* const response = new Response('OK')
|
|
47
|
+
* ctx.waitUntil(analytics.track(new URL(event.request.url).pathname))
|
|
48
|
+
* return response
|
|
46
49
|
* }
|
|
47
50
|
* ```
|
|
48
51
|
*
|
|
49
|
-
* @throws {ContextAccessError} When accessed outside
|
|
50
|
-
*/
|
|
51
|
-
export declare const ctx: Readonly<ExecutionContext>;
|
|
52
|
-
/**
|
|
53
|
-
* Event context shape - provides access to request and context type
|
|
52
|
+
* @throws {ContextAccessError} When accessed outside an active Devflare-managed handler trail
|
|
54
53
|
*/
|
|
55
|
-
export
|
|
56
|
-
/** The incoming Request object */
|
|
57
|
-
request: Request | null;
|
|
58
|
-
/** Type of event trigger */
|
|
59
|
-
type: 'fetch' | 'scheduled' | 'queue' | 'email' | 'tail';
|
|
60
|
-
}
|
|
54
|
+
export declare const ctx: Readonly<RuntimeContextValue>;
|
|
61
55
|
/**
|
|
62
|
-
* Access
|
|
56
|
+
* Access the current event object.
|
|
63
57
|
*
|
|
64
58
|
* @remarks
|
|
65
|
-
*
|
|
66
|
-
*
|
|
59
|
+
* This is the generic event proxy for the active AsyncLocalStorage context.
|
|
60
|
+
*
|
|
61
|
+
* For strong per-surface typing, prefer `getFetchEvent()`, `getQueueEvent()`,
|
|
62
|
+
* `getScheduledEvent()`, `getEmailEvent()`, and the Durable Object getters
|
|
63
|
+
* from `devflare/runtime`.
|
|
67
64
|
*
|
|
68
65
|
* @example
|
|
69
66
|
* ```ts
|
|
70
|
-
|
|
67
|
+
* import { event as runtimeEvent, type FetchEvent, type ScheduledEvent } from 'devflare/runtime'
|
|
71
68
|
*
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
*
|
|
76
|
-
* },
|
|
69
|
+
* export async function fetch(event: FetchEvent) {
|
|
70
|
+
* console.log(runtimeEvent.type)
|
|
71
|
+
* console.log(event.request.url)
|
|
72
|
+
* }
|
|
77
73
|
*
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
74
|
+
* export async function scheduled(event: ScheduledEvent) {
|
|
75
|
+
* console.log(runtimeEvent.type)
|
|
76
|
+
* console.log(event.cron)
|
|
81
77
|
* }
|
|
82
78
|
* ```
|
|
83
79
|
*
|
|
84
|
-
* @throws {ContextAccessError} When accessed outside
|
|
80
|
+
* @throws {ContextAccessError} When accessed outside an active Devflare-managed handler trail
|
|
85
81
|
*/
|
|
86
82
|
export declare const event: Readonly<EventContext>;
|
|
87
83
|
/**
|
|
@@ -96,23 +92,22 @@ export declare const event: Readonly<EventContext>;
|
|
|
96
92
|
*
|
|
97
93
|
* @example
|
|
98
94
|
* ```ts
|
|
99
|
-
|
|
95
|
+
* import { locals, type FetchEvent } from 'devflare/runtime'
|
|
100
96
|
*
|
|
101
97
|
* // In auth middleware
|
|
102
|
-
|
|
103
|
-
* locals.user = await validateToken(request
|
|
98
|
+
* const authMiddleware = async (event: FetchEvent, next: () => Promise<Response>) => {
|
|
99
|
+
* locals.user = await validateToken(event.request?.headers.get('Authorization'))
|
|
104
100
|
* return next()
|
|
105
101
|
* }
|
|
106
102
|
*
|
|
107
103
|
* // In handler
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
*
|
|
111
|
-
* }
|
|
104
|
+
* export async function fetch(event: FetchEvent) {
|
|
105
|
+
* void event
|
|
106
|
+
* console.log(locals.user)
|
|
112
107
|
* }
|
|
113
108
|
* ```
|
|
114
109
|
*
|
|
115
|
-
* @throws {ContextAccessError} When accessed outside
|
|
110
|
+
* @throws {ContextAccessError} When accessed outside an active Devflare-managed handler trail
|
|
116
111
|
*/
|
|
117
112
|
export declare const locals: Record<string, unknown>;
|
|
118
113
|
//# sourceMappingURL=exports.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../src/runtime/exports.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../src/runtime/exports.ts"],"names":[],"mappings":"AAQA,OAAO,EAAoB,KAAK,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,WAAW,CAAA;AAGzF,OAAO,CAAC,MAAM,CAAC,CAAC;IACf,UAAU,WAAW;KAAI;CACzB;AAsED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,GAAG,EAAE,QAAQ,CAAC,WAAW,CAGrC,CAAA;AAMD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,GAAG,EAAE,QAAQ,CAAC,mBAAmB,CAG7C,CAAA;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,KAAK,EAAE,QAAQ,CAAC,YAAY,CAGxC,CAAA;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAG1C,CAAA"}
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
+
export { env, ctx, event, locals } from './exports';
|
|
2
|
+
export { setLocalSendEmailBindings, clearLocalSendEmailBindings } from '../utils/send-email';
|
|
3
|
+
export type { EventContext } from './context';
|
|
4
|
+
export { createFetchEvent, createQueueEvent, createScheduledEvent, createEmailEvent, createTailEvent, createDurableObjectFetchEvent, createDurableObjectAlarmEvent, createDurableObjectWebSocketMessageEvent, createDurableObjectWebSocketCloseEvent, createDurableObjectWebSocketErrorEvent, runWithContext, runWithEventContext, getContext, getContextOrNull, getEventContext, getEventContextOrNull, getFetchEvent, getQueueEvent, getScheduledEvent, getEmailEvent, getTailEvent, getDurableObjectEvent, getDurableObjectFetchEvent, getDurableObjectAlarmEvent, getDurableObjectWebSocketMessageEvent, getDurableObjectWebSocketCloseEvent, getDurableObjectWebSocketErrorEvent, hasContext, ContextUnavailableError, type RuntimeEventType, type RuntimeContextValue, type RequestContext } from './context';
|
|
5
|
+
export type { FetchEvent, QueueEvent, ScheduledEvent, EmailEvent, TailEvent, DurableObjectEvent, DurableObjectFetchEvent, DurableObjectAlarmEvent, DurableObjectWebSocketMessageEvent, DurableObjectWebSocketCloseEvent, DurableObjectWebSocketErrorEvent, WorkerEvent, AnyEvent } from './context';
|
|
1
6
|
export { createContextProxy, ContextAccessError } from './validation';
|
|
2
|
-
export { sequence, resolve, pipe, type Middleware, type Handler } from './middleware';
|
|
7
|
+
export { sequence, handle, resolve, pipe, resolveFetchHandler, invokeFetchHandler, createResolveFetch, invokeFetchModule, type Middleware, type Handler, type Awaitable, type ResolveFetch, type FetchMiddleware } from './middleware';
|
|
8
|
+
export { matchFetchRoute, invokeRouteModules, createRouteResolve } from './router';
|
|
9
|
+
export type { RouteSegment, RouteModuleDefinition, RouteMatchResult } from '../router/types';
|
|
3
10
|
export { durableObject, getDurableObjectOptions, type DurableObjectOptions } from '../decorators';
|
|
4
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAWA,OAAO,EACN,GAAG,EACH,GAAG,EACH,KAAK,EACL,MAAM,EACN,MAAM,WAAW,CAAA;AAClB,OAAO,EACN,yBAAyB,EACzB,2BAA2B,EAC3B,MAAM,qBAAqB,CAAA;AAE5B,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAG7C,OAAO,EACN,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,6BAA6B,EAC7B,6BAA6B,EAC7B,wCAAwC,EACxC,sCAAsC,EACtC,sCAAsC,EACtC,cAAc,EACd,mBAAmB,EACnB,UAAU,EACV,gBAAgB,EAChB,eAAe,EAC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