create-scaffauth 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,7 +14,7 @@ app.use(
14
14
  );
15
15
 
16
16
  // Mount Better Auth handler
17
- app.all("/api/auth/*", toNodeHandler(auth));
17
+ app.all("/api/auth/*splat", toNodeHandler(auth));
18
18
 
19
19
  // Health check
20
20
  app.get("/", (_req, res) => {
@@ -14,7 +14,7 @@ app.use(
14
14
  );
15
15
 
16
16
  // Mount Better Auth handler
17
- app.all("/api/auth/*", toNodeHandler(auth));
17
+ app.all("/api/auth/*splat", toNodeHandler(auth));
18
18
 
19
19
  // Health check
20
20
  app.get("/", (_req, res) => {
@@ -14,7 +14,7 @@ app.use(
14
14
  );
15
15
 
16
16
  // Mount Better Auth handler
17
- app.all("/api/auth/*", toNodeHandler(auth));
17
+ app.all("/api/auth/*splat", toNodeHandler(auth));
18
18
 
19
19
  // Health check
20
20
  app.get("/", (_req, res) => {
@@ -1,5 +1,4 @@
1
1
  import { betterAuth } from "better-auth";
2
- import { kyselyAdapter } from "better-auth/adapters/kysely";
3
2
  import { db } from "../db/db";
4
3
  {{#if twoFactor}}
5
4
  import { twoFactor } from "better-auth/plugins";
@@ -31,9 +30,10 @@ const transporter = nodemailer.createTransport({
31
30
  {{/if}}
32
31
 
33
32
  export const auth = betterAuth({
34
- database: kyselyAdapter(db, {
33
+ database: {
34
+ db,
35
35
  type: "mysql",
36
- }),
36
+ },
37
37
  emailAndPassword: {
38
38
  enabled: true,
39
39
  {{#if emailProvider}}
@@ -14,7 +14,7 @@ app.use(
14
14
  );
15
15
 
16
16
  // Mount Better Auth handler
17
- app.all("/api/auth/*", toNodeHandler(auth));
17
+ app.all("/api/auth/*splat", toNodeHandler(auth));
18
18
 
19
19
  // Health check
20
20
  app.get("/", (_req, res) => {
@@ -1,5 +1,4 @@
1
1
  import { betterAuth } from "better-auth";
2
- import { kyselyAdapter } from "better-auth/adapters/kysely";
3
2
  import { db } from "../db/db";
4
3
  {{#if twoFactor}}
5
4
  import { twoFactor } from "better-auth/plugins";
@@ -31,9 +30,10 @@ const transporter = nodemailer.createTransport({
31
30
  {{/if}}
32
31
 
33
32
  export const auth = betterAuth({
34
- database: kyselyAdapter(db, {
35
- type: "pg",
36
- }),
33
+ database: {
34
+ db,
35
+ type: "postgres",
36
+ },
37
37
  emailAndPassword: {
38
38
  enabled: true,
39
39
  {{#if emailProvider}}
@@ -14,7 +14,7 @@ app.use(
14
14
  );
15
15
 
16
16
  // Mount Better Auth handler
17
- app.all("/api/auth/*", toNodeHandler(auth));
17
+ app.all("/api/auth/*splat", toNodeHandler(auth));
18
18
 
19
19
  // Health check
20
20
  app.get("/", (_req, res) => {
@@ -1,5 +1,4 @@
1
1
  import { betterAuth } from "better-auth";
2
- import { kyselyAdapter } from "better-auth/adapters/kysely";
3
2
  import { db } from "../db/db";
4
3
  {{#if twoFactor}}
5
4
  import { twoFactor } from "better-auth/plugins";
@@ -31,9 +30,10 @@ const transporter = nodemailer.createTransport({
31
30
  {{/if}}
32
31
 
33
32
  export const auth = betterAuth({
34
- database: kyselyAdapter(db, {
33
+ database: {
34
+ db,
35
35
  type: "sqlite",
36
- }),
36
+ },
37
37
  emailAndPassword: {
38
38
  enabled: true,
39
39
  {{#if emailProvider}}
@@ -14,7 +14,7 @@ app.use(
14
14
  );
15
15
 
16
16
  // Mount Better Auth handler
17
- app.all("/api/auth/*", toNodeHandler(auth));
17
+ app.all("/api/auth/*splat", toNodeHandler(auth));
18
18
 
19
19
  // Health check
20
20
  app.get("/", (_req, res) => {
@@ -14,7 +14,7 @@ app.use(
14
14
  );
15
15
 
16
16
  // Mount Better Auth handler
17
- app.all("/api/auth/*", toNodeHandler(auth));
17
+ app.all("/api/auth/*splat", toNodeHandler(auth));
18
18
 
19
19
  // Health check
20
20
  app.get("/", (_req, res) => {
@@ -14,7 +14,7 @@ app.use(
14
14
  );
15
15
 
16
16
  // Mount Better Auth handler
17
- app.all("/api/auth/*", toNodeHandler(auth));
17
+ app.all("/api/auth/*splat", toNodeHandler(auth));
18
18
 
19
19
  // Health check
20
20
  app.get("/", (_req, res) => {
@@ -14,7 +14,7 @@ app.use(
14
14
  );
15
15
 
16
16
  // Mount Better Auth handler
17
- app.all("/api/auth/*", toNodeHandler(auth));
17
+ app.all("/api/auth/*splat", toNodeHandler(auth));
18
18
 
19
19
  // Health check
20
20
  app.get("/", (_req, res) => {
@@ -1,5 +1,4 @@
1
1
  import { betterAuth } from "better-auth";
2
- import { kyselyAdapter } from "better-auth/adapters/kysely";
3
2
  import { db } from "../db/db";
4
3
  {{#if twoFactor}}
5
4
  import { twoFactor } from "better-auth/plugins";
@@ -31,9 +30,10 @@ const transporter = nodemailer.createTransport({
31
30
  {{/if}}
32
31
 
33
32
  export const auth = betterAuth({
34
- database: kyselyAdapter(db, {
33
+ database: {
34
+ db,
35
35
  type: "mysql",
36
- }),
36
+ },
37
37
  emailAndPassword: {
38
38
  enabled: true,
39
39
  {{#if emailProvider}}
@@ -1,5 +1,4 @@
1
1
  import { betterAuth } from "better-auth";
2
- import { kyselyAdapter } from "better-auth/adapters/kysely";
3
2
  import { db } from "../db/db";
4
3
  {{#if twoFactor}}
5
4
  import { twoFactor } from "better-auth/plugins";
@@ -31,9 +30,10 @@ const transporter = nodemailer.createTransport({
31
30
  {{/if}}
32
31
 
33
32
  export const auth = betterAuth({
34
- database: kyselyAdapter(db, {
35
- type: "pg",
36
- }),
33
+ database: {
34
+ db,
35
+ type: "postgres",
36
+ },
37
37
  emailAndPassword: {
38
38
  enabled: true,
39
39
  {{#if emailProvider}}
@@ -1,5 +1,4 @@
1
1
  import { betterAuth } from "better-auth";
2
- import { kyselyAdapter } from "better-auth/adapters/kysely";
3
2
  import { db } from "../db/db";
4
3
  {{#if twoFactor}}
5
4
  import { twoFactor } from "better-auth/plugins";
@@ -31,9 +30,10 @@ const transporter = nodemailer.createTransport({
31
30
  {{/if}}
32
31
 
33
32
  export const auth = betterAuth({
34
- database: kyselyAdapter(db, {
33
+ database: {
34
+ db,
35
35
  type: "sqlite",
36
- }),
36
+ },
37
37
  emailAndPassword: {
38
38
  enabled: true,
39
39
  {{#if emailProvider}}
@@ -1,5 +1,4 @@
1
1
  import { betterAuth } from "better-auth";
2
- import { kyselyAdapter } from "better-auth/adapters/kysely";
3
2
  import { db } from "../db/db";
4
3
  {{#if twoFactor}}
5
4
  import { twoFactor } from "better-auth/plugins";
@@ -31,9 +30,10 @@ const transporter = nodemailer.createTransport({
31
30
  {{/if}}
32
31
 
33
32
  export const auth = betterAuth({
34
- database: kyselyAdapter(db, {
33
+ database: {
34
+ db,
35
35
  type: "mysql",
36
- }),
36
+ },
37
37
  emailAndPassword: {
38
38
  enabled: true,
39
39
  {{#if emailProvider}}
@@ -1,5 +1,4 @@
1
1
  import { betterAuth } from "better-auth";
2
- import { kyselyAdapter } from "better-auth/adapters/kysely";
3
2
  import { db } from "../db/db";
4
3
  {{#if twoFactor}}
5
4
  import { twoFactor } from "better-auth/plugins";
@@ -31,9 +30,10 @@ const transporter = nodemailer.createTransport({
31
30
  {{/if}}
32
31
 
33
32
  export const auth = betterAuth({
34
- database: kyselyAdapter(db, {
35
- type: "pg",
36
- }),
33
+ database: {
34
+ db,
35
+ type: "postgres",
36
+ },
37
37
  emailAndPassword: {
38
38
  enabled: true,
39
39
  {{#if emailProvider}}
@@ -1,5 +1,4 @@
1
1
  import { betterAuth } from "better-auth";
2
- import { kyselyAdapter } from "better-auth/adapters/kysely";
3
2
  import { db } from "../db/db";
4
3
  {{#if twoFactor}}
5
4
  import { twoFactor } from "better-auth/plugins";
@@ -31,9 +30,10 @@ const transporter = nodemailer.createTransport({
31
30
  {{/if}}
32
31
 
33
32
  export const auth = betterAuth({
34
- database: kyselyAdapter(db, {
33
+ database: {
34
+ db,
35
35
  type: "sqlite",
36
- }),
36
+ },
37
37
  emailAndPassword: {
38
38
  enabled: true,
39
39
  {{#if emailProvider}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-scaffauth",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Scaffold production-ready Better Auth backends",
5
5
  "type": "module",
6
6
  "bin": {