This commit is contained in:
taskylizard 2024-02-25 02:13:36 +00:00
parent 9065a0aeb7
commit 1fe7aa16df
No known key found for this signature in database
GPG Key ID: 1820131ED1A24120
8 changed files with 92 additions and 62 deletions

7
api/eslint.config.js Normal file
View File

@ -0,0 +1,7 @@
// @ts-check
import tasky from '@taskylizard/eslint-config'
export default tasky({
browser: true,
ignores: ['**/.nitro']
})

View File

@ -1,19 +1,24 @@
{ {
"name": "@fmhy/api", "name": "@fmhy/api",
"version": "1.0.0", "version": "1.0.0",
"type": "module",
"description": "FMHY API.", "description": "FMHY API.",
"main": "index.js",
"scripts": { "scripts": {
"prepare": "nitropack prepare", "prepare": "nitropack prepare",
"dev": "nitropack dev", "dev": "nitropack dev",
"build": "nitropack build", "build": "nitropack build",
"preview": "node .output/server/index.mjs", "preview": "node .output/server/index.mjs",
"types": "nitropack prepare" "types": "nitropack prepare",
"lint": "eslint --cache -f pretty routes types middleware nitro.config.ts"
}, },
"dependencies": { "dependencies": {
"itty-fetcher": "^0.9.4", "itty-fetcher": "^0.9.4",
"nitro-cors": "^0.7.0", "nitro-cors": "^0.7.0",
"nitropack": "latest" "nitropack": "latest"
}, },
"devDependencies": {
"@taskylizard/eslint-config": "^1.1.1",
"eslint": "^8.56.0"
},
"author": "taskylizard <taskylizard@fmhy.net>" "author": "taskylizard <taskylizard@fmhy.net>"
} }

View File

@ -41,7 +41,7 @@ const authors = computed(() =>
<template> <template>
<div class="flex flex-wrap gap-4 pt-2"> <div class="flex flex-wrap gap-4 pt-2">
<div v-for="(c, index) of authors" class="flex gap-2 items-center"> <div v-for="(c, index) of authors" class="flex gap-2 items-center">
<img :src="`${c.github}.png`" class="w-8 h-8 rounded-full" /> <img :src="`${c.github}.png`" class="w-8 h-8 rounded-full" >
<a :href="c.github">{{ c.name }}</a> <a :href="c.github">{{ c.name }}</a>
<span v-if="index < authors.length - 1"></span> <span v-if="index < authors.length - 1"></span>
</div> </div>

View File

@ -3,5 +3,8 @@ import tasky from '@taskylizard/eslint-config'
export default tasky({ export default tasky({
vue: true, vue: true,
browser: true typescript: true,
browser: true,
unocss: true,
files: ['**/.vitepress/**']
}) })

View File

@ -6,8 +6,8 @@
"dev": "vitepress dev", "dev": "vitepress dev",
"build": "vitepress build", "build": "vitepress build",
"preview": "vitepress preview", "preview": "vitepress preview",
"lint": "eslint --cache --fix .", "lint": "eslint --cache -f pretty .",
"og:dev": "x-satori -t ./.vitepress/hooks/Template.vue -c ./.vitepress/hooks/satoriConfig.ts --dev" "og": "x-satori -t ./.vitepress/hooks/Template.vue -c ./.vitepress/hooks/satoriConfig.ts --dev"
}, },
"dependencies": { "dependencies": {
"@headlessui/vue": "^1.7.17", "@headlessui/vue": "^1.7.17",
@ -24,6 +24,8 @@
"zod": "^3.22.4" "zod": "^3.22.4"
}, },
"devDependencies": { "devDependencies": {
"@taskylizard/eslint-config": "^1.1.1",
"eslint": "^8.56.0",
"@iconify-json/carbon": "^1.1.28", "@iconify-json/carbon": "^1.1.28",
"@iconify-json/twemoji": "^1.1.15", "@iconify-json/twemoji": "^1.1.15",
"@types/fs-extra": "^11.0.4", "@types/fs-extra": "^11.0.4",

29
docs/tsconfig.json Normal file
View File

@ -0,0 +1,29 @@
{
"compilerOptions": {
"verbatimModuleSyntax": true,
"baseUrl": ".",
"module": "esnext",
"target": "esnext",
"lib": [
"DOM",
"ESNext"
],
"strict": true,
"jsx": "preserve",
"esModuleInterop": true,
"skipLibCheck": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"noUnusedLocals": true,
"strictNullChecks": true,
"forceConsistentCasingInFileNames": true,
"types": [
"vite/client",
"vitepress"
]
},
"include": [
".vitepress",
"eslint.config.js"
]
}

View File

@ -13,12 +13,11 @@
"api:prepare": "pnpm -F api prepare", "api:prepare": "pnpm -F api prepare",
"api:preview": "pnpm -F api preview", "api:preview": "pnpm -F api preview",
"format": "prettier -w --cache --check .", "format": "prettier -w --cache --check .",
"og:dev": "pnpm -F docs og",
"lint": "pnpm --parallel -R lint", "lint": "pnpm --parallel -R lint",
"postinstall": "pnpm -F api types" "postinstall": "pnpm -F api types"
}, },
"devDependencies": { "devDependencies": {
"@taskylizard/eslint-config": "^1.1.1",
"eslint": "^8.56.0",
"prettier": "^3.2.4" "prettier": "^3.2.4"
} }
} }

View File

@ -8,12 +8,6 @@ importers:
.: .:
devDependencies: devDependencies:
'@taskylizard/eslint-config':
specifier: ^1.1.1
version: 1.1.1(eslint-plugin-import@2.29.1)(eslint@8.56.0)(prettier@3.2.4)(typescript@5.3.3)
eslint:
specifier: ^8.56.0
version: 8.56.0
prettier: prettier:
specifier: ^3.2.4 specifier: ^3.2.4
version: 3.2.4 version: 3.2.4
@ -29,6 +23,13 @@ importers:
nitropack: nitropack:
specifier: latest specifier: latest
version: 2.8.1 version: 2.8.1
devDependencies:
'@taskylizard/eslint-config':
specifier: ^1.1.1
version: 1.1.1(eslint-plugin-import@2.29.1)(eslint@8.56.0)(prettier@3.2.4)(typescript@5.3.3)
eslint:
specifier: ^8.56.0
version: 8.56.0
docs: docs:
dependencies: dependencies:
@ -58,7 +59,7 @@ importers:
version: 0.58.4(postcss@8.4.33)(vite@5.0.11) version: 0.58.4(postcss@8.4.33)(vite@5.0.11)
vitepress: vitepress:
specifier: npm:@taskylizard/vitepress@1.0.10 specifier: npm:@taskylizard/vitepress@1.0.10
version: /@taskylizard/vitepress@1.0.10(@types/node@20.11.15)(nprogress@0.2.0)(postcss@8.4.33)(search-insights@2.13.0)(typescript@5.3.3) version: /@taskylizard/vitepress@1.0.10(@algolia/client-search@4.22.1)(@types/node@20.11.15)(nprogress@0.2.0)(postcss@8.4.33)(search-insights@2.13.0)(typescript@5.3.3)
vue: vue:
specifier: ^3.4.15 specifier: ^3.4.15
version: 3.4.15(typescript@5.3.3) version: 3.4.15(typescript@5.3.3)
@ -75,6 +76,9 @@ importers:
'@iconify-json/twemoji': '@iconify-json/twemoji':
specifier: ^1.1.15 specifier: ^1.1.15
version: 1.1.15 version: 1.1.15
'@taskylizard/eslint-config':
specifier: ^1.1.1
version: 1.1.1(eslint-plugin-import@2.29.1)(eslint@8.56.0)(prettier@3.2.4)(typescript@5.3.3)
'@types/fs-extra': '@types/fs-extra':
specifier: ^11.0.4 specifier: ^11.0.4
version: 11.0.4 version: 11.0.4
@ -84,6 +88,9 @@ importers:
'@types/nprogress': '@types/nprogress':
specifier: ^0.2.3 specifier: ^0.2.3
version: 0.2.3 version: 0.2.3
eslint:
specifier: ^8.56.0
version: 8.56.0
packages: packages:
@ -92,51 +99,47 @@ packages:
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
dev: true dev: true
/@algolia/autocomplete-core@1.9.3(algoliasearch@4.22.1)(search-insights@2.13.0): /@algolia/autocomplete-core@1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1)(search-insights@2.13.0):
resolution: {integrity: sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==} resolution: {integrity: sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==}
dependencies: dependencies:
'@algolia/autocomplete-plugin-algolia-insights': 1.9.3(algoliasearch@4.22.1)(search-insights@2.13.0) '@algolia/autocomplete-plugin-algolia-insights': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1)(search-insights@2.13.0)
'@algolia/autocomplete-shared': 1.9.3(algoliasearch@4.22.1) '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1)
transitivePeerDependencies: transitivePeerDependencies:
- '@algolia/client-search' - '@algolia/client-search'
- algoliasearch - algoliasearch
- search-insights - search-insights
dev: false dev: false
/@algolia/autocomplete-plugin-algolia-insights@1.9.3(algoliasearch@4.22.1)(search-insights@2.13.0): /@algolia/autocomplete-plugin-algolia-insights@1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1)(search-insights@2.13.0):
resolution: {integrity: sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg==} resolution: {integrity: sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg==}
peerDependencies: peerDependencies:
search-insights: '>= 1 < 3' search-insights: '>= 1 < 3'
dependencies: dependencies:
'@algolia/autocomplete-shared': 1.9.3(algoliasearch@4.22.1) '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1)
search-insights: 2.13.0 search-insights: 2.13.0
transitivePeerDependencies: transitivePeerDependencies:
- '@algolia/client-search' - '@algolia/client-search'
- algoliasearch - algoliasearch
dev: false dev: false
/@algolia/autocomplete-preset-algolia@1.9.3(algoliasearch@4.22.1): /@algolia/autocomplete-preset-algolia@1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1):
resolution: {integrity: sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA==} resolution: {integrity: sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA==}
peerDependencies: peerDependencies:
'@algolia/client-search': '>= 4.9.1 < 6' '@algolia/client-search': '>= 4.9.1 < 6'
algoliasearch: '>= 4.9.1 < 6' algoliasearch: '>= 4.9.1 < 6'
peerDependenciesMeta:
'@algolia/client-search':
optional: true
dependencies: dependencies:
'@algolia/autocomplete-shared': 1.9.3(algoliasearch@4.22.1) '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1)
'@algolia/client-search': 4.22.1
algoliasearch: 4.22.1 algoliasearch: 4.22.1
dev: false dev: false
/@algolia/autocomplete-shared@1.9.3(algoliasearch@4.22.1): /@algolia/autocomplete-shared@1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1):
resolution: {integrity: sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==} resolution: {integrity: sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==}
peerDependencies: peerDependencies:
'@algolia/client-search': '>= 4.9.1 < 6' '@algolia/client-search': '>= 4.9.1 < 6'
algoliasearch: '>= 4.9.1 < 6' algoliasearch: '>= 4.9.1 < 6'
peerDependenciesMeta:
'@algolia/client-search':
optional: true
dependencies: dependencies:
'@algolia/client-search': 4.22.1
algoliasearch: 4.22.1 algoliasearch: 4.22.1
dev: false dev: false
@ -579,10 +582,10 @@ packages:
resolution: {integrity: sha512-SPiDHaWKQZpwR2siD0KQUwlStvIAnEyK6tAE2h2Wuoq8ue9skzhlyVQ1ddzOxX6khULnAALDiR/isSF3bnuciA==} resolution: {integrity: sha512-SPiDHaWKQZpwR2siD0KQUwlStvIAnEyK6tAE2h2Wuoq8ue9skzhlyVQ1ddzOxX6khULnAALDiR/isSF3bnuciA==}
dev: false dev: false
/@docsearch/js@3.5.2(search-insights@2.13.0): /@docsearch/js@3.5.2(@algolia/client-search@4.22.1)(search-insights@2.13.0):
resolution: {integrity: sha512-p1YFTCDflk8ieHgFJYfmyHBki1D61+U9idwrLh+GQQMrBSP3DLGKpy0XUJtPjAOPltcVbqsTjiPFfH7JImjUNg==} resolution: {integrity: sha512-p1YFTCDflk8ieHgFJYfmyHBki1D61+U9idwrLh+GQQMrBSP3DLGKpy0XUJtPjAOPltcVbqsTjiPFfH7JImjUNg==}
dependencies: dependencies:
'@docsearch/react': 3.5.2(search-insights@2.13.0) '@docsearch/react': 3.5.2(@algolia/client-search@4.22.1)(search-insights@2.13.0)
preact: 10.19.3 preact: 10.19.3
transitivePeerDependencies: transitivePeerDependencies:
- '@algolia/client-search' - '@algolia/client-search'
@ -592,7 +595,7 @@ packages:
- search-insights - search-insights
dev: false dev: false
/@docsearch/react@3.5.2(search-insights@2.13.0): /@docsearch/react@3.5.2(@algolia/client-search@4.22.1)(search-insights@2.13.0):
resolution: {integrity: sha512-9Ahcrs5z2jq/DcAvYtvlqEBHImbm4YJI8M9y0x6Tqg598P40HTEkX7hsMcIuThI+hTFxRGZ9hll0Wygm2yEjng==} resolution: {integrity: sha512-9Ahcrs5z2jq/DcAvYtvlqEBHImbm4YJI8M9y0x6Tqg598P40HTEkX7hsMcIuThI+hTFxRGZ9hll0Wygm2yEjng==}
peerDependencies: peerDependencies:
'@types/react': '>= 16.8.0 < 19.0.0' '@types/react': '>= 16.8.0 < 19.0.0'
@ -609,8 +612,8 @@ packages:
search-insights: search-insights:
optional: true optional: true
dependencies: dependencies:
'@algolia/autocomplete-core': 1.9.3(algoliasearch@4.22.1)(search-insights@2.13.0) '@algolia/autocomplete-core': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1)(search-insights@2.13.0)
'@algolia/autocomplete-preset-algolia': 1.9.3(algoliasearch@4.22.1) '@algolia/autocomplete-preset-algolia': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1)
'@docsearch/css': 3.5.2 '@docsearch/css': 3.5.2
algoliasearch: 4.22.1 algoliasearch: 4.22.1
search-insights: 2.13.0 search-insights: 2.13.0
@ -860,8 +863,8 @@ packages:
ajv: 6.12.6 ajv: 6.12.6
debug: 4.3.4 debug: 4.3.4
espree: 9.6.1 espree: 9.6.1
globals: 13.23.0 globals: 13.24.0
ignore: 5.2.4 ignore: 5.3.0
import-fresh: 3.3.0 import-fresh: 3.3.0
js-yaml: 4.1.0 js-yaml: 4.1.0
minimatch: 3.1.2 minimatch: 3.1.2
@ -1673,7 +1676,7 @@ packages:
- svelte-eslint-parser - svelte-eslint-parser
dev: true dev: true
/@taskylizard/vitepress@1.0.10(@types/node@20.11.15)(nprogress@0.2.0)(postcss@8.4.33)(search-insights@2.13.0)(typescript@5.3.3): /@taskylizard/vitepress@1.0.10(@algolia/client-search@4.22.1)(@types/node@20.11.15)(nprogress@0.2.0)(postcss@8.4.33)(search-insights@2.13.0)(typescript@5.3.3):
resolution: {integrity: sha512-RujuaVtPmoWis1b1B+BdAkakRPRxsZ+y4g35auJZpf7m+xt+vG2Bw6MdwdpJVPfkfqAuNRYyEaYJRQVpmlNnsw==} resolution: {integrity: sha512-RujuaVtPmoWis1b1B+BdAkakRPRxsZ+y4g35auJZpf7m+xt+vG2Bw6MdwdpJVPfkfqAuNRYyEaYJRQVpmlNnsw==}
hasBin: true hasBin: true
peerDependencies: peerDependencies:
@ -1686,7 +1689,7 @@ packages:
optional: true optional: true
dependencies: dependencies:
'@docsearch/css': 3.5.2 '@docsearch/css': 3.5.2
'@docsearch/js': 3.5.2(search-insights@2.13.0) '@docsearch/js': 3.5.2(@algolia/client-search@4.22.1)(search-insights@2.13.0)
'@types/markdown-it': 13.0.7 '@types/markdown-it': 13.0.7
'@vitejs/plugin-vue': 5.0.3(vite@5.0.11)(vue@3.4.15) '@vitejs/plugin-vue': 5.0.3(vite@5.0.11)(vue@3.4.15)
'@vue/devtools-api': 6.5.1 '@vue/devtools-api': 6.5.1
@ -2452,18 +2455,12 @@ packages:
negotiator: 0.6.3 negotiator: 0.6.3
dev: false dev: false
/acorn-jsx@5.3.2(acorn@8.11.0): /acorn-jsx@5.3.2(acorn@8.11.3):
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
peerDependencies: peerDependencies:
acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 acorn: ^6.0.0 || ^7.0.0 || ^8.0.0
dependencies: dependencies:
acorn: 8.11.0 acorn: 8.11.3
dev: true
/acorn@8.11.0:
resolution: {integrity: sha512-hNiSyky+cuYVALBrsjB7f9gMN9P4u09JyAiMNMLaVfsmkDJuH84M1T/0pfDX/OJfGWcobd2A7ecXYzygn8wibA==}
engines: {node: '>=0.4.0'}
hasBin: true
dev: true dev: true
/acorn@8.11.3: /acorn@8.11.3:
@ -4020,9 +4017,9 @@ packages:
file-entry-cache: 6.0.1 file-entry-cache: 6.0.1
find-up: 5.0.0 find-up: 5.0.0
glob-parent: 6.0.2 glob-parent: 6.0.2
globals: 13.23.0 globals: 13.24.0
graphemer: 1.4.0 graphemer: 1.4.0
ignore: 5.2.4 ignore: 5.3.0
imurmurhash: 0.1.4 imurmurhash: 0.1.4
is-glob: 4.0.3 is-glob: 4.0.3
is-path-inside: 3.0.3 is-path-inside: 3.0.3
@ -4043,8 +4040,8 @@ packages:
resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies: dependencies:
acorn: 8.11.0 acorn: 8.11.3
acorn-jsx: 5.3.2(acorn@8.11.0) acorn-jsx: 5.3.2(acorn@8.11.3)
eslint-visitor-keys: 3.4.3 eslint-visitor-keys: 3.4.3
dev: true dev: true
@ -4438,13 +4435,6 @@ packages:
engines: {node: '>=4'} engines: {node: '>=4'}
dev: false dev: false
/globals@13.23.0:
resolution: {integrity: sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==}
engines: {node: '>=8'}
dependencies:
type-fest: 0.20.2
dev: true
/globals@13.24.0: /globals@13.24.0:
resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==}
engines: {node: '>=8'} engines: {node: '>=8'}
@ -4644,11 +4634,6 @@ packages:
safer-buffer: 2.1.2 safer-buffer: 2.1.2
dev: false dev: false
/ignore@5.2.4:
resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==}
engines: {node: '>= 4'}
dev: true
/ignore@5.3.0: /ignore@5.3.0:
resolution: {integrity: sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==} resolution: {integrity: sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==}
engines: {node: '>= 4'} engines: {node: '>= 4'}