@garmin/fitsdk 21.115.1 → 21.133.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/package.json +2 -3
- package/src/accumulator.js +3 -3
- package/src/bit-stream.js +3 -3
- package/src/crc-calculator.js +3 -3
- package/src/decoder.js +11 -7
- package/src/fit.js +3 -3
- package/src/index.js +3 -3
- package/src/profile.js +3215 -1707
- package/src/stream.js +7 -7
- package/src/utils-hr-mesg.js +3 -3
- package/src/utils-internal.js +3 -3
- package/src/utils.js +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@garmin/fitsdk",
|
|
3
|
-
"version": "21.
|
|
3
|
+
"version": "21.133.0",
|
|
4
4
|
"description": "FIT JavaScript SDK",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -18,8 +18,7 @@
|
|
|
18
18
|
"src/"
|
|
19
19
|
],
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"jest": "^28.1.2"
|
|
22
|
-
"jsdoc": "^3.6.11"
|
|
21
|
+
"jest": "^28.1.2"
|
|
23
22
|
},
|
|
24
23
|
"jest": {
|
|
25
24
|
"transform": {}
|
package/src/accumulator.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright
|
|
2
|
+
// Copyright 2024 Garmin International, Inc.
|
|
3
3
|
// Licensed under the Flexible and Interoperable Data Transfer (FIT) Protocol License; you
|
|
4
4
|
// may not use this file except in compliance with the Flexible and Interoperable Data
|
|
5
5
|
// Transfer (FIT) Protocol License.
|
|
6
6
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
7
7
|
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
|
|
8
|
-
// Profile Version = 21.
|
|
9
|
-
// Tag = production/release/21.
|
|
8
|
+
// Profile Version = 21.133.0Release
|
|
9
|
+
// Tag = production/release/21.133.0-0-g6002091
|
|
10
10
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
11
11
|
|
|
12
12
|
|
package/src/bit-stream.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright
|
|
2
|
+
// Copyright 2024 Garmin International, Inc.
|
|
3
3
|
// Licensed under the Flexible and Interoperable Data Transfer (FIT) Protocol License; you
|
|
4
4
|
// may not use this file except in compliance with the Flexible and Interoperable Data
|
|
5
5
|
// Transfer (FIT) Protocol License.
|
|
6
6
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
7
7
|
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
|
|
8
|
-
// Profile Version = 21.
|
|
9
|
-
// Tag = production/release/21.
|
|
8
|
+
// Profile Version = 21.133.0Release
|
|
9
|
+
// Tag = production/release/21.133.0-0-g6002091
|
|
10
10
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
11
11
|
|
|
12
12
|
|
package/src/crc-calculator.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright
|
|
2
|
+
// Copyright 2024 Garmin International, Inc.
|
|
3
3
|
// Licensed under the Flexible and Interoperable Data Transfer (FIT) Protocol License; you
|
|
4
4
|
// may not use this file except in compliance with the Flexible and Interoperable Data
|
|
5
5
|
// Transfer (FIT) Protocol License.
|
|
6
6
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
7
7
|
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
|
|
8
|
-
// Profile Version = 21.
|
|
9
|
-
// Tag = production/release/21.
|
|
8
|
+
// Profile Version = 21.133.0Release
|
|
9
|
+
// Tag = production/release/21.133.0-0-g6002091
|
|
10
10
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
11
11
|
|
|
12
12
|
|
package/src/decoder.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright
|
|
2
|
+
// Copyright 2024 Garmin International, Inc.
|
|
3
3
|
// Licensed under the Flexible and Interoperable Data Transfer (FIT) Protocol License; you
|
|
4
4
|
// may not use this file except in compliance with the Flexible and Interoperable Data
|
|
5
5
|
// Transfer (FIT) Protocol License.
|
|
6
6
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
7
7
|
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
|
|
8
|
-
// Profile Version = 21.
|
|
9
|
-
// Tag = production/release/21.
|
|
8
|
+
// Profile Version = 21.133.0Release
|
|
9
|
+
// Tag = production/release/21.133.0-0-g6002091
|
|
10
10
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
11
11
|
|
|
12
12
|
|
|
@@ -332,15 +332,15 @@ class Decoder {
|
|
|
332
332
|
if (fieldName != null && (field != null || this.#optIncludeUnknownData)) {
|
|
333
333
|
message[fieldName] = { rawFieldValue, fieldDefinitionNumber: fieldDefinition.fieldDefinitionNumber };
|
|
334
334
|
|
|
335
|
-
if (field
|
|
335
|
+
if (field?.subFields?.length > 0) {
|
|
336
336
|
this.#fieldsWithSubFields.push(fieldName);
|
|
337
337
|
}
|
|
338
338
|
|
|
339
|
-
if (field
|
|
339
|
+
if (field?.hasComponents) {
|
|
340
340
|
this.#fieldsToExpand.push(fieldName);
|
|
341
341
|
}
|
|
342
342
|
|
|
343
|
-
if (field
|
|
343
|
+
if (field?.isAccumulated) {
|
|
344
344
|
this.#accumulator.add(mesgNum, fieldDefinition.fieldDefinitionNumber, rawFieldValue);
|
|
345
345
|
}
|
|
346
346
|
}
|
|
@@ -574,8 +574,12 @@ class Decoder {
|
|
|
574
574
|
mesg[targetField.name].fieldValue.push(null);
|
|
575
575
|
}
|
|
576
576
|
else {
|
|
577
|
-
|
|
578
577
|
value = value / field.scale[j] - field.offset[j];
|
|
578
|
+
|
|
579
|
+
if (this.#optConvertTypesToStrings) {
|
|
580
|
+
value = this.#convertTypeToString(mesg, targetField, value);
|
|
581
|
+
}
|
|
582
|
+
|
|
579
583
|
mesg[targetField.name].fieldValue.push(value);
|
|
580
584
|
}
|
|
581
585
|
|
package/src/fit.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright
|
|
2
|
+
// Copyright 2024 Garmin International, Inc.
|
|
3
3
|
// Licensed under the Flexible and Interoperable Data Transfer (FIT) Protocol License; you
|
|
4
4
|
// may not use this file except in compliance with the Flexible and Interoperable Data
|
|
5
5
|
// Transfer (FIT) Protocol License.
|
|
6
6
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
7
7
|
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
|
|
8
|
-
// Profile Version = 21.
|
|
9
|
-
// Tag = production/release/21.
|
|
8
|
+
// Profile Version = 21.133.0Release
|
|
9
|
+
// Tag = production/release/21.133.0-0-g6002091
|
|
10
10
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
11
11
|
|
|
12
12
|
|
package/src/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Copyright
|
|
2
|
+
// Copyright 2024 Garmin International, Inc.
|
|
3
3
|
// Licensed under the Flexible and Interoperable Data Transfer (FIT) Protocol License; you
|
|
4
4
|
// may not use this file except in compliance with the Flexible and Interoperable Data
|
|
5
5
|
// Transfer (FIT) Protocol License.
|
|
6
6
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
7
7
|
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
|
|
8
|
-
// Profile Version = 21.
|
|
9
|
-
// Tag = production/release/21.
|
|
8
|
+
// Profile Version = 21.133.0Release
|
|
9
|
+
// Tag = production/release/21.133.0-0-g6002091
|
|
10
10
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
11
11
|
|
|
12
12
|
|