@dudousxd/nestjs-telescope-ui 1.0.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/CHANGELOG.md +349 -0
- package/LICENSE +21 -0
- package/README.md +51 -0
- package/dist/client/index.d.ts +4 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +2 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/telescope-client.d.ts +63 -0
- package/dist/client/telescope-client.d.ts.map +1 -0
- package/dist/client/telescope-client.js +87 -0
- package/dist/client/telescope-client.js.map +1 -0
- package/dist/client/types.d.ts +267 -0
- package/dist/client/types.d.ts.map +1 -0
- package/dist/client/types.js +2 -0
- package/dist/client/types.js.map +1 -0
- package/dist/react/components/batch-timeline.d.ts +7 -0
- package/dist/react/components/batch-timeline.d.ts.map +1 -0
- package/dist/react/components/batch-timeline.js +10 -0
- package/dist/react/components/batch-timeline.js.map +1 -0
- package/dist/react/components/cache-badge.d.ts +20 -0
- package/dist/react/components/cache-badge.d.ts.map +1 -0
- package/dist/react/components/cache-badge.js +42 -0
- package/dist/react/components/cache-badge.js.map +1 -0
- package/dist/react/components/charts/area-chart-card.d.ts +16 -0
- package/dist/react/components/charts/area-chart-card.d.ts.map +1 -0
- package/dist/react/components/charts/area-chart-card.js +12 -0
- package/dist/react/components/charts/area-chart-card.js.map +1 -0
- package/dist/react/components/charts/bar-chart-card.d.ts +26 -0
- package/dist/react/components/charts/bar-chart-card.d.ts.map +1 -0
- package/dist/react/components/charts/bar-chart-card.js +27 -0
- package/dist/react/components/charts/bar-chart-card.js.map +1 -0
- package/dist/react/components/charts/chart-card.d.ts +11 -0
- package/dist/react/components/charts/chart-card.d.ts.map +1 -0
- package/dist/react/components/charts/chart-card.js +9 -0
- package/dist/react/components/charts/chart-card.js.map +1 -0
- package/dist/react/components/charts/chart-theme.d.ts +41 -0
- package/dist/react/components/charts/chart-theme.d.ts.map +1 -0
- package/dist/react/components/charts/chart-theme.js +53 -0
- package/dist/react/components/charts/chart-theme.js.map +1 -0
- package/dist/react/components/charts/index.d.ts +6 -0
- package/dist/react/components/charts/index.d.ts.map +1 -0
- package/dist/react/components/charts/index.js +6 -0
- package/dist/react/components/charts/index.js.map +1 -0
- package/dist/react/components/charts/stacked-area-chart-card.d.ts +14 -0
- package/dist/react/components/charts/stacked-area-chart-card.d.ts.map +1 -0
- package/dist/react/components/charts/stacked-area-chart-card.js +13 -0
- package/dist/react/components/charts/stacked-area-chart-card.js.map +1 -0
- package/dist/react/components/entries-table.d.ts +11 -0
- package/dist/react/components/entries-table.d.ts.map +1 -0
- package/dist/react/components/entries-table.js +68 -0
- package/dist/react/components/entries-table.js.map +1 -0
- package/dist/react/components/entry-detail.d.ts +6 -0
- package/dist/react/components/entry-detail.d.ts.map +1 -0
- package/dist/react/components/entry-detail.js +110 -0
- package/dist/react/components/entry-detail.js.map +1 -0
- package/dist/react/components/entry-insights.d.ts +5 -0
- package/dist/react/components/entry-insights.d.ts.map +1 -0
- package/dist/react/components/entry-insights.js +107 -0
- package/dist/react/components/entry-insights.js.map +1 -0
- package/dist/react/components/entry-types.d.ts +40 -0
- package/dist/react/components/entry-types.d.ts.map +1 -0
- package/dist/react/components/entry-types.js +44 -0
- package/dist/react/components/entry-types.js.map +1 -0
- package/dist/react/components/export-json-toolbar.d.ts +9 -0
- package/dist/react/components/export-json-toolbar.d.ts.map +1 -0
- package/dist/react/components/export-json-toolbar.js +21 -0
- package/dist/react/components/export-json-toolbar.js.map +1 -0
- package/dist/react/components/export-json.d.ts +14 -0
- package/dist/react/components/export-json.d.ts.map +1 -0
- package/dist/react/components/export-json.js +44 -0
- package/dist/react/components/export-json.js.map +1 -0
- package/dist/react/components/pulse-panel.d.ts +9 -0
- package/dist/react/components/pulse-panel.d.ts.map +1 -0
- package/dist/react/components/pulse-panel.js +20 -0
- package/dist/react/components/pulse-panel.js.map +1 -0
- package/dist/react/components/queue-sparkline.d.ts +5 -0
- package/dist/react/components/queue-sparkline.d.ts.map +1 -0
- package/dist/react/components/queue-sparkline.js +8 -0
- package/dist/react/components/queue-sparkline.js.map +1 -0
- package/dist/react/components/queues/EnqueueJobForm.d.ts +14 -0
- package/dist/react/components/queues/EnqueueJobForm.d.ts.map +1 -0
- package/dist/react/components/queues/EnqueueJobForm.js +61 -0
- package/dist/react/components/queues/EnqueueJobForm.js.map +1 -0
- package/dist/react/components/queues/JobActions.d.ts +38 -0
- package/dist/react/components/queues/JobActions.d.ts.map +1 -0
- package/dist/react/components/queues/JobActions.js +106 -0
- package/dist/react/components/queues/JobActions.js.map +1 -0
- package/dist/react/components/queues/JobDetailDrawer.d.ts +11 -0
- package/dist/react/components/queues/JobDetailDrawer.d.ts.map +1 -0
- package/dist/react/components/queues/JobDetailDrawer.js +45 -0
- package/dist/react/components/queues/JobDetailDrawer.js.map +1 -0
- package/dist/react/components/queues/JobTable.d.ts +13 -0
- package/dist/react/components/queues/JobTable.d.ts.map +1 -0
- package/dist/react/components/queues/JobTable.js +0 -0
- package/dist/react/components/queues/JobTable.js.map +1 -0
- package/dist/react/components/queues/QueueList.d.ts +8 -0
- package/dist/react/components/queues/QueueList.d.ts.map +1 -0
- package/dist/react/components/queues/QueueList.js +27 -0
- package/dist/react/components/queues/QueueList.js.map +1 -0
- package/dist/react/components/queues/QueueStateTabs.d.ts +7 -0
- package/dist/react/components/queues/QueueStateTabs.d.ts.map +1 -0
- package/dist/react/components/queues/QueueStateTabs.js +12 -0
- package/dist/react/components/queues/QueueStateTabs.js.map +1 -0
- package/dist/react/components/queues/index.d.ts +8 -0
- package/dist/react/components/queues/index.d.ts.map +1 -0
- package/dist/react/components/queues/index.js +8 -0
- package/dist/react/components/queues/index.js.map +1 -0
- package/dist/react/components/queues/queue-format.d.ts +8 -0
- package/dist/react/components/queues/queue-format.d.ts.map +1 -0
- package/dist/react/components/queues/queue-format.js +51 -0
- package/dist/react/components/queues/queue-format.js.map +1 -0
- package/dist/react/components/queues-panel.d.ts +6 -0
- package/dist/react/components/queues-panel.d.ts.map +1 -0
- package/dist/react/components/queues-panel.js +8 -0
- package/dist/react/components/queues-panel.js.map +1 -0
- package/dist/react/components/request-timeline.d.ts +14 -0
- package/dist/react/components/request-timeline.d.ts.map +1 -0
- package/dist/react/components/request-timeline.js +30 -0
- package/dist/react/components/request-timeline.js.map +1 -0
- package/dist/react/components/retention-indicator.d.ts +10 -0
- package/dist/react/components/retention-indicator.d.ts.map +1 -0
- package/dist/react/components/retention-indicator.js +38 -0
- package/dist/react/components/retention-indicator.js.map +1 -0
- package/dist/react/components/sparkline.d.ts +7 -0
- package/dist/react/components/sparkline.d.ts.map +1 -0
- package/dist/react/components/sparkline.js +20 -0
- package/dist/react/components/sparkline.js.map +1 -0
- package/dist/react/components/stacked-bars.d.ts +21 -0
- package/dist/react/components/stacked-bars.d.ts.map +1 -0
- package/dist/react/components/stacked-bars.js +51 -0
- package/dist/react/components/stacked-bars.js.map +1 -0
- package/dist/react/components/tag-autocomplete.d.ts +12 -0
- package/dist/react/components/tag-autocomplete.d.ts.map +1 -0
- package/dist/react/components/tag-autocomplete.js +90 -0
- package/dist/react/components/tag-autocomplete.js.map +1 -0
- package/dist/react/components/trace-link.d.ts +6 -0
- package/dist/react/components/trace-link.d.ts.map +1 -0
- package/dist/react/components/trace-link.js +10 -0
- package/dist/react/components/trace-link.js.map +1 -0
- package/dist/react/components/type-tabs.d.ts +5 -0
- package/dist/react/components/type-tabs.d.ts.map +1 -0
- package/dist/react/components/type-tabs.js +8 -0
- package/dist/react/components/type-tabs.js.map +1 -0
- package/dist/react/components/window-select.d.ts +5 -0
- package/dist/react/components/window-select.d.ts.map +1 -0
- package/dist/react/components/window-select.js +6 -0
- package/dist/react/components/window-select.js.map +1 -0
- package/dist/react/index.d.ts +23 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +23 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react/telescope-context.d.ts +14 -0
- package/dist/react/telescope-context.d.ts.map +1 -0
- package/dist/react/telescope-context.js +27 -0
- package/dist/react/telescope-context.js.map +1 -0
- package/dist/react/use-telescope-queries.d.ts +244 -0
- package/dist/react/use-telescope-queries.d.ts.map +1 -0
- package/dist/react/use-telescope-queries.js +216 -0
- package/dist/react/use-telescope-queries.js.map +1 -0
- package/dist/server/index.d.ts +3 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +2 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/telescope-ui.controller.d.ts +10 -0
- package/dist/server/telescope-ui.controller.d.ts.map +1 -0
- package/dist/server/telescope-ui.controller.js +105 -0
- package/dist/server/telescope-ui.controller.js.map +1 -0
- package/dist/server/telescope-ui.module.d.ts +6 -0
- package/dist/server/telescope-ui.module.d.ts.map +1 -0
- package/dist/server/telescope-ui.module.js +26 -0
- package/dist/server/telescope-ui.module.js.map +1 -0
- package/dist/server/telescope-ui.options.d.ts +12 -0
- package/dist/server/telescope-ui.options.d.ts.map +1 -0
- package/dist/server/telescope-ui.options.js +2 -0
- package/dist/server/telescope-ui.options.js.map +1 -0
- package/dist/spa/assets/index-BHS361H_.js +135 -0
- package/dist/spa/assets/index-DsBEgxHC.css +1 -0
- package/dist/spa/index.html +13 -0
- package/package.json +97 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
14
|
+
import { basename, extname, join, resolve, sep } from 'node:path';
|
|
15
|
+
import { fileURLToPath } from 'node:url';
|
|
16
|
+
import { normalizeTelescopePath } from '@dudousxd/nestjs-telescope';
|
|
17
|
+
import { Controller, Get, Header, Inject, NotFoundException, Param, StreamableFile, } from '@nestjs/common';
|
|
18
|
+
import { TELESCOPE_UI_OPTIONS } from './telescope-ui.options.js';
|
|
19
|
+
/** dist/server/telescope-ui.controller.js -> ../spa */
|
|
20
|
+
function defaultAssetsDir() {
|
|
21
|
+
return fileURLToPath(new URL('../spa', import.meta.url));
|
|
22
|
+
}
|
|
23
|
+
const CONTENT_TYPES = {
|
|
24
|
+
'.js': 'text/javascript; charset=utf-8',
|
|
25
|
+
'.css': 'text/css; charset=utf-8',
|
|
26
|
+
'.map': 'application/json; charset=utf-8',
|
|
27
|
+
'.svg': 'image/svg+xml',
|
|
28
|
+
'.json': 'application/json; charset=utf-8',
|
|
29
|
+
'.ico': 'image/x-icon',
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* The SPA is built once with a fixed Vite `base` of `/telescope/`, so every
|
|
33
|
+
* asset URL in the built index.html is hardcoded to that placeholder. When the
|
|
34
|
+
* dashboard is mounted under a custom path we rewrite those occurrences at serve
|
|
35
|
+
* time instead of rebuilding the bundle per-path. When the path is the default
|
|
36
|
+
* `'telescope'` the source and target strings are identical, so this is a no-op.
|
|
37
|
+
*/
|
|
38
|
+
function rewriteAssetBase(html, path) {
|
|
39
|
+
const injectedBase = `<script>window.__TELESCOPE_BASE__ = ${JSON.stringify(`/${path}`)};</script>`;
|
|
40
|
+
const rebased = html.split('/telescope/').join(`/${path}/`);
|
|
41
|
+
// Expose the runtime base before the bundle so the client can derive API URLs.
|
|
42
|
+
if (rebased.includes('</head>')) {
|
|
43
|
+
return rebased.replace('</head>', `${injectedBase}</head>`);
|
|
44
|
+
}
|
|
45
|
+
return `${injectedBase}${rebased}`;
|
|
46
|
+
}
|
|
47
|
+
let TelescopeUiController = class TelescopeUiController {
|
|
48
|
+
assetsDir;
|
|
49
|
+
path;
|
|
50
|
+
constructor(options) {
|
|
51
|
+
this.assetsDir = options.assetsDir ?? defaultAssetsDir();
|
|
52
|
+
this.path = normalizeTelescopePath(options.path);
|
|
53
|
+
}
|
|
54
|
+
// index.html references hash-named asset bundles. It MUST NOT be cached, or a
|
|
55
|
+
// browser keeps loading a stale bundle across deploys (the classic "one widget
|
|
56
|
+
// stuck loading / old labels after an upgrade"). The hashed assets below are
|
|
57
|
+
// immutable and cached forever instead.
|
|
58
|
+
index() {
|
|
59
|
+
const indexPath = join(this.assetsDir, 'index.html');
|
|
60
|
+
if (!existsSync(indexPath)) {
|
|
61
|
+
throw new NotFoundException('Telescope UI is not built. Run the package build.');
|
|
62
|
+
}
|
|
63
|
+
return rewriteAssetBase(readFileSync(indexPath, 'utf8'), this.path);
|
|
64
|
+
}
|
|
65
|
+
// Asset filenames are content-hashed by the build, so they're safe to cache
|
|
66
|
+
// forever — a new bundle gets a new filename referenced by the (uncached) index.
|
|
67
|
+
asset(file) {
|
|
68
|
+
// Trust assumption: assetsDir holds build-produced files (not user-writable).
|
|
69
|
+
// The basename + resolved-prefix checks below still prevent escaping assets/.
|
|
70
|
+
// basename strips any path components, defeating traversal (../, nested, encoded).
|
|
71
|
+
const safe = basename(file);
|
|
72
|
+
if (safe !== file)
|
|
73
|
+
throw new NotFoundException();
|
|
74
|
+
const root = resolve(this.assetsDir, 'assets');
|
|
75
|
+
const assetPath = resolve(root, safe);
|
|
76
|
+
if (!assetPath.startsWith(root + sep) || !existsSync(assetPath)) {
|
|
77
|
+
throw new NotFoundException();
|
|
78
|
+
}
|
|
79
|
+
const type = CONTENT_TYPES[extname(safe)] ?? 'application/octet-stream';
|
|
80
|
+
return new StreamableFile(readFileSync(assetPath), { type });
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
__decorate([
|
|
84
|
+
Get(),
|
|
85
|
+
Header('Content-Type', 'text/html; charset=utf-8'),
|
|
86
|
+
Header('Cache-Control', 'no-store, must-revalidate'),
|
|
87
|
+
__metadata("design:type", Function),
|
|
88
|
+
__metadata("design:paramtypes", []),
|
|
89
|
+
__metadata("design:returntype", String)
|
|
90
|
+
], TelescopeUiController.prototype, "index", null);
|
|
91
|
+
__decorate([
|
|
92
|
+
Get('assets/:file'),
|
|
93
|
+
Header('Cache-Control', 'public, max-age=31536000, immutable'),
|
|
94
|
+
__param(0, Param('file')),
|
|
95
|
+
__metadata("design:type", Function),
|
|
96
|
+
__metadata("design:paramtypes", [String]),
|
|
97
|
+
__metadata("design:returntype", StreamableFile)
|
|
98
|
+
], TelescopeUiController.prototype, "asset", null);
|
|
99
|
+
TelescopeUiController = __decorate([
|
|
100
|
+
Controller(),
|
|
101
|
+
__param(0, Inject(TELESCOPE_UI_OPTIONS)),
|
|
102
|
+
__metadata("design:paramtypes", [Object])
|
|
103
|
+
], TelescopeUiController);
|
|
104
|
+
export { TelescopeUiController };
|
|
105
|
+
//# sourceMappingURL=telescope-ui.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telescope-ui.controller.js","sourceRoot":"","sources":["../../src/server/telescope-ui.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EACL,UAAU,EACV,GA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AAC;;;;kDAOpD;AAMD;IAFC,GAAG,CAAC,cAAc,CAAC;IACnB,MAAM,CAAC,eAAe,EAAE,qCAAqC,CAAC;IACxD,WAAA,KAAK,CAAC,MAAM,CAAC,CAAA;;;oCAAgB,cAAc;kDAajD;AAzCU,qBAAqB;IADjC,UAAU,EAAE;IAKE,WAAA,MAAM,CAAC,oBAAoB,CAAC,CAAA;;GAJ9B,qBAAqB,CA0CjC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type DynamicModule } from '@nestjs/common';
|
|
2
|
+
import { type TelescopeUiModuleOptions } from './telescope-ui.options.js';
|
|
3
|
+
export declare class TelescopeUiModule {
|
|
4
|
+
static forRoot(options?: TelescopeUiModuleOptions): DynamicModule;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=telescope-ui.module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telescope-ui.module.d.ts","sourceRoot":"","sources":["../../src/server/telescope-ui.module.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,aAAa,EAAU,MAAM,gBAAgB,CAAC;AAE5D,OAAO,EAAwB,KAAK,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAEhG,qBACa,iBAAiB;IAC5B,MAAM,CAAC,OAAO,CAAC,OAAO,GAAE,wBAA6B,GAAG,aAAa;CAQtE"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var TelescopeUiModule_1;
|
|
8
|
+
import { dynamicController, normalizeTelescopePath } from '@dudousxd/nestjs-telescope';
|
|
9
|
+
import { Module } from '@nestjs/common';
|
|
10
|
+
import { TelescopeUiController } from './telescope-ui.controller.js';
|
|
11
|
+
import { TELESCOPE_UI_OPTIONS } from './telescope-ui.options.js';
|
|
12
|
+
let TelescopeUiModule = TelescopeUiModule_1 = class TelescopeUiModule {
|
|
13
|
+
static forRoot(options = {}) {
|
|
14
|
+
const path = normalizeTelescopePath(options.path);
|
|
15
|
+
return {
|
|
16
|
+
module: TelescopeUiModule_1,
|
|
17
|
+
controllers: [dynamicController(TelescopeUiController, path)],
|
|
18
|
+
providers: [{ provide: TELESCOPE_UI_OPTIONS, useValue: options }],
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
TelescopeUiModule = TelescopeUiModule_1 = __decorate([
|
|
23
|
+
Module({})
|
|
24
|
+
], TelescopeUiModule);
|
|
25
|
+
export { TelescopeUiModule };
|
|
26
|
+
//# sourceMappingURL=telescope-ui.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telescope-ui.module.js","sourceRoot":"","sources":["../../src/server/telescope-ui.module.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACvF,OAAO,EAAsB,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAiC,MAAM,2BAA2B,CAAC;AAGzF,IAAM,iBAAiB,yBAAvB,MAAM,iBAAiB;IAC5B,MAAM,CAAC,OAAO,CAAC,UAAoC,EAAE;QACnD,MAAM,IAAI,GAAG,sBAAsB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAClD,OAAO;YACL,MAAM,EAAE,mBAAiB;YACzB,WAAW,EAAE,CAAC,iBAAiB,CAAC,qBAAqB,EAAE,IAAI,CAAC,CAAC;YAC7D,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;SAClE,CAAC;IACJ,CAAC;CACF,CAAA;AATY,iBAAiB;IAD7B,MAAM,CAAC,EAAE,CAAC;GACE,iBAAiB,CAS7B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const TELESCOPE_UI_OPTIONS: unique symbol;
|
|
2
|
+
export interface TelescopeUiModuleOptions {
|
|
3
|
+
/** Directory of the built SPA (index.html + assets/). Defaults to the bundled dist/spa. */
|
|
4
|
+
assetsDir?: string;
|
|
5
|
+
/**
|
|
6
|
+
* Mount path for the dashboard (no leading/trailing slash needed). Defaults to
|
|
7
|
+
* `'telescope'` — when unset the dashboard lives at `/telescope` exactly as
|
|
8
|
+
* before. Must match the core `TelescopeModule.forRoot({ path })`.
|
|
9
|
+
*/
|
|
10
|
+
path?: string;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=telescope-ui.options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telescope-ui.options.d.ts","sourceRoot":"","sources":["../../src/server/telescope-ui.options.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,eAAiC,CAAC;AAEnE,MAAM,WAAW,wBAAwB;IACvC,2FAA2F;IAC3F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telescope-ui.options.js","sourceRoot":"","sources":["../../src/server/telescope-ui.options.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAC"}
|