create-astram-app 0.12.10 → 0.13.1
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/package.json +1 -1
- package/template/frontend/package.json +1 -1
- package/template/frontend/src/auth/AuthContext.jsx +8 -0
- package/template/frontend/src/pages/access/AccessForm.jsx +380 -181
- package/template/frontend/src/pages/access/accessMatrix.js +49 -0
- package/template/frontend/src/pages/access/accessMatrix.test.mjs +118 -0
- package/template/frontend/src/shell/AnnouncementsMenu.jsx +190 -0
- package/template/frontend/src/shell/AppShell.jsx +6 -3
- package/template/frontend/src/shell/NotificationsMenu.jsx +263 -0
- package/template/frontend/src/shell/notificationsView.js +138 -0
- package/template/frontend/src/shell/notificationsView.test.mjs +182 -0
- package/template/frontend/src/shell/useNotificationCounts.js +211 -0
- package/template/server/package.json +3 -3
- package/template/server/src/app.module.ts +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-astram-app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Scaffolder for a new Astram app — emits a running, framework-enforced NestJS server (deny-by-default, built-in auth/identity to switch on) and, with --with-frontend, a React admin/auth UI, over the immutable @astram/* framework packages.",
|
|
6
6
|
"type": "module",
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
createAuthService,
|
|
18
18
|
createCrossTenantService,
|
|
19
19
|
createIdentityService,
|
|
20
|
+
createNotificationService,
|
|
20
21
|
createRecordPolicyService,
|
|
21
22
|
createRecordShareService,
|
|
22
23
|
createSecurityPolicyService,
|
|
@@ -117,6 +118,9 @@ export function AuthProvider({ children }) {
|
|
|
117
118
|
// their `ask_…` API keys (the raw key is revealed once on issue/rotate).
|
|
118
119
|
serviceAccounts: createServiceAccountService(http),
|
|
119
120
|
account: createAccountService(http),
|
|
121
|
+
// In-app notices (G-027): the header bell and Announcements menus and their unread counts
|
|
122
|
+
// (`/account/notifications`; shell/useNotificationCounts.js polls the counts).
|
|
123
|
+
notifications: createNotificationService(http),
|
|
120
124
|
// The @astram/sdk ShieldClient (Phase E slice 1) — a UX-convenience projection of
|
|
121
125
|
// the caller's OWN coarse grants, fetched once per session via `getAuthFacts`.
|
|
122
126
|
// Built once, so every session boundary calls `shield.reset()` (establishSession,
|
|
@@ -147,6 +151,7 @@ export function AuthProvider({ children }) {
|
|
|
147
151
|
recordShare,
|
|
148
152
|
serviceAccounts,
|
|
149
153
|
account,
|
|
154
|
+
notifications,
|
|
150
155
|
shield,
|
|
151
156
|
store,
|
|
152
157
|
rawAuth,
|
|
@@ -450,6 +455,8 @@ export function AuthProvider({ children }) {
|
|
|
450
455
|
// The shared self-scoped account service (change-password today; profile/MFA
|
|
451
456
|
// later) — same injected web http client.
|
|
452
457
|
account,
|
|
458
|
+
// The shared notification service (list / unread count / mark read; G-027) — same client.
|
|
459
|
+
notifications,
|
|
453
460
|
// The @astram/sdk ShieldClient (Phase E slice 1) — exposed for any page that needs
|
|
454
461
|
// direct access (e.g. a forced re-fetch). Most call sites should prefer `useCan`.
|
|
455
462
|
shield,
|
|
@@ -483,6 +490,7 @@ export function AuthProvider({ children }) {
|
|
|
483
490
|
recordShare,
|
|
484
491
|
serviceAccounts,
|
|
485
492
|
account,
|
|
493
|
+
notifications,
|
|
486
494
|
shield,
|
|
487
495
|
profile,
|
|
488
496
|
mustReenroll,
|