@koalarx/nest-cli 1.1.4 → 1.2.11

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.
Files changed (31) hide show
  1. package/code-base/startup-project/Dockerfile +10 -10
  2. package/code-base/startup-project/package.json +4 -4
  3. package/code-base/startup-project/prisma/generated/browser.ts +34 -0
  4. package/code-base/startup-project/prisma/generated/client.ts +54 -0
  5. package/code-base/startup-project/prisma/generated/commonInputTypes.ts +172 -0
  6. package/code-base/startup-project/prisma/generated/enums.ts +15 -0
  7. package/code-base/startup-project/prisma/generated/internal/class.ts +210 -0
  8. package/code-base/startup-project/prisma/generated/internal/prismaNamespace.ts +927 -0
  9. package/code-base/startup-project/prisma/generated/internal/prismaNamespaceBrowser.ts +116 -0
  10. package/code-base/startup-project/prisma/generated/models/Person.ts +1497 -0
  11. package/code-base/startup-project/prisma/generated/models/PersonAddress.ts +1265 -0
  12. package/code-base/startup-project/prisma/generated/models/PersonPhone.ts +1315 -0
  13. package/code-base/startup-project/prisma/generated/models.ts +14 -0
  14. package/code-base/startup-project/prisma/schema.prisma +2 -2
  15. package/code-base/startup-project/src/host/main.ts +3 -4
  16. package/code-base/startup-project/src/infra/database/db-transaction-context.ts +2 -2
  17. package/code-base/startup-project/src/infra/database/repositories/person.repository.ts +1 -1
  18. package/code-base/startup-project/src/test/create-e2e-test-app.ts +3 -4
  19. package/code-base/startup-project/tsconfig.json +2 -1
  20. package/code-base/startup-project/vitest.config.e2e.mts +1 -0
  21. package/code-base/startup-project/vitest.config.mts +2 -1
  22. package/commands/new-project/index.ts +30 -0
  23. package/index.ts +35 -0
  24. package/package.json +6 -13
  25. package/utils/copy-folder.ts +25 -0
  26. package/commands/new-project/index.d.ts +0 -3
  27. package/commands/new-project/index.js +0 -85
  28. package/index.d.ts +0 -1
  29. package/index.js +0 -158
  30. package/utils/copy-folder.d.ts +0 -3
  31. package/utils/copy-folder.js +0 -59
@@ -1,26 +1,26 @@
1
- ARG NODE_VERSION=23.11.0-slim
2
- FROM node:${NODE_VERSION}
1
+ ARG BUN_VERSION=latest
2
+ FROM oven/bun:${BUN_VERSION}
3
3
 
4
4
  # Criando diretório de trabalho
5
- WORKDIR /home/node/app
5
+ WORKDIR /home/bun/app
6
6
 
7
7
  # Copiando arquivos de configuração com permissões
8
- COPY --chown=node:node package.json package-lock.json ./
8
+ COPY --chown=bun:bun package.json bun.lockb ./
9
9
 
10
10
  # Instalando dependências
11
- RUN npm ci
11
+ RUN bun install --frozen-lockfile
12
12
 
13
13
  # Copiando o restante do código com permissões
14
- COPY --chown=node:node . .
14
+ COPY --chown=bun:bun . .
15
15
 
16
16
  # Compilando o app
17
- RUN npm run build
17
+ RUN bun run build
18
18
 
19
- # Alterando o usuário para "node" por segurança
20
- USER node
19
+ # Alterando o usuário para "bun" por segurança
20
+ USER bun
21
21
 
22
22
  # Expondo a porta da aplicação
23
23
  EXPOSE 3000
24
24
 
25
25
  # Comando para iniciar o app
26
- CMD ["npx", "prisma", "migrate", "deploy", "&&", "npm", "run", "start:prod"]
26
+ CMD ["bun", "run", "start:prod"]
@@ -10,18 +10,18 @@
10
10
  "start": "nest start",
11
11
  "start:dev": "nest start --watch",
12
12
  "start:debug": "nest start --debug --watch",
13
- "start:prod": "node dist/host/main",
14
- "lint": "prettier --end-of-line lf --write . && npx eslint --fix src/**/* && npx eslint --fix .eslintrc.js",
13
+ "start:prod": "bun dist/host/main.js",
14
+ "lint": "prettier --end-of-line lf --write . && bunx eslint --fix src/**/* && bunx eslint --fix .eslintrc.js",
15
15
  "test": "vitest run",
16
16
  "test:watch": "vitest",
17
17
  "test:cov": "vitest run --coverage",
18
18
  "test:debug": "vitest --inspect-brk --inspect --logHeapUsage --threads=false",
19
19
  "test:e2e": "vitest run --config ./vitest.config.e2e.mts",
20
- "test:all": "npm run test && npm run test:e2e"
20
+ "test:all": "bun run test && bun run test:e2e"
21
21
  },
22
22
  "dependencies": {
23
23
  "@koalarx/utils": "^4.2.1",
24
- "@koalarx/nest": "^1.16.1",
24
+ "@koalarx/nest": "^1.18.1",
25
25
  "@nestjs/common": "^11.0.12",
26
26
  "@nestjs/config": "^4.0.1",
27
27
  "@nestjs/core": "^11.0.12",
@@ -0,0 +1,34 @@
1
+
2
+ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
3
+ /* eslint-disable */
4
+ // biome-ignore-all lint: generated file
5
+ // @ts-nocheck
6
+ /*
7
+ * This file should be your main import to use Prisma-related types and utilities in a browser.
8
+ * Use it to get access to models, enums, and input types.
9
+ *
10
+ * This file does not contain a `PrismaClient` class, nor several other helpers that are intended as server-side only.
11
+ * See `client.ts` for the standard, server-side entry point.
12
+ *
13
+ * 🟢 You can import this file directly.
14
+ */
15
+
16
+ import * as Prisma from './internal/prismaNamespaceBrowser'
17
+ export { Prisma }
18
+ export * as $Enums from './enums'
19
+ export * from './enums';
20
+ /**
21
+ * Model Person
22
+ *
23
+ */
24
+ export type Person = Prisma.PersonModel
25
+ /**
26
+ * Model PersonPhone
27
+ *
28
+ */
29
+ export type PersonPhone = Prisma.PersonPhoneModel
30
+ /**
31
+ * Model PersonAddress
32
+ *
33
+ */
34
+ export type PersonAddress = Prisma.PersonAddressModel
@@ -0,0 +1,54 @@
1
+
2
+ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
3
+ /* eslint-disable */
4
+ // biome-ignore-all lint: generated file
5
+ // @ts-nocheck
6
+ /*
7
+ * This file should be your main import to use Prisma. Through it you get access to all the models, enums, and input types.
8
+ * If you're looking for something you can import in the client-side of your application, please refer to the `browser.ts` file instead.
9
+ *
10
+ * 🟢 You can import this file directly.
11
+ */
12
+
13
+ import * as process from 'node:process'
14
+ import * as path from 'node:path'
15
+
16
+ import * as runtime from "@prisma/client/runtime/client"
17
+ import * as $Enums from "./enums"
18
+ import * as $Class from "./internal/class"
19
+ import * as Prisma from "./internal/prismaNamespace"
20
+
21
+ export * as $Enums from './enums'
22
+ export * from "./enums"
23
+ /**
24
+ * ## Prisma Client
25
+ *
26
+ * Type-safe database client for TypeScript
27
+ * @example
28
+ * ```
29
+ * const prisma = new PrismaClient()
30
+ * // Fetch zero or more People
31
+ * const people = await prisma.person.findMany()
32
+ * ```
33
+ *
34
+ * Read more in our [docs](https://pris.ly/d/client).
35
+ */
36
+ export const PrismaClient = $Class.getPrismaClientClass()
37
+ export type PrismaClient<LogOpts extends Prisma.LogLevel = never, OmitOpts extends Prisma.PrismaClientOptions["omit"] = Prisma.PrismaClientOptions["omit"], ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = $Class.PrismaClient<LogOpts, OmitOpts, ExtArgs>
38
+ export { Prisma }
39
+
40
+ /**
41
+ * Model Person
42
+ *
43
+ */
44
+ export type Person = Prisma.PersonModel
45
+ /**
46
+ * Model PersonPhone
47
+ *
48
+ */
49
+ export type PersonPhone = Prisma.PersonPhoneModel
50
+ /**
51
+ * Model PersonAddress
52
+ *
53
+ */
54
+ export type PersonAddress = Prisma.PersonAddressModel
@@ -0,0 +1,172 @@
1
+
2
+ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
3
+ /* eslint-disable */
4
+ // biome-ignore-all lint: generated file
5
+ // @ts-nocheck
6
+ /*
7
+ * This file exports various common sort, input & filter types that are not directly linked to a particular model.
8
+ *
9
+ * 🟢 You can import this file directly.
10
+ */
11
+
12
+ import type * as runtime from "@prisma/client/runtime/client"
13
+ import * as $Enums from "./enums"
14
+ import type * as Prisma from "./internal/prismaNamespace"
15
+
16
+
17
+ export type IntFilter<$PrismaModel = never> = {
18
+ equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
19
+ in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
20
+ notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
21
+ lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
22
+ lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
23
+ gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
24
+ gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
25
+ not?: Prisma.NestedIntFilter<$PrismaModel> | number
26
+ }
27
+
28
+ export type StringFilter<$PrismaModel = never> = {
29
+ equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
30
+ in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
31
+ notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
32
+ lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
33
+ lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
34
+ gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
35
+ gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
36
+ contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
37
+ startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
38
+ endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
39
+ mode?: Prisma.QueryMode
40
+ not?: Prisma.NestedStringFilter<$PrismaModel> | string
41
+ }
42
+
43
+ export type BoolFilter<$PrismaModel = never> = {
44
+ equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
45
+ not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean
46
+ }
47
+
48
+ export type IntWithAggregatesFilter<$PrismaModel = never> = {
49
+ equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
50
+ in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
51
+ notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
52
+ lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
53
+ lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
54
+ gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
55
+ gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
56
+ not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number
57
+ _count?: Prisma.NestedIntFilter<$PrismaModel>
58
+ _avg?: Prisma.NestedFloatFilter<$PrismaModel>
59
+ _sum?: Prisma.NestedIntFilter<$PrismaModel>
60
+ _min?: Prisma.NestedIntFilter<$PrismaModel>
61
+ _max?: Prisma.NestedIntFilter<$PrismaModel>
62
+ }
63
+
64
+ export type StringWithAggregatesFilter<$PrismaModel = never> = {
65
+ equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
66
+ in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
67
+ notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
68
+ lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
69
+ lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
70
+ gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
71
+ gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
72
+ contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
73
+ startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
74
+ endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
75
+ mode?: Prisma.QueryMode
76
+ not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string
77
+ _count?: Prisma.NestedIntFilter<$PrismaModel>
78
+ _min?: Prisma.NestedStringFilter<$PrismaModel>
79
+ _max?: Prisma.NestedStringFilter<$PrismaModel>
80
+ }
81
+
82
+ export type BoolWithAggregatesFilter<$PrismaModel = never> = {
83
+ equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
84
+ not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
85
+ _count?: Prisma.NestedIntFilter<$PrismaModel>
86
+ _min?: Prisma.NestedBoolFilter<$PrismaModel>
87
+ _max?: Prisma.NestedBoolFilter<$PrismaModel>
88
+ }
89
+
90
+ export type NestedIntFilter<$PrismaModel = never> = {
91
+ equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
92
+ in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
93
+ notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
94
+ lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
95
+ lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
96
+ gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
97
+ gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
98
+ not?: Prisma.NestedIntFilter<$PrismaModel> | number
99
+ }
100
+
101
+ export type NestedStringFilter<$PrismaModel = never> = {
102
+ equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
103
+ in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
104
+ notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
105
+ lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
106
+ lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
107
+ gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
108
+ gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
109
+ contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
110
+ startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
111
+ endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
112
+ not?: Prisma.NestedStringFilter<$PrismaModel> | string
113
+ }
114
+
115
+ export type NestedBoolFilter<$PrismaModel = never> = {
116
+ equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
117
+ not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean
118
+ }
119
+
120
+ export type NestedIntWithAggregatesFilter<$PrismaModel = never> = {
121
+ equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
122
+ in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
123
+ notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
124
+ lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
125
+ lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
126
+ gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
127
+ gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
128
+ not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number
129
+ _count?: Prisma.NestedIntFilter<$PrismaModel>
130
+ _avg?: Prisma.NestedFloatFilter<$PrismaModel>
131
+ _sum?: Prisma.NestedIntFilter<$PrismaModel>
132
+ _min?: Prisma.NestedIntFilter<$PrismaModel>
133
+ _max?: Prisma.NestedIntFilter<$PrismaModel>
134
+ }
135
+
136
+ export type NestedFloatFilter<$PrismaModel = never> = {
137
+ equals?: number | Prisma.FloatFieldRefInput<$PrismaModel>
138
+ in?: number[] | Prisma.ListFloatFieldRefInput<$PrismaModel>
139
+ notIn?: number[] | Prisma.ListFloatFieldRefInput<$PrismaModel>
140
+ lt?: number | Prisma.FloatFieldRefInput<$PrismaModel>
141
+ lte?: number | Prisma.FloatFieldRefInput<$PrismaModel>
142
+ gt?: number | Prisma.FloatFieldRefInput<$PrismaModel>
143
+ gte?: number | Prisma.FloatFieldRefInput<$PrismaModel>
144
+ not?: Prisma.NestedFloatFilter<$PrismaModel> | number
145
+ }
146
+
147
+ export type NestedStringWithAggregatesFilter<$PrismaModel = never> = {
148
+ equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
149
+ in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
150
+ notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
151
+ lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
152
+ lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
153
+ gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
154
+ gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
155
+ contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
156
+ startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
157
+ endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
158
+ not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string
159
+ _count?: Prisma.NestedIntFilter<$PrismaModel>
160
+ _min?: Prisma.NestedStringFilter<$PrismaModel>
161
+ _max?: Prisma.NestedStringFilter<$PrismaModel>
162
+ }
163
+
164
+ export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = {
165
+ equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
166
+ not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
167
+ _count?: Prisma.NestedIntFilter<$PrismaModel>
168
+ _min?: Prisma.NestedBoolFilter<$PrismaModel>
169
+ _max?: Prisma.NestedBoolFilter<$PrismaModel>
170
+ }
171
+
172
+
@@ -0,0 +1,15 @@
1
+
2
+ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
3
+ /* eslint-disable */
4
+ // biome-ignore-all lint: generated file
5
+ // @ts-nocheck
6
+ /*
7
+ * This file exports all enum related types from the schema.
8
+ *
9
+ * 🟢 You can import this file directly.
10
+ */
11
+
12
+
13
+
14
+ // This file is empty because there are no enums in the schema.
15
+ export {}
@@ -0,0 +1,210 @@
1
+
2
+ /* !!! This is code generated by Prisma. Do not edit directly. !!! */
3
+ /* eslint-disable */
4
+ // biome-ignore-all lint: generated file
5
+ // @ts-nocheck
6
+ /*
7
+ * WARNING: This is an internal file that is subject to change!
8
+ *
9
+ * 🛑 Under no circumstances should you import this file directly! 🛑
10
+ *
11
+ * Please import the `PrismaClient` class from the `client.ts` file instead.
12
+ */
13
+
14
+ import * as runtime from "@prisma/client/runtime/client"
15
+ import type * as Prisma from "./prismaNamespace"
16
+
17
+
18
+ const config: runtime.GetPrismaClientConfig = {
19
+ "previewFeatures": [],
20
+ "clientVersion": "7.2.0",
21
+ "engineVersion": "0c8ef2ce45c83248ab3df073180d5eda9e8be7a3",
22
+ "activeProvider": "postgresql",
23
+ "inlineSchema": "generator client {\n provider = \"prisma-client\"\n output = \"generated\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n}\n\nmodel Person {\n id Int @id @default(autoincrement())\n name String\n active Boolean @default(true)\n personAddressId Int @map(\"person_address_id\")\n\n phones PersonPhone[]\n address PersonAddress @relation(fields: [personAddressId], references: [id])\n\n @@map(\"person\")\n}\n\nmodel PersonPhone {\n id Int @id @default(autoincrement())\n phone String\n\n personId Int @map(\"person_id\")\n person Person @relation(fields: [personId], references: [id], onDelete: Cascade)\n\n @@map(\"person_phone\")\n}\n\nmodel PersonAddress {\n id Int @id @default(autoincrement())\n address String\n\n people Person[]\n\n @@map(\"person_address\")\n}\n",
24
+ "runtimeDataModel": {
25
+ "models": {},
26
+ "enums": {},
27
+ "types": {}
28
+ }
29
+ }
30
+
31
+ config.runtimeDataModel = JSON.parse("{\"models\":{\"Person\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"active\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"personAddressId\",\"kind\":\"scalar\",\"type\":\"Int\",\"dbName\":\"person_address_id\"},{\"name\":\"phones\",\"kind\":\"object\",\"type\":\"PersonPhone\",\"relationName\":\"PersonToPersonPhone\"},{\"name\":\"address\",\"kind\":\"object\",\"type\":\"PersonAddress\",\"relationName\":\"PersonToPersonAddress\"}],\"dbName\":\"person\"},\"PersonPhone\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"personId\",\"kind\":\"scalar\",\"type\":\"Int\",\"dbName\":\"person_id\"},{\"name\":\"person\",\"kind\":\"object\",\"type\":\"Person\",\"relationName\":\"PersonToPersonPhone\"}],\"dbName\":\"person_phone\"},\"PersonAddress\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"address\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"people\",\"kind\":\"object\",\"type\":\"Person\",\"relationName\":\"PersonToPersonAddress\"}],\"dbName\":\"person_address\"}},\"enums\":{},\"types\":{}}")
32
+
33
+ async function decodeBase64AsWasm(wasmBase64: string): Promise<WebAssembly.Module> {
34
+ const { Buffer } = await import('node:buffer')
35
+ const wasmArray = Buffer.from(wasmBase64, 'base64')
36
+ return new WebAssembly.Module(wasmArray)
37
+ }
38
+
39
+ config.compilerWasm = {
40
+ getRuntime: async () => await import("@prisma/client/runtime/query_compiler_bg.postgresql.js"),
41
+
42
+ getQueryCompilerWasmModule: async () => {
43
+ const { wasm } = await import("@prisma/client/runtime/query_compiler_bg.postgresql.wasm-base64.js")
44
+ return await decodeBase64AsWasm(wasm)
45
+ }
46
+ }
47
+
48
+
49
+
50
+ export type LogOptions<ClientOptions extends Prisma.PrismaClientOptions> =
51
+ 'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array<Prisma.LogLevel | Prisma.LogDefinition> ? Prisma.GetEvents<ClientOptions['log']> : never : never
52
+
53
+ export interface PrismaClientConstructor {
54
+ /**
55
+ * ## Prisma Client
56
+ *
57
+ * Type-safe database client for TypeScript
58
+ * @example
59
+ * ```
60
+ * const prisma = new PrismaClient()
61
+ * // Fetch zero or more People
62
+ * const people = await prisma.person.findMany()
63
+ * ```
64
+ *
65
+ * Read more in our [docs](https://pris.ly/d/client).
66
+ */
67
+
68
+ new <
69
+ Options extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions,
70
+ LogOpts extends LogOptions<Options> = LogOptions<Options>,
71
+ OmitOpts extends Prisma.PrismaClientOptions['omit'] = Options extends { omit: infer U } ? U : Prisma.PrismaClientOptions['omit'],
72
+ ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs
73
+ >(options: Prisma.Subset<Options, Prisma.PrismaClientOptions> ): PrismaClient<LogOpts, OmitOpts, ExtArgs>
74
+ }
75
+
76
+ /**
77
+ * ## Prisma Client
78
+ *
79
+ * Type-safe database client for TypeScript
80
+ * @example
81
+ * ```
82
+ * const prisma = new PrismaClient()
83
+ * // Fetch zero or more People
84
+ * const people = await prisma.person.findMany()
85
+ * ```
86
+ *
87
+ * Read more in our [docs](https://pris.ly/d/client).
88
+ */
89
+
90
+ export interface PrismaClient<
91
+ in LogOpts extends Prisma.LogLevel = never,
92
+ in out OmitOpts extends Prisma.PrismaClientOptions['omit'] = undefined,
93
+ in out ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs
94
+ > {
95
+ [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['other'] }
96
+
97
+ $on<V extends LogOpts>(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient;
98
+
99
+ /**
100
+ * Connect with the database
101
+ */
102
+ $connect(): runtime.Types.Utils.JsPromise<void>;
103
+
104
+ /**
105
+ * Disconnect from the database
106
+ */
107
+ $disconnect(): runtime.Types.Utils.JsPromise<void>;
108
+
109
+ /**
110
+ * Executes a prepared raw query and returns the number of affected rows.
111
+ * @example
112
+ * ```
113
+ * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`
114
+ * ```
115
+ *
116
+ * Read more in our [docs](https://pris.ly/d/raw-queries).
117
+ */
118
+ $executeRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<number>;
119
+
120
+ /**
121
+ * Executes a raw query and returns the number of affected rows.
122
+ * Susceptible to SQL injections, see documentation.
123
+ * @example
124
+ * ```
125
+ * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com')
126
+ * ```
127
+ *
128
+ * Read more in our [docs](https://pris.ly/d/raw-queries).
129
+ */
130
+ $executeRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<number>;
131
+
132
+ /**
133
+ * Performs a prepared raw query and returns the `SELECT` data.
134
+ * @example
135
+ * ```
136
+ * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`
137
+ * ```
138
+ *
139
+ * Read more in our [docs](https://pris.ly/d/raw-queries).
140
+ */
141
+ $queryRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<T>;
142
+
143
+ /**
144
+ * Performs a raw query and returns the `SELECT` data.
145
+ * Susceptible to SQL injections, see documentation.
146
+ * @example
147
+ * ```
148
+ * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com')
149
+ * ```
150
+ *
151
+ * Read more in our [docs](https://pris.ly/d/raw-queries).
152
+ */
153
+ $queryRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<T>;
154
+
155
+
156
+ /**
157
+ * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole.
158
+ * @example
159
+ * ```
160
+ * const [george, bob, alice] = await prisma.$transaction([
161
+ * prisma.user.create({ data: { name: 'George' } }),
162
+ * prisma.user.create({ data: { name: 'Bob' } }),
163
+ * prisma.user.create({ data: { name: 'Alice' } }),
164
+ * ])
165
+ * ```
166
+ *
167
+ * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions).
168
+ */
169
+ $transaction<P extends Prisma.PrismaPromise<any>[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise<runtime.Types.Utils.UnwrapTuple<P>>
170
+
171
+ $transaction<R>(fn: (prisma: Omit<PrismaClient, runtime.ITXClientDenyList>) => runtime.Types.Utils.JsPromise<R>, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise<R>
172
+
173
+ $extends: runtime.Types.Extensions.ExtendsHook<"extends", Prisma.TypeMapCb<OmitOpts>, ExtArgs, runtime.Types.Utils.Call<Prisma.TypeMapCb<OmitOpts>, {
174
+ extArgs: ExtArgs
175
+ }>>
176
+
177
+ /**
178
+ * `prisma.person`: Exposes CRUD operations for the **Person** model.
179
+ * Example usage:
180
+ * ```ts
181
+ * // Fetch zero or more People
182
+ * const people = await prisma.person.findMany()
183
+ * ```
184
+ */
185
+ get person(): Prisma.PersonDelegate<ExtArgs, { omit: OmitOpts }>;
186
+
187
+ /**
188
+ * `prisma.personPhone`: Exposes CRUD operations for the **PersonPhone** model.
189
+ * Example usage:
190
+ * ```ts
191
+ * // Fetch zero or more PersonPhones
192
+ * const personPhones = await prisma.personPhone.findMany()
193
+ * ```
194
+ */
195
+ get personPhone(): Prisma.PersonPhoneDelegate<ExtArgs, { omit: OmitOpts }>;
196
+
197
+ /**
198
+ * `prisma.personAddress`: Exposes CRUD operations for the **PersonAddress** model.
199
+ * Example usage:
200
+ * ```ts
201
+ * // Fetch zero or more PersonAddresses
202
+ * const personAddresses = await prisma.personAddress.findMany()
203
+ * ```
204
+ */
205
+ get personAddress(): Prisma.PersonAddressDelegate<ExtArgs, { omit: OmitOpts }>;
206
+ }
207
+
208
+ export function getPrismaClientClass(): PrismaClientConstructor {
209
+ return runtime.getPrismaClient(config) as unknown as PrismaClientConstructor
210
+ }