@tomorrowos/sdk 0.6.1 → 0.6.2

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.
@@ -889,7 +889,7 @@ export class TomorrowOS extends EventEmitter {
889
889
  }
890
890
  }
891
891
  async captureDeviceScreenshot(deviceId) {
892
- const result = await this.sendDeviceCommand(deviceId, "device.screenshot", {});
892
+ const result = await this.sendDeviceCommand(deviceId, "device.captureScreen", {});
893
893
  if (result.status === "failed") {
894
894
  throw new Error(String(result.error ?? "Screenshot failed"));
895
895
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomorrowos/sdk",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "TomorrowOS CMS server SDK - WebSocket transport, pairing, device commands, optional static CMS UI. Includes CLI (tomorrowos init / build) and starter templates.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "my-cms",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "CMS server on @tomorrowos/sdk. Add your UI (React, static files, etc.) alongside this server.",
5
5
  "private": true,
6
6
  "type": "module",
@@ -10,7 +10,7 @@
10
10
  "build-player": "tomorrowos build --platform tizen"
11
11
  },
12
12
  "dependencies": {
13
- "@tomorrowos/sdk": "^0.6.1",
13
+ "@tomorrowos/sdk": "^0.6.2",
14
14
  "dotenv": "^17.2.3"
15
15
  },
16
16
  "devDependencies": {
@@ -1099,7 +1099,8 @@ async function captureDeviceScreenshot(deviceId) {
1099
1099
  alert(data.error || "Screenshot failed");
1100
1100
  return;
1101
1101
  }
1102
- openScreenshotModal(deviceId, data.screenshot);
1102
+ const capturedAt = formatDateTimeSeconds(data.screenshot?.capturedAt);
1103
+ alert(`Screenshot captured successfully${capturedAt ? ` at ${capturedAt}` : ""}.`);
1103
1104
  }
1104
1105
 
1105
1106
  async function viewLatestScreenshot(deviceId) {