@novu/framework 2.11.0 → 2.11.1
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/dist/cjs/{health-check.types-uaDLF5bo.d.cts → health-check.types-D4NEyjyC.d.cts} +29 -1
- package/dist/cjs/{index-D-SLxj--.d.cts → index-BNiIiOE-.d.cts} +2 -1
- package/dist/cjs/index.cjs +41 -38
- package/dist/cjs/index.d.cts +2 -2
- package/dist/cjs/internal/index.d.cts +2 -2
- package/dist/cjs/servers/express.cjs +42 -39
- package/dist/cjs/servers/express.d.cts +3 -3
- package/dist/cjs/servers/h3.cjs +22 -19
- package/dist/cjs/servers/h3.d.cts +3 -3
- package/dist/cjs/servers/lambda.cjs +53 -50
- package/dist/cjs/servers/lambda.d.cts +3 -3
- package/dist/cjs/servers/nest.cjs +40 -37
- package/dist/cjs/servers/nest.d.cts +4 -4
- package/dist/cjs/servers/next.cjs +43 -40
- package/dist/cjs/servers/next.d.cts +3 -3
- package/dist/cjs/servers/nuxt.cjs +22 -19
- package/dist/cjs/servers/nuxt.d.cts +3 -3
- package/dist/cjs/servers/remix.cjs +43 -40
- package/dist/cjs/servers/remix.d.cts +3 -3
- package/dist/cjs/servers/sveltekit.cjs +22 -19
- package/dist/cjs/servers/sveltekit.d.cts +3 -3
- package/dist/esm/{chunk-LJUUDK2J.js → chunk-ND6IQFTA.js} +57 -54
- package/dist/esm/{health-check.types-XZwesagD.d.ts → health-check.types-C-81VaBO.d.ts} +29 -1
- package/dist/esm/{index-dylq0Kmx.d.ts → index-D6L0Yufw.d.ts} +2 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/internal/index.d.ts +2 -2
- package/dist/esm/jsx-dev-runtime.js +1 -1
- package/dist/esm/jsx-runtime.js +1 -1
- package/dist/esm/servers/express.d.ts +3 -3
- package/dist/esm/servers/express.js +1 -1
- package/dist/esm/servers/h3.d.ts +3 -3
- package/dist/esm/servers/h3.js +1 -1
- package/dist/esm/servers/lambda.d.ts +3 -3
- package/dist/esm/servers/lambda.js +1 -1
- package/dist/esm/servers/nest.d.ts +4 -4
- package/dist/esm/servers/nest.js +1 -1
- package/dist/esm/servers/next.d.ts +3 -3
- package/dist/esm/servers/next.js +1 -1
- package/dist/esm/servers/nuxt.d.ts +3 -3
- package/dist/esm/servers/nuxt.js +1 -1
- package/dist/esm/servers/remix.d.ts +3 -3
- package/dist/esm/servers/remix.js +1 -1
- package/dist/esm/servers/sveltekit.d.ts +3 -3
- package/dist/esm/servers/sveltekit.js +1 -1
- package/package.json +3 -3
- /package/dist/esm/{chunk-K7PM3FEJ.js → chunk-KLCBNFAF.js} +0 -0
|
@@ -142,6 +142,21 @@ type CodeResult = {
|
|
|
142
142
|
code: string;
|
|
143
143
|
};
|
|
144
144
|
|
|
145
|
+
/**
|
|
146
|
+
* A minimal logger interface used for all of the framework's internal logging
|
|
147
|
+
* (workflow discovery, execution and bridge error reporting).
|
|
148
|
+
*
|
|
149
|
+
* The methods (`info`/`warn`/`error`) are chosen so that both the global
|
|
150
|
+
* `console` and common structured loggers (pino, winston, ...) satisfy this
|
|
151
|
+
* interface directly, with no adapter. The global `console` is the default;
|
|
152
|
+
* provide your own to route Novu's internal logs wherever the rest of your
|
|
153
|
+
* application logs go.
|
|
154
|
+
*/
|
|
155
|
+
type Logger = {
|
|
156
|
+
info: typeof console.info;
|
|
157
|
+
warn: typeof console.warn;
|
|
158
|
+
error: typeof console.error;
|
|
159
|
+
};
|
|
145
160
|
type ClientOptions = {
|
|
146
161
|
/**
|
|
147
162
|
* Use Novu Cloud US (https://api.novu.co) or EU deployment (https://eu.api.novu.co). Defaults to US.
|
|
@@ -171,6 +186,19 @@ type ClientOptions = {
|
|
|
171
186
|
* Defaults to `true` in development, `false` in production.
|
|
172
187
|
*/
|
|
173
188
|
verbose?: boolean;
|
|
189
|
+
/**
|
|
190
|
+
* A custom logger used for all of the framework's internal logging
|
|
191
|
+
* (workflow discovery, execution and bridge error reporting).
|
|
192
|
+
*
|
|
193
|
+
* Defaults to the global `console`. Provide your own logger to route Novu's
|
|
194
|
+
* internal logs through your application's structured logger.
|
|
195
|
+
*
|
|
196
|
+
* Note: `verbose` still controls *whether* discovery and execution logs are
|
|
197
|
+
* emitted; `logger` only controls *where* all logs are written. Bridge errors
|
|
198
|
+
* (HTTP status >= 500) are always logged via this logger, regardless of
|
|
199
|
+
* `verbose`.
|
|
200
|
+
*/
|
|
201
|
+
logger?: Logger;
|
|
174
202
|
};
|
|
175
203
|
|
|
176
204
|
declare enum PostActionEnum {
|
|
@@ -700,4 +728,4 @@ type HealthCheck = {
|
|
|
700
728
|
};
|
|
701
729
|
};
|
|
702
730
|
|
|
703
|
-
export { type ClientOptions as C, type DiscoverAgentOutput as D, type ExecuteInput as E, GetActionEnum as G, type HealthCheck as H, PostActionEnum as P, SeverityLevelEnum as S, type TriggerRecipientsPayload as T, type Workflow as W, CronExpression as a, type CancelEventTriggerResponse as b, type ChannelPreference as c, type CodeResult as d, type DiscoverOutput as e, type DiscoverProviderOutput as f, type DiscoverStepOutput as g, type DiscoverWorkflowOutput as h, type Event as i, type EventTriggerParams as j, type EventTriggerResponse as k, type EventTriggerResult as l, type Execute as m, type ExecuteOutput as n, type ExecuteOutputMetadata as o, type ExecuteOutputOptions as p, type State as q, type StepType as r, WorkflowChannelEnum as s, type WorkflowOptions as t, type WorkflowPreference as u, type WorkflowPreferences as v };
|
|
731
|
+
export { type ClientOptions as C, type DiscoverAgentOutput as D, type ExecuteInput as E, GetActionEnum as G, type HealthCheck as H, type Logger as L, PostActionEnum as P, SeverityLevelEnum as S, type TriggerRecipientsPayload as T, type Workflow as W, CronExpression as a, type CancelEventTriggerResponse as b, type ChannelPreference as c, type CodeResult as d, type DiscoverOutput as e, type DiscoverProviderOutput as f, type DiscoverStepOutput as g, type DiscoverWorkflowOutput as h, type Event as i, type EventTriggerParams as j, type EventTriggerResponse as k, type EventTriggerResult as l, type Execute as m, type ExecuteOutput as n, type ExecuteOutputMetadata as o, type ExecuteOutputOptions as p, type State as q, type StepType as r, WorkflowChannelEnum as s, type WorkflowOptions as t, type WorkflowPreference as u, type WorkflowPreferences as v };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChatElement, Emoji, CardElement } from 'chat';
|
|
2
|
-
import { T as TriggerRecipientsPayload, C as ClientOptions, W as Workflow, H as HealthCheck, e as DiscoverOutput, i as Event, n as ExecuteOutput, d as CodeResult, j as EventTriggerParams, m as Execute, t as WorkflowOptions } from './health-check.types-
|
|
2
|
+
import { T as TriggerRecipientsPayload, L as Logger, C as ClientOptions, W as Workflow, H as HealthCheck, e as DiscoverOutput, i as Event, n as ExecuteOutput, d as CodeResult, j as EventTriggerParams, m as Execute, t as WorkflowOptions } from './health-check.types-D4NEyjyC.cjs';
|
|
3
3
|
import { g as Awaitable } from './subscriber.types-PRaHFLJu.cjs';
|
|
4
4
|
import { S as Schema, a as FromSchema, F as FromSchemaUnvalidated } from './base.schema.types-BApIn9jr.cjs';
|
|
5
5
|
import './step-resolver.cjs';
|
|
@@ -472,6 +472,7 @@ declare class Client {
|
|
|
472
472
|
version: string;
|
|
473
473
|
strictAuthentication: boolean;
|
|
474
474
|
verbose: boolean;
|
|
475
|
+
logger: Logger;
|
|
475
476
|
constructor(options?: ClientOptions);
|
|
476
477
|
private buildOptions;
|
|
477
478
|
private log;
|