mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-09 20:27:44 +00:00
chore: Jayllyz reduce deps (#151)
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { defineConfig } from "bumpp";
|
import { defineConfig } from "bumpp";
|
||||||
import fg from "fast-glob";
|
import { globSync } from "tinyglobby";
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
files: fg.sync(["./packages/*/package.json"]),
|
files: globSync(["./packages/*/package.json"], { expandDirectories: false }),
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ const revokedSessions = await authClient.admin.revokeUserSessions({
|
|||||||
|
|
||||||
### Impersonate User
|
### Impersonate User
|
||||||
|
|
||||||
Allows an admin to create a session as if they were the specified user.
|
This feature allows an admin to create a session that mimics the specified user. The session will remain active until either the browser session ends or it reaches 1 day in age.
|
||||||
|
|
||||||
```ts title="admin.ts"
|
```ts title="admin.ts"
|
||||||
const impersonatedSession = await authClient.admin.impersonateUser({
|
const impersonatedSession = await authClient.admin.impersonateUser({
|
||||||
|
|||||||
@@ -20,11 +20,11 @@
|
|||||||
"@biomejs/biome": "1.7.3",
|
"@biomejs/biome": "1.7.3",
|
||||||
"bumpp": "^9.4.1",
|
"bumpp": "^9.4.1",
|
||||||
"dotenv-cli": "^7.4.2",
|
"dotenv-cli": "^7.4.2",
|
||||||
"fast-glob": "^3.3.2",
|
|
||||||
"@types/node": "^20.12.12",
|
"@types/node": "^20.12.12",
|
||||||
"simple-git-hooks": "^2.11.1",
|
"simple-git-hooks": "^2.11.1",
|
||||||
"turbo": "^2.0.4",
|
"turbo": "^2.0.4",
|
||||||
"typescript": "5.6.1-rc"
|
"typescript": "5.6.1-rc",
|
||||||
|
"tinyglobby": "^0.2.9"
|
||||||
},
|
},
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "better-auth",
|
"name": "better-auth",
|
||||||
"version": "0.4.1",
|
"version": "0.4.2-beta.1",
|
||||||
"description": "The most comprehensive authentication library for TypeScript.",
|
"description": "The most comprehensive authentication library for TypeScript.",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -100,7 +100,6 @@
|
|||||||
"consola": "^3.2.3",
|
"consola": "^3.2.3",
|
||||||
"defu": "^6.1.4",
|
"defu": "^6.1.4",
|
||||||
"dotenv": "^16.4.5",
|
"dotenv": "^16.4.5",
|
||||||
"execa": "^9.4.0",
|
|
||||||
"jose": "^5.7.0",
|
"jose": "^5.7.0",
|
||||||
"kysely": "^0.27.4",
|
"kysely": "^0.27.4",
|
||||||
"nanoid": "^5.0.7",
|
"nanoid": "^5.0.7",
|
||||||
@@ -109,6 +108,8 @@
|
|||||||
"ora": "^8.0.1",
|
"ora": "^8.0.1",
|
||||||
"oslo": "^1.2.1",
|
"oslo": "^1.2.1",
|
||||||
"prompts": "^2.4.2",
|
"prompts": "^2.4.2",
|
||||||
|
"tinyexec": "^0.3.0",
|
||||||
|
"yocto-spinner": "^0.1.1",
|
||||||
"zod": "^3.22.5"
|
"zod": "^3.22.5"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { z } from "zod";
|
|||||||
import { existsSync } from "fs";
|
import { existsSync } from "fs";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { logger } from "../../utils/logger";
|
import { logger } from "../../utils/logger";
|
||||||
import ora from "ora";
|
import yoctoSpinner from "yocto-spinner";
|
||||||
import prompts from "prompts";
|
import prompts from "prompts";
|
||||||
import { getAdapter } from "../../db/utils";
|
import { getAdapter } from "../../db/utils";
|
||||||
import fs from "fs/promises";
|
import fs from "fs/promises";
|
||||||
@@ -47,7 +47,7 @@ export const generate = new Command("generate")
|
|||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const spinner = ora("preparing schema...").start();
|
const spinner = yoctoSpinner({ text: "preparing schema..." }).start();
|
||||||
const adapter = await getAdapter(config, true).catch((e) => {
|
const adapter = await getAdapter(config, true).catch((e) => {
|
||||||
logger.error(e.message);
|
logger.error(e.message);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { existsSync } from "fs";
|
|||||||
import path from "path";
|
import path from "path";
|
||||||
import { logger } from "../../utils/logger";
|
import { logger } from "../../utils/logger";
|
||||||
import { createKyselyAdapter } from "../../adapters/kysely-adapter/dialect";
|
import { createKyselyAdapter } from "../../adapters/kysely-adapter/dialect";
|
||||||
import ora from "ora";
|
import yoctoSpinner from "yocto-spinner";
|
||||||
import chalk from "chalk";
|
import chalk from "chalk";
|
||||||
import prompts from "prompts";
|
import prompts from "prompts";
|
||||||
import { getMigrations } from "../utils/get-migration";
|
import { getMigrations } from "../utils/get-migration";
|
||||||
@@ -52,7 +52,7 @@ export const migrate = new Command("migrate")
|
|||||||
);
|
);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
const spinner = ora("preparing migration...").start();
|
const spinner = yoctoSpinner({ text: "preparing migration..." }).start();
|
||||||
|
|
||||||
const { toBeAdded, toBeCreated, runMigrations } =
|
const { toBeAdded, toBeCreated, runMigrations } =
|
||||||
await getMigrations(config);
|
await getMigrations(config);
|
||||||
|
|||||||
Reference in New Issue
Block a user