Switch to properly released zwiftout lib

This commit is contained in:
Rene Saarsoo 2020-10-04 15:11:23 +03:00
parent 1056954efe
commit 98ad7d1f62
8 changed files with 32 additions and 7 deletions

View File

@ -15,7 +15,8 @@
"react-scripts": "3.4.3", "react-scripts": "3.4.3",
"react-simple-code-editor": "^0.11.0", "react-simple-code-editor": "^0.11.0",
"styled-components": "^5.2.0", "styled-components": "^5.2.0",
"typescript": "~3.7.2" "typescript": "~3.7.2",
"zwiftout": "^0.1.0"
}, },
"scripts": { "scripts": {
"start": "react-scripts start", "start": "react-scripts start",

View File

@ -1,7 +1,7 @@
import React, { useState, useCallback } from 'react'; import React, { useState, useCallback } from 'react';
import { WorkoutPlot } from './components/WorkoutPlot'; import { WorkoutPlot } from './components/WorkoutPlot';
import { WorkoutStats } from './components/WorkoutStats'; import { WorkoutStats } from './components/WorkoutStats';
import { parse, chunkRangeIntervals, Duration } from 'make-workout'; import { parse, chunkRangeIntervals, Duration } from 'zwiftout';
import { ErrorMessage } from './components/ErrorMessage'; import { ErrorMessage } from './components/ErrorMessage';
import styled from 'styled-components'; import styled from 'styled-components';
import { CodeEditor } from './components/CodeEditor'; import { CodeEditor } from './components/CodeEditor';

View File

@ -1,5 +1,5 @@
import styled from "styled-components"; import styled from "styled-components";
import { ZoneType } from "make-workout"; import { ZoneType } from "zwiftout";
export type BarProps = { export type BarProps = {
// Percentage of total workout length // Percentage of total workout length

View File

@ -1,6 +1,6 @@
import React from "react"; import React from "react";
import styled from "styled-components"; import styled from "styled-components";
import { Interval, Intensity, Duration, totalDuration, maximumIntensity } from "make-workout"; import { Interval, Intensity, Duration, totalDuration, maximumIntensity } from "zwiftout";
import { BarProps, Bar } from "./Bar"; import { BarProps, Bar } from "./Bar";
const toBarProps = (interval: Interval, workoutDuration: Duration, maxIntensity: Intensity): BarProps => ({ const toBarProps = (interval: Interval, workoutDuration: Duration, maxIntensity: Intensity): BarProps => ({

View File

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { stats, Workout, Intensity } from 'make-workout'; import { stats, Workout, Intensity } from 'zwiftout';
import { formatDuration } from './formatDuration'; import { formatDuration } from './formatDuration';
import styled from 'styled-components'; import styled from 'styled-components';

View File

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { Workout, generateZwo } from 'make-workout'; import { Workout, generateZwo } from 'zwiftout';
import styled from 'styled-components'; import styled from 'styled-components';
const Header = styled.h2` const Header = styled.h2`

View File

@ -1,4 +1,4 @@
import { Duration } from "make-workout"; import { Duration } from "zwiftout";
const splitDuration = (duration: Duration) => ({ const splitDuration = (duration: Duration) => ({
hours: Math.floor(duration.seconds / 60 / 60), hours: Math.floor(duration.seconds / 60 / 60),

View File

@ -2130,6 +2130,11 @@ argparse@^1.0.7:
dependencies: dependencies:
sprintf-js "~1.0.2" sprintf-js "~1.0.2"
argparse@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==
aria-query@^3.0.0: aria-query@^3.0.0:
version "3.0.0" version "3.0.0"
resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-3.0.0.tgz#65b3fcc1ca1155a8c9ae64d6eee297f15d5133cc" resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-3.0.0.tgz#65b3fcc1ca1155a8c9ae64d6eee297f15d5133cc"
@ -8630,6 +8635,11 @@ raf@^3.4.1:
dependencies: dependencies:
performance-now "^2.1.0" performance-now "^2.1.0"
ramda@^0.27.1:
version "0.27.1"
resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.27.1.tgz#66fc2df3ef873874ffc2da6aa8984658abacf5c9"
integrity sha512-PgIdVpn5y5Yns8vqb8FzBUEYn98V3xcPgawAkkgj0YJ0qDsnHCiNmZYfOGMgOvoB0eWFLpYbhxUR3mxfDIMvpw==
randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0:
version "2.1.0" version "2.1.0"
resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a"
@ -10930,6 +10940,11 @@ xml-name-validator@^3.0.0:
resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a"
integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==
xml@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5"
integrity sha1-eLpyAgApxbyHuKgaPPzXS0ovweU=
xmlchars@^2.1.1: xmlchars@^2.1.1:
version "2.2.0" version "2.2.0"
resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb"
@ -10992,3 +11007,12 @@ yargs@^13.3.0, yargs@^13.3.2:
which-module "^2.0.0" which-module "^2.0.0"
y18n "^4.0.0" y18n "^4.0.0"
yargs-parser "^13.1.2" yargs-parser "^13.1.2"
zwiftout@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/zwiftout/-/zwiftout-0.1.0.tgz#7f59650839fef1e50f78ee61ad3b3113235dd39f"
integrity sha512-WCF1B3dqqTGu8rVmZXiWOkx1k8c2mfQlDTZbgjVVivP54/H6t8OgCudKaPPbL50dQs/ghFr5iXRTQXwWQkhSBQ==
dependencies:
argparse "^2.0.1"
ramda "^0.27.1"
xml "^1.0.1"