@camstack/addon-tailscale 1.2.110 → 1.2.111
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/client/tailscale.addon.js +1 -1
- package/dist/client/tailscale.addon.mjs +1 -1
- package/dist/{dist-CW2jdX_8.mjs → dist-B0V6gFgL.mjs} +167 -7
- package/dist/{dist-BBBDJ4_e.js → dist-uDXws1yw.js} +167 -7
- package/dist/ingress/tailscale-ingress.addon.js +1 -1
- package/dist/ingress/tailscale-ingress.addon.mjs +1 -1
- package/package.json +1 -1
|
@@ -24,7 +24,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
enumerable: true
|
|
25
25
|
}) : target, mod));
|
|
26
26
|
//#endregion
|
|
27
|
-
const require_dist = require("../dist-
|
|
27
|
+
const require_dist = require("../dist-uDXws1yw.js");
|
|
28
28
|
let node_child_process = require("node:child_process");
|
|
29
29
|
let node_util = require("node:util");
|
|
30
30
|
let node_fs = require("node:fs");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as EventCategory, i as BaseAddon, n as networkAccessCapability, r as BOOT_RECOVERY_BACKOFF_MS, t as meshNetworkCapability } from "../dist-
|
|
1
|
+
import { a as EventCategory, i as BaseAddon, n as networkAccessCapability, r as BOOT_RECOVERY_BACKOFF_MS, t as meshNetworkCapability } from "../dist-B0V6gFgL.mjs";
|
|
2
2
|
import { execFile, spawn } from "node:child_process";
|
|
3
3
|
import { promisify } from "node:util";
|
|
4
4
|
import * as fs from "node:fs";
|
|
@@ -5359,7 +5359,7 @@ var ZodIssueCode = {
|
|
|
5359
5359
|
var ZodFirstPartyTypeKind;
|
|
5360
5360
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5361
5361
|
//#endregion
|
|
5362
|
-
//#region ../types/dist/sleep-
|
|
5362
|
+
//#region ../types/dist/sleep-B1y0Fo1U.mjs
|
|
5363
5363
|
/**
|
|
5364
5364
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5365
5365
|
* window to float samples (D455).
|
|
@@ -28797,14 +28797,81 @@ DeviceType.Camera, method(object({ deviceId: number() }), PrivacyMaskOptionsSche
|
|
|
28797
28797
|
kind: "mutation",
|
|
28798
28798
|
auth: "admin"
|
|
28799
28799
|
});
|
|
28800
|
+
/**
|
|
28801
|
+
* What a preset id DOES on this camera.
|
|
28802
|
+
*
|
|
28803
|
+
* On several PTZ firmwares the preset namespace is shared: low ids are stored
|
|
28804
|
+
* positions, a reserved band triggers camera FUNCTIONS. The dispensa camera
|
|
28805
|
+
* (Hikvision) returns its own reserved band in the preset list, named by the
|
|
28806
|
+
* firmware:
|
|
28807
|
+
*
|
|
28808
|
+
* 34 Back to origin · 39 Day mode · 40 Night mode · 46 Day/Night Auto Mode
|
|
28809
|
+
* 92 Set manual limits · 93 Save manual limits · 94 Remote reboot
|
|
28810
|
+
* 95 Call OSD menu
|
|
28811
|
+
*
|
|
28812
|
+
* We used to hand all of these to the UI as ordinary presets. Saving over one
|
|
28813
|
+
* is what produced `PUT /ISAPI/PTZCtrl/channels/1/presets/34 -> HTTP 500`: the
|
|
28814
|
+
* camera refusing to let "Back to origin" be overwritten, surfaced to the
|
|
28815
|
+
* operator as a transport failure.
|
|
28816
|
+
*
|
|
28817
|
+
* A function preset stays fully usable as a DESTINATION -- `goToPreset('34')`
|
|
28818
|
+
* is the single most useful thing that camera can do. Only `savePreset` and
|
|
28819
|
+
* `deletePreset` are gated.
|
|
28820
|
+
*/
|
|
28821
|
+
var PtzPresetFunctionSchema = _enum([
|
|
28822
|
+
"home",
|
|
28823
|
+
"day-mode",
|
|
28824
|
+
"night-mode",
|
|
28825
|
+
"day-night-auto",
|
|
28826
|
+
"set-limits",
|
|
28827
|
+
"save-limits",
|
|
28828
|
+
"reboot",
|
|
28829
|
+
"osd-menu"
|
|
28830
|
+
]);
|
|
28800
28831
|
var PtzPresetSchema = object({
|
|
28801
28832
|
id: string(),
|
|
28802
|
-
name: string()
|
|
28833
|
+
name: string(),
|
|
28834
|
+
/**
|
|
28835
|
+
* The firmware function this id performs, when the provider KNOWS the id is
|
|
28836
|
+
* reserved. `null` = an ordinary stored position, OR a reserved id this
|
|
28837
|
+
* provider does not recognise -- the two are told apart by `writable`.
|
|
28838
|
+
*/
|
|
28839
|
+
fn: PtzPresetFunctionSchema.nullable(),
|
|
28840
|
+
/**
|
|
28841
|
+
* Whether `savePreset` / `deletePreset` may target this id. A provider sets
|
|
28842
|
+
* it false only for a band it KNOWS is reserved; where the firmware is not
|
|
28843
|
+
* documented it stays true and a refusal comes from the camera, named.
|
|
28844
|
+
*/
|
|
28845
|
+
writable: boolean()
|
|
28803
28846
|
});
|
|
28847
|
+
/**
|
|
28848
|
+
* Where the head is pointing -- per axis, and `null` when the driver cannot
|
|
28849
|
+
* read it.
|
|
28850
|
+
*
|
|
28851
|
+
* It used to be three REQUIRED numbers, which left a provider that cannot read
|
|
28852
|
+
* position no way to say so. All four said `0`:
|
|
28853
|
+
*
|
|
28854
|
+
* reolink `return { pan: 0, tilt: 0, zoom: 0 }` "until a position-query
|
|
28855
|
+
* path lands upstream"
|
|
28856
|
+
* hikvision stub, "firmware-dependent and frequently absent"
|
|
28857
|
+
* amcrest stub, "no generic absolute-position read for this model family"
|
|
28858
|
+
* onvif throws
|
|
28859
|
+
*
|
|
28860
|
+
* So every consumer asking where a camera points was told "perfectly centred"
|
|
28861
|
+
* by four cameras that had never looked. That is D393 -- a measurement that
|
|
28862
|
+
* FAILED is `null`, never `0`, and the type says so all the way to the
|
|
28863
|
+
* decision -- the same shape as the unreadable `statfs` folded into "0 bytes of
|
|
28864
|
+
* headroom", which evacuated a healthy disk.
|
|
28865
|
+
*
|
|
28866
|
+
* D393 also says to check for a narrower structural TWIN of the result type.
|
|
28867
|
+
* There is one: `PtzStatusSchema` extends this, so the lie had already
|
|
28868
|
+
* propagated into `getStatus`, which is the surface `getPosition`'s own comment
|
|
28869
|
+
* tells callers to migrate to.
|
|
28870
|
+
*/
|
|
28804
28871
|
var PtzPositionSchema = object({
|
|
28805
|
-
pan: number(),
|
|
28806
|
-
tilt: number(),
|
|
28807
|
-
zoom: number()
|
|
28872
|
+
pan: number().nullable(),
|
|
28873
|
+
tilt: number().nullable(),
|
|
28874
|
+
zoom: number().nullable()
|
|
28808
28875
|
});
|
|
28809
28876
|
var PtzMoveCommandSchema = object({
|
|
28810
28877
|
pan: number().optional(),
|
|
@@ -28823,7 +28890,72 @@ var PtzOptionsSchema = object({
|
|
|
28823
28890
|
maxPresets: number().optional(),
|
|
28824
28891
|
/** Whether the camera exposes a controllable autofocus toggle
|
|
28825
28892
|
* (boolean `hasX` per the getOptions availability convention). */
|
|
28826
|
-
hasAutofocus: boolean()
|
|
28893
|
+
hasAutofocus: boolean(),
|
|
28894
|
+
/**
|
|
28895
|
+
* How many distinct speeds this camera's NATIVE scale offers.
|
|
28896
|
+
*
|
|
28897
|
+
* The cap's `speed` is normalized 0..1 and each provider maps it down --
|
|
28898
|
+
* Baichuan 1..63, Dahua 1..8, ISAPI's percentage -100..100. The normalized
|
|
28899
|
+
* value hides how coarse that really is: asking an amcrest for `0.37` is
|
|
28900
|
+
* meaningless, because it has eight steps and three of them round to the
|
|
28901
|
+
* same one. A loop that tunes its own gain has to know the granularity of
|
|
28902
|
+
* the knob it is turning.
|
|
28903
|
+
*
|
|
28904
|
+
* `null` = the driver does not know, or the scale is continuous (ONVIF takes
|
|
28905
|
+
* a float). Never a made-up number.
|
|
28906
|
+
*/
|
|
28907
|
+
speedSteps: number().int().positive().nullable(),
|
|
28908
|
+
/**
|
|
28909
|
+
* How long ONE `move` pulse runs on this driver, ms.
|
|
28910
|
+
*
|
|
28911
|
+
* `move` is a self-terminating burst everywhere, but every provider hardcoded
|
|
28912
|
+
* its own duration in private -- 200 reolink, 350 amcrest, 500 hikvision,
|
|
28913
|
+
* 1000 onvif -- so no caller could read it. It is the DENOMINATOR of "how far
|
|
28914
|
+
* did the head travel per pulse": without it a measured displacement has no
|
|
28915
|
+
* gain to be divided into.
|
|
28916
|
+
*
|
|
28917
|
+
* `null` = the driver cannot say.
|
|
28918
|
+
*/
|
|
28919
|
+
moveImpulseMs: number().int().positive().nullable()
|
|
28920
|
+
});
|
|
28921
|
+
/**
|
|
28922
|
+
* Which preset `goHome` goes to, and WHO decided.
|
|
28923
|
+
*
|
|
28924
|
+
* `goHome` used to be three vendor "conventions" written in three comments --
|
|
28925
|
+
* Reolink preset 0, Hikvision preset '1', Dahua preset 1 -- and on this fleet
|
|
28926
|
+
* not one of the three cameras honours its own:
|
|
28927
|
+
*
|
|
28928
|
+
* 592 Videocamera camera Daniel (reolink) preset 0 holds "stanza"
|
|
28929
|
+
* 1438 Videocamera dispensa (hikvision) preset 1 holds "Credenza"
|
|
28930
|
+
* 3836 Videocamera studio (amcrest) preset 1 holds "Preset1"
|
|
28931
|
+
*
|
|
28932
|
+
* So `goHome` meant "go wherever the operator happened to save in slot 0 or 1",
|
|
28933
|
+
* and two of the three swallowed the failure in a bare `catch`. For autotrack
|
|
28934
|
+
* this is the HOTTEST path -- it runs every time a subject is released -- so it
|
|
28935
|
+
* needs an answer that is true per camera and audible when it is missing.
|
|
28936
|
+
*
|
|
28937
|
+
* `source` is what makes it honest:
|
|
28938
|
+
* - `operator` -- picked in the UI, stored by the provider.
|
|
28939
|
+
* - `firmware` -- the camera itself named a preset `fn: 'home'` (Hikvision's
|
|
28940
|
+
* "Back to origin"), adopted as the default with nothing to configure.
|
|
28941
|
+
* - `native` -- the driver homes WITHOUT a preset at all. ONVIF does:
|
|
28942
|
+
* `goHome` is `ptzAbsoluteMove({x:0, y:0, zoom:0})`. `presetId` is null and
|
|
28943
|
+
* that is not a failure -- there is nothing to pick, and the UI must offer
|
|
28944
|
+
* no picker.
|
|
28945
|
+
* - `none` -- nothing is configured and the camera names nothing.
|
|
28946
|
+
* `goHome` REFUSES rather than moving the head somewhere arbitrary.
|
|
28947
|
+
*
|
|
28948
|
+
* `source === 'none'` is the refusal condition, NOT `presetId === null`: the
|
|
28949
|
+
* native case has no preset and homes perfectly well.
|
|
28950
|
+
*/
|
|
28951
|
+
var PtzHomePresetSchema = object({
|
|
28952
|
+
presetId: string().nullable(),
|
|
28953
|
+
source: _enum([
|
|
28954
|
+
"operator",
|
|
28955
|
+
"firmware",
|
|
28956
|
+
"native",
|
|
28957
|
+
"none"
|
|
28958
|
+
])
|
|
28827
28959
|
});
|
|
28828
28960
|
DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(PtzMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), array(PtzPresetSchema)), method(object({
|
|
28829
28961
|
deviceId: number(),
|
|
@@ -28841,7 +28973,13 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
28841
28973
|
}), _void(), {
|
|
28842
28974
|
kind: "mutation",
|
|
28843
28975
|
auth: "admin"
|
|
28844
|
-
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }),
|
|
28976
|
+
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzHomePresetSchema), method(object({
|
|
28977
|
+
deviceId: number(),
|
|
28978
|
+
presetId: string().nullable()
|
|
28979
|
+
}), _void(), {
|
|
28980
|
+
kind: "mutation",
|
|
28981
|
+
auth: "admin"
|
|
28982
|
+
}), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
|
|
28845
28983
|
deviceId: number(),
|
|
28846
28984
|
enabled: boolean()
|
|
28847
28985
|
}), _void(), { kind: "mutation" });
|
|
@@ -35856,6 +35994,12 @@ Object.freeze({
|
|
|
35856
35994
|
addonId: null,
|
|
35857
35995
|
access: "delete"
|
|
35858
35996
|
},
|
|
35997
|
+
"ptz.getHomePreset": {
|
|
35998
|
+
capName: "ptz",
|
|
35999
|
+
capScope: "device",
|
|
36000
|
+
addonId: null,
|
|
36001
|
+
access: "view"
|
|
36002
|
+
},
|
|
35859
36003
|
"ptz.getOptions": {
|
|
35860
36004
|
capName: "ptz",
|
|
35861
36005
|
capScope: "device",
|
|
@@ -35904,6 +36048,12 @@ Object.freeze({
|
|
|
35904
36048
|
addonId: null,
|
|
35905
36049
|
access: "create"
|
|
35906
36050
|
},
|
|
36051
|
+
"ptz.setHomePreset": {
|
|
36052
|
+
capName: "ptz",
|
|
36053
|
+
capScope: "device",
|
|
36054
|
+
addonId: null,
|
|
36055
|
+
access: "create"
|
|
36056
|
+
},
|
|
35907
36057
|
"ptz.stop": {
|
|
35908
36058
|
capName: "ptz",
|
|
35909
36059
|
capScope: "device",
|
|
@@ -39077,6 +39227,11 @@ Object.freeze({
|
|
|
39077
39227
|
form: "single",
|
|
39078
39228
|
optional: false
|
|
39079
39229
|
}],
|
|
39230
|
+
"ptz.getHomePreset": [{
|
|
39231
|
+
name: "deviceId",
|
|
39232
|
+
form: "single",
|
|
39233
|
+
optional: false
|
|
39234
|
+
}],
|
|
39080
39235
|
"ptz.getOptions": [{
|
|
39081
39236
|
name: "deviceId",
|
|
39082
39237
|
form: "single",
|
|
@@ -39117,6 +39272,11 @@ Object.freeze({
|
|
|
39117
39272
|
form: "single",
|
|
39118
39273
|
optional: false
|
|
39119
39274
|
}],
|
|
39275
|
+
"ptz.setHomePreset": [{
|
|
39276
|
+
name: "deviceId",
|
|
39277
|
+
form: "single",
|
|
39278
|
+
optional: false
|
|
39279
|
+
}],
|
|
39120
39280
|
"ptz.stop": [{
|
|
39121
39281
|
name: "deviceId",
|
|
39122
39282
|
form: "single",
|
|
@@ -5359,7 +5359,7 @@ var ZodIssueCode = {
|
|
|
5359
5359
|
var ZodFirstPartyTypeKind;
|
|
5360
5360
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5361
5361
|
//#endregion
|
|
5362
|
-
//#region ../types/dist/sleep-
|
|
5362
|
+
//#region ../types/dist/sleep-B1y0Fo1U.mjs
|
|
5363
5363
|
/**
|
|
5364
5364
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5365
5365
|
* window to float samples (D455).
|
|
@@ -28797,14 +28797,81 @@ DeviceType.Camera, method(object({ deviceId: number() }), PrivacyMaskOptionsSche
|
|
|
28797
28797
|
kind: "mutation",
|
|
28798
28798
|
auth: "admin"
|
|
28799
28799
|
});
|
|
28800
|
+
/**
|
|
28801
|
+
* What a preset id DOES on this camera.
|
|
28802
|
+
*
|
|
28803
|
+
* On several PTZ firmwares the preset namespace is shared: low ids are stored
|
|
28804
|
+
* positions, a reserved band triggers camera FUNCTIONS. The dispensa camera
|
|
28805
|
+
* (Hikvision) returns its own reserved band in the preset list, named by the
|
|
28806
|
+
* firmware:
|
|
28807
|
+
*
|
|
28808
|
+
* 34 Back to origin · 39 Day mode · 40 Night mode · 46 Day/Night Auto Mode
|
|
28809
|
+
* 92 Set manual limits · 93 Save manual limits · 94 Remote reboot
|
|
28810
|
+
* 95 Call OSD menu
|
|
28811
|
+
*
|
|
28812
|
+
* We used to hand all of these to the UI as ordinary presets. Saving over one
|
|
28813
|
+
* is what produced `PUT /ISAPI/PTZCtrl/channels/1/presets/34 -> HTTP 500`: the
|
|
28814
|
+
* camera refusing to let "Back to origin" be overwritten, surfaced to the
|
|
28815
|
+
* operator as a transport failure.
|
|
28816
|
+
*
|
|
28817
|
+
* A function preset stays fully usable as a DESTINATION -- `goToPreset('34')`
|
|
28818
|
+
* is the single most useful thing that camera can do. Only `savePreset` and
|
|
28819
|
+
* `deletePreset` are gated.
|
|
28820
|
+
*/
|
|
28821
|
+
var PtzPresetFunctionSchema = _enum([
|
|
28822
|
+
"home",
|
|
28823
|
+
"day-mode",
|
|
28824
|
+
"night-mode",
|
|
28825
|
+
"day-night-auto",
|
|
28826
|
+
"set-limits",
|
|
28827
|
+
"save-limits",
|
|
28828
|
+
"reboot",
|
|
28829
|
+
"osd-menu"
|
|
28830
|
+
]);
|
|
28800
28831
|
var PtzPresetSchema = object({
|
|
28801
28832
|
id: string(),
|
|
28802
|
-
name: string()
|
|
28833
|
+
name: string(),
|
|
28834
|
+
/**
|
|
28835
|
+
* The firmware function this id performs, when the provider KNOWS the id is
|
|
28836
|
+
* reserved. `null` = an ordinary stored position, OR a reserved id this
|
|
28837
|
+
* provider does not recognise -- the two are told apart by `writable`.
|
|
28838
|
+
*/
|
|
28839
|
+
fn: PtzPresetFunctionSchema.nullable(),
|
|
28840
|
+
/**
|
|
28841
|
+
* Whether `savePreset` / `deletePreset` may target this id. A provider sets
|
|
28842
|
+
* it false only for a band it KNOWS is reserved; where the firmware is not
|
|
28843
|
+
* documented it stays true and a refusal comes from the camera, named.
|
|
28844
|
+
*/
|
|
28845
|
+
writable: boolean()
|
|
28803
28846
|
});
|
|
28847
|
+
/**
|
|
28848
|
+
* Where the head is pointing -- per axis, and `null` when the driver cannot
|
|
28849
|
+
* read it.
|
|
28850
|
+
*
|
|
28851
|
+
* It used to be three REQUIRED numbers, which left a provider that cannot read
|
|
28852
|
+
* position no way to say so. All four said `0`:
|
|
28853
|
+
*
|
|
28854
|
+
* reolink `return { pan: 0, tilt: 0, zoom: 0 }` "until a position-query
|
|
28855
|
+
* path lands upstream"
|
|
28856
|
+
* hikvision stub, "firmware-dependent and frequently absent"
|
|
28857
|
+
* amcrest stub, "no generic absolute-position read for this model family"
|
|
28858
|
+
* onvif throws
|
|
28859
|
+
*
|
|
28860
|
+
* So every consumer asking where a camera points was told "perfectly centred"
|
|
28861
|
+
* by four cameras that had never looked. That is D393 -- a measurement that
|
|
28862
|
+
* FAILED is `null`, never `0`, and the type says so all the way to the
|
|
28863
|
+
* decision -- the same shape as the unreadable `statfs` folded into "0 bytes of
|
|
28864
|
+
* headroom", which evacuated a healthy disk.
|
|
28865
|
+
*
|
|
28866
|
+
* D393 also says to check for a narrower structural TWIN of the result type.
|
|
28867
|
+
* There is one: `PtzStatusSchema` extends this, so the lie had already
|
|
28868
|
+
* propagated into `getStatus`, which is the surface `getPosition`'s own comment
|
|
28869
|
+
* tells callers to migrate to.
|
|
28870
|
+
*/
|
|
28804
28871
|
var PtzPositionSchema = object({
|
|
28805
|
-
pan: number(),
|
|
28806
|
-
tilt: number(),
|
|
28807
|
-
zoom: number()
|
|
28872
|
+
pan: number().nullable(),
|
|
28873
|
+
tilt: number().nullable(),
|
|
28874
|
+
zoom: number().nullable()
|
|
28808
28875
|
});
|
|
28809
28876
|
var PtzMoveCommandSchema = object({
|
|
28810
28877
|
pan: number().optional(),
|
|
@@ -28823,7 +28890,72 @@ var PtzOptionsSchema = object({
|
|
|
28823
28890
|
maxPresets: number().optional(),
|
|
28824
28891
|
/** Whether the camera exposes a controllable autofocus toggle
|
|
28825
28892
|
* (boolean `hasX` per the getOptions availability convention). */
|
|
28826
|
-
hasAutofocus: boolean()
|
|
28893
|
+
hasAutofocus: boolean(),
|
|
28894
|
+
/**
|
|
28895
|
+
* How many distinct speeds this camera's NATIVE scale offers.
|
|
28896
|
+
*
|
|
28897
|
+
* The cap's `speed` is normalized 0..1 and each provider maps it down --
|
|
28898
|
+
* Baichuan 1..63, Dahua 1..8, ISAPI's percentage -100..100. The normalized
|
|
28899
|
+
* value hides how coarse that really is: asking an amcrest for `0.37` is
|
|
28900
|
+
* meaningless, because it has eight steps and three of them round to the
|
|
28901
|
+
* same one. A loop that tunes its own gain has to know the granularity of
|
|
28902
|
+
* the knob it is turning.
|
|
28903
|
+
*
|
|
28904
|
+
* `null` = the driver does not know, or the scale is continuous (ONVIF takes
|
|
28905
|
+
* a float). Never a made-up number.
|
|
28906
|
+
*/
|
|
28907
|
+
speedSteps: number().int().positive().nullable(),
|
|
28908
|
+
/**
|
|
28909
|
+
* How long ONE `move` pulse runs on this driver, ms.
|
|
28910
|
+
*
|
|
28911
|
+
* `move` is a self-terminating burst everywhere, but every provider hardcoded
|
|
28912
|
+
* its own duration in private -- 200 reolink, 350 amcrest, 500 hikvision,
|
|
28913
|
+
* 1000 onvif -- so no caller could read it. It is the DENOMINATOR of "how far
|
|
28914
|
+
* did the head travel per pulse": without it a measured displacement has no
|
|
28915
|
+
* gain to be divided into.
|
|
28916
|
+
*
|
|
28917
|
+
* `null` = the driver cannot say.
|
|
28918
|
+
*/
|
|
28919
|
+
moveImpulseMs: number().int().positive().nullable()
|
|
28920
|
+
});
|
|
28921
|
+
/**
|
|
28922
|
+
* Which preset `goHome` goes to, and WHO decided.
|
|
28923
|
+
*
|
|
28924
|
+
* `goHome` used to be three vendor "conventions" written in three comments --
|
|
28925
|
+
* Reolink preset 0, Hikvision preset '1', Dahua preset 1 -- and on this fleet
|
|
28926
|
+
* not one of the three cameras honours its own:
|
|
28927
|
+
*
|
|
28928
|
+
* 592 Videocamera camera Daniel (reolink) preset 0 holds "stanza"
|
|
28929
|
+
* 1438 Videocamera dispensa (hikvision) preset 1 holds "Credenza"
|
|
28930
|
+
* 3836 Videocamera studio (amcrest) preset 1 holds "Preset1"
|
|
28931
|
+
*
|
|
28932
|
+
* So `goHome` meant "go wherever the operator happened to save in slot 0 or 1",
|
|
28933
|
+
* and two of the three swallowed the failure in a bare `catch`. For autotrack
|
|
28934
|
+
* this is the HOTTEST path -- it runs every time a subject is released -- so it
|
|
28935
|
+
* needs an answer that is true per camera and audible when it is missing.
|
|
28936
|
+
*
|
|
28937
|
+
* `source` is what makes it honest:
|
|
28938
|
+
* - `operator` -- picked in the UI, stored by the provider.
|
|
28939
|
+
* - `firmware` -- the camera itself named a preset `fn: 'home'` (Hikvision's
|
|
28940
|
+
* "Back to origin"), adopted as the default with nothing to configure.
|
|
28941
|
+
* - `native` -- the driver homes WITHOUT a preset at all. ONVIF does:
|
|
28942
|
+
* `goHome` is `ptzAbsoluteMove({x:0, y:0, zoom:0})`. `presetId` is null and
|
|
28943
|
+
* that is not a failure -- there is nothing to pick, and the UI must offer
|
|
28944
|
+
* no picker.
|
|
28945
|
+
* - `none` -- nothing is configured and the camera names nothing.
|
|
28946
|
+
* `goHome` REFUSES rather than moving the head somewhere arbitrary.
|
|
28947
|
+
*
|
|
28948
|
+
* `source === 'none'` is the refusal condition, NOT `presetId === null`: the
|
|
28949
|
+
* native case has no preset and homes perfectly well.
|
|
28950
|
+
*/
|
|
28951
|
+
var PtzHomePresetSchema = object({
|
|
28952
|
+
presetId: string().nullable(),
|
|
28953
|
+
source: _enum([
|
|
28954
|
+
"operator",
|
|
28955
|
+
"firmware",
|
|
28956
|
+
"native",
|
|
28957
|
+
"none"
|
|
28958
|
+
])
|
|
28827
28959
|
});
|
|
28828
28960
|
DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(PtzMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), array(PtzPresetSchema)), method(object({
|
|
28829
28961
|
deviceId: number(),
|
|
@@ -28841,7 +28973,13 @@ DeviceType.Camera, method(PtzMoveCommandSchema.extend({ deviceId: number() }), _
|
|
|
28841
28973
|
}), _void(), {
|
|
28842
28974
|
kind: "mutation",
|
|
28843
28975
|
auth: "admin"
|
|
28844
|
-
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }),
|
|
28976
|
+
}), method(object({ deviceId: number() }), PtzOptionsSchema), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), PtzHomePresetSchema), method(object({
|
|
28977
|
+
deviceId: number(),
|
|
28978
|
+
presetId: string().nullable()
|
|
28979
|
+
}), _void(), {
|
|
28980
|
+
kind: "mutation",
|
|
28981
|
+
auth: "admin"
|
|
28982
|
+
}), method(object({ deviceId: number() }), PtzPositionSchema), method(object({
|
|
28845
28983
|
deviceId: number(),
|
|
28846
28984
|
enabled: boolean()
|
|
28847
28985
|
}), _void(), { kind: "mutation" });
|
|
@@ -35856,6 +35994,12 @@ Object.freeze({
|
|
|
35856
35994
|
addonId: null,
|
|
35857
35995
|
access: "delete"
|
|
35858
35996
|
},
|
|
35997
|
+
"ptz.getHomePreset": {
|
|
35998
|
+
capName: "ptz",
|
|
35999
|
+
capScope: "device",
|
|
36000
|
+
addonId: null,
|
|
36001
|
+
access: "view"
|
|
36002
|
+
},
|
|
35859
36003
|
"ptz.getOptions": {
|
|
35860
36004
|
capName: "ptz",
|
|
35861
36005
|
capScope: "device",
|
|
@@ -35904,6 +36048,12 @@ Object.freeze({
|
|
|
35904
36048
|
addonId: null,
|
|
35905
36049
|
access: "create"
|
|
35906
36050
|
},
|
|
36051
|
+
"ptz.setHomePreset": {
|
|
36052
|
+
capName: "ptz",
|
|
36053
|
+
capScope: "device",
|
|
36054
|
+
addonId: null,
|
|
36055
|
+
access: "create"
|
|
36056
|
+
},
|
|
35907
36057
|
"ptz.stop": {
|
|
35908
36058
|
capName: "ptz",
|
|
35909
36059
|
capScope: "device",
|
|
@@ -39077,6 +39227,11 @@ Object.freeze({
|
|
|
39077
39227
|
form: "single",
|
|
39078
39228
|
optional: false
|
|
39079
39229
|
}],
|
|
39230
|
+
"ptz.getHomePreset": [{
|
|
39231
|
+
name: "deviceId",
|
|
39232
|
+
form: "single",
|
|
39233
|
+
optional: false
|
|
39234
|
+
}],
|
|
39080
39235
|
"ptz.getOptions": [{
|
|
39081
39236
|
name: "deviceId",
|
|
39082
39237
|
form: "single",
|
|
@@ -39117,6 +39272,11 @@ Object.freeze({
|
|
|
39117
39272
|
form: "single",
|
|
39118
39273
|
optional: false
|
|
39119
39274
|
}],
|
|
39275
|
+
"ptz.setHomePreset": [{
|
|
39276
|
+
name: "deviceId",
|
|
39277
|
+
form: "single",
|
|
39278
|
+
optional: false
|
|
39279
|
+
}],
|
|
39120
39280
|
"ptz.stop": [{
|
|
39121
39281
|
name: "deviceId",
|
|
39122
39282
|
form: "single",
|
|
@@ -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-uDXws1yw.js");
|
|
6
6
|
let node_crypto = require("node:crypto");
|
|
7
7
|
let node_child_process = require("node:child_process");
|
|
8
8
|
//#region src/ingress/tailscale-cli.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as EventCategory, i as BaseAddon, n as networkAccessCapability } from "../dist-
|
|
1
|
+
import { a as EventCategory, i as BaseAddon, n as networkAccessCapability } from "../dist-B0V6gFgL.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { execFile } from "node:child_process";
|
|
4
4
|
import { promisify } from "node:util";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-tailscale",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.111",
|
|
4
4
|
"description": "Tailscale bundle for CamStack — joins the host to a tailnet (client) and exposes the hub via Serve/Funnel (ingress). Multi-entry npm package shipping 2 addons under a single bundle.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|