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,9 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128">
|
|
2
|
+
<g fill="none" stroke="#0F172A" stroke-width="8" stroke-linecap="round" stroke-linejoin="round">
|
|
3
|
+
<path d="M28 64H47"/><path d="M47 64C62 64 61 34 78 34H94"/>
|
|
4
|
+
<path d="M47 64H94"/><path d="M47 64C62 64 61 94 78 94H94"/>
|
|
5
|
+
</g>
|
|
6
|
+
<circle cx="24" cy="64" r="10" fill="#3B82F6"/>
|
|
7
|
+
<circle cx="100" cy="34" r="10" fill="#3B82F6"/>
|
|
8
|
+
<circle cx="100" cy="64" r="9" fill="#F8FAFC" stroke="#0F172A" stroke-width="7"/>
|
|
9
|
+
<circle cx="100" cy="94" r="10" fill="#3B82F6"/></svg>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<symbol id="bluesky-icon" viewBox="0 0 16 17">
|
|
3
|
+
<g clip-path="url(#bluesky-clip)"><path fill="#08060d" d="M7.75 7.735c-.693-1.348-2.58-3.86-4.334-5.097-1.68-1.187-2.32-.981-2.74-.79C.188 2.065.1 2.812.1 3.251s.241 3.602.398 4.13c.52 1.744 2.367 2.333 4.07 2.145-2.495.37-4.71 1.278-1.805 4.512 3.196 3.309 4.38-.71 4.987-2.746.608 2.036 1.307 5.91 4.93 2.746 2.72-2.746.747-4.143-1.747-4.512 1.702.189 3.55-.4 4.07-2.145.156-.528.397-3.691.397-4.13s-.088-1.186-.575-1.406c-.42-.19-1.06-.395-2.741.79-1.755 1.24-3.64 3.752-4.334 5.099"/></g>
|
|
4
|
+
<defs><clipPath id="bluesky-clip"><path fill="#fff" d="M.1.85h15.3v15.3H.1z"/></clipPath></defs>
|
|
5
|
+
</symbol>
|
|
6
|
+
<symbol id="discord-icon" viewBox="0 0 20 19">
|
|
7
|
+
<path fill="#08060d" d="M16.224 3.768a14.5 14.5 0 0 0-3.67-1.153c-.158.286-.343.67-.47.976a13.5 13.5 0 0 0-4.067 0c-.128-.306-.317-.69-.476-.976A14.4 14.4 0 0 0 3.868 3.77C1.546 7.28.916 10.703 1.231 14.077a14.7 14.7 0 0 0 4.5 2.306q.545-.748.965-1.587a9.5 9.5 0 0 1-1.518-.74q.191-.14.372-.293c2.927 1.369 6.107 1.369 8.999 0q.183.152.372.294-.723.437-1.52.74.418.838.963 1.588a14.6 14.6 0 0 0 4.504-2.308c.37-3.911-.63-7.302-2.644-10.309m-9.13 8.234c-.878 0-1.599-.82-1.599-1.82 0-.998.705-1.82 1.6-1.82.894 0 1.614.82 1.599 1.82.001 1-.705 1.82-1.6 1.82m5.91 0c-.878 0-1.599-.82-1.599-1.82 0-.998.705-1.82 1.6-1.82.893 0 1.614.82 1.599 1.82 0 1-.706 1.82-1.6 1.82"/>
|
|
8
|
+
</symbol>
|
|
9
|
+
<symbol id="documentation-icon" viewBox="0 0 21 20">
|
|
10
|
+
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="m15.5 13.333 1.533 1.322c.645.555.967.833.967 1.178s-.322.623-.967 1.179L15.5 18.333m-3.333-5-1.534 1.322c-.644.555-.966.833-.966 1.178s.322.623.966 1.179l1.534 1.321"/>
|
|
11
|
+
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M17.167 10.836v-4.32c0-1.41 0-2.117-.224-2.68-.359-.906-1.118-1.621-2.08-1.96-.599-.21-1.349-.21-2.848-.21-2.623 0-3.935 0-4.983.369-1.684.591-3.013 1.842-3.641 3.428C3 6.449 3 7.684 3 10.154v2.122c0 2.558 0 3.838.706 4.726q.306.383.713.671c.76.536 1.79.64 3.581.66"/>
|
|
12
|
+
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M3 10a2.78 2.78 0 0 1 2.778-2.778c.555 0 1.209.097 1.748-.047.48-.129.854-.503.982-.982.145-.54.048-1.194.048-1.749a2.78 2.78 0 0 1 2.777-2.777"/>
|
|
13
|
+
</symbol>
|
|
14
|
+
<symbol id="github-icon" viewBox="0 0 19 19">
|
|
15
|
+
<path fill="#08060d" fill-rule="evenodd" d="M9.356 1.85C5.05 1.85 1.57 5.356 1.57 9.694a7.84 7.84 0 0 0 5.324 7.44c.387.079.528-.168.528-.376 0-.182-.013-.805-.013-1.454-2.165.467-2.616-.935-2.616-.935-.349-.91-.864-1.143-.864-1.143-.71-.48.051-.48.051-.48.787.051 1.2.805 1.2.805.695 1.194 1.817.857 2.268.649.064-.507.27-.857.49-1.052-1.728-.182-3.545-.857-3.545-3.87 0-.857.31-1.558.8-2.104-.078-.195-.349-1 .077-2.078 0 0 .657-.208 2.14.805a7.5 7.5 0 0 1 1.946-.26c.657 0 1.328.092 1.946.26 1.483-1.013 2.14-.805 2.14-.805.426 1.078.155 1.883.078 2.078.502.546.799 1.247.799 2.104 0 3.013-1.818 3.675-3.558 3.87.284.247.528.714.528 1.454 0 1.052-.012 1.896-.012 2.156 0 .208.142.455.528.377a7.84 7.84 0 0 0 5.324-7.441c.013-4.338-3.48-7.844-7.773-7.844" clip-rule="evenodd"/>
|
|
16
|
+
</symbol>
|
|
17
|
+
<symbol id="social-icon" viewBox="0 0 20 20">
|
|
18
|
+
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M12.5 6.667a4.167 4.167 0 1 0-8.334 0 4.167 4.167 0 0 0 8.334 0"/>
|
|
19
|
+
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M2.5 16.667a5.833 5.833 0 0 1 8.75-5.053m3.837.474.513 1.035c.07.144.257.282.414.309l.93.155c.596.1.736.536.307.965l-.723.73a.64.64 0 0 0-.152.531l.207.903c.164.715-.213.991-.84.618l-.872-.52a.63.63 0 0 0-.577 0l-.872.52c-.624.373-1.003.094-.84-.618l.207-.903a.64.64 0 0 0-.152-.532l-.723-.729c-.426-.43-.289-.864.306-.964l.93-.156a.64.64 0 0 0 .412-.31l.513-1.034c.28-.562.735-.562 1.012 0"/>
|
|
20
|
+
</symbol>
|
|
21
|
+
<symbol id="x-icon" viewBox="0 0 19 19">
|
|
22
|
+
<path fill="#08060d" fill-rule="evenodd" d="M1.893 1.98c.052.072 1.245 1.769 2.653 3.77l2.892 4.114c.183.261.333.48.333.486s-.068.089-.152.183l-.522.593-.765.867-3.597 4.087c-.375.426-.734.834-.798.905a1 1 0 0 0-.118.148c0 .01.236.017.664.017h.663l.729-.83c.4-.457.796-.906.879-.999a692 692 0 0 0 1.794-2.038c.034-.037.301-.34.594-.675l.551-.624.345-.392a7 7 0 0 1 .34-.374c.006 0 .93 1.306 2.052 2.903l2.084 2.965.045.063h2.275c1.87 0 2.273-.003 2.266-.021-.008-.02-1.098-1.572-3.894-5.547-2.013-2.862-2.28-3.246-2.273-3.266.008-.019.282-.332 2.085-2.38l2-2.274 1.567-1.782c.022-.028-.016-.03-.65-.03h-.674l-.3.342a871 871 0 0 1-1.782 2.025c-.067.075-.405.458-.75.852a100 100 0 0 1-.803.91c-.148.172-.299.344-.99 1.127-.304.343-.32.358-.345.327-.015-.019-.904-1.282-1.976-2.808L6.365 1.85H1.8zm1.782.91 8.078 11.294c.772 1.08 1.413 1.973 1.425 1.984.016.017.241.02 1.05.017l1.03-.004-2.694-3.766L7.796 5.75 5.722 2.852l-1.039-.004-1.039-.004z" clip-rule="evenodd"/>
|
|
23
|
+
</symbol>
|
|
24
|
+
</svg>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/_devtools/favicon.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>ServerDevTools Dashboard</title>
|
|
8
|
+
<script type="module" crossorigin src="/_devtools/assets/index-vQGCvuXC.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/_devtools/assets/index-DvYSUjO3.css">
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<div id="root"></div>
|
|
13
|
+
</body>
|
|
14
|
+
</html>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
readonly SERVER_DEVTOOLS_DEBUG: boolean;
|
|
3
|
+
DASHBOARD_API_ROUTES: {
|
|
4
|
+
TRACES: string;
|
|
5
|
+
REQUESTS: string;
|
|
6
|
+
AUTH: string;
|
|
7
|
+
};
|
|
8
|
+
REQUEST_METHOD: {
|
|
9
|
+
GET: string;
|
|
10
|
+
POST: string;
|
|
11
|
+
PUT: string;
|
|
12
|
+
DELETE: string;
|
|
13
|
+
PATCH: string;
|
|
14
|
+
};
|
|
15
|
+
DEFAULT_FIELDS_TO_ENCRYPT: string[];
|
|
16
|
+
STORAGE: {
|
|
17
|
+
SCHEMA_VERSION: number;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export default _default;
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":";aAEQ,qBAAqB;IAGzB,oBAAoB;QAChB,MAAM;QACN,QAAQ;QACR,IAAI;;IAER,cAAc;QACV,GAAG;QACH,IAAI;QACJ,GAAG;QACH,MAAM;QACN,KAAK;;IAET,yBAAyB;IAOzB,OAAO;QACH,cAAc"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
get SERVER_DEVTOOLS_DEBUG() {
|
|
5
|
+
return process.env.SERVER_DEVTOOLS_DEBUG === 'true';
|
|
6
|
+
},
|
|
7
|
+
DASHBOARD_API_ROUTES: {
|
|
8
|
+
TRACES: '/_devtools/api/traces',
|
|
9
|
+
REQUESTS: '/_devtools/api/requests',
|
|
10
|
+
AUTH: '/_devtools/api/auth'
|
|
11
|
+
},
|
|
12
|
+
REQUEST_METHOD: {
|
|
13
|
+
GET: 'GET',
|
|
14
|
+
POST: 'POST',
|
|
15
|
+
PUT: 'PUT',
|
|
16
|
+
DELETE: 'DELETE',
|
|
17
|
+
PATCH: 'PATCH',
|
|
18
|
+
},
|
|
19
|
+
DEFAULT_FIELDS_TO_ENCRYPT: [
|
|
20
|
+
"password",
|
|
21
|
+
"accessToken",
|
|
22
|
+
"refreshToken",
|
|
23
|
+
"authorization",
|
|
24
|
+
"cookie",
|
|
25
|
+
],
|
|
26
|
+
STORAGE: {
|
|
27
|
+
SCHEMA_VERSION: 1
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":";;kBACe;IACX,IAAI,qBAAqB;QACrB,OAAO,OAAO,CAAC,GAAG,CAAC,qBAAqB,KAAK,MAAM,CAAC;IACxD,CAAC;IACD,oBAAoB,EAAE;QAClB,MAAM,EAAE,uBAAuB;QAC/B,QAAQ,EAAE,yBAAyB;QACnC,IAAI,EAAE,qBAAqB;KAC9B;IACD,cAAc,EAAE;QACZ,GAAG,EAAE,KAAK;QACV,IAAI,EAAE,MAAM;QACZ,GAAG,EAAE,KAAK;QACV,MAAM,EAAE,QAAQ;QAChB,KAAK,EAAE,OAAO;KACjB;IACD,yBAAyB,EAAE;QACvB,UAAU;QACV,aAAa;QACb,cAAc;QACd,eAAe;QACf,QAAQ;KACX;IACD,OAAO,EAAE;QACL,cAAc,EAAE,CAAC;KACpB;CACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-tree-builder.d.ts","sourceRoot":"","sources":["../../../src/core/execution-tree-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAIzE,MAAM,CAAC,OAAO,OAAO,oBAAoB;IAErC,KAAK,CAAC,KAAK,EAAE,cAAc,oBA4C1B;IAED,OAAO,CAAC,QAAQ;CASnB"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class ExecutionTreeBuilder {
|
|
4
|
+
build(trace) {
|
|
5
|
+
const nodes = new Map();
|
|
6
|
+
// const rootSpan = trace.spans.find(span => span.spanId === trace.rootSpanId)
|
|
7
|
+
// if (!rootSpan) {
|
|
8
|
+
// return [];
|
|
9
|
+
// }
|
|
10
|
+
for (const span of trace.spans) {
|
|
11
|
+
nodes.set(span.spanId, {
|
|
12
|
+
span,
|
|
13
|
+
children: [],
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
const roots = [];
|
|
17
|
+
for (const span of trace.spans) {
|
|
18
|
+
const node = nodes.get(span.spanId);
|
|
19
|
+
if (!span.parentSpanId) {
|
|
20
|
+
roots.push(node);
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
const parent = nodes.get(span.parentSpanId);
|
|
24
|
+
if (!parent) {
|
|
25
|
+
roots.push(node);
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
parent.children.push(node);
|
|
29
|
+
}
|
|
30
|
+
roots.sort((a, b) => a.span.startedAt - b.span.startedAt);
|
|
31
|
+
for (const root of roots) {
|
|
32
|
+
this.sortNode(root);
|
|
33
|
+
}
|
|
34
|
+
return roots;
|
|
35
|
+
}
|
|
36
|
+
sortNode(node) {
|
|
37
|
+
node.children.sort((a, b) => a.span.startedAt - b.span.startedAt);
|
|
38
|
+
for (const child of node.children) {
|
|
39
|
+
this.sortNode(child);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.default = ExecutionTreeBuilder;
|
|
44
|
+
//# sourceMappingURL=execution-tree-builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-tree-builder.js","sourceRoot":"","sources":["../../../src/core/execution-tree-builder.ts"],"names":[],"mappings":";;AAIA;IAEI,KAAK,CAAC,KAAqB;QACvB,MAAM,KAAK,GAAG,IAAI,GAAG,EAA0B,CAAC;QAChD,8EAA8E;QAE9E,mBAAmB;QACnB,iBAAiB;QACjB,IAAI;QAGJ,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;YAC7B,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE;gBACnB,IAAI;gBACJ,QAAQ,EAAE,EAAE;aACf,CAAC,CAAC;QACP,CAAC;QAED,MAAM,KAAK,GAAqB,EAAE,CAAC;QAEnC,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;YAC7B,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAE,CAAC;YAErC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;gBACrB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;gBAChB,SAAS;YACb,CAAC;YAED,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,YAAa,CAAC,CAAC;YAC7C,IAAI,CAAC,MAAM,EAAE,CAAC;gBACV,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;gBAChB,SAAS;YACb,CAAC;YAED,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC;QAED,KAAK,CAAC,IAAI,CACN,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC,SAAS,CAChD,CAAC;QAEF,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACvB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACxB,CAAC;QAED,OAAO,KAAK,CAAC;IACjB,CAAC;IAEO,QAAQ,CAAC,IAAoB;QACjC,IAAI,CAAC,QAAQ,CAAC,IAAI,CACd,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC,SAAS,CAChD,CAAC;QAEF,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAChC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACzB,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-errors-mapper.d.ts","sourceRoot":"","sources":["../../../src/dashboard/dashboard-errors-mapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1D,MAAM,CAAC,OAAO,OAAO,oBAAoB;IACrC,GAAG,CAAC,KAAK,EAAE,cAAc,GAAG,cAAc,EAAE,CAY3C;CACJ"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class DashboardErrorMapper {
|
|
4
|
+
map(trace) {
|
|
5
|
+
return trace.spans
|
|
6
|
+
.filter(span => span.error)
|
|
7
|
+
.map(span => ({
|
|
8
|
+
spanId: span.spanId,
|
|
9
|
+
spanName: span.name,
|
|
10
|
+
spanType: span.type,
|
|
11
|
+
type: span.error?.type,
|
|
12
|
+
message: span.error?.message,
|
|
13
|
+
stack: span.error?.stack,
|
|
14
|
+
startedAt: span.startedAt,
|
|
15
|
+
}));
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.default = DashboardErrorMapper;
|
|
19
|
+
//# sourceMappingURL=dashboard-errors-mapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-errors-mapper.js","sourceRoot":"","sources":["../../../src/dashboard/dashboard-errors-mapper.ts"],"names":[],"mappings":";;AAEA;IACI,GAAG,CAAC,KAAqB;QACrB,OAAO,KAAK,CAAC,KAAK;aACb,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC;aAC1B,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACV,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,QAAQ,EAAE,IAAI,CAAC,IAAI;YACnB,QAAQ,EAAE,IAAI,CAAC,IAAI;YACnB,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI;YACtB,OAAO,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO;YAC5B,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,KAAK;YACxB,SAAS,EAAE,IAAI,CAAC,SAAS;SAC5B,CAAC,CAAC,CAAC;IACZ,CAAC;CACJ"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IDevToolsTrace, ITraceMetadata } from "../types";
|
|
2
|
+
export default class DashboardRequestDetailMapper {
|
|
3
|
+
map(trace: IDevToolsTrace, metadata?: ITraceMetadata): {
|
|
4
|
+
method: string;
|
|
5
|
+
path: string;
|
|
6
|
+
route: string | undefined;
|
|
7
|
+
headers: Record<string, string | string[]>;
|
|
8
|
+
query: Record<string, string | string[]>;
|
|
9
|
+
params: Record<string, string>;
|
|
10
|
+
body: unknown;
|
|
11
|
+
};
|
|
12
|
+
private mapQuery;
|
|
13
|
+
private mapHeaders;
|
|
14
|
+
private mapParams;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=dashboard-request-detail-mapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-request-detail-mapper.d.ts","sourceRoot":"","sources":["../../../src/dashboard/dashboard-request-detail-mapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAI1D,MAAM,CAAC,OAAO,OAAO,4BAA4B;IAE7C,GAAG,CAAC,KAAK,EAAE,cAAc,EAAE,QAAQ,CAAC,EAAE,cAAc;QAQ5C,MAAM;QACN,IAAI;QACJ,KAAK;QACL,OAAO;QACP,KAAK;QAGL,MAAM;QAIN,IAAI;MAGX;IAED,OAAO,CAAC,QAAQ;IAwBhB,OAAO,CAAC,UAAU;IA0BlB,OAAO,CAAC,SAAS;CA4BpB"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class DashboardRequestDetailMapper {
|
|
4
|
+
map(trace, metadata) {
|
|
5
|
+
const rootSpan = trace.spans.find(span => span.spanId === trace.rootSpanId && span.type === 'http.server');
|
|
6
|
+
if (!rootSpan) {
|
|
7
|
+
throw new Error(`Http server root span not found for trace ${trace.traceId}`);
|
|
8
|
+
}
|
|
9
|
+
return {
|
|
10
|
+
method: String(rootSpan.attributes['http.request.method'] ?? "UNKNOWN"),
|
|
11
|
+
path: String(rootSpan.attributes['url.path'] ?? ""),
|
|
12
|
+
route: rootSpan.attributes['http.route'] ? String(rootSpan.attributes['http.route']) : undefined,
|
|
13
|
+
headers: this.mapHeaders(rootSpan.attributes),
|
|
14
|
+
query: this.mapQuery(rootSpan.attributes["url.query"]),
|
|
15
|
+
params: this.mapParams(rootSpan.attributes["http.route"], rootSpan.attributes["url.path"]),
|
|
16
|
+
body: metadata?.request?.body,
|
|
17
|
+
// response: metadata?.response?.body || null
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
mapQuery(query) {
|
|
21
|
+
if (typeof query !== "string" || !query) {
|
|
22
|
+
return {};
|
|
23
|
+
}
|
|
24
|
+
const params = new URLSearchParams(query);
|
|
25
|
+
const result = {};
|
|
26
|
+
for (const [key, value] of params) {
|
|
27
|
+
const existing = result[key];
|
|
28
|
+
if (existing === undefined) {
|
|
29
|
+
result[key] = value;
|
|
30
|
+
}
|
|
31
|
+
else if (Array.isArray(existing)) {
|
|
32
|
+
existing.push(value);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
result[key] = [existing, value];
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return result;
|
|
39
|
+
}
|
|
40
|
+
mapHeaders(attributes) {
|
|
41
|
+
const headers = {};
|
|
42
|
+
const prefix = "http.request.header.";
|
|
43
|
+
for (const [key, value] of Object.entries(attributes)) {
|
|
44
|
+
if (!key.startsWith(prefix)) {
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
const headerName = key.slice(prefix.length);
|
|
48
|
+
if (typeof value === "string") {
|
|
49
|
+
headers[headerName] = value;
|
|
50
|
+
}
|
|
51
|
+
else if (Array.isArray(value) &&
|
|
52
|
+
value.every(item => typeof item === "string")) {
|
|
53
|
+
headers[headerName] = value;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return headers;
|
|
57
|
+
}
|
|
58
|
+
mapParams(route, path) {
|
|
59
|
+
if (typeof route !== "string" || typeof path !== "string") {
|
|
60
|
+
return {};
|
|
61
|
+
}
|
|
62
|
+
const routeParts = route.split("/");
|
|
63
|
+
const pathParts = path.split("/");
|
|
64
|
+
if (routeParts.length !== pathParts.length) {
|
|
65
|
+
return {};
|
|
66
|
+
}
|
|
67
|
+
const params = {};
|
|
68
|
+
for (let i = 0; i < routeParts.length; i++) {
|
|
69
|
+
const routePart = routeParts[i];
|
|
70
|
+
if (routePart.startsWith(":")) {
|
|
71
|
+
const paramName = routePart.slice(1);
|
|
72
|
+
params[paramName] = decodeURIComponent(pathParts[i]);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return params;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
exports.default = DashboardRequestDetailMapper;
|
|
79
|
+
//# sourceMappingURL=dashboard-request-detail-mapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-request-detail-mapper.js","sourceRoot":"","sources":["../../../src/dashboard/dashboard-request-detail-mapper.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IDevToolsResponse, IDevToolsTrace, ITraceMetadata } from "../types";
|
|
2
|
+
export default class DashboardResponseDetailMapper {
|
|
3
|
+
map(trace: IDevToolsTrace, metadata?: ITraceMetadata): IDevToolsResponse;
|
|
4
|
+
private mapHeaders;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=dashboard-response-detail-mapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-response-detail-mapper.d.ts","sourceRoot":"","sources":["../../../src/dashboard/dashboard-response-detail-mapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG7E,MAAM,CAAC,OAAO,OAAO,6BAA6B;IAC9C,GAAG,CACC,KAAK,EAAE,cAAc,EACrB,QAAQ,CAAC,EAAE,cAAc,GAC1B,iBAAiB,CAgBnB;IAID,OAAO,CAAC,UAAU;CAyBrB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class DashboardResponseDetailMapper {
|
|
4
|
+
map(trace, metadata) {
|
|
5
|
+
const rootSpan = trace.spans.find(span => span.spanId === trace.rootSpanId && span.type === 'http.server');
|
|
6
|
+
if (!rootSpan) {
|
|
7
|
+
throw new Error(`Http server root span not found for trace ${trace.traceId}`);
|
|
8
|
+
}
|
|
9
|
+
// find http.server root span
|
|
10
|
+
// map status
|
|
11
|
+
// map response headers
|
|
12
|
+
// get metadata?.response?.body
|
|
13
|
+
return {
|
|
14
|
+
statusCode: rootSpan.attributes["http.response.status_code"],
|
|
15
|
+
headers: this.mapHeaders(rootSpan.attributes),
|
|
16
|
+
"body": metadata?.response?.body || null
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
mapHeaders(attributes) {
|
|
20
|
+
const headers = {};
|
|
21
|
+
const prefix = "http.response.header.";
|
|
22
|
+
for (const [key, value] of Object.entries(attributes)) {
|
|
23
|
+
if (!key.startsWith(prefix)) {
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
const headerName = key.slice(prefix.length);
|
|
27
|
+
if (typeof value === "string") {
|
|
28
|
+
headers[headerName] = value;
|
|
29
|
+
}
|
|
30
|
+
else if (Array.isArray(value) &&
|
|
31
|
+
value.every(item => typeof item === "string")) {
|
|
32
|
+
headers[headerName] = value;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return headers;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.default = DashboardResponseDetailMapper;
|
|
39
|
+
//# sourceMappingURL=dashboard-response-detail-mapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-response-detail-mapper.js","sourceRoot":"","sources":["../../../src/dashboard/dashboard-response-detail-mapper.ts"],"names":[],"mappings":";;AAGA;IACI,GAAG,CACC,KAAqB,EACrB,QAAyB;QAEzB,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,UAAU,IAAI,IAAI,CAAC,IAAI,KAAK,aAAa,CAAC,CAAC;QAE3G,IAAI,CAAC,QAAQ,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CAAC,6CAA6C,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QAClF,CAAC;QAED,6BAA6B;QAC7B,aAAa;QACb,uBAAuB;QACvB,+BAA+B;QAC/B,OAAO;YACH,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC,2BAA2B,CAAW;YACtE,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC;YAC7C,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,IAAI,IAAI;SAC3C,CAAA;IACL,CAAC;IAIO,UAAU,CACd,UAAmC;QAEnC,MAAM,OAAO,GAAsC,EAAE,CAAC;QACtD,MAAM,MAAM,GAAG,uBAAuB,CAAC;QAEvC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;YACpD,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC1B,SAAS;YACb,CAAC;YAED,MAAM,UAAU,GAAG,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAE5C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;gBAC5B,OAAO,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC;YAChC,CAAC;iBAAM,IACH,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;gBACpB,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,EAC/C,CAAC;gBACC,OAAO,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC;YAChC,CAAC;QACL,CAAC;QAED,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IncomingMessage, ServerResponse } from "node:http";
|
|
2
|
+
import SQLiteStorage from "../storage/sqlite-storage";
|
|
3
|
+
import AuthService from "../security/auth.service";
|
|
4
|
+
export default class DashboardServer {
|
|
5
|
+
private readonly storage;
|
|
6
|
+
private readonly authService;
|
|
7
|
+
private readonly executionTreeBuilder;
|
|
8
|
+
private readonly requestDetailMapper;
|
|
9
|
+
private readonly responseDetailMapper;
|
|
10
|
+
private readonly errorMapper;
|
|
11
|
+
constructor(storage: SQLiteStorage, authService: AuthService);
|
|
12
|
+
private readJsonBody;
|
|
13
|
+
private getCookie;
|
|
14
|
+
private authenticateRequest;
|
|
15
|
+
private sendUnauthorized;
|
|
16
|
+
private handleLogin;
|
|
17
|
+
private handleLogout;
|
|
18
|
+
private handleProfile;
|
|
19
|
+
handle(req: IncomingMessage, res: ServerResponse): void | Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=dashboard-server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-server.d.ts","sourceRoot":"","sources":["../../../src/dashboard/dashboard-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAK5D,OAAO,aAAa,MAAM,2BAA2B,CAAC;AAItD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAkBnD,MAAM,CAAC,OAAO,OAAO,eAAe;IAS5B,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAThC,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAA8B;IACnE,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAsC;IAC1E,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAsC;IAC3E,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA6B;IAIzD,YACqB,OAAO,EAAE,aAAa,EACtB,WAAW,EAAE,WAAW,EAE5C;IAED,OAAO,CAAC,YAAY;IAsBpB,OAAO,CAAC,SAAS;IAqBjB,OAAO,CAAC,mBAAmB;IAqB3B,OAAO,CAAC,gBAAgB;YAWV,WAAW;IA0DzB,OAAO,CAAC,YAAY;IAuBpB,OAAO,CAAC,aAAa;IAmCrB,MAAM,CAAC,GAAG,EAAE,eAAe,EACvB,GAAG,EAAE,cAAc,wBAglBtB;CAGJ"}
|