ezlogs-nextjs 0.1.4 → 0.3.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/README.md +106 -11
- package/bin/install-triggers.cjs +49 -11
- package/dist/actors/index.d.cts +1 -1
- package/dist/actors/index.d.ts +1 -1
- package/dist/{configuration-3Pei_XZ_.d.cts → configuration-OHLNivON.d.cts} +11 -20
- package/dist/{configuration-3Pei_XZ_.d.ts → configuration-OHLNivON.d.ts} +11 -20
- package/dist/db/drizzle.cjs +154 -18
- package/dist/db/drizzle.js +154 -18
- package/dist/db/prisma.cjs +242 -45
- package/dist/db/prisma.d.cts +39 -1
- package/dist/db/prisma.d.ts +39 -1
- package/dist/db/prisma.js +241 -46
- package/dist/db/supabase.cjs +154 -18
- package/dist/db/supabase.js +154 -18
- package/dist/index.cjs +761 -245
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +761 -245
- package/dist/jobs/bullmq.cjs +973 -16
- package/dist/jobs/bullmq.d.cts +8 -3
- package/dist/jobs/bullmq.d.ts +8 -3
- package/dist/jobs/bullmq.js +973 -16
- package/dist/jobs/inngest.cjs +880 -14
- package/dist/jobs/inngest.d.cts +7 -5
- package/dist/jobs/inngest.d.ts +7 -5
- package/dist/jobs/inngest.js +880 -14
- package/dist/jobs/supabase-queues.cjs +878 -16
- package/dist/jobs/supabase-queues.js +878 -16
- package/dist/jobs/trigger.cjs +914 -42
- package/dist/jobs/trigger.js +914 -42
- package/dist/jobs/upstash-workflow.cjs +914 -14
- package/dist/jobs/upstash-workflow.d.cts +16 -2
- package/dist/jobs/upstash-workflow.d.ts +16 -2
- package/dist/jobs/upstash-workflow.js +914 -15
- package/dist/triggers/index.cjs +405 -76
- package/dist/triggers/index.d.cts +36 -41
- package/dist/triggers/index.d.ts +36 -41
- package/dist/triggers/index.js +404 -74
- package/package.json +5 -1
- package/sql/postgres/00_install.sql +244 -21
|
@@ -8,6 +8,16 @@ interface QStashPublishRequest {
|
|
|
8
8
|
body?: unknown;
|
|
9
9
|
headers?: Record<string, string>;
|
|
10
10
|
}
|
|
11
|
+
interface WorkflowClientLike {
|
|
12
|
+
trigger?: Function;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Patches `trigger` on the user's `@upstash/workflow` Client so each
|
|
16
|
+
* started run (single or batch) carries the current correlation id to
|
|
17
|
+
* every step. A caller-supplied `x-ezlogs-correlation-id` header wins.
|
|
18
|
+
* No-op outside a captured request. Idempotent.
|
|
19
|
+
*/
|
|
20
|
+
declare function wrapWorkflowClient<T extends WorkflowClientLike>(client: T): T;
|
|
11
21
|
/**
|
|
12
22
|
* Patches `publishJSON` and `publish` on the user's QStash client so
|
|
13
23
|
* outbound requests carry the current correlation id forward to the
|
|
@@ -25,7 +35,11 @@ declare function wrapQStashClient<T extends QStashClientLike>(client: T): T;
|
|
|
25
35
|
* Reads runtime metadata from Upstash's request headers:
|
|
26
36
|
* - Upstash-Workflow-Runid -> job_id
|
|
27
37
|
* - Upstash-Retried -> retry_count
|
|
28
|
-
* -
|
|
38
|
+
* - x-ezlogs-correlation-id (stamped by wrapWorkflowClient /
|
|
39
|
+
* wrapQStashClient, agent id format only) -> correlation_id
|
|
40
|
+
*
|
|
41
|
+
* DB writes inside `work` are tagged with that correlation id and
|
|
42
|
+
* emitted when it finishes, so they join the same action.
|
|
29
43
|
*
|
|
30
44
|
* Returns the result of `work()`. Re-throws on failure so the user's
|
|
31
45
|
* Workflow retry / failure-routing semantics still work.
|
|
@@ -54,4 +68,4 @@ declare function emitUpstashWorkflowEvent(input: {
|
|
|
54
68
|
startedAt?: Date;
|
|
55
69
|
}): void;
|
|
56
70
|
|
|
57
|
-
export { captureWorkflowRequest, emitUpstashWorkflowEvent, wrapQStashClient };
|
|
71
|
+
export { captureWorkflowRequest, emitUpstashWorkflowEvent, wrapQStashClient, wrapWorkflowClient };
|
|
@@ -8,6 +8,16 @@ interface QStashPublishRequest {
|
|
|
8
8
|
body?: unknown;
|
|
9
9
|
headers?: Record<string, string>;
|
|
10
10
|
}
|
|
11
|
+
interface WorkflowClientLike {
|
|
12
|
+
trigger?: Function;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Patches `trigger` on the user's `@upstash/workflow` Client so each
|
|
16
|
+
* started run (single or batch) carries the current correlation id to
|
|
17
|
+
* every step. A caller-supplied `x-ezlogs-correlation-id` header wins.
|
|
18
|
+
* No-op outside a captured request. Idempotent.
|
|
19
|
+
*/
|
|
20
|
+
declare function wrapWorkflowClient<T extends WorkflowClientLike>(client: T): T;
|
|
11
21
|
/**
|
|
12
22
|
* Patches `publishJSON` and `publish` on the user's QStash client so
|
|
13
23
|
* outbound requests carry the current correlation id forward to the
|
|
@@ -25,7 +35,11 @@ declare function wrapQStashClient<T extends QStashClientLike>(client: T): T;
|
|
|
25
35
|
* Reads runtime metadata from Upstash's request headers:
|
|
26
36
|
* - Upstash-Workflow-Runid -> job_id
|
|
27
37
|
* - Upstash-Retried -> retry_count
|
|
28
|
-
* -
|
|
38
|
+
* - x-ezlogs-correlation-id (stamped by wrapWorkflowClient /
|
|
39
|
+
* wrapQStashClient, agent id format only) -> correlation_id
|
|
40
|
+
*
|
|
41
|
+
* DB writes inside `work` are tagged with that correlation id and
|
|
42
|
+
* emitted when it finishes, so they join the same action.
|
|
29
43
|
*
|
|
30
44
|
* Returns the result of `work()`. Re-throws on failure so the user's
|
|
31
45
|
* Workflow retry / failure-routing semantics still work.
|
|
@@ -54,4 +68,4 @@ declare function emitUpstashWorkflowEvent(input: {
|
|
|
54
68
|
startedAt?: Date;
|
|
55
69
|
}): void;
|
|
56
70
|
|
|
57
|
-
export { captureWorkflowRequest, emitUpstashWorkflowEvent, wrapQStashClient };
|
|
71
|
+
export { captureWorkflowRequest, emitUpstashWorkflowEvent, wrapQStashClient, wrapWorkflowClient };
|