Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/14 login #36

Merged
merged 10 commits into from
Nov 28, 2022
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ node_modules

# IDES
.idea
/.idea
.vscode
/.vscode
.fleet
/.fleet

/node_modules
.svelte
.svelte-kit
/build
/functions
/.vercel_build_output
Expand Down
187 changes: 187 additions & 0 deletions .svelte-kit/ambient.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@

// this file is generated — do not edit it


/// <reference types="@sveltejs/kit" />

/**
* Environment variables [loaded by Vite](https://vitejs.dev/guide/env-and-mode.html#env-files) from `.env` files and `process.env`. Like [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private), this module cannot be imported into client-side code. This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env).
*
* _Unlike_ [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private), the values exported from this module are statically injected into your bundle at build time, enabling optimisations like dead code elimination.
*
* ```ts
* import { API_KEY } from '$env/static/private';
* ```
*
* Note that all environment variables referenced in your code should be declared (for example in an `.env` file), even if they don't have a value until the app is deployed:
*
* ```
* MY_FEATURE_FLAG=""
* ```
*
* You can override `.env` values from the command line like so:
*
* ```bash
* MY_FEATURE_FLAG="enabled" npm run dev
* ```
*/
declare module '$env/static/private' {
export const NVM_RC_VERSION: string;
export const NODE: string;
export const INIT_CWD: string;
export const NVM_CD_FLAGS: string;
export const TERM: string;
export const SHELL: string;
export const npm_config_metrics_registry: string;
export const TMPDIR: string;
export const npm_config_global_prefix: string;
export const CAPACITOR_ANDROID_STUDIO_PATH: string;
export const NVIM_CONFIG: string;
export const COLOR: string;
export const TERM_SESSION_ID: string;
export const npm_config_noproxy: string;
export const npm_config_local_prefix: string;
export const ZSH: string;
export const __INTELLIJ_COMMAND_HISTFILE__: string;
export const NVM_DIR: 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;
export const LOGIN_SHELL: string;
export const PAGER: string;
export const LSCOLORS: string;
export const PATH: string;
export const TERMINAL_EMULATOR: string;
export const npm_package_json: string;
export const _: 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 XPC_FLAGS: string;
export const npm_config_node_gyp: string;
export const npm_package_version: string;
export const XPC_SERVICE_NAME: string;
export const SHLVL: string;
export const HOME: string;
export const npm_config_cache: string;
export const LESS: string;
export const LOGNAME: string;
export const npm_lifecycle_script: string;
export const LC_CTYPE: string;
export const BUN_INSTALL: string;
export const npm_config_user_agent: string;
export const npm_node_execpath: string;
export const npm_config_prefix: string;
export const NODE_ENV: string;
}

/**
* Similar to [`$env/static/private`](https://kit.svelte.dev/docs/modules#$env-static-private), except that it only includes environment variables that begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env) (which defaults to `PUBLIC_`), and can therefore safely be exposed to client-side code.
*
* Values are replaced statically at build time.
*
* ```ts
* import { PUBLIC_BASE_URL } from '$env/static/public';
* ```
*/
declare module '$env/static/public' {

}

/**
* This module provides access to runtime environment variables, as defined by the platform you're running on. For example if you're using [`adapter-node`](https://github.com/sveltejs/kit/tree/master/packages/adapter-node) (or running [`vite preview`](https://kit.svelte.dev/docs/cli)), this is equivalent to `process.env`. This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env).
*
* This module cannot be imported into client-side code.
*
* ```ts
* import { env } from '$env/dynamic/private';
* console.log(env.DEPLOYMENT_SPECIFIC_VARIABLE);
* ```
*
* > In `dev`, `$env/dynamic` always includes environment variables from `.env`. In `prod`, this behavior will depend on your adapter.
*/
declare module '$env/dynamic/private' {
export const env: {
NVM_RC_VERSION: string;
NODE: string;
INIT_CWD: string;
NVM_CD_FLAGS: string;
TERM: string;
SHELL: string;
npm_config_metrics_registry: string;
TMPDIR: string;
npm_config_global_prefix: string;
CAPACITOR_ANDROID_STUDIO_PATH: string;
NVIM_CONFIG: string;
COLOR: string;
TERM_SESSION_ID: string;
npm_config_noproxy: string;
npm_config_local_prefix: string;
ZSH: string;
__INTELLIJ_COMMAND_HISTFILE__: string;
NVM_DIR: string;
USER: string;
COMMAND_MODE: string;
npm_config_globalconfig: string;
SSH_AUTH_SOCK: string;
__CF_USER_TEXT_ENCODING: string;
npm_execpath: string;
LOGIN_SHELL: string;
PAGER: string;
LSCOLORS: string;
PATH: string;
TERMINAL_EMULATOR: string;
npm_package_json: string;
_: 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;
XPC_FLAGS: string;
npm_config_node_gyp: string;
npm_package_version: string;
XPC_SERVICE_NAME: string;
SHLVL: string;
HOME: string;
npm_config_cache: string;
LESS: string;
LOGNAME: string;
npm_lifecycle_script: string;
LC_CTYPE: string;
BUN_INSTALL: string;
npm_config_user_agent: string;
npm_node_execpath: string;
npm_config_prefix: string;
NODE_ENV: string;
[key: `PUBLIC_${string}`]: undefined;
[key: string]: string | undefined;
}
}

/**
* Similar to [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private), but only includes variables that begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env) (which defaults to `PUBLIC_`), and can therefore safely be exposed to client-side code.
*
* Note that public dynamic environment variables must all be sent from the server to the client, causing larger network requests — when possible, use `$env/static/public` instead.
*
* ```ts
* import { env } from '$env/dynamic/public';
* console.log(env.PUBLIC_DEPLOYMENT_SPECIFIC_VARIABLE);
* ```
*/
declare module '$env/dynamic/public' {
export const env: {
[key: `PUBLIC_${string}`]: string | undefined;
}
}
17 changes: 17 additions & 0 deletions .svelte-kit/generated/client-manifest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export { matchers } from './client-matchers.js';

export const nodes = [() => import('./nodes/0'),
() => import('./nodes/1'),
() => import('./nodes/2'),
() => import('./nodes/3')];

export const server_loads = [];

export const dictionary = {
"/": [2],
"/login": [3]
};

export const hooks = {
handleError: (({ error }) => { console.error(error) }),
};
1 change: 1 addition & 0 deletions .svelte-kit/generated/client-matchers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const matchers = {};
1 change: 1 addition & 0 deletions .svelte-kit/generated/nodes/0.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as component } from "../../../src/routes/+layout.svelte";
1 change: 1 addition & 0 deletions .svelte-kit/generated/nodes/1.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .svelte-kit/generated/nodes/2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as component } from "../../../src/routes/+page.svelte";
1 change: 1 addition & 0 deletions .svelte-kit/generated/nodes/3.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as component } from "../../../src/routes/login/+page.svelte";
53 changes: 53 additions & 0 deletions .svelte-kit/generated/root.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!-- This file is generated by @sveltejs/kit — do not edit it! -->
<script>
import { setContext, afterUpdate, onMount } from 'svelte';
import { browser } from '$app/environment';

// stores
export let stores;
export let page;

export let components;
export let form;
export let data_0 = null;
export let data_1 = null;

if (!browser) {
setContext('__svelte__', stores);
}

$: stores.page.set(page);
afterUpdate(stores.page.notify);

let mounted = false;
let navigated = false;
let title = null;

onMount(() => {
const unsubscribe = stores.page.subscribe(() => {
if (mounted) {
navigated = true;
title = document.title || 'untitled page';
}
});

mounted = true;
return unsubscribe;
});
</script>

{#if components[1]}
<svelte:component this={components[0]} data={data_0}>
<svelte:component this={components[1]} data={data_1} {form} />
</svelte:component>
{:else}
<svelte:component this={components[0]} data={data_0} {form} />
{/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}
39 changes: 39 additions & 0 deletions .svelte-kit/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"compilerOptions": {
"baseUrl": "..",
"paths": {},
"rootDirs": [
"..",
"./types"
],
"importsNotUsedAsValues": "error",
"isolatedModules": true,
"preserveValueImports": true,
"lib": [
"esnext",
"DOM",
"DOM.Iterable"
],
"moduleResolution": "node",
"module": "esnext",
"target": "esnext"
},
"include": [
"ambient.d.ts",
"./types/**/$types.d.ts",
"../vite.config.ts",
"../src/**/*.js",
"../src/**/*.ts",
"../src/**/*.svelte",
"../src/**/*.js",
"../src/**/*.ts",
"../src/**/*.svelte",
"../tests/**/*.js",
"../tests/**/*.ts",
"../tests/**/*.svelte"
],
"exclude": [
"../node_modules/**",
"./[!ambient.d.ts]**"
]
}
11 changes: 11 additions & 0 deletions .svelte-kit/types/route_meta_data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"/": [],
"/login": [],
"/register": [],
"/api/user": [
"src/routes/api/user/+server.ts"
],
"/api/login": [
"src/routes/api/login/+server.ts"
]
}
19 changes: 19 additions & 0 deletions .svelte-kit/types/src/routes/$types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import type * as Kit from '@sveltejs/kit';

type Expand<T> = T extends infer O ? { [K in keyof O]: O[K] } : never;
type RouteParams = { }
type RouteId = '/';
type MaybeWithVoid<T> = {} extends T ? T | void : T;
export type RequiredKeys<T> = { [K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K; }[keyof T];
type OutputDataShape<T> = MaybeWithVoid<Omit<App.PageData, RequiredKeys<T>> & Partial<Pick<App.PageData, keyof T & keyof App.PageData>> & Record<string, any>>
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;
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 LayoutServerData = null;
export type LayoutData = Expand<LayoutParentData>;
8 changes: 8 additions & 0 deletions .svelte-kit/types/src/routes/api/login/$types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import type * as Kit from '@sveltejs/kit';

type Expand<T> = T extends infer O ? { [K in keyof O]: O[K] } : never;
type RouteParams = { }
type RouteId = '/api/login';

export type RequestHandler = Kit.RequestHandler<RouteParams, RouteId>;
export type RequestEvent = Kit.RequestEvent<RouteParams, RouteId>;
8 changes: 8 additions & 0 deletions .svelte-kit/types/src/routes/api/user/$types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import type * as Kit from '@sveltejs/kit';

type Expand<T> = T extends infer O ? { [K in keyof O]: O[K] } : never;
type RouteParams = { }
type RouteId = '/api/user';

export type RequestHandler = Kit.RequestHandler<RouteParams, RouteId>;
export type RequestEvent = Kit.RequestEvent<RouteParams, RouteId>;
Loading