File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @sensinum/astro-strapi-loader" ,
3- "version" : " 1.0.4 " ,
3+ "version" : " 1.0.5 " ,
44 "description" : " Astro loader for Strapi CMS" ,
55 "keywords" : [
66 " astro" ,
4646 ],
4747 "scripts" : {
4848 "dev" : " tsc --watch" ,
49- "build" : " tsc" ,
49+ "build" : " yarn clean && tsc" ,
50+ "clean" : " rm -rf dist" ,
5051 "test" : " jest" ,
5152 "test:watch" : " jest --watch" ,
5253 "test:coverage" : " jest --coverage" ,
5758 "prepare" : " husky install"
5859 },
5960 "dependencies" : {
60- "astro" : " ^5.0.0"
61+ "astro" : " ^5.0.0" ,
62+ "zod" : " ^3.24.2"
6163 },
6264 "devDependencies" : {
6365 "@astrojs/ts-plugin" : " ^0.4.0" ,
7577 "typescript" : " ^5.0.0"
7678 },
7779 "peerDependencies" : {
78- "astro" : " ^5.0.0"
80+ "astro" : " ^5.0.0" ,
81+ "zod" : " ^3.24.2"
7982 },
8083 "engines" : {
8184 "node" : " >=18.17.0" ,
Original file line number Diff line number Diff line change @@ -71,8 +71,8 @@ export class StrapiSchemaGenerator {
7171 case "media" :
7272 return z . object ( {
7373 name : z . string ( ) ,
74- alternativeText : z . string ( ) . optional ( ) ,
75- caption : z . string ( ) . optional ( ) ,
74+ alternativeText : z . string ( ) . optional ( ) . nullable ( ) ,
75+ caption : z . string ( ) . optional ( ) . nullable ( ) ,
7676 width : z . number ( ) . optional ( ) ,
7777 height : z . number ( ) . optional ( ) ,
7878 formats : z . any ( ) . nullable ( ) ,
@@ -81,7 +81,7 @@ export class StrapiSchemaGenerator {
8181 mime : z . string ( ) ,
8282 size : z . number ( ) ,
8383 url : z . string ( ) ,
84- previewUrl : z . string ( ) . optional ( ) ,
84+ previewUrl : z . string ( ) . optional ( ) . nullable ( ) ,
8585 provider : z . string ( ) ,
8686 createdAt : z . string ( ) ,
8787 updatedAt : z . string ( ) ,
You can’t perform that action at this time.
0 commit comments