jazz-tools 0.20.11 → 0.20.14

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 (53) hide show
  1. package/.svelte-kit/__package__/server.d.ts.map +1 -1
  2. package/.svelte-kit/__package__/server.js +3 -3
  3. package/.svelte-kit/__package__/tests/server.test.js +34 -0
  4. package/.turbo/turbo-build.log +62 -50
  5. package/CHANGELOG.md +30 -0
  6. package/bin/docs-index.db +0 -0
  7. package/bin/docs-index.txt +10480 -0
  8. package/dist/better-auth/auth/server.d.ts.map +1 -1
  9. package/dist/better-auth/auth/server.js +2 -3
  10. package/dist/better-auth/auth/server.js.map +1 -1
  11. package/dist/mcp/backend-naive.d.ts +4 -0
  12. package/dist/mcp/backend-naive.d.ts.map +1 -0
  13. package/dist/mcp/backend-naive.test.d.ts +2 -0
  14. package/dist/mcp/backend-naive.test.d.ts.map +1 -0
  15. package/dist/mcp/backend-sqlite.d.ts +25 -0
  16. package/dist/mcp/backend-sqlite.d.ts.map +1 -0
  17. package/dist/mcp/backend-sqlite.test.d.ts +2 -0
  18. package/dist/mcp/backend-sqlite.test.d.ts.map +1 -0
  19. package/dist/mcp/build-index.d.ts +52 -0
  20. package/dist/mcp/build-index.d.ts.map +1 -0
  21. package/dist/mcp/build-index.js +213 -0
  22. package/dist/mcp/build-index.js.map +1 -0
  23. package/dist/mcp/build-index.test.d.ts +2 -0
  24. package/dist/mcp/build-index.test.d.ts.map +1 -0
  25. package/dist/mcp/integration.test.d.ts +2 -0
  26. package/dist/mcp/integration.test.d.ts.map +1 -0
  27. package/dist/mcp/server.d.ts +10 -0
  28. package/dist/mcp/server.d.ts.map +1 -0
  29. package/dist/mcp/server.js +717 -0
  30. package/dist/mcp/server.js.map +1 -0
  31. package/dist/mcp/server.test.d.ts +2 -0
  32. package/dist/mcp/server.test.d.ts.map +1 -0
  33. package/dist/mcp/tools.d.ts +54 -0
  34. package/dist/mcp/tools.d.ts.map +1 -0
  35. package/dist/tiptap/index.d.ts +2 -2
  36. package/dist/tiptap/index.d.ts.map +1 -1
  37. package/dist/tiptap/index.js +4 -3
  38. package/dist/tiptap/index.js.map +1 -1
  39. package/package.json +16 -5
  40. package/src/better-auth/auth/server.ts +3 -3
  41. package/src/better-auth/auth/tests/server.test.ts +45 -0
  42. package/src/mcp/backend-naive.test.ts +243 -0
  43. package/src/mcp/backend-naive.ts +164 -0
  44. package/src/mcp/backend-sqlite.test.ts +290 -0
  45. package/src/mcp/backend-sqlite.ts +174 -0
  46. package/src/mcp/build-index.test.ts +499 -0
  47. package/src/mcp/build-index.ts +347 -0
  48. package/src/mcp/integration.test.ts +212 -0
  49. package/src/mcp/server.test.ts +360 -0
  50. package/src/mcp/server.ts +183 -0
  51. package/src/mcp/tools.ts +221 -0
  52. package/src/tiptap/index.ts +10 -6
  53. package/tsup.config.ts +10 -0
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/better-auth/auth/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gBAAgB,EAGtB,MAAM,aAAa,CAAC;AASrB,KAAK,UAAU,GAAG,gBAAgB,GAAG;IACnC,MAAM,EAAE;QACN,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ,CAAC;oBACf,QAAQ,EAAE,KAAK,CAAC;oBAChB,KAAK,EAAE,KAAK,CAAC;iBACd,CAAC;gBACF,oBAAoB,EAAE;oBACpB,IAAI,EAAE,QAAQ,CAAC;oBACf,QAAQ,EAAE,KAAK,CAAC;oBAChB,KAAK,EAAE,KAAK,CAAC;oBACb,QAAQ,EAAE,KAAK,CAAC;iBACjB,CAAC;aACH,CAAC;SACH,CAAC;KACH,CAAC;CACH,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,UA4Q9B,CAAC"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/better-auth/auth/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gBAAgB,EAGtB,MAAM,aAAa,CAAC;AAQrB,KAAK,UAAU,GAAG,gBAAgB,GAAG;IACnC,MAAM,EAAE;QACN,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ,CAAC;oBACf,QAAQ,EAAE,KAAK,CAAC;oBAChB,KAAK,EAAE,KAAK,CAAC;iBACd,CAAC;gBACF,oBAAoB,EAAE;oBACpB,IAAI,EAAE,QAAQ,CAAC;oBACf,QAAQ,EAAE,KAAK,CAAC;oBAChB,KAAK,EAAE,KAAK,CAAC;oBACb,QAAQ,EAAE,KAAK,CAAC;iBACjB,CAAC;aACH,CAAC;SACH,CAAC;KACH,CAAC;CACH,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,UA6Q9B,CAAC"}
@@ -1,6 +1,5 @@
1
- import { APIError } from "better-auth/api";
1
+ import { APIError, createAuthMiddleware } from "better-auth/api";
2
2
  import { symmetricDecrypt, symmetricEncrypt } from "better-auth/crypto";
3
- import { createAuthMiddleware } from "better-auth/plugins";
4
3
  /**
5
4
  * @returns The BetterAuth server plugin.
6
5
  *
@@ -163,7 +162,8 @@ export const jazzPlugin = () => {
163
162
  return context.path?.startsWith("/sign-in/email-otp") || false;
164
163
  },
165
164
  handler: createAuthMiddleware(async (ctx) => {
166
- const email = ctx.body.email;
165
+ // lowercase the email as done in https://github.com/better-auth/better-auth/blob/40a80b070bbabf2d6886e8a3ad1bc068c8d570cb/packages/better-auth/src/plugins/email-otp/routes.ts#L641
166
+ const email = ctx.body.email.toLowerCase();
167
167
  const identifier = `jazz-auth-sign-in-otp-${email}`;
168
168
  const data = await ctx.context.internalAdapter.findVerificationValue(identifier);
169
169
  // if not found, it isn't a sign-up
@@ -365,6 +365,40 @@ describe("Better-Auth server plugin", async () => {
365
365
  expect(accountCreationSpy).toHaveBeenCalledTimes(1);
366
366
  expect(accountCreationSpy).toHaveBeenCalledWith(expect.objectContaining({ accountID: "123" }), expect.any(Object));
367
367
  });
368
+ it("should be case-insensitive for email", async () => {
369
+ let OTP = "";
370
+ sendVerificationOTPSpy.mockImplementationOnce(({ otp }) => {
371
+ OTP = otp;
372
+ });
373
+ await auth.api.sendVerificationOTP({
374
+ headers: {
375
+ "x-jazz-auth": JSON.stringify({
376
+ accountID: "123",
377
+ secretSeed: [1, 2, 3],
378
+ accountSecret: "123",
379
+ }),
380
+ },
381
+ body: {
382
+ email: "EMAIL@email.it",
383
+ type: "sign-in",
384
+ },
385
+ });
386
+ expect(accountCreationSpy).toHaveBeenCalledTimes(0);
387
+ expect(sendVerificationOTPSpy).toHaveBeenCalledTimes(1);
388
+ expect(verificationCreationSpy).toHaveBeenCalledTimes(2);
389
+ expect(verificationCreationSpy.mock.calls[0]?.[0]).toMatchObject(expect.objectContaining({
390
+ identifier: "jazz-auth-sign-in-otp-email@email.it",
391
+ value: expect.stringContaining('"accountID":"123"'),
392
+ }));
393
+ await auth.api.signInEmailOTP({
394
+ body: {
395
+ email: "EMAIL@email.it",
396
+ otp: OTP,
397
+ },
398
+ });
399
+ expect(accountCreationSpy).toHaveBeenCalledTimes(1);
400
+ expect(accountCreationSpy).toHaveBeenCalledWith(expect.objectContaining({ accountID: "123" }), expect.any(Object));
401
+ });
368
402
  it("should not expect Jazz's credentials using Email OTP for sign-in an already registered user", async () => {
369
403
  // 1. User registration
370
404
  const userData = {
@@ -1,5 +1,5 @@
1
1
 
2
- > jazz-tools@0.20.11 build /home/runner/_work/jazz/jazz/packages/jazz-tools
2
+ > jazz-tools@0.20.14 build /home/runner/_work/jazz/jazz/packages/jazz-tools
3
3
  > tsup && pnpm types && pnpm build:svelte && pnpm build:better-auth-svelte
4
4
 
5
5
  CLI Building entry: {"index":"src/index.ts","testing":"src/testing.ts","tools/ssr":"src/tools/ssr/index.ts"}
@@ -32,6 +32,10 @@
32
32
  CLI Using tsconfig: tsconfig.json
33
33
  CLI Building entry: {"index":"src/better-auth/database-adapter/index.ts"}
34
34
  CLI Using tsconfig: tsconfig.json
35
+ CLI Building entry: {"server":"src/mcp/server.ts","build-index":"src/mcp/build-index.ts"}
36
+ CLI Using tsconfig: tsconfig.json
37
+ CLI tsup v8.5.0
38
+ CLI Using tsup config: /home/runner/_work/jazz/jazz/packages/jazz-tools/tsup.config.ts
35
39
  CLI tsup v8.5.0
36
40
  CLI Using tsup config: /home/runner/_work/jazz/jazz/packages/jazz-tools/tsup.config.ts
37
41
  CLI tsup v8.5.0
@@ -77,6 +81,7 @@
77
81
  CLI Target: es2021
78
82
  CLI Target: es2021
79
83
  CLI Target: es2021
84
+ CLI Target: es2021
80
85
  CLI Cleaning output folder
81
86
  ESM Build start
82
87
  CLI Cleaning output folder
@@ -107,112 +112,119 @@
107
112
  ESM Build start
108
113
  CLI Cleaning output folder
109
114
  ESM Build start
110
- ESM dist/tiptap/index.js 564.00 B
111
- ESM dist/tiptap/index.js.map 1.21 KB
112
- ESM ⚡️ Build success in 39ms
115
+ CLI Cleaning output folder
116
+ ESM Build start
117
+ ESM dist/tiptap/index.js 572.00 B
118
+ ESM dist/tiptap/index.js.map 1.29 KB
119
+ ESM ⚡️ Build success in 41ms
120
+ ESM dist/better-auth/auth/client.js 4.54 KB
121
+ ESM dist/better-auth/auth/server.js 8.38 KB
122
+ ESM dist/better-auth/auth/react.js 813.00 B
123
+ ESM dist/better-auth/auth/client.js.map 8.44 KB
124
+ ESM dist/better-auth/auth/server.js.map 15.56 KB
125
+ ESM dist/better-auth/auth/react.js.map 2.07 KB
126
+ ESM ⚡️ Build success in 32ms
113
127
  ESM dist/worker/index.js 3.45 KB
114
128
  ESM dist/worker/edge-wasm.js 259.00 B
115
129
  ESM dist/worker/napi-crypto.js 110.00 B
116
130
  ESM dist/worker/index.js.map 6.97 KB
117
131
  ESM dist/worker/edge-wasm.js.map 505.00 B
118
132
  ESM dist/worker/napi-crypto.js.map 162.00 B
119
- ESM ⚡️ Build success in 38ms
120
- ESM dist/better-auth/auth/client.js 4.54 KB
121
- ESM dist/better-auth/auth/server.js 8.40 KB
122
- ESM dist/better-auth/auth/react.js 813.00 B
123
- ESM dist/better-auth/auth/client.js.map 8.44 KB
124
- ESM dist/better-auth/auth/server.js.map 15.40 KB
125
- ESM dist/better-auth/auth/react.js.map 2.07 KB
126
- ESM ⚡️ Build success in 33ms
133
+ ESM ⚡️ Build success in 41ms
127
134
  ESM dist/media/index.js 236.00 B
128
135
  ESM dist/media/index.browser.js 2.79 KB
129
- ESM dist/media/index.server.js 2.95 KB
130
136
  ESM dist/media/index.native.js 4.02 KB
137
+ ESM dist/media/index.server.js 2.95 KB
131
138
  ESM dist/media/chunk-IRL3KNPO.js 6.70 KB
132
139
  ESM dist/media/index.js.map 71.00 B
133
140
  ESM dist/media/index.browser.js.map 6.15 KB
134
- ESM dist/media/index.server.js.map 6.37 KB
135
141
  ESM dist/media/index.native.js.map 8.13 KB
142
+ ESM dist/media/index.server.js.map 6.37 KB
136
143
  ESM dist/media/chunk-IRL3KNPO.js.map 17.00 KB
137
- ESM ⚡️ Build success in 60ms
138
- ESM dist/browser/index.js 15.96 KB
139
- ESM dist/browser/index.js.map 34.06 KB
140
- ESM ⚡️ Build success in 62ms
141
- ESM dist/react-core/index.js 17.87 KB
142
- ESM dist/react-core/testing.js 904.00 B
143
- ESM dist/react-core/chunk-UOYH6JFJ.js 189.00 B
144
- ESM dist/react-core/index.js.map 58.59 KB
145
- ESM dist/react-core/testing.js.map 1.34 KB
146
- ESM dist/react-core/chunk-UOYH6JFJ.js.map 363.00 B
147
- ESM ⚡️ Build success in 58ms
144
+ ESM ⚡️ Build success in 49ms
148
145
  ESM dist/better-auth/database-adapter/index.js 26.86 KB
149
146
  ESM dist/better-auth/database-adapter/index.js.map 58.67 KB
150
- ESM ⚡️ Build success in 52ms
147
+ ESM ⚡️ Build success in 41ms
151
148
  ESM dist/expo/index.js 5.65 KB
152
149
  ESM dist/expo/testing.js 112.00 B
153
150
  ESM dist/expo/polyfills.js 858.00 B
154
151
  ESM dist/expo/index.js.map 11.85 KB
155
152
  ESM dist/expo/testing.js.map 168.00 B
156
153
  ESM dist/expo/polyfills.js.map 1.61 KB
154
+ ESM ⚡️ Build success in 44ms
155
+ ESM dist/mcp/server.js 20.95 KB
156
+ ESM dist/mcp/build-index.js 6.62 KB
157
+ ESM dist/mcp/server.js.map 48.56 KB
158
+ ESM dist/mcp/build-index.js.map 16.00 KB
157
159
  ESM ⚡️ Build success in 60ms
160
+ ESM dist/react-core/index.js 17.87 KB
161
+ ESM dist/react-core/chunk-UOYH6JFJ.js 189.00 B
162
+ ESM dist/react-core/testing.js 904.00 B
163
+ ESM dist/react-core/index.js.map 58.59 KB
164
+ ESM dist/react-core/chunk-UOYH6JFJ.js.map 363.00 B
165
+ ESM dist/react-core/testing.js.map 1.34 KB
166
+ ESM ⚡️ Build success in 58ms
167
+ ESM dist/browser/index.js 15.96 KB
168
+ ESM dist/browser/index.js.map 34.06 KB
169
+ ESM ⚡️ Build success in 61ms
158
170
  ESM dist/prosemirror/index.js 78.48 KB
159
171
  ESM dist/prosemirror/index.js.map 309.11 KB
160
172
  ESM ⚡️ Build success in 66ms
173
+ ESM dist/react/testing.js 122.00 B
161
174
  ESM dist/react/index.js 26.02 KB
162
175
  ESM dist/react/ssr.js 693.00 B
163
- ESM dist/react/testing.js 122.00 B
164
- ESM dist/react/ssr.js.map 1.10 KB
165
- ESM dist/react/index.js.map 55.45 KB
166
176
  ESM dist/react/testing.js.map 165.00 B
167
- ESM ⚡️ Build success in 68ms
177
+ ESM dist/react/index.js.map 55.45 KB
178
+ ESM dist/react/ssr.js.map 1.10 KB
179
+ ESM ⚡️ Build success in 60ms
180
+ ESM dist/react-native-core/index.js 34.47 KB
181
+ ESM dist/react-native-core/testing.js 119.00 B
182
+ ESM dist/react-native-core/index.js.map 69.10 KB
183
+ ESM dist/react-native-core/testing.js.map 175.00 B
184
+ ESM ⚡️ Build success in 67ms
168
185
  ESM dist/react-native/index.js 38.21 KB
169
- ESM dist/react-native/polyfills.js 858.00 B
170
186
  ESM dist/react-native/testing.js 120.00 B
171
- ESM dist/react-native/polyfills.js.map 1.61 KB
172
- ESM dist/react-native/testing.js.map 176.00 B
187
+ ESM dist/react-native/polyfills.js 858.00 B
173
188
  ESM dist/react-native/index.js.map 76.75 KB
174
- ESM ⚡️ Build success in 80ms
175
- ESM dist/react-native-core/testing.js 119.00 B
176
- ESM dist/react-native-core/index.js 34.47 KB
177
- ESM dist/react-native-core/testing.js.map 175.00 B
178
- ESM dist/react-native-core/index.js.map 69.10 KB
179
- ESM ⚡️ Build success in 79ms
189
+ ESM dist/react-native/testing.js.map 176.00 B
190
+ ESM dist/react-native/polyfills.js.map 1.61 KB
191
+ ESM ⚡️ Build success in 74ms
180
192
  ESM dist/inspector/index.js 37.49 KB
181
193
  ESM dist/inspector/standalone.js 12.61 KB
182
194
  ESM dist/inspector/chunk-ORKZSKZF.js 128.83 KB
183
195
  ESM dist/inspector/index.js.map 63.80 KB
184
196
  ESM dist/inspector/standalone.js.map 20.11 KB
185
197
  ESM dist/inspector/chunk-ORKZSKZF.js.map 222.34 KB
186
- ESM ⚡️ Build success in 95ms
187
- ESM dist/testing.js 8.56 KB
198
+ ESM ⚡️ Build success in 82ms
188
199
  ESM dist/index.js 32.18 KB
200
+ ESM dist/chunk-KGV2CJMG.js 262.16 KB
189
201
  ESM dist/tools/ssr.js 156.00 B
190
- ESM dist/chunk-K4D7IMFM.js 690.00 B
191
202
  ESM dist/chunk-ZQWSQH6L.js 945.00 B
192
- ESM dist/chunk-KGV2CJMG.js 262.16 KB
193
- ESM dist/testing.js.map 16.22 KB
203
+ ESM dist/chunk-K4D7IMFM.js 690.00 B
204
+ ESM dist/testing.js 8.56 KB
194
205
  ESM dist/index.js.map 65.34 KB
195
- ESM dist/tools/ssr.js.map 71.00 B
196
206
  ESM dist/chunk-K4D7IMFM.js.map 1.10 KB
197
207
  ESM dist/chunk-ZQWSQH6L.js.map 71.00 B
208
+ ESM dist/tools/ssr.js.map 71.00 B
209
+ ESM dist/testing.js.map 16.22 KB
198
210
  ESM dist/chunk-KGV2CJMG.js.map 604.30 KB
199
- ESM ⚡️ Build success in 127ms
211
+ ESM ⚡️ Build success in 112ms
200
212
  ESM dist/inspector/register-custom-element.js 305.00 B
201
213
  ESM dist/inspector/register-custom-element.js.map 445.00 B
202
214
  ESM dist/inspector/custom-element-7G7IZVLL.js 1.64 MB
203
215
  ESM dist/inspector/custom-element-7G7IZVLL.js.map 2.52 MB
204
- ESM ⚡️ Build success in 157ms
216
+ ESM ⚡️ Build success in 140ms
205
217
 
206
- > jazz-tools@0.20.11 types /home/runner/_work/jazz/jazz/packages/jazz-tools
218
+ > jazz-tools@0.20.14 types /home/runner/_work/jazz/jazz/packages/jazz-tools
207
219
  > tsc --outDir dist
208
220
 
209
221
 
210
- > jazz-tools@0.20.11 build:svelte /home/runner/_work/jazz/jazz/packages/jazz-tools
222
+ > jazz-tools@0.20.14 build:svelte /home/runner/_work/jazz/jazz/packages/jazz-tools
211
223
  > rm -rf dist/svelte && svelte-package -i src/svelte -o dist/svelte --tsconfig tsconfig.svelte.json
212
224
 
213
225
  src/svelte -> dist/svelte
214
226
 
215
- > jazz-tools@0.20.11 build:better-auth-svelte /home/runner/_work/jazz/jazz/packages/jazz-tools
227
+ > jazz-tools@0.20.14 build:better-auth-svelte /home/runner/_work/jazz/jazz/packages/jazz-tools
216
228
  > mkdir -p dist/better-auth/auth && svelte-package -i src/better-auth/auth -o dist/better-auth/auth-temp --tsconfig tsconfig.svelte.json && cp dist/better-auth/auth-temp/svelte.svelte dist/better-auth/auth/svelte.svelte && cp dist/better-auth/auth-temp/svelte.svelte.d.ts dist/better-auth/auth/svelte.d.ts && rm -rf dist/better-auth/auth-temp
217
229
 
218
230
  src/better-auth/auth -> dist/better-auth/auth-temp
package/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # jazz-tools
2
2
 
3
+ ## 0.20.14
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [4bbfce2]
8
+ - cojson@0.20.14
9
+ - cojson-storage-indexeddb@0.20.14
10
+ - cojson-transport-ws@0.20.14
11
+
12
+ ## 0.20.13
13
+
14
+ ### Patch Changes
15
+
16
+ - 307b11d: fix(better-auth): import createAuthMiddleware from better-auth/api for compatibility with better-auth 1.5.3
17
+ - 1acba7b: Add MCP docs server exposing Jazz documentation as searchable tools for AI assistants, accessible via `jazz-run mcp`.
18
+ - 53c2cc2: Updated `jazz-tools/tiptap` to align `JazzSyncExtension` with the Tiptap 3 plugin interface and allow `coRichText` to be initialized later before syncing starts.
19
+ - Updated dependencies [9877c61]
20
+ - cojson@0.20.13
21
+ - cojson-storage-indexeddb@0.20.13
22
+ - cojson-transport-ws@0.20.13
23
+
24
+ ## 0.20.12
25
+
26
+ ### Patch Changes
27
+
28
+ - 9a43096: Fixed Better Auth email OTP sign-in to handle email addresses case-insensitively.
29
+ - cojson@0.20.12
30
+ - cojson-storage-indexeddb@0.20.12
31
+ - cojson-transport-ws@0.20.12
32
+
3
33
  ## 0.20.11
4
34
 
5
35
  ### Patch Changes
Binary file