@axium/server 0.1.4 → 0.1.6

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.1.4",
3
+ "version": "0.1.6",
4
4
  "author": "James Prevett <axium@jamespre.dev> (https://jamespre.dev)",
5
5
  "funding": {
6
6
  "type": "individual",
@@ -21,7 +21,8 @@
21
21
  ".": "./dist/index.js",
22
22
  "./*": "./dist/*",
23
23
  "./web": "./web/index.js",
24
- "./web/*": "./web/*"
24
+ "./web/*": "./web/*",
25
+ "./web/server": "./web/index.server.js"
25
26
  },
26
27
  "files": [
27
28
  "dist",
@@ -0,0 +1,3 @@
1
+ export * as signup from './routes/signup/+page.server.js';
2
+ export * as name from './routes/name/+page.server.js';
3
+ export * as email from './routes/email/+page.server.js';
package/web/index.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { default as Icon } from './lib/Icon.svelte';
2
2
  export { default as Account } from './routes/+page.svelte';
3
- export { default as EditName } from './routes/edit/name/+page.svelte';
4
- export { default as EditEmail } from './routes/edit/email/+page.svelte';
3
+ export { default as EditName } from './routes/name/+page.svelte';
4
+ export { default as EditEmail } from './routes/email/+page.svelte';
@@ -6,7 +6,7 @@ export async function load(event: PageServerLoadEvent) {
6
6
  const session = await event.locals.auth();
7
7
 
8
8
  if (!session) redirect(307, '/auth/signin');
9
- if (!session.user.name) redirect(307, '/edit/name');
9
+ if (!session.user.name) redirect(307, '/name');
10
10
 
11
11
  const user = await adapter.getUserByEmail(session.user.email);
12
12
 
@@ -21,12 +21,12 @@
21
21
  <div>
22
22
  <p>Name</p>
23
23
  <p>{user.name}</p>
24
- <a href="/edit/name"><Icon id="chevron-right" /></a>
24
+ <a href="name"><Icon id="chevron-right" /></a>
25
25
  </div>
26
26
  <div>
27
27
  <p>Email</p>
28
28
  <p>{user.email}</p>
29
- <a href="/edit/email"><Icon id="chevron-right" /></a>
29
+ <a href="email"><Icon id="chevron-right" /></a>
30
30
  </div>
31
31
  <div>
32
32
  <p>User ID <dfn title="This is your UUID."><Icon id="regular/circle-info" /></dfn></p>
@@ -1,7 +1,7 @@
1
1
  import { fail, redirect, type Actions } from '@sveltejs/kit';
2
2
  import * as z from 'zod';
3
- import { adapter } from '../../../../dist/auth.js';
4
- import type { PageServerLoadEvent } from './$types';
3
+ import { adapter } from '../../../dist/auth.js';
4
+ import type { PageServerLoadEvent } from './$types.js';
5
5
 
6
6
  export async function load(event: PageServerLoadEvent) {
7
7
  const session = await event.locals.auth();
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
2
  import { enhance } from '$app/forms';
3
- import '../../../lib/styles.css';
3
+ import '../../lib/styles.css';
4
4
  let { form, data } = $props();
5
5
  const { user } = data.session;
6
6
  </script>
@@ -1,7 +1,7 @@
1
1
  import { Name } from '@axium/core/schemas';
2
2
  import { fail, redirect, type Actions } from '@sveltejs/kit';
3
- import { adapter } from '../../../../dist/auth.js';
4
- import type { PageServerLoadEvent } from './$types';
3
+ import { adapter } from '../../../dist/auth.js';
4
+ import type { PageServerLoadEvent } from './$types.js';
5
5
 
6
6
  export async function load(event: PageServerLoadEvent) {
7
7
  const session = await event.locals.auth();
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
2
  import { enhance } from '$app/forms';
3
- import '../../../lib/styles.css';
3
+ import '../../lib/styles.css';
4
4
  let { form, data } = $props();
5
5
  const { user } = data.session;
6
6
  </script>