@camstack/server 1.2.778 → 1.2.780
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 +21 -0
- package/dist/agent/main.js +5 -1
- package/dist/agent/stale-addon-gate.js +52 -15
- package/dist/api/addon-upload.js +41 -0
- package/dist/api/core/cap-providers.js +19 -29
- package/dist/api/core/integration-role.js +15 -2
- package/dist/api/tarball-manifest.js +10 -1
- package/dist/api/trpc/generated-cap-mounts.js +1 -9
- package/dist/api/trpc/generated-cap-routers.js +9 -88
- package/dist/core/addon/addon-package.service.js +24 -8
- package/dist/core/addon/addon-registry.service.js +61 -10
- package/dist/core/addon/hub-spawn-gate.js +92 -0
- package/dist/core/addon/integration-instances-provider.js +22 -0
- package/dist/core/agent/agent-registry.service.js +6 -2
- package/dist/core/agent/delivery-requirements.js +22 -6
- package/dist/core/updates/required-addon-update.js +188 -0
- package/dist/launcher.js +4 -0
- package/dist/manual-boot.js +27 -0
- package/dist/server-root/index.js +74 -3
- package/package.json +33 -11
- package/system/dist/addon-runner.js +179 -4
- package/system/dist/addon-runner.mjs +180 -5
- package/system/dist/{agent-https-DnEHxqTM.js → agent-https-A9wsxVGn.js} +1 -1
- package/system/dist/{agent-https-DjiLJBkD.mjs → agent-https-DuxDC67S.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 +1 -1
- 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 +1 -1
- 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 +2 -2
- 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 +6 -3
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +6 -3
- 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 +2 -2
- 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 +1 -1
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +1 -1
- 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 +1 -1
- 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/installed-runner-resolver.d.ts +7 -0
- package/system/dist/builtins/sqlite-storage/migrations/migrations-provider.d.ts +10 -3
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +38 -9
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +38 -9
- 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 +3 -3
- 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-dY1enbrF.mjs → capture-engine-CEChNpAD.mjs} +1 -1
- package/system/dist/{capture-engine-DW3Tts4M.js → capture-engine-D6mXfLFQ.js} +1 -1
- package/system/dist/{composition-sources-Ckz1nky_.mjs → composition-sources-6XYW86Kw.mjs} +1 -1
- package/system/dist/{composition-sources-Y_vIrdLy.js → composition-sources-cVWKVph4.js} +1 -1
- package/system/dist/{constants-Bbu5TQF_.js → constants-B5Yg02ii.js} +1 -1
- package/system/dist/{constants-9sQvihXt.mjs → constants-DqwDEYfb.mjs} +1 -1
- package/system/dist/{device-ca-CbuTkPXx.js → device-ca-BVz14dRd.js} +1 -1
- package/system/dist/{device-ca-2dQqY2z0.mjs → device-ca-oY4Xqd7s.mjs} +1 -1
- package/system/dist/{dist-D3StiAs2.js → dist-B4wrqheM.js} +850 -635
- package/system/dist/{dist-CV4RPML4.mjs → dist-BX8nZeXV.mjs} +821 -636
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-BlxgXzRs.mjs → hub-mdns-ciao-BDPMfOgq.mjs} +2 -2
- package/system/dist/{hub-mdns-ciao-BJaeVvId.js → hub-mdns-ciao-CiMMA0rT.js} +2 -2
- package/system/dist/index.js +418 -16
- package/system/dist/index.mjs +413 -18
- package/system/dist/kernel/addon-installer.d.ts +44 -1
- package/system/dist/kernel/held-installs.d.ts +21 -0
- package/system/dist/kernel/index.d.ts +6 -0
- package/system/dist/kernel/moleculer/migration-api-facade.d.ts +73 -0
- package/system/dist/kernel/requires-registry.d.ts +31 -0
- package/system/dist/kernel/transport/acting-addon.d.ts +1 -1
- package/system/dist/{legacy-integration-rows-door-CUeUZHro.mjs → legacy-integration-rows-door-DDA3YOxL.mjs} +1 -1
- package/system/dist/{legacy-integration-rows-door-BqtcbHNX.js → legacy-integration-rows-door-YuWqHZW4.js} +1 -1
- package/system/dist/migrations/hub/__fixtures__/seed.d.ts +23 -0
- package/system/dist/{restore-archive-C4r-C6Hj.mjs → restore-archive-BrtpgNCt.mjs} +1 -1
- package/system/dist/{restore-archive-DM-QSOiY.js → restore-archive-Cn9OShm4.js} +1 -1
- package/system/dist/{wal-maintenance-1dP8IFlA.js → wal-maintenance-BTzu3s-6.js} +0 -0
- package/system/dist/{wal-maintenance-sPn0MLRB.mjs → wal-maintenance-jgyV9NbL.mjs} +0 -0
- package/system/package.json +1 -1
|
@@ -47,8 +47,30 @@ export interface AddonInstallerConfig {
|
|
|
47
47
|
* Production leaves it unset and asks the registry; specs inject it.
|
|
48
48
|
*/
|
|
49
49
|
readonly resolveLatestVersion?: (packageName: string) => Promise<string | null>;
|
|
50
|
+
/**
|
|
51
|
+
* The `@camstack/server` version this process runs. When set, a registry
|
|
52
|
+
* install at boot (`ensureRequiredPackages`) first reads the target's
|
|
53
|
+
* `camstack.requires` and holds back a version that needs a newer server
|
|
54
|
+
* (D989, planning#447): it is NOT installed, the reason names both versions.
|
|
55
|
+
* An unreadable `requires` document is held too — a failed read is never a
|
|
56
|
+
* pass. `null` is "the running version could not be read" and passes nothing
|
|
57
|
+
* that declares a minimum. Unset (specs, legacy callers) means no gate.
|
|
58
|
+
*/
|
|
59
|
+
readonly serverVersion?: string | null;
|
|
60
|
+
/**
|
|
61
|
+
* `camstack.requires` of `packageName@spec` (`undefined` = declares none).
|
|
62
|
+
* Throws when the registry document cannot be read. Production leaves it
|
|
63
|
+
* unset and asks the registry; specs inject it.
|
|
64
|
+
*/
|
|
65
|
+
readonly resolveRequires?: (packageName: string, spec: string) => Promise<PackageRequires | undefined>;
|
|
66
|
+
/**
|
|
67
|
+
* Stable versions of a package, newest first. Used to fall back to the newest
|
|
68
|
+
* version this server can host when `latest` needs a newer one. Production
|
|
69
|
+
* leaves it unset and asks the registry through the install's own doors.
|
|
70
|
+
*/
|
|
71
|
+
readonly listVersions?: (packageName: string) => Promise<readonly string[]>;
|
|
50
72
|
}
|
|
51
|
-
import type { InstalledPackage, IScopedLogger } from "@camstack/types";
|
|
73
|
+
import type { InstalledPackage, IScopedLogger, PackageRequires } from "@camstack/types";
|
|
52
74
|
import { AddonManifest } from "./addon-manifest.js";
|
|
53
75
|
export type { InstalledPackage };
|
|
54
76
|
/** Outcome of {@link AddonInstaller.ensureAddonRuntimeDeps}. */
|
|
@@ -109,6 +131,10 @@ export declare class AddonInstaller {
|
|
|
109
131
|
/** Test seam — production resolves via `CAMSTACK_FRAMEWORK_DIR`. */
|
|
110
132
|
private readonly closureNodeModulesDir;
|
|
111
133
|
private readonly resolveLatestVersionOverride;
|
|
134
|
+
private readonly serverVersion;
|
|
135
|
+
private readonly resolveRequiresOverride;
|
|
136
|
+
private readonly listVersionsOverride;
|
|
137
|
+
private requiresRegistryCache;
|
|
112
138
|
/**
|
|
113
139
|
* Central manifest of installed addons. Tracks version + source +
|
|
114
140
|
* timestamps + last-backup pointer per package, written atomically
|
|
@@ -210,6 +236,23 @@ export declare class AddonInstaller {
|
|
|
210
236
|
* down, or no tag) leaves the copy where it is.
|
|
211
237
|
*/
|
|
212
238
|
private followInstalledAddonToLatest;
|
|
239
|
+
/**
|
|
240
|
+
* Whether `packageName@spec` may be installed on this server (no gate when no
|
|
241
|
+
* server version was configured). Judges only the server minimum;
|
|
242
|
+
* `requires.addons` binds the server's own update, not an addon's.
|
|
243
|
+
*
|
|
244
|
+
* - `ok` — install it as asked.
|
|
245
|
+
* - `older` — `spec` is `latest` and needs a newer server; `version` is the newest
|
|
246
|
+
* registry version whose `requires` this server meets.
|
|
247
|
+
* - `hold` — do not install; `code` says whether the minimum is unmet and nothing
|
|
248
|
+
* older fits, or the registry could not be read (an auth failure of our
|
|
249
|
+
* own is a failed read, never an unmet minimum). Recorded for the alert.
|
|
250
|
+
*/
|
|
251
|
+
private judgeRequirements;
|
|
252
|
+
private unreadableReason;
|
|
253
|
+
private requiresRegistry;
|
|
254
|
+
private readRequires;
|
|
255
|
+
private listVersions;
|
|
213
256
|
/** `dist-tags.latest`, or `null` when the registry cannot be read. */
|
|
214
257
|
private readRegistryLatest;
|
|
215
258
|
private fetchRegistryLatest;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Installs the boot installer REFUSED to make (planning#447, D989).
|
|
3
|
+
*
|
|
4
|
+
* The installer runs before any service exists, so it cannot raise an alert.
|
|
5
|
+
* It records what it held back here; the hub's boot, once the alerts provider
|
|
6
|
+
* is up, reads the list and raises one alert per package. The list lives in the
|
|
7
|
+
* process: it describes this boot only.
|
|
8
|
+
*/
|
|
9
|
+
export type HeldInstallCode = "no-compatible-version" | "registry-unreadable" | "requirements-unmet";
|
|
10
|
+
export interface HeldInstall {
|
|
11
|
+
readonly packageName: string;
|
|
12
|
+
/** What was asked for (`latest`, or a version). */
|
|
13
|
+
readonly spec: string;
|
|
14
|
+
readonly code: HeldInstallCode;
|
|
15
|
+
/** One line naming the versions on both sides, or why the read failed. */
|
|
16
|
+
readonly reason: string;
|
|
17
|
+
readonly serverVersion: string | null;
|
|
18
|
+
}
|
|
19
|
+
export declare function recordHeldInstall(entry: HeldInstall): void;
|
|
20
|
+
export declare function clearHeldInstall(packageName: string): void;
|
|
21
|
+
export declare function listHeldInstalls(): readonly HeldInstall[];
|
|
@@ -3,6 +3,10 @@ export { AddonLoader } from "./addon-loader.js";
|
|
|
3
3
|
export { AddonEngineManager } from "./addon-engine-manager.js";
|
|
4
4
|
export type { AddonInstallerConfig, InstalledPackage } from "./addon-installer.js";
|
|
5
5
|
export { AddonInstaller } from "./addon-installer.js";
|
|
6
|
+
export type { HeldInstall, HeldInstallCode } from "./held-installs.js";
|
|
7
|
+
export { clearHeldInstall, listHeldInstalls, recordHeldInstall } from "./held-installs.js";
|
|
8
|
+
export type { RequiresRegistry } from "./requires-registry.js";
|
|
9
|
+
export { createRequiresRegistry, RegistryReadError } from "./requires-registry.js";
|
|
6
10
|
export type { AddonVersionMove, AddonVersionReason } from "./addon-version-policy.js";
|
|
7
11
|
export { ADDON_VERSION_REASON_HUB, ADDON_VERSION_REASON_REGISTRY_LATEST, decideAddonVersionMove } from "./addon-version-policy.js";
|
|
8
12
|
export type { AddonInstallSource, AddonManifestEntry, AddonManifestFile } from "./addon-manifest.js";
|
|
@@ -53,6 +57,8 @@ export type { CoreCapAction, CoreCapCallOrigin, CoreCapServiceOptions } from "./
|
|
|
53
57
|
export { createAddonContext, createUdsAddonContext, setHubConnected, adaptBrokerToCluster, registerEventBusService, setNodeEventInterest, onLocalEventInterestChange, getLocalEventInterest, getMoleculerEventStats, subscribePassthrough, getBrokerEventBus, clusterEventTopic, EVENT_TOPIC_PREFIX } from "./moleculer/addon-context-factory.js";
|
|
54
58
|
export { asBrokerLike } from "./moleculer/event-bus.js";
|
|
55
59
|
export type { BrokerLike } from "./moleculer/event-bus.js";
|
|
60
|
+
export { createMigrationApi, createMigrationApiOverContext } from "./moleculer/migration-api-facade.js";
|
|
61
|
+
export type { MigrationApiBacking, MigrationApiContextDeps } from "./moleculer/migration-api-facade.js";
|
|
56
62
|
export type { MoleculerEventStats } from "./moleculer/addon-context-factory.js";
|
|
57
63
|
export { HubLogForwarder } from "./moleculer/hub-log-forwarder.js";
|
|
58
64
|
export type { AddonContextOptions } from "./moleculer/addon-context-factory.js";
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { type AddonApi, type AddonContext, type AddonMigrationHost, type IScopedLogger, type MigrationApiV1, type RecordsAccess, type SecretsAccess } from "@camstack/types";
|
|
2
|
+
/** The migration-only door for the pre-records integration rows. */
|
|
3
|
+
export interface LegacyRowsDoor {
|
|
4
|
+
read(input: {
|
|
5
|
+
integrationId: string;
|
|
6
|
+
}): Promise<Readonly<Record<string, unknown>>>;
|
|
7
|
+
clear(input: {
|
|
8
|
+
integrationId: string;
|
|
9
|
+
}): Promise<{
|
|
10
|
+
rows: number;
|
|
11
|
+
secrets: number;
|
|
12
|
+
}>;
|
|
13
|
+
patch(input: {
|
|
14
|
+
integrationId: string;
|
|
15
|
+
patch: Record<string, unknown>;
|
|
16
|
+
}): Promise<{
|
|
17
|
+
written: boolean;
|
|
18
|
+
}>;
|
|
19
|
+
deleteKeys(input: {
|
|
20
|
+
integrationId: string;
|
|
21
|
+
keys: string[];
|
|
22
|
+
}): Promise<{
|
|
23
|
+
present: boolean;
|
|
24
|
+
removed: Record<string, unknown>;
|
|
25
|
+
}>;
|
|
26
|
+
}
|
|
27
|
+
export interface MigrationIntegrationRow {
|
|
28
|
+
readonly id: string;
|
|
29
|
+
readonly addonId: string;
|
|
30
|
+
readonly name: string;
|
|
31
|
+
readonly info: Readonly<Record<string, unknown>>;
|
|
32
|
+
readonly originStableId?: string | undefined;
|
|
33
|
+
}
|
|
34
|
+
/** The device registry slice a migration may touch; `list` is already scoped to one addon. */
|
|
35
|
+
export interface DevicesDoor {
|
|
36
|
+
list(addonId: string): Promise<readonly {
|
|
37
|
+
readonly id: number;
|
|
38
|
+
readonly integrationId?: string | null | undefined;
|
|
39
|
+
readonly parentDeviceId?: number | null | undefined;
|
|
40
|
+
readonly type?: string | undefined;
|
|
41
|
+
readonly name?: string | undefined;
|
|
42
|
+
readonly stableId?: string | undefined;
|
|
43
|
+
}[]>;
|
|
44
|
+
get(deviceId: number): Promise<{
|
|
45
|
+
readonly integrationId?: string | null | undefined;
|
|
46
|
+
readonly config?: Readonly<Record<string, unknown>> | undefined;
|
|
47
|
+
} | null>;
|
|
48
|
+
setIntegrationId(deviceId: number, integrationId: string): Promise<void>;
|
|
49
|
+
}
|
|
50
|
+
export interface MigrationApiBacking {
|
|
51
|
+
readonly devices: DevicesDoor;
|
|
52
|
+
readonly nodeId: string;
|
|
53
|
+
readonly logger: Pick<IScopedLogger, "info" | "warn">;
|
|
54
|
+
readonly ledger: AddonMigrationHost;
|
|
55
|
+
readonly legacy: LegacyRowsDoor;
|
|
56
|
+
readonly listIntegrations: () => Promise<readonly MigrationIntegrationRow[]>;
|
|
57
|
+
readonly records: RecordsAccess | undefined;
|
|
58
|
+
readonly secrets: SecretsAccess | undefined;
|
|
59
|
+
readonly settings: Pick<NonNullable<AddonContext["settings"]>, "readAddonStore" | "writeAddonStore"> | undefined;
|
|
60
|
+
}
|
|
61
|
+
export declare function createMigrationApi(backing: MigrationApiBacking): MigrationApiV1;
|
|
62
|
+
/** What a context builder hands over: the lazily resolved `ctx.api` and the addon's own handles. */
|
|
63
|
+
export interface MigrationApiContextDeps {
|
|
64
|
+
readonly nodeId: string;
|
|
65
|
+
readonly logger: Pick<IScopedLogger, "info" | "warn">;
|
|
66
|
+
/** A getter: a hub in-process context resolves `api` per call. */
|
|
67
|
+
readonly api: () => AddonApi;
|
|
68
|
+
readonly records: RecordsAccess | undefined;
|
|
69
|
+
readonly secrets: SecretsAccess | undefined;
|
|
70
|
+
readonly settings: MigrationApiBacking["settings"];
|
|
71
|
+
}
|
|
72
|
+
/** The facade over a context's `api` (the caller is stamped by the transport, never claimed here). */
|
|
73
|
+
export declare function createMigrationApiOverContext(deps: MigrationApiContextDeps): MigrationApiV1;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reading `camstack.requires` and the version list of a package from the npm
|
|
3
|
+
* registry, through the SAME doors the install uses (planning#447, D989).
|
|
4
|
+
*
|
|
5
|
+
* The install fetches the registry document over plain HTTP and falls back to
|
|
6
|
+
* `npm` (which carries the user's npmrc: private registries, tokens). The
|
|
7
|
+
* requirement read does the same, in the same order. A refusal from the HTTP
|
|
8
|
+
* door for lack of auth is therefore never read as "the requirement is unmet":
|
|
9
|
+
* it falls through to npm, and when npm cannot read either the read FAILS with
|
|
10
|
+
* a typed {@link RegistryReadError} the caller reports as such.
|
|
11
|
+
*/
|
|
12
|
+
import { type PackageRequires } from "@camstack/types";
|
|
13
|
+
export type RegistryReadFailure = "auth" | "unavailable";
|
|
14
|
+
export declare class RegistryReadError extends Error {
|
|
15
|
+
readonly kind: RegistryReadFailure;
|
|
16
|
+
constructor(kind: RegistryReadFailure, message: string);
|
|
17
|
+
}
|
|
18
|
+
export interface RequiresRegistry {
|
|
19
|
+
/** `camstack.requires` of `packageName@spec`; `undefined` when it declares none. */
|
|
20
|
+
requiresOf(packageName: string, spec: string): Promise<PackageRequires | undefined>;
|
|
21
|
+
/** Stable versions of the package, newest first. */
|
|
22
|
+
versions(packageName: string): Promise<readonly string[]>;
|
|
23
|
+
}
|
|
24
|
+
export interface RequiresRegistryDeps {
|
|
25
|
+
readonly registry: string | undefined;
|
|
26
|
+
/** GET a registry URL; the HTTP door. */
|
|
27
|
+
readonly fetchJson: (url: string) => Promise<Response>;
|
|
28
|
+
/** Run `npm <args>` with the user's npmrc and return stdout; the second door. */
|
|
29
|
+
readonly npmView: (args: readonly string[]) => Promise<string>;
|
|
30
|
+
}
|
|
31
|
+
export declare function createRequiresRegistry(deps: RequiresRegistryDeps): RequiresRegistry;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The addon a grouped child acts for (the records owner).
|
|
2
|
+
* The addon a grouped child acts for (the records owner, the migration author).
|
|
3
3
|
*
|
|
4
4
|
* A grouped runner is stamped with its GROUP id by the transport, and the group can change when
|
|
5
5
|
* the grouping does; the data of the caps below is keyed by the ADDON, which never changes. The
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { vs as collectSecretMarkerRefs } from "./dist-BX8nZeXV.mjs";
|
|
2
2
|
//#region src/builtins/sqlite-storage/migrations/legacy-integration-rows-door.ts
|
|
3
3
|
/**
|
|
4
4
|
* Migration-only door for the leftover integration rows (planning#416).
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The legacy data the hub catalogue meets on a node that last ran an old release: written by
|
|
3
|
+
* hand, in the shape that release stored it, with a MARK in every row so a migration that
|
|
4
|
+
* rewrote a row instead of re-keying it is caught by the replay
|
|
5
|
+
* (`migration-catalogue-replay.spec.ts`).
|
|
6
|
+
*/
|
|
7
|
+
import type Database from "better-sqlite3";
|
|
8
|
+
export interface HubSeedMarks {
|
|
9
|
+
/** `addon-settings` row id to its mark; every one of them gains a `nodeId`. */
|
|
10
|
+
readonly nodeRows: Readonly<Record<string, string>>;
|
|
11
|
+
/** The integration-registry row stamped `addon:<id>`: it keeps its id and mark, gains the bare id. */
|
|
12
|
+
readonly integration: {
|
|
13
|
+
readonly id: string;
|
|
14
|
+
readonly bareAddonId: string;
|
|
15
|
+
readonly mark: string;
|
|
16
|
+
};
|
|
17
|
+
/** A record row of a grouped runner's kind, as `<owner>/<kind>/<id>` after the re-own. */
|
|
18
|
+
readonly regrouped: {
|
|
19
|
+
readonly key: string;
|
|
20
|
+
readonly mark: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export declare function seedHubCatalogue(db: Database.Database): HubSeedMarks;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as DataStoreDatabaseSchema, M as DATABASE_SNAPSHOT_SUFFIX,
|
|
1
|
+
import { G as DataStoreDatabaseSchema, M as DATABASE_SNAPSHOT_SUFFIX, Ts as defineRecordKinds } from "./dist-BX8nZeXV.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { createCipheriv, createDecipheriv, createHash, createPrivateKey, createPublicKey, diffieHellman, generateKeyPairSync, hkdfSync, randomBytes } from "node:crypto";
|
|
4
4
|
import { Buffer as Buffer$1 } from "buffer";
|
|
Binary file
|
|
Binary file
|