@camstack/server 1.2.769 → 1.2.770
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 +6 -0
- package/dist/api/core/cap-providers.js +4 -193
- package/dist/api/trpc/generated-cap-routers.js +40 -30
- package/dist/core/addon/integration-visibility.js +0 -5
- package/package.json +35 -15
- package/system/dist/addon-utils.mjs +1 -1
- package/system/dist/{agent-https-C_rkCAus.mjs → agent-https-BGRPCKwT.mjs} +1 -1
- package/system/dist/{agent-https-Cw5Wc_ip.js → agent-https-mq6d71iq.js} +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 +1 -1
- 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 +3 -3
- package/system/dist/builtins/composer/composer.addon.mjs +3 -3
- 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 +1 -1
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
- 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 +17 -10
- package/system/dist/builtins/keychain/index.mjs +17 -10
- 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 +2 -2
- package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
- 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/integration-record-kinds.d.ts +3 -10
- package/system/dist/builtins/sqlite-storage/integration-registry.d.ts +1 -11
- package/system/dist/builtins/sqlite-storage/integration-rows-ports.d.ts +13 -15
- package/system/dist/builtins/sqlite-storage/migrations/legacy-integration-rows-door.d.ts +31 -0
- package/system/dist/builtins/sqlite-storage/migrations/migrations-provider.d.ts +39 -1
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +48 -5
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +48 -5
- 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-DXSWU1PY.js → capture-engine--FQ8NUHh.js} +1 -1
- package/system/dist/{capture-engine-Kl46lSBi.mjs → capture-engine-Cmx7DIzV.mjs} +1 -1
- package/system/dist/{composition-sources-ClCP809M.mjs → composition-sources-Bd09D5f4.mjs} +1 -1
- package/system/dist/{composition-sources-Cq0IeRv9.js → composition-sources-cvZAN87H.js} +1 -1
- package/system/dist/{constants-CDxTuuXp.mjs → constants-Dce28BAx.mjs} +1 -1
- package/system/dist/{constants-CI5ySMIj.js → constants-gM9xHjyj.js} +1 -1
- package/system/dist/{coral-accelerators-BW3OcrLD.mjs → coral-accelerators-DBlgWB8k.mjs} +6 -6
- package/system/dist/{custom-action-registry-BIJZBObd.mjs → custom-action-registry-oHl1xltx.mjs} +37 -37
- package/system/dist/{device-ca-DPvU-3TE.js → device-ca-BmeH6Y9E.js} +1 -1
- package/system/dist/{device-ca-uRLJ8-jZ.mjs → device-ca-DcMuT-Yp.mjs} +1 -1
- package/system/dist/{dist-C_SNsYGY.mjs → dist-C3WXy3Ix.mjs} +78 -55
- package/system/dist/{dist-BDixk7cu.js → dist-Dtw1sIeQ.js} +78 -55
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-7uRbexmH.js → hub-mdns-ciao-C49eqyby.js} +2 -2
- package/system/dist/{hub-mdns-ciao-ea1EwFAF.mjs → hub-mdns-ciao-Dfue_0kR.mjs} +2 -2
- package/system/dist/index.d.ts +1 -1
- package/system/dist/index.js +42 -230
- package/system/dist/index.mjs +262 -450
- package/system/dist/legacy-integration-rows-door-B8_XCqUX.js +290 -0
- package/system/dist/legacy-integration-rows-door-DK42Bh2Q.mjs +255 -0
- package/system/dist/migrations/hub/2026-11-05-drop-integration-settings.d.ts +16 -0
- package/system/dist/{restore-archive-D0y_tFM2.mjs → restore-archive-C0YDO-qd.mjs} +94 -94
- package/system/dist/{restore-archive-CpTnlXUA.js → restore-archive-DuktQtye.js} +1 -1
- package/system/dist/{wal-maintenance-Dy4gxMdb.js → wal-maintenance-BEo-y-cQ.js} +0 -0
- package/system/dist/{wal-maintenance-BvxzVfje.mjs → wal-maintenance-DhuvKiGK.mjs} +0 -0
- package/system/package.json +1 -1
- package/dist/api/core/integration-secrets.js +0 -96
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Ca as storageProviderCapability, wo as BaseAddon, wr as filesystemBrowseCapability } from "../../dist-
|
|
1
|
+
import { Ca as storageProviderCapability, wo as BaseAddon, wr as filesystemBrowseCapability } from "../../dist-C3WXy3Ix.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { mkdir, readdir, realpath, statfs } from "node:fs/promises";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
5
5
|
import { basename, dirname, isAbsolute, join, resolve, sep } from "node:path";
|
|
6
6
|
import { homedir } from "node:os";
|
|
7
|
-
import * as fs from "node:fs";
|
|
7
|
+
import * as fs$1 from "node:fs";
|
|
8
8
|
//#region src/builtins/sqlite-storage/path-guard.ts
|
|
9
9
|
/**
|
|
10
10
|
* Guards for the filesystem-browse cap. Pure + synchronous so they are
|
|
@@ -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.promises.stat(basePath).catch(() => null);
|
|
172
|
+
const stat = await fs$1.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.promises.access(basePath, fs.constants.W_OK);
|
|
178
|
+
await fs$1.promises.access(basePath, fs$1.constants.W_OK);
|
|
179
179
|
return { ok: true };
|
|
180
180
|
}
|
|
181
|
-
await fs.promises.mkdir(basePath, { recursive: true });
|
|
181
|
+
await fs$1.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.promises.mkdir(path$1.dirname(filePath), { recursive: true });
|
|
196
|
-
await fs.promises.writeFile(filePath, data);
|
|
195
|
+
await fs$1.promises.mkdir(path$1.dirname(filePath), { recursive: true });
|
|
196
|
+
await fs$1.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.promises.readFile(filePath);
|
|
200
|
+
const buf = await fs$1.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.promises.access(filePath);
|
|
208
|
+
await fs$1.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.promises.readdir(dir, { withFileTypes: true })).map((e) => prefix ? `${prefix}/${e.name}` : e.name);
|
|
218
|
+
return (await fs$1.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.promises.rm(filePath, { force: true });
|
|
225
|
+
await fs$1.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.existsSync(target)) {
|
|
231
|
+
while (!fs$1.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.promises.statfs(target);
|
|
236
|
+
const stats = await fs$1.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.promises.mkdir(path$1.dirname(target), { recursive: true });
|
|
246
|
-
await fs.promises.unlink(partial).catch(() => {});
|
|
247
|
-
const stream = fs.createWriteStream(partial);
|
|
245
|
+
await fs$1.promises.mkdir(path$1.dirname(target), { recursive: true });
|
|
246
|
+
await fs$1.promises.unlink(partial).catch(() => {});
|
|
247
|
+
const stream = fs$1.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.promises.rename(session.partial, session.target);
|
|
288
|
+
await fs$1.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.promises.unlink(session.partial).catch(() => {});
|
|
298
|
+
await fs$1.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.promises.stat(target);
|
|
305
|
-
const fd = await fs.promises.open(target, "r");
|
|
304
|
+
const stat = await fs$1.promises.stat(target);
|
|
305
|
+
const fd = await fs$1.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-BEo-y-cQ.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-DhuvKiGK.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 {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Record kinds owned by integration-registry (phase 4).
|
|
3
|
+
*
|
|
4
|
+
* An integration's configuration is the addon's own instance record. This owner
|
|
5
|
+
* keeps only the registry row (id, addon, name, enabled, info).
|
|
3
6
|
*/
|
|
4
7
|
import { type DefinedRecordKind } from "@camstack/types";
|
|
5
8
|
import { z } from "zod";
|
|
6
9
|
export declare const INTEGRATIONS_LEGACY = "integrations";
|
|
7
|
-
export declare const INTEGRATION_SETTINGS_LEGACY = "integration_settings";
|
|
8
10
|
export type IntegrationBody = {
|
|
9
11
|
readonly addonId: string;
|
|
10
12
|
readonly name: string;
|
|
@@ -15,17 +17,8 @@ export type IntegrationBody = {
|
|
|
15
17
|
readonly updatedAt: number;
|
|
16
18
|
};
|
|
17
19
|
export declare const IntegrationBodySchema: z.ZodType<IntegrationBody>;
|
|
18
|
-
export type IntegrationSettingBody = {
|
|
19
|
-
readonly integrationId: string;
|
|
20
|
-
readonly key: string;
|
|
21
|
-
readonly value: string;
|
|
22
|
-
readonly valueType: string;
|
|
23
|
-
};
|
|
24
|
-
export declare const IntegrationSettingBodySchema: z.ZodType<IntegrationSettingBody>;
|
|
25
20
|
export type IntegrationRegistryRecordKindsMap = {
|
|
26
21
|
readonly integrations: DefinedRecordKind<z.ZodType<IntegrationBody>>;
|
|
27
|
-
readonly "integration-settings": DefinedRecordKind<z.ZodType<IntegrationSettingBody>>;
|
|
28
22
|
};
|
|
29
23
|
export declare const integrationRegistryRecordKinds: IntegrationRegistryRecordKindsMap;
|
|
30
24
|
export declare const integrationsRecordKind: DefinedRecordKind<z.ZodType<IntegrationBody>>;
|
|
31
|
-
export declare const integrationSettingsRecordKind: DefinedRecordKind<z.ZodType<IntegrationSettingBody>>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { CreateIntegrationInput, IIntegrationRegistry, Integration, ISettingsStoreProvider, RecordKindHandle, RecordsAccess } from "@camstack/types";
|
|
2
|
-
import { type IntegrationBody
|
|
2
|
+
import { type IntegrationBody } from "./integration-record-kinds.js";
|
|
3
3
|
export interface IntegrationRecordStores {
|
|
4
4
|
readonly integrations: RecordKindHandle<IntegrationBody>;
|
|
5
|
-
readonly settings: RecordKindHandle<IntegrationSettingBody>;
|
|
6
5
|
}
|
|
7
6
|
export declare class IntegrationRegistry implements IIntegrationRegistry {
|
|
8
7
|
private readonly store;
|
|
@@ -27,14 +26,5 @@ export declare class IntegrationRegistry implements IIntegrationRegistry {
|
|
|
27
26
|
readonly info: Readonly<Record<string, unknown>> | null;
|
|
28
27
|
}): boolean;
|
|
29
28
|
deleteIntegration(id: string): Promise<boolean>;
|
|
30
|
-
getIntegrationSettings(integrationId: string): Promise<Record<string, unknown>>;
|
|
31
|
-
/**
|
|
32
|
-
* Delete every legacy setting row of an integration and answer the keychain refs the rows
|
|
33
|
-
* carried, so the caller (the rows-to-record migration) releases them after the rows are gone.
|
|
34
|
-
* The integration itself stays.
|
|
35
|
-
*/
|
|
36
|
-
clearIntegrationSettings(integrationId: string): Promise<readonly string[]>;
|
|
37
|
-
setIntegrationSetting(integrationId: string, key: string, value: unknown): Promise<void>;
|
|
38
|
-
setIntegrationSettings(integrationId: string, settings: Record<string, unknown>): Promise<void>;
|
|
39
29
|
private mapIntegration;
|
|
40
30
|
}
|
|
@@ -1,29 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The system-side ports of `moveIntegrationRowsToRecords` (planning#416)
|
|
3
|
-
*
|
|
4
|
-
* integration's OWNER keychain
|
|
5
|
-
*
|
|
2
|
+
* The system-side ports of `moveIntegrationRowsToRecords` (planning#416). The leftover rows are
|
|
3
|
+
* read on the settings connection by the migration-only door, and their secrets are resolved
|
|
4
|
+
* through the integration's OWNER keychain handle (never exposed further) and cleared together
|
|
5
|
+
* with the rows. The addon's own record kind is reached through its records handle.
|
|
6
6
|
*/
|
|
7
7
|
import { type IntegrationRowsPorts, type RecordKindHandle, type RowsMigrationLog, type SecretsAccess } from "@camstack/types";
|
|
8
|
-
import type {
|
|
8
|
+
import type { MigrationDatabase } from "./migrations/migration-types.js";
|
|
9
9
|
export interface IntegrationRowsPortsDeps {
|
|
10
|
-
readonly
|
|
10
|
+
readonly db: MigrationDatabase;
|
|
11
11
|
/** The OWNER addon's keychain handle, or null when there is no keychain. */
|
|
12
12
|
readonly secrets: SecretsAccess | null;
|
|
13
13
|
readonly records: RecordKindHandle<Record<string, unknown>>;
|
|
14
14
|
readonly log: RowsMigrationLog;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
readonly secrets: SecretsAccess | null;
|
|
15
|
+
readonly listIntegrations: (addonId: string) => Promise<readonly {
|
|
16
|
+
readonly id: string;
|
|
17
|
+
readonly name: string;
|
|
18
|
+
}[]>;
|
|
20
19
|
}
|
|
21
20
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* no-op. Counts only; never a value.
|
|
21
|
+
* Delete one integration's leftover rows AND the keychain values they pointed at (values first,
|
|
22
|
+
* so a failed delete leaves the rows to retry). A missing store is a no-op. Counts only.
|
|
25
23
|
*/
|
|
26
|
-
export declare function clearIntegrationRows(
|
|
24
|
+
export declare function clearIntegrationRows(db: MigrationDatabase, secrets: SecretsAccess | null, integrationId: string): Promise<{
|
|
27
25
|
readonly rows: number;
|
|
28
26
|
readonly secrets: number;
|
|
29
27
|
}>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { MigrationDatabase } from "./migration-types.js";
|
|
2
|
+
export declare const LEGACY_INTEGRATION_ROWS_TABLE = "integration_settings";
|
|
3
|
+
export declare const LEGACY_INTEGRATION_ROWS_KIND = "integration-settings";
|
|
4
|
+
/** The column layout the leftover store used. A no-op when the table is already there. */
|
|
5
|
+
export declare function ensureLegacyIntegrationRowsTable(db: MigrationDatabase): void;
|
|
6
|
+
export interface LegacyIntegrationRowsClear {
|
|
7
|
+
readonly rows: number;
|
|
8
|
+
readonly secrets: number;
|
|
9
|
+
}
|
|
10
|
+
export interface LegacyIntegrationRowsPatch {
|
|
11
|
+
readonly written: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface LegacyIntegrationRowsKeyDelete {
|
|
14
|
+
/** `false` when the store is already gone. */
|
|
15
|
+
readonly present: boolean;
|
|
16
|
+
readonly removed: Readonly<Record<string, unknown>>;
|
|
17
|
+
}
|
|
18
|
+
/** The rows of one integration. Empty when the store is gone or the integration has none. */
|
|
19
|
+
export declare function readLegacyIntegrationRows(db: MigrationDatabase, integrationId: string): Readonly<Record<string, unknown>>;
|
|
20
|
+
/**
|
|
21
|
+
* Delete one integration's rows. Does not touch the keychain: the caller
|
|
22
|
+
* releases the refs first, while the rows still point at them. A missing
|
|
23
|
+
* store is a no-op. `secrets` is how many marker refs the rows held.
|
|
24
|
+
*/
|
|
25
|
+
export declare function clearLegacyIntegrationRows(db: MigrationDatabase, integrationId: string): LegacyIntegrationRowsClear;
|
|
26
|
+
/** Upsert only the keys in `patch`. Other keys, including secret markers, stay as stored. */
|
|
27
|
+
export declare function patchLegacyIntegrationRows(db: MigrationDatabase, integrationId: string, patch: Readonly<Record<string, unknown>>): LegacyIntegrationRowsPatch;
|
|
28
|
+
/** Remove named keys. `present` is false when the store is already gone. */
|
|
29
|
+
export declare function deleteLegacyIntegrationRowKeys(db: MigrationDatabase, integrationId: string, keys: readonly string[]): LegacyIntegrationRowsKeyDelete;
|
|
30
|
+
/** The addon that owns the integration, or null when the integration is gone. */
|
|
31
|
+
export declare function legacyIntegrationAddonId(db: MigrationDatabase, integrationId: string): string | null;
|
|
@@ -4,9 +4,25 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { IMigrationsProvider, MigrationDryRunResult, MigrationLedgerEntry, MigrationMeta, MigrationOwnerResult, MigrationOwnerStep, MigrationPendingEntry, MigrationStatus, DataStoreDatabase } from "@camstack/types";
|
|
6
6
|
import type { MigrationEngine } from "./migration-engine.js";
|
|
7
|
+
import type { MigrationDatabase } from "./migration-types.js";
|
|
8
|
+
/**
|
|
9
|
+
* The settings connection and the runner lookup the legacy-row methods need.
|
|
10
|
+
* Absent in specs that never call them.
|
|
11
|
+
*/
|
|
12
|
+
export interface LegacyIntegrationRowsDoor {
|
|
13
|
+
readonly database: () => MigrationDatabase | null;
|
|
14
|
+
readonly runnerIdOf: (owner: string) => string;
|
|
15
|
+
}
|
|
7
16
|
export declare class MigrationsProvider implements IMigrationsProvider {
|
|
8
17
|
private readonly engine;
|
|
9
|
-
|
|
18
|
+
private readonly legacyRows;
|
|
19
|
+
constructor(engine: MigrationEngine, legacyRows?: LegacyIntegrationRowsDoor | null);
|
|
20
|
+
private settingsDatabase;
|
|
21
|
+
/**
|
|
22
|
+
* The integration's own addon, or the runner that hosts it. An integration
|
|
23
|
+
* that is already gone has nothing to refuse.
|
|
24
|
+
*/
|
|
25
|
+
private assertLegacyCaller;
|
|
10
26
|
listLedger(): Promise<{
|
|
11
27
|
entries: MigrationLedgerEntry[];
|
|
12
28
|
}>;
|
|
@@ -58,4 +74,26 @@ export declare class MigrationsProvider implements IMigrationsProvider {
|
|
|
58
74
|
held: string[];
|
|
59
75
|
restartRequired: boolean;
|
|
60
76
|
}>;
|
|
77
|
+
readLegacyIntegrationRows(input: {
|
|
78
|
+
integrationId: string;
|
|
79
|
+
}): Promise<Record<string, unknown>>;
|
|
80
|
+
clearLegacyIntegrationRows(input: {
|
|
81
|
+
integrationId: string;
|
|
82
|
+
}): Promise<{
|
|
83
|
+
rows: number;
|
|
84
|
+
secrets: number;
|
|
85
|
+
}>;
|
|
86
|
+
patchLegacyIntegrationRows(input: {
|
|
87
|
+
integrationId: string;
|
|
88
|
+
patch: Record<string, unknown>;
|
|
89
|
+
}): Promise<{
|
|
90
|
+
written: boolean;
|
|
91
|
+
}>;
|
|
92
|
+
deleteLegacyIntegrationRowKeys(input: {
|
|
93
|
+
integrationId: string;
|
|
94
|
+
keys: string[];
|
|
95
|
+
}): Promise<{
|
|
96
|
+
present: boolean;
|
|
97
|
+
removed: Record<string, unknown>;
|
|
98
|
+
}>;
|
|
61
99
|
}
|
|
@@ -3,11 +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-Dtw1sIeQ.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-BEo-y-cQ.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-B8_XCqUX.js");
|
|
11
12
|
let zod = require("zod");
|
|
12
13
|
let node_crypto = require("node:crypto");
|
|
13
14
|
let node_fs_promises = require("node:fs/promises");
|
|
@@ -1907,8 +1908,27 @@ function callerOf(input) {
|
|
|
1907
1908
|
}
|
|
1908
1909
|
var MigrationsProvider = class {
|
|
1909
1910
|
engine;
|
|
1910
|
-
|
|
1911
|
+
legacyRows;
|
|
1912
|
+
constructor(engine, legacyRows = null) {
|
|
1911
1913
|
this.engine = engine;
|
|
1914
|
+
this.legacyRows = legacyRows;
|
|
1915
|
+
}
|
|
1916
|
+
settingsDatabase() {
|
|
1917
|
+
const db = this.legacyRows?.database() ?? null;
|
|
1918
|
+
if (db === null) throw new Error("legacy integration rows: the settings database is not open");
|
|
1919
|
+
return db;
|
|
1920
|
+
}
|
|
1921
|
+
/**
|
|
1922
|
+
* The integration's own addon, or the runner that hosts it. An integration
|
|
1923
|
+
* that is already gone has nothing to refuse.
|
|
1924
|
+
*/
|
|
1925
|
+
assertLegacyCaller(integrationId, caller) {
|
|
1926
|
+
const db = this.settingsDatabase();
|
|
1927
|
+
const owner = require_legacy_integration_rows_door.legacyIntegrationAddonId(db, integrationId);
|
|
1928
|
+
if (owner === null) return db;
|
|
1929
|
+
const runner = this.legacyRows?.runnerIdOf(owner) ?? owner;
|
|
1930
|
+
if (caller === null || caller !== owner && caller !== runner) throw new Error(`legacy integration rows of "${integrationId}" are migration-only — caller "${caller ?? ""}" is not "${owner}"`);
|
|
1931
|
+
return db;
|
|
1912
1932
|
}
|
|
1913
1933
|
async listLedger() {
|
|
1914
1934
|
return { entries: [...await this.engine.listLedger()] };
|
|
@@ -1945,6 +1965,25 @@ var MigrationsProvider = class {
|
|
|
1945
1965
|
restartRequired: true
|
|
1946
1966
|
};
|
|
1947
1967
|
}
|
|
1968
|
+
readLegacyIntegrationRows(input) {
|
|
1969
|
+
const db = this.assertLegacyCaller(input.integrationId, callerOf(input));
|
|
1970
|
+
return Promise.resolve({ ...require_legacy_integration_rows_door.readLegacyIntegrationRows(db, input.integrationId) });
|
|
1971
|
+
}
|
|
1972
|
+
clearLegacyIntegrationRows(input) {
|
|
1973
|
+
const db = this.assertLegacyCaller(input.integrationId, callerOf(input));
|
|
1974
|
+
return Promise.resolve(require_legacy_integration_rows_door.clearLegacyIntegrationRows(db, input.integrationId));
|
|
1975
|
+
}
|
|
1976
|
+
patchLegacyIntegrationRows(input) {
|
|
1977
|
+
const db = this.assertLegacyCaller(input.integrationId, callerOf(input));
|
|
1978
|
+
return Promise.resolve(require_legacy_integration_rows_door.patchLegacyIntegrationRows(db, input.integrationId, input.patch));
|
|
1979
|
+
}
|
|
1980
|
+
deleteLegacyIntegrationRowKeys(input) {
|
|
1981
|
+
const deleted = require_legacy_integration_rows_door.deleteLegacyIntegrationRowKeys(this.assertLegacyCaller(input.integrationId, callerOf(input)), input.integrationId, input.keys);
|
|
1982
|
+
return Promise.resolve({
|
|
1983
|
+
present: deleted.present,
|
|
1984
|
+
removed: { ...deleted.removed }
|
|
1985
|
+
});
|
|
1986
|
+
}
|
|
1948
1987
|
};
|
|
1949
1988
|
//#endregion
|
|
1950
1989
|
//#region src/builtins/sqlite-storage/placement-router.ts
|
|
@@ -2829,6 +2868,7 @@ var SqliteSettingsAddon = class extends require_dist.BaseAddon {
|
|
|
2829
2868
|
dbPath: settingsPath
|
|
2830
2869
|
} });
|
|
2831
2870
|
this.ctx.logger.info("DB file status", { meta: { dbExists } });
|
|
2871
|
+
const runnerIdOf = runnerResolverFor(this.ctx.kernel?.runnerIdForAddon, node_path.default.join(this.ctx.nodeDataDir ?? node_path.default.resolve(dir, "..", ".."), "addons"));
|
|
2832
2872
|
const engine = new MigrationEngine({
|
|
2833
2873
|
logger: this.ctx.logger.child("Migrations"),
|
|
2834
2874
|
catalogue: require_wal_maintenance.HUB_MIGRATIONS,
|
|
@@ -2838,7 +2878,7 @@ var SqliteSettingsAddon = class extends require_dist.BaseAddon {
|
|
|
2838
2878
|
logger: this.ctx.logger.child("PreMigrationSnapshot")
|
|
2839
2879
|
}),
|
|
2840
2880
|
announce: (kind, ids) => this.announceMigrations(kind, ids),
|
|
2841
|
-
runnerIdOf
|
|
2881
|
+
runnerIdOf,
|
|
2842
2882
|
scheduleRestore: (request) => scheduleMigrationRestore(node_path.default.resolve(dir, "..", ".."), request)
|
|
2843
2883
|
});
|
|
2844
2884
|
const deps = {
|
|
@@ -2904,7 +2944,10 @@ var SqliteSettingsAddon = class extends require_dist.BaseAddon {
|
|
|
2904
2944
|
},
|
|
2905
2945
|
{
|
|
2906
2946
|
capability: require_dist.migrationsCapability,
|
|
2907
|
-
provider: new MigrationsProvider(engine
|
|
2947
|
+
provider: new MigrationsProvider(engine, {
|
|
2948
|
+
database: () => settings.backend.getDatabase(),
|
|
2949
|
+
runnerIdOf
|
|
2950
|
+
})
|
|
2908
2951
|
}
|
|
2909
2952
|
],
|
|
2910
2953
|
customActions: migrationActions,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { An as catalogueIssues, Ao as DeclarationRefusedError, Bi as recordsCapability, Fo as NoCallerError, M as DATABASE_SNAPSHOT_SUFFIX, N as DATABASE_SNAPSHOT_TIMEOUT_MS, P as DATA_STORE_DATABASES, Po as InvalidRecordError, Ti as orderMigrations, Tt as MigrationMetaSchema, Us as normalizeSecretOwner, Vo as RECORD_SWEEP_INTERVAL_MS, Wo as RUNTIME_DEFAULTS, Xn as databaseSnapshotCapability, Yn as dataStoreProviderCapability, _s as defineCustomActions, dc as EventCategory, es as TransactRefusedError, fs as collectSecretMarkerRefs, hs as customAction, j as DATABASE_SNAPSHOT_PARTIAL_SUFFIX, ns as UnknownRecordKindError, pi as migrationsCapability, qo as RecordKindDeclarationSchema, ta as resolveRunnerId, uc as errMsg$1, vn as bareAddonId, wo as BaseAddon, ya as storageAdminCapability, za as vectorStoreCapability } from "../../dist-
|
|
1
|
+
import { An as catalogueIssues, Ao as DeclarationRefusedError, Bi as recordsCapability, Fo as NoCallerError, M as DATABASE_SNAPSHOT_SUFFIX, N as DATABASE_SNAPSHOT_TIMEOUT_MS, P as DATA_STORE_DATABASES, Po as InvalidRecordError, Ti as orderMigrations, Tt as MigrationMetaSchema, Us as normalizeSecretOwner, Vo as RECORD_SWEEP_INTERVAL_MS, Wo as RUNTIME_DEFAULTS, Xn as databaseSnapshotCapability, Yn as dataStoreProviderCapability, _s as defineCustomActions, dc as EventCategory, es as TransactRefusedError, fs as collectSecretMarkerRefs, hs as customAction, j as DATABASE_SNAPSHOT_PARTIAL_SUFFIX, ns as UnknownRecordKindError, pi as migrationsCapability, qo as RecordKindDeclarationSchema, ta as resolveRunnerId, uc as errMsg$1, vn as bareAddonId, wo as BaseAddon, ya as storageAdminCapability, za as vectorStoreCapability } from "../../dist-C3WXy3Ix.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-DhuvKiGK.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-DK42Bh2Q.mjs";
|
|
6
7
|
import { createRequire } from "node:module";
|
|
7
8
|
import { z } from "zod";
|
|
8
9
|
import { randomUUID } from "node:crypto";
|
|
@@ -1900,8 +1901,27 @@ function callerOf(input) {
|
|
|
1900
1901
|
}
|
|
1901
1902
|
var MigrationsProvider = class {
|
|
1902
1903
|
engine;
|
|
1903
|
-
|
|
1904
|
+
legacyRows;
|
|
1905
|
+
constructor(engine, legacyRows = null) {
|
|
1904
1906
|
this.engine = engine;
|
|
1907
|
+
this.legacyRows = legacyRows;
|
|
1908
|
+
}
|
|
1909
|
+
settingsDatabase() {
|
|
1910
|
+
const db = this.legacyRows?.database() ?? null;
|
|
1911
|
+
if (db === null) throw new Error("legacy integration rows: the settings database is not open");
|
|
1912
|
+
return db;
|
|
1913
|
+
}
|
|
1914
|
+
/**
|
|
1915
|
+
* The integration's own addon, or the runner that hosts it. An integration
|
|
1916
|
+
* that is already gone has nothing to refuse.
|
|
1917
|
+
*/
|
|
1918
|
+
assertLegacyCaller(integrationId, caller) {
|
|
1919
|
+
const db = this.settingsDatabase();
|
|
1920
|
+
const owner = legacyIntegrationAddonId(db, integrationId);
|
|
1921
|
+
if (owner === null) return db;
|
|
1922
|
+
const runner = this.legacyRows?.runnerIdOf(owner) ?? owner;
|
|
1923
|
+
if (caller === null || caller !== owner && caller !== runner) throw new Error(`legacy integration rows of "${integrationId}" are migration-only — caller "${caller ?? ""}" is not "${owner}"`);
|
|
1924
|
+
return db;
|
|
1905
1925
|
}
|
|
1906
1926
|
async listLedger() {
|
|
1907
1927
|
return { entries: [...await this.engine.listLedger()] };
|
|
@@ -1938,6 +1958,25 @@ var MigrationsProvider = class {
|
|
|
1938
1958
|
restartRequired: true
|
|
1939
1959
|
};
|
|
1940
1960
|
}
|
|
1961
|
+
readLegacyIntegrationRows(input) {
|
|
1962
|
+
const db = this.assertLegacyCaller(input.integrationId, callerOf(input));
|
|
1963
|
+
return Promise.resolve({ ...readLegacyIntegrationRows(db, input.integrationId) });
|
|
1964
|
+
}
|
|
1965
|
+
clearLegacyIntegrationRows(input) {
|
|
1966
|
+
const db = this.assertLegacyCaller(input.integrationId, callerOf(input));
|
|
1967
|
+
return Promise.resolve(clearLegacyIntegrationRows(db, input.integrationId));
|
|
1968
|
+
}
|
|
1969
|
+
patchLegacyIntegrationRows(input) {
|
|
1970
|
+
const db = this.assertLegacyCaller(input.integrationId, callerOf(input));
|
|
1971
|
+
return Promise.resolve(patchLegacyIntegrationRows(db, input.integrationId, input.patch));
|
|
1972
|
+
}
|
|
1973
|
+
deleteLegacyIntegrationRowKeys(input) {
|
|
1974
|
+
const deleted = deleteLegacyIntegrationRowKeys(this.assertLegacyCaller(input.integrationId, callerOf(input)), input.integrationId, input.keys);
|
|
1975
|
+
return Promise.resolve({
|
|
1976
|
+
present: deleted.present,
|
|
1977
|
+
removed: { ...deleted.removed }
|
|
1978
|
+
});
|
|
1979
|
+
}
|
|
1941
1980
|
};
|
|
1942
1981
|
//#endregion
|
|
1943
1982
|
//#region src/builtins/sqlite-storage/placement-router.ts
|
|
@@ -2822,6 +2861,7 @@ var SqliteSettingsAddon = class extends BaseAddon {
|
|
|
2822
2861
|
dbPath: settingsPath
|
|
2823
2862
|
} });
|
|
2824
2863
|
this.ctx.logger.info("DB file status", { meta: { dbExists } });
|
|
2864
|
+
const runnerIdOf = runnerResolverFor(this.ctx.kernel?.runnerIdForAddon, path.join(this.ctx.nodeDataDir ?? path.resolve(dir, "..", ".."), "addons"));
|
|
2825
2865
|
const engine = new MigrationEngine({
|
|
2826
2866
|
logger: this.ctx.logger.child("Migrations"),
|
|
2827
2867
|
catalogue: HUB_MIGRATIONS,
|
|
@@ -2831,7 +2871,7 @@ var SqliteSettingsAddon = class extends BaseAddon {
|
|
|
2831
2871
|
logger: this.ctx.logger.child("PreMigrationSnapshot")
|
|
2832
2872
|
}),
|
|
2833
2873
|
announce: (kind, ids) => this.announceMigrations(kind, ids),
|
|
2834
|
-
runnerIdOf
|
|
2874
|
+
runnerIdOf,
|
|
2835
2875
|
scheduleRestore: (request) => scheduleMigrationRestore(path.resolve(dir, "..", ".."), request)
|
|
2836
2876
|
});
|
|
2837
2877
|
const deps = {
|
|
@@ -2897,7 +2937,10 @@ var SqliteSettingsAddon = class extends BaseAddon {
|
|
|
2897
2937
|
},
|
|
2898
2938
|
{
|
|
2899
2939
|
capability: migrationsCapability,
|
|
2900
|
-
provider: new MigrationsProvider(engine
|
|
2940
|
+
provider: new MigrationsProvider(engine, {
|
|
2941
|
+
database: () => settings.backend.getDatabase(),
|
|
2942
|
+
runnerIdOf
|
|
2943
|
+
})
|
|
2901
2944
|
}
|
|
2902
2945
|
],
|
|
2903
2946
|
customActions: migrationActions,
|
|
@@ -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-Dtw1sIeQ.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 { Fs as isSecretMarker, Ha as withLocationMode, Ho as REDACTED_SECRET, Hr as isLocationEnabled, Hs as normalizeNodeId, Or as gbToBytes, Qs as secretTreeFromPaths, Qt as StorageMigrationJobSchema, Ws as parseJsonObject, Xr as legacyModeOf, Xs as resolveSecretMarkers, Xt as StorageLocationModeSchema, Yt as StorageCleanupJobSchema, Zi as resolveLocationMode, Zt as StorageLocationTypeSchema, ba as storageCapability, dc as EventCategory, gr as evictionPolicyOfLocation, gs as defineAddonMigrations, ic as transformSecretWrite, mi as modeMayWrite, oi as mayReadLocation, si as mayWriteToLocation, ua as settingsStoreCapability, us as collectSecretConfigKeys, wo as BaseAddon, xa as storageMigrationCapability, ys as defineRecordKinds, yt as LegacyStorageLocationDefaultSchema } from "../../dist-
|
|
1
|
+
import { Fs as isSecretMarker, Ha as withLocationMode, Ho as REDACTED_SECRET, Hr as isLocationEnabled, Hs as normalizeNodeId, Or as gbToBytes, Qs as secretTreeFromPaths, Qt as StorageMigrationJobSchema, Ws as parseJsonObject, Xr as legacyModeOf, Xs as resolveSecretMarkers, Xt as StorageLocationModeSchema, Yt as StorageCleanupJobSchema, Zi as resolveLocationMode, Zt as StorageLocationTypeSchema, ba as storageCapability, dc as EventCategory, gr as evictionPolicyOfLocation, gs as defineAddonMigrations, ic as transformSecretWrite, mi as modeMayWrite, oi as mayReadLocation, si as mayWriteToLocation, ua as settingsStoreCapability, us as collectSecretConfigKeys, wo as BaseAddon, xa as storageMigrationCapability, ys as defineRecordKinds, yt as LegacyStorageLocationDefaultSchema } from "../../dist-C3WXy3Ix.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-Dtw1sIeQ.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_agent_https = require("../../agent-https-
|
|
10
|
-
const require_constants$8 = require("../../constants-
|
|
9
|
+
const require_agent_https = require("../../agent-https-mq6d71iq.js");
|
|
10
|
+
const require_constants$8 = require("../../constants-gM9xHjyj.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");
|