@nestjs-kit/better-auth 0.0.0-stage → 2.0.0

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 (142) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +1078 -2
  3. package/dist/admin.cjs +88 -0
  4. package/dist/admin.cjs.map +1 -0
  5. package/dist/admin.d.cts +14 -0
  6. package/dist/admin.d.cts.map +1 -0
  7. package/dist/admin.d.mts +14 -0
  8. package/dist/admin.d.mts.map +1 -0
  9. package/dist/admin.mjs +85 -0
  10. package/dist/admin.mjs.map +1 -0
  11. package/dist/api-key.cjs +164 -0
  12. package/dist/api-key.cjs.map +1 -0
  13. package/dist/api-key.d.cts +42 -0
  14. package/dist/api-key.d.cts.map +1 -0
  15. package/dist/api-key.d.mts +42 -0
  16. package/dist/api-key.d.mts.map +1 -0
  17. package/dist/api-key.mjs +160 -0
  18. package/dist/api-key.mjs.map +1 -0
  19. package/dist/auth-contracts-Brh_Qko9.d.cts +1654 -0
  20. package/dist/auth-contracts-Brh_Qko9.d.cts.map +1 -0
  21. package/dist/auth-contracts-Cz7C4_Ch.d.mts +1654 -0
  22. package/dist/auth-contracts-Cz7C4_Ch.d.mts.map +1 -0
  23. package/dist/auth-decorators-B1mFnGJ6.mjs +284 -0
  24. package/dist/auth-decorators-B1mFnGJ6.mjs.map +1 -0
  25. package/dist/auth-decorators-Cu_nxWnF.cjs +421 -0
  26. package/dist/auth-decorators-Cu_nxWnF.cjs.map +1 -0
  27. package/dist/auth-errors-C3rbTV9p.mjs +301 -0
  28. package/dist/auth-errors-C3rbTV9p.mjs.map +1 -0
  29. package/dist/auth-errors-DmiKl0L_.cjs +378 -0
  30. package/dist/auth-errors-DmiKl0L_.cjs.map +1 -0
  31. package/dist/auth-guard-CLyhAEEj.cjs +136 -0
  32. package/dist/auth-guard-CLyhAEEj.cjs.map +1 -0
  33. package/dist/auth-guard-h9QB_l11.mjs +125 -0
  34. package/dist/auth-guard-h9QB_l11.mjs.map +1 -0
  35. package/dist/auth-module-BgcY2HpA.cjs +2809 -0
  36. package/dist/auth-module-BgcY2HpA.cjs.map +1 -0
  37. package/dist/auth-module-CtHx3gRU.mjs +2708 -0
  38. package/dist/auth-module-CtHx3gRU.mjs.map +1 -0
  39. package/dist/auth-scope-interceptor-BjxAL1-S.cjs +290 -0
  40. package/dist/auth-scope-interceptor-BjxAL1-S.cjs.map +1 -0
  41. package/dist/auth-scope-interceptor-DYPn3b8M.mjs +231 -0
  42. package/dist/auth-scope-interceptor-DYPn3b8M.mjs.map +1 -0
  43. package/dist/bridge-protocol-BDw8opAG.cjs +25 -0
  44. package/dist/bridge-protocol-BDw8opAG.cjs.map +1 -0
  45. package/dist/bridge-protocol-c66aEkr5.mjs +8 -0
  46. package/dist/bridge-protocol-c66aEkr5.mjs.map +1 -0
  47. package/dist/decorate-Cr4Q7bNE.cjs +319 -0
  48. package/dist/decorate-Cr4Q7bNE.cjs.map +1 -0
  49. package/dist/decorate-Dt0e9K6R.mjs +80 -0
  50. package/dist/decorate-Dt0e9K6R.mjs.map +1 -0
  51. package/dist/express.cjs +256 -0
  52. package/dist/express.cjs.map +1 -0
  53. package/dist/express.d.cts +37 -0
  54. package/dist/express.d.cts.map +1 -0
  55. package/dist/express.d.mts +37 -0
  56. package/dist/express.d.mts.map +1 -0
  57. package/dist/express.mjs +254 -0
  58. package/dist/express.mjs.map +1 -0
  59. package/dist/fastify.cjs +218 -0
  60. package/dist/fastify.cjs.map +1 -0
  61. package/dist/fastify.d.cts +28 -0
  62. package/dist/fastify.d.cts.map +1 -0
  63. package/dist/fastify.d.mts +28 -0
  64. package/dist/fastify.d.mts.map +1 -0
  65. package/dist/fastify.mjs +216 -0
  66. package/dist/fastify.mjs.map +1 -0
  67. package/dist/graphql.cjs +509 -0
  68. package/dist/graphql.cjs.map +1 -0
  69. package/dist/graphql.d.cts +38 -0
  70. package/dist/graphql.d.cts.map +1 -0
  71. package/dist/graphql.d.mts +38 -0
  72. package/dist/graphql.d.mts.map +1 -0
  73. package/dist/graphql.mjs +503 -0
  74. package/dist/graphql.mjs.map +1 -0
  75. package/dist/index.cjs +86 -0
  76. package/dist/index.d.cts +2 -0
  77. package/dist/index.d.mts +2 -0
  78. package/dist/index.mjs +8 -0
  79. package/dist/microservices.cjs +231 -0
  80. package/dist/microservices.cjs.map +1 -0
  81. package/dist/microservices.d.cts +39 -0
  82. package/dist/microservices.d.cts.map +1 -0
  83. package/dist/microservices.d.mts +39 -0
  84. package/dist/microservices.d.mts.map +1 -0
  85. package/dist/microservices.mjs +222 -0
  86. package/dist/microservices.mjs.map +1 -0
  87. package/dist/organization.cjs +191 -0
  88. package/dist/organization.cjs.map +1 -0
  89. package/dist/organization.d.cts +40 -0
  90. package/dist/organization.d.cts.map +1 -0
  91. package/dist/organization.d.mts +40 -0
  92. package/dist/organization.d.mts.map +1 -0
  93. package/dist/organization.mjs +177 -0
  94. package/dist/organization.mjs.map +1 -0
  95. package/dist/platform-CZl7TY8j.mjs +414 -0
  96. package/dist/platform-CZl7TY8j.mjs.map +1 -0
  97. package/dist/platform-YICqqYv6.cjs +473 -0
  98. package/dist/platform-YICqqYv6.cjs.map +1 -0
  99. package/dist/platform.cjs +10 -0
  100. package/dist/platform.d.cts +43 -0
  101. package/dist/platform.d.cts.map +1 -0
  102. package/dist/platform.d.mts +43 -0
  103. package/dist/platform.d.mts.map +1 -0
  104. package/dist/platform.mjs +1 -0
  105. package/dist/plugin.cjs +323 -0
  106. package/dist/plugin.cjs.map +1 -0
  107. package/dist/plugin.d.cts +24 -0
  108. package/dist/plugin.d.cts.map +1 -0
  109. package/dist/plugin.d.mts +24 -0
  110. package/dist/plugin.d.mts.map +1 -0
  111. package/dist/plugin.mjs +321 -0
  112. package/dist/plugin.mjs.map +1 -0
  113. package/dist/principal-readings-Chmt6rQV.cjs +208 -0
  114. package/dist/principal-readings-Chmt6rQV.cjs.map +1 -0
  115. package/dist/principal-readings-Ied2staw.mjs +191 -0
  116. package/dist/principal-readings-Ied2staw.mjs.map +1 -0
  117. package/dist/rolldown-runtime-VH7oDXx4.cjs +28 -0
  118. package/dist/testing/conformance.cjs +6214 -0
  119. package/dist/testing/conformance.cjs.map +1 -0
  120. package/dist/testing/conformance.d.cts +528 -0
  121. package/dist/testing/conformance.d.cts.map +1 -0
  122. package/dist/testing/conformance.d.mts +528 -0
  123. package/dist/testing/conformance.d.mts.map +1 -0
  124. package/dist/testing/conformance.mjs +6204 -0
  125. package/dist/testing/conformance.mjs.map +1 -0
  126. package/dist/testing.cjs +221 -0
  127. package/dist/testing.cjs.map +1 -0
  128. package/dist/testing.d.cts +64 -0
  129. package/dist/testing.d.cts.map +1 -0
  130. package/dist/testing.d.mts +64 -0
  131. package/dist/testing.d.mts.map +1 -0
  132. package/dist/testing.mjs +214 -0
  133. package/dist/testing.mjs.map +1 -0
  134. package/dist/websockets.cjs +396 -0
  135. package/dist/websockets.cjs.map +1 -0
  136. package/dist/websockets.d.cts +67 -0
  137. package/dist/websockets.d.cts.map +1 -0
  138. package/dist/websockets.d.mts +67 -0
  139. package/dist/websockets.d.mts.map +1 -0
  140. package/dist/websockets.mjs +383 -0
  141. package/dist/websockets.mjs.map +1 -0
  142. package/package.json +327 -3
package/package.json CHANGED
@@ -1,6 +1,330 @@
1
1
  {
2
2
  "name": "@nestjs-kit/better-auth",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "2.0.0",
4
+ "description": "A Better Auth integration for NestJS with Express and Fastify platforms, Socket.IO and ws gateways, microservice RPC transports, and admin, organization and API-key authorization",
5
+ "license": "MIT",
6
+ "author": "thilllon",
7
+ "type": "module",
8
+ "main": "./dist/index.cjs",
9
+ "module": "./dist/index.mjs",
10
+ "types": "./dist/index.d.cts",
11
+ "exports": {
12
+ ".": {
13
+ "module-sync": {
14
+ "types": "./dist/index.d.mts",
15
+ "default": "./dist/index.mjs"
16
+ },
17
+ "import": {
18
+ "types": "./dist/index.d.mts",
19
+ "default": "./dist/index.mjs"
20
+ },
21
+ "require": {
22
+ "types": "./dist/index.d.cts",
23
+ "default": "./dist/index.cjs"
24
+ }
25
+ },
26
+ "./plugin": {
27
+ "module-sync": {
28
+ "types": "./dist/plugin.d.mts",
29
+ "default": "./dist/plugin.mjs"
30
+ },
31
+ "import": {
32
+ "types": "./dist/plugin.d.mts",
33
+ "default": "./dist/plugin.mjs"
34
+ },
35
+ "require": {
36
+ "types": "./dist/plugin.d.cts",
37
+ "default": "./dist/plugin.cjs"
38
+ }
39
+ },
40
+ "./platform": {
41
+ "module-sync": {
42
+ "types": "./dist/platform.d.mts",
43
+ "default": "./dist/platform.mjs"
44
+ },
45
+ "import": {
46
+ "types": "./dist/platform.d.mts",
47
+ "default": "./dist/platform.mjs"
48
+ },
49
+ "require": {
50
+ "types": "./dist/platform.d.cts",
51
+ "default": "./dist/platform.cjs"
52
+ }
53
+ },
54
+ "./express": {
55
+ "module-sync": {
56
+ "types": "./dist/express.d.mts",
57
+ "default": "./dist/express.mjs"
58
+ },
59
+ "import": {
60
+ "types": "./dist/express.d.mts",
61
+ "default": "./dist/express.mjs"
62
+ },
63
+ "require": {
64
+ "types": "./dist/express.d.cts",
65
+ "default": "./dist/express.cjs"
66
+ }
67
+ },
68
+ "./fastify": {
69
+ "module-sync": {
70
+ "types": "./dist/fastify.d.mts",
71
+ "default": "./dist/fastify.mjs"
72
+ },
73
+ "import": {
74
+ "types": "./dist/fastify.d.mts",
75
+ "default": "./dist/fastify.mjs"
76
+ },
77
+ "require": {
78
+ "types": "./dist/fastify.d.cts",
79
+ "default": "./dist/fastify.cjs"
80
+ }
81
+ },
82
+ "./graphql": {
83
+ "module-sync": {
84
+ "types": "./dist/graphql.d.mts",
85
+ "default": "./dist/graphql.mjs"
86
+ },
87
+ "import": {
88
+ "types": "./dist/graphql.d.mts",
89
+ "default": "./dist/graphql.mjs"
90
+ },
91
+ "require": {
92
+ "types": "./dist/graphql.d.cts",
93
+ "default": "./dist/graphql.cjs"
94
+ }
95
+ },
96
+ "./websockets": {
97
+ "module-sync": {
98
+ "types": "./dist/websockets.d.mts",
99
+ "default": "./dist/websockets.mjs"
100
+ },
101
+ "import": {
102
+ "types": "./dist/websockets.d.mts",
103
+ "default": "./dist/websockets.mjs"
104
+ },
105
+ "require": {
106
+ "types": "./dist/websockets.d.cts",
107
+ "default": "./dist/websockets.cjs"
108
+ }
109
+ },
110
+ "./microservices": {
111
+ "module-sync": {
112
+ "types": "./dist/microservices.d.mts",
113
+ "default": "./dist/microservices.mjs"
114
+ },
115
+ "import": {
116
+ "types": "./dist/microservices.d.mts",
117
+ "default": "./dist/microservices.mjs"
118
+ },
119
+ "require": {
120
+ "types": "./dist/microservices.d.cts",
121
+ "default": "./dist/microservices.cjs"
122
+ }
123
+ },
124
+ "./admin": {
125
+ "module-sync": {
126
+ "types": "./dist/admin.d.mts",
127
+ "default": "./dist/admin.mjs"
128
+ },
129
+ "import": {
130
+ "types": "./dist/admin.d.mts",
131
+ "default": "./dist/admin.mjs"
132
+ },
133
+ "require": {
134
+ "types": "./dist/admin.d.cts",
135
+ "default": "./dist/admin.cjs"
136
+ }
137
+ },
138
+ "./organization": {
139
+ "module-sync": {
140
+ "types": "./dist/organization.d.mts",
141
+ "default": "./dist/organization.mjs"
142
+ },
143
+ "import": {
144
+ "types": "./dist/organization.d.mts",
145
+ "default": "./dist/organization.mjs"
146
+ },
147
+ "require": {
148
+ "types": "./dist/organization.d.cts",
149
+ "default": "./dist/organization.cjs"
150
+ }
151
+ },
152
+ "./api-key": {
153
+ "module-sync": {
154
+ "types": "./dist/api-key.d.mts",
155
+ "default": "./dist/api-key.mjs"
156
+ },
157
+ "import": {
158
+ "types": "./dist/api-key.d.mts",
159
+ "default": "./dist/api-key.mjs"
160
+ },
161
+ "require": {
162
+ "types": "./dist/api-key.d.cts",
163
+ "default": "./dist/api-key.cjs"
164
+ }
165
+ },
166
+ "./testing": {
167
+ "module-sync": {
168
+ "types": "./dist/testing.d.mts",
169
+ "default": "./dist/testing.mjs"
170
+ },
171
+ "import": {
172
+ "types": "./dist/testing.d.mts",
173
+ "default": "./dist/testing.mjs"
174
+ },
175
+ "require": {
176
+ "types": "./dist/testing.d.cts",
177
+ "default": "./dist/testing.cjs"
178
+ }
179
+ },
180
+ "./testing/conformance": {
181
+ "module-sync": {
182
+ "types": "./dist/testing/conformance.d.mts",
183
+ "default": "./dist/testing/conformance.mjs"
184
+ },
185
+ "import": {
186
+ "types": "./dist/testing/conformance.d.mts",
187
+ "default": "./dist/testing/conformance.mjs"
188
+ },
189
+ "require": {
190
+ "types": "./dist/testing/conformance.d.cts",
191
+ "default": "./dist/testing/conformance.cjs"
192
+ }
193
+ },
194
+ "./package.json": "./package.json"
195
+ },
196
+ "files": [
197
+ "dist",
198
+ "README.md",
199
+ "LICENSE"
200
+ ],
201
+ "sideEffects": false,
202
+ "engines": {
203
+ "node": ">=24.11.0"
204
+ },
205
+ "publishConfig": {
206
+ "access": "public",
207
+ "provenance": true
208
+ },
209
+ "repository": {
210
+ "type": "git",
211
+ "url": "git+https://github.com/thilllon/nestjs-kit.git",
212
+ "directory": "packages/nestjskit__better-auth"
213
+ },
214
+ "homepage": "https://github.com/thilllon/nestjs-kit/tree/main/packages/nestjskit__better-auth",
215
+ "bugs": {
216
+ "url": "https://github.com/thilllon/nestjs-kit/issues"
217
+ },
218
+ "keywords": [
219
+ "nestjs",
220
+ "nest",
221
+ "better-auth",
222
+ "authentication",
223
+ "graphql",
224
+ "apollo",
225
+ "mercurius",
226
+ "websockets",
227
+ "socket.io",
228
+ "microservices",
229
+ "rpc",
230
+ "grpc",
231
+ "typescript"
232
+ ],
233
+ "peerDependenciesMeta": {
234
+ "@nestjs/graphql": {
235
+ "optional": true
236
+ },
237
+ "@nestjs/microservices": {
238
+ "optional": true
239
+ },
240
+ "@nestjs/testing": {
241
+ "optional": true
242
+ },
243
+ "@nestjs/websockets": {
244
+ "optional": true
245
+ },
246
+ "graphql": {
247
+ "optional": true
248
+ }
249
+ },
250
+ "peerDependencies": {
251
+ "@nestjs/common": "^12.0.3",
252
+ "@nestjs/core": "^12.0.3",
253
+ "@nestjs/graphql": "^14.0.2",
254
+ "@nestjs/microservices": "^12.0.3",
255
+ "@nestjs/testing": "^12.0.3",
256
+ "@nestjs/websockets": "^12.0.3",
257
+ "better-auth": ">=1.7.5 <2",
258
+ "graphql": "^16.14.2",
259
+ "reflect-metadata": "^0.2.2",
260
+ "rxjs": "^7.8.2"
261
+ },
262
+ "dependencies": {
263
+ "defu": "6.1.7",
264
+ "path-to-regexp": "8.4.2"
265
+ },
266
+ "devDependencies": {
267
+ "@apollo/server": "5.5.1",
268
+ "@apollo/subgraph": "2.15.1",
269
+ "@as-integrations/express5": "1.1.2",
270
+ "@as-integrations/fastify": "3.1.0",
271
+ "@better-auth/api-key": "1.7.7",
272
+ "@electric-sql/pglite": "0.5.9",
273
+ "@grpc/grpc-js": "1.14.6",
274
+ "@grpc/proto-loader": "0.8.1",
275
+ "@mercuriusjs/federation": "5.1.1",
276
+ "@nats-io/transport-node": "3.4.0",
277
+ "@nestjs/apollo": "14.0.2",
278
+ "@nestjs/common": "12.1.1",
279
+ "@nestjs/core": "12.1.1",
280
+ "@nestjs/graphql": "14.0.2",
281
+ "@nestjs/mercurius": "14.0.2",
282
+ "@nestjs/microservices": "12.1.1",
283
+ "@nestjs/platform-express": "12.1.1",
284
+ "@nestjs/platform-fastify": "12.1.1",
285
+ "@nestjs/platform-socket.io": "12.1.1",
286
+ "@nestjs/platform-ws": "12.1.1",
287
+ "@nestjs/testing": "12.1.1",
288
+ "@nestjs/websockets": "12.1.1",
289
+ "@types/express": "5.0.6",
290
+ "@types/pg": "8.23.1",
291
+ "@types/ws": "8.18.2",
292
+ "amqp-connection-manager": "5.0.0",
293
+ "amqplib": "2.2.0",
294
+ "better-auth": "1.7.7",
295
+ "express": "5.3.0",
296
+ "graphql": "16.14.2",
297
+ "graphql-subscriptions": "3.0.0",
298
+ "graphql-ws": "6.3.0",
299
+ "ioredis": "6.0.0",
300
+ "jose": "6.2.12",
301
+ "kafkajs": "2.2.4",
302
+ "light-my-request": "6.8.0",
303
+ "mercurius": "16.11.0",
304
+ "mqtt": "5.16.0",
305
+ "pg": "8.23.1",
306
+ "reflect-metadata": "0.2.2",
307
+ "rxjs": "7.8.2",
308
+ "socket.io": "4.8.4",
309
+ "socket.io-client": "4.8.4",
310
+ "ws": "8.22.0",
311
+ "@arethetypeswrong/core": "0.18.5",
312
+ "publint": "0.3.25",
313
+ "tsdown": "0.23.1",
314
+ "@swc/core": "1.16.18",
315
+ "@types/node": "24.19.2",
316
+ "tsx": "4.23.15",
317
+ "typescript": "7.0.2",
318
+ "unplugin-swc": "2.0.0",
319
+ "vitest": "5.0.4"
320
+ },
321
+ "scripts": {
322
+ "typecheck": "tsc --project tsconfig.test.json",
323
+ "build": "tsdown",
324
+ "test": "vitest run --project unit",
325
+ "test:packaging": "vitest run --project packaging",
326
+ "docker:up": "docker compose up --detach --wait",
327
+ "docker:down": "docker compose down --volumes --remove-orphans",
328
+ "test:e2e": "vitest run --project e2e"
329
+ }
6
330
  }