@runnerpro/backend 1.22.6 → 1.22.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"getPlanificacionPrueba7diasEmpezarCorrer.d.ts","sourceRoot":"","sources":["../../../../../../src/workout/planificacionPrueba7dias/empezarCorrer/getPlanificacionPrueba7diasEmpezarCorrer.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,wCAAwC;;;;;;;;;;;;;GAK7C,CAAC;AAEF,QAAA,MAAM,4CAA4C,kBAgCjD,CAAC;AAEF,OAAO,EAAE,wCAAwC,EAAE,4CAA4C,EAAE,CAAC"}
1
+ {"version":3,"file":"getPlanificacionPrueba7diasEmpezarCorrer.d.ts","sourceRoot":"","sources":["../../../../../../src/workout/planificacionPrueba7dias/empezarCorrer/getPlanificacionPrueba7diasEmpezarCorrer.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,wCAAwC;;;;;;;;;;;;;GAK7C,CAAC;AAEF,QAAA,MAAM,4CAA4C,kBAuCjD,CAAC;AAEF,OAAO,EAAE,wCAAwC,EAAE,4CAA4C,EAAE,CAAC"}
@@ -25,11 +25,19 @@ const changeGoalDistanceByNivelActualEmpezarCorrer = (c) => {
25
25
  // nivel suave). Sin esos datos (cohorte app): el frágil y el principiante absoluto arrancan
26
26
  // en el nivel suave (type '1'); el resto en el intermedio (type '2').
27
27
  const NIVEL_POR_AGUANTE = { lt5: 1, '5-20': 2, '20-45': 2, gt45: 3 };
28
+ // Sin aguante, la FRECUENCIA actual (F1) es la mejor señal: quien ya corre 3-4 días
29
+ // aguanta de sobra el nivel intermedio, y con 5+ el avanzado. Sin esto, un "Comenzar a
30
+ // correr" que ya corre 3-4 días caía en el nivel 1 (bloques de 1 minuto) — un plan
31
+ // insultantemente fácil que tampoco convierte (caso real: ferblanco).
32
+ const NIVEL_POR_DIAS_CORRE = { '3-4': 2, '5+': 3 };
28
33
  const TECHO_POR_LESION = { duele: 1, leve: 2, prudencia: 2, recuperado: 3 };
29
34
  let nivel;
30
35
  if (NIVEL_POR_AGUANTE[c.aguanteCorriendo] !== undefined) {
31
36
  nivel = NIVEL_POR_AGUANTE[c.aguanteCorriendo];
32
37
  }
38
+ else if (NIVEL_POR_DIAS_CORRE[c.diasCorreActual] !== undefined) {
39
+ nivel = NIVEL_POR_DIAS_CORRE[c.diasCorreActual];
40
+ }
33
41
  else if (c.objetivoPrincipal === 'Correr después de una lesión' ||
34
42
  c.objetivoPrincipal === 'Comenzar a correr' ||
35
43
  Number(c.goalDistance) === -2) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runnerpro/backend",
3
- "version": "1.22.6",
3
+ "version": "1.22.7",
4
4
  "description": "A collection of common backend functions",
5
5
  "exports": {
6
6
  ".": "./lib/cjs/index.js"