chore: update project configuration and dependencies
- Adds new path aliases for improved code organization - Updates dependencies to latest versions including vue-sonner v2.0.0 - Removes sourcemap configuration from Nuxt config - Enhances API documentation with OpenAPI schemas - Removes unused security schemes and Wrangler configuration These changes modernize the project setup while improving documentation and removing unnecessary configurations.
This commit is contained in:
parent
e933a6cfd5
commit
0b9960b5d8
9 changed files with 68 additions and 38 deletions
|
|
@ -10,6 +10,9 @@
|
||||||
},
|
},
|
||||||
"aliases": {
|
"aliases": {
|
||||||
"components": "@/components",
|
"components": "@/components",
|
||||||
"utils": "@/utils"
|
"utils": "@/utils",
|
||||||
|
"ui": "@/components/ui",
|
||||||
|
"lib": "@/lib",
|
||||||
|
"composables": "@/composables"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,8 +53,6 @@ export default defineNuxtConfig({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
sourcemap: false,
|
|
||||||
|
|
||||||
future: {
|
future: {
|
||||||
compatibilityVersion: 4,
|
compatibilityVersion: 4,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
10
package.json
10
package.json
|
|
@ -45,12 +45,12 @@
|
||||||
"vaul-vue": "^0.4.1",
|
"vaul-vue": "^0.4.1",
|
||||||
"vee-validate": "^4.15.0",
|
"vee-validate": "^4.15.0",
|
||||||
"virtua": "^0.41.2",
|
"virtua": "^0.41.2",
|
||||||
"vue-sonner": "^1.3.2",
|
"vue-sonner": "^2.0.0",
|
||||||
"vue3-simple-icons": "^13.2.0",
|
"vue3-simple-icons": "^13.2.0",
|
||||||
"zod": "^3.25.7"
|
"zod": "^3.25.20"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@antfu/eslint-config": "^4.13.1",
|
"@antfu/eslint-config": "^4.13.2",
|
||||||
"@nuxt/eslint": "^1.4.1",
|
"@nuxt/eslint": "^1.4.1",
|
||||||
"@nuxt/eslint-config": "^1.4.1",
|
"@nuxt/eslint-config": "^1.4.1",
|
||||||
"@nuxthub/core": "^0.8.27",
|
"@nuxthub/core": "^0.8.27",
|
||||||
|
|
@ -62,13 +62,13 @@
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"eslint": "^9.27.0",
|
"eslint": "^9.27.0",
|
||||||
"lint-staged": "^16.0.0",
|
"lint-staged": "^16.0.0",
|
||||||
"nuxt": "^3.17.3",
|
"nuxt": "^3.17.4",
|
||||||
"shadcn-nuxt": "^2.1.0",
|
"shadcn-nuxt": "^2.1.0",
|
||||||
"simple-git-hooks": "^2.13.0",
|
"simple-git-hooks": "^2.13.0",
|
||||||
"tailwind-merge": "^3.3.0",
|
"tailwind-merge": "^3.3.0",
|
||||||
"tailwindcss-animate": "^1.0.7",
|
"tailwindcss-animate": "^1.0.7",
|
||||||
"vue-tsc": "^2.2.10",
|
"vue-tsc": "^2.2.10",
|
||||||
"wrangler": "^4.15.2"
|
"wrangler": "^4.16.1"
|
||||||
},
|
},
|
||||||
"simple-git-hooks": {
|
"simple-git-hooks": {
|
||||||
"pre-commit": "npm run lint-staged"
|
"pre-commit": "npm run lint-staged"
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,29 @@
|
||||||
import { LinkSchema } from '@@/schemas/link'
|
import { LinkSchema } from '@@/schemas/link'
|
||||||
|
|
||||||
|
defineRouteMeta({
|
||||||
|
openAPI: {
|
||||||
|
description: 'Create a new short link',
|
||||||
|
requestBody: {
|
||||||
|
required: true,
|
||||||
|
content: {
|
||||||
|
'application/json': {
|
||||||
|
// Need: https://github.com/nitrojs/nitro/issues/2974
|
||||||
|
schema: {
|
||||||
|
type: 'object',
|
||||||
|
required: ['url'],
|
||||||
|
properties: {
|
||||||
|
url: {
|
||||||
|
type: 'string',
|
||||||
|
description: 'The URL to shorten',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
export default eventHandler(async (event) => {
|
export default eventHandler(async (event) => {
|
||||||
const link = await readValidatedBody(event, LinkSchema.parse)
|
const link = await readValidatedBody(event, LinkSchema.parse)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,11 @@
|
||||||
defineRouteMeta({
|
defineRouteMeta({
|
||||||
openAPI: {
|
openAPI: {
|
||||||
description: 'Get the location of the user',
|
description: 'Get the location of the user',
|
||||||
security: securitySchemes,
|
responses: {
|
||||||
|
200: {
|
||||||
|
description: 'The location of the user',
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
defineRouteMeta({
|
defineRouteMeta({
|
||||||
openAPI: {
|
openAPI: {
|
||||||
description: 'Verify the site token',
|
description: 'Verify the site token',
|
||||||
security: securitySchemes,
|
|
||||||
responses: {
|
responses: {
|
||||||
200: {
|
200: {
|
||||||
description: 'The site token is valid',
|
description: 'The site token is valid',
|
||||||
|
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
export const securitySchemes = [{
|
|
||||||
type: 'http',
|
|
||||||
scheme: 'bearer',
|
|
||||||
description: 'The site\'s token',
|
|
||||||
}]
|
|
||||||
30
wrangler.jsonc
Normal file
30
wrangler.jsonc
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
"$schema": "node_modules/wrangler/config-schema.json",
|
||||||
|
"name": "sink",
|
||||||
|
"main": "dist/server/index.mjs",
|
||||||
|
"assets": {
|
||||||
|
"binding": "ASSETS",
|
||||||
|
"directory": "dist/public"
|
||||||
|
},
|
||||||
|
"compatibility_date": "2025-05-08",
|
||||||
|
"compatibility_flags": [
|
||||||
|
"nodejs_compat"
|
||||||
|
],
|
||||||
|
"keep_vars": true,
|
||||||
|
"upload_source_maps": true,
|
||||||
|
"ai": {
|
||||||
|
"binding": "AI"
|
||||||
|
},
|
||||||
|
"analytics_engine_datasets": [
|
||||||
|
{
|
||||||
|
"binding": "ANALYTICS",
|
||||||
|
"dataset": "sink"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"kv_namespaces": [
|
||||||
|
{
|
||||||
|
"binding": "KV",
|
||||||
|
"id": "ef93d42dc4b34969bab404d2e80f8dd3" // IMPORTANT: Change this to your KV namespace ID
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
name = "sink"
|
|
||||||
main = "dist/server/index.mjs"
|
|
||||||
compatibility_date = "2025-05-08"
|
|
||||||
compatibility_flags = [ "nodejs_compat" ]
|
|
||||||
keep_vars = true
|
|
||||||
|
|
||||||
[dev]
|
|
||||||
port = 3000
|
|
||||||
|
|
||||||
[assets]
|
|
||||||
directory = "dist/public"
|
|
||||||
binding = "ASSETS"
|
|
||||||
|
|
||||||
[ai]
|
|
||||||
binding = "AI"
|
|
||||||
|
|
||||||
[[kv_namespaces]]
|
|
||||||
binding = "KV"
|
|
||||||
id = "ef93d42dc4b34969bab404d2e80f8dd3"
|
|
||||||
|
|
||||||
[[analytics_engine_datasets]]
|
|
||||||
binding = "ANALYTICS"
|
|
||||||
dataset = "sink"
|
|
||||||
Loading…
Reference in a new issue