@sirutils/schema
Advanced tools
Comparing version 0.1.1 to 0.1.2
// @bun | ||
//# debugId=5C2FC1B3A939B3E064756E2164756E21 | ||
//# debugId=3C8EBE576CB08AFE64756E2164756E21 |
// @bun | ||
import{tagBuilder as p}from"@sirutils/core";var c=p("@sirutils/schema"),a={createSync:c("create-sync"),syncSchema:c("sync-schema"),createAsync:c("create-async"),asyncSchema:c("async-schema"),validator:c("validator"),invalidData:c("invalid-data")};import S from"fastest-validator";var n=new S({considerNullAsAValue:!0});n.add("ulid",({messages:e})=>{return{source:` | ||
import{tagBuilder as p}from"@sirutils/core";var c=p("@sirutils/schema"),a={createSync:c("create-sync"),syncSchema:c("sync-schema"),createAsync:c("create-async"),asyncSchema:c("async-schema"),validator:c("validator"),invalidData:c("invalid-data")};import{ProjectError as i,capsule as o,unwrap as m,wrap as l}from"@sirutils/core";import S from"fastest-validator";var n=new S({considerNullAsAValue:!0});n.add("ulid",({messages:e})=>{return{source:` | ||
if((/^[a-zA-Z0-9]{26}\$/gm.test(value))) { | ||
@@ -8,4 +8,4 @@ return value | ||
${n.makeError({type:"evenNumber",actual:"value",messages:e})} | ||
`}});import{ProjectError as i,capsule as o,unwrap as m,wrap as l}from"@sirutils/core";var y=o((e)=>{const r=n.compile(e);return e.$$async=!1,l((t)=>{const s=r(t);if(Array.isArray(s)&&s)return i.create(a.invalidData,"schema doesnt match").appendData([e,t]).throw();return!0},a.validator)},a.createSync),u=o((e)=>{const r=n.compile(e);return e.$$async=!0,l(async(t)=>{const s=await r(t);if(Array.isArray(s)&&s)return i.create(a.invalidData,"schema doesnt match").appendData([e,t]).throw();return!0},a.validator)},a.createAsync),g=o((e)=>{const r=y(e);return o((t)=>m(r(t)),a.validator)},a.syncSchema),B=o((e)=>{const r=u(e);return o(async(t)=>m(await r(t)),a.validator)},a.asyncSchema);export*from"fastest-validator";export{n as validator,g as syncSchema,a as schemaTags,y as createSyncSchema,u as createAsyncSchema,B as asyncSchema}; | ||
`}});var y=o((e)=>{const r=n.compile(e);return e.$$async=!1,l((t)=>{const s=r(t);if(Array.isArray(s)&&s)return i.create(a.invalidData,"schema doesnt match").appendData([e,t]).throw();return!0},a.validator)},a.createSync),u=o((e)=>{const r=n.compile(e);return e.$$async=!0,l(async(t)=>{const s=await r(t);if(Array.isArray(s)&&s)return i.create(a.invalidData,"schema doesnt match").appendData([e,t]).throw();return!0},a.validator)},a.createAsync),g=o((e)=>{const r=y(e);return o((t)=>m(r(t)),a.validator)},a.syncSchema),B=o((e)=>{const r=u(e);return o(async(t)=>m(await r(t)),a.validator)},a.asyncSchema);export*from"fastest-validator";export{n as validator,g as syncSchema,a as schemaTags,y as createSyncSchema,u as createAsyncSchema,B as asyncSchema}; | ||
//# debugId=9ED9F6CFFC1DFF8464756E2164756E21 | ||
//# debugId=F400C7D32344BE7F64756E2164756E21 |
// @bun | ||
import{tagBuilder as S}from"@sirutils/core";var c=S("@sirutils/schema"),e={createSync:c("create-sync"),syncSchema:c("sync-schema"),createAsync:c("create-async"),asyncSchema:c("async-schema"),validator:c("validator"),invalidData:c("invalid-data")};import p from"fastest-validator";var n=new p({considerNullAsAValue:!0});n.add("ulid",({messages:a})=>{return{source:` | ||
import{tagBuilder as S}from"@sirutils/core";var c=S("@sirutils/schema"),e={createSync:c("create-sync"),syncSchema:c("sync-schema"),createAsync:c("create-async"),asyncSchema:c("async-schema"),validator:c("validator"),invalidData:c("invalid-data")};import{ProjectError as i,capsule as s,unwrap as m,wrap as l}from"@sirutils/core";import p from"fastest-validator";var n=new p({considerNullAsAValue:!0});n.add("ulid",({messages:a})=>{return{source:` | ||
if((/^[a-zA-Z0-9]{26}\$/gm.test(value))) { | ||
@@ -8,4 +8,4 @@ return value | ||
${n.makeError({type:"evenNumber",actual:"value",messages:a})} | ||
`}});import{ProjectError as i,capsule as s,unwrap as m,wrap as l}from"@sirutils/core";var y=s((a)=>{const r=n.compile(a);return a.$$async=!1,l((t)=>{const o=r(t);if(Array.isArray(o)&&o)return i.create(e.invalidData,"schema doesnt match").appendData([a,t]).throw();return!0},e.validator)},e.createSync),d=s((a)=>{const r=n.compile(a);return a.$$async=!0,l(async(t)=>{const o=await r(t);if(Array.isArray(o)&&o)return i.create(e.invalidData,"schema doesnt match").appendData([a,t]).throw();return!0},e.validator)},e.createAsync),b=s((a)=>{const r=y(a);return s((t)=>m(r(t)),e.validator)},e.syncSchema),g=s((a)=>{const r=d(a);return s(async(t)=>m(await r(t)),e.validator)},e.asyncSchema);export{b as syncSchema,y as createSyncSchema,d as createAsyncSchema,g as asyncSchema}; | ||
`}});var y=s((a)=>{const r=n.compile(a);return a.$$async=!1,l((t)=>{const o=r(t);if(Array.isArray(o)&&o)return i.create(e.invalidData,"schema doesnt match").appendData([a,t]).throw();return!0},e.validator)},e.createSync),d=s((a)=>{const r=n.compile(a);return a.$$async=!0,l(async(t)=>{const o=await r(t);if(Array.isArray(o)&&o)return i.create(e.invalidData,"schema doesnt match").appendData([a,t]).throw();return!0},e.validator)},e.createAsync),b=s((a)=>{const r=y(a);return s((t)=>m(r(t)),e.validator)},e.syncSchema),g=s((a)=>{const r=d(a);return s(async(t)=>m(await r(t)),e.validator)},e.asyncSchema);export{b as syncSchema,y as createSyncSchema,d as createAsyncSchema,g as asyncSchema}; | ||
//# debugId=D30385C6F25FDC8964756E2164756E21 | ||
//# debugId=AD96E798D673784064756E2164756E21 |
{ | ||
"name": "@sirutils/schema", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"type": "module", | ||
@@ -14,9 +14,15 @@ "files": [ | ||
}, | ||
"author": "giveerr (https://github.com/giveerr)", | ||
"homepage": "https://sirutils.com/", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/sirius-tedarik/sirutils.git" | ||
}, | ||
"devDependencies": { | ||
"@sirutils/builder": "0.1.1" | ||
"@sirutils/builder": "0.1.2" | ||
}, | ||
"dependencies": { | ||
"fastest-validator": "^1.19.0", | ||
"@sirutils/core": "0.1.1" | ||
"@sirutils/core": "0.1.2" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
29430
1
1
0
135
+ Added@sirutils/core@0.1.2(transitive)
- Removed@sirutils/core@0.1.1(transitive)
Updated@sirutils/core@0.1.2