auth-vir 5.2.0 → 5.2.1

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.
@@ -3,43 +3,28 @@ export type * from '../models.js';
3
3
  export type * from './prismaNamespace.js';
4
4
  export declare const Decimal: typeof runtime.Decimal;
5
5
  export declare const NullTypes: {
6
- DbNull: (new (secret: never) => typeof runtime.objectEnumValues.instances.DbNull);
7
- JsonNull: (new (secret: never) => typeof runtime.objectEnumValues.instances.JsonNull);
8
- AnyNull: (new (secret: never) => typeof runtime.objectEnumValues.instances.AnyNull);
6
+ DbNull: (new (secret: never) => typeof runtime.DbNull);
7
+ JsonNull: (new (secret: never) => typeof runtime.JsonNull);
8
+ AnyNull: (new (secret: never) => typeof runtime.AnyNull);
9
9
  };
10
10
  /**
11
11
  * Helper for filtering JSON entries that have `null` on the database (empty on the db)
12
12
  *
13
13
  * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
14
14
  */
15
- export declare const DbNull: {
16
- "__#private@#private": any;
17
- _getNamespace(): string;
18
- _getName(): string;
19
- toString(): string;
20
- };
15
+ export declare const DbNull: import("@prisma/client-runtime-utils").DbNullClass;
21
16
  /**
22
17
  * Helper for filtering JSON entries that have JSON `null` values (not empty on the db)
23
18
  *
24
19
  * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
25
20
  */
26
- export declare const JsonNull: {
27
- "__#private@#private": any;
28
- _getNamespace(): string;
29
- _getName(): string;
30
- toString(): string;
31
- };
21
+ export declare const JsonNull: import("@prisma/client-runtime-utils").JsonNullClass;
32
22
  /**
33
23
  * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull`
34
24
  *
35
25
  * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
36
26
  */
37
- export declare const AnyNull: {
38
- "__#private@#private": any;
39
- _getNamespace(): string;
40
- _getName(): string;
41
- toString(): string;
42
- };
27
+ export declare const AnyNull: import("@prisma/client-runtime-utils").AnyNullClass;
43
28
  export declare const ModelName: {
44
29
  readonly User: "User";
45
30
  };
@@ -16,28 +16,28 @@
16
16
  import * as runtime from "@prisma/client/runtime/index-browser";
17
17
  export const Decimal = runtime.Decimal;
18
18
  export const NullTypes = {
19
- DbNull: runtime.objectEnumValues.classes.DbNull,
20
- JsonNull: runtime.objectEnumValues.classes.JsonNull,
21
- AnyNull: runtime.objectEnumValues.classes.AnyNull,
19
+ DbNull: runtime.NullTypes.DbNull,
20
+ JsonNull: runtime.NullTypes.JsonNull,
21
+ AnyNull: runtime.NullTypes.AnyNull,
22
22
  };
23
23
  /**
24
24
  * Helper for filtering JSON entries that have `null` on the database (empty on the db)
25
25
  *
26
26
  * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
27
27
  */
28
- export const DbNull = runtime.objectEnumValues.instances.DbNull;
28
+ export const DbNull = runtime.DbNull;
29
29
  /**
30
30
  * Helper for filtering JSON entries that have JSON `null` values (not empty on the db)
31
31
  *
32
32
  * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
33
33
  */
34
- export const JsonNull = runtime.objectEnumValues.instances.JsonNull;
34
+ export const JsonNull = runtime.JsonNull;
35
35
  /**
36
36
  * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull`
37
37
  *
38
38
  * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
39
39
  */
40
- export const AnyNull = runtime.objectEnumValues.instances.AnyNull;
40
+ export const AnyNull = runtime.AnyNull;
41
41
  export const ModelName = {
42
42
  User: 'User'
43
43
  };
@@ -122,7 +122,7 @@ export type UserGroupByOutputType = {
122
122
  _min: UserMinAggregateOutputType | null;
123
123
  _max: UserMaxAggregateOutputType | null;
124
124
  };
125
- type GetUserGroupByPayload<T extends UserGroupByArgs> = Prisma.PrismaPromise<Array<Prisma.PickEnumerable<UserGroupByOutputType, T['by']> & {
125
+ export type GetUserGroupByPayload<T extends UserGroupByArgs> = Prisma.PrismaPromise<Array<Prisma.PickEnumerable<UserGroupByOutputType, T['by']> & {
126
126
  [P in ((keyof T) & (keyof UserGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : Prisma.GetScalarType<T[P], UserGroupByOutputType[P]> : Prisma.GetScalarType<T[P], UserGroupByOutputType[P]>;
127
127
  }>>;
128
128
  export type UserWhereInput = {
@@ -794,6 +794,11 @@ export type UserFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalAr
794
794
  * Skip the first `n` Users.
795
795
  */
796
796
  skip?: number | runtime.Types.Skip;
797
+ /**
798
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
799
+ *
800
+ * Filter by unique combinations of Users.
801
+ */
797
802
  distinct?: Prisma.UserScalarFieldEnum | Prisma.UserScalarFieldEnum[] | runtime.Types.Skip;
798
803
  relationLoadStrategy?: Prisma.RelationLoadStrategy | runtime.Types.Skip;
799
804
  };
@@ -977,4 +982,3 @@ export type UserDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArg
977
982
  */
978
983
  omit?: Prisma.UserOmit<ExtArgs> | null;
979
984
  };
980
- export {};
@@ -41,17 +41,19 @@ export async function parseJwtKeys(rawKeys) {
41
41
  if (!rawKeys.encryptionKey) {
42
42
  throw new Error('JWT encryption key is empty');
43
43
  }
44
- else if (!rawKeys.signingKey) {
44
+ else if (rawKeys.signingKey) {
45
+ return {
46
+ encryptionKey: base64url.decode(rawKeys.encryptionKey),
47
+ signingKey: await crypto.subtle.importKey('jwk', {
48
+ k: rawKeys.signingKey,
49
+ alg: 'HS512',
50
+ ext: signingKeyOptions[1],
51
+ key_ops: [...signingKeyOptions[2]],
52
+ kty: 'oct',
53
+ }, ...signingKeyOptions),
54
+ };
55
+ }
56
+ else {
45
57
  throw new Error('JWT signing key is empty');
46
58
  }
47
- return {
48
- encryptionKey: base64url.decode(rawKeys.encryptionKey),
49
- signingKey: await crypto.subtle.importKey('jwk', {
50
- k: rawKeys.signingKey,
51
- alg: 'HS512',
52
- ext: signingKeyOptions[1],
53
- key_ops: [...signingKeyOptions[2]],
54
- kty: 'oct',
55
- }, ...signingKeyOptions),
56
- };
57
59
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auth-vir",
3
- "version": "5.2.0",
3
+ "version": "5.2.1",
4
4
  "description": "Auth made easy and secure via JWT cookies, CSRF tokens, and password hashing helpers.",
5
5
  "keywords": [
6
6
  "auth",
@@ -19,7 +19,7 @@
19
19
  "type": "git",
20
20
  "url": "git+https://github.com/electrovir/auth-vir.git"
21
21
  },
22
- "license": "(MIT or CC0 1.0)",
22
+ "license": "(MIT OR CC0-1.0)",
23
23
  "author": {
24
24
  "name": "electrovir",
25
25
  "url": "https://github.com/electrovir"
@@ -33,7 +33,7 @@
33
33
  "build": "virmator frontend build",
34
34
  "compile": "virmator compile",
35
35
  "docs": "virmator docs",
36
- "init": "node -e \"require('fs').rmSync('src/generated', { recursive: true, force: true })\" && prisma generate --no-hints --schema test-files/schema.prisma",
36
+ "init": "node -e \"require('fs').rmSync('src/generated', { recursive: true, force: true })\" && prisma generate --no-hints --config test-files/prisma.config.ts",
37
37
  "test": "runstorm --names web,node, \"npm run test:web\" \"npm run test:node\"",
38
38
  "test:docs": "virmator docs check",
39
39
  "test:node": "virmator test node 'src/**/*.test.node.ts'",
@@ -41,29 +41,28 @@
41
41
  "test:web": "virmator test web"
42
42
  },
43
43
  "dependencies": {
44
- "@augment-vir/assert": "^31.68.2",
45
- "@augment-vir/common": "^31.68.2",
46
- "date-vir": "^8.2.1",
44
+ "@augment-vir/assert": "^32.2.1",
45
+ "@augment-vir/common": "^32.2.1",
46
+ "date-vir": "^8.6.2",
47
47
  "detect-activity": "^1.0.0",
48
48
  "hash-wasm": "^4.12.0",
49
- "jose": "^6.2.1",
50
- "object-shape-tester": "^6.11.0",
51
- "type-fest": "^5.4.4",
52
- "url-vir": "^2.1.7"
49
+ "jose": "^6.2.4",
50
+ "object-shape-tester": "^6.14.1",
51
+ "url-vir": "^2.1.10"
53
52
  },
54
53
  "devDependencies": {
55
- "@augment-vir/test": "^31.68.2",
56
- "@prisma/client": "^6.19.2",
57
- "@types/node": "^25.5.0",
58
- "@web/dev-server-esbuild": "^1.0.5",
59
- "@web/test-runner": "^0.20.2",
60
- "@web/test-runner-commands": "^0.9.0",
61
- "@web/test-runner-playwright": "^0.11.1",
62
- "@web/test-runner-visual-regression": "^0.10.0",
54
+ "@augment-vir/test": "^32.2.1",
55
+ "@prisma/client": "^7.9.0",
56
+ "@types/node": "^26.1.1",
57
+ "@web/dev-server-esbuild": "^2.0.0",
58
+ "@web/test-runner": "^1.0.0",
59
+ "@web/test-runner-commands": "^1.0.1",
60
+ "@web/test-runner-playwright": "^1.0.0",
61
+ "@web/test-runner-visual-regression": "^1.0.1",
63
62
  "istanbul-smart-text-reporter": "^1.1.5",
64
- "markdown-code-example-inserter": "^3.0.3",
65
- "prisma-vir": "^2.3.3",
66
- "typedoc": "^0.28.17",
63
+ "markdown-code-example-inserter": "^3.0.6",
64
+ "prisma-vir": "^4.0.1",
65
+ "typedoc": "^0.28.20",
67
66
  "typescript": "^5.9.3"
68
67
  },
69
68
  "engines": {
@@ -1,9 +1,12 @@
1
1
  import {
2
2
  ensureArray,
3
3
  type AnyObject,
4
+ type EmptyObject,
4
5
  type JsonCompatibleObject,
5
6
  type MaybePromise,
6
7
  type PartialWithUndefined,
8
+ type RequireExactlyOne,
9
+ type RequireOneOrNone,
7
10
  } from '@augment-vir/common';
8
11
  import {
9
12
  calculateRelativeDate,
@@ -13,7 +16,6 @@ import {
13
16
  type AnyDuration,
14
17
  } from 'date-vir';
15
18
  import {type IncomingHttpHeaders, type OutgoingHttpHeaders} from 'node:http';
16
- import {type EmptyObject, type RequireExactlyOne, type RequireOneOrNone} from 'type-fest';
17
19
  import {
18
20
  extractUserIdFromRequestHeaders,
19
21
  generateLogoutHeaders,
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  type createBlockingInterval,
3
+ type EmptyObject,
3
4
  HttpStatus,
4
5
  type JsonCompatibleObject,
5
6
  type MaybePromise,
@@ -8,7 +9,6 @@ import {
8
9
  } from '@augment-vir/common';
9
10
  import {type AnyDuration} from 'date-vir';
10
11
  import {listenToActivity} from 'detect-activity';
11
- import {type EmptyObject} from 'type-fest';
12
12
  import {
13
13
  type CsrfHeaderNameOption,
14
14
  getCurrentCsrfToken,
@@ -136,13 +136,13 @@ export class FrontendAuthClient<AssumedUserParams extends JsonCompatibleObject =
136
136
  if (!assumedUserParams) {
137
137
  localStorage.removeItem(storageKey);
138
138
  return true;
139
- } else if (!(await this.config.canAssumeUser?.())) {
139
+ } else if (await this.config.canAssumeUser?.()) {
140
+ localStorage.setItem(storageKey, JSON.stringify(assumedUserParams));
141
+
142
+ return true;
143
+ } else {
140
144
  return false;
141
145
  }
142
-
143
- localStorage.setItem(storageKey, JSON.stringify(assumedUserParams));
144
-
145
- return true;
146
146
  }
147
147
 
148
148
  /** Gets the assumed user params stored in local storage, if any. */
package/src/cookie.ts CHANGED
@@ -3,10 +3,10 @@ import {
3
3
  escapeStringForRegExp,
4
4
  safeMatch,
5
5
  type PartialWithUndefined,
6
+ type Primitive,
6
7
  type SelectFrom,
7
8
  } from '@augment-vir/common';
8
9
  import {convertDuration, type AnyDuration} from 'date-vir';
9
- import {type Primitive} from 'type-fest';
10
10
  import {parseUrl} from 'url-vir';
11
11
  import {type CreateJwtParams, type ParseJwtParams, type ParsedJwt} from './jwt/jwt.js';
12
12
  import {createUserJwt, parseUserJwt, type JwtUserData} from './jwt/user-jwt.js';
package/src/csrf-token.ts CHANGED
@@ -1,6 +1,10 @@
1
1
  import {check} from '@augment-vir/assert';
2
- import {escapeStringForRegExp, randomString, safeMatch} from '@augment-vir/common';
3
- import {type RequireExactlyOne} from 'type-fest';
2
+ import {
3
+ escapeStringForRegExp,
4
+ randomString,
5
+ safeMatch,
6
+ type RequireExactlyOne,
7
+ } from '@augment-vir/common';
4
8
  import {AuthCookie, resolveCookieName} from './cookie.js';
5
9
 
6
10
  /**
@@ -6,7 +6,7 @@
6
6
  /*
7
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
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
- *
9
+ *
10
10
  * 🟢 You can import this file directly.
11
11
  */
12
12
 
@@ -28,19 +28,19 @@ export * from "./enums.js"
28
28
  * Type-safe database client for TypeScript
29
29
  * @example
30
30
  * ```
31
- * const prisma = new PrismaClient()
31
+ * const prisma = new PrismaClient({
32
+ * adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL })
33
+ * })
32
34
  * // Fetch zero or more Users
33
35
  * const users = await prisma.user.findMany()
34
36
  * ```
35
37
  *
36
- * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
38
+ * Read more in our [docs](https://pris.ly/d/client).
37
39
  */
38
- export const PrismaClient = $Class.getPrismaClientClass(__dirname)
40
+ export const PrismaClient = $Class.getPrismaClientClass()
39
41
  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>
40
42
  export { Prisma }
41
43
 
42
-
43
-
44
44
  /**
45
45
  * Model User
46
46
  *
@@ -16,63 +16,30 @@ import type * as Prisma from "./prismaNamespace.js"
16
16
 
17
17
 
18
18
  const config: runtime.GetPrismaClientConfig = {
19
- "generator": {
20
- "name": "jsClient",
21
- "provider": {
22
- "fromEnvVar": null,
23
- "value": "prisma-client"
24
- },
25
- "output": {
26
- "value": "/Users/electrovir/repos/electrovir/auth-vir/packages/auth-vir/src/generated",
27
- "fromEnvVar": null
28
- },
29
- "config": {
30
- "engineType": "client",
31
- "moduleFormat": "esm"
32
- },
33
- "binaryTargets": [
34
- {
35
- "fromEnvVar": null,
36
- "value": "darwin-arm64",
37
- "native": true
38
- }
39
- ],
40
- "previewFeatures": [
41
- "relationJoins",
42
- "strictUndefinedChecks"
43
- ],
44
- "sourceFilePath": "/Users/electrovir/repos/electrovir/auth-vir/packages/auth-vir/test-files/schema.prisma",
45
- "isCustomOutput": true
46
- },
47
- "relativePath": "../../test-files",
48
- "clientVersion": "6.19.2",
49
- "engineVersion": "c2990dca591cba766e3b7ef5d9e8a84796e47ab7",
50
- "datasourceNames": [
51
- "db"
19
+ "previewFeatures": [
20
+ "relationJoins",
21
+ "strictUndefinedChecks"
52
22
  ],
23
+ "clientVersion": "7.9.0",
24
+ "engineVersion": "e922089b7d7502aff4249d5da3420f6fa55fc6ad",
53
25
  "activeProvider": "postgresql",
54
- "postinstall": false,
55
- "inlineDatasources": {
56
- "db": {
57
- "url": {
58
- "fromEnvVar": "DATABASE_URL",
59
- "value": null
60
- }
61
- }
62
- },
63
- "inlineSchema": "generator jsClient {\n provider = \"prisma-client\"\n previewFeatures = [\"strictUndefinedChecks\", \"relationJoins\"]\n output = \"../src/generated\"\n engineType = \"client\"\n moduleFormat = \"esm\"\n}\n\ngenerator shapes {\n provider = \"prisma-shapes\"\n output = \"../src/generated\"\n}\n\ngenerator stringDates {\n provider = \"prisma-string-dates\"\n output = \"../src/generated\"\n}\n\ngenerator brandedFields {\n provider = \"prisma-branded-fields\"\n output = \"../src/generated\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nmodel User {\n id String @id @default(cuid(2))\n createdAt DateTime @default(now())\n updatedAt DateTime @default(now()) @updatedAt\n\n name String\n}\n",
64
- "inlineSchemaHash": "23208c8e58615c00e5101cfaaa5341ce46c109a1169d3aea10dae8caa3594dcc",
65
- "copyEngine": true,
26
+ "inlineSchema": "generator jsClient {\n provider = \"prisma-client\"\n previewFeatures = [\"strictUndefinedChecks\", \"relationJoins\"]\n output = \"../src/generated\"\n engineType = \"client\"\n moduleFormat = \"esm\"\n}\n\ngenerator shapes {\n provider = \"prisma-shapes\"\n output = \"../src/generated\"\n}\n\ngenerator stringDates {\n provider = \"prisma-string-dates\"\n output = \"../src/generated\"\n}\n\ngenerator brandedFields {\n provider = \"prisma-branded-fields\"\n output = \"../src/generated\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n}\n\nmodel User {\n id String @id @default(cuid(2))\n createdAt DateTime @default(now())\n updatedAt DateTime @default(now()) @updatedAt\n\n name String\n}\n",
66
27
  "runtimeDataModel": {
67
28
  "models": {},
68
29
  "enums": {},
69
30
  "types": {}
70
31
  },
71
- "dirname": ""
32
+ "parameterizationSchema": {
33
+ "strings": [],
34
+ "graph": ""
35
+ }
72
36
  }
73
37
 
74
38
  config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}")
75
- config.engineWasm = undefined
39
+ config.parameterizationSchema = {
40
+ strings: JSON.parse("[\"where\",\"User.findUnique\",\"User.findUniqueOrThrow\",\"orderBy\",\"cursor\",\"User.findFirst\",\"User.findFirstOrThrow\",\"User.findMany\",\"data\",\"User.createOne\",\"User.createMany\",\"User.createManyAndReturn\",\"User.updateOne\",\"User.updateMany\",\"User.updateManyAndReturn\",\"create\",\"update\",\"User.upsertOne\",\"User.deleteOne\",\"User.deleteMany\",\"having\",\"_count\",\"_min\",\"_max\",\"User.groupBy\",\"User.aggregate\",\"AND\",\"OR\",\"NOT\",\"id\",\"createdAt\",\"updatedAt\",\"name\",\"equals\",\"in\",\"notIn\",\"lt\",\"lte\",\"gt\",\"gte\",\"not\",\"contains\",\"startsWith\",\"endsWith\",\"set\"]"),
41
+ graph: "KQkQBxoAACIAMBsAAAQAEBwAACIAMB0BAAAAAR5AACQAIR9AACQAISABACMAIQEAAAABACABAAAAAQAgBxoAACIAMBsAAAQAEBwAACIAMB0BACMAIR5AACQAIR9AACQAISABACMAIQADAAAABAAgAwAABQAwBAAAAQAgAwAAAAQAIAMAAAUAMAQAAAEAIAMAAAAEACADAAAFADAEAAABACAEHQEAAAABHkAAAAABH0AAAAABIAEAAAABAQgAAAkAIAQdAQAAAAEeQAAAAAEfQAAAAAEgAQAAAAEBCAAACwAwAQgAAAsAMAQdAQAoACEeQAApACEfQAApACEgAQAoACECAAAAAQAgCAAADgAgBB0BACgAIR5AACkAIR9AACkAISABACgAIQIAAAAEACAIAAAQACACAAAABAAgCAAAEAAgAwAAAAEAIA8AAAkAIBAAAA4AIAEAAAABACABAAAABAAgAxUAACUAIBYAACcAIBcAACYAIAcaAAAaADAbAAAXABAcAAAaADAdAQAbACEeQAAcACEfQAAcACEgAQAbACEDAAAABAAgAwAAFgAwFAAAFwAgAwAAAAQAIAMAAAUAMAQAAAEAIAcaAAAaADAbAAAXABAcAAAaADAdAQAbACEeQAAcACEfQAAcACEgAQAbACEOFQAAHgAgFgAAIQAgFwAAIQAgIQEAAAABIgEAAAAEIwEAAAAEJAEAAAABJQEAAAABJgEAAAABJwEAAAABKAEAIAAhKQEAAAABKgEAAAABKwEAAAABCxUAAB4AIBYAAB8AIBcAAB8AICFAAAAAASJAAAAABCNAAAAABCRAAAAAASVAAAAAASZAAAAAASdAAAAAAShAAB0AIQsVAAAeACAWAAAfACAXAAAfACAhQAAAAAEiQAAAAAQjQAAAAAQkQAAAAAElQAAAAAEmQAAAAAEnQAAAAAEoQAAdACEIIQIAAAABIgIAAAAEIwIAAAAEJAIAAAABJQIAAAABJgIAAAABJwIAAAABKAIAHgAhCCFAAAAAASJAAAAABCNAAAAABCRAAAAAASVAAAAAASZAAAAAASdAAAAAAShAAB8AIQ4VAAAeACAWAAAhACAXAAAhACAhAQAAAAEiAQAAAAQjAQAAAAQkAQAAAAElAQAAAAEmAQAAAAEnAQAAAAEoAQAgACEpAQAAAAEqAQAAAAErAQAAAAELIQEAAAABIgEAAAAEIwEAAAAEJAEAAAABJQEAAAABJgEAAAABJwEAAAABKAEAIQAhKQEAAAABKgEAAAABKwEAAAABBxoAACIAMBsAAAQAEBwAACIAMB0BACMAIR5AACQAIR9AACQAISABACMAIQshAQAAAAEiAQAAAAQjAQAAAAQkAQAAAAElAQAAAAEmAQAAAAEnAQAAAAEoAQAhACEpAQAAAAEqAQAAAAErAQAAAAEIIUAAAAABIkAAAAAEI0AAAAAEJEAAAAABJUAAAAABJkAAAAABJ0AAAAABKEAAHwAhAAAAASwBAAAAAQEsQAAAAAEAAAAAAxUABhYABxcACAAAAAMVAAYWAAcXAAgBAgECAwEFBgEGBwEHCAEJCgEKDAILDQMMDwENEQIOEgQREwESFAETFQIYGAUZGQk"
42
+ }
76
43
 
77
44
  async function decodeBase64AsWasm(wasmBase64: string): Promise<WebAssembly.Module> {
78
45
  const { Buffer } = await import('node:buffer')
@@ -81,14 +48,15 @@ async function decodeBase64AsWasm(wasmBase64: string): Promise<WebAssembly.Modul
81
48
  }
82
49
 
83
50
  config.compilerWasm = {
84
- getRuntime: async () => await import("@prisma/client/runtime/query_compiler_bg.postgresql.mjs"),
51
+ getRuntime: async () => await import("@prisma/client/runtime/query_compiler_fast_bg.postgresql.mjs"),
85
52
 
86
53
  getQueryCompilerWasmModule: async () => {
87
- const { wasm } = await import("@prisma/client/runtime/query_compiler_bg.postgresql.wasm-base64.mjs")
54
+ const { wasm } = await import("@prisma/client/runtime/query_compiler_fast_bg.postgresql.wasm-base64.mjs")
88
55
  return await decodeBase64AsWasm(wasm)
89
- }
90
- }
56
+ },
91
57
 
58
+ importName: "./query_compiler_fast_bg.js"
59
+ }
92
60
 
93
61
 
94
62
 
@@ -102,12 +70,14 @@ export interface PrismaClientConstructor {
102
70
  * Type-safe database client for TypeScript
103
71
  * @example
104
72
  * ```
105
- * const prisma = new PrismaClient()
73
+ * const prisma = new PrismaClient({
74
+ * adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL })
75
+ * })
106
76
  * // Fetch zero or more Users
107
77
  * const users = await prisma.user.findMany()
108
78
  * ```
109
79
  *
110
- * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
80
+ * Read more in our [docs](https://pris.ly/d/client).
111
81
  */
112
82
 
113
83
  new <
@@ -115,7 +85,7 @@ export interface PrismaClientConstructor {
115
85
  LogOpts extends LogOptions<Options> = LogOptions<Options>,
116
86
  OmitOpts extends Prisma.PrismaClientOptions['omit'] = Options extends { omit: infer U } ? U : Prisma.PrismaClientOptions['omit'],
117
87
  ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs
118
- >(options?: Prisma.Subset<Options, Prisma.PrismaClientOptions> ): PrismaClient<LogOpts, OmitOpts, ExtArgs>
88
+ >(options: Prisma.PrismaClientConstructorArgs<Options>): PrismaClient<LogOpts, OmitOpts, ExtArgs>
119
89
  }
120
90
 
121
91
  /**
@@ -124,12 +94,14 @@ export interface PrismaClientConstructor {
124
94
  * Type-safe database client for TypeScript
125
95
  * @example
126
96
  * ```
127
- * const prisma = new PrismaClient()
97
+ * const prisma = new PrismaClient({
98
+ * adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL })
99
+ * })
128
100
  * // Fetch zero or more Users
129
101
  * const users = await prisma.user.findMany()
130
102
  * ```
131
103
  *
132
- * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
104
+ * Read more in our [docs](https://pris.ly/d/client).
133
105
  */
134
106
 
135
107
  export interface PrismaClient<
@@ -158,7 +130,7 @@ export interface PrismaClient<
158
130
  * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`
159
131
  * ```
160
132
  *
161
- * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
133
+ * Read more in our [docs](https://pris.ly/d/raw-queries).
162
134
  */
163
135
  $executeRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<number>;
164
136
 
@@ -170,7 +142,7 @@ export interface PrismaClient<
170
142
  * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com')
171
143
  * ```
172
144
  *
173
- * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
145
+ * Read more in our [docs](https://pris.ly/d/raw-queries).
174
146
  */
175
147
  $executeRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<number>;
176
148
 
@@ -181,7 +153,7 @@ export interface PrismaClient<
181
153
  * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`
182
154
  * ```
183
155
  *
184
- * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
156
+ * Read more in our [docs](https://pris.ly/d/raw-queries).
185
157
  */
186
158
  $queryRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<T>;
187
159
 
@@ -193,7 +165,7 @@ export interface PrismaClient<
193
165
  * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com')
194
166
  * ```
195
167
  *
196
- * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
168
+ * Read more in our [docs](https://pris.ly/d/raw-queries).
197
169
  */
198
170
  $queryRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<T>;
199
171
 
@@ -209,13 +181,12 @@ export interface PrismaClient<
209
181
  * ])
210
182
  * ```
211
183
  *
212
- * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions).
184
+ * Read more in our [docs](https://www.prisma.io/docs/orm/prisma-client/queries/transactions).
213
185
  */
214
- $transaction<P extends Prisma.PrismaPromise<any>[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise<runtime.Types.Utils.UnwrapTuple<P>>
186
+ $transaction<P extends Prisma.PrismaPromise<any>[]>(arg: [...P], options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise<runtime.Types.Utils.UnwrapTuple<P>>
215
187
 
216
188
  $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>
217
189
 
218
-
219
190
  $extends: runtime.Types.Extensions.ExtendsHook<"extends", Prisma.TypeMapCb<OmitOpts>, ExtArgs, runtime.Types.Utils.Call<Prisma.TypeMapCb<OmitOpts>, {
220
191
  extArgs: ExtArgs
221
192
  }>>
@@ -231,7 +202,6 @@ export interface PrismaClient<
231
202
  get user(): Prisma.UserDelegate<ExtArgs, { omit: OmitOpts }>;
232
203
  }
233
204
 
234
- export function getPrismaClientClass(dirname: string): PrismaClientConstructor {
235
- config.dirname = dirname
205
+ export function getPrismaClientClass(): PrismaClientConstructor {
236
206
  return runtime.getPrismaClient(config) as unknown as PrismaClientConstructor
237
207
  }