@adonis-agora/telescope 0.10.0 → 0.11.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 +31 -0
- package/dist/providers/telescope_ui_provider.d.ts.map +1 -1
- package/dist/providers/telescope_ui_provider.js +46 -3
- package/dist/providers/telescope_ui_provider.js.map +1 -1
- package/dist/src/ai/index.d.ts +1 -1
- package/dist/src/ai/index.js +1 -1
- package/dist/src/alerts/index.d.ts +1 -1
- package/dist/src/alerts/index.js +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/mcp/index.d.ts +1 -1
- package/dist/src/mcp/index.js +1 -1
- package/dist/src/profiling/index.d.ts +1 -1
- package/dist/src/profiling/index.js +1 -1
- package/dist/src/ui/access_denied_page.d.ts +102 -0
- package/dist/src/ui/access_denied_page.d.ts.map +1 -0
- package/dist/src/ui/access_denied_page.js +266 -0
- package/dist/src/ui/access_denied_page.js.map +1 -0
- package/dist/src/ui/define_config.d.ts +27 -0
- package/dist/src/ui/define_config.d.ts.map +1 -1
- package/dist/src/ui/define_config.js +1 -0
- package/dist/src/ui/define_config.js.map +1 -1
- package/dist/src/ui/guard.d.ts +29 -0
- package/dist/src/ui/guard.d.ts.map +1 -1
- package/dist/src/ui/guard.js +49 -0
- package/dist/src/ui/guard.js.map +1 -1
- package/dist/src/ui/index.d.ts +6 -4
- package/dist/src/ui/index.d.ts.map +1 -1
- package/dist/src/ui/index.js +4 -2
- package/dist/src/ui/index.js.map +1 -1
- package/dist/src/ui/login_page.d.ts +24 -11
- package/dist/src/ui/login_page.d.ts.map +1 -1
- package/dist/src/ui/login_page.js +29 -41
- package/dist/src/ui/login_page.js.map +1 -1
- package/dist/src/watchers/index.d.ts +1 -1
- package/dist/src/watchers/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @adonis-agora/telescope
|
|
2
2
|
|
|
3
|
+
## 0.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#42](https://github.com/DavideCarvalho/adonis-agora-telescope/pull/42) [`2ff9a9e`](https://github.com/DavideCarvalho/adonis-agora-telescope/commit/2ff9a9e4e7ba9ab68f9a14cfb5520587bc75c774) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Dashboard: a refused page navigation now gets a real page instead of `{"error":"Forbidden"}`.
|
|
8
|
+
|
|
9
|
+
Opening the `@adonis-agora/telescope-ui` console without permission used to answer the browser
|
|
10
|
+
with the same JSON the API gets. It now serves a built-in access-denied page in the console's
|
|
11
|
+
own visual language — the status, a sentence explaining the refusal, a "Back to app" link and,
|
|
12
|
+
when `dashboardAuth` is configured, a "Sign in" button. Statuses are unchanged (a `401` still
|
|
13
|
+
carries `WWW-Authenticate`, so the built-in `basic` credentials keep prompting natively), API
|
|
14
|
+
requests are unchanged, and an `authorize` hook that redirects still wins.
|
|
15
|
+
|
|
16
|
+
The page carries no inline `<script>`, so a nonce'd `script-src` CSP cannot break it; its inline
|
|
17
|
+
`<style>` takes `@adonisjs/shield`'s request nonce when one exists.
|
|
18
|
+
|
|
19
|
+
New `accessDenied` option on `config/telescope_ui.ts` to customise it — an object (`brand`,
|
|
20
|
+
`title`, `message`, `homeHref`, `loginHref`, `accent`, labels) to tweak the built-in page, or a
|
|
21
|
+
function `(info, ctx) => html | void` to render it yourself or redirect. Core exports the new
|
|
22
|
+
`enforcePageGuard` + `renderAccessDeniedPage` for hosts serving the SPA themselves;
|
|
23
|
+
`@adonis-agora/telescope-ui` now needs `@adonis-agora/telescope >= 0.11.0` for it.
|
|
24
|
+
|
|
25
|
+
Also: the built-in `dashboardAuth` login page no longer dies under a nonce'd CSP. It is now a real
|
|
26
|
+
HTML form that works without JavaScript — a form submit is answered with a redirect (to the page
|
|
27
|
+
the operator came from, or back to the form with the error shown) while the page's own `fetch`
|
|
28
|
+
keeps getting JSON — and its inline script/style carry `@adonisjs/shield`'s request nonce.
|
|
29
|
+
`renderLoginPage` takes an optional `{ nonce, error, returnTo }`. And the SPA's `401` page sends
|
|
30
|
+
the `WWW-Authenticate: Basic` challenge only when `credentials.basic` is configured
|
|
31
|
+
(`PageGuardOptions.challenge`), so hosts gating on their own `authorize` no longer get a native
|
|
32
|
+
browser prompt over it.
|
|
33
|
+
|
|
3
34
|
## 0.10.0
|
|
4
35
|
|
|
5
36
|
### Minor Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telescope_ui_provider.d.ts","sourceRoot":"","sources":["../../providers/telescope_ui_provider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AA4B/D;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,OAAO,mBAAmB;IAC1B,SAAS,CAAC,GAAG,EAAE,kBAAkB;IAA7C,YAAsB,GAAG,EAAE,kBAAkB,EAAI;IAEjD,0FAA0F;IAC1F,OAAO,CAAC,iBAAiB,CAAS;IAElC,OAAO,CAAC,OAAO;IAMT,IAAI,
|
|
1
|
+
{"version":3,"file":"telescope_ui_provider.d.ts","sourceRoot":"","sources":["../../providers/telescope_ui_provider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AA4B/D;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,OAAO,mBAAmB;IAC1B,SAAS,CAAC,GAAG,EAAE,kBAAkB;IAA7C,YAAsB,GAAG,EAAE,kBAAkB,EAAI;IAEjD,0FAA0F;IAC1F,OAAO,CAAC,iBAAiB,CAAS;IAElC,OAAO,CAAC,OAAO;IAMT,IAAI,kBAoaT;CACF"}
|
|
@@ -3,7 +3,7 @@ import { getTelescopeRuntime } from '../src/registry.js';
|
|
|
3
3
|
import { TelescopeService } from '../src/service.js';
|
|
4
4
|
import { streamEntries } from '../src/stream/stream_handler.js';
|
|
5
5
|
import { TelescopeApi } from '../src/ui/api.js';
|
|
6
|
-
import { performLogin } from '../src/ui/auth.js';
|
|
6
|
+
import { performLogin, sanitizeReturnTo } from '../src/ui/auth.js';
|
|
7
7
|
import { clearSessionCookie, enforceDashboardAuth, writeSessionCookie, } from '../src/ui/dashboard_auth.js';
|
|
8
8
|
import { resolveConfig, } from '../src/ui/define_config.js';
|
|
9
9
|
import { DiagnosisApi } from '../src/ui/diagnosis_api.js';
|
|
@@ -125,16 +125,36 @@ export default class TelescopeUiProvider {
|
|
|
125
125
|
.get(loginPath, async (ctx) => {
|
|
126
126
|
ctx.response.header('content-type', 'text/html; charset=utf-8');
|
|
127
127
|
ctx.response.header('cache-control', 'no-store, must-revalidate');
|
|
128
|
-
|
|
128
|
+
const qs = ctx.request.qs();
|
|
129
|
+
const nonce = cspNonce(ctx);
|
|
130
|
+
return ctx.response.send(renderLoginPage(config.path, {
|
|
131
|
+
...(nonce !== undefined ? { nonce } : {}),
|
|
132
|
+
error: qs.error !== undefined,
|
|
133
|
+
returnTo: qs.returnTo,
|
|
134
|
+
}));
|
|
129
135
|
})
|
|
130
136
|
.as('telescope_ui.login.page');
|
|
131
137
|
// `POST <path>/login` → verify credentials via the host `login` hook and mint the cookie.
|
|
132
138
|
// Uniform `401` on ANY failure (unknown user, wrong password, or a throwing hook) so there is
|
|
133
139
|
// no user-enumeration; a throwing hook is warn-logged once, never surfaced to the client.
|
|
140
|
+
// Two callers: the page's own `fetch` (JSON in, JSON out) and, with JavaScript off or its
|
|
141
|
+
// inline script dropped by a CSP, the same page as a classic form post (form-encoded in, a
|
|
142
|
+
// redirect out: to `returnTo` on success, back to the login page with `?error` on failure).
|
|
134
143
|
router
|
|
135
144
|
.post(loginPath, async (ctx) => {
|
|
136
|
-
const
|
|
145
|
+
const body = ctx.request.body();
|
|
146
|
+
const outcome = await performLogin(auth, body, config.path);
|
|
147
|
+
const form = isFormPost(ctx);
|
|
148
|
+
const backToLogin = () => ctx.response
|
|
149
|
+
.redirect()
|
|
150
|
+
.withQs({
|
|
151
|
+
error: '1',
|
|
152
|
+
returnTo: sanitizeReturnTo(body?.returnTo, config.path),
|
|
153
|
+
})
|
|
154
|
+
.toPath(loginPath);
|
|
137
155
|
if (outcome.kind === 'bad-request') {
|
|
156
|
+
if (form)
|
|
157
|
+
return backToLogin();
|
|
138
158
|
return ctx.response.status(400).json({ error: outcome.message });
|
|
139
159
|
}
|
|
140
160
|
if (outcome.kind === 'unauthorized') {
|
|
@@ -146,9 +166,13 @@ export default class TelescopeUiProvider {
|
|
|
146
166
|
const logger = await this.app.container.make('logger');
|
|
147
167
|
logger.warn(`dashboardAuth login hook threw; treating as denial. ${message}`);
|
|
148
168
|
}
|
|
169
|
+
if (form)
|
|
170
|
+
return backToLogin();
|
|
149
171
|
return ctx.response.status(401).json({ error: outcome.message });
|
|
150
172
|
}
|
|
151
173
|
writeSessionCookie(ctx, auth, outcome.cookieValue);
|
|
174
|
+
if (form)
|
|
175
|
+
return ctx.response.redirect().toPath(outcome.redirectTo);
|
|
152
176
|
return ctx.response.status(200).json({ redirectTo: outcome.redirectTo });
|
|
153
177
|
})
|
|
154
178
|
.as('telescope_ui.login.submit');
|
|
@@ -418,6 +442,25 @@ export default class TelescopeUiProvider {
|
|
|
418
442
|
function asMessage(err) {
|
|
419
443
|
return err instanceof Error ? err.message : String(err);
|
|
420
444
|
}
|
|
445
|
+
/**
|
|
446
|
+
* The request's CSP nonce when the host runs `@adonisjs/shield` with `@nonce` in its policy (shield
|
|
447
|
+
* exposes it as `response.nonce`). Read structurally: this package neither depends on shield nor
|
|
448
|
+
* cares which middleware minted the nonce — only that the login page's inline `<script>`/`<style>`
|
|
449
|
+
* carry it, so the policy keeps them instead of silently dropping them.
|
|
450
|
+
*/
|
|
451
|
+
function cspNonce(ctx) {
|
|
452
|
+
const nonce = ctx.response.nonce;
|
|
453
|
+
return typeof nonce === 'string' && nonce !== '' ? nonce : undefined;
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* Whether a login `POST` came from a classic HTML form submit (form-encoded — JavaScript off, or
|
|
457
|
+
* the page's inline script dropped by a CSP) rather than the page's own JSON `fetch`. Decides
|
|
458
|
+
* whether the reply is a redirect (a browser navigating) or JSON (a script awaiting it).
|
|
459
|
+
*/
|
|
460
|
+
function isFormPost(ctx) {
|
|
461
|
+
const type = ctx.request.header('content-type') ?? '';
|
|
462
|
+
return type.includes('application/x-www-form-urlencoded') || type.includes('multipart/form-data');
|
|
463
|
+
}
|
|
421
464
|
/**
|
|
422
465
|
* Read the parsed JSON body off a real Adonis `HttpContext`'s request. `UiRequest` (the
|
|
423
466
|
* framework-light interface these routes are typed against) deliberately has no `body()` — every
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telescope_ui_provider.js","sourceRoot":"","sources":["../../providers/telescope_ui_provider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,IAAI,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAElF,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEL,aAAa,GAEd,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAA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AAO,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;IACtD,OAAO,IAAI,CAAC,QAAQ,CAAC,mCAAmC,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC;AACpG,CAAC;AAED;;;;;;GAMG;AACH,SAAS,MAAM,CAAC,GAAmB;IACjC,MAAM,IAAI,GAAa,GAAoD,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;IAC7F,OAAO,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAE,IAAgC,CAAC,CAAC,CAAC,EAAE,CAAC;AACnF,CAAC;AAED,4FAA4F;AAC5F,SAAS,sBAAsB,CAAC,GAAmB;IACjD,OAAO,GAAG,CAAC,QAAQ;SAChB,MAAM,CAAC,GAAG,CAAC;SACX,IAAI,CAAC,EAAE,KAAK,EAAE,6EAA6E,EAAE,CAAC,CAAC;AACpG,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,WAAW,CAAC,GAAmB;IACtC,MAAM,IAAI,GAAI,GAAwE,CAAC,OAAO;QAC5F,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC;IAC/B,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;AACjE,CAAC"}
|
package/dist/src/ai/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Keep in sync with this package's `version` in package.json. */
|
|
2
|
-
export declare const VERSION = "0.
|
|
2
|
+
export declare const VERSION = "0.11.0";
|
|
3
3
|
export type { ResolvedTelescopeAiConfig, TelescopeAiConfig, } from './define_config.js';
|
|
4
4
|
export { DEFAULT_MAX_TOKENS, DEFAULT_MODEL, defineConfig, resolveConfig, } from './define_config.js';
|
|
5
5
|
export type { Diagnosis, DiagnosisConfidence, ExceptionEntryContent } from './diagnoser.js';
|
package/dist/src/ai/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Keep in sync with this package's `version` in package.json. */
|
|
2
|
-
export const VERSION = '0.
|
|
2
|
+
export const VERSION = '0.11.0';
|
|
3
3
|
// — config —
|
|
4
4
|
export { DEFAULT_MAX_TOKENS, DEFAULT_MODEL, defineConfig, resolveConfig, } from './define_config.js';
|
|
5
5
|
// — diagnosis model + parsing —
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Keep in sync with this package's `version` in package.json. */
|
|
2
|
-
export declare const VERSION = "0.
|
|
2
|
+
export declare const VERSION = "0.11.0";
|
|
3
3
|
export type { AlertChannel, ChannelFetch, ConsoleSink } from './alert_channel.js';
|
|
4
4
|
export { consoleChannel, customChannel, slackChannel, webhookChannel, } from './alert_channel.js';
|
|
5
5
|
export type { AlertDiagnosis, AlertGeoLocation, AlertMetric, AlertPayload, AlertRule, ExceptionAlertContext, GeoLookup, ResolvedAlerts, } from './alert_rule.js';
|
package/dist/src/alerts/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Keep in sync with this package's `version` in package.json. */
|
|
2
|
-
export const VERSION = '0.
|
|
2
|
+
export const VERSION = '0.11.0';
|
|
3
3
|
// — channels —
|
|
4
4
|
export { consoleChannel, customChannel, slackChannel, webhookChannel, } from './alert_channel.js';
|
|
5
5
|
// — alerter (exception source → tracker → channels) —
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Keep in sync with this package's `version` in package.json. */
|
|
2
|
-
export declare const VERSION = "0.
|
|
2
|
+
export declare const VERSION = "0.11.0";
|
|
3
3
|
export { configure } from '../configure.js';
|
|
4
4
|
export type { DiagnoserLike, DiagnosisCoordinatorOptions, DiagnosisSummary, } from './ai/diagnosis_coordinator.js';
|
|
5
5
|
export { DiagnosisCoordinator, formatDiagnosisMarkdown, } from './ai/diagnosis_coordinator.js';
|
package/dist/src/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Keep in sync with this package's `version` in package.json. */
|
|
2
|
-
export const VERSION = '0.
|
|
2
|
+
export const VERSION = '0.11.0';
|
|
3
3
|
// Re-export the configure hook from the package root so `node ace configure` finds it
|
|
4
4
|
export { configure } from '../configure.js';
|
|
5
5
|
// — AI diagnosis coordinator (wires the MCP tool + the alerter; SDK-free) —
|
package/dist/src/mcp/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Keep in sync with this package's `version` in package.json. */
|
|
2
|
-
export declare const VERSION = "0.
|
|
2
|
+
export declare const VERSION = "0.11.0";
|
|
3
3
|
export type { McpToolName, ResolvedTelescopeMcpConfig, TelescopeMcpConfig, } from './define_config.js';
|
|
4
4
|
export { defineConfig, MCP_TOOL_NAMES, resolveConfig } from './define_config.js';
|
|
5
5
|
export type { DiagnoseExceptionHook, JsonRpcRequest, McpToolSpec, TelescopeMcpServerOptions, } from './server.js';
|
package/dist/src/mcp/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Keep in sync with this package's `version` in package.json. */
|
|
2
|
-
export const VERSION = '0.
|
|
2
|
+
export const VERSION = '0.11.0';
|
|
3
3
|
// — config —
|
|
4
4
|
export { defineConfig, MCP_TOOL_NAMES, resolveConfig } from './define_config.js';
|
|
5
5
|
// — server (plain, testable JSON-RPC surface) —
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Keep in sync with this package's `version` in package.json. */
|
|
2
|
-
export declare const VERSION = "0.
|
|
2
|
+
export declare const VERSION = "0.11.0";
|
|
3
3
|
export { aggregateCpuProfile } from './aggregate-profile.js';
|
|
4
4
|
export type { CpuProfilerOptions, CpuProfilerResult, InspectorSessionLike, SessionFactory, } from './cpu-profiler.js';
|
|
5
5
|
export { CpuProfiler, defaultSessionFactory } from './cpu-profiler.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Keep in sync with this package's `version` in package.json. */
|
|
2
|
-
export const VERSION = '0.
|
|
2
|
+
export const VERSION = '0.11.0';
|
|
3
3
|
export { aggregateCpuProfile } from './aggregate-profile.js';
|
|
4
4
|
export { CpuProfiler, defaultSessionFactory } from './cpu-profiler.js';
|
|
5
5
|
export { defineConfig, resolveConfig } from './define_config.js';
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The built-in "access denied" page a BROWSER sees when the dashboard guard refuses a page
|
|
3
|
+
* navigation — the SPA shell, its assets, or (Mode A only) a session-less visit. Before this page
|
|
4
|
+
* existed the guard answered every denial with the JSON it answers the API with
|
|
5
|
+
* (`{ "error": "forbidden" }`), which is the right thing for the SPA's `fetch` calls and the wrong
|
|
6
|
+
* thing for a human staring at a browser tab.
|
|
7
|
+
*
|
|
8
|
+
* Deliberately a small, dependency-free, hand-authored HTML page (like `login_page.ts`) — NOT part
|
|
9
|
+
* of the bundled SPA, so a denial never needs the SPA to load first. It carries NO `<script>` at all,
|
|
10
|
+
* so a host running a nonce'd `script-src` CSP (the `@adonisjs/shield` default) cannot break it; the
|
|
11
|
+
* one inline `<style>` takes the request's CSP nonce when the provider hands one over.
|
|
12
|
+
*
|
|
13
|
+
* Every string the host can supply ({@link AccessDeniedPageOptions}) is HTML-escaped on the way in.
|
|
14
|
+
* They are developer-controlled config values, not user input — but escaping them costs nothing and
|
|
15
|
+
* removes the one class of bug a "just interpolate it" template would invite.
|
|
16
|
+
*
|
|
17
|
+
* The visual language (Aviary neutrals, the console's own accent, mono eyebrow over a sans body)
|
|
18
|
+
* mirrors the telescope SPA so the refusal reads as part of the same product, not a server default.
|
|
19
|
+
*
|
|
20
|
+
* Ported from `@adonis-agora/payments` (also in `@adonis-agora/durable`, `@adonis-agora/media`, `@adonis-agora/agent` and
|
|
21
|
+
* `@adonis-agora/telescope` with only {@link CONSOLE} changed, so the Agora consoles share ONE
|
|
22
|
+
* refusal story rather than each inventing its own.
|
|
23
|
+
*/
|
|
24
|
+
/** Why the guard refused. Drives the default title/message and which buttons make sense. */
|
|
25
|
+
export type AccessDeniedReason =
|
|
26
|
+
/** Nobody is signed in (a `401`): offer the login page when one exists. */
|
|
27
|
+
'unauthenticated'
|
|
28
|
+
/** Somebody is signed in but `authorize` said no (a `403`). */
|
|
29
|
+
| 'forbidden'
|
|
30
|
+
/** `dashboardAuth` runs in Mode A only and there is no session — the host app must mint one. */
|
|
31
|
+
| 'session-required';
|
|
32
|
+
/** What the provider knows about the refusal — handed to a custom renderer and to the default page. */
|
|
33
|
+
export interface AccessDeniedInfo {
|
|
34
|
+
/** The HTTP status the page is served with. */
|
|
35
|
+
status: 401 | 403;
|
|
36
|
+
reason: AccessDeniedReason;
|
|
37
|
+
/** The console's mount path (`/telescope`; `''` when mounted at the root). */
|
|
38
|
+
basePath: string;
|
|
39
|
+
/** The built-in login page, present only when `dashboardAuth.login` is configured. */
|
|
40
|
+
loginHref?: string;
|
|
41
|
+
/** A developer-facing detail (e.g. a thrown hook's message). Providers set it OUTSIDE production only. */
|
|
42
|
+
detail?: string;
|
|
43
|
+
/** The request's CSP nonce, applied to the inline `<style>` so a nonce'd `style-src` keeps the page styled. */
|
|
44
|
+
nonce?: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Knobs for the built-in page — the `accessDenied` config option in its OBJECT form. Every field is
|
|
48
|
+
* optional; omit the option entirely for the defaults.
|
|
49
|
+
*/
|
|
50
|
+
export interface AccessDeniedPageOptions {
|
|
51
|
+
/** Console name in the eyebrow and `<title>`. Default: the console's own name (`Telescope`). */
|
|
52
|
+
brand?: string;
|
|
53
|
+
/** Heading. Default depends on {@link AccessDeniedInfo.reason}. */
|
|
54
|
+
title?: string;
|
|
55
|
+
/** The sentence under the heading. Default depends on the reason. */
|
|
56
|
+
message?: string;
|
|
57
|
+
/** Where "Back to app" points. Default `/`; `false` hides the button. */
|
|
58
|
+
homeHref?: string | false;
|
|
59
|
+
/** Label of the "Back to app" button. */
|
|
60
|
+
homeLabel?: string;
|
|
61
|
+
/** Where "Sign in" points. Default: the built-in login page when one exists; `false` hides it. */
|
|
62
|
+
loginHref?: string | false;
|
|
63
|
+
/** Label of the "Sign in" button. */
|
|
64
|
+
loginLabel?: string;
|
|
65
|
+
/** Accent colour (any CSS colour). Default: the console's own accent. */
|
|
66
|
+
accent?: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* The `accessDenied` config option in its FUNCTION form: render the page yourself. Return an HTML
|
|
70
|
+
* string and the provider serves it (with the refusal's status, `text/html`, `no-store`). Return
|
|
71
|
+
* nothing after answering the request yourself — a redirect to your own login page, most commonly —
|
|
72
|
+
* and the provider stands down. Return nothing WITHOUT answering and the default page is served, so
|
|
73
|
+
* the hook is safe to use for side effects (logging) alone.
|
|
74
|
+
*
|
|
75
|
+
* `Ctx` is the host framework's HTTP context — the provider passes AdonisJS's `HttpContext` through
|
|
76
|
+
* untouched; it is generic here so this module stays framework-light and unit-testable.
|
|
77
|
+
*/
|
|
78
|
+
export type AccessDeniedRenderer<Ctx = unknown> = (info: AccessDeniedInfo, ctx: Ctx) => string | undefined | null | void | Promise<string | undefined | null | void>;
|
|
79
|
+
/** The `accessDenied` config option: tweak the built-in page, or replace it. */
|
|
80
|
+
export type AccessDeniedOption<Ctx = unknown> = AccessDeniedPageOptions | AccessDeniedRenderer<Ctx>;
|
|
81
|
+
/** This console's identity — the ONLY thing that differs between the Agora ports of this file. */
|
|
82
|
+
export declare const CONSOLE: {
|
|
83
|
+
readonly brand: 'Telescope';
|
|
84
|
+
readonly accent: '#e879f9';
|
|
85
|
+
readonly packageName: '@adonis-agora/telescope';
|
|
86
|
+
};
|
|
87
|
+
/** Escape the five characters that matter inside HTML text and double-quoted attributes. */
|
|
88
|
+
export declare function escapeHtml(value: string): string;
|
|
89
|
+
/**
|
|
90
|
+
* Render the built-in page. Pure: same `info` + `options` in, same HTML out — so it is trivially
|
|
91
|
+
* snapshot/regex testable and safe to call from anywhere (the provider, a test, a host that wants
|
|
92
|
+
* to embed the default page inside its own layout).
|
|
93
|
+
*/
|
|
94
|
+
export declare function renderAccessDeniedPage(info: AccessDeniedInfo, options?: AccessDeniedPageOptions): string;
|
|
95
|
+
/**
|
|
96
|
+
* Resolve WHAT to serve for a refusal, honouring the host's `accessDenied` option in either form.
|
|
97
|
+
* Returns the HTML to send, or `null` when a custom renderer already answered the request itself
|
|
98
|
+
* (`answered()` reports whether it did — the provider wires that to "a `location` header or a body
|
|
99
|
+
* is already set"). Framework-light: knows nothing about the HTTP context beyond passing it through.
|
|
100
|
+
*/
|
|
101
|
+
export declare function resolveAccessDeniedPage<Ctx>(info: AccessDeniedInfo, option: AccessDeniedOption<Ctx> | null | undefined, ctx: Ctx, answered: () => boolean): Promise<string | null>;
|
|
102
|
+
//# sourceMappingURL=access_denied_page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"access_denied_page.d.ts","sourceRoot":"","sources":["../../../src/ui/access_denied_page.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,4FAA4F;AAC5F,MAAM,MAAM,kBAAkB;AAC5B,2EAA2E;AACzE,iBAAiB;AACnB,+DAA+D;GAC7D,WAAW;AACb,gGAAgG;GAC9F,kBAAkB,CAAC;AAEvB,uGAAuG;AACvG,MAAM,WAAW,gBAAgB;IAC/B,+CAA+C;IAC/C,MAAM,EAAE,GAAG,GAAG,GAAG,CAAC;IAClB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,8EAA8E;IAC9E,QAAQ,EAAE,MAAM,CAAC;IACjB,sFAAsF;IACtF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0GAA0G;IAC1G,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+GAA+G;IAC/G,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,gGAAgG;IAChG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,KAAK,CAAC,EAA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GACtB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAQxB"}
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The built-in "access denied" page a BROWSER sees when the dashboard guard refuses a page
|
|
3
|
+
* navigation — the SPA shell, its assets, or (Mode A only) a session-less visit. Before this page
|
|
4
|
+
* existed the guard answered every denial with the JSON it answers the API with
|
|
5
|
+
* (`{ "error": "forbidden" }`), which is the right thing for the SPA's `fetch` calls and the wrong
|
|
6
|
+
* thing for a human staring at a browser tab.
|
|
7
|
+
*
|
|
8
|
+
* Deliberately a small, dependency-free, hand-authored HTML page (like `login_page.ts`) — NOT part
|
|
9
|
+
* of the bundled SPA, so a denial never needs the SPA to load first. It carries NO `<script>` at all,
|
|
10
|
+
* so a host running a nonce'd `script-src` CSP (the `@adonisjs/shield` default) cannot break it; the
|
|
11
|
+
* one inline `<style>` takes the request's CSP nonce when the provider hands one over.
|
|
12
|
+
*
|
|
13
|
+
* Every string the host can supply ({@link AccessDeniedPageOptions}) is HTML-escaped on the way in.
|
|
14
|
+
* They are developer-controlled config values, not user input — but escaping them costs nothing and
|
|
15
|
+
* removes the one class of bug a "just interpolate it" template would invite.
|
|
16
|
+
*
|
|
17
|
+
* The visual language (Aviary neutrals, the console's own accent, mono eyebrow over a sans body)
|
|
18
|
+
* mirrors the telescope SPA so the refusal reads as part of the same product, not a server default.
|
|
19
|
+
*
|
|
20
|
+
* Ported from `@adonis-agora/payments` (also in `@adonis-agora/durable`, `@adonis-agora/media`, `@adonis-agora/agent` and
|
|
21
|
+
* `@adonis-agora/telescope` with only {@link CONSOLE} changed, so the Agora consoles share ONE
|
|
22
|
+
* refusal story rather than each inventing its own.
|
|
23
|
+
*/
|
|
24
|
+
/** This console's identity — the ONLY thing that differs between the Agora ports of this file. */
|
|
25
|
+
export const CONSOLE = {
|
|
26
|
+
brand: 'Telescope',
|
|
27
|
+
accent: '#e879f9',
|
|
28
|
+
packageName: '@adonis-agora/telescope',
|
|
29
|
+
};
|
|
30
|
+
const DEFAULT_COPY = {
|
|
31
|
+
unauthenticated: {
|
|
32
|
+
title: 'Sign in required',
|
|
33
|
+
message: 'You need to be signed in to open this console.',
|
|
34
|
+
},
|
|
35
|
+
forbidden: {
|
|
36
|
+
title: 'Access denied',
|
|
37
|
+
message: 'Your account is not allowed to open this console. If that looks wrong, ask an administrator to grant you access.',
|
|
38
|
+
},
|
|
39
|
+
'session-required': {
|
|
40
|
+
title: 'Open this console from your app',
|
|
41
|
+
message: 'This console only accepts a session minted by your application. Go back to the app and open the console from there.',
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
/** Escape the five characters that matter inside HTML text and double-quoted attributes. */
|
|
45
|
+
export function escapeHtml(value) {
|
|
46
|
+
return value
|
|
47
|
+
.replaceAll('&', '&')
|
|
48
|
+
.replaceAll('<', '<')
|
|
49
|
+
.replaceAll('>', '>')
|
|
50
|
+
.replaceAll('"', '"')
|
|
51
|
+
.replaceAll("'", ''');
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Accept only a same-origin, root-relative path for a button `href` — the same open-redirect rule
|
|
55
|
+
* `sanitizeReturnTo` applies to `returnTo`. A host-supplied absolute URL is still a developer's
|
|
56
|
+
* choice, so it is allowed; what is refused is anything that could smuggle a `javascript:` scheme.
|
|
57
|
+
*/
|
|
58
|
+
function safeHref(candidate) {
|
|
59
|
+
const trimmed = candidate.trim();
|
|
60
|
+
if (trimmed === '')
|
|
61
|
+
return null;
|
|
62
|
+
if (/^(https?:)?\/\//i.test(trimmed))
|
|
63
|
+
return trimmed;
|
|
64
|
+
if (trimmed.startsWith('/'))
|
|
65
|
+
return trimmed;
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
/** Only a plausible CSS colour token reaches the stylesheet; anything else falls back to the accent. */
|
|
69
|
+
function safeColor(candidate) {
|
|
70
|
+
return /^[#a-zA-Z0-9(),.%\s-]+$/.test(candidate) ? candidate : CONSOLE.accent;
|
|
71
|
+
}
|
|
72
|
+
const LOCK_ICON = '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="11" width="18" height="11" rx="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>';
|
|
73
|
+
const KEY_ICON = '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="7.5" cy="15.5" r="4.5"/><path d="m21 2-9.6 9.6"/><path d="m15.5 7.5 3 3L22 7l-3-3"/></svg>';
|
|
74
|
+
/**
|
|
75
|
+
* Render the built-in page. Pure: same `info` + `options` in, same HTML out — so it is trivially
|
|
76
|
+
* snapshot/regex testable and safe to call from anywhere (the provider, a test, a host that wants
|
|
77
|
+
* to embed the default page inside its own layout).
|
|
78
|
+
*/
|
|
79
|
+
export function renderAccessDeniedPage(info, options = {}) {
|
|
80
|
+
const copy = DEFAULT_COPY[info.reason];
|
|
81
|
+
const brand = escapeHtml(options.brand ?? CONSOLE.brand);
|
|
82
|
+
const title = escapeHtml(options.title ?? copy.title);
|
|
83
|
+
const message = escapeHtml(options.message ?? copy.message);
|
|
84
|
+
const accent = safeColor(options.accent ?? CONSOLE.accent);
|
|
85
|
+
const nonceAttr = info.nonce !== undefined ? ` nonce="${escapeHtml(info.nonce)}"` : '';
|
|
86
|
+
const loginHref = options.loginHref === false
|
|
87
|
+
? null
|
|
88
|
+
: (safeHref(options.loginHref ?? info.loginHref ?? '') ?? null);
|
|
89
|
+
const homeHref = options.homeHref === false ? null : safeHref(options.homeHref ?? '/');
|
|
90
|
+
const buttons = [];
|
|
91
|
+
if (loginHref !== null && info.reason !== 'forbidden') {
|
|
92
|
+
buttons.push(`<a class="btn primary" href="${escapeHtml(loginHref)}">${KEY_ICON}${escapeHtml(options.loginLabel ?? 'Sign in')}</a>`);
|
|
93
|
+
}
|
|
94
|
+
if (homeHref !== null) {
|
|
95
|
+
buttons.push(`<a class="btn${buttons.length === 0 ? ' primary' : ''}" href="${escapeHtml(homeHref)}">${escapeHtml(options.homeLabel ?? 'Back to app')}</a>`);
|
|
96
|
+
}
|
|
97
|
+
if (loginHref !== null && info.reason === 'forbidden') {
|
|
98
|
+
// A forbidden user might simply be the wrong user: offer a way to switch accounts, second.
|
|
99
|
+
buttons.push(`<a class="btn" href="${escapeHtml(loginHref)}">${escapeHtml(options.loginLabel ?? 'Sign in as someone else')}</a>`);
|
|
100
|
+
}
|
|
101
|
+
const detail = info.detail !== undefined && info.detail !== ''
|
|
102
|
+
? `\n <p class="detail">${escapeHtml(info.detail)}</p>`
|
|
103
|
+
: '';
|
|
104
|
+
const actions = buttons.length > 0 ? `\n <div class="actions">${buttons.join('')}</div>` : '';
|
|
105
|
+
return `<!doctype html>
|
|
106
|
+
<html lang="en">
|
|
107
|
+
<head>
|
|
108
|
+
<meta charset="utf-8" />
|
|
109
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
110
|
+
<meta name="robots" content="noindex, nofollow" />
|
|
111
|
+
<title>${title} — ${brand}</title>
|
|
112
|
+
<style${nonceAttr}>
|
|
113
|
+
:root {
|
|
114
|
+
color-scheme: dark;
|
|
115
|
+
--bg: #09090b;
|
|
116
|
+
--panel: #0c0c0f;
|
|
117
|
+
--panel-2: #101017;
|
|
118
|
+
--line: #1c1c22;
|
|
119
|
+
--text: #e7e7ea;
|
|
120
|
+
--muted: #76767f;
|
|
121
|
+
--bad: #f87171;
|
|
122
|
+
--accent: ${accent};
|
|
123
|
+
}
|
|
124
|
+
* { box-sizing: border-box; }
|
|
125
|
+
body {
|
|
126
|
+
margin: 0;
|
|
127
|
+
min-height: 100vh;
|
|
128
|
+
display: flex;
|
|
129
|
+
align-items: center;
|
|
130
|
+
justify-content: center;
|
|
131
|
+
padding: 24px;
|
|
132
|
+
background:
|
|
133
|
+
radial-gradient(900px 480px at 50% -10%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%),
|
|
134
|
+
var(--bg);
|
|
135
|
+
color: var(--text);
|
|
136
|
+
font: 15px/1.6 "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
137
|
+
-webkit-font-smoothing: antialiased;
|
|
138
|
+
}
|
|
139
|
+
.card {
|
|
140
|
+
position: relative;
|
|
141
|
+
overflow: hidden;
|
|
142
|
+
width: 100%;
|
|
143
|
+
max-width: 440px;
|
|
144
|
+
padding: 36px 32px 28px;
|
|
145
|
+
background: var(--panel);
|
|
146
|
+
border: 1px solid var(--line);
|
|
147
|
+
border-radius: 12px;
|
|
148
|
+
box-shadow: 0 30px 60px -24px rgb(0 0 0 / 0.7);
|
|
149
|
+
}
|
|
150
|
+
.card::before {
|
|
151
|
+
content: "";
|
|
152
|
+
position: absolute;
|
|
153
|
+
inset: 0 0 auto 0;
|
|
154
|
+
height: 2px;
|
|
155
|
+
background: linear-gradient(90deg, var(--accent), transparent 80%);
|
|
156
|
+
}
|
|
157
|
+
.eyebrow {
|
|
158
|
+
display: flex;
|
|
159
|
+
align-items: center;
|
|
160
|
+
gap: 10px;
|
|
161
|
+
margin: 0 0 22px;
|
|
162
|
+
font: 11px/1 "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
163
|
+
letter-spacing: 0.12em;
|
|
164
|
+
text-transform: uppercase;
|
|
165
|
+
color: var(--muted);
|
|
166
|
+
}
|
|
167
|
+
.eyebrow .brand { color: var(--accent); }
|
|
168
|
+
.eyebrow .status {
|
|
169
|
+
margin-left: auto;
|
|
170
|
+
padding: 4px 7px;
|
|
171
|
+
border: 1px solid var(--line);
|
|
172
|
+
border-radius: 4px;
|
|
173
|
+
color: var(--bad);
|
|
174
|
+
letter-spacing: 0.08em;
|
|
175
|
+
}
|
|
176
|
+
.icon {
|
|
177
|
+
display: grid;
|
|
178
|
+
place-items: center;
|
|
179
|
+
width: 40px;
|
|
180
|
+
height: 40px;
|
|
181
|
+
margin-bottom: 18px;
|
|
182
|
+
border-radius: 10px;
|
|
183
|
+
background: color-mix(in srgb, var(--accent) 12%, transparent);
|
|
184
|
+
color: var(--accent);
|
|
185
|
+
}
|
|
186
|
+
h1 {
|
|
187
|
+
margin: 0 0 8px;
|
|
188
|
+
font-size: 22px;
|
|
189
|
+
font-weight: 600;
|
|
190
|
+
letter-spacing: -0.01em;
|
|
191
|
+
}
|
|
192
|
+
p { margin: 0; color: var(--muted); }
|
|
193
|
+
.detail {
|
|
194
|
+
margin-top: 14px;
|
|
195
|
+
padding: 10px 12px;
|
|
196
|
+
border: 1px solid var(--line);
|
|
197
|
+
border-radius: 6px;
|
|
198
|
+
background: var(--panel-2);
|
|
199
|
+
font: 12px/1.5 "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
200
|
+
color: var(--text);
|
|
201
|
+
overflow-wrap: anywhere;
|
|
202
|
+
}
|
|
203
|
+
.actions {
|
|
204
|
+
display: flex;
|
|
205
|
+
flex-wrap: wrap;
|
|
206
|
+
gap: 10px;
|
|
207
|
+
margin-top: 26px;
|
|
208
|
+
}
|
|
209
|
+
.btn {
|
|
210
|
+
display: inline-flex;
|
|
211
|
+
align-items: center;
|
|
212
|
+
gap: 8px;
|
|
213
|
+
padding: 9px 14px;
|
|
214
|
+
border: 1px solid var(--line);
|
|
215
|
+
border-radius: 6px;
|
|
216
|
+
background: var(--panel-2);
|
|
217
|
+
color: var(--text);
|
|
218
|
+
font-size: 13px;
|
|
219
|
+
font-weight: 500;
|
|
220
|
+
text-decoration: none;
|
|
221
|
+
}
|
|
222
|
+
.btn:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
|
|
223
|
+
.btn.primary {
|
|
224
|
+
background: color-mix(in srgb, var(--accent) 14%, transparent);
|
|
225
|
+
border-color: color-mix(in srgb, var(--accent) 45%, transparent);
|
|
226
|
+
color: var(--accent);
|
|
227
|
+
}
|
|
228
|
+
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
|
|
229
|
+
.foot {
|
|
230
|
+
margin-top: 26px;
|
|
231
|
+
font: 11px/1 "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
232
|
+
letter-spacing: 0.04em;
|
|
233
|
+
color: var(--muted);
|
|
234
|
+
opacity: 0.7;
|
|
235
|
+
}
|
|
236
|
+
</style>
|
|
237
|
+
</head>
|
|
238
|
+
<body>
|
|
239
|
+
<main class="card">
|
|
240
|
+
<p class="eyebrow"><span class="brand">${brand}</span><span>console</span><span class="status">${info.status}</span></p>
|
|
241
|
+
<div class="icon" aria-hidden="true">${info.reason === 'forbidden' ? LOCK_ICON : KEY_ICON}</div>
|
|
242
|
+
<h1>${title}</h1>
|
|
243
|
+
<p>${message}</p>${detail}${actions}
|
|
244
|
+
<p class="foot">${escapeHtml(CONSOLE.packageName)}</p>
|
|
245
|
+
</main>
|
|
246
|
+
</body>
|
|
247
|
+
</html>`;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Resolve WHAT to serve for a refusal, honouring the host's `accessDenied` option in either form.
|
|
251
|
+
* Returns the HTML to send, or `null` when a custom renderer already answered the request itself
|
|
252
|
+
* (`answered()` reports whether it did — the provider wires that to "a `location` header or a body
|
|
253
|
+
* is already set"). Framework-light: knows nothing about the HTTP context beyond passing it through.
|
|
254
|
+
*/
|
|
255
|
+
export async function resolveAccessDeniedPage(info, option, ctx, answered) {
|
|
256
|
+
if (typeof option === 'function') {
|
|
257
|
+
const rendered = await option(info, ctx);
|
|
258
|
+
if (typeof rendered === 'string')
|
|
259
|
+
return rendered;
|
|
260
|
+
if (answered())
|
|
261
|
+
return null;
|
|
262
|
+
return renderAccessDeniedPage(info);
|
|
263
|
+
}
|
|
264
|
+
return renderAccessDeniedPage(info, option ?? {});
|
|
265
|
+
}
|
|
266
|
+
//# sourceMappingURL=access_denied_page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"access_denied_page.js","sourceRoot":"","sources":["../../../src/ui/access_denied_page.ts"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;;;;;;;;6CAsHuB,KAAK,mDAAmD,IAAI,CAAC,MAAM;2CACrE,IAAI,CAAC,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ;UACnF,KAAK;SACN,OAAO,OAAO,MAAM,GAAG,OAAO;sBACjB,UAAU,CAAC,OAAO,CAAC,WAAW,CAAC;;;QAG7C,CAAC;AACT,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,IAAsB,EACtB,MAAkD,EAClD,GAAQ,EACR,QAAuB;IAEvB,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE,CAAC;QACjC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QACzC,IAAI,OAAO,QAAQ,KAAK,QAAQ;YAAE,OAAO,QAAQ,CAAC;QAClD,IAAI,QAAQ,EAAE;YAAE,OAAO,IAAI,CAAC;QAC5B,OAAO,sBAAsB,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IACD,OAAO,sBAAsB,CAAC,IAAI,EAAE,MAAM,IAAI,EAAE,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -1,5 +1,17 @@
|
|
|
1
|
+
import type { AccessDeniedOption as GenericAccessDeniedOption, AccessDeniedRenderer as GenericAccessDeniedRenderer } from './access_denied_page.js';
|
|
1
2
|
import { type DashboardAuthOptions, type ResolvedDashboardAuth } from './auth.js';
|
|
2
3
|
import type { UiHttpContext } from './http.js';
|
|
4
|
+
/**
|
|
5
|
+
* The function form of {@link TelescopeUiConfig.accessDenied}: render (or answer) a refused page
|
|
6
|
+
* navigation yourself. Receives the refusal ({@link AccessDeniedInfo}) and the (framework-light)
|
|
7
|
+
* HTTP context — the real AdonisJS `HttpContext` at runtime, cast down like the `authorize` hook's.
|
|
8
|
+
* Return an HTML string to have it served; answer the request yourself (a redirect, most commonly)
|
|
9
|
+
* and return nothing to make the guard stand down; return nothing WITHOUT answering and the
|
|
10
|
+
* built-in page is served.
|
|
11
|
+
*/
|
|
12
|
+
export type AccessDeniedRenderer = GenericAccessDeniedRenderer<UiHttpContext>;
|
|
13
|
+
/** `accessDenied` in either form — an options object for the built-in page, or a renderer. */
|
|
14
|
+
export type AccessDeniedOption = GenericAccessDeniedOption<UiHttpContext>;
|
|
3
15
|
/**
|
|
4
16
|
* The decision hook gating the dashboard + JSON API. Return `true` to allow the
|
|
5
17
|
* request through, `false` to reject it (the guard answers 401/403). It receives
|
|
@@ -65,6 +77,19 @@ export interface TelescopeUiConfig {
|
|
|
65
77
|
* guard). Missing `secret`/`login` fails closed at boot.
|
|
66
78
|
*/
|
|
67
79
|
dashboardAuth?: DashboardAuthOptions;
|
|
80
|
+
/**
|
|
81
|
+
* What a BROWSER sees when the guard refuses a page navigation — the `@adonis-agora/telescope-ui`
|
|
82
|
+
* SPA shell or its assets. API requests are unaffected: they keep getting the JSON the SPA relies
|
|
83
|
+
* on (`401`/`403 { error }`).
|
|
84
|
+
*
|
|
85
|
+
* Omit it for the built-in page — a dark card in the console's own visual language, with the
|
|
86
|
+
* status, a sentence explaining the refusal, a "Back to app" link and, when `dashboardAuth` is
|
|
87
|
+
* configured, a "Sign in" button. Pass an object to tweak that page (`brand`, `title`, `message`,
|
|
88
|
+
* `homeHref`, `loginHref`, `accent`, …), or a function to render/answer it yourself — see
|
|
89
|
+
* {@link AccessDeniedRenderer}. Either way, an `authorize` hook that already wrote a redirect
|
|
90
|
+
* still wins: the guard never overwrites a `location` header.
|
|
91
|
+
*/
|
|
92
|
+
accessDenied?: AccessDeniedOption;
|
|
68
93
|
/**
|
|
69
94
|
* Request REPLAY: re-issue a captured `request` entry against the LOCAL server
|
|
70
95
|
* from the dashboard. DISABLED BY DEFAULT — replaying re-runs a real request
|
|
@@ -114,6 +139,8 @@ export interface ResolvedTelescopeUiConfig {
|
|
|
114
139
|
credentials: UiCredentials;
|
|
115
140
|
/** Resolved built-in login config, or `null` when `dashboardAuth` is unconfigured. */
|
|
116
141
|
dashboardAuth: ResolvedDashboardAuth | null;
|
|
142
|
+
/** The host's `accessDenied` option as given, or `null` for the built-in page with defaults. */
|
|
143
|
+
accessDenied: AccessDeniedOption | null;
|
|
117
144
|
/** Resolved request-replay settings (disabled by default). */
|
|
118
145
|
replay: {
|
|
119
146
|
enabled: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define_config.d.ts","sourceRoot":"","sources":["../../../src/ui/define_config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAE3B,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,aAAa,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAE/E;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,KAAK,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;CAChD;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B;;;OAGG;IACH,WAAW,CAAC,EAAE,aAAa,CAAC;IAE5B;;;;;;;;;;OAUG;IACH,aAAa,CAAC,EAAE,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"define_config.d.ts","sourceRoot":"","sources":["../../../src/ui/define_config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,IAAI,yBAAyB,EAC/C,oBAAoB,IAAI,2BAA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secret/login fails closed at boot, not on the first
|
|
104
104
|
// login attempt. `null` when `dashboardAuth` is omitted (behavior unchanged).
|
|
105
105
|
dashboardAuth: resolveDashboardAuth(config.dashboardAuth),
|
|
106
|
+
accessDenied: config.accessDenied ?? null,
|
|
106
107
|
replay: {
|
|
107
108
|
// Safe default: replay is OFF unless the host explicitly enables it.
|
|
108
109
|
enabled: config.replay?.enabled ?? false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define_config.js","sourceRoot":"","sources":["../../../src/ui/define_config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"define_config.js","sourceRoot":"","sources":["../../../src/ui/define_config.ts"],"names":[],"mappings":"AAIA,OAAO,EAGL,oBAAoB,GACrB,MAAM,WAAW,CAAC;AA8JnB;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAAC,MAAyB;IACpD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IACpB,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,GAAG;QAAE,OAAO,YAAY,CAAC;IAC/C,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;IACpC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC3D,OAAO,CAAC,CAAC;AACX,CAAC;AAED,4DAA4D;AAC5D,SAAS,YAAY;IACnB,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,CAAC;AAC/C,CAAC;AAED;;;;GAIG;AACH,SAAS,SAAS,CAAC,CAAS,EAAE,CAAS;IACrC,IAAI,C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U,aAAa,CAAC,MAAM,GAAsB,EAAE;IAC1D,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,IAAI,EAAE,CAAC;IAC7C,OAAO;QACL,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,IAAI;QAC/B,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,IAAI,IAAI,YAAY,CAAC;QAChD,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,gBAAgB,CAAC,WAAW,CAAC;QAC5D,WAAW;QACX,gGAAgG;QAChG,8EAA8E;QAC9E,aAAa,EAAE,oBAAoB,CAAC,MAAM,CAAC,aAAa,CAAC;QACzD,YAAY,EAAE,MAAM,CAAC,YAAY,IAAI,IAAI;QACzC,MAAM,EAAE;YACN,qEAAqE;YACrE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,IAAI,KAAK;YACxC,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC1E,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC1F;QACD,YAAY,EAAE;YACZ,qEAAqE;YACrE,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,UAAU,IAAI,KAAK;SACrD;QACD,YAAY,EAAE;YACZ,iFAAiF;YACjF,OAAO,EAAE,MAAM,CAAC,YAAY,EAAE,OAAO,IAAI,KAAK;SAC/C;KACF,CAAC;AACJ,CAAC"}
|
package/dist/src/ui/guard.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type AccessDeniedOption } from './access_denied_page.js';
|
|
1
2
|
import type { AuthorizeHook } from './define_config.js';
|
|
2
3
|
import type { UiHttpContext } from './http.js';
|
|
3
4
|
/** The outcome of an authorization check. */
|
|
@@ -37,4 +38,32 @@ export declare function runGuard(ctx: UiHttpContext, authorize: AuthorizeHook):
|
|
|
37
38
|
* separate hook.
|
|
38
39
|
*/
|
|
39
40
|
export declare function enforceGuard(ctx: UiHttpContext, authorize: AuthorizeHook): Promise<boolean>;
|
|
41
|
+
/** What {@link enforcePageGuard} needs to serve (or delegate) the access-denied page. */
|
|
42
|
+
export interface PageGuardOptions {
|
|
43
|
+
/** The console's mount (`/telescope`) — reported to a custom renderer as `basePath`. */
|
|
44
|
+
basePath: string;
|
|
45
|
+
/** The built-in login page (`<path>/login`), present only when `dashboardAuth` is configured. */
|
|
46
|
+
loginHref?: string;
|
|
47
|
+
/** The host's `telescope_ui.accessDenied` option — tweak the built-in page, or render it. */
|
|
48
|
+
accessDenied?: AccessDeniedOption<UiHttpContext> | null;
|
|
49
|
+
/** The request's CSP nonce, applied to the page's inline `<style>`. */
|
|
50
|
+
nonce?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Send the `WWW-Authenticate: Basic …` challenge on a `401`. Default `true` (what the JSON guard
|
|
53
|
+
* always did). Browsers answer that header with a native username/password prompt, which only
|
|
54
|
+
* makes sense when the built-in `basic` credentials are configured — for a host gating on its own
|
|
55
|
+
* `authorize` hook the prompt is noise over the page, so the SPA provider passes `false` then.
|
|
56
|
+
*/
|
|
57
|
+
challenge?: boolean;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* {@link enforceGuard} for a PAGE navigation — the `@adonis-agora/telescope-ui` SPA shell and its
|
|
61
|
+
* assets. Same decision ({@link runGuard}), same statuses, same "a redirect the hook wrote wins"
|
|
62
|
+
* rule; what differs is the body: a browser gets the built-in access-denied page (or the host's
|
|
63
|
+
* `accessDenied` customisation of it) instead of the `{ error }` JSON the API answers with. The
|
|
64
|
+
* `WWW-Authenticate` challenge still rides on a `401` unless `challenge: false`, so the built-in
|
|
65
|
+
* `basic` credentials keep prompting natively in a browser — the page is what shows if the prompt
|
|
66
|
+
* is dismissed.
|
|
67
|
+
*/
|
|
68
|
+
export declare function enforcePageGuard(ctx: UiHttpContext, authorize: AuthorizeHook, options: PageGuardOptions): Promise<boolean>;
|
|
40
69
|
//# sourceMappingURL=guard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guard.d.ts","sourceRoot":"","sources":["../../../src/ui/guard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,6CAA6C;AAC7C,MAAM,WAAW,WAAW;IAC1B,sDAAsD;IACtD,OAAO,EAAE,OAAO,CAAC;IACjB,+EAA+E;IAC/E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,QAAQ,CAAC,GAAG,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,GAAG,OAAO,CAAC,WAAW,CAAC,CAejG;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,YAAY,CAAC,GAAG,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,CAWjG"}
|
|
1
|
+
{"version":3,"file":"guard.d.ts","sourceRoot":"","sources":["../../../src/ui/guard.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EAExB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,6CAA6C;AAC7C,MAAM,WAAW,WAAW;IAC1B,sDAAsD;IACtD,OAAO,EAAE,OAAO,CAAC;IACjB,+EAA+E;IAC/E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,QAAQ,CAAC,GAAG,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,GAAG,OAAO,CAAC,WAAW,CAAC,CAejG;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,YAAY,CAAC,GAAG,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,CAWjG;AAED,yFAAyF;AACzF,MAAM,WAAW,gBAAgB;IAC/B,wFAAwF;IACxF,QAAQ,EAAE,MAAM,CAAC;IACjB,iGAAiG;IACjG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6FAA6F;IAC7F,YAAY,CAAC,EAAE,kBAAkB,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC;IACxD,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,aAAa,EAClB,SAAS,EAAE,aAAa,EACxB,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,OAAO,CAAC,CAyBlB"}
|
package/dist/src/ui/guard.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { resolveAccessDeniedPage, } from './access_denied_page.js';
|
|
1
2
|
/**
|
|
2
3
|
* Run the configured {@link AuthorizeHook} against a request and translate the
|
|
3
4
|
* decision into a {@link GuardResult}. Framework-light: takes the same minimal
|
|
@@ -53,4 +54,52 @@ export async function enforceGuard(ctx, authorize) {
|
|
|
53
54
|
ctx.response.send({ error: result.message ?? 'Forbidden' });
|
|
54
55
|
return false;
|
|
55
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* {@link enforceGuard} for a PAGE navigation — the `@adonis-agora/telescope-ui` SPA shell and its
|
|
59
|
+
* assets. Same decision ({@link runGuard}), same statuses, same "a redirect the hook wrote wins"
|
|
60
|
+
* rule; what differs is the body: a browser gets the built-in access-denied page (or the host's
|
|
61
|
+
* `accessDenied` customisation of it) instead of the `{ error }` JSON the API answers with. The
|
|
62
|
+
* `WWW-Authenticate` challenge still rides on a `401` unless `challenge: false`, so the built-in
|
|
63
|
+
* `basic` credentials keep prompting natively in a browser — the page is what shows if the prompt
|
|
64
|
+
* is dismissed.
|
|
65
|
+
*/
|
|
66
|
+
export async function enforcePageGuard(ctx, authorize, options) {
|
|
67
|
+
const result = await runGuard(ctx, authorize);
|
|
68
|
+
if (result.allowed)
|
|
69
|
+
return true;
|
|
70
|
+
const answered = () => responseAnswered(ctx);
|
|
71
|
+
if (answered())
|
|
72
|
+
return false;
|
|
73
|
+
const status = result.status === 401 ? 401 : 403;
|
|
74
|
+
const info = {
|
|
75
|
+
status,
|
|
76
|
+
reason: status === 401 ? 'unauthenticated' : 'forbidden',
|
|
77
|
+
basePath: options.basePath,
|
|
78
|
+
...(options.loginHref !== undefined ? { loginHref: options.loginHref } : {}),
|
|
79
|
+
...(options.nonce !== undefined ? { nonce: options.nonce } : {}),
|
|
80
|
+
};
|
|
81
|
+
const html = await resolveAccessDeniedPage(info, options.accessDenied, ctx, answered);
|
|
82
|
+
if (html === null)
|
|
83
|
+
return false;
|
|
84
|
+
ctx.response.status(status);
|
|
85
|
+
if (status === 401 && options.challenge !== false) {
|
|
86
|
+
ctx.response.header('WWW-Authenticate', 'Basic realm="Telescope", Bearer');
|
|
87
|
+
}
|
|
88
|
+
ctx.response.header('content-type', 'text/html; charset=utf-8');
|
|
89
|
+
ctx.response.header('cache-control', 'no-store, must-revalidate');
|
|
90
|
+
ctx.response.send(html);
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Whether something already answered this request: a redirect (`location` header — the signal the
|
|
95
|
+
* `authorize` contract has always honoured) or a body already queued. The body check reads
|
|
96
|
+
* AdonisJS's `response.hasLazyBody` (and {@link RecordingResponse}'s `sent`) structurally, so the
|
|
97
|
+
* framework-light context stays framework-light.
|
|
98
|
+
*/
|
|
99
|
+
function responseAnswered(ctx) {
|
|
100
|
+
if (ctx.response.getHeader('location'))
|
|
101
|
+
return true;
|
|
102
|
+
const response = ctx.response;
|
|
103
|
+
return response.hasLazyBody === true || response.headersSent === true || response.sent === true;
|
|
104
|
+
}
|
|
56
105
|
//# sourceMappingURL=guard.js.map
|
package/dist/src/ui/guard.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guard.js","sourceRoot":"","sources":["../../../src/ui/guard.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"guard.js","sourceRoot":"","sources":["../../../src/ui/guard.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,uBAAuB,GACxB,MAAM,yBAAyB,CAAC;AAcjC;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,GAAkB,EAAE,SAAwB;IACzE,IAAI,OAAgB,CAAC;IACrB,IAAI,CAAC;QACH,OAAO,GAAG,MAAM,SAAS,CAAC,GAAG,CAAC,CAAC;IACjC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;IAC/D,CAAC;IACD,IAAI,OAAO;QAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAEtC,MAAM,mBAAmB,GACvB,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,KAAK,SAAS,IAAI,OAAO,GAAG,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,KAAK,KAAK,QAAQ,CAAC;IAElG,OAAO,mBAAmB;QACxB,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,WAAW,EAAE;QACvD,CAAC,CAAC,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U,CAAC;QAAE,OAAO,IAAI,CAAC;IACpD,MAAM,QAAQ,GAAG,GAAG,CAAC,QAIpB,CAAC;IACF,OAAO,QAAQ,CAAC,WAAW,KAAK,IAAI,IAAI,QAAQ,CAAC,WAAW,KAAK,IAAI,IAAI,QAAQ,CAAC,IAAI,KAAK,IAAI,CAAC;AAClG,CAAC"}
|
package/dist/src/ui/index.d.ts
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
/** Keep in sync with this package's `version` in package.json. */
|
|
2
|
-
export declare const VERSION = "0.
|
|
2
|
+
export declare const VERSION = "0.11.0";
|
|
3
|
+
export type { AccessDeniedInfo, AccessDeniedPageOptions, AccessDeniedReason, } from './access_denied_page.js';
|
|
4
|
+
export { CONSOLE as ACCESS_DENIED_CONSOLE, escapeHtml, renderAccessDeniedPage, resolveAccessDeniedPage, } from './access_denied_page.js';
|
|
3
5
|
export type { EntrySummary, RetentionInfo, RetentionOptions, RetentionPruneOptions, RetentionSamplingRate, } from './api.js';
|
|
4
6
|
export { buildQuery, TelescopeApi, toSummary } from './api.js';
|
|
5
7
|
export type { DashboardAuthDecision, DashboardAuthOptions, LoginHook, LoginOutcome, ResolvedDashboardAuth, } from './auth.js';
|
|
6
8
|
export { decideDashboardAuth, performLogin, readSession, resolveDashboardAuth, SESSION_COOKIE_NAME, sanitizeReturnTo, } from './auth.js';
|
|
7
9
|
export { clearSessionCookie, enforceDashboardAuth, readSessionCookie, writeSessionCookie, } from './dashboard_auth.js';
|
|
8
|
-
export type { AuthorizeHook, ReplayConfig, ResolvedTelescopeUiConfig, TelescopeUiConfig, UiCredentials, } from './define_config.js';
|
|
10
|
+
export type { AccessDeniedOption, AccessDeniedRenderer, AuthorizeHook, ReplayConfig, ResolvedTelescopeUiConfig, TelescopeUiConfig, UiCredentials, } from './define_config.js';
|
|
9
11
|
export { defaultAuthorize, defineConfig, normalizePath, resolveConfig } from './define_config.js';
|
|
10
12
|
export type { PagedTableData, TablePagination } from './ext_table.js';
|
|
11
13
|
export { fillLinkHref, tablePagination } from './ext_table.js';
|
|
12
|
-
export type { GuardResult } from './guard.js';
|
|
13
|
-
export { enforceGuard, runGuard } from './guard.js';
|
|
14
|
+
export type { GuardResult, PageGuardOptions } from './guard.js';
|
|
15
|
+
export { enforceGuard, enforcePageGuard, runGuard } from './guard.js';
|
|
14
16
|
export type { SseSink, UiHttpContext, UiRequest, UiResponse } from './http.js';
|
|
15
17
|
export { formatSseFrame, formatSseHeartbeat, makeRequest, RecordingResponse, RecordingSink, } from './http.js';
|
|
16
18
|
export { renderLoginPage } from './login_page.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/index.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,eAAO,MAAM,OAAO,WAAW,CAAC;AAEhC,YAAY,EACV,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC/D,YAAY,EACV,qBAAqB,EACrB,oBAAoB,EACpB,SAAS,EACT,YAAY,EACZ,qBAAqB,GACtB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,WAAW,EACX,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,aAAa,EACb,YAAY,EACZ,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,GACd,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAClG,YAAY,EAAE,cAAc,EAAE,eAAe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tE,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC/D,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEhE,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE/E,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,iBAAiB,EACjB,aAAa,GACd,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGxD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG1D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAExF,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,iBAAiB,EACjB,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EACV,gBAAgB,EAChB,oBAAoB,EACpB,WAAW,EACX,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC"}
|
package/dist/src/ui/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/** Keep in sync with this package's `version` in package.json. */
|
|
2
|
-
export const VERSION = '0.
|
|
2
|
+
export const VERSION = '0.11.0';
|
|
3
|
+
// — the built-in "access denied" page (what a browser sees on a refused page navigation) —
|
|
4
|
+
export { CONSOLE as ACCESS_DENIED_CONSOLE, escapeHtml, renderAccessDeniedPage, resolveAccessDeniedPage, } from './access_denied_page.js';
|
|
3
5
|
// — JSON API —
|
|
4
6
|
export { buildQuery, TelescopeApi, toSummary } from './api.js';
|
|
5
7
|
// — built-in `dashboardAuth` login screen (optional; opt-in via `config/telescope_ui.ts`) —
|
|
@@ -11,7 +13,7 @@ export { defaultAuthorize, defineConfig, normalizePath, resolveConfig } from './
|
|
|
11
13
|
// — paged extension-dashboard tables —
|
|
12
14
|
export { fillLinkHref, tablePagination } from './ext_table.js';
|
|
13
15
|
// — auth guard —
|
|
14
|
-
export { enforceGuard, runGuard } from './guard.js';
|
|
16
|
+
export { enforceGuard, enforcePageGuard, runGuard } from './guard.js';
|
|
15
17
|
// — HTTP shapes (framework-light) —
|
|
16
18
|
export { formatSseFrame, formatSseHeartbeat, makeRequest, RecordingResponse, RecordingSink, } from './http.js';
|
|
17
19
|
export { renderLoginPage } from './login_page.js';
|
package/dist/src/ui/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/index.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/index.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAOhC,2FAA2F;AAC3F,OAAO,EACL,OAAO,IAAI,qBAAqB,EAChC,UAAU,EACV,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,yBAAyB,CAAC;AAQjC,eAAe;AACf,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAQ/D,4FAA4F;AAC5F,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,WAAW,EACX,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,WAAW,CAAC;AACnB,qBAAqB;AACrB,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAU7B,aAAa;AACb,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAElG,uCAAuC;AACvC,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE/D,iBAAiB;AACjB,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtE,oCAAoC;AACpC,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,iBAAiB,EACjB,aAAa,GACd,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGlD,uFAAuF;AACvF,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,mEAAmE;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,qBAAqB;AACrB,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,iBAAiB,EACjB,aAAa,GACd,MAAM,qBAAqB,CAAC;AAE7B,+DAA+D;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAOlD,OAAO,EACL,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,23 +1,36 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The built-in `dashboardAuth` login page (`GET <basePath>/login`). Deliberately a small,
|
|
3
|
-
* dependency-free, hand-authored HTML page — NOT part of the bundled
|
|
4
|
-
* dashboard shell doesn't require rebuilding or extending the bundled
|
|
3
|
+
* dependency-free, hand-authored HTML page — NOT part of the bundled Vite app — so gating the
|
|
4
|
+
* dashboard shell doesn't require rebuilding or extending the bundled SPA.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
6
|
+
* It works WITHOUT JavaScript: the markup is a classic `<form method="post">` carrying `returnTo`
|
|
7
|
+
* in a hidden field, and the provider answers a form-encoded `POST` with a redirect (to `returnTo`
|
|
8
|
+
* on success, back here with `?error` on failure). The inline `<script>` is progressive
|
|
9
|
+
* enhancement only — it swaps the full-page round trip for a JSON `fetch` and shows the error in
|
|
10
|
+
* place — and it carries the request's CSP nonce when the provider hands one over, so a host
|
|
11
|
+
* running `@adonisjs/shield`'s `script-src 'self' @nonce` keeps the enhancement instead of a
|
|
12
|
+
* dead form. The `<style>` takes the same nonce.
|
|
13
|
+
*
|
|
14
|
+
* The only per-request values interpolated are `returnTo` (already passed through
|
|
15
|
+
* {@link sanitizeReturnTo}, so it is a root-relative path) and the `error` flag; both go through
|
|
16
|
+
* {@link escapeHtml} (and `JSON.stringify` inside the script) so nothing in the query string can
|
|
17
|
+
* break out of an attribute or the script. `basePath` is developer-controlled config.
|
|
11
18
|
*
|
|
12
19
|
* The visual language (dark zinc card, mono type, emerald accent) mirrors the Agora consoles so
|
|
13
|
-
* they feel like one family.
|
|
14
|
-
* `redirectTo` it gets back (rather than a classic form POST + server redirect), which is why the
|
|
15
|
-
* markup keeps its own `<script>`.
|
|
20
|
+
* they feel like one family.
|
|
16
21
|
*
|
|
17
22
|
* The password input has NO `required` attribute and the value is forwarded AS-IS (empty string
|
|
18
23
|
* when blank): the host's `login` hook — not this page — decides whether a password matters, so an
|
|
19
24
|
* email-only host (gate on username, ignore password) works with the same page as a host with real
|
|
20
25
|
* passwords.
|
|
21
26
|
*/
|
|
22
|
-
export
|
|
27
|
+
export interface LoginPageOptions {
|
|
28
|
+
/** The request's CSP nonce, applied to the inline `<style>` and `<script>`. */
|
|
29
|
+
nonce?: string;
|
|
30
|
+
/** Render the "Invalid username or password." notice (the no-JS failure round trip). */
|
|
31
|
+
error?: boolean;
|
|
32
|
+
/** Where to send the operator after a successful sign-in. Sanitized here; default `basePath`. */
|
|
33
|
+
returnTo?: unknown;
|
|
34
|
+
}
|
|
35
|
+
export declare function renderLoginPage(basePath: string, options?: LoginPageOptions): string;
|
|
23
36
|
//# sourceMappingURL=login_page.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login_page.d.ts","sourceRoot":"","sources":["../../../src/ui/login_page.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"login_page.d.ts","sourceRoot":"","sources":["../../../src/ui/login_page.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,WAAW,gBAAgB;IAC/B,+EAA+E;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wFAAwF;IACxF,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,iGAAiG;IACjG,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAkBD,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB,GAAG,MAAM,CA2IxF"}
|
|
@@ -1,27 +1,26 @@
|
|
|
1
|
+
import { escapeHtml } from './access_denied_page.js';
|
|
2
|
+
import { sanitizeReturnTo } from './auth.js';
|
|
1
3
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* `
|
|
7
|
-
* into the HTML), so this function's only per-request-ish input is `basePath` — a developer-
|
|
8
|
-
* controlled config value, not user input — and the page body is otherwise a static template.
|
|
9
|
-
* This sidesteps HTML-escaping entirely: there is no reflected query-param interpolation surface
|
|
10
|
-
* to get wrong.
|
|
11
|
-
*
|
|
12
|
-
* The visual language (dark zinc card, mono type, emerald accent) mirrors the Agora consoles so
|
|
13
|
-
* they feel like one family. The submit flow POSTs JSON via `fetch` and follows the JSON
|
|
14
|
-
* `redirectTo` it gets back (rather than a classic form POST + server redirect), which is why the
|
|
15
|
-
* markup keeps its own `<script>`.
|
|
16
|
-
*
|
|
17
|
-
* The password input has NO `required` attribute and the value is forwarded AS-IS (empty string
|
|
18
|
-
* when blank): the host's `login` hook — not this page — decides whether a password matters, so an
|
|
19
|
-
* email-only host (gate on username, ignore password) works with the same page as a host with real
|
|
20
|
-
* passwords.
|
|
4
|
+
* JSON for embedding INSIDE an inline `<script>`: `JSON.stringify` alone leaves `</script>` (and
|
|
5
|
+
* `<!--`) untouched, and the HTML parser ends the script element on the first `</script>` it sees
|
|
6
|
+
* regardless of JavaScript string boundaries — so a `returnTo` of `/x</script><script>…` would run.
|
|
7
|
+
* Escaping the angle brackets (and `&`, plus the two line terminators JSON allows but JS doesn't)
|
|
8
|
+
* as `\uXXXX` keeps the value byte-identical once parsed and inert to the HTML parser.
|
|
21
9
|
*/
|
|
22
|
-
|
|
10
|
+
function jsonForScript(value) {
|
|
11
|
+
return JSON.stringify(value)
|
|
12
|
+
.replaceAll('<', '\\u003c')
|
|
13
|
+
.replaceAll('>', '\\u003e')
|
|
14
|
+
.replaceAll('&', '\\u0026')
|
|
15
|
+
.replaceAll('\u2028', '\\u2028')
|
|
16
|
+
.replaceAll('\u2029', '\\u2029');
|
|
17
|
+
}
|
|
18
|
+
export function renderLoginPage(basePath, options = {}) {
|
|
23
19
|
const loginAction = `${basePath}/login`;
|
|
24
20
|
const defaultReturnTo = basePath === '' ? '/' : basePath;
|
|
21
|
+
const returnTo = sanitizeReturnTo(options.returnTo, defaultReturnTo);
|
|
22
|
+
const nonceAttr = options.nonce !== undefined ? ` nonce="${escapeHtml(options.nonce)}"` : '';
|
|
23
|
+
const errorStyle = options.error ? ' style="display:block"' : '';
|
|
25
24
|
return `<!doctype html>
|
|
26
25
|
<html lang="en">
|
|
27
26
|
<head>
|
|
@@ -29,7 +28,7 @@ export function renderLoginPage(basePath) {
|
|
|
29
28
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
30
29
|
<meta name="robots" content="noindex, nofollow" />
|
|
31
30
|
<title>Sign in — Telescope</title>
|
|
32
|
-
<style>
|
|
31
|
+
<style${nonceAttr}>
|
|
33
32
|
:root { color-scheme: dark; }
|
|
34
33
|
* { box-sizing: border-box; }
|
|
35
34
|
body {
|
|
@@ -104,7 +103,8 @@ export function renderLoginPage(basePath) {
|
|
|
104
103
|
<body>
|
|
105
104
|
<div class="card">
|
|
106
105
|
<p class="brand">Telescope</p>
|
|
107
|
-
<form id="login-form" autocomplete="on">
|
|
106
|
+
<form id="login-form" method="post" action="${escapeHtml(loginAction)}" autocomplete="on">
|
|
107
|
+
<input type="hidden" name="returnTo" value="${escapeHtml(returnTo)}" />
|
|
108
108
|
<label>
|
|
109
109
|
<span class="field-label">Username</span>
|
|
110
110
|
<input id="username" name="username" type="text" autocomplete="username" required autofocus />
|
|
@@ -113,41 +113,29 @@ export function renderLoginPage(basePath) {
|
|
|
113
113
|
<span class="field-label">Password</span>
|
|
114
114
|
<input id="password" name="password" type="password" autocomplete="current-password" />
|
|
115
115
|
</label>
|
|
116
|
-
<p id="error" role="alert">Invalid username or password.</p>
|
|
116
|
+
<p id="error" role="alert"${errorStyle}>Invalid username or password.</p>
|
|
117
117
|
<button id="submit" type="submit">Sign in</button>
|
|
118
118
|
</form>
|
|
119
119
|
</div>
|
|
120
|
-
<script>
|
|
120
|
+
<script${nonceAttr}>
|
|
121
121
|
(function () {
|
|
122
|
-
var LOGIN_ACTION = ${
|
|
123
|
-
var
|
|
124
|
-
var params = new URLSearchParams(window.location.search);
|
|
122
|
+
var LOGIN_ACTION = ${jsonForScript(loginAction)};
|
|
123
|
+
var RETURN_TO = ${jsonForScript(returnTo)};
|
|
125
124
|
var errorBox = document.getElementById('error');
|
|
126
|
-
if (params.get('error')) errorBox.style.display = 'block';
|
|
127
|
-
|
|
128
|
-
function sameOriginReturnTo(value) {
|
|
129
|
-
if (typeof value !== 'string' || value === '') return DEFAULT_RETURN_TO;
|
|
130
|
-
if (value.charAt(0) !== '/' || value.charAt(1) === '/' || value.indexOf('://') !== -1) {
|
|
131
|
-
return DEFAULT_RETURN_TO;
|
|
132
|
-
}
|
|
133
|
-
return value;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
125
|
var form = document.getElementById('login-form');
|
|
137
126
|
var submitButton = document.getElementById('submit');
|
|
138
127
|
form.addEventListener('submit', function (event) {
|
|
139
128
|
event.preventDefault();
|
|
140
129
|
submitButton.disabled = true;
|
|
141
130
|
errorBox.style.display = 'none';
|
|
142
|
-
var returnTo = sameOriginReturnTo(params.get('returnTo'));
|
|
143
131
|
fetch(LOGIN_ACTION, {
|
|
144
132
|
method: 'POST',
|
|
145
|
-
headers: { 'content-type': 'application/json' },
|
|
133
|
+
headers: { 'content-type': 'application/json', accept: 'application/json' },
|
|
146
134
|
credentials: 'same-origin',
|
|
147
135
|
body: JSON.stringify({
|
|
148
136
|
username: document.getElementById('username').value,
|
|
149
137
|
password: document.getElementById('password').value,
|
|
150
|
-
returnTo:
|
|
138
|
+
returnTo: RETURN_TO,
|
|
151
139
|
}),
|
|
152
140
|
})
|
|
153
141
|
.then(function (response) {
|
|
@@ -155,7 +143,7 @@ export function renderLoginPage(basePath) {
|
|
|
155
143
|
return response.json();
|
|
156
144
|
})
|
|
157
145
|
.then(function (data) {
|
|
158
|
-
window.location.href = data.redirectTo ||
|
|
146
|
+
window.location.href = data.redirectTo || RETURN_TO;
|
|
159
147
|
})
|
|
160
148
|
.catch(function () {
|
|
161
149
|
errorBox.style.display = 'block';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login_page.js","sourceRoot":"","sources":["../../../src/ui/login_page.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"login_page.js","sourceRoot":"","sources":["../../../src/ui/login_page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW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T,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Keep in sync with this package's `version` in package.json. */
|
|
2
|
-
export declare const VERSION = "0.
|
|
2
|
+
export declare const VERSION = "0.11.0";
|
|
3
3
|
export type { CacheEntryContent, CacheEventLike, CacheOperation } from './cache_watcher.js';
|
|
4
4
|
export { buildCacheEntry, CACHE_EVENTS, CacheWatcher } from './cache_watcher.js';
|
|
5
5
|
export { nextCronRunMs } from './cron_next_run.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Keep in sync with this package's `version` in package.json. */
|
|
2
|
-
export const VERSION = '0.
|
|
2
|
+
export const VERSION = '0.11.0';
|
|
3
3
|
// — cache watcher —
|
|
4
4
|
export { buildCacheEntry, CACHE_EVENTS, CacheWatcher } from './cache_watcher.js';
|
|
5
5
|
export { nextCronRunMs } from './cron_next_run.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adonis-agora/telescope",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Laravel Telescope-style headless observability for AdonisJS — records HTTP requests and every Agora diagnostics event as queryable entries, plus opt-in subpaths for per-technology watchers, a web dashboard, AI exception diagnosis, and alerting.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|