@sqrzro/server 2.0.0-bz.47 → 2.0.0-bz.49

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.
@@ -17,8 +17,12 @@ declare const authUserTable: drizzle_orm_pg_core.PgTableWithColumns<{
17
17
  driverParam: string;
18
18
  notNull: true;
19
19
  hasDefault: false;
20
+ isPrimaryKey: true;
21
+ isAutoincrement: false;
22
+ hasRuntimeDefault: false;
20
23
  enumValues: [string, ...string[]];
21
24
  baseColumn: never;
25
+ generated: undefined;
22
26
  }, {}, {}>;
23
27
  email: drizzle_orm_pg_core.PgColumn<{
24
28
  name: "email";
@@ -29,8 +33,12 @@ declare const authUserTable: drizzle_orm_pg_core.PgTableWithColumns<{
29
33
  driverParam: string;
30
34
  notNull: true;
31
35
  hasDefault: false;
36
+ isPrimaryKey: false;
37
+ isAutoincrement: false;
38
+ hasRuntimeDefault: false;
32
39
  enumValues: [string, ...string[]];
33
40
  baseColumn: never;
41
+ generated: undefined;
34
42
  }, {}, {}>;
35
43
  password: drizzle_orm_pg_core.PgColumn<{
36
44
  name: "password";
@@ -41,8 +49,12 @@ declare const authUserTable: drizzle_orm_pg_core.PgTableWithColumns<{
41
49
  driverParam: string;
42
50
  notNull: false;
43
51
  hasDefault: false;
52
+ isPrimaryKey: false;
53
+ isAutoincrement: false;
54
+ hasRuntimeDefault: false;
44
55
  enumValues: [string, ...string[]];
45
56
  baseColumn: never;
57
+ generated: undefined;
46
58
  }, {}, {}>;
47
59
  role: drizzle_orm_pg_core.PgColumn<{
48
60
  name: "role";
@@ -53,8 +65,12 @@ declare const authUserTable: drizzle_orm_pg_core.PgTableWithColumns<{
53
65
  driverParam: string | number;
54
66
  notNull: true;
55
67
  hasDefault: true;
68
+ isPrimaryKey: false;
69
+ isAutoincrement: false;
70
+ hasRuntimeDefault: false;
56
71
  enumValues: undefined;
57
72
  baseColumn: never;
73
+ generated: undefined;
58
74
  }, {}, {}>;
59
75
  };
60
76
  dialect: "pg";
@@ -73,8 +89,12 @@ declare const authSessionTable: drizzle_orm_pg_core.PgTableWithColumns<{
73
89
  driverParam: string;
74
90
  notNull: true;
75
91
  hasDefault: false;
92
+ isPrimaryKey: true;
93
+ isAutoincrement: false;
94
+ hasRuntimeDefault: false;
76
95
  enumValues: [string, ...string[]];
77
96
  baseColumn: never;
97
+ generated: undefined;
78
98
  }, {}, {}>;
79
99
  userId: drizzle_orm_pg_core.PgColumn<{
80
100
  name: "userId";
@@ -85,8 +105,12 @@ declare const authSessionTable: drizzle_orm_pg_core.PgTableWithColumns<{
85
105
  driverParam: string;
86
106
  notNull: true;
87
107
  hasDefault: false;
108
+ isPrimaryKey: false;
109
+ isAutoincrement: false;
110
+ hasRuntimeDefault: false;
88
111
  enumValues: [string, ...string[]];
89
112
  baseColumn: never;
113
+ generated: undefined;
90
114
  }, {}, {}>;
91
115
  scope: drizzle_orm_pg_core.PgColumn<{
92
116
  name: "scope";
@@ -97,8 +121,12 @@ declare const authSessionTable: drizzle_orm_pg_core.PgTableWithColumns<{
97
121
  driverParam: string;
98
122
  notNull: true;
99
123
  hasDefault: true;
124
+ isPrimaryKey: false;
125
+ isAutoincrement: false;
126
+ hasRuntimeDefault: false;
100
127
  enumValues: ["ANON", "MFA", "AUTHED"];
101
128
  baseColumn: never;
129
+ generated: undefined;
102
130
  }, {}, {}>;
103
131
  expiresAt: drizzle_orm_pg_core.PgColumn<{
104
132
  name: "expiresAt";
@@ -109,8 +137,12 @@ declare const authSessionTable: drizzle_orm_pg_core.PgTableWithColumns<{
109
137
  driverParam: string;
110
138
  notNull: true;
111
139
  hasDefault: false;
140
+ isPrimaryKey: false;
141
+ isAutoincrement: false;
142
+ hasRuntimeDefault: false;
112
143
  enumValues: undefined;
113
144
  baseColumn: never;
145
+ generated: undefined;
114
146
  }, {}, {}>;
115
147
  };
116
148
  dialect: "pg";
@@ -129,8 +161,12 @@ declare const authResetTable: drizzle_orm_pg_core.PgTableWithColumns<{
129
161
  driverParam: string;
130
162
  notNull: true;
131
163
  hasDefault: false;
164
+ isPrimaryKey: true;
165
+ isAutoincrement: false;
166
+ hasRuntimeDefault: false;
132
167
  enumValues: [string, ...string[]];
133
168
  baseColumn: never;
169
+ generated: undefined;
134
170
  }, {}, {}>;
135
171
  userId: drizzle_orm_pg_core.PgColumn<{
136
172
  name: "userId";
@@ -141,8 +177,12 @@ declare const authResetTable: drizzle_orm_pg_core.PgTableWithColumns<{
141
177
  driverParam: string;
142
178
  notNull: true;
143
179
  hasDefault: false;
180
+ isPrimaryKey: false;
181
+ isAutoincrement: false;
182
+ hasRuntimeDefault: false;
144
183
  enumValues: [string, ...string[]];
145
184
  baseColumn: never;
185
+ generated: undefined;
146
186
  }, {}, {}>;
147
187
  expiresAt: drizzle_orm_pg_core.PgColumn<{
148
188
  name: "expiresAt";
@@ -153,8 +193,12 @@ declare const authResetTable: drizzle_orm_pg_core.PgTableWithColumns<{
153
193
  driverParam: string;
154
194
  notNull: true;
155
195
  hasDefault: false;
196
+ isPrimaryKey: false;
197
+ isAutoincrement: false;
198
+ hasRuntimeDefault: false;
156
199
  enumValues: undefined;
157
200
  baseColumn: never;
201
+ generated: undefined;
158
202
  }, {}, {}>;
159
203
  };
160
204
  dialect: "pg";
@@ -173,8 +217,12 @@ declare const authMFATable: drizzle_orm_pg_core.PgTableWithColumns<{
173
217
  driverParam: string;
174
218
  notNull: true;
175
219
  hasDefault: false;
220
+ isPrimaryKey: true;
221
+ isAutoincrement: false;
222
+ hasRuntimeDefault: false;
176
223
  enumValues: [string, ...string[]];
177
224
  baseColumn: never;
225
+ generated: undefined;
178
226
  }, {}, {}>;
179
227
  name: drizzle_orm_pg_core.PgColumn<{
180
228
  name: "name";
@@ -185,8 +233,12 @@ declare const authMFATable: drizzle_orm_pg_core.PgTableWithColumns<{
185
233
  driverParam: string;
186
234
  notNull: true;
187
235
  hasDefault: false;
236
+ isPrimaryKey: false;
237
+ isAutoincrement: false;
238
+ hasRuntimeDefault: false;
188
239
  enumValues: [string, ...string[]];
189
240
  baseColumn: never;
241
+ generated: undefined;
190
242
  }, {}, {}>;
191
243
  userId: drizzle_orm_pg_core.PgColumn<{
192
244
  name: "userId";
@@ -197,8 +249,12 @@ declare const authMFATable: drizzle_orm_pg_core.PgTableWithColumns<{
197
249
  driverParam: string;
198
250
  notNull: true;
199
251
  hasDefault: false;
252
+ isPrimaryKey: false;
253
+ isAutoincrement: false;
254
+ hasRuntimeDefault: false;
200
255
  enumValues: [string, ...string[]];
201
256
  baseColumn: never;
257
+ generated: undefined;
202
258
  }, {}, {}>;
203
259
  type: drizzle_orm_pg_core.PgColumn<{
204
260
  name: "type";
@@ -209,8 +265,12 @@ declare const authMFATable: drizzle_orm_pg_core.PgTableWithColumns<{
209
265
  driverParam: string;
210
266
  notNull: true;
211
267
  hasDefault: true;
268
+ isPrimaryKey: false;
269
+ isAutoincrement: false;
270
+ hasRuntimeDefault: false;
212
271
  enumValues: ["TOTP", "HARDWARE"];
213
272
  baseColumn: never;
273
+ generated: undefined;
214
274
  }, {}, {}>;
215
275
  secret: drizzle_orm_pg_core.PgColumn<{
216
276
  name: "secret";
@@ -221,8 +281,12 @@ declare const authMFATable: drizzle_orm_pg_core.PgTableWithColumns<{
221
281
  driverParam: string;
222
282
  notNull: true;
223
283
  hasDefault: false;
284
+ isPrimaryKey: false;
285
+ isAutoincrement: false;
286
+ hasRuntimeDefault: false;
224
287
  enumValues: [string, ...string[]];
225
288
  baseColumn: never;
289
+ generated: undefined;
226
290
  }, {}, {}>;
227
291
  verifiedAt: drizzle_orm_pg_core.PgColumn<{
228
292
  name: "verifiedAt";
@@ -233,8 +297,12 @@ declare const authMFATable: drizzle_orm_pg_core.PgTableWithColumns<{
233
297
  driverParam: string;
234
298
  notNull: false;
235
299
  hasDefault: false;
300
+ isPrimaryKey: false;
301
+ isAutoincrement: false;
302
+ hasRuntimeDefault: false;
236
303
  enumValues: undefined;
237
304
  baseColumn: never;
305
+ generated: undefined;
238
306
  }, {}, {}>;
239
307
  };
240
308
  dialect: "pg";
@@ -253,8 +321,12 @@ declare const authClientTable: drizzle_orm_pg_core.PgTableWithColumns<{
253
321
  driverParam: string;
254
322
  notNull: true;
255
323
  hasDefault: false;
324
+ isPrimaryKey: true;
325
+ isAutoincrement: false;
326
+ hasRuntimeDefault: false;
256
327
  enumValues: [string, ...string[]];
257
328
  baseColumn: never;
329
+ generated: undefined;
258
330
  }, {}, {}>;
259
331
  alias: drizzle_orm_pg_core.PgColumn<{
260
332
  name: "alias";
@@ -265,8 +337,12 @@ declare const authClientTable: drizzle_orm_pg_core.PgTableWithColumns<{
265
337
  driverParam: string;
266
338
  notNull: true;
267
339
  hasDefault: false;
340
+ isPrimaryKey: false;
341
+ isAutoincrement: false;
342
+ hasRuntimeDefault: false;
268
343
  enumValues: [string, ...string[]];
269
344
  baseColumn: never;
345
+ generated: undefined;
270
346
  }, {}, {}>;
271
347
  secret: drizzle_orm_pg_core.PgColumn<{
272
348
  name: "secret";
@@ -277,8 +353,12 @@ declare const authClientTable: drizzle_orm_pg_core.PgTableWithColumns<{
277
353
  driverParam: string;
278
354
  notNull: true;
279
355
  hasDefault: false;
356
+ isPrimaryKey: false;
357
+ isAutoincrement: false;
358
+ hasRuntimeDefault: false;
280
359
  enumValues: [string, ...string[]];
281
360
  baseColumn: never;
361
+ generated: undefined;
282
362
  }, {}, {}>;
283
363
  };
284
364
  dialect: "pg";
@@ -17,8 +17,12 @@ declare const authUserTable: drizzle_orm_pg_core.PgTableWithColumns<{
17
17
  driverParam: string;
18
18
  notNull: true;
19
19
  hasDefault: false;
20
+ isPrimaryKey: true;
21
+ isAutoincrement: false;
22
+ hasRuntimeDefault: false;
20
23
  enumValues: [string, ...string[]];
21
24
  baseColumn: never;
25
+ generated: undefined;
22
26
  }, {}, {}>;
23
27
  email: drizzle_orm_pg_core.PgColumn<{
24
28
  name: "email";
@@ -29,8 +33,12 @@ declare const authUserTable: drizzle_orm_pg_core.PgTableWithColumns<{
29
33
  driverParam: string;
30
34
  notNull: true;
31
35
  hasDefault: false;
36
+ isPrimaryKey: false;
37
+ isAutoincrement: false;
38
+ hasRuntimeDefault: false;
32
39
  enumValues: [string, ...string[]];
33
40
  baseColumn: never;
41
+ generated: undefined;
34
42
  }, {}, {}>;
35
43
  password: drizzle_orm_pg_core.PgColumn<{
36
44
  name: "password";
@@ -41,8 +49,12 @@ declare const authUserTable: drizzle_orm_pg_core.PgTableWithColumns<{
41
49
  driverParam: string;
42
50
  notNull: false;
43
51
  hasDefault: false;
52
+ isPrimaryKey: false;
53
+ isAutoincrement: false;
54
+ hasRuntimeDefault: false;
44
55
  enumValues: [string, ...string[]];
45
56
  baseColumn: never;
57
+ generated: undefined;
46
58
  }, {}, {}>;
47
59
  role: drizzle_orm_pg_core.PgColumn<{
48
60
  name: "role";
@@ -53,8 +65,12 @@ declare const authUserTable: drizzle_orm_pg_core.PgTableWithColumns<{
53
65
  driverParam: string | number;
54
66
  notNull: true;
55
67
  hasDefault: true;
68
+ isPrimaryKey: false;
69
+ isAutoincrement: false;
70
+ hasRuntimeDefault: false;
56
71
  enumValues: undefined;
57
72
  baseColumn: never;
73
+ generated: undefined;
58
74
  }, {}, {}>;
59
75
  };
60
76
  dialect: "pg";
@@ -73,8 +89,12 @@ declare const authSessionTable: drizzle_orm_pg_core.PgTableWithColumns<{
73
89
  driverParam: string;
74
90
  notNull: true;
75
91
  hasDefault: false;
92
+ isPrimaryKey: true;
93
+ isAutoincrement: false;
94
+ hasRuntimeDefault: false;
76
95
  enumValues: [string, ...string[]];
77
96
  baseColumn: never;
97
+ generated: undefined;
78
98
  }, {}, {}>;
79
99
  userId: drizzle_orm_pg_core.PgColumn<{
80
100
  name: "userId";
@@ -85,8 +105,12 @@ declare const authSessionTable: drizzle_orm_pg_core.PgTableWithColumns<{
85
105
  driverParam: string;
86
106
  notNull: true;
87
107
  hasDefault: false;
108
+ isPrimaryKey: false;
109
+ isAutoincrement: false;
110
+ hasRuntimeDefault: false;
88
111
  enumValues: [string, ...string[]];
89
112
  baseColumn: never;
113
+ generated: undefined;
90
114
  }, {}, {}>;
91
115
  scope: drizzle_orm_pg_core.PgColumn<{
92
116
  name: "scope";
@@ -97,8 +121,12 @@ declare const authSessionTable: drizzle_orm_pg_core.PgTableWithColumns<{
97
121
  driverParam: string;
98
122
  notNull: true;
99
123
  hasDefault: true;
124
+ isPrimaryKey: false;
125
+ isAutoincrement: false;
126
+ hasRuntimeDefault: false;
100
127
  enumValues: ["ANON", "MFA", "AUTHED"];
101
128
  baseColumn: never;
129
+ generated: undefined;
102
130
  }, {}, {}>;
103
131
  expiresAt: drizzle_orm_pg_core.PgColumn<{
104
132
  name: "expiresAt";
@@ -109,8 +137,12 @@ declare const authSessionTable: drizzle_orm_pg_core.PgTableWithColumns<{
109
137
  driverParam: string;
110
138
  notNull: true;
111
139
  hasDefault: false;
140
+ isPrimaryKey: false;
141
+ isAutoincrement: false;
142
+ hasRuntimeDefault: false;
112
143
  enumValues: undefined;
113
144
  baseColumn: never;
145
+ generated: undefined;
114
146
  }, {}, {}>;
115
147
  };
116
148
  dialect: "pg";
@@ -129,8 +161,12 @@ declare const authResetTable: drizzle_orm_pg_core.PgTableWithColumns<{
129
161
  driverParam: string;
130
162
  notNull: true;
131
163
  hasDefault: false;
164
+ isPrimaryKey: true;
165
+ isAutoincrement: false;
166
+ hasRuntimeDefault: false;
132
167
  enumValues: [string, ...string[]];
133
168
  baseColumn: never;
169
+ generated: undefined;
134
170
  }, {}, {}>;
135
171
  userId: drizzle_orm_pg_core.PgColumn<{
136
172
  name: "userId";
@@ -141,8 +177,12 @@ declare const authResetTable: drizzle_orm_pg_core.PgTableWithColumns<{
141
177
  driverParam: string;
142
178
  notNull: true;
143
179
  hasDefault: false;
180
+ isPrimaryKey: false;
181
+ isAutoincrement: false;
182
+ hasRuntimeDefault: false;
144
183
  enumValues: [string, ...string[]];
145
184
  baseColumn: never;
185
+ generated: undefined;
146
186
  }, {}, {}>;
147
187
  expiresAt: drizzle_orm_pg_core.PgColumn<{
148
188
  name: "expiresAt";
@@ -153,8 +193,12 @@ declare const authResetTable: drizzle_orm_pg_core.PgTableWithColumns<{
153
193
  driverParam: string;
154
194
  notNull: true;
155
195
  hasDefault: false;
196
+ isPrimaryKey: false;
197
+ isAutoincrement: false;
198
+ hasRuntimeDefault: false;
156
199
  enumValues: undefined;
157
200
  baseColumn: never;
201
+ generated: undefined;
158
202
  }, {}, {}>;
159
203
  };
160
204
  dialect: "pg";
@@ -173,8 +217,12 @@ declare const authMFATable: drizzle_orm_pg_core.PgTableWithColumns<{
173
217
  driverParam: string;
174
218
  notNull: true;
175
219
  hasDefault: false;
220
+ isPrimaryKey: true;
221
+ isAutoincrement: false;
222
+ hasRuntimeDefault: false;
176
223
  enumValues: [string, ...string[]];
177
224
  baseColumn: never;
225
+ generated: undefined;
178
226
  }, {}, {}>;
179
227
  name: drizzle_orm_pg_core.PgColumn<{
180
228
  name: "name";
@@ -185,8 +233,12 @@ declare const authMFATable: drizzle_orm_pg_core.PgTableWithColumns<{
185
233
  driverParam: string;
186
234
  notNull: true;
187
235
  hasDefault: false;
236
+ isPrimaryKey: false;
237
+ isAutoincrement: false;
238
+ hasRuntimeDefault: false;
188
239
  enumValues: [string, ...string[]];
189
240
  baseColumn: never;
241
+ generated: undefined;
190
242
  }, {}, {}>;
191
243
  userId: drizzle_orm_pg_core.PgColumn<{
192
244
  name: "userId";
@@ -197,8 +249,12 @@ declare const authMFATable: drizzle_orm_pg_core.PgTableWithColumns<{
197
249
  driverParam: string;
198
250
  notNull: true;
199
251
  hasDefault: false;
252
+ isPrimaryKey: false;
253
+ isAutoincrement: false;
254
+ hasRuntimeDefault: false;
200
255
  enumValues: [string, ...string[]];
201
256
  baseColumn: never;
257
+ generated: undefined;
202
258
  }, {}, {}>;
203
259
  type: drizzle_orm_pg_core.PgColumn<{
204
260
  name: "type";
@@ -209,8 +265,12 @@ declare const authMFATable: drizzle_orm_pg_core.PgTableWithColumns<{
209
265
  driverParam: string;
210
266
  notNull: true;
211
267
  hasDefault: true;
268
+ isPrimaryKey: false;
269
+ isAutoincrement: false;
270
+ hasRuntimeDefault: false;
212
271
  enumValues: ["TOTP", "HARDWARE"];
213
272
  baseColumn: never;
273
+ generated: undefined;
214
274
  }, {}, {}>;
215
275
  secret: drizzle_orm_pg_core.PgColumn<{
216
276
  name: "secret";
@@ -221,8 +281,12 @@ declare const authMFATable: drizzle_orm_pg_core.PgTableWithColumns<{
221
281
  driverParam: string;
222
282
  notNull: true;
223
283
  hasDefault: false;
284
+ isPrimaryKey: false;
285
+ isAutoincrement: false;
286
+ hasRuntimeDefault: false;
224
287
  enumValues: [string, ...string[]];
225
288
  baseColumn: never;
289
+ generated: undefined;
226
290
  }, {}, {}>;
227
291
  verifiedAt: drizzle_orm_pg_core.PgColumn<{
228
292
  name: "verifiedAt";
@@ -233,8 +297,12 @@ declare const authMFATable: drizzle_orm_pg_core.PgTableWithColumns<{
233
297
  driverParam: string;
234
298
  notNull: false;
235
299
  hasDefault: false;
300
+ isPrimaryKey: false;
301
+ isAutoincrement: false;
302
+ hasRuntimeDefault: false;
236
303
  enumValues: undefined;
237
304
  baseColumn: never;
305
+ generated: undefined;
238
306
  }, {}, {}>;
239
307
  };
240
308
  dialect: "pg";
@@ -253,8 +321,12 @@ declare const authClientTable: drizzle_orm_pg_core.PgTableWithColumns<{
253
321
  driverParam: string;
254
322
  notNull: true;
255
323
  hasDefault: false;
324
+ isPrimaryKey: true;
325
+ isAutoincrement: false;
326
+ hasRuntimeDefault: false;
256
327
  enumValues: [string, ...string[]];
257
328
  baseColumn: never;
329
+ generated: undefined;
258
330
  }, {}, {}>;
259
331
  alias: drizzle_orm_pg_core.PgColumn<{
260
332
  name: "alias";
@@ -265,8 +337,12 @@ declare const authClientTable: drizzle_orm_pg_core.PgTableWithColumns<{
265
337
  driverParam: string;
266
338
  notNull: true;
267
339
  hasDefault: false;
340
+ isPrimaryKey: false;
341
+ isAutoincrement: false;
342
+ hasRuntimeDefault: false;
268
343
  enumValues: [string, ...string[]];
269
344
  baseColumn: never;
345
+ generated: undefined;
270
346
  }, {}, {}>;
271
347
  secret: drizzle_orm_pg_core.PgColumn<{
272
348
  name: "secret";
@@ -277,8 +353,12 @@ declare const authClientTable: drizzle_orm_pg_core.PgTableWithColumns<{
277
353
  driverParam: string;
278
354
  notNull: true;
279
355
  hasDefault: false;
356
+ isPrimaryKey: false;
357
+ isAutoincrement: false;
358
+ hasRuntimeDefault: false;
280
359
  enumValues: [string, ...string[]];
281
360
  baseColumn: never;
361
+ generated: undefined;
282
362
  }, {}, {}>;
283
363
  };
284
364
  dialect: "pg";
@@ -2,11 +2,11 @@
2
2
 
3
3
  var headers = require('next/headers');
4
4
 
5
- function s(){let t=process.env.SZ_ORIGIN;if(t)return t;let r=headers.headers().get("x-origin");if(r)return r;let n=headers.headers().get("x-forwarded-proto"),e=headers.headers().get("x-forwarded-host");if(n&&e)return `${n}://${e}`;throw new Error("No origin could be determined")}function p(){let t=headers.headers().get("x-pathname");if(t)return t;throw new Error("No pathname could be determined. Please make sure middleware is being applied to the current request.")}function c(t){let r=s();if(!t)return r;let e=r.startsWith("https://")?"https://":"http://",i=`${r.replace(/^https?:\/\//u,"")}/${t}`.replace(/\/+/gu,"/");return `${e}${i}`}function a(t){return c(t)}
5
+ async function s(){let t=process.env.SZ_ORIGIN;if(t)return t;let r=(await headers.headers()).get("x-origin");if(r)return r;let n=(await headers.headers()).get("x-forwarded-proto"),e=(await headers.headers()).get("x-forwarded-host");if(n&&e)return `${n}://${e}`;throw new Error("No origin could be determined")}async function u(){let t=(await headers.headers()).get("x-pathname");if(t)return t;throw new Error("No pathname could be determined. Please make sure middleware is being applied to the current request.")}async function a(t){let r=await s();if(!t)return r;let e=r.startsWith("https://")?"https://":"http://",i=`${r.replace(/^https?:\/\//u,"")}/${t}`.replace(/\/+/gu,"/");return `${e}${i}`}async function p(t){return a(t)}
6
6
 
7
7
  exports.getOrigin = s;
8
- exports.getPathname = p;
9
- exports.getURL = a;
10
- exports.makeURL = c;
8
+ exports.getPathname = u;
9
+ exports.getURL = p;
10
+ exports.makeURL = a;
11
11
  //# sourceMappingURL=out.js.map
12
12
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/url/URLService.ts"],"names":["headers","getOrigin","envOrigin","origin","proto","host","getPathname","pathname","makeURL","protocol","cleanURL","getURL"],"mappings":"AAAA,OAAS,WAAAA,MAAe,eAkBjB,SAASC,GAAoB,CAChC,IAAMC,EAAY,QAAQ,IAAI,UAE9B,GAAIA,EACA,OAAOA,EAGX,IAAMC,EAASH,EAAQ,EAAE,IAAI,UAAU,EAEvC,GAAIG,EACA,OAAOA,EAGX,IAAMC,EAAQJ,EAAQ,EAAE,IAAI,mBAAmB,EACzCK,EAAOL,EAAQ,EAAE,IAAI,kBAAkB,EAE7C,GAAII,GAASC,EACT,MAAO,GAAGD,CAAK,MAAMC,CAAI,GAG7B,MAAM,IAAI,MAAM,+BAA+B,CACnD,CAEO,SAASC,GAAsB,CAClC,IAAMC,EAAWP,EAAQ,EAAE,IAAI,YAAY,EAE3C,GAAIO,EACA,OAAOA,EAGX,MAAM,IAAI,MACN,uGACJ,CACJ,CAUO,SAASC,EAAQD,EAA2B,CAC/C,IAAMJ,EAASF,EAAU,EAEzB,GAAI,CAACM,EACD,OAAOJ,EAKX,IAAMM,EAFWN,EAAO,WAAW,UAAU,EAEjB,WAAa,UAGnCO,EAAW,GAFaP,EAAO,QAAQ,gBAAiB,EAAE,CAEvB,IAAII,CAAQ,GAAG,QAAQ,QAAS,GAAG,EAC5E,MAAO,GAAGE,CAAQ,GAAGC,CAAQ,EACjC,CAKO,SAASC,EAAOJ,EAA2B,CAC9C,OAAOC,EAAQD,CAAQ,CAC3B","sourcesContent":["import { headers } from 'next/headers';\n\n/**\n * Uses a number of methods to determine the current origin.\n *\n * First, it checks if an `x-origin` header. This will have been set by the `handleMiddleware`\n * function, further up the chain. For more information on how it is being set, see the\n * `middleware` documentation.\n *\n * There are some situations where middleware is not being applied, such as API routes (because the\n * redirection is not necessary, and API routes handle their own authentication). In these cases,\n * this function tries to piece together the origin from the `x-forwarded-proto` and\n * `x-forwarded-host` headers.\n *\n * Finally, if the origin cannot be determined, an error is thrown.\n *\n * @returns The origin of the current request.\n */\nexport function getOrigin(): string {\n const envOrigin = process.env.SZ_ORIGIN;\n\n if (envOrigin) {\n return envOrigin;\n }\n\n const origin = headers().get('x-origin');\n\n if (origin) {\n return origin;\n }\n\n const proto = headers().get('x-forwarded-proto');\n const host = headers().get('x-forwarded-host');\n\n if (proto && host) {\n return `${proto}://${host}`;\n }\n\n throw new Error('No origin could be determined');\n}\n\nexport function getPathname(): string {\n const pathname = headers().get('x-pathname');\n\n if (pathname) {\n return pathname;\n }\n\n throw new Error(\n 'No pathname could be determined. Please make sure middleware is being applied to the current request.'\n );\n}\n\n/**\n * Builds a URL from the current origin and a given pathname. For more information on how the origin\n * is determined, see the `getOrigin` function. This function then just concatenates the origin and\n * the pathname, and performs some cleanup to ensure the URL is valid.\n *\n * @param pathname\n * @returns The URL, with the origin and pathname combined.\n */\nexport function makeURL(pathname?: string): string {\n const origin = getOrigin();\n\n if (!pathname) {\n return origin;\n }\n\n const isSecure = origin.startsWith('https://');\n\n const protocol = isSecure ? 'https://' : 'http://';\n const originWithoutProtocol = origin.replace(/^https?:\\/\\//u, '');\n\n const cleanURL = `${originWithoutProtocol}/${pathname}`.replace(/\\/+/gu, '/');\n return `${protocol}${cleanURL}`;\n}\n\n/**\n * @deprecated Use `makeURL` instead.\n */\nexport function getURL(pathname?: string): string {\n return makeURL(pathname);\n}\n"]}
1
+ {"version":3,"sources":["../../src/url/URLService.ts"],"names":["headers","getOrigin","envOrigin","origin","proto","host","getPathname","pathname","makeURL","protocol","cleanURL","getURL"],"mappings":"AAAA,OAAS,WAAAA,MAAe,eAkBxB,eAAsBC,GAA6B,CAC/C,IAAMC,EAAY,QAAQ,IAAI,UAE9B,GAAIA,EACA,OAAOA,EAGX,IAAMC,GAAU,MAAMH,EAAQ,GAAG,IAAI,UAAU,EAE/C,GAAIG,EACA,OAAOA,EAGX,IAAMC,GAAS,MAAMJ,EAAQ,GAAG,IAAI,mBAAmB,EACjDK,GAAQ,MAAML,EAAQ,GAAG,IAAI,kBAAkB,EAErD,GAAII,GAASC,EACT,MAAO,GAAGD,CAAK,MAAMC,CAAI,GAG7B,MAAM,IAAI,MAAM,+BAA+B,CACnD,CAEA,eAAsBC,GAA+B,CACjD,IAAMC,GAAY,MAAMP,EAAQ,GAAG,IAAI,YAAY,EAEnD,GAAIO,EACA,OAAOA,EAGX,MAAM,IAAI,MACN,uGACJ,CACJ,CAUA,eAAsBC,EAAQD,EAAoC,CAC9D,IAAMJ,EAAS,MAAMF,EAAU,EAE/B,GAAI,CAACM,EACD,OAAOJ,EAKX,IAAMM,EAFWN,EAAO,WAAW,UAAU,EAEjB,WAAa,UAGnCO,EAAW,GAFaP,EAAO,QAAQ,gBAAiB,EAAE,CAEvB,IAAII,CAAQ,GAAG,QAAQ,QAAS,GAAG,EAC5E,MAAO,GAAGE,CAAQ,GAAGC,CAAQ,EACjC,CAKA,eAAsBC,EAAOJ,EAAoC,CAC7D,OAAOC,EAAQD,CAAQ,CAC3B","sourcesContent":["import { headers } from 'next/headers';\n\n/**\n * Uses a number of methods to determine the current origin.\n *\n * First, it checks if an `x-origin` header. This will have been set by the `handleMiddleware`\n * function, further up the chain. For more information on how it is being set, see the\n * `middleware` documentation.\n *\n * There are some situations where middleware is not being applied, such as API routes (because the\n * redirection is not necessary, and API routes handle their own authentication). In these cases,\n * this function tries to piece together the origin from the `x-forwarded-proto` and\n * `x-forwarded-host` headers.\n *\n * Finally, if the origin cannot be determined, an error is thrown.\n *\n * @returns The origin of the current request.\n */\nexport async function getOrigin(): Promise<string> {\n const envOrigin = process.env.SZ_ORIGIN;\n\n if (envOrigin) {\n return envOrigin;\n }\n\n const origin = (await headers()).get('x-origin');\n\n if (origin) {\n return origin;\n }\n\n const proto = (await headers()).get('x-forwarded-proto');\n const host = (await headers()).get('x-forwarded-host');\n\n if (proto && host) {\n return `${proto}://${host}`;\n }\n\n throw new Error('No origin could be determined');\n}\n\nexport async function getPathname(): Promise<string> {\n const pathname = (await headers()).get('x-pathname');\n\n if (pathname) {\n return pathname;\n }\n\n throw new Error(\n 'No pathname could be determined. Please make sure middleware is being applied to the current request.'\n );\n}\n\n/**\n * Builds a URL from the current origin and a given pathname. For more information on how the origin\n * is determined, see the `getOrigin` function. This function then just concatenates the origin and\n * the pathname, and performs some cleanup to ensure the URL is valid.\n *\n * @param pathname\n * @returns The URL, with the origin and pathname combined.\n */\nexport async function makeURL(pathname?: string): Promise<string> {\n const origin = await getOrigin();\n\n if (!pathname) {\n return origin;\n }\n\n const isSecure = origin.startsWith('https://');\n\n const protocol = isSecure ? 'https://' : 'http://';\n const originWithoutProtocol = origin.replace(/^https?:\\/\\//u, '');\n\n const cleanURL = `${originWithoutProtocol}/${pathname}`.replace(/\\/+/gu, '/');\n return `${protocol}${cleanURL}`;\n}\n\n/**\n * @deprecated Use `makeURL` instead.\n */\nexport async function getURL(pathname?: string): Promise<string> {\n return makeURL(pathname);\n}\n"]}
@@ -14,8 +14,8 @@
14
14
  *
15
15
  * @returns The origin of the current request.
16
16
  */
17
- declare function getOrigin(): string;
18
- declare function getPathname(): string;
17
+ declare function getOrigin(): Promise<string>;
18
+ declare function getPathname(): Promise<string>;
19
19
  /**
20
20
  * Builds a URL from the current origin and a given pathname. For more information on how the origin
21
21
  * is determined, see the `getOrigin` function. This function then just concatenates the origin and
@@ -24,10 +24,10 @@ declare function getPathname(): string;
24
24
  * @param pathname
25
25
  * @returns The URL, with the origin and pathname combined.
26
26
  */
27
- declare function makeURL(pathname?: string): string;
27
+ declare function makeURL(pathname?: string): Promise<string>;
28
28
  /**
29
29
  * @deprecated Use `makeURL` instead.
30
30
  */
31
- declare function getURL(pathname?: string): string;
31
+ declare function getURL(pathname?: string): Promise<string>;
32
32
 
33
33
  export { getOrigin, getPathname, getURL, makeURL };
@@ -14,8 +14,8 @@
14
14
  *
15
15
  * @returns The origin of the current request.
16
16
  */
17
- declare function getOrigin(): string;
18
- declare function getPathname(): string;
17
+ declare function getOrigin(): Promise<string>;
18
+ declare function getPathname(): Promise<string>;
19
19
  /**
20
20
  * Builds a URL from the current origin and a given pathname. For more information on how the origin
21
21
  * is determined, see the `getOrigin` function. This function then just concatenates the origin and
@@ -24,10 +24,10 @@ declare function getPathname(): string;
24
24
  * @param pathname
25
25
  * @returns The URL, with the origin and pathname combined.
26
26
  */
27
- declare function makeURL(pathname?: string): string;
27
+ declare function makeURL(pathname?: string): Promise<string>;
28
28
  /**
29
29
  * @deprecated Use `makeURL` instead.
30
30
  */
31
- declare function getURL(pathname?: string): string;
31
+ declare function getURL(pathname?: string): Promise<string>;
32
32
 
33
33
  export { getOrigin, getPathname, getURL, makeURL };
package/dist/url/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { headers } from 'next/headers';
2
2
 
3
- function s(){let t=process.env.SZ_ORIGIN;if(t)return t;let r=headers().get("x-origin");if(r)return r;let n=headers().get("x-forwarded-proto"),e=headers().get("x-forwarded-host");if(n&&e)return `${n}://${e}`;throw new Error("No origin could be determined")}function p(){let t=headers().get("x-pathname");if(t)return t;throw new Error("No pathname could be determined. Please make sure middleware is being applied to the current request.")}function c(t){let r=s();if(!t)return r;let e=r.startsWith("https://")?"https://":"http://",i=`${r.replace(/^https?:\/\//u,"")}/${t}`.replace(/\/+/gu,"/");return `${e}${i}`}function a(t){return c(t)}
3
+ async function s(){let t=process.env.SZ_ORIGIN;if(t)return t;let r=(await headers()).get("x-origin");if(r)return r;let n=(await headers()).get("x-forwarded-proto"),e=(await headers()).get("x-forwarded-host");if(n&&e)return `${n}://${e}`;throw new Error("No origin could be determined")}async function u(){let t=(await headers()).get("x-pathname");if(t)return t;throw new Error("No pathname could be determined. Please make sure middleware is being applied to the current request.")}async function a(t){let r=await s();if(!t)return r;let e=r.startsWith("https://")?"https://":"http://",i=`${r.replace(/^https?:\/\//u,"")}/${t}`.replace(/\/+/gu,"/");return `${e}${i}`}async function p(t){return a(t)}
4
4
 
5
- export { s as getOrigin, p as getPathname, a as getURL, c as makeURL };
5
+ export { s as getOrigin, u as getPathname, p as getURL, a as makeURL };
6
6
  //# sourceMappingURL=out.js.map
7
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/url/URLService.ts"],"names":["headers","getOrigin","envOrigin","origin","proto","host","getPathname","pathname","makeURL","protocol","cleanURL","getURL"],"mappings":"AAAA,OAAS,WAAAA,MAAe,eAkBjB,SAASC,GAAoB,CAChC,IAAMC,EAAY,QAAQ,IAAI,UAE9B,GAAIA,EACA,OAAOA,EAGX,IAAMC,EAASH,EAAQ,EAAE,IAAI,UAAU,EAEvC,GAAIG,EACA,OAAOA,EAGX,IAAMC,EAAQJ,EAAQ,EAAE,IAAI,mBAAmB,EACzCK,EAAOL,EAAQ,EAAE,IAAI,kBAAkB,EAE7C,GAAII,GAASC,EACT,MAAO,GAAGD,CAAK,MAAMC,CAAI,GAG7B,MAAM,IAAI,MAAM,+BAA+B,CACnD,CAEO,SAASC,GAAsB,CAClC,IAAMC,EAAWP,EAAQ,EAAE,IAAI,YAAY,EAE3C,GAAIO,EACA,OAAOA,EAGX,MAAM,IAAI,MACN,uGACJ,CACJ,CAUO,SAASC,EAAQD,EAA2B,CAC/C,IAAMJ,EAASF,EAAU,EAEzB,GAAI,CAACM,EACD,OAAOJ,EAKX,IAAMM,EAFWN,EAAO,WAAW,UAAU,EAEjB,WAAa,UAGnCO,EAAW,GAFaP,EAAO,QAAQ,gBAAiB,EAAE,CAEvB,IAAII,CAAQ,GAAG,QAAQ,QAAS,GAAG,EAC5E,MAAO,GAAGE,CAAQ,GAAGC,CAAQ,EACjC,CAKO,SAASC,EAAOJ,EAA2B,CAC9C,OAAOC,EAAQD,CAAQ,CAC3B","sourcesContent":["import { headers } from 'next/headers';\n\n/**\n * Uses a number of methods to determine the current origin.\n *\n * First, it checks if an `x-origin` header. This will have been set by the `handleMiddleware`\n * function, further up the chain. For more information on how it is being set, see the\n * `middleware` documentation.\n *\n * There are some situations where middleware is not being applied, such as API routes (because the\n * redirection is not necessary, and API routes handle their own authentication). In these cases,\n * this function tries to piece together the origin from the `x-forwarded-proto` and\n * `x-forwarded-host` headers.\n *\n * Finally, if the origin cannot be determined, an error is thrown.\n *\n * @returns The origin of the current request.\n */\nexport function getOrigin(): string {\n const envOrigin = process.env.SZ_ORIGIN;\n\n if (envOrigin) {\n return envOrigin;\n }\n\n const origin = headers().get('x-origin');\n\n if (origin) {\n return origin;\n }\n\n const proto = headers().get('x-forwarded-proto');\n const host = headers().get('x-forwarded-host');\n\n if (proto && host) {\n return `${proto}://${host}`;\n }\n\n throw new Error('No origin could be determined');\n}\n\nexport function getPathname(): string {\n const pathname = headers().get('x-pathname');\n\n if (pathname) {\n return pathname;\n }\n\n throw new Error(\n 'No pathname could be determined. Please make sure middleware is being applied to the current request.'\n );\n}\n\n/**\n * Builds a URL from the current origin and a given pathname. For more information on how the origin\n * is determined, see the `getOrigin` function. This function then just concatenates the origin and\n * the pathname, and performs some cleanup to ensure the URL is valid.\n *\n * @param pathname\n * @returns The URL, with the origin and pathname combined.\n */\nexport function makeURL(pathname?: string): string {\n const origin = getOrigin();\n\n if (!pathname) {\n return origin;\n }\n\n const isSecure = origin.startsWith('https://');\n\n const protocol = isSecure ? 'https://' : 'http://';\n const originWithoutProtocol = origin.replace(/^https?:\\/\\//u, '');\n\n const cleanURL = `${originWithoutProtocol}/${pathname}`.replace(/\\/+/gu, '/');\n return `${protocol}${cleanURL}`;\n}\n\n/**\n * @deprecated Use `makeURL` instead.\n */\nexport function getURL(pathname?: string): string {\n return makeURL(pathname);\n}\n"]}
1
+ {"version":3,"sources":["../../src/url/URLService.ts"],"names":["headers","getOrigin","envOrigin","origin","proto","host","getPathname","pathname","makeURL","protocol","cleanURL","getURL"],"mappings":"AAAA,OAAS,WAAAA,MAAe,eAkBxB,eAAsBC,GAA6B,CAC/C,IAAMC,EAAY,QAAQ,IAAI,UAE9B,GAAIA,EACA,OAAOA,EAGX,IAAMC,GAAU,MAAMH,EAAQ,GAAG,IAAI,UAAU,EAE/C,GAAIG,EACA,OAAOA,EAGX,IAAMC,GAAS,MAAMJ,EAAQ,GAAG,IAAI,mBAAmB,EACjDK,GAAQ,MAAML,EAAQ,GAAG,IAAI,kBAAkB,EAErD,GAAII,GAASC,EACT,MAAO,GAAGD,CAAK,MAAMC,CAAI,GAG7B,MAAM,IAAI,MAAM,+BAA+B,CACnD,CAEA,eAAsBC,GAA+B,CACjD,IAAMC,GAAY,MAAMP,EAAQ,GAAG,IAAI,YAAY,EAEnD,GAAIO,EACA,OAAOA,EAGX,MAAM,IAAI,MACN,uGACJ,CACJ,CAUA,eAAsBC,EAAQD,EAAoC,CAC9D,IAAMJ,EAAS,MAAMF,EAAU,EAE/B,GAAI,CAACM,EACD,OAAOJ,EAKX,IAAMM,EAFWN,EAAO,WAAW,UAAU,EAEjB,WAAa,UAGnCO,EAAW,GAFaP,EAAO,QAAQ,gBAAiB,EAAE,CAEvB,IAAII,CAAQ,GAAG,QAAQ,QAAS,GAAG,EAC5E,MAAO,GAAGE,CAAQ,GAAGC,CAAQ,EACjC,CAKA,eAAsBC,EAAOJ,EAAoC,CAC7D,OAAOC,EAAQD,CAAQ,CAC3B","sourcesContent":["import { headers } from 'next/headers';\n\n/**\n * Uses a number of methods to determine the current origin.\n *\n * First, it checks if an `x-origin` header. This will have been set by the `handleMiddleware`\n * function, further up the chain. For more information on how it is being set, see the\n * `middleware` documentation.\n *\n * There are some situations where middleware is not being applied, such as API routes (because the\n * redirection is not necessary, and API routes handle their own authentication). In these cases,\n * this function tries to piece together the origin from the `x-forwarded-proto` and\n * `x-forwarded-host` headers.\n *\n * Finally, if the origin cannot be determined, an error is thrown.\n *\n * @returns The origin of the current request.\n */\nexport async function getOrigin(): Promise<string> {\n const envOrigin = process.env.SZ_ORIGIN;\n\n if (envOrigin) {\n return envOrigin;\n }\n\n const origin = (await headers()).get('x-origin');\n\n if (origin) {\n return origin;\n }\n\n const proto = (await headers()).get('x-forwarded-proto');\n const host = (await headers()).get('x-forwarded-host');\n\n if (proto && host) {\n return `${proto}://${host}`;\n }\n\n throw new Error('No origin could be determined');\n}\n\nexport async function getPathname(): Promise<string> {\n const pathname = (await headers()).get('x-pathname');\n\n if (pathname) {\n return pathname;\n }\n\n throw new Error(\n 'No pathname could be determined. Please make sure middleware is being applied to the current request.'\n );\n}\n\n/**\n * Builds a URL from the current origin and a given pathname. For more information on how the origin\n * is determined, see the `getOrigin` function. This function then just concatenates the origin and\n * the pathname, and performs some cleanup to ensure the URL is valid.\n *\n * @param pathname\n * @returns The URL, with the origin and pathname combined.\n */\nexport async function makeURL(pathname?: string): Promise<string> {\n const origin = await getOrigin();\n\n if (!pathname) {\n return origin;\n }\n\n const isSecure = origin.startsWith('https://');\n\n const protocol = isSecure ? 'https://' : 'http://';\n const originWithoutProtocol = origin.replace(/^https?:\\/\\//u, '');\n\n const cleanURL = `${originWithoutProtocol}/${pathname}`.replace(/\\/+/gu, '/');\n return `${protocol}${cleanURL}`;\n}\n\n/**\n * @deprecated Use `makeURL` instead.\n */\nexport async function getURL(pathname?: string): Promise<string> {\n return makeURL(pathname);\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sqrzro/server",
3
- "version": "2.0.0-bz.47",
3
+ "version": "2.0.0-bz.49",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -58,15 +58,16 @@
58
58
  "@sqrzro/interfaces": "bz",
59
59
  "@sqrzro/utility": "bz",
60
60
  "bcryptjs": "^2.4.3",
61
- "drizzle-orm": "^0.29.5",
61
+ "drizzle-orm": "^0.36.0",
62
62
  "joi": "^17.12.3",
63
63
  "lucia": "^3.1.1",
64
- "next": "^14.1.4",
64
+ "next": "15.0.2",
65
65
  "otplib": "^12.0.1",
66
66
  "path-to-regexp": "^6.2.1",
67
67
  "postgres": "^3.4.4",
68
68
  "qrcode": "^1.5.3",
69
- "react-dom": "^18.2.0",
69
+ "react": "rc",
70
+ "react-dom": "rc",
70
71
  "redis": "^4.6.13"
71
72
  },
72
73
  "devDependencies": {
@@ -76,7 +77,7 @@
76
77
  "@types/jest": "^29.5.12",
77
78
  "@types/node": "^22.6.1",
78
79
  "@types/qrcode": "^1.5.5",
79
- "@types/react": "^18.2.74",
80
+ "@types/react": "npm:types-react@rc",
80
81
  "@types/react-dom": "^18.2.24",
81
82
  "eslint": "^8.57.0",
82
83
  "jest": "^29.7.0",