govee-toolkit 0.1.0 → 0.3.0
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/README.md +1 -0
- package/binding.cjs +54 -54
- package/binding.d.cts +59 -24
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -14,6 +14,7 @@ wire.
|
|
|
14
14
|
|
|
15
15
|
[](https://crates.io/crates/govee-toolkit)
|
|
16
16
|
[](https://crates.io/crates/govee-toolkit-cli)
|
|
17
|
+
[](https://crates.io/crates/govee-toolkit-dmx)
|
|
17
18
|
[](https://pypi.org/project/govee-toolkit/)
|
|
18
19
|
[](https://www.npmjs.com/package/govee-toolkit)
|
|
19
20
|
|
package/binding.cjs
CHANGED
|
@@ -89,8 +89,8 @@ function requireNative() {
|
|
|
89
89
|
try {
|
|
90
90
|
const binding = require('govee-toolkit-android-arm64')
|
|
91
91
|
const bindingPackageVersion = require('govee-toolkit-android-arm64/package.json').version
|
|
92
|
-
if (bindingPackageVersion !== '0.
|
|
93
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
92
|
+
if (bindingPackageVersion !== '0.3.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
93
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
94
94
|
}
|
|
95
95
|
return binding
|
|
96
96
|
} catch (e) {
|
|
@@ -105,8 +105,8 @@ function requireNative() {
|
|
|
105
105
|
try {
|
|
106
106
|
const binding = require('govee-toolkit-android-arm-eabi')
|
|
107
107
|
const bindingPackageVersion = require('govee-toolkit-android-arm-eabi/package.json').version
|
|
108
|
-
if (bindingPackageVersion !== '0.
|
|
109
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
108
|
+
if (bindingPackageVersion !== '0.3.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
109
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
110
110
|
}
|
|
111
111
|
return binding
|
|
112
112
|
} catch (e) {
|
|
@@ -126,8 +126,8 @@ function requireNative() {
|
|
|
126
126
|
try {
|
|
127
127
|
const binding = require('govee-toolkit-win32-x64-gnu')
|
|
128
128
|
const bindingPackageVersion = require('govee-toolkit-win32-x64-gnu/package.json').version
|
|
129
|
-
if (bindingPackageVersion !== '0.
|
|
130
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
129
|
+
if (bindingPackageVersion !== '0.3.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
130
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
131
131
|
}
|
|
132
132
|
return binding
|
|
133
133
|
} catch (e) {
|
|
@@ -142,8 +142,8 @@ function requireNative() {
|
|
|
142
142
|
try {
|
|
143
143
|
const binding = require('govee-toolkit-win32-x64-msvc')
|
|
144
144
|
const bindingPackageVersion = require('govee-toolkit-win32-x64-msvc/package.json').version
|
|
145
|
-
if (bindingPackageVersion !== '0.
|
|
146
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
145
|
+
if (bindingPackageVersion !== '0.3.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
146
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
147
147
|
}
|
|
148
148
|
return binding
|
|
149
149
|
} catch (e) {
|
|
@@ -159,8 +159,8 @@ function requireNative() {
|
|
|
159
159
|
try {
|
|
160
160
|
const binding = require('govee-toolkit-win32-ia32-msvc')
|
|
161
161
|
const bindingPackageVersion = require('govee-toolkit-win32-ia32-msvc/package.json').version
|
|
162
|
-
if (bindingPackageVersion !== '0.
|
|
163
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
162
|
+
if (bindingPackageVersion !== '0.3.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
163
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
164
164
|
}
|
|
165
165
|
return binding
|
|
166
166
|
} catch (e) {
|
|
@@ -175,8 +175,8 @@ function requireNative() {
|
|
|
175
175
|
try {
|
|
176
176
|
const binding = require('govee-toolkit-win32-arm64-msvc')
|
|
177
177
|
const bindingPackageVersion = require('govee-toolkit-win32-arm64-msvc/package.json').version
|
|
178
|
-
if (bindingPackageVersion !== '0.
|
|
179
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
178
|
+
if (bindingPackageVersion !== '0.3.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
179
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
180
180
|
}
|
|
181
181
|
return binding
|
|
182
182
|
} catch (e) {
|
|
@@ -194,8 +194,8 @@ function requireNative() {
|
|
|
194
194
|
try {
|
|
195
195
|
const binding = require('govee-toolkit-darwin-universal')
|
|
196
196
|
const bindingPackageVersion = require('govee-toolkit-darwin-universal/package.json').version
|
|
197
|
-
if (bindingPackageVersion !== '0.
|
|
198
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
197
|
+
if (bindingPackageVersion !== '0.3.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
198
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
199
199
|
}
|
|
200
200
|
return binding
|
|
201
201
|
} catch (e) {
|
|
@@ -210,8 +210,8 @@ function requireNative() {
|
|
|
210
210
|
try {
|
|
211
211
|
const binding = require('govee-toolkit-darwin-x64')
|
|
212
212
|
const bindingPackageVersion = require('govee-toolkit-darwin-x64/package.json').version
|
|
213
|
-
if (bindingPackageVersion !== '0.
|
|
214
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
213
|
+
if (bindingPackageVersion !== '0.3.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
214
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
215
215
|
}
|
|
216
216
|
return binding
|
|
217
217
|
} catch (e) {
|
|
@@ -226,8 +226,8 @@ function requireNative() {
|
|
|
226
226
|
try {
|
|
227
227
|
const binding = require('govee-toolkit-darwin-arm64')
|
|
228
228
|
const bindingPackageVersion = require('govee-toolkit-darwin-arm64/package.json').version
|
|
229
|
-
if (bindingPackageVersion !== '0.
|
|
230
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
229
|
+
if (bindingPackageVersion !== '0.3.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
230
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
231
231
|
}
|
|
232
232
|
return binding
|
|
233
233
|
} catch (e) {
|
|
@@ -246,8 +246,8 @@ function requireNative() {
|
|
|
246
246
|
try {
|
|
247
247
|
const binding = require('govee-toolkit-freebsd-x64')
|
|
248
248
|
const bindingPackageVersion = require('govee-toolkit-freebsd-x64/package.json').version
|
|
249
|
-
if (bindingPackageVersion !== '0.
|
|
250
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
249
|
+
if (bindingPackageVersion !== '0.3.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
250
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
251
251
|
}
|
|
252
252
|
return binding
|
|
253
253
|
} catch (e) {
|
|
@@ -262,8 +262,8 @@ function requireNative() {
|
|
|
262
262
|
try {
|
|
263
263
|
const binding = require('govee-toolkit-freebsd-arm64')
|
|
264
264
|
const bindingPackageVersion = require('govee-toolkit-freebsd-arm64/package.json').version
|
|
265
|
-
if (bindingPackageVersion !== '0.
|
|
266
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
265
|
+
if (bindingPackageVersion !== '0.3.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
266
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
267
267
|
}
|
|
268
268
|
return binding
|
|
269
269
|
} catch (e) {
|
|
@@ -283,8 +283,8 @@ function requireNative() {
|
|
|
283
283
|
try {
|
|
284
284
|
const binding = require('govee-toolkit-linux-x64-musl')
|
|
285
285
|
const bindingPackageVersion = require('govee-toolkit-linux-x64-musl/package.json').version
|
|
286
|
-
if (bindingPackageVersion !== '0.
|
|
287
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
286
|
+
if (bindingPackageVersion !== '0.3.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
287
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
288
288
|
}
|
|
289
289
|
return binding
|
|
290
290
|
} catch (e) {
|
|
@@ -299,8 +299,8 @@ function requireNative() {
|
|
|
299
299
|
try {
|
|
300
300
|
const binding = require('govee-toolkit-linux-x64-gnu')
|
|
301
301
|
const bindingPackageVersion = require('govee-toolkit-linux-x64-gnu/package.json').version
|
|
302
|
-
if (bindingPackageVersion !== '0.
|
|
303
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
302
|
+
if (bindingPackageVersion !== '0.3.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
303
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
304
304
|
}
|
|
305
305
|
return binding
|
|
306
306
|
} catch (e) {
|
|
@@ -317,8 +317,8 @@ function requireNative() {
|
|
|
317
317
|
try {
|
|
318
318
|
const binding = require('govee-toolkit-linux-arm64-musl')
|
|
319
319
|
const bindingPackageVersion = require('govee-toolkit-linux-arm64-musl/package.json').version
|
|
320
|
-
if (bindingPackageVersion !== '0.
|
|
321
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
320
|
+
if (bindingPackageVersion !== '0.3.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
321
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
322
322
|
}
|
|
323
323
|
return binding
|
|
324
324
|
} catch (e) {
|
|
@@ -333,8 +333,8 @@ function requireNative() {
|
|
|
333
333
|
try {
|
|
334
334
|
const binding = require('govee-toolkit-linux-arm64-gnu')
|
|
335
335
|
const bindingPackageVersion = require('govee-toolkit-linux-arm64-gnu/package.json').version
|
|
336
|
-
if (bindingPackageVersion !== '0.
|
|
337
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
336
|
+
if (bindingPackageVersion !== '0.3.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
337
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
338
338
|
}
|
|
339
339
|
return binding
|
|
340
340
|
} catch (e) {
|
|
@@ -351,8 +351,8 @@ function requireNative() {
|
|
|
351
351
|
try {
|
|
352
352
|
const binding = require('govee-toolkit-linux-arm-musleabihf')
|
|
353
353
|
const bindingPackageVersion = require('govee-toolkit-linux-arm-musleabihf/package.json').version
|
|
354
|
-
if (bindingPackageVersion !== '0.
|
|
355
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
354
|
+
if (bindingPackageVersion !== '0.3.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
355
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
356
356
|
}
|
|
357
357
|
return binding
|
|
358
358
|
} catch (e) {
|
|
@@ -367,8 +367,8 @@ function requireNative() {
|
|
|
367
367
|
try {
|
|
368
368
|
const binding = require('govee-toolkit-linux-arm-gnueabihf')
|
|
369
369
|
const bindingPackageVersion = require('govee-toolkit-linux-arm-gnueabihf/package.json').version
|
|
370
|
-
if (bindingPackageVersion !== '0.
|
|
371
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
370
|
+
if (bindingPackageVersion !== '0.3.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
371
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
372
372
|
}
|
|
373
373
|
return binding
|
|
374
374
|
} catch (e) {
|
|
@@ -385,8 +385,8 @@ function requireNative() {
|
|
|
385
385
|
try {
|
|
386
386
|
const binding = require('govee-toolkit-linux-loong64-musl')
|
|
387
387
|
const bindingPackageVersion = require('govee-toolkit-linux-loong64-musl/package.json').version
|
|
388
|
-
if (bindingPackageVersion !== '0.
|
|
389
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
388
|
+
if (bindingPackageVersion !== '0.3.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
389
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
390
390
|
}
|
|
391
391
|
return binding
|
|
392
392
|
} catch (e) {
|
|
@@ -401,8 +401,8 @@ function requireNative() {
|
|
|
401
401
|
try {
|
|
402
402
|
const binding = require('govee-toolkit-linux-loong64-gnu')
|
|
403
403
|
const bindingPackageVersion = require('govee-toolkit-linux-loong64-gnu/package.json').version
|
|
404
|
-
if (bindingPackageVersion !== '0.
|
|
405
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
404
|
+
if (bindingPackageVersion !== '0.3.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
405
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
406
406
|
}
|
|
407
407
|
return binding
|
|
408
408
|
} catch (e) {
|
|
@@ -419,8 +419,8 @@ function requireNative() {
|
|
|
419
419
|
try {
|
|
420
420
|
const binding = require('govee-toolkit-linux-riscv64-musl')
|
|
421
421
|
const bindingPackageVersion = require('govee-toolkit-linux-riscv64-musl/package.json').version
|
|
422
|
-
if (bindingPackageVersion !== '0.
|
|
423
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
422
|
+
if (bindingPackageVersion !== '0.3.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
423
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
424
424
|
}
|
|
425
425
|
return binding
|
|
426
426
|
} catch (e) {
|
|
@@ -435,8 +435,8 @@ function requireNative() {
|
|
|
435
435
|
try {
|
|
436
436
|
const binding = require('govee-toolkit-linux-riscv64-gnu')
|
|
437
437
|
const bindingPackageVersion = require('govee-toolkit-linux-riscv64-gnu/package.json').version
|
|
438
|
-
if (bindingPackageVersion !== '0.
|
|
439
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
438
|
+
if (bindingPackageVersion !== '0.3.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
439
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
440
440
|
}
|
|
441
441
|
return binding
|
|
442
442
|
} catch (e) {
|
|
@@ -452,8 +452,8 @@ function requireNative() {
|
|
|
452
452
|
try {
|
|
453
453
|
const binding = require('govee-toolkit-linux-ppc64-gnu')
|
|
454
454
|
const bindingPackageVersion = require('govee-toolkit-linux-ppc64-gnu/package.json').version
|
|
455
|
-
if (bindingPackageVersion !== '0.
|
|
456
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
455
|
+
if (bindingPackageVersion !== '0.3.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
456
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
457
457
|
}
|
|
458
458
|
return binding
|
|
459
459
|
} catch (e) {
|
|
@@ -468,8 +468,8 @@ function requireNative() {
|
|
|
468
468
|
try {
|
|
469
469
|
const binding = require('govee-toolkit-linux-s390x-gnu')
|
|
470
470
|
const bindingPackageVersion = require('govee-toolkit-linux-s390x-gnu/package.json').version
|
|
471
|
-
if (bindingPackageVersion !== '0.
|
|
472
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
471
|
+
if (bindingPackageVersion !== '0.3.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
472
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
473
473
|
}
|
|
474
474
|
return binding
|
|
475
475
|
} catch (e) {
|
|
@@ -488,8 +488,8 @@ function requireNative() {
|
|
|
488
488
|
try {
|
|
489
489
|
const binding = require('govee-toolkit-openharmony-arm64')
|
|
490
490
|
const bindingPackageVersion = require('govee-toolkit-openharmony-arm64/package.json').version
|
|
491
|
-
if (bindingPackageVersion !== '0.
|
|
492
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
491
|
+
if (bindingPackageVersion !== '0.3.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
492
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
493
493
|
}
|
|
494
494
|
return binding
|
|
495
495
|
} catch (e) {
|
|
@@ -504,8 +504,8 @@ function requireNative() {
|
|
|
504
504
|
try {
|
|
505
505
|
const binding = require('govee-toolkit-openharmony-x64')
|
|
506
506
|
const bindingPackageVersion = require('govee-toolkit-openharmony-x64/package.json').version
|
|
507
|
-
if (bindingPackageVersion !== '0.
|
|
508
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
507
|
+
if (bindingPackageVersion !== '0.3.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
508
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
509
509
|
}
|
|
510
510
|
return binding
|
|
511
511
|
} catch (e) {
|
|
@@ -520,8 +520,8 @@ function requireNative() {
|
|
|
520
520
|
try {
|
|
521
521
|
const binding = require('govee-toolkit-openharmony-arm')
|
|
522
522
|
const bindingPackageVersion = require('govee-toolkit-openharmony-arm/package.json').version
|
|
523
|
-
if (bindingPackageVersion !== '0.
|
|
524
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
523
|
+
if (bindingPackageVersion !== '0.3.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
524
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
525
525
|
}
|
|
526
526
|
return binding
|
|
527
527
|
} catch (e) {
|
|
@@ -661,8 +661,8 @@ if (!nativeBinding || forceWasi) {
|
|
|
661
661
|
if (!candidateFailed) {
|
|
662
662
|
if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
663
663
|
const bindingPackageVersion = require('govee-toolkit-wasm32-wasi/package.json').version
|
|
664
|
-
if (bindingPackageVersion !== '0.
|
|
665
|
-
throw new Error(`WASI binding package version mismatch, expected 0.
|
|
664
|
+
if (bindingPackageVersion !== '0.3.0') {
|
|
665
|
+
throw new Error(`WASI binding package version mismatch, expected 0.3.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
666
666
|
}
|
|
667
667
|
}
|
|
668
668
|
wasiBinding = require('govee-toolkit-wasm32-wasi')
|
package/binding.d.cts
CHANGED
|
@@ -113,6 +113,8 @@ export declare class DeviceHandle {
|
|
|
113
113
|
/**
|
|
114
114
|
* Scan for the device if no mode knows it yet, then answer the mode a
|
|
115
115
|
* command would go over.
|
|
116
|
+
*
|
|
117
|
+
* The scan covers every enabled mode, whatever this handle is pinned to.
|
|
116
118
|
*/
|
|
117
119
|
ensureKnown(): Promise<string>
|
|
118
120
|
/**
|
|
@@ -130,6 +132,29 @@ export declare class DeviceHandle {
|
|
|
130
132
|
read(command: string, args?: Record<string, boolean | number | string | Uint8Array | Array<number> | Array<[number, number, number]>>): Promise<Reply>
|
|
131
133
|
/** Ask the device for its state and wait for the answer. */
|
|
132
134
|
status(): Promise<DeviceStatus>
|
|
135
|
+
/**
|
|
136
|
+
* Put the device on a Wi-Fi network over `ble`.
|
|
137
|
+
*
|
|
138
|
+
* The device must be in Bluetooth range and closed in the phone
|
|
139
|
+
* controller. The password travels in plaintext: anything in Bluetooth
|
|
140
|
+
* range during the transfer reads it. The network must be 2.4 GHz.
|
|
141
|
+
*
|
|
142
|
+
* Answers `"accepted"` where the device acknowledged the transfer, and
|
|
143
|
+
* `"sent"` where its device file declares no acknowledgement.
|
|
144
|
+
*/
|
|
145
|
+
provisionWifi(network: string, password: string, utcOffsetHours?: number | undefined | null, utcOffsetMinutes?: number | undefined | null): Promise<string>
|
|
146
|
+
/**
|
|
147
|
+
* Open the raw segment channel and paint it frame by frame.
|
|
148
|
+
*
|
|
149
|
+
* Power the device on first: arming a dark strip paints nothing. The
|
|
150
|
+
* channel holds the colors only while it is armed, and the device goes
|
|
151
|
+
* back to the color it showed before once the stream closes.
|
|
152
|
+
*
|
|
153
|
+
* `resolution` takes `"app"` when it is `null`, and `rate` takes
|
|
154
|
+
* `"measured"`.
|
|
155
|
+
*/
|
|
156
|
+
openStream(resolution?: number | 'app' | 'native' | 'groups', rate?: number | 'measured', gradient?: boolean | undefined | null): Promise<SegmentStream>
|
|
157
|
+
toString(): string
|
|
133
158
|
/** Turn the device on or off. */
|
|
134
159
|
power(on: boolean): Promise<Served>
|
|
135
160
|
/**
|
|
@@ -139,6 +164,17 @@ export declare class DeviceHandle {
|
|
|
139
164
|
brightness(level: number): Promise<Served>
|
|
140
165
|
/** Set one color, as three channels or as three bytes. */
|
|
141
166
|
color(rgb: [number, number, number] | Uint8Array): Promise<Served>
|
|
167
|
+
/**
|
|
168
|
+
* Power the device on and paint one color, so a person sees which
|
|
169
|
+
* fixture this identity drives.
|
|
170
|
+
*
|
|
171
|
+
* The look the device held is lost. To walk a rig, power every device
|
|
172
|
+
* off, wait a second, and then call this on one device at a time.
|
|
173
|
+
*
|
|
174
|
+
* `null` takes the core's defaults: green, and the top of the
|
|
175
|
+
* brightness range the device file declares.
|
|
176
|
+
*/
|
|
177
|
+
identify(color?: [number, number, number] | Uint8Array, fullBrightness?: boolean | undefined | null): Promise<undefined>
|
|
142
178
|
/** Set the white temperature, in kelvin. It ends color mode. */
|
|
143
179
|
colorTemp(kelvin: number): Promise<Served>
|
|
144
180
|
/**
|
|
@@ -158,35 +194,12 @@ export declare class DeviceHandle {
|
|
|
158
194
|
* three bytes per zone, states them all. A zone list takes one color.
|
|
159
195
|
* `resolution` takes `"app"` when it is `null`.
|
|
160
196
|
*/
|
|
161
|
-
segment(colors: [number, number, number] | Array<[number, number, number]> | Uint8Array, zones?: Array<number> | undefined | null, resolution?: number | 'app' | 'native', gradient?: boolean | undefined | null): Promise<Served>
|
|
197
|
+
segment(colors: [number, number, number] | Array<[number, number, number]> | Uint8Array, zones?: Array<number> | undefined | null, resolution?: number | 'app' | 'native' | 'groups', gradient?: boolean | undefined | null): Promise<Served>
|
|
162
198
|
/**
|
|
163
199
|
* Ask the firmware to interpolate between zones, and to wrap from the
|
|
164
200
|
* last zone back to the first.
|
|
165
201
|
*/
|
|
166
202
|
gradient(on: boolean): Promise<Served>
|
|
167
|
-
/**
|
|
168
|
-
* Put the device on a Wi-Fi network over `ble`.
|
|
169
|
-
*
|
|
170
|
-
* The device must be in Bluetooth range and closed in the phone
|
|
171
|
-
* controller. The password travels in plaintext: anything in Bluetooth
|
|
172
|
-
* range during the transfer reads it. The network must be 2.4 GHz.
|
|
173
|
-
*
|
|
174
|
-
* Answers `"accepted"` where the device acknowledged the transfer, and
|
|
175
|
-
* `"sent"` where its device file declares no acknowledgement.
|
|
176
|
-
*/
|
|
177
|
-
provisionWifi(network: string, password: string, utcOffsetHours?: number | undefined | null, utcOffsetMinutes?: number | undefined | null): Promise<string>
|
|
178
|
-
/**
|
|
179
|
-
* Open the raw segment channel and paint it frame by frame.
|
|
180
|
-
*
|
|
181
|
-
* Power the device on first: arming a dark strip paints nothing. The
|
|
182
|
-
* channel holds the colors only while it is armed, and the device goes
|
|
183
|
-
* back to the color it showed before once the stream closes.
|
|
184
|
-
*
|
|
185
|
-
* `resolution` takes `"app"` when it is `null`, and `rate` takes
|
|
186
|
-
* `"measured"`.
|
|
187
|
-
*/
|
|
188
|
-
openStream(resolution?: number | 'app' | 'native', rate?: number | 'measured', gradient?: boolean | undefined | null): Promise<SegmentStream>
|
|
189
|
-
toString(): string
|
|
190
203
|
}
|
|
191
204
|
|
|
192
205
|
/** What a device reported about itself. No firmware fills every field. */
|
|
@@ -253,6 +266,19 @@ export declare class Govee {
|
|
|
253
266
|
* appears once.
|
|
254
267
|
*/
|
|
255
268
|
devices(): Array<Device>
|
|
269
|
+
/**
|
|
270
|
+
* The devices the targets name, in the order they were written.
|
|
271
|
+
*
|
|
272
|
+
* A target is an identity (`1C:8B:…`), a SKU (`H6159`), or a name the
|
|
273
|
+
* configuration gives a device (`name:kitchen`). `id:`, `sku:` and
|
|
274
|
+
* `name:` state the kind where the target alone does not. A SKU and a
|
|
275
|
+
* name select among the devices the SDK knows, so scan first.
|
|
276
|
+
*
|
|
277
|
+
* `mode` is the one mode the caller will drive. A SKU and a name then
|
|
278
|
+
* match among the devices that enable it. An identity selects itself
|
|
279
|
+
* either way.
|
|
280
|
+
*/
|
|
281
|
+
select(targets: Array<string>, mode?: string | undefined | null): Array<string>
|
|
256
282
|
/**
|
|
257
283
|
* The modes this build carries a transport for. Not a preference order:
|
|
258
284
|
* that is each device's own configuration.
|
|
@@ -266,6 +292,15 @@ export declare class Govee {
|
|
|
266
292
|
get catalog(): Catalog
|
|
267
293
|
/** A handle for one device, by the MAC it reports. */
|
|
268
294
|
device(id: string): DeviceHandle
|
|
295
|
+
/**
|
|
296
|
+
* A handle that drives the device over one mode alone.
|
|
297
|
+
*
|
|
298
|
+
* Every call on it goes over `mode` or throws. Use it where the caller
|
|
299
|
+
* serves one mode by design, such as a bridge that reaches a device over
|
|
300
|
+
* `lan`: a handle from `device()` would move to the next enabled mode
|
|
301
|
+
* when that one stops answering.
|
|
302
|
+
*/
|
|
303
|
+
deviceOn(id: string, mode: string): DeviceHandle
|
|
269
304
|
/** Subscribe to what the SDK reports. Iterate it with `for await`. */
|
|
270
305
|
events(): EventStream
|
|
271
306
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "govee-toolkit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Control Govee devices from your own network: undocumented LAN features, with BLE and Cloud modes when you need them.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "damient",
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"typescript": "^7.0.2"
|
|
53
53
|
},
|
|
54
54
|
"optionalDependencies": {
|
|
55
|
-
"govee-toolkit-linux-x64-gnu": "0.
|
|
56
|
-
"govee-toolkit-linux-arm64-gnu": "0.
|
|
57
|
-
"govee-toolkit-darwin-arm64": "0.
|
|
58
|
-
"govee-toolkit-win32-x64-msvc": "0.
|
|
59
|
-
"govee-toolkit-win32-arm64-msvc": "0.
|
|
55
|
+
"govee-toolkit-linux-x64-gnu": "0.3.0",
|
|
56
|
+
"govee-toolkit-linux-arm64-gnu": "0.3.0",
|
|
57
|
+
"govee-toolkit-darwin-arm64": "0.3.0",
|
|
58
|
+
"govee-toolkit-win32-x64-msvc": "0.3.0",
|
|
59
|
+
"govee-toolkit-win32-arm64-msvc": "0.3.0"
|
|
60
60
|
}
|
|
61
61
|
}
|