@prantlf/jsonlint 12.0.0 → 13.0.1

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.
package/web/jsonlint.html CHANGED
@@ -46,6 +46,12 @@
46
46
  flex-basis: calc(50% - 1ex);
47
47
  min-width: calc(42ex - 3ex);
48
48
  }
49
+ #environment {
50
+ display: none;
51
+ }
52
+ .with-schema #environment {
53
+ display: inline-block;
54
+ }
49
55
  #options > * {
50
56
  display: flex;
51
57
  flex-wrap: wrap;
@@ -83,14 +89,14 @@
83
89
  </header>
84
90
  <main>
85
91
  <section>
86
- <form aria-label="Source">
92
+ <form aria-label="Source" id="form">
87
93
  <div id="source">
88
94
  <div id="data-section">
89
95
  <label for="data">Data:</label>
90
96
  <textarea id="data" rows="10" cols="40"></textarea>
91
97
  </div>
92
98
  <div id="schema-section">
93
- <label for="schema">Schema (only drafts 04, 06 or 07):</label>
99
+ <label for="schema">Schema:</label>
94
100
  <textarea id="schema" rows="10" cols="40"></textarea>
95
101
  </div>
96
102
  </div>
@@ -167,6 +173,16 @@
167
173
  <input type="checkbox" id="with-schema">
168
174
  <label for="with-schema">Use JSON Schema</label>
169
175
  </div>
176
+ <div>
177
+ <select id="environment" aria-label="JSON Schema Environment">
178
+ <option value="draft-04">JSON Schema draft 04</option>
179
+ <option value="draft-06">JSON Schema draft 06</option>
180
+ <option value="draft-07" selected>JSON Schema draft 07</option>
181
+ <option value="draft-2019-09">JSON Schema draft 2019-09</option>
182
+ <option value="draft-2020-12">JSON Schema draft 2020-12</option>
183
+ <option value="jtd">JSON Type Definition</option>
184
+ </select>
185
+ </div>
170
186
  </div>
171
187
  </div>
172
188
  <button id="validate" type="button">Validate</button>
@@ -187,7 +203,6 @@
187
203
  <script src="sorter.min.js" defer></script>
188
204
  <script src="printer.min.js" defer></script>
189
205
  <script src="ajv.min.js" defer></script>
190
- <script src="schema-drafts.min.js" defer></script>
191
206
  <script src="validator.min.js" defer></script>
192
207
  <script defer>
193
208
  window.onload = function () {
@@ -218,7 +233,7 @@
218
233
  function toggleSchemaValidation () {
219
234
  var className = document.getElementById('with-schema').checked
220
235
  ? 'with-schema' : ''
221
- document.getElementById('source').className = className
236
+ document.getElementById('form').className = className
222
237
  }
223
238
 
224
239
  function selectParsingExtension () {
@@ -286,7 +301,10 @@
286
301
  function parseInput (source, parserOptions) {
287
302
  if (document.getElementById('with-schema').checked) {
288
303
  var schema = document.getElementById('schema').value
289
- var validate = jsonlintValidator.compile(schema, parserOptions)
304
+ var validate = jsonlintValidator.compile(schema, {
305
+ environment: document.getElementById('environment').value,
306
+ ...parserOptions
307
+ })
290
308
  return validate(source, parserOptions)
291
309
  }
292
310
  return jsonlint.parse(source, parserOptions)
@@ -1,4 +1,4 @@
1
- (function(f,d){if(typeof exports=="object"&&typeof module<"u"){let u=function(h){return require("ajv/lib/refs/"+h+".json")};var g=u;const i=require("./jsonlint"),l=require("ajv");d(exports,l,i,u)}else if(typeof define=="function"&&define.amd)define("jsonlint-validator",["exports","ajv","jsonlint","jsonlint-schema-drafts"],function(i,l,u,h){function S(w){return h[w]}d(i,u,l,S)});else{f=f||self;const i=function(l){return f.jsonlintSchemaDrafts[l]};d(f.jsonlintValidator={},f.Ajv,f.jsonlint,i)}})(this,function(f,d,g,i){"use strict";function l(t,n,e,r){const a=e.find(function(o){return r===g.pathToPointer(o.path)});if(a){const o=a.location.start,s=o.offset,c=o.line,m=o.column,j=g.getErrorTexts(t.reason,n,s,c,m);return t.message=j.message,t.excerpt=j.excerpt,j.pointer&&(t.pointer=j.pointer,t.location={start:{column:m,line:c,offset:s}}),!0}}function u(t,n,e){const r=t.dataPath,a=t.schemaPath,o=(r||"/")+" "+t.message+"; see "+a,s={reason:o,dataPath:r,schemaPath:a};return l(s,n,e,r)||(s.message=o),s}function h(t,n,e,r){e||(e=JSON.stringify(n,void 0,2)),r||(r={}),Object.assign(r,{tokenLocations:!0,tokenPaths:!0});const a=g.tokenize(e,r),o=u(t[0],e,a),s=new SyntaxError(o.message);return Object.assign(s,o),s}function S(t){const n={jsonPointers:!0};let e;if(!t)n.schemaId="auto",e=new d(n),e.addMetaSchema(i("json-schema-draft-04")),e.addMetaSchema(i("json-schema-draft-06"));else if(t==="json-schema-draft-07")e=new d(n);else if(t==="json-schema-draft-06")e=new d(n),e.addMetaSchema(i("json-schema-draft-06"));else if(t==="json-schema-draft-04")n.schemaId="id",e=new d(n),e.addMetaSchema(i("json-schema-draft-04"));else throw new RangeError('Unsupported environment for the JSON schema validation: "'+t+'".');return e}function w(t,n,e){let r;try{r=g.parse(n,e)}catch(a){throw a.message=`Parsing the JSON schema failed.
2
- `+a.message,a}try{return t.compile(r)}catch(a){const o=t.errors,s=o?h(o,r,n,e):a;throw s.message=`Compiling the JSON schema failed.
3
- `+s.message,s}}function p(t,n){let e={};typeof n=="object"&&!(n instanceof String)&&(e=n,n=e.environment);const r=S(n),a={mode:e.mode,ignoreBOM:e.ignoreBOM,ignoreComments:e.ignoreComments,ignoreTrailingCommas:e.ignoreTrailingCommas,allowSingleQuotedStrings:e.allowSingleQuotedStrings,allowDuplicateObjectKeys:e.allowDuplicateObjectKeys},o=w(r,t,a);return function(s,c,m){if(typeof s=="string"||s instanceof String?(m=c,c=s,s=g.parse(c,m)):typeof c=="string"||c instanceof String||(m=c,c=void 0),o(s))return s;throw h(o.errors,s,c,m)}}f.compile=p,Object.defineProperty(f,"__esModule",{value:!0})});
1
+ (function(j,f){if(typeof exports=="object"&&typeof module<"u"){const c=require("./jsonlint"),l={Ajv04:"ajv-draft-04",Ajv07:"ajv",AjvJTD:"ajv/dist/jtd",Ajv2019:"ajv/dist/2019",Ajv2020:"ajv/dist/2020",Schema06:"ajv/dist/refs/json-schema-draft-06.json"},d=g=>{const h=require(l[g]);return!h.$schema&&h.default||h};f(exports,c,d)}else if(typeof define=="function"&&define.amd)define("jsonlint-validator",["exports","jsonlint","ajv"],function(c,l,d){f(c,l,h=>{const m=d[h];return!m.$schema&&m.default||m})});else{j=j||self;const c=l=>{const d=j.ajv[l];return!d.$schema&&d.default||d};f(j.jsonlintValidator={},j.jsonlint,c)}})(this,function(j,f,c){"use strict";function l(e,s,t,a){const n=t.find(function(r){return a===f.pathToPointer(r.path)});if(n){const r=n.location.start,o=r.offset,i=r.line,u=r.column,S=f.getErrorTexts(e.reason,s,o,i,u);return e.message=S.message,e.excerpt=S.excerpt,S.pointer&&(e.pointer=S.pointer,e.location={start:{column:u,line:i,offset:o}}),!0}}function d(e,s,t){const a=e.dataPath,n=e.schemaPath,r=(a||"/")+" "+e.message+"; see "+n,o={reason:r,dataPath:a,schemaPath:n};return l(o,s,t,a)||(o.message=r),o}function g(e,s,t,a){t||(t=JSON.stringify(s,void 0,2)),a||(a={}),Object.assign(a,{tokenLocations:!0,tokenPaths:!0});const n=f.tokenize(t,a),r=d(e[0],t,n),o=new SyntaxError(r.message);return Object.assign(o,r),o}function h(e){let s;if(!e||e==="json-schema-draft-06"||e==="draft-06"){const t=c("Ajv07");s=new t,s.addMetaSchema(c("Schema06"))}else if(e==="json-schema-draft-07"||e==="draft-07"){const t=c("Ajv07");s=new t}else if(e==="json-schema-draft-04"||e==="draft-04"){const t=c("Ajv04");s=new t}else if(e==="json-schema-draft-2019-09"||e==="draft-2019-09"){const t=c("Ajv2019");s=new t}else if(e==="json-schema-draft-2020-12"||e==="draft-2020-12"){const t=c("Ajv2020");s=new t}else if(e==="json-type-definition"||e==="jtd"||e==="rfc8927"){const t=c("AjvJTD");s=new t}else throw new RangeError('Unsupported environment for the JSON Schema validation: "'+e+'".');return s}function m(e,s,t){let a;try{a=f.parse(s,t)}catch(n){throw n.message=`Parsing the JSON Schema failed.
2
+ `+n.message,n}try{return e.compile(a)}catch(n){const r=e.errors,o=r?g(r,a,s,t):n;throw o.message=`Compiling the JSON Schema failed.
3
+ `+o.message,o}}function w(e,s){let t={};typeof s=="object"&&!(s instanceof String)&&(t=s,s=t.environment);const a=h(s),n={mode:t.mode,ignoreBOM:t.ignoreBOM,ignoreComments:t.ignoreComments,ignoreTrailingCommas:t.ignoreTrailingCommas,allowSingleQuotedStrings:t.allowSingleQuotedStrings,allowDuplicateObjectKeys:t.allowDuplicateObjectKeys},r=m(a,e,n);return function(o,i,u){if(typeof o=="string"||o instanceof String?(u=i,i=o,o=f.parse(i,u)):typeof i=="string"||i instanceof String||(u=i,i=void 0),r(o))return o;throw g(r.errors,o,i,u)}}j.compile=w,Object.defineProperty(j,"__esModule",{value:!0})});
4
4
  //# sourceMappingURL=validator.min.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../lib/validator.js"],
4
- "sourcesContent": ["(function (global, factory) {\n if (typeof exports === 'object' && typeof module !== 'undefined') {\n const jsonlint = require('./jsonlint')\n const Ajv = require('ajv')\n // eslint-disable-next-line no-inner-declarations\n function requireSchemaDraft (environment) {\n return require('ajv/lib/refs/' + environment + '.json')\n }\n factory(exports, Ajv, jsonlint, requireSchemaDraft)\n // eslint-disable-next-line no-undef\n } else if (typeof define === 'function' && define.amd) {\n // eslint-disable-next-line no-undef\n define('jsonlint-validator', ['exports', 'ajv', 'jsonlint', 'jsonlint-schema-drafts'],\n function (exports, jsonlint, Ajv, schemaDrafts) {\n function requireSchemaDraft (environment) {\n return schemaDrafts[environment]\n }\n factory(exports, Ajv, jsonlint, requireSchemaDraft)\n })\n } else {\n // eslint-disable-next-line no-undef\n global = global || self\n const requireSchemaDraft = function (environment) {\n return global.jsonlintSchemaDrafts[environment]\n }\n factory(global.jsonlintValidator = {}, global.Ajv, global.jsonlint, requireSchemaDraft)\n }\n}(this, function (exports, Ajv, jsonlint, requireSchemaDraft) {\n 'use strict'\n\n function addErrorLocation (problem, input, tokens, dataPath) {\n const token = tokens.find(function (token) {\n return dataPath === jsonlint.pathToPointer(token.path)\n })\n if (token) {\n const location = token.location.start\n const offset = location.offset\n const line = location.line\n const column = location.column\n const texts = jsonlint.getErrorTexts(problem.reason, input, offset, line, column)\n problem.message = texts.message\n problem.excerpt = texts.excerpt\n if (texts.pointer) {\n problem.pointer = texts.pointer\n problem.location = {\n start: {\n column,\n line,\n offset\n }\n }\n }\n return true\n }\n }\n\n function errorToProblem (error, input, tokens) {\n const dataPath = error.dataPath\n const schemaPath = error.schemaPath\n const reason = (dataPath || '/') + ' ' + error.message + '; see ' + schemaPath\n const problem = {\n reason,\n dataPath,\n schemaPath\n }\n if (!addErrorLocation(problem, input, tokens, dataPath)) {\n problem.message = reason\n }\n return problem\n }\n\n function createError (errors, data, input, options) {\n if (!input) {\n input = JSON.stringify(data, undefined, 2)\n }\n if (!options) {\n options = {}\n }\n Object.assign(options, {\n tokenLocations: true,\n tokenPaths: true\n })\n const tokens = jsonlint.tokenize(input, options)\n // var problems = errors.map(function (error) {\n // return errorToProblem(error, input, tokens)\n // })\n // var message = problems\n // .map(function (problem) {\n // return problem.message\n // })\n // .join('\\n')\n const problem = errorToProblem(errors[0], input, tokens)\n const error = new SyntaxError(problem.message)\n Object.assign(error, problem)\n return error\n }\n\n function createAjv (environment) {\n const ajvOptions = { jsonPointers: true }\n let ajv\n if (!environment) {\n ajvOptions.schemaId = 'auto'\n ajv = new Ajv(ajvOptions)\n ajv.addMetaSchema(requireSchemaDraft('json-schema-draft-04'))\n ajv.addMetaSchema(requireSchemaDraft('json-schema-draft-06'))\n } else if (environment === 'json-schema-draft-07') {\n ajv = new Ajv(ajvOptions)\n } else if (environment === 'json-schema-draft-06') {\n ajv = new Ajv(ajvOptions)\n ajv.addMetaSchema(requireSchemaDraft('json-schema-draft-06'))\n } else if (environment === 'json-schema-draft-04') {\n ajvOptions.schemaId = 'id'\n ajv = new Ajv(ajvOptions)\n ajv.addMetaSchema(requireSchemaDraft('json-schema-draft-04'))\n } else {\n throw new RangeError('Unsupported environment for the JSON schema validation: \"' +\n environment + '\".')\n }\n return ajv\n }\n\n function compileSchema (ajv, schema, parseOptions) {\n let parsed\n try {\n parsed = jsonlint.parse(schema, parseOptions)\n } catch (error) {\n error.message = 'Parsing the JSON schema failed.\\n' + error.message\n throw error\n }\n try {\n return ajv.compile(parsed)\n } catch (originalError) {\n const errors = ajv.errors\n const betterError = errors\n ? createError(errors, parsed, schema, parseOptions)\n : originalError\n betterError.message = 'Compiling the JSON schema failed.\\n' + betterError.message\n throw betterError\n }\n }\n\n function compile (schema, environment) {\n let options = {}\n if (typeof environment === 'object' && !(environment instanceof String)) {\n options = environment\n environment = options.environment\n }\n const ajv = createAjv(environment)\n const parseOptions = {\n mode: options.mode,\n ignoreBOM: options.ignoreBOM,\n ignoreComments: options.ignoreComments,\n ignoreTrailingCommas: options.ignoreTrailingCommas,\n allowSingleQuotedStrings: options.allowSingleQuotedStrings,\n allowDuplicateObjectKeys: options.allowDuplicateObjectKeys\n }\n const validate = compileSchema(ajv, schema, parseOptions)\n return function (data, input, options) {\n if (typeof data === 'string' || data instanceof String) {\n options = input\n input = data\n data = jsonlint.parse(input, options)\n } else if (!(typeof input === 'string' || input instanceof String)) {\n options = input\n input = undefined\n }\n if (validate(data)) {\n return data\n }\n throw createError(validate.errors, data, input, options)\n }\n }\n\n exports.compile = compile\n\n Object.defineProperty(exports, '__esModule', { value: true })\n}))\n"],
5
- "mappings": "CAAC,SAAUA,EAAQC,EAAS,CAC1B,GAAI,OAAO,SAAY,UAAY,OAAO,OAAW,IAAa,CAIhE,IAASC,EAAT,SAA6BC,EAAa,CACxC,OAAO,QAAQ,gBAAkBA,EAAc,OAAO,CACxD,EAFS,IAAAD,IAHT,MAAME,EAAW,QAAQ,YAAY,EAC/BC,EAAM,QAAQ,KAAK,EAKzBJ,EAAQ,QAASI,EAAKD,EAAUF,CAAkB,UAEzC,OAAO,QAAW,YAAc,OAAO,IAEhD,OAAO,qBAAsB,CAAC,UAAW,MAAO,WAAY,wBAAwB,EAClF,SAAUI,EAASF,EAAUC,EAAKE,EAAc,CAC9C,SAASL,EAAoBC,EAAa,CACxC,OAAOI,EAAaJ,CAAW,CACjC,CACAF,EAAQK,EAASD,EAAKD,EAAUF,CAAkB,CACpD,CAAC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B,UAAY,EAAEA,aAAuB,UAC9DuB,EAAUvB,EACVA,EAAcuB,EAAQ,aAExB,MAAMG,EAAMF,EAAUxB,CAAW,EAC3B6B,EAAe,CACnB,KAAMN,EAAQ,KACd,UAAWA,EAAQ,UACnB,eAAgBA,EAAQ,eACxB,qBAAsBA,EAAQ,qBAC9B,yBAA0BA,EAAQ,yBAClC,yBAA0BA,EAAQ,wBACpC,EACMW,EAAWP,EAAcD,EAAKE,EAAQC,CAAY,EACxD,OAAO,SAAUP,EAAMf,EAAOgB,EAAS,CASrC,GARI,OAAOD,GAAS,UAAYA,aAAgB,QAC9CC,EAAUhB,EACVA,EAAQe,EACRA,EAAOrB,EAAS,MAAMM,EAAOgB,CAAO,GACzB,OAAOhB,GAAU,UAAYA,aAAiB,SACzDgB,EAAUhB,EACVA,EAAQ,QAEN2B,EAASZ,CAAI,EACf,OAAOA,EAET,MAAMF,EAAYc,EAAS,OAAQZ,EAAMf,EAAOgB,CAAO,CACzD,CACF,CAEApB,EAAQ,QAAU8B,EAElB,OAAO,eAAe9B,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,CAC9D,CAAC",
6
- "names": ["global", "factory", "requireSchemaDraft", "environment", "jsonlint", "Ajv", "exports", "schemaDrafts", "addErrorLocation", "problem", "input", "tokens", "dataPath", "token", "location", "offset", "line", "column", "texts", "errorToProblem", "error", "schemaPath", "reason", "createError", "errors", "data", "options", "createAjv", "ajvOptions", "ajv", "compileSchema", "schema", "parseOptions", "parsed", "originalError", "betterError", "compile", "validate"]
4
+ "sourcesContent": ["(function (global, factory) {\n if (typeof exports === 'object' && typeof module !== 'undefined') {\n const jsonlint = require('./jsonlint')\n const ajv = {\n Ajv04: 'ajv-draft-04',\n Ajv07: 'ajv',\n AjvJTD: 'ajv/dist/jtd',\n Ajv2019: 'ajv/dist/2019',\n Ajv2020: 'ajv/dist/2020',\n Schema06: 'ajv/dist/refs/json-schema-draft-06.json'\n }\n const requireAjv = name => {\n const exported = require(ajv[name])\n return !exported.$schema && exported.default || exported\n }\n factory(exports, jsonlint, requireAjv)\n } else if (typeof define === 'function' && define.amd) {\n define('jsonlint-validator', ['exports', 'jsonlint', 'ajv'],\n function (exports, jsonlint, ajv) {\n const requireAjv = name => {\n const exported = ajv[name]\n return !exported.$schema && exported.default || exported\n }\n factory(exports, jsonlint, requireAjv)\n })\n } else {\n global = global || self\n const requireAjv = name => {\n const exported = global.ajv[name]\n return !exported.$schema && exported.default || exported\n }\n factory(global.jsonlintValidator = {}, global.jsonlint, requireAjv)\n }\n}(this, function (exports, jsonlint, requireAjv) {\n 'use strict'\n\n function addErrorLocation (problem, input, tokens, dataPath) {\n const token = tokens.find(function (token) {\n return dataPath === jsonlint.pathToPointer(token.path)\n })\n if (token) {\n const location = token.location.start\n const offset = location.offset\n const line = location.line\n const column = location.column\n const texts = jsonlint.getErrorTexts(problem.reason, input, offset, line, column)\n problem.message = texts.message\n problem.excerpt = texts.excerpt\n if (texts.pointer) {\n problem.pointer = texts.pointer\n problem.location = {\n start: {\n column,\n line,\n offset\n }\n }\n }\n return true\n }\n }\n\n function errorToProblem (error, input, tokens) {\n const dataPath = error.dataPath\n const schemaPath = error.schemaPath\n const reason = (dataPath || '/') + ' ' + error.message + '; see ' + schemaPath\n const problem = {\n reason,\n dataPath,\n schemaPath\n }\n if (!addErrorLocation(problem, input, tokens, dataPath)) {\n problem.message = reason\n }\n return problem\n }\n\n function createError (errors, data, input, options) {\n if (!input) {\n input = JSON.stringify(data, undefined, 2)\n }\n if (!options) {\n options = {}\n }\n Object.assign(options, {\n tokenLocations: true,\n tokenPaths: true\n })\n const tokens = jsonlint.tokenize(input, options)\n // var problems = errors.map(function (error) {\n // return errorToProblem(error, input, tokens)\n // })\n // var message = problems\n // .map(function (problem) {\n // return problem.message\n // })\n // .join('\\n')\n const problem = errorToProblem(errors[0], input, tokens)\n const error = new SyntaxError(problem.message)\n Object.assign(error, problem)\n return error\n }\n\n function createAjv (environment) {\n let ajv\n if (!environment || environment === 'json-schema-draft-06' || environment === 'draft-06') {\n const Ajv = requireAjv('Ajv07')\n ajv = new Ajv()\n ajv.addMetaSchema(requireAjv('Schema06'))\n } else if (environment === 'json-schema-draft-07' || environment === 'draft-07') {\n const Ajv = requireAjv('Ajv07')\n ajv = new Ajv()\n } else if (environment === 'json-schema-draft-04' || environment === 'draft-04') {\n const Ajv = requireAjv('Ajv04')\n ajv = new Ajv()\n } else if (environment === 'json-schema-draft-2019-09' || environment === 'draft-2019-09') {\n const Ajv = requireAjv('Ajv2019')\n ajv = new Ajv()\n } else if (environment === 'json-schema-draft-2020-12' || environment === 'draft-2020-12') {\n const Ajv = requireAjv('Ajv2020')\n ajv = new Ajv()\n } else if (environment === 'json-type-definition' || environment === 'jtd' || environment === 'rfc8927') {\n const Ajv = requireAjv('AjvJTD')\n ajv = new Ajv()\n } else {\n throw new RangeError('Unsupported environment for the JSON Schema validation: \"' +\n environment + '\".')\n }\n return ajv\n }\n\n function compileSchema (ajv, schema, parseOptions) {\n let parsed\n try {\n parsed = jsonlint.parse(schema, parseOptions)\n } catch (error) {\n error.message = 'Parsing the JSON Schema failed.\\n' + error.message\n throw error\n }\n try {\n return ajv.compile(parsed)\n } catch (originalError) {\n const errors = ajv.errors\n const betterError = errors\n ? createError(errors, parsed, schema, parseOptions)\n : originalError\n betterError.message = 'Compiling the JSON Schema failed.\\n' + betterError.message\n throw betterError\n }\n }\n\n function compile (schema, environment) {\n let options = {}\n if (typeof environment === 'object' && !(environment instanceof String)) {\n options = environment\n environment = options.environment\n }\n const ajv = createAjv(environment)\n const parseOptions = {\n mode: options.mode,\n ignoreBOM: options.ignoreBOM,\n ignoreComments: options.ignoreComments,\n ignoreTrailingCommas: options.ignoreTrailingCommas,\n allowSingleQuotedStrings: options.allowSingleQuotedStrings,\n allowDuplicateObjectKeys: options.allowDuplicateObjectKeys\n }\n const validate = compileSchema(ajv, schema, parseOptions)\n return function (data, input, options) {\n if (typeof data === 'string' || data instanceof String) {\n options = input\n input = data\n data = jsonlint.parse(input, options)\n } else if (!(typeof input === 'string' || input instanceof String)) {\n options = input\n input = undefined\n }\n if (validate(data)) {\n return data\n }\n throw createError(validate.errors, data, input, options)\n }\n }\n\n exports.compile = compile\n\n Object.defineProperty(exports, '__esModule', { value: true })\n}))\n"],
5
+ "mappings": "CAAC,SAAUA,EAAQC,EAAS,CAC1B,GAAI,OAAO,SAAY,UAAY,OAAO,OAAW,IAAa,CAChE,MAAMC,EAAW,QAAQ,YAAY,EAC/BC,EAAM,CACV,MAAO,eACP,MAAO,MACP,OAAQ,eACR,QAAS,gBACT,QAAS,gBACT,SAAU,yCACZ,EACMC,EAAaC,GAAQ,CACzB,MAAMC,EAAW,QAAQH,EAAIE,CAAI,CAAC,EAClC,MAAO,CAACC,EAAS,SAAWA,EAAS,SAAWA,CAClD,EACAL,EAAQ,QAASC,EAAUE,CAAU,UAC5B,OAAO,QAAW,YAAc,OAAO,IAChD,OAAO,qBAAsB,CAAC,UAAW,WAAY,KAAK,EACxD,SAAUG,EAASL,EAAUC,EAAK,CAKhCF,EAAQM,EAASL,EAJEG,GAAQ,CACzB,MAAMC,EAAWH,EAAIE,CAAI,EACzB,MAAO,CAACC,EAAS,SAAWA,EAAS,SAAWA,CAClD,CACqC,CACvC,CAAC,MACE,CACLN,EAASA,GAAU,KACnB,MAAMI,EAAaC,GAAQ,CACzB,MAAMC,EAAWN,EAAO,IAAIK,CAAI,EAChC,MAAO,CAACC,EAAS,SAAWA,EAAS,SAAWA,CAClD,EACAL,EAAQD,EAAO,kBAAoB,CAAC,EAAGA,EAAO,SAAUI,CAAU,EAEtE,GAAE,KAAM,SAAUG,EAASL,EAAUE,EAAY,CAC/C,aAEA,SAASI,EAAkBC,EAASC,EAAOC,EAAQC,EAAU,CAC3D,MAAMC,EAAQF,EAAO,KAAK,SAAUE,EAAO,CACzC,OAAOD,IAAaV,EAAS,cAAcW,EAAM,IAAI,CACvD,CAAC,EACD,GAAIA,EAAO,CACT,MAAMC,EAAWD,EAAM,SAAS,M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AAWP,EAAc3B,EAAK4B,EAAQC,CAAY,EACxD,OAAO,SAAUP,EAAMf,EAAOgB,EAAS,CASrC,GARI,OAAOD,GAAS,UAAYA,aAAgB,QAC9CC,EAAUhB,EACVA,EAAQe,EACRA,EAAOvB,EAAS,MAAMQ,EAAOgB,CAAO,GACzB,OAAOhB,GAAU,UAAYA,aAAiB,SACzDgB,EAAUhB,EACVA,EAAQ,QAEN2B,EAASZ,CAAI,EACf,OAAOA,EAET,MAAMF,EAAYc,EAAS,OAAQZ,EAAMf,EAAOgB,CAAO,CACzD,CACF,CAEAnB,EAAQ,QAAU6B,EAElB,OAAO,eAAe7B,EAAS,aAAc,CAAE,MAAO,EAAK,CAAC,CAC9D,CAAC",
6
+ "names": ["global", "factory", "jsonlint", "ajv", "requireAjv", "name", "exported", "exports", "addErrorLocation", "problem", "input", "tokens", "dataPath", "token", "location", "offset", "line", "column", "texts", "errorToProblem", "error", "schemaPath", "reason", "createError", "errors", "data", "options", "createAjv", "environment", "Ajv", "compileSchema", "schema", "parseOptions", "parsed", "originalError", "betterError", "compile", "validate"]
7
7
  }
@@ -1,482 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports)
3
- : typeof define === 'function' && define.amd ? define('jsonlintSchemaDrafts', ['exports'], factory)
4
- : (global = global || self, factory(global.jsonlintSchemaDrafts = {}));
5
- }(this, function (exports) { 'use strict';
6
-
7
- exports["json-schema-draft-04"] = {
8
- "id": "http://json-schema.org/draft-04/schema#",
9
- "$schema": "http://json-schema.org/draft-04/schema#",
10
- "description": "Core schema meta-schema",
11
- "definitions": {
12
- "schemaArray": {
13
- "type": "array",
14
- "minItems": 1,
15
- "items": { "$ref": "#" }
16
- },
17
- "positiveInteger": {
18
- "type": "integer",
19
- "minimum": 0
20
- },
21
- "positiveIntegerDefault0": {
22
- "allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ]
23
- },
24
- "simpleTypes": {
25
- "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ]
26
- },
27
- "stringArray": {
28
- "type": "array",
29
- "items": { "type": "string" },
30
- "minItems": 1,
31
- "uniqueItems": true
32
- }
33
- },
34
- "type": "object",
35
- "properties": {
36
- "id": {
37
- "type": "string"
38
- },
39
- "$schema": {
40
- "type": "string"
41
- },
42
- "title": {
43
- "type": "string"
44
- },
45
- "description": {
46
- "type": "string"
47
- },
48
- "default": {},
49
- "multipleOf": {
50
- "type": "number",
51
- "minimum": 0,
52
- "exclusiveMinimum": true
53
- },
54
- "maximum": {
55
- "type": "number"
56
- },
57
- "exclusiveMaximum": {
58
- "type": "boolean",
59
- "default": false
60
- },
61
- "minimum": {
62
- "type": "number"
63
- },
64
- "exclusiveMinimum": {
65
- "type": "boolean",
66
- "default": false
67
- },
68
- "maxLength": { "$ref": "#/definitions/positiveInteger" },
69
- "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" },
70
- "pattern": {
71
- "type": "string",
72
- "format": "regex"
73
- },
74
- "additionalItems": {
75
- "anyOf": [
76
- { "type": "boolean" },
77
- { "$ref": "#" }
78
- ],
79
- "default": {}
80
- },
81
- "items": {
82
- "anyOf": [
83
- { "$ref": "#" },
84
- { "$ref": "#/definitions/schemaArray" }
85
- ],
86
- "default": {}
87
- },
88
- "maxItems": { "$ref": "#/definitions/positiveInteger" },
89
- "minItems": { "$ref": "#/definitions/positiveIntegerDefault0" },
90
- "uniqueItems": {
91
- "type": "boolean",
92
- "default": false
93
- },
94
- "maxProperties": { "$ref": "#/definitions/positiveInteger" },
95
- "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" },
96
- "required": { "$ref": "#/definitions/stringArray" },
97
- "additionalProperties": {
98
- "anyOf": [
99
- { "type": "boolean" },
100
- { "$ref": "#" }
101
- ],
102
- "default": {}
103
- },
104
- "definitions": {
105
- "type": "object",
106
- "additionalProperties": { "$ref": "#" },
107
- "default": {}
108
- },
109
- "properties": {
110
- "type": "object",
111
- "additionalProperties": { "$ref": "#" },
112
- "default": {}
113
- },
114
- "patternProperties": {
115
- "type": "object",
116
- "additionalProperties": { "$ref": "#" },
117
- "default": {}
118
- },
119
- "dependencies": {
120
- "type": "object",
121
- "additionalProperties": {
122
- "anyOf": [
123
- { "$ref": "#" },
124
- { "$ref": "#/definitions/stringArray" }
125
- ]
126
- }
127
- },
128
- "enum": {
129
- "type": "array",
130
- "minItems": 1,
131
- "uniqueItems": true
132
- },
133
- "type": {
134
- "anyOf": [
135
- { "$ref": "#/definitions/simpleTypes" },
136
- {
137
- "type": "array",
138
- "items": { "$ref": "#/definitions/simpleTypes" },
139
- "minItems": 1,
140
- "uniqueItems": true
141
- }
142
- ]
143
- },
144
- "format": { "type": "string" },
145
- "allOf": { "$ref": "#/definitions/schemaArray" },
146
- "anyOf": { "$ref": "#/definitions/schemaArray" },
147
- "oneOf": { "$ref": "#/definitions/schemaArray" },
148
- "not": { "$ref": "#" }
149
- },
150
- "dependencies": {
151
- "exclusiveMaximum": [ "maximum" ],
152
- "exclusiveMinimum": [ "minimum" ]
153
- },
154
- "default": {}
155
- }
156
-
157
- exports["json-schema-draft-06"] = {
158
- "$schema": "http://json-schema.org/draft-06/schema#",
159
- "$id": "http://json-schema.org/draft-06/schema#",
160
- "title": "Core schema meta-schema",
161
- "definitions": {
162
- "schemaArray": {
163
- "type": "array",
164
- "minItems": 1,
165
- "items": { "$ref": "#" }
166
- },
167
- "nonNegativeInteger": {
168
- "type": "integer",
169
- "minimum": 0
170
- },
171
- "nonNegativeIntegerDefault0": {
172
- "allOf": [
173
- { "$ref": "#/definitions/nonNegativeInteger" },
174
- { "default": 0 }
175
- ]
176
- },
177
- "simpleTypes": {
178
- "enum": [
179
- "array",
180
- "boolean",
181
- "integer",
182
- "null",
183
- "number",
184
- "object",
185
- "string"
186
- ]
187
- },
188
- "stringArray": {
189
- "type": "array",
190
- "items": { "type": "string" },
191
- "uniqueItems": true,
192
- "default": []
193
- }
194
- },
195
- "type": ["object", "boolean"],
196
- "properties": {
197
- "$id": {
198
- "type": "string",
199
- "format": "uri-reference"
200
- },
201
- "$schema": {
202
- "type": "string",
203
- "format": "uri"
204
- },
205
- "$ref": {
206
- "type": "string",
207
- "format": "uri-reference"
208
- },
209
- "title": {
210
- "type": "string"
211
- },
212
- "description": {
213
- "type": "string"
214
- },
215
- "default": {},
216
- "examples": {
217
- "type": "array",
218
- "items": {}
219
- },
220
- "multipleOf": {
221
- "type": "number",
222
- "exclusiveMinimum": 0
223
- },
224
- "maximum": {
225
- "type": "number"
226
- },
227
- "exclusiveMaximum": {
228
- "type": "number"
229
- },
230
- "minimum": {
231
- "type": "number"
232
- },
233
- "exclusiveMinimum": {
234
- "type": "number"
235
- },
236
- "maxLength": { "$ref": "#/definitions/nonNegativeInteger" },
237
- "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
238
- "pattern": {
239
- "type": "string",
240
- "format": "regex"
241
- },
242
- "additionalItems": { "$ref": "#" },
243
- "items": {
244
- "anyOf": [
245
- { "$ref": "#" },
246
- { "$ref": "#/definitions/schemaArray" }
247
- ],
248
- "default": {}
249
- },
250
- "maxItems": { "$ref": "#/definitions/nonNegativeInteger" },
251
- "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
252
- "uniqueItems": {
253
- "type": "boolean",
254
- "default": false
255
- },
256
- "contains": { "$ref": "#" },
257
- "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" },
258
- "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
259
- "required": { "$ref": "#/definitions/stringArray" },
260
- "additionalProperties": { "$ref": "#" },
261
- "definitions": {
262
- "type": "object",
263
- "additionalProperties": { "$ref": "#" },
264
- "default": {}
265
- },
266
- "properties": {
267
- "type": "object",
268
- "additionalProperties": { "$ref": "#" },
269
- "default": {}
270
- },
271
- "patternProperties": {
272
- "type": "object",
273
- "additionalProperties": { "$ref": "#" },
274
- "default": {}
275
- },
276
- "dependencies": {
277
- "type": "object",
278
- "additionalProperties": {
279
- "anyOf": [
280
- { "$ref": "#" },
281
- { "$ref": "#/definitions/stringArray" }
282
- ]
283
- }
284
- },
285
- "propertyNames": { "$ref": "#" },
286
- "const": {},
287
- "enum": {
288
- "type": "array",
289
- "minItems": 1,
290
- "uniqueItems": true
291
- },
292
- "type": {
293
- "anyOf": [
294
- { "$ref": "#/definitions/simpleTypes" },
295
- {
296
- "type": "array",
297
- "items": { "$ref": "#/definitions/simpleTypes" },
298
- "minItems": 1,
299
- "uniqueItems": true
300
- }
301
- ]
302
- },
303
- "format": { "type": "string" },
304
- "allOf": { "$ref": "#/definitions/schemaArray" },
305
- "anyOf": { "$ref": "#/definitions/schemaArray" },
306
- "oneOf": { "$ref": "#/definitions/schemaArray" },
307
- "not": { "$ref": "#" }
308
- },
309
- "default": {}
310
- }
311
-
312
- exports["json-schema-draft-07"] = {
313
- "$schema": "http://json-schema.org/draft-07/schema#",
314
- "$id": "http://json-schema.org/draft-07/schema#",
315
- "title": "Core schema meta-schema",
316
- "definitions": {
317
- "schemaArray": {
318
- "type": "array",
319
- "minItems": 1,
320
- "items": { "$ref": "#" }
321
- },
322
- "nonNegativeInteger": {
323
- "type": "integer",
324
- "minimum": 0
325
- },
326
- "nonNegativeIntegerDefault0": {
327
- "allOf": [
328
- { "$ref": "#/definitions/nonNegativeInteger" },
329
- { "default": 0 }
330
- ]
331
- },
332
- "simpleTypes": {
333
- "enum": [
334
- "array",
335
- "boolean",
336
- "integer",
337
- "null",
338
- "number",
339
- "object",
340
- "string"
341
- ]
342
- },
343
- "stringArray": {
344
- "type": "array",
345
- "items": { "type": "string" },
346
- "uniqueItems": true,
347
- "default": []
348
- }
349
- },
350
- "type": ["object", "boolean"],
351
- "properties": {
352
- "$id": {
353
- "type": "string",
354
- "format": "uri-reference"
355
- },
356
- "$schema": {
357
- "type": "string",
358
- "format": "uri"
359
- },
360
- "$ref": {
361
- "type": "string",
362
- "format": "uri-reference"
363
- },
364
- "$comment": {
365
- "type": "string"
366
- },
367
- "title": {
368
- "type": "string"
369
- },
370
- "description": {
371
- "type": "string"
372
- },
373
- "default": true,
374
- "readOnly": {
375
- "type": "boolean",
376
- "default": false
377
- },
378
- "examples": {
379
- "type": "array",
380
- "items": true
381
- },
382
- "multipleOf": {
383
- "type": "number",
384
- "exclusiveMinimum": 0
385
- },
386
- "maximum": {
387
- "type": "number"
388
- },
389
- "exclusiveMaximum": {
390
- "type": "number"
391
- },
392
- "minimum": {
393
- "type": "number"
394
- },
395
- "exclusiveMinimum": {
396
- "type": "number"
397
- },
398
- "maxLength": { "$ref": "#/definitions/nonNegativeInteger" },
399
- "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
400
- "pattern": {
401
- "type": "string",
402
- "format": "regex"
403
- },
404
- "additionalItems": { "$ref": "#" },
405
- "items": {
406
- "anyOf": [
407
- { "$ref": "#" },
408
- { "$ref": "#/definitions/schemaArray" }
409
- ],
410
- "default": true
411
- },
412
- "maxItems": { "$ref": "#/definitions/nonNegativeInteger" },
413
- "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
414
- "uniqueItems": {
415
- "type": "boolean",
416
- "default": false
417
- },
418
- "contains": { "$ref": "#" },
419
- "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" },
420
- "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
421
- "required": { "$ref": "#/definitions/stringArray" },
422
- "additionalProperties": { "$ref": "#" },
423
- "definitions": {
424
- "type": "object",
425
- "additionalProperties": { "$ref": "#" },
426
- "default": {}
427
- },
428
- "properties": {
429
- "type": "object",
430
- "additionalProperties": { "$ref": "#" },
431
- "default": {}
432
- },
433
- "patternProperties": {
434
- "type": "object",
435
- "additionalProperties": { "$ref": "#" },
436
- "propertyNames": { "format": "regex" },
437
- "default": {}
438
- },
439
- "dependencies": {
440
- "type": "object",
441
- "additionalProperties": {
442
- "anyOf": [
443
- { "$ref": "#" },
444
- { "$ref": "#/definitions/stringArray" }
445
- ]
446
- }
447
- },
448
- "propertyNames": { "$ref": "#" },
449
- "const": true,
450
- "enum": {
451
- "type": "array",
452
- "items": true,
453
- "minItems": 1,
454
- "uniqueItems": true
455
- },
456
- "type": {
457
- "anyOf": [
458
- { "$ref": "#/definitions/simpleTypes" },
459
- {
460
- "type": "array",
461
- "items": { "$ref": "#/definitions/simpleTypes" },
462
- "minItems": 1,
463
- "uniqueItems": true
464
- }
465
- ]
466
- },
467
- "format": { "type": "string" },
468
- "contentMediaType": { "type": "string" },
469
- "contentEncoding": { "type": "string" },
470
- "if": {"$ref": "#"},
471
- "then": {"$ref": "#"},
472
- "else": {"$ref": "#"},
473
- "allOf": { "$ref": "#/definitions/schemaArray" },
474
- "anyOf": { "$ref": "#/definitions/schemaArray" },
475
- "oneOf": { "$ref": "#/definitions/schemaArray" },
476
- "not": { "$ref": "#" }
477
- },
478
- "default": true
479
- }
480
-
481
- Object.defineProperty(exports, '__esModule', { value: true });
482
- }));