@coolms/core-angular 2.0.0-alpha.5 → 2.0.0-alpha.7

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 CHANGED
@@ -9,6 +9,102 @@ currently serves. Earlier alphas are deliberately not reconstructed: entries are
9
9
  in the same commit as the work they describe, and inventing the ones that
10
10
  predate this file would be a worse record than not having them.
11
11
 
12
+ ## 2.0.0-alpha.7 - 2026-11-17
13
+
14
+ ### Changed
15
+
16
+ - **A failure says the server's words only when the server declared the problem.** `ErrorHandlerService.humanize()`
17
+ now follows the components contract's rule: a problem with a declared type (anything but `about:blank` or a
18
+ framework's own `/errors/5NN`) says its `detail` as given, whatever the status, or "Not available right now" when it
19
+ gives none; a validation refusal (422 with `violations`) says its first field message; anything else, an undeclared
20
+ problem, a network failure or a thrown error, says "Something went wrong. Try again." It no longer words a status
21
+ ("Resource not found.", "Session expired. Please sign in again." and the others are gone) and no longer reads
22
+ `hydra:description` or `message`. A caller that showed those sentences now shows the server's or the generic one.
23
+ - **Interface preferences are saved one entry at a time.** `UserPreferencesService` sends each changed entry with all
24
+ of its fields, as the server now keeps them, and reads the server's 422 (`/errors/identity/preferences-refused`)
25
+ for an entry it cannot store. A save that failed for any other reason (offline, a 5xx, a timeout) is sent again,
26
+ instead of waiting for the next change.
27
+
28
+ - **Only a refusal of entry signs out.** The server answers a token sent to the other interface with 403
29
+ `/errors/identity/wrong-interface` (`WRONG_INTERFACE`), and keeps `/errors/identity/audience-not-granted` for an
30
+ account that may no longer enter. `ConsoleAccessService` read every 403 on the admin manifest as a refusal, and the
31
+ guard signed the person out; now only `audience-not-granted` is `refused` (`audience-required` still asks for a new
32
+ sign-in), and a token for the other interface, or any other 403, is no answer: not kept, nobody signed out. The
33
+ start-up session check (`AppInitService`) no longer refreshes and ends a session on such a 403 either:
34
+ `sessionEndsOn(error)` says which refusals may. An older server's bare 403 at the legacy manifest address is no
35
+ longer a refusal.
36
+
37
+ - **The theme and the accent are read from the person's `appearance` settings.** `ThemeService` reads
38
+ `appearance.theme` and `appearance.accentColor` from `GET /auth/me/settings`, the section the server declares for
39
+ them; it no longer reads them from `preferences`.
40
+ - **One settings read for the callers that ask together.** `IdentityApiClient.getSettings()` shares a read in flight with every caller that asks meanwhile: the services reading their own section of the person's settings at start-up (calendar, calls) made one request each. A call after the read has answered reads again, and a failed read is not kept.
41
+ - **`cms-loader` turns the state component's spinner** (design-tokens' `--cms-spinner-*`, each with its value as the
42
+ fallback) in place of the drawn exclamation mark, so every wait shows the one spinner `cms-state` turns. Its inputs
43
+ (`label`, `inline`, `overlay`) and `--cms-loader-size` are unchanged; under reduced motion it breathes. A spec now
44
+ covers it.
45
+
46
+ - **A person's refused write opens the elevation prompt, and is sent again
47
+ once they elevate.** A write refused for want of elevation (a stamped 403)
48
+ holds the request and opens the prompt above whatever the person is in. An
49
+ edit dialog stays open beneath it, with its input. On a grant, the write is
50
+ sent once more and the caller receives that answer. If the session is
51
+ already elevated, it is sent once more without asking. A decline tells
52
+ `ELEVATION_NOTICE`, naming the action, and hands back the 403. The repeat
53
+ passes no prompt a second time. Reads and background requests still open
54
+ nothing.
55
+
56
+ ### Added
57
+
58
+ - **The shared rule for a failure's words**, exported from `errors/problem-words`: `refusalWords(error)`,
59
+ `declaredProblemOf`, `declaredTypeOf`, `problemOf`, `isRefusal`, `sentenceOf`, and the two sentences
60
+ `SOMETHING_WENT_WRONG` and `NOT_AVAILABLE`, so a host reads the rule from one place. The elevation service names the
61
+ refusal types a prompt acts on: `ELEVATION_CODE_REQUIRED_TYPE` and `ELEVATION_RETRY_TYPES`.
62
+ - **`ApiManifest.modules`**: the modules' own blocks of the manifest, by module name, each a record the client reads
63
+ by the keys it knows; `{}` when no module has a block.
64
+ - **A sign-in can name its application's audience.** `AUTH_AUDIENCE` (default `null`) is the application a sign-in is
65
+ for, typed `AuthAudience` (`'admin' | 'workspace'`); when provided, `IdentityApiClient.login()` sends it as
66
+ `audience`. The admin reads the two refusals of entry by audience, `/errors/identity/audience-not-granted` and
67
+ `/errors/identity/audience-required`.
68
+ - **The identity manifest names the signed-in sessions' addresses.**
69
+ `sessionsUrl` lists the live sign-ins; `sessionUrl` (`{sessionId}`) ends
70
+ one; `userSessionsUrl` (`{id}`) ends every sign-in of one account. All
71
+ three are optional: a server that does not send them has no sessions page.
72
+
73
+ ### Fixed
74
+
75
+ - **The store needs no `'unsafe-eval'`.** `provideConsole` sets up NGXS with `strictContentSecurityPolicy`, so a
76
+ selector's path is read with its plain getter, not one built with `new Function`.
77
+
78
+ ## 2.0.0-alpha.6 - 2026-10-22
79
+
80
+ ### Changed
81
+
82
+ - **Breaking: `engines.node` names exactly the Node lines CI runs.** It moves from
83
+ `^22.22.3 || ^24.15.0 || >=26` to `^22.22.3 || ^24.15.0 || ^26.0.0`: Node 27
84
+ and later are not declared until CI runs them. Within each line the floor is
85
+ the highest one any package in the lockfile declares. CI checks both, from
86
+ the matrix and the lockfile. The published code does not change.
87
+
88
+ ### Added
89
+
90
+ - **`ELEVATION_ACTION`, `ElevationService.canPrompt` and `apiBase`.** A caller
91
+ can name a write in the person's words ("Saving the menu entry") for the
92
+ elevation prompt and notice. `ElevationPromptRequest.action` and the notice's
93
+ optional second argument carry it. Without it, the action is the method's
94
+ verb and the resource the URL names ("Saving navi nodes").
95
+
96
+ - **Navigation nodes carry the server's access state.** `NaviGraphNodeFlat.access`
97
+ is `'allowed'` or `'elevate'`. `'elevate'` marks a node that a member of admin
98
+ can open once the session is elevated; the admin shows it with a lock instead
99
+ of hiding it. A server that does not send the field is read as `'allowed'`
100
+ (`naviAccessOf`), so nothing changes against it.
101
+ - `NaviGraphService.loadAdminNav(url, { fresh: true })` asks the server again
102
+ instead of answering from the per-URL cache: the answer differs before and
103
+ after a grant, so a change of elevation must re-ask.
104
+ - **`ElevationState.mayElevate`** and `ElevationService.mayElevate()`: whether
105
+ this account may elevate at all, as the server answered it. Absent reads as
106
+ false.
107
+
12
108
  ## 2.0.0-alpha.5 - 2026-10-09
13
109
 
14
110
  ### Changed
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 Dmitry Popov / CoolMS contributors
3
+ Copyright (c) 2026 Dmitry Popov
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -56,6 +56,10 @@ a relative symlink to the admin application's, so exactly one `@angular` tree is
56
56
  in play while the admin consumes this package from source: a second copy would
57
57
  give two type identities for the same class.
58
58
 
59
+ ## Tests
60
+
61
+ This package has no test runner of its own, so CI finds no tests in it: only typecheck, lint and build guard it here, and a check of "the same number of tests before and after" proves nothing for it. Its 13 spec files run in the admin suite of [coolms/theme-admin](https://github.com/coolms/theme-admin), which compiles this package from source. A change here is tested there, not by this repository's CI.
62
+
59
63
  ## Status
60
64
 
61
65
  A pre-release: the shape is still moving and it carries no compatibility