MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / planDownloadedUpdate

Function planDownloadedUpdate

apps/desktop/src/main/updater-state.ts:79–90  ·  view source on GitHub ↗
(input: DownloadedUpdateInput)

Source from the content-addressed store, hash-verified

77};
78
79export const planDownloadedUpdate = (input: DownloadedUpdateInput): DownloadedUpdatePlan => {
80 const prompt =
81 input.trigger === "manual" ||
82 !input.declinedVersion ||
83 isNewerUpdateVersion(input.incomingVersion, input.declinedVersion);
84 return {
85 stagedVersion: input.incomingVersion,
86 declinedVersion: input.declinedVersion,
87 status: { state: "downloaded", version: input.incomingVersion },
88 promptVersion: prompt ? input.incomingVersion : null,
89 };
90};
91
92// Any state that names a version is an update in flight, including a staged
93// ("downloaded") or installing one: Squirrel.Mac validates the bundle only when

Callers 2

setupAutoUpdaterFunction · 0.90

Calls 1

isNewerUpdateVersionFunction · 0.85

Tested by

no test coverage detected