@aneuhold/core-ts-db-lib 4.1.0 → 4.1.1
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/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## 🔖 [4.1.1] (2026-02-06)
|
|
9
|
+
|
|
10
|
+
### 🏗️ Changed
|
|
11
|
+
|
|
12
|
+
- Relaxed validation in `WorkoutMesocycleSchema`: removed minimum length check for `calibratedExercises` array.
|
|
13
|
+
|
|
14
|
+
### 🩹 Fixed
|
|
15
|
+
|
|
16
|
+
- No other direct code changes; version bump for compatibility with new major versions of dependencies.
|
|
17
|
+
|
|
8
18
|
## 🔖 [4.1.0] (2026-02-06)
|
|
9
19
|
|
|
10
20
|
### ✅ Added
|
|
@@ -204,6 +214,7 @@ Updated dependency: now requires `@aneuhold/core-ts-lib@^2.3.11`.
|
|
|
204
214
|
|
|
205
215
|
<!-- Link References -->
|
|
206
216
|
|
|
217
|
+
[4.1.1]: https://github.com/aneuhold/ts-libs/compare/core-ts-db-lib-v4.1.0...core-ts-db-lib-v4.1.1
|
|
207
218
|
[4.1.0]: https://github.com/aneuhold/ts-libs/compare/core-ts-db-lib-v4.0.4...core-ts-db-lib-v4.1.0
|
|
208
219
|
[4.0.4]: https://github.com/aneuhold/ts-libs/compare/core-ts-db-lib-v4.0.3...core-ts-db-lib-v4.0.4
|
|
209
220
|
[4.0.3]: https://github.com/aneuhold/ts-libs/compare/core-ts-db-lib-v4.0.2...core-ts-db-lib-v4.0.3
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkoutMesocycle.d.ts","sourceRoot":"","sources":["../../../src/documents/workout/WorkoutMesocycle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB;;;;;;;GAOG;AACH,oBAAY,SAAS;IACnB,UAAU,eAAe;IACzB,eAAe,oBAAoB;IACnC,GAAG,QAAQ;IACX,QAAQ,aAAa;CACtB;AAED;;GAEG;AACH,eAAO,MAAM,wBAAwB,qBAAqB,CAAC;AAE3D;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"WorkoutMesocycle.d.ts","sourceRoot":"","sources":["../../../src/documents/workout/WorkoutMesocycle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB;;;;;;;GAOG;AACH,oBAAY,SAAS;IACnB,UAAU,eAAe;IACzB,eAAe,oBAAoB;IACnC,GAAG,QAAQ;IACX,QAAQ,aAAa;CACtB;AAED;;GAEG;AACH,eAAO,MAAM,wBAAwB,qBAAqB,CAAC;AAE3D;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;iBAmDjC,CAAC;AAEH;;;;;;;;;GASG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -23,8 +23,7 @@ export const WorkoutMesocycle_docType = 'workoutMesocycle';
|
|
|
23
23
|
/**
|
|
24
24
|
* The schema for {@link WorkoutMesocycle} documents.
|
|
25
25
|
*/
|
|
26
|
-
export const WorkoutMesocycleSchema = z
|
|
27
|
-
.object({
|
|
26
|
+
export const WorkoutMesocycleSchema = z.object({
|
|
28
27
|
...BaseDocumentWithTypeSchema.shape,
|
|
29
28
|
...RequiredUserIdSchema.shape,
|
|
30
29
|
...BaseDocumentWithUpdatedAndCreatedDatesSchema.shape,
|
|
@@ -75,10 +74,5 @@ export const WorkoutMesocycleSchema = z
|
|
|
75
74
|
* mesocycle.
|
|
76
75
|
*/
|
|
77
76
|
completedDate: z.date().nullish()
|
|
78
|
-
})
|
|
79
|
-
.refine((data) => data.calibratedExercises.length >= data.plannedSessionCountPerMicrocycle, {
|
|
80
|
-
message: 'Number of calibrated exercises must be at least equal to planned sessions per microcycle.' +
|
|
81
|
-
' Create a slight variation of an existing exercise if needed.',
|
|
82
|
-
path: ['calibratedExercises']
|
|
83
77
|
});
|
|
84
78
|
//# sourceMappingURL=WorkoutMesocycle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkoutMesocycle.js","sourceRoot":"","sources":["../../../src/documents/workout/WorkoutMesocycle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AACrF,OAAO,EACL,0BAA0B,EAC1B,4CAA4C,EAC7C,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,sCAAyB,CAAA;IACzB,gDAAmC,CAAA;IACnC,wBAAW,CAAA;IACX,kCAAqB,CAAA;AACvB,CAAC,EALW,SAAS,KAAT,SAAS,QAKpB;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,kBAAkB,CAAC;AAE3D;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC
|
|
1
|
+
{"version":3,"file":"WorkoutMesocycle.js","sourceRoot":"","sources":["../../../src/documents/workout/WorkoutMesocycle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AACrF,OAAO,EACL,0BAA0B,EAC1B,4CAA4C,EAC7C,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,sCAAyB,CAAA;IACzB,gDAAmC,CAAA;IACn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E;CAClC,CAAC,CAAC"}
|
|
@@ -29,65 +29,58 @@ export const WorkoutMesocycle_docType = 'workoutMesocycle';
|
|
|
29
29
|
/**
|
|
30
30
|
* The schema for {@link WorkoutMesocycle} documents.
|
|
31
31
|
*/
|
|
32
|
-
export const WorkoutMesocycleSchema = z
|
|
33
|
-
.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
})
|
|
85
|
-
.refine((data) => data.calibratedExercises.length >= data.plannedSessionCountPerMicrocycle, {
|
|
86
|
-
message:
|
|
87
|
-
'Number of calibrated exercises must be at least equal to planned sessions per microcycle.' +
|
|
88
|
-
' Create a slight variation of an existing exercise if needed.',
|
|
89
|
-
path: ['calibratedExercises']
|
|
90
|
-
});
|
|
32
|
+
export const WorkoutMesocycleSchema = z.object({
|
|
33
|
+
...BaseDocumentWithTypeSchema.shape,
|
|
34
|
+
...RequiredUserIdSchema.shape,
|
|
35
|
+
...BaseDocumentWithUpdatedAndCreatedDatesSchema.shape,
|
|
36
|
+
docType: z.literal(WorkoutMesocycle_docType).default(WorkoutMesocycle_docType),
|
|
37
|
+
/**
|
|
38
|
+
* An optional title for this mesocycle.
|
|
39
|
+
*/
|
|
40
|
+
title: z.string().nullish(),
|
|
41
|
+
/**
|
|
42
|
+
* The IDs of WorkoutExerciseCalibration documents used for this mesocycle.
|
|
43
|
+
*
|
|
44
|
+
* This locks which calibration was used for a mesocycle so historical 1RM
|
|
45
|
+
* values remain accurate even if calibrations are changed later.
|
|
46
|
+
*/
|
|
47
|
+
calibratedExercises: z.array(z.uuidv7().transform((val) => val as UUID)).default([]),
|
|
48
|
+
/**
|
|
49
|
+
* The type of this mesocycle. See {@link CycleType} for details.
|
|
50
|
+
*/
|
|
51
|
+
cycleType: z.enum(CycleType),
|
|
52
|
+
/**
|
|
53
|
+
* The planned number of workout sessions per microcycle.
|
|
54
|
+
*/
|
|
55
|
+
plannedSessionCountPerMicrocycle: z.int().positive(),
|
|
56
|
+
/**
|
|
57
|
+
* The planned length of each microcycle in days.
|
|
58
|
+
*
|
|
59
|
+
* Typically 7 days (one week), but can vary.
|
|
60
|
+
*/
|
|
61
|
+
plannedMicrocycleLengthInDays: z.int().positive(),
|
|
62
|
+
/**
|
|
63
|
+
* The planned rest days within each microcycle, represented as day indices.
|
|
64
|
+
*
|
|
65
|
+
* For example, [0, 3] would indicate rest on the first and fourth days of
|
|
66
|
+
* the microcycle.
|
|
67
|
+
*/
|
|
68
|
+
plannedMicrocycleRestDays: z.array(z.int().nonnegative()).default([]),
|
|
69
|
+
/**
|
|
70
|
+
* The planned total number of microcycles including accumulation and deload.
|
|
71
|
+
*
|
|
72
|
+
* Should typically be 5-9 microcycles (4-8 accumulation weeks + 1 deload week).
|
|
73
|
+
*/
|
|
74
|
+
plannedMicrocycleCount: z.int().min(2).max(20).nullish(),
|
|
75
|
+
/**
|
|
76
|
+
* The date this mesocycle was completed.
|
|
77
|
+
*
|
|
78
|
+
* This should be set after the user gets a "success" completion screen and
|
|
79
|
+
* has buttoned up any last prompts. This should guide them into the next
|
|
80
|
+
* mesocycle.
|
|
81
|
+
*/
|
|
82
|
+
completedDate: z.date().nullish()
|
|
83
|
+
});
|
|
91
84
|
|
|
92
85
|
/**
|
|
93
86
|
* Represents a mesocycle - an organized sequence of microcycles ordered to
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@aneuhold/core-ts-db-lib",
|
|
3
3
|
"author": "Anton G. Neuhold Jr.",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "4.1.
|
|
5
|
+
"version": "4.1.1",
|
|
6
6
|
"description": "A core database library used for personal projects",
|
|
7
7
|
"packageManager": "pnpm@10.25.0",
|
|
8
8
|
"type": "module",
|
|
@@ -88,4 +88,4 @@
|
|
|
88
88
|
"typescript": "^5.9.3",
|
|
89
89
|
"vitest": "^4.0.15"
|
|
90
90
|
}
|
|
91
|
-
}
|
|
91
|
+
}
|