@adea-ai/app-framework 0.37.0 → 0.37.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/dist/appearance/appearance-host.js +2 -1
- package/dist/appearance/custom-theme-import.js +3 -1
- package/dist/appearance/custom-theme-library.d.ts +6 -185
- package/dist/appearance/custom-theme-library.js +3 -621
- package/dist/appearance/theme-library-mutation.d.ts +42 -0
- package/dist/appearance/theme-library-mutation.js +172 -0
- package/dist/appearance/theme-library-schema.d.ts +108 -0
- package/dist/appearance/theme-library-schema.js +189 -0
- package/dist/appearance/theme-library-store.d.ts +61 -0
- package/dist/appearance/theme-library-store.js +268 -0
- package/dist/appearance/theme-record-adapter.js +3 -1
- package/dist/appearance/theme-registry.js +2 -1
- package/dist/cli/update-helper-cli.js +1 -1
- package/dist/desktop/desktop-client.d.ts +1 -1
- package/dist/framework-source.json +1 -1
- package/dist/installer/installed-payload.js +2 -2
- package/dist/installer/{installer-archive.js → installer-archive-members.js} +2 -2
- package/dist/installer/installer-extraction.js +2 -2
- package/dist/installer/installer-fetch-guard.d.ts +1 -1
- package/dist/installer/installer-identity.js +2 -2
- package/dist/installer/installer-observation.d.ts +1 -1
- package/dist/installer/installer-observation.js +2 -2
- package/dist/installer/installer-upgrade-command.d.ts +2 -2
- package/dist/installer/installer-upgrade-command.js +5 -5
- package/dist/installer/linux-process-group.js +1 -1
- package/dist/installer/upgrade-asset-download.d.ts +1 -1
- package/dist/installer/upgrade-asset-download.js +2 -2
- package/dist/native/posix-tree-removal.d.ts +1 -1
- package/dist/release/feed-release-cut.d.ts +1 -1
- package/dist/release/feed-state.d.ts +2 -2
- package/dist/release/feed-state.js +3 -3
- package/dist/release/github-release-cut.js +1 -1
- package/dist/release/github-release-promotion.js +1 -1
- package/dist/release/github-release-publisher.js +1 -1
- package/dist/release/github-release-qualification.js +1 -1
- package/dist/release/local-release.d.ts +2 -2
- package/dist/release/local-release.js +3 -3
- package/dist/release/release-artifact.d.ts +1 -1
- package/dist/release/release-artifact.js +2 -2
- package/dist/release/release-assets-plan.js +1 -1
- package/dist/release/release-config.d.ts +1 -1
- package/dist/release/release-config.js +1 -1
- package/dist/release/release-descriptor-staging.js +3 -3
- package/dist/release/release-finalize.js +1 -1
- package/dist/release/release-promotion.js +1 -1
- package/dist/release/release-publication.d.ts +1 -1
- package/dist/release/release-publication.js +2 -2
- package/dist/release/release-publish-command.js +2 -2
- package/dist/update-helper.bundle.js +18 -18
- package/dist/updates/channel-update-manager.d.ts +3 -3
- package/dist/updates/channel-update-manager.js +2 -2
- package/dist/updates/desktop-updater.d.ts +10 -83
- package/dist/updates/desktop-updater.js +14 -217
- package/dist/updates/{packaged-release-config.js → feed/packaged-release-config.js} +5 -5
- package/dist/updates/{release-feed.js → feed/release-feed.js} +2 -2
- package/dist/updates/{release-location.js → feed/release-location.js} +2 -2
- package/dist/updates/{release-version.js → feed/release-version.js} +1 -1
- package/dist/updates/{signed-release.js → feed/signed-release.js} +2 -2
- package/dist/updates/{update-discovery.js → feed/update-discovery.js} +1 -1
- package/dist/updates/helper/launch-gate-recovery.d.ts +8 -0
- package/dist/updates/{update-resume.js → helper/launch-gate-recovery.js} +13 -423
- package/dist/updates/helper/resume-staging.d.ts +22 -0
- package/dist/updates/helper/resume-staging.js +180 -0
- package/dist/updates/{update-helper.d.ts → helper/update-helper.d.ts} +1 -1
- package/dist/updates/{update-helper.js → helper/update-helper.js} +9 -9
- package/dist/updates/{update-resume.d.ts → helper/update-resume.d.ts} +4 -10
- package/dist/updates/helper/update-resume.js +252 -0
- package/dist/updates/{update-shutdown.js → helper/update-shutdown.js} +2 -2
- package/dist/updates/{update-arm.d.ts → install/update-arm.d.ts} +2 -2
- package/dist/updates/{update-arm.js → install/update-arm.js} +9 -9
- package/dist/updates/{update-download-cleanup.d.ts → install/update-download-cleanup.d.ts} +1 -1
- package/dist/updates/{update-download-cleanup.js → install/update-download-cleanup.js} +3 -3
- package/dist/updates/{update-download.d.ts → install/update-download.d.ts} +2 -2
- package/dist/updates/{update-download.js → install/update-download.js} +3 -3
- package/dist/updates/{update-extraction.d.ts → install/update-extraction.d.ts} +2 -2
- package/dist/updates/{update-extraction.js → install/update-extraction.js} +6 -6
- package/dist/updates/{update-handoff-plan.d.ts → install/update-handoff-plan.d.ts} +2 -2
- package/dist/updates/{update-handoff-plan.js → install/update-handoff-plan.js} +5 -5
- package/dist/updates/{update-marker.js → install/update-marker.js} +2 -2
- package/dist/updates/{update-swap-stage.d.ts → install/update-swap-stage.d.ts} +2 -2
- package/dist/updates/{update-swap-stage.js → install/update-swap-stage.js} +7 -6
- package/dist/updates/{update-swap.d.ts → install/update-swap.d.ts} +1 -1
- package/dist/updates/{update-swap.js → install/update-swap.js} +5 -5
- package/dist/updates/install-target.d.ts +8 -0
- package/dist/updates/install-target.js +27 -0
- package/dist/updates/{launch-environment.js → launch/launch-environment.js} +1 -1
- package/dist/updates/{packaged-launch-admission.js → launch/packaged-launch-admission.js} +4 -4
- package/dist/updates/{packaged-update-startup.d.ts → launch/packaged-update-startup.d.ts} +3 -3
- package/dist/updates/{packaged-update-startup.js → launch/packaged-update-startup.js} +10 -7
- package/dist/updates/{update-launch-gate.d.ts → launch/update-launch-gate.d.ts} +1 -1
- package/dist/updates/{update-launch-gate.js → launch/update-launch-gate.js} +9 -9
- package/dist/updates/{update-launch.d.ts → launch/update-launch.d.ts} +1 -1
- package/dist/updates/{update-launch.js → launch/update-launch.js} +2 -2
- package/dist/updates/{linux-process-state.js → locks/linux-process-state.js} +1 -1
- package/dist/updates/{native-file-lock.js → locks/native-file-lock.js} +1 -1
- package/dist/updates/{stable-file.js → locks/stable-file.js} +2 -2
- package/dist/updates/{update-download-lock.js → locks/update-download-lock.js} +1 -1
- package/dist/updates/{update-generation-lease.js → locks/update-generation-lease.js} +3 -3
- package/dist/updates/{update-inherited-launch-lease.d.ts → locks/update-inherited-launch-lease.d.ts} +1 -1
- package/dist/updates/{update-inherited-launch-lease.js → locks/update-inherited-launch-lease.js} +2 -2
- package/dist/updates/{update-instance-lease.js → locks/update-instance-lease.js} +2 -2
- package/dist/updates/{update-lock.js → locks/update-lock.js} +2 -2
- package/dist/updates/{update-process-fence.js → locks/update-process-fence.js} +3 -3
- package/dist/updates/{update-process-liveness.js → locks/update-process-liveness.js} +2 -2
- package/dist/updates/retained-client-assets.d.ts +60 -0
- package/dist/updates/retained-client-assets.js +116 -0
- package/dist/updates/retention/retention-cleanup.d.ts +103 -0
- package/dist/updates/retention/retention-cleanup.js +439 -0
- package/dist/updates/retention/retention-prune-progress.d.ts +27 -0
- package/dist/updates/retention/retention-prune-progress.js +203 -0
- package/dist/updates/retention/retirement-inventory.d.ts +93 -0
- package/dist/updates/retention/retirement-inventory.js +373 -0
- package/dist/updates/retention/retirement-records.d.ts +75 -0
- package/dist/updates/retention/retirement-records.js +309 -0
- package/dist/updates/{update-retention-marker.d.ts → retention/update-retention-marker.d.ts} +1 -1
- package/dist/updates/{update-retention-marker.js → retention/update-retention-marker.js} +3 -3
- package/dist/updates/{update-retention-plan.d.ts → retention/update-retention-plan.d.ts} +1 -1
- package/dist/updates/{update-retention-plan.js → retention/update-retention-plan.js} +2 -2
- package/dist/updates/{update-retention-sync.d.ts → retention/update-retention-sync.d.ts} +1 -1
- package/dist/updates/{update-retention-sync.js → retention/update-retention-sync.js} +2 -2
- package/dist/updates/retention/update-retirement.d.ts +26 -0
- package/dist/updates/retention/update-retirement.js +205 -0
- package/dist/updates/update-adapter.js +1 -1
- package/dist/updates/update-channel-store.d.ts +1 -1
- package/dist/updates/update-channel-store.js +2 -2
- package/dist/updates/update-manager.d.ts +4 -4
- package/dist/updates/update-manager.js +5 -5
- package/dist/updates/update-services.d.ts +15 -0
- package/dist/updates/update-services.js +77 -0
- package/dist/updates/update-state-store.d.ts +2 -2
- package/dist/updates/update-state-store.js +2 -2
- package/dist/views/appearance-surface.js +3 -1
- package/package.json +29 -29
- package/src/appearance/custom-theme-library.ts +42 -956
- package/src/appearance/theme-library-mutation.ts +288 -0
- package/src/appearance/theme-library-schema.ts +347 -0
- package/src/appearance/theme-library-store.ts +379 -0
- package/src/updates/update-adapter.ts +1 -1
- package/dist/updates/update-retirement.d.ts +0 -205
- package/dist/updates/update-retirement.js +0 -1485
- /package/dist/installer/{installer-archive.d.ts → installer-archive-members.d.ts} +0 -0
- /package/dist/updates/{packaged-release-config.d.ts → feed/packaged-release-config.d.ts} +0 -0
- /package/dist/updates/{release-feed.d.ts → feed/release-feed.d.ts} +0 -0
- /package/dist/updates/{release-location.d.ts → feed/release-location.d.ts} +0 -0
- /package/dist/updates/{release-version.d.ts → feed/release-version.d.ts} +0 -0
- /package/dist/updates/{signed-release.d.ts → feed/signed-release.d.ts} +0 -0
- /package/dist/updates/{update-discovery.d.ts → feed/update-discovery.d.ts} +0 -0
- /package/dist/updates/{update-shutdown.d.ts → helper/update-shutdown.d.ts} +0 -0
- /package/dist/updates/{update-marker.d.ts → install/update-marker.d.ts} +0 -0
- /package/dist/updates/{launch-environment.d.ts → launch/launch-environment.d.ts} +0 -0
- /package/dist/updates/{packaged-launch-admission.d.ts → launch/packaged-launch-admission.d.ts} +0 -0
- /package/dist/updates/{linux-process-state.d.ts → locks/linux-process-state.d.ts} +0 -0
- /package/dist/updates/{native-file-lock.d.ts → locks/native-file-lock.d.ts} +0 -0
- /package/dist/updates/{stable-file.d.ts → locks/stable-file.d.ts} +0 -0
- /package/dist/updates/{update-download-lock.d.ts → locks/update-download-lock.d.ts} +0 -0
- /package/dist/updates/{update-generation-lease.d.ts → locks/update-generation-lease.d.ts} +0 -0
- /package/dist/updates/{update-instance-lease.d.ts → locks/update-instance-lease.d.ts} +0 -0
- /package/dist/updates/{update-lock.d.ts → locks/update-lock.d.ts} +0 -0
- /package/dist/updates/{update-process-fence.d.ts → locks/update-process-fence.d.ts} +0 -0
- /package/dist/updates/{update-process-liveness.d.ts → locks/update-process-liveness.d.ts} +0 -0
- /package/src/updates/{release-version.ts → feed/release-version.ts} +0 -0
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import { toUiVariant } from "./theme-library-schema.js";
|
|
2
|
+
import { defaultPreferenceStorage, quarantineRecord } from "@adea-ai/ui/lib/preference-store";
|
|
3
|
+
// src/appearance/theme-library-store.ts
|
|
4
|
+
var CUSTOM_THEME_LIBRARY_STORAGE_KEY = "appearance.library";
|
|
5
|
+
/**
|
|
6
|
+
* Where an unreadable library is quarantined. It is its own key: the library and
|
|
7
|
+
* the appearance preference used to share `appearance.recovery`, so one could
|
|
8
|
+
* overwrite the other's capture.
|
|
9
|
+
*/
|
|
10
|
+
var CUSTOM_THEME_LIBRARY_RECOVERY_KEY = "appearance.library.recovery";
|
|
11
|
+
var CUSTOM_THEME_LIBRARY_VERSION = 1;
|
|
12
|
+
var CUSTOM_THEME_ID_PREFIX = "custom-";
|
|
13
|
+
var libraryHost = globalThis;
|
|
14
|
+
function library() {
|
|
15
|
+
const existing = libraryHost.__ADEA_THEME_LIBRARY__;
|
|
16
|
+
if (existing && Array.isArray(existing.themes) && existing.listeners) return existing;
|
|
17
|
+
const created = {
|
|
18
|
+
themes: [],
|
|
19
|
+
listeners: existing?.listeners ?? /* @__PURE__ */ new Set(),
|
|
20
|
+
atomicMutationDepth: 0
|
|
21
|
+
};
|
|
22
|
+
libraryHost.__ADEA_THEME_LIBRARY__ = created;
|
|
23
|
+
return created;
|
|
24
|
+
}
|
|
25
|
+
function replaceThemes(themes) {
|
|
26
|
+
const state = library();
|
|
27
|
+
state.themes = Object.freeze([...themes]);
|
|
28
|
+
state.uiVariants = void 0;
|
|
29
|
+
}
|
|
30
|
+
/** The imported themes' stored variants, in import order. */
|
|
31
|
+
function customThemeVariants() {
|
|
32
|
+
return library().themes.map((theme) => theme.variant);
|
|
33
|
+
}
|
|
34
|
+
/** Find one stored variant without projecting the rest of the imported library. */
|
|
35
|
+
function customThemeVariantById(id) {
|
|
36
|
+
return library().themes.find((theme) => theme.variant.id === id)?.variant;
|
|
37
|
+
}
|
|
38
|
+
/** The imported themes as shared-provider variants: what the provider's `themes` takes. */
|
|
39
|
+
function customUiVariants() {
|
|
40
|
+
const state = library();
|
|
41
|
+
state.uiVariants ??= Object.freeze(state.themes.map(toUiVariant));
|
|
42
|
+
return state.uiVariants;
|
|
43
|
+
}
|
|
44
|
+
function handlePersistentLibraryChange(event) {
|
|
45
|
+
if (event.key !== "appearance.library" && event.key !== null) return;
|
|
46
|
+
const storage = defaultPreferenceStorage();
|
|
47
|
+
if (!storage || event.storageArea !== storage) return;
|
|
48
|
+
readCustomThemeLibrary(storage);
|
|
49
|
+
}
|
|
50
|
+
function observePersistentLibraryChanges() {
|
|
51
|
+
const state = library();
|
|
52
|
+
if (state.storageEventTarget || typeof window === "undefined") return;
|
|
53
|
+
const target = window;
|
|
54
|
+
const listener = handlePersistentLibraryChange;
|
|
55
|
+
state.storageEventTarget = target;
|
|
56
|
+
state.storageEventListener = listener;
|
|
57
|
+
target.addEventListener("storage", listener);
|
|
58
|
+
}
|
|
59
|
+
function subscribeCustomThemes(listener) {
|
|
60
|
+
observePersistentLibraryChanges();
|
|
61
|
+
const { listeners } = library();
|
|
62
|
+
listeners.add(listener);
|
|
63
|
+
return () => listeners.delete(listener);
|
|
64
|
+
}
|
|
65
|
+
function notifyCustomThemes() {
|
|
66
|
+
const { listeners } = library();
|
|
67
|
+
for (const listener of [...listeners]) {
|
|
68
|
+
if (!listeners.has(listener)) continue;
|
|
69
|
+
try {
|
|
70
|
+
Promise.resolve(listener()).catch(() => {});
|
|
71
|
+
} catch {}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
function isCustomThemeId(id) {
|
|
75
|
+
return id.startsWith(CUSTOM_THEME_ID_PREFIX);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Replace the in-memory imported-theme set and tell subscribers. Durable mutations
|
|
79
|
+
* must use `mutateCustomThemeLibrary`; this deprecated synchronous API fails closed
|
|
80
|
+
* when a storage adapter is supplied because it cannot acquire the shared lock.
|
|
81
|
+
*
|
|
82
|
+
* @deprecated Use `mutateCustomThemeLibrary` for persisted read/modify/write operations.
|
|
83
|
+
*/
|
|
84
|
+
function setCustomThemes(themes, storage) {
|
|
85
|
+
if ((library().atomicMutationDepth ?? 0) > 0) return false;
|
|
86
|
+
if (storage) return false;
|
|
87
|
+
replaceThemes(namespaceCustomThemes(themes));
|
|
88
|
+
notifyCustomThemes();
|
|
89
|
+
return true;
|
|
90
|
+
}
|
|
91
|
+
function namespaceCustomThemes(themes) {
|
|
92
|
+
return themes.map((theme) => {
|
|
93
|
+
if (isCustomThemeId(theme.id)) return theme;
|
|
94
|
+
const id = `${CUSTOM_THEME_ID_PREFIX}${theme.id}`;
|
|
95
|
+
return {
|
|
96
|
+
...theme,
|
|
97
|
+
id,
|
|
98
|
+
variant: {
|
|
99
|
+
...theme.variant,
|
|
100
|
+
id
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
var object = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
106
|
+
var fields = (value, names) => object(value) && names.every((name) => typeof value[name] === "string");
|
|
107
|
+
function isStoredTheme(entry) {
|
|
108
|
+
if (!object(entry) || !object(entry.variant)) return false;
|
|
109
|
+
const theme = entry;
|
|
110
|
+
const variant = entry.variant;
|
|
111
|
+
return typeof theme.id === "string" && typeof theme.name === "string" && (theme.appearance === "light" || theme.appearance === "dark") && typeof theme.importedAt === "string" && fields(variant, [
|
|
112
|
+
"id",
|
|
113
|
+
"familyId",
|
|
114
|
+
"familyName",
|
|
115
|
+
"name"
|
|
116
|
+
]) && (variant.appearance === "light" || variant.appearance === "dark") && fields(variant.colors, [
|
|
117
|
+
"background",
|
|
118
|
+
"foreground",
|
|
119
|
+
"card",
|
|
120
|
+
"cardForeground",
|
|
121
|
+
"popover",
|
|
122
|
+
"popoverForeground",
|
|
123
|
+
"primary",
|
|
124
|
+
"primaryForeground",
|
|
125
|
+
"secondary",
|
|
126
|
+
"secondaryForeground",
|
|
127
|
+
"muted",
|
|
128
|
+
"mutedForeground",
|
|
129
|
+
"accent",
|
|
130
|
+
"accentForeground",
|
|
131
|
+
"destructive",
|
|
132
|
+
"destructiveAction",
|
|
133
|
+
"destructiveActionForeground",
|
|
134
|
+
"success",
|
|
135
|
+
"border",
|
|
136
|
+
"input",
|
|
137
|
+
"ring"
|
|
138
|
+
]) && fields(variant.terminal, [
|
|
139
|
+
"background",
|
|
140
|
+
"foreground",
|
|
141
|
+
"cursor",
|
|
142
|
+
"selection"
|
|
143
|
+
]) && object(variant.terminal) && Array.isArray(variant.terminal.ansi) && variant.terminal.ansi.length === 16 && variant.terminal.ansi.every((color) => typeof color === "string") && fields(variant.editor, [
|
|
144
|
+
"keyword",
|
|
145
|
+
"string",
|
|
146
|
+
"number",
|
|
147
|
+
"comment",
|
|
148
|
+
"function",
|
|
149
|
+
"variable",
|
|
150
|
+
"type",
|
|
151
|
+
"tag",
|
|
152
|
+
"attribute",
|
|
153
|
+
"operator",
|
|
154
|
+
"heading",
|
|
155
|
+
"link",
|
|
156
|
+
"diffAdd",
|
|
157
|
+
"diffDelete",
|
|
158
|
+
"diffHunk",
|
|
159
|
+
"searchMatch"
|
|
160
|
+
]) && fields(variant.charts, [
|
|
161
|
+
"chart1",
|
|
162
|
+
"chart2",
|
|
163
|
+
"chart3",
|
|
164
|
+
"chart4",
|
|
165
|
+
"chart5",
|
|
166
|
+
"chart6"
|
|
167
|
+
]) && object(theme.flatTokens) && Object.values(theme.flatTokens).every((value) => typeof value === "string") && Array.isArray(theme.notes) && theme.notes.every((note) => typeof note === "string");
|
|
168
|
+
}
|
|
169
|
+
function parseLibrary(raw) {
|
|
170
|
+
let value;
|
|
171
|
+
try {
|
|
172
|
+
value = JSON.parse(raw);
|
|
173
|
+
} catch {
|
|
174
|
+
return {
|
|
175
|
+
themes: [],
|
|
176
|
+
reason: "corrupt_json"
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
if (!object(value) || value.version !== 1 || !Array.isArray(value.themes)) return {
|
|
180
|
+
themes: [],
|
|
181
|
+
reason: "unsupported_record"
|
|
182
|
+
};
|
|
183
|
+
const themes = value.themes.filter(isStoredTheme);
|
|
184
|
+
return themes.length === value.themes.length ? { themes } : {
|
|
185
|
+
themes,
|
|
186
|
+
reason: "unsupported_record"
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
function preserveLibrary(storage, raw, reason) {
|
|
190
|
+
if (!storage.getItem("appearance.library.recovery")) quarantineRecord(storage, CUSTOM_THEME_LIBRARY_RECOVERY_KEY, raw, reason);
|
|
191
|
+
const saved = storage.getItem(CUSTOM_THEME_LIBRARY_RECOVERY_KEY);
|
|
192
|
+
try {
|
|
193
|
+
const capture = saved && JSON.parse(saved);
|
|
194
|
+
return object(capture) && capture.schemaVersion === 1 && capture.raw === raw;
|
|
195
|
+
} catch {
|
|
196
|
+
return false;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Read the stored library. A malformed document starts an empty library and
|
|
201
|
+
* quarantines the raw bytes into the library's own recovery key, mirroring the
|
|
202
|
+
* appearance-preference recovery contract; individual invalid records are dropped,
|
|
203
|
+
* not fatal.
|
|
204
|
+
*/
|
|
205
|
+
function readCustomThemeLibrary(storage) {
|
|
206
|
+
if (!storage) return [];
|
|
207
|
+
const result = tryReadCustomThemeLibrary(storage);
|
|
208
|
+
if (result?.changed) notifyCustomThemes();
|
|
209
|
+
return result?.themes ?? [];
|
|
210
|
+
}
|
|
211
|
+
function sameThemeValue(left, right) {
|
|
212
|
+
if (Object.is(left, right)) return true;
|
|
213
|
+
if (!left || !right || typeof left !== "object" || typeof right !== "object") return false;
|
|
214
|
+
if (Array.isArray(left) || Array.isArray(right)) {
|
|
215
|
+
if (!Array.isArray(left) || !Array.isArray(right) || left.length !== right.length) return false;
|
|
216
|
+
if (Object.getPrototypeOf(left) !== Array.prototype) return false;
|
|
217
|
+
if (Reflect.ownKeys(left).length !== left.length + 1) return false;
|
|
218
|
+
for (let index = 0; index < left.length; index++) {
|
|
219
|
+
const entry = Object.getOwnPropertyDescriptor(left, index);
|
|
220
|
+
if (!entry || !entry.enumerable || !("value" in entry)) return false;
|
|
221
|
+
if (!sameThemeValue(entry.value, right[index])) return false;
|
|
222
|
+
}
|
|
223
|
+
return true;
|
|
224
|
+
}
|
|
225
|
+
if (Object.getPrototypeOf(left) !== Object.prototype) return false;
|
|
226
|
+
const leftKeys = Object.keys(left);
|
|
227
|
+
const rightKeys = Object.keys(right);
|
|
228
|
+
if (leftKeys.length !== rightKeys.length || Reflect.ownKeys(left).length !== leftKeys.length) return false;
|
|
229
|
+
const rightRecord = right;
|
|
230
|
+
return leftKeys.every((key) => {
|
|
231
|
+
const entry = Object.getOwnPropertyDescriptor(left, key);
|
|
232
|
+
return !!entry && "value" in entry && Object.hasOwn(rightRecord, key) && sameThemeValue(entry.value, rightRecord[key]);
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
/** A failed read must not be confused with a successfully read empty library. */
|
|
236
|
+
function tryReadCustomThemeLibrary(storage) {
|
|
237
|
+
const state = library();
|
|
238
|
+
const previousThemes = state.themes;
|
|
239
|
+
try {
|
|
240
|
+
const raw = storage.getItem(CUSTOM_THEME_LIBRARY_STORAGE_KEY);
|
|
241
|
+
const { themes, reason } = raw ? parseLibrary(raw) : { themes: [] };
|
|
242
|
+
if (raw && reason) preserveLibrary(storage, raw, reason);
|
|
243
|
+
let changed = true;
|
|
244
|
+
try {
|
|
245
|
+
changed = !sameThemeValue(previousThemes, themes);
|
|
246
|
+
} catch {}
|
|
247
|
+
if (storage.getItem("appearance.library") !== raw || library() !== state || state.themes !== previousThemes) return void 0;
|
|
248
|
+
if (changed) replaceThemes(themes);
|
|
249
|
+
return {
|
|
250
|
+
themes: changed ? themes : previousThemes,
|
|
251
|
+
changed
|
|
252
|
+
};
|
|
253
|
+
} catch {
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Synchronous legacy removal for the in-memory library. Passing storage fails closed;
|
|
259
|
+
* use `removeCustomThemeAtomically` for persisted removals.
|
|
260
|
+
*
|
|
261
|
+
* @deprecated Use `removeCustomThemeAtomically` for persisted removals.
|
|
262
|
+
*/
|
|
263
|
+
function removeCustomTheme(id, storage) {
|
|
264
|
+
if (storage) return false;
|
|
265
|
+
const themes = library().themes;
|
|
266
|
+
return setCustomThemes(themes.filter((theme) => theme.id !== id), storage);
|
|
267
|
+
}
|
|
268
|
+
export { CUSTOM_THEME_LIBRARY_RECOVERY_KEY, CUSTOM_THEME_LIBRARY_STORAGE_KEY, CUSTOM_THEME_LIBRARY_VERSION, customThemeVariantById, customThemeVariants, customUiVariants, library, namespaceCustomThemes, notifyCustomThemes, parseLibrary, preserveLibrary, readCustomThemeLibrary, removeCustomTheme, replaceThemes, setCustomThemes, subscribeCustomThemes };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import "./appearance-preferences.js";
|
|
2
|
-
import {
|
|
2
|
+
import { storedVariantRecord } from "./theme-library-schema.js";
|
|
3
|
+
import { customThemeVariantById, customThemeVariants } from "./theme-library-store.js";
|
|
4
|
+
import "./custom-theme-library.js";
|
|
3
5
|
import { themeRegistry } from "./theme-registry.js";
|
|
4
6
|
import { accentRolesForSelection, themeRecordById, themeRecords, tokensAsHex } from "@adea-ai/ui/lib/themes";
|
|
5
7
|
import { getAccent } from "@adea-ai/ui/lib/accent-presets";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { customUiVariants } from "./
|
|
1
|
+
import { customUiVariants } from "./theme-library-store.js";
|
|
2
|
+
import "./custom-theme-library.js";
|
|
2
3
|
import { builtinThemes } from "@adea-ai/ui/lib/themes";
|
|
3
4
|
// src/appearance/theme-registry.ts
|
|
4
5
|
var registriesByCustomVariants = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ServiceResult } from '../app/service-registry';
|
|
2
|
-
import type { FetchFunction } from '../updates/release-location';
|
|
2
|
+
import type { FetchFunction } from '../updates/feed/release-location';
|
|
3
3
|
type Bootstrap = (signal?: AbortSignal) => Promise<{
|
|
4
4
|
bootstrap: string;
|
|
5
5
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.37.
|
|
1
|
+
{"version":"0.37.1","commit":"bf77bd05ea8d9c9d143754b623909cf50bdc55d5"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { assertSidecarNames, sidecarBundlePath } from "../native/app-bundle.js";
|
|
2
2
|
import { runnerTemp } from "./hosted-runner.js";
|
|
3
3
|
import { assertBuildMetadata, assertInstallerContext, assertPayloadLayout, assertPortableAppName } from "./installer-layout.js";
|
|
4
|
-
import { hashFileAt } from "../updates/stable-file.js";
|
|
4
|
+
import { hashFileAt } from "../updates/locks/stable-file.js";
|
|
5
5
|
import { assertNativeExecutable } from "./native-executable.js";
|
|
6
|
-
import { assertArchiveUnchanged, findArchiveMember, isWithin } from "./installer-archive.js";
|
|
6
|
+
import { assertArchiveUnchanged, findArchiveMember, isWithin } from "./installer-archive-members.js";
|
|
7
7
|
import { lstat, open, realpath, rm } from "node:fs/promises";
|
|
8
8
|
import { join, resolve } from "node:path";
|
|
9
9
|
import { createHash } from "node:crypto";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { sameFile } from "../updates/stable-file.js";
|
|
1
|
+
import { sameFile } from "../updates/locks/stable-file.js";
|
|
2
2
|
import { assertNativeExecutable } from "./native-executable.js";
|
|
3
3
|
import { lstat, open } from "node:fs/promises";
|
|
4
4
|
import { isAbsolute, relative, sep } from "node:path";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
|
-
// src/installer/installer-archive.ts
|
|
6
|
+
// src/installer/installer-archive-members.ts
|
|
7
7
|
var EMBEDDED_ARCHIVE_MARKER = Buffer.from("ELECTROBUN_ARCHIVE_V1");
|
|
8
8
|
/** Whether `path` lies strictly inside `root`, judged lexically. */
|
|
9
9
|
function isWithin(root, path) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { runnerTemp } from "./hosted-runner.js";
|
|
2
2
|
import { assertInstallerContext, assertInstallerLayout, assertPortableAppName } from "./installer-layout.js";
|
|
3
|
-
import { hashFileAt } from "../updates/stable-file.js";
|
|
4
|
-
import { assertEmbeddedArchive, assertInstallerExecutable, extractArchiveMember, findArchiveMember, isWithin } from "./installer-archive.js";
|
|
3
|
+
import { hashFileAt } from "../updates/locks/stable-file.js";
|
|
4
|
+
import { assertEmbeddedArchive, assertInstallerExecutable, extractArchiveMember, findArchiveMember, isWithin } from "./installer-archive-members.js";
|
|
5
5
|
import { cleanupInstallerDirectoryAfterFailure, defaultInstallerImageMountIo, withInstallerImageRetries } from "./installer-image-mount.js";
|
|
6
6
|
import { runInstallerCommand } from "./installer-command.js";
|
|
7
7
|
import { verifyInstallerPayload } from "./installer-identity.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FetchFunction } from '../updates/release-location';
|
|
1
|
+
import type { FetchFunction } from '../updates/feed/release-location';
|
|
2
2
|
/** CI preflight only: block external fetches while recording unexpected activity.
|
|
3
3
|
* This does not intercept sockets, subprocesses, or webview networking. */
|
|
4
4
|
export declare function installInstallerFetchGuard(options: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { assertInstallerContext, assertInstallerHost, assertInstallerLayout, assertPortableAppName } from "./installer-layout.js";
|
|
2
|
-
import { hashFileAt } from "../updates/stable-file.js";
|
|
3
|
-
import { assertEmbeddedArchive, assertInstallerExecutable, extractArchiveMember, findArchiveMember, isWithin, normalizeArchiveMember } from "./installer-archive.js";
|
|
2
|
+
import { hashFileAt } from "../updates/locks/stable-file.js";
|
|
3
|
+
import { assertEmbeddedArchive, assertInstallerExecutable, extractArchiveMember, findArchiveMember, isWithin, normalizeArchiveMember } from "./installer-archive-members.js";
|
|
4
4
|
import { InstallerImageLifecycleError, cleanupInstallerDirectoryAfterFailure, defaultInstallerImageMountIo, installerImageMountState, withInstallerImageRetries } from "./installer-image-mount.js";
|
|
5
5
|
import { runInstallerCommand } from "./installer-command.js";
|
|
6
6
|
import { lstat, mkdtemp, readdir, realpath } from "node:fs/promises";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type InstallerPlatform, type InstallerRenderer } from './installer-layout';
|
|
2
2
|
import { type InstallerRendererObservation } from './installer-renderer-evidence';
|
|
3
3
|
import { type Artifact, type OfflinePolicy, type RendererEvidence } from '../release/release-qualification';
|
|
4
|
-
import type { ReleaseTrust, VerifiedRelease } from '../updates/signed-release';
|
|
4
|
+
import type { ReleaseTrust, VerifiedRelease } from '../updates/feed/signed-release';
|
|
5
5
|
/** Whether the runner should start the installed app on this loop iteration.
|
|
6
6
|
*
|
|
7
7
|
* Electrobun's Windows and Linux extractors (since 2.0.1, `launchInstalledApp` in
|
|
@@ -7,8 +7,8 @@ import { prepareInstallerExecution } from "./installer-extraction.js";
|
|
|
7
7
|
import { assertInstallerRendererObservation } from "./installer-renderer-evidence.js";
|
|
8
8
|
import { extractCandidateRuntime, verifyInstalledPayload } from "./installed-payload.js";
|
|
9
9
|
import { terminateGuardedWorker } from "./installer-process-cleanup.js";
|
|
10
|
-
import { swapUpdateTree } from "../updates/update-swap.js";
|
|
11
|
-
import { stageUpdateSwap } from "../updates/update-swap-stage.js";
|
|
10
|
+
import { swapUpdateTree } from "../updates/install/update-swap.js";
|
|
11
|
+
import { stageUpdateSwap } from "../updates/install/update-swap-stage.js";
|
|
12
12
|
import { chmod, lstat, mkdir, readFile, realpath, writeFile } from "node:fs/promises";
|
|
13
13
|
import { delimiter, dirname, join } from "node:path";
|
|
14
14
|
import { randomBytes } from "node:crypto";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { InstallerPlatform, InstallerRenderer } from './installer-layout';
|
|
2
2
|
import type { RendererEvidence } from '../release/release-qualification';
|
|
3
|
-
import type { FetchFunction } from '../updates/release-location';
|
|
4
|
-
import { type ReleaseDescriptor } from '../updates/signed-release';
|
|
3
|
+
import type { FetchFunction } from '../updates/feed/release-location';
|
|
4
|
+
import { type ReleaseDescriptor } from '../updates/feed/signed-release';
|
|
5
5
|
export type UpgradeReceipt = {
|
|
6
6
|
schema: 1;
|
|
7
7
|
tag: string;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { versionLessThan } from "../updates/release-version.js";
|
|
1
|
+
import { versionLessThan } from "../updates/feed/release-version.js";
|
|
2
2
|
import { errorCode, isRecord } from "../app/value-guards.js";
|
|
3
|
-
import { verifyReleaseDescriptor } from "../updates/signed-release.js";
|
|
4
|
-
import { feedUrl } from "../updates/release-feed.js";
|
|
3
|
+
import { verifyReleaseDescriptor } from "../updates/feed/signed-release.js";
|
|
4
|
+
import { feedUrl } from "../updates/feed/release-feed.js";
|
|
5
5
|
import { parseReleaseConfig } from "../release/release-config.js";
|
|
6
6
|
import { planReleaseAssets } from "../release/release-assets-plan.js";
|
|
7
7
|
import { observeInstalledApp } from "./installer-observation.js";
|
|
8
8
|
import { downloadAsset } from "./upgrade-asset-download.js";
|
|
9
|
-
import { discoverSignedRelease } from "../updates/update-discovery.js";
|
|
10
|
-
import { downloadVerifiedRelease } from "../updates/update-download.js";
|
|
9
|
+
import { discoverSignedRelease } from "../updates/feed/update-discovery.js";
|
|
10
|
+
import { downloadVerifiedRelease } from "../updates/install/update-download.js";
|
|
11
11
|
import { lstat, mkdir, open, rename, writeFile } from "node:fs/promises";
|
|
12
12
|
import { join, resolve } from "node:path";
|
|
13
13
|
// src/installer/installer-upgrade-command.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { linuxProcessIsExited } from "../updates/linux-process-state.js";
|
|
1
|
+
import { linuxProcessIsExited } from "../updates/locks/linux-process-state.js";
|
|
2
2
|
import { readFile, readdir, readlink } from "node:fs/promises";
|
|
3
3
|
// src/installer/linux-process-group.ts
|
|
4
4
|
var proc = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { open } from 'node:fs/promises';
|
|
2
|
-
import { type FetchFunction } from '../updates/release-location';
|
|
2
|
+
import { type FetchFunction } from '../updates/feed/release-location';
|
|
3
3
|
/** Download one published release asset and check it against its release.json inventory. */
|
|
4
4
|
export declare function downloadAsset(options: {
|
|
5
5
|
/** The app's feed URL, ending in `/`. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { isFeedAssetName, isFeedTag, parseFeedRelease } from "../updates/release-feed.js";
|
|
1
|
+
import { isFeedAssetName, isFeedTag, parseFeedRelease } from "../updates/feed/release-feed.js";
|
|
2
2
|
import { discardStream } from "../shared/discard-stream.js";
|
|
3
|
-
import { fetchReleaseLocation, readReleaseJson } from "../updates/release-location.js";
|
|
3
|
+
import { fetchReleaseLocation, readReleaseJson } from "../updates/feed/release-location.js";
|
|
4
4
|
import { writeAll } from "./write-all.js";
|
|
5
5
|
import { open, unlink } from "node:fs/promises";
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FeedRelease, ReleaseLedger } from '../updates/release-feed';
|
|
1
|
+
import type { FeedRelease, ReleaseLedger } from '../updates/feed/release-feed';
|
|
2
2
|
import { type GitRun } from './local-provenance';
|
|
3
3
|
import type { ReleaseCutProvider } from './release-cut';
|
|
4
4
|
import type { HistoryRewrite } from './release-config';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type FeedChannel, type FeedRelease, type ReleaseFeed, type ReleaseLedger } from '../updates/release-feed';
|
|
2
|
-
import { type FetchFunction } from '../updates/release-location';
|
|
1
|
+
import { type FeedChannel, type FeedRelease, type ReleaseFeed, type ReleaseLedger } from '../updates/feed/release-feed';
|
|
2
|
+
import { type FetchFunction } from '../updates/feed/release-location';
|
|
3
3
|
/** The published ledger, or an empty one before the app's first release. */
|
|
4
4
|
export declare function readFeedLedger(feed: ReleaseFeed, fetcher: FetchFunction): Promise<ReleaseLedger>;
|
|
5
5
|
/** A tag's published release.json, or null when none is published. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { verifyReleaseDescriptor, verifyReleaseStream } from "../updates/signed-release.js";
|
|
2
|
-
import { feedUrl, parseFeedRelease, parseReleaseLedger } from "../updates/release-feed.js";
|
|
1
|
+
import { verifyReleaseDescriptor, verifyReleaseStream } from "../updates/feed/signed-release.js";
|
|
2
|
+
import { feedUrl, parseFeedRelease, parseReleaseLedger } from "../updates/feed/release-feed.js";
|
|
3
3
|
import { discoveryPolicies } from "./release-config.js";
|
|
4
4
|
import { discardStream } from "../shared/discard-stream.js";
|
|
5
|
-
import { fetchReleaseLocation, readReleaseBytes } from "../updates/release-location.js";
|
|
5
|
+
import { fetchReleaseLocation, readReleaseBytes } from "../updates/feed/release-location.js";
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
7
7
|
// src/release/feed-state.ts
|
|
8
8
|
var MAX_LEDGER_BYTES = 1048576;
|
|
@@ -3,7 +3,7 @@ import { containsAsciiControl } from "../desktop/string-policy.js";
|
|
|
3
3
|
import { githubCli } from "./github-cli.js";
|
|
4
4
|
import { verifyReleaseProvenance } from "./github-release-provenance.js";
|
|
5
5
|
import { lookupRelease } from "./github-release-lookup.js";
|
|
6
|
-
import { isRepositorySlug } from "../updates/signed-release.js";
|
|
6
|
+
import { isRepositorySlug } from "../updates/feed/signed-release.js";
|
|
7
7
|
import { qualifyGitHubRelease } from "./github-release-qualification.js";
|
|
8
8
|
import { workflowFile } from "./release-config.js";
|
|
9
9
|
// src/release/github-release-cut.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { githubCli } from "./github-cli.js";
|
|
2
|
-
import { assertRepositorySlug } from "../updates/signed-release.js";
|
|
2
|
+
import { assertRepositorySlug } from "../updates/feed/signed-release.js";
|
|
3
3
|
import { qualifyGitHubRelease } from "./github-release-qualification.js";
|
|
4
4
|
// src/release/github-release-promotion.ts
|
|
5
5
|
function normalizePromotionRelease(value) {
|
|
@@ -3,7 +3,7 @@ import { githubCli } from "./github-cli.js";
|
|
|
3
3
|
import { listGitHubReleaseAssets } from "./github-release-assets.js";
|
|
4
4
|
import { verifyReleaseProvenance } from "./github-release-provenance.js";
|
|
5
5
|
import { lookupRelease } from "./github-release-lookup.js";
|
|
6
|
-
import { isRepositorySlug } from "../updates/signed-release.js";
|
|
6
|
+
import { isRepositorySlug } from "../updates/feed/signed-release.js";
|
|
7
7
|
// src/release/github-release-publisher.ts
|
|
8
8
|
/** GitHub adapter; callers must run it in a trusted release job with GH_TOKEN. */
|
|
9
9
|
function createGitHubReleasePublisher(options) {
|
|
@@ -3,7 +3,7 @@ import { validateQualificationRun, validateReleaseQualification } from "./releas
|
|
|
3
3
|
import { listGitHubReleaseAssets } from "./github-release-assets.js";
|
|
4
4
|
import { verifyReleaseProvenance } from "./github-release-provenance.js";
|
|
5
5
|
import { lookupRelease } from "./github-release-lookup.js";
|
|
6
|
-
import { isRepositorySlug } from "../updates/signed-release.js";
|
|
6
|
+
import { isRepositorySlug } from "../updates/feed/signed-release.js";
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
8
8
|
// src/release/github-release-qualification.ts
|
|
9
9
|
/** Verify immutable GitHub release assets and the exact successful workflow attempt. */
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* object keys and an ordered upload plan; the caller uploads it with its own credentials.
|
|
6
6
|
*/
|
|
7
7
|
import { type KeyObject } from 'node:crypto';
|
|
8
|
-
import { type FeedChannel } from '../updates/release-feed';
|
|
9
|
-
import type { FetchFunction } from '../updates/release-location';
|
|
8
|
+
import { type FeedChannel } from '../updates/feed/release-feed';
|
|
9
|
+
import type { FetchFunction } from '../updates/feed/release-location';
|
|
10
10
|
import { type GitRun } from './local-provenance';
|
|
11
11
|
import { type ReleasePlatform } from './release-config';
|
|
12
12
|
/** One object to upload, in plan order; the staged file is `<out>/<key>`. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { versionLessThan } from "../updates/release-version.js";
|
|
1
|
+
import { versionLessThan } from "../updates/feed/release-version.js";
|
|
2
2
|
import { errorCode, isGitSha, isRecord } from "../app/value-guards.js";
|
|
3
3
|
import { renameExclusive } from "../native/native-rename.js";
|
|
4
|
-
import { verifyReleaseDescriptor } from "../updates/signed-release.js";
|
|
5
|
-
import { feedAssetKey, feedChannelKey, feedIndexKey, feedReleaseKey, feedUrl, parseReleaseLedger } from "../updates/release-feed.js";
|
|
4
|
+
import { verifyReleaseDescriptor } from "../updates/feed/signed-release.js";
|
|
5
|
+
import { feedAssetKey, feedChannelKey, feedIndexKey, feedReleaseKey, feedUrl, parseReleaseLedger } from "../updates/feed/release-feed.js";
|
|
6
6
|
import { discoveryPolicies, parseReleaseConfig, platformPayloads, platformTargets } from "./release-config.js";
|
|
7
7
|
import { cutRelease, nextDevVersion } from "./release-cut.js";
|
|
8
8
|
import { resolveLocalProvenance } from "./local-provenance.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type KeyObject } from 'node:crypto';
|
|
2
|
-
import { type ReleaseDescriptor, type SignedRelease } from '../updates/signed-release';
|
|
2
|
+
import { type ReleaseDescriptor, type SignedRelease } from '../updates/feed/signed-release';
|
|
3
3
|
export type ReleaseArtifactIdentity = Omit<ReleaseDescriptor, 'schema' | 'asset'>;
|
|
4
4
|
/** Hash the actual staged archive without buffering it, then sign its provenance and its
|
|
5
5
|
* URL in the app's release feed (`feed` ends in `/`). */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { signReleaseDescriptor } from "../updates/signed-release.js";
|
|
2
|
-
import { hashUnchangedFile } from "../updates/stable-file.js";
|
|
1
|
+
import { signReleaseDescriptor } from "../updates/feed/signed-release.js";
|
|
2
|
+
import { hashUnchangedFile } from "../updates/locks/stable-file.js";
|
|
3
3
|
import { open } from "node:fs/promises";
|
|
4
4
|
import { basename } from "node:path";
|
|
5
5
|
// src/release/release-artifact.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isGitSha } from "../app/value-guards.js";
|
|
2
2
|
import { githubCli, verifyWorkflowAttempt } from "./github-cli.js";
|
|
3
|
-
import { isRepositorySlug } from "../updates/signed-release.js";
|
|
3
|
+
import { isRepositorySlug } from "../updates/feed/signed-release.js";
|
|
4
4
|
import { hostedReleaseWorkflows, parseReleaseConfig } from "./release-config.js";
|
|
5
5
|
import { createGitHubReleaseCutProvider } from "./github-release-cut.js";
|
|
6
6
|
// src/release/release-assets-plan.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Requirements } from './release-qualification';
|
|
2
|
-
import { type ReleaseFeed } from '../updates/release-feed';
|
|
2
|
+
import { type ReleaseFeed } from '../updates/feed/release-feed';
|
|
3
3
|
/** The descriptor target each release platform publishes for. */
|
|
4
4
|
export declare const platformTargets: {
|
|
5
5
|
readonly 'macos-arm64': readonly ['darwin', 'arm64'];
|
|
@@ -2,7 +2,7 @@ import { isGitSha, isRecord } from "../app/value-guards.js";
|
|
|
2
2
|
import { containsAsciiControl } from "../desktop/string-policy.js";
|
|
3
3
|
import { assertSidecarNames } from "../native/app-bundle.js";
|
|
4
4
|
import { parseOfflinePolicy } from "./release-qualification.js";
|
|
5
|
-
import { parseReleaseFeed } from "../updates/release-feed.js";
|
|
5
|
+
import { parseReleaseFeed } from "../updates/feed/release-feed.js";
|
|
6
6
|
// src/release/release-config.ts
|
|
7
7
|
var strings = (value) => Array.isArray(value) && value.length > 0 && value.every((item) => typeof item === "string" && item.length <= 200 && /^[A-Za-z0-9][A-Za-z0-9._{}-]*$/.test(item) && !item.replaceAll("{tag}", "").includes("{") && !item.replaceAll("{tag}", "").includes("}")) && new Set(value).size === value.length;
|
|
8
8
|
var appIdPattern = /^[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)+$/;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { errorCode, isRecord } from "../app/value-guards.js";
|
|
2
2
|
import { validateCommandReceipts, validateInstallerReceipt } from "./release-qualification.js";
|
|
3
|
-
import { signReleaseDescriptor, verifyReleaseDescriptor } from "../updates/signed-release.js";
|
|
4
|
-
import { feedUrl } from "../updates/release-feed.js";
|
|
3
|
+
import { signReleaseDescriptor, verifyReleaseDescriptor } from "../updates/feed/signed-release.js";
|
|
4
|
+
import { feedUrl } from "../updates/feed/release-feed.js";
|
|
5
5
|
import { discoveryPolicies, parseReleaseConfig, platformPayloads, platformTargets } from "./release-config.js";
|
|
6
6
|
import { planReleaseAssets } from "./release-assets-plan.js";
|
|
7
|
-
import { hashFileAt } from "../updates/stable-file.js";
|
|
7
|
+
import { hashFileAt } from "../updates/locks/stable-file.js";
|
|
8
8
|
import { commandReceiptName } from "../installer/command-qualification-command.js";
|
|
9
9
|
import { lstat, readFile, writeFile } from "node:fs/promises";
|
|
10
10
|
import { join, resolve } from "node:path";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isGitSha } from "../app/value-guards.js";
|
|
2
2
|
import { githubCli } from "./github-cli.js";
|
|
3
3
|
import { lookupRelease } from "./github-release-lookup.js";
|
|
4
|
-
import { isRepositorySlug } from "../updates/signed-release.js";
|
|
4
|
+
import { isRepositorySlug } from "../updates/feed/signed-release.js";
|
|
5
5
|
import { qualifyGitHubRelease } from "./github-release-qualification.js";
|
|
6
6
|
import { hostedReleaseWorkflows, parseReleaseConfig } from "./release-config.js";
|
|
7
7
|
import { createGitHubReleaseCutProvider } from "./github-release-cut.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { versionLessThan } from "../updates/release-version.js";
|
|
1
|
+
import { versionLessThan } from "../updates/feed/release-version.js";
|
|
2
2
|
// src/release/release-promotion.ts
|
|
3
3
|
function order(a, b) {
|
|
4
4
|
return Date.parse(a.publishedAt) - Date.parse(b.publishedAt) || a.id - b.id;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ReleaseTrust } from '../updates/signed-release';
|
|
1
|
+
import { type ReleaseTrust } from '../updates/feed/signed-release';
|
|
2
2
|
import { type Artifact, type CommandReceipt, type InstallerReceipt, type Qualification, type ReleaseIdentity, type Requirements } from './release-qualification';
|
|
3
3
|
export type RemoteReleaseState = {
|
|
4
4
|
tag: string;
|