@camstack/server 1.2.864 → 1.2.866
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/CHANGELOG.md +12 -0
- package/package.json +9 -7
- package/system/dist/addon-utils.mjs +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +4 -4
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +5 -5
- package/system/dist/builtins/alerts/alerts.addon.js +1 -1
- package/system/dist/builtins/alerts/alerts.addon.mjs +3 -3
- package/system/dist/builtins/autotrack/index.js +1 -1
- package/system/dist/builtins/autotrack/index.mjs +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +5 -5
- package/system/dist/builtins/calendars/calendars.addon.js +1 -1
- package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/system/dist/builtins/camera-grid/index.js +1 -1
- package/system/dist/builtins/camera-grid/index.mjs +1 -1
- package/system/dist/builtins/composer/composer.addon.js +4 -4
- package/system/dist/builtins/composer/composer.addon.mjs +4 -4
- package/system/dist/builtins/console-logging/index.js +1 -1
- package/system/dist/builtins/console-logging/index.mjs +1 -1
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +3 -3
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +3 -3
- package/system/dist/builtins/device-history/device-history.addon.js +2 -2
- package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
- package/system/dist/builtins/device-manager/device-manager.addon.js +2 -2
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +4 -4
- package/system/dist/builtins/keychain/index.mjs +4 -4
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +5 -5
- package/system/dist/builtins/local-network/local-network.addon.js +3 -3
- package/system/dist/builtins/local-network/local-network.addon.mjs +3 -3
- package/system/dist/builtins/loki-logging/index.js +1 -1
- package/system/dist/builtins/loki-logging/index.mjs +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +10 -10
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +10 -10
- package/system/dist/builtins/record-entries/index.js +1 -1
- package/system/dist/builtins/record-entries/index.mjs +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +1 -1
- package/system/dist/builtins/snapshot/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +20 -20
- package/system/dist/builtins/sqlite-storage/index.js +1 -1
- package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/migrations/migration-engine.d.ts +3 -1
- package/system/dist/builtins/sqlite-storage/migrations/migrations-provider.d.ts +1 -0
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +12 -8
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +12 -8
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/system-config/system-config.addon.js +3 -3
- package/system/dist/builtins/system-config/system-config.addon.mjs +115 -115
- package/system/dist/builtins/winston-logging/index.js +1 -1
- package/system/dist/builtins/winston-logging/index.mjs +1 -1
- package/system/dist/{capture-engine-CK9f9H7b.mjs → capture-engine-5g4lu_OQ.mjs} +1 -1
- package/system/dist/{capture-engine-Cofev-f3.js → capture-engine-BCB1OMc_.js} +1 -1
- package/system/dist/{composition-sources-Pqrpujem.js → composition-sources-1yTVou3a.js} +1 -1
- package/system/dist/{composition-sources-Cah5d873.mjs → composition-sources-VkBsGWZh.mjs} +1 -1
- package/system/dist/{constants-BKiAEgH1.mjs → constants-D1lf-y38.mjs} +1 -1
- package/system/dist/{constants-DzdeUhhD.js → constants-r86Qr7xE.js} +1 -1
- package/system/dist/{coral-accelerators-DBlgWB8k.mjs → coral-accelerators-BW3OcrLD.mjs} +6 -6
- package/system/dist/{custom-action-registry-B9zFBNVa.mjs → custom-action-registry-N7flBDwT.mjs} +37 -37
- package/system/dist/{device-ca-DfFm8dSR.js → device-ca-Bs_oj8y_.js} +1 -1
- package/system/dist/{device-ca-MvTMcE3C.mjs → device-ca-aWcNrAeB.mjs} +1 -1
- package/system/dist/{dist-BDIq20ng.mjs → dist-BeM3jcMe.mjs} +824 -538
- package/system/dist/{dist-BJBp-Cna.js → dist-CtlwobAt.js} +824 -538
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-identity-DZw5bjVe.js → hub-identity-C_3WvvUh.js} +1 -1
- package/system/dist/{hub-identity-DErvD_Y9.mjs → hub-identity-CoyjSGzP.mjs} +10 -10
- package/system/dist/{hub-mdns-ciao-Cn4CZvKD.js → hub-mdns-ciao-DrpNoAbD.js} +2 -2
- package/system/dist/{hub-mdns-ciao-DBtitWew.mjs → hub-mdns-ciao-MJdhRgSK.mjs} +2 -2
- package/system/dist/index.js +8 -8
- package/system/dist/index.mjs +217 -217
- package/system/dist/{legacy-integration-rows-door-Dm8DXrzQ.js → legacy-integration-rows-door-DknPUCvT.js} +1 -1
- package/system/dist/{legacy-integration-rows-door-CT9d6do5.mjs → legacy-integration-rows-door-DwD_6A21.mjs} +1 -1
- package/system/dist/{rename-composition-block-BgjpGf0d.mjs → rename-composition-block-B7ZEwdvM.mjs} +1 -1
- package/system/dist/{rename-composition-block-CMrV8Rou.js → rename-composition-block-VNSmpCSW.js} +1 -1
- package/system/dist/{restore-archive-BTpU7KMz.mjs → restore-archive-3-Gd66TK.mjs} +94 -94
- package/system/dist/{restore-archive-BRIGjOQv.js → restore-archive-CizGJ-13.js} +1 -1
- package/system/dist/{wal-maintenance-BsgOZJxC.mjs → wal-maintenance-CMKws6du.mjs} +0 -0
- package/system/dist/{wal-maintenance-DAzeawfH.js → wal-maintenance-cI0DBU7k.js} +0 -0
- package/system/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fc as defineAddonMigrations, Is as BaseAddon, Lc as defineEntryKind, Oi as isSameAddonId, Pn as bareAddonId, Qc as isInstanceEnabled, Vi as logDestinationCapability, dc as RevConflictError, fi as integrationInstancesCapability, nl as isSecretFieldView, oc as RecordIntegrationInstances, rl as isSecretMarker, xa as preconditionOf } from "../../dist-
|
|
1
|
+
import { Fc as defineAddonMigrations, Is as BaseAddon, Lc as defineEntryKind, Oi as isSameAddonId, Pn as bareAddonId, Qc as isInstanceEnabled, Vi as logDestinationCapability, dc as RevConflictError, fi as integrationInstancesCapability, nl as isSecretFieldView, oc as RecordIntegrationInstances, rl as isSecretMarker, xa as preconditionOf } from "../../dist-BeM3jcMe.mjs";
|
|
2
2
|
import { n as compileLogFilter, o as lineMatches } from "../../log-read-filter-D7Ev3zm-.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/builtins/loki-logging/loki-payload.ts
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CtlwobAt.js");
|
|
7
7
|
let node_fs = require("node:fs");
|
|
8
8
|
node_fs = require_chunk.__toESM(node_fs);
|
|
9
9
|
let node_fs_promises = require("node:fs/promises");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Il as errMsg, Is as BaseAddon, Nc as createEvent, Pa as reducePoints, Rl as EventCategory, Ua as resolveBucketMs, Xi as metricsProviderCapability, Zt as ROOT_BUCKET_KEY, _n as UNATTRIBUTED_BUCKET_KEY, ti as foldSnapshotByFunction } from "../../dist-
|
|
2
|
-
import * as fs
|
|
1
|
+
import { Il as errMsg, Is as BaseAddon, Nc as createEvent, Pa as reducePoints, Rl as EventCategory, Ua as resolveBucketMs, Xi as metricsProviderCapability, Zt as ROOT_BUCKET_KEY, _n as UNATTRIBUTED_BUCKET_KEY, ti as foldSnapshotByFunction } from "../../dist-BeM3jcMe.mjs";
|
|
2
|
+
import * as fs from "node:fs";
|
|
3
3
|
import { constants, readFileSync } from "node:fs";
|
|
4
4
|
import { access, readFile, readdir } from "node:fs/promises";
|
|
5
5
|
import { promisify } from "node:util";
|
|
@@ -1686,7 +1686,7 @@ var NativeMetricsProvider = class {
|
|
|
1686
1686
|
let swapUsedBytes = 0;
|
|
1687
1687
|
let swapTotalBytes = 0;
|
|
1688
1688
|
if (IS_LINUX) try {
|
|
1689
|
-
const meminfo = fs
|
|
1689
|
+
const meminfo = fs.readFileSync("/proc/meminfo", "utf-8");
|
|
1690
1690
|
const availKb = meminfo.match(/MemAvailable:\s+(\d+)/)?.[1];
|
|
1691
1691
|
if (availKb !== void 0) available = parseInt(availKb, 10) * 1024;
|
|
1692
1692
|
const swapTotal = parseInt(meminfo.match(/SwapTotal:\s+(\d+)/)?.[1] ?? "0", 10) * 1024;
|
|
@@ -1779,7 +1779,7 @@ async function sampleMacMemory(provider) {
|
|
|
1779
1779
|
}
|
|
1780
1780
|
function getDiskSpaceInternal(dirPath) {
|
|
1781
1781
|
return new Promise((resolve, reject) => {
|
|
1782
|
-
fs
|
|
1782
|
+
fs.statfs(dirPath, (err, stats) => {
|
|
1783
1783
|
if (err) return reject(err);
|
|
1784
1784
|
const totalBytes = stats.blocks * stats.bsize;
|
|
1785
1785
|
const availableBytes = stats.bavail * stats.bsize;
|
|
@@ -1797,7 +1797,7 @@ function getDiskSpaceInternal(dirPath) {
|
|
|
1797
1797
|
async function takeDiskIoSnapshot() {
|
|
1798
1798
|
const now = Date.now();
|
|
1799
1799
|
if (IS_LINUX) try {
|
|
1800
|
-
const data = fs
|
|
1800
|
+
const data = fs.readFileSync("/proc/diskstats", "utf-8");
|
|
1801
1801
|
let readOps = 0, readBytes = 0, writeOps = 0, writeBytes = 0;
|
|
1802
1802
|
for (const line of data.split("\n")) {
|
|
1803
1803
|
const parts = line.trim().split(/\s+/);
|
|
@@ -1828,7 +1828,7 @@ async function takeDiskIoSnapshot() {
|
|
|
1828
1828
|
async function takeNetworkIoSnapshot() {
|
|
1829
1829
|
const now = Date.now();
|
|
1830
1830
|
if (IS_LINUX) try {
|
|
1831
|
-
const data = fs
|
|
1831
|
+
const data = fs.readFileSync("/proc/net/dev", "utf-8");
|
|
1832
1832
|
let rxBytes = 0, txBytes = 0, rxPackets = 0, txPackets = 0, rxErrors = 0, txErrors = 0;
|
|
1833
1833
|
for (const line of data.split("\n")) {
|
|
1834
1834
|
const match = line.match(/^\s*(\w+):\s+(.+)$/);
|
|
@@ -1889,7 +1889,7 @@ async function takeNetworkIoSnapshot() {
|
|
|
1889
1889
|
}
|
|
1890
1890
|
async function getCpuTemperatureInternal() {
|
|
1891
1891
|
if (IS_LINUX) for (const p of ["/sys/class/thermal/thermal_zone0/temp", "/sys/class/hwmon/hwmon0/temp1_input"]) try {
|
|
1892
|
-
const raw = fs
|
|
1892
|
+
const raw = fs.readFileSync(p, "utf-8").trim();
|
|
1893
1893
|
const millideg = parseInt(raw, 10);
|
|
1894
1894
|
if (!isNaN(millideg)) return Math.round(millideg / 100) / 10;
|
|
1895
1895
|
} catch {
|
|
@@ -1940,10 +1940,10 @@ function getProcessResources() {
|
|
|
1940
1940
|
let threadCount = 0;
|
|
1941
1941
|
if (IS_LINUX) {
|
|
1942
1942
|
try {
|
|
1943
|
-
openFds = fs
|
|
1943
|
+
openFds = fs.readdirSync(`/proc/${process.pid}/fd`).length;
|
|
1944
1944
|
} catch {}
|
|
1945
1945
|
try {
|
|
1946
|
-
const match = fs
|
|
1946
|
+
const match = fs.readFileSync(`/proc/${process.pid}/status`, "utf-8").match(/Threads:\s+(\d+)/);
|
|
1947
1947
|
if (match) threadCount = parseInt(match[1], 10);
|
|
1948
1948
|
} catch {}
|
|
1949
1949
|
}
|
|
@@ -1958,7 +1958,7 @@ function getProcessResources() {
|
|
|
1958
1958
|
function getPressure(resource) {
|
|
1959
1959
|
if (!IS_LINUX) return null;
|
|
1960
1960
|
try {
|
|
1961
|
-
const data = fs
|
|
1961
|
+
const data = fs.readFileSync(`/proc/pressure/${resource}`, "utf-8");
|
|
1962
1962
|
const parseLine = (prefix) => {
|
|
1963
1963
|
const match = data.match(new RegExp(`${prefix} avg10=(\\d+\\.\\d+) avg60=(\\d+\\.\\d+) avg300=(\\d+\\.\\d+)`));
|
|
1964
1964
|
if (!match) return null;
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CtlwobAt.js");
|
|
7
7
|
const require_coral_accelerators = require("../../coral-accelerators-BSVsBVzt.js");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
9
9
|
node_fs = require_chunk.__toESM(node_fs);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { o as __toESM, r as __exportAll } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { Bc as emitReadiness, Il as errMsg, Is as BaseAddon, Lr as enumerateInferenceDevices, Rl as EventCategory, _a as platformProbeCapability, lo as scoreRuntimes, ua as parseAcceleratorFactsJson } from "../../dist-
|
|
3
|
-
import { n as detectCoralAccelerator, r as nodeCoralFs } from "../../coral-accelerators-
|
|
4
|
-
import * as fs
|
|
2
|
+
import { Bc as emitReadiness, Il as errMsg, Is as BaseAddon, Lr as enumerateInferenceDevices, Rl as EventCategory, _a as platformProbeCapability, lo as scoreRuntimes, ua as parseAcceleratorFactsJson } from "../../dist-BeM3jcMe.mjs";
|
|
3
|
+
import { n as detectCoralAccelerator, r as nodeCoralFs } from "../../coral-accelerators-BW3OcrLD.mjs";
|
|
4
|
+
import * as fs from "node:fs";
|
|
5
5
|
import * as path$1 from "node:path";
|
|
6
6
|
import { promisify } from "node:util";
|
|
7
7
|
import * as os$1 from "node:os";
|
|
@@ -492,14 +492,14 @@ var PlatformScorer = class {
|
|
|
492
492
|
if (nvidia) gpu = nvidia;
|
|
493
493
|
const listRenderNodes = () => {
|
|
494
494
|
try {
|
|
495
|
-
return fs
|
|
495
|
+
return fs.readdirSync("/dev/dri").filter((n) => n.startsWith("renderD")).map((n) => `/dev/dri/${n}`);
|
|
496
496
|
} catch {
|
|
497
497
|
return [];
|
|
498
498
|
}
|
|
499
499
|
};
|
|
500
500
|
const readDrmAttr = (node, attr) => {
|
|
501
501
|
try {
|
|
502
|
-
return fs
|
|
502
|
+
return fs.readFileSync(`/sys/class/drm/${node.split("/").pop()}/device/${attr}`, "utf8");
|
|
503
503
|
} catch {
|
|
504
504
|
return "";
|
|
505
505
|
}
|
|
@@ -525,12 +525,12 @@ var PlatformScorer = class {
|
|
|
525
525
|
}
|
|
526
526
|
const listDir = (p) => {
|
|
527
527
|
try {
|
|
528
|
-
return fs
|
|
528
|
+
return fs.readdirSync(p);
|
|
529
529
|
} catch {
|
|
530
530
|
return [];
|
|
531
531
|
}
|
|
532
532
|
};
|
|
533
|
-
const exists = (p) => fs
|
|
533
|
+
const exists = (p) => fs.existsSync(p);
|
|
534
534
|
if (!npu) {
|
|
535
535
|
const { classifyIntelNpu } = await import("../../intel-npu-C8HKvRQF.mjs");
|
|
536
536
|
npu = classifyIntelNpu({
|
|
@@ -558,7 +558,7 @@ var PlatformScorer = class {
|
|
|
558
558
|
exists,
|
|
559
559
|
readFile: (p) => {
|
|
560
560
|
try {
|
|
561
|
-
return fs
|
|
561
|
+
return fs.readFileSync(p, "utf8");
|
|
562
562
|
} catch {
|
|
563
563
|
return "";
|
|
564
564
|
}
|
|
@@ -844,7 +844,7 @@ function jsonValue(text) {
|
|
|
844
844
|
function readPublishedAcceleratorFacts(filePath) {
|
|
845
845
|
let text;
|
|
846
846
|
try {
|
|
847
|
-
text = fs
|
|
847
|
+
text = fs.readFileSync(filePath, "utf8");
|
|
848
848
|
} catch {
|
|
849
849
|
return null;
|
|
850
850
|
}
|
|
@@ -859,7 +859,7 @@ function findAcceleratorFactsScript(dataDir, cwd = process.cwd()) {
|
|
|
859
859
|
const candidates = [];
|
|
860
860
|
if (typeof dataDir === "string" && dataDir !== "") candidates.push(path$1.join(dataDir, "addons", "@camstack", "addon-pipeline", "python", "accelerator_facts.py"));
|
|
861
861
|
candidates.push(path$1.join(cwd, "packages", "addon-pipeline", "python", "accelerator_facts.py"));
|
|
862
|
-
for (const candidate of candidates) if (fs
|
|
862
|
+
for (const candidate of candidates) if (fs.existsSync(candidate)) return candidate;
|
|
863
863
|
return null;
|
|
864
864
|
}
|
|
865
865
|
async function defaultExec(command, args, timeoutMs) {
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CtlwobAt.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
//#region src/builtins/record-entries/entries-service.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Cl as secretViewsOf, Is as BaseAddon, Ma as recordEntriesCapability, gc as UnknownRecordKindError, qs as InvalidRecordError } from "../../dist-
|
|
1
|
+
import { Cl as secretViewsOf, Is as BaseAddon, Ma as recordEntriesCapability, gc as UnknownRecordKindError, qs as InvalidRecordError } from "../../dist-BeM3jcMe.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
//#region src/builtins/record-entries/entries-service.ts
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CtlwobAt.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
//#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
|
|
9
9
|
/**
|
package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Is as BaseAddon, Rl as EventCategory } from "../../dist-
|
|
1
|
+
import { Is as BaseAddon, Rl as EventCategory } from "../../dist-BeM3jcMe.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
|
|
4
4
|
/**
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CtlwobAt.js");
|
|
7
7
|
const require_snapshot_courtesy = require("../../snapshot-courtesy-D_C5-nC0.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fl as DeviceType, Fn as batteryCapability, Il as errMsg, Is as BaseAddon, Ji as memoizePinnedFfmpeg, Nl as DeviceFeature, Oo as streamQualityLabel, Pn as bareAddonId, Rl as EventCategory, ll as nodePin, wr as deriveBatteryPresence, y as BatteryStatusSchema, yo as snapshotCapability } from "../../dist-
|
|
1
|
+
import { Fl as DeviceType, Fn as batteryCapability, Il as errMsg, Is as BaseAddon, Ji as memoizePinnedFfmpeg, Nl as DeviceFeature, Oo as streamQualityLabel, Pn as bareAddonId, Rl as EventCategory, ll as nodePin, wr as deriveBatteryPresence, y as BatteryStatusSchema, yo as snapshotCapability } from "../../dist-BeM3jcMe.mjs";
|
|
2
2
|
import { i as renderCourtesyOverlayJpeg, n as courtesyCacheKey, r as renderCourtesyJpeg } from "../../snapshot-courtesy-CyFs1M3I.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CtlwobAt.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
9
9
|
node_fs = require_chunk.__toESM(node_fs);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $r as filesystemBrowseCapability, Eo as storageProviderCapability, Is as BaseAddon } from "../../dist-
|
|
1
|
+
import { $r as filesystemBrowseCapability, Eo as storageProviderCapability, Is as BaseAddon } from "../../dist-BeM3jcMe.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
|
-
import * as fs
|
|
3
|
+
import * as fs from "node:fs";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
5
5
|
import { basename, dirname, isAbsolute, join, resolve, sep } from "node:path";
|
|
6
6
|
import { mkdir, readdir, realpath, statfs } from "node:fs/promises";
|
|
@@ -169,16 +169,16 @@ var FilesystemStorageProvider = class FilesystemStorageProvider {
|
|
|
169
169
|
error: "config.basePath must be a non-empty string"
|
|
170
170
|
};
|
|
171
171
|
try {
|
|
172
|
-
const stat = await fs
|
|
172
|
+
const stat = await fs.promises.stat(basePath).catch(() => null);
|
|
173
173
|
if (stat) {
|
|
174
174
|
if (!stat.isDirectory()) return {
|
|
175
175
|
ok: false,
|
|
176
176
|
error: `Path "${basePath}" exists but is not a directory`
|
|
177
177
|
};
|
|
178
|
-
await fs
|
|
178
|
+
await fs.promises.access(basePath, fs.constants.W_OK);
|
|
179
179
|
return { ok: true };
|
|
180
180
|
}
|
|
181
|
-
await fs
|
|
181
|
+
await fs.promises.mkdir(basePath, { recursive: true });
|
|
182
182
|
return { ok: true };
|
|
183
183
|
} catch (err) {
|
|
184
184
|
return {
|
|
@@ -192,12 +192,12 @@ var FilesystemStorageProvider = class FilesystemStorageProvider {
|
|
|
192
192
|
}
|
|
193
193
|
async write({ location, relativePath, data }) {
|
|
194
194
|
const filePath = safeResolve(getBasePath(location), relativePath);
|
|
195
|
-
await fs
|
|
196
|
-
await fs
|
|
195
|
+
await fs.promises.mkdir(path$1.dirname(filePath), { recursive: true });
|
|
196
|
+
await fs.promises.writeFile(filePath, data);
|
|
197
197
|
}
|
|
198
198
|
async read({ location, relativePath }) {
|
|
199
199
|
const filePath = safeResolve(getBasePath(location), relativePath);
|
|
200
|
-
const buf = await fs
|
|
200
|
+
const buf = await fs.promises.readFile(filePath);
|
|
201
201
|
const out = new Uint8Array(new ArrayBuffer(buf.byteLength));
|
|
202
202
|
out.set(buf);
|
|
203
203
|
return out;
|
|
@@ -205,7 +205,7 @@ var FilesystemStorageProvider = class FilesystemStorageProvider {
|
|
|
205
205
|
async exists({ location, relativePath }) {
|
|
206
206
|
const filePath = safeResolve(getBasePath(location), relativePath);
|
|
207
207
|
try {
|
|
208
|
-
await fs
|
|
208
|
+
await fs.promises.access(filePath);
|
|
209
209
|
return true;
|
|
210
210
|
} catch {
|
|
211
211
|
return false;
|
|
@@ -215,25 +215,25 @@ var FilesystemStorageProvider = class FilesystemStorageProvider {
|
|
|
215
215
|
const base = getBasePath(location);
|
|
216
216
|
const dir = prefix ? safeResolve(base, prefix) : path$1.resolve(base);
|
|
217
217
|
try {
|
|
218
|
-
return (await fs
|
|
218
|
+
return (await fs.promises.readdir(dir, { withFileTypes: true })).map((e) => prefix ? `${prefix}/${e.name}` : e.name);
|
|
219
219
|
} catch {
|
|
220
220
|
return [];
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
async delete({ location, relativePath }) {
|
|
224
224
|
const filePath = safeResolve(getBasePath(location), relativePath);
|
|
225
|
-
await fs
|
|
225
|
+
await fs.promises.rm(filePath, { force: true });
|
|
226
226
|
}
|
|
227
227
|
async getAvailableSpace({ location }) {
|
|
228
228
|
const base = path$1.resolve(getBasePath(location));
|
|
229
229
|
try {
|
|
230
230
|
let target = base;
|
|
231
|
-
while (!fs
|
|
231
|
+
while (!fs.existsSync(target)) {
|
|
232
232
|
const parent = path$1.dirname(target);
|
|
233
233
|
if (!parent || parent === target) return null;
|
|
234
234
|
target = parent;
|
|
235
235
|
}
|
|
236
|
-
const stats = await fs
|
|
236
|
+
const stats = await fs.promises.statfs(target);
|
|
237
237
|
return stats.bavail * stats.bsize;
|
|
238
238
|
} catch {
|
|
239
239
|
return null;
|
|
@@ -242,9 +242,9 @@ var FilesystemStorageProvider = class FilesystemStorageProvider {
|
|
|
242
242
|
async beginUpload({ location, relativePath }) {
|
|
243
243
|
const target = safeResolve(getBasePath(location), relativePath);
|
|
244
244
|
const partial = `${target}.partial`;
|
|
245
|
-
await fs
|
|
246
|
-
await fs
|
|
247
|
-
const stream = fs
|
|
245
|
+
await fs.promises.mkdir(path$1.dirname(target), { recursive: true });
|
|
246
|
+
await fs.promises.unlink(partial).catch(() => {});
|
|
247
|
+
const stream = fs.createWriteStream(partial);
|
|
248
248
|
const uploadId = randomUUID();
|
|
249
249
|
const session = {
|
|
250
250
|
stream,
|
|
@@ -285,7 +285,7 @@ var FilesystemStorageProvider = class FilesystemStorageProvider {
|
|
|
285
285
|
session.stream.end(() => resolve());
|
|
286
286
|
session.stream.on("error", reject);
|
|
287
287
|
});
|
|
288
|
-
await fs
|
|
288
|
+
await fs.promises.rename(session.partial, session.target);
|
|
289
289
|
clearTimeout(session.timer);
|
|
290
290
|
this.uploads.delete(uploadId);
|
|
291
291
|
}
|
|
@@ -295,14 +295,14 @@ var FilesystemStorageProvider = class FilesystemStorageProvider {
|
|
|
295
295
|
try {
|
|
296
296
|
session.stream.destroy();
|
|
297
297
|
} catch {}
|
|
298
|
-
await fs
|
|
298
|
+
await fs.promises.unlink(session.partial).catch(() => {});
|
|
299
299
|
clearTimeout(session.timer);
|
|
300
300
|
this.uploads.delete(uploadId);
|
|
301
301
|
}
|
|
302
302
|
async beginDownload({ location, relativePath }) {
|
|
303
303
|
const target = safeResolve(getBasePath(location), relativePath);
|
|
304
|
-
const stat = await fs
|
|
305
|
-
const fd = await fs
|
|
304
|
+
const stat = await fs.promises.stat(target);
|
|
305
|
+
const fd = await fs.promises.open(target, "r");
|
|
306
306
|
const downloadId = randomUUID();
|
|
307
307
|
const session = {
|
|
308
308
|
fd,
|
|
@@ -4,7 +4,7 @@ Object.defineProperties(exports, {
|
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
6
|
const require_builtins_sqlite_storage_filesystem_storage_addon = require("./filesystem-storage.addon.js");
|
|
7
|
-
const require_wal_maintenance = require("../../wal-maintenance-
|
|
7
|
+
const require_wal_maintenance = require("../../wal-maintenance-cI0DBU7k.js");
|
|
8
8
|
const require_builtins_sqlite_storage_sqlite_settings_addon = require("./sqlite-settings.addon.js");
|
|
9
9
|
//#region src/builtins/sqlite-storage/config-store.ts
|
|
10
10
|
var ConfigStore = class {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./filesystem-storage.addon.mjs";
|
|
2
|
-
import { B as SQLITE_ENGINE_STORM_WALL_SHARE, F as SQLITE_MMAP_FLOOR_BYTES, G as SqliteOpProfiler, H as SQLITE_PROFILE_REPORT_INTERVAL_MS, I as SQLITE_PAGE_CACHE_CEILING_KIB, K as sqliteEngineStorm, L as SQLITE_PAGE_CACHE_FLOOR_KIB, N as SQLITE_JOURNAL_SIZE_LIMIT_BYTES, P as SQLITE_MMAP_CEILING_BYTES, R as sqliteMmapSizeFor, U as SQLITE_PROFILE_TOP_N, V as SQLITE_PROFILE_REPORT_FLOOR_MS, W as SQLITE_SLOW_CALL_MS, a as WalMaintenance, i as WAL_MAINTENANCE_INTERVAL_MS, l as SqliteSettingsBackend, n as WAL_HIGH_WATER_BYTES, r as WAL_IDLE_QUIET_MS, t as WAL_CHECKPOINT_BUSY_TIMEOUT_MS, z as sqlitePageCacheKibFor } from "../../wal-maintenance-
|
|
2
|
+
import { B as SQLITE_ENGINE_STORM_WALL_SHARE, F as SQLITE_MMAP_FLOOR_BYTES, G as SqliteOpProfiler, H as SQLITE_PROFILE_REPORT_INTERVAL_MS, I as SQLITE_PAGE_CACHE_CEILING_KIB, K as sqliteEngineStorm, L as SQLITE_PAGE_CACHE_FLOOR_KIB, N as SQLITE_JOURNAL_SIZE_LIMIT_BYTES, P as SQLITE_MMAP_CEILING_BYTES, R as sqliteMmapSizeFor, U as SQLITE_PROFILE_TOP_N, V as SQLITE_PROFILE_REPORT_FLOOR_MS, W as SQLITE_SLOW_CALL_MS, a as WalMaintenance, i as WAL_MAINTENANCE_INTERVAL_MS, l as SqliteSettingsBackend, n as WAL_HIGH_WATER_BYTES, r as WAL_IDLE_QUIET_MS, t as WAL_CHECKPOINT_BUSY_TIMEOUT_MS, z as sqlitePageCacheKibFor } from "../../wal-maintenance-CMKws6du.mjs";
|
|
3
3
|
import { SqliteSettingsAddon } from "./sqlite-settings.addon.mjs";
|
|
4
4
|
//#region src/builtins/sqlite-storage/config-store.ts
|
|
5
5
|
var ConfigStore = class {
|
|
@@ -39,6 +39,8 @@ export declare class MigrationEngine {
|
|
|
39
39
|
private readonly statuses;
|
|
40
40
|
/** Addon catalogues offered this boot, by owner (M3): the owner drives, the engine gates. */
|
|
41
41
|
private readonly addonMetas;
|
|
42
|
+
/** Ids each owner deliberately removed: an applied row of one is fine, not a newer database. */
|
|
43
|
+
private readonly addonRetired;
|
|
42
44
|
/** Files whose pre-migration snapshot was refused: nothing runs on them, owner or hub. */
|
|
43
45
|
private readonly snapshotRefused;
|
|
44
46
|
/** Ids whose `startMigration` said proceed and whose `finishMigration` has not landed yet. */
|
|
@@ -97,7 +99,7 @@ export declare class MigrationEngine {
|
|
|
97
99
|
* catalogue whole (throws, writes nothing). A hold from a restore is honoured as for
|
|
98
100
|
* a hub migration.
|
|
99
101
|
*/
|
|
100
|
-
declareOwner(owner: string, offered: readonly MigrationMeta[], caller: string | null): Promise<{
|
|
102
|
+
declareOwner(owner: string, offered: readonly MigrationMeta[], caller: string | null, retired?: readonly string[]): Promise<{
|
|
101
103
|
readonly bootId: string;
|
|
102
104
|
readonly snapshot: "none" | "written" | "refused";
|
|
103
105
|
readonly steps: readonly MigrationOwnerStep[];
|
|
@@ -3,12 +3,12 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CtlwobAt.js");
|
|
7
7
|
const require_retired_settings_keys = require("../../retired-settings-keys-C8nOOr5H.js");
|
|
8
|
-
const require_wal_maintenance = require("../../wal-maintenance-
|
|
8
|
+
const require_wal_maintenance = require("../../wal-maintenance-cI0DBU7k.js");
|
|
9
9
|
const require_sqlite_snapshot_protocol = require("../../sqlite-snapshot-protocol-B9OndqZv.js");
|
|
10
10
|
const require_wal_checkpoint_policy = require("../../wal-checkpoint-policy-d2z2qPqx.js");
|
|
11
|
-
const require_legacy_integration_rows_door = require("../../legacy-integration-rows-door-
|
|
11
|
+
const require_legacy_integration_rows_door = require("../../legacy-integration-rows-door-DknPUCvT.js");
|
|
12
12
|
let zod = require("zod");
|
|
13
13
|
let node_crypto = require("node:crypto");
|
|
14
14
|
let node_fs = require("node:fs");
|
|
@@ -1299,6 +1299,8 @@ var MigrationEngine = class {
|
|
|
1299
1299
|
statuses = /* @__PURE__ */ new Map();
|
|
1300
1300
|
/** Addon catalogues offered this boot, by owner (M3): the owner drives, the engine gates. */
|
|
1301
1301
|
addonMetas = /* @__PURE__ */ new Map();
|
|
1302
|
+
/** Ids each owner deliberately removed: an applied row of one is fine, not a newer database. */
|
|
1303
|
+
addonRetired = /* @__PURE__ */ new Map();
|
|
1302
1304
|
/** Files whose pre-migration snapshot was refused: nothing runs on them, owner or hub. */
|
|
1303
1305
|
snapshotRefused = /* @__PURE__ */ new Map();
|
|
1304
1306
|
/** Ids whose `startMigration` said proceed and whose `finishMigration` has not landed yet. */
|
|
@@ -1475,6 +1477,7 @@ var MigrationEngine = class {
|
|
|
1475
1477
|
...entry,
|
|
1476
1478
|
ownerNotLoaded: true
|
|
1477
1479
|
};
|
|
1480
|
+
if (this.addonRetired.get(entry.owner)?.has(entry.id) === true) return entry;
|
|
1478
1481
|
return declared.some((meta) => meta.id === entry.id) ? entry : {
|
|
1479
1482
|
...entry,
|
|
1480
1483
|
status: "skipped-newer"
|
|
@@ -1636,15 +1639,15 @@ var MigrationEngine = class {
|
|
|
1636
1639
|
* catalogue whole (throws, writes nothing). A hold from a restore is honoured as for
|
|
1637
1640
|
* a hub migration.
|
|
1638
1641
|
*/
|
|
1639
|
-
declareOwner(owner, offered, caller) {
|
|
1642
|
+
declareOwner(owner, offered, caller, retired = []) {
|
|
1640
1643
|
const run = this.tail.catch(() => void 0).then(() => {
|
|
1641
1644
|
this.assertOwnerCaller(owner, caller);
|
|
1642
|
-
return this.declare(owner, offered);
|
|
1645
|
+
return this.declare(owner, offered, retired);
|
|
1643
1646
|
});
|
|
1644
1647
|
this.tail = run;
|
|
1645
1648
|
return run;
|
|
1646
1649
|
}
|
|
1647
|
-
async declare(owner, offered) {
|
|
1650
|
+
async declare(owner, offered, retired) {
|
|
1648
1651
|
const metas = offered.map((meta) => require_dist.MigrationMetaSchema.parse(meta));
|
|
1649
1652
|
const refusal = this.refusalOfCatalogue(owner, metas);
|
|
1650
1653
|
if (refusal !== null) {
|
|
@@ -1689,11 +1692,12 @@ var MigrationEngine = class {
|
|
|
1689
1692
|
});
|
|
1690
1693
|
}
|
|
1691
1694
|
}
|
|
1692
|
-
for (const entry of rows.values()) if (entry.owner === owner && !metas.some((meta) => meta.id === entry.id) && entry.status === "applied") log.warn("migration ledger names an id this addon does not declare — skipped-newer, nothing written for it", { tags: { migrationId: entry.id } });
|
|
1695
|
+
for (const entry of rows.values()) if (entry.owner === owner && !metas.some((meta) => meta.id === entry.id) && !retired.includes(entry.id) && entry.status === "applied") log.warn("migration ledger names an id this addon does not declare — skipped-newer, nothing written for it", { tags: { migrationId: entry.id } });
|
|
1693
1696
|
let snapshot = "none";
|
|
1694
1697
|
for (const [file, first] of firstRunnable) if (await this.snapshotBefore(file, first, log) === "refused") snapshot = "refused";
|
|
1695
1698
|
else if (snapshot === "none") snapshot = "written";
|
|
1696
1699
|
this.addonMetas.set(owner, metas);
|
|
1700
|
+
this.addonRetired.set(owner, new Set(retired));
|
|
1697
1701
|
return {
|
|
1698
1702
|
bootId: this.bootId,
|
|
1699
1703
|
snapshot,
|
|
@@ -1971,7 +1975,7 @@ var MigrationsProvider = class {
|
|
|
1971
1975
|
return { entries: [...await this.engine.retry(input.id)] };
|
|
1972
1976
|
}
|
|
1973
1977
|
declareOwner(input) {
|
|
1974
|
-
return this.engine.declareOwner(input.owner, input.metas, callerOf(input)).then((out) => ({
|
|
1978
|
+
return this.engine.declareOwner(input.owner, input.metas, callerOf(input), input.retired).then((out) => ({
|
|
1975
1979
|
...out,
|
|
1976
1980
|
steps: [...out.steps],
|
|
1977
1981
|
migrationApi: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { $a as resolveRunnerId, F as DATABASE_SNAPSHOT_PARTIAL_SUFFIX, Hs as DeclarationRefusedError, I as DATABASE_SNAPSHOT_SUFFIX, Ic as defineCustomActions, Il as errMsg$1, Is as BaseAddon, Js as NoCallerError, L as DATABASE_SNAPSHOT_TIMEOUT_MS, Lt as MigrationMetaSchema, Mt as MIGRATION_API_V1_METHODS, Na as recordsCapability, Pc as customAction, Pn as bareAddonId, R as DATA_STORE_DATABASES, Rl as EventCategory, So as storageAdminCapability, Yn as catalogueIssues, Zi as migrationsCapability, dl as normalizeSecretOwner, ec as RECORD_SWEEP_INTERVAL_MS, gc as UnknownRecordKindError, kc as collectSecretMarkerRefs, la as orderMigrations, mc as TransactRefusedError, qo as vectorStoreCapability, qs as InvalidRecordError, rc as RUNTIME_DEFAULTS, sc as RecordKindDeclarationSchema, vr as dataStoreProviderCapability, yr as databaseSnapshotCapability } from "../../dist-
|
|
1
|
+
import { $a as resolveRunnerId, F as DATABASE_SNAPSHOT_PARTIAL_SUFFIX, Hs as DeclarationRefusedError, I as DATABASE_SNAPSHOT_SUFFIX, Ic as defineCustomActions, Il as errMsg$1, Is as BaseAddon, Js as NoCallerError, L as DATABASE_SNAPSHOT_TIMEOUT_MS, Lt as MigrationMetaSchema, Mt as MIGRATION_API_V1_METHODS, Na as recordsCapability, Pc as customAction, Pn as bareAddonId, R as DATA_STORE_DATABASES, Rl as EventCategory, So as storageAdminCapability, Yn as catalogueIssues, Zi as migrationsCapability, dl as normalizeSecretOwner, ec as RECORD_SWEEP_INTERVAL_MS, gc as UnknownRecordKindError, kc as collectSecretMarkerRefs, la as orderMigrations, mc as TransactRefusedError, qo as vectorStoreCapability, qs as InvalidRecordError, rc as RUNTIME_DEFAULTS, sc as RecordKindDeclarationSchema, vr as dataStoreProviderCapability, yr as databaseSnapshotCapability } from "../../dist-BeM3jcMe.mjs";
|
|
2
2
|
import { r as retiredKeyStoreOf, t as purgeRetiredSettingsKeys } from "../../retired-settings-keys-u6xQA6r7.mjs";
|
|
3
|
-
import { A as callRecords, D as RecordsEngine, E as databaseOfStore, M as controlTargetOf, O as callControl, T as trustResult, _ as rehydrateError, a as WalMaintenance, b as collectTransferables, c as vectorProviderOfOwnedFile, d as callMigrate, f as migrateTargetOf, g as DuplicatePlacementError, h as DatabaseBusyError, j as callVector, k as callData, l as SqliteSettingsBackend, m as CrossDatabaseTransactError, o as createVectorIndex, p as CollectionPlacementError, s as vectorProviderOf, u as HUB_MIGRATIONS, x as isFileHostMessage } from "../../wal-maintenance-
|
|
3
|
+
import { A as callRecords, D as RecordsEngine, E as databaseOfStore, M as controlTargetOf, O as callControl, T as trustResult, _ as rehydrateError, a as WalMaintenance, b as collectTransferables, c as vectorProviderOfOwnedFile, d as callMigrate, f as migrateTargetOf, g as DuplicatePlacementError, h as DatabaseBusyError, j as callVector, k as callData, l as SqliteSettingsBackend, m as CrossDatabaseTransactError, o as createVectorIndex, p as CollectionPlacementError, s as vectorProviderOf, u as HUB_MIGRATIONS, x as isFileHostMessage } from "../../wal-maintenance-CMKws6du.mjs";
|
|
4
4
|
import { r as isSnapshotWorkerMessage } from "../../sqlite-snapshot-protocol-2QaTouWV.mjs";
|
|
5
5
|
import { a as isWorkerMessage, t as WAL_CHECKPOINT_LARGE_PASS_FRAMES } from "../../wal-checkpoint-policy-BahrTtyD.mjs";
|
|
6
|
-
import { a as patchLegacyIntegrationRows, i as legacyIntegrationAddonId, n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows, r as deleteLegacyIntegrationRowKeys } from "../../legacy-integration-rows-door-
|
|
6
|
+
import { a as patchLegacyIntegrationRows, i as legacyIntegrationAddonId, n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows, r as deleteLegacyIntegrationRowKeys } from "../../legacy-integration-rows-door-DwD_6A21.mjs";
|
|
7
7
|
import { createRequire } from "node:module";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { randomUUID } from "node:crypto";
|
|
@@ -1293,6 +1293,8 @@ var MigrationEngine = class {
|
|
|
1293
1293
|
statuses = /* @__PURE__ */ new Map();
|
|
1294
1294
|
/** Addon catalogues offered this boot, by owner (M3): the owner drives, the engine gates. */
|
|
1295
1295
|
addonMetas = /* @__PURE__ */ new Map();
|
|
1296
|
+
/** Ids each owner deliberately removed: an applied row of one is fine, not a newer database. */
|
|
1297
|
+
addonRetired = /* @__PURE__ */ new Map();
|
|
1296
1298
|
/** Files whose pre-migration snapshot was refused: nothing runs on them, owner or hub. */
|
|
1297
1299
|
snapshotRefused = /* @__PURE__ */ new Map();
|
|
1298
1300
|
/** Ids whose `startMigration` said proceed and whose `finishMigration` has not landed yet. */
|
|
@@ -1469,6 +1471,7 @@ var MigrationEngine = class {
|
|
|
1469
1471
|
...entry,
|
|
1470
1472
|
ownerNotLoaded: true
|
|
1471
1473
|
};
|
|
1474
|
+
if (this.addonRetired.get(entry.owner)?.has(entry.id) === true) return entry;
|
|
1472
1475
|
return declared.some((meta) => meta.id === entry.id) ? entry : {
|
|
1473
1476
|
...entry,
|
|
1474
1477
|
status: "skipped-newer"
|
|
@@ -1630,15 +1633,15 @@ var MigrationEngine = class {
|
|
|
1630
1633
|
* catalogue whole (throws, writes nothing). A hold from a restore is honoured as for
|
|
1631
1634
|
* a hub migration.
|
|
1632
1635
|
*/
|
|
1633
|
-
declareOwner(owner, offered, caller) {
|
|
1636
|
+
declareOwner(owner, offered, caller, retired = []) {
|
|
1634
1637
|
const run = this.tail.catch(() => void 0).then(() => {
|
|
1635
1638
|
this.assertOwnerCaller(owner, caller);
|
|
1636
|
-
return this.declare(owner, offered);
|
|
1639
|
+
return this.declare(owner, offered, retired);
|
|
1637
1640
|
});
|
|
1638
1641
|
this.tail = run;
|
|
1639
1642
|
return run;
|
|
1640
1643
|
}
|
|
1641
|
-
async declare(owner, offered) {
|
|
1644
|
+
async declare(owner, offered, retired) {
|
|
1642
1645
|
const metas = offered.map((meta) => MigrationMetaSchema.parse(meta));
|
|
1643
1646
|
const refusal = this.refusalOfCatalogue(owner, metas);
|
|
1644
1647
|
if (refusal !== null) {
|
|
@@ -1683,11 +1686,12 @@ var MigrationEngine = class {
|
|
|
1683
1686
|
});
|
|
1684
1687
|
}
|
|
1685
1688
|
}
|
|
1686
|
-
for (const entry of rows.values()) if (entry.owner === owner && !metas.some((meta) => meta.id === entry.id) && entry.status === "applied") log.warn("migration ledger names an id this addon does not declare — skipped-newer, nothing written for it", { tags: { migrationId: entry.id } });
|
|
1689
|
+
for (const entry of rows.values()) if (entry.owner === owner && !metas.some((meta) => meta.id === entry.id) && !retired.includes(entry.id) && entry.status === "applied") log.warn("migration ledger names an id this addon does not declare — skipped-newer, nothing written for it", { tags: { migrationId: entry.id } });
|
|
1687
1690
|
let snapshot = "none";
|
|
1688
1691
|
for (const [file, first] of firstRunnable) if (await this.snapshotBefore(file, first, log) === "refused") snapshot = "refused";
|
|
1689
1692
|
else if (snapshot === "none") snapshot = "written";
|
|
1690
1693
|
this.addonMetas.set(owner, metas);
|
|
1694
|
+
this.addonRetired.set(owner, new Set(retired));
|
|
1691
1695
|
return {
|
|
1692
1696
|
bootId: this.bootId,
|
|
1693
1697
|
snapshot,
|
|
@@ -1964,7 +1968,7 @@ var MigrationsProvider = class {
|
|
|
1964
1968
|
return { entries: [...await this.engine.retry(input.id)] };
|
|
1965
1969
|
}
|
|
1966
1970
|
declareOwner(input) {
|
|
1967
|
-
return this.engine.declareOwner(input.owner, input.metas, callerOf(input)).then((out) => ({
|
|
1971
|
+
return this.engine.declareOwner(input.owner, input.metas, callerOf(input), input.retired).then((out) => ({
|
|
1968
1972
|
...out,
|
|
1969
1973
|
steps: [...out.steps],
|
|
1970
1974
|
migrationApi: {
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CtlwobAt.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $i as modeMayWrite, Co as storageCapability, Dc as collectSecretConfigKeys, Ec as buildSecretRef, Ei as isLocationEnabled, El as toSecretFieldView, Fc as defineAddonMigrations, Gi as mayWriteToLocation, Ic as defineCustomActions, Is as BaseAddon, Ja as resolveLocationMode, Pc as customAction, Qi as modeForSwitch, Rc as defineRecordKinds, Rl as EventCategory, Ur as evictionPolicyOfLocation, Wi as mayReadLocation, Xo as withLocationMode, dn as StorageCleanupJobSchema, do as settingsStoreCapability, fi as integrationInstancesCapability, fn as StorageLocationModeSchema, gl as recordSecretRef, ii as gbToBytes, jo as switchStateOfMode, ml as parseSecretRef, mn as StorageMigrationJobSchema, nl as isSecretFieldView, ol as makeSecretMarker, pn as StorageLocationTypeSchema, rl as isSecretMarker, rn as STORAGE_LOCATION_MODES, tc as REDACTED_SECRET, tl as isSecretClear, ul as normalizeNodeId, vl as resolveSecretMarkers, wo as storageMigrationCapability } from "../../dist-
|
|
1
|
+
import { $i as modeMayWrite, Co as storageCapability, Dc as collectSecretConfigKeys, Ec as buildSecretRef, Ei as isLocationEnabled, El as toSecretFieldView, Fc as defineAddonMigrations, Gi as mayWriteToLocation, Ic as defineCustomActions, Is as BaseAddon, Ja as resolveLocationMode, Pc as customAction, Qi as modeForSwitch, Rc as defineRecordKinds, Rl as EventCategory, Ur as evictionPolicyOfLocation, Wi as mayReadLocation, Xo as withLocationMode, dn as StorageCleanupJobSchema, do as settingsStoreCapability, fi as integrationInstancesCapability, fn as StorageLocationModeSchema, gl as recordSecretRef, ii as gbToBytes, jo as switchStateOfMode, ml as parseSecretRef, mn as StorageMigrationJobSchema, nl as isSecretFieldView, ol as makeSecretMarker, pn as StorageLocationTypeSchema, rl as isSecretMarker, rn as STORAGE_LOCATION_MODES, tc as REDACTED_SECRET, tl as isSecretClear, ul as normalizeNodeId, vl as resolveSecretMarkers, wo as storageMigrationCapability } from "../../dist-BeM3jcMe.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
@@ -3,11 +3,11 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CtlwobAt.js");
|
|
7
7
|
const require_safe_buffer$1 = require("../../safe-buffer-D3aoa-7X.js");
|
|
8
8
|
const require_x509_es = require("../../x509.es-WtnRNyYS.js");
|
|
9
|
-
const require_hub_identity = require("../../hub-identity-
|
|
10
|
-
const require_constants$8 = require("../../constants-
|
|
9
|
+
const require_hub_identity = require("../../hub-identity-C_3WvvUh.js");
|
|
10
|
+
const require_constants$8 = require("../../constants-r86Qr7xE.js");
|
|
11
11
|
const require_src$1 = require("../../src-CnAqG6EF.js");
|
|
12
12
|
let zod = require("zod");
|
|
13
13
|
let node_crypto = require("node:crypto");
|