sveltekit-auth-example 1.0.3
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/.eslintrc.cjs +20 -0
- package/.prettierrc +6 -0
- package/CHANGELOG.md +22 -0
- package/LICENSE +21 -0
- package/README.md +86 -0
- package/db_create.sql +307 -0
- package/package.json +59 -0
- package/src/app.html +12 -0
- package/src/global.d.ts +71 -0
- package/src/hooks.ts +43 -0
- package/src/lib/auth.ts +152 -0
- package/src/lib/config.ts +4 -0
- package/src/lib/focus.ts +10 -0
- package/src/routes/__error.svelte +16 -0
- package/src/routes/__layout.svelte +84 -0
- package/src/routes/_db.ts +17 -0
- package/src/routes/_send-in-blue.ts +29 -0
- package/src/routes/admin.svelte +40 -0
- package/src/routes/api/v1/admin.ts +21 -0
- package/src/routes/api/v1/teacher.ts +21 -0
- package/src/routes/api/v1/user.ts +36 -0
- package/src/routes/auth/[slug].ts +82 -0
- package/src/routes/auth/forgot.ts +42 -0
- package/src/routes/auth/google.ts +65 -0
- package/src/routes/auth/reset/[token].svelte +116 -0
- package/src/routes/auth/reset/index.ts +39 -0
- package/src/routes/forgot.svelte +77 -0
- package/src/routes/index.svelte +2 -0
- package/src/routes/info.svelte +6 -0
- package/src/routes/login.svelte +127 -0
- package/src/routes/profile.svelte +122 -0
- package/src/routes/register.svelte +133 -0
- package/src/routes/teachers.svelte +39 -0
- package/src/stores.ts +7 -0
- package/static/favicon.png +0 -0
- package/svelte.config.js +15 -0
- package/tsconfig.json +32 -0
package/svelte.config.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import adapter from '@sveltejs/adapter-node'
|
|
2
|
+
import preprocess from 'svelte-preprocess'
|
|
3
|
+
|
|
4
|
+
/** @type {import('@sveltejs/kit').Config} */
|
|
5
|
+
const config = {
|
|
6
|
+
preprocess: preprocess(),
|
|
7
|
+
|
|
8
|
+
kit: {
|
|
9
|
+
adapter: adapter({
|
|
10
|
+
out: 'build'
|
|
11
|
+
})
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default config
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./.svelte-kit/tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"moduleResolution": "node",
|
|
5
|
+
"module": "es2020",
|
|
6
|
+
"lib": ["es2020", "DOM"],
|
|
7
|
+
"target": "es2019",
|
|
8
|
+
/**
|
|
9
|
+
svelte-preprocess cannot figure out whether you have a value or a type, so tell TypeScript
|
|
10
|
+
to enforce using \`import type\` instead of \`import\` for Types.
|
|
11
|
+
*/
|
|
12
|
+
"importsNotUsedAsValues": "error",
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"resolveJsonModule": true,
|
|
15
|
+
/**
|
|
16
|
+
To have warnings/errors of the Svelte compiler at the correct position,
|
|
17
|
+
enable source maps by default.
|
|
18
|
+
*/
|
|
19
|
+
"sourceMap": true,
|
|
20
|
+
"esModuleInterop": true,
|
|
21
|
+
"skipLibCheck": true,
|
|
22
|
+
"forceConsistentCasingInFileNames": true,
|
|
23
|
+
"baseUrl": ".",
|
|
24
|
+
"allowJs": true,
|
|
25
|
+
"checkJs": true,
|
|
26
|
+
"paths": {
|
|
27
|
+
"$lib": ["src/lib"],
|
|
28
|
+
"$lib/*": ["src/lib/*"]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.ts", "src/**/*.svelte"]
|
|
32
|
+
}
|