@invariant--labs/foundation 1.1.2 → 1.1.4
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/tsconfig.tsbuildinfo +1 -0
- package/package.json +108 -45
- package/.pnp.cjs +0 -22192
- package/.pnp.loader.mjs +0 -2126
- package/.yarnrc.yml +0 -1
- package/CHANGELOG.md +0 -527
- package/eslint.config.mjs +0 -52
- package/invariant.json +0 -22
- package/jest/jest.config.base.ts +0 -30
- package/jest/jest.spec.base.ts +0 -7
- package/jest.config.js +0 -49
- package/src/core/application/index.ts +0 -1
- package/src/core/application/persistence/index.ts +0 -3
- package/src/core/application/persistence/query-builder.ts +0 -2
- package/src/core/application/persistence/read-projection.ts +0 -2
- package/src/core/application/persistence/repository.ts +0 -23
- package/src/core/domain/entities/aggregate-root.ts +0 -34
- package/src/core/domain/entities/entity.spec.ts +0 -43
- package/src/core/domain/entities/entity.ts +0 -29
- package/src/core/domain/entities/identifier.spec.ts +0 -34
- package/src/core/domain/entities/identifier.ts +0 -16
- package/src/core/domain/entities/index.ts +0 -5
- package/src/core/domain/entities/projection.ts +0 -7
- package/src/core/domain/entities/unique-entity-id.ts +0 -9
- package/src/core/domain/events/domain-event.ts +0 -7
- package/src/core/domain/events/index.ts +0 -1
- package/src/core/domain/index.ts +0 -3
- package/src/core/domain/value-objects/index.ts +0 -2
- package/src/core/domain/value-objects/range.ts +0 -4
- package/src/core/domain/value-objects/value-object.spec.ts +0 -45
- package/src/core/domain/value-objects/value-object.ts +0 -17
- package/src/core/errors/command-failure.error.spec.ts +0 -30
- package/src/core/errors/command-failure.error.ts +0 -9
- package/src/core/errors/command-filter.error.ts +0 -3
- package/src/core/errors/detailed.error.ts +0 -25
- package/src/core/errors/domain.error.spec.ts +0 -27
- package/src/core/errors/domain.error.ts +0 -9
- package/src/core/errors/entity-not-found.error.spec.ts +0 -32
- package/src/core/errors/entity-not-found.error.ts +0 -9
- package/src/core/errors/fake-implementation.error.spec.ts +0 -27
- package/src/core/errors/fake-implementation.error.ts +0 -15
- package/src/core/errors/index.ts +0 -8
- package/src/core/errors/query-failure.error.ts +0 -8
- package/src/core/errors/too-many-results.error.ts +0 -3
- package/src/core/index.ts +0 -4
- package/src/core/infrastructure/config/config.provider.ts +0 -78
- package/src/core/infrastructure/config/config.service.ts +0 -25
- package/src/core/infrastructure/config/index.ts +0 -2
- package/src/core/infrastructure/messaging/fake/fake-messaging.service.ts +0 -17
- package/src/core/infrastructure/messaging/fake/fake-queue-manager.service.ts +0 -9
- package/src/core/infrastructure/messaging/fake/fake-queue-messaging.service.ts +0 -9
- package/src/core/infrastructure/messaging/fake/index.ts +0 -3
- package/src/core/infrastructure/messaging/index.ts +0 -6
- package/src/core/infrastructure/messaging/messaging.service.ts +0 -3
- package/src/core/infrastructure/messaging/queue-manager.service.ts +0 -6
- package/src/core/infrastructure/messaging/queue-messaging.service.ts +0 -3
- package/src/core/infrastructure/messaging/rabbitmq/index.ts +0 -2
- package/src/core/infrastructure/messaging/rabbitmq/rabbit-messaging.service.ts +0 -11
- package/src/core/infrastructure/messaging/rabbitmq/rabbit-queue-messaging.service.ts +0 -11
- package/src/core/infrastructure/messaging/types.ts +0 -28
- package/src/core/infrastructure/persistence/errors/index.ts +0 -2
- package/src/core/infrastructure/persistence/errors/model-to-entity-conversion.error.ts +0 -9
- package/src/core/infrastructure/persistence/errors/persistence.error.ts +0 -8
- package/src/core/infrastructure/persistence/in-memory/fake.repository.ts +0 -79
- package/src/core/infrastructure/persistence/in-memory/in-memory.query-builder.ts +0 -4
- package/src/core/infrastructure/persistence/in-memory/in-memory.repository.spec.ts +0 -50
- package/src/core/infrastructure/persistence/in-memory/in-memory.repository.ts +0 -81
- package/src/core/infrastructure/persistence/in-memory/index.ts +0 -3
- package/src/core/infrastructure/persistence/index.ts +0 -4
- package/src/core/infrastructure/persistence/read-side/in-memory.query-builder.ts +0 -4
- package/src/core/infrastructure/persistence/read-side/index.ts +0 -1
- package/src/core/infrastructure/persistence/read-side/knex/index.ts +0 -2
- package/src/core/infrastructure/persistence/read-side/knex/knex-types.definition.ts +0 -13
- package/src/core/infrastructure/persistence/read-side/knex/knex.query-builder.ts +0 -70
- package/src/core/infrastructure/persistence/read-side/knex-query-builder.ts +0 -70
- package/src/core/infrastructure/persistence/read-side/knex-types.definition.ts +0 -13
- package/src/core/infrastructure/persistence/write-side/aggregate-typeorm-repository.ts +0 -87
- package/src/core/infrastructure/persistence/write-side/entity-typeorm-repository.ts +0 -64
- package/src/core/infrastructure/persistence/write-side/in-memory.repository.ts +0 -82
- package/src/core/infrastructure/persistence/write-side/index.ts +0 -1
- package/src/core/infrastructure/persistence/write-side/model-attributes.ts +0 -4
- package/src/core/infrastructure/persistence/write-side/orm-embedded-mapper.ts +0 -11
- package/src/core/infrastructure/persistence/write-side/orm-mapper.ts +0 -11
- package/src/core/infrastructure/persistence/write-side/typeorm/aggregate-typeorm.repository.ts +0 -87
- package/src/core/infrastructure/persistence/write-side/typeorm/entity-typeorm.repository.ts +0 -64
- package/src/core/infrastructure/persistence/write-side/typeorm/index.ts +0 -5
- package/src/core/infrastructure/persistence/write-side/typeorm/model-attributes.ts +0 -4
- package/src/core/infrastructure/persistence/write-side/typeorm/orm-embedded.mapper.ts +0 -11
- package/src/core/infrastructure/persistence/write-side/typeorm/orm.mapper.ts +0 -11
- package/src/core/types/architecture-layer.ts +0 -52
- package/src/core/types/array-element.ts +0 -5
- package/src/core/types/index.ts +0 -2
- package/src/index.ts +0 -30
- package/src/modules/config/config.module.ts +0 -9
- package/src/modules/config/index.ts +0 -2
- package/src/modules/graphql/index.ts +0 -1
- package/src/modules/graphql/paginated-response.object-type.ts +0 -23
- package/src/modules/healthcheck/healthcheck-out.dto.ts +0 -43
- package/src/modules/healthcheck/index.ts +0 -1
- package/src/modules/knex/index.ts +0 -3
- package/src/modules/knex/knex-core.module.ts +0 -30
- package/src/modules/knex/knex.decorator.ts +0 -5
- package/src/modules/knex/knex.interface.ts +0 -12
- package/src/modules/knex/knex.module.ts +0 -14
- package/src/modules/knex/knex.token.ts +0 -2
- package/src/modules/logger/app-logger.ts +0 -28
- package/src/modules/logger/index.ts +0 -5
- package/src/modules/logger/log.ts +0 -26
- package/src/modules/logger/logger.module.ts +0 -47
- package/src/modules/logger/logger.service.ts +0 -131
- package/src/modules/logger/transports/console-color.transport.ts +0 -41
- package/src/modules/logger/transports/console-json.transport.ts +0 -23
- package/src/modules/logger/transports/console.transport.ts +0 -10
- package/src/modules/logger/transports/fake.transport.ts +0 -18
- package/src/modules/logger/transports/index.ts +0 -5
- package/src/modules/logger/transports/logger-transport.ts +0 -22
- package/src/modules/messaging/index.ts +0 -2
- package/src/modules/messaging/messaging.module.ts +0 -92
- package/src/modules/queue/default-queue-name.resolver.ts +0 -5
- package/src/modules/queue/index.ts +0 -3
- package/src/modules/queue/queue.module.ts +0 -73
- package/src/modules/queue/rabbit-queue-manager.service.ts +0 -67
- package/src/nestjs/errors/handlers/error-handler.ts +0 -38
- package/src/nestjs/errors/handlers/error-handler.type.ts +0 -23
- package/src/nestjs/errors/handlers/generic-error-handler.ts +0 -59
- package/src/nestjs/errors/handlers/handle-errors.decorator.ts +0 -43
- package/src/nestjs/errors/handlers/index.ts +0 -5
- package/src/nestjs/errors/handlers/validation-error-handler.ts +0 -46
- package/src/nestjs/errors/index.ts +0 -2
- package/src/nestjs/errors/parsers/axios-metadata.parser.ts +0 -21
- package/src/nestjs/errors/parsers/error-metadata.definition.ts +0 -1
- package/src/nestjs/errors/parsers/index.ts +0 -5
- package/src/nestjs/errors/parsers/knex-metadata.parser.ts +0 -18
- package/src/nestjs/errors/parsers/typeorm-metadata.parser.ts +0 -19
- package/src/nestjs/errors/parsers/workos-metadata.parser.ts +0 -17
- package/src/nestjs/http/decorators/index.ts +0 -1
- package/src/nestjs/http/decorators/log-app-ctx.decorator.ts +0 -32
- package/src/nestjs/http/dtos/date-range.dto.ts +0 -15
- package/src/nestjs/http/dtos/index.ts +0 -1
- package/src/nestjs/http/filters/all-exceptions.filter.ts +0 -92
- package/src/nestjs/http/filters/command-failure.filter.ts +0 -12
- package/src/nestjs/http/filters/index.ts +0 -4
- package/src/nestjs/http/filters/rpc-exceptions.filter.ts +0 -10
- package/src/nestjs/http/filters/too-many-results.filter.ts +0 -12
- package/src/nestjs/http/index.ts +0 -6
- package/src/nestjs/http/interceptors/index.ts +0 -2
- package/src/nestjs/http/interceptors/log-app-ctx.interceptor.ts +0 -109
- package/src/nestjs/http/interceptors/serialize-output.interceptor.ts +0 -19
- package/src/nestjs/http/middleware/http-logger.middleware.ts +0 -31
- package/src/nestjs/http/middleware/index.ts +0 -2
- package/src/nestjs/http/middleware/logger.middleware.ts +0 -21
- package/src/nestjs/http/swagger/index.ts +0 -1
- package/src/nestjs/http/swagger/swagger.ts +0 -44
- package/src/nestjs/index.ts +0 -2
- package/src/testing/command-bus.stub.ts +0 -33
- package/src/testing/event-bus.stub.ts +0 -56
- package/src/testing/event-publisher.stub.ts +0 -24
- package/src/testing/fake-logger.ts +0 -20
- package/src/testing/index.ts +0 -2
- package/src/testing/query-bus.stub.ts +0 -27
- package/src/testing/stub.spec.ts +0 -250
- package/src/testing/stub.ts +0 -170
- package/src/testing/stubs/command-bus.stub.ts +0 -33
- package/src/testing/stubs/event-bus.stub.ts +0 -56
- package/src/testing/stubs/event-publisher.stub.ts +0 -24
- package/src/testing/stubs/index.ts +0 -5
- package/src/testing/stubs/query-bus.stub.ts +0 -27
- package/src/testing/stubs/stub.ts +0 -170
- package/src/utils/array.spec.ts +0 -29
- package/src/utils/array.ts +0 -10
- package/src/utils/base64.spec.ts +0 -18
- package/src/utils/base64.ts +0 -6
- package/src/utils/collection.ts +0 -4
- package/src/utils/common.ts +0 -13
- package/src/utils/csv.ts +0 -49
- package/src/utils/date/date-range.ts +0 -4
- package/src/utils/date/date.spec.ts +0 -100
- package/src/utils/date/date.ts +0 -177
- package/src/utils/date/diff.spec.ts +0 -66
- package/src/utils/date/diffYear.spec.ts +0 -23
- package/src/utils/date/fillMissingRangeValues.spec.ts +0 -523
- package/src/utils/date/groubBy.spec.ts +0 -183
- package/src/utils/date/index.ts +0 -2
- package/src/utils/date/isSame.spec.ts +0 -111
- package/src/utils/file.spec.ts +0 -66
- package/src/utils/file.ts +0 -5
- package/src/utils/hash-key.ts +0 -23
- package/src/utils/index.ts +0 -14
- package/src/utils/invariant.ts +0 -3
- package/src/utils/iso-date.ts +0 -11
- package/src/utils/object.spec.ts +0 -18
- package/src/utils/object.ts +0 -6
- package/src/utils/paginated.ts +0 -36
- package/src/utils/string.spec.ts +0 -10
- package/src/utils/string.ts +0 -19
- package/src/utils/type.ts +0 -9
- package/src/utils/xml.ts +0 -6
- package/src/validation/ensure-array.decorator.ts +0 -5
- package/src/validation/index.ts +0 -7
- package/src/validation/is-iso-date.decorator.spec.ts +0 -29
- package/src/validation/is-iso-date.decorator.ts +0 -30
- package/src/validation/is-less-than-or-equal.decorator.spec.ts +0 -30
- package/src/validation/is-less-than-or-equal.decorator.ts +0 -52
- package/src/validation/is-less-than.decorator.spec.ts +0 -36
- package/src/validation/is-less-than.decorator.ts +0 -52
- package/src/validation/is-more-than-or-equal.decorator.spec.ts +0 -30
- package/src/validation/is-more-than-or-equal.decorator.ts +0 -52
- package/src/validation/is-more-than.decorator.spec.ts +0 -36
- package/src/validation/is-more-than.decorator.ts +0 -52
- package/src/validation/is-time-string.decorator.spec.ts +0 -35
- package/src/validation/is-time-string.decorator.ts +0 -29
- package/tsconfig.build.json +0 -6
- package/tsconfig.json +0 -34
- package/tsconfig.spec.json +0 -14
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
registerDecorator,
|
|
3
|
-
ValidationArguments,
|
|
4
|
-
ValidationOptions,
|
|
5
|
-
ValidatorConstraint,
|
|
6
|
-
ValidatorConstraintInterface,
|
|
7
|
-
} from "class-validator";
|
|
8
|
-
|
|
9
|
-
import { isValidISODate } from "../utils";
|
|
10
|
-
|
|
11
|
-
export function IsMoreThanOrEqual(property: string, validationOptions?: ValidationOptions) {
|
|
12
|
-
return function (object: object, propertyName: string) {
|
|
13
|
-
registerDecorator({
|
|
14
|
-
target: object.constructor,
|
|
15
|
-
propertyName,
|
|
16
|
-
constraints: [property],
|
|
17
|
-
options: validationOptions,
|
|
18
|
-
validator: IsMoreThanOrEqualConstraint,
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
@ValidatorConstraint({ name: "isMoreThanOrEqual" })
|
|
24
|
-
class IsMoreThanOrEqualConstraint implements ValidatorConstraintInterface {
|
|
25
|
-
validate(value: unknown, args: ValidationArguments) {
|
|
26
|
-
const relatedPropertyName = args.constraints[0] as string;
|
|
27
|
-
const relatedValue = (args.object as Record<string, unknown>)[relatedPropertyName];
|
|
28
|
-
|
|
29
|
-
if (!relatedValue) {
|
|
30
|
-
return true;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (typeof value === "number" && typeof relatedValue === "number") {
|
|
34
|
-
return value >= relatedValue;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
if (value instanceof Date && relatedValue instanceof Date) {
|
|
38
|
-
return +value >= +relatedValue;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
if (typeof value === "string" && typeof relatedValue === "string" && isValidISODate(value) && isValidISODate(relatedValue)) {
|
|
42
|
-
return +new Date(value) >= +new Date(relatedValue);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
throw new Error("Unsupported comparison");
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
defaultMessage(args: ValidationArguments) {
|
|
49
|
-
const relatedPropertyName = args.constraints[0] as string;
|
|
50
|
-
return `${args.property} must be more than or equal ${relatedPropertyName}`;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from "@jest/globals";
|
|
2
|
-
import { validate } from "class-validator";
|
|
3
|
-
|
|
4
|
-
import { IsMoreThan } from "./is-more-than.decorator";
|
|
5
|
-
|
|
6
|
-
class Dto {
|
|
7
|
-
min: number;
|
|
8
|
-
@IsMoreThan("min")
|
|
9
|
-
max: number;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
describe("IsMoreThan", () => {
|
|
13
|
-
it("should pass when value is greater", async () => {
|
|
14
|
-
const dto = Object.assign(new Dto(), { min: 5, max: 10 });
|
|
15
|
-
const errors = await validate(dto);
|
|
16
|
-
expect(errors).toHaveLength(0);
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
it("should fail when value is equal", async () => {
|
|
20
|
-
const dto = Object.assign(new Dto(), { min: 5, max: 5 });
|
|
21
|
-
const errors = await validate(dto);
|
|
22
|
-
expect(errors.length).toBeGreaterThan(0);
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
it("should fail when value is less", async () => {
|
|
26
|
-
const dto = Object.assign(new Dto(), { min: 10, max: 5 });
|
|
27
|
-
const errors = await validate(dto);
|
|
28
|
-
expect(errors.length).toBeGreaterThan(0);
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
it("should pass when related value is falsy", async () => {
|
|
32
|
-
const dto = Object.assign(new Dto(), { min: 0, max: 5 });
|
|
33
|
-
const errors = await validate(dto);
|
|
34
|
-
expect(errors).toHaveLength(0);
|
|
35
|
-
});
|
|
36
|
-
});
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
registerDecorator,
|
|
3
|
-
ValidationArguments,
|
|
4
|
-
ValidationOptions,
|
|
5
|
-
ValidatorConstraint,
|
|
6
|
-
ValidatorConstraintInterface,
|
|
7
|
-
} from "class-validator";
|
|
8
|
-
|
|
9
|
-
import { isValidISODate } from "../utils";
|
|
10
|
-
|
|
11
|
-
export function IsMoreThan(property: string, validationOptions?: ValidationOptions) {
|
|
12
|
-
return function (object: object, propertyName: string) {
|
|
13
|
-
registerDecorator({
|
|
14
|
-
target: object.constructor,
|
|
15
|
-
propertyName,
|
|
16
|
-
constraints: [property],
|
|
17
|
-
options: validationOptions,
|
|
18
|
-
validator: IsMoreThanConstraint,
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
@ValidatorConstraint({ name: "isMoreThan" })
|
|
24
|
-
class IsMoreThanConstraint implements ValidatorConstraintInterface {
|
|
25
|
-
validate(value: unknown, args: ValidationArguments) {
|
|
26
|
-
const relatedPropertyName = args.constraints[0] as string;
|
|
27
|
-
const relatedValue = (args.object as Record<string, unknown>)[relatedPropertyName];
|
|
28
|
-
|
|
29
|
-
if (!relatedValue) {
|
|
30
|
-
return true;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (typeof value === "number" && typeof relatedValue === "number") {
|
|
34
|
-
return value > relatedValue;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
if (value instanceof Date && relatedValue instanceof Date) {
|
|
38
|
-
return +value > +relatedValue;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
if (typeof value === "string" && typeof relatedValue === "string" && isValidISODate(value) && isValidISODate(relatedValue)) {
|
|
42
|
-
return +new Date(value) > +new Date(relatedValue);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
throw new Error("Unsupported comparison");
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
defaultMessage(args: ValidationArguments) {
|
|
49
|
-
const relatedPropertyName = args.constraints[0] as string;
|
|
50
|
-
return `${args.property} must be more than ${relatedPropertyName}`;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from "@jest/globals";
|
|
2
|
-
import { validate } from "class-validator";
|
|
3
|
-
|
|
4
|
-
import { IsTimeString } from "./is-time-string.decorator";
|
|
5
|
-
|
|
6
|
-
class Dto {
|
|
7
|
-
@IsTimeString()
|
|
8
|
-
time: unknown;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
describe("IsTimeString", () => {
|
|
12
|
-
it("should accept HH:mm:ss format", async () => {
|
|
13
|
-
const dto = Object.assign(new Dto(), { time: "14:30:00" });
|
|
14
|
-
const errors = await validate(dto);
|
|
15
|
-
expect(errors).toHaveLength(0);
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it("should accept compact HHmmss format", async () => {
|
|
19
|
-
const dto = Object.assign(new Dto(), { time: "143000" });
|
|
20
|
-
const errors = await validate(dto);
|
|
21
|
-
expect(errors).toHaveLength(0);
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it("should reject invalid time strings", async () => {
|
|
25
|
-
const dto = Object.assign(new Dto(), { time: "25:00:00" });
|
|
26
|
-
const errors = await validate(dto);
|
|
27
|
-
expect(errors.length).toBeGreaterThan(0);
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
it("should reject non-string values", async () => {
|
|
31
|
-
const dto = Object.assign(new Dto(), { time: 1430 });
|
|
32
|
-
const errors = await validate(dto);
|
|
33
|
-
expect(errors.length).toBeGreaterThan(0);
|
|
34
|
-
});
|
|
35
|
-
});
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
registerDecorator,
|
|
3
|
-
ValidationArguments,
|
|
4
|
-
ValidationOptions,
|
|
5
|
-
ValidatorConstraint,
|
|
6
|
-
ValidatorConstraintInterface,
|
|
7
|
-
} from "class-validator";
|
|
8
|
-
|
|
9
|
-
export function IsTimeString(validationOptions?: ValidationOptions) {
|
|
10
|
-
return function (object: object, propertyName: string) {
|
|
11
|
-
registerDecorator({
|
|
12
|
-
target: object.constructor,
|
|
13
|
-
propertyName,
|
|
14
|
-
options: validationOptions,
|
|
15
|
-
validator: IsTimeStringConstraint,
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
@ValidatorConstraint({ name: "isTimeString" })
|
|
21
|
-
class IsTimeStringConstraint implements ValidatorConstraintInterface {
|
|
22
|
-
validate(value: unknown) {
|
|
23
|
-
return typeof value === "string" && /^(([01]\d|2[0-3]):?[0-5]\d:?[0-5]\d+)$/.test(value);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
defaultMessage(args: ValidationArguments) {
|
|
27
|
-
return `${args.property} must be in HH:mm:ss format`;
|
|
28
|
-
}
|
|
29
|
-
}
|
package/tsconfig.build.json
DELETED
package/tsconfig.json
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"declaration": true,
|
|
5
|
-
"baseUrl": "./",
|
|
6
|
-
"module": "CommonJS",
|
|
7
|
-
"target": "ES2022",
|
|
8
|
-
"moduleResolution": "node",
|
|
9
|
-
"outDir": "./dist",
|
|
10
|
-
"removeComments": true,
|
|
11
|
-
"emitDecoratorMetadata": true,
|
|
12
|
-
"experimentalDecorators": true,
|
|
13
|
-
"allowSyntheticDefaultImports": true,
|
|
14
|
-
"sourceMap": true,
|
|
15
|
-
"incremental": true,
|
|
16
|
-
"skipLibCheck": true,
|
|
17
|
-
"skipDefaultLibCheck": true,
|
|
18
|
-
"noImplicitAny": true,
|
|
19
|
-
"strictBindCallApply": false,
|
|
20
|
-
"forceConsistentCasingInFileNames": false,
|
|
21
|
-
"noFallthroughCasesInSwitch": false,
|
|
22
|
-
"esModuleInterop": true,
|
|
23
|
-
"importHelpers": true,
|
|
24
|
-
"resolveJsonModule": true,
|
|
25
|
-
"strict": true,
|
|
26
|
-
"strictNullChecks": true,
|
|
27
|
-
"strictPropertyInitialization": false,
|
|
28
|
-
"allowImportingTsExtensions": false,
|
|
29
|
-
"paths": {
|
|
30
|
-
"@invariant-labs/foundation": ["./src/index"]
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"exclude": ["node_modules"]
|
|
34
|
-
}
|
package/tsconfig.spec.json
DELETED