fitness-models
Advanced tools
Comparing version 0.3.0 to 0.3.1
# Change Log | ||
All notable changes to this project will be documented in this file. | ||
## [0.3.1] 2019-03-29 | ||
### Merge remote-tracking branch 'origin/renovate/luxon-1.x' | ||
# Conflicts | ||
- # package-lock.json | ||
### Fixed | ||
- deploying | ||
- tests | ||
### Other | ||
- Update dependency luxon to ^1.12.0 | ||
## [0.3.0] 2019-03-29 | ||
@@ -5,0 +18,0 @@ ### Added |
@@ -759,2 +759,2 @@ import { GarminBuilder, buildGPX } from 'gpx-builder'; | ||
export { workoutTypes as WORKOUT_TYPES, Workout, Point }; | ||
export { Point, workoutTypes as WORKOUT_TYPES, Workout }; |
@@ -763,4 +763,4 @@ 'use strict'; | ||
exports.Point = Point; | ||
exports.WORKOUT_TYPES = workoutTypes; | ||
exports.Workout = Workout; | ||
exports.Point = Point; |
@@ -73,2 +73,2 @@ const RUNNING = 0; | ||
export { RUNNING, CYCLING_TRANSPORT, CYCLING_SPORT, MOUNTAIN_BIKINGS, SKATING, ROLLER_SKIING, SKIING_CROSS_COUNTRY, SKIING_DOWNHILL, SNOWBOARDING, KAYAKING, KITE_SURFING, ROWING, SAILING, WINDSURFING, FINTESS_WALKING, GOLFING, HIKING, ORIENTEERING, WALKING, RIDING, SWIMMING, CYCLING_INDOOR, OTHER, AEROBICS, BADMINTON, BASEBALL, BASKETBALL, BOXING, CLIMBING_STAIRS, CRICKET, ELLIPTICAL_TRAINING, DANCING, FENCING, FOOTBALL_AMERICAN, FOOTBALL_RUGBY, FOOTBALL_SOCCER, HANDBALL, HOCKEY, PILATES, POLO, SCUBA_DIVING, SQUASH, TABLE_TENIS, TENNIS, VOLEYBALL_BEACH, VOLEYBALL_INDOOR, WEIGHT_TRAINING, YOGA, MARTINAL_ARTS, GYMNASTICS, STEP_COUNTER, CIRKUIT_TRAINING, RUNNING_TREADMILL, SKATEBOARDING, SURFING, SNOWSHOEING, WHEELCHAIR, CLIMBING, WALKING_TREADMILL, KICK_SCOOTER, STAND_UP_PADDLING, TRAIL_RUNNING, ROWING_INDOORS, FLOORBALL, ICE_SKATING, SKI_TOURING, ROPE_JUMPING, STRETCHING, CANICROSS, PADDLE_TENNIS, PARAGLIDING }; | ||
export { AEROBICS, BADMINTON, BASEBALL, BASKETBALL, BOXING, CANICROSS, CIRKUIT_TRAINING, CLIMBING, CLIMBING_STAIRS, CRICKET, CYCLING_INDOOR, CYCLING_SPORT, CYCLING_TRANSPORT, DANCING, ELLIPTICAL_TRAINING, FENCING, FINTESS_WALKING, FLOORBALL, FOOTBALL_AMERICAN, FOOTBALL_RUGBY, FOOTBALL_SOCCER, GOLFING, GYMNASTICS, HANDBALL, HIKING, HOCKEY, ICE_SKATING, KAYAKING, KICK_SCOOTER, KITE_SURFING, MARTINAL_ARTS, MOUNTAIN_BIKINGS, ORIENTEERING, OTHER, PADDLE_TENNIS, PARAGLIDING, PILATES, POLO, RIDING, ROLLER_SKIING, ROPE_JUMPING, ROWING, ROWING_INDOORS, RUNNING, RUNNING_TREADMILL, SAILING, SCUBA_DIVING, SKATEBOARDING, SKATING, SKIING_CROSS_COUNTRY, SKIING_DOWNHILL, SKI_TOURING, SNOWBOARDING, SNOWSHOEING, SQUASH, STAND_UP_PADDLING, STEP_COUNTER, STRETCHING, SURFING, SWIMMING, TABLE_TENIS, TENNIS, TRAIL_RUNNING, VOLEYBALL_BEACH, VOLEYBALL_INDOOR, WALKING, WALKING_TREADMILL, WEIGHT_TRAINING, WHEELCHAIR, WINDSURFING, YOGA }; |
@@ -77,25 +77,2 @@ 'use strict'; | ||
exports.RUNNING = RUNNING; | ||
exports.CYCLING_TRANSPORT = CYCLING_TRANSPORT; | ||
exports.CYCLING_SPORT = CYCLING_SPORT; | ||
exports.MOUNTAIN_BIKINGS = MOUNTAIN_BIKINGS; | ||
exports.SKATING = SKATING; | ||
exports.ROLLER_SKIING = ROLLER_SKIING; | ||
exports.SKIING_CROSS_COUNTRY = SKIING_CROSS_COUNTRY; | ||
exports.SKIING_DOWNHILL = SKIING_DOWNHILL; | ||
exports.SNOWBOARDING = SNOWBOARDING; | ||
exports.KAYAKING = KAYAKING; | ||
exports.KITE_SURFING = KITE_SURFING; | ||
exports.ROWING = ROWING; | ||
exports.SAILING = SAILING; | ||
exports.WINDSURFING = WINDSURFING; | ||
exports.FINTESS_WALKING = FINTESS_WALKING; | ||
exports.GOLFING = GOLFING; | ||
exports.HIKING = HIKING; | ||
exports.ORIENTEERING = ORIENTEERING; | ||
exports.WALKING = WALKING; | ||
exports.RIDING = RIDING; | ||
exports.SWIMMING = SWIMMING; | ||
exports.CYCLING_INDOOR = CYCLING_INDOOR; | ||
exports.OTHER = OTHER; | ||
exports.AEROBICS = AEROBICS; | ||
@@ -106,44 +83,67 @@ exports.BADMINTON = BADMINTON; | ||
exports.BOXING = BOXING; | ||
exports.CANICROSS = CANICROSS; | ||
exports.CIRKUIT_TRAINING = CIRKUIT_TRAINING; | ||
exports.CLIMBING = CLIMBING; | ||
exports.CLIMBING_STAIRS = CLIMBING_STAIRS; | ||
exports.CRICKET = CRICKET; | ||
exports.CYCLING_INDOOR = CYCLING_INDOOR; | ||
exports.CYCLING_SPORT = CYCLING_SPORT; | ||
exports.CYCLING_TRANSPORT = CYCLING_TRANSPORT; | ||
exports.DANCING = DANCING; | ||
exports.ELLIPTICAL_TRAINING = ELLIPTICAL_TRAINING; | ||
exports.DANCING = DANCING; | ||
exports.FENCING = FENCING; | ||
exports.FINTESS_WALKING = FINTESS_WALKING; | ||
exports.FLOORBALL = FLOORBALL; | ||
exports.FOOTBALL_AMERICAN = FOOTBALL_AMERICAN; | ||
exports.FOOTBALL_RUGBY = FOOTBALL_RUGBY; | ||
exports.FOOTBALL_SOCCER = FOOTBALL_SOCCER; | ||
exports.GOLFING = GOLFING; | ||
exports.GYMNASTICS = GYMNASTICS; | ||
exports.HANDBALL = HANDBALL; | ||
exports.HIKING = HIKING; | ||
exports.HOCKEY = HOCKEY; | ||
exports.ICE_SKATING = ICE_SKATING; | ||
exports.KAYAKING = KAYAKING; | ||
exports.KICK_SCOOTER = KICK_SCOOTER; | ||
exports.KITE_SURFING = KITE_SURFING; | ||
exports.MARTINAL_ARTS = MARTINAL_ARTS; | ||
exports.MOUNTAIN_BIKINGS = MOUNTAIN_BIKINGS; | ||
exports.ORIENTEERING = ORIENTEERING; | ||
exports.OTHER = OTHER; | ||
exports.PADDLE_TENNIS = PADDLE_TENNIS; | ||
exports.PARAGLIDING = PARAGLIDING; | ||
exports.PILATES = PILATES; | ||
exports.POLO = POLO; | ||
exports.RIDING = RIDING; | ||
exports.ROLLER_SKIING = ROLLER_SKIING; | ||
exports.ROPE_JUMPING = ROPE_JUMPING; | ||
exports.ROWING = ROWING; | ||
exports.ROWING_INDOORS = ROWING_INDOORS; | ||
exports.RUNNING = RUNNING; | ||
exports.RUNNING_TREADMILL = RUNNING_TREADMILL; | ||
exports.SAILING = SAILING; | ||
exports.SCUBA_DIVING = SCUBA_DIVING; | ||
exports.SKATEBOARDING = SKATEBOARDING; | ||
exports.SKATING = SKATING; | ||
exports.SKIING_CROSS_COUNTRY = SKIING_CROSS_COUNTRY; | ||
exports.SKIING_DOWNHILL = SKIING_DOWNHILL; | ||
exports.SKI_TOURING = SKI_TOURING; | ||
exports.SNOWBOARDING = SNOWBOARDING; | ||
exports.SNOWSHOEING = SNOWSHOEING; | ||
exports.SQUASH = SQUASH; | ||
exports.STAND_UP_PADDLING = STAND_UP_PADDLING; | ||
exports.STEP_COUNTER = STEP_COUNTER; | ||
exports.STRETCHING = STRETCHING; | ||
exports.SURFING = SURFING; | ||
exports.SWIMMING = SWIMMING; | ||
exports.TABLE_TENIS = TABLE_TENIS; | ||
exports.TENNIS = TENNIS; | ||
exports.TRAIL_RUNNING = TRAIL_RUNNING; | ||
exports.VOLEYBALL_BEACH = VOLEYBALL_BEACH; | ||
exports.VOLEYBALL_INDOOR = VOLEYBALL_INDOOR; | ||
exports.WALKING = WALKING; | ||
exports.WALKING_TREADMILL = WALKING_TREADMILL; | ||
exports.WEIGHT_TRAINING = WEIGHT_TRAINING; | ||
exports.WHEELCHAIR = WHEELCHAIR; | ||
exports.WINDSURFING = WINDSURFING; | ||
exports.YOGA = YOGA; | ||
exports.MARTINAL_ARTS = MARTINAL_ARTS; | ||
exports.GYMNASTICS = GYMNASTICS; | ||
exports.STEP_COUNTER = STEP_COUNTER; | ||
exports.CIRKUIT_TRAINING = CIRKUIT_TRAINING; | ||
exports.RUNNING_TREADMILL = RUNNING_TREADMILL; | ||
exports.SKATEBOARDING = SKATEBOARDING; | ||
exports.SURFING = SURFING; | ||
exports.SNOWSHOEING = SNOWSHOEING; | ||
exports.WHEELCHAIR = WHEELCHAIR; | ||
exports.CLIMBING = CLIMBING; | ||
exports.WALKING_TREADMILL = WALKING_TREADMILL; | ||
exports.KICK_SCOOTER = KICK_SCOOTER; | ||
exports.STAND_UP_PADDLING = STAND_UP_PADDLING; | ||
exports.TRAIL_RUNNING = TRAIL_RUNNING; | ||
exports.ROWING_INDOORS = ROWING_INDOORS; | ||
exports.FLOORBALL = FLOORBALL; | ||
exports.ICE_SKATING = ICE_SKATING; | ||
exports.SKI_TOURING = SKI_TOURING; | ||
exports.ROPE_JUMPING = ROPE_JUMPING; | ||
exports.STRETCHING = STRETCHING; | ||
exports.CANICROSS = CANICROSS; | ||
exports.PADDLE_TENNIS = PADDLE_TENNIS; | ||
exports.PARAGLIDING = PARAGLIDING; |
@@ -9,3 +9,3 @@ import { DateTime, Duration } from 'luxon'; | ||
typeId: WorkoutType | string | number; | ||
points?: Array<Point>; | ||
points?: Point[]; | ||
distance?: Unit; | ||
@@ -19,3 +19,3 @@ ascent?: Unit; | ||
title?: string; | ||
hashtags?: Array<string>; | ||
hashtags?: string[]; | ||
isRace?: boolean; | ||
@@ -28,3 +28,3 @@ isCommute?: boolean; | ||
protected typeId: WorkoutType | string | number; | ||
protected points: Array<Point>; | ||
protected points: Point[]; | ||
protected distance?: Unit; | ||
@@ -38,3 +38,3 @@ protected calories?: number; | ||
protected descent?: Unit; | ||
protected hashtags: Array<string>; | ||
protected hashtags: string[]; | ||
isRace: boolean; | ||
@@ -60,8 +60,8 @@ isCommute: boolean; | ||
getDescent(): Unit | undefined; | ||
getHashtags(): Array<string>; | ||
getHashtags(): string[]; | ||
hasHashtag(hashtag: string): boolean; | ||
setHashtags(hashtags: Array<string>): Workout; | ||
setHashtags(hashtags: string[]): Workout; | ||
removeHashtag(hashtag: string): Workout; | ||
removeHashtags(hashtags: Array<string>): Workout; | ||
addHashtags(hashtags: Array<string>): Workout; | ||
removeHashtags(hashtags: string[]): Workout; | ||
addHashtags(hashtags: string[]): Workout; | ||
addHashtag(hashtag: string): Workout; | ||
@@ -72,3 +72,3 @@ setTypeId(typeId: WorkoutType | string | number): Workout; | ||
setDistance(distance?: Unit): Workout; | ||
setPoints(points: Array<Point>): Workout; | ||
setPoints(points: Point[]): Workout; | ||
setCalories(calories?: number): Workout; | ||
@@ -75,0 +75,0 @@ setNotes(notes?: string): Workout; |
{ | ||
"name": "fitness-models", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "Extendable fitness models for Workout and GPS points", | ||
@@ -45,5 +45,5 @@ "main": "dist/index.js", | ||
"gpx-builder": "^2.0.1", | ||
"luxon": "^1.11.4", | ||
"luxon": "^1.12.0", | ||
"mathjs": "^5.8.0" | ||
} | ||
} |
@@ -13,3 +13,3 @@ import { DateTime, Duration } from 'luxon'; | ||
points?: Array<Point>, | ||
points?: Point[], | ||
distance?: Unit, | ||
@@ -23,3 +23,3 @@ ascent?: Unit, | ||
title?: string, | ||
hashtags?: Array<string>, | ||
hashtags?: string[], | ||
isRace?: boolean, | ||
@@ -36,3 +36,3 @@ isCommute?: boolean, | ||
protected points: Array<Point>; | ||
protected points: Point[]; | ||
@@ -55,3 +55,3 @@ protected distance?: Unit; | ||
protected hashtags: Array<string>; | ||
protected hashtags: string[]; | ||
@@ -177,3 +177,3 @@ public isRace: boolean; | ||
public getHashtags(): Array<string> { | ||
public getHashtags(): string[] { | ||
return this.hashtags; | ||
@@ -186,3 +186,3 @@ } | ||
public setHashtags(hashtags: Array<string>) { | ||
public setHashtags(hashtags: string[]) { | ||
return this.clone({ hashtags }); | ||
@@ -195,3 +195,3 @@ } | ||
public removeHashtags(hashtags: Array<string>) { | ||
public removeHashtags(hashtags: string[]) { | ||
return this.clone({ | ||
@@ -202,3 +202,3 @@ hashtags: hashtags.filter(hashtag => hashtags.includes(hashtag)), | ||
public addHashtags(hashtags: Array<string>) { | ||
public addHashtags(hashtags: string[]) { | ||
return this.clone({ | ||
@@ -232,3 +232,3 @@ hashtags: [ | ||
public setPoints(points: Array<Point>) { | ||
public setPoints(points: Point[]) { | ||
return this.clone({ points }); | ||
@@ -235,0 +235,0 @@ } |
@@ -13,3 +13,3 @@ import { GarminBuilder, buildGPX } from 'gpx-builder'; | ||
// @ts-ignore | ||
function convertPoints(points: Array<EndomondoPoint>): Array<Point> { | ||
function convertPoints(points: EndomondoPoint[]): Point[] { | ||
return points.map((point: EndomondoPoint) => { | ||
@@ -16,0 +16,0 @@ return point.toObject(); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
128197
Updatedluxon@^1.12.0