@adea-ai/app-framework 0.37.2 → 0.38.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/README.md +69 -22
- package/dist/app/create-application.js +2 -12
- package/dist/cli/developer-app-cli.d.ts +2 -0
- package/dist/cli/developer-app-cli.js +38 -0
- package/dist/cli/release-cut-cli.js +2 -1
- package/dist/cli/release-promote-cli.js +1 -0
- package/dist/desktop/client-dev-proxy.d.ts +16 -0
- package/dist/desktop/client-dev-proxy.js +84 -0
- package/dist/desktop/desktop-host.d.ts +5 -0
- package/dist/desktop/desktop-host.js +5 -2
- package/dist/developer-app/developer-app.d.ts +113 -0
- package/dist/developer-app/developer-app.js +326 -0
- package/dist/framework-source.json +1 -1
- package/dist/native/desktop-build-hook.d.ts +2 -0
- package/dist/native/desktop-build-hook.js +5 -0
- package/dist/release/local-release.d.ts +2 -0
- package/dist/release/local-release.js +71 -69
- package/dist/release/release-config.js +2 -2
- package/dist/release/release-promotion-command.d.ts +1 -0
- package/dist/release/release-promotion-command.js +1 -0
- package/dist/release/release-promotion.d.ts +11 -1
- package/dist/release/release-promotion.js +26 -1
- package/dist/update-helper.bundle.js +7 -3
- package/dist/updates/helper/resume-staging.d.ts +3 -0
- package/dist/updates/helper/resume-staging.js +11 -3
- package/dist/updates/helper/update-helper.js +2 -2
- package/dist/updates/helper/update-resume.js +41 -6
- package/dist/updates/install/update-swap.d.ts +11 -1
- package/dist/updates/install/update-swap.js +14 -3
- package/package.json +11 -2
- package/templates/application/.github/workflows/release-please.yml +1 -2
- package/templates/application/.github/workflows/release.yml +6 -8
|
@@ -750,7 +750,8 @@ function sameUpdateTreeIdentity(left, right) {
|
|
|
750
750
|
function sameTreeEntrySnapshot(left, right) {
|
|
751
751
|
return left.dev === right.dev && left.ino === right.ino && left.mode === right.mode && left.nlink === right.nlink && left.size === right.size && left.mtimeNs === right.mtimeNs && left.ctimeNs === right.ctimeNs;
|
|
752
752
|
}
|
|
753
|
-
async function readUpdateTreeDigest(tree) {
|
|
753
|
+
async function readUpdateTreeDigest(tree, options = {}) {
|
|
754
|
+
const allowHardLinkedFiles = options.allowHardLinkedFiles === true;
|
|
754
755
|
const hash = createHash("sha256");
|
|
755
756
|
hash.update("adea-framework-update-tree\x00v1\x00", "utf8");
|
|
756
757
|
const root = await lstat2(tree, { bigint: true });
|
|
@@ -802,7 +803,7 @@ async function readUpdateTreeDigest(tree) {
|
|
|
802
803
|
throw new Error("Update tree changed while reading a directory");
|
|
803
804
|
return;
|
|
804
805
|
}
|
|
805
|
-
if (!before.isFile() || before.nlink !== 1n || before.size < 0n)
|
|
806
|
+
if (!before.isFile() || before.nlink < 1n || !allowHardLinkedFiles && before.nlink !== 1n || before.size < 0n)
|
|
806
807
|
throw new Error("Update tree contains an unsupported filesystem entry");
|
|
807
808
|
writeRecord("file", relative, before.mode, before.size);
|
|
808
809
|
const noFollow = constants5.O_NOFOLLOW ?? 0;
|
|
@@ -837,6 +838,9 @@ async function readUpdateTreeDigest(tree) {
|
|
|
837
838
|
hash.update(count);
|
|
838
839
|
return hash.digest("hex");
|
|
839
840
|
}
|
|
841
|
+
function readInstalledUpdateTreeDigest(tree) {
|
|
842
|
+
return readUpdateTreeDigest(tree, { allowHardLinkedFiles: true });
|
|
843
|
+
}
|
|
840
844
|
function sameUpdateTreeDigest(left, right) {
|
|
841
845
|
return typeof left === "string" && typeof right === "string" && isSha256Hex(left) && left === right;
|
|
842
846
|
}
|
|
@@ -1686,7 +1690,7 @@ async function runSchema3UpdateHelper(options, request, helperLiveness) {
|
|
|
1686
1690
|
await syncUpdateTreeParent(request.target);
|
|
1687
1691
|
if (await readUpdateTreeVersion(request.target) !== swapping.version || await readUpdateTreeVersion(candidate) !== swapping.previousVersion || !sameUpdateTreeIdentity(await readUpdateTreeIdentity(request.target), swapping.candidateTreeIdentity) || !sameUpdateTreeIdentity(await readUpdateTreeIdentity(candidate), swapping.previousTreeIdentity))
|
|
1688
1692
|
throw new Error("Atomic update exchange produced unexpected tree versions");
|
|
1689
|
-
if (!sameUpdateTreeDigest(await
|
|
1693
|
+
if (!sameUpdateTreeDigest(await readInstalledUpdateTreeDigest(request.target), swapping.candidateTreeDigest))
|
|
1690
1694
|
throw new Error("Installed update tree content changed during the directory exchange");
|
|
1691
1695
|
completedDigestVerified = true;
|
|
1692
1696
|
await writeUpdateStageStateDurably(options.staging, { ...swapping, phase: "completed" });
|
|
@@ -3,6 +3,8 @@ import { type UpdateStageState } from '../update-state-store';
|
|
|
3
3
|
import type { UpdateResumeResult } from './update-resume';
|
|
4
4
|
export declare function exists(path: string): Promise<boolean>;
|
|
5
5
|
export declare function readTreeDigestForProof(path: string): Promise<string | undefined>;
|
|
6
|
+
/** Prove an installed tree, which may gain hard links after the exchange. */
|
|
7
|
+
export declare function readInstalledTreeDigestForProof(path: string): Promise<string | undefined>;
|
|
6
8
|
/** Recover only layouts produced by a proven-exited legacy helper. */
|
|
7
9
|
export declare function recoverLegacyHandoff(options: {
|
|
8
10
|
target: string;
|
|
@@ -11,6 +13,7 @@ export declare function recoverLegacyHandoff(options: {
|
|
|
11
13
|
helperPid: number;
|
|
12
14
|
}): Promise<UpdateResumeResult>;
|
|
13
15
|
export declare function resetToStaged(staging: string, state: UpdateStageState): Promise<UpdateStageState>;
|
|
16
|
+
export declare function hasUnknownStagingEntries(staging: string, allowed?: readonly string[], generation?: string): Promise<boolean>;
|
|
14
17
|
export declare function reconcileSwap(target: string, staging: string, state: UpdateStageState): Promise<UpdateStageState | undefined>;
|
|
15
18
|
export declare function recoverStagedCandidate(options: {
|
|
16
19
|
target: string;
|
|
@@ -4,7 +4,7 @@ import { renameExclusive } from "../../native/native-rename.js";
|
|
|
4
4
|
import { parseUpdateHelperRequest } from "./update-helper.js";
|
|
5
5
|
import { updateProcessMayBeAlive } from "../locks/update-process-liveness.js";
|
|
6
6
|
import { readUpdateHelperRequestFile, writeUpdateStageState } from "../update-state-store.js";
|
|
7
|
-
import { readUpdateTreeDigest, readUpdateTreeIdentity, readUpdateTreeVersion, sameUpdateTreeDigest, sameUpdateTreeIdentity } from "../install/update-swap.js";
|
|
7
|
+
import { readInstalledUpdateTreeDigest, readUpdateTreeDigest, readUpdateTreeIdentity, readUpdateTreeVersion, sameUpdateTreeDigest, sameUpdateTreeIdentity } from "../install/update-swap.js";
|
|
8
8
|
import { lstat, readdir, rm } from "node:fs/promises";
|
|
9
9
|
import { join } from "node:path";
|
|
10
10
|
import { randomUUID } from "node:crypto";
|
|
@@ -32,6 +32,14 @@ async function readTreeDigestForProof(path) {
|
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
+
/** Prove an installed tree, which may gain hard links after the exchange. */
|
|
36
|
+
async function readInstalledTreeDigestForProof(path) {
|
|
37
|
+
try {
|
|
38
|
+
return await readInstalledUpdateTreeDigest(path);
|
|
39
|
+
} catch {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
35
43
|
/** Recover only layouts produced by a proven-exited legacy helper. */
|
|
36
44
|
async function recoverLegacyHandoff(options) {
|
|
37
45
|
const { target, staging, currentVersion, helperPid } = options;
|
|
@@ -145,7 +153,7 @@ async function reconcileSwap(target, staging, state) {
|
|
|
145
153
|
const [targetVersion, candidateVersion] = await Promise.all([readUpdateTreeVersion(target), readUpdateTreeVersion(candidate)]);
|
|
146
154
|
const [targetIdentity, candidateIdentity] = await Promise.all([readUpdateTreeIdentity(target), readUpdateTreeIdentity(candidate)]);
|
|
147
155
|
if (targetVersion === state.previousVersion && candidateVersion === state.version && targetIdentity !== void 0 && candidateIdentity !== void 0 && sameUpdateTreeIdentity(candidateIdentity, state.candidateTreeIdentity) && (state.candidateTreeDigest === void 0 || sameUpdateTreeDigest(await readTreeDigestForProof(candidate), state.candidateTreeDigest)) && !sameUpdateTreeIdentity(targetIdentity, candidateIdentity) && (!state.previousTreeIdentity || sameUpdateTreeIdentity(targetIdentity, state.previousTreeIdentity))) return resetToStaged(staging, state);
|
|
148
|
-
if (targetVersion === state.version && candidateVersion === state.previousVersion && sameUpdateTreeIdentity(targetIdentity, state.candidateTreeIdentity) && (state.candidateTreeDigest === void 0 || sameUpdateTreeDigest(await
|
|
156
|
+
if (targetVersion === state.version && candidateVersion === state.previousVersion && sameUpdateTreeIdentity(targetIdentity, state.candidateTreeIdentity) && (state.candidateTreeDigest === void 0 || sameUpdateTreeDigest(await readInstalledTreeDigestForProof(target), state.candidateTreeDigest)) && sameUpdateTreeIdentity(candidateIdentity, state.previousTreeIdentity)) {
|
|
149
157
|
const completed = {
|
|
150
158
|
...state,
|
|
151
159
|
phase: "completed"
|
|
@@ -177,4 +185,4 @@ async function recoverStagedCandidate(options) {
|
|
|
177
185
|
channel: verified.descriptor.channel
|
|
178
186
|
};
|
|
179
187
|
}
|
|
180
|
-
export { exists, readTreeDigestForProof, reconcileSwap, recoverLegacyHandoff, recoverStagedCandidate, resetToStaged };
|
|
188
|
+
export { exists, hasUnknownStagingEntries, readInstalledTreeDigestForProof, readTreeDigestForProof, reconcileSwap, recoverLegacyHandoff, recoverStagedCandidate, resetToStaged };
|
|
@@ -2,7 +2,7 @@ import { errorCode, isUuid } from "../../app/value-guards.js";
|
|
|
2
2
|
import { publishExclusiveUpdateMarker, publishExclusiveUpdateMarkerSync, readUpdateMarker } from "../install/update-marker.js";
|
|
3
3
|
import { launchInstalledApp } from "../launch/update-launch.js";
|
|
4
4
|
import { UpdateProcessFenceCancelledError, waitForUpdateProcesses } from "../locks/update-process-fence.js";
|
|
5
|
-
import { readUpdateTreeDigest, readUpdateTreeIdentity, readUpdateTreeVersion, sameUpdateTreeDigest, sameUpdateTreeIdentity, swapUpdateTreeWhileLocked, syncUpdateTree, syncUpdateTreeParent, updateStagingFor } from "../install/update-swap.js";
|
|
5
|
+
import { readInstalledUpdateTreeDigest, readUpdateTreeDigest, readUpdateTreeIdentity, readUpdateTreeVersion, sameUpdateTreeDigest, sameUpdateTreeIdentity, swapUpdateTreeWhileLocked, syncUpdateTree, syncUpdateTreeParent, updateStagingFor } from "../install/update-swap.js";
|
|
6
6
|
import { acquireUpdateLock, readUpdateStageState, writeUpdateStageState, writeUpdateStageStateDurably } from "../update-state-store.js";
|
|
7
7
|
import { cancelUpdateLaunchGateBeforeTransition, publishUpdateLaunchGate, tryAcquireUpdateHelperLiveness, waitForUpdateLaunchGateWriter } from "../launch/update-launch-gate.js";
|
|
8
8
|
import { isCanonicalPath } from "../../native/canonical-path.js";
|
|
@@ -337,7 +337,7 @@ async function runSchema3UpdateHelper(options, request, helperLiveness) {
|
|
|
337
337
|
await syncUpdateTreeParent(candidate);
|
|
338
338
|
await syncUpdateTreeParent(request.target);
|
|
339
339
|
if (await readUpdateTreeVersion(request.target) !== swapping.version || await readUpdateTreeVersion(candidate) !== swapping.previousVersion || !sameUpdateTreeIdentity(await readUpdateTreeIdentity(request.target), swapping.candidateTreeIdentity) || !sameUpdateTreeIdentity(await readUpdateTreeIdentity(candidate), swapping.previousTreeIdentity)) throw new Error("Atomic update exchange produced unexpected tree versions");
|
|
340
|
-
if (!sameUpdateTreeDigest(await
|
|
340
|
+
if (!sameUpdateTreeDigest(await readInstalledUpdateTreeDigest(request.target), swapping.candidateTreeDigest)) throw new Error("Installed update tree content changed during the directory exchange");
|
|
341
341
|
completedDigestVerified = true;
|
|
342
342
|
await writeUpdateStageStateDurably(options.staging, {
|
|
343
343
|
...swapping,
|
|
@@ -1,15 +1,47 @@
|
|
|
1
|
+
import { renameExclusive } from "../../native/native-rename.js";
|
|
1
2
|
import { hasUpdateHelperArtifacts } from "./update-helper.js";
|
|
2
3
|
import { updateProcessMayBeAlive } from "../locks/update-process-liveness.js";
|
|
3
4
|
import { UpdateLockBusyError, acquireUpdateLock, readUpdateStageState } from "../update-state-store.js";
|
|
4
5
|
import { readUpdateTreeIdentity, readUpdateTreeVersion, sameUpdateTreeDigest, sameUpdateTreeIdentity, updateStagingFor } from "../install/update-swap.js";
|
|
5
6
|
import { acquireRetainedUpdateTrees, acquireRetainedUpdateTreesWhileLocked } from "../retention/retirement-inventory.js";
|
|
6
7
|
import { reconcileRetirementCleanupMarkerWhileLocked, retireCompletedUpdateWhileLocked } from "../retention/update-retirement.js";
|
|
8
|
+
import { matchesOldTree, updateRetirementPaths } from "../retention/retirement-records.js";
|
|
7
9
|
import { readUpdateLaunchGate } from "../launch/update-launch-gate.js";
|
|
8
|
-
import { exists,
|
|
10
|
+
import { exists, hasUnknownStagingEntries, readInstalledTreeDigestForProof, reconcileSwap, recoverLegacyHandoff, recoverStagedCandidate, resetToStaged } from "./resume-staging.js";
|
|
9
11
|
import { recoverUpdateLaunchGate } from "./launch-gate-recovery.js";
|
|
10
12
|
import { lstat, readFile, readdir, rmdir, unlink } from "node:fs/promises";
|
|
11
13
|
import { join } from "node:path";
|
|
14
|
+
import { randomUUID } from "node:crypto";
|
|
12
15
|
// src/updates/helper/update-resume.ts
|
|
16
|
+
/**
|
|
17
|
+
* A completed exchange that can no longer be retired must not strand the app.
|
|
18
|
+
* The exchange already finished, so the staging directory only holds the
|
|
19
|
+
* previous tree and the journal. When no retirement record was started for
|
|
20
|
+
* this generation and the previous tree is intact, move the whole directory
|
|
21
|
+
* aside (never delete it) so the next update can stage normally. Retiring and
|
|
22
|
+
* retired phases own retirement records and keep failing closed.
|
|
23
|
+
*/
|
|
24
|
+
async function setAsideStaleCompletedStaging(options) {
|
|
25
|
+
const { target, staging, state } = options;
|
|
26
|
+
try {
|
|
27
|
+
const targetInfo = await lstat(target);
|
|
28
|
+
if (!targetInfo.isDirectory() || targetInfo.isSymbolicLink()) return { status: "recovery-required" };
|
|
29
|
+
const installedVersion = await readUpdateTreeVersion(target);
|
|
30
|
+
if (!installedVersion) return { status: "recovery-required" };
|
|
31
|
+
const paths = updateRetirementPaths(target, state.generation);
|
|
32
|
+
if (await exists(paths.claim) || await exists(paths.container)) return { status: "recovery-required" };
|
|
33
|
+
if (await hasUnknownStagingEntries(staging, [], state.generation) || !await matchesOldTree(join(staging, "candidate"), state)) return { status: "recovery-required" };
|
|
34
|
+
const current = await readUpdateStageState(staging);
|
|
35
|
+
if (!current || current.generation !== state.generation || current.phase !== "completed") return { status: "recovery-required" };
|
|
36
|
+
renameExclusive(staging, `${staging}.stale-${randomUUID()}`);
|
|
37
|
+
return installedVersion === state.version ? {
|
|
38
|
+
status: "updated",
|
|
39
|
+
version: state.version
|
|
40
|
+
} : { status: "not-applied" };
|
|
41
|
+
} catch {
|
|
42
|
+
return { status: "recovery-required" };
|
|
43
|
+
}
|
|
44
|
+
}
|
|
13
45
|
async function resumeLocked(options) {
|
|
14
46
|
const { target, staging, trust, currentVersion } = options;
|
|
15
47
|
const launchGate = await readUpdateLaunchGate(target);
|
|
@@ -121,19 +153,22 @@ async function resumeLocked(options) {
|
|
|
121
153
|
});
|
|
122
154
|
}
|
|
123
155
|
if (state.phase === "completed") {
|
|
124
|
-
if (await readUpdateTreeVersion(target)
|
|
125
|
-
if (!await retireCompletedUpdateWhileLocked({
|
|
156
|
+
if (await readUpdateTreeVersion(target) === state.version && sameUpdateTreeIdentity(await readUpdateTreeIdentity(target), state.candidateTreeIdentity) && (state.candidateTreeDigest === void 0 || sameUpdateTreeDigest(await readInstalledTreeDigestForProof(target), state.candidateTreeDigest)) && await retireCompletedUpdateWhileLocked({
|
|
126
157
|
target,
|
|
127
158
|
staging,
|
|
128
159
|
state
|
|
129
|
-
})) return {
|
|
130
|
-
return {
|
|
160
|
+
})) return {
|
|
131
161
|
status: "updated",
|
|
132
162
|
version: state.version
|
|
133
163
|
};
|
|
164
|
+
return setAsideStaleCompletedStaging({
|
|
165
|
+
target,
|
|
166
|
+
staging,
|
|
167
|
+
state
|
|
168
|
+
});
|
|
134
169
|
}
|
|
135
170
|
if (state.phase === "retiring" || state.phase === "retired") {
|
|
136
|
-
if (await readUpdateTreeVersion(target) !== state.version || !sameUpdateTreeIdentity(await readUpdateTreeIdentity(target), state.candidateTreeIdentity) || state.candidateTreeDigest !== void 0 && !sameUpdateTreeDigest(await
|
|
171
|
+
if (await readUpdateTreeVersion(target) !== state.version || !sameUpdateTreeIdentity(await readUpdateTreeIdentity(target), state.candidateTreeIdentity) || state.candidateTreeDigest !== void 0 && !sameUpdateTreeDigest(await readInstalledTreeDigestForProof(target), state.candidateTreeDigest)) return { status: "recovery-required" };
|
|
137
172
|
if (!await retireCompletedUpdateWhileLocked({
|
|
138
173
|
target,
|
|
139
174
|
staging,
|
|
@@ -30,8 +30,18 @@ export declare function sameUpdateTreeIdentity(left: UpdateTreeIdentity | undefi
|
|
|
30
30
|
* host provides it, and compare lstat/fstat metadata before and after reads.
|
|
31
31
|
* This detects ordinary concurrent changes by cooperating updater processes;
|
|
32
32
|
* it is not an atomic filesystem snapshot against a hostile same-user writer.
|
|
33
|
+
*
|
|
34
|
+
* Candidate proofs refuse regular files with more than one hard link, because
|
|
35
|
+
* an alias outside the private staging tree could change bytes after the proof.
|
|
36
|
+
* Set `allowHardLinkedFiles` only to re-prove a tree that is already installed:
|
|
37
|
+
* the link count is not part of the digest, and backup, dedup or packaging
|
|
38
|
+
* tools may add a link to an installed file without changing its bytes.
|
|
33
39
|
*/
|
|
34
|
-
export declare function readUpdateTreeDigest(tree: string
|
|
40
|
+
export declare function readUpdateTreeDigest(tree: string, options?: Readonly<{
|
|
41
|
+
allowHardLinkedFiles?: boolean;
|
|
42
|
+
}>): Promise<UpdateTreeDigest>;
|
|
43
|
+
/** Re-prove an installed app tree; tolerates hard-linked regular files. */
|
|
44
|
+
export declare function readInstalledUpdateTreeDigest(tree: string): Promise<UpdateTreeDigest>;
|
|
35
45
|
export declare function sameUpdateTreeDigest(left: UpdateTreeDigest | undefined, right: UpdateTreeDigest | undefined): boolean;
|
|
36
46
|
/** Sync candidate file contents and directory entries before a gated schema-3 exchange. */
|
|
37
47
|
export declare function syncUpdateTree(tree: string): Promise<void>;
|
|
@@ -52,8 +52,15 @@ function sameTreeEntrySnapshot(left, right) {
|
|
|
52
52
|
* host provides it, and compare lstat/fstat metadata before and after reads.
|
|
53
53
|
* This detects ordinary concurrent changes by cooperating updater processes;
|
|
54
54
|
* it is not an atomic filesystem snapshot against a hostile same-user writer.
|
|
55
|
+
*
|
|
56
|
+
* Candidate proofs refuse regular files with more than one hard link, because
|
|
57
|
+
* an alias outside the private staging tree could change bytes after the proof.
|
|
58
|
+
* Set `allowHardLinkedFiles` only to re-prove a tree that is already installed:
|
|
59
|
+
* the link count is not part of the digest, and backup, dedup or packaging
|
|
60
|
+
* tools may add a link to an installed file without changing its bytes.
|
|
55
61
|
*/
|
|
56
|
-
async function readUpdateTreeDigest(tree) {
|
|
62
|
+
async function readUpdateTreeDigest(tree, options = {}) {
|
|
63
|
+
const allowHardLinkedFiles = options.allowHardLinkedFiles === true;
|
|
57
64
|
const hash = createHash("sha256");
|
|
58
65
|
hash.update("adea-framework-update-tree\0v1\0", "utf8");
|
|
59
66
|
const root = await lstat(tree, { bigint: true });
|
|
@@ -97,7 +104,7 @@ async function readUpdateTreeDigest(tree) {
|
|
|
97
104
|
if (!sameTreeEntrySnapshot(before, await lstat(path, { bigint: true }))) throw new Error("Update tree changed while reading a directory");
|
|
98
105
|
return;
|
|
99
106
|
}
|
|
100
|
-
if (!before.isFile() || before.nlink !== 1n || before.size < 0n) throw new Error("Update tree contains an unsupported filesystem entry");
|
|
107
|
+
if (!before.isFile() || before.nlink < 1n || !allowHardLinkedFiles && before.nlink !== 1n || before.size < 0n) throw new Error("Update tree contains an unsupported filesystem entry");
|
|
101
108
|
writeRecord("file", relative, before.mode, before.size);
|
|
102
109
|
const noFollow = constants$1.O_NOFOLLOW ?? 0;
|
|
103
110
|
const file = await open(path, constants$1.O_RDONLY | noFollow | (constants$1.O_NONBLOCK ?? 0));
|
|
@@ -126,6 +133,10 @@ async function readUpdateTreeDigest(tree) {
|
|
|
126
133
|
hash.update(count);
|
|
127
134
|
return hash.digest("hex");
|
|
128
135
|
}
|
|
136
|
+
/** Re-prove an installed app tree; tolerates hard-linked regular files. */
|
|
137
|
+
function readInstalledUpdateTreeDigest(tree) {
|
|
138
|
+
return readUpdateTreeDigest(tree, { allowHardLinkedFiles: true });
|
|
139
|
+
}
|
|
129
140
|
function sameUpdateTreeDigest(left, right) {
|
|
130
141
|
return typeof left === "string" && typeof right === "string" && isSha256Hex(left) && left === right;
|
|
131
142
|
}
|
|
@@ -219,4 +230,4 @@ async function swapUpdateTreeWhileLocked(options, exchangeOperation = exchangeDi
|
|
|
219
230
|
]);
|
|
220
231
|
if (nextTargetVersion !== candidateVersion || nextCandidateVersion !== previousVersion || !sameUpdateTreeIdentity(nextTargetId, candidateIdentity) || !sameUpdateTreeIdentity(nextCandidateId, previousIdentity)) throw new Error("Atomic update exchange did not preserve both app trees");
|
|
221
232
|
}
|
|
222
|
-
export { readUpdateTreeDigest, readUpdateTreeIdentity, readUpdateTreeVersion, sameUpdateTreeDigest, sameUpdateTreeIdentity, swapUpdateTree, swapUpdateTreeWhileLocked, syncUpdateTree, syncUpdateTreeParent, updateStagingFor, updateTreeIdentityFromStat };
|
|
233
|
+
export { readInstalledUpdateTreeDigest, readUpdateTreeDigest, readUpdateTreeIdentity, readUpdateTreeVersion, sameUpdateTreeDigest, sameUpdateTreeIdentity, swapUpdateTree, swapUpdateTreeWhileLocked, syncUpdateTree, syncUpdateTreeParent, updateStagingFor, updateTreeIdentityFromStat };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adea-ai/app-framework",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"adea-cef-helper": "./dist/cli/cef-helper-cli.js",
|
|
12
12
|
"adea-cut-release": "./dist/cli/release-cut-cli.js",
|
|
13
13
|
"adea-desktop-release": "./ci/desktop-release.sh",
|
|
14
|
+
"adea-developer-app": "./dist/cli/developer-app-cli.js",
|
|
14
15
|
"adea-finalize-release": "./dist/cli/release-finalize-cli.js",
|
|
15
16
|
"adea-patch-electrobun-shortcuts": "./dist/cli/electrobun-shortcut-patch-cli.js",
|
|
16
17
|
"adea-patch-windows-runtime": "./dist/cli/windows-runtime-patch-cli.js",
|
|
@@ -389,7 +390,15 @@
|
|
|
389
390
|
"import": "./dist/ci/toolchain-identity.js",
|
|
390
391
|
"default": "./dist/ci/toolchain-identity.js"
|
|
391
392
|
},
|
|
392
|
-
"./update-helper.js": "./dist/update-helper.bundle.js"
|
|
393
|
+
"./update-helper.js": "./dist/update-helper.bundle.js",
|
|
394
|
+
"./developer-app": {
|
|
395
|
+
"types": "./dist/developer-app/developer-app.d.ts",
|
|
396
|
+
"import": "./dist/developer-app/developer-app.js"
|
|
397
|
+
},
|
|
398
|
+
"./client-dev-proxy": {
|
|
399
|
+
"types": "./dist/desktop/client-dev-proxy.d.ts",
|
|
400
|
+
"import": "./dist/desktop/client-dev-proxy.js"
|
|
401
|
+
}
|
|
393
402
|
},
|
|
394
403
|
"publishConfig": {
|
|
395
404
|
"access": "public",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
name: Release Please
|
|
2
2
|
# Owns the app version. Merging its release pull request bumps package.json and stages a
|
|
3
|
-
# draft release; the next scheduled Desktop release run builds it as the daily
|
|
4
|
-
# releases count v<next minor>-dev.N from 1 for each version after it.
|
|
3
|
+
# draft release; the next scheduled Desktop release run builds it as the daily.
|
|
5
4
|
on:
|
|
6
5
|
push:
|
|
7
6
|
branches: [main]
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
name: Desktop release
|
|
2
|
-
# The shared framework release schedule:
|
|
3
|
-
#
|
|
4
|
-
# daily and then promotes the newest qualified daily once `soakHours` (96) have passed
|
|
2
|
+
# The shared framework release schedule: each scheduled run builds the newest Release
|
|
3
|
+
# Please version as a daily and then promotes the newest qualified daily once `soakHours` (96) have passed
|
|
5
4
|
# since the last stable. The cron is the daily cadence; any interval works. Set
|
|
6
|
-
# DESKTOP_RELEASES_ENABLED=true once the release signing key is configured.
|
|
5
|
+
# DESKTOP_RELEASES_ENABLED=true once the release signing key is configured. There are no
|
|
6
|
+
# dev releases: development runs the developer app from the checkout (adea-developer-app).
|
|
7
7
|
on:
|
|
8
|
-
push:
|
|
9
|
-
branches: [main]
|
|
10
8
|
schedule:
|
|
11
9
|
- cron: '23 12 * * *'
|
|
12
10
|
workflow_dispatch:
|
|
13
11
|
inputs:
|
|
14
12
|
operation:
|
|
15
|
-
description:
|
|
13
|
+
description: daily cuts a release from main; stable promotes the qualified daily.
|
|
16
14
|
type: choice
|
|
17
|
-
options: [
|
|
15
|
+
options: [daily, stable]
|
|
18
16
|
required: true
|
|
19
17
|
permissions: {}
|
|
20
18
|
concurrency:
|