@jdfed/ajv
Advanced tools
Comparing version 0.9.0-alpha.6 to 0.9.0-alpha.7
@@ -1,2 +0,2 @@ | ||
"use strict";var t=require("ajv/dist/2019"),r=require("ajv-keywords"),e=require("ajv-errors"),n=require("ajv-formats"),o=require("@jdfed/drip-form-plugin-formats"),i=require("@jdfed/drip-form-plugin-keywords"),a=require("ajv/dist/refs/json-schema-draft-07.json"),c=require("ajv/dist/refs/json-schema-draft-06.json"),u=require("ajv-formats-draft2019");function f(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var s=f(t),l=f(r),h=f(e),p=f(n),d=f(o),y=f(i),v=f(a),m=f(c),g=f(u);function w(t,r,e,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void e(t)}c.done?r(u):Promise.resolve(u).then(n,o)}function b(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function j(t){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var O=Object.prototype,x=O.hasOwnProperty,L="function"==typeof Symbol?Symbol:{},E=L.iterator||"@@iterator",P=L.asyncIterator||"@@asyncIterator",S=L.toStringTag||"@@toStringTag";function _(t,r,e,n){var o=r&&r.prototype instanceof N?r:N,i=Object.create(o.prototype),a=new z(n||[]);return i._invoke=function(t,r,e){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return C()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var c=K(a,e);if(c){if(c===q)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var u=k(t,r,e);if("normal"===u.type){if(n=e.done?"completed":"suspendedYield",u.arg===q)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n="completed",e.method="throw",e.arg=u.arg)}}}(t,e,a),i}function k(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}var q={};function N(){}function T(){}function A(){}var G={};G[E]=function(){return this};var D=Object.getPrototypeOf,F=D&&D(D(B([])));F&&F!==O&&x.call(F,E)&&(G=F);var I=A.prototype=N.prototype=Object.create(G);function M(t){["next","throw","return"].forEach((function(r){t[r]=function(t){return this._invoke(r,t)}}))}function $(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===T||"GeneratorFunction"===(r.displayName||r.name))}function Y(t,r){var e;this._invoke=function(n,o){function i(){return new r((function(e,i){!function e(n,o,i,a){var c=k(t[n],t,o);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"===j(f)&&x.call(f,"__await")?r.resolve(f.__await).then((function(t){e("next",t,i,a)}),(function(t){e("throw",t,i,a)})):r.resolve(f).then((function(t){u.value=t,i(u)}),(function(t){return e("throw",t,i,a)}))}a(c.arg)}(n,o,e,i)}))}return e=e?e.then(i,i):i()}}function K(t,r){var e=t.iterator[r.method];if(void 0===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=void 0,K(t,r),"throw"===r.method))return q;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return q}var n=k(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,q;var o=n.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,q):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,q)}function U(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function V(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function z(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(U,this),this.reset(!0)}function B(t){if(t){var r=t[E];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,n=function r(){for(;++e<t.length;)if(x.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r};return n.next=n}}return{next:C}}function C(){return{value:void 0,done:!0}}T.prototype=I.constructor=A,A.constructor=T,A[S]=T.displayName="GeneratorFunction",M(Y.prototype),Y.prototype[P]=function(){return this},M(I),I[S]="Generator",I[E]=function(){return this},I.toString=function(){return"[object Generator]"},z.prototype={constructor:z,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(V),!t)for(var r in this)"t"===r.charAt(0)&&x.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function e(e,n){return i.type="throw",i.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],i=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var a=x.call(o,"catchLoc"),c=x.call(o,"finallyLoc");if(a&&c){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&x.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=r,o?(this.method="next",this.next=o.finallyLoc,q):this.complete(i)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),q},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),V(e),q}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;V(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:B(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),q}};var H={wrap:_,isGeneratorFunction:$,AsyncIterator:Y,mark:function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,A):(t.__proto__=A,S in t||(t[S]="GeneratorFunction")),t.prototype=Object.create(I),t},awrap:function(t){return{__await:t}},async:function(t,r,e,n,o){void 0===o&&(o=Promise);var i=new Y(_(t,r,e,n),o);return $(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},keys:function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},values:B};function J(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}var Q={registerAjv:function(t){var r=new s.default(function(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?J(Object(e),!0).forEach((function(r){b(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):J(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}({allowUnionTypes:!1,useDefaults:!0,allErrors:!0,verbose:!0,$data:!0,discriminator:!0,removeAdditional:!1},t));return r.addMetaSchema(v.default,"http://json-schema.org/draft-07/schema#"),r.addMetaSchema(m.default,"draft6"),l.default(r),h.default(r),p.default(r),g.default(r),r.addVocabulary(["validateTime","requiredMode","$container","$fieldKey","customFormat","transformToObject"]),y.default(r),d.default(r),r},loadAjvPlugins:function(t,r){if(r)if(Array.isArray(r))r.map(function(){var e,n=(e=H.mark((function e(n){return H.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{n(t)}catch(t){console.error("加载".concat(r,"错误")),console.error(t)}case 1:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){w(i,n,o,a,c,"next",t)}function c(t){w(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t){return n.apply(this,arguments)}}());else if("function"==typeof r)try{r(t)}catch(t){console.error("加载插件错误"),console.error(t)}}};module.exports=Q; | ||
"use strict";var t=require("ajv/dist/2019"),r=require("ajv-keywords"),e=require("ajv-errors"),n=require("ajv-formats"),o=require("@jdfed/drip-form-plugin-formats"),i=require("@jdfed/drip-form-plugin-keywords"),a=require("ajv/dist/refs/json-schema-draft-07.json"),c=require("ajv/dist/refs/json-schema-draft-06.json"),u=require("ajv-formats-draft2019");function f(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var s=f(t),l=f(r),h=f(e),p=f(n),d=f(o),y=f(i),v=f(a),m=f(c),g=f(u);function w(t,r,e,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void e(t)}c.done?r(u):Promise.resolve(u).then(n,o)}function b(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function j(t){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var O=Object.prototype,x=O.hasOwnProperty,L="function"==typeof Symbol?Symbol:{},E=L.iterator||"@@iterator",P=L.asyncIterator||"@@asyncIterator",S=L.toStringTag||"@@toStringTag";function _(t,r,e,n){var o=r&&r.prototype instanceof N?r:N,i=Object.create(o.prototype),a=new z(n||[]);return i._invoke=function(t,r,e){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return C()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var c=K(a,e);if(c){if(c===q)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var u=k(t,r,e);if("normal"===u.type){if(n=e.done?"completed":"suspendedYield",u.arg===q)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n="completed",e.method="throw",e.arg=u.arg)}}}(t,e,a),i}function k(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}var q={};function N(){}function T(){}function A(){}var G={};G[E]=function(){return this};var D=Object.getPrototypeOf,F=D&&D(D(B([])));F&&F!==O&&x.call(F,E)&&(G=F);var I=A.prototype=N.prototype=Object.create(G);function M(t){["next","throw","return"].forEach((function(r){t[r]=function(t){return this._invoke(r,t)}}))}function $(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===T||"GeneratorFunction"===(r.displayName||r.name))}function Y(t,r){var e;this._invoke=function(n,o){function i(){return new r((function(e,i){!function e(n,o,i,a){var c=k(t[n],t,o);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"===j(f)&&x.call(f,"__await")?r.resolve(f.__await).then((function(t){e("next",t,i,a)}),(function(t){e("throw",t,i,a)})):r.resolve(f).then((function(t){u.value=t,i(u)}),(function(t){return e("throw",t,i,a)}))}a(c.arg)}(n,o,e,i)}))}return e=e?e.then(i,i):i()}}function K(t,r){var e=t.iterator[r.method];if(void 0===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=void 0,K(t,r),"throw"===r.method))return q;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return q}var n=k(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,q;var o=n.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,q):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,q)}function U(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function V(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function z(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(U,this),this.reset(!0)}function B(t){if(t){var r=t[E];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,n=function r(){for(;++e<t.length;)if(x.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r};return n.next=n}}return{next:C}}function C(){return{value:void 0,done:!0}}T.prototype=I.constructor=A,A.constructor=T,A[S]=T.displayName="GeneratorFunction",M(Y.prototype),Y.prototype[P]=function(){return this},M(I),I[S]="Generator",I[E]=function(){return this},I.toString=function(){return"[object Generator]"},z.prototype={constructor:z,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(V),!t)for(var r in this)"t"===r.charAt(0)&&x.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function e(e,n){return i.type="throw",i.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],i=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var a=x.call(o,"catchLoc"),c=x.call(o,"finallyLoc");if(a&&c){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&x.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=r,o?(this.method="next",this.next=o.finallyLoc,q):this.complete(i)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),q},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),V(e),q}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;V(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:B(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),q}};var H={wrap:_,isGeneratorFunction:$,AsyncIterator:Y,mark:function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,A):(t.__proto__=A,S in t||(t[S]="GeneratorFunction")),t.prototype=Object.create(I),t},awrap:function(t){return{__await:t}},async:function(t,r,e,n,o){void 0===o&&(o=Promise);var i=new Y(_(t,r,e,n),o);return $(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},keys:function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},values:B};function J(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}var Q={registerAjv:function(t){var r=new s.default(function(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?J(Object(e),!0).forEach((function(r){b(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):J(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}({allowUnionTypes:!1,useDefaults:!0,allErrors:!0,verbose:!0,$data:!0,discriminator:!0,removeAdditional:!1},t));return r.addMetaSchema(v.default,"http://json-schema.org/draft-07/schema#"),r.addMetaSchema(m.default,"draft6"),l.default(r),h.default(r),p.default(r),g.default(r),r.addVocabulary(["validateTime","requiredMode","$container","$fieldKey","customFormat","transformToObject","flow"]),y.default(r),d.default(r),r},loadAjvPlugins:function(t,r){if(r)if(Array.isArray(r))r.map(function(){var e,n=(e=H.mark((function e(n){return H.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{n(t)}catch(t){console.error("加载".concat(r,"错误")),console.error(t)}case 1:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){w(i,n,o,a,c,"next",t)}function c(t){w(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t){return n.apply(this,arguments)}}());else if("function"==typeof r)try{r(t)}catch(t){console.error("加载插件错误"),console.error(t)}}};module.exports=Q; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import t from"ajv/dist/2019";import r from"ajv-keywords";import e from"ajv-errors";import n from"ajv-formats";import o from"@jdfed/drip-form-plugin-formats";import i from"@jdfed/drip-form-plugin-keywords";import a from"ajv/dist/refs/json-schema-draft-07.json";import c from"ajv/dist/refs/json-schema-draft-06.json";import u from"ajv-formats-draft2019";function f(t,r,e,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void e(t)}c.done?r(u):Promise.resolve(u).then(n,o)}function s(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function l(t){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var h=Object.prototype,p=h.hasOwnProperty,y="function"==typeof Symbol?Symbol:{},d=y.iterator||"@@iterator",v=y.asyncIterator||"@@asyncIterator",m=y.toStringTag||"@@toStringTag";function g(t,r,e,n){var o=r&&r.prototype instanceof j?r:j,i=Object.create(o.prototype),a=new D(n||[]);return i._invoke=function(t,r,e){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return I()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var c=T(a,e);if(c){if(c===b)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var u=w(t,r,e);if("normal"===u.type){if(n=e.done?"completed":"suspendedYield",u.arg===b)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n="completed",e.method="throw",e.arg=u.arg)}}}(t,e,a),i}function w(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}var b={};function j(){}function O(){}function x(){}var L={};L[d]=function(){return this};var E=Object.getPrototypeOf,P=E&&E(E(F([])));P&&P!==h&&p.call(P,d)&&(L=P);var S=x.prototype=j.prototype=Object.create(L);function _(t){["next","throw","return"].forEach((function(r){t[r]=function(t){return this._invoke(r,t)}}))}function k(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===O||"GeneratorFunction"===(r.displayName||r.name))}function N(t,r){var e;this._invoke=function(n,o){function i(){return new r((function(e,i){!function e(n,o,i,a){var c=w(t[n],t,o);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"===l(f)&&p.call(f,"__await")?r.resolve(f.__await).then((function(t){e("next",t,i,a)}),(function(t){e("throw",t,i,a)})):r.resolve(f).then((function(t){u.value=t,i(u)}),(function(t){return e("throw",t,i,a)}))}a(c.arg)}(n,o,e,i)}))}return e=e?e.then(i,i):i()}}function T(t,r){var e=t.iterator[r.method];if(void 0===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=void 0,T(t,r),"throw"===r.method))return b;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return b}var n=w(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,b;var o=n.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,b):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function A(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function G(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function F(t){if(t){var r=t[d];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,n=function r(){for(;++e<t.length;)if(p.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r};return n.next=n}}return{next:I}}function I(){return{value:void 0,done:!0}}O.prototype=S.constructor=x,x.constructor=O,x[m]=O.displayName="GeneratorFunction",_(N.prototype),N.prototype[v]=function(){return this},_(S),S[m]="Generator",S[d]=function(){return this},S.toString=function(){return"[object Generator]"},D.prototype={constructor:D,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(G),!t)for(var r in this)"t"===r.charAt(0)&&p.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function e(e,n){return i.type="throw",i.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],i=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var a=p.call(o,"catchLoc"),c=p.call(o,"finallyLoc");if(a&&c){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&p.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=r,o?(this.method="next",this.next=o.finallyLoc,b):this.complete(i)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),b},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),G(e),b}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;G(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:F(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),b}};var M={wrap:g,isGeneratorFunction:k,AsyncIterator:N,mark:function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,m in t||(t[m]="GeneratorFunction")),t.prototype=Object.create(S),t},awrap:function(t){return{__await:t}},async:function(t,r,e,n,o){void 0===o&&(o=Promise);var i=new N(g(t,r,e,n),o);return k(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},keys:function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},values:F};function $(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}var Y={registerAjv:function(f){var l=new t(function(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?$(Object(e),!0).forEach((function(r){s(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):$(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}({allowUnionTypes:!1,useDefaults:!0,allErrors:!0,verbose:!0,$data:!0,discriminator:!0,removeAdditional:!1},f));return l.addMetaSchema(a,"http://json-schema.org/draft-07/schema#"),l.addMetaSchema(c,"draft6"),r(l),e(l),n(l),u(l),l.addVocabulary(["validateTime","requiredMode","$container","$fieldKey","customFormat","transformToObject"]),i(l),o(l),l},loadAjvPlugins:function(t,r){if(r)if(Array.isArray(r))r.map(function(){var e,n=(e=M.mark((function e(n){return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{n(t)}catch(t){console.error("加载".concat(r,"错误")),console.error(t)}case 1:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){f(i,n,o,a,c,"next",t)}function c(t){f(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t){return n.apply(this,arguments)}}());else if("function"==typeof r)try{r(t)}catch(t){console.error("加载插件错误"),console.error(t)}}};export{Y as default}; | ||
import t from"ajv/dist/2019";import r from"ajv-keywords";import e from"ajv-errors";import n from"ajv-formats";import o from"@jdfed/drip-form-plugin-formats";import i from"@jdfed/drip-form-plugin-keywords";import a from"ajv/dist/refs/json-schema-draft-07.json";import c from"ajv/dist/refs/json-schema-draft-06.json";import u from"ajv-formats-draft2019";function f(t,r,e,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void e(t)}c.done?r(u):Promise.resolve(u).then(n,o)}function s(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function l(t){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var h=Object.prototype,p=h.hasOwnProperty,y="function"==typeof Symbol?Symbol:{},d=y.iterator||"@@iterator",v=y.asyncIterator||"@@asyncIterator",m=y.toStringTag||"@@toStringTag";function g(t,r,e,n){var o=r&&r.prototype instanceof j?r:j,i=Object.create(o.prototype),a=new D(n||[]);return i._invoke=function(t,r,e){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return I()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var c=T(a,e);if(c){if(c===b)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var u=w(t,r,e);if("normal"===u.type){if(n=e.done?"completed":"suspendedYield",u.arg===b)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n="completed",e.method="throw",e.arg=u.arg)}}}(t,e,a),i}function w(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}var b={};function j(){}function O(){}function x(){}var L={};L[d]=function(){return this};var E=Object.getPrototypeOf,P=E&&E(E(F([])));P&&P!==h&&p.call(P,d)&&(L=P);var S=x.prototype=j.prototype=Object.create(L);function _(t){["next","throw","return"].forEach((function(r){t[r]=function(t){return this._invoke(r,t)}}))}function k(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===O||"GeneratorFunction"===(r.displayName||r.name))}function N(t,r){var e;this._invoke=function(n,o){function i(){return new r((function(e,i){!function e(n,o,i,a){var c=w(t[n],t,o);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"===l(f)&&p.call(f,"__await")?r.resolve(f.__await).then((function(t){e("next",t,i,a)}),(function(t){e("throw",t,i,a)})):r.resolve(f).then((function(t){u.value=t,i(u)}),(function(t){return e("throw",t,i,a)}))}a(c.arg)}(n,o,e,i)}))}return e=e?e.then(i,i):i()}}function T(t,r){var e=t.iterator[r.method];if(void 0===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=void 0,T(t,r),"throw"===r.method))return b;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return b}var n=w(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,b;var o=n.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,b):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function A(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function G(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function F(t){if(t){var r=t[d];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,n=function r(){for(;++e<t.length;)if(p.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r};return n.next=n}}return{next:I}}function I(){return{value:void 0,done:!0}}O.prototype=S.constructor=x,x.constructor=O,x[m]=O.displayName="GeneratorFunction",_(N.prototype),N.prototype[v]=function(){return this},_(S),S[m]="Generator",S[d]=function(){return this},S.toString=function(){return"[object Generator]"},D.prototype={constructor:D,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(G),!t)for(var r in this)"t"===r.charAt(0)&&p.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function e(e,n){return i.type="throw",i.arg=t,r.next=e,n&&(r.method="next",r.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],i=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var a=p.call(o,"catchLoc"),c=p.call(o,"finallyLoc");if(a&&c){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&p.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=r,o?(this.method="next",this.next=o.finallyLoc,b):this.complete(i)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),b},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),G(e),b}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;G(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:F(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),b}};var M={wrap:g,isGeneratorFunction:k,AsyncIterator:N,mark:function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,m in t||(t[m]="GeneratorFunction")),t.prototype=Object.create(S),t},awrap:function(t){return{__await:t}},async:function(t,r,e,n,o){void 0===o&&(o=Promise);var i=new N(g(t,r,e,n),o);return k(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},keys:function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},values:F};function $(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}var Y={registerAjv:function(f){var l=new t(function(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?$(Object(e),!0).forEach((function(r){s(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):$(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}({allowUnionTypes:!1,useDefaults:!0,allErrors:!0,verbose:!0,$data:!0,discriminator:!0,removeAdditional:!1},f));return l.addMetaSchema(a,"http://json-schema.org/draft-07/schema#"),l.addMetaSchema(c,"draft6"),r(l),e(l),n(l),u(l),l.addVocabulary(["validateTime","requiredMode","$container","$fieldKey","customFormat","transformToObject","flow"]),i(l),o(l),l},loadAjvPlugins:function(t,r){if(r)if(Array.isArray(r))r.map(function(){var e,n=(e=M.mark((function e(n){return M.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{n(t)}catch(t){console.error("加载".concat(r,"错误")),console.error(t)}case 1:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){f(i,n,o,a,c,"next",t)}function c(t){f(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t){return n.apply(this,arguments)}}());else if("function"==typeof r)try{r(t)}catch(t){console.error("加载插件错误"),console.error(t)}}};export{Y as default}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@jdfed/ajv", | ||
"version": "0.9.0-alpha.6", | ||
"version": "0.9.0-alpha.7", | ||
"description": "drip ajv核心包", | ||
@@ -37,4 +37,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@jdfed/drip-form-plugin-formats": "^0.9.0-alpha.6", | ||
"@jdfed/drip-form-plugin-keywords": "^0.9.0-alpha.6", | ||
"@jdfed/drip-form-plugin-formats": "^0.9.0-alpha.7", | ||
"@jdfed/drip-form-plugin-keywords": "^0.9.0-alpha.7", | ||
"ajv": "^8.6.2", | ||
@@ -46,3 +46,3 @@ "ajv-errors": "^3.0.0", | ||
}, | ||
"gitHead": "82388aeef541519d62d9b0ec902671feba5d710e" | ||
"gitHead": "ece5c41d7b6805f0c4df1ad70a16d895f444d793" | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
234773