incremnt 0.4.0 → 0.6.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.
@@ -0,0 +1,163 @@
1
+ // Generated from shared/exercise-aliases.json by scripts/generate-exercise-aliases.mjs. Do not edit manually.
2
+ export const exerciseAliasMapping = Object.freeze({
3
+ "bench press": Object.freeze([
4
+ "bench press",
5
+ "bb bench press",
6
+ "barbell bench press",
7
+ "barbell bench press - medium grip",
8
+ "barbell bench press - wide grip",
9
+ "barbell bench press - close grip"
10
+ ]),
11
+ "squat": Object.freeze([
12
+ "squat",
13
+ "barbell squat",
14
+ "barbell full squat",
15
+ "back squat",
16
+ "barbell back squat"
17
+ ]),
18
+ "deadlift": Object.freeze([
19
+ "deadlift",
20
+ "barbell deadlift",
21
+ "sumo deadlift"
22
+ ]),
23
+ "overhead press": Object.freeze([
24
+ "overhead press",
25
+ "barbell shoulder press",
26
+ "shoulder press",
27
+ "military press",
28
+ "standing overhead press"
29
+ ]),
30
+ "bent over row": Object.freeze([
31
+ "bent over row",
32
+ "bent over barbell row",
33
+ "barbell row",
34
+ "barbell bent over row"
35
+ ]),
36
+ "barbell curl": Object.freeze([
37
+ "barbell curl",
38
+ "standing barbell curl",
39
+ "bicep curl",
40
+ "biceps curl",
41
+ "ez bar curl",
42
+ "ez-bar curl"
43
+ ]),
44
+ "pull ups": Object.freeze([
45
+ "pull ups",
46
+ "pull up",
47
+ "pullups",
48
+ "pullup",
49
+ "pull-up",
50
+ "pull-ups",
51
+ "chin ups",
52
+ "chin up",
53
+ "chinups",
54
+ "chinup",
55
+ "chin-ups",
56
+ "chin-up",
57
+ "wide grip pullups",
58
+ "weighted pull ups",
59
+ "weighted pull up",
60
+ "weighted pullups",
61
+ "weighted pullup",
62
+ "weighted pull-ups",
63
+ "weighted pull-up",
64
+ "weighted chin ups",
65
+ "weighted chin up",
66
+ "weighted chinups",
67
+ "weighted chinup",
68
+ "weighted chin-ups",
69
+ "weighted chin-up"
70
+ ]),
71
+ "push ups": Object.freeze([
72
+ "push ups",
73
+ "push up",
74
+ "pushups",
75
+ "pushup",
76
+ "push-up",
77
+ "push-ups",
78
+ "wide grip pushups",
79
+ "close grip pushups"
80
+ ]),
81
+ "dumbbell bench press": Object.freeze([
82
+ "dumbbell bench press",
83
+ "db bench press"
84
+ ]),
85
+ "dumbbell curl": Object.freeze([
86
+ "dumbbell curl",
87
+ "db curl",
88
+ "seated dumbbell curl",
89
+ "alternate hammer curl",
90
+ "dumbbell bicep curl",
91
+ "db bicep curl"
92
+ ]),
93
+ "incline dumbbell bench press": Object.freeze([
94
+ "incline dumbbell press",
95
+ "incline dumbbell bench press",
96
+ "incline db bench press"
97
+ ]),
98
+ "dumbbell lateral raise": Object.freeze([
99
+ "dumbbell lateral raise",
100
+ "lateral raise",
101
+ "db lateral raise",
102
+ "dumbbell side lateral raise",
103
+ "side lateral raise"
104
+ ]),
105
+ "leg press": Object.freeze([
106
+ "leg press",
107
+ "sled leg press",
108
+ "machine leg press"
109
+ ]),
110
+ "reverse pec deck": Object.freeze([
111
+ "reverse pec deck",
112
+ "reverse pec deck fly",
113
+ "rear delt fly machine",
114
+ "rear delt machine fly"
115
+ ]),
116
+ "cable fly": Object.freeze([
117
+ "cable fly",
118
+ "cable crossover",
119
+ "cable flye",
120
+ "cable flyes",
121
+ "cable crossovers"
122
+ ]),
123
+ "incline bench press": Object.freeze([
124
+ "incline bench press",
125
+ "incline barbell bench press"
126
+ ]),
127
+ "dumbbell shoulder press": Object.freeze([
128
+ "dumbbell shoulder press",
129
+ "seated dumbbell press",
130
+ "standing dumbbell press",
131
+ "arnold press",
132
+ "db shoulder press"
133
+ ]),
134
+ "lat pulldown": Object.freeze([
135
+ "lat pulldown",
136
+ "wide-grip lat pulldown",
137
+ "close-grip front lat pulldown"
138
+ ]),
139
+ "front squat": Object.freeze([
140
+ "front squat"
141
+ ]),
142
+ "hip thrust": Object.freeze([
143
+ "hip thrust",
144
+ "barbell hip thrust",
145
+ "dumbbell hip thrust",
146
+ "glute bridge"
147
+ ]),
148
+ "leg extension": Object.freeze([
149
+ "leg extension",
150
+ "machine leg extension"
151
+ ]),
152
+ "romanian deadlift": Object.freeze([
153
+ "romanian deadlift",
154
+ "rdl",
155
+ "stiff-legged dumbbell deadlift"
156
+ ]),
157
+ "tricep dip": Object.freeze([
158
+ "tricep dip",
159
+ "dips",
160
+ "bench dips",
161
+ "weighted dips"
162
+ ])
163
+ });
package/src/format.js CHANGED
@@ -200,6 +200,12 @@ function formatProgramSummary(payload) {
200
200
 
201
201
  lines.push(keyValue('Cycles', `${payload.completedCyclesCount} completed`));
202
202
 
203
+ if (payload.recoveryOutcome) {
204
+ lines.push(keyValue('Recovery', payload.recoveryOutcome.compactScheduleLine));
205
+ lines.push(keyValue('Targets', payload.recoveryOutcome.compactTargetLine));
206
+ lines.push(keyValue('Resume', payload.recoveryOutcome.compactNextStepLine));
207
+ }
208
+
203
209
  return lines.join('\n');
204
210
  }
205
211
 
@@ -639,6 +645,99 @@ function formatProposalDismissed(payload) {
639
645
  return ` Proposal ${chalk.bold(payload.id)} dismissed.`;
640
646
  }
641
647
 
648
+ function formatIncrementScoreHistory(payload) {
649
+ const snapshots = payload?.snapshots;
650
+ if (!Array.isArray(snapshots) || snapshots.length === 0) {
651
+ return 'No Increment Score snapshots found.';
652
+ }
653
+
654
+ const latest = snapshots[0];
655
+ const lines = [
656
+ ` ${chalk.bold('INCREMENT SCORE')}${dimDot()}${chalk.bold(String(latest.score))}${dimDot()}${chalk.dim(latest.dataTier ?? '')}`,
657
+ ''
658
+ ];
659
+
660
+ if (latest.components && typeof latest.components === 'object') {
661
+ lines.push(` ${chalk.bold('Components')}`);
662
+ for (const [name, value] of Object.entries(latest.components)) {
663
+ const num = typeof value === 'number' ? value : value?.score;
664
+ if (num != null) lines.push(` ${name.padEnd(12)} ${chalk.dim(String(num))}`);
665
+ }
666
+ lines.push('');
667
+ }
668
+
669
+ const drivers = (label, list) => {
670
+ if (!Array.isArray(list) || list.length === 0) return;
671
+ lines.push(` ${chalk.bold(label)}`);
672
+ for (const d of list.slice(0, 3)) {
673
+ const text = d?.label ?? d?.id ?? d?.driver ?? JSON.stringify(d);
674
+ lines.push(` ${text}`);
675
+ }
676
+ lines.push('');
677
+ };
678
+ drivers('Top positive drivers', latest.topPositiveDrivers);
679
+ drivers('Top negative drivers', latest.topNegativeDrivers);
680
+
681
+ if (snapshots.length > 1) {
682
+ lines.push(` ${chalk.bold('Recent history')}`);
683
+ for (const s of snapshots.slice(0, 14)) {
684
+ const date = formatShortDate(s.snapshotAt);
685
+ lines.push(` ${date.padEnd(10)} ${chalk.bold(String(s.score).padStart(3))} ${chalk.dim(s.dataTier ?? '')}`);
686
+ }
687
+ }
688
+
689
+ return lines.join('\n');
690
+ }
691
+
692
+ function formatIncrementScoreCurrent(payload) {
693
+ if (!payload?.available) {
694
+ return 'No Increment Score snapshots found.';
695
+ }
696
+
697
+ const lines = [
698
+ ` ${chalk.bold('INCREMENT SCORE')}${dimDot()}${chalk.bold(String(payload.score))}${dimDot()}${chalk.dim(payload.dataTier ?? '')}`,
699
+ ''
700
+ ];
701
+
702
+ if (payload.snapshotAt) lines.push(` Snapshot ${chalk.dim(formatShortDate(payload.snapshotAt))}`);
703
+ if (payload.formulaVersion) lines.push(` Formula ${chalk.dim(payload.formulaVersion)}`);
704
+ if (payload.dayOverDayDelta != null) {
705
+ const sign = payload.dayOverDayDelta > 0 ? '+' : '';
706
+ lines.push(` Delta ${chalk.dim(`${sign}${payload.dayOverDayDelta}`)}`);
707
+ }
708
+ if (lines.at(-1) !== '') lines.push('');
709
+
710
+ if (payload.components && typeof payload.components === 'object' && Object.keys(payload.components).length > 0) {
711
+ lines.push(` ${chalk.bold('Components')}`);
712
+ for (const [name, value] of Object.entries(payload.components)) {
713
+ lines.push(` ${name.padEnd(12)} ${chalk.dim(String(value))}`);
714
+ }
715
+ lines.push('');
716
+ }
717
+
718
+ const drivers = (label, list) => {
719
+ if (!Array.isArray(list) || list.length === 0) return;
720
+ lines.push(` ${chalk.bold(label)}`);
721
+ for (const text of list.slice(0, 3)) lines.push(` ${text}`);
722
+ lines.push('');
723
+ };
724
+ drivers('Top positive drivers', payload.topPositiveDrivers);
725
+ drivers('Top negative drivers', payload.topNegativeDrivers);
726
+
727
+ if (Array.isArray(payload.dataQualityNotes) && payload.dataQualityNotes.length > 0) {
728
+ lines.push(` ${chalk.bold('Data quality')}`);
729
+ for (const note of payload.dataQualityNotes) lines.push(` ${note}`);
730
+ }
731
+
732
+ while (lines.at(-1) === '') lines.pop();
733
+ return lines.join('\n');
734
+ }
735
+
736
+ function formatIncrementScoreUpload(payload) {
737
+ const inserted = payload?.inserted ?? payload?.count ?? 0;
738
+ return ` Uploaded ${chalk.bold(String(inserted))} Increment Score snapshot${inserted === 1 ? '' : 's'}.`;
739
+ }
740
+
642
741
  // --- Main export ---
643
742
 
644
743
  export function formatHelp(opts = {}) {
@@ -663,6 +762,7 @@ export function formatHelp(opts = {}) {
663
762
  '',
664
763
  header('AUTH'),
665
764
  cmd('login', 'Sign in (opens browser)'),
765
+ cmd('login --no-browser', 'Sign in over SSH/Termius/headless'),
666
766
  cmd('login --base-url <url>', 'Sign in to a specific server'),
667
767
  cmd('login --base-url <url> --token <t>', 'Sign in with token'),
668
768
  cmd('login --snapshot <file>', 'Use local snapshot'),
@@ -706,7 +806,10 @@ export function formatPretty(command, payload) {
706
806
  'ask-show': formatAskShow,
707
807
  'programs-propose': formatProposalCreated,
708
808
  'programs-proposals': formatProposalsList,
709
- 'proposal-dismiss': formatProposalDismissed
809
+ 'proposal-dismiss': formatProposalDismissed,
810
+ 'increment-score-current': formatIncrementScoreCurrent,
811
+ 'increment-score-history': formatIncrementScoreHistory,
812
+ 'increment-score-upload': formatIncrementScoreUpload
710
813
  }[command];
711
814
 
712
815
  return formatter ? formatter(payload) : null;