@singhak/nodeui-nestjs 0.1.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.
- package/README.md +78 -65
- package/dist/index.cjs +60 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +25 -3
- package/dist/index.d.ts +25 -3
- package/dist/index.mjs +62 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +76 -76
package/README.md
CHANGED
|
@@ -1,65 +1,78 @@
|
|
|
1
|
-
# @singhak/nodeui-nestjs
|
|
2
|
-
|
|
3
|
-
NestJS module adapter for the NodeUI developer console. Registers the core
|
|
4
|
-
middleware for every route, serving the bundled React console and its API under
|
|
5
|
-
`{path}` (default `/nodeui`) and recording app requests in the request-log
|
|
6
|
-
panel.
|
|
7
|
-
|
|
8
|
-
## Install
|
|
9
|
-
|
|
10
|
-
```bash
|
|
11
|
-
npm install @singhak/nodeui-nestjs
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
Peer dependencies: `@nestjs/common`, `@nestjs/core`, `reflect-metadata`,
|
|
15
|
-
`rxjs`.
|
|
16
|
-
|
|
17
|
-
## Usage
|
|
18
|
-
|
|
19
|
-
```ts
|
|
20
|
-
import { Module } from '@nestjs/common';
|
|
21
|
-
import { NodeUIModule } from '@singhak/nodeui-nestjs';
|
|
22
|
-
|
|
23
|
-
@Module({ imports: [NodeUIModule.register()] })
|
|
24
|
-
export class AppModule {}
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
```ts
|
|
28
|
-
// main.ts
|
|
29
|
-
import 'reflect-metadata';
|
|
30
|
-
import { NestFactory } from '@nestjs/core';
|
|
31
|
-
import { NodeUIService } from '@singhak/nodeui-nestjs';
|
|
32
|
-
import { AppModule } from './app.module';
|
|
33
|
-
|
|
34
|
-
async function bootstrap(): Promise<void> {
|
|
35
|
-
const app = await NestFactory.create(AppModule);
|
|
36
|
-
await app.listen(3000, '127.0.0.1');
|
|
37
|
-
app.get(NodeUIService).mark('listening');
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
void bootstrap();
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
Open `http://127.0.0.1:3000/nodeui` for the console and
|
|
44
|
-
`http://127.0.0.1:3000/nodeui/api/config` for the API.
|
|
45
|
-
|
|
46
|
-
## NodeUIService
|
|
47
|
-
|
|
48
|
-
Injectable handle to the underlying server:
|
|
49
|
-
|
|
50
|
-
- `mark(name)` — record a startup timing mark.
|
|
51
|
-
- `config` — the effective configuration.
|
|
52
|
-
- `shutdown()` — stop all sampling and timers.
|
|
53
|
-
|
|
54
|
-
## Options
|
|
55
|
-
|
|
56
|
-
`NodeUIModule.register(options?)` accepts any `@singhak/nodeui-core` `NodeUIOptions`.
|
|
57
|
-
See the `@singhak/nodeui-core` README for the configuration table and safety model.
|
|
58
|
-
|
|
59
|
-
## Development
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
npm run typecheck
|
|
63
|
-
npm test
|
|
64
|
-
npm run build
|
|
65
|
-
```
|
|
1
|
+
# @singhak/nodeui-nestjs
|
|
2
|
+
|
|
3
|
+
NestJS module adapter for the NodeUI developer console. Registers the core
|
|
4
|
+
middleware for every route, serving the bundled React console and its API under
|
|
5
|
+
`{path}` (default `/nodeui`) and recording app requests in the request-log
|
|
6
|
+
panel.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install @singhak/nodeui-nestjs
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Peer dependencies: `@nestjs/common`, `@nestjs/core`, `reflect-metadata`,
|
|
15
|
+
`rxjs`.
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import { Module } from '@nestjs/common';
|
|
21
|
+
import { NodeUIModule } from '@singhak/nodeui-nestjs';
|
|
22
|
+
|
|
23
|
+
@Module({ imports: [NodeUIModule.register()] })
|
|
24
|
+
export class AppModule {}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
// main.ts
|
|
29
|
+
import 'reflect-metadata';
|
|
30
|
+
import { NestFactory } from '@nestjs/core';
|
|
31
|
+
import { NodeUIService } from '@singhak/nodeui-nestjs';
|
|
32
|
+
import { AppModule } from './app.module';
|
|
33
|
+
|
|
34
|
+
async function bootstrap(): Promise<void> {
|
|
35
|
+
const app = await NestFactory.create(AppModule);
|
|
36
|
+
await app.listen(3000, '127.0.0.1');
|
|
37
|
+
app.get(NodeUIService).mark('listening');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
void bootstrap();
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Open `http://127.0.0.1:3000/nodeui` for the console and
|
|
44
|
+
`http://127.0.0.1:3000/nodeui/api/config` for the API.
|
|
45
|
+
|
|
46
|
+
## NodeUIService
|
|
47
|
+
|
|
48
|
+
Injectable handle to the underlying server:
|
|
49
|
+
|
|
50
|
+
- `mark(name)` — record a startup timing mark.
|
|
51
|
+
- `config` — the effective configuration.
|
|
52
|
+
- `shutdown()` — stop all sampling and timers.
|
|
53
|
+
|
|
54
|
+
## Options
|
|
55
|
+
|
|
56
|
+
`NodeUIModule.register(options?)` accepts any `@singhak/nodeui-core` `NodeUIOptions`.
|
|
57
|
+
See the `@singhak/nodeui-core` README for the configuration table and safety model.
|
|
58
|
+
|
|
59
|
+
## Development
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
npm run typecheck
|
|
63
|
+
npm test
|
|
64
|
+
npm run build
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Logs panel
|
|
68
|
+
|
|
69
|
+
Nest's default logger writes to `process.stdout`, not `console.*`, so its output
|
|
70
|
+
would not reach the Logs panel. Mirror it with `NodeUILogger`:
|
|
71
|
+
|
|
72
|
+
```ts
|
|
73
|
+
const app = await NestFactory.create(AppModule, { bufferLogs: true });
|
|
74
|
+
app.useLogger(app.get(NodeUILogger));
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The module also shuts the console down (stopping samplers and restoring
|
|
78
|
+
`console.*`) when the Nest app closes.
|
package/dist/index.cjs
CHANGED
|
@@ -31,22 +31,69 @@ var __decorateParam = (index, decorator) => (target, key) => decorator(target, k
|
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
33
|
NODEUI_SERVER: () => NODEUI_SERVER,
|
|
34
|
+
NodeUILogger: () => NodeUILogger,
|
|
34
35
|
NodeUIModule: () => NodeUIModule,
|
|
35
36
|
NodeUIService: () => NodeUIService
|
|
36
37
|
});
|
|
37
38
|
module.exports = __toCommonJS(index_exports);
|
|
38
39
|
|
|
39
40
|
// src/nodeui.module.ts
|
|
40
|
-
var
|
|
41
|
+
var import_common3 = require("@nestjs/common");
|
|
41
42
|
var import_nodeui_core = require("@singhak/nodeui-core");
|
|
42
43
|
|
|
43
|
-
// src/nodeui.
|
|
44
|
+
// src/nodeui.logger.ts
|
|
44
45
|
var import_common = require("@nestjs/common");
|
|
45
46
|
|
|
46
47
|
// src/tokens.ts
|
|
47
48
|
var NODEUI_SERVER = /* @__PURE__ */ Symbol("NODEUI_SERVER");
|
|
48
49
|
|
|
50
|
+
// src/nodeui.logger.ts
|
|
51
|
+
function format(message, optionalParams) {
|
|
52
|
+
const parts = [
|
|
53
|
+
message,
|
|
54
|
+
...optionalParams.filter((p) => typeof p === "string" || p instanceof Error)
|
|
55
|
+
];
|
|
56
|
+
return parts.map(
|
|
57
|
+
(p) => typeof p === "string" ? p : p instanceof Error ? p.stack ?? p.message : JSON.stringify(p)
|
|
58
|
+
).join(" ");
|
|
59
|
+
}
|
|
60
|
+
var NodeUILogger = class extends import_common.ConsoleLogger {
|
|
61
|
+
constructor(server) {
|
|
62
|
+
super();
|
|
63
|
+
this.server = server;
|
|
64
|
+
}
|
|
65
|
+
server;
|
|
66
|
+
tee(level, message, params) {
|
|
67
|
+
this.server.addLogSource({ level, message: format(message, params) });
|
|
68
|
+
}
|
|
69
|
+
log(message, ...optionalParams) {
|
|
70
|
+
this.tee("info", message, optionalParams);
|
|
71
|
+
super.log(message, ...optionalParams);
|
|
72
|
+
}
|
|
73
|
+
warn(message, ...optionalParams) {
|
|
74
|
+
this.tee("warn", message, optionalParams);
|
|
75
|
+
super.warn(message, ...optionalParams);
|
|
76
|
+
}
|
|
77
|
+
error(message, ...optionalParams) {
|
|
78
|
+
this.tee("error", message, optionalParams);
|
|
79
|
+
super.error(message, ...optionalParams);
|
|
80
|
+
}
|
|
81
|
+
debug(message, ...optionalParams) {
|
|
82
|
+
this.tee("debug", message, optionalParams);
|
|
83
|
+
super.debug(message, ...optionalParams);
|
|
84
|
+
}
|
|
85
|
+
verbose(message, ...optionalParams) {
|
|
86
|
+
this.tee("debug", message, optionalParams);
|
|
87
|
+
super.verbose(message, ...optionalParams);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
NodeUILogger = __decorateClass([
|
|
91
|
+
(0, import_common.Injectable)(),
|
|
92
|
+
__decorateParam(0, (0, import_common.Inject)(NODEUI_SERVER))
|
|
93
|
+
], NodeUILogger);
|
|
94
|
+
|
|
49
95
|
// src/nodeui.service.ts
|
|
96
|
+
var import_common2 = require("@nestjs/common");
|
|
50
97
|
var NodeUIService = class {
|
|
51
98
|
constructor(server) {
|
|
52
99
|
this.server = server;
|
|
@@ -66,8 +113,8 @@ var NodeUIService = class {
|
|
|
66
113
|
}
|
|
67
114
|
};
|
|
68
115
|
NodeUIService = __decorateClass([
|
|
69
|
-
(0,
|
|
70
|
-
__decorateParam(0, (0,
|
|
116
|
+
(0, import_common2.Injectable)(),
|
|
117
|
+
__decorateParam(0, (0, import_common2.Inject)(NODEUI_SERVER))
|
|
71
118
|
], NodeUIService);
|
|
72
119
|
|
|
73
120
|
// src/nodeui.module.ts
|
|
@@ -80,17 +127,21 @@ var NodeUIModule = class {
|
|
|
80
127
|
const server = (0, import_nodeui_core.createNodeUI)(options);
|
|
81
128
|
return {
|
|
82
129
|
module: NodeUIModule,
|
|
83
|
-
providers: [{ provide: NODEUI_SERVER, useValue: server }, NodeUIService],
|
|
84
|
-
exports: [NodeUIService, NODEUI_SERVER]
|
|
130
|
+
providers: [{ provide: NODEUI_SERVER, useValue: server }, NodeUIService, NodeUILogger],
|
|
131
|
+
exports: [NodeUIService, NodeUILogger, NODEUI_SERVER]
|
|
85
132
|
};
|
|
86
133
|
}
|
|
87
134
|
configure(consumer) {
|
|
88
135
|
consumer.apply(this.server.middleware()).forRoutes("*");
|
|
89
136
|
}
|
|
137
|
+
/** Stops samplers and restores `console.*` when the Nest app closes. */
|
|
138
|
+
onModuleDestroy() {
|
|
139
|
+
this.server.shutdown();
|
|
140
|
+
}
|
|
90
141
|
};
|
|
91
142
|
NodeUIModule = __decorateClass([
|
|
92
|
-
(0,
|
|
93
|
-
__decorateParam(0, (0,
|
|
143
|
+
(0, import_common3.Module)({}),
|
|
144
|
+
__decorateParam(0, (0, import_common3.Inject)(NODEUI_SERVER))
|
|
94
145
|
], NodeUIModule);
|
|
95
146
|
|
|
96
147
|
// src/index.ts
|
|
@@ -98,6 +149,7 @@ __reExport(index_exports, require("@singhak/nodeui-core"), module.exports);
|
|
|
98
149
|
// Annotate the CommonJS export names for ESM import in node:
|
|
99
150
|
0 && (module.exports = {
|
|
100
151
|
NODEUI_SERVER,
|
|
152
|
+
NodeUILogger,
|
|
101
153
|
NodeUIModule,
|
|
102
154
|
NodeUIService,
|
|
103
155
|
...require("@singhak/nodeui-core")
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/nodeui.module.ts","../src/nodeui.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/nodeui.module.ts","../src/nodeui.logger.ts","../src/tokens.ts","../src/nodeui.service.ts"],"sourcesContent":["/**\r\n * @singhak/nodeui-nestjs — NestJS adapter for the NodeUI developer console.\r\n */\r\n\r\nexport { NodeUIModule } from './nodeui.module';\r\nexport { NodeUILogger } from './nodeui.logger';\r\nexport { NodeUIService } from './nodeui.service';\r\nexport { NODEUI_SERVER } from './tokens';\r\nexport * from '@singhak/nodeui-core';\r\n","import {\r\n DynamicModule,\r\n Inject,\r\n MiddlewareConsumer,\r\n Module,\r\n NestModule,\r\n OnModuleDestroy,\r\n} from '@nestjs/common';\r\nimport { createNodeUI, type NodeUIOptions, type NodeUIServer } from '@singhak/nodeui-core';\r\nimport { NodeUILogger } from './nodeui.logger';\r\nimport { NodeUIService } from './nodeui.service';\r\nimport { NODEUI_SERVER } from './tokens';\r\n\r\n/**\r\n * NestJS adapter for the NodeUI developer console. Mounts the core middleware\r\n * for every route; the console and its API live under `NODEUI_PATH` (default\r\n * `/nodeui`) and app requests are recorded in the request log.\r\n *\r\n * @example\r\n * @Module({ imports: [NodeUIModule.register()] })\r\n * export class AppModule {}\r\n */\r\n@Module({})\r\nexport class NodeUIModule implements NestModule, OnModuleDestroy {\r\n static register(options?: NodeUIOptions): DynamicModule {\r\n const server = createNodeUI(options);\r\n return {\r\n module: NodeUIModule,\r\n providers: [{ provide: NODEUI_SERVER, useValue: server }, NodeUIService, NodeUILogger],\r\n exports: [NodeUIService, NodeUILogger, NODEUI_SERVER],\r\n };\r\n }\r\n\r\n constructor(@Inject(NODEUI_SERVER) private readonly server: NodeUIServer) {}\r\n\r\n configure(consumer: MiddlewareConsumer): void {\r\n consumer.apply(this.server.middleware()).forRoutes('*');\r\n }\r\n\r\n /** Stops samplers and restores `console.*` when the Nest app closes. */\r\n onModuleDestroy(): void {\r\n this.server.shutdown();\r\n }\r\n}\r\n","import { ConsoleLogger, Inject, Injectable } from '@nestjs/common';\r\nimport type { NodeUIServer } from '@singhak/nodeui-core';\r\nimport { NODEUI_SERVER } from './tokens';\r\n\r\ntype Level = 'debug' | 'info' | 'warn' | 'error';\r\n\r\nfunction format(message: unknown, optionalParams: unknown[]): string {\r\n const parts = [\r\n message,\r\n ...optionalParams.filter((p) => typeof p === 'string' || p instanceof Error),\r\n ];\r\n return parts\r\n .map((p) =>\r\n typeof p === 'string' ? p : p instanceof Error ? (p.stack ?? p.message) : JSON.stringify(p),\r\n )\r\n .join(' ');\r\n}\r\n\r\n/**\r\n * Nest's default logger writes straight to `process.stdout`, bypassing\r\n * `console.*`, so the Logs panel would stay empty. Use this logger to mirror\r\n * every Nest log line into the panel while keeping the normal console output.\r\n *\r\n * @example\r\n * const app = await NestFactory.create(AppModule, { bufferLogs: true });\r\n * app.useLogger(app.get(NodeUILogger));\r\n */\r\n@Injectable()\r\nexport class NodeUILogger extends ConsoleLogger {\r\n constructor(@Inject(NODEUI_SERVER) private readonly server: NodeUIServer) {\r\n super();\r\n }\r\n\r\n private tee(level: Level, message: unknown, params: unknown[]): void {\r\n this.server.addLogSource({ level, message: format(message, params) });\r\n }\r\n\r\n override log(message: unknown, ...optionalParams: unknown[]): void {\r\n this.tee('info', message, optionalParams);\r\n super.log(message, ...optionalParams);\r\n }\r\n\r\n override warn(message: unknown, ...optionalParams: unknown[]): void {\r\n this.tee('warn', message, optionalParams);\r\n super.warn(message, ...optionalParams);\r\n }\r\n\r\n override error(message: unknown, ...optionalParams: unknown[]): void {\r\n this.tee('error', message, optionalParams);\r\n super.error(message, ...optionalParams);\r\n }\r\n\r\n override debug(message: unknown, ...optionalParams: unknown[]): void {\r\n this.tee('debug', message, optionalParams);\r\n super.debug(message, ...optionalParams);\r\n }\r\n\r\n override verbose(message: unknown, ...optionalParams: unknown[]): void {\r\n this.tee('debug', message, optionalParams);\r\n super.verbose(message, ...optionalParams);\r\n }\r\n}\r\n","/** Injection token for the underlying NodeUIServer instance. */\nexport const NODEUI_SERVER = Symbol('NODEUI_SERVER');\n","import { Inject, Injectable } from '@nestjs/common';\nimport type { NodeUIServer } from '@singhak/nodeui-core';\nimport { NODEUI_SERVER } from './tokens';\n\n/** Injectable handle to the NodeUI server: record startup marks, read config. */\n@Injectable()\nexport class NodeUIService {\n constructor(@Inject(NODEUI_SERVER) private readonly server: NodeUIServer) {}\n\n mark(name: string): void {\n this.server.mark(name);\n }\n\n get config() {\n return this.server.config;\n }\n\n shutdown(): void {\n this.server.shutdown();\n }\n\n addLogSource(entry: { level: 'debug' | 'info' | 'warn' | 'error'; message: string }): void {\n this.server.addLogSource(entry);\n }\n}\n"],"mappings":"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","names":["import_common","import_common"]}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NestModule, DynamicModule, MiddlewareConsumer } from '@nestjs/common';
|
|
1
|
+
import { NestModule, OnModuleDestroy, DynamicModule, MiddlewareConsumer, ConsoleLogger } from '@nestjs/common';
|
|
2
2
|
import * as _singhak_nodeui_core from '@singhak/nodeui-core';
|
|
3
3
|
import { NodeUIOptions, NodeUIServer } from '@singhak/nodeui-core';
|
|
4
4
|
export * from '@singhak/nodeui-core';
|
|
@@ -12,11 +12,33 @@ export * from '@singhak/nodeui-core';
|
|
|
12
12
|
* @Module({ imports: [NodeUIModule.register()] })
|
|
13
13
|
* export class AppModule {}
|
|
14
14
|
*/
|
|
15
|
-
declare class NodeUIModule implements NestModule {
|
|
15
|
+
declare class NodeUIModule implements NestModule, OnModuleDestroy {
|
|
16
16
|
private readonly server;
|
|
17
17
|
static register(options?: NodeUIOptions): DynamicModule;
|
|
18
18
|
constructor(server: NodeUIServer);
|
|
19
19
|
configure(consumer: MiddlewareConsumer): void;
|
|
20
|
+
/** Stops samplers and restores `console.*` when the Nest app closes. */
|
|
21
|
+
onModuleDestroy(): void;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Nest's default logger writes straight to `process.stdout`, bypassing
|
|
26
|
+
* `console.*`, so the Logs panel would stay empty. Use this logger to mirror
|
|
27
|
+
* every Nest log line into the panel while keeping the normal console output.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* const app = await NestFactory.create(AppModule, { bufferLogs: true });
|
|
31
|
+
* app.useLogger(app.get(NodeUILogger));
|
|
32
|
+
*/
|
|
33
|
+
declare class NodeUILogger extends ConsoleLogger {
|
|
34
|
+
private readonly server;
|
|
35
|
+
constructor(server: NodeUIServer);
|
|
36
|
+
private tee;
|
|
37
|
+
log(message: unknown, ...optionalParams: unknown[]): void;
|
|
38
|
+
warn(message: unknown, ...optionalParams: unknown[]): void;
|
|
39
|
+
error(message: unknown, ...optionalParams: unknown[]): void;
|
|
40
|
+
debug(message: unknown, ...optionalParams: unknown[]): void;
|
|
41
|
+
verbose(message: unknown, ...optionalParams: unknown[]): void;
|
|
20
42
|
}
|
|
21
43
|
|
|
22
44
|
/** Injectable handle to the NodeUI server: record startup marks, read config. */
|
|
@@ -35,4 +57,4 @@ declare class NodeUIService {
|
|
|
35
57
|
/** Injection token for the underlying NodeUIServer instance. */
|
|
36
58
|
declare const NODEUI_SERVER: unique symbol;
|
|
37
59
|
|
|
38
|
-
export { NODEUI_SERVER, NodeUIModule, NodeUIService };
|
|
60
|
+
export { NODEUI_SERVER, NodeUILogger, NodeUIModule, NodeUIService };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NestModule, DynamicModule, MiddlewareConsumer } from '@nestjs/common';
|
|
1
|
+
import { NestModule, OnModuleDestroy, DynamicModule, MiddlewareConsumer, ConsoleLogger } from '@nestjs/common';
|
|
2
2
|
import * as _singhak_nodeui_core from '@singhak/nodeui-core';
|
|
3
3
|
import { NodeUIOptions, NodeUIServer } from '@singhak/nodeui-core';
|
|
4
4
|
export * from '@singhak/nodeui-core';
|
|
@@ -12,11 +12,33 @@ export * from '@singhak/nodeui-core';
|
|
|
12
12
|
* @Module({ imports: [NodeUIModule.register()] })
|
|
13
13
|
* export class AppModule {}
|
|
14
14
|
*/
|
|
15
|
-
declare class NodeUIModule implements NestModule {
|
|
15
|
+
declare class NodeUIModule implements NestModule, OnModuleDestroy {
|
|
16
16
|
private readonly server;
|
|
17
17
|
static register(options?: NodeUIOptions): DynamicModule;
|
|
18
18
|
constructor(server: NodeUIServer);
|
|
19
19
|
configure(consumer: MiddlewareConsumer): void;
|
|
20
|
+
/** Stops samplers and restores `console.*` when the Nest app closes. */
|
|
21
|
+
onModuleDestroy(): void;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Nest's default logger writes straight to `process.stdout`, bypassing
|
|
26
|
+
* `console.*`, so the Logs panel would stay empty. Use this logger to mirror
|
|
27
|
+
* every Nest log line into the panel while keeping the normal console output.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* const app = await NestFactory.create(AppModule, { bufferLogs: true });
|
|
31
|
+
* app.useLogger(app.get(NodeUILogger));
|
|
32
|
+
*/
|
|
33
|
+
declare class NodeUILogger extends ConsoleLogger {
|
|
34
|
+
private readonly server;
|
|
35
|
+
constructor(server: NodeUIServer);
|
|
36
|
+
private tee;
|
|
37
|
+
log(message: unknown, ...optionalParams: unknown[]): void;
|
|
38
|
+
warn(message: unknown, ...optionalParams: unknown[]): void;
|
|
39
|
+
error(message: unknown, ...optionalParams: unknown[]): void;
|
|
40
|
+
debug(message: unknown, ...optionalParams: unknown[]): void;
|
|
41
|
+
verbose(message: unknown, ...optionalParams: unknown[]): void;
|
|
20
42
|
}
|
|
21
43
|
|
|
22
44
|
/** Injectable handle to the NodeUI server: record startup marks, read config. */
|
|
@@ -35,4 +57,4 @@ declare class NodeUIService {
|
|
|
35
57
|
/** Injection token for the underlying NodeUIServer instance. */
|
|
36
58
|
declare const NODEUI_SERVER: unique symbol;
|
|
37
59
|
|
|
38
|
-
export { NODEUI_SERVER, NodeUIModule, NodeUIService };
|
|
60
|
+
export { NODEUI_SERVER, NodeUILogger, NodeUIModule, NodeUIService };
|
package/dist/index.mjs
CHANGED
|
@@ -11,16 +11,65 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
11
11
|
var __decorateParam = (index, decorator) => (target, key) => decorator(target, key, index);
|
|
12
12
|
|
|
13
13
|
// src/nodeui.module.ts
|
|
14
|
-
import {
|
|
14
|
+
import {
|
|
15
|
+
Inject as Inject3,
|
|
16
|
+
Module
|
|
17
|
+
} from "@nestjs/common";
|
|
15
18
|
import { createNodeUI } from "@singhak/nodeui-core";
|
|
16
19
|
|
|
17
|
-
// src/nodeui.
|
|
18
|
-
import { Inject, Injectable } from "@nestjs/common";
|
|
20
|
+
// src/nodeui.logger.ts
|
|
21
|
+
import { ConsoleLogger, Inject, Injectable } from "@nestjs/common";
|
|
19
22
|
|
|
20
23
|
// src/tokens.ts
|
|
21
24
|
var NODEUI_SERVER = /* @__PURE__ */ Symbol("NODEUI_SERVER");
|
|
22
25
|
|
|
26
|
+
// src/nodeui.logger.ts
|
|
27
|
+
function format(message, optionalParams) {
|
|
28
|
+
const parts = [
|
|
29
|
+
message,
|
|
30
|
+
...optionalParams.filter((p) => typeof p === "string" || p instanceof Error)
|
|
31
|
+
];
|
|
32
|
+
return parts.map(
|
|
33
|
+
(p) => typeof p === "string" ? p : p instanceof Error ? p.stack ?? p.message : JSON.stringify(p)
|
|
34
|
+
).join(" ");
|
|
35
|
+
}
|
|
36
|
+
var NodeUILogger = class extends ConsoleLogger {
|
|
37
|
+
constructor(server) {
|
|
38
|
+
super();
|
|
39
|
+
this.server = server;
|
|
40
|
+
}
|
|
41
|
+
server;
|
|
42
|
+
tee(level, message, params) {
|
|
43
|
+
this.server.addLogSource({ level, message: format(message, params) });
|
|
44
|
+
}
|
|
45
|
+
log(message, ...optionalParams) {
|
|
46
|
+
this.tee("info", message, optionalParams);
|
|
47
|
+
super.log(message, ...optionalParams);
|
|
48
|
+
}
|
|
49
|
+
warn(message, ...optionalParams) {
|
|
50
|
+
this.tee("warn", message, optionalParams);
|
|
51
|
+
super.warn(message, ...optionalParams);
|
|
52
|
+
}
|
|
53
|
+
error(message, ...optionalParams) {
|
|
54
|
+
this.tee("error", message, optionalParams);
|
|
55
|
+
super.error(message, ...optionalParams);
|
|
56
|
+
}
|
|
57
|
+
debug(message, ...optionalParams) {
|
|
58
|
+
this.tee("debug", message, optionalParams);
|
|
59
|
+
super.debug(message, ...optionalParams);
|
|
60
|
+
}
|
|
61
|
+
verbose(message, ...optionalParams) {
|
|
62
|
+
this.tee("debug", message, optionalParams);
|
|
63
|
+
super.verbose(message, ...optionalParams);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
NodeUILogger = __decorateClass([
|
|
67
|
+
Injectable(),
|
|
68
|
+
__decorateParam(0, Inject(NODEUI_SERVER))
|
|
69
|
+
], NodeUILogger);
|
|
70
|
+
|
|
23
71
|
// src/nodeui.service.ts
|
|
72
|
+
import { Inject as Inject2, Injectable as Injectable2 } from "@nestjs/common";
|
|
24
73
|
var NodeUIService = class {
|
|
25
74
|
constructor(server) {
|
|
26
75
|
this.server = server;
|
|
@@ -40,8 +89,8 @@ var NodeUIService = class {
|
|
|
40
89
|
}
|
|
41
90
|
};
|
|
42
91
|
NodeUIService = __decorateClass([
|
|
43
|
-
|
|
44
|
-
__decorateParam(0,
|
|
92
|
+
Injectable2(),
|
|
93
|
+
__decorateParam(0, Inject2(NODEUI_SERVER))
|
|
45
94
|
], NodeUIService);
|
|
46
95
|
|
|
47
96
|
// src/nodeui.module.ts
|
|
@@ -54,23 +103,28 @@ var NodeUIModule = class {
|
|
|
54
103
|
const server = createNodeUI(options);
|
|
55
104
|
return {
|
|
56
105
|
module: NodeUIModule,
|
|
57
|
-
providers: [{ provide: NODEUI_SERVER, useValue: server }, NodeUIService],
|
|
58
|
-
exports: [NodeUIService, NODEUI_SERVER]
|
|
106
|
+
providers: [{ provide: NODEUI_SERVER, useValue: server }, NodeUIService, NodeUILogger],
|
|
107
|
+
exports: [NodeUIService, NodeUILogger, NODEUI_SERVER]
|
|
59
108
|
};
|
|
60
109
|
}
|
|
61
110
|
configure(consumer) {
|
|
62
111
|
consumer.apply(this.server.middleware()).forRoutes("*");
|
|
63
112
|
}
|
|
113
|
+
/** Stops samplers and restores `console.*` when the Nest app closes. */
|
|
114
|
+
onModuleDestroy() {
|
|
115
|
+
this.server.shutdown();
|
|
116
|
+
}
|
|
64
117
|
};
|
|
65
118
|
NodeUIModule = __decorateClass([
|
|
66
119
|
Module({}),
|
|
67
|
-
__decorateParam(0,
|
|
120
|
+
__decorateParam(0, Inject3(NODEUI_SERVER))
|
|
68
121
|
], NodeUIModule);
|
|
69
122
|
|
|
70
123
|
// src/index.ts
|
|
71
124
|
export * from "@singhak/nodeui-core";
|
|
72
125
|
export {
|
|
73
126
|
NODEUI_SERVER,
|
|
127
|
+
NodeUILogger,
|
|
74
128
|
NodeUIModule,
|
|
75
129
|
NodeUIService
|
|
76
130
|
};
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/nodeui.module.ts","../src/nodeui.
|
|
1
|
+
{"version":3,"sources":["../src/nodeui.module.ts","../src/nodeui.logger.ts","../src/tokens.ts","../src/nodeui.service.ts","../src/index.ts"],"sourcesContent":["import {\r\n DynamicModule,\r\n Inject,\r\n MiddlewareConsumer,\r\n Module,\r\n NestModule,\r\n OnModuleDestroy,\r\n} from '@nestjs/common';\r\nimport { createNodeUI, type NodeUIOptions, type NodeUIServer } from '@singhak/nodeui-core';\r\nimport { NodeUILogger } from './nodeui.logger';\r\nimport { NodeUIService } from './nodeui.service';\r\nimport { NODEUI_SERVER } from './tokens';\r\n\r\n/**\r\n * NestJS adapter for the NodeUI developer console. Mounts the core middleware\r\n * for every route; the console and its API live under `NODEUI_PATH` (default\r\n * `/nodeui`) and app requests are recorded in the request log.\r\n *\r\n * @example\r\n * @Module({ imports: [NodeUIModule.register()] })\r\n * export class AppModule {}\r\n */\r\n@Module({})\r\nexport class NodeUIModule implements NestModule, OnModuleDestroy {\r\n static register(options?: NodeUIOptions): DynamicModule {\r\n const server = createNodeUI(options);\r\n return {\r\n module: NodeUIModule,\r\n providers: [{ provide: NODEUI_SERVER, useValue: server }, NodeUIService, NodeUILogger],\r\n exports: [NodeUIService, NodeUILogger, NODEUI_SERVER],\r\n };\r\n }\r\n\r\n constructor(@Inject(NODEUI_SERVER) private readonly server: NodeUIServer) {}\r\n\r\n configure(consumer: MiddlewareConsumer): void {\r\n consumer.apply(this.server.middleware()).forRoutes('*');\r\n }\r\n\r\n /** Stops samplers and restores `console.*` when the Nest app closes. */\r\n onModuleDestroy(): void {\r\n this.server.shutdown();\r\n }\r\n}\r\n","import { ConsoleLogger, Inject, Injectable } from '@nestjs/common';\r\nimport type { NodeUIServer } from '@singhak/nodeui-core';\r\nimport { NODEUI_SERVER } from './tokens';\r\n\r\ntype Level = 'debug' | 'info' | 'warn' | 'error';\r\n\r\nfunction format(message: unknown, optionalParams: unknown[]): string {\r\n const parts = [\r\n message,\r\n ...optionalParams.filter((p) => typeof p === 'string' || p instanceof Error),\r\n ];\r\n return parts\r\n .map((p) =>\r\n typeof p === 'string' ? p : p instanceof Error ? (p.stack ?? p.message) : JSON.stringify(p),\r\n )\r\n .join(' ');\r\n}\r\n\r\n/**\r\n * Nest's default logger writes straight to `process.stdout`, bypassing\r\n * `console.*`, so the Logs panel would stay empty. Use this logger to mirror\r\n * every Nest log line into the panel while keeping the normal console output.\r\n *\r\n * @example\r\n * const app = await NestFactory.create(AppModule, { bufferLogs: true });\r\n * app.useLogger(app.get(NodeUILogger));\r\n */\r\n@Injectable()\r\nexport class NodeUILogger extends ConsoleLogger {\r\n constructor(@Inject(NODEUI_SERVER) private readonly server: NodeUIServer) {\r\n super();\r\n }\r\n\r\n private tee(level: Level, message: unknown, params: unknown[]): void {\r\n this.server.addLogSource({ level, message: format(message, params) });\r\n }\r\n\r\n override log(message: unknown, ...optionalParams: unknown[]): void {\r\n this.tee('info', message, optionalParams);\r\n super.log(message, ...optionalParams);\r\n }\r\n\r\n override warn(message: unknown, ...optionalParams: unknown[]): void {\r\n this.tee('warn', message, optionalParams);\r\n super.warn(message, ...optionalParams);\r\n }\r\n\r\n override error(message: unknown, ...optionalParams: unknown[]): void {\r\n this.tee('error', message, optionalParams);\r\n super.error(message, ...optionalParams);\r\n }\r\n\r\n override debug(message: unknown, ...optionalParams: unknown[]): void {\r\n this.tee('debug', message, optionalParams);\r\n super.debug(message, ...optionalParams);\r\n }\r\n\r\n override verbose(message: unknown, ...optionalParams: unknown[]): void {\r\n this.tee('debug', message, optionalParams);\r\n super.verbose(message, ...optionalParams);\r\n }\r\n}\r\n","/** Injection token for the underlying NodeUIServer instance. */\nexport const NODEUI_SERVER = Symbol('NODEUI_SERVER');\n","import { Inject, Injectable } from '@nestjs/common';\nimport type { NodeUIServer } from '@singhak/nodeui-core';\nimport { NODEUI_SERVER } from './tokens';\n\n/** Injectable handle to the NodeUI server: record startup marks, read config. */\n@Injectable()\nexport class NodeUIService {\n constructor(@Inject(NODEUI_SERVER) private readonly server: NodeUIServer) {}\n\n mark(name: string): void {\n this.server.mark(name);\n }\n\n get config() {\n return this.server.config;\n }\n\n shutdown(): void {\n this.server.shutdown();\n }\n\n addLogSource(entry: { level: 'debug' | 'info' | 'warn' | 'error'; message: string }): void {\n this.server.addLogSource(entry);\n }\n}\n","/**\r\n * @singhak/nodeui-nestjs — NestJS adapter for the NodeUI developer console.\r\n */\r\n\r\nexport { NodeUIModule } from './nodeui.module';\r\nexport { NodeUILogger } from './nodeui.logger';\r\nexport { NodeUIService } from './nodeui.service';\r\nexport { NODEUI_SERVER } from './tokens';\r\nexport * from '@singhak/nodeui-core';\r\n"],"mappings":"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","names":["Inject","Inject","Injectable","Injectable","Inject","Inject"]}
|
package/package.json
CHANGED
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@singhak/nodeui-nestjs",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "NestJS module adapter for the NodeUI developer console.",
|
|
5
|
-
"license": "Apache-2.0",
|
|
6
|
-
"main": "./dist/index.cjs",
|
|
7
|
-
"module": "./dist/index.mjs",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"types": "./dist/index.d.ts",
|
|
12
|
-
"import": "./dist/index.mjs",
|
|
13
|
-
"require": "./dist/index.cjs"
|
|
14
|
-
},
|
|
15
|
-
"./package.json": "./package.json"
|
|
16
|
-
},
|
|
17
|
-
"files": [
|
|
18
|
-
"dist"
|
|
19
|
-
],
|
|
20
|
-
"sideEffects": false,
|
|
21
|
-
"keywords": [
|
|
22
|
-
"nestjs",
|
|
23
|
-
"module",
|
|
24
|
-
"console",
|
|
25
|
-
"developer-tools",
|
|
26
|
-
"observability",
|
|
27
|
-
"debugging"
|
|
28
|
-
],
|
|
29
|
-
"engines": {
|
|
30
|
-
"node": ">=18.0.0"
|
|
31
|
-
},
|
|
32
|
-
"publishConfig": {
|
|
33
|
-
"access": "public"
|
|
34
|
-
},
|
|
35
|
-
"repository": {
|
|
36
|
-
"type": "git",
|
|
37
|
-
"url": "https://github.com/Singhak/nodeui.git"
|
|
38
|
-
},
|
|
39
|
-
"homepage": "https://github.com/Singhak/nodeui#readme",
|
|
40
|
-
"bugs": {
|
|
41
|
-
"url": "https://github.com/Singhak/nodeui/issues"
|
|
42
|
-
},
|
|
43
|
-
"scripts": {
|
|
44
|
-
"prepublishOnly": "npm run build",
|
|
45
|
-
"build": "tsup",
|
|
46
|
-
"typecheck": "tsc -p tsconfig.typecheck.json",
|
|
47
|
-
"test": "vitest run"
|
|
48
|
-
},
|
|
49
|
-
"dependencies": {
|
|
50
|
-
"@singhak/nodeui-core": "^0.
|
|
51
|
-
},
|
|
52
|
-
"peerDependencies": {
|
|
53
|
-
"@nestjs/common": "^11.0.0",
|
|
54
|
-
"@nestjs/core": "^11.0.0",
|
|
55
|
-
"reflect-metadata": "^0.2.0",
|
|
56
|
-
"rxjs": "^7.8.0"
|
|
57
|
-
},
|
|
58
|
-
"devDependencies": {
|
|
59
|
-
"@nestjs/common": "^11.2.1",
|
|
60
|
-
"@nestjs/core": "^11.2.1",
|
|
61
|
-
"@nestjs/platform-express": "^11.2.1",
|
|
62
|
-
"@nestjs/testing": "^11.2.1",
|
|
63
|
-
"@types/express": "^5.0.0",
|
|
64
|
-
"@types/node": "^22.19.0",
|
|
65
|
-
"@types/supertest": "^6.0.2",
|
|
66
|
-
"express": "^5.2.1",
|
|
67
|
-
"reflect-metadata": "^0.2.2",
|
|
68
|
-
"rxjs": "^7.8.2",
|
|
69
|
-
"supertest": "^7.1.0",
|
|
70
|
-
"tsup": "^8.5.0",
|
|
71
|
-
"typescript": "^5.9.3",
|
|
72
|
-
"vitest": "^3.2.4"
|
|
73
|
-
},
|
|
74
|
-
"author": "Anil Kumar",
|
|
75
|
-
"type": "commonjs"
|
|
76
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@singhak/nodeui-nestjs",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "NestJS module adapter for the NodeUI developer console.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.mjs",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.mjs",
|
|
13
|
+
"require": "./dist/index.cjs"
|
|
14
|
+
},
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"keywords": [
|
|
22
|
+
"nestjs",
|
|
23
|
+
"module",
|
|
24
|
+
"console",
|
|
25
|
+
"developer-tools",
|
|
26
|
+
"observability",
|
|
27
|
+
"debugging"
|
|
28
|
+
],
|
|
29
|
+
"engines": {
|
|
30
|
+
"node": ">=18.0.0"
|
|
31
|
+
},
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public"
|
|
34
|
+
},
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "https://github.com/Singhak/nodeui.git"
|
|
38
|
+
},
|
|
39
|
+
"homepage": "https://github.com/Singhak/nodeui#readme",
|
|
40
|
+
"bugs": {
|
|
41
|
+
"url": "https://github.com/Singhak/nodeui/issues"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"prepublishOnly": "npm run build",
|
|
45
|
+
"build": "tsup",
|
|
46
|
+
"typecheck": "tsc -p tsconfig.typecheck.json",
|
|
47
|
+
"test": "vitest run"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@singhak/nodeui-core": "^0.3.0"
|
|
51
|
+
},
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"@nestjs/common": "^11.0.0",
|
|
54
|
+
"@nestjs/core": "^11.0.0",
|
|
55
|
+
"reflect-metadata": "^0.2.0",
|
|
56
|
+
"rxjs": "^7.8.0"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@nestjs/common": "^11.2.1",
|
|
60
|
+
"@nestjs/core": "^11.2.1",
|
|
61
|
+
"@nestjs/platform-express": "^11.2.1",
|
|
62
|
+
"@nestjs/testing": "^11.2.1",
|
|
63
|
+
"@types/express": "^5.0.0",
|
|
64
|
+
"@types/node": "^22.19.0",
|
|
65
|
+
"@types/supertest": "^6.0.2",
|
|
66
|
+
"express": "^5.2.1",
|
|
67
|
+
"reflect-metadata": "^0.2.2",
|
|
68
|
+
"rxjs": "^7.8.2",
|
|
69
|
+
"supertest": "^7.1.0",
|
|
70
|
+
"tsup": "^8.5.0",
|
|
71
|
+
"typescript": "^5.9.3",
|
|
72
|
+
"vitest": "^3.2.4"
|
|
73
|
+
},
|
|
74
|
+
"author": "Anil Kumar",
|
|
75
|
+
"type": "commonjs"
|
|
76
|
+
}
|