@camstack/system 1.2.76 → 1.2.78
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/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/dist/builtins/alerts/alerts.addon.js +1 -1
- package/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
- package/dist/builtins/device-manager/device-manager.addon.js +1 -1
- package/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
- package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
- package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/dist/builtins/local-auth/local-auth.addon.js +1 -1
- package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
- package/dist/builtins/local-network/local-network.addon.js +1 -1
- package/dist/builtins/local-network/local-network.addon.mjs +1 -1
- package/dist/builtins/loki-logging/index.js +1 -1
- package/dist/builtins/loki-logging/index.mjs +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/dist/builtins/platform-probe/index.js +1 -1
- package/dist/builtins/platform-probe/index.mjs +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/dist/builtins/snapshot/index.js +1 -1
- package/dist/builtins/snapshot/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +1 -1
- package/dist/builtins/storage-orchestrator/index.d.ts +2 -0
- package/dist/builtins/storage-orchestrator/index.js +1 -0
- package/dist/builtins/storage-orchestrator/index.mjs +2 -2
- package/dist/builtins/storage-orchestrator/storage-migration-coordinator.d.ts +73 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +2 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +468 -8
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +468 -9
- package/dist/builtins/storage-orchestrator/storage-orchestrator.service.d.ts +7 -0
- package/dist/builtins/system-config/system-config.addon.js +1 -1
- package/dist/builtins/system-config/system-config.addon.mjs +1 -1
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{dist-CX8Z8M6S.mjs → dist-CIIFhXqm.mjs} +416 -45
- package/dist/{dist-B1W4mT4z.js → dist-cINpngi1.js} +427 -44
- package/dist/http/reverse-proxy.d.ts +5 -0
- package/dist/index.js +5 -3
- package/dist/index.mjs +6 -4
- package/package.json +4 -1
|
@@ -8,6 +8,11 @@ export interface ReverseProxyOptions {
|
|
|
8
8
|
readonly upstreamPath: string;
|
|
9
9
|
readonly clientReq: IncomingMessage;
|
|
10
10
|
readonly clientRes: ServerResponse;
|
|
11
|
+
/**
|
|
12
|
+
* Body already consumed by the host HTTP framework. When present, replay it
|
|
13
|
+
* explicitly instead of piping the now-ended raw request stream.
|
|
14
|
+
*/
|
|
15
|
+
readonly replayBody?: Buffer;
|
|
11
16
|
}
|
|
12
17
|
/** Reverse-proxy one request to an addon data-plane listener. Fire-and-forget:
|
|
13
18
|
* the caller must `reply.hijack()` (or otherwise stop the framework from also
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("./dist-
|
|
3
|
+
const require_dist = require("./dist-cINpngi1.js");
|
|
4
4
|
const require_builtins_alerts_alerts_addon = require("./builtins/alerts/alerts.addon.js");
|
|
5
5
|
require("./builtins/alerts/index.js");
|
|
6
6
|
const require_formatter = require("./formatter-DqAKDlvN.js");
|
|
@@ -392,12 +392,13 @@ var DataPlaneRegistry = class {
|
|
|
392
392
|
* the caller must `reply.hijack()` (or otherwise stop the framework from also
|
|
393
393
|
* responding) before calling this, since we drive `clientRes` directly. */
|
|
394
394
|
function proxyToUpstream(opts) {
|
|
395
|
-
const { baseUrl, secret, upstreamPath, clientReq, clientRes } = opts;
|
|
395
|
+
const { baseUrl, secret, upstreamPath, clientReq, clientRes, replayBody } = opts;
|
|
396
396
|
const base = new URL(baseUrl);
|
|
397
397
|
const headers = { ...clientReq.headers };
|
|
398
398
|
delete headers.host;
|
|
399
399
|
delete headers.connection;
|
|
400
400
|
delete headers["content-length"];
|
|
401
|
+
if (replayBody !== void 0) headers["content-length"] = replayBody.byteLength;
|
|
401
402
|
headers[require_dist.DATAPLANE_SECRET_HEADER] = secret;
|
|
402
403
|
const upstream = (0, node_http.request)({
|
|
403
404
|
protocol: base.protocol,
|
|
@@ -426,7 +427,8 @@ function proxyToUpstream(opts) {
|
|
|
426
427
|
clientRes.on("close", () => {
|
|
427
428
|
if (!clientRes.writableFinished && !upstream.destroyed) upstream.destroy();
|
|
428
429
|
});
|
|
429
|
-
|
|
430
|
+
if (replayBody !== void 0) upstream.end(replayBody);
|
|
431
|
+
else clientReq.pipe(upstream);
|
|
430
432
|
}
|
|
431
433
|
//#endregion
|
|
432
434
|
//#region src/kernel/heap-watch.ts
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM$1, r as __exportAll, t as __commonJSMin$1 } from "./chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { At as
|
|
2
|
+
import { $ as objectInputDeclaresAddonId, At as emitDownForOwnedCaps, B as isArrayOutputSchema, Bt as scopeKey, Ct as ReadinessRegistry, Dt as asNumber, Et as asJsonObject$1, G as kebabToCamel, H as isObjectInput, Ht as EventCategory$1, It as parseJsonObject, K as lifecycleJobSchema, Lt as parseJsonUnknown$1, Mt as expandCapMethods, Ot as asString$1, R as extractNestedAddonId, Rt as readinessKey, V as isCollectionArrayMethod, W as isVoidInput, X as looseSchema, Y as logLevelAtMost, _t as DATAPLANE_SECRET_HEADER$1, d as METHOD_ACCESS_MAP, f as RUNTIME_DEFAULTS, ht as errMsg$1, it as scopesAllowDeviceCap, kt as createEvent, nt as procedureAuthKey, rt as scopesAllowAddon, t as ALL_CAPABILITY_DEFINITIONS, vt as DEVICE_SETTINGS_CONTRIBUTION_METHODS, wt as ReadinessTimeoutError, y as addonSettingsCapability, yt as DEVICE_STATUS_METHOD, zt as resolveCapMount } from "./dist-CIIFhXqm.mjs";
|
|
3
3
|
import { AlertCenterAddon } from "./builtins/alerts/alerts.addon.mjs";
|
|
4
4
|
import "./builtins/alerts/index.mjs";
|
|
5
5
|
import { t as formatLogLine } from "./formatter-B7qW8bPJ.mjs";
|
|
@@ -18,7 +18,7 @@ import NativeMetricsAddon, { t as NativeMetricsProvider } from "./builtins/nativ
|
|
|
18
18
|
import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./builtins/sqlite-storage/filesystem-storage.addon.mjs";
|
|
19
19
|
import { SqliteSettingsAddon, o as SqliteSettingsBackend } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
|
|
20
20
|
import { ConfigStore, DeviceStore } from "./builtins/sqlite-storage/index.mjs";
|
|
21
|
-
import { StorageOrchestratorAddon,
|
|
21
|
+
import { StorageOrchestratorAddon, r as StorageOrchestratorService } from "./builtins/storage-orchestrator/storage-orchestrator.addon.mjs";
|
|
22
22
|
import "./builtins/storage-orchestrator/index.mjs";
|
|
23
23
|
import { SystemConfigAddon } from "./builtins/system-config/system-config.addon.mjs";
|
|
24
24
|
import "./builtins/system-config/index.mjs";
|
|
@@ -384,12 +384,13 @@ var DataPlaneRegistry = class {
|
|
|
384
384
|
* the caller must `reply.hijack()` (or otherwise stop the framework from also
|
|
385
385
|
* responding) before calling this, since we drive `clientRes` directly. */
|
|
386
386
|
function proxyToUpstream(opts) {
|
|
387
|
-
const { baseUrl, secret, upstreamPath, clientReq, clientRes } = opts;
|
|
387
|
+
const { baseUrl, secret, upstreamPath, clientReq, clientRes, replayBody } = opts;
|
|
388
388
|
const base = new URL(baseUrl);
|
|
389
389
|
const headers = { ...clientReq.headers };
|
|
390
390
|
delete headers.host;
|
|
391
391
|
delete headers.connection;
|
|
392
392
|
delete headers["content-length"];
|
|
393
|
+
if (replayBody !== void 0) headers["content-length"] = replayBody.byteLength;
|
|
393
394
|
headers[DATAPLANE_SECRET_HEADER$1] = secret;
|
|
394
395
|
const upstream = request({
|
|
395
396
|
protocol: base.protocol,
|
|
@@ -418,7 +419,8 @@ function proxyToUpstream(opts) {
|
|
|
418
419
|
clientRes.on("close", () => {
|
|
419
420
|
if (!clientRes.writableFinished && !upstream.destroyed) upstream.destroy();
|
|
420
421
|
});
|
|
421
|
-
|
|
422
|
+
if (replayBody !== void 0) upstream.end(replayBody);
|
|
423
|
+
else clientReq.pipe(upstream);
|
|
422
424
|
}
|
|
423
425
|
//#endregion
|
|
424
426
|
//#region src/kernel/heap-watch.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/system",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.78",
|
|
4
4
|
"description": "Core addon for CamStack — builtins, pipeline, process management, auth, logging, events",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|
|
@@ -145,6 +145,9 @@
|
|
|
145
145
|
{
|
|
146
146
|
"name": "storage"
|
|
147
147
|
},
|
|
148
|
+
{
|
|
149
|
+
"name": "storage-migration"
|
|
150
|
+
},
|
|
148
151
|
{
|
|
149
152
|
"name": "settings-store"
|
|
150
153
|
}
|