From bd7adafee06f53b9c9391059487c1149801d7396 Mon Sep 17 00:00:00 2001 From: J H Date: Wed, 7 Aug 2024 16:38:35 -0600 Subject: [PATCH] Fix: sdk setupManifest pass through docs --- sdk/lib/manifest/setupManifest.ts | 10 ++++++++-- web/patchdb-ui-seed.json | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sdk/lib/manifest/setupManifest.ts b/sdk/lib/manifest/setupManifest.ts index e3b746874..a0d0e18b3 100644 --- a/sdk/lib/manifest/setupManifest.ts +++ b/sdk/lib/manifest/setupManifest.ts @@ -3,6 +3,11 @@ import { ImageConfig, ImageId, VolumeId } from "../osBindings" import { SDKManifest, SDKImageConfig } from "./ManifestTypes" import { SDKVersion } from "../StartSdk" +/** + * This is an example of a function that takes a manifest and returns a new manifest with additional properties + * @param manifest Manifests are the description of the package + * @returns The manifest with additional properties + */ export function setupManifest< Id extends string, Version extends string, @@ -10,15 +15,16 @@ export function setupManifest< VolumesTypes extends VolumeId, AssetTypes extends VolumeId, ImagesTypes extends ImageId, - Manifest extends SDKManifest & { + Manifest extends { dependencies: Dependencies id: Id assets: AssetTypes[] images: Record volumes: VolumesTypes[] + version: Version }, Satisfies extends string[] = [], ->(manifest: Manifest & { version: Version }): Manifest & T.Manifest { +>(manifest: SDKManifest & Manifest): Manifest & T.Manifest { const images = Object.entries(manifest.images).reduce( (images, [k, v]) => { v.arch = v.arch || ["aarch64", "x86_64"] diff --git a/web/patchdb-ui-seed.json b/web/patchdb-ui-seed.json index 0e15cd2cf..807483c3a 100644 --- a/web/patchdb-ui-seed.json +++ b/web/patchdb-ui-seed.json @@ -21,5 +21,5 @@ "ackInstructions": {}, "theme": "Dark", "widgets": [], - "ack-welcome": "0.3.6-alpha.3" + "ack-welcome": "0.3.6-alpha.4" }