@shiqianjiang/ceru-plugin-issuer 0.3.3 → 0.3.6

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.
Files changed (2) hide show
  1. package/dist/index.js +7 -0
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -208,6 +208,11 @@ export const MANIFEST_SCHEMA = object({
208
208
  maxItems: 16,
209
209
  items: object({ id, title: string, view: id, action: id, logoutAction: id }, ['id', 'title', 'view', 'action']),
210
210
  },
211
+ playlistSections: {
212
+ type: 'array',
213
+ maxItems: 32,
214
+ items: object({ id, title: string, view: id, order: { type: 'integer', minimum: -1000, maximum: 1000 } }, ['id', 'title', 'view']),
215
+ },
211
216
  homeSections: {
212
217
  type: 'array',
213
218
  maxItems: 32,
@@ -410,6 +415,8 @@ export function validateManifest(value) {
410
415
  if (account.logoutAction)
411
416
  ensure(actions.has(account.logoutAction), 'Unknown account logout action: ' + account.logoutAction);
412
417
  }
418
+ for (const section of manifest.contributes?.playlistSections ?? [])
419
+ ensure(manifest.modules.surfaces?.some(surface => surface.id === section.view && surface.kind === 'native'), 'Playlist section requires a declared native view: ' + section.view);
413
420
  const share = manifest.modules.share;
414
421
  if (share?.guestAdapterId)
415
422
  ensure(manifest.contributes?.guestAdapters?.some((adapter) => adapter.id === share.guestAdapterId), 'Unknown share guest adapter: ' + share.guestAdapterId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shiqianjiang/ceru-plugin-issuer",
3
- "version": "0.3.3",
3
+ "version": "0.3.6",
4
4
  "description": "Static verification, Ed25519 signing and cached personalized issuance of Ceru single-JS plugins",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -23,7 +23,7 @@
23
23
  "node": ">=22.12.0"
24
24
  },
25
25
  "dependencies": {
26
- "@shiqianjiang/ceru-plugin-sdk": "0.3.3",
26
+ "@shiqianjiang/ceru-plugin-sdk": "0.3.6",
27
27
  "acorn": "^8.18.0",
28
28
  "ajv": "^8.20.0"
29
29
  },