jazz-tools 0.14.2 → 0.14.5
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 +6 -6
- package/CHANGELOG.md +13 -0
- package/dist/{chunk-WLOZKDOH.js → chunk-52PJ4QZ3.js} +29 -17
- package/dist/chunk-52PJ4QZ3.js.map +1 -0
- package/dist/coValues/extensions/imageDef.d.ts +2 -1
- package/dist/coValues/extensions/imageDef.d.ts.map +1 -1
- package/dist/implementation/zodSchema/coExport.d.ts +3 -0
- package/dist/implementation/zodSchema/coExport.d.ts.map +1 -0
- package/dist/implementation/zodSchema/runtimeConverters/zodFieldToCoFieldDef.d.ts.map +1 -1
- package/dist/implementation/zodSchema/schemaTypes/CoMapSchema.d.ts +11 -3
- package/dist/implementation/zodSchema/schemaTypes/CoMapSchema.d.ts.map +1 -1
- package/dist/implementation/zodSchema/typeConverters/InstanceOrPrimitiveOfSchema.d.ts +1 -1
- package/dist/implementation/zodSchema/typeConverters/InstanceOrPrimitiveOfSchema.d.ts.map +1 -1
- package/dist/implementation/zodSchema/typeConverters/InstanceOrPrimitiveOfSchemaCoValuesNullable.d.ts +1 -1
- package/dist/implementation/zodSchema/typeConverters/InstanceOrPrimitiveOfSchemaCoValuesNullable.d.ts.map +1 -1
- package/dist/implementation/zodSchema/zodCo.d.ts +21 -27
- package/dist/implementation/zodSchema/zodCo.d.ts.map +1 -1
- package/dist/implementation/zodSchema/zodSchema.d.ts +1 -4
- package/dist/implementation/zodSchema/zodSchema.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/internal.d.ts +1 -0
- package/dist/internal.d.ts.map +1 -1
- package/dist/testing.js +1 -1
- package/dist/tests/coMap.record.test-d.d.ts +2 -0
- package/dist/tests/coMap.record.test-d.d.ts.map +1 -0
- package/dist/tests/coMap.test-d.d.ts +2 -0
- package/dist/tests/coMap.test-d.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/coValues/extensions/imageDef.ts +7 -1
- package/src/implementation/zodSchema/coExport.ts +13 -0
- package/src/implementation/zodSchema/runtimeConverters/zodFieldToCoFieldDef.ts +3 -0
- package/src/implementation/zodSchema/schemaTypes/CoMapSchema.ts +20 -8
- package/src/implementation/zodSchema/typeConverters/InstanceOrPrimitiveOfSchema.ts +3 -1
- package/src/implementation/zodSchema/typeConverters/InstanceOrPrimitiveOfSchemaCoValuesNullable.ts +3 -1
- package/src/implementation/zodSchema/zodCo.ts +9 -20
- package/src/implementation/zodSchema/zodSchema.ts +0 -5
- package/src/internal.ts +1 -0
- package/src/tests/coList.test.ts +9 -0
- package/src/tests/coMap.record.test-d.ts +149 -0
- package/src/tests/coMap.record.test.ts +11 -0
- package/src/tests/coMap.test-d.ts +421 -0
- package/src/tests/coMap.test.ts +8 -0
- package/dist/chunk-WLOZKDOH.js.map +0 -1
package/.turbo/turbo-build.log
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
> jazz-tools@0.14.
|
2
|
+
> jazz-tools@0.14.5 build /home/runner/_work/jazz/jazz/packages/jazz-tools
|
3
3
|
> tsup && pnpm types
|
4
4
|
|
5
5
|
[34mCLI[39m Building entry: {"index":"src/index.ts","testing":"src/testing.ts"}
|
@@ -9,14 +9,14 @@
|
|
9
9
|
[34mCLI[39m Target: es2021
|
10
10
|
[34mCLI[39m Cleaning output folder
|
11
11
|
[34mESM[39m Build start
|
12
|
-
[32mESM[39m [1mdist/index.js [22m[32m11.
|
12
|
+
[32mESM[39m [1mdist/index.js [22m[32m11.07 KB[39m
|
13
13
|
[32mESM[39m [1mdist/testing.js [22m[32m6.31 KB[39m
|
14
|
-
[32mESM[39m [1mdist/chunk-
|
14
|
+
[32mESM[39m [1mdist/chunk-52PJ4QZ3.js [22m[32m130.91 KB[39m
|
15
15
|
[32mESM[39m [1mdist/index.js.map [22m[32m20.74 KB[39m
|
16
16
|
[32mESM[39m [1mdist/testing.js.map [22m[32m12.57 KB[39m
|
17
|
-
[32mESM[39m [1mdist/chunk-
|
18
|
-
[32mESM[39m ⚡️ Build success in
|
17
|
+
[32mESM[39m [1mdist/chunk-52PJ4QZ3.js.map [22m[32m304.39 KB[39m
|
18
|
+
[32mESM[39m ⚡️ Build success in 51ms
|
19
19
|
|
20
|
-
> jazz-tools@0.14.
|
20
|
+
> jazz-tools@0.14.5 types /home/runner/_work/jazz/jazz/packages/jazz-tools
|
21
21
|
> tsc --outDir dist
|
22
22
|
|
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# jazz-tools
|
2
2
|
|
3
|
+
## 0.14.5
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 91cbb2f: Fix CoMap.create with optional types
|
8
|
+
- 20b3d88: Add co.loaded utility
|
9
|
+
|
10
|
+
## 0.14.4
|
11
|
+
|
12
|
+
### Patch Changes
|
13
|
+
|
14
|
+
- 011af55: Support z.enum in the schema definitions
|
15
|
+
|
3
16
|
## 0.14.2
|
4
17
|
|
5
18
|
### Patch Changes
|
@@ -1,3 +1,9 @@
|
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __export = (target, all) => {
|
3
|
+
for (var name in all)
|
4
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
5
|
+
};
|
6
|
+
|
1
7
|
// src/coValues/CoValueBase.ts
|
2
8
|
import { ControlledAccount, RawAccount } from "cojson";
|
3
9
|
var CoValueBase = class {
|
@@ -3391,12 +3397,12 @@ var coMapDefiner = (shape) => {
|
|
3391
3397
|
return coMapSchema;
|
3392
3398
|
};
|
3393
3399
|
var coAccountDefiner = (shape = {
|
3394
|
-
profile:
|
3400
|
+
profile: coMapDefiner({
|
3395
3401
|
name: z.string(),
|
3396
3402
|
inbox: z.optional(z.string()),
|
3397
3403
|
inboxInvite: z.optional(z.string())
|
3398
3404
|
}),
|
3399
|
-
root:
|
3405
|
+
root: coMapDefiner({})
|
3400
3406
|
}) => {
|
3401
3407
|
const objectSchema = z.object(shape).meta({
|
3402
3408
|
collaborative: true
|
@@ -3530,21 +3536,25 @@ var coRichTextDefiner = () => {
|
|
3530
3536
|
};
|
3531
3537
|
return richTextSchema;
|
3532
3538
|
};
|
3533
|
-
var
|
3534
|
-
|
3535
|
-
record: coRecordDefiner,
|
3536
|
-
list: coListDefiner,
|
3537
|
-
feed: coFeedDefiner,
|
3538
|
-
plainText: coPlainTextDefiner,
|
3539
|
-
richText: coRichTextDefiner,
|
3540
|
-
fileStream: coFileStreamDefiner,
|
3541
|
-
image: () => {
|
3542
|
-
return ImageDefinition;
|
3543
|
-
},
|
3544
|
-
account: coAccountDefiner,
|
3545
|
-
profile: coProfileDefiner
|
3539
|
+
var coImageDefiner = () => {
|
3540
|
+
return ImageDefinition;
|
3546
3541
|
};
|
3547
3542
|
|
3543
|
+
// src/implementation/zodSchema/coExport.ts
|
3544
|
+
var coExport_exports = {};
|
3545
|
+
__export(coExport_exports, {
|
3546
|
+
account: () => coAccountDefiner,
|
3547
|
+
feed: () => coFeedDefiner,
|
3548
|
+
fileStream: () => coFileStreamDefiner,
|
3549
|
+
image: () => coImageDefiner,
|
3550
|
+
list: () => coListDefiner,
|
3551
|
+
map: () => coMapDefiner,
|
3552
|
+
plainText: () => coPlainTextDefiner,
|
3553
|
+
profile: () => coProfileDefiner,
|
3554
|
+
record: () => coRecordDefiner,
|
3555
|
+
richText: () => coRichTextDefiner
|
3556
|
+
});
|
3557
|
+
|
3548
3558
|
// src/implementation/zodSchema/runtimeConverters/zodSchemaToCoSchema.ts
|
3549
3559
|
import z3 from "zod/v4";
|
3550
3560
|
|
@@ -3682,6 +3692,8 @@ function zodFieldToCoFieldDef(schema) {
|
|
3682
3692
|
return coField.boolean;
|
3683
3693
|
} else if (schema._zod.def.type === "null") {
|
3684
3694
|
return coField.null;
|
3695
|
+
} else if (schema._zod.def.type === "enum") {
|
3696
|
+
return coField.string;
|
3685
3697
|
} else if (schema._zod.def.type === "date") {
|
3686
3698
|
return coField.Date;
|
3687
3699
|
} else if (schema._zod.def.type === "literal") {
|
@@ -4526,7 +4538,7 @@ export {
|
|
4526
4538
|
createJazzContextForNewAccount,
|
4527
4539
|
createJazzContext,
|
4528
4540
|
createAnonymousJazzContext,
|
4529
|
-
|
4541
|
+
coExport_exports,
|
4530
4542
|
zodSchemaToCoSchema2 as zodSchemaToCoSchema,
|
4531
4543
|
anySchemaToCoSchema,
|
4532
4544
|
ImageDefinition,
|
@@ -4536,4 +4548,4 @@ export {
|
|
4536
4548
|
JazzContextManager
|
4537
4549
|
};
|
4538
4550
|
/* istanbul ignore file -- @preserve */
|
4539
|
-
//# sourceMappingURL=chunk-
|
4551
|
+
//# sourceMappingURL=chunk-52PJ4QZ3.js.map
|