@axium/server 0.43.0 → 0.44.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axium/server",
3
- "version": "0.43.0",
3
+ "version": "0.44.0",
4
4
  "author": "James Prevett <axium@jamespre.dev>",
5
5
  "funding": {
6
6
  "type": "individual",
@@ -20,22 +20,20 @@
20
20
  "types": "dist/index.d.ts",
21
21
  "exports": {
22
22
  ".": "./dist/index.js",
23
+ "./database": "./dist/db/index.js",
23
24
  "./*": "./dist/*.js",
24
25
  "./$hooks": "./web/hooks.server.ts",
25
26
  "./$routes": "./routes",
26
- "./$template": "./web/template.html",
27
- "./svelte.config.js": "./svelte.config.js",
28
- "./vite.config.js": "./vite.config.js"
27
+ "./$template": "./web/template.html"
29
28
  },
30
29
  "files": [
31
30
  "assets",
32
31
  "dist",
32
+ "patches",
33
33
  "routes",
34
34
  "schemas",
35
- "svelte.config.js",
36
35
  "web.tsconfig.json",
37
36
  "template.html",
38
- "vite.config.js",
39
37
  "axium.service"
40
38
  ],
41
39
  "bin": {
@@ -43,31 +41,33 @@
43
41
  },
44
42
  "scripts": {
45
43
  "build": "tsc",
46
- "build:schemas": "mkdir -p schemas && npx axium config schema -j > schemas/config.json && npx axium db json-schema -j > schemas/db.json",
47
- "clean": "rm -rf build .svelte-kit node_modules/{.vite,.vite-temp}"
44
+ "build:schemas": "mkdir -p schemas && node dist/main.js config schema -j > schemas/config.json && node dist/main.js db json-schema -j > schemas/db.json",
45
+ "clean": "rm -rf build .svelte-kit node_modules/{.vite,.vite-temp}",
46
+ "postinstall": "patch-package"
48
47
  },
49
48
  "peerDependencies": {
50
49
  "@axium/client": ">=0.21.0",
51
- "@axium/core": ">=0.26.0",
50
+ "@axium/core": ">=0.27.2",
51
+ "@simplewebauthn/browser": "^13.3.0",
52
+ "@sveltejs/adapter-node": "^5.2.12",
53
+ "@sveltejs/kit": "2.56.1",
54
+ "@sveltejs/vite-plugin-svelte": "^7.0.0",
52
55
  "kysely": "^0.28.0",
56
+ "svelte": "^5.36.0",
53
57
  "utilium": "^3.0.0",
54
58
  "zod": "^4.0.5"
55
59
  },
56
60
  "dependencies": {
57
61
  "@simplewebauthn/server": "^13.1.1",
58
- "@sveltejs/kit": "^2.23.0",
59
62
  "@types/pg": "^8.11.11",
60
63
  "commander": "^14.0.0",
61
64
  "cookie_v1": "npm:cookie@^1.0.2",
62
- "ioium": "^0.1.0",
65
+ "ioium": "^1.0.0",
63
66
  "logzen": "^0.7.0",
67
+ "patch-package": "^8.0.1",
64
68
  "pg": "^8.14.1",
65
69
  "sharp": "^0.34.5",
66
- "svelte": "^5.36.0"
67
- },
68
- "devDependencies": {
69
- "@sveltejs/adapter-node": "^5.2.12",
70
- "vite-plugin-mkcert": "^1.17.8"
70
+ "vite": "^8.0.5"
71
71
  },
72
72
  "optionalDependencies": {
73
73
  "ua-parser-js": "^2.0.9"
@@ -0,0 +1,43 @@
1
+ diff --git a/node_modules/@sveltejs/kit/src/core/config/index.js b/node_modules/@sveltejs/kit/src/core/config/index.js
2
+ index ae35a70..d480e23 100644
3
+ --- a/node_modules/@sveltejs/kit/src/core/config/index.js
4
+ +++ b/node_modules/@sveltejs/kit/src/core/config/index.js
5
+ @@ -95,7 +95,7 @@ export async function load_config({ cwd = process.cwd() } = {}) {
6
+ * @param {import('@sveltejs/kit').Config} config
7
+ * @returns {import('types').ValidatedConfig}
8
+ */
9
+ -function process_config(config, { cwd = process.cwd() } = {}) {
10
+ +export function process_config(config, { cwd = process.cwd() } = {}) {
11
+ const validated = validate_config(config);
12
+
13
+ validated.kit.outDir = path.resolve(cwd, validated.kit.outDir);
14
+ diff --git a/node_modules/@sveltejs/kit/src/exports/vite/index.js b/node_modules/@sveltejs/kit/src/exports/vite/index.js
15
+ index 5480800..5c81d67 100644
16
+ --- a/node_modules/@sveltejs/kit/src/exports/vite/index.js
17
+ +++ b/node_modules/@sveltejs/kit/src/exports/vite/index.js
18
+ @@ -87,7 +87,7 @@ const options_regex = /(export\s+const\s+(prerender|csr|ssr|trailingSlash))\s*=/
19
+ const warned = new Set();
20
+
21
+ /** @type {import('svelte/compiler').PreprocessorGroup} */
22
+ -const warning_preprocessor = {
23
+ +export const warning_preprocessor = {
24
+ script: ({ content, filename }) => {
25
+ if (!filename) return;
26
+
27
+ @@ -186,7 +186,7 @@ let build_metadata = undefined;
28
+ * @param {{ svelte_config: import('types').ValidatedConfig }} options
29
+ * @return {Promise<import('vite').Plugin[]>}
30
+ */
31
+ -async function kit({ svelte_config }) {
32
+ +export async function kit({ svelte_config }) {
33
+ /** @type {import('vite')} */
34
+ const vite = await import_peer('vite');
35
+
36
+ @@ -1129,6 +1129,7 @@ async function kit({ svelte_config }) {
37
+ const bundle = /** @type {import('vite').Rollup.RollupOutput} */ (
38
+ await vite.build({
39
+ configFile: vite_config.configFile,
40
+ + ...(globalThis.__axiumNestedConfig ?? {}),
41
+ // CLI args
42
+ mode: vite_config_env.mode,
43
+ logLevel: vite_config.logLevel,
@@ -3,7 +3,7 @@
3
3
  import { ClipboardCopy, FormDialog, Icon, Logout, Popover, SessionList, UserPFP, ZodForm } from '@axium/client/components';
4
4
  import '@axium/client/styles/account';
5
5
  import { createPasskey, deletePasskey, deleteUser, sendVerificationEmail, updatePasskey, updateUser } from '@axium/client/user';
6
- import { preferenceLabels, Preferences } from '@axium/core/preferences';
6
+ import { Preferences } from '@axium/core/preferences';
7
7
  import type { PageProps } from './$types';
8
8
  import { toast, toastStatus } from '@axium/client/toast';
9
9
  import { contextMenu } from '@axium/client/attachments';
@@ -221,7 +221,6 @@
221
221
  bind:rootValue={user.preferences}
222
222
  idPrefix="preferences"
223
223
  schema={Preferences}
224
- labels={preferenceLabels}
225
224
  updateValue={(preferences: Preferences) => fetchAPI('PATCH', 'users/:id', { preferences }, user.id)}
226
225
  />
227
226
  </div>
@@ -3,7 +3,7 @@
3
3
  import { ClipboardCopy, FormDialog, Icon, SessionList, UserPFP, ZodForm, ZodInput } from '@axium/client/components';
4
4
  import { toast } from '@axium/client/toast';
5
5
  import '@axium/client/styles/account';
6
- import { preferenceLabels, Preferences, User } from '@axium/core';
6
+ import { Preferences, User } from '@axium/core';
7
7
  import { formatDateRange } from '@axium/core/format';
8
8
 
9
9
  const { data } = $props();
@@ -134,7 +134,6 @@
134
134
  <ZodForm
135
135
  bind:rootValue={user.preferences}
136
136
  schema={Preferences}
137
- labels={preferenceLabels}
138
137
  updateValue={(preferences: Preferences) => fetchAPI('PATCH', 'users/:id', { preferences }, user.id)}
139
138
  />
140
139
  </div>
package/svelte.config.js DELETED
@@ -1,33 +0,0 @@
1
- import node from '@sveltejs/adapter-node';
2
- import { join } from 'node:path/posix';
3
- import { fileURLToPath } from 'node:url';
4
- import config from '@axium/server/config';
5
-
6
- /** @type {import('@sveltejs/kit').Config} */
7
- export default {
8
- compilerOptions: {
9
- runes: true,
10
- warningFilter(w) {
11
- if (w.code.startsWith('a11y')) return false;
12
- },
13
- experimental: {
14
- async: true,
15
- },
16
- },
17
- kit: {
18
- adapter: node(),
19
- files: {
20
- assets: join(fileURLToPath(new URL(import.meta.resolve('@axium/client'))), '../../assets'),
21
- appTemplate: join(import.meta.dirname, 'template.html'),
22
- routes: config.web.routes,
23
- hooks: {
24
- universal: '/dev/null',
25
- client: join(import.meta.dirname, '.hooks.js'),
26
- },
27
- },
28
- },
29
- vitePlugin: {
30
- // Fixes a problem where Vite does something that results in the virtual CSS file just being the entire svelte component, which is obviously invalid CSS.
31
- emitCss: false,
32
- },
33
- };