@ray-js/lock-sdk 1.2.1-beta.5 → 1.2.1-beta.7

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.
@@ -1,9 +1,16 @@
1
+ import { updateDeviceStatus } from "../state/device-status";
1
2
  export function updateConfigForRuntime(runtime, options) {
2
3
  const cfg = runtime.config;
4
+ let needUpdateDeviceStatus = false;
5
+ if (typeof options?.notSupportWake === "boolean" &&
6
+ cfg.notSupportWake !== options.notSupportWake) {
7
+ needUpdateDeviceStatus = true;
8
+ }
3
9
  Object.keys(options).forEach((key) => {
4
10
  const value = options[key];
5
11
  if (value !== undefined) {
6
12
  cfg[key] = value;
7
13
  }
8
14
  });
15
+ needUpdateDeviceStatus && updateDeviceStatus(runtime);
9
16
  }
@@ -18,7 +18,7 @@ import { ipc, yuChannelSyncSingleSync } from "../../platform";
18
18
  import { sdkLog } from "../../utils/sdk-log";
19
19
  import { ProductCommunicationType, RotateType } from "../../constant";
20
20
  import { isHarmony } from "../../utils";
21
- import { getError } from "src/utils/errors";
21
+ import { getError } from "../../utils/errors";
22
22
  export const initState = async (runtime) => {
23
23
  const { devInfo: { dps, devId, yuNetState }, dpSchema, } = runtime.config;
24
24
  const startedAt = Date.now();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/lock-sdk",
3
- "version": "1.2.1-beta.5",
3
+ "version": "1.2.1-beta.7",
4
4
  "files": [
5
5
  "lib",
6
6
  "LICENSE.md"