@camstack/server 1.2.812 → 1.2.814
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 +14 -0
- package/dist/api/core/cap-providers.js +50 -343
- package/dist/api/trpc/generated-cap-routers.js +9 -0
- package/dist/core/addon/addon-registry.service.js +31 -1
- package/dist/core/addon/addon-settings-provider.js +7 -1
- package/dist/core/addon/instance-lifecycle.js +454 -0
- package/dist/core/addon/instance-links.service.js +22 -14
- package/dist/core/moleculer/moleculer.service.js +15 -1
- package/package.json +10 -10
- package/system/dist/{agent-https-a3mE4PW4.js → agent-https-Dwbpz4K6.js} +1 -1
- package/system/dist/{agent-https-CyEBY3RB.mjs → agent-https-eMihTWJ4.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/blocks-instances.d.ts +22 -0
- package/system/dist/builtins/core-blocks/core-blocks.addon.d.ts +2 -0
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +210 -10
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +200 -10
- package/system/dist/builtins/core-blocks/hero-layout-service.d.ts +7 -0
- package/system/dist/builtins/core-blocks/remote-service.d.ts +3 -0
- package/system/dist/builtins/core-blocks/timed-run/timed-run-service.d.ts +7 -0
- 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 +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/sqlite-settings.addon.js +3 -3
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
- 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 +284 -284
- 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-ByF-6AFH.mjs → capture-engine-CYPDOIF6.mjs} +1 -1
- package/system/dist/{capture-engine-BO9mSlY-.js → capture-engine-uxR5sOQN.js} +1 -1
- package/system/dist/{composition-sources-AziMFo7T.mjs → composition-sources-CU3p3INI.mjs} +1 -1
- package/system/dist/{composition-sources-BMJUPUh2.js → composition-sources-DkvntZci.js} +1 -1
- package/system/dist/{constants-CjRlgRlu.js → constants-BP-Txn_J.js} +1 -1
- package/system/dist/{constants-CTikgsC_.mjs → constants-DMFJ6Fky.mjs} +1 -1
- package/system/dist/{device-ca-Dxl6kVcJ.js → device-ca-D-0zxmFi.js} +1 -1
- package/system/dist/{device-ca-CNRlFqFC.mjs → device-ca-tmcd_VBC.mjs} +1 -1
- package/system/dist/{dist-CkJnelZr.js → dist-CznnwtQ8.js} +756 -73
- package/system/dist/{dist-BPq13Y8j.mjs → dist-DmCVWvtK.mjs} +727 -68
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-CrjItezp.mjs → hub-mdns-ciao-DbwyiHD5.mjs} +2 -2
- package/system/dist/{hub-mdns-ciao-Cx6yJBl9.js → hub-mdns-ciao-FTf16-JR.js} +2 -2
- package/system/dist/index.js +8 -8
- package/system/dist/index.mjs +8 -8
- package/system/dist/{legacy-integration-rows-door-Dxcqwc-w.mjs → legacy-integration-rows-door-CASQgifG.mjs} +1 -1
- package/system/dist/{legacy-integration-rows-door-CKM-LxvL.js → legacy-integration-rows-door-gW0xpMJI.js} +1 -1
- package/system/dist/{restore-archive-BQWOdGAB.js → restore-archive-B9TEFWRE.js} +1 -1
- package/system/dist/{restore-archive-r3zTdLKr.mjs → restore-archive-DlaC_gyl.mjs} +82 -82
- package/system/dist/{wal-maintenance-zJ4-ORo6.mjs → wal-maintenance-Cn164tp0.mjs} +0 -0
- package/system/dist/{wal-maintenance-CiCgL4Hp.js → wal-maintenance-Da2Rozz6.js} +0 -0
- package/system/package.json +5 -1
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.testBeforeCreate = testBeforeCreate;
|
|
4
|
+
exports.createRegisteredInstance = createRegisteredInstance;
|
|
5
|
+
exports.deleteRegisteredInstance = deleteRegisteredInstance;
|
|
6
|
+
exports.rawInstancesProvider = rawInstancesProvider;
|
|
7
|
+
exports.withInstanceLifecycle = withInstanceLifecycle;
|
|
8
|
+
exports.deferInstanceLifecycle = deferInstanceLifecycle;
|
|
9
|
+
/**
|
|
10
|
+
* The hub half of an `integration-instances` create and delete for an instance that brings
|
|
11
|
+
* DEVICES (epic #440, step H3). The addon owns the record; the hub owns what hangs off it:
|
|
12
|
+
*
|
|
13
|
+
* - create: the unique-instance check, the connection test of D1016 (`testInstance`, the only
|
|
14
|
+
* test), the `integrations` registry row (with the discovery candidate it was set up from,
|
|
15
|
+
* D984), then the addon's record, and a rollback that leaves nothing behind;
|
|
16
|
+
* - delete: refuse a fixed builtin and an instance a link still names BEFORE anything is
|
|
17
|
+
* destroyed, remove the integration's devices through the device manager (its tombstone path,
|
|
18
|
+
* D865), then the record, the registry row and the `IntegrationDeleted` event.
|
|
19
|
+
*
|
|
20
|
+
* There is ONE implementation and two doors: the legacy `integrations.create` / `integrations.delete`
|
|
21
|
+
* and the registered `integration-instances` provider ({@link withInstanceLifecycle}). Both call
|
|
22
|
+
* {@link createRegisteredInstance} / {@link deleteRegisteredInstance}.
|
|
23
|
+
*/
|
|
24
|
+
const system_1 = require("@camstack/server/system");
|
|
25
|
+
const types_1 = require("@camstack/types");
|
|
26
|
+
const server_1 = require("@trpc/server");
|
|
27
|
+
const integration_id_backfill_1 = require("../../boot/integration-id-backfill");
|
|
28
|
+
const integration_role_1 = require("../../api/core/integration-role");
|
|
29
|
+
const instance_links_service_1 = require("./instance-links.service");
|
|
30
|
+
/** The addon that keeps the MQTT brokers: the instance a `brokerId` names lives there. */
|
|
31
|
+
const BROKER_OWNER_ADDON_ID = 'mqtt-broker';
|
|
32
|
+
async function findBrokerOwner(deps, addonId, brokerId) {
|
|
33
|
+
for (const candidateId of [BROKER_OWNER_ADDON_ID, addonId]) {
|
|
34
|
+
const candidate = deps.providerFor(candidateId);
|
|
35
|
+
if (candidate === null || candidate.testInstance === undefined)
|
|
36
|
+
continue;
|
|
37
|
+
const rows = await candidate.listInstances();
|
|
38
|
+
if (rows.some((row) => row.id === brokerId))
|
|
39
|
+
return { addonId: candidateId, provider: candidate };
|
|
40
|
+
}
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Run the pre-creation test for `(addonId, settings)` through `testInstance`, the one test
|
|
45
|
+
* method (D1016). Never throws: a test that blows up is `inconclusive`, which is emphatically
|
|
46
|
+
* NOT `rejected`. An addon that declares no test is a KNOWN `unsupported`, never a silent pass.
|
|
47
|
+
*/
|
|
48
|
+
async function testBeforeCreate(deps, addonId, settings, kind) {
|
|
49
|
+
const { logger } = deps;
|
|
50
|
+
const instances = deps.providerFor(addonId);
|
|
51
|
+
let declaresTest = false;
|
|
52
|
+
if (instances !== null && instances.testInstance !== undefined) {
|
|
53
|
+
try {
|
|
54
|
+
const described = await instances.describe();
|
|
55
|
+
const declaredKind = (described.kinds ?? []).find((k) => k.id === kind);
|
|
56
|
+
declaresTest = declaredKind?.canTest ?? described.canTest;
|
|
57
|
+
}
|
|
58
|
+
catch (err) {
|
|
59
|
+
logger.warn('could not read whether the integration declares a test', {
|
|
60
|
+
tags: { addonId },
|
|
61
|
+
meta: { phase: 'test', error: (0, types_1.errMsg)(err) },
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (instances !== null && instances.testInstance !== undefined && declaresTest) {
|
|
66
|
+
try {
|
|
67
|
+
const result = await instances.testInstance({
|
|
68
|
+
id: null,
|
|
69
|
+
values: settings,
|
|
70
|
+
...(kind !== undefined ? { kind } : {}),
|
|
71
|
+
});
|
|
72
|
+
const status = result.status ?? (result.success ? 'validated' : 'rejected');
|
|
73
|
+
return {
|
|
74
|
+
status,
|
|
75
|
+
testedBy: addonId,
|
|
76
|
+
...(result.error !== undefined ? { error: result.error } : {}),
|
|
77
|
+
...(result.latencyMs !== undefined ? { latencyMs: result.latencyMs } : {}),
|
|
78
|
+
...(result.detail !== undefined ? { detail: result.detail } : {}),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
catch (err) {
|
|
82
|
+
logger.warn('connection test could not run', {
|
|
83
|
+
tags: { addonId },
|
|
84
|
+
meta: { phase: 'test', error: (0, types_1.errMsg)(err) },
|
|
85
|
+
});
|
|
86
|
+
return {
|
|
87
|
+
status: 'inconclusive',
|
|
88
|
+
error: `Connection test could not run: ${(0, types_1.errMsg)(err)}`,
|
|
89
|
+
testedBy: addonId,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
// Broker-backed integrations carry their connection identity as a `brokerId`; the broker owns
|
|
94
|
+
// the real semantic check. Reached because the settings NAME a broker, not because nothing
|
|
95
|
+
// else matched.
|
|
96
|
+
const brokerId = settings['brokerId'];
|
|
97
|
+
if (typeof brokerId === 'string' && brokerId.length > 0) {
|
|
98
|
+
try {
|
|
99
|
+
const owner = await findBrokerOwner(deps, addonId, brokerId);
|
|
100
|
+
if (owner === null || owner.provider.testInstance === undefined) {
|
|
101
|
+
logger.warn('no instances provider owns the broker a create names', {
|
|
102
|
+
tags: { addonId },
|
|
103
|
+
meta: { phase: 'test', brokerId },
|
|
104
|
+
});
|
|
105
|
+
return {
|
|
106
|
+
status: 'inconclusive',
|
|
107
|
+
error: `No instances provider that owns broker '${brokerId}' is available`,
|
|
108
|
+
testedBy: null,
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
const result = await owner.provider.testInstance({ id: brokerId, values: {} });
|
|
112
|
+
const status = result.status ?? (result.success ? 'validated' : 'rejected');
|
|
113
|
+
return {
|
|
114
|
+
status,
|
|
115
|
+
testedBy: owner.addonId,
|
|
116
|
+
...(result.error !== undefined ? { error: result.error } : {}),
|
|
117
|
+
...(result.latencyMs !== undefined ? { latencyMs: result.latencyMs } : {}),
|
|
118
|
+
...(result.detail !== undefined ? { detail: result.detail } : {}),
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
catch (err) {
|
|
122
|
+
logger.warn('broker connection test could not run', {
|
|
123
|
+
tags: { addonId },
|
|
124
|
+
meta: { phase: 'test', brokerId, error: (0, types_1.errMsg)(err) },
|
|
125
|
+
});
|
|
126
|
+
return {
|
|
127
|
+
status: 'inconclusive',
|
|
128
|
+
error: `Broker test could not run: ${(0, types_1.errMsg)(err)}`,
|
|
129
|
+
testedBy: addonId,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return {
|
|
134
|
+
status: 'unsupported',
|
|
135
|
+
error: `Integration '${addonId}' declares no connection test, ` +
|
|
136
|
+
`so these settings cannot be validated before it is created.`,
|
|
137
|
+
testedBy: null,
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Create the registry row and the addon's record behind it, gated by the connection test.
|
|
142
|
+
* `instances` is the addon's provider (the RAW one: this is what the wrapper itself calls), or
|
|
143
|
+
* null for an addon with no record, which keeps only the row.
|
|
144
|
+
*/
|
|
145
|
+
async function createRegisteredInstance(deps, instances, input) {
|
|
146
|
+
const { logger } = deps;
|
|
147
|
+
const reg = deps.integrations();
|
|
148
|
+
const { settings } = input;
|
|
149
|
+
if (instances !== null) {
|
|
150
|
+
const described = await instances.describe();
|
|
151
|
+
if (described.instanceMode === 'single') {
|
|
152
|
+
const existing = (await reg.listIntegrations()).filter((i) => i.addonId === input.addonId);
|
|
153
|
+
if (existing.length > 0) {
|
|
154
|
+
logger.warn('rejected duplicate unique', {
|
|
155
|
+
tags: { addonId: input.addonId, integrationId: existing[0]?.id },
|
|
156
|
+
meta: { phase: 'create' },
|
|
157
|
+
});
|
|
158
|
+
throw new server_1.TRPCError({
|
|
159
|
+
code: 'CONFLICT',
|
|
160
|
+
message: `Addon "${input.addonId}" is unique-instance and already has an integration (${existing[0]?.id})`,
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
// The gate. `rejected` is the one status that blocks: the remote was asked and said no.
|
|
166
|
+
// `unsupported` or `inconclusive` observed NOTHING about the credentials, so they pass, and
|
|
167
|
+
// they SAY SO in the log: silence would read as "validated".
|
|
168
|
+
const verdict = await testBeforeCreate(deps, input.addonId, settings ?? {}, input.kind);
|
|
169
|
+
if (verdict.status === 'rejected') {
|
|
170
|
+
logger.warn('rejected — connection test refused the settings', {
|
|
171
|
+
tags: { addonId: input.addonId },
|
|
172
|
+
meta: { phase: 'create', status: verdict.status, testedBy: verdict.testedBy },
|
|
173
|
+
});
|
|
174
|
+
throw new server_1.TRPCError({
|
|
175
|
+
code: 'BAD_REQUEST',
|
|
176
|
+
message: verdict.error ?? `Connection test failed for '${input.addonId}'`,
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
if (verdict.status === 'validated') {
|
|
180
|
+
logger.info('connection test validated — proceeding', {
|
|
181
|
+
tags: { addonId: input.addonId },
|
|
182
|
+
meta: { phase: 'create', latencyMs: verdict.latencyMs },
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
logger.warn('creating without validation — the settings were not validated', {
|
|
187
|
+
tags: { addonId: input.addonId },
|
|
188
|
+
meta: { phase: 'create', status: verdict.status, reason: verdict.error },
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
const integration = await reg.createIntegration({
|
|
192
|
+
addonId: input.addonId,
|
|
193
|
+
name: input.name,
|
|
194
|
+
...(input.info !== undefined ? { info: input.info } : {}),
|
|
195
|
+
...(input.originStableId !== undefined ? { originStableId: input.originStableId } : {}),
|
|
196
|
+
});
|
|
197
|
+
if (instances === null) {
|
|
198
|
+
if (settings !== undefined && Object.keys(settings).length > 0) {
|
|
199
|
+
logger.warn('settings dropped — the addon has no instance record to store them', {
|
|
200
|
+
tags: { integrationId: integration.id, addonId: integration.addonId },
|
|
201
|
+
meta: { phase: 'create', keys: Object.keys(settings) },
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
logger.info('persisted', {
|
|
205
|
+
tags: { integrationId: integration.id, addonId: integration.addonId },
|
|
206
|
+
meta: { phase: 'create' },
|
|
207
|
+
});
|
|
208
|
+
return integration;
|
|
209
|
+
}
|
|
210
|
+
// The connection is a typed record keyed by the registry id. A refusal removes the row: a
|
|
211
|
+
// registry entry with no record is an orphan, and a record with no entry is one too.
|
|
212
|
+
try {
|
|
213
|
+
await instances.createInstance({
|
|
214
|
+
id: integration.id,
|
|
215
|
+
name: integration.name,
|
|
216
|
+
...(input.kind !== undefined ? { kind: input.kind } : {}),
|
|
217
|
+
});
|
|
218
|
+
if (settings !== undefined && Object.keys(settings).length > 0) {
|
|
219
|
+
await instances.updateInstance({ id: integration.id, values: settings });
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
catch (err) {
|
|
223
|
+
await instances.deleteInstance({ id: integration.id }).catch((cleanupErr) => {
|
|
224
|
+
logger.warn('instance record refused: its partial record could not be removed', {
|
|
225
|
+
tags: { integrationId: integration.id, addonId: integration.addonId },
|
|
226
|
+
meta: { phase: 'create-rollback', error: (0, types_1.errMsg)(cleanupErr) },
|
|
227
|
+
});
|
|
228
|
+
});
|
|
229
|
+
try {
|
|
230
|
+
await reg.deleteIntegration(integration.id);
|
|
231
|
+
}
|
|
232
|
+
catch (rollbackErr) {
|
|
233
|
+
// The rollback failing must not hide WHY the create was refused.
|
|
234
|
+
logger.warn('instance record refused — registry row could not be removed', {
|
|
235
|
+
tags: { integrationId: integration.id, addonId: integration.addonId },
|
|
236
|
+
meta: { phase: 'create-rollback', error: (0, types_1.errMsg)(rollbackErr) },
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
logger.warn('instance record refused — registry row removed', {
|
|
240
|
+
tags: { integrationId: integration.id, addonId: integration.addonId },
|
|
241
|
+
meta: { phase: 'create', error: (0, types_1.errMsg)(err) },
|
|
242
|
+
});
|
|
243
|
+
throw err;
|
|
244
|
+
}
|
|
245
|
+
logger.info('persisted as an instance record (no restart)', {
|
|
246
|
+
tags: { integrationId: integration.id, addonId: integration.addonId },
|
|
247
|
+
meta: { phase: 'create' },
|
|
248
|
+
});
|
|
249
|
+
return integration;
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Delete the integration `integration`: the devices it owns, its record, its registry row, and
|
|
253
|
+
* announce it. A fixed builtin and an instance a link still names are refused BEFORE the first
|
|
254
|
+
* mutation: the device cascade is best-effort and cannot be undone.
|
|
255
|
+
*/
|
|
256
|
+
async function deleteRegisteredInstance(deps, instances, integration) {
|
|
257
|
+
const { logger } = deps;
|
|
258
|
+
const reg = deps.integrations();
|
|
259
|
+
const id = integration.id;
|
|
260
|
+
if (system_1.IntegrationRegistry.isFixed(integration)) {
|
|
261
|
+
throw new Error(`integration "${id}" is fixed — it belongs to the addon that declared it and cannot be deleted`);
|
|
262
|
+
}
|
|
263
|
+
if (instances !== null)
|
|
264
|
+
await (0, instance_links_service_1.assertInstanceDeletable)(instances, new instance_links_service_1.InstanceLinksIndex(deps.holders), id);
|
|
265
|
+
logger.info('removing', {
|
|
266
|
+
tags: { integrationId: id, addonId: integration.addonId },
|
|
267
|
+
meta: { phase: 'delete', name: integration.name },
|
|
268
|
+
});
|
|
269
|
+
// Cascade-delete every live device whose integrationId matches. Best-effort: a device-removal
|
|
270
|
+
// hiccup must not abort the integration delete; log and continue so the record and the event
|
|
271
|
+
// always fire.
|
|
272
|
+
const dm = deps.deviceManager();
|
|
273
|
+
// Claim legacy un-tagged devices BEFORE the cascade. Devices created before stamping carry no
|
|
274
|
+
// integrationId, so `removeByIntegration` would leave them orphaned once the integration is
|
|
275
|
+
// gone. While the row still exists, stamp the unambiguous ones.
|
|
276
|
+
if (dm?.listAll && dm?.setIntegrationId) {
|
|
277
|
+
try {
|
|
278
|
+
const [integrations, devices] = await Promise.all([reg.listIntegrations(), dm.listAll({})]);
|
|
279
|
+
const stamps = (0, integration_id_backfill_1.planDeleteTimeStamps)(id, integrations.map((i) => ({ id: i.id, addonId: i.addonId })), devices.map((d) => ({
|
|
280
|
+
id: d.id,
|
|
281
|
+
addonId: d.addonId,
|
|
282
|
+
parentDeviceId: d.parentDeviceId,
|
|
283
|
+
...(d.integrationId !== undefined ? { integrationId: d.integrationId } : {}),
|
|
284
|
+
})));
|
|
285
|
+
for (const stamp of stamps) {
|
|
286
|
+
await dm.setIntegrationId({ deviceId: stamp.deviceId, integrationId: stamp.integrationId });
|
|
287
|
+
}
|
|
288
|
+
if (stamps.length > 0) {
|
|
289
|
+
logger.info('claimed legacy un-tagged devices for cascade', {
|
|
290
|
+
tags: { integrationId: id, addonId: integration.addonId },
|
|
291
|
+
meta: { phase: 'delete', claimed: stamps.length },
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
catch (err) {
|
|
296
|
+
logger.warn('legacy device claim failed (best-effort — continuing)', {
|
|
297
|
+
tags: { integrationId: id },
|
|
298
|
+
meta: { phase: 'delete', error: (0, types_1.errMsg)(err) },
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
if (dm?.removeByIntegration) {
|
|
303
|
+
try {
|
|
304
|
+
const result = await dm.removeByIntegration({ integrationId: id });
|
|
305
|
+
logger.info('cascade-removed devices', {
|
|
306
|
+
tags: { integrationId: id },
|
|
307
|
+
meta: { phase: 'delete', removed: result.removed },
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
catch (err) {
|
|
311
|
+
logger.warn('device cascade-remove failed (best-effort — continuing)', {
|
|
312
|
+
tags: { integrationId: id },
|
|
313
|
+
meta: { phase: 'delete', error: (0, types_1.errMsg)(err) },
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
else {
|
|
318
|
+
logger.warn('device-manager not available — skipping cascade device removal', {
|
|
319
|
+
tags: { integrationId: id },
|
|
320
|
+
meta: { phase: 'delete' },
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
// The record and its keychain refs go first; a refusal stops here, with the registry row still
|
|
324
|
+
// naming what was not removed.
|
|
325
|
+
await instances?.deleteInstance({ id });
|
|
326
|
+
await reg.deleteIntegration(id);
|
|
327
|
+
deps.eventBus.emit({
|
|
328
|
+
id: `integration-deleted-${Date.now()}`,
|
|
329
|
+
timestamp: new Date(),
|
|
330
|
+
source: { type: 'integration', id },
|
|
331
|
+
category: types_1.EventCategory.IntegrationDeleted,
|
|
332
|
+
data: { integrationId: id, addonId: integration.addonId },
|
|
333
|
+
});
|
|
334
|
+
logger.info('completed (no restart)', {
|
|
335
|
+
tags: { integrationId: id },
|
|
336
|
+
meta: { phase: 'delete' },
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Whether instances of `kind` of `provider` bring devices (a kind without a role takes the provider's;
|
|
341
|
+
* no `kind` means the default kind, then the addon-wide rule).
|
|
342
|
+
*/
|
|
343
|
+
async function bringsDevicesOf(deps, addonId, provider, kind) {
|
|
344
|
+
const declared = deps.manifestRole(addonId);
|
|
345
|
+
if (declared !== undefined)
|
|
346
|
+
return (0, integration_role_1.bringsDevices)(declared);
|
|
347
|
+
const described = await provider.describe();
|
|
348
|
+
// A call without `kind` is the provider's default kind (`described.kind`) when that names a declared kind.
|
|
349
|
+
const wanted = kind ?? described.kind;
|
|
350
|
+
const own = (described.kinds ?? []).find((k) => k.id === wanted);
|
|
351
|
+
if (own !== undefined)
|
|
352
|
+
return (0, integration_role_1.bringsDevices)(own.role ?? described.role);
|
|
353
|
+
return (0, integration_role_1.bringsDevices)((0, integration_role_1.describedRoleOf)(described) ?? described.role);
|
|
354
|
+
}
|
|
355
|
+
/** The wrapped providers and the raw ones they stand for. */
|
|
356
|
+
const RAW_PROVIDERS = new WeakMap();
|
|
357
|
+
/** The provider a lifecycle wrapper stands for; a provider that is not wrapped is returned as it is. */
|
|
358
|
+
function rawInstancesProvider(provider) {
|
|
359
|
+
return RAW_PROVIDERS.get(provider) ?? provider;
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* `provider` with a `createInstance` / `deleteInstance` that carry the hub half for an instance
|
|
363
|
+
* that brings devices. An instance of a kind that does not (a notifier, a broker account, a
|
|
364
|
+
* destination) is the addon's record alone and goes straight through, as does a call naming a
|
|
365
|
+
* registry row that already exists (the legacy `integrations.create` made the row first).
|
|
366
|
+
*/
|
|
367
|
+
function withInstanceLifecycle(addonId, provider, deps) {
|
|
368
|
+
const bare = (0, types_1.bareAddonId)(addonId);
|
|
369
|
+
const createInstance = async (input) => {
|
|
370
|
+
if (!(await bringsDevicesOf(deps, bare, provider, input.kind))) {
|
|
371
|
+
return provider.createInstance(input);
|
|
372
|
+
}
|
|
373
|
+
const reg = deps.integrations();
|
|
374
|
+
if (input.id !== undefined) {
|
|
375
|
+
const existing = await reg.getIntegration(input.id);
|
|
376
|
+
if (existing !== null && existing.addonId === bare)
|
|
377
|
+
return provider.createInstance(input);
|
|
378
|
+
deps.logger.warn('rejected: a devices instance takes the id the hub mints', {
|
|
379
|
+
tags: { addonId: bare },
|
|
380
|
+
meta: { phase: 'create', id: input.id },
|
|
381
|
+
});
|
|
382
|
+
throw new server_1.TRPCError({
|
|
383
|
+
code: 'BAD_REQUEST',
|
|
384
|
+
message: `Instances of "${bare}" bring devices and take the id the hub mints; "${input.id}" names no integration`,
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
const created = await createRegisteredInstance(deps, provider, {
|
|
388
|
+
addonId: bare,
|
|
389
|
+
name: input.name,
|
|
390
|
+
...(input.kind !== undefined ? { kind: input.kind } : {}),
|
|
391
|
+
...(input.originStableId !== undefined ? { originStableId: input.originStableId } : {}),
|
|
392
|
+
...(input.values !== undefined ? { settings: input.values } : {}),
|
|
393
|
+
});
|
|
394
|
+
return { id: created.id };
|
|
395
|
+
};
|
|
396
|
+
const deleteInstance = async (input) => {
|
|
397
|
+
const integration = await deps.integrations().getIntegration(input.id);
|
|
398
|
+
if (integration === null || integration.addonId !== bare)
|
|
399
|
+
return provider.deleteInstance(input);
|
|
400
|
+
await deleteRegisteredInstance(deps, provider, integration);
|
|
401
|
+
return { ok: true };
|
|
402
|
+
};
|
|
403
|
+
const wrapped = new Proxy(provider, {
|
|
404
|
+
get(target, prop) {
|
|
405
|
+
if (prop === 'createInstance')
|
|
406
|
+
return createInstance;
|
|
407
|
+
if (prop === 'deleteInstance')
|
|
408
|
+
return deleteInstance;
|
|
409
|
+
const value = Reflect.get(target, prop);
|
|
410
|
+
return typeof value === 'function' ? value.bind(target) : value;
|
|
411
|
+
},
|
|
412
|
+
});
|
|
413
|
+
RAW_PROVIDERS.set(wrapped, provider);
|
|
414
|
+
return wrapped;
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* A {@link InstanceLifecycleWrap} that is looked up when a create or delete ARRIVES, not when the
|
|
418
|
+
* provider is registered. A forked holder can register before the hub half exists (the broker
|
|
419
|
+
* is up before `AddonRegistryService` has initialised); capturing the wrap then would leave that
|
|
420
|
+
* holder without the registry row, the test gate and the device cascade for good. Until the
|
|
421
|
+
* wrap exists a create or delete is refused, and says so.
|
|
422
|
+
*/
|
|
423
|
+
function deferInstanceLifecycle(resolve, logger) {
|
|
424
|
+
return (addonId, provider) => {
|
|
425
|
+
const bare = (0, types_1.bareAddonId)(addonId);
|
|
426
|
+
const wrapNow = (phase) => {
|
|
427
|
+
const wrap = resolve();
|
|
428
|
+
if (wrap !== null)
|
|
429
|
+
return wrap(addonId, provider);
|
|
430
|
+
logger.warn('refused: the hub half of integration-instances is not ready yet', {
|
|
431
|
+
tags: { addonId: bare },
|
|
432
|
+
meta: { phase },
|
|
433
|
+
});
|
|
434
|
+
throw new server_1.TRPCError({
|
|
435
|
+
code: 'PRECONDITION_FAILED',
|
|
436
|
+
message: `The hub is still starting; "${bare}" cannot ${phase} an instance yet`,
|
|
437
|
+
});
|
|
438
|
+
};
|
|
439
|
+
const createInstance = async (input) => wrapNow('create').createInstance(input);
|
|
440
|
+
const deleteInstance = async (input) => wrapNow('delete').deleteInstance(input);
|
|
441
|
+
const deferred = new Proxy(provider, {
|
|
442
|
+
get(target, prop) {
|
|
443
|
+
if (prop === 'createInstance')
|
|
444
|
+
return createInstance;
|
|
445
|
+
if (prop === 'deleteInstance')
|
|
446
|
+
return deleteInstance;
|
|
447
|
+
const value = Reflect.get(target, prop);
|
|
448
|
+
return typeof value === 'function' ? value.bind(target) : value;
|
|
449
|
+
},
|
|
450
|
+
});
|
|
451
|
+
RAW_PROVIDERS.set(deferred, rawInstancesProvider(provider));
|
|
452
|
+
return deferred;
|
|
453
|
+
};
|
|
454
|
+
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.InstanceLinksIndex = exports.INTEGRATION_INSTANCES_CAP = void 0;
|
|
4
4
|
exports.holdersOf = holdersOf;
|
|
5
|
+
exports.assertInstanceDeletable = assertInstanceDeletable;
|
|
5
6
|
exports.guardInstanceDeletes = guardInstanceDeletes;
|
|
6
7
|
exports.registeredProviderFor = registeredProviderFor;
|
|
7
8
|
/**
|
|
@@ -63,20 +64,23 @@ class InstanceLinksIndex {
|
|
|
63
64
|
}
|
|
64
65
|
exports.InstanceLinksIndex = InstanceLinksIndex;
|
|
65
66
|
/**
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* delete: a destructive step never goes ahead on a failed read (D49).
|
|
67
|
+
* Refuse while a declared link names instance `id` of `provider`. The target's function cap and
|
|
68
|
+
* kind come from its own `describe().kinds`; a provider with no kinds is no link target. A
|
|
69
|
+
* consumer that cannot be read REFUSES: a destructive step never goes ahead on a failed read (D49).
|
|
70
70
|
*/
|
|
71
|
+
async function assertInstanceDeletable(provider, index, id) {
|
|
72
|
+
const instance = await provider.getInstance({ id });
|
|
73
|
+
const description = await provider.describe();
|
|
74
|
+
const kind = (description.kinds ?? []).find((k) => k.id === instance?.kind);
|
|
75
|
+
if (kind === undefined)
|
|
76
|
+
return;
|
|
77
|
+
const names = kind.brokerKind === undefined ? [kind.id] : [kind.id, kind.brokerKind];
|
|
78
|
+
await (0, types_1.assertInstanceUnused)(id, await index.findersFor(kind.functionCap, names));
|
|
79
|
+
}
|
|
80
|
+
/** `provider` with a `deleteInstance` that refuses while a declared link names the instance. */
|
|
71
81
|
function guardInstanceDeletes(provider, index) {
|
|
72
82
|
const guarded = async (input) => {
|
|
73
|
-
|
|
74
|
-
const description = await provider.describe();
|
|
75
|
-
const kind = (description.kinds ?? []).find((k) => k.id === instance?.kind);
|
|
76
|
-
if (kind !== undefined) {
|
|
77
|
-
const names = kind.brokerKind === undefined ? [kind.id] : [kind.id, kind.brokerKind];
|
|
78
|
-
await (0, types_1.assertInstanceUnused)(input.id, await index.findersFor(kind.functionCap, names));
|
|
79
|
-
}
|
|
83
|
+
await assertInstanceDeletable(provider, index, input.id);
|
|
80
84
|
return provider.deleteInstance(input);
|
|
81
85
|
};
|
|
82
86
|
return new Proxy(provider, {
|
|
@@ -90,12 +94,16 @@ function guardInstanceDeletes(provider, index) {
|
|
|
90
94
|
}
|
|
91
95
|
/**
|
|
92
96
|
* What the registry should hold for `provider` registered under `capName`: a holder of
|
|
93
|
-
* `integration-instances` comes back guarded
|
|
97
|
+
* `integration-instances` comes back guarded (a delete refused while a link names it, D1013) and,
|
|
98
|
+
* when `lifecycle` is given, carrying the hub half of create and delete for an instance that
|
|
99
|
+
* brings devices (epic #440 H3). Anything else comes back unchanged. One call site per way a
|
|
94
100
|
* provider reaches the registry (in-process context, forked-runner proxy).
|
|
95
101
|
*/
|
|
96
|
-
function registeredProviderFor(capName, provider, registry) {
|
|
102
|
+
function registeredProviderFor(capName, provider, registry, lifecycle) {
|
|
97
103
|
if (capName !== exports.INTEGRATION_INSTANCES_CAP || !(0, integration_instances_provider_js_1.isIntegrationInstancesProvider)(provider)) {
|
|
98
104
|
return provider;
|
|
99
105
|
}
|
|
100
|
-
|
|
106
|
+
const holders = () => holdersOf(registry);
|
|
107
|
+
const guarded = guardInstanceDeletes(provider, new InstanceLinksIndex(holders));
|
|
108
|
+
return lifecycle === undefined ? guarded : lifecycle.wrap(lifecycle.addonId, guarded);
|
|
101
109
|
}
|
|
@@ -10,6 +10,7 @@ const cap_router_runtime_js_1 = require("../../api/trpc/cap-router-runtime.js");
|
|
|
10
10
|
const core_cap_bridge_js_1 = require("../../api/trpc/core-cap-bridge.js");
|
|
11
11
|
const agent_readiness_pull_js_1 = require("./agent-readiness-pull.js");
|
|
12
12
|
const agent_registration_request_js_1 = require("./agent-registration-request.js");
|
|
13
|
+
const instance_lifecycle_js_1 = require("../addon/instance-lifecycle.js");
|
|
13
14
|
const instance_links_service_js_1 = require("../addon/instance-links.service.js");
|
|
14
15
|
const hub_mesh_guard_js_1 = require("./hub-mesh-guard.js");
|
|
15
16
|
const hub_server_version_js_1 = require("./hub-server-version.js");
|
|
@@ -141,6 +142,16 @@ class MoleculerService {
|
|
|
141
142
|
isRunnerOnNode(nodeId, runnerId) {
|
|
142
143
|
return (0, runner_hosted_on_node_js_1.isRunnerHostedByNode)(this.nodeRegistry, (addonId) => this.runnerIdResolver?.(addonId) ?? addonId, nodeId, runnerId);
|
|
143
144
|
}
|
|
145
|
+
/**
|
|
146
|
+
* Adds the hub half of an `integration-instances` create and delete around a forked holder,
|
|
147
|
+
* injected late by `AddonRegistryService` (the registry and the device manager live there).
|
|
148
|
+
* Null before that. A forked holder can register earlier (the broker is up first), so the
|
|
149
|
+
* registration never captures this: it resolves it when a create or delete arrives.
|
|
150
|
+
*/
|
|
151
|
+
instanceLifecycleWrap = null;
|
|
152
|
+
setInstanceLifecycleWrap(wrap) {
|
|
153
|
+
this.instanceLifecycleWrap = wrap;
|
|
154
|
+
}
|
|
144
155
|
get childRegistry() {
|
|
145
156
|
return this.localChildRegistry;
|
|
146
157
|
}
|
|
@@ -1102,7 +1113,10 @@ class MoleculerService {
|
|
|
1102
1113
|
proxy[methodName] = (methodParams) => callFn(methodName, methodParams);
|
|
1103
1114
|
}
|
|
1104
1115
|
// A forked holder of `integration-instances` is guarded like an in-process one (D1013).
|
|
1105
|
-
registry.registerProvider(capName, registryKey, (0, instance_links_service_js_1.registeredProviderFor)(capName, proxy, registry
|
|
1116
|
+
registry.registerProvider(capName, registryKey, (0, instance_links_service_js_1.registeredProviderFor)(capName, proxy, registry, {
|
|
1117
|
+
addonId,
|
|
1118
|
+
wrap: (0, instance_lifecycle_js_1.deferInstanceLifecycle)(() => this.instanceLifecycleWrap, this.logger),
|
|
1119
|
+
}), owner);
|
|
1106
1120
|
// Local-first singleton preference (UDS regression fix). A
|
|
1107
1121
|
// `placement: 'any-node'` singleton (e.g. `pipeline-executor`) can
|
|
1108
1122
|
// register on BOTH the hub-local forked child and a remote agent.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.814",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
],
|
|
67
67
|
"requires": {
|
|
68
68
|
"addons": {
|
|
69
|
-
"@camstack/addon-admin-ui": ">=1.2.
|
|
70
|
-
"@camstack/addon-agent-ui": ">=1.2.
|
|
71
|
-
"@camstack/addon-
|
|
69
|
+
"@camstack/addon-admin-ui": ">=1.2.621",
|
|
70
|
+
"@camstack/addon-agent-ui": ">=1.2.349",
|
|
71
|
+
"@camstack/addon-export-alexa": ">=1.2.192"
|
|
72
72
|
},
|
|
73
73
|
"wrapper": {
|
|
74
74
|
"desktop": ">=0.0.1",
|
|
@@ -77,19 +77,19 @@
|
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@camstack/addon-admin-ui": "1.2.
|
|
81
|
-
"@camstack/addon-agent-ui": "1.2.
|
|
80
|
+
"@camstack/addon-admin-ui": "1.2.621",
|
|
81
|
+
"@camstack/addon-agent-ui": "1.2.349",
|
|
82
82
|
"@camstack/addon-auth": "1.2.179",
|
|
83
83
|
"@camstack/addon-benchmark": "1.2.312",
|
|
84
84
|
"@camstack/addon-decoder-nodeav": "1.2.149",
|
|
85
85
|
"@camstack/addon-notifiers": "1.2.633",
|
|
86
86
|
"@camstack/addon-pipeline": "1.2.648",
|
|
87
|
-
"@camstack/addon-pipeline-orchestrator": "1.2.
|
|
88
|
-
"@camstack/addon-post-analysis": "1.2.
|
|
87
|
+
"@camstack/addon-pipeline-orchestrator": "1.2.672",
|
|
88
|
+
"@camstack/addon-post-analysis": "1.2.686",
|
|
89
89
|
"@camstack/develop": "0.1.51",
|
|
90
90
|
"@camstack/sdk": "1.2.157",
|
|
91
|
-
"@camstack/types": "1.2.
|
|
92
|
-
"@camstack/ui-library": "1.2.
|
|
91
|
+
"@camstack/types": "1.2.528",
|
|
92
|
+
"@camstack/ui-library": "1.2.408",
|
|
93
93
|
"@fastify/compress": "^9.0.0",
|
|
94
94
|
"@fastify/cookie": "^11.0.2",
|
|
95
95
|
"@fastify/cors": "^11.2.0",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-CznnwtQ8.js");
|
|
3
3
|
const require_x509_es = require("./x509.es-WtnRNyYS.js");
|
|
4
4
|
let zod = require("zod");
|
|
5
5
|
let node_crypto = require("node:crypto");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ec as defineRecordKinds } from "./dist-DmCVWvtK.mjs";
|
|
2
2
|
import { C as backdatedNotBefore, S as withUtcTimeEncoding, _ as NameConstraints, a as KeyUsageFlags, c as Pkcs10CertificateRequest, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, g as GeneralSubtrees, h as GeneralSubtree, i as Extension, l as Pkcs10CertificateRequestGenerator, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension, u as SubjectAlternativeNameExtension, v as GeneralName, x as AsnConvert } from "./x509.es-BRiJgOvu.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { X509Certificate, createHash, createPrivateKey, randomBytes, webcrypto } from "node:crypto";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CznnwtQ8.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_fs = require("node:fs");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $o as BaseAddon, Yc as errMsg, Zc as EventCategory, pn as addonPagesCapability } from "../../dist-DmCVWvtK.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import * as fs$1 from "node:fs";
|
|
@@ -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-CznnwtQ8.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_fs = require("node:fs");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $o as BaseAddon, Yc as errMsg, Zc as EventCategory, hn as addonWidgetsCapability } from "../../dist-DmCVWvtK.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import * as fs$1 from "node:fs";
|
|
@@ -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-CznnwtQ8.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
8
|
const require_log_redactor = require("../../log-redactor-BhIEMaG9.js");
|
|
9
9
|
let node_fs = require("node:fs");
|