@tapedb/auth 0.0.0-stage → 0.2.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Brandon Diaz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,31 @@
1
- # Temporary Holding Version
1
+ # @tapedb/auth
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Better Auth integration for [tapedb](https://tapedb.dev), a typed database for Cloudflare.
4
+ Users, sessions and members live in one dedicated auth Durable Object; workspace
5
+ roles come from stored membership.
6
+
7
+ ```bash
8
+ npm install @tapedb/tapedb @tapedb/auth better-auth
9
+ ```
10
+
11
+ ```ts
12
+ import { tapedbAuth, eraseAuthUser, authDatabase } from "@tapedb/auth";
13
+ ```
14
+
15
+ `npx @tapedb/cli init --auth` wires this up for a new project. The exports are
16
+ `tapedbAuth` (the Better Auth adapter factory), `eraseAuthUser` (the
17
+ `deleteUser.beforeDelete` hook) and `authDatabase` (the auth room stub).
18
+
19
+ ## Two import paths, one module
20
+
21
+ `@tapedb/auth` is an alias, not a fork: it re-exports `@tapedb/tapedb/auth` and
22
+ pins the exact `@tapedb/tapedb` version it ships with. Either path works, and
23
+ the subpath stays supported:
24
+
25
+ ```ts
26
+ import { tapedbAuth } from "@tapedb/auth"; // preferred
27
+ import { tapedbAuth } from "@tapedb/tapedb/auth"; // same module, still supported
28
+ ```
29
+
30
+ `better-auth` is an optional peer dependency: installs that never import this
31
+ entry do not need it.
package/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ // Types for `@tapedb/auth` are `@tapedb/tapedb/auth`'s: one declaration, no copy.
2
+ export * from "@tapedb/tapedb/auth";
package/index.mjs ADDED
@@ -0,0 +1,4 @@
1
+ // `@tapedb/auth` is `@tapedb/tapedb/auth`: same module, preferred name.
2
+ // No logic lives here — the Better Auth adapter, the erasure hook and the auth
3
+ // room are the core package's, so both import paths are always the same release.
4
+ export * from "@tapedb/tapedb/auth";
package/package.json CHANGED
@@ -1,6 +1,45 @@
1
1
  {
2
2
  "name": "@tapedb/auth",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.1",
4
+ "description": "Better Auth adapter for tapedb: users, sessions and members in a dedicated auth Durable Object.",
5
+ "type": "module",
6
+ "exports": {
7
+ ".": {
8
+ "types": "./index.d.ts",
9
+ "import": "./index.mjs"
10
+ }
11
+ },
12
+ "main": "index.mjs",
13
+ "types": "index.d.ts",
14
+ "sideEffects": false,
15
+ "files": [
16
+ "index.mjs",
17
+ "index.d.ts",
18
+ "README.md",
19
+ "LICENSE"
20
+ ],
21
+ "dependencies": {
22
+ "@tapedb/tapedb": "0.2.1"
23
+ },
24
+ "peerDependencies": {
25
+ "better-auth": "^1.7.25"
26
+ },
27
+ "peerDependenciesMeta": {
28
+ "better-auth": {
29
+ "optional": true
30
+ }
31
+ },
32
+ "engines": {
33
+ "node": ">=22.18"
34
+ },
35
+ "license": "MIT",
36
+ "publishConfig": {
37
+ "access": "public"
38
+ },
39
+ "repository": {
40
+ "type": "git",
41
+ "url": "git+https://github.com/tapedb/tapedb.git",
42
+ "directory": "packages/auth"
43
+ },
44
+ "homepage": "https://tapedb.dev"
45
+ }