server-devtools 0.1.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/LICENSE +202 -0
- package/README.md +544 -0
- package/dist/dashboard/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dist/dashboard/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dist/dashboard/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/dashboard/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/dashboard/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dist/dashboard/assets/index-DvYSUjO3.css +2 -0
- package/dist/dashboard/assets/index-vQGCvuXC.js +9 -0
- package/dist/dashboard/favicon.svg +9 -0
- package/dist/dashboard/icons.svg +24 -0
- package/dist/dashboard/index.html +14 -0
- package/dist/src/config/index.d.ts +21 -0
- package/dist/src/config/index.d.ts.map +1 -0
- package/dist/src/config/index.js +30 -0
- package/dist/src/config/index.js.map +1 -0
- package/dist/src/core/execution-tree-builder.d.ts +6 -0
- package/dist/src/core/execution-tree-builder.d.ts.map +1 -0
- package/dist/src/core/execution-tree-builder.js +44 -0
- package/dist/src/core/execution-tree-builder.js.map +1 -0
- package/dist/src/dashboard/dashboard-errors-mapper.d.ts +5 -0
- package/dist/src/dashboard/dashboard-errors-mapper.d.ts.map +1 -0
- package/dist/src/dashboard/dashboard-errors-mapper.js +19 -0
- package/dist/src/dashboard/dashboard-errors-mapper.js.map +1 -0
- package/dist/src/dashboard/dashboard-request-detail-mapper.d.ts +16 -0
- package/dist/src/dashboard/dashboard-request-detail-mapper.d.ts.map +1 -0
- package/dist/src/dashboard/dashboard-request-detail-mapper.js +79 -0
- package/dist/src/dashboard/dashboard-request-detail-mapper.js.map +1 -0
- package/dist/src/dashboard/dashboard-response-detail-mapper.d.ts +6 -0
- package/dist/src/dashboard/dashboard-response-detail-mapper.d.ts.map +1 -0
- package/dist/src/dashboard/dashboard-response-detail-mapper.js +39 -0
- package/dist/src/dashboard/dashboard-response-detail-mapper.js.map +1 -0
- package/dist/src/dashboard/dashboard-server.d.ts +21 -0
- package/dist/src/dashboard/dashboard-server.d.ts.map +1 -0
- package/dist/src/dashboard/dashboard-server.js +676 -0
- package/dist/src/dashboard/dashboard-server.js.map +1 -0
- package/dist/src/index.d.ts +16 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +118 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/instrumentation/exporter.d.ts +11 -0
- package/dist/src/instrumentation/exporter.d.ts.map +1 -0
- package/dist/src/instrumentation/exporter.js +46 -0
- package/dist/src/instrumentation/exporter.js.map +1 -0
- package/dist/src/instrumentation/instrumentation.d.ts +11 -0
- package/dist/src/instrumentation/instrumentation.d.ts.map +1 -0
- package/dist/src/instrumentation/instrumentation.js +144 -0
- package/dist/src/instrumentation/instrumentation.js.map +1 -0
- package/dist/src/instrumentation/outbound-http/outbound-http-capture.d.ts +24 -0
- package/dist/src/instrumentation/outbound-http/outbound-http-capture.d.ts.map +1 -0
- package/dist/src/instrumentation/outbound-http/outbound-http-capture.js +245 -0
- package/dist/src/instrumentation/outbound-http/outbound-http-capture.js.map +1 -0
- package/dist/src/instrumentation/span-mapper.d.ts +8 -0
- package/dist/src/instrumentation/span-mapper.d.ts.map +1 -0
- package/dist/src/instrumentation/span-mapper.js +54 -0
- package/dist/src/instrumentation/span-mapper.js.map +1 -0
- package/dist/src/integrations/nestjs/server-devtools-nest.interceptor.d.ts +6 -0
- package/dist/src/integrations/nestjs/server-devtools-nest.interceptor.d.ts.map +1 -0
- package/dist/src/integrations/nestjs/server-devtools-nest.interceptor.js +23 -0
- package/dist/src/integrations/nestjs/server-devtools-nest.interceptor.js.map +1 -0
- package/dist/src/nestjs.d.ts +2 -0
- package/dist/src/nestjs.d.ts.map +1 -0
- package/dist/src/nestjs.js +9 -0
- package/dist/src/nestjs.js.map +1 -0
- package/dist/src/security/auth.service.d.ts +16 -0
- package/dist/src/security/auth.service.d.ts.map +1 -0
- package/dist/src/security/auth.service.js +96 -0
- package/dist/src/security/auth.service.js.map +1 -0
- package/dist/src/security/encrypt-decrypt.service.d.ts +10 -0
- package/dist/src/security/encrypt-decrypt.service.d.ts.map +1 -0
- package/dist/src/security/encrypt-decrypt.service.js +93 -0
- package/dist/src/security/encrypt-decrypt.service.js.map +1 -0
- package/dist/src/storage/sqlite-storage.d.ts +35 -0
- package/dist/src/storage/sqlite-storage.d.ts.map +1 -0
- package/dist/src/storage/sqlite-storage.js +583 -0
- package/dist/src/storage/sqlite-storage.js.map +1 -0
- package/dist/src/types/dashboard.d.ts +32 -0
- package/dist/src/types/dashboard.d.ts.map +1 -0
- package/dist/src/types/dashboard.js +3 -0
- package/dist/src/types/dashboard.js.map +1 -0
- package/dist/src/types/database.d.ts +16 -0
- package/dist/src/types/database.d.ts.map +1 -0
- package/dist/src/types/database.js +3 -0
- package/dist/src/types/database.js.map +1 -0
- package/dist/src/types/http-client.d.ts +8 -0
- package/dist/src/types/http-client.d.ts.map +1 -0
- package/dist/src/types/http-client.js +3 -0
- package/dist/src/types/http-client.js.map +1 -0
- package/dist/src/types/index.d.ts +7 -0
- package/dist/src/types/index.d.ts.map +1 -0
- package/dist/src/types/index.js +23 -0
- package/dist/src/types/index.js.map +1 -0
- package/dist/src/types/misc.d.ts +25 -0
- package/dist/src/types/misc.d.ts.map +1 -0
- package/dist/src/types/misc.js +3 -0
- package/dist/src/types/misc.js.map +1 -0
- package/dist/src/types/span.d.ts +25 -0
- package/dist/src/types/span.d.ts.map +1 -0
- package/dist/src/types/span.js +3 -0
- package/dist/src/types/span.js.map +1 -0
- package/dist/src/types/trace.d.ts +32 -0
- package/dist/src/types/trace.d.ts.map +1 -0
- package/dist/src/types/trace.js +4 -0
- package/dist/src/types/trace.js.map +1 -0
- package/dist/src/utils/logger.d.ts +2 -0
- package/dist/src/utils/logger.d.ts.map +1 -0
- package/dist/src/utils/logger.js +19 -0
- package/dist/src/utils/logger.js.map +1 -0
- package/package.json +82 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../../src/types/dashboard.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IDevToolsError } from "./dashboard";
|
|
2
|
+
export interface IDatabaseOperation {
|
|
3
|
+
spanId: string;
|
|
4
|
+
system?: string;
|
|
5
|
+
operation?: string;
|
|
6
|
+
database?: string;
|
|
7
|
+
collection?: string;
|
|
8
|
+
query?: string;
|
|
9
|
+
durationMs: number;
|
|
10
|
+
status: {
|
|
11
|
+
code: number;
|
|
12
|
+
message?: string;
|
|
13
|
+
};
|
|
14
|
+
error?: IDevToolsError;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=database.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../../src/types/database.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,KAAK,CAAC,EAAE,cAAc,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"database.js","sourceRoot":"","sources":["../../../src/types/database.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-client.d.ts","sourceRoot":"","sources":["../../../src/types/http-client.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;IACnD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;IACpD,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-client.js","sourceRoot":"","sources":["../../../src/types/http-client.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AACA,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./span"), exports);
|
|
18
|
+
__exportStar(require("./trace"), exports);
|
|
19
|
+
__exportStar(require("./dashboard"), exports);
|
|
20
|
+
__exportStar(require("./misc"), exports);
|
|
21
|
+
__exportStar(require("./database"), exports);
|
|
22
|
+
__exportStar(require("./http-client"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,yCAAuB;AACvB,0CAAwB;AACxB,8CAA4B;AAC5B,yCAAuB;AACvB,6CAA0B;AAC1B,gDAA6B"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IncomingMessage } from "node:http";
|
|
2
|
+
export interface IDevToolsRequest {
|
|
3
|
+
method: string;
|
|
4
|
+
path: string;
|
|
5
|
+
route?: string;
|
|
6
|
+
headers: Record<string, string | string[]>;
|
|
7
|
+
query: Record<string, string | string[]>;
|
|
8
|
+
params: Record<string, string>;
|
|
9
|
+
body?: unknown;
|
|
10
|
+
}
|
|
11
|
+
export interface IDevToolsCurrentUser {
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
export interface IServerDevlToolsParams {
|
|
15
|
+
encryption?: {
|
|
16
|
+
key: string;
|
|
17
|
+
fields?: string[];
|
|
18
|
+
};
|
|
19
|
+
auth: {
|
|
20
|
+
password: string;
|
|
21
|
+
username: string;
|
|
22
|
+
};
|
|
23
|
+
getCurrentUser?: (req: IncomingMessage) => IDevToolsCurrentUser | undefined;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=misc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"misc.d.ts","sourceRoot":"","sources":["../../../src/types/misc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C,MAAM,WAAW,gBAAgB;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;IAC3C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;IACzC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE/B,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAGD,MAAM,WAAW,oBAAoB;IACjC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,sBAAsB;IACnC,UAAU,CAAC,EAAE;QACT,GAAG,EAAE,MAAM,CAAC;QACZ,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;KACpB,CAAC;IACF,IAAI,EAAE;QACF,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAA;KACnB,CAAC;IACF,cAAc,CAAC,EAAE,CACb,GAAG,EAAE,eAAe,KACnB,oBAAoB,GAAG,SAAS,CAAC;CACzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"misc.js","sourceRoot":"","sources":["../../../src/types/misc.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type IDevToolsSpanType = 'http.server' | 'http.client' | 'database' | 'framework' | 'unknown';
|
|
2
|
+
export interface IDevToolsSpan {
|
|
3
|
+
traceId: string;
|
|
4
|
+
spanId: string;
|
|
5
|
+
parentSpanId?: string;
|
|
6
|
+
type: IDevToolsSpanType;
|
|
7
|
+
name: string;
|
|
8
|
+
startedAt: number;
|
|
9
|
+
durationMs: number;
|
|
10
|
+
attributes: Record<string, unknown>;
|
|
11
|
+
status: {
|
|
12
|
+
code: number;
|
|
13
|
+
message?: string;
|
|
14
|
+
};
|
|
15
|
+
error?: {
|
|
16
|
+
type?: string;
|
|
17
|
+
message?: string;
|
|
18
|
+
stack?: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export interface IExecutionNode {
|
|
22
|
+
span: IDevToolsSpan;
|
|
23
|
+
children: IExecutionNode[];
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=span.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"span.d.ts","sourceRoot":"","sources":["../../../src/types/span.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,iBAAiB,GACzB,aAAa,GACb,aAAa,GACb,UAAU,GACV,WAAW,GACX,SAAS,CAAC;AAEd,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,IAAI,EAAE,iBAAiB,CAAC;IAExB,IAAI,EAAE,MAAM,CAAC;IAEb,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IAEnB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEpC,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAED,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,aAAa,CAAC;IACpB,QAAQ,EAAE,cAAc,EAAE,CAAC;CAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"span.js","sourceRoot":"","sources":["../../../src/types/span.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { IDevToolsCurrentUser } from './misc';
|
|
2
|
+
import type { IDevToolsSpan } from './span';
|
|
3
|
+
export interface IDevToolsTrace {
|
|
4
|
+
traceId: string;
|
|
5
|
+
rootSpanId?: string;
|
|
6
|
+
spans: IDevToolsSpan[];
|
|
7
|
+
startedAt: number;
|
|
8
|
+
durationMs?: number;
|
|
9
|
+
user?: IDevToolsCurrentUser;
|
|
10
|
+
}
|
|
11
|
+
export interface ITraceMetadata {
|
|
12
|
+
request?: {
|
|
13
|
+
body?: unknown;
|
|
14
|
+
};
|
|
15
|
+
response?: {
|
|
16
|
+
body?: unknown;
|
|
17
|
+
};
|
|
18
|
+
user?: IDevToolsCurrentUser;
|
|
19
|
+
}
|
|
20
|
+
export interface ITraceSummary {
|
|
21
|
+
traceId: string;
|
|
22
|
+
rootSpanId?: string;
|
|
23
|
+
startedAt: number;
|
|
24
|
+
durationMs?: number;
|
|
25
|
+
method?: string;
|
|
26
|
+
path?: string;
|
|
27
|
+
route?: string;
|
|
28
|
+
statusCode?: number;
|
|
29
|
+
hasError: boolean;
|
|
30
|
+
user?: IDevToolsCurrentUser;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=trace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trace.d.ts","sourceRoot":"","sources":["../../../src/types/trace.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE5C,MAAM,WAAW,cAAc;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,oBAAoB,CAAC;CAC/B;AACD,MAAM,WAAW,cAAc;IAC3B,OAAO,CAAC,EAAE;QACN,IAAI,CAAC,EAAE,OAAO,CAAC;KAClB,CAAC;IAEF,QAAQ,CAAC,EAAE;QACP,IAAI,CAAC,EAAE,OAAO,CAAC;KAClB,CAAC;IACF,IAAI,CAAC,EAAE,oBAAoB,CAAC;CAC/B;AAED,MAAM,WAAW,aAAa;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,oBAAoB,CAAC;CAC/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trace.js","sourceRoot":"","sources":["../../../src/types/trace.ts"],"names":[],"mappings":";AAAA,oBAAoB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/utils/logger.ts"],"names":[],"mappings":"AAEA,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,IAAI,CAa9D"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.debugLog = debugLog;
|
|
7
|
+
const config_1 = __importDefault(require("../config"));
|
|
8
|
+
function debugLog(message, data) {
|
|
9
|
+
if (!config_1.default.SERVER_DEVTOOLS_DEBUG) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const prefix = `[ServerDevTools] ${message}`;
|
|
13
|
+
if (data === undefined) {
|
|
14
|
+
console.debug(prefix);
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
console.debug(prefix, data);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/utils/logger.ts"],"names":[],"mappings":";;;;;;AAAA,uDAA+B;AAE/B,kBAAyB,OAAe,EAAE,IAAc;IACpD,IAAI,CAAC,gBAAM,CAAC,qBAAqB,EAAE,CAAC;QAChC,OAAO;IACX,CAAC;IAED,MAAM,MAAM,GAAG,oBAAoB,OAAO,EAAE,CAAC;IAE7C,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACrB,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACtB,OAAO;IACX,CAAC;IAED,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAChC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "server-devtools",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Chrome DevTools for your backend. Inspect HTTP requests, database operations, outbound calls, errors, and execution timing from an embedded dashboard.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"author": "Godwin Ehikhamhen",
|
|
7
|
+
"type": "commonjs",
|
|
8
|
+
|
|
9
|
+
"main": "./dist/src/index.js",
|
|
10
|
+
"types": "./dist/src/index.d.ts",
|
|
11
|
+
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/src/index.d.ts",
|
|
15
|
+
"require": "./dist/src/index.js",
|
|
16
|
+
"default": "./dist/src/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./nestjs": {
|
|
19
|
+
"types": "./dist/src/nestjs.d.ts",
|
|
20
|
+
"require": "./dist/src/nestjs.js",
|
|
21
|
+
"default": "./dist/src/nestjs.js"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
"files": [
|
|
26
|
+
"dist",
|
|
27
|
+
"README.md",
|
|
28
|
+
"LICENSE"
|
|
29
|
+
],
|
|
30
|
+
|
|
31
|
+
"scripts": {
|
|
32
|
+
"clean": "rm -rf dist",
|
|
33
|
+
"build:sdk": "tsc -p tsconfig.build.json && node scripts/finalize-commonjs-entry.cjs",
|
|
34
|
+
"build:dashboard": "npm --prefix dashboard run build",
|
|
35
|
+
"build": "npm run clean && npm run build:sdk && npm run build:dashboard",
|
|
36
|
+
"test": "tsx --test tests/*.test.ts",
|
|
37
|
+
"typecheck": "tsc --noEmit",
|
|
38
|
+
"prepublishOnly": "npm run test && npm run typecheck && npm run build"
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
"keywords": [
|
|
42
|
+
"nodejs",
|
|
43
|
+
"debugging",
|
|
44
|
+
"devtools",
|
|
45
|
+
"backend",
|
|
46
|
+
"opentelemetry",
|
|
47
|
+
"observability",
|
|
48
|
+
"tracing",
|
|
49
|
+
"express",
|
|
50
|
+
"nestjs",
|
|
51
|
+
"mongodb"
|
|
52
|
+
],
|
|
53
|
+
|
|
54
|
+
"engines": {
|
|
55
|
+
"node": ">=20"
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"@opentelemetry/api": "^1.9.1",
|
|
60
|
+
"@opentelemetry/auto-instrumentations-node": "^0.79.0",
|
|
61
|
+
"@opentelemetry/instrumentation-express": "^0.69.0",
|
|
62
|
+
"@opentelemetry/instrumentation-mongodb": "^0.74.0",
|
|
63
|
+
"@opentelemetry/instrumentation-undici": "^0.31.0",
|
|
64
|
+
"@opentelemetry/sdk-metrics": "^2.10.0",
|
|
65
|
+
"@opentelemetry/sdk-node": "^0.221.0",
|
|
66
|
+
"@opentelemetry/sdk-trace-node": "^2.10.0"
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
"devDependencies": {
|
|
70
|
+
"@nestjs/common": "^11.2.3",
|
|
71
|
+
"@nestjs/core": "^11.2.3",
|
|
72
|
+
"@nestjs/platform-express": "^11.2.3",
|
|
73
|
+
"@types/express": "^5.0.6",
|
|
74
|
+
"@types/node": "^26.6.1",
|
|
75
|
+
"express": "^5.2.1",
|
|
76
|
+
"mongodb": "^7.6.0",
|
|
77
|
+
"reflect-metadata": "^0.2.2",
|
|
78
|
+
"rxjs": "^7.8.2",
|
|
79
|
+
"tsx": "^4.23.13",
|
|
80
|
+
"typescript": "^7.0.2"
|
|
81
|
+
}
|
|
82
|
+
}
|