@camstack/addon-pipeline 1.2.321 → 1.2.323
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/audio-analyzer/index.js +2 -2
- package/dist/audio-analyzer/index.mjs +2 -2
- package/dist/{default-detection-model-SkL7rw1J.js → default-detection-model-3nybzgJM.js} +1 -1
- package/dist/{default-detection-model-DBqAX4cL.mjs → default-detection-model-BbGqKJrb.mjs} +1 -1
- package/dist/detection-pipeline/index.js +4 -4
- package/dist/detection-pipeline/index.mjs +4 -4
- package/dist/{dist-DMwFmudw.js → dist-BHwYsqDW.js} +96 -4
- package/dist/{dist-CTLBxswm.mjs → dist-CYhfylbW.mjs} +96 -4
- package/dist/motion-wasm/index.js +1 -1
- package/dist/motion-wasm/index.mjs +1 -1
- package/dist/{node-CJqa8iTR.js → node-BPEcDS3W.js} +1 -1
- package/dist/{node-BO3NIRH9.mjs → node-KuSWIyX-.mjs} +1 -1
- package/dist/pipeline-runner/index.js +3 -3
- package/dist/pipeline-runner/index.mjs +3 -3
- package/dist/{process-memory-qCTMcKBo.mjs → process-memory-BArnBFK7.mjs} +1 -1
- package/dist/{process-memory-BLd-PX9x.js → process-memory-Maylk0nL.js} +1 -1
- package/dist/recorder/index.js +178 -2
- package/dist/recorder/index.mjs +178 -2
- package/dist/{segment-demux-js-DXHU1xgc.js → segment-demux-js-FYxZEbrp.js} +1 -1
- package/dist/{segment-demux-js-6HsaPjoo.mjs → segment-demux-js-am2ssLJA.mjs} +1 -1
- package/dist/stream-broker/_stub.js +2 -2
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-C1yya1ze.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-XTH7Q8hm.mjs} +2 -2
- package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-gPsQTvgB.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Bm0eNLm_.mjs} +1 -1
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-mEJkrfvj.mjs +26 -0
- package/dist/stream-broker/demux-worker-child.js +1 -1
- package/dist/stream-broker/demux-worker-child.mjs +1 -1
- package/dist/stream-broker/{hostInit-BHlXLPez.mjs → hostInit-CgW4I0dG.mjs} +2 -2
- package/dist/stream-broker/index.js +22 -11
- package/dist/stream-broker/index.mjs +22 -11
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/package.json +1 -1
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DGvtO8aA.mjs +0 -26
|
@@ -3,8 +3,8 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../chunk-emK7D4bc.js");
|
|
6
|
-
const require_dist = require("../dist-
|
|
7
|
-
const require_process_memory = require("../process-memory-
|
|
6
|
+
const require_dist = require("../dist-BHwYsqDW.js");
|
|
7
|
+
const require_process_memory = require("../process-memory-Maylk0nL.js");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
9
9
|
node_fs = require_chunk.__toESM(node_fs);
|
|
10
10
|
let node_path = require("node:path");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as __require } from "../chunk-DnnnRqeS.mjs";
|
|
2
|
-
import { A as PoolMemoryWatchdog, E as HF_BASE_URL, En as nodePin, Kt as resolvePoolMemoryPolicy, Sn as hydrateSchema, St as mapAudioLabelToMacro, U as audioAnalysisCapability, Un as EventCategory, W as audioAnalyzerCapability, _n as audioChunkBytesPerSample, fn as errMsg, m as DEFAULT_AUDIO_ANALYZER_CONFIG, mn as BaseAddon, r as AUDIO_BACKEND_CHOICES, xn as expandAudioChunkToF32le } from "../dist-
|
|
3
|
-
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-
|
|
2
|
+
import { A as PoolMemoryWatchdog, E as HF_BASE_URL, En as nodePin, Kt as resolvePoolMemoryPolicy, Sn as hydrateSchema, St as mapAudioLabelToMacro, U as audioAnalysisCapability, Un as EventCategory, W as audioAnalyzerCapability, _n as audioChunkBytesPerSample, fn as errMsg, m as DEFAULT_AUDIO_ANALYZER_CONFIG, mn as BaseAddon, r as AUDIO_BACKEND_CHOICES, xn as expandAudioChunkToF32le } from "../dist-CYhfylbW.mjs";
|
|
3
|
+
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-BArnBFK7.mjs";
|
|
4
4
|
import * as fs from "node:fs";
|
|
5
5
|
import * as path$1 from "node:path";
|
|
6
6
|
import { downloadFile } from "@camstack/system/addon-utils";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_dist = require("./dist-
|
|
1
|
+
const require_dist = require("./dist-BHwYsqDW.js");
|
|
2
2
|
const require_worker_protocol = require("./worker-protocol-C-G8qmye.js");
|
|
3
3
|
let node_crypto = require("node:crypto");
|
|
4
4
|
//#region src/detection-pipeline/registry/effective-confidence.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as audioKindId, Yt as stepModelRunsOnFormat, _t as hfModelUrl, f as COCO_80_LABELS, i as AUDIO_MACRO_LABELS, p as COCO_TO_MACRO, vt as inferModelProvider, y as DEVICE_BACKEND_TO_FORMAT } from "./dist-
|
|
1
|
+
import { G as audioKindId, Yt as stepModelRunsOnFormat, _t as hfModelUrl, f as COCO_80_LABELS, i as AUDIO_MACRO_LABELS, p as COCO_TO_MACRO, vt as inferModelProvider, y as DEVICE_BACKEND_TO_FORMAT } from "./dist-CYhfylbW.mjs";
|
|
2
2
|
import { t as isWorkerReply } from "./worker-protocol-D_NzPcnh.mjs";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
//#region src/detection-pipeline/registry/effective-confidence.ts
|
|
@@ -3,11 +3,11 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../chunk-emK7D4bc.js");
|
|
6
|
-
const require_dist = require("../dist-
|
|
7
|
-
const require_node = require("../node-
|
|
8
|
-
const require_default_detection_model = require("../default-detection-model-
|
|
6
|
+
const require_dist = require("../dist-BHwYsqDW.js");
|
|
7
|
+
const require_node = require("../node-BPEcDS3W.js");
|
|
8
|
+
const require_default_detection_model = require("../default-detection-model-3nybzgJM.js");
|
|
9
9
|
const require_lazy_sharp = require("../lazy-sharp-BuwKlQLR.js");
|
|
10
|
-
const require_process_memory = require("../process-memory-
|
|
10
|
+
const require_process_memory = require("../process-memory-Maylk0nL.js");
|
|
11
11
|
let node_os = require("node:os");
|
|
12
12
|
node_os = require_chunk.__toESM(node_os);
|
|
13
13
|
let node_fs = require("node:fs");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as __require } from "../chunk-DnnnRqeS.mjs";
|
|
2
|
-
import { A as PoolMemoryWatchdog, An as sleep, At as overlayClusterStepSettings, Dn as parseJsonUnknown, En as nodePin, Ft as pipelineExecutorCapability, Hn as union, Ht as resolveClusterStepModelId, Jt as runtimeDevices$1, Kt as resolvePoolMemoryPolicy, Mn as array, Mt as pickClusterStepSettings, Rn as object, Sn as hydrateSchema, Un as EventCategory, V as YAMNET_TO_MACRO, Vn as string, Yt as stepModelRunsOnFormat, bt as loadContributionCapability, ct as evaluateZoneRules, d as CLUSTER_MODEL_SCOPED_STEPS, en as supportedRuntimes$1, et as defaultDeviceFor$1, fn as errMsg, h as DEFAULT_CLUSTER_STEP_SETTINGS, it as detectionPipelineCapability, mn as BaseAddon, n as APPLE_SA_TO_MACRO, st as enumerateInferenceDevices, vn as createEvent, y as DEVICE_BACKEND_TO_FORMAT } from "../dist-
|
|
3
|
-
import { s as readProcessCost } from "../node-
|
|
4
|
-
import { S as resolveModelDefaultConfidence, _ as getStep, a as buildSubtreeCanRun, c as macroGateVerdict, g as getDefaultModelForFormat, h as ALL_STEPS, i as mergeCustomModels, m as ALL_PIPELINE_STEPS, n as resolveDefaultDetectionModel, r as CustomModelCatalog, u as localFrameRegistry, v as getStepDefinition, x as landmarkPrecisionVerdict, y as resolveModelForFormat } from "../default-detection-model-
|
|
2
|
+
import { A as PoolMemoryWatchdog, An as sleep, At as overlayClusterStepSettings, Dn as parseJsonUnknown, En as nodePin, Ft as pipelineExecutorCapability, Hn as union, Ht as resolveClusterStepModelId, Jt as runtimeDevices$1, Kt as resolvePoolMemoryPolicy, Mn as array, Mt as pickClusterStepSettings, Rn as object, Sn as hydrateSchema, Un as EventCategory, V as YAMNET_TO_MACRO, Vn as string, Yt as stepModelRunsOnFormat, bt as loadContributionCapability, ct as evaluateZoneRules, d as CLUSTER_MODEL_SCOPED_STEPS, en as supportedRuntimes$1, et as defaultDeviceFor$1, fn as errMsg, h as DEFAULT_CLUSTER_STEP_SETTINGS, it as detectionPipelineCapability, mn as BaseAddon, n as APPLE_SA_TO_MACRO, st as enumerateInferenceDevices, vn as createEvent, y as DEVICE_BACKEND_TO_FORMAT } from "../dist-CYhfylbW.mjs";
|
|
3
|
+
import { s as readProcessCost } from "../node-KuSWIyX-.mjs";
|
|
4
|
+
import { S as resolveModelDefaultConfidence, _ as getStep, a as buildSubtreeCanRun, c as macroGateVerdict, g as getDefaultModelForFormat, h as ALL_STEPS, i as mergeCustomModels, m as ALL_PIPELINE_STEPS, n as resolveDefaultDetectionModel, r as CustomModelCatalog, u as localFrameRegistry, v as getStepDefinition, x as landmarkPrecisionVerdict, y as resolveModelForFormat } from "../default-detection-model-BbGqKJrb.mjs";
|
|
5
5
|
import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
|
|
6
|
-
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-
|
|
6
|
+
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-BArnBFK7.mjs";
|
|
7
7
|
import * as os from "node:os";
|
|
8
8
|
import * as fs from "node:fs";
|
|
9
9
|
import * as path$1 from "node:path";
|
|
@@ -5379,7 +5379,7 @@ var ZodIssueCode = {
|
|
|
5379
5379
|
var ZodFirstPartyTypeKind;
|
|
5380
5380
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5381
5381
|
//#endregion
|
|
5382
|
-
//#region ../types/dist/sleep-
|
|
5382
|
+
//#region ../types/dist/sleep-DXKLNFvA.mjs
|
|
5383
5383
|
/**
|
|
5384
5384
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5385
5385
|
* window to float samples (D455).
|
|
@@ -5719,6 +5719,43 @@ function hydrateField(field, values) {
|
|
|
5719
5719
|
}
|
|
5720
5720
|
const rawValue = storedValue !== void 0 ? storedValue : defaultValue !== void 0 ? defaultValue : null;
|
|
5721
5721
|
const value = field.type === "textarea" && field.isJson && rawValue !== null && typeof rawValue === "object" ? JSON.stringify(rawValue, null, 2) : rawValue;
|
|
5722
|
+
if (field.type === "tags" && typeof field.suggestionsFrom === "string") {
|
|
5723
|
+
const from = values[field.suggestionsFrom];
|
|
5724
|
+
const extra = Array.isArray(from) ? from.filter((s) => typeof s === "string" && s.length > 0) : [];
|
|
5725
|
+
const merged = [...new Set([...field.suggestions ?? [], ...extra])];
|
|
5726
|
+
return {
|
|
5727
|
+
...field,
|
|
5728
|
+
suggestions: merged,
|
|
5729
|
+
value
|
|
5730
|
+
};
|
|
5731
|
+
}
|
|
5732
|
+
if ((field.type === "select" || field.type === "multiselect") && typeof field.optionsFrom === "string") {
|
|
5733
|
+
const from = values[field.optionsFrom];
|
|
5734
|
+
const byValue = /* @__PURE__ */ new Map();
|
|
5735
|
+
for (const opt of field.options) byValue.set(opt.value, opt);
|
|
5736
|
+
if (Array.isArray(from)) for (const entry of from) {
|
|
5737
|
+
if (typeof entry === "string" && entry.length > 0) {
|
|
5738
|
+
if (!byValue.has(entry)) byValue.set(entry, {
|
|
5739
|
+
value: entry,
|
|
5740
|
+
label: entry
|
|
5741
|
+
});
|
|
5742
|
+
continue;
|
|
5743
|
+
}
|
|
5744
|
+
if (entry === null || typeof entry !== "object") continue;
|
|
5745
|
+
const v = Reflect.get(entry, "value");
|
|
5746
|
+
const lbl = Reflect.get(entry, "label");
|
|
5747
|
+
if (typeof v !== "string" || v.length === 0) continue;
|
|
5748
|
+
if (!byValue.has(v)) byValue.set(v, {
|
|
5749
|
+
value: v,
|
|
5750
|
+
label: typeof lbl === "string" && lbl.length > 0 ? lbl : v
|
|
5751
|
+
});
|
|
5752
|
+
}
|
|
5753
|
+
return {
|
|
5754
|
+
...field,
|
|
5755
|
+
options: [...byValue.values()],
|
|
5756
|
+
value
|
|
5757
|
+
};
|
|
5758
|
+
}
|
|
5722
5759
|
return {
|
|
5723
5760
|
...field,
|
|
5724
5761
|
value
|
|
@@ -20256,10 +20293,35 @@ var SendResultSchema = object({
|
|
|
20256
20293
|
});
|
|
20257
20294
|
/** Same shape as SendResult — kept as a distinct name for the test panel. */
|
|
20258
20295
|
var TestResultSchema = SendResultSchema;
|
|
20259
|
-
|
|
20296
|
+
/**
|
|
20297
|
+
* Pre-save credential probe against a partial (unsaved) target config.
|
|
20298
|
+
* `resolvedUrl` never includes secrets (token stripped from path).
|
|
20299
|
+
*/
|
|
20300
|
+
var ProbeTargetConfigResultSchema = object({
|
|
20301
|
+
ok: boolean(),
|
|
20302
|
+
resolvedUrl: string(),
|
|
20303
|
+
httpStatus: number().int().optional(),
|
|
20304
|
+
stateInstance: string().optional(),
|
|
20305
|
+
error: string().optional()
|
|
20306
|
+
});
|
|
20307
|
+
method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSchema), { auth: "admin" }), method(object({ targetId: string() }), TargetSchema, { auth: "admin" }), method(object({
|
|
20260
20308
|
kind: string(),
|
|
20261
|
-
config: record(string(), unknown()).optional()
|
|
20309
|
+
config: record(string(), unknown()).optional(),
|
|
20310
|
+
/**
|
|
20311
|
+
* When editing / duplicating, the blank password field never round-trips
|
|
20312
|
+
* the stored token. Pass the source target id so the provider can restore
|
|
20313
|
+
* secrets server-side before dialling (same merge as upsert).
|
|
20314
|
+
*/
|
|
20315
|
+
targetId: string().optional()
|
|
20262
20316
|
}), array(DiscoveredTargetSchema), { auth: "admin" }), method(object({
|
|
20317
|
+
kind: string(),
|
|
20318
|
+
config: record(string(), unknown()),
|
|
20319
|
+
/** See `discoverTargets.targetId` — restore stored secrets for a blank password. */
|
|
20320
|
+
targetId: string().optional()
|
|
20321
|
+
}), ProbeTargetConfigResultSchema, {
|
|
20322
|
+
kind: "mutation",
|
|
20323
|
+
auth: "admin"
|
|
20324
|
+
}), method(object({
|
|
20263
20325
|
targetId: string(),
|
|
20264
20326
|
notification: NotificationSchema
|
|
20265
20327
|
}), SendResultSchema, {
|
|
@@ -20271,7 +20333,16 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
|
|
|
20271
20333
|
}), TestResultSchema, {
|
|
20272
20334
|
kind: "mutation",
|
|
20273
20335
|
auth: "admin"
|
|
20274
|
-
}), method(object({
|
|
20336
|
+
}), method(object({
|
|
20337
|
+
target: TargetSchema,
|
|
20338
|
+
/**
|
|
20339
|
+
* Duplicate flow: create a NEW target id while copying secrets from an
|
|
20340
|
+
* existing row. The UI never holds the stored token; blank / redacted
|
|
20341
|
+
* password fields are restored from this source (D634 still applies if
|
|
20342
|
+
* destinations diverge without a re-typed secret).
|
|
20343
|
+
*/
|
|
20344
|
+
cloneSecretsFrom: string().optional()
|
|
20345
|
+
}), TargetSchema, {
|
|
20275
20346
|
kind: "mutation",
|
|
20276
20347
|
auth: "admin"
|
|
20277
20348
|
}), method(object({ targetId: string() }), _void(), {
|
|
@@ -21234,6 +21305,15 @@ var AlarmArmModeSchema = _enum([
|
|
|
21234
21305
|
object({
|
|
21235
21306
|
/** Current lifecycle state. */
|
|
21236
21307
|
state: AlarmStateSchema,
|
|
21308
|
+
/**
|
|
21309
|
+
* The arm mode the machine belongs to under transitional words
|
|
21310
|
+
* (`arming` / `pending` / `triggered` / `disarming`). `null` when
|
|
21311
|
+
* disarmed or when a provider cannot name one. Exporters MUST prefer
|
|
21312
|
+
* this over an in-process memo — a HomeKit accessory that missed the
|
|
21313
|
+
* settled `armed_*` slice used to map `pending` to DISARMED and hide
|
|
21314
|
+
* an entry delay.
|
|
21315
|
+
*/
|
|
21316
|
+
targetMode: AlarmArmModeSchema.nullable().optional(),
|
|
21237
21317
|
/** Subset of arm modes the panel accepts. UI renders one button per
|
|
21238
21318
|
* mode in this list. */
|
|
21239
21319
|
availableModes: array(AlarmArmModeSchema),
|
|
@@ -44081,6 +44161,12 @@ Object.freeze({
|
|
|
44081
44161
|
addonId: null,
|
|
44082
44162
|
access: "view"
|
|
44083
44163
|
},
|
|
44164
|
+
"notificationOutput.getTarget": {
|
|
44165
|
+
capName: "notification-output",
|
|
44166
|
+
capScope: "system",
|
|
44167
|
+
addonId: null,
|
|
44168
|
+
access: "view"
|
|
44169
|
+
},
|
|
44084
44170
|
"notificationOutput.listTargetKinds": {
|
|
44085
44171
|
capName: "notification-output",
|
|
44086
44172
|
capScope: "system",
|
|
@@ -44093,6 +44179,12 @@ Object.freeze({
|
|
|
44093
44179
|
addonId: null,
|
|
44094
44180
|
access: "view"
|
|
44095
44181
|
},
|
|
44182
|
+
"notificationOutput.probeTargetConfig": {
|
|
44183
|
+
capName: "notification-output",
|
|
44184
|
+
capScope: "system",
|
|
44185
|
+
addonId: null,
|
|
44186
|
+
access: "create"
|
|
44187
|
+
},
|
|
44096
44188
|
"notificationOutput.send": {
|
|
44097
44189
|
capName: "notification-output",
|
|
44098
44190
|
capScope: "system",
|
|
@@ -5379,7 +5379,7 @@ var ZodIssueCode = {
|
|
|
5379
5379
|
var ZodFirstPartyTypeKind;
|
|
5380
5380
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5381
5381
|
//#endregion
|
|
5382
|
-
//#region ../types/dist/sleep-
|
|
5382
|
+
//#region ../types/dist/sleep-DXKLNFvA.mjs
|
|
5383
5383
|
/**
|
|
5384
5384
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5385
5385
|
* window to float samples (D455).
|
|
@@ -5719,6 +5719,43 @@ function hydrateField(field, values) {
|
|
|
5719
5719
|
}
|
|
5720
5720
|
const rawValue = storedValue !== void 0 ? storedValue : defaultValue !== void 0 ? defaultValue : null;
|
|
5721
5721
|
const value = field.type === "textarea" && field.isJson && rawValue !== null && typeof rawValue === "object" ? JSON.stringify(rawValue, null, 2) : rawValue;
|
|
5722
|
+
if (field.type === "tags" && typeof field.suggestionsFrom === "string") {
|
|
5723
|
+
const from = values[field.suggestionsFrom];
|
|
5724
|
+
const extra = Array.isArray(from) ? from.filter((s) => typeof s === "string" && s.length > 0) : [];
|
|
5725
|
+
const merged = [...new Set([...field.suggestions ?? [], ...extra])];
|
|
5726
|
+
return {
|
|
5727
|
+
...field,
|
|
5728
|
+
suggestions: merged,
|
|
5729
|
+
value
|
|
5730
|
+
};
|
|
5731
|
+
}
|
|
5732
|
+
if ((field.type === "select" || field.type === "multiselect") && typeof field.optionsFrom === "string") {
|
|
5733
|
+
const from = values[field.optionsFrom];
|
|
5734
|
+
const byValue = /* @__PURE__ */ new Map();
|
|
5735
|
+
for (const opt of field.options) byValue.set(opt.value, opt);
|
|
5736
|
+
if (Array.isArray(from)) for (const entry of from) {
|
|
5737
|
+
if (typeof entry === "string" && entry.length > 0) {
|
|
5738
|
+
if (!byValue.has(entry)) byValue.set(entry, {
|
|
5739
|
+
value: entry,
|
|
5740
|
+
label: entry
|
|
5741
|
+
});
|
|
5742
|
+
continue;
|
|
5743
|
+
}
|
|
5744
|
+
if (entry === null || typeof entry !== "object") continue;
|
|
5745
|
+
const v = Reflect.get(entry, "value");
|
|
5746
|
+
const lbl = Reflect.get(entry, "label");
|
|
5747
|
+
if (typeof v !== "string" || v.length === 0) continue;
|
|
5748
|
+
if (!byValue.has(v)) byValue.set(v, {
|
|
5749
|
+
value: v,
|
|
5750
|
+
label: typeof lbl === "string" && lbl.length > 0 ? lbl : v
|
|
5751
|
+
});
|
|
5752
|
+
}
|
|
5753
|
+
return {
|
|
5754
|
+
...field,
|
|
5755
|
+
options: [...byValue.values()],
|
|
5756
|
+
value
|
|
5757
|
+
};
|
|
5758
|
+
}
|
|
5722
5759
|
return {
|
|
5723
5760
|
...field,
|
|
5724
5761
|
value
|
|
@@ -20256,10 +20293,35 @@ var SendResultSchema = object({
|
|
|
20256
20293
|
});
|
|
20257
20294
|
/** Same shape as SendResult — kept as a distinct name for the test panel. */
|
|
20258
20295
|
var TestResultSchema = SendResultSchema;
|
|
20259
|
-
|
|
20296
|
+
/**
|
|
20297
|
+
* Pre-save credential probe against a partial (unsaved) target config.
|
|
20298
|
+
* `resolvedUrl` never includes secrets (token stripped from path).
|
|
20299
|
+
*/
|
|
20300
|
+
var ProbeTargetConfigResultSchema = object({
|
|
20301
|
+
ok: boolean(),
|
|
20302
|
+
resolvedUrl: string(),
|
|
20303
|
+
httpStatus: number().int().optional(),
|
|
20304
|
+
stateInstance: string().optional(),
|
|
20305
|
+
error: string().optional()
|
|
20306
|
+
});
|
|
20307
|
+
method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSchema), { auth: "admin" }), method(object({ targetId: string() }), TargetSchema, { auth: "admin" }), method(object({
|
|
20260
20308
|
kind: string(),
|
|
20261
|
-
config: record(string(), unknown()).optional()
|
|
20309
|
+
config: record(string(), unknown()).optional(),
|
|
20310
|
+
/**
|
|
20311
|
+
* When editing / duplicating, the blank password field never round-trips
|
|
20312
|
+
* the stored token. Pass the source target id so the provider can restore
|
|
20313
|
+
* secrets server-side before dialling (same merge as upsert).
|
|
20314
|
+
*/
|
|
20315
|
+
targetId: string().optional()
|
|
20262
20316
|
}), array(DiscoveredTargetSchema), { auth: "admin" }), method(object({
|
|
20317
|
+
kind: string(),
|
|
20318
|
+
config: record(string(), unknown()),
|
|
20319
|
+
/** See `discoverTargets.targetId` — restore stored secrets for a blank password. */
|
|
20320
|
+
targetId: string().optional()
|
|
20321
|
+
}), ProbeTargetConfigResultSchema, {
|
|
20322
|
+
kind: "mutation",
|
|
20323
|
+
auth: "admin"
|
|
20324
|
+
}), method(object({
|
|
20263
20325
|
targetId: string(),
|
|
20264
20326
|
notification: NotificationSchema
|
|
20265
20327
|
}), SendResultSchema, {
|
|
@@ -20271,7 +20333,16 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
|
|
|
20271
20333
|
}), TestResultSchema, {
|
|
20272
20334
|
kind: "mutation",
|
|
20273
20335
|
auth: "admin"
|
|
20274
|
-
}), method(object({
|
|
20336
|
+
}), method(object({
|
|
20337
|
+
target: TargetSchema,
|
|
20338
|
+
/**
|
|
20339
|
+
* Duplicate flow: create a NEW target id while copying secrets from an
|
|
20340
|
+
* existing row. The UI never holds the stored token; blank / redacted
|
|
20341
|
+
* password fields are restored from this source (D634 still applies if
|
|
20342
|
+
* destinations diverge without a re-typed secret).
|
|
20343
|
+
*/
|
|
20344
|
+
cloneSecretsFrom: string().optional()
|
|
20345
|
+
}), TargetSchema, {
|
|
20275
20346
|
kind: "mutation",
|
|
20276
20347
|
auth: "admin"
|
|
20277
20348
|
}), method(object({ targetId: string() }), _void(), {
|
|
@@ -21234,6 +21305,15 @@ var AlarmArmModeSchema = _enum([
|
|
|
21234
21305
|
object({
|
|
21235
21306
|
/** Current lifecycle state. */
|
|
21236
21307
|
state: AlarmStateSchema,
|
|
21308
|
+
/**
|
|
21309
|
+
* The arm mode the machine belongs to under transitional words
|
|
21310
|
+
* (`arming` / `pending` / `triggered` / `disarming`). `null` when
|
|
21311
|
+
* disarmed or when a provider cannot name one. Exporters MUST prefer
|
|
21312
|
+
* this over an in-process memo — a HomeKit accessory that missed the
|
|
21313
|
+
* settled `armed_*` slice used to map `pending` to DISARMED and hide
|
|
21314
|
+
* an entry delay.
|
|
21315
|
+
*/
|
|
21316
|
+
targetMode: AlarmArmModeSchema.nullable().optional(),
|
|
21237
21317
|
/** Subset of arm modes the panel accepts. UI renders one button per
|
|
21238
21318
|
* mode in this list. */
|
|
21239
21319
|
availableModes: array(AlarmArmModeSchema),
|
|
@@ -44081,6 +44161,12 @@ Object.freeze({
|
|
|
44081
44161
|
addonId: null,
|
|
44082
44162
|
access: "view"
|
|
44083
44163
|
},
|
|
44164
|
+
"notificationOutput.getTarget": {
|
|
44165
|
+
capName: "notification-output",
|
|
44166
|
+
capScope: "system",
|
|
44167
|
+
addonId: null,
|
|
44168
|
+
access: "view"
|
|
44169
|
+
},
|
|
44084
44170
|
"notificationOutput.listTargetKinds": {
|
|
44085
44171
|
capName: "notification-output",
|
|
44086
44172
|
capScope: "system",
|
|
@@ -44093,6 +44179,12 @@ Object.freeze({
|
|
|
44093
44179
|
addonId: null,
|
|
44094
44180
|
access: "view"
|
|
44095
44181
|
},
|
|
44182
|
+
"notificationOutput.probeTargetConfig": {
|
|
44183
|
+
capName: "notification-output",
|
|
44184
|
+
capScope: "system",
|
|
44185
|
+
addonId: null,
|
|
44186
|
+
access: "create"
|
|
44187
|
+
},
|
|
44096
44188
|
"notificationOutput.send": {
|
|
44097
44189
|
capName: "notification-output",
|
|
44098
44190
|
capScope: "system",
|
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_dist = require("../dist-
|
|
5
|
+
const require_dist = require("../dist-BHwYsqDW.js");
|
|
6
6
|
const require_lazy_sharp = require("../lazy-sharp-BuwKlQLR.js");
|
|
7
7
|
let node_fs = require("node:fs");
|
|
8
8
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Sn as hydrateSchema, ct as evaluateZoneRules, dn as DeviceType, kt as motionDetectionCapability, mn as BaseAddon } from "../dist-
|
|
1
|
+
import { Sn as hydrateSchema, ct as evaluateZoneRules, dn as DeviceType, kt as motionDetectionCapability, mn as BaseAddon } from "../dist-CYhfylbW.mjs";
|
|
2
2
|
import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
|
|
3
3
|
import { readFileSync } from "node:fs";
|
|
4
4
|
import { join } from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-emK7D4bc.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-BHwYsqDW.js");
|
|
3
3
|
let node_crypto = require("node:crypto");
|
|
4
4
|
let node_fs = require("node:fs");
|
|
5
5
|
node_fs = require_chunk.__toESM(node_fs, 1);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { an as Fmp4BoxSplitter, fn as errMsg, ln as isSoftwareDecode, on as buildFfmpegArgs } from "./dist-
|
|
1
|
+
import { an as Fmp4BoxSplitter, fn as errMsg, ln as isSoftwareDecode, on as buildFfmpegArgs } from "./dist-CYhfylbW.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { realpathSync } from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
@@ -3,9 +3,9 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../chunk-emK7D4bc.js");
|
|
6
|
-
const require_dist = require("../dist-
|
|
7
|
-
const require_node = require("../node-
|
|
8
|
-
const require_default_detection_model = require("../default-detection-model-
|
|
6
|
+
const require_dist = require("../dist-BHwYsqDW.js");
|
|
7
|
+
const require_node = require("../node-BPEcDS3W.js");
|
|
8
|
+
const require_default_detection_model = require("../default-detection-model-3nybzgJM.js");
|
|
9
9
|
const require_hub_hostname = require("../hub-hostname-DAJXlOgV.js");
|
|
10
10
|
const require_lazy_sharp = require("../lazy-sharp-BuwKlQLR.js");
|
|
11
11
|
const require_restream_intent = require("../restream-intent-7uDNqMKs.js");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { D as NativeLeaseAdmissionSchema, En as nodePin, Fn as lazy, In as literal, It as pipelineRunnerCapability, Ln as number, Mn as array, Nn as boolean, Nt as pickDetailCropConvention, O as NativeLeaseSettingsSchema, Pt as pickNativeLeaseOverride, Rn as object, Un as EventCategory, Vn as string, a as BackgroundRunRegistry, bn as defineCustomActions, bt as loadContributionCapability, fn as errMsg, ft as failureContributionCapability, g as DEFAULT_DETAIL_CROP_CONVENTION, jn as _enum, mn as BaseAddon, nt as deriveDetailCropRect, q as cameraOwnsMotionViaSensor, v as DEFAULT_NATIVE_LEASE_SETTINGS, vn as createEvent, w as FailureCounters, yn as customAction } from "../dist-
|
|
2
|
-
import { i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-
|
|
3
|
-
import { b as RETIRED_MODEL_IDS, c as macroGateVerdict, d as isSessionDecodeReadGone, f as createSessionDecodeCoordinator, l as rootObjectGate, o as placeDetailStep, p as resolveFrameViewGeometry, r as CustomModelCatalog, s as stepsForElectedPool, u as localFrameRegistry, v as getStepDefinition } from "../default-detection-model-
|
|
1
|
+
import { D as NativeLeaseAdmissionSchema, En as nodePin, Fn as lazy, In as literal, It as pipelineRunnerCapability, Ln as number, Mn as array, Nn as boolean, Nt as pickDetailCropConvention, O as NativeLeaseSettingsSchema, Pt as pickNativeLeaseOverride, Rn as object, Un as EventCategory, Vn as string, a as BackgroundRunRegistry, bn as defineCustomActions, bt as loadContributionCapability, fn as errMsg, ft as failureContributionCapability, g as DEFAULT_DETAIL_CROP_CONVENTION, jn as _enum, mn as BaseAddon, nt as deriveDetailCropRect, q as cameraOwnsMotionViaSensor, v as DEFAULT_NATIVE_LEASE_SETTINGS, vn as createEvent, w as FailureCounters, yn as customAction } from "../dist-CYhfylbW.mjs";
|
|
2
|
+
import { i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-KuSWIyX-.mjs";
|
|
3
|
+
import { b as RETIRED_MODEL_IDS, c as macroGateVerdict, d as isSessionDecodeReadGone, f as createSessionDecodeCoordinator, l as rootObjectGate, o as placeDetailStep, p as resolveFrameViewGeometry, r as CustomModelCatalog, s as stepsForElectedPool, u as localFrameRegistry, v as getStepDefinition } from "../default-detection-model-BbGqKJrb.mjs";
|
|
4
4
|
import { t as resolveHubHostname } from "../hub-hostname-cCknRYKj.mjs";
|
|
5
5
|
import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
|
|
6
6
|
import { c as withDetectionIntent, o as preRollRequestOf, t as DETECTION_PRE_ROLL_REQUEST_MS } from "../restream-intent-DyGmLAU9.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-emK7D4bc.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-BHwYsqDW.js");
|
|
3
3
|
let node_fs = require("node:fs");
|
|
4
4
|
node_fs = require_chunk.__toESM(node_fs);
|
|
5
5
|
let node_child_process = require("node:child_process");
|
package/dist/recorder/index.js
CHANGED
|
@@ -3,8 +3,8 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../chunk-emK7D4bc.js");
|
|
6
|
-
const require_dist = require("../dist-
|
|
7
|
-
const require_node = require("../node-
|
|
6
|
+
const require_dist = require("../dist-BHwYsqDW.js");
|
|
7
|
+
const require_node = require("../node-BPEcDS3W.js");
|
|
8
8
|
const require_hub_hostname = require("../hub-hostname-DAJXlOgV.js");
|
|
9
9
|
const require_restream_intent = require("../restream-intent-7uDNqMKs.js");
|
|
10
10
|
const require_retire_root_keys = require("../retire-root-keys-Csb8z2f3.js");
|
|
@@ -7964,6 +7964,127 @@ async function reconcileInterruptedExports(deps) {
|
|
|
7964
7964
|
};
|
|
7965
7965
|
}
|
|
7966
7966
|
//#endregion
|
|
7967
|
+
//#region src/recorder/addon/export-shrink-for-read.ts
|
|
7968
|
+
/**
|
|
7969
|
+
* Shrink a rendered export so `readExportBytes` can answer under
|
|
7970
|
+
* {@link RECORDING_EXPORT_MAX_READ_BYTES}.
|
|
7971
|
+
*
|
|
7972
|
+
* A ten-hour overnight timelapse with dense slowdown routinely lands at
|
|
7973
|
+
* 80–200 MB. The byte-read ceiling is the roomiest notifier cap (Telegram
|
|
7974
|
+
* 50 MB) AND the base64 envelope bound (D9/D18) — raising it would OOM the
|
|
7975
|
+
* hub and still be refused by the notifier. So the read shrinks, once, into
|
|
7976
|
+
* a temp file sized for delivery, and the original render stays on disk for
|
|
7977
|
+
* the authenticated tap-through.
|
|
7978
|
+
*
|
|
7979
|
+
* Pure argv builders here; the spawn and temp I/O are injected by the
|
|
7980
|
+
* provider so the suite never needs a real ffmpeg.
|
|
7981
|
+
*/
|
|
7982
|
+
/** CRF ladder tried until the output fits. Higher = smaller, uglier. */
|
|
7983
|
+
var EXPORT_SHRINK_CRF_LADDER = [
|
|
7984
|
+
28,
|
|
7985
|
+
32,
|
|
7986
|
+
36,
|
|
7987
|
+
40
|
|
7988
|
+
];
|
|
7989
|
+
/**
|
|
7990
|
+
* ffmpeg argv that re-encodes a rendered MP4 for notification delivery.
|
|
7991
|
+
*
|
|
7992
|
+
* - `libx264` + `veryfast`: the morning drain must not pin the hub the way
|
|
7993
|
+
* the original night render did.
|
|
7994
|
+
* - `-an`: a timelapse has no audio worth keeping, and dropping it is free
|
|
7995
|
+
* size.
|
|
7996
|
+
* - `640:-2`: notification phones; matching the band the cheapest profile
|
|
7997
|
+
* already aims for.
|
|
7998
|
+
* - `+faststart`: the artifact plane serves the whole file; moov-first is
|
|
7999
|
+
* what a phone needs to start playing before the download finishes.
|
|
8000
|
+
*/
|
|
8001
|
+
function buildExportShrinkArgs(input) {
|
|
8002
|
+
return [
|
|
8003
|
+
"-hide_banner",
|
|
8004
|
+
"-loglevel",
|
|
8005
|
+
"error",
|
|
8006
|
+
"-y",
|
|
8007
|
+
"-i",
|
|
8008
|
+
input.inputPath,
|
|
8009
|
+
"-vf",
|
|
8010
|
+
"scale=640:-2",
|
|
8011
|
+
"-c:v",
|
|
8012
|
+
"libx264",
|
|
8013
|
+
"-preset",
|
|
8014
|
+
"veryfast",
|
|
8015
|
+
"-crf",
|
|
8016
|
+
String(input.crf),
|
|
8017
|
+
"-an",
|
|
8018
|
+
"-movflags",
|
|
8019
|
+
"+faststart",
|
|
8020
|
+
input.outputPath
|
|
8021
|
+
];
|
|
8022
|
+
}
|
|
8023
|
+
/**
|
|
8024
|
+
* Pick the next CRF to try, or `null` when the ladder is exhausted.
|
|
8025
|
+
*
|
|
8026
|
+
* @param attempted — CRFs already tried (may be empty).
|
|
8027
|
+
*/
|
|
8028
|
+
function nextShrinkCrf(attempted) {
|
|
8029
|
+
for (const crf of EXPORT_SHRINK_CRF_LADDER) if (!attempted.includes(crf)) return crf;
|
|
8030
|
+
return null;
|
|
8031
|
+
}
|
|
8032
|
+
/**
|
|
8033
|
+
* Re-encode `inputPath` down the CRF ladder until the file is ≤ `maxBytes`.
|
|
8034
|
+
*
|
|
8035
|
+
* @returns the fitted buffer, or `null` when every rung still overflows (or
|
|
8036
|
+
* ffmpeg refuses). Never throws — the caller treats `null` as "refuse
|
|
8037
|
+
* the inline read", same as the historical oversized gate.
|
|
8038
|
+
*/
|
|
8039
|
+
async function shrinkExportToBound(inputPath, maxBytes, ports) {
|
|
8040
|
+
const attempted = [];
|
|
8041
|
+
for (;;) {
|
|
8042
|
+
const crf = nextShrinkCrf(attempted);
|
|
8043
|
+
if (crf === null) return null;
|
|
8044
|
+
attempted.push(crf);
|
|
8045
|
+
const outPath = `${ports.writePath}.crf${String(crf)}.mp4`;
|
|
8046
|
+
try {
|
|
8047
|
+
const ffmpeg = await ports.resolveFfmpeg();
|
|
8048
|
+
await runShrinkFfmpeg(ports.spawn, ffmpeg, buildExportShrinkArgs({
|
|
8049
|
+
inputPath,
|
|
8050
|
+
outputPath: outPath,
|
|
8051
|
+
crf
|
|
8052
|
+
}));
|
|
8053
|
+
if (await ports.statBytes(outPath) > maxBytes) {
|
|
8054
|
+
await ports.removeFile(outPath);
|
|
8055
|
+
continue;
|
|
8056
|
+
}
|
|
8057
|
+
const buf = await ports.readFile(outPath);
|
|
8058
|
+
await ports.removeFile(outPath);
|
|
8059
|
+
return buf;
|
|
8060
|
+
} catch {
|
|
8061
|
+
await ports.removeFile(outPath).catch(() => void 0);
|
|
8062
|
+
continue;
|
|
8063
|
+
}
|
|
8064
|
+
}
|
|
8065
|
+
}
|
|
8066
|
+
function runShrinkFfmpeg(spawn, ffmpegPath, args) {
|
|
8067
|
+
return new Promise((resolve, reject) => {
|
|
8068
|
+
const proc = spawn(ffmpegPath, args);
|
|
8069
|
+
let stderr = "";
|
|
8070
|
+
proc.stderr?.on("data", (chunk) => {
|
|
8071
|
+
stderr += chunk.toString("utf8");
|
|
8072
|
+
});
|
|
8073
|
+
proc.on("error", (...args) => {
|
|
8074
|
+
const err = args[0];
|
|
8075
|
+
reject(err instanceof Error ? err : new Error(String(err)));
|
|
8076
|
+
});
|
|
8077
|
+
proc.on("close", (...args) => {
|
|
8078
|
+
const code = args[0];
|
|
8079
|
+
if (code === 0) {
|
|
8080
|
+
resolve();
|
|
8081
|
+
return;
|
|
8082
|
+
}
|
|
8083
|
+
reject(/* @__PURE__ */ new Error(`export shrink ffmpeg exited ${String(code)}: ${stderr.slice(0, 400)}`));
|
|
8084
|
+
});
|
|
8085
|
+
});
|
|
8086
|
+
}
|
|
8087
|
+
//#endregion
|
|
7967
8088
|
//#region src/recorder/playlist.ts
|
|
7968
8089
|
/** A VOD variant playlist with an absolute wall-clock anchor per segment. */
|
|
7969
8090
|
function buildVariantPlaylist(segments) {
|
|
@@ -18301,6 +18422,47 @@ function buildRecordingExportProvider(deps) {
|
|
|
18301
18422
|
throw new Error(`recording-export: export "${exportId}" has no file on disk`, { cause: err });
|
|
18302
18423
|
}
|
|
18303
18424
|
if (size > 52428800) {
|
|
18425
|
+
const shrink = deps.shrinkToBound;
|
|
18426
|
+
if (shrink !== void 0) {
|
|
18427
|
+
deps.logger.info("export byte read: shrinking oversized file for inline delivery", {
|
|
18428
|
+
tags,
|
|
18429
|
+
meta: {
|
|
18430
|
+
exportId,
|
|
18431
|
+
bytes: size,
|
|
18432
|
+
maxBytes: require_dist.RECORDING_EXPORT_MAX_READ_BYTES
|
|
18433
|
+
}
|
|
18434
|
+
});
|
|
18435
|
+
const shrunk = await shrink(file, require_dist.RECORDING_EXPORT_MAX_READ_BYTES);
|
|
18436
|
+
if (shrunk !== null && shrunk.byteLength <= 52428800) {
|
|
18437
|
+
deps.logger.info("export byte read: shrink fitted under the inline ceiling", {
|
|
18438
|
+
tags,
|
|
18439
|
+
meta: {
|
|
18440
|
+
exportId,
|
|
18441
|
+
originalBytes: size,
|
|
18442
|
+
bytes: shrunk.byteLength,
|
|
18443
|
+
maxBytes: require_dist.RECORDING_EXPORT_MAX_READ_BYTES
|
|
18444
|
+
}
|
|
18445
|
+
});
|
|
18446
|
+
return {
|
|
18447
|
+
base64: shrunk.toString("base64"),
|
|
18448
|
+
contentType: EXPORT_CONTENT_TYPE,
|
|
18449
|
+
name: exportFileName({
|
|
18450
|
+
id: rec.id,
|
|
18451
|
+
...rec.options.title !== void 0 ? { title: rec.options.title } : {}
|
|
18452
|
+
}),
|
|
18453
|
+
bytes: shrunk.byteLength
|
|
18454
|
+
};
|
|
18455
|
+
}
|
|
18456
|
+
deps.logger.warn("export byte read: shrink could not fit under the inline ceiling", {
|
|
18457
|
+
tags,
|
|
18458
|
+
meta: {
|
|
18459
|
+
exportId,
|
|
18460
|
+
originalBytes: size,
|
|
18461
|
+
shrunkBytes: shrunk?.byteLength ?? null,
|
|
18462
|
+
maxBytes: require_dist.RECORDING_EXPORT_MAX_READ_BYTES
|
|
18463
|
+
}
|
|
18464
|
+
});
|
|
18465
|
+
}
|
|
18304
18466
|
deps.logger.warn("export byte read refused: file is too large to inline", {
|
|
18305
18467
|
tags,
|
|
18306
18468
|
meta: {
|
|
@@ -21820,6 +21982,20 @@ var RecorderV2Addon = class extends require_dist.BaseAddon {
|
|
|
21820
21982
|
downloadUrlFor: (id) => `/addon/${RECORDER_ADDON_ID}/${EXPORTS_PREFIX}/${id}.mp4`,
|
|
21821
21983
|
statBytes: async (p) => (await node_fs.promises.stat(p)).size,
|
|
21822
21984
|
readFile: (p) => node_fs.promises.readFile(p),
|
|
21985
|
+
shrinkToBound: async (inputPath, maxBytes) => {
|
|
21986
|
+
const writePath = node_path.default.join(this.exportsDirOrThrow(), ".shrink", `${node_path.default.basename(inputPath, ".mp4")}-${(0, node_crypto.randomUUID)()}`);
|
|
21987
|
+
await node_fs.promises.mkdir(node_path.default.dirname(writePath), { recursive: true });
|
|
21988
|
+
return shrinkExportToBound(inputPath, maxBytes, {
|
|
21989
|
+
resolveFfmpeg: this.pinnedFfmpeg,
|
|
21990
|
+
spawn: node_child_process.spawn,
|
|
21991
|
+
writePath,
|
|
21992
|
+
readFile: (p) => node_fs.promises.readFile(p),
|
|
21993
|
+
removeFile: async (p) => {
|
|
21994
|
+
await node_fs.promises.rm(p, { force: true });
|
|
21995
|
+
},
|
|
21996
|
+
statBytes: async (p) => (await node_fs.promises.stat(p)).size
|
|
21997
|
+
});
|
|
21998
|
+
},
|
|
21823
21999
|
logger: this.ctx.logger.child("export")
|
|
21824
22000
|
});
|
|
21825
22001
|
try {
|