@sprucelabs/heartwood-view-controllers 119.0.0 → 119.0.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.
@@ -4,5 +4,7 @@ declare const deviceAssert: {
4
4
  wasNotVibrated(vc: AbstractViewController<any>): void;
5
5
  madeCall(vc: AbstractViewController<any>, number: string): void;
6
6
  openedUrl(vc: AbstractViewController<any>, url: string): void;
7
+ isTorchOff(vc: AbstractViewController<any>): void;
8
+ isTorchOn(vc: AbstractViewController<any>, expectedBrightness?: number): void;
7
9
  };
8
10
  export default deviceAssert;
@@ -30,5 +30,20 @@ const deviceAssert = {
30
30
  assert.isTruthy(openedUrl, `You didn't open any urls! Try 'this.device.openUrl(...)'`);
31
31
  assert.isEqual(openedUrl, url, `You opened ${openedUrl} but I expected you to open ${url}!`);
32
32
  },
33
+ isTorchOff(vc) {
34
+ //@ts-ignore
35
+ const device = vc.getDevice();
36
+ const brightness = device.getTorchBrightness();
37
+ assert.isEqual(brightness, 0, `Torch is on! Try 'this.device.turnTorchOff()' to turn it off!`);
38
+ },
39
+ isTorchOn(vc, expectedBrightness) {
40
+ //@ts-ignore
41
+ const device = vc.getDevice();
42
+ const brightness = device.getTorchBrightness();
43
+ assert.isTruthy(brightness, `Torch is off! Try 'this.device.turnTorchOn(...)' to turn it on!`);
44
+ if (expectedBrightness) {
45
+ assert.isEqual(brightness, expectedBrightness, `The brightness on your torch is wrong! Try 'this.device.turnTorchOn(${expectedBrightness})'`);
46
+ }
47
+ },
33
48
  };
34
49
  export default deviceAssert;
@@ -4,5 +4,7 @@ declare const deviceAssert: {
4
4
  wasNotVibrated(vc: AbstractViewController<any>): void;
5
5
  madeCall(vc: AbstractViewController<any>, number: string): void;
6
6
  openedUrl(vc: AbstractViewController<any>, url: string): void;
7
+ isTorchOff(vc: AbstractViewController<any>): void;
8
+ isTorchOn(vc: AbstractViewController<any>, expectedBrightness?: number): void;
7
9
  };
8
10
  export default deviceAssert;
@@ -32,5 +32,20 @@ const deviceAssert = {
32
32
  test_utils_1.assert.isTruthy(openedUrl, `You didn't open any urls! Try 'this.device.openUrl(...)'`);
33
33
  test_utils_1.assert.isEqual(openedUrl, url, `You opened ${openedUrl} but I expected you to open ${url}!`);
34
34
  },
35
+ isTorchOff(vc) {
36
+ //@ts-ignore
37
+ const device = vc.getDevice();
38
+ const brightness = device.getTorchBrightness();
39
+ test_utils_1.assert.isEqual(brightness, 0, `Torch is on! Try 'this.device.turnTorchOff()' to turn it off!`);
40
+ },
41
+ isTorchOn(vc, expectedBrightness) {
42
+ //@ts-ignore
43
+ const device = vc.getDevice();
44
+ const brightness = device.getTorchBrightness();
45
+ test_utils_1.assert.isTruthy(brightness, `Torch is off! Try 'this.device.turnTorchOn(...)' to turn it on!`);
46
+ if (expectedBrightness) {
47
+ test_utils_1.assert.isEqual(brightness, expectedBrightness, `The brightness on your torch is wrong! Try 'this.device.turnTorchOn(${expectedBrightness})'`);
48
+ }
49
+ },
35
50
  };
36
51
  exports.default = deviceAssert;
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "sideEffects": false,
14
14
  "license": "MIT",
15
15
  "description": "All the power of Heartwood in one, convenient package.",
16
- "version": "119.0.0",
16
+ "version": "119.0.2",
17
17
  "skill": {
18
18
  "namespace": "HeartwoodViewControllers",
19
19
  "commandOverrides": {
@@ -75,39 +75,39 @@
75
75
  "@babel/core": "^7.27.1",
76
76
  "@babel/plugin-transform-class-properties": "^7.27.1",
77
77
  "@babel/plugin-transform-runtime": "^7.27.1",
78
- "@babel/preset-env": "^7.27.1",
78
+ "@babel/preset-env": "^7.27.2",
79
79
  "@babel/preset-typescript": "^7.27.1",
80
80
  "@babel/runtime": "^7.27.1",
81
- "@sprucelabs/calendar-utils": "^42.0.686",
82
- "@sprucelabs/error": "^6.0.598",
81
+ "@sprucelabs/calendar-utils": "^42.0.687",
82
+ "@sprucelabs/error": "^6.0.599",
83
83
  "@sprucelabs/globby": "^2.0.502",
84
- "@sprucelabs/mercury-core-events": "^26.0.67",
85
- "@sprucelabs/mercury-types": "^47.2.76",
86
- "@sprucelabs/schema": "^31.0.87",
87
- "@sprucelabs/spruce-core-schemas": "^40.1.679",
88
- "@sprucelabs/spruce-event-utils": "^40.2.85",
89
- "@sprucelabs/spruce-skill-utils": "^31.2.94",
90
- "@sprucelabs/test-utils": "^5.5.45",
84
+ "@sprucelabs/mercury-core-events": "^26.0.68",
85
+ "@sprucelabs/mercury-types": "^47.2.77",
86
+ "@sprucelabs/schema": "^31.0.88",
87
+ "@sprucelabs/spruce-core-schemas": "^40.1.680",
88
+ "@sprucelabs/spruce-event-utils": "^40.2.86",
89
+ "@sprucelabs/spruce-skill-utils": "^31.2.95",
90
+ "@sprucelabs/test-utils": "^5.5.46",
91
91
  "@swc/core": "1.2.103",
92
92
  "babel-loader": "^10.0.0",
93
93
  "babel-plugin-module-resolver": "^5.0.2",
94
94
  "dot-prop": "^9.0.0",
95
95
  "dotenv": "^16.5.0",
96
- "esbuild": "^0.25.3",
96
+ "esbuild": "^0.25.4",
97
97
  "object-set": "^1.0.1",
98
98
  "terser-webpack-plugin": "5.3.1",
99
99
  "uglify-js": "^3.19.3",
100
100
  "webpack": "5.70.0"
101
101
  },
102
102
  "devDependencies": {
103
- "@sprucelabs/esm-postbuild": "^6.0.562",
104
- "@sprucelabs/jest-json-reporter": "^8.0.599",
105
- "@sprucelabs/mercury-client": "^42.0.786",
106
- "@sprucelabs/mercury-event-emitter": "^42.0.786",
107
- "@sprucelabs/resolve-path-aliases": "^2.0.540",
103
+ "@sprucelabs/esm-postbuild": "^6.0.563",
104
+ "@sprucelabs/jest-json-reporter": "^8.0.600",
105
+ "@sprucelabs/mercury-client": "^42.0.787",
106
+ "@sprucelabs/mercury-event-emitter": "^42.0.787",
107
+ "@sprucelabs/resolve-path-aliases": "^2.0.541",
108
108
  "@sprucelabs/semantic-release": "^5.0.2",
109
- "@sprucelabs/test": "^9.0.79",
110
- "@types/node": "^22.15.3",
109
+ "@sprucelabs/test": "^9.0.80",
110
+ "@types/node": "^22.15.18",
111
111
  "@types/terser-webpack-plugin": "^5.2.0",
112
112
  "chokidar-cli": "^3.0.0",
113
113
  "eslint": "^9.26.0",