@batijs/cli 0.0.444 → 0.0.445

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.
Files changed (122) hide show
  1. package/dist/boilerplates/@batijs/auth0/files/$.env.js +1 -1
  2. package/dist/boilerplates/@batijs/auth0/files/$README.md.js +1 -1
  3. package/dist/boilerplates/@batijs/authjs/files/$package.json.js +1 -1
  4. package/dist/boilerplates/@batijs/aws/files/$README.md.js +1 -1
  5. package/dist/boilerplates/@batijs/aws/files/$package.json.js +1 -1
  6. package/dist/boilerplates/@batijs/aws/files/$tsconfig.json.js +1 -1
  7. package/dist/boilerplates/@batijs/biome/files/$package.json.js +1 -1
  8. package/dist/boilerplates/@batijs/cloudflare/files/$package.json.js +1 -1
  9. package/dist/boilerplates/@batijs/cloudflare/files/$tsconfig.json.js +1 -1
  10. package/dist/boilerplates/@batijs/cloudflare/files/$vite.config.ts.js +1 -1
  11. package/dist/boilerplates/@batijs/compiled/files/$package.json.js +1 -1
  12. package/dist/boilerplates/@batijs/compiled/files/$vite.config.ts.js +1 -1
  13. package/dist/boilerplates/@batijs/d1/files/$README.md.js +1 -1
  14. package/dist/boilerplates/@batijs/d1/files/$package.json.js +1 -1
  15. package/dist/boilerplates/@batijs/d1/files/$tsconfig.json.js +1 -1
  16. package/dist/boilerplates/@batijs/d1/files/$wrangler.toml.js +1 -1
  17. package/dist/boilerplates/@batijs/d1-sqlite/files/$package.json.js +1 -7
  18. package/dist/boilerplates/@batijs/drizzle/files/$.env.js +1 -1
  19. package/dist/boilerplates/@batijs/drizzle/files/$README.md.js +1 -1
  20. package/dist/boilerplates/@batijs/drizzle/files/$package.json.js +1 -13
  21. package/dist/boilerplates/@batijs/eslint/files/$package.json.js +1 -1
  22. package/dist/boilerplates/@batijs/express/files/$package.json.js +1 -1
  23. package/dist/boilerplates/@batijs/express/files/express-entry.ts +0 -24
  24. package/dist/boilerplates/@batijs/fastify/files/$package.json.js +1 -1
  25. package/dist/boilerplates/@batijs/fastify/files/fastify-entry.ts +0 -24
  26. package/dist/boilerplates/@batijs/firebase-auth/files/$.env.js +1 -1
  27. package/dist/boilerplates/@batijs/firebase-auth/files/$README.md.js +1 -1
  28. package/dist/boilerplates/@batijs/firebase-auth/files/$package.json.js +1 -1
  29. package/dist/boilerplates/@batijs/google-analytics/files/$.env.js +1 -1
  30. package/dist/boilerplates/@batijs/h3/files/$package.json.js +1 -1
  31. package/dist/boilerplates/@batijs/h3/files/h3-entry.ts +0 -24
  32. package/dist/boilerplates/@batijs/hattip/files/$package.json.js +1 -1
  33. package/dist/boilerplates/@batijs/hattip/files/hattip-entry.ts +0 -24
  34. package/dist/boilerplates/@batijs/hono/files/$package.json.js +1 -1
  35. package/dist/boilerplates/@batijs/hono/files/$vite.config.ts.js +1 -1
  36. package/dist/boilerplates/@batijs/hono/files/hono-entry.ts +0 -24
  37. package/dist/boilerplates/@batijs/mantine/files/$README.md.js +1 -1
  38. package/dist/boilerplates/@batijs/mantine/files/$package.json.js +1 -1
  39. package/dist/boilerplates/@batijs/panda-css/files/$package.json.js +1 -1
  40. package/dist/boilerplates/@batijs/pnpm/files/$pnpm-workspace.yaml.js +1 -1
  41. package/dist/boilerplates/@batijs/prettier/files/$package.json.js +1 -1
  42. package/dist/boilerplates/@batijs/prisma/files/$.env.js +1 -1
  43. package/dist/boilerplates/@batijs/prisma/files/$README.md.js +1 -1
  44. package/dist/boilerplates/@batijs/prisma/files/$package.json.js +1 -1
  45. package/dist/boilerplates/@batijs/react/files/$README.md.js +1 -1
  46. package/dist/boilerplates/@batijs/react/files/$package.json.js +1 -1
  47. package/dist/boilerplates/@batijs/react/files/$tsconfig.json.js +1 -1
  48. package/dist/boilerplates/@batijs/react/files/$vite.config.ts.js +1 -1
  49. package/dist/boilerplates/@batijs/react/files/layouts/LayoutDefault.tsx +1 -1
  50. package/dist/boilerplates/@batijs/react/files/pages/+config.ts +1 -1
  51. package/dist/boilerplates/@batijs/react-sentry/files/$package.json.js +1 -1
  52. package/dist/boilerplates/@batijs/sentry/files/$.env.js +1 -1
  53. package/dist/boilerplates/@batijs/sentry/files/$README.md.js +1 -1
  54. package/dist/boilerplates/@batijs/sentry/files/$package.json.js +1 -1
  55. package/dist/boilerplates/@batijs/sentry/files/$vite.config.ts.js +1 -1
  56. package/dist/boilerplates/@batijs/sentry/files/pages/$+client.ts.js +1 -1
  57. package/dist/boilerplates/@batijs/shadcn-ui/files/$README.md.js +1 -1
  58. package/dist/boilerplates/@batijs/shadcn-ui/files/$package.json.js +1 -1
  59. package/dist/boilerplates/@batijs/shadcn-ui/files/$tsconfig.json.js +1 -1
  60. package/dist/boilerplates/@batijs/shadcn-ui/files/$vite.config.ts.js +1 -1
  61. package/dist/boilerplates/@batijs/shared/files/$README.md.js +1 -1
  62. package/dist/boilerplates/@batijs/shared-server/files/$package.json.js +1 -1
  63. package/dist/boilerplates/@batijs/solid/files/$README.md.js +1 -1
  64. package/dist/boilerplates/@batijs/solid/files/$package.json.js +1 -1
  65. package/dist/boilerplates/@batijs/solid/files/$tsconfig.json.js +1 -1
  66. package/dist/boilerplates/@batijs/solid/files/$vite.config.ts.js +1 -1
  67. package/dist/boilerplates/@batijs/solid/files/layouts/LayoutDefault.tsx +1 -1
  68. package/dist/boilerplates/@batijs/solid/files/pages/+config.ts +1 -1
  69. package/dist/boilerplates/@batijs/solid-sentry/files/$package.json.js +1 -1
  70. package/dist/boilerplates/@batijs/sqlite/files/$.env.js +1 -1
  71. package/dist/boilerplates/@batijs/sqlite/files/$README.md.js +1 -1
  72. package/dist/boilerplates/@batijs/sqlite/files/$package.json.js +1 -13
  73. package/dist/boilerplates/@batijs/sqlite/files/database/sqlite/schema/all.ts +0 -2
  74. package/dist/boilerplates/@batijs/sqlite/types/database/sqlite/schema/all.d.ts +0 -1
  75. package/dist/boilerplates/@batijs/tailwindcss/files/$package.json.js +1 -1
  76. package/dist/boilerplates/@batijs/tailwindcss/files/$vite.config.ts.js +1 -1
  77. package/dist/boilerplates/@batijs/telefunc/files/$package.json.js +1 -1
  78. package/dist/boilerplates/@batijs/telefunc/files/$vite.config.ts.js +1 -1
  79. package/dist/boilerplates/@batijs/trpc/files/$package.json.js +1 -1
  80. package/dist/boilerplates/@batijs/ts-rest/files/$package.json.js +1 -1
  81. package/dist/boilerplates/@batijs/vercel/files/$package.json.js +1 -1
  82. package/dist/boilerplates/@batijs/vercel/files/$tsconfig.json.js +1 -1
  83. package/dist/boilerplates/@batijs/vercel/files/$vite.config.ts.js +1 -1
  84. package/dist/boilerplates/@batijs/vercel/files/pages/$+config.ts.js +1 -1
  85. package/dist/boilerplates/@batijs/vue/files/$README.md.js +1 -1
  86. package/dist/boilerplates/@batijs/vue/files/$package.json.js +1 -1
  87. package/dist/boilerplates/@batijs/vue/files/$tsconfig.json.js +1 -1
  88. package/dist/boilerplates/@batijs/vue/files/$vite.config.ts.js +1 -1
  89. package/dist/boilerplates/@batijs/vue/files/layouts/LayoutDefault.vue +1 -1
  90. package/dist/boilerplates/@batijs/vue/files/pages/+config.ts +1 -1
  91. package/dist/boilerplates/@batijs/vue-sentry/files/$package.json.js +1 -1
  92. package/dist/boilerplates/boilerplates.json +0 -59
  93. package/dist/{chunk-HYBBK3CW.js → chunk-YO6CY4MA.js} +2 -2
  94. package/dist/index.js +17 -46
  95. package/package.json +5 -5
  96. package/dist/boilerplates/@batijs/d1-sqlite/files/database/d1/queries/lucia-auth.ts +0 -29
  97. package/dist/boilerplates/@batijs/d1-sqlite/files/database/migrations/lucia-auth.sql +0 -20
  98. package/dist/boilerplates/@batijs/d1-sqlite/types/database/d1/queries/lucia-auth.d.ts +0 -5
  99. package/dist/boilerplates/@batijs/drizzle/files/database/drizzle/queries/lucia-auth.ts +0 -56
  100. package/dist/boilerplates/@batijs/drizzle/files/database/drizzle/schema/lucia-auth.ts +0 -41
  101. package/dist/boilerplates/@batijs/drizzle/types/database/drizzle/queries/lucia-auth.d.ts +0 -25
  102. package/dist/boilerplates/@batijs/drizzle/types/database/drizzle/schema/lucia-auth.d.ts +0 -190
  103. package/dist/boilerplates/@batijs/lucia-auth/files/$.env.js +0 -32
  104. package/dist/boilerplates/@batijs/lucia-auth/files/$README.md.js +0 -38
  105. package/dist/boilerplates/@batijs/lucia-auth/files/$package.json.js +0 -113
  106. package/dist/boilerplates/@batijs/lucia-auth/files/global.d.ts +0 -11
  107. package/dist/boilerplates/@batijs/lucia-auth/files/lib/lucia-auth.ts +0 -136
  108. package/dist/boilerplates/@batijs/lucia-auth/files/pages/login/+guard.ts +0 -11
  109. package/dist/boilerplates/@batijs/lucia-auth/files/pages/login/style.css +0 -94
  110. package/dist/boilerplates/@batijs/lucia-auth/files/server/lucia-auth-handlers.ts +0 -401
  111. package/dist/boilerplates/@batijs/lucia-auth/types/lib/lucia-auth.d.ts +0 -63
  112. package/dist/boilerplates/@batijs/lucia-auth/types/pages/login/+guard.d.ts +0 -3
  113. package/dist/boilerplates/@batijs/lucia-auth/types/server/lucia-auth-handlers.d.ts +0 -65
  114. package/dist/boilerplates/@batijs/react-lucia-auth/files/pages/login/+Page.tsx +0 -97
  115. package/dist/boilerplates/@batijs/react-lucia-auth/types/pages/login/+Page.d.ts +0 -2
  116. package/dist/boilerplates/@batijs/solid-lucia-auth/files/pages/login/+Page.tsx +0 -97
  117. package/dist/boilerplates/@batijs/solid-lucia-auth/types/pages/login/+Page.d.ts +0 -2
  118. package/dist/boilerplates/@batijs/sqlite/files/database/sqlite/queries/lucia-auth.ts +0 -27
  119. package/dist/boilerplates/@batijs/sqlite/files/database/sqlite/schema/lucia-auth.ts +0 -32
  120. package/dist/boilerplates/@batijs/sqlite/types/database/sqlite/queries/lucia-auth.d.ts +0 -5
  121. package/dist/boilerplates/@batijs/sqlite/types/database/sqlite/schema/lucia-auth.d.ts +0 -1
  122. package/dist/boilerplates/@batijs/vue-lucia-auth/files/pages/login/+Page.vue +0 -88
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@batijs/cli",
3
- "version": "0.0.444",
3
+ "version": "0.0.445",
4
4
  "type": "module",
5
5
  "keywords": [],
6
6
  "description": "Next-gen scaffolder. Get started with fully-functional apps, and choose any tool you want",
@@ -20,12 +20,12 @@
20
20
  "typescript": "^5.8.3",
21
21
  "unplugin-purge-polyfills": "^0.1.0",
22
22
  "vite": "^6.3.5",
23
- "@batijs/compile": "0.0.444",
24
- "@batijs/build": "0.0.444"
23
+ "@batijs/build": "0.0.445",
24
+ "@batijs/compile": "0.0.445"
25
25
  },
26
26
  "dependencies": {
27
- "@batijs/core": "0.0.444",
28
- "@batijs/features": "0.0.444"
27
+ "@batijs/features": "0.0.445",
28
+ "@batijs/core": "0.0.445"
29
29
  },
30
30
  "bin": "./dist/index.js",
31
31
  "exports": {
@@ -1,29 +0,0 @@
1
- /*# BATI include-if-imported #*/
2
- import type { D1Database } from "@cloudflare/workers-types";
3
-
4
- export function getExistingUser<T>(db: D1Database, username: string) {
5
- return db.prepare("SELECT * FROM users WHERE username = ?").bind(username).first<T>();
6
- }
7
-
8
- export function getExistingAccount<T>(db: D1Database, providerId: string, providerUserId: number) {
9
- return db
10
- .prepare("SELECT * FROM oauth_accounts WHERE provider_id = ? AND provider_user_id = ?")
11
- .bind(providerId, providerUserId)
12
- .first<T>();
13
- }
14
-
15
- export function signupWithGithub(db: D1Database, userId: string, username: string, githubUserId: number) {
16
- return db.batch([
17
- db.prepare("INSERT INTO users (id, username) VALUES (?, ?)").bind(userId, username),
18
- db
19
- .prepare("INSERT INTO oauth_accounts (provider_id, provider_user_id, user_id) VALUES (?, ?, ?)")
20
- .bind("github", githubUserId, userId),
21
- ]);
22
- }
23
-
24
- export function signupWithCredentials(db: D1Database, userId: string, username: string, passwordHash: string) {
25
- return db
26
- .prepare("INSERT INTO users (id, username, password) VALUES(?, ?, ?)")
27
- .bind(userId, username, passwordHash)
28
- .run();
29
- }
@@ -1,20 +0,0 @@
1
- CREATE TABLE IF NOT EXISTS users (
2
- id TEXT NOT NULL PRIMARY KEY,
3
- username TEXT NOT NULL UNIQUE,
4
- password TEXT
5
- );
6
-
7
- CREATE TABLE IF NOT EXISTS oauth_accounts (
8
- provider_id TEXT NOT NULL,
9
- provider_user_id INTEGER NOT NULL,
10
- user_id TEXT NOT NULL,
11
- PRIMARY KEY (provider_id, provider_user_id),
12
- FOREIGN KEY (user_id) REFERENCES users(id) ON UPDATE cascade ON DELETE cascade
13
- );
14
-
15
- CREATE TABLE IF NOT EXISTS sessions (
16
- id TEXT NOT NULL PRIMARY KEY,
17
- expires_at INTEGER NOT NULL,
18
- user_id TEXT NOT NULL,
19
- FOREIGN KEY (user_id) REFERENCES users(id) ON UPDATE cascade ON DELETE cascade
20
- );
@@ -1,5 +0,0 @@
1
- import type { D1Database } from "@cloudflare/workers-types";
2
- export declare function getExistingUser<T>(db: D1Database, username: string): Promise<T | null>;
3
- export declare function getExistingAccount<T>(db: D1Database, providerId: string, providerUserId: number): Promise<T | null>;
4
- export declare function signupWithGithub(db: D1Database, userId: string, username: string, githubUserId: number): Promise<import("@cloudflare/workers-types").D1Result<unknown>[]>;
5
- export declare function signupWithCredentials(db: D1Database, userId: string, username: string, passwordHash: string): Promise<import("@cloudflare/workers-types").D1Result<Record<string, unknown>>>;
@@ -1,56 +0,0 @@
1
- /*# BATI include-if-imported #*/
2
- import { dbD1, dbSqlite } from "../db";
3
- import { oauthAccountTable, userTable } from "../schema/lucia-auth";
4
- import { and, eq } from "drizzle-orm";
5
-
6
- export async function getExistingUser(
7
- db: BATI.If<{
8
- "!BATI.hasD1": ReturnType<typeof dbSqlite>;
9
- _: ReturnType<typeof dbD1>;
10
- }>,
11
- username: string,
12
- ) {
13
- return db.select().from(userTable).where(eq(userTable.username, username)).get();
14
- }
15
-
16
- export async function getExistingAccount(
17
- db: BATI.If<{
18
- "!BATI.hasD1": ReturnType<typeof dbSqlite>;
19
- _: ReturnType<typeof dbD1>;
20
- }>,
21
- providerId: string,
22
- providerUserId: number,
23
- ) {
24
- return db
25
- .select()
26
- .from(oauthAccountTable)
27
- .where(and(eq(oauthAccountTable.providerId, providerId), eq(oauthAccountTable.providerUserId, providerUserId)))
28
- .get();
29
- }
30
-
31
- export async function signupWithGithub(
32
- db: BATI.If<{
33
- "!BATI.hasD1": ReturnType<typeof dbSqlite>;
34
- _: ReturnType<typeof dbD1>;
35
- }>,
36
- userId: string,
37
- username: string,
38
- githubUserId: number,
39
- ) {
40
- return db.transaction(async (tx) => {
41
- await tx.insert(userTable).values({ id: userId, username: username });
42
- await tx.insert(oauthAccountTable).values({ providerId: "github", providerUserId: githubUserId, userId });
43
- });
44
- }
45
-
46
- export async function signupWithCredentials(
47
- db: BATI.If<{
48
- "!BATI.hasD1": ReturnType<typeof dbSqlite>;
49
- _: ReturnType<typeof dbD1>;
50
- }>,
51
- userId: string,
52
- username: string,
53
- passwordHash: string,
54
- ) {
55
- return db.insert(userTable).values({ id: userId, username, password: passwordHash }).run();
56
- }
@@ -1,41 +0,0 @@
1
- /*# BATI include-if-imported #*/
2
- import { int, integer, primaryKey, sqliteTable, text } from "drizzle-orm/sqlite-core";
3
-
4
- export const userTable = sqliteTable("users", {
5
- id: text("id").notNull().primaryKey(),
6
- username: text("username").notNull().unique(),
7
- password: text("password"),
8
- });
9
-
10
- export const oauthAccountTable = sqliteTable(
11
- "oauth_accounts",
12
- {
13
- providerId: text("provider_id").notNull(),
14
- providerUserId: int("provider_user_id").notNull(),
15
- userId: text("user_id")
16
- .notNull()
17
- .references(() => userTable.id, {
18
- onUpdate: "cascade",
19
- onDelete: "cascade",
20
- }),
21
- },
22
- (table) => {
23
- return {
24
- pk: primaryKey({ columns: [table.providerId, table.providerUserId] }),
25
- };
26
- },
27
- );
28
-
29
- export const sessionTable = sqliteTable("sessions", {
30
- id: text("id").notNull().primaryKey(),
31
- userId: text("user_id")
32
- .notNull()
33
- .references(() => userTable.id, {
34
- onUpdate: "cascade",
35
- onDelete: "cascade",
36
- }),
37
- expiresAt: integer("expires_at").notNull(),
38
- });
39
-
40
- export type UserItem = typeof userTable.$inferSelect;
41
- export type UserInsert = typeof userTable.$inferInsert;
@@ -1,25 +0,0 @@
1
- import { dbD1, dbSqlite } from "../db";
2
- export declare function getExistingUser(db: BATI.If<{
3
- "!BATI.hasD1": ReturnType<typeof dbSqlite>;
4
- _: ReturnType<typeof dbD1>;
5
- }>, username: string): Promise<{
6
- id: string;
7
- username: string;
8
- password: string | null;
9
- } | undefined>;
10
- export declare function getExistingAccount(db: BATI.If<{
11
- "!BATI.hasD1": ReturnType<typeof dbSqlite>;
12
- _: ReturnType<typeof dbD1>;
13
- }>, providerId: string, providerUserId: number): Promise<{
14
- providerId: string;
15
- providerUserId: number;
16
- userId: string;
17
- } | undefined>;
18
- export declare function signupWithGithub(db: BATI.If<{
19
- "!BATI.hasD1": ReturnType<typeof dbSqlite>;
20
- _: ReturnType<typeof dbD1>;
21
- }>, userId: string, username: string, githubUserId: number): Promise<void>;
22
- export declare function signupWithCredentials(db: BATI.If<{
23
- "!BATI.hasD1": ReturnType<typeof dbSqlite>;
24
- _: ReturnType<typeof dbD1>;
25
- }>, userId: string, username: string, passwordHash: string): Promise<import("better-sqlite3").RunResult>;
@@ -1,190 +0,0 @@
1
- export declare const userTable: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
2
- name: "users";
3
- schema: undefined;
4
- columns: {
5
- id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6
- name: "id";
7
- tableName: "users";
8
- dataType: "string";
9
- columnType: "SQLiteText";
10
- data: string;
11
- driverParam: string;
12
- notNull: true;
13
- hasDefault: false;
14
- isPrimaryKey: true;
15
- isAutoincrement: false;
16
- hasRuntimeDefault: false;
17
- enumValues: [string, ...string[]];
18
- baseColumn: never;
19
- identity: undefined;
20
- generated: undefined;
21
- }, {}, {
22
- length: number | undefined;
23
- }>;
24
- username: import("drizzle-orm/sqlite-core").SQLiteColumn<{
25
- name: "username";
26
- tableName: "users";
27
- dataType: "string";
28
- columnType: "SQLiteText";
29
- data: string;
30
- driverParam: string;
31
- notNull: true;
32
- hasDefault: false;
33
- isPrimaryKey: false;
34
- isAutoincrement: false;
35
- hasRuntimeDefault: false;
36
- enumValues: [string, ...string[]];
37
- baseColumn: never;
38
- identity: undefined;
39
- generated: undefined;
40
- }, {}, {
41
- length: number | undefined;
42
- }>;
43
- password: import("drizzle-orm/sqlite-core").SQLiteColumn<{
44
- name: "password";
45
- tableName: "users";
46
- dataType: "string";
47
- columnType: "SQLiteText";
48
- data: string;
49
- driverParam: string;
50
- notNull: false;
51
- hasDefault: false;
52
- isPrimaryKey: false;
53
- isAutoincrement: false;
54
- hasRuntimeDefault: false;
55
- enumValues: [string, ...string[]];
56
- baseColumn: never;
57
- identity: undefined;
58
- generated: undefined;
59
- }, {}, {
60
- length: number | undefined;
61
- }>;
62
- };
63
- dialect: "sqlite";
64
- }>;
65
- export declare const oauthAccountTable: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
66
- name: "oauth_accounts";
67
- schema: undefined;
68
- columns: {
69
- providerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
70
- name: "provider_id";
71
- tableName: "oauth_accounts";
72
- dataType: "string";
73
- columnType: "SQLiteText";
74
- data: string;
75
- driverParam: string;
76
- notNull: true;
77
- hasDefault: false;
78
- isPrimaryKey: false;
79
- isAutoincrement: false;
80
- hasRuntimeDefault: false;
81
- enumValues: [string, ...string[]];
82
- baseColumn: never;
83
- identity: undefined;
84
- generated: undefined;
85
- }, {}, {
86
- length: number | undefined;
87
- }>;
88
- providerUserId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
89
- name: "provider_user_id";
90
- tableName: "oauth_accounts";
91
- dataType: "number";
92
- columnType: "SQLiteInteger";
93
- data: number;
94
- driverParam: number;
95
- notNull: true;
96
- hasDefault: false;
97
- isPrimaryKey: false;
98
- isAutoincrement: false;
99
- hasRuntimeDefault: false;
100
- enumValues: undefined;
101
- baseColumn: never;
102
- identity: undefined;
103
- generated: undefined;
104
- }, {}, {}>;
105
- userId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
106
- name: "user_id";
107
- tableName: "oauth_accounts";
108
- dataType: "string";
109
- columnType: "SQLiteText";
110
- data: string;
111
- driverParam: string;
112
- notNull: true;
113
- hasDefault: false;
114
- isPrimaryKey: false;
115
- isAutoincrement: false;
116
- hasRuntimeDefault: false;
117
- enumValues: [string, ...string[]];
118
- baseColumn: never;
119
- identity: undefined;
120
- generated: undefined;
121
- }, {}, {
122
- length: number | undefined;
123
- }>;
124
- };
125
- dialect: "sqlite";
126
- }>;
127
- export declare const sessionTable: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
128
- name: "sessions";
129
- schema: undefined;
130
- columns: {
131
- id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
132
- name: "id";
133
- tableName: "sessions";
134
- dataType: "string";
135
- columnType: "SQLiteText";
136
- data: string;
137
- driverParam: string;
138
- notNull: true;
139
- hasDefault: false;
140
- isPrimaryKey: true;
141
- isAutoincrement: false;
142
- hasRuntimeDefault: false;
143
- enumValues: [string, ...string[]];
144
- baseColumn: never;
145
- identity: undefined;
146
- generated: undefined;
147
- }, {}, {
148
- length: number | undefined;
149
- }>;
150
- userId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
151
- name: "user_id";
152
- tableName: "sessions";
153
- dataType: "string";
154
- columnType: "SQLiteText";
155
- data: string;
156
- driverParam: string;
157
- notNull: true;
158
- hasDefault: false;
159
- isPrimaryKey: false;
160
- isAutoincrement: false;
161
- hasRuntimeDefault: false;
162
- enumValues: [string, ...string[]];
163
- baseColumn: never;
164
- identity: undefined;
165
- generated: undefined;
166
- }, {}, {
167
- length: number | undefined;
168
- }>;
169
- expiresAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
170
- name: "expires_at";
171
- tableName: "sessions";
172
- dataType: "number";
173
- columnType: "SQLiteInteger";
174
- data: number;
175
- driverParam: number;
176
- notNull: true;
177
- hasDefault: false;
178
- isPrimaryKey: false;
179
- isAutoincrement: false;
180
- hasRuntimeDefault: false;
181
- enumValues: undefined;
182
- baseColumn: never;
183
- identity: undefined;
184
- generated: undefined;
185
- }, {}, {}>;
186
- };
187
- dialect: "sqlite";
188
- }>;
189
- export type UserItem = typeof userTable.$inferSelect;
190
- export type UserInsert = typeof userTable.$inferInsert;
@@ -1,32 +0,0 @@
1
- #!/usr/bin/env node
2
- import { createRequire as createRequire_BATI_CLI } from 'module';
3
- const require = createRequire_BATI_CLI(import.meta.url);
4
-
5
- import {
6
- bta
7
- } from "../../../../chunk-HYBBK3CW.js";
8
- import "../../../../chunk-V7W2TXCE.js";
9
- import "../../../../chunk-DHZ7AZKP.js";
10
-
11
- // ../../boilerplates/lucia-auth/dist/files/$.env.js
12
- async function getEnv(props) {
13
- const githubClientId = process.env.TEST_GITHUB_CLIENT_ID;
14
- const githubClientSecret = process.env.TEST_GITHUB_CLIENT_SECRET;
15
- let envContent = await props.readfile?.();
16
- envContent = bta(
17
- envContent,
18
- "GITHUB_CLIENT_ID",
19
- githubClientId ?? "",
20
- "GitHub Client ID. Used for authentication"
21
- );
22
- envContent = bta(
23
- envContent,
24
- "GITHUB_CLIENT_SECRET",
25
- githubClientSecret ?? "",
26
- "GitHub Client Secret. Used for authentication"
27
- );
28
- return envContent;
29
- }
30
- export {
31
- getEnv as default
32
- };
@@ -1,38 +0,0 @@
1
- #!/usr/bin/env node
2
- import { createRequire as createRequire_BATI_CLI } from 'module';
3
- const require = createRequire_BATI_CLI(import.meta.url);
4
-
5
- import {
6
- ita
7
- } from "../../../../chunk-HYBBK3CW.js";
8
- import "../../../../chunk-V7W2TXCE.js";
9
- import "../../../../chunk-DHZ7AZKP.js";
10
-
11
- // ../../boilerplates/lucia-auth/dist/files/$README.md.js
12
- async function getReadme(props) {
13
- const content = await ita(props);
14
- const todo = `
15
- ## *Example: Lucia Auth with GitHub OAuth*
16
- - Create a [GitHub OAuth app](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app). Set the Authorization callback URL to \`http://localhost:3000/api/login/github/callback\`.
17
- - Copy your \`Client ID\` and \`Client Secret\` then paste it in \`.env\` file like this:
18
-
19
- \`\`\`env
20
- // .env
21
- GITHUB_CLIENT_ID=<Client ID>
22
- GITHUB_CLIENT_SECRET=<Client Secret>
23
- \`\`\`
24
-
25
- - Read more [Lucia Auth: OAuth](https://lucia-auth.com/guides/oauth/)
26
-
27
- > [!NOTE]
28
- > Username & Password signup route : \`http://localhost:3000/api/signup\`.
29
- > Username & Password login route : \`http://localhost:3000/api/login\`.
30
- > GitHub login route : \`http://localhost:3000/api/login/github\`.
31
- > Logout route : \`http://localhost:3000/api/auth/logout\`.
32
- `;
33
- content.addMarkdownFeature(todo, "lucia-auth");
34
- return content;
35
- }
36
- export {
37
- getReadme as default
38
- };
@@ -1,113 +0,0 @@
1
- #!/usr/bin/env node
2
- import { createRequire as createRequire_BATI_CLI } from 'module';
3
- const require = createRequire_BATI_CLI(import.meta.url);
4
-
5
- import {
6
- ata
7
- } from "../../../../chunk-HYBBK3CW.js";
8
- import "../../../../chunk-V7W2TXCE.js";
9
- import "../../../../chunk-DHZ7AZKP.js";
10
-
11
- // ../../boilerplates/lucia-auth/dist/files/$package.json.js
12
- var __create = Object.create;
13
- var __defProp = Object.defineProperty;
14
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
15
- var __getOwnPropNames = Object.getOwnPropertyNames;
16
- var __getProtoOf = Object.getPrototypeOf;
17
- var __hasOwnProp = Object.prototype.hasOwnProperty;
18
- var __commonJS = (cb, mod) => function __require() {
19
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
20
- };
21
- var __copyProps = (to, from, except, desc) => {
22
- if (from && typeof from === "object" || typeof from === "function") {
23
- for (let key of __getOwnPropNames(from))
24
- if (!__hasOwnProp.call(to, key) && key !== except)
25
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
26
- }
27
- return to;
28
- };
29
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
30
- // If the importer is in node compatibility mode or this is not an ESM
31
- // file that has been converted to a CommonJS file using a Babel-
32
- // compatible transform (i.e. "__esModule" has not been set), then set
33
- // "default" to the CommonJS "module.exports" for node compatibility.
34
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
35
- mod
36
- ));
37
- var require_package = __commonJS({
38
- "package.json"(exports, module) {
39
- module.exports = {
40
- name: "@batijs/lucia-auth",
41
- private: true,
42
- version: "0.0.1",
43
- description: "",
44
- type: "module",
45
- scripts: {
46
- "check-types": "tsc --noEmit",
47
- build: "bati-compile-boilerplate"
48
- },
49
- keywords: [],
50
- author: "",
51
- license: "MIT",
52
- devDependencies: {
53
- "@batijs/compile": "workspace:*",
54
- "@cloudflare/workers-types": "^4.20250614.0",
55
- "@lucia-auth/adapter-drizzle": "^1.1.0",
56
- "@lucia-auth/adapter-sqlite": "^3.0.2",
57
- "@types/better-sqlite3": "^7.6.13",
58
- "@types/node": "^18.19.111",
59
- "@universal-middleware/core": "^0.4.8",
60
- arctic: "^3.7.0",
61
- "better-sqlite3": "^11.10.0",
62
- cookie: "^1.0.2",
63
- dotenv: "^16.5.0",
64
- "drizzle-orm": "^0.44.2",
65
- lucia: "^3.2.2",
66
- vike: "^0.4.231",
67
- vite: "^6.3.5"
68
- },
69
- dependencies: {
70
- "@batijs/core": "workspace:*"
71
- },
72
- files: [
73
- "dist/"
74
- ],
75
- bati: {
76
- if: {
77
- flag: "lucia-auth"
78
- }
79
- },
80
- exports: {
81
- "./lib/lucia-auth": {
82
- types: "./dist/types/lib/lucia-auth.d.ts"
83
- },
84
- "./pages/login/+guard": {
85
- types: "./dist/types/pages/login/+guard.d.ts"
86
- },
87
- "./server/lucia-auth-handlers": {
88
- types: "./dist/types/server/lucia-auth-handlers.d.ts"
89
- }
90
- },
91
- typesVersions: {
92
- "*": {
93
- "lib/lucia-auth": [
94
- "./dist/types/lib/lucia-auth.d.ts"
95
- ],
96
- "pages/login/+guard": [
97
- "./dist/types/pages/login/+guard.d.ts"
98
- ],
99
- "server/lucia-auth-handlers": [
100
- "./dist/types/server/lucia-auth-handlers.d.ts"
101
- ]
102
- }
103
- }
104
- };
105
- }
106
- });
107
- async function getPackageJson(props) {
108
- const packageJson = await ata(props, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default));
109
- return packageJson.addDependencies(["arctic", "cookie", "lucia", "@universal-middleware/core", "dotenv"]).addDependencies(["@lucia-auth/adapter-drizzle"], props.meta.BATI.has("drizzle")).addDependencies(["@lucia-auth/adapter-sqlite"], !props.meta.BATI.has("drizzle")).addDevDependencies(["@types/better-sqlite3"], !props.meta.BATI.hasD1).addDependencies(["better-sqlite3"], !props.meta.BATI.hasD1);
110
- }
111
- export {
112
- getPackageJson as default
113
- };
@@ -1,11 +0,0 @@
1
- import type { User } from "lucia";
2
-
3
- declare global {
4
- namespace Vike {
5
- interface PageContext {
6
- user?: User;
7
- }
8
- }
9
- }
10
-
11
- export {};