ezlogs-nextjs 0.2.0 → 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.
@@ -7,12 +7,14 @@
7
7
  */
8
8
  declare function ezlogsInngestMiddleware(): unknown;
9
9
  /**
10
- * Helper for users who need to run downstream code inside the
11
- * correlation scope of an Inngest run (e.g. arbitrary work outside
12
- * the agent's automatic capture). Wraps a callback in
13
- * runWithCorrelation using the id extracted from an event's data.
10
+ * Run an Inngest function body (or a step) inside the run's
11
+ * correlation scope, so its DB writes are tagged and emitted under the
12
+ * action that sent the event. Inngest middleware can't wrap the body
13
+ * itself, so without this the job event is captured but the body's DB
14
+ * writes ship as their own actions:
14
15
  *
15
- * Most users won't need this — the middleware handles the common case.
16
+ * inngest.createFunction({ id: "send-invoice" }, { event: "invoice/created" },
17
+ * ({ event, step }) => runInsideInngestCorrelation(event, async () => { ... }))
16
18
  */
17
19
  declare function runInsideInngestCorrelation<T>(event: {
18
20
  data?: unknown;
@@ -7,12 +7,14 @@
7
7
  */
8
8
  declare function ezlogsInngestMiddleware(): unknown;
9
9
  /**
10
- * Helper for users who need to run downstream code inside the
11
- * correlation scope of an Inngest run (e.g. arbitrary work outside
12
- * the agent's automatic capture). Wraps a callback in
13
- * runWithCorrelation using the id extracted from an event's data.
10
+ * Run an Inngest function body (or a step) inside the run's
11
+ * correlation scope, so its DB writes are tagged and emitted under the
12
+ * action that sent the event. Inngest middleware can't wrap the body
13
+ * itself, so without this the job event is captured but the body's DB
14
+ * writes ship as their own actions:
14
15
  *
15
- * Most users won't need this — the middleware handles the common case.
16
+ * inngest.createFunction({ id: "send-invoice" }, { event: "invoice/created" },
17
+ * ({ event, step }) => runInsideInngestCorrelation(event, async () => { ... }))
16
18
  */
17
19
  declare function runInsideInngestCorrelation<T>(event: {
18
20
  data?: unknown;