@dudousxd/nestjs-telescope-ui 3.2.0 → 3.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/CHANGELOG.md +13 -0
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/telescope-client.d.ts +10 -1
- package/dist/client/telescope-client.d.ts.map +1 -1
- package/dist/client/telescope-client.js +23 -1
- package/dist/client/telescope-client.js.map +1 -1
- package/dist/client/types.d.ts +18 -0
- package/dist/client/types.d.ts.map +1 -1
- package/dist/react/use-telescope-queries.d.ts +2 -0
- package/dist/react/use-telescope-queries.d.ts.map +1 -1
- package/dist/react/use-telescope-queries.js +9 -0
- package/dist/react/use-telescope-queries.js.map +1 -1
- package/dist/spa/assets/{index-DlnNtBhU.css → index-DdEYuSwo.css} +1 -1
- package/dist/spa/assets/{index-5L-K6n2p.js → index-Qq58kyyp.js} +60 -60
- package/dist/spa/index.html +2 -2
- package/package.json +3 -3
- package/skills/telescope-ui-dashboard/SKILL.md +10 -3
package/dist/spa/index.html
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Telescope</title>
|
|
7
|
-
<script type="module" crossorigin src="/telescope/assets/index-
|
|
8
|
-
<link rel="stylesheet" crossorigin href="/telescope/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/telescope/assets/index-Qq58kyyp.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="/telescope/assets/index-DdEYuSwo.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
11
11
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dudousxd/nestjs-telescope-ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "Bundled dashboard + composable React components for @dudousxd/nestjs-telescope.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"react-router-dom": "^6.0.0 || ^7.0.0",
|
|
63
63
|
"recharts": "^2.0.0 || ^3.0.0",
|
|
64
64
|
"reflect-metadata": "^0.1.13 || ^0.2.0",
|
|
65
|
-
"@dudousxd/nestjs-telescope": "^3.
|
|
65
|
+
"@dudousxd/nestjs-telescope": "^3.3.0"
|
|
66
66
|
},
|
|
67
67
|
"peerDependenciesMeta": {
|
|
68
68
|
"react": {
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
"typescript": "5.9.3",
|
|
123
123
|
"vite": "5.4.21",
|
|
124
124
|
"vitest": "3.2.7",
|
|
125
|
-
"@dudousxd/nestjs-telescope": "3.
|
|
125
|
+
"@dudousxd/nestjs-telescope": "3.3.0"
|
|
126
126
|
},
|
|
127
127
|
"engines": {
|
|
128
128
|
"node": ">=20"
|
|
@@ -7,9 +7,11 @@ description: >-
|
|
|
7
7
|
async form, as are decorators and routes; the path must match
|
|
8
8
|
TelescopeModule); without authorize the page answers 403 in production.
|
|
9
9
|
call the headless API from any frontend with createTelescopeClient({ baseUrl?,
|
|
10
|
-
fetch?, onAccessDenied? }) from the /client subpath
|
|
10
|
+
fetch?, onAccessDenied?, tenant? }) from the /client subpath (with tenancy on
|
|
11
|
+
it sends the page's `?tenant=` on every call; read the scope with
|
|
12
|
+
client.tenancy()); build a custom console with the React
|
|
11
13
|
components, hooks (TelescopeProvider, useTelescopeClient, useEntries, usePulse,
|
|
12
|
-
useTimeseries) from the /react subpath. Use for "show the Telescope dashboard",
|
|
14
|
+
useTimeseries, useTenancy) from the /react subpath. Use for "show the Telescope dashboard",
|
|
13
15
|
"custom path", "call the Telescope API from React", "embed Telescope components".
|
|
14
16
|
license: MIT
|
|
15
17
|
metadata:
|
|
@@ -93,7 +95,12 @@ Source: `packages/ui/src/server/telescope-ui.module.ts`,
|
|
|
93
95
|
JSON API, usable in any frontend. `baseUrl` defaults to
|
|
94
96
|
`window.__TELESCOPE_BASE__ + '/api'`, else `/telescope/api`. `onAccessDenied`
|
|
95
97
|
runs when `authorize` refuses a call (default: follow `redirectTo`, else show
|
|
96
|
-
the access-denied screen).
|
|
98
|
+
the access-denied screen). With tenancy on, every call carries the page's
|
|
99
|
+
`?tenant=` (override with the `tenant` option, `() => string | undefined`);
|
|
100
|
+
`client.tenancy(search?)` reads the viewer's organizations from
|
|
101
|
+
`GET <api>/tenancy` (`{ enabled: false }` on older servers), and the dashboard
|
|
102
|
+
header shows an "Organization" control (chip for one, searchable picker for
|
|
103
|
+
several or all).
|
|
97
104
|
|
|
98
105
|
```ts
|
|
99
106
|
import { createTelescopeClient } from '@dudousxd/nestjs-telescope-ui/client';
|