@sports-alliance/sports-lib 7.0.12 → 7.0.13

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.
@@ -1,15 +1,10 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.GeoLibAdapter = void 0;
7
- const getPreciseDistance_1 = __importDefault(require("geolib/es/getPreciseDistance"));
8
- const getDistance_1 = __importDefault(require("geolib/es/getDistance"));
9
- const findNearest_1 = __importDefault(require("geolib/es/findNearest"));
4
+ const geolib_1 = require("geolib");
10
5
  class GeoLibAdapter {
11
6
  constructor() {
12
- this.findNearest = findNearest_1.default;
7
+ this.findNearest = geolib_1.findNearest;
13
8
  }
14
9
  getDistance(positionArray, precise = false, accuracy = 0.1) {
15
10
  let distance = 0;
@@ -25,8 +20,8 @@ class GeoLibAdapter {
25
20
  latitude: nextPosition.latitudeDegrees
26
21
  };
27
22
  distance += precise
28
- ? (0, getPreciseDistance_1.default)(firstPositionAsDecimal, nextPositionAsDecimal, accuracy)
29
- : (0, getDistance_1.default)(firstPositionAsDecimal, nextPositionAsDecimal, accuracy);
23
+ ? (0, geolib_1.getPreciseDistance)(firstPositionAsDecimal, nextPositionAsDecimal, accuracy)
24
+ : (0, geolib_1.getDistance)(firstPositionAsDecimal, nextPositionAsDecimal, accuracy);
30
25
  firstPosition = nextPosition;
31
26
  }
32
27
  return distance;
package/lib/esm/index.js CHANGED
@@ -4874,9 +4874,7 @@ var Stream = class {
4874
4874
  };
4875
4875
 
4876
4876
  // src/geodesy/adapters/geolib.adapter.ts
4877
- import getPreciseDistance from "geolib/es/getPreciseDistance";
4878
- import getDistance from "geolib/es/getDistance";
4879
- import findNearest from "geolib/es/findNearest";
4877
+ import { getPreciseDistance, getDistance, findNearest } from "geolib";
4880
4878
  var GeoLibAdapter = class {
4881
4879
  constructor() {
4882
4880
  this.findNearest = findNearest;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sports-alliance/sports-lib",
3
- "version": "7.0.12",
3
+ "version": "7.0.13",
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",