@futurewindai/wotchi 0.1.0-beta.5 → 0.1.0-beta.6
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 +78 -24
- package/SECURITY.md +2 -2
- package/dist/cjs/core/admission.js +22 -0
- package/dist/cjs/core/client.js +46 -0
- package/dist/cjs/core/config.js +16 -0
- package/dist/cjs/core/diagnostics.js +4 -0
- package/dist/cjs/core/group-store.js +7 -8
- package/dist/cjs/core/limits.js +5 -1
- package/dist/cjs/core/normalize.js +6 -1
- package/dist/cjs/core/notification-queue.js +77 -8
- package/dist/cjs/core/prometheus.js +129 -0
- package/dist/cjs/core/redact.js +4 -1
- package/dist/cjs/core/runtime-monitor.js +109 -0
- package/dist/cjs/index.js +6 -1
- package/dist/cjs/integrations/express/error-handler.js +21 -5
- package/dist/cjs/integrations/nest/capture.js +21 -0
- package/dist/cjs/integrations/nest/exception-filter.js +62 -14
- package/dist/cjs/integrations/nest/filter-wrapper.js +17 -0
- package/dist/cjs/integrations/nest/index.js +6 -1
- package/dist/cjs/integrations/nest/module.js +44 -0
- package/dist/cjs/integrations/nest/register.js +15 -1
- package/dist/esm/core/admission.js +19 -0
- package/dist/esm/core/client.js +46 -0
- package/dist/esm/core/config.js +17 -1
- package/dist/esm/core/diagnostics.js +4 -0
- package/dist/esm/core/group-store.js +7 -8
- package/dist/esm/core/limits.js +4 -0
- package/dist/esm/core/normalize.js +6 -1
- package/dist/esm/core/notification-queue.js +78 -9
- package/dist/esm/core/prometheus.js +125 -0
- package/dist/esm/core/redact.js +4 -1
- package/dist/esm/core/runtime-monitor.js +106 -0
- package/dist/esm/index.js +3 -1
- package/dist/esm/integrations/express/error-handler.js +21 -5
- package/dist/esm/integrations/nest/capture.js +17 -0
- package/dist/esm/integrations/nest/exception-filter.js +63 -15
- package/dist/esm/integrations/nest/filter-wrapper.js +14 -0
- package/dist/esm/integrations/nest/index.js +2 -0
- package/dist/esm/integrations/nest/module.js +41 -0
- package/dist/esm/integrations/nest/register.js +15 -1
- package/dist/types/core/admission.d.ts +10 -0
- package/dist/types/core/config.d.ts +10 -0
- package/dist/types/core/diagnostics.d.ts +3 -1
- package/dist/types/core/incident-policy.d.ts +1 -1
- package/dist/types/core/limits.d.ts +4 -0
- package/dist/types/core/notification-queue.d.ts +9 -0
- package/dist/types/core/prometheus.d.ts +7 -0
- package/dist/types/core/runtime-monitor.d.ts +15 -0
- package/dist/types/core/types.d.ts +16 -1
- package/dist/types/index.d.ts +5 -1
- package/dist/types/integrations/nest/capture.d.ts +4 -0
- package/dist/types/integrations/nest/exception-filter.d.ts +6 -2
- package/dist/types/integrations/nest/filter-wrapper.d.ts +7 -0
- package/dist/types/integrations/nest/index.d.ts +4 -0
- package/dist/types/integrations/nest/module.d.ts +9 -0
- package/dist/types/integrations/nest/register.d.ts +3 -0
- package/dist/types-cjs/core/admission.d.cts +10 -0
- package/dist/types-cjs/core/config.d.cts +10 -0
- package/dist/types-cjs/core/diagnostics.d.cts +3 -1
- package/dist/types-cjs/core/incident-policy.d.cts +1 -1
- package/dist/types-cjs/core/limits.d.cts +4 -0
- package/dist/types-cjs/core/notification-queue.d.cts +9 -0
- package/dist/types-cjs/core/prometheus.d.cts +7 -0
- package/dist/types-cjs/core/runtime-monitor.d.cts +15 -0
- package/dist/types-cjs/core/types.d.cts +16 -1
- package/dist/types-cjs/index.d.cts +5 -1
- package/dist/types-cjs/integrations/nest/capture.d.cts +4 -0
- package/dist/types-cjs/integrations/nest/exception-filter.d.cts +6 -2
- package/dist/types-cjs/integrations/nest/filter-wrapper.d.cts +7 -0
- package/dist/types-cjs/integrations/nest/index.d.cts +4 -0
- package/dist/types-cjs/integrations/nest/module.d.cts +9 -0
- package/dist/types-cjs/integrations/nest/register.d.cts +3 -0
- package/package.json +12 -1
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { type ArgumentsHost, type HttpServer } from "@nestjs/common";
|
|
2
2
|
import { BaseExceptionFilter } from "@nestjs/core";
|
|
3
3
|
import type { WotchiClient } from "../../core/types.js";
|
|
4
|
-
import {
|
|
4
|
+
import type { NestExceptionFilterLike } from "./filter-wrapper.js";
|
|
5
|
+
import type { NestWotchiOptions } from "./request-context.js";
|
|
5
6
|
export declare class WotchiNestExceptionFilter extends BaseExceptionFilter<unknown> {
|
|
6
7
|
private readonly client;
|
|
7
8
|
private readonly options?;
|
|
8
|
-
|
|
9
|
+
private readonly previousGlobalFilters;
|
|
10
|
+
constructor(client: WotchiClient, applicationRef?: HttpServer, options?: NestWotchiOptions | undefined, previousGlobalFilters?: readonly NestExceptionFilterLike[]);
|
|
9
11
|
catch(exception: unknown, host: ArgumentsHost): void;
|
|
12
|
+
private respondWithoutLoggingRawUnknownException;
|
|
13
|
+
private respondThroughExpressAdapter;
|
|
10
14
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ArgumentsHost } from "@nestjs/common";
|
|
2
|
+
import type { WotchiClient } from "../../core/types.js";
|
|
3
|
+
import type { NestWotchiOptions } from "./request-context.js";
|
|
4
|
+
export interface NestExceptionFilterLike {
|
|
5
|
+
catch(exception: unknown, host: ArgumentsHost): void;
|
|
6
|
+
}
|
|
7
|
+
export declare function withWotchiNestFilter<TFilter extends NestExceptionFilterLike>(client: WotchiClient, filter: TFilter, options?: NestWotchiOptions): TFilter;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export { consoleNotifier, createWotchi, telegramNotifier, webhookNotifier } from "../../index.js";
|
|
2
|
+
export { withWotchiNestFilter } from "./filter-wrapper.js";
|
|
3
|
+
export { WotchiModule, WOTCHI_CLIENT } from "./module.js";
|
|
2
4
|
export { registerWotchiNest, registerWotchiNestStatusObserver } from "./register.js";
|
|
3
5
|
export type { ConsoleNotifierOptions, IncidentAlert, IncidentGroup, IncidentSeverity, SafeErrorEvent, TelegramNotifierOptions, WebhookNotifierOptions, WotchiBeforeSend, WotchiCaptureOptions, WotchiClient, WotchiConfig, WotchiDiagnostics, WotchiEventFilter, WotchiEventInput, WotchiFingerprintCallback, WotchiFingerprintOverride, WotchiIncidentRule, WotchiLinkTemplates, WotchiLinks, WotchiNotifier, WotchiRequestContext, WotchiTags, WotchiTestAlertResult, WotchiTestAlertStatus, WotchiTraceContext, } from "../../index.js";
|
|
4
6
|
export type { NestWotchiApplication, NestWotchiOptions } from "./register.js";
|
|
7
|
+
export type { NestExceptionFilterLike } from "./filter-wrapper.js";
|
|
8
|
+
export type { WotchiNestModuleOptions } from "./module.js";
|
|
5
9
|
export type { WotchiStatusClass, WotchiStatusObserverOptions } from "../express/status-observer.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type DynamicModule } from "@nestjs/common";
|
|
2
|
+
import type { WotchiConfig } from "../../core/types.js";
|
|
3
|
+
export declare const WOTCHI_CLIENT: unique symbol;
|
|
4
|
+
export interface WotchiNestModuleOptions {
|
|
5
|
+
registerGlobalFilter?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare class WotchiModule {
|
|
8
|
+
static forRoot(config: WotchiConfig, options?: WotchiNestModuleOptions): DynamicModule;
|
|
9
|
+
}
|
|
@@ -8,6 +8,9 @@ export interface NestWotchiApplication {
|
|
|
8
8
|
getHttpAdapter?: () => unknown;
|
|
9
9
|
use?: (...middleware: unknown[]) => unknown;
|
|
10
10
|
useGlobalFilters(...filters: unknown[]): unknown;
|
|
11
|
+
config?: {
|
|
12
|
+
getGlobalFilters?: () => unknown[];
|
|
13
|
+
};
|
|
11
14
|
}
|
|
12
15
|
export declare function registerWotchiNest(app: unknown, client: WotchiClient, options?: NestWotchiOptions): void;
|
|
13
16
|
export declare function registerWotchiNestStatusObserver(app: unknown, client: WotchiClient, options?: WotchiStatusObserverOptions): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@futurewindai/wotchi",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.6",
|
|
4
4
|
"description": "Low-noise error alerts for Node.js, Express, and NestJS applications",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nodejs",
|
|
@@ -33,6 +33,16 @@
|
|
|
33
33
|
"main": "./dist/cjs/index.js",
|
|
34
34
|
"module": "./dist/esm/index.js",
|
|
35
35
|
"types": "./dist/types/index.d.ts",
|
|
36
|
+
"typesVersions": {
|
|
37
|
+
"*": {
|
|
38
|
+
"express": [
|
|
39
|
+
"dist/types/integrations/express/index.d.ts"
|
|
40
|
+
],
|
|
41
|
+
"nest": [
|
|
42
|
+
"dist/types/integrations/nest/index.d.ts"
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
},
|
|
36
46
|
"exports": {
|
|
37
47
|
".": {
|
|
38
48
|
"types": {
|
|
@@ -83,6 +93,7 @@
|
|
|
83
93
|
"test": "npm run test:compile && node --test .test-dist/test/unit/*.test.js .test-dist/test/integration/express/*.test.js .test-dist/test/integration/nest/*.test.js .test-dist/test/security/*.test.js",
|
|
84
94
|
"pack:dry-run": "npm run build && npm pack --dry-run --json",
|
|
85
95
|
"verify:package": "npm run build && node scripts/verify-package.mjs",
|
|
96
|
+
"verify:published-metadata": "node scripts/verify-published-metadata.mjs",
|
|
86
97
|
"test:compat": "npm run build && node test/compatibility/package-exports.smoke.cjs && node test/compatibility/framework-isolation.cjs",
|
|
87
98
|
"test:compat:matrix": "npm run build && node scripts/run-compatibility-matrix.mjs",
|
|
88
99
|
"benchmark": "npm run build && node --expose-gc scripts/run-benchmarks.mjs",
|