@camstack/types 1.2.354 → 1.2.355
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/addon.d.ts +2 -1
- package/dist/addon.js +3 -1
- package/dist/addon.mjs +2 -2
- package/dist/index.js +2 -77
- package/dist/index.mjs +1 -76
- package/dist/{sleep-Tkp9dHXv.mjs → sleep-BjDbnx6-.mjs} +76 -1
- package/dist/{sleep-SgkKj2bk.js → sleep-BxOWTkUD.js} +81 -0
- package/package.json +1 -1
package/dist/addon.d.ts
CHANGED
|
@@ -40,10 +40,11 @@ export type { SliceEventBus, SliceHandleApi } from './device/device-state-handle
|
|
|
40
40
|
export { DEVICE_SCOPED_CAPS, isDeviceScopedCap } from './generated/device-scoped-caps.js';
|
|
41
41
|
export type { AddonDeclaration, AddonInitResult, ICamstackAddon, ProviderRegistration, } from './interfaces/addon.js';
|
|
42
42
|
export { DATAPLANE_SECRET_HEADER } from './interfaces/addon-data-plane.js';
|
|
43
|
-
export { emitReadiness } from './interfaces/event-bus.js';
|
|
43
|
+
export { createEvent, emitReadiness } from './interfaces/event-bus.js';
|
|
44
44
|
export { ReadinessRegistry, ReadinessTimeoutError, scopeKey, } from './readiness/readiness-registry.js';
|
|
45
45
|
export { BOOT_RECOVERY_BACKOFF_MS } from './util/boot-recovery-backoff.js';
|
|
46
46
|
export { errMsg } from './utils/err-msg.js';
|
|
47
|
+
export { maskUrlCredentials } from './utils/mask-url.js';
|
|
47
48
|
export { asJsonObject, asString, parseJsonUnknown } from './utils/json-safe.js';
|
|
48
49
|
export { sleep } from './utils/sleep.js';
|
|
49
50
|
export * from './keychain/index.js';
|
package/dist/addon.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sleep = require("./sleep-
|
|
2
|
+
const require_sleep = require("./sleep-BxOWTkUD.js");
|
|
3
3
|
const require_event_category = require("./event-category-T43rdQWR.js");
|
|
4
4
|
const require_err_msg = require("./err-msg-Dx2Kor0g.js");
|
|
5
5
|
//#region src/generated/cap-input-defaults.ts
|
|
@@ -458,6 +458,7 @@ exports.classifySecretWrite = require_sleep.classifySecretWrite;
|
|
|
458
458
|
exports.clearKnownSecrets = require_sleep.clearKnownSecrets;
|
|
459
459
|
exports.collectZodSecretPaths = require_sleep.collectZodSecretPaths;
|
|
460
460
|
exports.createDeviceProxy = require_sleep.createDeviceProxy;
|
|
461
|
+
exports.createEvent = require_sleep.createEvent;
|
|
461
462
|
exports.createEventBusSliceSource = require_sleep.createEventBusSliceSource;
|
|
462
463
|
exports.createSecretsAccess = require_sleep.createSecretsAccess;
|
|
463
464
|
exports.describeCustomActions = require_sleep.describeCustomActions;
|
|
@@ -479,6 +480,7 @@ exports.isSecretRef = require_sleep.isSecretRef;
|
|
|
479
480
|
exports.isZodSecret = require_sleep.isZodSecret;
|
|
480
481
|
exports.knownSecretCount = require_sleep.knownSecretCount;
|
|
481
482
|
exports.makeSecretMarker = require_sleep.makeSecretMarker;
|
|
483
|
+
exports.maskUrlCredentials = require_sleep.maskUrlCredentials;
|
|
482
484
|
exports.nodePin = require_sleep.nodePin;
|
|
483
485
|
exports.normalizeAddonInitResult = require_sleep.normalizeAddonInitResult;
|
|
484
486
|
exports.normalizeSecretOwner = require_sleep.normalizeSecretOwner;
|
package/dist/addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $t as
|
|
1
|
+
import { $t as isSecretRef, At as PEER_BYTES_CHUNK_BYTES, Ct as MIN_SCRUBBED_LENGTH, Dt as registerKnownSecret, E as DEVICE_CHILDREN_BATCH_MAX, Et as knownSecretCount, Ft as DATAPLANE_SECRET_HEADER, G as readNodePin, J as ReadinessTimeoutError, Jt as SECRET_REF_SCHEME, L as expandCapMethods, Lt as DisposerChain, Mt as PEER_BYTES_STALL_MS, Nt as PEER_BYTES_TICKET_TTL_MS, Ot as scrubKnownSecrets, Qt as globalSecretScope, Rt as BaseAddon, S as isZodSecret, St as createSecretsAccess, T as viewerUiCapability, Tt as forgetKnownSecret, W as nodePin, Xt as buildSecretRef, Yt as arrayItemFieldPath, Z as scopeKey, Zt as formatSecretScope, _n as isSecretMarker, an as emitReadiness, bn as toSecretFieldView, bt as resolveSecretViewsIn, c as asString, d as parseJsonUnknown, en as normalizeSecretOwner, f as BOOT_RECOVERY_BACKOFF_MS, g as createEventBusSliceSource, gn as isSecretFieldView, h as createDeviceProxy, hn as isSecretClear, in as createEvent, j as adminUiCapability, jt as PEER_BYTES_MAX_OUTSTANDING, k as describeCustomActions, kt as shortSecretRefHash, m as isDeviceScopedCap, mn as classifySecretWrite, o as asJsonObject, p as DEVICE_SCOPED_CAPS, pn as SECRET_CLEAR, q as ReadinessRegistry, r as maskUrlCredentials, t as sleep, tn as parseSecretRef, vn as isSecretMarkerLike, w as deviceOpsCapability, wt as clearKnownSecrets, x as collectZodSecretPaths, xt as REVALIDATE_AFTER_MS, yn as makeSecretMarker, zt as normalizeAddonInitResult } from "./sleep-BjDbnx6-.mjs";
|
|
2
2
|
import { t as EventCategory } from "./event-category-C4hVnRo8.mjs";
|
|
3
3
|
import { a as DeviceType, t as errMsg } from "./err-msg-DX6i_MY4.mjs";
|
|
4
4
|
//#region src/generated/cap-input-defaults.ts
|
|
@@ -427,4 +427,4 @@ function isProviderOptionalMethodName(capName, method) {
|
|
|
427
427
|
return methods !== void 0 && methods.includes(method);
|
|
428
428
|
}
|
|
429
429
|
//#endregion
|
|
430
|
-
export { BOOT_RECOVERY_BACKOFF_MS, BaseAddon, CAP_INPUT_DEFAULTS, COLLECTION_ARRAY_METHODS, DATAPLANE_SECRET_HEADER, DEVICE_CHILDREN_BATCH_MAX, DEVICE_SCOPED_CAPS, DeviceType, DisposerChain, EventCategory, MIN_SCRUBBED_LENGTH, PEER_BYTES_CHUNK_BYTES, PEER_BYTES_MAX_OUTSTANDING, PEER_BYTES_STALL_MS, PEER_BYTES_TICKET_TTL_MS, PROVIDER_OPTIONAL_METHODS, REVALIDATE_AFTER_MS, ReadinessRegistry, ReadinessTimeoutError, SECRET_CLEAR, SECRET_REF_SCHEME, adminUiCapability, arrayItemFieldPath, asJsonObject, asString, buildSecretRef, classifySecretWrite, clearKnownSecrets, collectZodSecretPaths, createDeviceProxy, createEventBusSliceSource, createSecretsAccess, describeCustomActions, deviceOpsCapability, emitReadiness, errMsg, expandCapMethods, forgetKnownSecret, formatSecretScope, globalSecretScope, isCollectionArrayMethodName, isDeviceScopedCap, isProviderOptionalMethodName, isSecretClear, isSecretFieldView, isSecretMarker, isSecretMarkerLike, isSecretRef, isZodSecret, knownSecretCount, makeSecretMarker, nodePin, normalizeAddonInitResult, normalizeSecretOwner, parseJsonUnknown, parseSecretRef, readNodePin, registerKnownSecret, resolveSecretViewsIn, scopeKey, scrubKnownSecrets, shortSecretRefHash, sleep, toSecretFieldView, viewerUiCapability, withCapInputDefaults };
|
|
430
|
+
export { BOOT_RECOVERY_BACKOFF_MS, BaseAddon, CAP_INPUT_DEFAULTS, COLLECTION_ARRAY_METHODS, DATAPLANE_SECRET_HEADER, DEVICE_CHILDREN_BATCH_MAX, DEVICE_SCOPED_CAPS, DeviceType, DisposerChain, EventCategory, MIN_SCRUBBED_LENGTH, PEER_BYTES_CHUNK_BYTES, PEER_BYTES_MAX_OUTSTANDING, PEER_BYTES_STALL_MS, PEER_BYTES_TICKET_TTL_MS, PROVIDER_OPTIONAL_METHODS, REVALIDATE_AFTER_MS, ReadinessRegistry, ReadinessTimeoutError, SECRET_CLEAR, SECRET_REF_SCHEME, adminUiCapability, arrayItemFieldPath, asJsonObject, asString, buildSecretRef, classifySecretWrite, clearKnownSecrets, collectZodSecretPaths, createDeviceProxy, createEvent, createEventBusSliceSource, createSecretsAccess, describeCustomActions, deviceOpsCapability, emitReadiness, errMsg, expandCapMethods, forgetKnownSecret, formatSecretScope, globalSecretScope, isCollectionArrayMethodName, isDeviceScopedCap, isProviderOptionalMethodName, isSecretClear, isSecretFieldView, isSecretMarker, isSecretMarkerLike, isSecretRef, isZodSecret, knownSecretCount, makeSecretMarker, maskUrlCredentials, nodePin, normalizeAddonInitResult, normalizeSecretOwner, parseJsonUnknown, parseSecretRef, readNodePin, registerKnownSecret, resolveSecretViewsIn, scopeKey, scrubKnownSecrets, shortSecretRefHash, sleep, toSecretFieldView, viewerUiCapability, withCapInputDefaults };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sleep = require("./sleep-
|
|
2
|
+
const require_sleep = require("./sleep-BxOWTkUD.js");
|
|
3
3
|
const require_event_category = require("./event-category-T43rdQWR.js");
|
|
4
4
|
const require_composition = require("./composition-BLWAivB2.js");
|
|
5
5
|
const require_node_color = require("./node-color.js");
|
|
@@ -78352,81 +78352,6 @@ function hfModelUrl(repo, path) {
|
|
|
78352
78352
|
return `https://huggingface.co/${repo}/resolve/main/${path}`;
|
|
78353
78353
|
}
|
|
78354
78354
|
//#endregion
|
|
78355
|
-
//#region src/utils/mask-url.ts
|
|
78356
|
-
/**
|
|
78357
|
-
* Names that, when used as URL query parameters, almost certainly carry
|
|
78358
|
-
* a secret. Matching is case-insensitive and anchored to the full param
|
|
78359
|
-
* name to avoid false positives like `user_id` (an entity reference, not
|
|
78360
|
-
* a credential) or `topic=password-reset` (a value happens to contain
|
|
78361
|
-
* the substring "password" but the param name is unrelated).
|
|
78362
|
-
*
|
|
78363
|
-
* Add new patterns here as we encounter cameras/APIs that leak through
|
|
78364
|
-
* the existing list.
|
|
78365
|
-
*/
|
|
78366
|
-
var CREDENTIAL_PARAM_PATTERNS = [
|
|
78367
|
-
/^user$/i,
|
|
78368
|
-
/^usr$/i,
|
|
78369
|
-
/^username$/i,
|
|
78370
|
-
/^password$/i,
|
|
78371
|
-
/^pwd$/i,
|
|
78372
|
-
/^pass$/i,
|
|
78373
|
-
/^passwd$/i,
|
|
78374
|
-
/^secret$/i,
|
|
78375
|
-
/^token$/i,
|
|
78376
|
-
/^auth$/i,
|
|
78377
|
-
/^auth[_-]?token$/i,
|
|
78378
|
-
/^bearer$/i,
|
|
78379
|
-
/^api[_-]?key$/i,
|
|
78380
|
-
/^access[_-]?token$/i,
|
|
78381
|
-
/^refresh[_-]?token$/i,
|
|
78382
|
-
/^bridge$/i,
|
|
78383
|
-
/^code$/i,
|
|
78384
|
-
/^state$/i,
|
|
78385
|
-
/^challenge$/i,
|
|
78386
|
-
/^link$/i
|
|
78387
|
-
];
|
|
78388
|
-
function isCredentialParam(name) {
|
|
78389
|
-
return CREDENTIAL_PARAM_PATTERNS.some((re) => re.test(name));
|
|
78390
|
-
}
|
|
78391
|
-
/**
|
|
78392
|
-
* Redact secrets we may surface in logs or telemetry:
|
|
78393
|
-
* 1. `userinfo` (`user:password@host`) — the classic RTSP shape.
|
|
78394
|
-
* 2. Query-string credential params (`?user=...&password=...`) — the
|
|
78395
|
-
* Reolink RTMP shape and several HTTP-pushed-stream APIs.
|
|
78396
|
-
*
|
|
78397
|
-
* Returns the original string verbatim when the input is not a parseable
|
|
78398
|
-
* URL — a log helper must never throw. Param values are replaced with
|
|
78399
|
-
* `***` so an operator reading logs still sees WHICH credential was
|
|
78400
|
-
* present (useful for debugging "wrong password" issues) without
|
|
78401
|
-
* exposing the value.
|
|
78402
|
-
*
|
|
78403
|
-
* The credential-name match is case-insensitive but anchored to the
|
|
78404
|
-
* whole param name; values like `user_id=42` or `topic=password-reset`
|
|
78405
|
-
* are NOT masked (those are entity references, not credentials).
|
|
78406
|
-
*/
|
|
78407
|
-
function maskUrlCredentials(rawUrl) {
|
|
78408
|
-
if (rawUrl.startsWith("/") && !rawUrl.startsWith("//")) {
|
|
78409
|
-
const masked = maskUrlCredentials(`http://relative.invalid${rawUrl}`);
|
|
78410
|
-
return masked.startsWith("http://relative.invalid") ? masked.slice(23) : rawUrl;
|
|
78411
|
-
}
|
|
78412
|
-
try {
|
|
78413
|
-
const u = new URL(rawUrl);
|
|
78414
|
-
let touched = false;
|
|
78415
|
-
if (u.username || u.password) {
|
|
78416
|
-
u.username = "";
|
|
78417
|
-
u.password = "";
|
|
78418
|
-
touched = true;
|
|
78419
|
-
}
|
|
78420
|
-
for (const key of Array.from(u.searchParams.keys())) if (isCredentialParam(key)) {
|
|
78421
|
-
u.searchParams.set(key, "***");
|
|
78422
|
-
touched = true;
|
|
78423
|
-
}
|
|
78424
|
-
return touched ? u.toString() : rawUrl;
|
|
78425
|
-
} catch {
|
|
78426
|
-
return rawUrl;
|
|
78427
|
-
}
|
|
78428
|
-
}
|
|
78429
|
-
//#endregion
|
|
78430
78355
|
//#region src/utils/pool-memory-watchdog.ts
|
|
78431
78356
|
var MB = 1024 * 1024;
|
|
78432
78357
|
var DEFAULT_POOL_MEMORY_POLICY = {
|
|
@@ -81512,7 +81437,7 @@ exports.makeSourceBrokerId = require_sleep.makeSourceBrokerId;
|
|
|
81512
81437
|
exports.mapAudioLabelToMacro = mapAudioLabelToMacro;
|
|
81513
81438
|
exports.markdownToHtmlLite = markdownToHtmlLite;
|
|
81514
81439
|
exports.markdownToText = markdownToText;
|
|
81515
|
-
exports.maskUrlCredentials = maskUrlCredentials;
|
|
81440
|
+
exports.maskUrlCredentials = require_sleep.maskUrlCredentials;
|
|
81516
81441
|
exports.matchDoAction = matchDoAction;
|
|
81517
81442
|
exports.mayReadLocation = mayReadLocation;
|
|
81518
81443
|
exports.mayWriteToLocation = mayWriteToLocation;
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as AudioStreamPickSchema, $t as isSecretRef, A as deviceCustomAction, An as isAudioChunkFormat, At as PEER_BYTES_CHUNK_BYTES, B as optionalMethod, Bt as mergeSecretStatePaths, C as RawStateResultSchema, Cn as collectSecretConfigKeys, Ct as MIN_SCRUBBED_LENGTH, D as customAction, Dn as AUDIO_CHUNK_FORMATS, Dt as registerKnownSecret, E as DEVICE_CHILDREN_BATCH_MAX, En as schemaDeclaresAnyField, Et as knownSecretCount, F as PROVIDER_PIN_FIELD, Ft as DATAPLANE_SECRET_HEADER, G as readNodePin, Gt as collectSecretMarkerRefs, H as systemMethod, Ht as secretTreeFromPaths, I as event, It as SHARE_VIEW_KINDS, J as ReadinessTimeoutError, Jt as SECRET_REF_SCHEME, K as toNodeId, Kt as resolveSecretMarkers, L as expandCapMethods, Lt as DisposerChain, M as DEFAULT_RUNTIME_STATE_DURABILITY, Mt as PEER_BYTES_STALL_MS, N as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Nt as PEER_BYTES_TICKET_TTL_MS, O as defineCustomActions, On as audioChunkBytesPerSample, Ot as scrubKnownSecrets, P as DEVICE_STATUS_METHOD, Pt as PeerBytesTicketSchema, Q as AudioChunkFormatSchema, Qt as globalSecretScope, R as isDeviceConfigCap, Rt as BaseAddon, S as isZodSecret, Sn as collectKeychainStoredKeys, St as createSecretsAccess, T as viewerUiCapability, Tn as isSecretConfigField, Tt as forgetKnownSecret, U as CAP_NODE_PIN_CONTEXT_KEY, Ut as secretTreeFromSchema, V as resolveCapMount, Vt as parseSecretStatePath, W as nodePin, Wt as KeychainWriteRefusedError, X as readinessKey, Xt as buildSecretRef, Y as emitDownForOwnedCaps, Yt as arrayItemFieldPath, Z as scopeKey, Zt as formatSecretScope, _ as createLazyTrpcSource, _n as isSecretMarker, _t as makeSourceBrokerId, a as asJsonArray, an as emitReadiness, at as CamStreamResolutionSchema, b as SECRET_META, bn as toSecretFieldView, bt as resolveSecretViewsIn, c as asString, cn as WELL_KNOWN_TAB_MAP, ct as FrameHandleSchema, d as parseJsonUnknown, dn as hydrateSchema, dt as ProfileSlotStatusSchema, en as normalizeSecretOwner, et as BrokerStatsSchema, f as BOOT_RECOVERY_BACKOFF_MS, fn as resolveHydratedFieldValue, ft as StreamSourceEntrySchema, g as createEventBusSliceSource, gn as isSecretFieldView, gt as makeProfileBrokerId, h as createDeviceProxy, hn as isSecretClear, ht as SubscribeAudioChunksResultSchema, i as asBoolean, in as createEvent, it as CamStreamKindSchema, j as adminUiCapability, jt as PEER_BYTES_MAX_OUTSTANDING, k as describeCustomActions, kn as expandAudioChunkToF32le, kt as shortSecretRefHash, l as parseJsonArray, ln as collectHydratedFieldEntries, lt as ProfileRtspEntrySchema, m as isDeviceScopedCap, mn as classifySecretWrite, mt as SubscribeAudioChunksInputSchema, n as sleepCancellable, nn as normalizeNodeId, nt as CAM_PROFILE_ORDER, o as asJsonObject, on as isEvent, ot as CameraStreamSchema, p as DEVICE_SCOPED_CAPS, pn as SECRET_CLEAR, pt as StreamSourceSchema, q as ReadinessRegistry, qt as transformSecretWrite, r as maskUrlCredentials, rn as createDurableState, rt as CamProfileSchema, s as asNumber, sn as WELL_KNOWN_TABS, st as DecodedAudioChunkSchema, t as sleep, tn as parseSecretRef, tt as BrokerStatusSchema, u as parseJsonObject, un as collectHydratedFieldValues, ut as ProfileSlotSchema, v as createMirrorSource, vn as isSecretMarkerLike, vt as parseProfileBrokerId, w as deviceOpsCapability, wn as isKeychainStoredField, wt as clearKnownSecrets, x as collectZodSecretPaths, xn as REDACTED_SECRET, xt as REVALIDATE_AFTER_MS, y as createSliceHandle, yn as makeSecretMarker, yt as selectAssignedProfileSlots, z as method, zt as normalizeAddonInitResult } from "./sleep-BjDbnx6-.mjs";
|
|
2
2
|
import { i as publicEventCategories, n as OWNER_ONLY_EVENT_CATEGORIES, r as isOwnerOnlyEventCategory, t as EventCategory } from "./event-category-C4hVnRo8.mjs";
|
|
3
3
|
import { $ as MAX_EXPRESSION_AST_NODES, A as compositionFeatureEnabled, At as Fmp4BoxSplitter, B as createStatefulExpressionMemory, Bt as pickVideoEncoder, C as CompositionTargetSchema, Ct as FFMPEG_PATH_ENV, D as MAX_COMPOSITION_ITEMS, E as MAX_COMPOSITION_FIELDS_PER_FEATURE, F as featureFieldEntries, Ft as buildInputArgs, G as createExpressionScope, H as evaluateStatefulExpressionCall, I as featureSources, It as buildVideoArgs, J as compileExpressionSafe, K as evaluateAst, L as fieldReads, Lt as invocationFromEncodeProfile, M as compositionReadKey, Mt as audioPlanFromEncodeProfile, N as compositionSliceKey, Nt as buildAudioArgs, O as composedDeviceRef, P as compositionSourceKey, Pt as buildFfmpegArgs, Q as EXPRESSION_IDENTIFIER_RE, R as EXPRESSION_INJECTED_NOW, Rt as isSoftwareDecode, S as CompositionSourceRefSchema, St as sliceChangedAt, T as MAX_COMPOSITION_FEATURES, U as toExpressionValue, V as evaluateExpressionSource, Vt as resolveStreamMaps, W as validateExpressionSource, X as tokenize, Y as parseExpression, Z as EXPRESSION_COMPILE_CACHE_CAPACITY, _ as CompositionItemEntrySchema, _t as SOURCE_DEVICE_TYPES, a as CUSTOMIZATION_BLOCK_NAME_PREFIX, at as EXPRESSION_BUILTINS, b as CompositionPassthroughFeatureSchema, bt as isSourceCap, c as CompositionCommandTargetSchema, ct as evaluateCount, d as CompositionFeatureSchema, dt as ExpressionEvalError, et as MAX_EXPRESSION_BINDINGS, f as CompositionFieldReadSchema, ft as ExpressionParseError, g as CompositionFromSourceSchema, gt as SOURCE_CAP_CHANGED_AT_FIELD, h as CompositionForwardCommandSchema, ht as SOURCE_CAP_ACTIVE_FIELD, i as COMPOSITION_ITEM_KEY_RE, it as RESERVED_BINDING_NAMES, j as compositionItemFieldPath, jt as AUDIO_PRESETS, k as composedDeviceStableId, kt as canonicalHash, l as CompositionExistingTargetSchema, lt as evaluateRose, m as CompositionFieldsFeatureSchema, mt as SOURCE_CAPS, n as COMPOSER_ADDON_ID, nt as MAX_EXPRESSION_EVAL_STEPS, o as CompositionBindingSchema, ot as EXPRESSION_BUILTIN_NAMES, p as CompositionFieldSourceSchema, pt as DEFAULT_FIRST_SIGHTING_FRESHNESS_MS, q as compileExpression, r as COMPOSITION_ITEM_ARRAY_PATH, rt as MAX_EXPRESSION_SOURCE_LENGTH, s as CompositionCodeSourceSchema, st as disarmRoseMemory, t as COMPOSED_DEVICE_STABLE_ID_PREFIX, tt as MAX_EXPRESSION_CALL_ARGS, u as CompositionExpressionSourceSchema, ut as isStatefulBuiltin, v as CompositionLiteralBindingSchema, vt as evaluateSensorEdge, w as MAX_COMPOSITION_CODE_LENGTH, x as CompositionSchema, xt as sliceActiveValue, y as CompositionNewTargetSchema, yt as evaluateSensorLevelEdge, z as cloneStatefulExpressionMemory, zt as logBannerArgs } from "./composition-Bzr7GwgP.mjs";
|
|
4
4
|
import { NODE_COLOR_IDS, NodeColorIdSchema, assignNodeColorId } from "./node-color.mjs";
|
|
@@ -78351,81 +78351,6 @@ function hfModelUrl(repo, path) {
|
|
|
78351
78351
|
return `https://huggingface.co/${repo}/resolve/main/${path}`;
|
|
78352
78352
|
}
|
|
78353
78353
|
//#endregion
|
|
78354
|
-
//#region src/utils/mask-url.ts
|
|
78355
|
-
/**
|
|
78356
|
-
* Names that, when used as URL query parameters, almost certainly carry
|
|
78357
|
-
* a secret. Matching is case-insensitive and anchored to the full param
|
|
78358
|
-
* name to avoid false positives like `user_id` (an entity reference, not
|
|
78359
|
-
* a credential) or `topic=password-reset` (a value happens to contain
|
|
78360
|
-
* the substring "password" but the param name is unrelated).
|
|
78361
|
-
*
|
|
78362
|
-
* Add new patterns here as we encounter cameras/APIs that leak through
|
|
78363
|
-
* the existing list.
|
|
78364
|
-
*/
|
|
78365
|
-
var CREDENTIAL_PARAM_PATTERNS = [
|
|
78366
|
-
/^user$/i,
|
|
78367
|
-
/^usr$/i,
|
|
78368
|
-
/^username$/i,
|
|
78369
|
-
/^password$/i,
|
|
78370
|
-
/^pwd$/i,
|
|
78371
|
-
/^pass$/i,
|
|
78372
|
-
/^passwd$/i,
|
|
78373
|
-
/^secret$/i,
|
|
78374
|
-
/^token$/i,
|
|
78375
|
-
/^auth$/i,
|
|
78376
|
-
/^auth[_-]?token$/i,
|
|
78377
|
-
/^bearer$/i,
|
|
78378
|
-
/^api[_-]?key$/i,
|
|
78379
|
-
/^access[_-]?token$/i,
|
|
78380
|
-
/^refresh[_-]?token$/i,
|
|
78381
|
-
/^bridge$/i,
|
|
78382
|
-
/^code$/i,
|
|
78383
|
-
/^state$/i,
|
|
78384
|
-
/^challenge$/i,
|
|
78385
|
-
/^link$/i
|
|
78386
|
-
];
|
|
78387
|
-
function isCredentialParam(name) {
|
|
78388
|
-
return CREDENTIAL_PARAM_PATTERNS.some((re) => re.test(name));
|
|
78389
|
-
}
|
|
78390
|
-
/**
|
|
78391
|
-
* Redact secrets we may surface in logs or telemetry:
|
|
78392
|
-
* 1. `userinfo` (`user:password@host`) — the classic RTSP shape.
|
|
78393
|
-
* 2. Query-string credential params (`?user=...&password=...`) — the
|
|
78394
|
-
* Reolink RTMP shape and several HTTP-pushed-stream APIs.
|
|
78395
|
-
*
|
|
78396
|
-
* Returns the original string verbatim when the input is not a parseable
|
|
78397
|
-
* URL — a log helper must never throw. Param values are replaced with
|
|
78398
|
-
* `***` so an operator reading logs still sees WHICH credential was
|
|
78399
|
-
* present (useful for debugging "wrong password" issues) without
|
|
78400
|
-
* exposing the value.
|
|
78401
|
-
*
|
|
78402
|
-
* The credential-name match is case-insensitive but anchored to the
|
|
78403
|
-
* whole param name; values like `user_id=42` or `topic=password-reset`
|
|
78404
|
-
* are NOT masked (those are entity references, not credentials).
|
|
78405
|
-
*/
|
|
78406
|
-
function maskUrlCredentials(rawUrl) {
|
|
78407
|
-
if (rawUrl.startsWith("/") && !rawUrl.startsWith("//")) {
|
|
78408
|
-
const masked = maskUrlCredentials(`http://relative.invalid${rawUrl}`);
|
|
78409
|
-
return masked.startsWith("http://relative.invalid") ? masked.slice(23) : rawUrl;
|
|
78410
|
-
}
|
|
78411
|
-
try {
|
|
78412
|
-
const u = new URL(rawUrl);
|
|
78413
|
-
let touched = false;
|
|
78414
|
-
if (u.username || u.password) {
|
|
78415
|
-
u.username = "";
|
|
78416
|
-
u.password = "";
|
|
78417
|
-
touched = true;
|
|
78418
|
-
}
|
|
78419
|
-
for (const key of Array.from(u.searchParams.keys())) if (isCredentialParam(key)) {
|
|
78420
|
-
u.searchParams.set(key, "***");
|
|
78421
|
-
touched = true;
|
|
78422
|
-
}
|
|
78423
|
-
return touched ? u.toString() : rawUrl;
|
|
78424
|
-
} catch {
|
|
78425
|
-
return rawUrl;
|
|
78426
|
-
}
|
|
78427
|
-
}
|
|
78428
|
-
//#endregion
|
|
78429
78354
|
//#region src/utils/pool-memory-watchdog.ts
|
|
78430
78355
|
var MB = 1024 * 1024;
|
|
78431
78356
|
var DEFAULT_POOL_MEMORY_POLICY = {
|
|
@@ -5788,6 +5788,81 @@ function parseJsonArray(text) {
|
|
|
5788
5788
|
}
|
|
5789
5789
|
}
|
|
5790
5790
|
//#endregion
|
|
5791
|
+
//#region src/utils/mask-url.ts
|
|
5792
|
+
/**
|
|
5793
|
+
* Names that, when used as URL query parameters, almost certainly carry
|
|
5794
|
+
* a secret. Matching is case-insensitive and anchored to the full param
|
|
5795
|
+
* name to avoid false positives like `user_id` (an entity reference, not
|
|
5796
|
+
* a credential) or `topic=password-reset` (a value happens to contain
|
|
5797
|
+
* the substring "password" but the param name is unrelated).
|
|
5798
|
+
*
|
|
5799
|
+
* Add new patterns here as we encounter cameras/APIs that leak through
|
|
5800
|
+
* the existing list.
|
|
5801
|
+
*/
|
|
5802
|
+
var CREDENTIAL_PARAM_PATTERNS = [
|
|
5803
|
+
/^user$/i,
|
|
5804
|
+
/^usr$/i,
|
|
5805
|
+
/^username$/i,
|
|
5806
|
+
/^password$/i,
|
|
5807
|
+
/^pwd$/i,
|
|
5808
|
+
/^pass$/i,
|
|
5809
|
+
/^passwd$/i,
|
|
5810
|
+
/^secret$/i,
|
|
5811
|
+
/^token$/i,
|
|
5812
|
+
/^auth$/i,
|
|
5813
|
+
/^auth[_-]?token$/i,
|
|
5814
|
+
/^bearer$/i,
|
|
5815
|
+
/^api[_-]?key$/i,
|
|
5816
|
+
/^access[_-]?token$/i,
|
|
5817
|
+
/^refresh[_-]?token$/i,
|
|
5818
|
+
/^bridge$/i,
|
|
5819
|
+
/^code$/i,
|
|
5820
|
+
/^state$/i,
|
|
5821
|
+
/^challenge$/i,
|
|
5822
|
+
/^link$/i
|
|
5823
|
+
];
|
|
5824
|
+
function isCredentialParam(name) {
|
|
5825
|
+
return CREDENTIAL_PARAM_PATTERNS.some((re) => re.test(name));
|
|
5826
|
+
}
|
|
5827
|
+
/**
|
|
5828
|
+
* Redact secrets we may surface in logs or telemetry:
|
|
5829
|
+
* 1. `userinfo` (`user:password@host`) — the classic RTSP shape.
|
|
5830
|
+
* 2. Query-string credential params (`?user=...&password=...`) — the
|
|
5831
|
+
* Reolink RTMP shape and several HTTP-pushed-stream APIs.
|
|
5832
|
+
*
|
|
5833
|
+
* Returns the original string verbatim when the input is not a parseable
|
|
5834
|
+
* URL — a log helper must never throw. Param values are replaced with
|
|
5835
|
+
* `***` so an operator reading logs still sees WHICH credential was
|
|
5836
|
+
* present (useful for debugging "wrong password" issues) without
|
|
5837
|
+
* exposing the value.
|
|
5838
|
+
*
|
|
5839
|
+
* The credential-name match is case-insensitive but anchored to the
|
|
5840
|
+
* whole param name; values like `user_id=42` or `topic=password-reset`
|
|
5841
|
+
* are NOT masked (those are entity references, not credentials).
|
|
5842
|
+
*/
|
|
5843
|
+
function maskUrlCredentials(rawUrl) {
|
|
5844
|
+
if (rawUrl.startsWith("/") && !rawUrl.startsWith("//")) {
|
|
5845
|
+
const masked = maskUrlCredentials(`http://relative.invalid${rawUrl}`);
|
|
5846
|
+
return masked.startsWith("http://relative.invalid") ? masked.slice(23) : rawUrl;
|
|
5847
|
+
}
|
|
5848
|
+
try {
|
|
5849
|
+
const u = new URL(rawUrl);
|
|
5850
|
+
let touched = false;
|
|
5851
|
+
if (u.username || u.password) {
|
|
5852
|
+
u.username = "";
|
|
5853
|
+
u.password = "";
|
|
5854
|
+
touched = true;
|
|
5855
|
+
}
|
|
5856
|
+
for (const key of Array.from(u.searchParams.keys())) if (isCredentialParam(key)) {
|
|
5857
|
+
u.searchParams.set(key, "***");
|
|
5858
|
+
touched = true;
|
|
5859
|
+
}
|
|
5860
|
+
return touched ? u.toString() : rawUrl;
|
|
5861
|
+
} catch {
|
|
5862
|
+
return rawUrl;
|
|
5863
|
+
}
|
|
5864
|
+
}
|
|
5865
|
+
//#endregion
|
|
5791
5866
|
//#region src/utils/sleep.ts
|
|
5792
5867
|
/**
|
|
5793
5868
|
* Promise-based timer helpers — used everywhere the codebase needs to
|
|
@@ -5841,4 +5916,4 @@ function sleepCancellable(ms, signal) {
|
|
|
5841
5916
|
});
|
|
5842
5917
|
}
|
|
5843
5918
|
//#endregion
|
|
5844
|
-
export {
|
|
5919
|
+
export { AudioStreamPickSchema as $, isSecretRef as $t, deviceCustomAction as A, isAudioChunkFormat as An, PEER_BYTES_CHUNK_BYTES as At, optionalMethod as B, mergeSecretStatePaths as Bt, RawStateResultSchema as C, collectSecretConfigKeys as Cn, MIN_SCRUBBED_LENGTH as Ct, customAction as D, AUDIO_CHUNK_FORMATS as Dn, registerKnownSecret as Dt, DEVICE_CHILDREN_BATCH_MAX as E, schemaDeclaresAnyField as En, knownSecretCount as Et, PROVIDER_PIN_FIELD as F, DATAPLANE_SECRET_HEADER as Ft, readNodePin as G, collectSecretMarkerRefs as Gt, systemMethod as H, secretTreeFromPaths as Ht, event as I, SHARE_VIEW_KINDS as It, ReadinessTimeoutError as J, SECRET_REF_SCHEME as Jt, toNodeId as K, resolveSecretMarkers as Kt, expandCapMethods as L, DisposerChain as Lt, DEFAULT_RUNTIME_STATE_DURABILITY as M, PEER_BYTES_STALL_MS as Mt, DEVICE_SETTINGS_CONTRIBUTION_METHODS as N, PEER_BYTES_TICKET_TTL_MS as Nt, defineCustomActions as O, audioChunkBytesPerSample as On, scrubKnownSecrets as Ot, DEVICE_STATUS_METHOD as P, PeerBytesTicketSchema as Pt, AudioChunkFormatSchema as Q, globalSecretScope as Qt, isDeviceConfigCap as R, BaseAddon as Rt, isZodSecret as S, collectKeychainStoredKeys as Sn, createSecretsAccess as St, viewerUiCapability as T, isSecretConfigField as Tn, forgetKnownSecret as Tt, CAP_NODE_PIN_CONTEXT_KEY as U, secretTreeFromSchema as Ut, resolveCapMount as V, parseSecretStatePath as Vt, nodePin as W, KeychainWriteRefusedError as Wt, readinessKey as X, buildSecretRef as Xt, emitDownForOwnedCaps as Y, arrayItemFieldPath as Yt, scopeKey as Z, formatSecretScope as Zt, createLazyTrpcSource as _, isSecretMarker as _n, makeSourceBrokerId as _t, asJsonArray as a, emitReadiness as an, CamStreamResolutionSchema as at, SECRET_META as b, toSecretFieldView as bn, resolveSecretViewsIn as bt, asString as c, WELL_KNOWN_TAB_MAP as cn, FrameHandleSchema as ct, parseJsonUnknown as d, hydrateSchema as dn, ProfileSlotStatusSchema as dt, normalizeSecretOwner as en, BrokerStatsSchema as et, BOOT_RECOVERY_BACKOFF_MS as f, resolveHydratedFieldValue as fn, StreamSourceEntrySchema$1 as ft, createEventBusSliceSource as g, isSecretFieldView as gn, makeProfileBrokerId as gt, createDeviceProxy as h, isSecretClear as hn, SubscribeAudioChunksResultSchema as ht, asBoolean as i, createEvent as in, CamStreamKindSchema as it, adminUiCapability as j, PEER_BYTES_MAX_OUTSTANDING as jt, describeCustomActions as k, expandAudioChunkToF32le as kn, shortSecretRefHash as kt, parseJsonArray as l, collectHydratedFieldEntries as ln, ProfileRtspEntrySchema as lt, isDeviceScopedCap as m, classifySecretWrite as mn, SubscribeAudioChunksInputSchema as mt, sleepCancellable as n, normalizeNodeId as nn, CAM_PROFILE_ORDER as nt, asJsonObject as o, isEvent as on, CameraStreamSchema as ot, DEVICE_SCOPED_CAPS as p, SECRET_CLEAR as pn, StreamSourceSchema as pt, ReadinessRegistry as q, transformSecretWrite as qt, maskUrlCredentials as r, createDurableState as rn, CamProfileSchema as rt, asNumber as s, WELL_KNOWN_TABS as sn, DecodedAudioChunkSchema as st, sleep as t, parseSecretRef as tn, BrokerStatusSchema as tt, parseJsonObject as u, collectHydratedFieldValues as un, ProfileSlotSchema as ut, createMirrorSource as v, isSecretMarkerLike as vn, parseProfileBrokerId as vt, deviceOpsCapability as w, isKeychainStoredField as wn, clearKnownSecrets as wt, collectZodSecretPaths as x, REDACTED_SECRET as xn, REVALIDATE_AFTER_MS as xt, createSliceHandle as y, makeSecretMarker as yn, selectAssignedProfileSlots as yt, method as z, normalizeAddonInitResult as zt };
|
|
@@ -5788,6 +5788,81 @@ function parseJsonArray(text) {
|
|
|
5788
5788
|
}
|
|
5789
5789
|
}
|
|
5790
5790
|
//#endregion
|
|
5791
|
+
//#region src/utils/mask-url.ts
|
|
5792
|
+
/**
|
|
5793
|
+
* Names that, when used as URL query parameters, almost certainly carry
|
|
5794
|
+
* a secret. Matching is case-insensitive and anchored to the full param
|
|
5795
|
+
* name to avoid false positives like `user_id` (an entity reference, not
|
|
5796
|
+
* a credential) or `topic=password-reset` (a value happens to contain
|
|
5797
|
+
* the substring "password" but the param name is unrelated).
|
|
5798
|
+
*
|
|
5799
|
+
* Add new patterns here as we encounter cameras/APIs that leak through
|
|
5800
|
+
* the existing list.
|
|
5801
|
+
*/
|
|
5802
|
+
var CREDENTIAL_PARAM_PATTERNS = [
|
|
5803
|
+
/^user$/i,
|
|
5804
|
+
/^usr$/i,
|
|
5805
|
+
/^username$/i,
|
|
5806
|
+
/^password$/i,
|
|
5807
|
+
/^pwd$/i,
|
|
5808
|
+
/^pass$/i,
|
|
5809
|
+
/^passwd$/i,
|
|
5810
|
+
/^secret$/i,
|
|
5811
|
+
/^token$/i,
|
|
5812
|
+
/^auth$/i,
|
|
5813
|
+
/^auth[_-]?token$/i,
|
|
5814
|
+
/^bearer$/i,
|
|
5815
|
+
/^api[_-]?key$/i,
|
|
5816
|
+
/^access[_-]?token$/i,
|
|
5817
|
+
/^refresh[_-]?token$/i,
|
|
5818
|
+
/^bridge$/i,
|
|
5819
|
+
/^code$/i,
|
|
5820
|
+
/^state$/i,
|
|
5821
|
+
/^challenge$/i,
|
|
5822
|
+
/^link$/i
|
|
5823
|
+
];
|
|
5824
|
+
function isCredentialParam(name) {
|
|
5825
|
+
return CREDENTIAL_PARAM_PATTERNS.some((re) => re.test(name));
|
|
5826
|
+
}
|
|
5827
|
+
/**
|
|
5828
|
+
* Redact secrets we may surface in logs or telemetry:
|
|
5829
|
+
* 1. `userinfo` (`user:password@host`) — the classic RTSP shape.
|
|
5830
|
+
* 2. Query-string credential params (`?user=...&password=...`) — the
|
|
5831
|
+
* Reolink RTMP shape and several HTTP-pushed-stream APIs.
|
|
5832
|
+
*
|
|
5833
|
+
* Returns the original string verbatim when the input is not a parseable
|
|
5834
|
+
* URL — a log helper must never throw. Param values are replaced with
|
|
5835
|
+
* `***` so an operator reading logs still sees WHICH credential was
|
|
5836
|
+
* present (useful for debugging "wrong password" issues) without
|
|
5837
|
+
* exposing the value.
|
|
5838
|
+
*
|
|
5839
|
+
* The credential-name match is case-insensitive but anchored to the
|
|
5840
|
+
* whole param name; values like `user_id=42` or `topic=password-reset`
|
|
5841
|
+
* are NOT masked (those are entity references, not credentials).
|
|
5842
|
+
*/
|
|
5843
|
+
function maskUrlCredentials(rawUrl) {
|
|
5844
|
+
if (rawUrl.startsWith("/") && !rawUrl.startsWith("//")) {
|
|
5845
|
+
const masked = maskUrlCredentials(`http://relative.invalid${rawUrl}`);
|
|
5846
|
+
return masked.startsWith("http://relative.invalid") ? masked.slice(23) : rawUrl;
|
|
5847
|
+
}
|
|
5848
|
+
try {
|
|
5849
|
+
const u = new URL(rawUrl);
|
|
5850
|
+
let touched = false;
|
|
5851
|
+
if (u.username || u.password) {
|
|
5852
|
+
u.username = "";
|
|
5853
|
+
u.password = "";
|
|
5854
|
+
touched = true;
|
|
5855
|
+
}
|
|
5856
|
+
for (const key of Array.from(u.searchParams.keys())) if (isCredentialParam(key)) {
|
|
5857
|
+
u.searchParams.set(key, "***");
|
|
5858
|
+
touched = true;
|
|
5859
|
+
}
|
|
5860
|
+
return touched ? u.toString() : rawUrl;
|
|
5861
|
+
} catch {
|
|
5862
|
+
return rawUrl;
|
|
5863
|
+
}
|
|
5864
|
+
}
|
|
5865
|
+
//#endregion
|
|
5791
5866
|
//#region src/utils/sleep.ts
|
|
5792
5867
|
/**
|
|
5793
5868
|
* Promise-based timer helpers — used everywhere the codebase needs to
|
|
@@ -6459,6 +6534,12 @@ Object.defineProperty(exports, "makeSourceBrokerId", {
|
|
|
6459
6534
|
return makeSourceBrokerId;
|
|
6460
6535
|
}
|
|
6461
6536
|
});
|
|
6537
|
+
Object.defineProperty(exports, "maskUrlCredentials", {
|
|
6538
|
+
enumerable: true,
|
|
6539
|
+
get: function() {
|
|
6540
|
+
return maskUrlCredentials;
|
|
6541
|
+
}
|
|
6542
|
+
});
|
|
6462
6543
|
Object.defineProperty(exports, "mergeSecretStatePaths", {
|
|
6463
6544
|
enumerable: true,
|
|
6464
6545
|
get: function() {
|