incremnt 0.4.0 → 0.5.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,55 @@ 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 formatIncrementScoreUpload(payload) {
693
+ const inserted = payload?.inserted ?? payload?.count ?? 0;
694
+ return ` Uploaded ${chalk.bold(String(inserted))} Increment Score snapshot${inserted === 1 ? '' : 's'}.`;
695
+ }
696
+
642
697
  // --- Main export ---
643
698
 
644
699
  export function formatHelp(opts = {}) {
@@ -663,6 +718,7 @@ export function formatHelp(opts = {}) {
663
718
  '',
664
719
  header('AUTH'),
665
720
  cmd('login', 'Sign in (opens browser)'),
721
+ cmd('login --no-browser', 'Sign in over SSH/Termius/headless'),
666
722
  cmd('login --base-url <url>', 'Sign in to a specific server'),
667
723
  cmd('login --base-url <url> --token <t>', 'Sign in with token'),
668
724
  cmd('login --snapshot <file>', 'Use local snapshot'),
@@ -706,7 +762,9 @@ export function formatPretty(command, payload) {
706
762
  'ask-show': formatAskShow,
707
763
  'programs-propose': formatProposalCreated,
708
764
  'programs-proposals': formatProposalsList,
709
- 'proposal-dismiss': formatProposalDismissed
765
+ 'proposal-dismiss': formatProposalDismissed,
766
+ 'increment-score-history': formatIncrementScoreHistory,
767
+ 'increment-score-upload': formatIncrementScoreUpload
710
768
  }[command];
711
769
 
712
770
  return formatter ? formatter(payload) : null;