qarpeo 0.1.17 → 0.1.18

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.
@@ -177,6 +177,27 @@ import { sqliteTable, text, integer, blob, index } from "drizzle-orm/sqlite-core
177
177
  `});`
178
178
  );
179
179
  }
180
+ if (!opts.twoFactor) {
181
+ lines.push(`export const twoFactor = undefined;`);
182
+ }
183
+ if (!opts.webauthn && !opts.webAuthn) {
184
+ lines.push(`export const passkey = undefined;`);
185
+ lines.push(`export const authenticators = undefined;`);
186
+ } else {
187
+ lines.push(`export { passkey as authenticators };`);
188
+ }
189
+ if (!opts.organizations) {
190
+ lines.push(
191
+ `export const organization = undefined;`,
192
+ `export const member = undefined;`,
193
+ `export const invitation = undefined;`,
194
+ `export const organizations = undefined;`,
195
+ `export const members = undefined;`,
196
+ `export const invitations = undefined;`
197
+ );
198
+ } else {
199
+ lines.push(`export { organization as organizations, member as members, invitation as invitations };`);
200
+ }
180
201
  lines.push(
181
202
  ``,
182
203
  `// Backwards compatibility aliases`,
package/dist/module.mjs CHANGED
@@ -19,7 +19,7 @@ import 'drizzle-orm/node-sqlite';
19
19
  import 'node:process';
20
20
  import 'node:readline/promises';
21
21
 
22
- const version = "0.1.17";
22
+ const version = "0.1.18";
23
23
 
24
24
  function ensureDevEnv(rootDir) {
25
25
  const envPath = join(rootDir, ".env");
@@ -22,19 +22,21 @@ export function serverAuth(event) {
22
22
  if (cached) return cached;
23
23
  const db = useDrizzle(void 0, event);
24
24
  const baseURL = cfEnv?.BETTER_AUTH_URL || cfEnv?.NUXT_BETTER_AUTH_URL || process.env.BETTER_AUTH_URL || process.env.NUXT_BETTER_AUTH_URL || void 0;
25
+ const authBag = authSchema;
26
+ const getTable = (primary, fallback) => authBag[primary] || (fallback ? authBag[fallback] : void 0);
25
27
  const instance = betterAuth({
26
28
  database: drizzleAdapter(db, {
27
29
  provider: "sqlite",
28
30
  schema: {
29
- user: authSchema.user || authSchema.users,
30
- session: authSchema.session || authSchema.sessions,
31
- account: authSchema.account || authSchema.accounts,
32
- verification: authSchema.verification || authSchema.verifications,
33
- twoFactor: authSchema.twoFactor,
34
- passkey: authSchema.passkey || authSchema.authenticators,
35
- organization: authSchema.organization || authSchema.organizations,
36
- member: authSchema.member || authSchema.members,
37
- invitation: authSchema.invitation || authSchema.invitations
31
+ user: getTable("user", "users"),
32
+ session: getTable("session", "sessions"),
33
+ account: getTable("account", "accounts"),
34
+ verification: getTable("verification", "verifications"),
35
+ twoFactor: getTable("twoFactor"),
36
+ passkey: getTable("passkey", "authenticators"),
37
+ organization: getTable("organization", "organizations"),
38
+ member: getTable("member", "members"),
39
+ invitation: getTable("invitation", "invitations")
38
40
  }
39
41
  }),
40
42
  secret: effectiveSecret,
@@ -1,3 +1,20 @@
1
1
  declare const _default: {};
2
2
  export default _default;
3
3
  export declare const schema: {};
4
+ export declare const user: undefined;
5
+ export declare const session: undefined;
6
+ export declare const account: undefined;
7
+ export declare const verification: undefined;
8
+ export declare const twoFactor: undefined;
9
+ export declare const passkey: undefined;
10
+ export declare const organization: undefined;
11
+ export declare const member: undefined;
12
+ export declare const invitation: undefined;
13
+ export declare const users: undefined;
14
+ export declare const sessions: undefined;
15
+ export declare const accounts: undefined;
16
+ export declare const verifications: undefined;
17
+ export declare const authenticators: undefined;
18
+ export declare const organizations: undefined;
19
+ export declare const members: undefined;
20
+ export declare const invitations: undefined;
@@ -1,2 +1,19 @@
1
1
  export default {};
2
2
  export const schema = {};
3
+ export const user = void 0;
4
+ export const session = void 0;
5
+ export const account = void 0;
6
+ export const verification = void 0;
7
+ export const twoFactor = void 0;
8
+ export const passkey = void 0;
9
+ export const organization = void 0;
10
+ export const member = void 0;
11
+ export const invitation = void 0;
12
+ export const users = void 0;
13
+ export const sessions = void 0;
14
+ export const accounts = void 0;
15
+ export const verifications = void 0;
16
+ export const authenticators = void 0;
17
+ export const organizations = void 0;
18
+ export const members = void 0;
19
+ export const invitations = void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qarpeo",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "Zero-config Cloudflare Edge Platform for Nuxt",
5
5
  "keywords": [
6
6
  "analytics-engine",