Update environment type definitions and remove generated files. Added new environment variables to ambient.d.ts and dynamic private module. Deleted obsolete generated files including root.js, root.svelte, and client-related files. Updated route metadata and types for improved structure and clarity.
This commit is contained in:
Vendored
+32
-6
@@ -30,14 +30,19 @@ declare module '$env/static/private' {
|
||||
export const GHOSTTY_RESOURCES_DIR: string;
|
||||
export const TERM_PROGRAM: string;
|
||||
export const NODE: string;
|
||||
export const SHELL: string;
|
||||
export const INIT_CWD: string;
|
||||
export const TERM: string;
|
||||
export const HOMEBREW_REPOSITORY: string;
|
||||
export const SHELL: string;
|
||||
export const TMPDIR: string;
|
||||
export const HOMEBREW_REPOSITORY: string;
|
||||
export const npm_config_global_prefix: string;
|
||||
export const TERM_PROGRAM_VERSION: string;
|
||||
export const COLOR: string;
|
||||
export const npm_config_noproxy: string;
|
||||
export const npm_config_local_prefix: string;
|
||||
export const USER: string;
|
||||
export const COMMAND_MODE: string;
|
||||
export const npm_config_globalconfig: string;
|
||||
export const SSH_AUTH_SOCK: string;
|
||||
export const __CF_USER_TEXT_ENCODING: string;
|
||||
export const npm_execpath: string;
|
||||
@@ -46,19 +51,25 @@ declare module '$env/static/private' {
|
||||
export const _: string;
|
||||
export const LaunchInstanceID: string;
|
||||
export const GHOSTTY_SHELL_FEATURES: string;
|
||||
export const npm_config_userconfig: string;
|
||||
export const npm_config_init_module: string;
|
||||
export const __CFBundleIdentifier: string;
|
||||
export const npm_command: string;
|
||||
export const PWD: string;
|
||||
export const npm_lifecycle_event: string;
|
||||
export const EDITOR: string;
|
||||
export const npm_package_name: string;
|
||||
export const LANG: string;
|
||||
export const npm_config_npm_version: string;
|
||||
export const XPC_FLAGS: string;
|
||||
export const npm_config_node_gyp: string;
|
||||
export const npm_package_version: string;
|
||||
export const XPC_SERVICE_NAME: string;
|
||||
export const HOME: string;
|
||||
export const SHLVL: string;
|
||||
export const TERMINFO: string;
|
||||
export const HOMEBREW_PREFIX: string;
|
||||
export const npm_config_cache: string;
|
||||
export const LOGNAME: string;
|
||||
export const npm_lifecycle_script: string;
|
||||
export const XDG_DATA_DIRS: string;
|
||||
@@ -67,10 +78,12 @@ declare module '$env/static/private' {
|
||||
export const INFOPATH: string;
|
||||
export const HOMEBREW_CELLAR: string;
|
||||
export const OSLogRateLimit: string;
|
||||
export const AGENT: string;
|
||||
export const SECURITYSESSIONID: string;
|
||||
export const npm_node_execpath: string;
|
||||
export const npm_config_prefix: string;
|
||||
export const OPENCODE: string;
|
||||
export const COLORTERM: string;
|
||||
export const NODE_ENV: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -104,14 +117,19 @@ declare module '$env/dynamic/private' {
|
||||
GHOSTTY_RESOURCES_DIR: string;
|
||||
TERM_PROGRAM: string;
|
||||
NODE: string;
|
||||
SHELL: string;
|
||||
INIT_CWD: string;
|
||||
TERM: string;
|
||||
HOMEBREW_REPOSITORY: string;
|
||||
SHELL: string;
|
||||
TMPDIR: string;
|
||||
HOMEBREW_REPOSITORY: string;
|
||||
npm_config_global_prefix: string;
|
||||
TERM_PROGRAM_VERSION: string;
|
||||
COLOR: string;
|
||||
npm_config_noproxy: string;
|
||||
npm_config_local_prefix: string;
|
||||
USER: string;
|
||||
COMMAND_MODE: string;
|
||||
npm_config_globalconfig: string;
|
||||
SSH_AUTH_SOCK: string;
|
||||
__CF_USER_TEXT_ENCODING: string;
|
||||
npm_execpath: string;
|
||||
@@ -120,19 +138,25 @@ declare module '$env/dynamic/private' {
|
||||
_: string;
|
||||
LaunchInstanceID: string;
|
||||
GHOSTTY_SHELL_FEATURES: string;
|
||||
npm_config_userconfig: string;
|
||||
npm_config_init_module: string;
|
||||
__CFBundleIdentifier: string;
|
||||
npm_command: string;
|
||||
PWD: string;
|
||||
npm_lifecycle_event: string;
|
||||
EDITOR: string;
|
||||
npm_package_name: string;
|
||||
LANG: string;
|
||||
npm_config_npm_version: string;
|
||||
XPC_FLAGS: string;
|
||||
npm_config_node_gyp: string;
|
||||
npm_package_version: string;
|
||||
XPC_SERVICE_NAME: string;
|
||||
HOME: string;
|
||||
SHLVL: string;
|
||||
TERMINFO: string;
|
||||
HOMEBREW_PREFIX: string;
|
||||
npm_config_cache: string;
|
||||
LOGNAME: string;
|
||||
npm_lifecycle_script: string;
|
||||
XDG_DATA_DIRS: string;
|
||||
@@ -141,10 +165,12 @@ declare module '$env/dynamic/private' {
|
||||
INFOPATH: string;
|
||||
HOMEBREW_CELLAR: string;
|
||||
OSLogRateLimit: string;
|
||||
AGENT: string;
|
||||
SECURITYSESSIONID: string;
|
||||
npm_node_execpath: string;
|
||||
npm_config_prefix: string;
|
||||
OPENCODE: string;
|
||||
COLORTERM: string;
|
||||
NODE_ENV: string;
|
||||
[key: `PUBLIC_${string}`]: undefined;
|
||||
[key: `${string}`]: string | undefined;
|
||||
}
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
export { matchers } from './matchers.js';
|
||||
|
||||
export const nodes = [
|
||||
() => import('./nodes/0'),
|
||||
() => import('./nodes/1'),
|
||||
() => import('./nodes/2')
|
||||
];
|
||||
|
||||
export const server_loads = [];
|
||||
|
||||
export const dictionary = {
|
||||
"/": [2]
|
||||
};
|
||||
|
||||
export const hooks = {
|
||||
handleError: (({ error }) => { console.error(error) }),
|
||||
|
||||
reroute: (() => {}),
|
||||
transport: {}
|
||||
};
|
||||
|
||||
export const decoders = Object.fromEntries(Object.entries(hooks.transport).map(([k, v]) => [k, v.decode]));
|
||||
export const encoders = Object.fromEntries(Object.entries(hooks.transport).map(([k, v]) => [k, v.encode]));
|
||||
|
||||
export const hash = false;
|
||||
|
||||
export const decode = (type, value) => decoders[type](value);
|
||||
|
||||
export { default as root } from '../root.js';
|
||||
@@ -1 +0,0 @@
|
||||
export const matchers = {};
|
||||
@@ -1 +0,0 @@
|
||||
export { default as component } from "../../../../src/routes/+layout.svelte";
|
||||
@@ -1 +0,0 @@
|
||||
export { default as component } from "../../../../node_modules/@sveltejs/kit/src/runtime/components/svelte-5/error.svelte";
|
||||
@@ -1 +0,0 @@
|
||||
export { default as component } from "../../../../src/routes/+page.svelte";
|
||||
@@ -1,3 +0,0 @@
|
||||
import { asClassComponent } from 'svelte/legacy';
|
||||
import Root from './root.svelte';
|
||||
export default asClassComponent(Root);
|
||||
@@ -1,68 +0,0 @@
|
||||
<!-- This file is generated by @sveltejs/kit — do not edit it! -->
|
||||
<svelte:options runes={true} />
|
||||
<script>
|
||||
import { setContext, onMount, tick } from 'svelte';
|
||||
import { browser } from '$app/environment';
|
||||
|
||||
// stores
|
||||
let { stores, page, constructors, components = [], form, data_0 = null, data_1 = null } = $props();
|
||||
|
||||
if (!browser) {
|
||||
// svelte-ignore state_referenced_locally
|
||||
setContext('__svelte__', stores);
|
||||
}
|
||||
|
||||
if (browser) {
|
||||
$effect.pre(() => stores.page.set(page));
|
||||
} else {
|
||||
// svelte-ignore state_referenced_locally
|
||||
stores.page.set(page);
|
||||
}
|
||||
$effect(() => {
|
||||
stores;page;constructors;components;form;data_0;data_1;
|
||||
stores.page.notify();
|
||||
});
|
||||
|
||||
let mounted = $state(false);
|
||||
let navigated = $state(false);
|
||||
let title = $state(null);
|
||||
|
||||
onMount(() => {
|
||||
const unsubscribe = stores.page.subscribe(() => {
|
||||
if (mounted) {
|
||||
navigated = true;
|
||||
tick().then(() => {
|
||||
title = document.title || 'untitled page';
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
mounted = true;
|
||||
return unsubscribe;
|
||||
});
|
||||
|
||||
const Pyramid_1=$derived(constructors[1])
|
||||
</script>
|
||||
|
||||
{#if constructors[1]}
|
||||
{@const Pyramid_0 = constructors[0]}
|
||||
<!-- svelte-ignore binding_property_non_reactive -->
|
||||
<Pyramid_0 bind:this={components[0]} data={data_0} {form} params={page.params}>
|
||||
<!-- svelte-ignore binding_property_non_reactive -->
|
||||
<Pyramid_1 bind:this={components[1]} data={data_1} {form} params={page.params} />
|
||||
</Pyramid_0>
|
||||
|
||||
{:else}
|
||||
{@const Pyramid_0 = constructors[0]}
|
||||
<!-- svelte-ignore binding_property_non_reactive -->
|
||||
<Pyramid_0 bind:this={components[0]} data={data_0} {form} params={page.params} />
|
||||
|
||||
{/if}
|
||||
|
||||
{#if mounted}
|
||||
<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px">
|
||||
{#if navigated}
|
||||
{title}
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
@@ -1,53 +0,0 @@
|
||||
|
||||
import root from '../root.js';
|
||||
import { set_building, set_prerendering } from '__sveltekit/environment';
|
||||
import { set_assets } from '$app/paths/internal/server';
|
||||
import { set_manifest, set_read_implementation } from '__sveltekit/server';
|
||||
import { set_private_env, set_public_env } from '../../../node_modules/@sveltejs/kit/src/runtime/shared-server.js';
|
||||
|
||||
export const options = {
|
||||
app_template_contains_nonce: false,
|
||||
async: false,
|
||||
csp: {"mode":"auto","directives":{"upgrade-insecure-requests":false,"block-all-mixed-content":false},"reportOnly":{"upgrade-insecure-requests":false,"block-all-mixed-content":false}},
|
||||
csrf_check_origin: true,
|
||||
csrf_trusted_origins: [],
|
||||
embedded: false,
|
||||
env_public_prefix: 'PUBLIC_',
|
||||
env_private_prefix: '',
|
||||
hash_routing: false,
|
||||
hooks: null, // added lazily, via `get_hooks`
|
||||
preload_strategy: "modulepreload",
|
||||
root,
|
||||
service_worker: false,
|
||||
service_worker_options: undefined,
|
||||
templates: {
|
||||
app: ({ head, body, assets, nonce, env }) => "<!doctype html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\" />\n\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n\t\t" + head + "\n\t</head>\n\t<body data-sveltekit-preload-data=\"hover\">\n\t\t<div style=\"display: contents\">" + body + "</div>\n\t</body>\n</html>\n",
|
||||
error: ({ status, message }) => "<!doctype html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\" />\n\t\t<title>" + message + "</title>\n\n\t\t<style>\n\t\t\tbody {\n\t\t\t\t--bg: white;\n\t\t\t\t--fg: #222;\n\t\t\t\t--divider: #ccc;\n\t\t\t\tbackground: var(--bg);\n\t\t\t\tcolor: var(--fg);\n\t\t\t\tfont-family:\n\t\t\t\t\tsystem-ui,\n\t\t\t\t\t-apple-system,\n\t\t\t\t\tBlinkMacSystemFont,\n\t\t\t\t\t'Segoe UI',\n\t\t\t\t\tRoboto,\n\t\t\t\t\tOxygen,\n\t\t\t\t\tUbuntu,\n\t\t\t\t\tCantarell,\n\t\t\t\t\t'Open Sans',\n\t\t\t\t\t'Helvetica Neue',\n\t\t\t\t\tsans-serif;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t.error {\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tmax-width: 32rem;\n\t\t\t\tmargin: 0 1rem;\n\t\t\t}\n\n\t\t\t.status {\n\t\t\t\tfont-weight: 200;\n\t\t\t\tfont-size: 3rem;\n\t\t\t\tline-height: 1;\n\t\t\t\tposition: relative;\n\t\t\t\ttop: -0.05rem;\n\t\t\t}\n\n\t\t\t.message {\n\t\t\t\tborder-left: 1px solid var(--divider);\n\t\t\t\tpadding: 0 0 0 1rem;\n\t\t\t\tmargin: 0 0 0 1rem;\n\t\t\t\tmin-height: 2.5rem;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t}\n\n\t\t\t.message h1 {\n\t\t\t\tfont-weight: 400;\n\t\t\t\tfont-size: 1em;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t@media (prefers-color-scheme: dark) {\n\t\t\t\tbody {\n\t\t\t\t\t--bg: #222;\n\t\t\t\t\t--fg: #ddd;\n\t\t\t\t\t--divider: #666;\n\t\t\t\t}\n\t\t\t}\n\t\t</style>\n\t</head>\n\t<body>\n\t\t<div class=\"error\">\n\t\t\t<span class=\"status\">" + status + "</span>\n\t\t\t<div class=\"message\">\n\t\t\t\t<h1>" + message + "</h1>\n\t\t\t</div>\n\t\t</div>\n\t</body>\n</html>\n"
|
||||
},
|
||||
version_hash: "1rc0y0p"
|
||||
};
|
||||
|
||||
export async function get_hooks() {
|
||||
let handle;
|
||||
let handleFetch;
|
||||
let handleError;
|
||||
let handleValidationError;
|
||||
let init;
|
||||
|
||||
|
||||
let reroute;
|
||||
let transport;
|
||||
|
||||
|
||||
return {
|
||||
handle,
|
||||
handleFetch,
|
||||
handleError,
|
||||
handleValidationError,
|
||||
init,
|
||||
reroute,
|
||||
transport
|
||||
};
|
||||
}
|
||||
|
||||
export { set_assets, set_building, set_manifest, set_prerendering, set_private_env, set_public_env, set_read_implementation };
|
||||
@@ -1,3 +1,10 @@
|
||||
{
|
||||
"/": []
|
||||
"/": [
|
||||
"src/routes/+page.ts",
|
||||
"src/routes/+page.server.ts",
|
||||
"src/routes/+layout.ts",
|
||||
"src/routes/+layout.server.ts",
|
||||
"src/routes/+layout.ts",
|
||||
"src/routes/+layout.server.ts"
|
||||
]
|
||||
}
|
||||
+20
-6
@@ -11,14 +11,28 @@ type OutputDataShape<T> = MaybeWithVoid<Omit<App.PageData, RequiredKeys<T>> & Pa
|
||||
type EnsureDefined<T> = T extends null | undefined ? {} : T;
|
||||
type OptionalUnion<U extends Record<string, any>, A extends keyof U = U extends U ? keyof U : never> = U extends unknown ? { [P in Exclude<A, keyof U>]?: never } & U : never;
|
||||
export type Snapshot<T = any> = Kit.Snapshot<T>;
|
||||
type PageServerParentData = EnsureDefined<LayoutServerData>;
|
||||
type PageParentData = EnsureDefined<LayoutData>;
|
||||
type LayoutRouteId = RouteId | "/" | null
|
||||
type LayoutParams = RouteParams & { }
|
||||
type LayoutServerParentData = EnsureDefined<{}>;
|
||||
type LayoutParentData = EnsureDefined<{}>;
|
||||
|
||||
export type PageServerData = null;
|
||||
export type PageData = Expand<PageParentData>;
|
||||
export type PageProps = { params: RouteParams; data: PageData }
|
||||
export type LayoutServerData = null;
|
||||
export type LayoutData = Expand<LayoutParentData>;
|
||||
export type LayoutProps = { params: LayoutParams; data: LayoutData; children: import("svelte").Snippet }
|
||||
export type PageServerLoad<OutputData extends Partial<App.PageData> & Record<string, any> | void = Partial<App.PageData> & Record<string, any> | void> = 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 PageLoad<OutputData extends OutputDataShape<PageParentData> = OutputDataShape<PageParentData>> = Kit.Load<RouteParams, PageServerData, PageParentData, OutputData, RouteId>;
|
||||
export type PageLoadEvent = Parameters<PageLoad>[0];
|
||||
export type PageData = Expand<Omit<PageParentData, keyof Kit.LoadProperties<Awaited<ReturnType<typeof import('./proxy+page.js').load>>>> & OptionalUnion<EnsureDefined<Kit.LoadProperties<Awaited<ReturnType<typeof import('./proxy+page.js').load>>>>>>;
|
||||
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 LayoutServerLoad<OutputData extends Partial<App.PageData> & Record<string, any> | void = Partial<App.PageData> & Record<string, any> | void> = Kit.ServerLoad<LayoutParams, LayoutServerParentData, OutputData, LayoutRouteId>;
|
||||
export type LayoutServerLoadEvent = Parameters<LayoutServerLoad>[0];
|
||||
export type LayoutServerData = Expand<OptionalUnion<EnsureDefined<Kit.LoadProperties<Awaited<ReturnType<typeof import('./proxy+layout.server.js').load>>>>>>;
|
||||
export type LayoutLoad<OutputData extends Partial<App.PageData> & Record<string, any> | void = Partial<App.PageData> & Record<string, any> | void> = Kit.Load<LayoutParams, LayoutServerData, LayoutParentData, OutputData, LayoutRouteId>;
|
||||
export type LayoutLoadEvent = Parameters<LayoutLoad>[0];
|
||||
export type LayoutData = Expand<Omit<LayoutParentData, keyof Kit.LoadProperties<Awaited<ReturnType<typeof import('./proxy+layout.js').load>>>> & OptionalUnion<EnsureDefined<Kit.LoadProperties<Awaited<ReturnType<typeof import('./proxy+layout.js').load>>>>>>;
|
||||
export type LayoutProps = { params: LayoutParams; data: LayoutData; children: import("svelte").Snippet }
|
||||
export type RequestEvent = Kit.RequestEvent<RouteParams, RouteId>;
|
||||
@@ -0,0 +1,12 @@
|
||||
// @ts-nocheck
|
||||
// Server-only load function for the root layout.
|
||||
// Runs only on the server.
|
||||
// Provides shared data that requires server access (auth, user info, etc.).
|
||||
import type { LayoutServerLoad } from './$types';
|
||||
|
||||
export const load = async ({ locals }: Parameters<LayoutServerLoad>[0]) => {
|
||||
// Example: Load user session or server-side data here
|
||||
return {
|
||||
// Add server-side shared data here
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,12 @@
|
||||
// @ts-nocheck
|
||||
// Universal load function for the root layout.
|
||||
// Runs on both server and client.
|
||||
// Provides shared data to all child routes.
|
||||
import type { LayoutLoad } from './$types';
|
||||
|
||||
export const load = async () => {
|
||||
return {
|
||||
appName: 'My SvelteKit App'
|
||||
};
|
||||
};
|
||||
;null as any as LayoutLoad;
|
||||
@@ -0,0 +1,17 @@
|
||||
// @ts-nocheck
|
||||
// Server-only load function for the home page.
|
||||
// Runs only on the server with access to cookies, database, and server APIs.
|
||||
import type { PageServerLoad } from './$types';
|
||||
|
||||
export const load = async ({ cookies }: Parameters<PageServerLoad>[0]) => {
|
||||
// Example: Access cookies, database, or server APIs here
|
||||
const visitCount = parseInt(cookies.get('visit-count') || '0', 10);
|
||||
cookies.set('visit-count', String(visitCount + 1), {
|
||||
path: '/',
|
||||
httpOnly: true
|
||||
});
|
||||
|
||||
return {
|
||||
visitCount
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,12 @@
|
||||
// @ts-nocheck
|
||||
// Universal load function for the home page.
|
||||
// Runs on both server and client.
|
||||
// Returns data to the page component.
|
||||
import type { PageLoad } from './$types';
|
||||
|
||||
export const load = async () => {
|
||||
return {
|
||||
title: 'Welcome to SvelteKit'
|
||||
};
|
||||
};
|
||||
;null as any as PageLoad;
|
||||
Reference in New Issue
Block a user