@zaber/motion 7.8.3 → 7.8.4
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/LICENSE +1 -190
- package/dist/lib/gateway/sanitizer.d.ts +1 -1
- package/dist/lib/gateway/sanitizer.d.ts.map +1 -1
- package/dist/lib/gateway/sanitizer.js +6 -1
- package/dist/lib/gateway/sanitizer.js.map +1 -1
- package/dist/lib/library.js +1 -1
- package/dist/lib/library.js.map +1 -1
- package/dist/lib/requests/device_set_setting_int_request.js +1 -1
- package/dist/lib/requests/device_set_setting_int_request.js.map +1 -1
- package/dist/lib/requests/int_64_response.js +1 -1
- package/dist/lib/requests/int_64_response.js.map +1 -1
- package/package.json +1 -1
package/LICENSE
CHANGED
|
@@ -421,31 +421,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
421
421
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
422
422
|
THE SOFTWARE.
|
|
423
423
|
|
|
424
|
-
------------------
|
|
425
|
-
github.com/stretchr/testify v1.8.1
|
|
426
|
-
------------------
|
|
427
|
-
MIT License
|
|
428
|
-
|
|
429
|
-
Copyright (c) 2012-2020 Mat Ryer, Tyler Bunnell and contributors.
|
|
430
|
-
|
|
431
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
432
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
433
|
-
in the Software without restriction, including without limitation the rights
|
|
434
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
435
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
436
|
-
furnished to do so, subject to the following conditions:
|
|
437
|
-
|
|
438
|
-
The above copyright notice and this permission notice shall be included in all
|
|
439
|
-
copies or substantial portions of the Software.
|
|
440
|
-
|
|
441
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
442
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
443
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
444
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
445
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
446
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
447
|
-
SOFTWARE.
|
|
448
|
-
|
|
449
424
|
------------------
|
|
450
425
|
github.com/zabertech/go-ethereum v1.10.4-rpc-1 (fork github.com/ethereum/go-ethereum)
|
|
451
426
|
------------------
|
|
@@ -1482,69 +1457,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
1482
1457
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
1483
1458
|
|
|
1484
1459
|
------------------
|
|
1485
|
-
golang.org/x/
|
|
1486
|
-
------------------
|
|
1487
|
-
Copyright (c) 2009 The Go Authors. All rights reserved.
|
|
1488
|
-
|
|
1489
|
-
Redistribution and use in source and binary forms, with or without
|
|
1490
|
-
modification, are permitted provided that the following conditions are
|
|
1491
|
-
met:
|
|
1492
|
-
|
|
1493
|
-
* Redistributions of source code must retain the above copyright
|
|
1494
|
-
notice, this list of conditions and the following disclaimer.
|
|
1495
|
-
* Redistributions in binary form must reproduce the above
|
|
1496
|
-
copyright notice, this list of conditions and the following disclaimer
|
|
1497
|
-
in the documentation and/or other materials provided with the
|
|
1498
|
-
distribution.
|
|
1499
|
-
* Neither the name of Google Inc. nor the names of its
|
|
1500
|
-
contributors may be used to endorse or promote products derived from
|
|
1501
|
-
this software without specific prior written permission.
|
|
1502
|
-
|
|
1503
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
1504
|
-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
1505
|
-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
1506
|
-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
1507
|
-
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
1508
|
-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
1509
|
-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
1510
|
-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
1511
|
-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
1512
|
-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
1513
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
1514
|
-
|
|
1515
|
-
------------------
|
|
1516
|
-
golang.org/x/net v0.0.0-20190620200207-3b0461eec859
|
|
1517
|
-
------------------
|
|
1518
|
-
Copyright (c) 2009 The Go Authors. All rights reserved.
|
|
1519
|
-
|
|
1520
|
-
Redistribution and use in source and binary forms, with or without
|
|
1521
|
-
modification, are permitted provided that the following conditions are
|
|
1522
|
-
met:
|
|
1523
|
-
|
|
1524
|
-
* Redistributions of source code must retain the above copyright
|
|
1525
|
-
notice, this list of conditions and the following disclaimer.
|
|
1526
|
-
* Redistributions in binary form must reproduce the above
|
|
1527
|
-
copyright notice, this list of conditions and the following disclaimer
|
|
1528
|
-
in the documentation and/or other materials provided with the
|
|
1529
|
-
distribution.
|
|
1530
|
-
* Neither the name of Google Inc. nor the names of its
|
|
1531
|
-
contributors may be used to endorse or promote products derived from
|
|
1532
|
-
this software without specific prior written permission.
|
|
1533
|
-
|
|
1534
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
1535
|
-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
1536
|
-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
1537
|
-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
1538
|
-
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
1539
|
-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
1540
|
-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
1541
|
-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
1542
|
-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
1543
|
-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
1544
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
1545
|
-
|
|
1546
|
-
------------------
|
|
1547
|
-
golang.org/x/sync v0.3.0
|
|
1460
|
+
golang.org/x/net v0.12.0
|
|
1548
1461
|
------------------
|
|
1549
1462
|
Copyright (c) 2009 The Go Authors. All rights reserved.
|
|
1550
1463
|
|
|
@@ -1605,37 +1518,6 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
1605
1518
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
1606
1519
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
1607
1520
|
|
|
1608
|
-
------------------
|
|
1609
|
-
golang.org/x/text v0.3.0
|
|
1610
|
-
------------------
|
|
1611
|
-
Copyright (c) 2009 The Go Authors. All rights reserved.
|
|
1612
|
-
|
|
1613
|
-
Redistribution and use in source and binary forms, with or without
|
|
1614
|
-
modification, are permitted provided that the following conditions are
|
|
1615
|
-
met:
|
|
1616
|
-
|
|
1617
|
-
* Redistributions of source code must retain the above copyright
|
|
1618
|
-
notice, this list of conditions and the following disclaimer.
|
|
1619
|
-
* Redistributions in binary form must reproduce the above
|
|
1620
|
-
copyright notice, this list of conditions and the following disclaimer
|
|
1621
|
-
in the documentation and/or other materials provided with the
|
|
1622
|
-
distribution.
|
|
1623
|
-
* Neither the name of Google Inc. nor the names of its
|
|
1624
|
-
contributors may be used to endorse or promote products derived from
|
|
1625
|
-
this software without specific prior written permission.
|
|
1626
|
-
|
|
1627
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
1628
|
-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
1629
|
-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
1630
|
-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
1631
|
-
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
1632
|
-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
1633
|
-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
1634
|
-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
1635
|
-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
1636
|
-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
1637
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
1638
|
-
|
|
1639
1521
|
------------------
|
|
1640
1522
|
gonum.org/v1/gonum v0.16.0
|
|
1641
1523
|
------------------
|
|
@@ -1662,60 +1544,6 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
|
1662
1544
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
1663
1545
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
1664
1546
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
1665
|
-
------------------
|
|
1666
|
-
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c
|
|
1667
|
-
------------------
|
|
1668
|
-
|
|
1669
|
-
This project is covered by two different licenses: MIT and Apache.
|
|
1670
|
-
|
|
1671
|
-
#### MIT License ####
|
|
1672
|
-
|
|
1673
|
-
The following files were ported to Go from C files of libyaml, and thus
|
|
1674
|
-
are still covered by their original MIT license, with the additional
|
|
1675
|
-
copyright staring in 2011 when the project was ported over:
|
|
1676
|
-
|
|
1677
|
-
apic.go emitterc.go parserc.go readerc.go scannerc.go
|
|
1678
|
-
writerc.go yamlh.go yamlprivateh.go
|
|
1679
|
-
|
|
1680
|
-
Copyright (c) 2006-2010 Kirill Simonov
|
|
1681
|
-
Copyright (c) 2006-2011 Kirill Simonov
|
|
1682
|
-
|
|
1683
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
1684
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
1685
|
-
the Software without restriction, including without limitation the rights to
|
|
1686
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
1687
|
-
of the Software, and to permit persons to whom the Software is furnished to do
|
|
1688
|
-
so, subject to the following conditions:
|
|
1689
|
-
|
|
1690
|
-
The above copyright notice and this permission notice shall be included in all
|
|
1691
|
-
copies or substantial portions of the Software.
|
|
1692
|
-
|
|
1693
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1694
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1695
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1696
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1697
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1698
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1699
|
-
SOFTWARE.
|
|
1700
|
-
|
|
1701
|
-
### Apache License ###
|
|
1702
|
-
|
|
1703
|
-
All the remaining project files are covered by the Apache license:
|
|
1704
|
-
|
|
1705
|
-
Copyright (c) 2011-2019 Canonical Ltd
|
|
1706
|
-
|
|
1707
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
1708
|
-
you may not use this file except in compliance with the License.
|
|
1709
|
-
You may obtain a copy of the License at
|
|
1710
|
-
|
|
1711
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
1712
|
-
|
|
1713
|
-
Unless required by applicable law or agreed to in writing, software
|
|
1714
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
1715
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1716
|
-
See the License for the specific language governing permissions and
|
|
1717
|
-
limitations under the License.
|
|
1718
|
-
|
|
1719
1547
|
------------------
|
|
1720
1548
|
gotest.tools v2.2.0+incompatible
|
|
1721
1549
|
------------------
|
|
@@ -1732,20 +1560,3 @@ distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
1732
1560
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1733
1561
|
See the License for the specific language governing permissions and
|
|
1734
1562
|
limitations under the License.
|
|
1735
|
-
|
|
1736
|
-
------------------
|
|
1737
|
-
gotest.tools/v3 v3.0.2
|
|
1738
|
-
------------------
|
|
1739
|
-
Copyright 2018 gotest.tools authors
|
|
1740
|
-
|
|
1741
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
1742
|
-
you may not use this file except in compliance with the License.
|
|
1743
|
-
You may obtain a copy of the License at
|
|
1744
|
-
|
|
1745
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
1746
|
-
|
|
1747
|
-
Unless required by applicable law or agreed to in writing, software
|
|
1748
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
1749
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1750
|
-
See the License for the specific language governing permissions and
|
|
1751
|
-
limitations under the License.
|
|
@@ -3,7 +3,7 @@ type EnumDefinition<T> = Record<string | number, string | T>;
|
|
|
3
3
|
export declare const sanitizer: {
|
|
4
4
|
sanitizeNumber(value: number, label: string): number;
|
|
5
5
|
sanitizeInt(value: number, label: string): number;
|
|
6
|
-
|
|
6
|
+
sanitizeInt64(value: bigint, label: string): bigint;
|
|
7
7
|
sanitizeBool(value: boolean, label: string): boolean;
|
|
8
8
|
sanitizeString(value: string, label: string): string;
|
|
9
9
|
sanitizeEnum<TEnum extends number>(value: TEnum, enumName: string, enumType: EnumDefinition<TEnum>, label: string): TEnum;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sanitizer.d.ts","sourceRoot":"","sources":["../../../src/gateway/sanitizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,KAAK,cAAc,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"sanitizer.d.ts","sourceRoot":"","sources":["../../../src/gateway/sanitizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,KAAK,cAAc,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC;AAI7D,eAAO,MAAM,SAAS;0BACE,MAAM,SAAS,MAAM,GAAG,MAAM;uBAMjC,MAAM,SAAS,MAAM,GAAG,MAAM;yBAO5B,MAAM,SAAS,MAAM,GAAG,MAAM;wBAS/B,OAAO,SAAS,MAAM,GAAG,OAAO;0BAG9B,MAAM,SAAS,MAAM,GAAG,MAAM;8CAU3C,KAAK,YACF,MAAM,YACN,eAAe,KAAK,CAAC,SACxB,MAAM,GACZ,KAAK;yBAMa,KAAK,SAAS,MAAM,GAAG,KAAK;CASlD,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.sanitizer = void 0;
|
|
4
|
+
const MAX_ALLOWED_SIGNED_64BIT_INT_VALUE = 2n ** 63n - 1n;
|
|
5
|
+
const MIN_ALLOWED_SIGNED_64BIT_INT_VALUE = -(2n ** 63n);
|
|
4
6
|
exports.sanitizer = {
|
|
5
7
|
sanitizeNumber(value, label) {
|
|
6
8
|
if (typeof value !== 'number') {
|
|
@@ -15,10 +17,13 @@ exports.sanitizer = {
|
|
|
15
17
|
}
|
|
16
18
|
return safeNumber;
|
|
17
19
|
},
|
|
18
|
-
|
|
20
|
+
sanitizeInt64(value, label) {
|
|
19
21
|
if (typeof value !== 'bigint') {
|
|
20
22
|
throw new TypeError(`Expected ${label} to be BigInt but got ${JSON.stringify(value)}.`);
|
|
21
23
|
}
|
|
24
|
+
if (value > MAX_ALLOWED_SIGNED_64BIT_INT_VALUE || value < MIN_ALLOWED_SIGNED_64BIT_INT_VALUE) {
|
|
25
|
+
throw new TypeError(`Expected ${label} to be 64 bit Integer but got ${value}.`);
|
|
26
|
+
}
|
|
22
27
|
return value;
|
|
23
28
|
},
|
|
24
29
|
sanitizeBool(value, label) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sanitizer.js","sourceRoot":"","sources":["../../../src/gateway/sanitizer.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"sanitizer.js","sourceRoot":"","sources":["../../../src/gateway/sanitizer.ts"],"names":[],"mappings":";;;AAGA,MAAM,kCAAkC,GAAG,EAAE,IAAI,GAAG,GAAG,EAAE,CAAC;AAC1D,MAAM,kCAAkC,GAAG,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC;AAE3C,QAAA,SAAS,GAAG;IACvB,cAAc,CAAC,KAAa,EAAE,KAAa;QACzC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,MAAM,IAAI,SAAS,CAAC,YAAY,KAAK,yBAAyB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC1F,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,WAAW,CAAC,KAAa,EAAE,KAAa;QACtC,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QACrD,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE,CAAC;YACtC,MAAM,IAAI,SAAS,CAAC,YAAY,KAAK,0BAA0B,UAAU,GAAG,CAAC,CAAC;QAChF,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,aAAa,CAAC,KAAa,EAAE,KAAa;QACxC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,MAAM,IAAI,SAAS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+BAA+B,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAChG,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF,CAAC","sourcesContent":["import type { Units } from '../units';\n\ntype EnumDefinition<T> = Record<string | number, string | T>;\nconst MAX_ALLOWED_SIGNED_64BIT_INT_VALUE = 2n ** 63n - 1n;\nconst MIN_ALLOWED_SIGNED_64BIT_INT_VALUE = -(2n ** 63n);\n\nexport const sanitizer = {\n sanitizeNumber(value: number, label: string): number {\n if (typeof value !== 'number') {\n throw new TypeError(`Expected ${label} to be number but got ${JSON.stringify(value)}.`);\n }\n return value;\n },\n sanitizeInt(value: number, label: string): number {\n const safeNumber = this.sanitizeNumber(value, label);\n if (!Number.isSafeInteger(safeNumber)) {\n throw new TypeError(`Expected ${label} to be integer but got ${safeNumber}.`);\n }\n return safeNumber;\n },\n sanitizeInt64(value: bigint, label: string): bigint {\n if (typeof value !== 'bigint') {\n throw new TypeError(`Expected ${label} to be BigInt but got ${JSON.stringify(value)}.`);\n }\n if (value > MAX_ALLOWED_SIGNED_64BIT_INT_VALUE || value < MIN_ALLOWED_SIGNED_64BIT_INT_VALUE) {\n throw new TypeError(`Expected ${label} to be 64 bit Integer but got ${value}.`);\n }\n return value;\n },\n sanitizeBool(value: boolean, label: string): boolean { // eslint-disable-line @typescript-eslint/no-unused-vars\n return Boolean(value);\n },\n sanitizeString(value: string, label: string): string {\n // null is tolerated for strings defaulting in empty string.\n if (value == null) { return '' }\n\n if (typeof value !== 'string') {\n throw new TypeError(`Expected ${label} to be string but got ${JSON.stringify(value)}.`);\n }\n return value;\n },\n sanitizeEnum<TEnum extends number>(\n value: TEnum,\n enumName: string,\n enumType: EnumDefinition<TEnum>,\n label: string,\n ): TEnum {\n if (typeof value !== 'number' || enumType[value] == null) {\n throw new TypeError(`Expected ${label} to be value of ${enumName} enum but got ${value}.`);\n }\n return value;\n },\n sanitizeUnits(value: Units, label: string): Units {\n // null is tolerated for units defaulting to NATIVE.\n if (value == null) { return '' } // Units.NATIVE\n\n if (typeof value !== 'string') {\n throw new TypeError(`Expected ${label} to be Units string but got ${JSON.stringify(value)}.`);\n }\n return value;\n },\n};\n"]}
|
package/dist/lib/library.js
CHANGED
package/dist/lib/library.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library.js","sourceRoot":"","sources":["../../src/library.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,mDAAqC;AACrC,qDAAuC;AAIvC,MAAa,OAAO;IAClB;;;;OAIG;IACI,MAAM,CAAC,YAAY,CACxB,IAAmB,EACnB,QAAiB;QAEjB,MAAM,OAAO,GAAmD;YAC9D,GAAG,QAAQ,CAAC,mBAAmB,CAAC,OAAO;YACvC,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,QAAQ;YAClB,QAAQ;gBACN,OAAO,QAAQ,CAAC,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACrD,CAAC;SACF,CAAC;QAEF,OAAO,CAAC,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,iBAAiB,CAC7B,UAA8B,EAC9B,aAAsB;QAEtB,MAAM,OAAO,GAAwD;YACnE,GAAG,QAAQ,CAAC,wBAAwB,CAAC,OAAO;YAC5C,UAAU,EAAE,UAAU;YACtB,aAAa,EAAE,aAAa;YAC5B,QAAQ;gBACN,OAAO,QAAQ,CAAC,wBAAwB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC1D,CAAC;SACF,CAAC;QAEF,OAAO,CAAC,QAAQ,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;IAED;;;;;;;OAOG;IACI,MAAM,CAAC,mBAAmB,CAC/B,aAAsB;QAEtB,MAAM,OAAO,GAA0D;YACrE,GAAG,QAAQ,CAA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D,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,eAAe,CAC3B,IAAa;QAEb,MAAM,OAAO,GAAsD;YACjE,GAAG,QAAQ,CAAC,sBAAsB,CAAC,OAAO;YAC1C,IAAI,EAAE,IAAI;YACV,QAAQ;gBACN,OAAO,QAAQ,CAAC,sBAAsB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACxD,CAAC;SACF,CAAC;QAEF,OAAO,CAAC,QAAQ,CAAC,2BAA2B,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,oBAAoB,CAChC,MAAc;QAEd,MAAM,OAAO,GAA0C;YACrD,GAAG,QAAQ,CAAC,UAAU,CAAC,OAAO;YAC9B,KAAK,EAAE,MAAM;YACb,QAAQ;gBACN,OAAO,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC5C,CAAC;SACF,CAAC;QAEF,OAAO,CAAC,QAAQ,CAAC,iCAAiC,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,YAAY;QACxB,MAAM,OAAO,GAAmD;YAC9D,GAAG,QAAQ,CAAC,mBAAmB,CAAC,OAAO;YACvC,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,OAAO;YAChB,QAAQ;gBACN,OAAO,QAAQ,CAAC,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACrD,CAAC;SACF,CAAC;QAEF,OAAO,CAAC,QAAQ,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC;IACrD,CAAC;CACF;AAxKD,0BAwKC;AAED,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from './gateway';\nimport * as requests from './requests';\nimport { LogOutputMode } from './log_output_mode';\nimport { DeviceDbSourceType } from './device_db_source_type';\n\nexport class Library {\n /**\n * Sets library logging output.\n * @param mode Logging output mode.\n * @param filePath Path of the file to open.\n */\n public static setLogOutput(\n mode: LogOutputMode,\n filePath?: string\n ): void {\n const request: requests.SetLogOutputRequest & gateway.Message = {\n ...requests.SetLogOutputRequest.DEFAULT,\n mode: mode,\n filePath: filePath,\n toBinary() {\n return requests.SetLogOutputRequest.toBinary(this);\n },\n };\n\n gateway.callSync('logging/set_output', request);\n }\n\n /**\n * Sets source of Device DB data. Allows selection of a web service or a local file.\n * @param sourceType Source type.\n * @param urlOrFilePath URL of the web service or path to the local file.\n * Leave empty for the default URL of Zaber web service.\n */\n public static setDeviceDbSource(\n sourceType: DeviceDbSourceType,\n urlOrFilePath?: string\n ): void {\n const request: requests.SetDeviceDbSourceRequest & gateway.Message = {\n ...requests.SetDeviceDbSourceRequest.DEFAULT,\n sourceType: sourceType,\n urlOrFilePath: urlOrFilePath,\n toBinary() {\n return requests.SetDeviceDbSourceRequest.toBinary(this);\n },\n };\n\n gateway.callSync('device_db/set_source', request);\n }\n\n /**\n * Enables Device DB store.\n * The store uses filesystem to save information obtained from the Device DB.\n * The stored data are later used instead of the Device DB.\n * @param storeLocation Specifies relative or absolute path of the folder used by the store.\n * If left empty defaults to a folder in user home directory.\n * Must be accessible by the process.\n */\n public static enableDeviceDbStore(\n storeLocation?: string\n ): void {\n const request: requests.ToggleDeviceDbStoreRequest & gateway.Message = {\n ...requests.ToggleDeviceDbStoreRequest.DEFAULT,\n toggleOn: true,\n storeLocation: storeLocation,\n toBinary() {\n return requests.ToggleDeviceDbStoreRequest.toBinary(this);\n },\n };\n\n gateway.callSync('device_db/toggle_store', request);\n }\n\n /**\n * Disables Device DB store.\n */\n public static disableDeviceDbStore(): void {\n const request: requests.ToggleDeviceDbStoreRequest & gateway.Message = {\n ...requests.ToggleDeviceDbStoreRequest.DEFAULT,\n toBinary() {\n return requests.ToggleDeviceDbStoreRequest.toBinary(this);\n },\n };\n\n gateway.callSync('device_db/toggle_store', request);\n }\n\n /**\n * Checks if the Device DB store is currently enabled.\n * @returns True if the Device DB store is enabled.\n */\n public static isDeviceDbStoreEnabled(): boolean {\n const request: requests.EmptyRequest & gateway.Message = {\n ...requests.EmptyRequest.DEFAULT,\n toBinary() {\n return requests.EmptyRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.BoolResponse>(\n 'device_db/check_store',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Clears the Device DB store on the local filesystem.\n * Note: If the device DB was enabled with a custom store location, store files will be removed in that location.\n */\n public static async clearDeviceDbStore(): Promise<void> {\n const request: requests.EmptyRequest & gateway.Message = {\n ...requests.EmptyRequest.DEFAULT,\n toBinary() {\n return requests.EmptyRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device_db/clear_store', request);\n }\n\n /**\n * Disables certain customer checks (like FF flag).\n * @param mode Whether to turn internal mode on or off.\n */\n public static setInternalMode(\n mode: boolean\n ): void {\n const request: requests.SetInternalModeRequest & gateway.Message = {\n ...requests.SetInternalModeRequest.DEFAULT,\n mode: mode,\n toBinary() {\n return requests.SetInternalModeRequest.toBinary(this);\n },\n };\n\n gateway.callSync('library/set_internal_mode', request);\n }\n\n /**\n * Sets the period between polling for IDLE during movements.\n * Caution: Setting the period too low may cause performance issues.\n * @param period Period in milliseconds.\n * Negative value restores the default period.\n */\n public static setIdlePollingPeriod(\n period: number\n ): void {\n const request: requests.IntRequest & gateway.Message = {\n ...requests.IntRequest.DEFAULT,\n value: period,\n toBinary() {\n return requests.IntRequest.toBinary(this);\n },\n };\n\n gateway.callSync('library/set_idle_polling_period', request);\n }\n\n /**\n * Throws an error if the version of the loaded shared library does not match the caller's version.\n */\n public static checkVersion(): void {\n const request: requests.CheckVersionRequest & gateway.Message = {\n ...requests.CheckVersionRequest.DEFAULT,\n host: 'js',\n version: '7.8.
|
|
1
|
+
{"version":3,"file":"library.js","sourceRoot":"","sources":["../../src/library.ts"],"names":[],"m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,OAAO,CAAC,QAAQ,CAAC,2BAA2B,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,oBAAoB,CAChC,MAAc;QAEd,MAAM,OAAO,GAA0C;YACrD,GAAG,QAAQ,CAAC,UAAU,CAAC,OAAO;YAC9B,KAAK,EAAE,MAAM;YACb,QAAQ;gBACN,OAAO,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC5C,CAAC;SACF,CAAC;QAEF,OAAO,CAAC,QAAQ,CAAC,iCAAiC,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,YAAY;QACxB,MAAM,OAAO,GAAmD;YAC9D,GAAG,QAAQ,CAAC,mBAAmB,CAAC,OAAO;YACvC,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,OAAO;YAChB,QAAQ;gBACN,OAAO,QAAQ,CAAC,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACrD,CAAC;SACF,CAAC;QAEF,OAAO,CAAC,QAAQ,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC;IACrD,CAAC;CACF;AAxKD,0BAwKC;AAED,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from './gateway';\nimport * as requests from './requests';\nimport { LogOutputMode } from './log_output_mode';\nimport { DeviceDbSourceType } from './device_db_source_type';\n\nexport class Library {\n /**\n * Sets library logging output.\n * @param mode Logging output mode.\n * @param filePath Path of the file to open.\n */\n public static setLogOutput(\n mode: LogOutputMode,\n filePath?: string\n ): void {\n const request: requests.SetLogOutputRequest & gateway.Message = {\n ...requests.SetLogOutputRequest.DEFAULT,\n mode: mode,\n filePath: filePath,\n toBinary() {\n return requests.SetLogOutputRequest.toBinary(this);\n },\n };\n\n gateway.callSync('logging/set_output', request);\n }\n\n /**\n * Sets source of Device DB data. Allows selection of a web service or a local file.\n * @param sourceType Source type.\n * @param urlOrFilePath URL of the web service or path to the local file.\n * Leave empty for the default URL of Zaber web service.\n */\n public static setDeviceDbSource(\n sourceType: DeviceDbSourceType,\n urlOrFilePath?: string\n ): void {\n const request: requests.SetDeviceDbSourceRequest & gateway.Message = {\n ...requests.SetDeviceDbSourceRequest.DEFAULT,\n sourceType: sourceType,\n urlOrFilePath: urlOrFilePath,\n toBinary() {\n return requests.SetDeviceDbSourceRequest.toBinary(this);\n },\n };\n\n gateway.callSync('device_db/set_source', request);\n }\n\n /**\n * Enables Device DB store.\n * The store uses filesystem to save information obtained from the Device DB.\n * The stored data are later used instead of the Device DB.\n * @param storeLocation Specifies relative or absolute path of the folder used by the store.\n * If left empty defaults to a folder in user home directory.\n * Must be accessible by the process.\n */\n public static enableDeviceDbStore(\n storeLocation?: string\n ): void {\n const request: requests.ToggleDeviceDbStoreRequest & gateway.Message = {\n ...requests.ToggleDeviceDbStoreRequest.DEFAULT,\n toggleOn: true,\n storeLocation: storeLocation,\n toBinary() {\n return requests.ToggleDeviceDbStoreRequest.toBinary(this);\n },\n };\n\n gateway.callSync('device_db/toggle_store', request);\n }\n\n /**\n * Disables Device DB store.\n */\n public static disableDeviceDbStore(): void {\n const request: requests.ToggleDeviceDbStoreRequest & gateway.Message = {\n ...requests.ToggleDeviceDbStoreRequest.DEFAULT,\n toBinary() {\n return requests.ToggleDeviceDbStoreRequest.toBinary(this);\n },\n };\n\n gateway.callSync('device_db/toggle_store', request);\n }\n\n /**\n * Checks if the Device DB store is currently enabled.\n * @returns True if the Device DB store is enabled.\n */\n public static isDeviceDbStoreEnabled(): boolean {\n const request: requests.EmptyRequest & gateway.Message = {\n ...requests.EmptyRequest.DEFAULT,\n toBinary() {\n return requests.EmptyRequest.toBinary(this);\n },\n };\n\n const response = gateway.callSync<requests.BoolResponse>(\n 'device_db/check_store',\n request,\n requests.BoolResponse.fromBinary);\n return response.value;\n }\n\n /**\n * Clears the Device DB store on the local filesystem.\n * Note: If the device DB was enabled with a custom store location, store files will be removed in that location.\n */\n public static async clearDeviceDbStore(): Promise<void> {\n const request: requests.EmptyRequest & gateway.Message = {\n ...requests.EmptyRequest.DEFAULT,\n toBinary() {\n return requests.EmptyRequest.toBinary(this);\n },\n };\n\n await gateway.callAsync('device_db/clear_store', request);\n }\n\n /**\n * Disables certain customer checks (like FF flag).\n * @param mode Whether to turn internal mode on or off.\n */\n public static setInternalMode(\n mode: boolean\n ): void {\n const request: requests.SetInternalModeRequest & gateway.Message = {\n ...requests.SetInternalModeRequest.DEFAULT,\n mode: mode,\n toBinary() {\n return requests.SetInternalModeRequest.toBinary(this);\n },\n };\n\n gateway.callSync('library/set_internal_mode', request);\n }\n\n /**\n * Sets the period between polling for IDLE during movements.\n * Caution: Setting the period too low may cause performance issues.\n * @param period Period in milliseconds.\n * Negative value restores the default period.\n */\n public static setIdlePollingPeriod(\n period: number\n ): void {\n const request: requests.IntRequest & gateway.Message = {\n ...requests.IntRequest.DEFAULT,\n value: period,\n toBinary() {\n return requests.IntRequest.toBinary(this);\n },\n };\n\n gateway.callSync('library/set_idle_polling_period', request);\n }\n\n /**\n * Throws an error if the version of the loaded shared library does not match the caller's version.\n */\n public static checkVersion(): void {\n const request: requests.CheckVersionRequest & gateway.Message = {\n ...requests.CheckVersionRequest.DEFAULT,\n host: 'js',\n version: '7.8.4',\n toBinary() {\n return requests.CheckVersionRequest.toBinary(this);\n },\n };\n\n gateway.callSync('library/check_version', request);\n }\n}\n\ngateway.addInitCallback(Library.checkVersion);\n"]}
|
|
@@ -26,7 +26,7 @@ exports.DeviceSetSettingIntRequest = {
|
|
|
26
26
|
device: sanitizer_1.sanitizer.sanitizeInt(value.device, 'device'),
|
|
27
27
|
axis: sanitizer_1.sanitizer.sanitizeInt(value.axis, 'axis'),
|
|
28
28
|
setting: sanitizer_1.sanitizer.sanitizeString(value.setting, 'setting'),
|
|
29
|
-
value: sanitizer_1.sanitizer.
|
|
29
|
+
value: sanitizer_1.sanitizer.sanitizeInt64(value.value, 'value'),
|
|
30
30
|
};
|
|
31
31
|
},
|
|
32
32
|
convert: (value) => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device_set_setting_int_request.js","sourceRoot":"","sources":["../../../src/requests/device_set_setting_int_request.ts"],"names":[],"mappings":";;;AAAA,oDAAoD;AACpD,+BAA4B;AAC5B,oDAAiD;AAepC,QAAA,0BAA0B,GAAG;IACxC,UAAU,EAAE,CAAC,MAAkB,EAA8B,EAAE,CAAC,kCAA0B,CAAC,OAAO,CAAC,WAAI,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;IACnJ,QAAQ,EAAE,CAAC,KAAiC,EAAc,EAAE,CAAC,WAAI,CAAC,SAAS,CAAC,kCAA0B,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACvH,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;QACrB,WAAW,EAAE,CAAC;QACd,MAAM,EAAE,CAAC;QACT,IAAI,EAAE,CAAC;QACP,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,EAAE;KACV,CAAyC;IAC1C,QAAQ,EAAE,CAAC,KAAiC,EAA8B,EAAE;QAC1E,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YAAC,MAAM,IAAI,SAAS,CAAC,uEAAuE,CAAC,CAAA;QAAC,CAAC;QACnH,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAAC,MAAM,IAAI,SAAS,CAAC,sDAAsD,OAAO,KAAK,GAAG,CAAC,CAAA;QAAC,CAAC;QAC7H,OAAO;YACL,WAAW,EAAE,qBAAS,CAAC,WAAW,CAAC,KAAK,CAAC,WAAW,EAAE,aAAa,CAAC;YACpE,MAAM,EAAE,qBAAS,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC;YACrD,IAAI,EAAE,qBAAS,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC;YAC/C,OAAO,EAAE,qBAAS,CAAC,cAAc,CAAC,KAAK,CAAC,OAAO,EAAE,SAAS,CAAC;YAC3D,KAAK,EAAE,qBAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"device_set_setting_int_request.js","sourceRoot":"","sources":["../../../src/requests/device_set_setting_int_request.ts"],"names":[],"mappings":";;;AAAA,oDAAoD;AACpD,+BAA4B;AAC5B,oDAAiD;AAepC,QAAA,0BAA0B,GAAG;IACxC,UAAU,EAAE,CAAC,MAAkB,EAA8B,EAAE,CAAC,kCAA0B,CAAC,OAAO,CAAC,WAAI,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;IACnJ,QAAQ,EAAE,CAAC,KAAiC,EAAc,EAAE,CAAC,WAAI,CAAC,SAAS,CAAC,kCAA0B,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACvH,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;QACrB,WAAW,EAAE,CAAC;QACd,MAAM,EAAE,CAAC;QACT,IAAI,EAAE,CAAC;QACP,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,EAAE;KACV,CAAyC;IAC1C,QAAQ,EAAE,CAAC,KAAiC,EAA8B,EAAE;QAC1E,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YAAC,MAAM,IAAI,SAAS,CAAC,uEAAuE,CAAC,CAAA;QAAC,CAAC;QACnH,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAAC,MAAM,IAAI,SAAS,CAAC,sDAAsD,OAAO,KAAK,GAAG,CAAC,CAAA;QAAC,CAAC;QAC7H,OAAO;YACL,WAAW,EAAE,qBAAS,CAAC,WAAW,CAAC,KAAK,CAAC,WAAW,EAAE,aAAa,CAAC;YACpE,MAAM,EAAE,qBAAS,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC;YACrD,IAAI,EAAE,qBAAS,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC;YAC/C,OAAO,EAAE,qBAAS,CAAC,cAAc,CAAC,KAAK,CAAC,OAAO,EAAE,SAAS,CAAC;YAC3D,KAAK,EAAE,qBAAS,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC;SACrD,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,CAAC,KAAoB,EAA8B,EAAE,CAAC,CAAC;QAC9D,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,KAAK,EAAE,KAAK,CAAC,KAAK;KACnB,CAAC;CACH,CAAC","sourcesContent":["/* This file is generated. Do not modify by hand. */\nimport { BSON } from 'bson';\nimport { sanitizer } from '../gateway/sanitizer';\n\nexport interface DeviceSetSettingIntRequest {\n interfaceId: number;\n\n device: number;\n\n axis: number;\n\n setting: string;\n\n value: bigint;\n\n}\n\nexport const DeviceSetSettingIntRequest = {\n fromBinary: (buffer: Uint8Array): DeviceSetSettingIntRequest => DeviceSetSettingIntRequest.convert(BSON.deserialize(buffer, { useBigInt64: true })),\n toBinary: (value: DeviceSetSettingIntRequest): Uint8Array => BSON.serialize(DeviceSetSettingIntRequest.sanitize(value)),\n DEFAULT: Object.freeze({\n interfaceId: 0,\n device: 0,\n axis: 0,\n setting: '',\n value: 0n,\n }) as Readonly<DeviceSetSettingIntRequest>,\n sanitize: (value: DeviceSetSettingIntRequest): DeviceSetSettingIntRequest => {\n if (value == null) { throw new TypeError('Expected DeviceSetSettingIntRequest object but got null or undefined.') }\n if (typeof value !== 'object') { throw new TypeError(`Expected DeviceSetSettingIntRequest object but got ${typeof value}.`) }\n return {\n interfaceId: sanitizer.sanitizeInt(value.interfaceId, 'interfaceId'),\n device: sanitizer.sanitizeInt(value.device, 'device'),\n axis: sanitizer.sanitizeInt(value.axis, 'axis'),\n setting: sanitizer.sanitizeString(value.setting, 'setting'),\n value: sanitizer.sanitizeInt64(value.value, 'value'),\n };\n },\n convert: (value: BSON.Document): DeviceSetSettingIntRequest => ({\n interfaceId: value.interfaceId,\n device: value.device,\n axis: value.axis,\n setting: value.setting,\n value: value.value,\n })\n};\n"]}
|
|
@@ -18,7 +18,7 @@ exports.Int64Response = {
|
|
|
18
18
|
throw new TypeError(`Expected Int64Response object but got ${typeof value}.`);
|
|
19
19
|
}
|
|
20
20
|
return {
|
|
21
|
-
value: sanitizer_1.sanitizer.
|
|
21
|
+
value: sanitizer_1.sanitizer.sanitizeInt64(value.value, 'value'),
|
|
22
22
|
};
|
|
23
23
|
},
|
|
24
24
|
convert: (value) => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"int_64_response.js","sourceRoot":"","sources":["../../../src/requests/int_64_response.ts"],"names":[],"mappings":";;;AAAA,oDAAoD;AACpD,+BAA4B;AAC5B,oDAAiD;AAOpC,QAAA,aAAa,GAAG;IAC3B,UAAU,EAAE,CAAC,MAAkB,EAAiB,EAAE,CAAC,qBAAa,CAAC,OAAO,CAAC,WAAI,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;IACzH,QAAQ,EAAE,CAAC,KAAoB,EAAc,EAAE,CAAC,WAAI,CAAC,SAAS,CAAC,qBAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC7F,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;QACrB,KAAK,EAAE,EAAE;KACV,CAA4B;IAC7B,QAAQ,EAAE,CAAC,KAAoB,EAAiB,EAAE;QAChD,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YAAC,MAAM,IAAI,SAAS,CAAC,0DAA0D,CAAC,CAAA;QAAC,CAAC;QACtG,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAAC,MAAM,IAAI,SAAS,CAAC,yCAAyC,OAAO,KAAK,GAAG,CAAC,CAAA;QAAC,CAAC;QAChH,OAAO;YACL,KAAK,EAAE,qBAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"int_64_response.js","sourceRoot":"","sources":["../../../src/requests/int_64_response.ts"],"names":[],"mappings":";;;AAAA,oDAAoD;AACpD,+BAA4B;AAC5B,oDAAiD;AAOpC,QAAA,aAAa,GAAG;IAC3B,UAAU,EAAE,CAAC,MAAkB,EAAiB,EAAE,CAAC,qBAAa,CAAC,OAAO,CAAC,WAAI,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;IACzH,QAAQ,EAAE,CAAC,KAAoB,EAAc,EAAE,CAAC,WAAI,CAAC,SAAS,CAAC,qBAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC7F,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;QACrB,KAAK,EAAE,EAAE;KACV,CAA4B;IAC7B,QAAQ,EAAE,CAAC,KAAoB,EAAiB,EAAE;QAChD,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;YAAC,MAAM,IAAI,SAAS,CAAC,0DAA0D,CAAC,CAAA;QAAC,CAAC;QACtG,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAAC,MAAM,IAAI,SAAS,CAAC,yCAAyC,OAAO,KAAK,GAAG,CAAC,CAAA;QAAC,CAAC;QAChH,OAAO;YACL,KAAK,EAAE,qBAAS,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC;SACrD,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,CAAC,KAAoB,EAAiB,EAAE,CAAC,CAAC;QACjD,KAAK,EAAE,KAAK,CAAC,KAAK;KACnB,CAAC;CACH,CAAC","sourcesContent":["/* This file is generated. Do not modify by hand. */\nimport { BSON } from 'bson';\nimport { sanitizer } from '../gateway/sanitizer';\n\nexport interface Int64Response {\n value: bigint;\n\n}\n\nexport const Int64Response = {\n fromBinary: (buffer: Uint8Array): Int64Response => Int64Response.convert(BSON.deserialize(buffer, { useBigInt64: true })),\n toBinary: (value: Int64Response): Uint8Array => BSON.serialize(Int64Response.sanitize(value)),\n DEFAULT: Object.freeze({\n value: 0n,\n }) as Readonly<Int64Response>,\n sanitize: (value: Int64Response): Int64Response => {\n if (value == null) { throw new TypeError('Expected Int64Response object but got null or undefined.') }\n if (typeof value !== 'object') { throw new TypeError(`Expected Int64Response object but got ${typeof value}.`) }\n return {\n value: sanitizer.sanitizeInt64(value.value, 'value'),\n };\n },\n convert: (value: BSON.Document): Int64Response => ({\n value: value.value,\n })\n};\n"]}
|