mirror of
https://github.com/SrIzan10/next-auth.git
synced 2026-05-01 10:55:20 +00:00
Compare commits
12 Commits
@auth/d1-a
...
d1-adapter
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
186e168da7 | ||
|
|
d2daf63c43 | ||
|
|
571ffc823c | ||
|
|
75042bde21 | ||
|
|
29cbd11552 | ||
|
|
030bae3517 | ||
|
|
46a5e369be | ||
|
|
e54c195179 | ||
|
|
b34aef3758 | ||
|
|
294918e127 | ||
|
|
84b51405ac | ||
|
|
8da00c56e4 |
@@ -8,7 +8,6 @@ Using an Auth.js / NextAuth.js adapter you can connect to any database service o
|
||||
<a href="/reference/adapter/d1" class="adapter-card">
|
||||
<img src="/img/adapters/d1.svg" width="40" />
|
||||
<h4 class="adapter-card__title">D1 Adapter</h4>
|
||||
</a>
|
||||
<a href="/reference/adapter/edgedb" class="adapter-card">
|
||||
<img src="/img/adapters/edgedb.svg" width="30" />
|
||||
<h4 class="adapter-card__title">EdgeDB Adapter</h4>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@auth/d1-adapter",
|
||||
"version": "0.2.0",
|
||||
"version": "0.1.2",
|
||||
"description": "A Cloudflare D1 adapter for Auth.js",
|
||||
"homepage": "https://authjs.dev",
|
||||
"repository": "https://github.com/nextauthjs/next-auth",
|
||||
@@ -8,30 +8,24 @@
|
||||
"url": "https://github.com/nextauthjs/next-auth/issues"
|
||||
},
|
||||
"author": "Josh Schlesser <josh@schlesser.dev>",
|
||||
"contributors": [
|
||||
"Thang Huu Vu <hi@thvu.dev>"
|
||||
],
|
||||
"contributors": [],
|
||||
"license": "ISC",
|
||||
"keywords": [
|
||||
"next-auth",
|
||||
"@auth",
|
||||
"Auth.js",
|
||||
"next.js",
|
||||
"oauth",
|
||||
"authjs",
|
||||
"authjs.dev",
|
||||
"cloudflare",
|
||||
"d1"
|
||||
],
|
||||
"type": "module",
|
||||
"types": "dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./index.d.ts",
|
||||
"import": "./index.js"
|
||||
"import": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"*.d.ts*",
|
||||
"*.js",
|
||||
"src"
|
||||
"dist"
|
||||
],
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
@@ -42,18 +36,19 @@
|
||||
"clean": "rm -rf dist",
|
||||
"test": "jest"
|
||||
},
|
||||
"dependencies": {
|
||||
"peerDependencies": {
|
||||
"@auth/core": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@auth/adapter-test": "workspace:*",
|
||||
"@auth/tsconfig": "workspace:*",
|
||||
"@cloudflare/workers-types": "^4.20230321.0",
|
||||
"@miniflare/d1": "^2.12.2",
|
||||
"@auth/adapter-test": "workspace:*",
|
||||
"@auth/tsconfig": "workspace:*",
|
||||
"better-sqlite3": "^7.0.0",
|
||||
"jest": "^29.3.0"
|
||||
"jest": "^27.0.3",
|
||||
"next-auth": "workspace:*"
|
||||
},
|
||||
"jest": {
|
||||
"preset": "@auth/adapter-test/jest"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,9 +56,11 @@ async function up(db: D1Database) {
|
||||
// run the migration
|
||||
upSQLStatements.forEach(async (sql) => {
|
||||
try {
|
||||
console.log("applying db migration sql", sql)
|
||||
const res = await db.prepare(sql).run()
|
||||
console.log("migration result", res)
|
||||
} catch (e: any) {
|
||||
console.error(e.cause?.message, e.message)
|
||||
console.log(e.cause?.message, e.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -16,16 +16,6 @@ import { D1Database, D1DatabaseAPI } from "@miniflare/d1"
|
||||
import { runBasicTests } from "@auth/adapter-test"
|
||||
import Database from "better-sqlite3"
|
||||
|
||||
globalThis.crypto ??= require("node:crypto").webcrypto
|
||||
|
||||
if (process.env.CI) {
|
||||
// TODO: Fix this
|
||||
test('Skipping D1Adapter tests in CI because of "Error: Must use import to load ES Module: next-auth/node_modules/.pnpm/undici@5.20.0/node_modules/undici/lib/llhttp/llhttp.wasm" errors. Should revisit', () => {
|
||||
expect(true).toBe(true)
|
||||
})
|
||||
process.exit(0)
|
||||
}
|
||||
|
||||
const sqliteDB = new Database(":memory:")
|
||||
let db = new D1Database(new D1DatabaseAPI(sqliteDB as any))
|
||||
let adapter = D1Adapter(db)
|
||||
|
||||
@@ -15,6 +15,6 @@
|
||||
"declarationMap": true,
|
||||
"declaration": true
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"include": ["src/**/*", "tests/migrations"],
|
||||
"exclude": ["*.js", "*.d.ts"]
|
||||
}
|
||||
|
||||
@@ -8,9 +8,6 @@
|
||||
"url": "https://github.com/nextauthjs/next-auth/issues"
|
||||
},
|
||||
"author": "Bruno Crosier",
|
||||
"contributors": [
|
||||
"Thang Huu Vu <hi@thvu.dev>"
|
||||
],
|
||||
"type": "module",
|
||||
"types": "./index.d.ts",
|
||||
"files": [
|
||||
@@ -40,11 +37,9 @@
|
||||
"build": "tsc",
|
||||
"test": "jest"
|
||||
},
|
||||
"dependencies": {
|
||||
"@auth/core": "workspace:*"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"edgedb": "^1.0.1"
|
||||
"edgedb": "^1.0.1",
|
||||
"@auth/core": "^0.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@auth/adapter-test": "workspace:^0.0.0",
|
||||
@@ -57,4 +52,4 @@
|
||||
"jest": {
|
||||
"preset": "@auth/adapter-test/jest"
|
||||
}
|
||||
}
|
||||
}
|
||||
1364
pnpm-lock.yaml
generated
1364
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user