@bgord/tools 1.2.12 → 1.2.14
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/dist/age-years.vo.d.ts +1 -1
- package/dist/age-years.vo.js +2 -0
- package/dist/api-key.vo.d.ts +1 -1
- package/dist/api-key.vo.js +2 -0
- package/dist/basename.vo.d.ts +1 -1
- package/dist/basename.vo.js +2 -0
- package/dist/day-iso-id.vo.d.ts +1 -1
- package/dist/day-iso-id.vo.js +2 -0
- package/dist/directory-path-absolute.vo.d.ts +1 -1
- package/dist/directory-path-absolute.vo.js +2 -0
- package/dist/directory-path-relative.vo.d.ts +1 -1
- package/dist/directory-path-relative.vo.js +3 -1
- package/dist/distance-value.vo.d.ts +1 -1
- package/dist/distance-value.vo.js +2 -0
- package/dist/division-factor.vo.d.ts +1 -1
- package/dist/division-factor.vo.js +2 -0
- package/dist/dll.service.js +2 -6
- package/dist/duration-ms.vo.d.ts +1 -1
- package/dist/duration-ms.vo.js +1 -0
- package/dist/email.vo.d.ts +1 -1
- package/dist/email.vo.js +1 -0
- package/dist/etags.vo.js +0 -2
- package/dist/extension.vo.d.ts +1 -1
- package/dist/extension.vo.js +2 -0
- package/dist/file-path-absolute-schema.vo.d.ts +1 -1
- package/dist/file-path-absolute-schema.vo.js +2 -0
- package/dist/file-path-relative-schema.vo.d.ts +1 -1
- package/dist/file-path-relative-schema.vo.js +2 -0
- package/dist/filename-affix.vo.d.ts +1 -1
- package/dist/filename-affix.vo.js +2 -0
- package/dist/height-milimiters.vo.d.ts +1 -1
- package/dist/height-milimiters.vo.js +2 -0
- package/dist/hour-schema.vo.d.ts +1 -1
- package/dist/hour-schema.vo.js +3 -1
- package/dist/iban-schema.vo.d.ts +1 -1
- package/dist/iban-schema.vo.js +2 -0
- package/dist/image.vo.d.ts +2 -2
- package/dist/image.vo.js +4 -0
- package/dist/integer-non-negative.vo.d.ts +1 -1
- package/dist/integer-non-negative.vo.js +2 -0
- package/dist/integer-positive.vo.d.ts +1 -1
- package/dist/integer-positive.vo.js +2 -0
- package/dist/integer.vo.d.ts +1 -1
- package/dist/integer.vo.js +1 -0
- package/dist/linear-regression.service.js +2 -0
- package/dist/mime-value.vo.d.ts +1 -1
- package/dist/mime-value.vo.js +2 -0
- package/dist/min-max-scaler.service.js +1 -1
- package/dist/minute-schema.vo.d.ts +1 -1
- package/dist/minute-schema.vo.js +2 -0
- package/dist/minute.vo.d.ts +1 -1
- package/dist/minute.vo.js +3 -3
- package/dist/money-amount.vo.d.ts +1 -1
- package/dist/money-amount.vo.js +2 -0
- package/dist/month-iso-id.vo.d.ts +1 -1
- package/dist/month-iso-id.vo.js +2 -0
- package/dist/multiplication-factor.vo.d.ts +1 -1
- package/dist/multiplication-factor.vo.js +2 -0
- package/dist/object-key.vo.d.ts +1 -1
- package/dist/object-key.vo.js +2 -0
- package/dist/package-version-schema.vo.d.ts +1 -1
- package/dist/package-version-schema.vo.js +2 -0
- package/dist/package-version.vo.js +1 -5
- package/dist/pagination-page.vo.js +1 -1
- package/dist/percentage.service.js +0 -2
- package/dist/quarter-iso-id.vo.d.ts +1 -1
- package/dist/quarter-iso-id.vo.js +2 -0
- package/dist/random.service.js +1 -3
- package/dist/reordering.service.js +2 -0
- package/dist/rounding-decimal.strategy.d.ts +1 -1
- package/dist/rounding-decimal.strategy.js +2 -0
- package/dist/size-bytes.vo.d.ts +1 -1
- package/dist/size-bytes.vo.js +2 -0
- package/dist/time-zone-offset-value.vo.d.ts +1 -1
- package/dist/time-zone-offset-value.vo.js +6 -4
- package/dist/timestamp-value.vo.d.ts +1 -1
- package/dist/timestamp-value.vo.js +2 -0
- package/dist/timezone.vo.d.ts +1 -1
- package/dist/timezone.vo.js +2 -0
- package/dist/url-with-slash.vo.d.ts +1 -1
- package/dist/url-with-slash.vo.js +3 -1
- package/dist/url-without-slash.vo.d.ts +1 -1
- package/dist/url-without-slash.vo.js +3 -1
- package/dist/week-iso-id.vo.d.ts +1 -1
- package/dist/week-iso-id.vo.js +2 -0
- package/dist/weekday.vo.d.ts +3 -1
- package/dist/weekday.vo.js +4 -3
- package/dist/weight-grams.vo.d.ts +1 -1
- package/dist/weight-grams.vo.js +2 -0
- package/dist/weight.vo.d.ts +0 -2
- package/dist/weight.vo.js +1 -7
- package/dist/year-iso-id.vo.d.ts +1 -1
- package/dist/year-iso-id.vo.js +2 -0
- package/dist/year.vo.js +5 -1
- package/package.json +4 -3
- package/src/age-years.vo.ts +2 -0
- package/src/api-key.vo.ts +2 -0
- package/src/basename.vo.ts +2 -0
- package/src/day-iso-id.vo.ts +2 -0
- package/src/directory-path-absolute.vo.ts +2 -0
- package/src/directory-path-relative.vo.ts +3 -1
- package/src/distance-value.vo.ts +2 -0
- package/src/division-factor.vo.ts +2 -0
- package/src/dll.service.ts +4 -8
- package/src/duration-ms.vo.ts +2 -0
- package/src/email.vo.ts +2 -0
- package/src/etags.vo.ts +0 -2
- package/src/extension.vo.ts +2 -0
- package/src/file-path-absolute-schema.vo.ts +2 -0
- package/src/file-path-relative-schema.vo.ts +2 -0
- package/src/filename-affix.vo.ts +2 -0
- package/src/height-milimiters.vo.ts +2 -0
- package/src/hour-schema.vo.ts +3 -1
- package/src/iban-schema.vo.ts +2 -0
- package/src/image.vo.ts +4 -0
- package/src/integer-non-negative.vo.ts +2 -0
- package/src/integer-positive.vo.ts +2 -0
- package/src/integer.vo.ts +2 -0
- package/src/linear-regression.service.ts +2 -0
- package/src/mime-value.vo.ts +2 -0
- package/src/min-max-scaler.service.ts +1 -1
- package/src/minute-schema.vo.ts +2 -0
- package/src/minute.vo.ts +4 -4
- package/src/money-amount.vo.ts +2 -0
- package/src/month-iso-id.vo.ts +2 -0
- package/src/multiplication-factor.vo.ts +2 -0
- package/src/object-key.vo.ts +2 -0
- package/src/package-version-schema.vo.ts +2 -0
- package/src/package-version.vo.ts +1 -4
- package/src/pagination-page.vo.ts +1 -1
- package/src/percentage.service.ts +0 -1
- package/src/quarter-iso-id.vo.ts +2 -0
- package/src/random.service.ts +1 -2
- package/src/reordering.service.ts +2 -0
- package/src/rounding-decimal.strategy.ts +2 -0
- package/src/size-bytes.vo.ts +2 -0
- package/src/time-zone-offset-value.vo.ts +6 -4
- package/src/timestamp-value.vo.ts +2 -0
- package/src/timezone.vo.ts +2 -0
- package/src/url-with-slash.vo.ts +3 -1
- package/src/url-without-slash.vo.ts +3 -1
- package/src/week-iso-id.vo.ts +2 -0
- package/src/weekday.vo.ts +4 -2
- package/src/weight-grams.vo.ts +2 -0
- package/src/weight.vo.ts +1 -9
- package/src/year-iso-id.vo.ts +2 -0
- package/src/year.vo.ts +3 -1
package/dist/age-years.vo.d.ts
CHANGED
|
@@ -7,5 +7,5 @@ export declare const AgeYearsConstraints: {
|
|
|
7
7
|
min: number;
|
|
8
8
|
max: number;
|
|
9
9
|
};
|
|
10
|
-
export declare const AgeYears: z.core.$ZodBranded<z.ZodNumber, "AgeYears">;
|
|
10
|
+
export declare const AgeYears: z.core.$ZodBranded<z.ZodNumber, "AgeYears", "out">;
|
|
11
11
|
export type AgeYearsType = z.infer<typeof AgeYears>;
|
package/dist/age-years.vo.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { z } from "zod/v4";
|
|
2
2
|
export const AgeYearsError = { Type: "age.years.type", Invalid: "age.years.invalid" };
|
|
3
3
|
export const AgeYearsConstraints = { min: 1, max: 130 };
|
|
4
|
+
// Stryker disable all
|
|
4
5
|
export const AgeYears = z
|
|
6
|
+
// Stryker restore all
|
|
5
7
|
.number(AgeYearsError.Type)
|
|
6
8
|
.int(AgeYearsError.Type)
|
|
7
9
|
.min(1, AgeYearsError.Invalid)
|
package/dist/api-key.vo.d.ts
CHANGED
|
@@ -4,5 +4,5 @@ export declare const ApiKeyError: {
|
|
|
4
4
|
Length: string;
|
|
5
5
|
BadChars: string;
|
|
6
6
|
};
|
|
7
|
-
export declare const ApiKey: z.core.$ZodBranded<z.ZodString, "ApiKey">;
|
|
7
|
+
export declare const ApiKey: z.core.$ZodBranded<z.ZodString, "ApiKey", "out">;
|
|
8
8
|
export type ApiKeyType = z.infer<typeof ApiKey>;
|
package/dist/api-key.vo.js
CHANGED
|
@@ -2,7 +2,9 @@ import { z } from "zod/v4";
|
|
|
2
2
|
export const ApiKeyError = { Type: "api.key.type", Length: "api.key.length", BadChars: "api.key.bad.chars" };
|
|
3
3
|
// 64 letters and digits allowed
|
|
4
4
|
const API_KEY_CHARS = /^[a-zA-Z0-9]{64}$/;
|
|
5
|
+
// Stryker disable all
|
|
5
6
|
export const ApiKey = z
|
|
7
|
+
// Stryker disable all
|
|
6
8
|
.string(ApiKeyError.Type)
|
|
7
9
|
.length(64, ApiKeyError.Length)
|
|
8
10
|
.regex(API_KEY_CHARS, ApiKeyError.BadChars)
|
package/dist/basename.vo.d.ts
CHANGED
|
@@ -8,5 +8,5 @@ export declare const BasenameError: {
|
|
|
8
8
|
TrailingDot: string;
|
|
9
9
|
BadChars: string;
|
|
10
10
|
};
|
|
11
|
-
export declare const Basename: z.core.$ZodBranded<z.ZodString, "Basename">;
|
|
11
|
+
export declare const Basename: z.core.$ZodBranded<z.ZodString, "Basename", "out">;
|
|
12
12
|
export type BasenameType = z.infer<typeof Basename>;
|
package/dist/basename.vo.js
CHANGED
|
@@ -11,7 +11,9 @@ export const BasenameError = {
|
|
|
11
11
|
// Letters, digits, dots, underscores, and hyphens allowed
|
|
12
12
|
const BASENAME_CHARS = /^[a-zA-Z0-9._-]+$/;
|
|
13
13
|
const DOT_SEGMENTS = [".", ".."];
|
|
14
|
+
// Stryker disable all
|
|
14
15
|
export const Basename = z
|
|
16
|
+
// Stryker restore all
|
|
15
17
|
.string(BasenameError.Type)
|
|
16
18
|
.min(1, BasenameError.Empty)
|
|
17
19
|
.max(128, BasenameError.TooLong)
|
package/dist/day-iso-id.vo.d.ts
CHANGED
|
@@ -5,5 +5,5 @@ export declare const DayIsoIdError: {
|
|
|
5
5
|
InvalidDate: string;
|
|
6
6
|
};
|
|
7
7
|
export declare const DAY_ISO_ID_CHARS: RegExp;
|
|
8
|
-
export declare const DayIsoId: z.core.$ZodBranded<z.ZodString, "DayIsoId">;
|
|
8
|
+
export declare const DayIsoId: z.core.$ZodBranded<z.ZodString, "DayIsoId", "out">;
|
|
9
9
|
export type DayIsoIdType = z.infer<typeof DayIsoId>;
|
package/dist/day-iso-id.vo.js
CHANGED
|
@@ -7,7 +7,9 @@ export const DayIsoIdError = {
|
|
|
7
7
|
};
|
|
8
8
|
// Four digits, hyphen, two digits, hyphen, two digits
|
|
9
9
|
export const DAY_ISO_ID_CHARS = /^[0-9]{4}-[0-9]{2}-[0-9]{2}$/;
|
|
10
|
+
// Stryker disable all
|
|
10
11
|
export const DayIsoId = z
|
|
12
|
+
// Stryker restore all
|
|
11
13
|
.string(DayIsoIdError.Type)
|
|
12
14
|
.regex(DAY_ISO_ID_CHARS, DayIsoIdError.BadChars)
|
|
13
15
|
.refine((value) => isValid(parseISO(value)), DayIsoIdError.InvalidDate)
|
|
@@ -8,5 +8,5 @@ export declare const DirectoryPathAbsoluteError: {
|
|
|
8
8
|
Type: string;
|
|
9
9
|
};
|
|
10
10
|
export declare const DIRECTORY_PATH_ABSOLUTE_CHARS: RegExp;
|
|
11
|
-
export declare const DirectoryPathAbsoluteSchema: z.core.$ZodBranded<z.ZodString, "DirectoryPathAbsoluteSchema">;
|
|
11
|
+
export declare const DirectoryPathAbsoluteSchema: z.core.$ZodBranded<z.ZodString, "DirectoryPathAbsoluteSchema", "out">;
|
|
12
12
|
export type DirectoryPathAbsoluteType = z.infer<typeof DirectoryPathAbsoluteSchema>;
|
|
@@ -10,7 +10,9 @@ export const DirectoryPathAbsoluteError = {
|
|
|
10
10
|
// Letters, digits, dots, underscores, and hyphens
|
|
11
11
|
export const DIRECTORY_PATH_ABSOLUTE_CHARS = /^[a-zA-Z0-9._-]+$/;
|
|
12
12
|
const DOT_SEGMENTS = [".", ".."];
|
|
13
|
+
// Stryker disable all
|
|
13
14
|
export const DirectoryPathAbsoluteSchema = z
|
|
15
|
+
// Stryker restore all
|
|
14
16
|
.string(DirectoryPathAbsoluteError.Type)
|
|
15
17
|
.min(1, DirectoryPathAbsoluteError.Empty)
|
|
16
18
|
.max(512, DirectoryPathAbsoluteError.TooLong)
|
|
@@ -8,5 +8,5 @@ export declare const DirectoryPathRelativeError: {
|
|
|
8
8
|
Type: string;
|
|
9
9
|
};
|
|
10
10
|
export declare const DIRECTORY_PATH_RELATIVE_CHARS: RegExp;
|
|
11
|
-
export declare const DirectoryPathRelativeSchema: z.core.$ZodBranded<z.ZodString, "DirectoryPathRelativeSchema">;
|
|
11
|
+
export declare const DirectoryPathRelativeSchema: z.core.$ZodBranded<z.ZodString, "DirectoryPathRelativeSchema", "out">;
|
|
12
12
|
export type DirectoryPathRelativeType = z.infer<typeof DirectoryPathRelativeSchema>;
|
|
@@ -5,12 +5,14 @@ export const DirectoryPathRelativeError = {
|
|
|
5
5
|
LeadingSlash: "directory.path.relative.leading.slash",
|
|
6
6
|
TooLong: "directory.path.absolue.too.long",
|
|
7
7
|
TrailingSlash: "directory.path.absolue.trailing.slash",
|
|
8
|
-
Type: "directory.path.relative.
|
|
8
|
+
Type: "directory.path.relative.type",
|
|
9
9
|
};
|
|
10
10
|
// Letters, digits, dots, underscores, and hyphens
|
|
11
11
|
export const DIRECTORY_PATH_RELATIVE_CHARS = /^[A-Za-z0-9._-]+$/;
|
|
12
12
|
const DOT_SEGMENTS = [".", ".."];
|
|
13
|
+
// Stryker disable all
|
|
13
14
|
export const DirectoryPathRelativeSchema = z
|
|
15
|
+
// Stryker restore all
|
|
14
16
|
.string(DirectoryPathRelativeError.Type)
|
|
15
17
|
.min(1, DirectoryPathRelativeError.Empty)
|
|
16
18
|
.max(512, DirectoryPathRelativeError.TooLong)
|
|
@@ -3,5 +3,5 @@ export declare const DistanceValueError: {
|
|
|
3
3
|
Type: string;
|
|
4
4
|
Invalid: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const DistanceValue: z.core.$ZodBranded<z.ZodNumber, "DistanceValue">;
|
|
6
|
+
export declare const DistanceValue: z.core.$ZodBranded<z.ZodNumber, "DistanceValue", "out">;
|
|
7
7
|
export type DistanceValueType = z.infer<typeof DistanceValue>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { z } from "zod/v4";
|
|
2
2
|
export const DistanceValueError = { Type: "distance.value.type", Invalid: "distance.value.invalid" };
|
|
3
|
+
// Stryker disable all
|
|
3
4
|
export const DistanceValue = z
|
|
5
|
+
// Stryker restore all
|
|
4
6
|
.number(DistanceValueError.Type)
|
|
5
7
|
.int(DistanceValueError.Type)
|
|
6
8
|
.min(0, DistanceValueError.Invalid)
|
|
@@ -3,5 +3,5 @@ export declare const DivisionFactorError: {
|
|
|
3
3
|
Type: string;
|
|
4
4
|
Invalid: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const DivisionFactor: z.core.$ZodBranded<z.ZodNumber, "DivisionFactor">;
|
|
6
|
+
export declare const DivisionFactor: z.core.$ZodBranded<z.ZodNumber, "DivisionFactor", "out">;
|
|
7
7
|
export type DivisionFactorType = z.infer<typeof DivisionFactor>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { z } from "zod/v4";
|
|
2
2
|
export const DivisionFactorError = { Type: "division.factor.type", Invalid: "division.factor.invalid" };
|
|
3
|
+
// Stryker disable all
|
|
3
4
|
export const DivisionFactor = z
|
|
5
|
+
// Stryker restore all
|
|
4
6
|
.number(DivisionFactorError.Type)
|
|
5
7
|
.gt(0, DivisionFactorError.Invalid)
|
|
6
8
|
.brand("DivisionFactor");
|
package/dist/dll.service.js
CHANGED
|
@@ -96,9 +96,7 @@ export class DoublyLinkedList {
|
|
|
96
96
|
this.size += 1;
|
|
97
97
|
node.prev = target;
|
|
98
98
|
node.next = nextNode;
|
|
99
|
-
|
|
100
|
-
nextNode.prev = node;
|
|
101
|
-
}
|
|
99
|
+
nextNode.prev = node;
|
|
102
100
|
target.next = node;
|
|
103
101
|
}
|
|
104
102
|
insertBefore(node, target) {
|
|
@@ -110,9 +108,7 @@ export class DoublyLinkedList {
|
|
|
110
108
|
this.size += 1;
|
|
111
109
|
node.next = target;
|
|
112
110
|
node.prev = prevNode;
|
|
113
|
-
|
|
114
|
-
prevNode.next = node;
|
|
115
|
-
}
|
|
111
|
+
prevNode.next = node;
|
|
116
112
|
target.prev = node;
|
|
117
113
|
}
|
|
118
114
|
find(callback) {
|
package/dist/duration-ms.vo.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ import { z } from "zod/v4";
|
|
|
2
2
|
export declare const DurationMsError: {
|
|
3
3
|
Invalid: string;
|
|
4
4
|
};
|
|
5
|
-
export declare const DurationMs: z.core.$ZodBranded<z.ZodNumber, "DurationMs">;
|
|
5
|
+
export declare const DurationMs: z.core.$ZodBranded<z.ZodNumber, "DurationMs", "out">;
|
|
6
6
|
export type DurationMsType = z.infer<typeof DurationMs>;
|
package/dist/duration-ms.vo.js
CHANGED
package/dist/email.vo.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ import { z } from "zod/v4";
|
|
|
2
2
|
export declare const EmailError: {
|
|
3
3
|
Invalid: string;
|
|
4
4
|
};
|
|
5
|
-
export declare const Email: z.core.$ZodBranded<z.ZodEmail, "Email">;
|
|
5
|
+
export declare const Email: z.core.$ZodBranded<z.ZodEmail, "Email", "out">;
|
|
6
6
|
export type EmailType = z.infer<typeof Email>;
|
package/dist/email.vo.js
CHANGED
package/dist/etags.vo.js
CHANGED
package/dist/extension.vo.d.ts
CHANGED
|
@@ -5,5 +5,5 @@ export declare const ExtensionError: {
|
|
|
5
5
|
TooLong: string;
|
|
6
6
|
BadChars: string;
|
|
7
7
|
};
|
|
8
|
-
export declare const Extension: z.core.$ZodBranded<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, "Extension">;
|
|
8
|
+
export declare const Extension: z.core.$ZodBranded<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, "Extension", "out">;
|
|
9
9
|
export type ExtensionType = z.infer<typeof Extension>;
|
package/dist/extension.vo.js
CHANGED
|
@@ -8,7 +8,9 @@ export const ExtensionError = {
|
|
|
8
8
|
// Lowercase letters and digits allowed
|
|
9
9
|
const EXTENSION_WHITELIST = /^[a-z0-9]+$/;
|
|
10
10
|
const LEADING_DOT_FILE = /^\./;
|
|
11
|
+
// Stryker disable all
|
|
11
12
|
export const Extension = z
|
|
13
|
+
// Stryker restore all
|
|
12
14
|
.string(ExtensionError.Type)
|
|
13
15
|
.toLowerCase()
|
|
14
16
|
.min(2, ExtensionError.Empty)
|
|
@@ -10,5 +10,5 @@ export declare const FilePathAbsoluteSchemaError: {
|
|
|
10
10
|
export declare const FilePathAbsoluteSchema: z.core.$ZodBranded<z.ZodPipe<z.ZodString, z.ZodTransform<{
|
|
11
11
|
directory: string & z.core.$brand<"DirectoryPathAbsoluteSchema">;
|
|
12
12
|
filename: Filename;
|
|
13
|
-
}, string>>, "FilePathAbsoluteSchema">;
|
|
13
|
+
}, string>>, "FilePathAbsoluteSchema", "out">;
|
|
14
14
|
export type FilePathAbsoluteType = z.infer<typeof FilePathAbsoluteSchema>;
|
|
@@ -8,7 +8,9 @@ export const FilePathAbsoluteSchemaError = {
|
|
|
8
8
|
BackslashForbidden: "file.path.absolute.backslash.forbidden",
|
|
9
9
|
Empty: "file.path.absolute.empty",
|
|
10
10
|
};
|
|
11
|
+
// Stryker disable all
|
|
11
12
|
export const FilePathAbsoluteSchema = z
|
|
13
|
+
// Stryker restore all
|
|
12
14
|
.string(FilePathAbsoluteSchemaError.Type)
|
|
13
15
|
.min(1, FilePathAbsoluteSchemaError.Empty)
|
|
14
16
|
.refine((value) => value.startsWith("/"), FilePathAbsoluteSchemaError.LeadingSlash)
|
|
@@ -10,5 +10,5 @@ export declare const FilePathRelativeSchemaError: {
|
|
|
10
10
|
export declare const FilePathRelativeSchema: z.core.$ZodBranded<z.ZodPipe<z.ZodString, z.ZodTransform<{
|
|
11
11
|
directory: string & z.core.$brand<"DirectoryPathRelativeSchema">;
|
|
12
12
|
filename: Filename;
|
|
13
|
-
}, string>>, "FilePathRelativeSchema">;
|
|
13
|
+
}, string>>, "FilePathRelativeSchema", "out">;
|
|
14
14
|
export type FilePathRelativeType = z.infer<typeof FilePathRelativeSchema>;
|
|
@@ -8,7 +8,9 @@ export const FilePathRelativeSchemaError = {
|
|
|
8
8
|
RequiresDirectory: "file.path.relative.requires.directory",
|
|
9
9
|
Empty: "file.path.relative.empty",
|
|
10
10
|
};
|
|
11
|
+
// Stryker disable all
|
|
11
12
|
export const FilePathRelativeSchema = z
|
|
13
|
+
// Stryker restore all
|
|
12
14
|
.string(FilePathRelativeSchemaError.Type)
|
|
13
15
|
.min(1, FilePathRelativeSchemaError.Empty)
|
|
14
16
|
.refine((value) => !value.startsWith("/"), FilePathRelativeSchemaError.LeadingSlash)
|
|
@@ -9,5 +9,5 @@ export declare const FilenameAffixError: {
|
|
|
9
9
|
TooLong: string;
|
|
10
10
|
BadChars: string;
|
|
11
11
|
};
|
|
12
|
-
export declare const FilenameAffix: z.core.$ZodBranded<z.ZodString, "FilenameAffix">;
|
|
12
|
+
export declare const FilenameAffix: z.core.$ZodBranded<z.ZodString, "FilenameAffix", "out">;
|
|
13
13
|
export type FilenameAffixType = z.infer<typeof FilenameAffix>;
|
|
@@ -12,7 +12,9 @@ export const FilenameAffixError = {
|
|
|
12
12
|
};
|
|
13
13
|
// Letters, digits, underscores, and hyphens allowed
|
|
14
14
|
const FILENAME_AFFIX_WHITELIST = /^[a-zA-Z0-9_-]+$/;
|
|
15
|
+
// Stryker disable all
|
|
15
16
|
export const FilenameAffix = z
|
|
17
|
+
// Stryker restore all
|
|
16
18
|
.string(FilenameAffixError.Type)
|
|
17
19
|
.min(1, FilenameAffixError.Empty)
|
|
18
20
|
.max(32, FilenameAffixError.TooLong)
|
|
@@ -3,5 +3,5 @@ export declare const HeightMillimetersError: {
|
|
|
3
3
|
Type: string;
|
|
4
4
|
Invalid: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const HeightMillimeters: z.core.$ZodBranded<z.ZodNumber, "HeightMillimeters">;
|
|
6
|
+
export declare const HeightMillimeters: z.core.$ZodBranded<z.ZodNumber, "HeightMillimeters", "out">;
|
|
7
7
|
export type HeightMillimetersType = z.infer<typeof HeightMillimeters>;
|
|
@@ -3,7 +3,9 @@ export const HeightMillimetersError = {
|
|
|
3
3
|
Type: "height.millimeters.type",
|
|
4
4
|
Invalid: "height.millimeters.invalid",
|
|
5
5
|
};
|
|
6
|
+
// Stryker disable all
|
|
6
7
|
export const HeightMillimeters = z
|
|
8
|
+
// Stryker restore all
|
|
7
9
|
.number(HeightMillimetersError.Type)
|
|
8
10
|
.int(HeightMillimetersError.Type)
|
|
9
11
|
.min(0, HeightMillimetersError.Invalid)
|
package/dist/hour-schema.vo.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ export declare const HourSchemaError: {
|
|
|
3
3
|
Type: string;
|
|
4
4
|
Invalid: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const HourSchema: z.core.$ZodBranded<z.ZodNumber, "HourSchema">;
|
|
6
|
+
export declare const HourSchema: z.core.$ZodBranded<z.ZodNumber, "HourSchema", "out">;
|
|
7
7
|
export type HourSchemaType = z.infer<typeof HourSchema>;
|
package/dist/hour-schema.vo.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { z } from "zod/v4";
|
|
2
|
-
export const HourSchemaError = { Type: "hour.schema.
|
|
2
|
+
export const HourSchemaError = { Type: "hour.schema.type", Invalid: "hour.schema.invalid" };
|
|
3
|
+
// Stryker disable all
|
|
3
4
|
export const HourSchema = z
|
|
5
|
+
// Stryker restore all
|
|
4
6
|
.number(HourSchemaError.Type)
|
|
5
7
|
.int(HourSchemaError.Type)
|
|
6
8
|
.gte(0, HourSchemaError.Invalid)
|
package/dist/iban-schema.vo.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ export declare const IbanSchemaError: {
|
|
|
3
3
|
Type: string;
|
|
4
4
|
Invalid: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const IbanSchema: z.core.$ZodBranded<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, "IbanSchema">;
|
|
6
|
+
export declare const IbanSchema: z.core.$ZodBranded<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, "IbanSchema", "out">;
|
|
7
7
|
export type IbanSchemaType = z.infer<typeof IbanSchema>;
|
package/dist/iban-schema.vo.js
CHANGED
|
@@ -2,7 +2,9 @@ import { z } from "zod/v4";
|
|
|
2
2
|
export const IbanSchemaError = { Type: "iban.schema.type", Invalid: "iban.schema.invalid" };
|
|
3
3
|
// Two letters for country code, two digits, 11–30 uppercase letters or digits
|
|
4
4
|
const IBAN_CHARS_WHITELIST = /^[A-Z]{2}[0-9]{2}[A-Z0-9]{11,30}$/;
|
|
5
|
+
// Stryker disable all
|
|
5
6
|
export const IbanSchema = z
|
|
7
|
+
// Stryker restore all
|
|
6
8
|
.string(IbanSchemaError.Type)
|
|
7
9
|
.toUpperCase()
|
|
8
10
|
.transform((value) => value.replaceAll(" ", ""))
|
package/dist/image.vo.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare const ImageHeightError: {
|
|
|
7
7
|
Type: string;
|
|
8
8
|
Length: string;
|
|
9
9
|
};
|
|
10
|
-
export declare const ImageWidth: z.core.$ZodBranded<z.ZodNumber, "ImageWidth">;
|
|
10
|
+
export declare const ImageWidth: z.core.$ZodBranded<z.ZodNumber, "ImageWidth", "out">;
|
|
11
11
|
export type ImageWidthType = z.infer<typeof ImageWidth>;
|
|
12
|
-
export declare const ImageHeight: z.core.$ZodBranded<z.ZodNumber, "ImageHeight">;
|
|
12
|
+
export declare const ImageHeight: z.core.$ZodBranded<z.ZodNumber, "ImageHeight", "out">;
|
|
13
13
|
export type ImageHeightType = z.infer<typeof ImageHeight>;
|
package/dist/image.vo.js
CHANGED
|
@@ -2,13 +2,17 @@ import { z } from "zod/v4";
|
|
|
2
2
|
export const ImageWidthError = { Type: "image.width.type", Length: "image.width.length" };
|
|
3
3
|
export const ImageHeightError = { Type: "image.height.type", Length: "image.height.length" };
|
|
4
4
|
const IMAGE_DIMENSIONS_CONSTRAINTS = { min: 1, max: 10_000 };
|
|
5
|
+
// Stryker disable all
|
|
5
6
|
export const ImageWidth = z
|
|
7
|
+
// Stryker restore all
|
|
6
8
|
.number(ImageWidthError.Type)
|
|
7
9
|
.int(ImageWidthError.Type)
|
|
8
10
|
.min(IMAGE_DIMENSIONS_CONSTRAINTS.min, ImageWidthError.Length)
|
|
9
11
|
.max(IMAGE_DIMENSIONS_CONSTRAINTS.max, ImageWidthError.Length)
|
|
10
12
|
.brand("ImageWidth");
|
|
13
|
+
// Stryker disable all
|
|
11
14
|
export const ImageHeight = z
|
|
15
|
+
// Stryker restore all
|
|
12
16
|
.number(ImageHeightError.Type)
|
|
13
17
|
.int(ImageHeightError.Type)
|
|
14
18
|
.min(IMAGE_DIMENSIONS_CONSTRAINTS.min, ImageHeightError.Length)
|
|
@@ -3,5 +3,5 @@ export declare const IntegerNonNegativeError: {
|
|
|
3
3
|
Type: string;
|
|
4
4
|
Invalid: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const IntegerNonNegative: z.core.$ZodBranded<z.ZodNumber, "IntegerNonNegative">;
|
|
6
|
+
export declare const IntegerNonNegative: z.core.$ZodBranded<z.ZodNumber, "IntegerNonNegative", "out">;
|
|
7
7
|
export type IntegerNonNegativeType = z.infer<typeof IntegerNonNegative>;
|
|
@@ -3,7 +3,9 @@ export const IntegerNonNegativeError = {
|
|
|
3
3
|
Type: "integer.non.negative.type",
|
|
4
4
|
Invalid: "integer.non.negative.invalid",
|
|
5
5
|
};
|
|
6
|
+
// Stryker disable all
|
|
6
7
|
export const IntegerNonNegative = z
|
|
8
|
+
// Stryker restore all
|
|
7
9
|
.number(IntegerNonNegativeError.Type)
|
|
8
10
|
.int(IntegerNonNegativeError.Type)
|
|
9
11
|
.min(0, IntegerNonNegativeError.Invalid)
|
|
@@ -3,5 +3,5 @@ export declare const IntegerPositiveError: {
|
|
|
3
3
|
Type: string;
|
|
4
4
|
Invalid: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const IntegerPositive: z.core.$ZodBranded<z.ZodNumber, "IntegerPositive">;
|
|
6
|
+
export declare const IntegerPositive: z.core.$ZodBranded<z.ZodNumber, "IntegerPositive", "out">;
|
|
7
7
|
export type IntegerPositiveType = z.infer<typeof IntegerPositive>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { z } from "zod/v4";
|
|
2
2
|
export const IntegerPositiveError = { Type: "integer.positive.type", Invalid: "integer.positive.invalid" };
|
|
3
|
+
// Stryker disable all
|
|
3
4
|
export const IntegerPositive = z
|
|
5
|
+
// Stryker restore all
|
|
4
6
|
.number(IntegerPositiveError.Type)
|
|
5
7
|
.int(IntegerPositiveError.Type)
|
|
6
8
|
.min(1, IntegerPositiveError.Invalid)
|
package/dist/integer.vo.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ import { z } from "zod/v4";
|
|
|
2
2
|
export declare const IntegerError: {
|
|
3
3
|
Type: string;
|
|
4
4
|
};
|
|
5
|
-
export declare const Integer: z.core.$ZodBranded<z.ZodNumber, "Integer">;
|
|
5
|
+
export declare const Integer: z.core.$ZodBranded<z.ZodNumber, "Integer", "out">;
|
|
6
6
|
export type IntegerType = z.infer<typeof Integer>;
|
package/dist/integer.vo.js
CHANGED
|
@@ -34,10 +34,12 @@ export class LinearRegression {
|
|
|
34
34
|
throw new Error(LinearRegressionError.SumXTooBig);
|
|
35
35
|
if (Math.abs(sumY) >= Number.MAX_SAFE_INTEGER)
|
|
36
36
|
throw new Error(LinearRegressionError.SumYTooBig);
|
|
37
|
+
// Stryker disable all
|
|
37
38
|
if (Math.abs(sumXY) >= Number.MAX_SAFE_INTEGER)
|
|
38
39
|
throw new Error(LinearRegressionError.SumXTimesYTooBig);
|
|
39
40
|
if (Math.abs(sumXX) >= Number.MAX_SAFE_INTEGER)
|
|
40
41
|
throw new Error(LinearRegressionError.SumXSquaredTooBig);
|
|
42
|
+
// Stryker restore all
|
|
41
43
|
const bDenominator = sumXX - sumX ** 2 / count;
|
|
42
44
|
if (bDenominator === 0)
|
|
43
45
|
throw new Error(LinearRegressionError.ModelCreation);
|
package/dist/mime-value.vo.d.ts
CHANGED
package/dist/mime-value.vo.js
CHANGED
|
@@ -2,7 +2,9 @@ import { z } from "zod/v4";
|
|
|
2
2
|
export const MimeValueError = { Type: "mime.value.type", Invalid: "mime.value.invalid" };
|
|
3
3
|
// One to twenty four lowercase letters, asterisk or hyphen, forward slash, one to twenty four lowercase letters, asterisk or hyphen
|
|
4
4
|
const MIME_VALUE_CHARS_WHITELIST = /^[a-z*-]{1,24}\/[a-z*-]{1,24}$/;
|
|
5
|
+
// Stryker disable all
|
|
5
6
|
export const MimeValue = z
|
|
7
|
+
// Stryker restore all
|
|
6
8
|
.string(MimeValueError.Type)
|
|
7
9
|
.regex(MIME_VALUE_CHARS_WHITELIST, MimeValueError.Invalid)
|
|
8
10
|
.transform((value) => ({ type: value.split("/")[0], subtype: value.split("/")[1] }))
|
|
@@ -31,7 +31,7 @@ export class MinMaxScaler {
|
|
|
31
31
|
if (value < min || value > max)
|
|
32
32
|
throw new Error(MinMaxScalerError.ValueOutOfRange);
|
|
33
33
|
if (min === max) {
|
|
34
|
-
return { original: value, scaled: (lower + upper) / 2, isMin:
|
|
34
|
+
return { original: value, scaled: (lower + upper) / 2, isMin: true, isMax: true };
|
|
35
35
|
}
|
|
36
36
|
const result = ((value - min) / (max - min)) * (upper - lower) + lower;
|
|
37
37
|
return {
|
|
@@ -3,5 +3,5 @@ export declare const MinuteSchemaError: {
|
|
|
3
3
|
Type: string;
|
|
4
4
|
Invalid: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const MinuteSchema: z.core.$ZodBranded<z.ZodNumber, "MinuteSchema">;
|
|
6
|
+
export declare const MinuteSchema: z.core.$ZodBranded<z.ZodNumber, "MinuteSchema", "out">;
|
|
7
7
|
export type MinuteSchemaType = z.infer<typeof MinuteSchema>;
|
package/dist/minute-schema.vo.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { z } from "zod/v4";
|
|
2
2
|
export const MinuteSchemaError = { Type: "minute.schema.error", Invalid: "minute.schema.invalid" };
|
|
3
|
+
// Stryker disable all
|
|
3
4
|
export const MinuteSchema = z
|
|
5
|
+
// Stryker restore all
|
|
4
6
|
.number(MinuteSchemaError.Type)
|
|
5
7
|
.int(MinuteSchemaError.Type)
|
|
6
8
|
.gte(0, MinuteSchemaError.Invalid)
|
package/dist/minute.vo.d.ts
CHANGED
|
@@ -12,8 +12,8 @@ export declare class Minute {
|
|
|
12
12
|
static max(): Minute;
|
|
13
13
|
get(): MinuteSchemaType;
|
|
14
14
|
equals(another: Minute): boolean;
|
|
15
|
-
isAfter(another: Minute): boolean;
|
|
16
15
|
isBefore(another: Minute): boolean;
|
|
16
|
+
isAfter(another: Minute): boolean;
|
|
17
17
|
static list(): readonly Minute[];
|
|
18
18
|
toString(): string;
|
|
19
19
|
toJSON(): number;
|
package/dist/minute.vo.js
CHANGED
|
@@ -29,12 +29,12 @@ export class Minute {
|
|
|
29
29
|
equals(another) {
|
|
30
30
|
return this.value === another.value;
|
|
31
31
|
}
|
|
32
|
-
isAfter(another) {
|
|
33
|
-
return this.value > another.value;
|
|
34
|
-
}
|
|
35
32
|
isBefore(another) {
|
|
36
33
|
return this.value < another.value;
|
|
37
34
|
}
|
|
35
|
+
isAfter(another) {
|
|
36
|
+
return this.value > another.value;
|
|
37
|
+
}
|
|
38
38
|
static list() {
|
|
39
39
|
return Array.from({ length: 60 }, (_, index) => Minute.fromValue(index));
|
|
40
40
|
}
|
|
@@ -3,5 +3,5 @@ export declare const MoneyAmountError: {
|
|
|
3
3
|
Type: string;
|
|
4
4
|
Invalid: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const MoneyAmount: z.core.$ZodBranded<z.ZodNumber, "MoneyAmount">;
|
|
6
|
+
export declare const MoneyAmount: z.core.$ZodBranded<z.ZodNumber, "MoneyAmount", "out">;
|
|
7
7
|
export type MoneyAmountType = z.infer<typeof MoneyAmount>;
|
package/dist/money-amount.vo.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { z } from "zod/v4";
|
|
2
2
|
export const MoneyAmountError = { Type: "money.amount.type", Invalid: "money.amount.invalid" };
|
|
3
|
+
// Stryker disable all
|
|
3
4
|
export const MoneyAmount = z
|
|
5
|
+
// Stryker restore all
|
|
4
6
|
.number(MoneyAmountError.Type)
|
|
5
7
|
.int(MoneyAmountError.Type)
|
|
6
8
|
.min(0, MoneyAmountError.Invalid)
|
|
@@ -4,5 +4,5 @@ export declare const MonthIsoIdError: {
|
|
|
4
4
|
BadChars: string;
|
|
5
5
|
Invalid: string;
|
|
6
6
|
};
|
|
7
|
-
export declare const MonthIsoId: z.core.$ZodBranded<z.ZodString, "MonthIsoId">;
|
|
7
|
+
export declare const MonthIsoId: z.core.$ZodBranded<z.ZodString, "MonthIsoId", "out">;
|
|
8
8
|
export type MonthIsoIdType = z.infer<typeof MonthIsoId>;
|
package/dist/month-iso-id.vo.js
CHANGED
|
@@ -6,7 +6,9 @@ export const MonthIsoIdError = {
|
|
|
6
6
|
};
|
|
7
7
|
// Four digits, hyphen, two digits
|
|
8
8
|
const MONTH_ISO_ID_CHARS_WHITELIST = /^\d{4}-\d{2}$/;
|
|
9
|
+
// Stryker disable all
|
|
9
10
|
export const MonthIsoId = z
|
|
11
|
+
// Stryker restore all
|
|
10
12
|
.string(MonthIsoIdError.Type)
|
|
11
13
|
.regex(MONTH_ISO_ID_CHARS_WHITELIST, MonthIsoIdError.BadChars)
|
|
12
14
|
.refine((value) => {
|
|
@@ -3,5 +3,5 @@ export declare const MultiplicationFactorError: {
|
|
|
3
3
|
Type: string;
|
|
4
4
|
Invalid: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const MultiplicationFactor: z.core.$ZodBranded<z.ZodNumber, "MultiplicationFactor">;
|
|
6
|
+
export declare const MultiplicationFactor: z.core.$ZodBranded<z.ZodNumber, "MultiplicationFactor", "out">;
|
|
7
7
|
export type MultiplicationFactorType = z.infer<typeof MultiplicationFactor>;
|
|
@@ -3,7 +3,9 @@ export const MultiplicationFactorError = {
|
|
|
3
3
|
Type: "multiplication.factor.type",
|
|
4
4
|
Invalid: "multiplication.factor.invalid",
|
|
5
5
|
};
|
|
6
|
+
// Stryker disable all
|
|
6
7
|
export const MultiplicationFactor = z
|
|
8
|
+
// Stryker restore all
|
|
7
9
|
.number(MultiplicationFactorError.Type)
|
|
8
10
|
.min(0, MultiplicationFactorError.Invalid)
|
|
9
11
|
.brand("MultiplicationFactor");
|
package/dist/object-key.vo.d.ts
CHANGED
|
@@ -7,5 +7,5 @@ export declare const ObjectKeyError: {
|
|
|
7
7
|
BadChars: string;
|
|
8
8
|
DotSegments: string;
|
|
9
9
|
};
|
|
10
|
-
export declare const ObjectKey: z.core.$ZodBranded<z.ZodString, "ObjectKey">;
|
|
10
|
+
export declare const ObjectKey: z.core.$ZodBranded<z.ZodString, "ObjectKey", "out">;
|
|
11
11
|
export type ObjectKeyType = z.infer<typeof ObjectKey>;
|
package/dist/object-key.vo.js
CHANGED
|
@@ -10,7 +10,9 @@ export const ObjectKeyError = {
|
|
|
10
10
|
// Lowercase letters, digits, dots, underscores, and hyphens
|
|
11
11
|
const OBJECT_KEY_SEGMENT_CHARS_WHITELIST = /^[a-z0-9._-]+$/;
|
|
12
12
|
const DOT_SEGMENTS = [".", ".."];
|
|
13
|
+
// Stryker disable all
|
|
13
14
|
export const ObjectKey = z
|
|
15
|
+
// Stryker restore all
|
|
14
16
|
.string(ObjectKeyError.Type)
|
|
15
17
|
.min(1, ObjectKeyError.Empty)
|
|
16
18
|
.max(256, ObjectKeyError.TooLong)
|
|
@@ -7,5 +7,5 @@ export declare const PackageVersionSchema: z.core.$ZodBranded<z.ZodPipe<z.ZodStr
|
|
|
7
7
|
major: number;
|
|
8
8
|
minor: number;
|
|
9
9
|
patch: number;
|
|
10
|
-
}, string>>, "PackageVersionSchema">;
|
|
10
|
+
}, string>>, "PackageVersionSchema", "out">;
|
|
11
11
|
export type PackageVersionSchemaType = z.infer<typeof PackageVersionSchema>;
|
|
@@ -5,7 +5,9 @@ export const PackageVersionSchemaError = {
|
|
|
5
5
|
};
|
|
6
6
|
// v, 1-4 digits, dot, 1-4 digits, dot, 1-4 digits - () for capturing groups
|
|
7
7
|
const PACKAGE_VERSIONS_CHARS_WHITELIST = /^v([0-9]{1,4})\.([0-9]{1,4})\.([0-9]{1,4})$/;
|
|
8
|
+
// Stryker disable all
|
|
8
9
|
export const PackageVersionSchema = z
|
|
10
|
+
// Stryker restore all
|
|
9
11
|
.string(PackageVersionSchemaError.Type)
|
|
10
12
|
.regex(PACKAGE_VERSIONS_CHARS_WHITELIST, PackageVersionSchemaError.BadChars)
|
|
11
13
|
.transform((value) => {
|