@apocaliss92/scrypted-reolink-native 0.5.7 → 0.5.9

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/plugin.zip CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apocaliss92/scrypted-reolink-native",
3
- "version": "0.5.7",
3
+ "version": "0.5.9",
4
4
  "description": "Use any reolink camera with Scrypted, even older/unsupported models without HTTP protocol support",
5
5
  "author": "@apocaliss92",
6
6
  "license": "Apache",
@@ -47,7 +47,7 @@
47
47
  "@scrypted/common": "file:../../scrypted/common",
48
48
  "@scrypted/rtsp": "file:../../scrypted/plugins/rtsp",
49
49
  "@scrypted/sdk": "^0.3.118",
50
- "@apocaliss92/reolink-baichuan-js": "file:./reolink-baichuan-js"
50
+ "@apocaliss92/nodelink-js": "^0.4.5"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/node": "^22.0.2"
@@ -1,27 +1,20 @@
1
1
  #!/bin/bash
2
2
  #
3
- # Prepublish: build linked library, reinstall, bump plugin patch version.
4
- # Runs automatically before npm publish via prepublishOnly.
3
+ # Prepublish: install deps (including @apocaliss92/nodelink-js from npm),
4
+ # bump plugin patch version. Runs automatically before npm publish via prepublishOnly.
5
5
  #
6
6
 
7
7
  set -e
8
8
 
9
9
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
10
- LIB_DIR="${SCRIPT_DIR}/../reolink-baichuan-js"
11
-
12
- # ── Step 1: Build the library ───────────────────────────────────
13
- echo "Building reolink-baichuan-js..."
14
- cd "${LIB_DIR}"
15
- npm run build
16
- echo "Library built."
10
+ cd "${SCRIPT_DIR}"
17
11
 
18
- # ── Step 2: Reinstall in plugin (picks up fresh dist/) ──────────
12
+ # ── Step 1: Install dependencies (pulls latest lib from npm) ────
19
13
  echo "Installing dependencies..."
20
- cd "${SCRIPT_DIR}"
21
14
  npm install
22
15
  echo "Dependencies installed."
23
16
 
24
- # ── Step 3: Bump plugin patch version ───────────────────────────
17
+ # ── Step 2: Bump plugin patch version ───────────────────────────
25
18
  echo "Bumping plugin patch version..."
26
19
  npm version patch --no-git-tag-version
27
20
  NEW_VERSION=$(node -p "require('./package.json').version")
@@ -2,7 +2,7 @@ import type {
2
2
  BaichuanClientOptions,
3
3
  ReolinkBaichuanApi,
4
4
  ReolinkSimpleEvent,
5
- } from "@apocaliss92/reolink-baichuan-js" with { "resolution-mode": "import" };
5
+ } from "@apocaliss92/nodelink-js" with { "resolution-mode": "import" };
6
6
  import { ScryptedDeviceBase } from "@scrypted/sdk";
7
7
  import { createBaichuanApi, type BaichuanTransport } from "./connect";
8
8
  import { StreamManager } from "./stream-utils";
package/src/camera.ts CHANGED
@@ -9,7 +9,7 @@ import type {
9
9
  ReolinkSupportedStream,
10
10
  SleepStatus,
11
11
  StreamSamplingSelection,
12
- } from "@apocaliss92/reolink-baichuan-js" with { "resolution-mode": "import" };
12
+ } from "@apocaliss92/nodelink-js" with { "resolution-mode": "import" };
13
13
  import sdk, {
14
14
  BinarySensor,
15
15
  Camera,
@@ -1097,7 +1097,7 @@ export class ReolinkCamera
1097
1097
  // Native mode: use Baichuan CoverPreview API (cmd_id=298) - fast thumbnail extraction
1098
1098
  // Dynamic import to avoid CommonJS/ESM issues
1099
1099
  const { parseRecordingFileName } =
1100
- await import("@apocaliss92/reolink-baichuan-js");
1100
+ await import("@apocaliss92/nodelink-js");
1101
1101
 
1102
1102
  // Parse filename to extract start time for CoverPreview
1103
1103
  const parsed = parseRecordingFileName(thumbnailId);
@@ -1636,7 +1636,7 @@ export class ReolinkCamera
1636
1636
  try {
1637
1637
  const api = await this.ensureClient();
1638
1638
  const { captureModelFixtures: capture } =
1639
- await import("@apocaliss92/reolink-baichuan-js");
1639
+ await import("@apocaliss92/nodelink-js");
1640
1640
  const result = await capture({
1641
1641
  api,
1642
1642
  channel,
package/src/connect.ts CHANGED
@@ -2,7 +2,7 @@ import type {
2
2
  BaichuanTransport as BaichuanTransportParent,
3
3
  BaichuanClientOptions,
4
4
  ReolinkBaichuanApi,
5
- } from "@apocaliss92/reolink-baichuan-js" with { "resolution-mode": "import" };
5
+ } from "@apocaliss92/nodelink-js" with { "resolution-mode": "import" };
6
6
 
7
7
  export type BaichuanTransport = BaichuanTransportParent;
8
8
 
@@ -28,7 +28,7 @@ export async function createBaichuanApi(props: {
28
28
  const { inputs, transport } = props;
29
29
  const { logger } = inputs;
30
30
  const { ReolinkBaichuanApi } =
31
- await import("@apocaliss92/reolink-baichuan-js");
31
+ await import("@apocaliss92/nodelink-js");
32
32
 
33
33
  const base: BaichuanClientOptions = {
34
34
  host: inputs.host,
@@ -1,4 +1,4 @@
1
- import type { DebugOptions } from "@apocaliss92/reolink-baichuan-js" with { "resolution-mode": "import" };
1
+ import type { DebugOptions } from "@apocaliss92/nodelink-js" with { "resolution-mode": "import" };
2
2
 
3
3
  /**
4
4
  * User-friendly debug log options enum
@@ -1,4 +1,4 @@
1
- import type { ReolinkBaichuanApi } from "@apocaliss92/reolink-baichuan-js" with {
1
+ import type { ReolinkBaichuanApi } from "@apocaliss92/nodelink-js" with {
2
2
  "resolution-mode": "import",
3
3
  };
4
4
  import sdk, {
package/src/intercom.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ReolinkBaichuanApi } from "@apocaliss92/reolink-baichuan-js" with {
1
+ import type { ReolinkBaichuanApi } from "@apocaliss92/nodelink-js" with {
2
2
  "resolution-mode": "import",
3
3
  };
4
4
  import sdk, {
package/src/main.ts CHANGED
@@ -11,7 +11,7 @@ if (typeof globalThis.File === "undefined") {
11
11
  };
12
12
  }
13
13
 
14
- import type { AutoDetectMode, ReolinkBaichuanApi, DiscoveredDevice as LibDiscoveredDevice, AutodiscoveryClient } from "@apocaliss92/reolink-baichuan-js" with {
14
+ import type { AutoDetectMode, ReolinkBaichuanApi, DiscoveredDevice as LibDiscoveredDevice, AutodiscoveryClient } from "@apocaliss92/nodelink-js" with {
15
15
  "resolution-mode": "import"
16
16
  };
17
17
  import sdk, {
@@ -90,7 +90,7 @@ class ReolinkNativePlugin
90
90
  }
91
91
 
92
92
  private async startBackgroundDiscovery() {
93
- const { AutodiscoveryClient: AutodiscoveryClientClass } = await import("@apocaliss92/reolink-baichuan-js");
93
+ const { AutodiscoveryClient: AutodiscoveryClientClass } = await import("@apocaliss92/nodelink-js");
94
94
 
95
95
  // Stop previous client if settings changed
96
96
  this.autodiscoveryClient?.stop();
@@ -230,7 +230,7 @@ class ReolinkNativePlugin
230
230
  `[AutoDetect] Starting device type detection for ${ipAddress}...${forceType ? ` (forcing type: ${forceType})` : ""}`,
231
231
  );
232
232
  const { autoDetectDeviceType } =
233
- await import("@apocaliss92/reolink-baichuan-js");
233
+ await import("@apocaliss92/nodelink-js");
234
234
  // 'Auto', 'NVR', 'Battery Camera', 'Regular Camera
235
235
  const mode: AutoDetectMode =
236
236
  forceType === "Auto"
package/src/multiFocal.ts CHANGED
@@ -5,7 +5,7 @@ import type {
5
5
  ReolinkBaichuanApi,
6
6
  ReolinkSimpleEvent,
7
7
  SleepStatus
8
- } from "@apocaliss92/reolink-baichuan-js" with { "resolution-mode": "import" };
8
+ } from "@apocaliss92/nodelink-js" with { "resolution-mode": "import" };
9
9
  import sdk, {
10
10
  Device,
11
11
  DeviceProvider,
package/src/nvr.ts CHANGED
@@ -2,7 +2,7 @@ import type {
2
2
  ReolinkBaichuanApi,
3
3
  ReolinkBaichuanDeviceSummary,
4
4
  ReolinkSimpleEvent,
5
- } from "@apocaliss92/reolink-baichuan-js" with { "resolution-mode": "import" };
5
+ } from "@apocaliss92/nodelink-js" with { "resolution-mode": "import" };
6
6
  import sdk, {
7
7
  AdoptDevice,
8
8
  Device,
@@ -626,7 +626,7 @@ export class ReolinkNativeNvrDevice
626
626
  const { uid } = entry.deviceData;
627
627
 
628
628
  const { ReolinkBaichuanApi } =
629
- await import("@apocaliss92/reolink-baichuan-js");
629
+ await import("@apocaliss92/nodelink-js");
630
630
  const transport = "tcp";
631
631
  const baichuanApi = new ReolinkBaichuanApi({
632
632
  host: this.storageSettings.values.ipAddress,
package/src/presets.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { PtzPreset } from "@apocaliss92/reolink-baichuan-js" with { "resolution-mode": "import" };
1
+ import type { PtzPreset } from "@apocaliss92/nodelink-js" with { "resolution-mode": "import" };
2
2
  import type { ReolinkCamera } from "./camera";
3
3
 
4
4
  export type PtzCapabilitiesShape = {
@@ -4,7 +4,7 @@ import type {
4
4
  ReolinkBaichuanApi,
5
5
  Rfc4571TcpServer,
6
6
  StreamProfile,
7
- } from "@apocaliss92/reolink-baichuan-js" with { "resolution-mode": "import" };
7
+ } from "@apocaliss92/nodelink-js" with { "resolution-mode": "import" };
8
8
 
9
9
  import sdk, {
10
10
  type MediaObject,
@@ -409,7 +409,7 @@ export class StreamManager {
409
409
  : await this.opts.createStreamClient(nonCompositeApiKey);
410
410
 
411
411
  const { createRfc4571TcpServer } =
412
- await import("@apocaliss92/reolink-baichuan-js");
412
+ await import("@apocaliss92/nodelink-js");
413
413
 
414
414
  const { username, password } = this.opts.credentials;
415
415
 
package/src/utils.ts CHANGED
@@ -3,7 +3,7 @@ import type {
3
3
  RecordingFile,
4
4
  ReolinkDeviceInfo,
5
5
  ReolinkSupportedStream,
6
- } from "@apocaliss92/reolink-baichuan-js" with { "resolution-mode": "import" };
6
+ } from "@apocaliss92/nodelink-js" with { "resolution-mode": "import" };
7
7
  import sdk, {
8
8
  DeviceBase,
9
9
  HttpRequest,
@@ -383,7 +383,7 @@ let baichuanRuntimePromise:
383
383
 
384
384
  const getBaichuanRuntime = async () => {
385
385
  if (!baichuanRuntimePromise) {
386
- baichuanRuntimePromise = import("@apocaliss92/reolink-baichuan-js") as any;
386
+ baichuanRuntimePromise = import("@apocaliss92/nodelink-js") as any;
387
387
  }
388
388
  return baichuanRuntimePromise;
389
389
  };