mirror of https://github.com/webpack/webpack.git
6 lines
1.9 KiB
JavaScript
6 lines
1.9 KiB
JavaScript
|
/*
|
||
|
* This file was automatically generated.
|
||
|
* DO NOT MODIFY BY HAND.
|
||
|
* Run `yarn fix:special` to update
|
||
|
*/
|
||
|
const t=/^(?:[A-Za-z]:[\\/]|\\\\|\/)/;function e(s,{instancePath:r="",parentData:n,parentDataProperty:a,rootData:i=s}={}){let o=null,l=0;if(0===l){if(!s||"object"!=typeof s||Array.isArray(s))return e.errors=[{params:{type:"object"}}],!1;{const r=l;for(const t in s)if("context"!==t&&"hashDigest"!==t&&"hashDigestLength"!==t&&"hashFunction"!==t)return e.errors=[{params:{additionalProperty:t}}],!1;if(r===l){if(void 0!==s.context){let r=s.context;const n=l;if(l===n){if("string"!=typeof r)return e.errors=[{params:{type:"string"}}],!1;if(r.includes("!")||!0!==t.test(r))return e.errors=[{params:{}}],!1}var u=n===l}else u=!0;if(u){if(void 0!==s.hashDigest){let t=s.hashDigest;const r=l;if("base64"!==t&&"base64url"!==t&&"hex"!==t&&"binary"!==t&&"utf8"!==t&&"utf-8"!==t&&"utf16le"!==t&&"utf-16le"!==t&&"latin1"!==t&&"ascii"!==t&&"ucs2"!==t&&"ucs-2"!==t)return e.errors=[{params:{}}],!1;u=r===l}else u=!0;if(u){if(void 0!==s.hashDigestLength){let t=s.hashDigestLength;const r=l;if(l===r){if("number"!=typeof t)return e.errors=[{params:{type:"number"}}],!1;if(t<1||isNaN(t))return e.errors=[{params:{comparison:">=",limit:1}}],!1}u=r===l}else u=!0;if(u)if(void 0!==s.hashFunction){let t=s.hashFunction;const r=l,n=l;let a=!1,i=null;const c=l,p=l;let h=!1;const m=l;if(l===m)if("string"==typeof t){if(t.length<1){const t={params:{}};null===o?o=[t]:o.push(t),l++}}else{const t={params:{type:"string"}};null===o?o=[t]:o.push(t),l++}var f=m===l;if(h=h||f,!h){const e=l;if(!(t instanceof Function)){const t={params:{}};null===o?o=[t]:o.push(t),l++}f=e===l,h=h||f}if(h)l=p,null!==o&&(p?o.length=p:o=null);else{const t={params:{}};null===o?o=[t]:o.push(t),l++}if(c===l&&(a=!0,i=0),!a){const t={params:{passingSchemas:i}};return null===o?o=[t]:o.push(t),l++,e.errors=o,!1}l=n,null!==o&&(n?o.length=n:o=null),u=r===l}else u=!0}}}}}return e.errors=o,0===l}module.exports=e,module.exports.default=e;
|