@axium/server 0.31.0 → 0.31.2
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.
- package/dist/api/users.js +0 -4
- package/dist/database.js +4 -0
- package/package.json +3 -3
package/dist/api/users.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/** Register a new passkey for a new or existing user. */
|
|
2
|
-
import { preferenceDefaults, Preferences } from '@axium/core';
|
|
3
1
|
import { PasskeyAuthenticationResponse, PasskeyRegistration } from '@axium/core/passkeys';
|
|
4
2
|
import { LogoutSessions, UserAuthOptions, UserChangeable } from '@axium/core/user';
|
|
5
3
|
import * as webauthn from '@simplewebauthn/server';
|
|
@@ -42,8 +40,6 @@ addRoute({
|
|
|
42
40
|
await checkAuthForUser(request, userId);
|
|
43
41
|
if ('email' in body)
|
|
44
42
|
body.emailVerified = null;
|
|
45
|
-
if ('preferences' in body)
|
|
46
|
-
body.preferences = Object.assign(structuredClone(preferenceDefaults), await Preferences.partial().parseAsync(body.preferences).catch(withError('Invalid preferences', 400)));
|
|
47
43
|
const result = await db
|
|
48
44
|
.updateTable('users')
|
|
49
45
|
.set(body)
|
package/dist/database.js
CHANGED
|
@@ -64,6 +64,10 @@ import config from './config.js';
|
|
|
64
64
|
import rawSchema from './db.json' with { type: 'json' };
|
|
65
65
|
import { dirs, systemDir } from './io.js';
|
|
66
66
|
pg.types.setTypeParser(pg.types.builtins.INT8, BigInt);
|
|
67
|
+
// @ts-expect-error 2339
|
|
68
|
+
BigInt.prototype.toJSON = function () {
|
|
69
|
+
return Number(this);
|
|
70
|
+
};
|
|
67
71
|
const sym = Symbol.for('Axium:database');
|
|
68
72
|
export let database;
|
|
69
73
|
export function connect() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axium/server",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.2",
|
|
4
4
|
"author": "James Prevett <axium@jamespre.dev>",
|
|
5
5
|
"funding": {
|
|
6
6
|
"type": "individual",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"clean": "rm -rf build .svelte-kit node_modules/{.vite,.vite-temp}"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@axium/client": ">=0.
|
|
51
|
-
"@axium/core": ">=0.
|
|
50
|
+
"@axium/client": ">=0.10.0",
|
|
51
|
+
"@axium/core": ">=0.16.0",
|
|
52
52
|
"kysely": "^0.28.0",
|
|
53
53
|
"utilium": "^2.6.0",
|
|
54
54
|
"zod": "^4.0.5"
|