endurance-coach 1.3.0 → 1.4.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/dist/cli/args.d.ts +2 -107
- package/dist/cli/args.js +486 -29
- package/dist/cli/commands/activity-record.d.ts +2 -0
- package/dist/cli/commands/activity-record.js +47 -0
- package/dist/cli/commands/interview-persistence.d.ts +3 -0
- package/dist/cli/commands/interview-persistence.js +71 -0
- package/dist/cli/commands/interview.d.ts +2 -0
- package/dist/cli/commands/interview.js +306 -0
- package/dist/cli/commands/interviews.d.ts +16 -0
- package/dist/cli/commands/interviews.js +73 -0
- package/dist/cli/commands/query.js +7 -4
- package/dist/cli/commands/stats.js +2 -0
- package/dist/cli/commands/strava.d.ts +19 -1
- package/dist/cli/commands/strava.js +64 -152
- package/dist/cli/commands/templates.js +192 -202
- package/dist/cli/commands/training-load.js +2 -0
- package/dist/cli/commands/triggers.d.ts +2 -0
- package/dist/cli/commands/triggers.js +114 -0
- package/dist/cli/help.js +20 -0
- package/dist/cli/index.js +25 -0
- package/dist/db/client.d.ts +15 -0
- package/dist/db/client.js +62 -75
- package/dist/db/migrate.d.ts +1 -1
- package/dist/db/migrate.js +12 -10
- package/dist/db/migrations/001_initial_schema.sql +139 -0
- package/dist/db/migrations/002_interview_tables.sql +51 -0
- package/dist/db/migrations/003_add_activity_source.sql +4 -0
- package/dist/db/migrations/migrations/001_initial_schema.sql +139 -0
- package/dist/db/migrations/migrations/002_interview_tables.sql +51 -0
- package/dist/db/migrations/migrations/003_add_activity_source.sql +4 -0
- package/dist/db/migrations.d.ts +21 -0
- package/dist/db/migrations.js +125 -0
- package/dist/db/storage.d.ts +30 -0
- package/dist/db/storage.js +43 -0
- package/dist/expander/expander.d.ts +7 -0
- package/dist/expander/expander.js +1 -1
- package/dist/expander/index.d.ts +1 -1
- package/dist/expander/index.js +1 -1
- package/dist/expander/validation.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/lib/config.js +21 -17
- package/dist/lib/freshness.d.ts +36 -0
- package/dist/lib/freshness.js +141 -0
- package/dist/lib/triggers.d.ts +27 -0
- package/dist/lib/triggers.js +215 -0
- package/dist/schema/compact-plan.d.ts +1 -1
- package/dist/strava/types.d.ts +5 -2
- package/dist/templates/converter.js +1 -1
- package/dist/templates/template.schema.d.ts +2 -2
- package/dist/viewer/lib/UpdatePlan.js +49 -31
- package/package.json +12 -2
- package/templates/plan-viewer.html +12 -12
- package/templates/strength/rest.yaml +1 -1
package/dist/cli/args.d.ts
CHANGED
|
@@ -1,110 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
clientId?: string;
|
|
4
|
-
clientSecret?: string;
|
|
5
|
-
accessToken?: string;
|
|
6
|
-
refreshToken?: string;
|
|
7
|
-
days?: number;
|
|
8
|
-
}
|
|
9
|
-
export interface RenderArgs {
|
|
10
|
-
command: "render";
|
|
11
|
-
inputFile: string;
|
|
12
|
-
outputFile?: string;
|
|
13
|
-
}
|
|
14
|
-
export interface StatsArgs {
|
|
15
|
-
command: "stats";
|
|
16
|
-
weeks?: number;
|
|
17
|
-
longestWeeks?: number;
|
|
18
|
-
json: boolean;
|
|
19
|
-
}
|
|
20
|
-
export interface TrainingLoadArgs {
|
|
21
|
-
command: "training-load";
|
|
22
|
-
weeks?: number;
|
|
23
|
-
json: boolean;
|
|
24
|
-
}
|
|
25
|
-
export interface FoundationArgs {
|
|
26
|
-
command: "foundation";
|
|
27
|
-
topWeeks?: number;
|
|
28
|
-
json: boolean;
|
|
29
|
-
}
|
|
30
|
-
export interface StrengthArgs {
|
|
31
|
-
command: "strength";
|
|
32
|
-
months?: number;
|
|
33
|
-
longMonths?: number;
|
|
34
|
-
easyHrMax?: number;
|
|
35
|
-
longMinutes?: number;
|
|
36
|
-
years?: number;
|
|
37
|
-
json: boolean;
|
|
38
|
-
}
|
|
39
|
-
export interface SchedulePreferencesArgs {
|
|
40
|
-
command: "schedule-preferences";
|
|
41
|
-
rideMinutes?: number;
|
|
42
|
-
runMinutes?: number;
|
|
43
|
-
json: boolean;
|
|
44
|
-
}
|
|
45
|
-
export interface HrZonesArgs {
|
|
46
|
-
command: "hr-zones";
|
|
47
|
-
weeks?: number;
|
|
48
|
-
distributionWeeks?: number;
|
|
49
|
-
json: boolean;
|
|
50
|
-
}
|
|
51
|
-
export interface QueryArgs {
|
|
52
|
-
command: "query";
|
|
53
|
-
sql: string;
|
|
54
|
-
json: boolean;
|
|
55
|
-
}
|
|
56
|
-
export interface AuthArgs {
|
|
57
|
-
command: "auth";
|
|
58
|
-
clientId?: string;
|
|
59
|
-
clientSecret?: string;
|
|
60
|
-
code?: string;
|
|
61
|
-
}
|
|
62
|
-
export interface ActivityLapsArgs {
|
|
63
|
-
command: "activity";
|
|
64
|
-
id: number;
|
|
65
|
-
laps: true;
|
|
66
|
-
}
|
|
67
|
-
export interface HelpArgs {
|
|
68
|
-
command: "help";
|
|
69
|
-
}
|
|
70
|
-
export interface ValidateArgs {
|
|
71
|
-
command: "validate";
|
|
72
|
-
inputFile: string;
|
|
73
|
-
compact?: boolean;
|
|
74
|
-
}
|
|
75
|
-
export interface ExpandArgs {
|
|
76
|
-
command: "expand";
|
|
77
|
-
inputFile: string;
|
|
78
|
-
outputFile?: string;
|
|
79
|
-
format?: "json" | "yaml";
|
|
80
|
-
verbose?: boolean;
|
|
81
|
-
}
|
|
82
|
-
export interface TemplatesArgs {
|
|
83
|
-
command: "templates";
|
|
84
|
-
sport?: string;
|
|
85
|
-
show?: string;
|
|
86
|
-
type?: string;
|
|
87
|
-
source?: "user" | "builtin" | "all";
|
|
88
|
-
verbose?: boolean;
|
|
89
|
-
create?: string;
|
|
90
|
-
category?: string;
|
|
91
|
-
templateFile?: string;
|
|
92
|
-
overwrite?: boolean;
|
|
93
|
-
dryRun?: boolean;
|
|
94
|
-
example?: boolean;
|
|
95
|
-
userTemplatesDir?: string;
|
|
96
|
-
validate?: string;
|
|
97
|
-
}
|
|
98
|
-
export interface SchemaArgs {
|
|
99
|
-
command: "schema";
|
|
100
|
-
}
|
|
101
|
-
export interface ModifyArgs {
|
|
102
|
-
command: "modify";
|
|
103
|
-
backup: string;
|
|
104
|
-
plan: string;
|
|
105
|
-
output?: string;
|
|
106
|
-
}
|
|
107
|
-
export type CliArgs = SyncArgs | RenderArgs | StatsArgs | TrainingLoadArgs | FoundationArgs | StrengthArgs | SchedulePreferencesArgs | HrZonesArgs | QueryArgs | AuthArgs | ActivityLapsArgs | HelpArgs | ModifyArgs | ValidateArgs | SchemaArgs | ExpandArgs | TemplatesArgs;
|
|
1
|
+
import type { CliArgs, SyncArgs, RenderArgs, StatsArgs, TrainingLoadArgs, FoundationArgs, StrengthArgs, SchedulePreferencesArgs, HrZonesArgs, QueryArgs, AuthArgs, ActivityLapsArgs, HelpArgs, ValidateArgs, ExpandArgs, TemplatesArgs, ModifyArgs, InterviewArgs, InterviewSaveArgs, PreliminaryNoteSaveArgs, ActivityRecordArgs, TriggersArgs, InterviewsListArgs, InterviewsGetArgs } from "./args.types.js";
|
|
2
|
+
export type { CliArgs, SyncArgs, RenderArgs, StatsArgs, TrainingLoadArgs, FoundationArgs, StrengthArgs, SchedulePreferencesArgs, HrZonesArgs, QueryArgs, AuthArgs, ActivityLapsArgs, HelpArgs, ValidateArgs, ExpandArgs, TemplatesArgs, ModifyArgs, InterviewArgs, InterviewSaveArgs, PreliminaryNoteSaveArgs, ActivityRecordArgs, TriggersArgs, InterviewsListArgs, InterviewsGetArgs, };
|
|
108
3
|
/**
|
|
109
4
|
* Parse command-line arguments from process.argv and produce the corresponding CLI command object.
|
|
110
5
|
*
|