apitally 0.20.0 → 0.21.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 +28 -0
- package/dist/adonisjs/middleware.cjs.map +1 -1
- package/dist/adonisjs/middleware.js.map +1 -1
- package/dist/adonisjs/provider.cjs +37 -20
- package/dist/adonisjs/provider.cjs.map +1 -1
- package/dist/adonisjs/provider.js +37 -20
- package/dist/adonisjs/provider.js.map +1 -1
- package/dist/common/client.cjs +2 -1
- package/dist/common/client.cjs.map +1 -1
- package/dist/common/client.js +2 -1
- package/dist/common/client.js.map +1 -1
- package/dist/common/requestLogger.cjs +2 -1
- package/dist/common/requestLogger.cjs.map +1 -1
- package/dist/common/requestLogger.js +2 -1
- package/dist/common/requestLogger.js.map +1 -1
- package/dist/elysia/index.cjs +8 -4
- package/dist/elysia/index.cjs.map +1 -1
- package/dist/elysia/index.js +8 -4
- package/dist/elysia/index.js.map +1 -1
- package/dist/elysia/plugin.cjs +8 -4
- package/dist/elysia/plugin.cjs.map +1 -1
- package/dist/elysia/plugin.js +8 -4
- package/dist/elysia/plugin.js.map +1 -1
- package/dist/express/index.cjs +37 -20
- package/dist/express/index.cjs.map +1 -1
- package/dist/express/index.js +37 -20
- package/dist/express/index.js.map +1 -1
- package/dist/express/middleware.cjs +37 -20
- package/dist/express/middleware.cjs.map +1 -1
- package/dist/express/middleware.js +37 -20
- package/dist/express/middleware.js.map +1 -1
- package/dist/fastify/index.cjs +37 -20
- package/dist/fastify/index.cjs.map +1 -1
- package/dist/fastify/index.js +37 -20
- package/dist/fastify/index.js.map +1 -1
- package/dist/fastify/plugin.cjs +37 -20
- package/dist/fastify/plugin.cjs.map +1 -1
- package/dist/fastify/plugin.js +37 -20
- package/dist/fastify/plugin.js.map +1 -1
- package/dist/h3/index.cjs +8 -4
- package/dist/h3/index.cjs.map +1 -1
- package/dist/h3/index.js +8 -4
- package/dist/h3/index.js.map +1 -1
- package/dist/h3/plugin.cjs +8 -4
- package/dist/h3/plugin.cjs.map +1 -1
- package/dist/h3/plugin.js +8 -4
- package/dist/h3/plugin.js.map +1 -1
- package/dist/hapi/index.cjs +6134 -0
- package/dist/hapi/index.cjs.map +1 -0
- package/dist/hapi/index.d.cts +9 -0
- package/dist/hapi/index.d.ts +9 -0
- package/dist/hapi/index.js +6124 -0
- package/dist/hapi/index.js.map +1 -0
- package/dist/hapi/plugin.cjs +6131 -0
- package/dist/hapi/plugin.cjs.map +1 -0
- package/dist/hapi/plugin.d.cts +36 -0
- package/dist/hapi/plugin.d.ts +36 -0
- package/dist/hapi/plugin.js +6124 -0
- package/dist/hapi/plugin.js.map +1 -0
- package/dist/hapi/utils.cjs +98 -0
- package/dist/hapi/utils.cjs.map +1 -0
- package/dist/hapi/utils.d.cts +14 -0
- package/dist/hapi/utils.d.ts +14 -0
- package/dist/hapi/utils.js +77 -0
- package/dist/hapi/utils.js.map +1 -0
- package/dist/hono/index.cjs +8 -4
- package/dist/hono/index.cjs.map +1 -1
- package/dist/hono/index.js +8 -4
- package/dist/hono/index.js.map +1 -1
- package/dist/hono/middleware.cjs +8 -4
- package/dist/hono/middleware.cjs.map +1 -1
- package/dist/hono/middleware.js +8 -4
- package/dist/hono/middleware.js.map +1 -1
- package/dist/koa/index.cjs +8 -4
- package/dist/koa/index.cjs.map +1 -1
- package/dist/koa/index.js +8 -4
- package/dist/koa/index.js.map +1 -1
- package/dist/koa/middleware.cjs +8 -4
- package/dist/koa/middleware.cjs.map +1 -1
- package/dist/koa/middleware.js +8 -4
- package/dist/koa/middleware.js.map +1 -1
- package/dist/loggers/hapi.cjs +54 -0
- package/dist/loggers/hapi.cjs.map +1 -0
- package/dist/loggers/hapi.d.cts +10 -0
- package/dist/loggers/hapi.d.ts +10 -0
- package/dist/loggers/hapi.js +31 -0
- package/dist/loggers/hapi.js.map +1 -0
- package/dist/loggers/index.cjs +65 -25
- package/dist/loggers/index.cjs.map +1 -1
- package/dist/loggers/index.d.cts +2 -0
- package/dist/loggers/index.d.ts +2 -0
- package/dist/loggers/index.js +64 -25
- package/dist/loggers/index.js.map +1 -1
- package/dist/loggers/pino.cjs +23 -10
- package/dist/loggers/pino.cjs.map +1 -1
- package/dist/loggers/pino.d.cts +1 -1
- package/dist/loggers/pino.d.ts +1 -1
- package/dist/loggers/pino.js +23 -10
- package/dist/loggers/pino.js.map +1 -1
- package/dist/nestjs/index.cjs +45 -21
- package/dist/nestjs/index.cjs.map +1 -1
- package/dist/nestjs/index.js +43 -20
- package/dist/nestjs/index.js.map +1 -1
- package/package.json +21 -2
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ApitallyConsumer, ApitallyConfig } from '../common/types.cjs';
|
|
2
|
+
import { Server, Request } from '@hapi/hapi';
|
|
3
|
+
import { LogRecord } from '../common/requestLogger.cjs';
|
|
4
|
+
import '../common/logging.cjs';
|
|
5
|
+
import 'winston';
|
|
6
|
+
import 'node:buffer';
|
|
7
|
+
import 'node:http';
|
|
8
|
+
import '../common/tempGzipFile.cjs';
|
|
9
|
+
|
|
10
|
+
declare const START_TIME_SYMBOL: unique symbol;
|
|
11
|
+
declare const REQUEST_BODY_SYMBOL: unique symbol;
|
|
12
|
+
declare const REQUEST_SIZE_SYMBOL: unique symbol;
|
|
13
|
+
declare const RESPONSE_BODY_SYMBOL: unique symbol;
|
|
14
|
+
declare const RESPONSE_SIZE_SYMBOL: unique symbol;
|
|
15
|
+
declare const LOGS_SYMBOL: unique symbol;
|
|
16
|
+
declare module "@hapi/hapi" {
|
|
17
|
+
interface Request {
|
|
18
|
+
[START_TIME_SYMBOL]?: number;
|
|
19
|
+
[REQUEST_BODY_SYMBOL]?: Buffer;
|
|
20
|
+
[REQUEST_SIZE_SYMBOL]?: number;
|
|
21
|
+
[RESPONSE_BODY_SYMBOL]?: Buffer;
|
|
22
|
+
[RESPONSE_SIZE_SYMBOL]?: number;
|
|
23
|
+
[LOGS_SYMBOL]?: LogRecord[];
|
|
24
|
+
apitallyConsumer?: ApitallyConsumer | string;
|
|
25
|
+
}
|
|
26
|
+
interface ResponseObject {
|
|
27
|
+
readonly contentType: string | null;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
declare function apitallyPlugin(config: ApitallyConfig): {
|
|
31
|
+
name: string;
|
|
32
|
+
register: (server: Server) => Promise<void>;
|
|
33
|
+
};
|
|
34
|
+
declare function setConsumer(request: Request, consumer: ApitallyConsumer | string | null | undefined): void;
|
|
35
|
+
|
|
36
|
+
export { apitallyPlugin as default, setConsumer };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ApitallyConsumer, ApitallyConfig } from '../common/types.js';
|
|
2
|
+
import { Server, Request } from '@hapi/hapi';
|
|
3
|
+
import { LogRecord } from '../common/requestLogger.js';
|
|
4
|
+
import '../common/logging.js';
|
|
5
|
+
import 'winston';
|
|
6
|
+
import 'node:buffer';
|
|
7
|
+
import 'node:http';
|
|
8
|
+
import '../common/tempGzipFile.js';
|
|
9
|
+
|
|
10
|
+
declare const START_TIME_SYMBOL: unique symbol;
|
|
11
|
+
declare const REQUEST_BODY_SYMBOL: unique symbol;
|
|
12
|
+
declare const REQUEST_SIZE_SYMBOL: unique symbol;
|
|
13
|
+
declare const RESPONSE_BODY_SYMBOL: unique symbol;
|
|
14
|
+
declare const RESPONSE_SIZE_SYMBOL: unique symbol;
|
|
15
|
+
declare const LOGS_SYMBOL: unique symbol;
|
|
16
|
+
declare module "@hapi/hapi" {
|
|
17
|
+
interface Request {
|
|
18
|
+
[START_TIME_SYMBOL]?: number;
|
|
19
|
+
[REQUEST_BODY_SYMBOL]?: Buffer;
|
|
20
|
+
[REQUEST_SIZE_SYMBOL]?: number;
|
|
21
|
+
[RESPONSE_BODY_SYMBOL]?: Buffer;
|
|
22
|
+
[RESPONSE_SIZE_SYMBOL]?: number;
|
|
23
|
+
[LOGS_SYMBOL]?: LogRecord[];
|
|
24
|
+
apitallyConsumer?: ApitallyConsumer | string;
|
|
25
|
+
}
|
|
26
|
+
interface ResponseObject {
|
|
27
|
+
readonly contentType: string | null;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
declare function apitallyPlugin(config: ApitallyConfig): {
|
|
31
|
+
name: string;
|
|
32
|
+
register: (server: Server) => Promise<void>;
|
|
33
|
+
};
|
|
34
|
+
declare function setConsumer(request: Request, consumer: ApitallyConsumer | string | null | undefined): void;
|
|
35
|
+
|
|
36
|
+
export { apitallyPlugin as default, setConsumer };
|