tempest.games 0.1.13 → 0.1.15

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.
@@ -0,0 +1,4 @@
1
+ DROP INDEX IF EXISTS "users_username_index";--> statement-breakpoint
2
+ DROP INDEX IF EXISTS "users_email_index";--> statement-breakpoint
3
+ CREATE UNIQUE INDEX IF NOT EXISTS "usernameUniqueIndex" ON "users" USING btree (lower("username"));--> statement-breakpoint
4
+ CREATE UNIQUE INDEX IF NOT EXISTS "emailUniqueIndex" ON "users" USING btree (lower("email"));
@@ -0,0 +1,489 @@
1
+ {
2
+ "id": "5ba6081a-a018-47ce-be1a-d0f589bd332f",
3
+ "prevId": "fe877447-68d1-4775-b9c2-a663acce2a16",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.banishedIps": {
8
+ "name": "banishedIps",
9
+ "schema": "",
10
+ "columns": {
11
+ "ip": {
12
+ "name": "ip",
13
+ "type": "varchar(45)",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "reason": {
18
+ "name": "reason",
19
+ "type": "varchar(2048)",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "banishedAt": {
24
+ "name": "banishedAt",
25
+ "type": "timestamp with time zone",
26
+ "primaryKey": false,
27
+ "notNull": true,
28
+ "default": "now()"
29
+ },
30
+ "banishedUntil": {
31
+ "name": "banishedUntil",
32
+ "type": "timestamp with time zone",
33
+ "primaryKey": false,
34
+ "notNull": false
35
+ }
36
+ },
37
+ "indexes": {},
38
+ "foreignKeys": {},
39
+ "compositePrimaryKeys": {},
40
+ "uniqueConstraints": {},
41
+ "policies": {},
42
+ "checkConstraints": {},
43
+ "isRLSEnabled": false
44
+ },
45
+ "public.games": {
46
+ "name": "games",
47
+ "schema": "",
48
+ "columns": {
49
+ "id": {
50
+ "name": "id",
51
+ "type": "uuid",
52
+ "primaryKey": true,
53
+ "notNull": true,
54
+ "default": "gen_random_uuid()"
55
+ }
56
+ },
57
+ "indexes": {},
58
+ "foreignKeys": {},
59
+ "compositePrimaryKeys": {},
60
+ "uniqueConstraints": {},
61
+ "policies": {},
62
+ "checkConstraints": {},
63
+ "isRLSEnabled": false
64
+ },
65
+ "public.loginHistory": {
66
+ "name": "loginHistory",
67
+ "schema": "",
68
+ "columns": {
69
+ "id": {
70
+ "name": "id",
71
+ "type": "uuid",
72
+ "primaryKey": true,
73
+ "notNull": true,
74
+ "default": "gen_random_uuid()"
75
+ },
76
+ "userId": {
77
+ "name": "userId",
78
+ "type": "uuid",
79
+ "primaryKey": false,
80
+ "notNull": false
81
+ },
82
+ "loginTime": {
83
+ "name": "loginTime",
84
+ "type": "timestamp with time zone",
85
+ "primaryKey": false,
86
+ "notNull": true,
87
+ "default": "now()"
88
+ },
89
+ "ipAddress": {
90
+ "name": "ipAddress",
91
+ "type": "varchar(45)",
92
+ "primaryKey": false,
93
+ "notNull": true
94
+ },
95
+ "userAgent": {
96
+ "name": "userAgent",
97
+ "type": "varchar(1024)",
98
+ "primaryKey": false,
99
+ "notNull": false
100
+ },
101
+ "successful": {
102
+ "name": "successful",
103
+ "type": "boolean",
104
+ "primaryKey": false,
105
+ "notNull": true,
106
+ "default": false
107
+ }
108
+ },
109
+ "indexes": {},
110
+ "foreignKeys": {
111
+ "loginHistory_userId_users_id_fk": {
112
+ "name": "loginHistory_userId_users_id_fk",
113
+ "tableFrom": "loginHistory",
114
+ "tableTo": "users",
115
+ "columnsFrom": [
116
+ "userId"
117
+ ],
118
+ "columnsTo": [
119
+ "id"
120
+ ],
121
+ "onDelete": "no action",
122
+ "onUpdate": "no action"
123
+ }
124
+ },
125
+ "compositePrimaryKeys": {},
126
+ "uniqueConstraints": {},
127
+ "policies": {},
128
+ "checkConstraints": {},
129
+ "isRLSEnabled": false
130
+ },
131
+ "public.passwordResetAttempts": {
132
+ "name": "passwordResetAttempts",
133
+ "schema": "",
134
+ "columns": {
135
+ "id": {
136
+ "name": "id",
137
+ "type": "uuid",
138
+ "primaryKey": true,
139
+ "notNull": true,
140
+ "default": "gen_random_uuid()"
141
+ },
142
+ "userId": {
143
+ "name": "userId",
144
+ "type": "uuid",
145
+ "primaryKey": false,
146
+ "notNull": true
147
+ },
148
+ "requestedIp": {
149
+ "name": "requestedIp",
150
+ "type": "varchar(45)",
151
+ "primaryKey": false,
152
+ "notNull": true
153
+ },
154
+ "requestedAt": {
155
+ "name": "requestedAt",
156
+ "type": "timestamp with time zone",
157
+ "primaryKey": false,
158
+ "notNull": true,
159
+ "default": "now()"
160
+ },
161
+ "succeededIp": {
162
+ "name": "succeededIp",
163
+ "type": "varchar(45)",
164
+ "primaryKey": false,
165
+ "notNull": false
166
+ },
167
+ "succeededAt": {
168
+ "name": "succeededAt",
169
+ "type": "timestamp with time zone",
170
+ "primaryKey": false,
171
+ "notNull": false
172
+ },
173
+ "verificationMethod": {
174
+ "name": "verificationMethod",
175
+ "type": "twoFactorMethod",
176
+ "typeSchema": "public",
177
+ "primaryKey": false,
178
+ "notNull": true
179
+ }
180
+ },
181
+ "indexes": {},
182
+ "foreignKeys": {
183
+ "passwordResetAttempts_userId_users_id_fk": {
184
+ "name": "passwordResetAttempts_userId_users_id_fk",
185
+ "tableFrom": "passwordResetAttempts",
186
+ "tableTo": "users",
187
+ "columnsFrom": [
188
+ "userId"
189
+ ],
190
+ "columnsTo": [
191
+ "id"
192
+ ],
193
+ "onDelete": "no action",
194
+ "onUpdate": "no action"
195
+ }
196
+ },
197
+ "compositePrimaryKeys": {},
198
+ "uniqueConstraints": {},
199
+ "policies": {},
200
+ "checkConstraints": {},
201
+ "isRLSEnabled": false
202
+ },
203
+ "public.players": {
204
+ "name": "players",
205
+ "schema": "",
206
+ "columns": {
207
+ "userId": {
208
+ "name": "userId",
209
+ "type": "uuid",
210
+ "primaryKey": false,
211
+ "notNull": true
212
+ },
213
+ "gameId": {
214
+ "name": "gameId",
215
+ "type": "uuid",
216
+ "primaryKey": false,
217
+ "notNull": true
218
+ },
219
+ "score": {
220
+ "name": "score",
221
+ "type": "integer",
222
+ "primaryKey": false,
223
+ "notNull": true
224
+ }
225
+ },
226
+ "indexes": {},
227
+ "foreignKeys": {
228
+ "players_userId_users_id_fk": {
229
+ "name": "players_userId_users_id_fk",
230
+ "tableFrom": "players",
231
+ "tableTo": "users",
232
+ "columnsFrom": [
233
+ "userId"
234
+ ],
235
+ "columnsTo": [
236
+ "id"
237
+ ],
238
+ "onDelete": "no action",
239
+ "onUpdate": "no action"
240
+ },
241
+ "players_gameId_games_id_fk": {
242
+ "name": "players_gameId_games_id_fk",
243
+ "tableFrom": "players",
244
+ "tableTo": "games",
245
+ "columnsFrom": [
246
+ "gameId"
247
+ ],
248
+ "columnsTo": [
249
+ "id"
250
+ ],
251
+ "onDelete": "no action",
252
+ "onUpdate": "no action"
253
+ }
254
+ },
255
+ "compositePrimaryKeys": {
256
+ "players_userId_gameId_pk": {
257
+ "name": "players_userId_gameId_pk",
258
+ "columns": [
259
+ "userId",
260
+ "gameId"
261
+ ]
262
+ }
263
+ },
264
+ "uniqueConstraints": {},
265
+ "policies": {},
266
+ "checkConstraints": {},
267
+ "isRLSEnabled": false
268
+ },
269
+ "public.userChanges": {
270
+ "name": "userChanges",
271
+ "schema": "",
272
+ "columns": {
273
+ "id": {
274
+ "name": "id",
275
+ "type": "uuid",
276
+ "primaryKey": true,
277
+ "notNull": true,
278
+ "default": "gen_random_uuid()"
279
+ },
280
+ "userId": {
281
+ "name": "userId",
282
+ "type": "uuid",
283
+ "primaryKey": false,
284
+ "notNull": true
285
+ },
286
+ "changedAt": {
287
+ "name": "changedAt",
288
+ "type": "timestamp with time zone",
289
+ "primaryKey": false,
290
+ "notNull": true,
291
+ "default": "now()"
292
+ },
293
+ "changedIp": {
294
+ "name": "changedIp",
295
+ "type": "varchar(45)",
296
+ "primaryKey": false,
297
+ "notNull": true
298
+ },
299
+ "changedColumn": {
300
+ "name": "changedColumn",
301
+ "type": "trackedUserColumnName",
302
+ "typeSchema": "public",
303
+ "primaryKey": false,
304
+ "notNull": true
305
+ },
306
+ "oldValue": {
307
+ "name": "oldValue",
308
+ "type": "varchar(255)",
309
+ "primaryKey": false,
310
+ "notNull": false
311
+ },
312
+ "newValue": {
313
+ "name": "newValue",
314
+ "type": "varchar(255)",
315
+ "primaryKey": false,
316
+ "notNull": false
317
+ }
318
+ },
319
+ "indexes": {},
320
+ "foreignKeys": {
321
+ "userChanges_userId_users_id_fk": {
322
+ "name": "userChanges_userId_users_id_fk",
323
+ "tableFrom": "userChanges",
324
+ "tableTo": "users",
325
+ "columnsFrom": [
326
+ "userId"
327
+ ],
328
+ "columnsTo": [
329
+ "id"
330
+ ],
331
+ "onDelete": "no action",
332
+ "onUpdate": "no action"
333
+ }
334
+ },
335
+ "compositePrimaryKeys": {},
336
+ "uniqueConstraints": {},
337
+ "policies": {},
338
+ "checkConstraints": {},
339
+ "isRLSEnabled": false
340
+ },
341
+ "public.users": {
342
+ "name": "users",
343
+ "schema": "",
344
+ "columns": {
345
+ "id": {
346
+ "name": "id",
347
+ "type": "uuid",
348
+ "primaryKey": true,
349
+ "notNull": true,
350
+ "default": "gen_random_uuid()"
351
+ },
352
+ "username": {
353
+ "name": "username",
354
+ "type": "varchar(16)",
355
+ "primaryKey": false,
356
+ "notNull": true
357
+ },
358
+ "email": {
359
+ "name": "email",
360
+ "type": "varchar(254)",
361
+ "primaryKey": false,
362
+ "notNull": true
363
+ },
364
+ "hash": {
365
+ "name": "hash",
366
+ "type": "varchar(64)",
367
+ "primaryKey": false,
368
+ "notNull": true
369
+ },
370
+ "salt": {
371
+ "name": "salt",
372
+ "type": "varchar(36)",
373
+ "primaryKey": false,
374
+ "notNull": true
375
+ },
376
+ "createdAt": {
377
+ "name": "createdAt",
378
+ "type": "timestamp with time zone",
379
+ "primaryKey": false,
380
+ "notNull": true,
381
+ "default": "now()"
382
+ },
383
+ "createdIp": {
384
+ "name": "createdIp",
385
+ "type": "varchar(45)",
386
+ "primaryKey": false,
387
+ "notNull": true
388
+ },
389
+ "isActive": {
390
+ "name": "isActive",
391
+ "type": "boolean",
392
+ "primaryKey": false,
393
+ "notNull": true,
394
+ "default": false
395
+ },
396
+ "verifiedAt": {
397
+ "name": "verifiedAt",
398
+ "type": "timestamp with time zone",
399
+ "primaryKey": false,
400
+ "notNull": false
401
+ },
402
+ "userRole": {
403
+ "name": "userRole",
404
+ "type": "role",
405
+ "typeSchema": "public",
406
+ "primaryKey": false,
407
+ "notNull": false,
408
+ "default": "'user'"
409
+ }
410
+ },
411
+ "indexes": {
412
+ "usernameUniqueIndex": {
413
+ "name": "usernameUniqueIndex",
414
+ "columns": [
415
+ {
416
+ "expression": "lower(\"username\")",
417
+ "asc": true,
418
+ "isExpression": true,
419
+ "nulls": "last"
420
+ }
421
+ ],
422
+ "isUnique": true,
423
+ "concurrently": false,
424
+ "method": "btree",
425
+ "with": {}
426
+ },
427
+ "emailUniqueIndex": {
428
+ "name": "emailUniqueIndex",
429
+ "columns": [
430
+ {
431
+ "expression": "lower(\"email\")",
432
+ "asc": true,
433
+ "isExpression": true,
434
+ "nulls": "last"
435
+ }
436
+ ],
437
+ "isUnique": true,
438
+ "concurrently": false,
439
+ "method": "btree",
440
+ "with": {}
441
+ }
442
+ },
443
+ "foreignKeys": {},
444
+ "compositePrimaryKeys": {},
445
+ "uniqueConstraints": {},
446
+ "policies": {},
447
+ "checkConstraints": {},
448
+ "isRLSEnabled": false
449
+ }
450
+ },
451
+ "enums": {
452
+ "public.role": {
453
+ "name": "role",
454
+ "schema": "public",
455
+ "values": [
456
+ "admin",
457
+ "user"
458
+ ]
459
+ },
460
+ "public.trackedUserColumnName": {
461
+ "name": "trackedUserColumnName",
462
+ "schema": "public",
463
+ "values": [
464
+ "username",
465
+ "email",
466
+ "hash",
467
+ "userRole"
468
+ ]
469
+ },
470
+ "public.twoFactorMethod": {
471
+ "name": "twoFactorMethod",
472
+ "schema": "public",
473
+ "values": [
474
+ "email",
475
+ "phone"
476
+ ]
477
+ }
478
+ },
479
+ "schemas": {},
480
+ "sequences": {},
481
+ "roles": {},
482
+ "policies": {},
483
+ "views": {},
484
+ "_meta": {
485
+ "columns": {},
486
+ "schemas": {},
487
+ "tables": {}
488
+ }
489
+ }
@@ -57,6 +57,13 @@
57
57
  "when": 1728541189904,
58
58
  "tag": "0007_charming_strong_guy",
59
59
  "breakpoints": true
60
+ },
61
+ {
62
+ "idx": 8,
63
+ "version": "7",
64
+ "when": 1731301770383,
65
+ "tag": "0008_talented_blur",
66
+ "breakpoints": true
60
67
  }
61
68
  ]
62
69
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tempest.games",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -54,7 +54,7 @@
54
54
  "typescript": "5.6.3",
55
55
  "typescript-eslint": "8.13.0",
56
56
  "vite": "5.4.10",
57
- "vite-tsconfig-paths": "5.1.0",
57
+ "vite-tsconfig-paths": "5.1.2",
58
58
  "vitest": "2.1.4",
59
59
  "varmint": "0.3.1"
60
60
  },
@@ -80,8 +80,8 @@
80
80
  "lint:types:watch": "tsc --watch --noEmit",
81
81
  "lint": "bun run lint:biome && bun run lint:eslint && bun run lint:types",
82
82
  "postversion": "biome format --write package.json",
83
- "db:dev": "drizzle-kit studio",
84
- "db:gen": "drizzle-kit generate",
83
+ "db:dev": "dotenv -e .env.development -- drizzle-kit studio",
84
+ "db:gen": "dotenv -e .env.development -- drizzle-kit generate",
85
85
  "db:nuke": "./__scripts__/destroy-db.bun.ts",
86
86
  "db:setup": "./__scripts__/setup-db.bun.ts"
87
87
  }
@@ -1 +0,0 @@
1
- :root{color-scheme:light dark;--fg-tint-3: #fff;--fg-hard-3: var(--fg-tint-3);--fg-tint-2: #fafafa;--fg-hard-2: var(--fg-tint-2);--fg-tint-1: #f5f5f5;--fg-hard-1: var(--fg-tint-1);--fg: #eee;--fg-dark-1: #ddd;--fg-soft-1: var(--fg-dark-1);--fg-dark-2: #ccc;--fg-soft-2: var(--fg-dark-2);--fg-dark-3: #bbb;--fg-soft-3: var(--fg-dark-3);--bg-tint-3: #333;--bg-soft-3: var(--bg-tint-3);--bg-tint-2: #222;--bg-soft-2: var(--bg-tint-2);--bg-tint-1: #111;--bg-soft-1: var(--bg-tint-1);--bg: #090909;--bg-dark-1: #060606;--bg-hard-1: var(--bg-dark-1);--bg-dark-2: #030303;--bg-hard-2: var(--bg-dark-2);--bg-dark-3: #000;--bg-hard-3: var(--bg-dark-3);--hyperlink-color: #09f;--hyperlink-hover-color: #0df;--PI: 3.14159265358979;color:var(--fg);background-color:var(--bg);position:relative}:root body{padding:0;margin:0}*,*:before,*:after{box-sizing:border-box;font-size:15px;line-height:1.3333333333}@media (prefers-color-scheme: light){:root{--fg-tint-3: #666;--fg-hard-3: var(--fg-tint-3);--fg-tint-2: #555;--fg-hard-2: var(--fg-tint-2);--fg-tint-1: #444;--fg-hard-1: var(--fg-tint-1);--fg: #333;--fg-dark-1: #222;--fg-soft-1: var(--fg-dark-1);--fg-dark-2: #111;--fg-soft-2: var(--fg-dark-2);--fg-dark-3: #000;--fg-soft-3: var(--fg-dark-3);--bg-tint-3: #fffefc;--bg-hard-3: var(--bg-tint-3);--bg-tint-2: #fdfcfa;--bg-hard-2: var(--bg-tint-2);--bg-tint-1: #f5f4f2;--bg-hard-1: var(--bg-tint-1);--bg: #efede9;--bg-dark-1: #eae8e4;--bg-soft-1: var(--bg-dark-1);--bg-dark-2: #e4e2de;--bg-soft-2: var(--bg-dark-2);--bg-dark-3: #dedcd8;--bg-soft-3: var(--bg-dark-3);color:var(--fg);background-color:var(--bg);--hyperlink-color: #08f;--hyperlink-hover-color: #04f}a:hover{color:#08f}button{background-color:#f9f9f9}}a{font-weight:500;color:var(--hyperlink-color);text-decoration:inherit}a:hover{color:var(--hyperlink-hover-color);text-decoration:underline}@font-face{font-family:name;src:url(/love_yanone.ttf)}@font-face{font-family:"|_'_|";src:url(/DelveSystem-Regular.otf)}@font-face{font-family:sudo;src:url(/Sudo-Code.otf)}@font-face{font-family:theia;src:url(/Theia0.2.300-300.otf);font-weight:300}@font-face{font-family:theia;src:url(/Theia0.2.400-400.otf);font-weight:400}@font-face{font-family:theia;src:url(/Theia0.2.500-500.otf);font-weight:500}:root{font-family:Uruz;font-size:20px;line-height:1.5;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}i{font-family:Uruz}b{font-family:"|_'_|"}code{font-family:sudo}@font-face{font-family:Uruz;src:url(/Uruz/Uruz-5r.otf);font-weight:500}@font-face{font-family:Uruz;src:url(/Uruz/Uruz-6r.otf);font-weight:600}@font-face{font-family:Uruz;src:url(/Uruz/Uruz-7r.otf);font-weight:700}@font-face{font-family:Manufab;src:url(/manufabVF.ttf)}main._class_wtkls_1{display:flex;flex-flow:column;min-height:100svh;width:100%;overflow:hidden;justify-content:center;align-items:center;padding:60px 10px 30px}main._class_wtkls_1>header{width:100%;max-width:512px}main._class_wtkls_1>header svg{width:100%;max-width:270px}@media (prefers-color-scheme: light){main._class_wtkls_1>header svg{mix-blend-mode:multiply}}main._class_wtkls_1>main{width:100%;max-width:512px;flex-grow:1;align-content:end}main._class_wtkls_1>main>form{display:flex;flex-flow:row wrap;height:100%;gap:30px;align-items:end}main._class_wtkls_1>main>form>main{width:100%;max-width:200px;display:flex;flex-flow:column;gap:10px}main._class_wtkls_1>main>form>main>aside{background-color:#f007;color:var(--bg-hard-3);font-size:15px;padding:3px 6px}main._class_wtkls_1>main>form>main>label{display:flex;flex-flow:column;position:relative}main._class_wtkls_1>main>form>main>label>span{flex-grow:1;font-size:15px}main._class_wtkls_1>main>form>main>label>input{--energy-color: var(--fg-soft-3);box-sizing:border-box;border-radius:0;height:34px;background:none;border:1px solid var(--energy-color);font-family:Uruz;font-size:21px}main._class_wtkls_1>main>form>main>label>input:focus{outline:none;border-width:2px}main._class_wtkls_1>main>form>main>label>aside{display:none}main._class_wtkls_1>main>form>main>label:focus-within>aside{position:absolute;display:flex;flex-flow:column-reverse;bottom:calc(100% - 24px);right:0;max-width:160px;font-size:15px;line-height:1.2em;text-align:right;padding:3px 4px 4px;background-color:red;color:var(--bg)}main._class_wtkls_1>main>form>main>button{background-color:var(--bg-dark-3);color:var(--fg);width:50px;height:40px;font-family:theia;border:none;align-self:flex-end;margin-top:10px;border:var(--fg-soft-3) solid 1px;cursor:pointer}main._class_wtkls_1>main>form>main>button:disabled{background-color:var(--bg-hard-1);border:1px solid var(--bg-soft-1);color:var(--bg-soft-3)}main._class_wtkls_1>main>form>main>button:disabled:hover{cursor:not-allowed}main._class_wtkls_1>main>form>footer{display:flex;flex-flow:column;gap:30px;align-items:start}main._class_wtkls_1>main>form>footer>a{font-size:15px;color:var(--fg)}main._class_wtkls_1>main>form>footer>a:hover{color:var(--hyperlink-hover-color)}main._class_wtkls_1>main>form>footer>a:hover>u{color:var(--hyperlink-hover-color)}main._class_wtkls_1>main>form>footer>a>u{color:var(--hyperlink-color)}main._class_wtkls_1>main>article{width:100%;overflow:visible}main._class_wtkls_1>main>article>h1{margin:-36px 0 -36px -6px;font-size:144px;font-weight:600}main._class_wtkls_1>main>article>h2{font-size:36px;margin-top:0}