ezlogs-nextjs 0.1.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/LICENSE +21 -0
- package/README.md +779 -0
- package/bin/install-triggers.cjs +75 -0
- package/dist/actors/index.cjs +111 -0
- package/dist/actors/index.d.cts +52 -0
- package/dist/actors/index.d.ts +52 -0
- package/dist/actors/index.js +107 -0
- package/dist/configuration-D9x9Gvds.d.cts +190 -0
- package/dist/configuration-D9x9Gvds.d.ts +190 -0
- package/dist/db/drizzle.cjs +898 -0
- package/dist/db/drizzle.d.cts +68 -0
- package/dist/db/drizzle.d.ts +68 -0
- package/dist/db/drizzle.js +893 -0
- package/dist/db/prisma.cjs +826 -0
- package/dist/db/prisma.d.cts +3 -0
- package/dist/db/prisma.d.ts +3 -0
- package/dist/db/prisma.js +824 -0
- package/dist/db/supabase.cjs +1027 -0
- package/dist/db/supabase.d.cts +32 -0
- package/dist/db/supabase.d.ts +32 -0
- package/dist/db/supabase.js +1024 -0
- package/dist/index.cjs +3329 -0
- package/dist/index.d.cts +305 -0
- package/dist/index.d.ts +305 -0
- package/dist/index.js +3317 -0
- package/dist/jobs/bullmq.cjs +624 -0
- package/dist/jobs/bullmq.d.cts +33 -0
- package/dist/jobs/bullmq.d.ts +33 -0
- package/dist/jobs/bullmq.js +621 -0
- package/dist/jobs/inngest.cjs +645 -0
- package/dist/jobs/inngest.d.cts +21 -0
- package/dist/jobs/inngest.d.ts +21 -0
- package/dist/jobs/inngest.js +642 -0
- package/dist/jobs/supabase-queues.cjs +661 -0
- package/dist/jobs/supabase-queues.d.cts +37 -0
- package/dist/jobs/supabase-queues.d.ts +37 -0
- package/dist/jobs/supabase-queues.js +657 -0
- package/dist/jobs/trigger.cjs +622 -0
- package/dist/jobs/trigger.d.cts +46 -0
- package/dist/jobs/trigger.d.ts +46 -0
- package/dist/jobs/trigger.js +619 -0
- package/dist/jobs/upstash-workflow.cjs +673 -0
- package/dist/jobs/upstash-workflow.d.cts +57 -0
- package/dist/jobs/upstash-workflow.d.ts +57 -0
- package/dist/jobs/upstash-workflow.js +669 -0
- package/dist/nextjs-plugin/index.cjs +232 -0
- package/dist/nextjs-plugin/index.d.cts +68 -0
- package/dist/nextjs-plugin/index.d.ts +68 -0
- package/dist/nextjs-plugin/index.js +229 -0
- package/dist/nextjs-plugin/loader.cjs +16248 -0
- package/dist/nextjs-plugin/loader.d.cts +61 -0
- package/dist/nextjs-plugin/loader.d.ts +61 -0
- package/dist/nextjs-plugin/loader.js +16242 -0
- package/dist/triggers/index.cjs +1354 -0
- package/dist/triggers/index.d.cts +243 -0
- package/dist/triggers/index.d.ts +243 -0
- package/dist/triggers/index.js +1337 -0
- package/package.json +150 -0
- package/sql/postgres/00_install.sql +205 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
interface QStashClientLike {
|
|
2
|
+
publishJSON?: (request: QStashPublishRequest) => Promise<unknown>;
|
|
3
|
+
publish?: (request: QStashPublishRequest) => Promise<unknown>;
|
|
4
|
+
}
|
|
5
|
+
interface QStashPublishRequest {
|
|
6
|
+
url?: string;
|
|
7
|
+
topic?: string;
|
|
8
|
+
body?: unknown;
|
|
9
|
+
headers?: Record<string, string>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Patches `publishJSON` and `publish` on the user's QStash client so
|
|
13
|
+
* outbound requests carry the current correlation id forward to the
|
|
14
|
+
* destination handler.
|
|
15
|
+
*
|
|
16
|
+
* Idempotent. Safe to call from a top-level module that may be
|
|
17
|
+
* re-imported during dev hot reload.
|
|
18
|
+
*/
|
|
19
|
+
declare function wrapQStashClient<T extends QStashClientLike>(client: T): T;
|
|
20
|
+
/**
|
|
21
|
+
* Worker-side capture for a single Upstash Workflow step / QStash
|
|
22
|
+
* delivery. Wraps your handler body so each invocation produces
|
|
23
|
+
* one background_job event.
|
|
24
|
+
*
|
|
25
|
+
* Reads runtime metadata from Upstash's request headers:
|
|
26
|
+
* - Upstash-Workflow-Runid -> job_id
|
|
27
|
+
* - Upstash-Retried -> retry_count
|
|
28
|
+
* - the wrapped X-Correlation-ID (forwarded by QStash) -> correlation_id
|
|
29
|
+
*
|
|
30
|
+
* Returns the result of `work()`. Re-throws on failure so the user's
|
|
31
|
+
* Workflow retry / failure-routing semantics still work.
|
|
32
|
+
*/
|
|
33
|
+
declare function captureWorkflowRequest<T>(meta: {
|
|
34
|
+
request: Request | {
|
|
35
|
+
headers: Headers;
|
|
36
|
+
};
|
|
37
|
+
workflowName: string;
|
|
38
|
+
/** Optional explicit step name; defaults to workflowName. */
|
|
39
|
+
stepName?: string;
|
|
40
|
+
}, work: () => Promise<T>): Promise<T>;
|
|
41
|
+
/**
|
|
42
|
+
* Standalone capture entry — for users who already have a finished
|
|
43
|
+
* request/response pair and just want an event recorded (e.g.
|
|
44
|
+
* end-of-handler in a custom serve() wrapper).
|
|
45
|
+
*/
|
|
46
|
+
declare function emitUpstashWorkflowEvent(input: {
|
|
47
|
+
workflowName: string;
|
|
48
|
+
request: Request | {
|
|
49
|
+
headers: Headers;
|
|
50
|
+
};
|
|
51
|
+
outcome: "success" | "failure";
|
|
52
|
+
errorMessage?: string | null;
|
|
53
|
+
durationMs?: number | null;
|
|
54
|
+
startedAt?: Date;
|
|
55
|
+
}): void;
|
|
56
|
+
|
|
57
|
+
export { captureWorkflowRequest, emitUpstashWorkflowEvent, wrapQStashClient };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
interface QStashClientLike {
|
|
2
|
+
publishJSON?: (request: QStashPublishRequest) => Promise<unknown>;
|
|
3
|
+
publish?: (request: QStashPublishRequest) => Promise<unknown>;
|
|
4
|
+
}
|
|
5
|
+
interface QStashPublishRequest {
|
|
6
|
+
url?: string;
|
|
7
|
+
topic?: string;
|
|
8
|
+
body?: unknown;
|
|
9
|
+
headers?: Record<string, string>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Patches `publishJSON` and `publish` on the user's QStash client so
|
|
13
|
+
* outbound requests carry the current correlation id forward to the
|
|
14
|
+
* destination handler.
|
|
15
|
+
*
|
|
16
|
+
* Idempotent. Safe to call from a top-level module that may be
|
|
17
|
+
* re-imported during dev hot reload.
|
|
18
|
+
*/
|
|
19
|
+
declare function wrapQStashClient<T extends QStashClientLike>(client: T): T;
|
|
20
|
+
/**
|
|
21
|
+
* Worker-side capture for a single Upstash Workflow step / QStash
|
|
22
|
+
* delivery. Wraps your handler body so each invocation produces
|
|
23
|
+
* one background_job event.
|
|
24
|
+
*
|
|
25
|
+
* Reads runtime metadata from Upstash's request headers:
|
|
26
|
+
* - Upstash-Workflow-Runid -> job_id
|
|
27
|
+
* - Upstash-Retried -> retry_count
|
|
28
|
+
* - the wrapped X-Correlation-ID (forwarded by QStash) -> correlation_id
|
|
29
|
+
*
|
|
30
|
+
* Returns the result of `work()`. Re-throws on failure so the user's
|
|
31
|
+
* Workflow retry / failure-routing semantics still work.
|
|
32
|
+
*/
|
|
33
|
+
declare function captureWorkflowRequest<T>(meta: {
|
|
34
|
+
request: Request | {
|
|
35
|
+
headers: Headers;
|
|
36
|
+
};
|
|
37
|
+
workflowName: string;
|
|
38
|
+
/** Optional explicit step name; defaults to workflowName. */
|
|
39
|
+
stepName?: string;
|
|
40
|
+
}, work: () => Promise<T>): Promise<T>;
|
|
41
|
+
/**
|
|
42
|
+
* Standalone capture entry — for users who already have a finished
|
|
43
|
+
* request/response pair and just want an event recorded (e.g.
|
|
44
|
+
* end-of-handler in a custom serve() wrapper).
|
|
45
|
+
*/
|
|
46
|
+
declare function emitUpstashWorkflowEvent(input: {
|
|
47
|
+
workflowName: string;
|
|
48
|
+
request: Request | {
|
|
49
|
+
headers: Headers;
|
|
50
|
+
};
|
|
51
|
+
outcome: "success" | "failure";
|
|
52
|
+
errorMessage?: string | null;
|
|
53
|
+
durationMs?: number | null;
|
|
54
|
+
startedAt?: Date;
|
|
55
|
+
}): void;
|
|
56
|
+
|
|
57
|
+
export { captureWorkflowRequest, emitUpstashWorkflowEvent, wrapQStashClient };
|