@adonis-agora/durable-dashboard 0.8.1 → 0.8.3

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.
@@ -10,7 +10,7 @@
10
10
  rel="stylesheet"
11
11
  />
12
12
  <title>durable · control plane</title>
13
- <script type="module" crossorigin src="/__DURABLE_DASHBOARD__/assets/index-DupjrK7N.js"></script>
13
+ <script type="module" crossorigin src="/__DURABLE_DASHBOARD__/assets/index-BULnCUuC.js"></script>
14
14
  <link rel="stylesheet" crossorigin href="/__DURABLE_DASHBOARD__/assets/index-6nmSTfT7.css">
15
15
  </head>
16
16
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adonis-agora/durable-dashboard",
3
- "version": "0.8.1",
3
+ "version": "0.8.3",
4
4
  "description": "Control-plane console (runs, step timeline, workflow graph, retry/cancel/fix-and-replay) for @adonis-agora/durable — a React SPA served by a thin AdonisJS provider. Part of the Agora ecosystem.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -42,7 +42,7 @@
42
42
  "@tailwindcss/postcss": "4.3.3",
43
43
  "@tanstack/intent": "0.5.6",
44
44
  "@tanstack/react-query": "5.104.5",
45
- "@tanstack/react-virtual": "3.14.21",
45
+ "@tanstack/react-virtual": "3.14.22",
46
46
  "@testing-library/dom": "10.4.2",
47
47
  "@testing-library/react": "16.3.3",
48
48
  "@types/node": "26.6.5",
@@ -52,14 +52,14 @@
52
52
  "@xyflow/react": "12.12.0",
53
53
  "class-variance-authority": "0.7.1",
54
54
  "clsx": "2.1.1",
55
- "happy-dom": "21.0.3",
55
+ "happy-dom": "21.0.4",
56
56
  "jsdom": "30.1.3",
57
57
  "react": "19.3.1",
58
58
  "react-dom": "19.3.1",
59
59
  "tailwind-merge": "3.7.0",
60
60
  "tailwindcss": "4.3.3",
61
61
  "typescript": "7.0.2",
62
- "vite": "8.3.4",
62
+ "vite": "8.3.5",
63
63
  "vitest": "5.0.5"
64
64
  },
65
65
  "engines": {
@@ -46,12 +46,18 @@ export default defineConfig({
46
46
  // enabled: true, // default true; false registers no routes at all
47
47
  path: '/durable',
48
48
  authorize: async (ctx) => {
49
- await ctx.auth.check()
50
- return ctx.auth.user?.isAdmin === true // denied requests get 403
49
+ // boolean | { allowed, reason?: 'unauthenticated' | 'forbidden' }
50
+ if (!(await ctx.auth.check())) return { allowed: false, reason: 'unauthenticated' } // 401
51
+ return ctx.auth.user?.isAdmin === true // false / { allowed: false } -> 403
51
52
  },
52
53
  })
53
54
  ```
54
55
 
56
+ `authorize` returns `AuthorizeResult = boolean | AuthorizeDecision`
57
+ (`{ allowed: boolean; reason?: 'unauthenticated' | 'forbidden' }`). Only `true`
58
+ or `allowed: true` passes; `reason: 'unauthenticated'` → `401`, every other
59
+ denial (incl. a throwing hook) → `403`. A hook that redirects keeps its redirect.
60
+
55
61
  The default `authorize` fails closed in **every** environment: it requires a
56
62
  bearer token equal to `DURABLE_DASHBOARD_TOKEN`, denying everything when that
57
63
  env var is unset. Open it up explicitly with `dashboardAuth`, your own