@penlight/common-app 3.0.0 → 4.0.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/dist/index.d.ts +2 -2
- package/dist/index.js +4 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -26,7 +26,7 @@ export declare const signinInput: z.ZodObject<{
|
|
26
26
|
export type SigninInput = z.infer<typeof signinInput>;
|
27
27
|
export declare const createPostInput: z.ZodObject<{
|
28
28
|
title: z.ZodString;
|
29
|
-
content: z.ZodString
|
29
|
+
content: z.ZodEffects<z.ZodString, string, string>;
|
30
30
|
authorId: z.ZodString;
|
31
31
|
published: z.ZodDefault<z.ZodBoolean>;
|
32
32
|
}, "strip", z.ZodTypeAny, {
|
@@ -43,7 +43,7 @@ export declare const createPostInput: z.ZodObject<{
|
|
43
43
|
export type CreatePostInput = z.infer<typeof createPostInput>;
|
44
44
|
export declare const updatePostInput: z.ZodObject<{
|
45
45
|
title: z.ZodOptional<z.ZodString>;
|
46
|
-
content: z.ZodOptional<z.ZodString
|
46
|
+
content: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
47
47
|
published: z.ZodDefault<z.ZodBoolean>;
|
48
48
|
}, "strip", z.ZodTypeAny, {
|
49
49
|
published: boolean;
|
package/dist/index.js
CHANGED
@@ -12,13 +12,13 @@ exports.signinInput = zod_1.z.object({
|
|
12
12
|
password: zod_1.z.string()
|
13
13
|
});
|
14
14
|
exports.createPostInput = zod_1.z.object({
|
15
|
-
title: zod_1.z.string(),
|
16
|
-
content: zod_1.z.string(),
|
15
|
+
title: zod_1.z.string().min(1, "Cannot leave title field empty"),
|
16
|
+
content: zod_1.z.string().refine((text) => text.split(/\s+/).length >= 100, { message: "Content should consist at least 100 Words" }),
|
17
17
|
authorId: zod_1.z.string(),
|
18
18
|
published: zod_1.z.boolean().default(false)
|
19
19
|
});
|
20
20
|
exports.updatePostInput = zod_1.z.object({
|
21
|
-
title: zod_1.z.string().optional(),
|
22
|
-
content: zod_1.z.string().optional(),
|
21
|
+
title: zod_1.z.string().min(1, "Cannot leave title field empty").optional(),
|
22
|
+
content: zod_1.z.string().refine((text) => text.split(/\s+/).length >= 100, { message: "Content should consist at least 100 Words" }).optional(),
|
23
23
|
published: zod_1.z.boolean().default(false)
|
24
24
|
});
|