@apocaliss92/nodelink-js 0.4.16 → 0.4.17

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.
@@ -3,8 +3,8 @@ import {
3
3
  BaichuanRtspServer,
4
4
  ReolinkBaichuanApi,
5
5
  autoDetectDeviceType
6
- } from "../chunk-65HTCC62.js";
7
- import "../chunk-2JNXKT3C.js";
6
+ } from "../chunk-EF6BCSCZ.js";
7
+ import "../chunk-S2UTGNFN.js";
8
8
  import {
9
9
  __require
10
10
  } from "../chunk-C57QV7IL.js";
package/dist/index.cjs CHANGED
@@ -5723,11 +5723,20 @@ async function captureModelFixtures(params) {
5723
5723
  return void 0;
5724
5724
  }
5725
5725
  }
5726
- const info = await capture(
5726
+ const channelInfo = await capture(
5727
5727
  "getInfo",
5728
- () => api.getInfo(channel),
5729
- (v) => writeJsonSafe(path4.join(outDir, "device-info.json"), v)
5728
+ () => api.getInfo(channel)
5730
5729
  );
5730
+ const baseInfo = await capture(
5731
+ "getInfoBase",
5732
+ () => api.getInfo()
5733
+ );
5734
+ const mergedInfo = { ...baseInfo ?? {} };
5735
+ for (const [k, v] of Object.entries(channelInfo ?? {})) {
5736
+ if (v !== void 0 && v !== null && v !== "") mergedInfo[k] = v;
5737
+ }
5738
+ const info = Object.keys(mergedInfo).length > 0 ? mergedInfo : void 0;
5739
+ if (info) writeJsonSafe(path4.join(outDir, "device-info.json"), info);
5731
5740
  const support = await capture(
5732
5741
  "getSupportInfo",
5733
5742
  () => api.getSupportInfo(),
@@ -5843,6 +5852,76 @@ async function captureModelFixtures(params) {
5843
5852
  () => api.getDualLensChannelInfo(channel),
5844
5853
  (v) => writeJsonSafe(path4.join(outDir, "dual-lens-info.json"), v)
5845
5854
  );
5855
+ await capture(
5856
+ "getEncOptions",
5857
+ () => api.getEncOptions(channel),
5858
+ (v) => writeJsonSafe(path4.join(outDir, "enc-options.json"), v)
5859
+ );
5860
+ await capture(
5861
+ "getEnc",
5862
+ () => api.getEnc(channel),
5863
+ (v) => writeJsonSafe(path4.join(outDir, "enc.json"), v)
5864
+ );
5865
+ await capture(
5866
+ "getStreamInfoList",
5867
+ () => api.getStreamInfoList(channel),
5868
+ (v) => writeJsonSafe(path4.join(outDir, "stream-info-list.json"), v)
5869
+ );
5870
+ await capture(
5871
+ "getAutoFocus",
5872
+ () => api.getAutoFocus(channel),
5873
+ (v) => writeJsonSafe(path4.join(outDir, "autofocus.json"), v)
5874
+ );
5875
+ await capture(
5876
+ "getLedState",
5877
+ () => api.getLedState(channel),
5878
+ (v) => writeJsonSafe(path4.join(outDir, "led-state.json"), v)
5879
+ );
5880
+ await capture(
5881
+ "getIrLights",
5882
+ () => api.getIrLights(channel),
5883
+ (v) => writeJsonSafe(path4.join(outDir, "ir-lights.json"), v)
5884
+ );
5885
+ await capture(
5886
+ "getImage",
5887
+ () => api.getImage(channel),
5888
+ (v) => writeJsonSafe(path4.join(outDir, "image.json"), v)
5889
+ );
5890
+ await capture(
5891
+ "getIsp",
5892
+ () => api.getIsp(channel),
5893
+ (v) => writeJsonSafe(path4.join(outDir, "isp.json"), v)
5894
+ );
5895
+ await capture(
5896
+ "getDayNightThreshold",
5897
+ () => api.getDayNightThreshold(channel),
5898
+ (v) => writeJsonSafe(path4.join(outDir, "day-night-threshold.json"), v)
5899
+ );
5900
+ await capture(
5901
+ "getMask",
5902
+ () => api.getMask(channel),
5903
+ (v) => writeJsonSafe(path4.join(outDir, "mask.json"), v)
5904
+ );
5905
+ await capture(
5906
+ "getAudioCfg",
5907
+ () => api.getAudioCfg(channel),
5908
+ (v) => writeJsonSafe(path4.join(outDir, "audio-cfg.json"), v)
5909
+ );
5910
+ await capture(
5911
+ "getOsdDatetime",
5912
+ () => api.getOsdDatetime(channel),
5913
+ (v) => writeJsonSafe(path4.join(outDir, "osd-datetime.json"), v)
5914
+ );
5915
+ await capture(
5916
+ "getPtzPosition",
5917
+ () => api.getPtzPosition(channel),
5918
+ (v) => writeJsonSafe(path4.join(outDir, "ptz-position.json"), v)
5919
+ );
5920
+ await capture(
5921
+ "getZoomFocus",
5922
+ () => api.getZoomFocus(channel),
5923
+ (v) => writeJsonSafe(path4.join(outDir, "zoom-focus.json"), v)
5924
+ );
5846
5925
  if (!params.skipStreamCombinationTest) await capture("streamCombinationTest", async () => {
5847
5926
  let dualLensInfo;
5848
5927
  try {
@@ -19194,7 +19273,15 @@ var applyFloodlightSettingsToXml = (xml, settings) => {
19194
19273
  // src/reolink/baichuan/ReolinkBaichuanApi.ts
19195
19274
  var DUAL_LENS_DUAL_MOTION_MODELS = /* @__PURE__ */ new Set([
19196
19275
  "Reolink Duo PoE",
19197
- "Reolink Duo WiFi"
19276
+ "Reolink Duo WiFi",
19277
+ // Duo 2 family
19278
+ "Reolink Duo 2 PoE",
19279
+ "Reolink Duo 2 WiFi",
19280
+ // Duo 3 family — physically dual-sensor, marketed as a stitched 16MP feed
19281
+ // (the firmware exposes a single logical channel, so callers should still
19282
+ // check `getDualLensChannelInfo` for the actual channel topology).
19283
+ "Reolink Duo 3 PoE",
19284
+ "Reolink Duo 3 WiFi"
19198
19285
  ]);
19199
19286
  var DUAL_LENS_SINGLE_MOTION_MODELS = /* @__PURE__ */ new Set([
19200
19287
  "Reolink TrackMix",
@@ -19209,7 +19296,10 @@ var DUAL_LENS_MODELS = /* @__PURE__ */ new Set([
19209
19296
  ]);
19210
19297
  var isDualLenseModel = (model) => {
19211
19298
  const lower = model.toLowerCase();
19212
- return Array.from(DUAL_LENS_MODELS).some((m) => m.toLowerCase() === lower) || lower.includes("trackmix") || lower.includes("trackflex");
19299
+ if (Array.from(DUAL_LENS_MODELS).some((m) => m.toLowerCase() === lower)) {
19300
+ return true;
19301
+ }
19302
+ return lower.includes("trackmix") || lower.includes("trackflex") || /\bduo\b/.test(lower);
19213
19303
  };
19214
19304
  var NVR_HUB_EXACT_TYPES = ["NVR", "WIFI_NVR", "HOMEHUB"];
19215
19305
  var NVR_HUB_MODEL_PATTERNS = [
@@ -27008,6 +27098,13 @@ ${xml}`
27008
27098
  model = deviceInfo.type?.trim();
27009
27099
  } catch {
27010
27100
  }
27101
+ if (!model) {
27102
+ try {
27103
+ const deviceInfoBase = await this.getInfo(void 0, { tags: ["type"] });
27104
+ model = deviceInfoBase.type?.trim();
27105
+ } catch {
27106
+ }
27107
+ }
27011
27108
  try {
27012
27109
  const capabilities = await this.getDeviceCapabilities(channel);
27013
27110
  channelNum = capabilities.support?.channelNum;