auth-vir 5.1.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.
@@ -11,75 +11,42 @@
11
11
  */
12
12
  import * as runtime from "@prisma/client/runtime/client";
13
13
  const config = {
14
- "generator": {
15
- "name": "jsClient",
16
- "provider": {
17
- "fromEnvVar": null,
18
- "value": "prisma-client"
19
- },
20
- "output": {
21
- "value": "/Users/electrovir/repos/electrovir/auth-vir/packages/auth-vir/src/generated",
22
- "fromEnvVar": null
23
- },
24
- "config": {
25
- "engineType": "client",
26
- "moduleFormat": "esm"
27
- },
28
- "binaryTargets": [
29
- {
30
- "fromEnvVar": null,
31
- "value": "darwin-arm64",
32
- "native": true
33
- }
34
- ],
35
- "previewFeatures": [
36
- "relationJoins",
37
- "strictUndefinedChecks"
38
- ],
39
- "sourceFilePath": "/Users/electrovir/repos/electrovir/auth-vir/packages/auth-vir/test-files/schema.prisma",
40
- "isCustomOutput": true
41
- },
42
- "relativePath": "../../test-files",
43
- "clientVersion": "6.19.2",
44
- "engineVersion": "c2990dca591cba766e3b7ef5d9e8a84796e47ab7",
45
- "datasourceNames": [
46
- "db"
14
+ "previewFeatures": [
15
+ "relationJoins",
16
+ "strictUndefinedChecks"
47
17
  ],
18
+ "clientVersion": "7.9.0",
19
+ "engineVersion": "e922089b7d7502aff4249d5da3420f6fa55fc6ad",
48
20
  "activeProvider": "postgresql",
49
- "postinstall": false,
50
- "inlineDatasources": {
51
- "db": {
52
- "url": {
53
- "fromEnvVar": "DATABASE_URL",
54
- "value": null
55
- }
56
- }
57
- },
58
- "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",
59
- "inlineSchemaHash": "23208c8e58615c00e5101cfaaa5341ce46c109a1169d3aea10dae8caa3594dcc",
60
- "copyEngine": true,
21
+ "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",
61
22
  "runtimeDataModel": {
62
23
  "models": {},
63
24
  "enums": {},
64
25
  "types": {}
65
26
  },
66
- "dirname": ""
27
+ "parameterizationSchema": {
28
+ "strings": [],
29
+ "graph": ""
30
+ }
67
31
  };
68
32
  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\":{}}");
69
- config.engineWasm = undefined;
33
+ config.parameterizationSchema = {
34
+ 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\"]"),
35
+ graph: "KQkQBxoAACIAMBsAAAQAEBwAACIAMB0BAAAAAR5AACQAIR9AACQAISABACMAIQEAAAABACABAAAAAQAgBxoAACIAMBsAAAQAEBwAACIAMB0BACMAIR5AACQAIR9AACQAISABACMAIQADAAAABAAgAwAABQAwBAAAAQAgAwAAAAQAIAMAAAUAMAQAAAEAIAMAAAAEACADAAAFADAEAAABACAEHQEAAAABHkAAAAABH0AAAAABIAEAAAABAQgAAAkAIAQdAQAAAAEeQAAAAAEfQAAAAAEgAQAAAAEBCAAACwAwAQgAAAsAMAQdAQAoACEeQAApACEfQAApACEgAQAoACECAAAAAQAgCAAADgAgBB0BACgAIR5AACkAIR9AACkAISABACgAIQIAAAAEACAIAAAQACACAAAABAAgCAAAEAAgAwAAAAEAIA8AAAkAIBAAAA4AIAEAAAABACABAAAABAAgAxUAACUAIBYAACcAIBcAACYAIAcaAAAaADAbAAAXABAcAAAaADAdAQAbACEeQAAcACEfQAAcACEgAQAbACEDAAAABAAgAwAAFgAwFAAAFwAgAwAAAAQAIAMAAAUAMAQAAAEAIAcaAAAaADAbAAAXABAcAAAaADAdAQAbACEeQAAcACEfQAAcACEgAQAbACEOFQAAHgAgFgAAIQAgFwAAIQAgIQEAAAABIgEAAAAEIwEAAAAEJAEAAAABJQEAAAABJgEAAAABJwEAAAABKAEAIAAhKQEAAAABKgEAAAABKwEAAAABCxUAAB4AIBYAAB8AIBcAAB8AICFAAAAAASJAAAAABCNAAAAABCRAAAAAASVAAAAAASZAAAAAASdAAAAAAShAAB0AIQsVAAAeACAWAAAfACAXAAAfACAhQAAAAAEiQAAAAAQjQAAAAAQkQAAAAAElQAAAAAEmQAAAAAEnQAAAAAEoQAAdACEIIQIAAAABIgIAAAAEIwIAAAAEJAIAAAABJQIAAAABJgIAAAABJwIAAAABKAIAHgAhCCFAAAAAASJAAAAABCNAAAAABCRAAAAAASVAAAAAASZAAAAAASdAAAAAAShAAB8AIQ4VAAAeACAWAAAhACAXAAAhACAhAQAAAAEiAQAAAAQjAQAAAAQkAQAAAAElAQAAAAEmAQAAAAEnAQAAAAEoAQAgACEpAQAAAAEqAQAAAAErAQAAAAELIQEAAAABIgEAAAAEIwEAAAAEJAEAAAABJQEAAAABJgEAAAABJwEAAAABKAEAIQAhKQEAAAABKgEAAAABKwEAAAABBxoAACIAMBsAAAQAEBwAACIAMB0BACMAIR5AACQAIR9AACQAISABACMAIQshAQAAAAEiAQAAAAQjAQAAAAQkAQAAAAElAQAAAAEmAQAAAAEnAQAAAAEoAQAhACEpAQAAAAEqAQAAAAErAQAAAAEIIUAAAAABIkAAAAAEI0AAAAAEJEAAAAABJUAAAAABJkAAAAABJ0AAAAABKEAAHwAhAAAAASwBAAAAAQEsQAAAAAEAAAAAAxUABhYABxcACAAAAAMVAAYWAAcXAAgBAgECAwEFBgEGBwEHCAEJCgEKDAILDQMMDwENEQIOEgQREwESFAETFQIYGAUZGQk"
36
+ };
70
37
  async function decodeBase64AsWasm(wasmBase64) {
71
38
  const { Buffer } = await import('node:buffer');
72
39
  const wasmArray = Buffer.from(wasmBase64, 'base64');
73
40
  return new WebAssembly.Module(wasmArray);
74
41
  }
75
42
  config.compilerWasm = {
76
- getRuntime: async () => await import("@prisma/client/runtime/query_compiler_bg.postgresql.mjs"),
43
+ getRuntime: async () => await import("@prisma/client/runtime/query_compiler_fast_bg.postgresql.mjs"),
77
44
  getQueryCompilerWasmModule: async () => {
78
- const { wasm } = await import("@prisma/client/runtime/query_compiler_bg.postgresql.wasm-base64.mjs");
45
+ const { wasm } = await import("@prisma/client/runtime/query_compiler_fast_bg.postgresql.wasm-base64.mjs");
79
46
  return await decodeBase64AsWasm(wasm);
80
- }
47
+ },
48
+ importName: "./query_compiler_fast_bg.js"
81
49
  };
82
- export function getPrismaClientClass(dirname) {
83
- config.dirname = dirname;
50
+ export function getPrismaClientClass() {
84
51
  return runtime.getPrismaClient(config);
85
52
  }
@@ -37,13 +37,6 @@ export declare const skip: runtime.Types.Skip;
37
37
  export declare const Decimal: typeof runtime.Decimal;
38
38
  export type Decimal = runtime.Decimal;
39
39
  export type DecimalJsLike = runtime.DecimalJsLike;
40
- /**
41
- * Metrics
42
- */
43
- export type Metrics = runtime.Metrics;
44
- export type Metric<T> = runtime.Metric<T>;
45
- export type MetricHistogram = runtime.MetricHistogram;
46
- export type MetricHistogramBucket = runtime.MetricHistogramBucket;
47
40
  /**
48
41
  * Extensions
49
42
  */
@@ -58,8 +51,8 @@ export type PrismaVersion = {
58
51
  engine: string;
59
52
  };
60
53
  /**
61
- * Prisma Client JS version: 6.19.2
62
- * Query Engine version: c2990dca591cba766e3b7ef5d9e8a84796e47ab7
54
+ * Prisma Client JS version: 7.9.0
55
+ * Query Engine version: e922089b7d7502aff4249d5da3420f6fa55fc6ad
63
56
  */
64
57
  export declare const prismaVersion: PrismaVersion;
65
58
  /**
@@ -73,43 +66,28 @@ export type InputJsonObject = runtime.InputJsonObject;
73
66
  export type InputJsonArray = runtime.InputJsonArray;
74
67
  export type InputJsonValue = runtime.InputJsonValue;
75
68
  export declare const NullTypes: {
76
- DbNull: (new (secret: never) => typeof runtime.objectEnumValues.instances.DbNull);
77
- JsonNull: (new (secret: never) => typeof runtime.objectEnumValues.instances.JsonNull);
78
- AnyNull: (new (secret: never) => typeof runtime.objectEnumValues.instances.AnyNull);
69
+ DbNull: (new (secret: never) => typeof runtime.DbNull);
70
+ JsonNull: (new (secret: never) => typeof runtime.JsonNull);
71
+ AnyNull: (new (secret: never) => typeof runtime.AnyNull);
79
72
  };
80
73
  /**
81
74
  * Helper for filtering JSON entries that have `null` on the database (empty on the db)
82
75
  *
83
76
  * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
84
77
  */
85
- export declare const DbNull: {
86
- "__#private@#private": any;
87
- _getNamespace(): string;
88
- _getName(): string;
89
- toString(): string;
90
- };
78
+ export declare const DbNull: runtime.DbNullClass;
91
79
  /**
92
80
  * Helper for filtering JSON entries that have JSON `null` values (not empty on the db)
93
81
  *
94
82
  * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
95
83
  */
96
- export declare const JsonNull: {
97
- "__#private@#private": any;
98
- _getNamespace(): string;
99
- _getName(): string;
100
- toString(): string;
101
- };
84
+ export declare const JsonNull: runtime.JsonNullClass;
102
85
  /**
103
86
  * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull`
104
87
  *
105
88
  * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
106
89
  */
107
- export declare const AnyNull: {
108
- "__#private@#private": any;
109
- _getNamespace(): string;
110
- _getName(): string;
111
- toString(): string;
112
- };
90
+ export declare const AnyNull: runtime.AnyNullClass;
113
91
  type SelectAndInclude = {
114
92
  select: any;
115
93
  include: any;
@@ -132,6 +110,19 @@ export type Enumerable<T> = T | Array<T>;
132
110
  export type Subset<T, U> = {
133
111
  [key in keyof T]: key extends keyof U ? T[key] : never;
134
112
  };
113
+ /**
114
+ * Resolved type of the argument passed to the `PrismaClient` constructor.
115
+ *
116
+ * When called without a narrower options type (the common case), this resolves
117
+ * to `PrismaClientOptions` directly, which produces a clear TypeScript error
118
+ * message (`not assignable to parameter of type 'PrismaClientOptions'`) when
119
+ * the argument is missing or incomplete. When the user supplies a narrower
120
+ * options type (e.g. via a literal), it falls back to `Subset` to keep
121
+ * filtering out unknown properties.
122
+ */
123
+ export type PrismaClientConstructorArgs<Options extends PrismaClientOptions> = [
124
+ PrismaClientOptions
125
+ ] extends [Options] ? PrismaClientOptions : Subset<Options, PrismaClientOptions>;
135
126
  /**
136
127
  * SelectSubset
137
128
  * @desc From `T` pick properties that exist in `U`. Simple version of Intersection.
@@ -154,7 +145,7 @@ type Without<T, U> = {
154
145
  * XOR is needed to have a real mutually exclusive union type
155
146
  * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types
156
147
  */
157
- export type XOR<T, U> = T extends object ? U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : U : T;
148
+ export type XOR<T, U> = T extends object ? U extends object ? ((Without<T, U> & U) | (Without<U, T> & T)) & object : U : T;
158
149
  /**
159
150
  * Is T a Record?
160
151
  */
@@ -438,24 +429,13 @@ export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel,
438
429
  export type BatchPayload = {
439
430
  count: number;
440
431
  };
441
- export type Datasource = {
442
- url?: string;
443
- };
444
- export type Datasources = {
445
- db?: Datasource;
446
- };
447
432
  export declare const defineExtension: runtime.Types.Extensions.ExtendsHook<"define", TypeMapCb, runtime.Types.Extensions.DefaultArgs>;
448
433
  export type DefaultPrismaClient = PrismaClient;
449
434
  export type ErrorFormat = 'pretty' | 'colorless' | 'minimal';
450
- export interface PrismaClientOptions {
451
- /**
452
- * Overwrites the datasource url from your schema.prisma file
453
- */
454
- datasources?: Datasources;
455
- /**
456
- * Overwrites the datasource url from your schema.prisma file
457
- */
458
- datasourceUrl?: string;
435
+ /**
436
+ * Options common to all variants of `PrismaClientOptions`, regardless of whether you connect to your database through a driver adapter or through Prisma Accelerate.
437
+ */
438
+ export interface PrismaClientBaseOptions {
459
439
  /**
460
440
  * @default "colorless"
461
441
  */
@@ -482,7 +462,7 @@ export interface PrismaClientOptions {
482
462
  * { emit: 'stdout', level: 'error' }
483
463
  *
484
464
  * ```
485
- * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option).
465
+ * Read more in our [docs](https://pris.ly/d/logging).
486
466
  */
487
467
  log?: (LogLevel | LogDefinition)[];
488
468
  /**
@@ -495,10 +475,6 @@ export interface PrismaClientOptions {
495
475
  timeout?: number;
496
476
  isolationLevel?: TransactionIsolationLevel;
497
477
  };
498
- /**
499
- * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`
500
- */
501
- adapter?: runtime.SqlDriverAdapterFactory | null;
502
478
  /**
503
479
  * Global configuration for omitting model fields by default.
504
480
  *
@@ -514,7 +490,85 @@ export interface PrismaClientOptions {
514
490
  * ```
515
491
  */
516
492
  omit?: GlobalOmitConfig;
493
+ /**
494
+ * SQL commenter plugins that add metadata to SQL queries as comments.
495
+ * Comments follow the sqlcommenter format: https://google.github.io/sqlcommenter/
496
+ *
497
+ * @example
498
+ * ```
499
+ * const prisma = new PrismaClient({
500
+ * adapter,
501
+ * comments: [
502
+ * traceContext(),
503
+ * queryInsights(),
504
+ * ],
505
+ * })
506
+ * ```
507
+ */
508
+ comments?: runtime.SqlCommenterPlugin[];
509
+ /**
510
+ * Optional maximum size for the query plan cache. If not provided, a default size will be used.
511
+ * A value of `0` can be used to disable the cache entirely. A higher cache size can improve
512
+ * performance for applications that execute a large number of unique queries, while a smaller
513
+ * cache size can reduce memory usage.
514
+ *
515
+ * @example
516
+ * ```
517
+ * const prisma = new PrismaClient({
518
+ * adapter,
519
+ * queryPlanCacheMaxSize: 100,
520
+ * })
521
+ * ```
522
+ */
523
+ queryPlanCacheMaxSize?: number;
524
+ }
525
+ /**
526
+ * `PrismaClient` options for connecting to your database through Prisma Accelerate instead of a driver adapter.
527
+ *
528
+ * Learn more: https://pris.ly/d/accelerate
529
+ */
530
+ export interface PrismaClientOptionsWithAccelerateUrl extends PrismaClientBaseOptions {
531
+ /**
532
+ * The Prisma Accelerate connection URL. Use this option to connect to your database through Prisma Accelerate instead of using a driver adapter to connect directly.
533
+ *
534
+ * Learn more: https://pris.ly/d/accelerate
535
+ */
536
+ accelerateUrl: string;
537
+ adapter?: never;
538
+ }
539
+ /**
540
+ * `PrismaClient` options for connecting to your database through a driver adapter. This is the common case in Prisma 7.
541
+ *
542
+ * Learn more: https://pris.ly/d/driver-adapters
543
+ */
544
+ export interface PrismaClientOptionsWithAdapter extends PrismaClientBaseOptions {
545
+ /**
546
+ * A driver adapter that PrismaClient uses to connect to your database, such as the ones provided by `@prisma/adapter-pg`, `@prisma/adapter-libsql`, `@prisma/adapter-planetscale`, etc.
547
+ *
548
+ * A driver adapter is **required** unless you connect to your database through Prisma Accelerate (in which case use `accelerateUrl` instead).
549
+ *
550
+ * Learn more: https://pris.ly/d/driver-adapters
551
+ *
552
+ * @example
553
+ * ```ts
554
+ * import { PrismaPg } from '@prisma/adapter-pg'
555
+ * import { PrismaClient } from './generated/prisma/client'
556
+ *
557
+ * const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL })
558
+ * const prisma = new PrismaClient({ adapter })
559
+ * ```
560
+ */
561
+ adapter: runtime.SqlDriverAdapterFactory;
562
+ accelerateUrl?: never;
517
563
  }
564
+ /**
565
+ * Options passed to the `PrismaClient` constructor.
566
+ *
567
+ * A driver adapter (or, alternatively, a Prisma Accelerate URL) is **required**. See {@link PrismaClientOptionsWithAdapter} and {@link PrismaClientOptionsWithAccelerateUrl} for the two variants. All other properties live in {@link PrismaClientBaseOptions} and are optional.
568
+ *
569
+ * Learn more about driver adapters: https://pris.ly/d/driver-adapters
570
+ */
571
+ export type PrismaClientOptions = PrismaClientOptionsWithAccelerateUrl | PrismaClientOptionsWithAdapter;
518
572
  export type GlobalOmitConfig = {
519
573
  user?: Prisma.UserOmit;
520
574
  };
@@ -39,36 +39,36 @@ export const skip = runtime.skip;
39
39
  export const Decimal = runtime.Decimal;
40
40
  export const getExtensionContext = runtime.Extensions.getExtensionContext;
41
41
  /**
42
- * Prisma Client JS version: 6.19.2
43
- * Query Engine version: c2990dca591cba766e3b7ef5d9e8a84796e47ab7
42
+ * Prisma Client JS version: 7.9.0
43
+ * Query Engine version: e922089b7d7502aff4249d5da3420f6fa55fc6ad
44
44
  */
45
45
  export const prismaVersion = {
46
- client: "6.19.2",
47
- engine: "c2990dca591cba766e3b7ef5d9e8a84796e47ab7"
46
+ client: "7.9.0",
47
+ engine: "e922089b7d7502aff4249d5da3420f6fa55fc6ad"
48
48
  };
49
49
  export const NullTypes = {
50
- DbNull: runtime.objectEnumValues.classes.DbNull,
51
- JsonNull: runtime.objectEnumValues.classes.JsonNull,
52
- AnyNull: runtime.objectEnumValues.classes.AnyNull,
50
+ DbNull: runtime.NullTypes.DbNull,
51
+ JsonNull: runtime.NullTypes.JsonNull,
52
+ AnyNull: runtime.NullTypes.AnyNull,
53
53
  };
54
54
  /**
55
55
  * Helper for filtering JSON entries that have `null` on the database (empty on the db)
56
56
  *
57
57
  * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
58
58
  */
59
- export const DbNull = runtime.objectEnumValues.instances.DbNull;
59
+ export const DbNull = runtime.DbNull;
60
60
  /**
61
61
  * Helper for filtering JSON entries that have JSON `null` values (not empty on the db)
62
62
  *
63
63
  * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
64
64
  */
65
- export const JsonNull = runtime.objectEnumValues.instances.JsonNull;
65
+ export const JsonNull = runtime.JsonNull;
66
66
  /**
67
67
  * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull`
68
68
  *
69
69
  * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
70
70
  */
71
- export const AnyNull = runtime.objectEnumValues.instances.AnyNull;
71
+ export const AnyNull = runtime.AnyNull;
72
72
  export const ModelName = {
73
73
  User: 'User'
74
74
  };
@@ -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.1.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": {