@cloudnux/local-cloud-provider 0.18.0 → 0.19.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/dist/dev-console-plugin/index.d.ts +76 -6
- package/dist/dev-console-plugin/index.js +994 -2037
- package/dist/dev-console-plugin/index.js.map +1 -1
- package/dist/index.d.ts +19 -4
- package/dist/index.js +161 -195
- package/dist/index.js.map +1 -1
- package/dist/queue-plugin/index.d.ts +36 -13
- package/dist/queue-plugin/index.js +342 -1431
- package/dist/queue-plugin/index.js.map +1 -1
- package/dist/schedule-plugin/index.d.ts +49 -21
- package/dist/schedule-plugin/index.js +529 -1590
- package/dist/schedule-plugin/index.js.map +1 -1
- package/dist/websocket-plugin/index.d.ts +18 -0
- package/dist/websocket-plugin/index.js +18 -1029
- package/dist/websocket-plugin/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
import { FastifyRequest, FastifyReply, FastifyPluginOptions, FastifyPluginAsync } from 'fastify';
|
|
2
|
+
import { LoggerService, LogEntry } from '@cloudnux/core-cloud-provider';
|
|
2
3
|
import { WebSocket } from 'ws';
|
|
3
4
|
|
|
5
|
+
type LogContext = {
|
|
6
|
+
module?: string;
|
|
7
|
+
reqId?: string;
|
|
8
|
+
};
|
|
9
|
+
type LogListener = (entry: LogEntry) => void;
|
|
10
|
+
type RunWithLogContext = <T>(context: LogContext, fn: () => T) => T;
|
|
11
|
+
type SubscribeToLogs = (listener: LogListener) => () => void;
|
|
12
|
+
type LoggingContext = LoggerService & {
|
|
13
|
+
runWithLogContext: RunWithLogContext;
|
|
14
|
+
subscribeToLogs: SubscribeToLogs;
|
|
15
|
+
};
|
|
16
|
+
declare module "fastify" {
|
|
17
|
+
interface FastifyInstance {
|
|
18
|
+
logging: LoggingContext;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
4
22
|
type WebSocketEvent = "connect" | "disconnect" | "message";
|
|
5
23
|
interface WebSocketConnection {
|
|
6
24
|
connectionId: string;
|