hevy-shared 1.0.980 → 1.0.981
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/built/hevyTrainer.js
CHANGED
|
@@ -581,14 +581,14 @@ const attachOptionalCardioToRoutine = ({ cardioPreference, cardioExercises, crit
|
|
|
581
581
|
exerciseTemplate: cardioExercise,
|
|
582
582
|
durationSeconds: exports.DEFAULT_TRAINER_CARDIO_ATTACHMENT_DURATION_SECONDS,
|
|
583
583
|
};
|
|
584
|
-
if (cardioPreference === '
|
|
584
|
+
if (cardioPreference === 'workout-start')
|
|
585
585
|
routineExercises.unshift(slot);
|
|
586
586
|
else
|
|
587
587
|
routineExercises.push(slot);
|
|
588
588
|
if (debugExerciseSelectionTrace) {
|
|
589
589
|
appendCardioExerciseSelectionTrace(exerciseSelectionTraces, {
|
|
590
590
|
routine,
|
|
591
|
-
prescriptionIndex: cardioPreference === '
|
|
591
|
+
prescriptionIndex: cardioPreference === 'workout-start'
|
|
592
592
|
? CARDIO_TRACE_INDEX_BEFORE_TEMPLATE
|
|
593
593
|
: templatePrescriptionCount,
|
|
594
594
|
selectedExerciseId: cardioExercise.id,
|
package/built/index.d.ts
CHANGED
|
@@ -650,7 +650,7 @@ export type TrainingGoal = Lookup<typeof trainingGoals>;
|
|
|
650
650
|
export type TrainingLevel = Lookup<typeof trainingLevels>;
|
|
651
651
|
export type ExerciseCategory = Lookup<typeof exerciseCategories>;
|
|
652
652
|
export type RestTimerLength = typeof restTimerLengths[number];
|
|
653
|
-
export type CardioPreference = 'no-cardio' | '
|
|
653
|
+
export type CardioPreference = 'no-cardio' | 'workout-start' | 'workout-end';
|
|
654
654
|
export type HevyTrainerProgramEquipment = Extract<Equipment, 'barbell' | 'dumbbell' | 'machine'>;
|
|
655
655
|
export declare const hevyTrainerProgramEquipments: readonly ["barbell", "dumbbell", "machine"];
|
|
656
656
|
export declare const granularEquipments: readonly ["barbell", "dumbbell", "kettlebell", "plate", "medicine_ball", "ez_bar", "landmine", "trap_bar", "pullup_bar", "dip_bar", "squat_rack", "flat_bench", "adjustable_bench", "dual_cable_machine", "single_cable_machine", "lat_pulldown_cable", "leg_press_machine", "smith_machine", "t_bar", "plate_machines", "stack_machines", "treadmill", "elliptical_trainer", "rowing_machine", "spinning", "stair_machine", "air_bike", "suspension_band", "resistance_band", "battle_rope", "rings", "jump_rope"];
|
|
@@ -924,7 +924,7 @@ describe('generateProgram', () => {
|
|
|
924
924
|
}),
|
|
925
925
|
],
|
|
926
926
|
debugExerciseSelectionTrace: true,
|
|
927
|
-
cardioPreference: '
|
|
927
|
+
cardioPreference: 'workout-start',
|
|
928
928
|
});
|
|
929
929
|
expect(result.success).toBe(true);
|
|
930
930
|
if (!result.success)
|
|
@@ -966,7 +966,7 @@ describe('generateProgram', () => {
|
|
|
966
966
|
equipment_category: 'other',
|
|
967
967
|
}),
|
|
968
968
|
],
|
|
969
|
-
cardioPreference: '
|
|
969
|
+
cardioPreference: 'workout-start',
|
|
970
970
|
});
|
|
971
971
|
expect(result.success).toBe(true);
|
|
972
972
|
if (!result.success)
|
|
@@ -1011,7 +1011,7 @@ describe('generateProgram', () => {
|
|
|
1011
1011
|
equipment_category: 'other',
|
|
1012
1012
|
}),
|
|
1013
1013
|
],
|
|
1014
|
-
cardioPreference: '
|
|
1014
|
+
cardioPreference: 'workout-start',
|
|
1015
1015
|
});
|
|
1016
1016
|
expect(result.success).toBe(true);
|
|
1017
1017
|
if (!result.success)
|
|
@@ -1052,7 +1052,7 @@ describe('generateProgram', () => {
|
|
|
1052
1052
|
}),
|
|
1053
1053
|
],
|
|
1054
1054
|
excludedExerciseIds: new Set(['run-a']),
|
|
1055
|
-
cardioPreference: '
|
|
1055
|
+
cardioPreference: 'workout-start',
|
|
1056
1056
|
});
|
|
1057
1057
|
expect(result.success).toBe(true);
|
|
1058
1058
|
if (!result.success)
|
|
@@ -1091,7 +1091,7 @@ describe('generateProgram', () => {
|
|
|
1091
1091
|
}),
|
|
1092
1092
|
],
|
|
1093
1093
|
debugExerciseSelectionTrace: true,
|
|
1094
|
-
cardioPreference: '
|
|
1094
|
+
cardioPreference: 'workout-start',
|
|
1095
1095
|
});
|
|
1096
1096
|
expect(result.success).toBe(true);
|
|
1097
1097
|
if (!result.success)
|