jazz-tools 0.18.0 → 0.18.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/.turbo/turbo-build.log +54 -40
- package/CHANGELOG.md +10 -0
- package/dist/better-auth/auth/client.d.ts +29 -0
- package/dist/better-auth/auth/client.d.ts.map +1 -0
- package/dist/better-auth/auth/client.js +127 -0
- package/dist/better-auth/auth/client.js.map +1 -0
- package/dist/better-auth/auth/react.d.ts +2170 -0
- package/dist/better-auth/auth/react.d.ts.map +1 -0
- package/dist/better-auth/auth/react.js +40 -0
- package/dist/better-auth/auth/react.js.map +1 -0
- package/dist/better-auth/auth/server.d.ts +14 -0
- package/dist/better-auth/auth/server.d.ts.map +1 -0
- package/dist/better-auth/auth/server.js +198 -0
- package/dist/better-auth/auth/server.js.map +1 -0
- package/dist/better-auth/auth/tests/client.test.d.ts +2 -0
- package/dist/better-auth/auth/tests/client.test.d.ts.map +1 -0
- package/dist/better-auth/auth/tests/server.test.d.ts +2 -0
- package/dist/better-auth/auth/tests/server.test.d.ts.map +1 -0
- package/dist/{chunk-HJ3GTGY7.js → chunk-IERUTUXB.js} +18 -1
- package/dist/chunk-IERUTUXB.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/react-core/index.js +17 -0
- package/dist/react-core/index.js.map +1 -1
- package/dist/testing.js +1 -1
- package/dist/tools/coValues/account.d.ts +1 -0
- package/dist/tools/coValues/account.d.ts.map +1 -1
- package/dist/tools/coValues/coMap.d.ts +10 -0
- package/dist/tools/coValues/coMap.d.ts.map +1 -1
- package/dist/tools/implementation/zodSchema/zodCo.d.ts +1 -1
- package/dist/tools/testing.d.ts.map +1 -1
- package/package.json +23 -4
- package/src/better-auth/auth/client.ts +169 -0
- package/src/better-auth/auth/react.tsx +105 -0
- package/src/better-auth/auth/server.ts +250 -0
- package/src/better-auth/auth/tests/client.test.ts +249 -0
- package/src/better-auth/auth/tests/server.test.ts +226 -0
- package/src/tools/coValues/account.ts +5 -0
- package/src/tools/coValues/coMap.ts +14 -0
- package/src/tools/implementation/zodSchema/zodCo.ts +1 -1
- package/src/tools/tests/ContextManager.test.ts +2 -2
- package/src/tools/tests/account.test.ts +51 -0
- package/src/tools/tests/coMap.test.ts +99 -0
- package/src/tools/tests/patterns/notifications.test.ts +1 -1
- package/src/tools/tests/testing.test.ts +2 -2
- package/tsup.config.ts +9 -0
- package/dist/chunk-HJ3GTGY7.js.map +0 -1
package/dist/index.js
CHANGED
package/dist/react-core/index.js
CHANGED
@@ -562,6 +562,19 @@ var CoMapJazzApi = class extends CoValueJazzApi {
|
|
562
562
|
get owner() {
|
563
563
|
return getCoValueOwner(this.coMap);
|
564
564
|
}
|
565
|
+
/**
|
566
|
+
* Check if a key is defined in the CoMap.
|
567
|
+
*
|
568
|
+
* This check does not load the referenced value or validate permissions.
|
569
|
+
*
|
570
|
+
* @param key The key to check
|
571
|
+
* @returns True if the key is defined, false otherwise
|
572
|
+
* @category Content
|
573
|
+
*/
|
574
|
+
has(key) {
|
575
|
+
const entry = this.raw.getRaw(key);
|
576
|
+
return entry?.change !== void 0 && entry.change.op !== "del";
|
577
|
+
}
|
565
578
|
/**
|
566
579
|
* Set a value on the CoMap
|
567
580
|
*
|
@@ -2385,6 +2398,10 @@ var AccountJazzApi = class extends CoValueJazzApi {
|
|
2385
2398
|
this.raw.set(key, refId, "trusting");
|
2386
2399
|
}
|
2387
2400
|
}
|
2401
|
+
has(key) {
|
2402
|
+
const entry = this.raw.getRaw(key);
|
2403
|
+
return entry?.change !== void 0 && entry.change.op !== "del";
|
2404
|
+
}
|
2388
2405
|
/**
|
2389
2406
|
* Get the descriptor for a given key
|
2390
2407
|
* @internal
|