@atxp/client 0.2.21 → 0.3.0

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.
Files changed (189) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +6 -0
  2. package/dist/_virtual/_commonjsHelpers.js.map +1 -0
  3. package/dist/_virtual/ajv.js +8 -0
  4. package/dist/_virtual/ajv.js.map +1 -0
  5. package/dist/_virtual/cache.js +4 -0
  6. package/dist/_virtual/cache.js.map +1 -0
  7. package/dist/_virtual/index.js +4 -0
  8. package/dist/_virtual/index.js.map +1 -0
  9. package/dist/_virtual/uri.all.js +4 -0
  10. package/dist/_virtual/uri.all.js.map +1 -0
  11. package/dist/atxpAccount.js +4 -2
  12. package/dist/atxpAccount.js.map +1 -1
  13. package/dist/atxpClient.js +12 -10
  14. package/dist/atxpClient.js.map +1 -1
  15. package/dist/atxpFetcher.js +10 -8
  16. package/dist/atxpFetcher.js.map +1 -1
  17. package/dist/baseAccount.js +5 -3
  18. package/dist/baseAccount.js.map +1 -1
  19. package/dist/baseConstants.js +4 -0
  20. package/dist/baseConstants.js.map +1 -0
  21. package/dist/basePaymentMaker.js +15 -12
  22. package/dist/basePaymentMaker.js.map +1 -1
  23. package/dist/index.cjs +15595 -0
  24. package/dist/index.cjs.map +1 -0
  25. package/dist/index.d.ts +250 -10
  26. package/dist/index.js +15558 -10
  27. package/dist/index.js.map +1 -1
  28. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth.js +398 -0
  29. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth.js.map +1 -0
  30. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js +273 -0
  31. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js.map +1 -0
  32. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js +378 -0
  33. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js.map +1 -0
  34. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth-utils.js +46 -0
  35. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth-utils.js.map +1 -0
  36. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js +120 -0
  37. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js.map +1 -0
  38. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js +380 -0
  39. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js.map +1 -0
  40. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js +1254 -0
  41. package/dist/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js.map +1 -0
  42. package/dist/node_modules/ajv/lib/ajv.js +531 -0
  43. package/dist/node_modules/ajv/lib/ajv.js.map +1 -0
  44. package/dist/node_modules/ajv/lib/cache.js +37 -0
  45. package/dist/node_modules/ajv/lib/cache.js.map +1 -0
  46. package/dist/node_modules/ajv/lib/compile/async.js +102 -0
  47. package/dist/node_modules/ajv/lib/compile/async.js.map +1 -0
  48. package/dist/node_modules/ajv/lib/compile/error_classes.js +46 -0
  49. package/dist/node_modules/ajv/lib/compile/error_classes.js.map +1 -0
  50. package/dist/node_modules/ajv/lib/compile/formats.js +154 -0
  51. package/dist/node_modules/ajv/lib/compile/formats.js.map +1 -0
  52. package/dist/node_modules/ajv/lib/compile/index.js +404 -0
  53. package/dist/node_modules/ajv/lib/compile/index.js.map +1 -0
  54. package/dist/node_modules/ajv/lib/compile/resolve.js +286 -0
  55. package/dist/node_modules/ajv/lib/compile/resolve.js.map +1 -0
  56. package/dist/node_modules/ajv/lib/compile/rules.js +79 -0
  57. package/dist/node_modules/ajv/lib/compile/rules.js.map +1 -0
  58. package/dist/node_modules/ajv/lib/compile/schema_obj.js +21 -0
  59. package/dist/node_modules/ajv/lib/compile/schema_obj.js.map +1 -0
  60. package/dist/node_modules/ajv/lib/compile/ucs2length.js +30 -0
  61. package/dist/node_modules/ajv/lib/compile/ucs2length.js.map +1 -0
  62. package/dist/node_modules/ajv/lib/compile/util.js +252 -0
  63. package/dist/node_modules/ajv/lib/compile/util.js.map +1 -0
  64. package/dist/node_modules/ajv/lib/data.js +59 -0
  65. package/dist/node_modules/ajv/lib/data.js.map +1 -0
  66. package/dist/node_modules/ajv/lib/definition_schema.js +49 -0
  67. package/dist/node_modules/ajv/lib/definition_schema.js.map +1 -0
  68. package/dist/node_modules/ajv/lib/dotjs/_limit.js +173 -0
  69. package/dist/node_modules/ajv/lib/dotjs/_limit.js.map +1 -0
  70. package/dist/node_modules/ajv/lib/dotjs/_limitItems.js +90 -0
  71. package/dist/node_modules/ajv/lib/dotjs/_limitItems.js.map +1 -0
  72. package/dist/node_modules/ajv/lib/dotjs/_limitLength.js +95 -0
  73. package/dist/node_modules/ajv/lib/dotjs/_limitLength.js.map +1 -0
  74. package/dist/node_modules/ajv/lib/dotjs/_limitProperties.js +90 -0
  75. package/dist/node_modules/ajv/lib/dotjs/_limitProperties.js.map +1 -0
  76. package/dist/node_modules/ajv/lib/dotjs/allOf.js +52 -0
  77. package/dist/node_modules/ajv/lib/dotjs/allOf.js.map +1 -0
  78. package/dist/node_modules/ajv/lib/dotjs/anyOf.js +83 -0
  79. package/dist/node_modules/ajv/lib/dotjs/anyOf.js.map +1 -0
  80. package/dist/node_modules/ajv/lib/dotjs/comment.js +24 -0
  81. package/dist/node_modules/ajv/lib/dotjs/comment.js.map +1 -0
  82. package/dist/node_modules/ajv/lib/dotjs/const.js +62 -0
  83. package/dist/node_modules/ajv/lib/dotjs/const.js.map +1 -0
  84. package/dist/node_modules/ajv/lib/dotjs/contains.js +91 -0
  85. package/dist/node_modules/ajv/lib/dotjs/contains.js.map +1 -0
  86. package/dist/node_modules/ajv/lib/dotjs/custom.js +238 -0
  87. package/dist/node_modules/ajv/lib/dotjs/custom.js.map +1 -0
  88. package/dist/node_modules/ajv/lib/dotjs/dependencies.js +178 -0
  89. package/dist/node_modules/ajv/lib/dotjs/dependencies.js.map +1 -0
  90. package/dist/node_modules/ajv/lib/dotjs/enum.js +72 -0
  91. package/dist/node_modules/ajv/lib/dotjs/enum.js.map +1 -0
  92. package/dist/node_modules/ajv/lib/dotjs/format.js +160 -0
  93. package/dist/node_modules/ajv/lib/dotjs/format.js.map +1 -0
  94. package/dist/node_modules/ajv/lib/dotjs/if.js +113 -0
  95. package/dist/node_modules/ajv/lib/dotjs/if.js.map +1 -0
  96. package/dist/node_modules/ajv/lib/dotjs/index.js +68 -0
  97. package/dist/node_modules/ajv/lib/dotjs/index.js.map +1 -0
  98. package/dist/node_modules/ajv/lib/dotjs/items.js +150 -0
  99. package/dist/node_modules/ajv/lib/dotjs/items.js.map +1 -0
  100. package/dist/node_modules/ajv/lib/dotjs/multipleOf.js +90 -0
  101. package/dist/node_modules/ajv/lib/dotjs/multipleOf.js.map +1 -0
  102. package/dist/node_modules/ajv/lib/dotjs/not.js +94 -0
  103. package/dist/node_modules/ajv/lib/dotjs/not.js.map +1 -0
  104. package/dist/node_modules/ajv/lib/dotjs/oneOf.js +83 -0
  105. package/dist/node_modules/ajv/lib/dotjs/oneOf.js.map +1 -0
  106. package/dist/node_modules/ajv/lib/dotjs/pattern.js +85 -0
  107. package/dist/node_modules/ajv/lib/dotjs/pattern.js.map +1 -0
  108. package/dist/node_modules/ajv/lib/dotjs/properties.js +345 -0
  109. package/dist/node_modules/ajv/lib/dotjs/properties.js.map +1 -0
  110. package/dist/node_modules/ajv/lib/dotjs/propertyNames.js +91 -0
  111. package/dist/node_modules/ajv/lib/dotjs/propertyNames.js.map +1 -0
  112. package/dist/node_modules/ajv/lib/dotjs/ref.js +134 -0
  113. package/dist/node_modules/ajv/lib/dotjs/ref.js.map +1 -0
  114. package/dist/node_modules/ajv/lib/dotjs/required.js +276 -0
  115. package/dist/node_modules/ajv/lib/dotjs/required.js.map +1 -0
  116. package/dist/node_modules/ajv/lib/dotjs/uniqueItems.js +96 -0
  117. package/dist/node_modules/ajv/lib/dotjs/uniqueItems.js.map +1 -0
  118. package/dist/node_modules/ajv/lib/dotjs/validate.js +492 -0
  119. package/dist/node_modules/ajv/lib/dotjs/validate.js.map +1 -0
  120. package/dist/node_modules/ajv/lib/keyword.js +159 -0
  121. package/dist/node_modules/ajv/lib/keyword.js.map +1 -0
  122. package/dist/node_modules/ajv/lib/refs/data.json.js +33 -0
  123. package/dist/node_modules/ajv/lib/refs/data.json.js.map +1 -0
  124. package/dist/node_modules/ajv/lib/refs/json-schema-draft-07.json.js +254 -0
  125. package/dist/node_modules/ajv/lib/refs/json-schema-draft-07.json.js.map +1 -0
  126. package/dist/node_modules/eventsource-parser/dist/index.js +104 -0
  127. package/dist/node_modules/eventsource-parser/dist/index.js.map +1 -0
  128. package/dist/node_modules/eventsource-parser/dist/stream.js +28 -0
  129. package/dist/node_modules/eventsource-parser/dist/stream.js.map +1 -0
  130. package/dist/node_modules/fast-deep-equal/index.js +56 -0
  131. package/dist/node_modules/fast-deep-equal/index.js.map +1 -0
  132. package/dist/node_modules/fast-json-stable-stringify/index.js +69 -0
  133. package/dist/node_modules/fast-json-stable-stringify/index.js.map +1 -0
  134. package/dist/node_modules/json-schema-traverse/index.js +100 -0
  135. package/dist/node_modules/json-schema-traverse/index.js.map +1 -0
  136. package/dist/node_modules/pkce-challenge/dist/index.browser.js +66 -0
  137. package/dist/node_modules/pkce-challenge/dist/index.browser.js.map +1 -0
  138. package/dist/node_modules/uri-js/dist/es5/uri.all.js +1418 -0
  139. package/dist/node_modules/uri-js/dist/es5/uri.all.js.map +1 -0
  140. package/dist/node_modules/zod/dist/esm/v3/ZodError.js +132 -0
  141. package/dist/node_modules/zod/dist/esm/v3/ZodError.js.map +1 -0
  142. package/dist/node_modules/zod/dist/esm/v3/errors.js +9 -0
  143. package/dist/node_modules/zod/dist/esm/v3/errors.js.map +1 -0
  144. package/dist/node_modules/zod/dist/esm/v3/helpers/errorUtil.js +9 -0
  145. package/dist/node_modules/zod/dist/esm/v3/helpers/errorUtil.js.map +1 -0
  146. package/dist/node_modules/zod/dist/esm/v3/helpers/parseUtil.js +112 -0
  147. package/dist/node_modules/zod/dist/esm/v3/helpers/parseUtil.js.map +1 -0
  148. package/dist/node_modules/zod/dist/esm/v3/helpers/util.js +136 -0
  149. package/dist/node_modules/zod/dist/esm/v3/helpers/util.js.map +1 -0
  150. package/dist/node_modules/zod/dist/esm/v3/locales/en.js +110 -0
  151. package/dist/node_modules/zod/dist/esm/v3/locales/en.js.map +1 -0
  152. package/dist/node_modules/zod/dist/esm/v3/types.js +3488 -0
  153. package/dist/node_modules/zod/dist/esm/v3/types.js.map +1 -0
  154. package/dist/oAuth.js +7 -6
  155. package/dist/oAuth.js.map +1 -1
  156. package/dist/solanaAccount.js +7 -4
  157. package/dist/solanaAccount.js.map +1 -1
  158. package/dist/solanaPaymentMaker.js +15 -12
  159. package/dist/solanaPaymentMaker.js.map +1 -1
  160. package/dist/types.js +5 -3
  161. package/dist/types.js.map +1 -1
  162. package/package.json +26 -10
  163. package/dist/atxpAccount.d.ts +0 -13
  164. package/dist/atxpAccount.d.ts.map +0 -1
  165. package/dist/atxpClient.d.ts +0 -14
  166. package/dist/atxpClient.d.ts.map +0 -1
  167. package/dist/atxpFetcher.d.ts +0 -72
  168. package/dist/atxpFetcher.d.ts.map +0 -1
  169. package/dist/baseAccount.d.ts +0 -10
  170. package/dist/baseAccount.d.ts.map +0 -1
  171. package/dist/basePaymentMaker.d.ts +0 -16
  172. package/dist/basePaymentMaker.d.ts.map +0 -1
  173. package/dist/clientTestHelpers.d.ts +0 -6
  174. package/dist/clientTestHelpers.d.ts.map +0 -1
  175. package/dist/clientTestHelpers.js +0 -94
  176. package/dist/clientTestHelpers.js.map +0 -1
  177. package/dist/index.d.ts.map +0 -1
  178. package/dist/oAuth.d.ts +0 -44
  179. package/dist/oAuth.d.ts.map +0 -1
  180. package/dist/setup.expo.d.ts +0 -2
  181. package/dist/setup.expo.d.ts.map +0 -1
  182. package/dist/setup.expo.js +0 -30
  183. package/dist/setup.expo.js.map +0 -1
  184. package/dist/solanaAccount.d.ts +0 -9
  185. package/dist/solanaAccount.d.ts.map +0 -1
  186. package/dist/solanaPaymentMaker.d.ts +0 -18
  187. package/dist/solanaPaymentMaker.d.ts.map +0 -1
  188. package/dist/types.d.ts +0 -70
  189. package/dist/types.d.ts.map +0 -1
@@ -0,0 +1,531 @@
1
+ import { __require as requireCompile } from './compile/index.js';
2
+ import { __require as requireResolve } from './compile/resolve.js';
3
+ import { __require as requireCache } from './cache.js';
4
+ import { __require as requireSchema_obj } from './compile/schema_obj.js';
5
+ import { __require as requireFastJsonStableStringify } from '../../fast-json-stable-stringify/index.js';
6
+ import { __require as requireFormats } from './compile/formats.js';
7
+ import { __require as requireRules } from './compile/rules.js';
8
+ import { __require as requireData } from './data.js';
9
+ import { __require as requireUtil } from './compile/util.js';
10
+ import { __require as requireAsync } from './compile/async.js';
11
+ import { __require as requireKeyword } from './keyword.js';
12
+ import { __require as requireError_classes } from './compile/error_classes.js';
13
+ import require$$12 from './refs/data.json.js';
14
+ import require$$13 from './refs/json-schema-draft-07.json.js';
15
+
16
+ var ajv;
17
+ var hasRequiredAjv;
18
+
19
+ function requireAjv () {
20
+ if (hasRequiredAjv) return ajv;
21
+ hasRequiredAjv = 1;
22
+
23
+ var compileSchema = requireCompile()
24
+ , resolve = requireResolve()
25
+ , Cache = requireCache()
26
+ , SchemaObject = requireSchema_obj()
27
+ , stableStringify = requireFastJsonStableStringify()
28
+ , formats = requireFormats()
29
+ , rules = requireRules()
30
+ , $dataMetaSchema = requireData()
31
+ , util = requireUtil();
32
+
33
+ ajv = Ajv;
34
+
35
+ Ajv.prototype.validate = validate;
36
+ Ajv.prototype.compile = compile;
37
+ Ajv.prototype.addSchema = addSchema;
38
+ Ajv.prototype.addMetaSchema = addMetaSchema;
39
+ Ajv.prototype.validateSchema = validateSchema;
40
+ Ajv.prototype.getSchema = getSchema;
41
+ Ajv.prototype.removeSchema = removeSchema;
42
+ Ajv.prototype.addFormat = addFormat;
43
+ Ajv.prototype.errorsText = errorsText;
44
+
45
+ Ajv.prototype._addSchema = _addSchema;
46
+ Ajv.prototype._compile = _compile;
47
+
48
+ Ajv.prototype.compileAsync = requireAsync();
49
+ var customKeyword = requireKeyword();
50
+ Ajv.prototype.addKeyword = customKeyword.add;
51
+ Ajv.prototype.getKeyword = customKeyword.get;
52
+ Ajv.prototype.removeKeyword = customKeyword.remove;
53
+ Ajv.prototype.validateKeyword = customKeyword.validate;
54
+
55
+ var errorClasses = requireError_classes();
56
+ Ajv.ValidationError = errorClasses.Validation;
57
+ Ajv.MissingRefError = errorClasses.MissingRef;
58
+ Ajv.$dataMetaSchema = $dataMetaSchema;
59
+
60
+ var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema';
61
+
62
+ var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes', 'strictDefaults' ];
63
+ var META_SUPPORT_DATA = ['/properties'];
64
+
65
+ /**
66
+ * Creates validator instance.
67
+ * Usage: `Ajv(opts)`
68
+ * @param {Object} opts optional options
69
+ * @return {Object} ajv instance
70
+ */
71
+ function Ajv(opts) {
72
+ if (!(this instanceof Ajv)) return new Ajv(opts);
73
+ opts = this._opts = util.copy(opts) || {};
74
+ setLogger(this);
75
+ this._schemas = {};
76
+ this._refs = {};
77
+ this._fragments = {};
78
+ this._formats = formats(opts.format);
79
+
80
+ this._cache = opts.cache || new Cache;
81
+ this._loadingSchemas = {};
82
+ this._compilations = [];
83
+ this.RULES = rules();
84
+ this._getId = chooseGetId(opts);
85
+
86
+ opts.loopRequired = opts.loopRequired || Infinity;
87
+ if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true;
88
+ if (opts.serialize === undefined) opts.serialize = stableStringify;
89
+ this._metaOpts = getMetaSchemaOptions(this);
90
+
91
+ if (opts.formats) addInitialFormats(this);
92
+ if (opts.keywords) addInitialKeywords(this);
93
+ addDefaultMetaSchema(this);
94
+ if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta);
95
+ if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}});
96
+ addInitialSchemas(this);
97
+ }
98
+
99
+
100
+
101
+ /**
102
+ * Validate data using schema
103
+ * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize.
104
+ * @this Ajv
105
+ * @param {String|Object} schemaKeyRef key, ref or schema object
106
+ * @param {Any} data to be validated
107
+ * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).
108
+ */
109
+ function validate(schemaKeyRef, data) {
110
+ var v;
111
+ if (typeof schemaKeyRef == 'string') {
112
+ v = this.getSchema(schemaKeyRef);
113
+ if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"');
114
+ } else {
115
+ var schemaObj = this._addSchema(schemaKeyRef);
116
+ v = schemaObj.validate || this._compile(schemaObj);
117
+ }
118
+
119
+ var valid = v(data);
120
+ if (v.$async !== true) this.errors = v.errors;
121
+ return valid;
122
+ }
123
+
124
+
125
+ /**
126
+ * Create validating function for passed schema.
127
+ * @this Ajv
128
+ * @param {Object} schema schema object
129
+ * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords.
130
+ * @return {Function} validating function
131
+ */
132
+ function compile(schema, _meta) {
133
+ var schemaObj = this._addSchema(schema, undefined, _meta);
134
+ return schemaObj.validate || this._compile(schemaObj);
135
+ }
136
+
137
+
138
+ /**
139
+ * Adds schema to the instance.
140
+ * @this Ajv
141
+ * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored.
142
+ * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.
143
+ * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead.
144
+ * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.
145
+ * @return {Ajv} this for method chaining
146
+ */
147
+ function addSchema(schema, key, _skipValidation, _meta) {
148
+ if (Array.isArray(schema)){
149
+ for (var i=0; i<schema.length; i++) this.addSchema(schema[i], undefined, _skipValidation, _meta);
150
+ return this;
151
+ }
152
+ var id = this._getId(schema);
153
+ if (id !== undefined && typeof id != 'string')
154
+ throw new Error('schema id must be string');
155
+ key = resolve.normalizeId(key || id);
156
+ checkUnique(this, key);
157
+ this._schemas[key] = this._addSchema(schema, _skipValidation, _meta, true);
158
+ return this;
159
+ }
160
+
161
+
162
+ /**
163
+ * Add schema that will be used to validate other schemas
164
+ * options in META_IGNORE_OPTIONS are alway set to false
165
+ * @this Ajv
166
+ * @param {Object} schema schema object
167
+ * @param {String} key optional schema key
168
+ * @param {Boolean} skipValidation true to skip schema validation, can be used to override validateSchema option for meta-schema
169
+ * @return {Ajv} this for method chaining
170
+ */
171
+ function addMetaSchema(schema, key, skipValidation) {
172
+ this.addSchema(schema, key, skipValidation, true);
173
+ return this;
174
+ }
175
+
176
+
177
+ /**
178
+ * Validate schema
179
+ * @this Ajv
180
+ * @param {Object} schema schema to validate
181
+ * @param {Boolean} throwOrLogError pass true to throw (or log) an error if invalid
182
+ * @return {Boolean} true if schema is valid
183
+ */
184
+ function validateSchema(schema, throwOrLogError) {
185
+ var $schema = schema.$schema;
186
+ if ($schema !== undefined && typeof $schema != 'string')
187
+ throw new Error('$schema must be a string');
188
+ $schema = $schema || this._opts.defaultMeta || defaultMeta(this);
189
+ if (!$schema) {
190
+ this.logger.warn('meta-schema not available');
191
+ this.errors = null;
192
+ return true;
193
+ }
194
+ var valid = this.validate($schema, schema);
195
+ if (!valid && throwOrLogError) {
196
+ var message = 'schema is invalid: ' + this.errorsText();
197
+ if (this._opts.validateSchema == 'log') this.logger.error(message);
198
+ else throw new Error(message);
199
+ }
200
+ return valid;
201
+ }
202
+
203
+
204
+ function defaultMeta(self) {
205
+ var meta = self._opts.meta;
206
+ self._opts.defaultMeta = typeof meta == 'object'
207
+ ? self._getId(meta) || meta
208
+ : self.getSchema(META_SCHEMA_ID)
209
+ ? META_SCHEMA_ID
210
+ : undefined;
211
+ return self._opts.defaultMeta;
212
+ }
213
+
214
+
215
+ /**
216
+ * Get compiled schema from the instance by `key` or `ref`.
217
+ * @this Ajv
218
+ * @param {String} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id).
219
+ * @return {Function} schema validating function (with property `schema`).
220
+ */
221
+ function getSchema(keyRef) {
222
+ var schemaObj = _getSchemaObj(this, keyRef);
223
+ switch (typeof schemaObj) {
224
+ case 'object': return schemaObj.validate || this._compile(schemaObj);
225
+ case 'string': return this.getSchema(schemaObj);
226
+ case 'undefined': return _getSchemaFragment(this, keyRef);
227
+ }
228
+ }
229
+
230
+
231
+ function _getSchemaFragment(self, ref) {
232
+ var res = resolve.schema.call(self, { schema: {} }, ref);
233
+ if (res) {
234
+ var schema = res.schema
235
+ , root = res.root
236
+ , baseId = res.baseId;
237
+ var v = compileSchema.call(self, schema, root, undefined, baseId);
238
+ self._fragments[ref] = new SchemaObject({
239
+ ref: ref,
240
+ fragment: true,
241
+ schema: schema,
242
+ root: root,
243
+ baseId: baseId,
244
+ validate: v
245
+ });
246
+ return v;
247
+ }
248
+ }
249
+
250
+
251
+ function _getSchemaObj(self, keyRef) {
252
+ keyRef = resolve.normalizeId(keyRef);
253
+ return self._schemas[keyRef] || self._refs[keyRef] || self._fragments[keyRef];
254
+ }
255
+
256
+
257
+ /**
258
+ * Remove cached schema(s).
259
+ * If no parameter is passed all schemas but meta-schemas are removed.
260
+ * If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.
261
+ * Even if schema is referenced by other schemas it still can be removed as other schemas have local references.
262
+ * @this Ajv
263
+ * @param {String|Object|RegExp} schemaKeyRef key, ref, pattern to match key/ref or schema object
264
+ * @return {Ajv} this for method chaining
265
+ */
266
+ function removeSchema(schemaKeyRef) {
267
+ if (schemaKeyRef instanceof RegExp) {
268
+ _removeAllSchemas(this, this._schemas, schemaKeyRef);
269
+ _removeAllSchemas(this, this._refs, schemaKeyRef);
270
+ return this;
271
+ }
272
+ switch (typeof schemaKeyRef) {
273
+ case 'undefined':
274
+ _removeAllSchemas(this, this._schemas);
275
+ _removeAllSchemas(this, this._refs);
276
+ this._cache.clear();
277
+ return this;
278
+ case 'string':
279
+ var schemaObj = _getSchemaObj(this, schemaKeyRef);
280
+ if (schemaObj) this._cache.del(schemaObj.cacheKey);
281
+ delete this._schemas[schemaKeyRef];
282
+ delete this._refs[schemaKeyRef];
283
+ return this;
284
+ case 'object':
285
+ var serialize = this._opts.serialize;
286
+ var cacheKey = serialize ? serialize(schemaKeyRef) : schemaKeyRef;
287
+ this._cache.del(cacheKey);
288
+ var id = this._getId(schemaKeyRef);
289
+ if (id) {
290
+ id = resolve.normalizeId(id);
291
+ delete this._schemas[id];
292
+ delete this._refs[id];
293
+ }
294
+ }
295
+ return this;
296
+ }
297
+
298
+
299
+ function _removeAllSchemas(self, schemas, regex) {
300
+ for (var keyRef in schemas) {
301
+ var schemaObj = schemas[keyRef];
302
+ if (!schemaObj.meta && (!regex || regex.test(keyRef))) {
303
+ self._cache.del(schemaObj.cacheKey);
304
+ delete schemas[keyRef];
305
+ }
306
+ }
307
+ }
308
+
309
+
310
+ /* @this Ajv */
311
+ function _addSchema(schema, skipValidation, meta, shouldAddSchema) {
312
+ if (typeof schema != 'object' && typeof schema != 'boolean')
313
+ throw new Error('schema should be object or boolean');
314
+ var serialize = this._opts.serialize;
315
+ var cacheKey = serialize ? serialize(schema) : schema;
316
+ var cached = this._cache.get(cacheKey);
317
+ if (cached) return cached;
318
+
319
+ shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false;
320
+
321
+ var id = resolve.normalizeId(this._getId(schema));
322
+ if (id && shouldAddSchema) checkUnique(this, id);
323
+
324
+ var willValidate = this._opts.validateSchema !== false && !skipValidation;
325
+ var recursiveMeta;
326
+ if (willValidate && !(recursiveMeta = id && id == resolve.normalizeId(schema.$schema)))
327
+ this.validateSchema(schema, true);
328
+
329
+ var localRefs = resolve.ids.call(this, schema);
330
+
331
+ var schemaObj = new SchemaObject({
332
+ id: id,
333
+ schema: schema,
334
+ localRefs: localRefs,
335
+ cacheKey: cacheKey,
336
+ meta: meta
337
+ });
338
+
339
+ if (id[0] != '#' && shouldAddSchema) this._refs[id] = schemaObj;
340
+ this._cache.put(cacheKey, schemaObj);
341
+
342
+ if (willValidate && recursiveMeta) this.validateSchema(schema, true);
343
+
344
+ return schemaObj;
345
+ }
346
+
347
+
348
+ /* @this Ajv */
349
+ function _compile(schemaObj, root) {
350
+ if (schemaObj.compiling) {
351
+ schemaObj.validate = callValidate;
352
+ callValidate.schema = schemaObj.schema;
353
+ callValidate.errors = null;
354
+ callValidate.root = root ? root : callValidate;
355
+ if (schemaObj.schema.$async === true)
356
+ callValidate.$async = true;
357
+ return callValidate;
358
+ }
359
+ schemaObj.compiling = true;
360
+
361
+ var currentOpts;
362
+ if (schemaObj.meta) {
363
+ currentOpts = this._opts;
364
+ this._opts = this._metaOpts;
365
+ }
366
+
367
+ var v;
368
+ try { v = compileSchema.call(this, schemaObj.schema, root, schemaObj.localRefs); }
369
+ catch(e) {
370
+ delete schemaObj.validate;
371
+ throw e;
372
+ }
373
+ finally {
374
+ schemaObj.compiling = false;
375
+ if (schemaObj.meta) this._opts = currentOpts;
376
+ }
377
+
378
+ schemaObj.validate = v;
379
+ schemaObj.refs = v.refs;
380
+ schemaObj.refVal = v.refVal;
381
+ schemaObj.root = v.root;
382
+ return v;
383
+
384
+
385
+ /* @this {*} - custom context, see passContext option */
386
+ function callValidate() {
387
+ /* jshint validthis: true */
388
+ var _validate = schemaObj.validate;
389
+ var result = _validate.apply(this, arguments);
390
+ callValidate.errors = _validate.errors;
391
+ return result;
392
+ }
393
+ }
394
+
395
+
396
+ function chooseGetId(opts) {
397
+ switch (opts.schemaId) {
398
+ case 'auto': return _get$IdOrId;
399
+ case 'id': return _getId;
400
+ default: return _get$Id;
401
+ }
402
+ }
403
+
404
+ /* @this Ajv */
405
+ function _getId(schema) {
406
+ if (schema.$id) this.logger.warn('schema $id ignored', schema.$id);
407
+ return schema.id;
408
+ }
409
+
410
+ /* @this Ajv */
411
+ function _get$Id(schema) {
412
+ if (schema.id) this.logger.warn('schema id ignored', schema.id);
413
+ return schema.$id;
414
+ }
415
+
416
+
417
+ function _get$IdOrId(schema) {
418
+ if (schema.$id && schema.id && schema.$id != schema.id)
419
+ throw new Error('schema $id is different from id');
420
+ return schema.$id || schema.id;
421
+ }
422
+
423
+
424
+ /**
425
+ * Convert array of error message objects to string
426
+ * @this Ajv
427
+ * @param {Array<Object>} errors optional array of validation errors, if not passed errors from the instance are used.
428
+ * @param {Object} options optional options with properties `separator` and `dataVar`.
429
+ * @return {String} human readable string with all errors descriptions
430
+ */
431
+ function errorsText(errors, options) {
432
+ errors = errors || this.errors;
433
+ if (!errors) return 'No errors';
434
+ options = options || {};
435
+ var separator = options.separator === undefined ? ', ' : options.separator;
436
+ var dataVar = options.dataVar === undefined ? 'data' : options.dataVar;
437
+
438
+ var text = '';
439
+ for (var i=0; i<errors.length; i++) {
440
+ var e = errors[i];
441
+ if (e) text += dataVar + e.dataPath + ' ' + e.message + separator;
442
+ }
443
+ return text.slice(0, -separator.length);
444
+ }
445
+
446
+
447
+ /**
448
+ * Add custom format
449
+ * @this Ajv
450
+ * @param {String} name format name
451
+ * @param {String|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid)
452
+ * @return {Ajv} this for method chaining
453
+ */
454
+ function addFormat(name, format) {
455
+ if (typeof format == 'string') format = new RegExp(format);
456
+ this._formats[name] = format;
457
+ return this;
458
+ }
459
+
460
+
461
+ function addDefaultMetaSchema(self) {
462
+ var $dataSchema;
463
+ if (self._opts.$data) {
464
+ $dataSchema = require$$12;
465
+ self.addMetaSchema($dataSchema, $dataSchema.$id, true);
466
+ }
467
+ if (self._opts.meta === false) return;
468
+ var metaSchema = require$$13;
469
+ if (self._opts.$data) metaSchema = $dataMetaSchema(metaSchema, META_SUPPORT_DATA);
470
+ self.addMetaSchema(metaSchema, META_SCHEMA_ID, true);
471
+ self._refs['http://json-schema.org/schema'] = META_SCHEMA_ID;
472
+ }
473
+
474
+
475
+ function addInitialSchemas(self) {
476
+ var optsSchemas = self._opts.schemas;
477
+ if (!optsSchemas) return;
478
+ if (Array.isArray(optsSchemas)) self.addSchema(optsSchemas);
479
+ else for (var key in optsSchemas) self.addSchema(optsSchemas[key], key);
480
+ }
481
+
482
+
483
+ function addInitialFormats(self) {
484
+ for (var name in self._opts.formats) {
485
+ var format = self._opts.formats[name];
486
+ self.addFormat(name, format);
487
+ }
488
+ }
489
+
490
+
491
+ function addInitialKeywords(self) {
492
+ for (var name in self._opts.keywords) {
493
+ var keyword = self._opts.keywords[name];
494
+ self.addKeyword(name, keyword);
495
+ }
496
+ }
497
+
498
+
499
+ function checkUnique(self, id) {
500
+ if (self._schemas[id] || self._refs[id])
501
+ throw new Error('schema with key or id "' + id + '" already exists');
502
+ }
503
+
504
+
505
+ function getMetaSchemaOptions(self) {
506
+ var metaOpts = util.copy(self._opts);
507
+ for (var i=0; i<META_IGNORE_OPTIONS.length; i++)
508
+ delete metaOpts[META_IGNORE_OPTIONS[i]];
509
+ return metaOpts;
510
+ }
511
+
512
+
513
+ function setLogger(self) {
514
+ var logger = self._opts.logger;
515
+ if (logger === false) {
516
+ self.logger = {log: noop, warn: noop, error: noop};
517
+ } else {
518
+ if (logger === undefined) logger = console;
519
+ if (!(typeof logger == 'object' && logger.log && logger.warn && logger.error))
520
+ throw new Error('logger must implement log, warn and error methods');
521
+ self.logger = logger;
522
+ }
523
+ }
524
+
525
+
526
+ function noop() {}
527
+ return ajv;
528
+ }
529
+
530
+ export { requireAjv as __require };
531
+ //# sourceMappingURL=ajv.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ajv.js","sources":["../../../../../../node_modules/ajv/lib/ajv.js"],"sourcesContent":["'use strict';\n\nvar compileSchema = require('./compile')\n , resolve = require('./compile/resolve')\n , Cache = require('./cache')\n , SchemaObject = require('./compile/schema_obj')\n , stableStringify = require('fast-json-stable-stringify')\n , formats = require('./compile/formats')\n , rules = require('./compile/rules')\n , $dataMetaSchema = require('./data')\n , util = require('./compile/util');\n\nmodule.exports = Ajv;\n\nAjv.prototype.validate = validate;\nAjv.prototype.compile = compile;\nAjv.prototype.addSchema = addSchema;\nAjv.prototype.addMetaSchema = addMetaSchema;\nAjv.prototype.validateSchema = validateSchema;\nAjv.prototype.getSchema = getSchema;\nAjv.prototype.removeSchema = removeSchema;\nAjv.prototype.addFormat = addFormat;\nAjv.prototype.errorsText = errorsText;\n\nAjv.prototype._addSchema = _addSchema;\nAjv.prototype._compile = _compile;\n\nAjv.prototype.compileAsync = require('./compile/async');\nvar customKeyword = require('./keyword');\nAjv.prototype.addKeyword = customKeyword.add;\nAjv.prototype.getKeyword = customKeyword.get;\nAjv.prototype.removeKeyword = customKeyword.remove;\nAjv.prototype.validateKeyword = customKeyword.validate;\n\nvar errorClasses = require('./compile/error_classes');\nAjv.ValidationError = errorClasses.Validation;\nAjv.MissingRefError = errorClasses.MissingRef;\nAjv.$dataMetaSchema = $dataMetaSchema;\n\nvar META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema';\n\nvar META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes', 'strictDefaults' ];\nvar META_SUPPORT_DATA = ['/properties'];\n\n/**\n * Creates validator instance.\n * Usage: `Ajv(opts)`\n * @param {Object} opts optional options\n * @return {Object} ajv instance\n */\nfunction Ajv(opts) {\n if (!(this instanceof Ajv)) return new Ajv(opts);\n opts = this._opts = util.copy(opts) || {};\n setLogger(this);\n this._schemas = {};\n this._refs = {};\n this._fragments = {};\n this._formats = formats(opts.format);\n\n this._cache = opts.cache || new Cache;\n this._loadingSchemas = {};\n this._compilations = [];\n this.RULES = rules();\n this._getId = chooseGetId(opts);\n\n opts.loopRequired = opts.loopRequired || Infinity;\n if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true;\n if (opts.serialize === undefined) opts.serialize = stableStringify;\n this._metaOpts = getMetaSchemaOptions(this);\n\n if (opts.formats) addInitialFormats(this);\n if (opts.keywords) addInitialKeywords(this);\n addDefaultMetaSchema(this);\n if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta);\n if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}});\n addInitialSchemas(this);\n}\n\n\n\n/**\n * Validate data using schema\n * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize.\n * @this Ajv\n * @param {String|Object} schemaKeyRef key, ref or schema object\n * @param {Any} data to be validated\n * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).\n */\nfunction validate(schemaKeyRef, data) {\n var v;\n if (typeof schemaKeyRef == 'string') {\n v = this.getSchema(schemaKeyRef);\n if (!v) throw new Error('no schema with key or ref \"' + schemaKeyRef + '\"');\n } else {\n var schemaObj = this._addSchema(schemaKeyRef);\n v = schemaObj.validate || this._compile(schemaObj);\n }\n\n var valid = v(data);\n if (v.$async !== true) this.errors = v.errors;\n return valid;\n}\n\n\n/**\n * Create validating function for passed schema.\n * @this Ajv\n * @param {Object} schema schema object\n * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords.\n * @return {Function} validating function\n */\nfunction compile(schema, _meta) {\n var schemaObj = this._addSchema(schema, undefined, _meta);\n return schemaObj.validate || this._compile(schemaObj);\n}\n\n\n/**\n * Adds schema to the instance.\n * @this Ajv\n * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored.\n * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.\n * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead.\n * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.\n * @return {Ajv} this for method chaining\n */\nfunction addSchema(schema, key, _skipValidation, _meta) {\n if (Array.isArray(schema)){\n for (var i=0; i<schema.length; i++) this.addSchema(schema[i], undefined, _skipValidation, _meta);\n return this;\n }\n var id = this._getId(schema);\n if (id !== undefined && typeof id != 'string')\n throw new Error('schema id must be string');\n key = resolve.normalizeId(key || id);\n checkUnique(this, key);\n this._schemas[key] = this._addSchema(schema, _skipValidation, _meta, true);\n return this;\n}\n\n\n/**\n * Add schema that will be used to validate other schemas\n * options in META_IGNORE_OPTIONS are alway set to false\n * @this Ajv\n * @param {Object} schema schema object\n * @param {String} key optional schema key\n * @param {Boolean} skipValidation true to skip schema validation, can be used to override validateSchema option for meta-schema\n * @return {Ajv} this for method chaining\n */\nfunction addMetaSchema(schema, key, skipValidation) {\n this.addSchema(schema, key, skipValidation, true);\n return this;\n}\n\n\n/**\n * Validate schema\n * @this Ajv\n * @param {Object} schema schema to validate\n * @param {Boolean} throwOrLogError pass true to throw (or log) an error if invalid\n * @return {Boolean} true if schema is valid\n */\nfunction validateSchema(schema, throwOrLogError) {\n var $schema = schema.$schema;\n if ($schema !== undefined && typeof $schema != 'string')\n throw new Error('$schema must be a string');\n $schema = $schema || this._opts.defaultMeta || defaultMeta(this);\n if (!$schema) {\n this.logger.warn('meta-schema not available');\n this.errors = null;\n return true;\n }\n var valid = this.validate($schema, schema);\n if (!valid && throwOrLogError) {\n var message = 'schema is invalid: ' + this.errorsText();\n if (this._opts.validateSchema == 'log') this.logger.error(message);\n else throw new Error(message);\n }\n return valid;\n}\n\n\nfunction defaultMeta(self) {\n var meta = self._opts.meta;\n self._opts.defaultMeta = typeof meta == 'object'\n ? self._getId(meta) || meta\n : self.getSchema(META_SCHEMA_ID)\n ? META_SCHEMA_ID\n : undefined;\n return self._opts.defaultMeta;\n}\n\n\n/**\n * Get compiled schema from the instance by `key` or `ref`.\n * @this Ajv\n * @param {String} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id).\n * @return {Function} schema validating function (with property `schema`).\n */\nfunction getSchema(keyRef) {\n var schemaObj = _getSchemaObj(this, keyRef);\n switch (typeof schemaObj) {\n case 'object': return schemaObj.validate || this._compile(schemaObj);\n case 'string': return this.getSchema(schemaObj);\n case 'undefined': return _getSchemaFragment(this, keyRef);\n }\n}\n\n\nfunction _getSchemaFragment(self, ref) {\n var res = resolve.schema.call(self, { schema: {} }, ref);\n if (res) {\n var schema = res.schema\n , root = res.root\n , baseId = res.baseId;\n var v = compileSchema.call(self, schema, root, undefined, baseId);\n self._fragments[ref] = new SchemaObject({\n ref: ref,\n fragment: true,\n schema: schema,\n root: root,\n baseId: baseId,\n validate: v\n });\n return v;\n }\n}\n\n\nfunction _getSchemaObj(self, keyRef) {\n keyRef = resolve.normalizeId(keyRef);\n return self._schemas[keyRef] || self._refs[keyRef] || self._fragments[keyRef];\n}\n\n\n/**\n * Remove cached schema(s).\n * If no parameter is passed all schemas but meta-schemas are removed.\n * If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.\n * Even if schema is referenced by other schemas it still can be removed as other schemas have local references.\n * @this Ajv\n * @param {String|Object|RegExp} schemaKeyRef key, ref, pattern to match key/ref or schema object\n * @return {Ajv} this for method chaining\n */\nfunction removeSchema(schemaKeyRef) {\n if (schemaKeyRef instanceof RegExp) {\n _removeAllSchemas(this, this._schemas, schemaKeyRef);\n _removeAllSchemas(this, this._refs, schemaKeyRef);\n return this;\n }\n switch (typeof schemaKeyRef) {\n case 'undefined':\n _removeAllSchemas(this, this._schemas);\n _removeAllSchemas(this, this._refs);\n this._cache.clear();\n return this;\n case 'string':\n var schemaObj = _getSchemaObj(this, schemaKeyRef);\n if (schemaObj) this._cache.del(schemaObj.cacheKey);\n delete this._schemas[schemaKeyRef];\n delete this._refs[schemaKeyRef];\n return this;\n case 'object':\n var serialize = this._opts.serialize;\n var cacheKey = serialize ? serialize(schemaKeyRef) : schemaKeyRef;\n this._cache.del(cacheKey);\n var id = this._getId(schemaKeyRef);\n if (id) {\n id = resolve.normalizeId(id);\n delete this._schemas[id];\n delete this._refs[id];\n }\n }\n return this;\n}\n\n\nfunction _removeAllSchemas(self, schemas, regex) {\n for (var keyRef in schemas) {\n var schemaObj = schemas[keyRef];\n if (!schemaObj.meta && (!regex || regex.test(keyRef))) {\n self._cache.del(schemaObj.cacheKey);\n delete schemas[keyRef];\n }\n }\n}\n\n\n/* @this Ajv */\nfunction _addSchema(schema, skipValidation, meta, shouldAddSchema) {\n if (typeof schema != 'object' && typeof schema != 'boolean')\n throw new Error('schema should be object or boolean');\n var serialize = this._opts.serialize;\n var cacheKey = serialize ? serialize(schema) : schema;\n var cached = this._cache.get(cacheKey);\n if (cached) return cached;\n\n shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false;\n\n var id = resolve.normalizeId(this._getId(schema));\n if (id && shouldAddSchema) checkUnique(this, id);\n\n var willValidate = this._opts.validateSchema !== false && !skipValidation;\n var recursiveMeta;\n if (willValidate && !(recursiveMeta = id && id == resolve.normalizeId(schema.$schema)))\n this.validateSchema(schema, true);\n\n var localRefs = resolve.ids.call(this, schema);\n\n var schemaObj = new SchemaObject({\n id: id,\n schema: schema,\n localRefs: localRefs,\n cacheKey: cacheKey,\n meta: meta\n });\n\n if (id[0] != '#' && shouldAddSchema) this._refs[id] = schemaObj;\n this._cache.put(cacheKey, schemaObj);\n\n if (willValidate && recursiveMeta) this.validateSchema(schema, true);\n\n return schemaObj;\n}\n\n\n/* @this Ajv */\nfunction _compile(schemaObj, root) {\n if (schemaObj.compiling) {\n schemaObj.validate = callValidate;\n callValidate.schema = schemaObj.schema;\n callValidate.errors = null;\n callValidate.root = root ? root : callValidate;\n if (schemaObj.schema.$async === true)\n callValidate.$async = true;\n return callValidate;\n }\n schemaObj.compiling = true;\n\n var currentOpts;\n if (schemaObj.meta) {\n currentOpts = this._opts;\n this._opts = this._metaOpts;\n }\n\n var v;\n try { v = compileSchema.call(this, schemaObj.schema, root, schemaObj.localRefs); }\n catch(e) {\n delete schemaObj.validate;\n throw e;\n }\n finally {\n schemaObj.compiling = false;\n if (schemaObj.meta) this._opts = currentOpts;\n }\n\n schemaObj.validate = v;\n schemaObj.refs = v.refs;\n schemaObj.refVal = v.refVal;\n schemaObj.root = v.root;\n return v;\n\n\n /* @this {*} - custom context, see passContext option */\n function callValidate() {\n /* jshint validthis: true */\n var _validate = schemaObj.validate;\n var result = _validate.apply(this, arguments);\n callValidate.errors = _validate.errors;\n return result;\n }\n}\n\n\nfunction chooseGetId(opts) {\n switch (opts.schemaId) {\n case 'auto': return _get$IdOrId;\n case 'id': return _getId;\n default: return _get$Id;\n }\n}\n\n/* @this Ajv */\nfunction _getId(schema) {\n if (schema.$id) this.logger.warn('schema $id ignored', schema.$id);\n return schema.id;\n}\n\n/* @this Ajv */\nfunction _get$Id(schema) {\n if (schema.id) this.logger.warn('schema id ignored', schema.id);\n return schema.$id;\n}\n\n\nfunction _get$IdOrId(schema) {\n if (schema.$id && schema.id && schema.$id != schema.id)\n throw new Error('schema $id is different from id');\n return schema.$id || schema.id;\n}\n\n\n/**\n * Convert array of error message objects to string\n * @this Ajv\n * @param {Array<Object>} errors optional array of validation errors, if not passed errors from the instance are used.\n * @param {Object} options optional options with properties `separator` and `dataVar`.\n * @return {String} human readable string with all errors descriptions\n */\nfunction errorsText(errors, options) {\n errors = errors || this.errors;\n if (!errors) return 'No errors';\n options = options || {};\n var separator = options.separator === undefined ? ', ' : options.separator;\n var dataVar = options.dataVar === undefined ? 'data' : options.dataVar;\n\n var text = '';\n for (var i=0; i<errors.length; i++) {\n var e = errors[i];\n if (e) text += dataVar + e.dataPath + ' ' + e.message + separator;\n }\n return text.slice(0, -separator.length);\n}\n\n\n/**\n * Add custom format\n * @this Ajv\n * @param {String} name format name\n * @param {String|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid)\n * @return {Ajv} this for method chaining\n */\nfunction addFormat(name, format) {\n if (typeof format == 'string') format = new RegExp(format);\n this._formats[name] = format;\n return this;\n}\n\n\nfunction addDefaultMetaSchema(self) {\n var $dataSchema;\n if (self._opts.$data) {\n $dataSchema = require('./refs/data.json');\n self.addMetaSchema($dataSchema, $dataSchema.$id, true);\n }\n if (self._opts.meta === false) return;\n var metaSchema = require('./refs/json-schema-draft-07.json');\n if (self._opts.$data) metaSchema = $dataMetaSchema(metaSchema, META_SUPPORT_DATA);\n self.addMetaSchema(metaSchema, META_SCHEMA_ID, true);\n self._refs['http://json-schema.org/schema'] = META_SCHEMA_ID;\n}\n\n\nfunction addInitialSchemas(self) {\n var optsSchemas = self._opts.schemas;\n if (!optsSchemas) return;\n if (Array.isArray(optsSchemas)) self.addSchema(optsSchemas);\n else for (var key in optsSchemas) self.addSchema(optsSchemas[key], key);\n}\n\n\nfunction addInitialFormats(self) {\n for (var name in self._opts.formats) {\n var format = self._opts.formats[name];\n self.addFormat(name, format);\n }\n}\n\n\nfunction addInitialKeywords(self) {\n for (var name in self._opts.keywords) {\n var keyword = self._opts.keywords[name];\n self.addKeyword(name, keyword);\n }\n}\n\n\nfunction checkUnique(self, id) {\n if (self._schemas[id] || self._refs[id])\n throw new Error('schema with key or id \"' + id + '\" already exists');\n}\n\n\nfunction getMetaSchemaOptions(self) {\n var metaOpts = util.copy(self._opts);\n for (var i=0; i<META_IGNORE_OPTIONS.length; i++)\n delete metaOpts[META_IGNORE_OPTIONS[i]];\n return metaOpts;\n}\n\n\nfunction setLogger(self) {\n var logger = self._opts.logger;\n if (logger === false) {\n self.logger = {log: noop, warn: noop, error: noop};\n } else {\n if (logger === undefined) logger = console;\n if (!(typeof logger == 'object' && logger.log && logger.warn && logger.error))\n throw new Error('logger must implement log, warn and error methods');\n self.logger = logger;\n }\n}\n\n\nfunction noop() {}\n"],"names":["require$$0","require$$1","require$$2","require$$3","require$$4","require$$5","require$$6","require$$7","require$$8","require$$9","require$$10","require$$11"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAEA,CAAA,IAAI,aAAa,GAAGA,cAAA;AACpB,KAAI,OAAO,GAAGC,cAAA;AACd,KAAI,KAAK,GAAGC,YAAA;AACZ,KAAI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B,GAAA;AACA,CAAA;;;AAGA,CAAA,SAAS,IAAI,GAAG,CAAA;;;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,37 @@
1
+ import { __module as cache } from '../../../_virtual/cache.js';
2
+
3
+ var hasRequiredCache;
4
+
5
+ function requireCache () {
6
+ if (hasRequiredCache) return cache.exports;
7
+ hasRequiredCache = 1;
8
+
9
+
10
+ var Cache = cache.exports = function Cache() {
11
+ this._cache = {};
12
+ };
13
+
14
+
15
+ Cache.prototype.put = function Cache_put(key, value) {
16
+ this._cache[key] = value;
17
+ };
18
+
19
+
20
+ Cache.prototype.get = function Cache_get(key) {
21
+ return this._cache[key];
22
+ };
23
+
24
+
25
+ Cache.prototype.del = function Cache_del(key) {
26
+ delete this._cache[key];
27
+ };
28
+
29
+
30
+ Cache.prototype.clear = function Cache_clear() {
31
+ this._cache = {};
32
+ };
33
+ return cache.exports;
34
+ }
35
+
36
+ export { requireCache as __require };
37
+ //# sourceMappingURL=cache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache.js","sources":["../../../../../../node_modules/ajv/lib/cache.js"],"sourcesContent":["'use strict';\n\n\nvar Cache = module.exports = function Cache() {\n this._cache = {};\n};\n\n\nCache.prototype.put = function Cache_put(key, value) {\n this._cache[key] = value;\n};\n\n\nCache.prototype.get = function Cache_get(key) {\n return this._cache[key];\n};\n\n\nCache.prototype.del = function Cache_del(key) {\n delete this._cache[key];\n};\n\n\nCache.prototype.clear = function Cache_clear() {\n this._cache = {};\n};\n"],"names":["cacheModule"],"mappings":";;;;;;;;;AAGA,CAAA,IAAI,KAAK,GAAGA,KAAA,CAAA,OAAc,GAAG,SAAS,KAAK,GAAG;AAC9C,GAAE,IAAI,CAAC,MAAM,GAAG,EAAE;CAClB,CAAC;;;CAGD,KAAK,CAAC,SAAS,CAAC,GAAG,GAAG,SAAS,SAAS,CAAC,GAAG,EAAE,KAAK,EAAE;AACrD,GAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK;CAC1B,CAAC;;;CAGD,KAAK,CAAC,SAAS,CAAC,GAAG,GAAG,SAAS,SAAS,CAAC,GAAG,EAAE;AAC9C,GAAE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;CACzB,CAAC;;;CAGD,KAAK,CAAC,SAAS,CAAC,GAAG,GAAG,SAAS,SAAS,CAAC,GAAG,EAAE;AAC9C,GAAE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;CACzB,CAAC;;;AAGD,CAAA,KAAK,CAAC,SAAS,CAAC,KAAK,GAAG,SAAS,WAAW,GAAG;AAC/C,GAAE,IAAI,CAAC,MAAM,GAAG,EAAE;CAClB,CAAC;;;;;;","x_google_ignoreList":[0]}