@sports-alliance/sports-lib 6.1.3 → 6.1.5

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.
@@ -144,6 +144,8 @@ export declare enum ActivityTypes {
144
144
  'mountain' = "Mountain Biking",
145
145
  'Mountain biking' = "Mountain Biking",
146
146
  'cycling_downhill' = "Downhill Cycling",
147
+ 'DownhillCycling' = "Downhill Cycling",
148
+ 'Downhill Cycling' = "Downhill Cycling",
147
149
  /**
148
150
  * Motorcycling
149
151
  */
@@ -233,6 +233,8 @@ var ActivityTypes;
233
233
  ActivityTypes["mountain"] = "Mountain Biking";
234
234
  ActivityTypes["Mountain biking"] = "Mountain Biking";
235
235
  ActivityTypes["cycling_downhill"] = "Downhill Cycling";
236
+ ActivityTypes["DownhillCycling"] = "Downhill Cycling";
237
+ ActivityTypes["Downhill Cycling"] = "Downhill Cycling";
236
238
  /**
237
239
  * Motorcycling
238
240
  */
@@ -915,7 +917,8 @@ ActivityTypesGroupMapping.map = {
915
917
  ActivityTypes.MountainBiking,
916
918
  ActivityTypes.Biking,
917
919
  ActivityTypes.VirtualCycling,
918
- ActivityTypes.EBiking
920
+ ActivityTypes.EBiking,
921
+ ActivityTypes.DownhillCycling
919
922
  // @todo add more
920
923
  ],
921
924
  [ActivityTypeGroups.Swimming]: [ActivityTypes.Swimming, ActivityTypes.OpenWaterSwimming],
@@ -4,9 +4,10 @@ exports.EventImporterSuuntoSML = void 0;
4
4
  const importer_suunto_json_1 = require("./importer.suunto.json");
5
5
  const helpers_1 = require("../../../utilities/helpers");
6
6
  const activity_parsing_options_1 = require("../../../../activities/activity-parsing-options");
7
- const parser = require('fast-xml-parser');
7
+ const fast_xml_parser_1 = require("fast-xml-parser");
8
8
  class EventImporterSuuntoSML {
9
9
  static getFromXML(contents, options = activity_parsing_options_1.ActivityParsingOptions.DEFAULT, name = 'New Event') {
10
+ const parser = new fast_xml_parser_1.XMLParser();
10
11
  const json = parser.parse(contents).sml;
11
12
  // debugger;
12
13
  // A few mods here to convert it to compatible json suunto string
@@ -144,6 +144,8 @@ export declare enum ActivityTypes {
144
144
  'mountain' = "Mountain Biking",
145
145
  'Mountain biking' = "Mountain Biking",
146
146
  'cycling_downhill' = "Downhill Cycling",
147
+ 'DownhillCycling' = "Downhill Cycling",
148
+ 'Downhill Cycling' = "Downhill Cycling",
147
149
  /**
148
150
  * Motorcycling
149
151
  */
@@ -229,6 +229,8 @@ export var ActivityTypes;
229
229
  ActivityTypes["mountain"] = "Mountain Biking";
230
230
  ActivityTypes["Mountain biking"] = "Mountain Biking";
231
231
  ActivityTypes["cycling_downhill"] = "Downhill Cycling";
232
+ ActivityTypes["DownhillCycling"] = "Downhill Cycling";
233
+ ActivityTypes["Downhill Cycling"] = "Downhill Cycling";
232
234
  /**
233
235
  * Motorcycling
234
236
  */
@@ -910,7 +912,8 @@ ActivityTypesGroupMapping.map = {
910
912
  ActivityTypes.MountainBiking,
911
913
  ActivityTypes.Biking,
912
914
  ActivityTypes.VirtualCycling,
913
- ActivityTypes.EBiking
915
+ ActivityTypes.EBiking,
916
+ ActivityTypes.DownhillCycling
914
917
  // @todo add more
915
918
  ],
916
919
  [ActivityTypeGroups.Swimming]: [ActivityTypes.Swimming, ActivityTypes.OpenWaterSwimming],
@@ -1,9 +1,10 @@
1
1
  import { EventImporterSuuntoJSON } from './importer.suunto.json';
2
2
  import { isNumber } from '../../../utilities/helpers';
3
3
  import { ActivityParsingOptions } from '../../../../activities/activity-parsing-options';
4
- const parser = require('fast-xml-parser');
4
+ import { XMLParser } from 'fast-xml-parser';
5
5
  export class EventImporterSuuntoSML {
6
6
  static getFromXML(contents, options = ActivityParsingOptions.DEFAULT, name = 'New Event') {
7
+ const parser = new XMLParser();
7
8
  const json = parser.parse(contents).sml;
8
9
  // debugger;
9
10
  // A few mods here to convert it to compatible json suunto string
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sports-alliance/sports-lib",
3
- "version": "6.1.3",
3
+ "version": "6.1.5",
4
4
  "description": "A Library to for importing / exporting and processing GPX, TCX, FIT and JSON files from services such as Strava, Movescount, Garmin, Polar etc",
5
5
  "keywords": [
6
6
  "gpx",
@@ -53,7 +53,7 @@
53
53
  "author": "Sports-Alliance",
54
54
  "license": "SEE LICENSE IN LICENSE.md",
55
55
  "dependencies": {
56
- "fast-xml-parser": "^3.20.3",
56
+ "fast-xml-parser": "^5.3.3",
57
57
  "fit-file-parser": "^2.1.0",
58
58
  "geolib": "^3.3.1",
59
59
  "gpx-builder": "^3.7.8",