@better-auth/telemetry 1.3.28

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.
package/dist/index.mjs ADDED
@@ -0,0 +1,561 @@
1
+ import { env, getEnvVar, isTest, getBooleanEnvVar, ENV, logger } from '@better-auth/core/env';
2
+ import { createRandomStringGenerator } from '@better-auth/utils/random';
3
+ import { createHash } from '@better-auth/utils/hash';
4
+ import { base64 } from '@better-auth/utils/base64';
5
+ import { betterFetch } from '@better-fetch/fetch';
6
+
7
+ const generateId = (size) => {
8
+ return createRandomStringGenerator("a-z", "A-Z", "0-9")(size);
9
+ };
10
+
11
+ async function hashToBase64(data) {
12
+ const buffer = await createHash("SHA-256").digest(data);
13
+ return base64.encode(buffer);
14
+ }
15
+
16
+ let packageJSONCache;
17
+ async function readRootPackageJson() {
18
+ if (packageJSONCache) return packageJSONCache;
19
+ try {
20
+ const cwd = typeof process !== "undefined" && typeof process.cwd === "function" ? process.cwd() : "";
21
+ if (!cwd) return void 0;
22
+ const importRuntime = (m) => Function("mm", "return import(mm)")(m);
23
+ const [{ default: fs }, { default: path }] = await Promise.all([
24
+ importRuntime("fs/promises"),
25
+ importRuntime("path")
26
+ ]);
27
+ const raw = await fs.readFile(path.join(cwd, "package.json"), "utf-8");
28
+ packageJSONCache = JSON.parse(raw);
29
+ return packageJSONCache;
30
+ } catch {
31
+ }
32
+ return void 0;
33
+ }
34
+ async function getPackageVersion(pkg) {
35
+ if (packageJSONCache) {
36
+ return packageJSONCache.dependencies?.[pkg] || packageJSONCache.devDependencies?.[pkg] || packageJSONCache.peerDependencies?.[pkg];
37
+ }
38
+ try {
39
+ const cwd = typeof process !== "undefined" && typeof process.cwd === "function" ? process.cwd() : "";
40
+ if (!cwd) throw new Error("no-cwd");
41
+ const importRuntime = (m) => Function("mm", "return import(mm)")(m);
42
+ const [{ default: fs }, { default: path }] = await Promise.all([
43
+ importRuntime("fs/promises"),
44
+ importRuntime("path")
45
+ ]);
46
+ const pkgJsonPath = path.join(cwd, "node_modules", pkg, "package.json");
47
+ const raw = await fs.readFile(pkgJsonPath, "utf-8");
48
+ const json = JSON.parse(raw);
49
+ const resolved = json.version || await getVersionFromLocalPackageJson(pkg) || void 0;
50
+ return resolved;
51
+ } catch {
52
+ }
53
+ const fromRoot = await getVersionFromLocalPackageJson(pkg);
54
+ return fromRoot;
55
+ }
56
+ async function getVersionFromLocalPackageJson(pkg) {
57
+ const json = await readRootPackageJson();
58
+ if (!json) return void 0;
59
+ const allDeps = {
60
+ ...json.dependencies,
61
+ ...json.devDependencies,
62
+ ...json.peerDependencies
63
+ };
64
+ return allDeps[pkg];
65
+ }
66
+ async function getNameFromLocalPackageJson() {
67
+ const json = await readRootPackageJson();
68
+ return json?.name;
69
+ }
70
+
71
+ let projectIdCached = null;
72
+ async function getProjectId(baseUrl) {
73
+ if (projectIdCached) return projectIdCached;
74
+ const projectName = await getNameFromLocalPackageJson();
75
+ if (projectName) {
76
+ projectIdCached = await hashToBase64(
77
+ baseUrl ? baseUrl + projectName : projectName
78
+ );
79
+ return projectIdCached;
80
+ }
81
+ if (baseUrl) {
82
+ projectIdCached = await hashToBase64(baseUrl);
83
+ return projectIdCached;
84
+ }
85
+ projectIdCached = generateId(32);
86
+ return projectIdCached;
87
+ }
88
+
89
+ const importRuntime = (m) => {
90
+ return Function("mm", "return import(mm)")(m);
91
+ };
92
+
93
+ function getVendor() {
94
+ const hasAny = (...keys) => keys.some((k) => Boolean(env[k]));
95
+ if (hasAny("CF_PAGES", "CF_PAGES_URL", "CF_ACCOUNT_ID") || typeof navigator !== "undefined" && navigator.userAgent === "Cloudflare-Workers") {
96
+ return "cloudflare";
97
+ }
98
+ if (hasAny("VERCEL", "VERCEL_URL", "VERCEL_ENV")) return "vercel";
99
+ if (hasAny("NETLIFY", "NETLIFY_URL")) return "netlify";
100
+ if (hasAny(
101
+ "RENDER",
102
+ "RENDER_URL",
103
+ "RENDER_INTERNAL_HOSTNAME",
104
+ "RENDER_SERVICE_ID"
105
+ )) {
106
+ return "render";
107
+ }
108
+ if (hasAny("AWS_LAMBDA_FUNCTION_NAME", "AWS_EXECUTION_ENV", "LAMBDA_TASK_ROOT")) {
109
+ return "aws";
110
+ }
111
+ if (hasAny(
112
+ "GOOGLE_CLOUD_FUNCTION_NAME",
113
+ "GOOGLE_CLOUD_PROJECT",
114
+ "GCP_PROJECT",
115
+ "K_SERVICE"
116
+ )) {
117
+ return "gcp";
118
+ }
119
+ if (hasAny(
120
+ "AZURE_FUNCTION_NAME",
121
+ "FUNCTIONS_WORKER_RUNTIME",
122
+ "WEBSITE_INSTANCE_ID",
123
+ "WEBSITE_SITE_NAME"
124
+ )) {
125
+ return "azure";
126
+ }
127
+ if (hasAny("DENO_DEPLOYMENT_ID", "DENO_REGION")) return "deno-deploy";
128
+ if (hasAny("FLY_APP_NAME", "FLY_REGION", "FLY_ALLOC_ID")) return "fly-io";
129
+ if (hasAny("RAILWAY_STATIC_URL", "RAILWAY_ENVIRONMENT_NAME"))
130
+ return "railway";
131
+ if (hasAny("DYNO", "HEROKU_APP_NAME")) return "heroku";
132
+ if (hasAny("DO_DEPLOYMENT_ID", "DO_APP_NAME", "DIGITALOCEAN"))
133
+ return "digitalocean";
134
+ if (hasAny("KOYEB", "KOYEB_DEPLOYMENT_ID", "KOYEB_APP_NAME")) return "koyeb";
135
+ return null;
136
+ }
137
+ async function detectSystemInfo() {
138
+ try {
139
+ if (getVendor() === "cloudflare") return "cloudflare";
140
+ const os = await importRuntime("os");
141
+ const cpus = os.cpus();
142
+ return {
143
+ deploymentVendor: getVendor(),
144
+ systemPlatform: os.platform(),
145
+ systemRelease: os.release(),
146
+ systemArchitecture: os.arch(),
147
+ cpuCount: cpus.length,
148
+ cpuModel: cpus.length ? cpus[0].model : null,
149
+ cpuSpeed: cpus.length ? cpus[0].speed : null,
150
+ memory: os.totalmem(),
151
+ isWSL: await isWsl(),
152
+ isDocker: await isDocker(),
153
+ isTTY: typeof process !== "undefined" && process.stdout ? process.stdout.isTTY : null
154
+ };
155
+ } catch (e) {
156
+ return {
157
+ systemPlatform: null,
158
+ systemRelease: null,
159
+ systemArchitecture: null,
160
+ cpuCount: null,
161
+ cpuModel: null,
162
+ cpuSpeed: null,
163
+ memory: null,
164
+ isWSL: null,
165
+ isDocker: null,
166
+ isTTY: null
167
+ };
168
+ }
169
+ }
170
+ let isDockerCached;
171
+ async function hasDockerEnv() {
172
+ if (getVendor() === "cloudflare") return false;
173
+ try {
174
+ const fs = await importRuntime("fs");
175
+ fs.statSync("/.dockerenv");
176
+ return true;
177
+ } catch {
178
+ return false;
179
+ }
180
+ }
181
+ async function hasDockerCGroup() {
182
+ if (getVendor() === "cloudflare") return false;
183
+ try {
184
+ const fs = await importRuntime("fs");
185
+ return fs.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
186
+ } catch {
187
+ return false;
188
+ }
189
+ }
190
+ async function isDocker() {
191
+ if (getVendor() === "cloudflare") return false;
192
+ if (isDockerCached === void 0) {
193
+ isDockerCached = await hasDockerEnv() || await hasDockerCGroup();
194
+ }
195
+ return isDockerCached;
196
+ }
197
+ async function isWsl() {
198
+ try {
199
+ if (getVendor() === "cloudflare") return false;
200
+ if (typeof process === "undefined" || process?.platform !== "linux") {
201
+ return false;
202
+ }
203
+ const fs = await importRuntime("fs");
204
+ const os = await importRuntime("os");
205
+ if (os.release().toLowerCase().includes("microsoft")) {
206
+ if (await isInsideContainer()) {
207
+ return false;
208
+ }
209
+ return true;
210
+ }
211
+ return fs.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !await isInsideContainer() : false;
212
+ } catch {
213
+ return false;
214
+ }
215
+ }
216
+ let isInsideContainerCached;
217
+ const hasContainerEnv = async () => {
218
+ if (getVendor() === "cloudflare") return false;
219
+ try {
220
+ const fs = await importRuntime("fs");
221
+ fs.statSync("/run/.containerenv");
222
+ return true;
223
+ } catch {
224
+ return false;
225
+ }
226
+ };
227
+ async function isInsideContainer() {
228
+ if (isInsideContainerCached === void 0) {
229
+ isInsideContainerCached = await hasContainerEnv() || await isDocker();
230
+ }
231
+ return isInsideContainerCached;
232
+ }
233
+ function isCI() {
234
+ return env.CI !== "false" && ("BUILD_ID" in env || // Jenkins, Cloudbees
235
+ "BUILD_NUMBER" in env || // Jenkins, TeamCity (fixed typo: extra space removed)
236
+ "CI" in env || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari, Cloudflare
237
+ "CI_APP_ID" in env || // Appflow
238
+ "CI_BUILD_ID" in env || // Appflow
239
+ "CI_BUILD_NUMBER" in env || // Appflow
240
+ "CI_NAME" in env || // Codeship and others
241
+ "CONTINUOUS_INTEGRATION" in env || // Travis CI, Cirrus CI
242
+ "RUN_ID" in env);
243
+ }
244
+
245
+ function detectRuntime() {
246
+ if (typeof Deno !== "undefined") {
247
+ const denoVersion = Deno?.version?.deno ?? null;
248
+ return { name: "deno", version: denoVersion };
249
+ }
250
+ if (typeof Bun !== "undefined") {
251
+ const bunVersion = Bun?.version ?? null;
252
+ return { name: "bun", version: bunVersion };
253
+ }
254
+ if (typeof process !== "undefined" && process?.versions?.node) {
255
+ return { name: "node", version: process.versions.node ?? null };
256
+ }
257
+ return { name: "edge", version: null };
258
+ }
259
+ function detectEnvironment() {
260
+ return getEnvVar("NODE_ENV") === "production" ? "production" : isCI() ? "ci" : isTest() ? "test" : "development";
261
+ }
262
+
263
+ const DATABASES = {
264
+ pg: "postgresql",
265
+ mysql: "mysql",
266
+ mariadb: "mariadb",
267
+ sqlite3: "sqlite",
268
+ "better-sqlite3": "sqlite",
269
+ "@prisma/client": "prisma",
270
+ mongoose: "mongodb",
271
+ mongodb: "mongodb",
272
+ "drizzle-orm": "drizzle"
273
+ };
274
+ async function detectDatabase() {
275
+ for (const [pkg, name] of Object.entries(DATABASES)) {
276
+ const version = await getPackageVersion(pkg);
277
+ if (version) return { name, version };
278
+ }
279
+ return void 0;
280
+ }
281
+
282
+ const FRAMEWORKS = {
283
+ next: "next",
284
+ nuxt: "nuxt",
285
+ "@remix-run/server-runtime": "remix",
286
+ astro: "astro",
287
+ "@sveltejs/kit": "sveltekit",
288
+ "solid-start": "solid-start",
289
+ "tanstack-start": "tanstack-start",
290
+ hono: "hono",
291
+ express: "express",
292
+ elysia: "elysia",
293
+ expo: "expo"
294
+ };
295
+ async function detectFramework() {
296
+ for (const [pkg, name] of Object.entries(FRAMEWORKS)) {
297
+ const version = await getPackageVersion(pkg);
298
+ if (version) return { name, version };
299
+ }
300
+ return void 0;
301
+ }
302
+
303
+ function detectPackageManager() {
304
+ const userAgent = env.npm_config_user_agent;
305
+ if (!userAgent) {
306
+ return void 0;
307
+ }
308
+ const pmSpec = userAgent.split(" ")[0];
309
+ const separatorPos = pmSpec.lastIndexOf("/");
310
+ const name = pmSpec.substring(0, separatorPos);
311
+ return {
312
+ name: name === "npminstall" ? "cnpm" : name,
313
+ version: pmSpec.substring(separatorPos + 1)
314
+ };
315
+ }
316
+
317
+ function getTelemetryAuthConfig(options, context) {
318
+ return {
319
+ database: context?.database,
320
+ adapter: context?.adapter,
321
+ emailVerification: {
322
+ sendVerificationEmail: !!options.emailVerification?.sendVerificationEmail,
323
+ sendOnSignUp: !!options.emailVerification?.sendOnSignUp,
324
+ sendOnSignIn: !!options.emailVerification?.sendOnSignIn,
325
+ autoSignInAfterVerification: !!options.emailVerification?.autoSignInAfterVerification,
326
+ expiresIn: options.emailVerification?.expiresIn,
327
+ onEmailVerification: !!options.emailVerification?.onEmailVerification,
328
+ afterEmailVerification: !!options.emailVerification?.afterEmailVerification
329
+ },
330
+ emailAndPassword: {
331
+ enabled: !!options.emailAndPassword?.enabled,
332
+ disableSignUp: !!options.emailAndPassword?.disableSignUp,
333
+ requireEmailVerification: !!options.emailAndPassword?.requireEmailVerification,
334
+ maxPasswordLength: options.emailAndPassword?.maxPasswordLength,
335
+ minPasswordLength: options.emailAndPassword?.minPasswordLength,
336
+ sendResetPassword: !!options.emailAndPassword?.sendResetPassword,
337
+ resetPasswordTokenExpiresIn: options.emailAndPassword?.resetPasswordTokenExpiresIn,
338
+ onPasswordReset: !!options.emailAndPassword?.onPasswordReset,
339
+ password: {
340
+ hash: !!options.emailAndPassword?.password?.hash,
341
+ verify: !!options.emailAndPassword?.password?.verify
342
+ },
343
+ autoSignIn: !!options.emailAndPassword?.autoSignIn,
344
+ revokeSessionsOnPasswordReset: !!options.emailAndPassword?.revokeSessionsOnPasswordReset
345
+ },
346
+ socialProviders: Object.keys(options.socialProviders || {}).map((p) => {
347
+ const provider = options.socialProviders?.[p];
348
+ if (!provider) return {};
349
+ return {
350
+ id: p,
351
+ mapProfileToUser: !!provider.mapProfileToUser,
352
+ disableDefaultScope: !!provider.disableDefaultScope,
353
+ disableIdTokenSignIn: !!provider.disableIdTokenSignIn,
354
+ disableImplicitSignUp: provider.disableImplicitSignUp,
355
+ disableSignUp: provider.disableSignUp,
356
+ getUserInfo: !!provider.getUserInfo,
357
+ overrideUserInfoOnSignIn: !!provider.overrideUserInfoOnSignIn,
358
+ prompt: provider.prompt,
359
+ verifyIdToken: !!provider.verifyIdToken,
360
+ scope: provider.scope,
361
+ refreshAccessToken: !!provider.refreshAccessToken
362
+ };
363
+ }),
364
+ plugins: options.plugins?.map((p) => p.id.toString()),
365
+ user: {
366
+ modelName: options.user?.modelName,
367
+ fields: options.user?.fields,
368
+ additionalFields: options.user?.additionalFields,
369
+ changeEmail: {
370
+ enabled: options.user?.changeEmail?.enabled,
371
+ sendChangeEmailVerification: !!options.user?.changeEmail?.sendChangeEmailVerification
372
+ }
373
+ },
374
+ verification: {
375
+ modelName: options.verification?.modelName,
376
+ disableCleanup: options.verification?.disableCleanup,
377
+ fields: options.verification?.fields
378
+ },
379
+ session: {
380
+ modelName: options.session?.modelName,
381
+ additionalFields: options.session?.additionalFields,
382
+ cookieCache: {
383
+ enabled: options.session?.cookieCache?.enabled,
384
+ maxAge: options.session?.cookieCache?.maxAge
385
+ },
386
+ disableSessionRefresh: options.session?.disableSessionRefresh,
387
+ expiresIn: options.session?.expiresIn,
388
+ fields: options.session?.fields,
389
+ freshAge: options.session?.freshAge,
390
+ preserveSessionInDatabase: options.session?.preserveSessionInDatabase,
391
+ storeSessionInDatabase: options.session?.storeSessionInDatabase,
392
+ updateAge: options.session?.updateAge
393
+ },
394
+ account: {
395
+ modelName: options.account?.modelName,
396
+ fields: options.account?.fields,
397
+ encryptOAuthTokens: options.account?.encryptOAuthTokens,
398
+ updateAccountOnSignIn: options.account?.updateAccountOnSignIn,
399
+ accountLinking: {
400
+ enabled: options.account?.accountLinking?.enabled,
401
+ trustedProviders: options.account?.accountLinking?.trustedProviders,
402
+ updateUserInfoOnLink: options.account?.accountLinking?.updateUserInfoOnLink,
403
+ allowUnlinkingAll: options.account?.accountLinking?.allowUnlinkingAll
404
+ }
405
+ },
406
+ hooks: {
407
+ after: !!options.hooks?.after,
408
+ before: !!options.hooks?.before
409
+ },
410
+ secondaryStorage: !!options.secondaryStorage,
411
+ advanced: {
412
+ cookiePrefix: !!options.advanced?.cookiePrefix,
413
+ //this shouldn't be tracked
414
+ cookies: !!options.advanced?.cookies,
415
+ crossSubDomainCookies: {
416
+ domain: !!options.advanced?.crossSubDomainCookies?.domain,
417
+ enabled: options.advanced?.crossSubDomainCookies?.enabled,
418
+ additionalCookies: options.advanced?.crossSubDomainCookies?.additionalCookies
419
+ },
420
+ database: {
421
+ useNumberId: !!options.advanced?.database?.useNumberId,
422
+ generateId: options.advanced?.database?.generateId,
423
+ defaultFindManyLimit: options.advanced?.database?.defaultFindManyLimit
424
+ },
425
+ useSecureCookies: options.advanced?.useSecureCookies,
426
+ ipAddress: {
427
+ disableIpTracking: options.advanced?.ipAddress?.disableIpTracking,
428
+ ipAddressHeaders: options.advanced?.ipAddress?.ipAddressHeaders
429
+ },
430
+ disableCSRFCheck: options.advanced?.disableCSRFCheck,
431
+ cookieAttributes: {
432
+ expires: options.advanced?.defaultCookieAttributes?.expires,
433
+ secure: options.advanced?.defaultCookieAttributes?.secure,
434
+ sameSite: options.advanced?.defaultCookieAttributes?.sameSite,
435
+ domain: !!options.advanced?.defaultCookieAttributes?.domain,
436
+ path: options.advanced?.defaultCookieAttributes?.path,
437
+ httpOnly: options.advanced?.defaultCookieAttributes?.httpOnly
438
+ }
439
+ },
440
+ trustedOrigins: options.trustedOrigins?.length,
441
+ rateLimit: {
442
+ storage: options.rateLimit?.storage,
443
+ modelName: options.rateLimit?.modelName,
444
+ window: options.rateLimit?.window,
445
+ customStorage: !!options.rateLimit?.customStorage,
446
+ enabled: options.rateLimit?.enabled,
447
+ max: options.rateLimit?.max
448
+ },
449
+ onAPIError: {
450
+ errorURL: options.onAPIError?.errorURL,
451
+ onError: !!options.onAPIError?.onError,
452
+ throw: options.onAPIError?.throw
453
+ },
454
+ logger: {
455
+ disabled: options.logger?.disabled,
456
+ level: options.logger?.level,
457
+ log: !!options.logger?.log
458
+ },
459
+ databaseHooks: {
460
+ user: {
461
+ create: {
462
+ after: !!options.databaseHooks?.user?.create?.after,
463
+ before: !!options.databaseHooks?.user?.create?.before
464
+ },
465
+ update: {
466
+ after: !!options.databaseHooks?.user?.update?.after,
467
+ before: !!options.databaseHooks?.user?.update?.before
468
+ }
469
+ },
470
+ session: {
471
+ create: {
472
+ after: !!options.databaseHooks?.session?.create?.after,
473
+ before: !!options.databaseHooks?.session?.create?.before
474
+ },
475
+ update: {
476
+ after: !!options.databaseHooks?.session?.update?.after,
477
+ before: !!options.databaseHooks?.session?.update?.before
478
+ }
479
+ },
480
+ account: {
481
+ create: {
482
+ after: !!options.databaseHooks?.account?.create?.after,
483
+ before: !!options.databaseHooks?.account?.create?.before
484
+ },
485
+ update: {
486
+ after: !!options.databaseHooks?.account?.update?.after,
487
+ before: !!options.databaseHooks?.account?.update?.before
488
+ }
489
+ },
490
+ verification: {
491
+ create: {
492
+ after: !!options.databaseHooks?.verification?.create?.after,
493
+ before: !!options.databaseHooks?.verification?.create?.before
494
+ },
495
+ update: {
496
+ after: !!options.databaseHooks?.verification?.update?.after,
497
+ before: !!options.databaseHooks?.verification?.update?.before
498
+ }
499
+ }
500
+ }
501
+ };
502
+ }
503
+
504
+ async function createTelemetry(options, context) {
505
+ const debugEnabled = options.telemetry?.debug || getBooleanEnvVar("BETTER_AUTH_TELEMETRY_DEBUG", false);
506
+ const TELEMETRY_ENDPOINT = ENV.BETTER_AUTH_TELEMETRY_ENDPOINT;
507
+ const track = async (event) => {
508
+ try {
509
+ if (context?.customTrack) {
510
+ await context.customTrack(event);
511
+ } else {
512
+ if (debugEnabled) {
513
+ await Promise.resolve(
514
+ logger.info("telemetry event", JSON.stringify(event, null, 2))
515
+ );
516
+ } else {
517
+ await betterFetch(TELEMETRY_ENDPOINT, {
518
+ method: "POST",
519
+ body: event
520
+ });
521
+ }
522
+ }
523
+ } catch {
524
+ }
525
+ };
526
+ const isEnabled = async () => {
527
+ const telemetryEnabled = options.telemetry?.enabled !== void 0 ? options.telemetry.enabled : false;
528
+ const envEnabled = getBooleanEnvVar("BETTER_AUTH_TELEMETRY", false);
529
+ return (envEnabled || telemetryEnabled) && (context?.skipTestCheck || !isTest());
530
+ };
531
+ const enabled = await isEnabled();
532
+ let anonymousId;
533
+ if (enabled) {
534
+ anonymousId = await getProjectId(options.baseURL);
535
+ const payload = {
536
+ config: getTelemetryAuthConfig(options),
537
+ runtime: detectRuntime(),
538
+ database: await detectDatabase(),
539
+ framework: await detectFramework(),
540
+ environment: detectEnvironment(),
541
+ systemInfo: await detectSystemInfo(),
542
+ packageManager: detectPackageManager()
543
+ };
544
+ void track({ type: "init", payload, anonymousId });
545
+ }
546
+ return {
547
+ publish: async (event) => {
548
+ if (!enabled) return;
549
+ if (!anonymousId) {
550
+ anonymousId = await getProjectId(options.baseURL);
551
+ }
552
+ await track({
553
+ type: event.type,
554
+ payload: event.payload,
555
+ anonymousId
556
+ });
557
+ }
558
+ };
559
+ }
560
+
561
+ export { createTelemetry, getTelemetryAuthConfig };
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "@better-auth/telemetry",
3
+ "version": "1.3.28",
4
+ "description": "Telemetry package for Better Auth",
5
+ "type": "module",
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/index.mjs",
8
+ "exports": {
9
+ ".": {
10
+ "import": {
11
+ "types": "./dist/index.d.ts",
12
+ "default": "./dist/index.mjs"
13
+ },
14
+ "require": {
15
+ "types": "./dist/index.d.cts",
16
+ "default": "./dist/index.cjs"
17
+ }
18
+ }
19
+ },
20
+ "typesVersions": {
21
+ "*": {
22
+ "index": [
23
+ "dist/index.d.ts"
24
+ ]
25
+ }
26
+ },
27
+ "devDependencies": {
28
+ "unbuild": "3.6.1",
29
+ "type-fest": "^4.31.0"
30
+ },
31
+ "dependencies": {
32
+ "@better-auth/utils": "0.3.0",
33
+ "@better-fetch/fetch": "1.1.18",
34
+ "@better-auth/core": "1.3.28"
35
+ },
36
+ "scripts": {
37
+ "build": "unbuild --clean",
38
+ "stub": "unbuild --stub",
39
+ "typecheck": "tsc --project tsconfig.json"
40
+ }
41
+ }