@selfhelp/shared 1.14.24 → 1.15.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/CHANGELOG.md +78 -0
- package/dist/index.d.mts +204 -4
- package/dist/index.d.ts +204 -4
- package/dist/index.js +22 -1
- package/dist/index.mjs +21 -1
- package/dist/{manifest-C8sBTLJb.d.mts → manifest-8YXAk-4o.d.mts} +8 -0
- package/dist/{manifest-C8sBTLJb.d.ts → manifest-8YXAk-4o.d.ts} +8 -0
- package/dist/plugin-sdk/index.d.mts +39 -2
- package/dist/plugin-sdk/index.d.ts +39 -2
- package/dist/plugin-sdk/index.js +13 -0
- package/dist/plugin-sdk/index.mjs +11 -0
- package/dist/testing/index.d.mts +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/plugin-sdk/__tests__/version.test.ts +40 -0
- package/src/plugin-sdk/index.ts +2 -0
- package/src/plugin-sdk/manifest.ts +8 -0
- package/src/plugin-sdk/registry.ts +11 -0
- package/src/plugin-sdk/version.ts +38 -0
- package/src/types/__tests__/distribution.test.ts +55 -1
- package/src/types/api/__tests__/system.test.ts +83 -0
- package/src/types/api/index.ts +1 -0
- package/src/types/api/mobile-preview.ts +71 -0
- package/src/types/api/system.ts +83 -3
- package/src/types/distribution.ts +67 -1
|
@@ -88,6 +88,8 @@ export interface InstanceVersions {
|
|
|
88
88
|
frontend: string;
|
|
89
89
|
scheduler: string;
|
|
90
90
|
worker: string;
|
|
91
|
+
/** Mobile-preview web image version pinned for this instance (additive). */
|
|
92
|
+
mobilePreview?: string;
|
|
91
93
|
pluginApi: string;
|
|
92
94
|
}
|
|
93
95
|
|
|
@@ -99,6 +101,8 @@ export interface InstanceImages {
|
|
|
99
101
|
mysql: string;
|
|
100
102
|
redis: string;
|
|
101
103
|
mercure: string;
|
|
104
|
+
/** Mobile-preview web image reference (additive). */
|
|
105
|
+
mobilePreview?: string;
|
|
102
106
|
}
|
|
103
107
|
|
|
104
108
|
export interface InstanceRouting {
|
|
@@ -205,6 +209,8 @@ export interface InstanceLock {
|
|
|
205
209
|
version: string;
|
|
206
210
|
backendImageDigest: string;
|
|
207
211
|
frontendImageDigest: string;
|
|
212
|
+
/** Mobile-preview web image digest pinned for this instance (additive). */
|
|
213
|
+
mobilePreviewImageDigest?: string;
|
|
208
214
|
schedulerImageDigest: string;
|
|
209
215
|
workerImageDigest: string;
|
|
210
216
|
migrationVersion: string;
|
|
@@ -245,6 +251,8 @@ export interface RegistryIndex {
|
|
|
245
251
|
scheduler: RegistryReleaseRef[];
|
|
246
252
|
worker: RegistryReleaseRef[];
|
|
247
253
|
plugins: RegistryReleaseRef[];
|
|
254
|
+
/** Mobile-preview web image release refs (additive; older managers ignore). */
|
|
255
|
+
mobilePreview?: RegistryReleaseRef[];
|
|
248
256
|
advisoriesUrl?: string;
|
|
249
257
|
compatibilityUrl?: string;
|
|
250
258
|
trustedKeysUrl?: string;
|
|
@@ -349,13 +357,71 @@ export interface WorkerRelease {
|
|
|
349
357
|
blocked?: boolean;
|
|
350
358
|
}
|
|
351
359
|
|
|
360
|
+
/**
|
|
361
|
+
* One plugin mobile package baked into a mobile-preview image at build time.
|
|
362
|
+
* The preview CI runs `plugins-sync.mjs` against a curated official-plugin set
|
|
363
|
+
* and records the result here so the manager can compute coverage (which
|
|
364
|
+
* enabled plugins render natively vs. fall back to open-on-web in the preview)
|
|
365
|
+
* without inspecting the image.
|
|
366
|
+
*/
|
|
367
|
+
export interface BundledPluginRef {
|
|
368
|
+
id: string;
|
|
369
|
+
version: string;
|
|
370
|
+
mobilePackage: string;
|
|
371
|
+
mobilePackageVersion: string;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Mobile-preview web image release, resolved/pinned as a first-class artifact
|
|
376
|
+
* (peer of the frontend release). The image serves the Expo web export at
|
|
377
|
+
* `/mobile-preview` and proxies a narrow `/mobile-preview/api` allowlist to the
|
|
378
|
+
* private backend. `mobileRendererVersion` is the mobile renderer contract the
|
|
379
|
+
* image was built against (what plugin `compatibility.mobile` ranges target);
|
|
380
|
+
* `bundledPlugins` is the curated official-plugin set baked into the image.
|
|
381
|
+
*/
|
|
382
|
+
export interface MobilePreviewRelease {
|
|
383
|
+
kind: 'selfhelp-mobile-preview-release';
|
|
384
|
+
id: string;
|
|
385
|
+
version: string;
|
|
386
|
+
channel: ReleaseChannel;
|
|
387
|
+
image: string;
|
|
388
|
+
digest: string;
|
|
389
|
+
builtFrom?: { sharedPackageVersion?: string; expoSdk?: string; reactNative?: string };
|
|
390
|
+
backendCompatibility: ServiceBackendCompatibility;
|
|
391
|
+
/** Mobile renderer contract version advertised by this image (semver). */
|
|
392
|
+
mobileRendererVersion: string;
|
|
393
|
+
/**
|
|
394
|
+
* React Native version the preview image was built with. Top-level canonical
|
|
395
|
+
* value the SelfHelp Manager gates a plugin's `compatibility.reactNative`
|
|
396
|
+
* range against (the `builtFrom.reactNative` provenance field mirrors it).
|
|
397
|
+
*/
|
|
398
|
+
reactNativeVersion?: string;
|
|
399
|
+
/**
|
|
400
|
+
* Expo SDK version the preview image was built with. Gated against a plugin's
|
|
401
|
+
* `compatibility.expoSdk` range (mirrors `builtFrom.expoSdk`).
|
|
402
|
+
*/
|
|
403
|
+
expoSdkVersion?: string;
|
|
404
|
+
/** Curated plugin mobile packages baked into the image. */
|
|
405
|
+
bundledPlugins: BundledPluginRef[];
|
|
406
|
+
security: SignatureBlock;
|
|
407
|
+
blocked?: boolean;
|
|
408
|
+
}
|
|
409
|
+
|
|
352
410
|
export interface PluginRelease {
|
|
353
411
|
kind: 'selfhelp-plugin-release';
|
|
354
412
|
id: string;
|
|
355
413
|
version: string;
|
|
356
414
|
channel: ReleaseChannel;
|
|
357
415
|
official: boolean;
|
|
358
|
-
|
|
416
|
+
/**
|
|
417
|
+
* Compatibility ranges the host must satisfy. `mobile` (additive) is the
|
|
418
|
+
* mobile-renderer axis: the range of host `mobileRendererVersion` the
|
|
419
|
+
* plugin's mobile package supports (parallel to `pluginApi`). `reactNative`
|
|
420
|
+
* and `expoSdk` (additive) are gated against the resolved
|
|
421
|
+
* `selfhelp-mobile-preview` image's `reactNativeVersion` / `expoSdkVersion`.
|
|
422
|
+
* All three are absent for web-only plugins.
|
|
423
|
+
*/
|
|
424
|
+
compatibility: { core: string; pluginApi: string; mobile?: string; reactNative?: string; expoSdk?: string };
|
|
359
425
|
dependencies?: { plugins: { id: string; range: string }[] };
|
|
360
426
|
artifacts: { manifestUrl: string; archiveUrl: string; sha256: string };
|
|
361
427
|
security: SignatureBlock;
|