@cequrebackends/cequre-ts 0.12.2 → 0.14.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.
@@ -14,16 +14,20 @@ import {
14
14
  toResponse
15
15
  } from "../../index-mfqj7cwr.js";
16
16
  import {
17
- CequreQueueManager,
17
+ CequreQueueManager
18
+ } from "../../index-7xxm1add.js";
19
+ import {
20
+ CequreError
21
+ } from "../../index-qzzg2p5r.js";
22
+ import {
18
23
  RedisAdapter,
19
24
  init_bun_redis_cache,
20
25
  init_logger,
21
26
  logger
22
- } from "../../index-rf1kdn5b.js";
27
+ } from "../../index-8bhn0nb4.js";
23
28
  import {
24
- CequreError,
25
29
  ulid
26
- } from "../../index-17yswtmg.js";
30
+ } from "../../index-cpw1bjf1.js";
27
31
 
28
32
  // adapters/bun/bun-server.ts
29
33
  class BunServerProvider {
@@ -48,7 +52,9 @@ class BunServerProvider {
48
52
  websocket: config.websocket,
49
53
  fetch: config.fetch
50
54
  });
51
- console.log(`\uD83D\uDE80 Cequre starting on http://${this.server.hostname}:${this.server.port}`);
55
+ if (process.env.CEQURE_VITE_MODE !== "1") {
56
+ console.log(`\uD83D\uDE80 Cequre starting on http://${this.server.hostname}:${this.server.port}`);
57
+ }
52
58
  return this.server;
53
59
  }
54
60
  async stop() {
@@ -1,15 +1,19 @@
1
1
  // @bun
2
2
  import {
3
- CequreQueueManager,
3
+ CequreQueueManager
4
+ } from "../../index-7xxm1add.js";
5
+ import {
6
+ CequreError
7
+ } from "../../index-qzzg2p5r.js";
8
+ import {
4
9
  exports_logger,
5
10
  init_logger,
6
11
  logger
7
- } from "../../index-rf1kdn5b.js";
12
+ } from "../../index-8bhn0nb4.js";
8
13
  import {
9
- CequreError,
10
14
  __toCommonJS,
11
15
  ulid
12
- } from "../../index-17yswtmg.js";
16
+ } from "../../index-cpw1bjf1.js";
13
17
 
14
18
  // adapters/node/node-server.ts
15
19
  import http from "http";
@@ -34,7 +38,7 @@ class NodeServerProvider {
34
38
  }
35
39
  }
36
40
  const fetchHandler = async (req) => {
37
- const url = new URL(req.url);
41
+ const url = new URL(req.url, "http://localhost");
38
42
  let handler = config.routes?.[url.pathname]?.[req.method] || config.routes?.[url.pathname]?.["ALL"];
39
43
  if (!handler && routeMatchers.length > 0) {
40
44
  for (const matcher of routeMatchers) {
@@ -91,7 +95,9 @@ class NodeServerProvider {
91
95
  socket.destroy();
92
96
  });
93
97
  });
94
- console.log(`\uD83D\uDE80 Cequre starting on http://${config.hostname || "localhost"}:${port}`);
98
+ if (process.env.CEQURE_VITE_MODE !== "1") {
99
+ console.log(`\uD83D\uDE80 Cequre starting on http://${config.hostname || "localhost"}:${port}`);
100
+ }
95
101
  const serverObj = this.server;
96
102
  serverObj.stop = this.stop.bind(this);
97
103
  return serverObj;
@@ -567,7 +573,14 @@ function getLog() {
567
573
  class RedisAdapter {
568
574
  redis;
569
575
  constructor(options) {
570
- this.redis = new Redis(options?.url || process.env.REDIS_URL || "redis://localhost:6379");
576
+ this.redis = new Redis(options?.url || process.env.REDIS_URL || "redis://localhost:6379", {
577
+ maxRetriesPerRequest: 1,
578
+ retryStrategy(times) {
579
+ if (times > 3)
580
+ return null;
581
+ return Math.min(times * 100, 1000);
582
+ }
583
+ });
571
584
  getLog().debug("Redis KV adapter initialized (ioredis)");
572
585
  }
573
586
  async get(key) {
@@ -0,0 +1,38 @@
1
+ export * from "./vercel-server";
2
+ export * from "./vercel-cron";
3
+ export * from "./vercel-sse";
4
+ export * from "./vercel-storage";
5
+ export * from "./upstash-kv";
6
+ export * from "./vercel-queue";
7
+ export * from "./vercel-response";
8
+ export * from "./vercel-media";
9
+ export * from "./vercel-websocket";
10
+ import type { CequreConfig } from "../../shared/main/runtime";
11
+ /**
12
+ * Vercel adapter for Cequre — configures the runtime for Vercel serverless.
13
+ *
14
+ * - ServerProvider: Exports fetch handler (no TCP server)
15
+ * - CronProvider: Webhook-based (Vercel Cron triggers)
16
+ * - StorageProvider: Vercel Blob (HTTP-based)
17
+ * - KV: Upstash Redis (HTTP-based, no TCP)
18
+ * - Realtime: SSE (no WebSocket on serverless)
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * import { createCequre } from "./cequre/_generated/server";
23
+ * import { withVercel } from "@cequrebackends/cequre-ts/adapters/vercel";
24
+ * import { turso } from "@cequrebackends/plugin-turso";
25
+ *
26
+ * const app = createCequre(withVercel({
27
+ * adapter: turso({ url: process.env.DATABASE_URL!, authToken: process.env.DATABASE_AUTH_TOKEN! }),
28
+ * kv: { driver: "upstash" },
29
+ * plugins: [defaultSecurity()],
30
+ * }));
31
+ *
32
+ * await app.init();
33
+ * export default async function handler(req: Request) {
34
+ * return app.fetch(req);
35
+ * }
36
+ * ```
37
+ */
38
+ export declare function withVercel(config: CequreConfig): CequreConfig;
@@ -0,0 +1,305 @@
1
+ // @bun
2
+ import {
3
+ UpstashKVAdapter,
4
+ init_logger,
5
+ init_upstash_kv,
6
+ logger
7
+ } from "../../index-8bhn0nb4.js";
8
+ import {
9
+ ulid
10
+ } from "../../index-cpw1bjf1.js";
11
+
12
+ // adapters/vercel/vercel-server.ts
13
+ class VercelServerProvider {
14
+ fetchHandler = null;
15
+ routeHandlers = {};
16
+ start(config) {
17
+ this.fetchHandler = config.fetch;
18
+ this.routeHandlers = config.routes || {};
19
+ return {
20
+ port: config.port || 3000,
21
+ hostname: config.hostname || "vercel",
22
+ stop: () => {},
23
+ stopImmediate: () => {}
24
+ };
25
+ }
26
+ getHandler() {
27
+ return this.fetchHandler;
28
+ }
29
+ async stop() {}
30
+ }
31
+ // adapters/vercel/vercel-cron.ts
32
+ init_logger();
33
+
34
+ class VercelCronProvider {
35
+ jobs = new Map;
36
+ registerJob(name, schedule, handler) {
37
+ if (this.jobs.has(name)) {
38
+ logger.warn(`[Cequre Cron (Vercel)] Job "${name}" already registered.`);
39
+ return;
40
+ }
41
+ this.jobs.set(name, { name, schedule, handler });
42
+ logger.info(`[Cequre Cron (Vercel)] Registered "${name}" with schedule "${schedule}". ` + `Add to vercel.json crons: { "path": "/_cron/${name}", "schedule": "${schedule}" }`);
43
+ }
44
+ async execute(name) {
45
+ const job = this.jobs.get(name);
46
+ if (!job) {
47
+ throw new Error(`[Cequre Cron (Vercel)] Job "${name}" not found.`);
48
+ }
49
+ try {
50
+ await job.handler();
51
+ } catch (err) {
52
+ logger.error(err, `[Cequre Cron (Vercel)] Job "${name}" failed:`);
53
+ throw err;
54
+ }
55
+ }
56
+ getCronConfigs() {
57
+ return Array.from(this.jobs.values()).map((job) => ({
58
+ path: `/_cron/${job.name}`,
59
+ schedule: job.schedule
60
+ }));
61
+ }
62
+ startAll() {}
63
+ stopAll() {
64
+ this.jobs.clear();
65
+ }
66
+ stop(name) {
67
+ return this.jobs.delete(name);
68
+ }
69
+ async list() {
70
+ return Array.from(this.jobs.keys());
71
+ }
72
+ }
73
+ // adapters/vercel/vercel-sse.ts
74
+ class VercelSSEProvider {
75
+ channels = new Map;
76
+ publish(topic, data) {
77
+ const listeners = this.channels.get(topic);
78
+ if (listeners) {
79
+ for (const listener of listeners) {
80
+ try {
81
+ listener(data);
82
+ } catch {}
83
+ }
84
+ }
85
+ }
86
+ broadcast(data) {
87
+ for (const listeners of this.channels.values()) {
88
+ for (const listener of listeners) {
89
+ try {
90
+ listener(data);
91
+ } catch {}
92
+ }
93
+ }
94
+ }
95
+ subscribe(topic, listener) {
96
+ if (!this.channels.has(topic)) {
97
+ this.channels.set(topic, new Set);
98
+ }
99
+ this.channels.get(topic).add(listener);
100
+ return () => {
101
+ this.channels.get(topic)?.delete(listener);
102
+ };
103
+ }
104
+ createSSEResponse(topic) {
105
+ const stream = new ReadableStream({
106
+ start: (controller) => {
107
+ const unsubscribe = this.subscribe(topic, (data) => {
108
+ controller.enqueue(`data: ${JSON.stringify(data)}
109
+
110
+ `);
111
+ });
112
+ controller._unsubscribe = unsubscribe;
113
+ },
114
+ cancel: (controller) => {
115
+ if (controller._unsubscribe) {
116
+ controller._unsubscribe();
117
+ }
118
+ }
119
+ });
120
+ return new Response(stream, {
121
+ headers: {
122
+ "Content-Type": "text/event-stream",
123
+ "Cache-Control": "no-cache",
124
+ Connection: "keep-alive"
125
+ }
126
+ });
127
+ }
128
+ }
129
+ // adapters/vercel/vercel-storage.ts
130
+ class VercelStorageProvider {
131
+ token;
132
+ constructor() {
133
+ this.token = process.env.BLOB_READ_WRITE_TOKEN || "";
134
+ if (!this.token) {
135
+ console.warn("[Cequre Storage (Vercel)] BLOB_READ_WRITE_TOKEN not set \u2014 file uploads will fail.");
136
+ }
137
+ }
138
+ async saveFile(file, options) {
139
+ const ext = file.name ? file.name.substring(file.name.lastIndexOf(".")) : "";
140
+ const safeName = options?.filename ? options.filename : `${ulid()}${ext}`;
141
+ const buffer = await file.arrayBuffer();
142
+ const res = await fetch("https://blob.vercel.com/", {
143
+ method: "POST",
144
+ headers: {
145
+ Authorization: `Bearer ${this.token}`,
146
+ "Content-Type": "application/json"
147
+ },
148
+ body: JSON.stringify({
149
+ pathname: safeName,
150
+ payload: Array.from(new Uint8Array(buffer))
151
+ })
152
+ });
153
+ if (!res.ok) {
154
+ throw new Error(`Vercel Blob upload failed: ${res.status} ${await res.text()}`);
155
+ }
156
+ const blob = await res.json();
157
+ return {
158
+ filename: safeName,
159
+ originalName: file.name || "upload",
160
+ mimetype: file.type || "application/octet-stream",
161
+ size: file.size,
162
+ url: blob.url
163
+ };
164
+ }
165
+ async deleteFile(filename) {
166
+ const res = await fetch("https://blob.vercel.com/", {
167
+ method: "DELETE",
168
+ headers: {
169
+ Authorization: `Bearer ${this.token}`,
170
+ "Content-Type": "application/json"
171
+ },
172
+ body: JSON.stringify({ pathname: filename })
173
+ });
174
+ if (!res.ok && res.status !== 404) {
175
+ console.error(`[Cequre Storage (Vercel)] Failed to delete ${filename}:`, await res.text());
176
+ }
177
+ }
178
+ }
179
+
180
+ // adapters/vercel/index.ts
181
+ init_upstash_kv();
182
+
183
+ // adapters/vercel/vercel-queue.ts
184
+ init_logger();
185
+
186
+ class VercelQueueProvider {
187
+ token;
188
+ workers = new Map;
189
+ baseUrl;
190
+ constructor() {
191
+ this.token = process.env.QSTASH_TOKEN || "";
192
+ this.baseUrl = process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` : "";
193
+ if (!this.token) {
194
+ console.warn("[Cequre Queue (Vercel)] QSTASH_TOKEN not set \u2014 enqueue will fail.");
195
+ }
196
+ }
197
+ async enqueue(queueName, jobName, data, options) {
198
+ if (!this.token) {
199
+ throw new Error("[Cequre Queue (Vercel)] QSTASH_TOKEN not configured.");
200
+ }
201
+ const callbackUrl = `${this.baseUrl}/_queue/${queueName}`;
202
+ const res = await fetch("https://qstash.upstash.io/v2/publish/" + encodeURIComponent(callbackUrl), {
203
+ method: "POST",
204
+ headers: {
205
+ Authorization: `Bearer ${this.token}`,
206
+ "Content-Type": "application/json"
207
+ },
208
+ body: JSON.stringify({
209
+ name: jobName,
210
+ data,
211
+ ...options
212
+ })
213
+ });
214
+ if (!res.ok) {
215
+ throw new Error(`QStash enqueue failed: ${res.status} ${await res.text()}`);
216
+ }
217
+ const result = await res.json();
218
+ return result.messageId;
219
+ }
220
+ registerWorker(queueName, handler) {
221
+ this.workers.set(queueName, handler);
222
+ logger.info(`[Cequre Queue (Vercel)] Worker registered for queue "${queueName}". Route: /_queue/${queueName}`);
223
+ }
224
+ async processDelivery(queueName, body) {
225
+ const handler = this.workers.get(queueName);
226
+ if (!handler) {
227
+ throw new Error(`[Cequre Queue (Vercel)] No worker for queue "${queueName}".`);
228
+ }
229
+ const job = {
230
+ id: body.messageId || body.id || "",
231
+ name: body.name || "default",
232
+ data: body.data,
233
+ timestamp: Date.now()
234
+ };
235
+ await handler(job);
236
+ }
237
+ startWorkers() {}
238
+ }
239
+ // adapters/vercel/vercel-response.ts
240
+ function methodNotAllowed(method) {
241
+ return new Response(JSON.stringify({ error: "Method Not Allowed" }), {
242
+ status: 405,
243
+ headers: { "Content-Type": "application/json", Allow: method || "" }
244
+ });
245
+ }
246
+ function notFound() {
247
+ return new Response(JSON.stringify({ error: "Not Found" }), {
248
+ status: 404,
249
+ headers: { "Content-Type": "application/json" }
250
+ });
251
+ }
252
+ function toResponse(result) {
253
+ if (result instanceof Response)
254
+ return result;
255
+ if (result === undefined || result === null) {
256
+ return new Response(null, { status: 204 });
257
+ }
258
+ return new Response(JSON.stringify(result), {
259
+ headers: { "Content-Type": "application/json" }
260
+ });
261
+ }
262
+ // adapters/vercel/vercel-media.ts
263
+ async function CequreStreamMedia(request, filename, options) {
264
+ const blobUrl = filename.startsWith("http") ? filename : `https://blob.vercel.com/${filename}`;
265
+ if (request.headers.get("range")) {
266
+ const blobRes = await fetch(blobUrl, {
267
+ headers: { Range: request.headers.get("range") }
268
+ });
269
+ return new Response(blobRes.body, {
270
+ status: blobRes.status,
271
+ headers: blobRes.headers
272
+ });
273
+ }
274
+ return new Response(null, {
275
+ status: 302,
276
+ headers: { Location: blobUrl }
277
+ });
278
+ }
279
+ // adapters/vercel/vercel-websocket.ts
280
+ var CequreWebsocket = undefined;
281
+ // adapters/vercel/index.ts
282
+ function withVercel(config) {
283
+ return {
284
+ ...config,
285
+ serverProvider: config.serverProvider || new VercelServerProvider,
286
+ cronProvider: config.cronProvider || new VercelCronProvider,
287
+ realtimeProvider: config.realtimeProvider || undefined,
288
+ storageProvider: config.storageProvider || new VercelStorageProvider,
289
+ kv: config.kv || { driver: "upstash" }
290
+ };
291
+ }
292
+ export {
293
+ withVercel,
294
+ toResponse,
295
+ notFound,
296
+ methodNotAllowed,
297
+ VercelStorageProvider,
298
+ VercelServerProvider,
299
+ VercelSSEProvider,
300
+ VercelQueueProvider,
301
+ VercelCronProvider,
302
+ UpstashKVAdapter,
303
+ CequreWebsocket,
304
+ CequreStreamMedia
305
+ };
@@ -0,0 +1,41 @@
1
+ import type { KVAdapter } from "../../shared/utils/kv/types";
2
+ /**
3
+ * Upstash Redis KV adapter — HTTP-based Redis for serverless.
4
+ *
5
+ * Upstash provides a REST API (no TCP connections) which works on
6
+ * Vercel serverless functions, Cloudflare Workers, and Edge runtime.
7
+ *
8
+ * Requires: UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN
9
+ * environment variables (or pass via constructor).
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * import { CequreKV } from "@cequrebackends/cequre-ts";
14
+ * const kv = new CequreKV({ driver: "upstash" });
15
+ * ```
16
+ */
17
+ export declare class UpstashKVAdapter implements KVAdapter {
18
+ private url;
19
+ private token;
20
+ constructor(options?: {
21
+ url?: string;
22
+ token?: string;
23
+ });
24
+ private command;
25
+ get<T = unknown>(key: string): Promise<T | null>;
26
+ getMany<T = unknown>(keys: string[]): Promise<Map<string, T>>;
27
+ set(key: string, value: unknown, ttl?: number): Promise<void>;
28
+ setMany(entries: Array<{
29
+ key: string;
30
+ value: unknown;
31
+ ttl?: number;
32
+ }>): Promise<void>;
33
+ delete(key: string): Promise<boolean>;
34
+ deleteMany(keys: string[]): Promise<number>;
35
+ has(key: string): Promise<boolean>;
36
+ keys(prefix?: string): Promise<string[]>;
37
+ count(): Promise<number>;
38
+ clear(): Promise<void>;
39
+ cleanup(): number;
40
+ close(): void;
41
+ }
@@ -0,0 +1,34 @@
1
+ import type { CronProvider } from "../../shared/core/types";
2
+ /**
3
+ * VercelCronProvider — Vercel Cron triggers are HTTP webhooks.
4
+ *
5
+ * registerJob() stores the job metadata. The generated app exposes
6
+ * a `/_cron/:name` route that Vercel Cron calls on schedule.
7
+ *
8
+ * vercel.json declares the cron schedules:
9
+ * "crons": [
10
+ * { "path": "/_cron/cleanup", "schedule": "0 * * * *" }
11
+ * ]
12
+ *
13
+ * startAll() is a no-op — Vercel triggers externally.
14
+ * execute(name) is called by the /_cron/:name route handler.
15
+ */
16
+ export declare class VercelCronProvider implements CronProvider {
17
+ private jobs;
18
+ registerJob(name: string, schedule: string, handler: () => void | Promise<void>): void;
19
+ /**
20
+ * Execute a cron job by name. Called by the /_cron/:name route handler.
21
+ */
22
+ execute(name: string): Promise<void>;
23
+ /**
24
+ * Returns all registered cron jobs for vercel.json generation.
25
+ */
26
+ getCronConfigs(): Array<{
27
+ path: string;
28
+ schedule: string;
29
+ }>;
30
+ startAll(): void;
31
+ stopAll(): void;
32
+ stop(name: string): boolean;
33
+ list(): Promise<string[]>;
34
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Vercel media streaming helper.
3
+ *
4
+ * On Vercel, media is served from Vercel Blob (CDN-backed).
5
+ * Range requests are handled by Vercel's CDN layer.
6
+ */
7
+ export declare function CequreStreamMedia(request: Request, filename: string, options?: {
8
+ provider?: string;
9
+ maxChunkSize?: number;
10
+ }): Promise<Response>;
@@ -0,0 +1,31 @@
1
+ interface QueueJob {
2
+ id: string;
3
+ name: string;
4
+ data: any;
5
+ timestamp: number;
6
+ }
7
+ /**
8
+ * VercelQueueProvider — uses Upstash QStash for serverless queues.
9
+ *
10
+ * enqueue() sends an HTTP POST to QStash, which retries and calls
11
+ * the webhook URL on schedule. registerWorker() registers a handler
12
+ * that QStash calls via HTTP webhook.
13
+ *
14
+ * Requires: QSTASH_TOKEN environment variable.
15
+ *
16
+ * The generated app exposes `/_queue/:queueName` routes that QStash calls.
17
+ */
18
+ export declare class VercelQueueProvider {
19
+ private token;
20
+ private workers;
21
+ private baseUrl;
22
+ constructor();
23
+ enqueue<T = any>(queueName: string, jobName: string, data: T, options?: any): Promise<string>;
24
+ registerWorker<T = any>(queueName: string, handler: (job: QueueJob) => Promise<void>): void;
25
+ /**
26
+ * Process a QStash webhook delivery. Called by the /_queue/:name route.
27
+ */
28
+ processDelivery(queueName: string, body: any): Promise<void>;
29
+ startWorkers(): void;
30
+ }
31
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare function methodNotAllowed(method?: string): Response;
2
+ export declare function notFound(): Response;
3
+ export declare function toResponse(result: any): Response;
4
+ export type VercelRouteResult = Response | undefined;
@@ -0,0 +1,24 @@
1
+ import type { ServerProvider, CequreServerConfig } from "../../shared/core/types";
2
+ /**
3
+ * VercelServerProvider — does NOT start a TCP server.
4
+ * Instead, it stashes the fetch handler for the serverless entry point
5
+ * to export as `export default function handler(req)`.
6
+ *
7
+ * On Vercel, each invocation is a fresh function call. The runtime
8
+ * must be initialized once at module scope (cold start), then `fetch()`
9
+ * is called per request.
10
+ *
11
+ * The runtime's graceful shutdown hooks call server.stop(), which is a
12
+ * no-op on serverless — Vercel manages function lifecycle.
13
+ */
14
+ export declare class VercelServerProvider implements ServerProvider {
15
+ private fetchHandler;
16
+ private routeHandlers;
17
+ start(config: CequreServerConfig): any;
18
+ /**
19
+ * Returns the fetch handler for the serverless entry point to export.
20
+ * Used by the generated index.ts: `export default async function handler(req) { return app.fetch(req) }`
21
+ */
22
+ getHandler(): ((req: Request, server?: any) => Promise<Response>) | null;
23
+ stop(): Promise<void>;
24
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Vercel SSE (Server-Sent Events) realtime provider.
3
+ *
4
+ * Vercel serverless does NOT support WebSocket connections.
5
+ * For two-way realtime, use a third-party service (Pusher, Ably, PartyKit).
6
+ *
7
+ * SSE works on Vercel Edge Functions and Node.js serverless.
8
+ * Clients connect via EventSource: `new EventSource("/_sse/:channel")`.
9
+ */
10
+ export declare class VercelSSEProvider {
11
+ private channels;
12
+ publish(topic: string, data: any): void;
13
+ broadcast(data: any): void;
14
+ subscribe(topic: string, listener: (data: any) => void): () => void;
15
+ /**
16
+ * Creates an SSE Response for a given channel.
17
+ * Used by the /_sse/:channel route handler.
18
+ */
19
+ createSSEResponse(topic: string): Response;
20
+ }
@@ -0,0 +1,23 @@
1
+ import type { StorageProvider, UploadedFile } from "../../shared/core/types";
2
+ /**
3
+ * VercelStorageProvider — uses Vercel Blob for file storage.
4
+ *
5
+ * Vercel serverless filesystem is read-only (except ephemeral /tmp).
6
+ * Vercel Blob provides HTTP-based object storage with CDN.
7
+ *
8
+ * Requires: BLOB_READ_WRITE_TOKEN environment variable.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * import { VercelStorageProvider } from "@cequrebackends/cequre-ts/adapters/vercel";
13
+ * const storage = new VercelStorageProvider();
14
+ * ```
15
+ */
16
+ export declare class VercelStorageProvider implements StorageProvider {
17
+ private token;
18
+ constructor();
19
+ saveFile(file: File, options?: {
20
+ filename?: string;
21
+ }): Promise<UploadedFile>;
22
+ deleteFile(filename: string): Promise<void>;
23
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Vercel WebSocket stub.
3
+ *
4
+ * Vercel serverless does NOT support WebSocket connections.
5
+ * The websocket property is set to undefined in withVercel().
6
+ *
7
+ * For realtime, use SSE (VercelSSEProvider) or a third-party
8
+ * service (Pusher, Ably, PartyKit).
9
+ *
10
+ * This file exists for adapter file parity (8 files matching Bun/Node).
11
+ */
12
+ export declare const CequreWebsocket: undefined;
@@ -1,10 +1,12 @@
1
1
  // @bun
2
2
  import {
3
- CequreError,
3
+ CequreError
4
+ } from "./index-qzzg2p5r.js";
5
+ import {
4
6
  __esm,
5
7
  __export,
6
8
  __toCommonJS
7
- } from "./index-17yswtmg.js";
9
+ } from "./index-cpw1bjf1.js";
8
10
 
9
11
  // shared/core/openapi.ts
10
12
  var exports_openapi = {};