Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix/76 fix the tsconfig mistake #78

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions backend/main/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions backend/main/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@
"typedoc": "^0.25.1",
"typedoc-theme-hierarchy": "^4.1.2",
"typescript": "^5.2.2",
"vite-tsconfig-paths": "^4.2.1",
"vitest": "^0.34.6"
},
"dependencies": {
"result-ts-type": "^1.0.0",
"uuid": "^9.0.1"
}
}
3 changes: 2 additions & 1 deletion backend/main/src/Group/Domain/Entities/Container.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Food, FoodId } from "src/Group/Domain/Entities/Food";
import { AggregateRoot, Err, Identifier, Ok, Result } from "src/Shared";
import { AggregateRoot, Identifier } from "src/Shared";
import { DomainObjectError } from "src/Shared";
import { Err, Ok, Result } from "result-ts-type";

interface IContainerProps {
name: string;
Expand Down
3 changes: 2 additions & 1 deletion backend/main/src/Group/Domain/Entities/Food.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Entity, Err, Identifier, Ok, Result } from "src/Shared";
import { Entity, Identifier } from "src/Shared";
import { DomainObjectError } from "src/Shared";
import { Unit } from "../ValueObjects/Unit";
import { Quantity } from "src/Group/Domain/ValueObjects/Quantity";
import { Expiry } from "../ValueObjects/Expiry";
import { Err, Ok, Result } from "result-ts-type";

interface IFoodProps {
name: string;
Expand Down
3 changes: 2 additions & 1 deletion backend/main/src/Group/Domain/ValueObjects/Expiry.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Err, Ok, Result, ValueObject } from "src/Shared";
import { ValueObject } from "src/Shared";
import { DomainObjectError } from "src/Shared";
import { Err, Ok, Result } from "result-ts-type";

interface IExpiryProps {
date: Date;
Expand Down
3 changes: 2 additions & 1 deletion backend/main/src/Group/Domain/ValueObjects/Quantity.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { DomainObjectError, Err, Ok, Result, ValueObject } from "src/Shared";
import { DomainObjectError, ValueObject } from "src/Shared";
import { Err, Ok, Result } from "result-ts-type";

/**
* Quantity class.
Expand Down
3 changes: 2 additions & 1 deletion backend/main/src/Group/Domain/ValueObjects/Unit.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Err, Ok, Result, ValueObject } from "src/Shared";
import { ValueObject } from "src/Shared";
import { DomainObjectError } from "src/Shared";
import { Err, Ok, Result } from "result-ts-type";

interface IUnitProps {
name: string;
Expand Down
2 changes: 1 addition & 1 deletion backend/main/src/Shared/Layers/UseCase/IUseCase.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Result } from "src/Shared";
import { Result } from "result-ts-type";

/**
* This is the use case interface.
Expand Down
Empty file.
14 changes: 0 additions & 14 deletions backend/main/src/Shared/Utils/Result.ts

This file was deleted.

2 changes: 0 additions & 2 deletions backend/main/src/Shared/Utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
export { Ok, Err } from "./Result";
export type { Result } from "./Result";
export { UseCaseError, DomainObjectError } from "./Errors";
3 changes: 2 additions & 1 deletion backend/main/src/User/Domain/Entity/User.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { AggregateRoot, Err, Identifier, Ok, Result } from "src/Shared";
import { AggregateRoot, Identifier } from "src/Shared";
import { DomainObjectError } from "src/Shared";
import { Username } from "src/User/Domain/ValueObject/Username";
import { EmailAddress } from "src/User/Domain/ValueObject/EmailAddress";
import { v4 as uuidv4, validate as uuidValidate } from "uuid";
import { Err, Ok, Result } from "result-ts-type";

interface IUserProps {
username: Username;
Expand Down
3 changes: 2 additions & 1 deletion backend/main/src/User/Domain/ValueObject/EmailAddress.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { DomainObjectError, Err, Ok, Result, ValueObject } from "src/Shared";
import { DomainObjectError, ValueObject } from "src/Shared";
import { Err, Ok, Result } from "result-ts-type";

interface IEmail {
emailAddress: string;
Expand Down
3 changes: 2 additions & 1 deletion backend/main/src/User/Domain/ValueObject/Username.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { DomainObjectError, Err, Ok, Result, ValueObject } from "src/Shared";
import { DomainObjectError, ValueObject } from "src/Shared";
import { Err, Ok, Result } from "result-ts-type";

const DEFAULT_NAME = "Nishiki User";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { IUserRepository } from "src/User/Domain/IUserRepository";
import { User, UserId } from "src/User/Domain/Entity/User";
import { Err, IUseCase, Ok, Result } from "src/Shared";
import { IUseCase } from "src/Shared";
import { Err, Ok, Result } from "result-ts-type";
import {
CreateUserUseCaseErrorType,
ICreateUserUseCase,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { Err, IUseCase, Ok, Result } from "src/Shared";
import { IUseCase } from "src/Shared";
import {
IDeleteUseCaseInput,
DeleteUserUseCaseErrorType,
} from "./IDeleteUseCase";
import { IUserRepository } from "src/User/Domain/IUserRepository";
import { UserId } from "src/User";
import { Err, Ok, Result } from "result-ts-type";

/**
* Deletion operation skips conforming to user existing.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { FindUserUseCaseErrorType } from "./IFindUserUseCase";
import { IUseCase, Ok, Result, Err } from "src/Shared";
import { IUseCase } from "src/Shared";
import { UserId } from "src/User";
import { IUserRepository } from "src/User/Domain/IUserRepository";
import { IUserDto, userDtoMapper } from "src/User/Dtos/UserDto";
import { Err, Ok, Result } from "result-ts-type";

export class FindUserUseCase
implements IUseCase<string, IUserDto | undefined, FindUserUseCaseErrorType>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { Err, IUseCase, Ok, Result } from "src/Shared";
import { IUseCase } from "src/Shared";
import { IUserDto, userDtoMapper } from "src/User/Dtos/UserDto";
import { FindUsersUseCaseErrorType } from "src/User/UseCases/FindUsersUseCase/IFindUsersUseCase";
import { IUserRepository } from "src/User/Domain/IUserRepository";
import { UserId } from "src/User";
import { UserIdDomainError } from "src/User/Domain/Entity/User";
import { Err, Ok, Result } from "result-ts-type";

/**
* find multiple users
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Err, IUseCase, Ok, Result } from "src/Shared";
import { IUseCase } from "src/Shared";
import {
IUpdateUserNameUseCaseInput,
UpdateUserNameUseCaseErrorType,
Expand All @@ -8,6 +8,7 @@ import {
import { IUserRepository } from "src/User/Domain/IUserRepository";
import { UserId } from "src/User";
import { Username } from "src/User/Domain/ValueObject/Username";
import { Err, Ok, Result } from "result-ts-type";

/**
* Updating a user's name use case.
Expand Down
Loading