some module updates
This commit is contained in:
47
3Dbelte/eslint.config.mjs
Normal file
47
3Dbelte/eslint.config.mjs
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
import globals from 'globals';
|
||||||
|
import path from 'node:path';
|
||||||
|
import { fileURLToPath } from 'node:url';
|
||||||
|
import js from '@eslint/js';
|
||||||
|
import { FlatCompat } from '@eslint/eslintrc';
|
||||||
|
|
||||||
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
|
const __dirname = path.dirname(__filename);
|
||||||
|
const compat = new FlatCompat({
|
||||||
|
baseDirectory: __dirname,
|
||||||
|
recommendedConfig: js.configs.recommended,
|
||||||
|
allConfig: js.configs.all
|
||||||
|
});
|
||||||
|
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
ignores: [
|
||||||
|
'**/.DS_Store',
|
||||||
|
'**/node_modules',
|
||||||
|
'build',
|
||||||
|
'.svelte-kit',
|
||||||
|
'package',
|
||||||
|
'**/.env',
|
||||||
|
'**/.env.*',
|
||||||
|
'!**/.env.example',
|
||||||
|
'**/pnpm-lock.yaml',
|
||||||
|
'**/package-lock.json',
|
||||||
|
'**/yarn.lock'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
...compat.extends('eslint:recommended', 'plugin:svelte/recommended', 'prettier'),
|
||||||
|
{
|
||||||
|
languageOptions: {
|
||||||
|
globals: {
|
||||||
|
...globals.browser,
|
||||||
|
...globals.node
|
||||||
|
},
|
||||||
|
|
||||||
|
ecmaVersion: 2020,
|
||||||
|
sourceType: 'module',
|
||||||
|
|
||||||
|
parserOptions: {
|
||||||
|
extraFileExtensions: ['.svelte']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
@@ -14,23 +14,32 @@
|
|||||||
"format": "prettier --plugin-search-dir . --write ."
|
"format": "prettier --plugin-search-dir . --write ."
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@playwright/test": "^1.28.1",
|
"@eslint/eslintrc": "^3.2.0",
|
||||||
"@sveltejs/adapter-auto": "^3.3.1",
|
"@eslint/js": "^9.20.0",
|
||||||
"@sveltejs/kit": "^2.9.0",
|
"@playwright/test": "^1.50.1",
|
||||||
"@sveltejs/vite-plugin-svelte": "^4.0.0",
|
"@sveltejs/adapter-auto": "^4.0.0",
|
||||||
"eslint": "^8.28.0",
|
"@sveltejs/kit": "^2.17.1",
|
||||||
"eslint-config-prettier": "^8.5.0",
|
"@sveltejs/vite-plugin-svelte": "^5.0.3",
|
||||||
|
"eslint-config-prettier": "^10.0.1",
|
||||||
"eslint-plugin-svelte": "^2.46.1",
|
"eslint-plugin-svelte": "^2.46.1",
|
||||||
"prettier": "^3.1.0",
|
"globals": "^15.15.0",
|
||||||
"prettier-plugin-svelte": "^3.2.6",
|
"prettier": "^3.5.1",
|
||||||
"svelte": "^5.0.0",
|
"prettier-plugin-svelte": "^3.3.3",
|
||||||
"svelte-check": "^4.0.0",
|
"svelte": "^5.20.0",
|
||||||
"typescript": "^5.5.0",
|
"svelte-check": "^4.1.4",
|
||||||
"vite": "^5.4.4",
|
"typescript": "^5.7.3",
|
||||||
"vitest": "^1.0.0"
|
"vite": "^6.1.0",
|
||||||
|
"vitest": "^3.0.5"
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"cookie": "^1.0.2",
|
||||||
|
"eslint": "^9.20.1",
|
||||||
"jsonwebtoken": "^9.0.2"
|
"jsonwebtoken": "^9.0.2"
|
||||||
|
},
|
||||||
|
"pnpm": {
|
||||||
|
"onlyBuiltDependencies": [
|
||||||
|
"esbuild"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2204
3Dbelte/pnpm-lock.yaml
generated
Normal file
2204
3Dbelte/pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
|
|||||||
@@ -17,18 +17,20 @@
|
|||||||
$payload = await response.json();
|
$payload = await response.json();
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<h1>Welcome to 3D-Belte</h1>
|
<h1>Welcome to 3D-Belte</h1>
|
||||||
<p>Visit <a href="/about">about page</a> to read the documentation. First press send, than read.</p>
|
<p>Visit <a href="/about">about page</a> to read the documentation. First press send, than read.</p>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<div class="form">
|
<div class="form">
|
||||||
<span>JWT Token</span>
|
<span>JWT Token</span>
|
||||||
<textarea>{$token}</textarea>
|
<textarea>{$token}</textarea>
|
||||||
<span>Payload</span>
|
<span>Payload</span>
|
||||||
<textarea>{JSON.stringify($payload)}</textarea>
|
<textarea>{JSON.stringify($payload)}</textarea>
|
||||||
<button onclick={onSendClick}>send</button>
|
<button onclick={onSendClick}>send</button>
|
||||||
<button onclick={onReadClick}>read</button>
|
<button onclick={onReadClick}>read</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.body {
|
.body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@@ -47,4 +49,3 @@
|
|||||||
border: 1px solid gray;
|
border: 1px solid gray;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<p> Dies ist eine Dokumentation </p>
|
<p>Dies ist eine Dokumentation</p>
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
import { json } from "@sveltejs/kit";
|
import { json } from '@sveltejs/kit';
|
||||||
import jwt from "jsonwebtoken";
|
import jwt from 'jsonwebtoken';
|
||||||
|
|
||||||
export async function POST() {
|
export async function POST() {
|
||||||
const token = await jwt.sign({
|
const token = await jwt.sign(
|
||||||
id: 'sample-id',
|
{
|
||||||
secret: 'secret'
|
id: 'sample-id',
|
||||||
},"shhhhh");
|
secret: 'secret'
|
||||||
|
},
|
||||||
|
'shhhhh'
|
||||||
|
);
|
||||||
return json({ token });
|
return json({ token });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import { error } from "@sveltejs/kit";
|
import { error } from '@sveltejs/kit';
|
||||||
import { json } from "@sveltejs/kit";
|
import { json } from '@sveltejs/kit';
|
||||||
//
|
//
|
||||||
// import { verify } from 'jsonwebtoken';
|
// import { verify } from 'jsonwebtoken';
|
||||||
import jwt from 'jsonwebtoken'; const { sign, verify } = jwt;
|
import jwt from 'jsonwebtoken';
|
||||||
|
const { sign, verify } = jwt;
|
||||||
|
|
||||||
export function GET({ request }) {
|
export function GET({ request }) {
|
||||||
const authorization = request.headers.get('authorization');
|
const authorization = request.headers.get('authorization');
|
||||||
|
|||||||
Reference in New Issue
Block a user