oops went on a massive code sesh and theres like a whole website now
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
{
|
||||
"/": []
|
||||
"/": [
|
||||
"src/routes/+page.server.ts"
|
||||
],
|
||||
"/artwork/[itemId]": [
|
||||
"src/routes/artwork/[itemId]/+server.ts"
|
||||
]
|
||||
}
|
||||
15
.svelte-kit/types/src/routes/$types.d.ts
vendored
15
.svelte-kit/types/src/routes/$types.d.ts
vendored
@@ -12,14 +12,21 @@ type OptionalUnion<U extends Record<string, any>, A extends keyof U = U extends
|
||||
/** @deprecated Use the `snapshot` helper from `$app/navigation` instead. */
|
||||
export type Snapshot<T = any> = Kit.Snapshot<T>;
|
||||
export type ErrorProps = { error: App.Error };
|
||||
type PageServerParentData = EnsureDefined<LayoutServerData>;
|
||||
type PageParentData = EnsureDefined<LayoutData>;
|
||||
type LayoutRouteId = RouteId | "/" | null
|
||||
type LayoutParams = RouteParams & { }
|
||||
type LayoutParentData = EnsureDefined<{}>;
|
||||
|
||||
export type PageServerData = null;
|
||||
export type PageData = Expand<PageParentData>;
|
||||
export type PageProps = { params: RouteParams; data: PageData }
|
||||
export type PageServerLoad<OutputData extends OutputDataShape<PageServerParentData> = OutputDataShape<PageServerParentData>> = Kit.ServerLoad<RouteParams, PageServerParentData, OutputData, RouteId>;
|
||||
export type PageServerLoadEvent = Parameters<PageServerLoad>[0];
|
||||
export type ActionData = unknown;
|
||||
export type PageServerData = Expand<OptionalUnion<EnsureDefined<Kit.LoadProperties<Awaited<ReturnType<typeof import('./proxy+page.server.js').load>>>>>>;
|
||||
export type PageData = Expand<Omit<PageParentData, keyof PageServerData> & EnsureDefined<PageServerData>>;
|
||||
export type Action<OutputData extends Record<string, any> | void = Record<string, any> | void> = Kit.Action<RouteParams, OutputData, RouteId>
|
||||
export type Actions<OutputData extends Record<string, any> | void = Record<string, any> | void> = Kit.Actions<RouteParams, OutputData, RouteId>
|
||||
export type PageProps = { params: RouteParams; data: PageData; form: ActionData }
|
||||
export type LayoutServerData = null;
|
||||
export type LayoutData = Expand<LayoutParentData>;
|
||||
export type LayoutProps = { params: LayoutParams; data: LayoutData; children: import("svelte").Snippet }
|
||||
export type LayoutProps = { params: LayoutParams; data: LayoutData; children: import("svelte").Snippet }
|
||||
export type RequestEvent = Kit.RequestEvent<RouteParams, RouteId>;
|
||||
10
.svelte-kit/types/src/routes/artwork/[itemId]/$types.d.ts
vendored
Normal file
10
.svelte-kit/types/src/routes/artwork/[itemId]/$types.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import type * as Kit from '@sveltejs/kit';
|
||||
import { MatcherParam } from '@sveltejs/kit/params';
|
||||
|
||||
type Expand<T> = T extends infer O ? { [K in keyof O]: O[K] } : never;
|
||||
type RouteParams = { itemId: string };
|
||||
type RouteId = '/artwork/[itemId]';
|
||||
|
||||
export type EntryGenerator = () => Promise<Array<RouteParams>> | Array<RouteParams>;
|
||||
export type RequestHandler = Kit.RequestHandler<RouteParams, RouteId>;
|
||||
export type RequestEvent = Kit.RequestEvent<RouteParams, RouteId>;
|
||||
17
.svelte-kit/types/src/routes/proxy+page.server.ts
Normal file
17
.svelte-kit/types/src/routes/proxy+page.server.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
// @ts-nocheck
|
||||
import type { PageServerLoad } from './$types';
|
||||
import { getLatestPlaylistSong } from '#lib/server/jellyfin';
|
||||
import { JELLYFIN_PLAYLIST_ID } from '$app/env/private';
|
||||
|
||||
export const load = () => {
|
||||
const latestSong = getLatestPlaylistSong(globalThis.fetch, JELLYFIN_PLAYLIST_ID);
|
||||
|
||||
latestSong.catch(() => {});
|
||||
|
||||
return {
|
||||
streamed: {
|
||||
latestSong
|
||||
}
|
||||
};
|
||||
};
|
||||
;null as any as PageServerLoad;
|
||||
Reference in New Issue
Block a user