Séances de mobilité : exercices génériques, étirements, échauffement par séance
Une ref inconnue devient un exercice générique au lieu de faire refuser la proposition ; 18 étirements ajoutés ; champ warmup par séance ; durées en minutes et en « sec » reconnues. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
f0f7a7bceb
commit
32b5831126
@@ -99,6 +99,9 @@ export function readImport(input, { device, now = new Date() }) {
|
||||
if (looksLikeAtelier(o)) return atelierImport(o, { device, now });
|
||||
|
||||
const candidate = "program" in o ? o.program : o;
|
||||
// Avant la validation : un programme d'Atelier se reconnaît à ses références,
|
||||
// que la validation accepte désormais comme exercices libres.
|
||||
if (looksLikeAtelier(candidate)) return atelierImport(candidate, { device, now });
|
||||
if (validateProgram(candidate).length === 0) {
|
||||
try {
|
||||
const event = createProposal(o, "import", { device, now });
|
||||
@@ -110,8 +113,6 @@ export function readImport(input, { device, now = new Date() }) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
if (looksLikeAtelier(candidate)) return atelierImport(candidate, { device, now });
|
||||
|
||||
const problems = Array.isArray(/** @type {any} */ (candidate)?.sessions) ? validateProgram(candidate) : [];
|
||||
throw new Error("Ce fichier n'est ni un instantané IA-Fit, ni un fichier d'Atelier, ni un programme valide." +
|
||||
(problems.length ? "\n- " + problems.join("\n- ") : ""));
|
||||
|
||||
Reference in New Issue
Block a user