From 51efb5d5a5625944d17bd5080e61a515a6a811ed Mon Sep 17 00:00:00 2001 From: DIYgod Date: Sun, 12 Apr 2026 16:04:15 +0800 Subject: [PATCH] fix(release): repair ota and desktop update flows --- .agents/skills/desktop-release/SKILL.md | 4 +- .github/scripts/build-ota-release.mjs | 64 ++++++++++- .github/scripts/build-ota-release.test.ts | 20 +++- .github/workflows/build-desktop.yml | 22 +++- .github/workflows/tag.yml | 19 ++++ apps/desktop/layer/main/src/updater/index.ts | 24 ++-- .../layer/renderer/src/atoms/updater.ts | 6 +- .../modules/update-notice/UpdateNotice.tsx | 13 ++- .../providers/extension-expose-provider.tsx | 2 +- apps/ota/src/__tests__/sync.test.ts | 104 ++++++++++++++++++ apps/ota/src/lib/sync.ts | 4 + locales/app/en.json | 1 + locales/app/fr-FR.json | 1 + locales/app/ja.json | 1 + locales/app/zh-CN.json | 1 + locales/app/zh-TW.json | 1 + packages/internal/shared/src/bridge.ts | 7 +- 17 files changed, 259 insertions(+), 35 deletions(-) diff --git a/.agents/skills/desktop-release/SKILL.md b/.agents/skills/desktop-release/SKILL.md index fa21e7e4e..7400486b4 100644 --- a/.agents/skills/desktop-release/SKILL.md +++ b/.agents/skills/desktop-release/SKILL.md @@ -20,7 +20,7 @@ Important notes: - `mainHash` is still regenerated automatically, but it is **not** the OTA compatibility switch anymore. Do not use it as the release decision point. - `runtimeVersion` in `apps/desktop/package.json` is the desktop OTA compatibility key. `apps/desktop/scripts/apply-release-config.impl.ts` writes it during bump. - This skill covers the normal `build` and `ota` desktop release flow. -- `binary-policy` exists in `apps/desktop/release-plan.json`, but the current `tag.yml` automation does not dispatch a standalone desktop metadata-only publish path. Treat `binary-policy` as a manual or special-case workflow, not the normal regular release path. +- `binary-policy` exists in `apps/desktop/release-plan.json`, and the current `tag.yml` automation dispatches a standalone desktop metadata-only publish path. ## Pre-flight checks @@ -106,7 +106,7 @@ Use this decision table: - `binary-policy` Metadata-only policy release. - Do not treat this as part of the normal regular release flow until the GitHub automation wires it end-to-end. + Use this when the release should update desktop binary policy metadata without rebuilding installers. Present the analysis to the user with: diff --git a/.github/scripts/build-ota-release.mjs b/.github/scripts/build-ota-release.mjs index c93e354a9..38e4d6af1 100644 --- a/.github/scripts/build-ota-release.mjs +++ b/.github/scripts/build-ota-release.mjs @@ -15,6 +15,10 @@ const DEFAULT_MOBILE_PROJECT_DIR = join(REPO_ROOT, "apps", "mobile") const DEFAULT_DESKTOP_PROJECT_DIR = join(REPO_ROOT, "apps", "desktop") const OTA_PLATFORMS = ["ios", "android"] const DESKTOP_PLATFORMS = new Set(["macos", "windows", "linux"]) +const DESKTOP_DEFAULT_CHANNEL = "stable" +const DESKTOP_MAC_APP_STORE_URL = + "https://apps.apple.com/us/app/folo-follow-everything/id6739802604" +const DESKTOP_MICROSOFT_STORE_URL = "https://apps.microsoft.com/detail/9nvfzpv0v0ht?mode=direct" const CONTENT_TYPES = new Map([ [".aac", "audio/aac"], [".bmp", "image/bmp"], @@ -247,6 +251,7 @@ export async function buildDesktopReleaseAssets(options = {}) { const [owner, repo] = resolveRepository(options) const releaseKind = releaseConfig.mode === "ota" ? "ota" : "binary" const runtimeVersion = releaseConfig.mode === "ota" ? releaseConfig.runtimeVersion : null + const channel = releaseConfig.channel ?? DESKTOP_DEFAULT_CHANNEL const desktopApp = releaseConfig.mode === "binary-policy" ? null @@ -277,7 +282,7 @@ export async function buildDesktopReleaseAssets(options = {}) { const otaMetadata = { schemaVersion: 2, product, - channel: releaseConfig.channel ?? null, + channel, releaseVersion, releaseKind, runtimeVersion, @@ -290,9 +295,13 @@ export async function buildDesktopReleaseAssets(options = {}) { required: releaseConfig.required ?? false, minSupportedBinaryVersion: process.env.OTA_MIN_SUPPORTED_BINARY_VERSION ?? releaseVersion, message: releaseConfig.message ?? null, - distributions: Object.fromEntries( - (releaseConfig.distributions ?? []).map((distribution) => [distribution, {}]), - ), + distributions: resolveDesktopPolicyDistributions({ + mode: releaseConfig.mode, + distributions: releaseConfig.distributions ?? [], + owner, + repo, + gitTag, + }), }, desktop: { renderer: desktopRenderer, @@ -844,6 +853,53 @@ function buildGitHubAssetUrl({ owner, repo, tag, filename }) { return `https://github.com/${owner}/${repo}/releases/download/${tag}/${filename}` } +function buildGitHubReleaseUrl({ owner, repo, tag }) { + return `https://github.com/${owner}/${repo}/releases/tag/${tag}` +} + +function resolveDesktopPolicyDistributions({ mode, distributions, owner, repo, gitTag }) { + const normalizedDistributions = + mode === "build" && distributions.length === 0 ? ["direct"] : distributions + + return Object.fromEntries( + normalizedDistributions.map((distribution) => { + switch (distribution) { + case "direct": { + return [ + distribution, + { + downloadUrl: buildGitHubReleaseUrl({ + owner, + repo, + tag: gitTag, + }), + }, + ] + } + case "mas": { + return [ + distribution, + { + storeUrl: DESKTOP_MAC_APP_STORE_URL, + }, + ] + } + case "mss": { + return [ + distribution, + { + storeUrl: DESKTOP_MICROSOFT_STORE_URL, + }, + ] + } + default: { + throw new Error(`Unsupported desktop distribution "${distribution}"`) + } + } + }), + ) +} + function resolveRepository(options) { if (options.owner && options.repo) { return [options.owner, options.repo] diff --git a/.github/scripts/build-ota-release.test.ts b/.github/scripts/build-ota-release.test.ts index 609f6f7d6..0610584dd 100644 --- a/.github/scripts/build-ota-release.test.ts +++ b/.github/scripts/build-ota-release.test.ts @@ -344,8 +344,13 @@ releaseDate: 2026-04-11T10:00:00.000Z expect(result.otaMetadata.product).toBe("desktop") expect(result.otaMetadata.releaseKind).toBe("binary") expect(result.otaMetadata.runtimeVersion).toBeNull() - expect(result.otaMetadata.channel).toBeNull() + expect(result.otaMetadata.channel).toBe("stable") expect(result.otaMetadata.desktop.renderer).toBeNull() + expect(result.otaMetadata.policy.distributions).toEqual({ + direct: { + downloadUrl: "https://github.com/RSSNext/Folo/releases/tag/desktop/v1.5.1", + }, + }) expect(result.otaMetadata.desktop.app.platforms.windows).toEqual( expect.objectContaining({ platform: "windows-x64", @@ -471,8 +476,12 @@ releaseDate: 2026-04-11T10:00:00.000Z minSupportedBinaryVersion: "1.5.1", message: "Install the latest desktop app.", distributions: { - mas: {}, - mss: {}, + mas: { + storeUrl: "https://apps.apple.com/us/app/folo-follow-everything/id6739802604", + }, + mss: { + storeUrl: "https://apps.microsoft.com/detail/9nvfzpv0v0ht?mode=direct", + }, }, }) expect(result.otaMetadata.desktop).toEqual({ @@ -517,6 +526,11 @@ releaseDate: 2026-04-11T10:00:00.000Z repo: "Folo", }) + expect(result.otaMetadata.policy.distributions).toEqual({ + direct: { + downloadUrl: "https://github.com/RSSNext/Folo/releases/tag/desktop/v1.5.1", + }, + }) expect(result.otaMetadata.desktop.app).toBeNull() expect(result.archivePath).toBeNull() }) diff --git a/.github/workflows/build-desktop.yml b/.github/workflows/build-desktop.yml index 511dd2e3b..cb111c37d 100644 --- a/.github/workflows/build-desktop.yml +++ b/.github/workflows/build-desktop.yml @@ -24,6 +24,10 @@ on: build_version: type: string description: "Build Version, only available when mas is true" + metadata_only: + type: boolean + description: "Publish release metadata only without rebuilding desktop binaries" + default: false # https://docs.github.com/en/enterprise-cloud@latest/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs concurrency: @@ -39,7 +43,7 @@ env: jobs: release: - if: github.secret_source != 'None' && (github.event_name != 'push' || !contains(github.event.head_commit.message || '', 'release(desktop):')) + if: github.secret_source != 'None' && github.event.inputs.metadata_only != 'true' && (github.event_name != 'push' || !contains(github.event.head_commit.message || '', 'release(desktop):')) runs-on: ${{ matrix.os }} env: PROD: ${{ github.event.inputs.tag_version == 'true' || github.ref_type == 'tag' || github.event.inputs.store == 'true' }} @@ -345,7 +349,7 @@ jobs: apps/desktop/dist/*.tar.gz publish-release: - if: github.secret_source != 'None' && needs.release.result == 'success' && (github.event.inputs.tag_version == 'true' || github.ref_type == 'tag') + if: github.secret_source != 'None' && (needs.release.result == 'success' || github.event.inputs.metadata_only == 'true') && (github.event.inputs.tag_version == 'true' || github.ref_type == 'tag') needs: release runs-on: ubuntu-latest @@ -372,6 +376,7 @@ jobs: run: pnpm i - name: Download release assets + if: github.event.inputs.metadata_only != 'true' uses: actions/download-artifact@v5 with: pattern: desktop-release-assets-* @@ -379,6 +384,7 @@ jobs: merge-multiple: true - name: Ensure zstd + if: github.event.inputs.metadata_only != 'true' shell: bash run: | if command -v zstd >/dev/null 2>&1; then @@ -431,7 +437,12 @@ jobs: run: | release_files="$RUNNER_TEMP/desktop-release-files.txt" - cat <<'EOF' > "$release_files" + if [ "${{ github.event.inputs.metadata_only }}" == "true" ]; then + cat <<'EOF' > "$release_files" + apps/desktop/dist/ota-release.json + EOF + else + cat <<'EOF' > "$release_files" apps/desktop/out/make/**/Folo-*.dmg apps/desktop/out/make/**/Folo-*.zip apps/desktop/out/make/**/Folo-*.exe @@ -442,8 +453,9 @@ jobs: apps/desktop/dist/ota-release.json EOF - if [ -f apps/desktop/dist.tar.zst ]; then - echo "apps/desktop/dist.tar.zst" >> "$release_files" + if [ -f apps/desktop/dist.tar.zst ]; then + echo "apps/desktop/dist.tar.zst" >> "$release_files" + fi fi { diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index 23e385005..2d780c961 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -167,6 +167,25 @@ jobs: }); console.log('Desktop store build triggered successfully'); + - name: Trigger Desktop Metadata Publish + if: needs.create_tag.outputs.platform == 'desktop' && needs.create_tag.outputs.ref_name == 'main' && steps.desktop_release_mode.outputs.triggerMetadataPublish == 'true' + uses: actions/github-script@v9 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const response = await github.rest.actions.createWorkflowDispatch({ + owner: context.repo.owner, + repo: context.repo.repo, + workflow_id: 'build-desktop.yml', + ref: 'main', + inputs: { + tag_version: 'true', + store: 'false', + metadata_only: 'true' + } + }); + console.log('Desktop metadata publish triggered successfully'); + - name: Trigger Mobile Preview Release Build if: needs.create_tag.outputs.platform == 'mobile' && needs.create_tag.outputs.ref_name == 'mobile-main' && steps.release_mode.outputs.trigger_store_builds == 'true' uses: actions/github-script@v9 diff --git a/apps/desktop/layer/main/src/updater/index.ts b/apps/desktop/layer/main/src/updater/index.ts index bc7c6b944..f1e05df22 100644 --- a/apps/desktop/layer/main/src/updater/index.ts +++ b/apps/desktop/layer/main/src/updater/index.ts @@ -16,12 +16,7 @@ import { channel, isWindows } from "../env" import { fetchDesktopManifest, fetchDesktopPolicy, getDesktopRuntimeVersion } from "./api" import { appUpdaterConfig } from "./configs" import { FollowUpdateProvider } from "./follow-update-provider" -import type { - DesktopAppPayload, - DesktopDistribution, - DesktopManifestResponse, - DesktopPolicyResponse, -} from "./types" +import type { DesktopAppPayload, DesktopManifestResponse, DesktopPolicyResponse } from "./types" import { WindowsUpdater } from "./windows-updater" const logger = log.scope("app-updater") @@ -155,11 +150,16 @@ class FollowUpdater { }) if (result.hasUpdate && policy.distribution === "direct" && policy.downloadUrl) { - logger.warn("Direct binary policy requires a separate installer flow") logger.info("Direct binary policy available", { action: policy.action, downloadUrl: policy.downloadUrl, }) + await this.notifyDistributionUpdate(policy) + } else if (result.hasUpdate && policy.distribution === "direct") { + logger.info("Direct binary policy available", { + action: policy.action, + downloadUrl: null, + }) } else if (!result.hasUpdate) { logger.info("Update decision: none") } @@ -354,16 +354,18 @@ class FollowUpdater { return { hasUpdate: true } } - if (!info.storeUrl) { - logger.warn("Distribution update missing store URL", { + const targetUrl = info.distribution === "direct" ? info.downloadUrl : info.storeUrl + + if (!targetUrl) { + logger.warn("Distribution update missing target URL", { distribution: info.distribution, }) return { hasUpdate: false } } await callWindowExpose(mainWindow).distributionUpdateAvailable({ - distribution: info.distribution as Exclude, - storeUrl: info.storeUrl, + distribution: info.distribution, + targetUrl, storeVersion: info.targetVersion ?? null, currentVersion: appVersion, }) diff --git a/apps/desktop/layer/renderer/src/atoms/updater.ts b/apps/desktop/layer/renderer/src/atoms/updater.ts index 20acfa0af..2ae4a1dc9 100644 --- a/apps/desktop/layer/renderer/src/atoms/updater.ts +++ b/apps/desktop/layer/renderer/src/atoms/updater.ts @@ -1,4 +1,4 @@ -import type { StoreDistribution } from "@follow-app/client-sdk" +import type { DesktopUpdateDistribution } from "@follow/shared/bridge" import { atom } from "jotai" import { createAtomHooks } from "~/lib/jotai" @@ -19,8 +19,8 @@ type RendererUpdaterStatus = BaseUpdaterStatus<"renderer"> type PwaUpdaterStatus = BaseUpdaterStatus<"pwa"> type DistributionUpdaterStatus = BaseUpdaterStatus<"distribution"> & { - distribution: StoreDistribution - storeUrl: string + distribution: DesktopUpdateDistribution + targetUrl: string storeVersion: string | null currentVersion: string | null } diff --git a/apps/desktop/layer/renderer/src/modules/update-notice/UpdateNotice.tsx b/apps/desktop/layer/renderer/src/modules/update-notice/UpdateNotice.tsx index 8e9b555cd..15d70ef81 100644 --- a/apps/desktop/layer/renderer/src/modules/update-notice/UpdateNotice.tsx +++ b/apps/desktop/layer/renderer/src/modules/update-notice/UpdateNotice.tsx @@ -33,11 +33,11 @@ export const UpdateNotice = () => { break } case "distribution": { - if (status.storeUrl) { + if (status.targetUrl) { if (ipcServices?.app.openExternal) { - void ipcServices.app.openExternal(status.storeUrl) + void ipcServices.app.openExternal(status.targetUrl) } else { - window.open(status.storeUrl, "_blank") + window.open(status.targetUrl, "_blank") } } break @@ -55,6 +55,9 @@ export const UpdateNotice = () => { const { distribution } = updaterStatus switch (distribution) { + case "direct": { + return null + } case "mas": { return t("notify.store.mas") } @@ -81,7 +84,9 @@ export const UpdateNotice = () => { return t("notify.update_info_3") } case "distribution": { - return t("notify.update_info_store", { store: storeName ?? "" }) + return updaterStatus.distribution === "direct" + ? t("notify.update_info_direct") + : t("notify.update_info_store", { store: storeName ?? "" }) } default: { return null diff --git a/apps/desktop/layer/renderer/src/providers/extension-expose-provider.tsx b/apps/desktop/layer/renderer/src/providers/extension-expose-provider.tsx index ec201d532..b52f8d38d 100644 --- a/apps/desktop/layer/renderer/src/providers/extension-expose-provider.tsx +++ b/apps/desktop/layer/renderer/src/providers/extension-expose-provider.tsx @@ -47,7 +47,7 @@ export const ExtensionExposeProvider = () => { type: "distribution", status: "ready", distribution: payload.distribution, - storeUrl: payload.storeUrl, + targetUrl: payload.targetUrl, storeVersion: payload.storeVersion, currentVersion: payload.currentVersion, }) diff --git a/apps/ota/src/__tests__/sync.test.ts b/apps/ota/src/__tests__/sync.test.ts index 7641a5313..5dc2466df 100644 --- a/apps/ota/src/__tests__/sync.test.ts +++ b/apps/ota/src/__tests__/sync.test.ts @@ -701,6 +701,110 @@ describe("syncGitHubReleases", () => { expect(kvEntries.get(KV_KEYS.release("mobile", "0.4.3"))).toBe(JSON.stringify(storeRelease)) }) + it("does not let a newer mobile ota release overwrite the latest store policy record", async () => { + const kvEntries = new Map() + const storeRelease = await createReleaseMetadata({ + releaseVersion: "0.4.3", + releaseKind: "store", + runtimeVersion: "0.4.3", + publishedAt: "2026-04-10T16:00:00Z", + git: { + tag: "mobile/v0.4.3", + commit: "abcdef1234567895", + }, + policy: { + storeRequired: true, + minSupportedBinaryVersion: "0.4.3", + message: "Install 0.4.3 from the store.", + }, + platforms: {}, + }) + const otaBundle = textEncoder.encode("console.log('ota release 0.4.4')") + const otaRelease = await createReleaseMetadata({ + releaseVersion: "0.4.4", + releaseKind: "ota", + runtimeVersion: "0.4.3", + publishedAt: "2026-04-10T18:00:00Z", + git: { + tag: "mobile/v0.4.4", + commit: "abcdef1234567896", + }, + platforms: { + ios: { + launchAsset: { + path: "bundles/ios-main.js", + sha256: await sha256Hex(otaBundle), + contentType: "application/javascript", + }, + assets: [], + }, + }, + }) + const otaArchive = await createTarArchive([ + { + name: "bundles/ios-main.js", + body: otaBundle, + }, + ]) + + vi.stubGlobal( + "fetch", + vi.fn(async (input: string | URL | Request) => { + const url = String(input) + + if (url === "https://api.github.com/repos/RSSNext/Folo/releases") { + return new Response( + JSON.stringify([ + createGitHubReleaseAssetSet( + "mobile/v0.4.4", + "https://example.com/ota.json", + "https://example.com/ota.tar.zst", + ), + createGitHubReleaseAssetSet("mobile/v0.4.3", "https://example.com/store.json", null), + ]), + { status: 200 }, + ) + } + + if (url === "https://example.com/store.json") { + return new Response(JSON.stringify(storeRelease), { + headers: { + "Content-Type": "application/json", + }, + }) + } + + if (url === "https://example.com/ota.json") { + return new Response(JSON.stringify(otaRelease), { + headers: { + "Content-Type": "application/json", + }, + }) + } + + if (url === "https://example.com/ota.tar.zst") { + return new Response(otaArchive) + } + + throw new Error(`Unhandled fetch URL: ${url}`) + }), + ) + + await syncGitHubReleases( + createEnv({ + kvEntries, + envOverrides: { + GITHUB_OWNER: "RSSNext", + GITHUB_REPO: "Folo", + GITHUB_TOKEN: "token", + }, + }), + ) + + expect(kvEntries.get(KV_KEYS.policy("mobile", "production"))).toBe(JSON.stringify(storeRelease)) + expect(kvEntries.get(KV_KEYS.release("mobile", "0.4.4"))).toBe(JSON.stringify(otaRelease)) + }) + it("writes distribution-aware policy keys for desktop binary metadata", async () => { const kvEntries = new Map() const binaryRelease = createDesktopReleaseMetadata({ diff --git a/apps/ota/src/lib/sync.ts b/apps/ota/src/lib/sync.ts index 9d101a4f6..e59430dc4 100644 --- a/apps/ota/src/lib/sync.ts +++ b/apps/ota/src/lib/sync.ts @@ -163,6 +163,10 @@ async function putLatestPolicyRecord(kv: KVNamespace, release: OtaRelease) { return } + if (release.releaseKind !== "store") { + return + } + const existingPolicyRecord = await kv.get( KV_KEYS.policy(release.product, release.channel), "json", diff --git a/locales/app/en.json b/locales/app/en.json index b1568b40b..60f1a7bc0 100644 --- a/locales/app/en.json +++ b/locales/app/en.json @@ -353,6 +353,7 @@ "notify.update_info_1": "Click to restart", "notify.update_info_2": "Click to reload page", "notify.update_info_3": "Touch to reload page", + "notify.update_info_direct": "Click to open the download page", "notify.update_info_store": "Click to open {{store}}", "player.back_10s": "Back 10s", "player.close": "Close", diff --git a/locales/app/fr-FR.json b/locales/app/fr-FR.json index cba7b105d..9dd15929f 100644 --- a/locales/app/fr-FR.json +++ b/locales/app/fr-FR.json @@ -352,6 +352,7 @@ "notify.update_info_1": "Cliquez pour redémarrer", "notify.update_info_2": "Cliquez pour recharger la page", "notify.update_info_3": "Touchez pour recharger la page", + "notify.update_info_direct": "Cliquez pour ouvrir la page de téléchargement", "notify.update_info_store": "Cliquez pour ouvrir {{store}}", "player.back_10s": "Reculer 10s", "player.close": "Fermer", diff --git a/locales/app/ja.json b/locales/app/ja.json index 1d6afbcd6..f81e4439b 100644 --- a/locales/app/ja.json +++ b/locales/app/ja.json @@ -353,6 +353,7 @@ "notify.update_info_1": "クリックして再起動", "notify.update_info_2": "クリックして再読み込み", "notify.update_info_3": "タッチして再読み込み", + "notify.update_info_direct": "クリックしてダウンロードページを開く", "notify.update_info_store": "クリックして{{store}}を開く", "player.back_10s": "10 秒戻る", "player.close": "閉じる", diff --git a/locales/app/zh-CN.json b/locales/app/zh-CN.json index e26bf395e..740834a60 100644 --- a/locales/app/zh-CN.json +++ b/locales/app/zh-CN.json @@ -353,6 +353,7 @@ "notify.update_info_1": "点击重新启动", "notify.update_info_2": "点击重新加载页面", "notify.update_info_3": "点按重新加载页面", + "notify.update_info_direct": "点击打开下载页面", "notify.update_info_store": "点击前往 {{store}}", "player.back_10s": "后退 10s", "player.close": "关闭", diff --git a/locales/app/zh-TW.json b/locales/app/zh-TW.json index d70ca8a59..fb4b66b53 100644 --- a/locales/app/zh-TW.json +++ b/locales/app/zh-TW.json @@ -353,6 +353,7 @@ "notify.update_info_1": "點擊重新啟動", "notify.update_info_2": "點擊重新整理頁面", "notify.update_info_3": "點選重新整理頁面", + "notify.update_info_direct": "點擊開啟下載頁面", "notify.update_info_store": "點擊前往 {{store}}", "player.back_10s": "後退 10 秒", "player.close": "關閉", diff --git a/packages/internal/shared/src/bridge.ts b/packages/internal/shared/src/bridge.ts index 0485d198a..a39307eac 100644 --- a/packages/internal/shared/src/bridge.ts +++ b/packages/internal/shared/src/bridge.ts @@ -24,9 +24,12 @@ export enum WindowState { MAXIMIZED = "maximized", NORMAL = "normal", } + +export type DesktopUpdateDistribution = StoreDistribution | "direct" + export interface DistributionUpdateNotice { - distribution: StoreDistribution - storeUrl: string + distribution: DesktopUpdateDistribution + targetUrl: string storeVersion: string | null currentVersion: string | null }