Skip to content

Commit d487d70

Browse files
committed
Format all files with prettier
1 parent be9bc24 commit d487d70

File tree

17 files changed

+34
-38
lines changed

17 files changed

+34
-38
lines changed

src/__tests__/setup.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ const catchAll = new Proxy(
77
return jest.fn().mockReturnValue(catchAll);
88
},
99
}
10-
)
10+
);
1111

12-
jest.mock(
13-
"pino",
14-
() => () => catchAll);
12+
jest.mock("pino", () => () => catchAll);
1513

1614
console = catchAll;

src/_boot/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { Configuration } from "@/config";
88
import { Logger } from "pino";
99
import { pubSub } from "@/_boot/pubSub";
1010
import { MessageBundle } from "@/messages";
11-
import { swagger } from '@/_boot/swagger';
11+
import { swagger } from "@/_boot/swagger";
1212

1313
const main = withContext(async ({ app, container, config, bootstrap, logger, messageBundle }) => {
1414
container.register({

src/_boot/repl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type REPLConfig = {
1414
const repl = makeModule(
1515
"repl",
1616
async ({
17-
app: { onReady, terminate},
17+
app: { onReady, terminate },
1818
container,
1919
config: {
2020
appName,

src/_boot/server.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,15 @@ const server = makeModule(
4949
});
5050

5151
if (!cli && environment !== "test") {
52-
onReady(async () => new Promise<void>(resolve => {
53-
httpServer.listen(http.port, http.host, () => {
54-
logger.info(`Webserver listening at: http://${http.host}:${http.port}`);
55-
resolve();
56-
});
57-
}));
52+
onReady(
53+
async () =>
54+
new Promise<void>((resolve) => {
55+
httpServer.listen(http.port, http.host, () => {
56+
logger.info(`Webserver listening at: http://${http.host}:${http.port}`);
57+
resolve();
58+
});
59+
})
60+
);
5861
}
5962

6063
register({

src/_lib/MongoProvider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ type InitializedCollections<Type extends CollectionInitializer> = Promise<
2121

2222
const makeMongoProvider =
2323
({ db }: Dependencies): MongoProvider =>
24-
collections =>
24+
(collections) =>
2525
Object.entries(collections).reduce(
2626
(chain: Promise<any>, [key, promise]) =>
27-
chain.then(acc => promise(db).then(collection => ({ ...acc, [key]: collection }))),
27+
chain.then((acc) => promise(db).then((collection) => ({ ...acc, [key]: collection }))),
2828
Promise.resolve()
2929
);
3030

src/_lib/events/Event.d.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ type EventAddress<ET extends string = string, T extends string = string> = Reado
33
topic: T;
44
}>;
55

6-
type Event<P, ET extends string = string, T extends string = string> = EventAddress<ET, T> & Readonly<{
7-
eventId: string;
8-
payload: P;
9-
}>;
6+
type Event<P, ET extends string = string, T extends string = string> = EventAddress<ET, T> &
7+
Readonly<{
8+
eventId: string;
9+
payload: P;
10+
}>;
1011

1112
export { Event, EventAddress };

src/_lib/events/EventProvider.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ApplicationService } from "@/_lib/DDD";
22
import { Event } from "@/_lib/events/Event";
3-
import { Publisher } from '@/_lib/events/Publisher';
3+
import { Publisher } from "@/_lib/events/Publisher";
44

55
type Enqueue = <E extends Event<any>>(event: E) => void;
66

@@ -18,10 +18,10 @@ const makeEventProvider =
1818

1919
const service = fn(deps, enqueue);
2020

21-
const wrapper = async arg => {
21+
const wrapper = async (arg) => {
2222
const result = await service(arg);
2323

24-
getEvents().forEach(event => publisher.publish(event));
24+
getEvents().forEach((event) => publisher.publish(event));
2525

2626
return result;
2727
};

src/_sharedKernel/domain/error/BusinessError.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,7 @@ namespace BusinessError {
1111
parameters?: any;
1212
};
1313

14-
export const create = ({
15-
key,
16-
message,
17-
template,
18-
parameters,
19-
}: Props & { message: string }): Exception<Props> =>
14+
export const create = ({ key, message, template, parameters }: Props & { message: string }): Exception<Props> =>
2015
new BaseError<Props>({ type, code, message, meta: { key, template, parameters } });
2116

2217
export const is = makePredicate<Exception<Props>>(type);

src/article/__tests__/unit/application/DeleteArticle.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { DeleteArticle, makeDeleteArticle } from "@/article/application/useCases/DeleteArticle";
22
import { Article } from "@/article/domain/Article";
33
import { ArticleRepository } from "@/article/domain/ArticleRepository";
4-
import { BaseError } from '@/_lib/errors/BaseError';
4+
import { BaseError } from "@/_lib/errors/BaseError";
55
import { NotFoundError } from "@/_lib/errors/NotFoundError";
66

77
describe("DeleteArticle", () => {

src/article/__tests__/unit/application/PublishArticle.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { makePublishArticle, PublishArticle } from "@/article/application/useCases/PublishArticle";
22
import { Article } from "@/article/domain/Article";
33
import { ArticleRepository } from "@/article/domain/ArticleRepository";
4-
import { BaseError } from '@/_lib/errors/BaseError';
4+
import { BaseError } from "@/_lib/errors/BaseError";
55
import { NotFoundError } from "@/_lib/errors/NotFoundError";
66
import pino from "pino";
77

0 commit comments

Comments
 (0)