@camstack/server 1.2.761 → 1.2.762
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 +39 -8
- package/dist/api/core/integration-role.js +6 -3
- package/package.json +19 -16
- package/system/dist/{agent-https-YFeT_9qF.js → agent-https-BHpDnJr0.js} +1 -1
- package/system/dist/{agent-https-D1B_fvIx.mjs → agent-https-UksJdbes.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 +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 +3 -3
- package/system/dist/builtins/keychain/index.mjs +3 -3
- 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 +2 -1
- package/system/dist/builtins/loki-logging/index.mjs +2 -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/integration-registry.d.ts +6 -0
- package/system/dist/builtins/sqlite-storage/integration-rows-ports.d.ts +16 -0
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -2
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
- 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-C6myWpTr.mjs → capture-engine-Btq9LseJ.mjs} +1 -1
- package/system/dist/{capture-engine-JrgzDAeI.js → capture-engine-DgcmHuIi.js} +1 -1
- package/system/dist/{composition-sources-53ryTB8m.js → composition-sources-DrGLoV8D.js} +1 -1
- package/system/dist/{composition-sources-BJleLIBr.mjs → composition-sources-xyPI-9ja.mjs} +1 -1
- package/system/dist/{constants-DW74hDp7.mjs → constants-B8q9KsGq.mjs} +1 -1
- package/system/dist/{constants-nY2QXQK5.js → constants-BiE3GU1C.js} +1 -1
- package/system/dist/{device-ca-CzGQ4dJn.js → device-ca-Bel2vDyJ.js} +1 -1
- package/system/dist/{device-ca-BUTX2AaQ.mjs → device-ca-D5U9i2AO.mjs} +1 -1
- package/system/dist/{dist-Cyida7ne.js → dist-B6-AUY2T.js} +117 -14
- package/system/dist/{dist-Cu6VwGZZ.mjs → dist-Dd_vXorK.mjs} +117 -14
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-CXAFrkV0.js → hub-mdns-ciao-DV7bwoub.js} +2 -2
- package/system/dist/{hub-mdns-ciao-scMSbV7j.mjs → hub-mdns-ciao-Dz9w_pd0.mjs} +2 -2
- package/system/dist/index.js +25 -7
- package/system/dist/index.mjs +25 -7
- package/system/dist/{restore-archive-jWL53_V-.mjs → restore-archive-BcdcInFR.mjs} +1 -1
- package/system/dist/{restore-archive-pn_Y6UG7.js → restore-archive-BcstsRhG.js} +1 -1
- package/system/dist/{wal-maintenance-By_dPC7l.mjs → wal-maintenance-Ctp8Q-y7.mjs} +0 -0
- package/system/dist/{wal-maintenance-CODI9DuS.js → wal-maintenance-CzjpuF7n.js} +0 -0
- package/system/package.json +1 -1
|
@@ -1171,7 +1171,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
1171
1171
|
return DeviceRole;
|
|
1172
1172
|
}({});
|
|
1173
1173
|
//#endregion
|
|
1174
|
-
//#region ../types/dist/sleep-
|
|
1174
|
+
//#region ../types/dist/sleep-BaWhXZFm.mjs
|
|
1175
1175
|
/**
|
|
1176
1176
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
1177
1177
|
* window to float samples (D455).
|
|
@@ -4185,6 +4185,10 @@ var RECORD_SECRET_COLLECTION_PREFIX = "records:";
|
|
|
4185
4185
|
* (`collectZodSecretPaths`): dotted keys, `[]` for "each element of this array"
|
|
4186
4186
|
* (`auth.accessToken`, `headers[].value`).
|
|
4187
4187
|
*
|
|
4188
|
+
* `{}` after a key means "each value of this map" (`applianceSecrets{}`): the map's own key
|
|
4189
|
+
* names the value (`applianceSecrets{fridge}`), so no id key is declared and a body that drops a
|
|
4190
|
+
* key releases exactly that key's secret.
|
|
4191
|
+
*
|
|
4188
4192
|
* Array elements are matched by a DECLARED id key (`secretArrayKeys`:
|
|
4189
4193
|
* `{ headers: 'name' }`), never by index, so reordering a list keeps every
|
|
4190
4194
|
* keychain ref (the same rule as `arrayItemFieldPath`). The concrete path of a
|
|
@@ -4197,11 +4201,13 @@ function parseSecretPath(path) {
|
|
|
4197
4201
|
if (path.length === 0) throw new InvalidRecordError("an empty secret path");
|
|
4198
4202
|
return path.split(".").map((raw) => {
|
|
4199
4203
|
const each = raw.endsWith("[]");
|
|
4200
|
-
const
|
|
4204
|
+
const map = raw.endsWith("{}");
|
|
4205
|
+
const key = each || map ? raw.slice(0, -2) : raw;
|
|
4201
4206
|
if (key.length === 0) throw new InvalidRecordError(`secret path "${path}" has an empty segment`);
|
|
4202
4207
|
return {
|
|
4203
4208
|
key,
|
|
4204
|
-
each
|
|
4209
|
+
each,
|
|
4210
|
+
map
|
|
4205
4211
|
};
|
|
4206
4212
|
});
|
|
4207
4213
|
}
|
|
@@ -4253,6 +4259,22 @@ function mapAt(node, segments, index, walkedKeys, concretePrefix, declared, arra
|
|
|
4253
4259
|
[segment.key]: mapped
|
|
4254
4260
|
};
|
|
4255
4261
|
}
|
|
4262
|
+
if (segment.map) {
|
|
4263
|
+
if (!isRecord$4(child)) return node;
|
|
4264
|
+
const kept = Object.entries(child).map(([mapKey, value]) => {
|
|
4265
|
+
const concrete = `${concretePrefix}${concretePrefix.length > 0 ? "." : ""}${segment.key}{${encodeURIComponent(mapKey)}}`;
|
|
4266
|
+
if (!last) return [mapKey, mapAt(value, segments, index + 1, keys, concrete, declared, arrayKeys, visit)];
|
|
4267
|
+
return [mapKey, visit({
|
|
4268
|
+
declared,
|
|
4269
|
+
concrete,
|
|
4270
|
+
value
|
|
4271
|
+
})];
|
|
4272
|
+
}).filter(([, value]) => value !== REMOVE_LEAF);
|
|
4273
|
+
return {
|
|
4274
|
+
...node,
|
|
4275
|
+
[segment.key]: Object.fromEntries(kept)
|
|
4276
|
+
};
|
|
4277
|
+
}
|
|
4256
4278
|
const concrete = `${concretePrefix}${concretePrefix.length > 0 ? "." : ""}${segment.key}`;
|
|
4257
4279
|
if (last) {
|
|
4258
4280
|
const replacement = visit({
|
|
@@ -4410,7 +4432,8 @@ function isZodSecret(schema) {
|
|
|
4410
4432
|
}
|
|
4411
4433
|
/**
|
|
4412
4434
|
* Every declared secret path in a config schema: dotted keys, `[]` for "each
|
|
4413
|
-
* element of this array" (`connection.password`, `rows[].token`)
|
|
4435
|
+
* element of this array" (`connection.password`, `rows[].token`), `{}` for "each value of this
|
|
4436
|
+
* map" (`applianceSecrets{}`). A declared
|
|
4414
4437
|
* object or array is reported as one path and not descended into — everything
|
|
4415
4438
|
* under it is secret.
|
|
4416
4439
|
*/
|
|
@@ -4421,6 +4444,7 @@ function collectZodSecretPaths(schema, prefix = "") {
|
|
|
4421
4444
|
const def = defOf(layer);
|
|
4422
4445
|
if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
|
|
4423
4446
|
else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
|
|
4447
|
+
else if (def.type === "record" && def.valueType) paths.push(...collectZodSecretPaths(def.valueType, `${prefix}{}`));
|
|
4424
4448
|
else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
|
|
4425
4449
|
else if (def.type === "intersection") {
|
|
4426
4450
|
if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
|
|
@@ -11033,11 +11057,49 @@ var IntegrationInstanceRefSchema = z.object({
|
|
|
11033
11057
|
]),
|
|
11034
11058
|
candidateStableId: z.string().optional()
|
|
11035
11059
|
});
|
|
11060
|
+
/**
|
|
11061
|
+
* `RecordIntegrationInstances` - the `integration-instances` provider over ONE
|
|
11062
|
+
* entry kind, so an addon that holds a connection serves it in ~30 lines.
|
|
11063
|
+
*
|
|
11064
|
+
* Every instance is one record of the addon's own kind, keyed by the
|
|
11065
|
+
* `integrations` registry id. The records door does the secret work: a field the
|
|
11066
|
+
* kind marks `.meta({ secret: true })` is a keychain marker bound to the row, so
|
|
11067
|
+
* deleting the row deletes the secret, and one row's value is never another's.
|
|
11068
|
+
*
|
|
11069
|
+
* Patch rules for a secret (`updateInstance`): omitted, `''`, the redaction
|
|
11070
|
+
* token or the view the form was given KEEP the stored secret;
|
|
11071
|
+
* `{ $secretClear: true }` clears it; any other string replaces it.
|
|
11072
|
+
*/
|
|
11036
11073
|
/** The most instances one addon lists (an integrations page, not a table). */
|
|
11037
11074
|
var INSTANCES_LIST_MAX = 1e3;
|
|
11038
11075
|
/** The keys of the kind's secret fields that sit at the top level of the body. */
|
|
11039
11076
|
function topLevelSecretKeys(paths) {
|
|
11040
|
-
return new Set(paths.filter((p) => !p.includes(".") && !p.includes("[")));
|
|
11077
|
+
return new Set(paths.filter((p) => !p.includes(".") && !p.includes("[") && !p.includes("{")));
|
|
11078
|
+
}
|
|
11079
|
+
/** The keys of the kind's top-level MAPS whose values are secrets (`applianceSecrets{}`). */
|
|
11080
|
+
function secretMapKeys(paths) {
|
|
11081
|
+
return new Set(paths.filter((p) => p.endsWith("{}") && !p.slice(0, -2).match(/[.[{]/)).map((p) => p.slice(0, -2)));
|
|
11082
|
+
}
|
|
11083
|
+
/**
|
|
11084
|
+
* A patch value for a map of secrets: an entry that is omitted, `''`, the redaction token or the
|
|
11085
|
+
* view the form was given KEEPS its stored secret (it is left out of the merge); `{ $secretClear }`
|
|
11086
|
+
* or `null` removes the entry; any other string replaces it. Null when nothing is left to merge.
|
|
11087
|
+
*/
|
|
11088
|
+
function secretMapPatch(value) {
|
|
11089
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) return null;
|
|
11090
|
+
const out = {};
|
|
11091
|
+
for (const [key, entry] of Object.entries(value)) if (entry === null || isSecretClear(entry)) out[key] = null;
|
|
11092
|
+
else if (typeof entry === "string" && entry !== "" && entry !== "__camstack_redacted__" && !isSecretFieldView(entry)) out[key] = entry;
|
|
11093
|
+
return Object.keys(out).length > 0 ? out : null;
|
|
11094
|
+
}
|
|
11095
|
+
/** Does the kind's body schema carry an `enabled` field? */
|
|
11096
|
+
function declaresEnabled(kind) {
|
|
11097
|
+
const json = z.toJSONSchema(kind.schema, {
|
|
11098
|
+
unrepresentable: "any",
|
|
11099
|
+
io: "input"
|
|
11100
|
+
});
|
|
11101
|
+
const properties = Reflect.get(json, "properties");
|
|
11102
|
+
return typeof properties === "object" && properties !== null && "enabled" in properties;
|
|
11041
11103
|
}
|
|
11042
11104
|
var RecordIntegrationInstances = class {
|
|
11043
11105
|
records;
|
|
@@ -11045,14 +11107,20 @@ var RecordIntegrationInstances = class {
|
|
|
11045
11107
|
hooks;
|
|
11046
11108
|
handle;
|
|
11047
11109
|
secretKeys;
|
|
11110
|
+
secretMaps;
|
|
11048
11111
|
nameField;
|
|
11112
|
+
/** The `integrations` registry owns the on/off switch (`role: devices`); the body has none. */
|
|
11113
|
+
registryOwnsEnabled;
|
|
11049
11114
|
constructor(records, kind, hooks) {
|
|
11050
11115
|
this.records = records;
|
|
11051
11116
|
this.kind = kind;
|
|
11052
11117
|
this.hooks = hooks;
|
|
11053
11118
|
this.handle = records.kind(kind);
|
|
11054
11119
|
this.secretKeys = topLevelSecretKeys(kind.declaration.secretPaths);
|
|
11120
|
+
this.secretMaps = secretMapKeys(kind.declaration.secretPaths);
|
|
11055
11121
|
this.nameField = kind.declaration.entry?.nameField ?? "name";
|
|
11122
|
+
this.registryOwnsEnabled = hooks.description.role === "devices";
|
|
11123
|
+
if (this.registryOwnsEnabled && declaresEnabled(kind)) throw new Error(`kind "${kind.name}": the integrations registry owns the on/off switch of a role "devices" addon, so the body must not declare "enabled"`);
|
|
11056
11124
|
}
|
|
11057
11125
|
/**
|
|
11058
11126
|
* One instance read for the addon's own runtime; null when absent. When the keychain is
|
|
@@ -11103,7 +11171,7 @@ var RecordIntegrationInstances = class {
|
|
|
11103
11171
|
id: record.id,
|
|
11104
11172
|
name: typeof rawName === "string" ? rawName : record.id,
|
|
11105
11173
|
configured: this.hooks.configured(record.data),
|
|
11106
|
-
enabled: record.data.enabled !== false,
|
|
11174
|
+
...this.registryOwnsEnabled ? {} : { enabled: record.data.enabled !== false },
|
|
11107
11175
|
formValues: shown,
|
|
11108
11176
|
...kind !== void 0 ? { kind } : {},
|
|
11109
11177
|
...health?.status !== void 0 ? { status: health.status } : {},
|
|
@@ -11133,32 +11201,36 @@ var RecordIntegrationInstances = class {
|
|
|
11133
11201
|
id: minted,
|
|
11134
11202
|
data: this.hooks.initialBody(name, kind)
|
|
11135
11203
|
}, { ifRev: 0 });
|
|
11136
|
-
await this.hooks.onChanged?.(minted);
|
|
11204
|
+
await this.hooks.onChanged?.(minted, "created");
|
|
11137
11205
|
return { id: minted };
|
|
11138
11206
|
};
|
|
11139
11207
|
updateInstance = async ({ id, name, values }) => {
|
|
11140
11208
|
const patch = {};
|
|
11141
11209
|
for (const [key, value] of Object.entries(values)) {
|
|
11142
11210
|
if (value === void 0) continue;
|
|
11143
|
-
if (
|
|
11211
|
+
if (this.secretMaps.has(key)) {
|
|
11212
|
+
const entries = secretMapPatch(value);
|
|
11213
|
+
if (entries !== null) patch[key] = entries;
|
|
11214
|
+
} else if (!this.secretKeys.has(key)) patch[key] = value;
|
|
11144
11215
|
else if (isSecretClear(value)) patch[key] = null;
|
|
11145
11216
|
else if (typeof value === "string" && value !== "" && value !== "__camstack_redacted__" && !isSecretFieldView(value)) patch[key] = value;
|
|
11146
11217
|
}
|
|
11147
11218
|
if (name !== void 0) patch[this.nameField] = name;
|
|
11148
11219
|
await this.handle.patch(id, patch);
|
|
11149
|
-
await this.hooks.onChanged?.(id);
|
|
11220
|
+
await this.hooks.onChanged?.(id, "updated");
|
|
11150
11221
|
return { ok: true };
|
|
11151
11222
|
};
|
|
11152
11223
|
/** The switch lives in the record body; the addon is told so it applies it (D996). */
|
|
11153
11224
|
setInstanceEnabled = async ({ id, enabled }) => {
|
|
11225
|
+
if (this.registryOwnsEnabled) throw new Error(`instance "${id}": the integrations registry owns the on/off switch of this addon; set it with integrations.update`);
|
|
11154
11226
|
await this.handle.patch(id, { enabled });
|
|
11155
|
-
await this.hooks.onChanged?.(id);
|
|
11227
|
+
await this.hooks.onChanged?.(id, "enabled");
|
|
11156
11228
|
return { ok: true };
|
|
11157
11229
|
};
|
|
11158
11230
|
/** The row and its keychain refs go together (the records door). */
|
|
11159
11231
|
deleteInstance = async ({ id }) => {
|
|
11160
11232
|
await this.handle.delete(id);
|
|
11161
|
-
await this.hooks.onChanged?.(id);
|
|
11233
|
+
await this.hooks.onChanged?.(id, "deleted");
|
|
11162
11234
|
return { ok: true };
|
|
11163
11235
|
};
|
|
11164
11236
|
testInstance = async (input) => {
|
|
@@ -62133,7 +62205,37 @@ var IntegrationInstanceKindSchema = z.object({
|
|
|
62133
62205
|
/** Relative hub path to disconnect that account. */
|
|
62134
62206
|
disconnectPath: z.string().min(1).optional()
|
|
62135
62207
|
});
|
|
62208
|
+
/**
|
|
62209
|
+
* What the addon's instances ARE for the Integrations page (planning#416). `devices`: each
|
|
62210
|
+
* instance is an integration that brings devices (the registry owns its on/off switch);
|
|
62211
|
+
* `services`: a connection configured from the addon's own function page, never listed on
|
|
62212
|
+
* Integrations; `both`: a dual entry listed for its devices that also keeps service connections.
|
|
62213
|
+
* It is the same vocabulary as the manifest's `integrationRole`, which stays as an override.
|
|
62214
|
+
*/
|
|
62215
|
+
var IntegrationInstanceRoleSchema = z.enum([
|
|
62216
|
+
"devices",
|
|
62217
|
+
"services",
|
|
62218
|
+
"both"
|
|
62219
|
+
]);
|
|
62220
|
+
/**
|
|
62221
|
+
* How devices of an instance are found. `none`: the operator adds them by hand; `lan`: the addon
|
|
62222
|
+
* scans the network before any instance exists (the wizard offers the candidates); `account`: the
|
|
62223
|
+
* devices appear after the instance signs in. `scopedToInstance`: a discovery run belongs to ONE
|
|
62224
|
+
* instance and its candidates are claimed by it.
|
|
62225
|
+
*/
|
|
62226
|
+
var IntegrationInstanceDiscoverySchema = z.object({
|
|
62227
|
+
mode: z.enum([
|
|
62228
|
+
"none",
|
|
62229
|
+
"lan",
|
|
62230
|
+
"account"
|
|
62231
|
+
]),
|
|
62232
|
+
scopedToInstance: z.boolean()
|
|
62233
|
+
});
|
|
62136
62234
|
var IntegrationInstanceDescriptionSchema = z.object({
|
|
62235
|
+
/** What the instances are for the Integrations page; see {@link IntegrationInstanceRoleSchema}. */
|
|
62236
|
+
role: IntegrationInstanceRoleSchema,
|
|
62237
|
+
/** How the devices of an instance are found; absent means `{ mode: 'none' }`. */
|
|
62238
|
+
discovery: IntegrationInstanceDiscoverySchema.optional(),
|
|
62137
62239
|
/** `single`: at most one instance can exist (Loki). `multiple`: an account each. */
|
|
62138
62240
|
instanceMode: IntegrationInstanceModeSchema,
|
|
62139
62241
|
/** What the instance is, for the UI (`destination`, `relay`, `account`). */
|
|
@@ -62173,10 +62275,11 @@ var IntegrationInstanceSchema = z.object({
|
|
|
62173
62275
|
/** The addon's own rule (an URL is present, a client id is present...). */
|
|
62174
62276
|
configured: z.boolean(),
|
|
62175
62277
|
/**
|
|
62176
|
-
* The instance's own on/off switch (D996)
|
|
62177
|
-
*
|
|
62278
|
+
* The instance's own on/off switch (D996), derived from the record body (`enabled !== false`,
|
|
62279
|
+
* so a row written before the field existed is on). Absent when the `integrations` registry
|
|
62280
|
+
* owns the switch (`describe().role` is `devices`): read it from the registry row.
|
|
62178
62281
|
*/
|
|
62179
|
-
enabled: z.boolean(),
|
|
62282
|
+
enabled: z.boolean().optional(),
|
|
62180
62283
|
/** The kind of this instance (one of `describe().kinds[].id`), when the provider has kinds. */
|
|
62181
62284
|
kind: z.string().optional(),
|
|
62182
62285
|
/** Values for the instance form; a secret is a `SecretFieldView`, never text. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_wal_maintenance = require("./wal-maintenance-
|
|
2
|
+
const require_wal_maintenance = require("./wal-maintenance-CzjpuF7n.js");
|
|
3
3
|
let node_worker_threads = require("node:worker_threads");
|
|
4
4
|
//#region src/builtins/sqlite-storage/file-host-worker.ts
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as callRecords, C as isFileHostWorkerData, D as RecordsEngine, M as controlTargetOf, O as callControl, S as isFileHostRequest, a as WalMaintenance, b as collectTransferables, d as callMigrate, f as migrateTargetOf, j as callVector, k as callData, l as SqliteSettingsBackend, o as createVectorIndex, s as vectorProviderOf, u as HUB_MIGRATIONS, v as serializeError, w as trustInput } from "./wal-maintenance-
|
|
1
|
+
import { A as callRecords, C as isFileHostWorkerData, D as RecordsEngine, M as controlTargetOf, O as callControl, S as isFileHostRequest, a as WalMaintenance, b as collectTransferables, d as callMigrate, f as migrateTargetOf, j as callVector, k as callData, l as SqliteSettingsBackend, o as createVectorIndex, s as vectorProviderOf, u as HUB_MIGRATIONS, v as serializeError, w as trustInput } from "./wal-maintenance-Ctp8Q-y7.mjs";
|
|
2
2
|
import { parentPort, threadId, workerData } from "node:worker_threads";
|
|
3
3
|
//#region src/builtins/sqlite-storage/file-host-worker.ts
|
|
4
4
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-B6-AUY2T.js");
|
|
3
3
|
const require_x509_es = require("./x509.es-WtnRNyYS.js");
|
|
4
|
-
const require_agent_https = require("./agent-https-
|
|
4
|
+
const require_agent_https = require("./agent-https-BHpDnJr0.js");
|
|
5
5
|
let node_crypto = require("node:crypto");
|
|
6
6
|
let _camstack_types_node = require("@camstack/types/node");
|
|
7
7
|
let node_fs_promises = require("node:fs/promises");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { o as __toESM } from "./chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { ac as userError } from "./dist-
|
|
2
|
+
import { ac as userError } from "./dist-Dd_vXorK.mjs";
|
|
3
3
|
import { f as X509Certificate$1 } from "./x509.es-BRiJgOvu.mjs";
|
|
4
|
-
import { D as reasonRequiresNewCa, E as evaluateExistingCert, F as readNameConstraints, N as permitsIdentity, _ as issueLeaf, b as collectCertIdentity, g as generateCa, j as isConstrainedCa, v as loadCa, y as localCaCommonName } from "./agent-https-
|
|
4
|
+
import { D as reasonRequiresNewCa, E as evaluateExistingCert, F as readNameConstraints, N as permitsIdentity, _ as issueLeaf, b as collectCertIdentity, g as generateCa, j as isConstrainedCa, v as loadCa, y as localCaCommonName } from "./agent-https-UksJdbes.mjs";
|
|
5
5
|
import { X509Certificate, createPrivateKey } from "node:crypto";
|
|
6
6
|
import { writeOwnerOnlyFileSync } from "@camstack/types/node";
|
|
7
7
|
import { mkdir, writeFile } from "node:fs/promises";
|
package/system/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("./dist-
|
|
4
|
-
const require_device_ca = require("./device-ca-
|
|
3
|
+
const require_dist = require("./dist-B6-AUY2T.js");
|
|
4
|
+
const require_device_ca = require("./device-ca-Bel2vDyJ.js");
|
|
5
5
|
const require_read_all_rows$1 = require("./read-all-rows-CVoO1ONM.js");
|
|
6
6
|
const require_builtins_alerts_alerts_addon = require("./builtins/alerts/alerts.addon.js");
|
|
7
7
|
require("./builtins/alerts/index.js");
|
|
@@ -26,21 +26,21 @@ const require_builtins_loki_logging_index = require("./builtins/loki-logging/ind
|
|
|
26
26
|
const require_builtins_native_metrics_native_metrics_addon = require("./builtins/native-metrics/native-metrics.addon.js");
|
|
27
27
|
const require_builtins_device_history_device_history_addon = require("./builtins/device-history/device-history.addon.js");
|
|
28
28
|
const require_builtins_sqlite_storage_filesystem_storage_addon = require("./builtins/sqlite-storage/filesystem-storage.addon.js");
|
|
29
|
-
const require_wal_maintenance = require("./wal-maintenance-
|
|
29
|
+
const require_wal_maintenance = require("./wal-maintenance-CzjpuF7n.js");
|
|
30
30
|
const require_builtins_sqlite_storage_sqlite_settings_addon = require("./builtins/sqlite-storage/sqlite-settings.addon.js");
|
|
31
31
|
const require_builtins_sqlite_storage_index = require("./builtins/sqlite-storage/index.js");
|
|
32
32
|
const require_builtins_storage_orchestrator_storage_orchestrator_addon = require("./builtins/storage-orchestrator/storage-orchestrator.addon.js");
|
|
33
33
|
require("./builtins/storage-orchestrator/index.js");
|
|
34
|
-
const require_agent_https = require("./agent-https-
|
|
35
|
-
const require_constants = require("./constants-
|
|
34
|
+
const require_agent_https = require("./agent-https-BHpDnJr0.js");
|
|
35
|
+
const require_constants = require("./constants-BiE3GU1C.js");
|
|
36
36
|
const require_builtins_system_config_system_config_addon = require("./builtins/system-config/system-config.addon.js");
|
|
37
37
|
require("./builtins/system-config/index.js");
|
|
38
38
|
const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
|
|
39
39
|
const require_custom_action_registry = require("./custom-action-registry-JuMHGKEc.js");
|
|
40
|
-
const require_hub_mdns_ciao = require("./hub-mdns-ciao-
|
|
40
|
+
const require_hub_mdns_ciao = require("./hub-mdns-ciao-DV7bwoub.js");
|
|
41
41
|
const require_platform_key_source = require("./platform-key-source-Di7HrlGR.js");
|
|
42
42
|
const require_resource_monitor = require("./resource-monitor-mio9dSCT.js");
|
|
43
|
-
const require_restore_archive = require("./restore-archive-
|
|
43
|
+
const require_restore_archive = require("./restore-archive-BcstsRhG.js");
|
|
44
44
|
const require_coral_accelerators = require("./coral-accelerators-BSVsBVzt.js");
|
|
45
45
|
let zod = require("zod");
|
|
46
46
|
let node_crypto = require("node:crypto");
|
|
@@ -6129,6 +6129,24 @@ var IntegrationRegistry = class IntegrationRegistry {
|
|
|
6129
6129
|
for (const row of rows) result[String(row.data["key"])] = deserializeSetting(row.data["value"], String(row.data["value_type"]));
|
|
6130
6130
|
return result;
|
|
6131
6131
|
}
|
|
6132
|
+
/**
|
|
6133
|
+
* Delete every legacy setting row of an integration and answer the keychain refs the rows
|
|
6134
|
+
* carried, so the caller (the rows-to-record migration) releases them after the rows are gone.
|
|
6135
|
+
* The integration itself stays.
|
|
6136
|
+
*/
|
|
6137
|
+
async clearIntegrationSettings(integrationId) {
|
|
6138
|
+
const refs = require_dist.collectSecretMarkerRefs(await this.getIntegrationSettings(integrationId));
|
|
6139
|
+
const kind = this.recordStores?.settings;
|
|
6140
|
+
if (kind !== void 0) {
|
|
6141
|
+
for (const row of await (0, import_read_all_rows.readAllRows)(kind)) if (row.data.integrationId === integrationId) await kind.delete(row.id);
|
|
6142
|
+
return refs;
|
|
6143
|
+
}
|
|
6144
|
+
await this.store.deleteWhere({
|
|
6145
|
+
collection: INTEGRATION_SETTINGS,
|
|
6146
|
+
filter: { where: { integration_id: integrationId } }
|
|
6147
|
+
});
|
|
6148
|
+
return refs;
|
|
6149
|
+
}
|
|
6132
6150
|
async setIntegrationSetting(integrationId, key, value) {
|
|
6133
6151
|
const s = serializeSetting(value);
|
|
6134
6152
|
const rowId = `${integrationId}:${key}`;
|
package/system/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as __require } from "./chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { Ci as objectInputDeclaresRequiredDeviceId, Do as DATAPLANE_SECRET_HEADER$1, E as CatalogFileSchema, Ea as supportedRuntimes, Eo as CALLER_STAMPED_CAPABILITIES$1, Go as ReadinessRegistry, Gr as isVoidInput, Gs as parseJsonUnknown, Ii as procedureAuthKey, Ko as ReadinessTimeoutError, Kr as kebabToCamel$1, Lr as isArrayOutputSchema, Nr as interpolate, Oo as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Os as isDebugChannelName, Qi as resolveMethodAuth, Rr as isCollectionArrayMethod, Si as objectInputDeclaresAddonId, Ss as expandCapMethods, Ur as isObjectInput, Wo as RUNTIME_DEFAULTS, Ws as parseJsonObject, Ys as resolveCapMount, Zr as lifecycleJobSchema, Zs as scopeKey, a as AGENT_MDNS_TXT_KEYS, ac as userError, ai as looseSchema, as as asNumber, bs as emitDownForOwnedCaps, bt as METHOD_ACCESS_MAP, ca as scopesAllowDeviceCap, dc as EventCategory$1, i as AGENT_MDNS_SERVICE_TYPE, ii as logLevelAtMost, is as asJsonObject$1, ko as DEVICE_STATUS_METHOD, ln as addonSettingsCapability, ms as createEvent$1, o as ALL_CAPABILITY_DEFINITIONS, oc as withoutCallerStamp, os as asString$1, qs as readinessKey, sa as scopesAllowAddon, uc as errMsg$1, va as splitTranslationRef, vn as bareAddonId, vt as LOG_LEVEL_RANK, ws as getDebugInterest, y as CATALOG_LANGS, yr as extractNestedAddonId, ys as defineRecordKinds } from "./dist-
|
|
3
|
-
import { d as JWT_SIGNING_KEY_REF, f as JwtSigningKeyUnavailableError, g as processJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, p as SYSTEM_SECRET_OWNER, s as loadDeviceCa, u as verifyDeviceSignature, v as staticJwtSigningKey } from "./device-ca-
|
|
2
|
+
import { Ci as objectInputDeclaresRequiredDeviceId, Do as DATAPLANE_SECRET_HEADER$1, E as CatalogFileSchema, Ea as supportedRuntimes, Eo as CALLER_STAMPED_CAPABILITIES$1, Go as ReadinessRegistry, Gr as isVoidInput, Gs as parseJsonUnknown, Ii as procedureAuthKey, Ko as ReadinessTimeoutError, Kr as kebabToCamel$1, Lr as isArrayOutputSchema, Nr as interpolate, Oo as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Os as isDebugChannelName, Qi as resolveMethodAuth, Rr as isCollectionArrayMethod, Si as objectInputDeclaresAddonId, Ss as expandCapMethods, Ur as isObjectInput, Wo as RUNTIME_DEFAULTS, Ws as parseJsonObject, Ys as resolveCapMount, Zr as lifecycleJobSchema, Zs as scopeKey, a as AGENT_MDNS_TXT_KEYS, ac as userError, ai as looseSchema, as as asNumber, bs as emitDownForOwnedCaps, bt as METHOD_ACCESS_MAP, ca as scopesAllowDeviceCap, dc as EventCategory$1, fs as collectSecretMarkerRefs, i as AGENT_MDNS_SERVICE_TYPE, ii as logLevelAtMost, is as asJsonObject$1, ko as DEVICE_STATUS_METHOD, ln as addonSettingsCapability, ms as createEvent$1, o as ALL_CAPABILITY_DEFINITIONS, oc as withoutCallerStamp, os as asString$1, qs as readinessKey, sa as scopesAllowAddon, uc as errMsg$1, va as splitTranslationRef, vn as bareAddonId, vt as LOG_LEVEL_RANK, ws as getDebugInterest, y as CATALOG_LANGS, yr as extractNestedAddonId, ys as defineRecordKinds } from "./dist-Dd_vXorK.mjs";
|
|
3
|
+
import { d as JWT_SIGNING_KEY_REF, f as JwtSigningKeyUnavailableError, g as processJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, p as SYSTEM_SECRET_OWNER, s as loadDeviceCa, u as verifyDeviceSignature, v as staticJwtSigningKey } from "./device-ca-D5U9i2AO.mjs";
|
|
4
4
|
import { t as require_read_all_rows } from "./read-all-rows-TaPqdWNF.mjs";
|
|
5
5
|
import { AlertCenterAddon } from "./builtins/alerts/alerts.addon.mjs";
|
|
6
6
|
import "./builtins/alerts/index.mjs";
|
|
@@ -25,21 +25,21 @@ import { LokiDestination, LokiLoggingAddon } from "./builtins/loki-logging/index
|
|
|
25
25
|
import NativeMetricsAddon, { a as NativeMetricsProvider, i as parseProcStatusRss, n as nodeProcReader, r as parseProcStat } from "./builtins/native-metrics/native-metrics.addon.mjs";
|
|
26
26
|
import { DeviceHistoryAddon } from "./builtins/device-history/device-history.addon.mjs";
|
|
27
27
|
import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./builtins/sqlite-storage/filesystem-storage.addon.mjs";
|
|
28
|
-
import { D as RecordsEngine, l as SqliteSettingsBackend } from "./wal-maintenance-
|
|
28
|
+
import { D as RecordsEngine, l as SqliteSettingsBackend } from "./wal-maintenance-Ctp8Q-y7.mjs";
|
|
29
29
|
import { SqliteSettingsAddon } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
|
|
30
30
|
import { ConfigStore, DeviceStore } from "./builtins/sqlite-storage/index.mjs";
|
|
31
31
|
import { StorageOrchestratorAddon, a as stripForwardedCaller, i as createHubCapForwardService, l as STORAGE_DRAIN_STATE_LEGACY, n as HUB_CAP_FWD_ACTION, o as buildStorageLocationRegistry, r as HUB_CAP_FWD_SERVICE, t as StorageOrchestratorService, u as storageOrchestratorRecordKinds } from "./builtins/storage-orchestrator/storage-orchestrator.addon.mjs";
|
|
32
32
|
import "./builtins/storage-orchestrator/index.mjs";
|
|
33
|
-
import { A as buildNameConstraintSet, B as setProcessAgentHttpsNames, C as LEAF_RENEWAL_WINDOW_DAYS, E as evaluateExistingCert, F as readNameConstraints, I as AGENT_HTTPS_NAMES_COLLECTION, L as AGENT_HTTPS_NAMES_COLUMNS, M as isLocalOnlyHostname, N as permitsIdentity, O as PERMITTED_DNS_SUFFIXES, P as permitsName, R as AgentHttpsNames, S as CA_VALIDITY_DAYS, T as SERVER_AUTH_OID, a as collectAgentNames, b as collectCertIdentity, c as installAgentHttps, d as issueAgentHttpsLeaf, f as loadAgentHttps, h as CA_COMMON_NAME, i as certificateNames, j as isConstrainedCa, k as PERMITTED_IP_RANGES, l as isContainerBridgeAddress, m as pinnedHttpsCaFingerprint, n as acceptAgentSans, o as createAgentHttpsRequest, p as pemDigest, r as agentHttpsPaths, s as describeHttpsLeaf, t as AgentHttpsInstallError, u as isPrivateAddress, w as MAX_LEAF_VALIDITY_DAYS, x as systemHostFacts, y as localCaCommonName, z as getProcessAgentHttpsNames } from "./agent-https-
|
|
34
|
-
import { a as MESH_CA_KEY_REF, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY } from "./constants-
|
|
33
|
+
import { A as buildNameConstraintSet, B as setProcessAgentHttpsNames, C as LEAF_RENEWAL_WINDOW_DAYS, E as evaluateExistingCert, F as readNameConstraints, I as AGENT_HTTPS_NAMES_COLLECTION, L as AGENT_HTTPS_NAMES_COLUMNS, M as isLocalOnlyHostname, N as permitsIdentity, O as PERMITTED_DNS_SUFFIXES, P as permitsName, R as AgentHttpsNames, S as CA_VALIDITY_DAYS, T as SERVER_AUTH_OID, a as collectAgentNames, b as collectCertIdentity, c as installAgentHttps, d as issueAgentHttpsLeaf, f as loadAgentHttps, h as CA_COMMON_NAME, i as certificateNames, j as isConstrainedCa, k as PERMITTED_IP_RANGES, l as isContainerBridgeAddress, m as pinnedHttpsCaFingerprint, n as acceptAgentSans, o as createAgentHttpsRequest, p as pemDigest, r as agentHttpsPaths, s as describeHttpsLeaf, t as AgentHttpsInstallError, u as isPrivateAddress, w as MAX_LEAF_VALIDITY_DAYS, x as systemHostFacts, y as localCaCommonName, z as getProcessAgentHttpsNames } from "./agent-https-UksJdbes.mjs";
|
|
34
|
+
import { a as MESH_CA_KEY_REF, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY } from "./constants-B8q9KsGq.mjs";
|
|
35
35
|
import { $ as caFingerprintCompact, A as getProcessNodeMeshTransport, B as MESH_NODE_CERTIFICATES_COLLECTION, C as MESH_TLS_PORT_HELLO_FIELD, Ct as readOriginSetting, D as setProcessMeshTlsEnabler, Dt as readCidrSetting, E as ServiceBroker, Et as parseCidrList, F as renewMeshCertificate, G as getProcessMeshCertificateRegistry, H as MeshCertificateRegistry, I as revokeMeshCertificate, J as processMeshCrl, K as setProcessMeshCertificateRegistry, L as getProcessMeshTlsListenerState, M as isProcessVerifiedMeshPeer, N as onProcessNodeRegistered, O as dropProcessPeer, P as setProcessMeshPeerTransportLookup, Q as caFingerprint, R as openMeshTlsWhenRevocationsLoaded, S as verifyMembershipAnswer, St as parseOriginList, SystemConfigAddon, T as Errors, Tt as normalizeIp, U as RENEWAL_ABANDONED, V as MESH_NODE_CERTIFICATES_COLUMNS, W as describeMeshLeaf, X as getProcessMeshCaState, Y as MeshCaKeeper, Z as requireProcessMeshCa, _ as signPairingProof, _t as verifyAgentUiUnlockTicket, a as hubHostFromMeshAddress, at as issueMeshLeafForNode, b as MembershipResponder, bt as isInsecureOrigin, c as PAIRING_MAX_SESSIONS, ct as AGENT_DASHBOARD_ORIGINS_FIELD, d as PAIRING_PROTOCOL, dt as AGENT_UI_UNLOCK_USE, et as createMeshCsrPem, f as PAIRING_TTL_MS, ft as AGENT_UI_UNLOCK_VERSION, g as keyFingerprintShort, gt as parseAgentDashboardOrigins, h as describeCsr, ht as mintAgentUiUnlockTicket, i as AgentPairing, it as isValidAgentNodeId, j as getProcessPeerLeaf, k as emitProcessNodeRegistered, l as PAIRING_PATHS, lt as AGENT_UI_UNLOCK_TTL_MS, m as computePairingSas, mt as isAllowedAgentDashboardReturnTo, n as HubPairing, nt as generateMeshCa, o as PAIRING_CODE_DIGITS, ot as issueMeshLeafFromCsr, p as computePairingCommitment, pt as UnlockTicketJtiStore, q as MeshCrl, r as PairingHttpError, rt as generateMeshKeyPair, s as PAIRING_MAX_CODE_ATTEMPTS, st as loadMeshCa, tt as exportMeshPrivateKeyPem, u as PAIRING_PIN_DIGITS, ut as AGENT_UI_UNLOCK_TYP, v as verifyPairingProof, vt as InvalidCorsOriginError, w as TlsTcpTransporter, wt as createCidrMatcher, x as signMembershipProof, xt as normalizeOrigin, y as MEMBERSHIP_PATHS, yt as OPAQUE_ORIGIN, z as setProcessMeshTlsListenerState } from "./builtins/system-config/system-config.addon.mjs";
|
|
36
36
|
import "./builtins/system-config/index.mjs";
|
|
37
37
|
import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
|
|
38
38
|
import { C as isModelDownloaded, E as setHuggingFaceReachabilityObserver, T as revisionWeightUrl, _ as downloadFile, a as startEventLoopStallMonitor, b as fetchJson, c as createAuthenticatedFileServer, d as resolveFilePath, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, u as parseTokenizedUrl, v as downloadModel, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-oHl1xltx.mjs";
|
|
39
|
-
import { A as retirePreviousLocalCa, C as checkUploadedCa, D as loadTlsCert, E as ensureTlsCert, F as closeLanHttp, I as readLanHttpState, L as registerLanHttpHandler, M as allFamiliesListenHost, N as applyLanHttp, O as reissueTlsLeaf, P as bindPendingLanHttp, S as chainsToPublicRoot, T as caReplacementMarkerFile, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, c as leafFingerprintOf, d as servedHttpsLeafFingerprint, f as prepareBootTls, g as readTlsEnabled, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, k as replaceUnconstrainedLocalCa, l as registerHttpsListener, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, p as UPLOADED_CA_FILE, r as regenerateCertificate, s as clearHttpsListener, t as createCiaoPublisher, u as reloadHttpsListener, v as splitPemCertificates, w as validateUploadedTls, x as writeTlsMode, y as writeExtraSans } from "./hub-mdns-ciao-
|
|
39
|
+
import { A as retirePreviousLocalCa, C as checkUploadedCa, D as loadTlsCert, E as ensureTlsCert, F as closeLanHttp, I as readLanHttpState, L as registerLanHttpHandler, M as allFamiliesListenHost, N as applyLanHttp, O as reissueTlsLeaf, P as bindPendingLanHttp, S as chainsToPublicRoot, T as caReplacementMarkerFile, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, c as leafFingerprintOf, d as servedHttpsLeafFingerprint, f as prepareBootTls, g as readTlsEnabled, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, k as replaceUnconstrainedLocalCa, l as registerHttpsListener, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, p as UPLOADED_CA_FILE, r as regenerateCertificate, s as clearHttpsListener, t as createCiaoPublisher, u as reloadHttpsListener, v as splitPemCertificates, w as validateUploadedTls, x as writeTlsMode, y as writeExtraSans } from "./hub-mdns-ciao-Dz9w_pd0.mjs";
|
|
40
40
|
import { n as getPlatformKeychainKey, r as setPlatformKeychainKey, t as clearPlatformKeychainKey } from "./platform-key-source-BWlq0jjn.mjs";
|
|
41
41
|
import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-Di9daRwI.mjs";
|
|
42
|
-
import { _ as backupRecordStoresOf, c as BackupDecryptError, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, h as readBackupEncryptionHeader, l as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, t as BackupKeyRequiredError, u as BackupKeyMismatchError } from "./restore-archive-
|
|
42
|
+
import { _ as backupRecordStoresOf, c as BackupDecryptError, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, h as readBackupEncryptionHeader, l as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, t as BackupKeyRequiredError, u as BackupKeyMismatchError } from "./restore-archive-BcdcInFR.mjs";
|
|
43
43
|
import { r as nodeCoralFs, t as classifyCoralAccelerator } from "./coral-accelerators-DBlgWB8k.mjs";
|
|
44
44
|
import { z } from "zod";
|
|
45
45
|
import * as crypto$1 from "node:crypto";
|
|
@@ -6126,6 +6126,24 @@ var IntegrationRegistry = class IntegrationRegistry {
|
|
|
6126
6126
|
for (const row of rows) result[String(row.data["key"])] = deserializeSetting(row.data["value"], String(row.data["value_type"]));
|
|
6127
6127
|
return result;
|
|
6128
6128
|
}
|
|
6129
|
+
/**
|
|
6130
|
+
* Delete every legacy setting row of an integration and answer the keychain refs the rows
|
|
6131
|
+
* carried, so the caller (the rows-to-record migration) releases them after the rows are gone.
|
|
6132
|
+
* The integration itself stays.
|
|
6133
|
+
*/
|
|
6134
|
+
async clearIntegrationSettings(integrationId) {
|
|
6135
|
+
const refs = collectSecretMarkerRefs(await this.getIntegrationSettings(integrationId));
|
|
6136
|
+
const kind = this.recordStores?.settings;
|
|
6137
|
+
if (kind !== void 0) {
|
|
6138
|
+
for (const row of await (0, import_read_all_rows.readAllRows)(kind)) if (row.data.integrationId === integrationId) await kind.delete(row.id);
|
|
6139
|
+
return refs;
|
|
6140
|
+
}
|
|
6141
|
+
await this.store.deleteWhere({
|
|
6142
|
+
collection: INTEGRATION_SETTINGS,
|
|
6143
|
+
filter: { where: { integration_id: integrationId } }
|
|
6144
|
+
});
|
|
6145
|
+
return refs;
|
|
6146
|
+
}
|
|
6129
6147
|
async setIntegrationSetting(integrationId, key, value) {
|
|
6130
6148
|
const s = serializeSetting(value);
|
|
6131
6149
|
const rowId = `${integrationId}:${key}`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as DataStoreDatabaseSchema, M as DATABASE_SNAPSHOT_SUFFIX, ys as defineRecordKinds } from "./dist-
|
|
1
|
+
import { G as DataStoreDatabaseSchema, M as DATABASE_SNAPSHOT_SUFFIX, ys as defineRecordKinds } from "./dist-Dd_vXorK.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
|