diff --git a/eslint.config.js b/eslint.config.js index 381f1c0f..9294ad19 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -18,7 +18,7 @@ export default antfu( '**/.vscode', '**/**.yml', '**/**.md', - 'playground/pergel', + 'packages/nuxt/playground/pergel', 'packages/nuxt/pergel', '**/README.yaml', ], diff --git a/packages/nuxt/.gitignore b/packages/nuxt/.gitignore index a091b5dd..44c905ea 100644 --- a/packages/nuxt/.gitignore +++ b/packages/nuxt/.gitignore @@ -62,4 +62,5 @@ lib dist pergel schema.graphql -!src/**/pergel \ No newline at end of file +!src/**/pergel +!playground/pergel diff --git a/packages/nuxt/build.config.ts b/packages/nuxt/build.config.ts index e55c06e1..2d89d0b5 100644 --- a/packages/nuxt/build.config.ts +++ b/packages/nuxt/build.config.ts @@ -17,6 +17,12 @@ export const external = [ 'drizzle-kit', 'postgres', '@egoist/tailwindcss-icons', + 'drizzle', + // #Auth + 'oslo', + 'lucia', + '@lucia-auth/adapter-drizzle', + '@lucia-auth/adapter-postgresql', // @ts-expect-error ...Object.keys(pkg.peerDependencies || {}), ] diff --git a/packages/nuxt/nuxt.config.ts b/packages/nuxt/nuxt.config.ts index 8937dd51..f7eddc5d 100644 --- a/packages/nuxt/nuxt.config.ts +++ b/packages/nuxt/nuxt.config.ts @@ -4,7 +4,6 @@ export default defineNuxtConfig({ devtools: true, pergel: { pergelDir: 'pergel', - rootDir: 'playground', debug: true, projects: { test: { @@ -24,5 +23,4 @@ export default defineNuxtConfig({ }, }, }, - }) diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index 07401198..4664f436 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -1,7 +1,7 @@ { "name": "@pergel/nuxt", "type": "module", - "version": "0.4.4", + "version": "0.5.0-beta.15", "description": "Nuxt Full Stack modules. Start your next nuxt project fast and strong.", "author": "Mehmet @productdevbook", "license": "MIT", @@ -37,16 +37,6 @@ "main": "./dist/module.cjs", "module": "./dist/module.mjs", "types": "./dist/types.d.ts", - "typesVersions": { - "*": { - "*": [ - "./dist/*" - ], - "drizzle/*": [ - "./lib/drizzle/*" - ] - } - }, "files": [ "dist", "lib" @@ -76,7 +66,8 @@ "local-pkg": "^0.5.0", "minimatch": "^9.0.3", "pathe": "^1.1.1", - "sirv": "^2.0.4" + "sirv": "^2.0.4", + "typescript": "^5.3.3" }, "devDependencies": { "@aws-sdk/client-ses": "^3.484.0", @@ -84,6 +75,8 @@ "@iconify-json/carbon": "^1.1.27", "@iconify-json/ph": "^1.1.9", "@json2csv/node": "^7.0.4", + "@lucia-auth/adapter-drizzle": "1.0.0-beta.4", + "@lucia-auth/adapter-postgresql": "3.0.0-beta.8", "@nuxt/devtools-ui-kit": "^1.0.6", "@nuxt/module-builder": "^0.5.5", "@nuxt/schema": "^3.9.0", @@ -95,9 +88,12 @@ "@types/node-cron": "^3.0.11", "bullmq": "^5.1.0", "esbuild-plugin-file-path-extensions": "^2.0.0", + "lucia": "3.0.0-beta.13", "node-cron": "^3.0.3", "nuxt": "^3.9.0", + "oslo": "^0.26.2", "p-timeout": "^6.1.2", + "pergel": "workspace:^", "vitest": "^1.1.1" }, "publishConfig": { diff --git a/packages/nuxt/playground/nuxt.config.ts b/packages/nuxt/playground/nuxt.config.ts index 70201091..95a74056 100644 --- a/packages/nuxt/playground/nuxt.config.ts +++ b/packages/nuxt/playground/nuxt.config.ts @@ -58,6 +58,7 @@ export default defineNuxtConfig({ graphqlYoga: { mergeSchemas: true, }, + lucia: true, drizzle: true, ui: true, }, diff --git a/packages/nuxt/playground/package.json b/packages/nuxt/playground/package.json index bd4884ae..a2597669 100644 --- a/packages/nuxt/playground/package.json +++ b/packages/nuxt/playground/package.json @@ -11,15 +11,19 @@ "@aws-sdk/client-ses": "^3.484.0", "@faker-js/faker": "^8.3.1", "@json2csv/node": "^7.0.4", + "@lucia-auth/adapter-drizzle": "^1.0.0-beta.4", + "@lucia-auth/adapter-postgresql": "^3.0.0-beta.8", "@pergel/graphql": "workspace:*", "@pergel/module-s3": "workspace:*", - "@pergel/module-ui": "workspace:*", - "bullmq": "^5.1.0", + "@pergel/module-ui": "*", + "bullmq": "^4.17.0", "dotenv": "^16.3.1", "drizzle-kit": "^0.20.9", "drizzle-orm": "^0.29.2", "ioredis": "^5.3.2", + "lucia": "^3.0.0-beta.13", "node-cron": "^3.0.3", + "oslo": "^0.25.1", "p-timeout": "^6.1.2", "postgres": "^3.4.3" }, diff --git a/packages/nuxt/playground/pages/auth/login.vue b/packages/nuxt/playground/pages/auth/login.vue index ef70fb5e..926b20e2 100644 --- a/packages/nuxt/playground/pages/auth/login.vue +++ b/packages/nuxt/playground/pages/auth/login.vue @@ -34,7 +34,7 @@ const { t } = useI18n()