@selfhelp/shared 1.3.1 → 1.4.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 +55 -0
- package/dist/index.d.mts +649 -1
- package/dist/index.d.ts +649 -1
- package/dist/index.js +19 -0
- package/dist/index.mjs +17 -0
- package/dist/plugin-sdk/index.d.mts +118 -101
- package/dist/plugin-sdk/index.d.ts +118 -101
- package/dist/plugin-sdk/index.js +6 -1
- package/dist/plugin-sdk/index.mjs +5 -1
- package/package.json +2 -2
- package/src/plugin-sdk/index.ts +4 -2
- package/src/plugin-sdk/registry.ts +115 -79
- package/src/plugin-sdk/version.ts +1 -1
- package/src/types/__tests__/channel-parity.test.ts +74 -0
- package/src/types/__tests__/distribution.test.ts +168 -0
- package/src/types/api/__tests__/compatibility-error-parity.test.ts +107 -0
- package/src/types/api/__tests__/system.test.ts +287 -0
- package/src/types/api/index.ts +1 -0
- package/src/types/api/system.ts +293 -0
- package/src/types/distribution.ts +446 -0
- package/src/types/index.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,61 @@ All notable changes to `@selfhelp/shared` will be documented in this file.
|
|
|
9
9
|
|
|
10
10
|
This project follows semantic versioning.
|
|
11
11
|
|
|
12
|
+
## [1.4.0]
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- `TUpdateOperationStatus` gains the `idle` member: the honest state the backend
|
|
17
|
+
returns for an instance that has never run an update (instead of a misleading
|
|
18
|
+
`succeeded`/100%). Additive contract change — exhaustive consumers (e.g. a
|
|
19
|
+
`Record<TUpdateOperationStatus, …>`) must add an `idle` branch. Ship as the
|
|
20
|
+
next minor (`1.5.0`); the frontend mirror in
|
|
21
|
+
`sh-selfhelp_frontend/src/types/responses/admin/system.types.ts` already
|
|
22
|
+
tracks it.
|
|
23
|
+
|
|
24
|
+
- Instance-scoped **system maintenance / update** contracts under
|
|
25
|
+
`src/types/api/system.ts` for the SelfHelp Manager (`sh-manager`) ↔ CMS ↔
|
|
26
|
+
admin-UI flow (SelfHelp Manager / Docker Distribution MVP): `ISystemVersion`
|
|
27
|
+
/ `ISystemVersionResponse`, `IUpdatePreflight` / `IUpdatePreflightResponse`,
|
|
28
|
+
`IUpdateRequest`, `IUpdateStatus` / `IUpdateStatusResponse`,
|
|
29
|
+
`IUpdateRequestResponse`, plus the `SYSTEM_ENDPOINTS` path constants and the
|
|
30
|
+
supporting unions (`TUpdatePreflightStatus`, `TUpdateOperationStatus`, …).
|
|
31
|
+
- Hard cross-repo invariant encoded in the types and a regression test:
|
|
32
|
+
`IUpdateRequest` has **no** `instance_id` — the browser never targets another
|
|
33
|
+
instance; the backend derives and verifies the instance identity server-side.
|
|
34
|
+
- `check-schema-parity.mjs` now also guards the three new admin response schemas
|
|
35
|
+
(`responses/admin/system_version.json`, `update_preflight.json`,
|
|
36
|
+
`update_status.json`) and the `requests/admin/update_request.json` request
|
|
37
|
+
schema against the shared TS mirrors.
|
|
38
|
+
- `ICompatibilityError` in `src/types/api/system.ts` — the standardized
|
|
39
|
+
compatibility-error shape (`component`, `component_id`, `current_version`,
|
|
40
|
+
`target_version`, `required_range`, `blocking`, `message`) shared verbatim by
|
|
41
|
+
the backend `CompatibilityError`, the SelfHelp Manager resolver, and the
|
|
42
|
+
frontend Available/preflight UI, with a parity test
|
|
43
|
+
(`compatibility-error-parity.test.ts`).
|
|
44
|
+
|
|
45
|
+
### Changed
|
|
46
|
+
|
|
47
|
+
- **Unified registry types** (`src/plugin-sdk/registry.ts`). `IPluginRegistry`
|
|
48
|
+
now mirrors the unified `registry.json`: required `schemaVersion`,
|
|
49
|
+
`requiresManager`, `baseUrl`, and the five release-ref arrays `core` /
|
|
50
|
+
`frontend` / `scheduler` / `worker` / `plugins`. New `IRegistryReleaseRef`
|
|
51
|
+
(`{id, version, channel, releaseUrl, blocked?}`) and `IPluginRelease` (the
|
|
52
|
+
standalone signed plugin release document: `compatibility.{core,pluginApi}`,
|
|
53
|
+
`artifacts.{manifestUrl,archiveUrl,sha256}`, Ed25519 `security`). The legacy
|
|
54
|
+
single-version inline `IPluginRegistryEntry` / `IPluginRegistryVersionEntry`
|
|
55
|
+
were removed (no consumer; replaced by the multi-version release-ref model).
|
|
56
|
+
Mirrors the backend `plugin-registry.schema.json` +
|
|
57
|
+
`config/schemas/registry/plugin-release.schema.json`.
|
|
58
|
+
|
|
59
|
+
## [1.3.2]
|
|
60
|
+
|
|
61
|
+
### Changed
|
|
62
|
+
|
|
63
|
+
- Maintenance release: cut a clean published version for consumers to pin.
|
|
64
|
+
Supersedes the `1.3.1` test publish; no functional or API changes since
|
|
65
|
+
`1.3.0`.
|
|
66
|
+
|
|
12
67
|
## [1.3.0]
|
|
13
68
|
|
|
14
69
|
### Added
|