diff --git a/examples/http-server/src/Accounts/AccountsRepo.ts b/examples/http-server/src/Accounts/AccountsRepo.ts index 5559a37..f7833d7 100644 --- a/examples/http-server/src/Accounts/AccountsRepo.ts +++ b/examples/http-server/src/Accounts/AccountsRepo.ts @@ -1,13 +1,13 @@ import { Model } from "@effect/sql" import { Effect } from "effect" import { Account } from "../Domain/Account.js" -import { SqlLive } from "../Sql.js" import { makeTestLayer } from "../lib/Layer.js" +import { SqlLive } from "../Sql.js" export const make = Model.makeRepository(Account, { tableName: "accounts", spanPrefix: "AccountsRepo", - idColumn: "id", + idColumn: "id" }) export class AccountsRepo extends Effect.Service()( @@ -16,10 +16,10 @@ export class AccountsRepo extends Effect.Service()( effect: Model.makeRepository(Account, { tableName: "accounts", spanPrefix: "AccountsRepo", - idColumn: "id", + idColumn: "id" }), - dependencies: [SqlLive], - }, + dependencies: [SqlLive] + } ) { static Test = makeTestLayer(AccountsRepo)({}) } diff --git a/examples/http-server/src/Accounts/Api.ts b/examples/http-server/src/Accounts/Api.ts index 247d8dd..2d3e18b 100644 --- a/examples/http-server/src/Accounts/Api.ts +++ b/examples/http-server/src/Accounts/Api.ts @@ -15,7 +15,7 @@ export class Authentication extends HttpApiMiddleware.Tag()( }) } } -) { } +) {} export class AccountsApi extends HttpApiGroup.make("accounts") .add( @@ -45,4 +45,4 @@ export class AccountsApi extends HttpApiGroup.make("accounts") ) .annotate(OpenApi.Title, "Accounts") .annotate(OpenApi.Description, "Manage user accounts") -{ } +{} diff --git a/examples/http-server/src/Accounts/Policy.ts b/examples/http-server/src/Accounts/Policy.ts index 11bfe3e..8725073 100644 --- a/examples/http-server/src/Accounts/Policy.ts +++ b/examples/http-server/src/Accounts/Policy.ts @@ -17,4 +17,4 @@ export class AccountsPolicy extends Effect.Service()( return { canUpdate, canRead, canReadSensitive } as const }) } -) { } +) {} diff --git a/examples/http-server/src/Api.ts b/examples/http-server/src/Api.ts index 343c86f..0a26b54 100644 --- a/examples/http-server/src/Api.ts +++ b/examples/http-server/src/Api.ts @@ -8,4 +8,4 @@ export class Api extends HttpApi.empty .add(GroupsApi) .add(PeopleApi) .annotate(OpenApi.Title, "Groups API") -{ } +{} diff --git a/examples/http-server/src/Domain/Group.ts b/examples/http-server/src/Domain/Group.ts index 836b00e..bff914b 100644 --- a/examples/http-server/src/Domain/Group.ts +++ b/examples/http-server/src/Domain/Group.ts @@ -16,10 +16,10 @@ export class Group extends Model.Class("Group")({ name: Schema.NonEmptyTrimmedString, createdAt: Model.DateTimeInsert, updatedAt: Model.DateTimeUpdate -}) { } +}) {} export class GroupNotFound extends Schema.TaggedError()( "GroupNotFound", { id: GroupId }, HttpApiSchema.annotations({ status: 404 }) -) { } +) {} diff --git a/examples/http-server/src/Domain/Person.ts b/examples/http-server/src/Domain/Person.ts index 647d863..eb3ddc7 100644 --- a/examples/http-server/src/Domain/Person.ts +++ b/examples/http-server/src/Domain/Person.ts @@ -17,11 +17,11 @@ export class Person extends Model.Class("Person")({ dateOfBirth: Model.FieldOption(Model.Date), createdAt: Model.DateTimeInsert, updatedAt: Model.DateTimeUpdate -}) { } +}) {} export class PersonNotFound extends Schema.TaggedError()( "PersonNotFound", { id: PersonId } -) { } +) {} diff --git a/examples/http-server/src/Domain/Policy.ts b/examples/http-server/src/Domain/Policy.ts index cd70a87..06a6138 100644 --- a/examples/http-server/src/Domain/Policy.ts +++ b/examples/http-server/src/Domain/Policy.ts @@ -77,24 +77,24 @@ export const policy = ( export const policyCompose = , E, R>( that: Effect.Effect ) => - , E2, R2>( - self: Effect.Effect - ): Effect.Effect => Effect.zipRight(self, that) as any +, E2, R2>( + self: Effect.Effect +): Effect.Effect => Effect.zipRight(self, that) as any export const policyUse = , E, R>( policy: Effect.Effect ) => - ( - effect: Effect.Effect - ): Effect.Effect | R> => policy.pipe(Effect.zipRight(effect)) as any +( + effect: Effect.Effect +): Effect.Effect | R> => policy.pipe(Effect.zipRight(effect)) as any export const policyRequire = ( _entity: Entity, _action: Action ) => - ( - effect: Effect.Effect - ): Effect.Effect> => effect +( + effect: Effect.Effect +): Effect.Effect> => effect export const withSystemActor = ( effect: Effect.Effect diff --git a/examples/http-server/src/Domain/User.ts b/examples/http-server/src/Domain/User.ts index a9d06f9..535ed68 100644 --- a/examples/http-server/src/Domain/User.ts +++ b/examples/http-server/src/Domain/User.ts @@ -19,7 +19,7 @@ export class User extends Model.Class("User")({ accessToken: Model.Sensitive(AccessToken), createdAt: Model.DateTimeInsert, updatedAt: Model.DateTimeUpdate -}) { } +}) {} export class UserWithSensitive extends Model.Class( "UserWithSensitive" @@ -27,15 +27,15 @@ export class UserWithSensitive extends Model.Class( ...Model.fields(User), accessToken: AccessToken, account: Account -}) { } +}) {} export class CurrentUser extends Context.Tag("Domain/User/CurrentUser")< CurrentUser, User ->() { } +>() {} export class UserNotFound extends Schema.TaggedError()( "UserNotFound", { id: UserId }, HttpApiSchema.annotations({ status: 404 }) -) { } +) {} diff --git a/examples/http-server/src/Groups.ts b/examples/http-server/src/Groups.ts index 169e7e9..7e45ab8 100644 --- a/examples/http-server/src/Groups.ts +++ b/examples/http-server/src/Groups.ts @@ -68,4 +68,4 @@ export class Groups extends Effect.Service()("Groups", { return { create, update, findById, with: with_ } as const }), dependencies: [SqlLive, GroupsRepo.Default] -}) { } +}) {} diff --git a/examples/http-server/src/Groups/Api.ts b/examples/http-server/src/Groups/Api.ts index 4728777..a28a7d1 100644 --- a/examples/http-server/src/Groups/Api.ts +++ b/examples/http-server/src/Groups/Api.ts @@ -20,4 +20,4 @@ export class GroupsApi extends HttpApiGroup.make("groups") .prefix("/groups") .annotate(OpenApi.Title, "Groups") .annotate(OpenApi.Description, "Manage groups") -{ } +{} diff --git a/examples/http-server/src/Groups/Policy.ts b/examples/http-server/src/Groups/Policy.ts index 5749443..6f6e3a6 100644 --- a/examples/http-server/src/Groups/Policy.ts +++ b/examples/http-server/src/Groups/Policy.ts @@ -16,4 +16,4 @@ export class GroupsPolicy extends Effect.Service()( return { canCreate, canUpdate } as const }) } -) { } +) {} diff --git a/examples/http-server/src/Groups/Repo.ts b/examples/http-server/src/Groups/Repo.ts index 2275201..fdc572a 100644 --- a/examples/http-server/src/Groups/Repo.ts +++ b/examples/http-server/src/Groups/Repo.ts @@ -10,4 +10,4 @@ export class GroupsRepo extends Effect.Service()("Groups/Repo", { idColumn: "id" }), dependencies: [SqlLive] -}) { } +}) {} diff --git a/examples/http-server/src/People.ts b/examples/http-server/src/People.ts index 41d7627..3efd3ee 100644 --- a/examples/http-server/src/People.ts +++ b/examples/http-server/src/People.ts @@ -52,4 +52,4 @@ export class People extends Effect.Service()("People", { return { create, findById, with: with_ } as const }), dependencies: [SqlLive, PeopleRepo.Default] -}) { } +}) {} diff --git a/examples/http-server/src/People/Api.ts b/examples/http-server/src/People/Api.ts index 0595d69..997d4a2 100644 --- a/examples/http-server/src/People/Api.ts +++ b/examples/http-server/src/People/Api.ts @@ -22,4 +22,4 @@ export class PeopleApi extends HttpApiGroup.make("people") .middleware(Authentication) .annotate(OpenApi.Title, "People") .annotate(OpenApi.Description, "Manage people") -{ } +{} diff --git a/examples/http-server/src/People/Policy.ts b/examples/http-server/src/People/Policy.ts index 1e8dab0..c40b1f1 100644 --- a/examples/http-server/src/People/Policy.ts +++ b/examples/http-server/src/People/Policy.ts @@ -50,4 +50,4 @@ export class PeoplePolicy extends Effect.Service()( }), dependencies: [GroupsPolicy.Default, Groups.Default, People.Default] } -) { } +) {} diff --git a/examples/http-server/src/People/Repo.ts b/examples/http-server/src/People/Repo.ts index 6dfc117..38bef12 100644 --- a/examples/http-server/src/People/Repo.ts +++ b/examples/http-server/src/People/Repo.ts @@ -10,4 +10,4 @@ export class PeopleRepo extends Effect.Service()("People/Repo", { idColumn: "id" }), dependencies: [SqlLive] -}) { } +}) {}