@prantlf/jsonlint 13.0.1 → 13.1.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.
- package/CHANGELOG.md +7 -0
- package/README.md +34 -31
- package/lib/cli.js +22 -16
- package/lib/index.d.ts +2 -1
- package/lib/validator.js +16 -11
- package/package.json +1 -1
- package/web/validator.min.js +3 -3
- package/web/validator.min.js.map +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [13.1.0](https://github.com/prantlf/jsonlint/compare/v13.0.1...v13.1.0) (2023-03-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* Accept multiple schemas if external definitions are used ([32d1cab](https://github.com/prantlf/jsonlint/commit/32d1cabfc5cf00f23ec8d7b6b4a5b62e66924fa3))
|
|
7
|
+
|
|
1
8
|
## [13.0.1](https://github.com/prantlf/jsonlint/compare/v13.0.0...v13.0.1) (2023-03-05)
|
|
2
9
|
|
|
3
10
|
|
package/README.md
CHANGED
|
@@ -16,14 +16,15 @@ This is a fork of the original project ([zaach/jsonlint](https://github.com/zaac
|
|
|
16
16
|
* Optionally recognizes JavaScript-style comments (CJSON) and single quoted strings (JSON5).
|
|
17
17
|
* Optionally ignores trailing commas and reports duplicate object keys as an error.
|
|
18
18
|
* Optionally checks that also the expected format matches, including sorted object keys.
|
|
19
|
-
* Supports [JSON Schema] drafts 04, 06 and
|
|
19
|
+
* Supports [JSON Schema] drafts 04, 06, 07, 2019-09 and 2020-12.
|
|
20
|
+
* Supports [JSON Type Definition].
|
|
20
21
|
* Offers pretty-printing including comment-stripping and object keys without quotes (JSON5).
|
|
21
|
-
* Prefers the native JSON parser if possible to run [
|
|
22
|
+
* Prefers the native JSON parser if possible to run [10x faster than the custom parser].
|
|
22
23
|
* Reports errors with rich additional information. From the JSON Schema validation too.
|
|
23
24
|
* Consumes configuration from both command line and [configuration files](configuration).
|
|
24
25
|
* Implements JavaScript modules using [UMD] to work in Node.js, in a browser, everywhere.
|
|
25
26
|
* Depends on up-to-date npm modules with no installation warnings.
|
|
26
|
-
* Small size - 18.
|
|
27
|
+
* Small size - 18.4 kB minified, 6.45 kB gzipped, 5.05 kB brotlied.
|
|
27
28
|
|
|
28
29
|
**Note:** In comparison with the original project, this package exports only the `parse` method; not the `Parser` object.
|
|
29
30
|
|
|
@@ -113,50 +114,42 @@ The input can be checked not only to be a valid JSON, but also to be formatted a
|
|
|
113
114
|
|
|
114
115
|
### Usage
|
|
115
116
|
|
|
116
|
-
Usage: `jsonlint [options] [<file, directory, pattern> ...]`
|
|
117
|
+
Usage: `jsonlint [options] [--] [<file, directory, pattern> ...]`
|
|
117
118
|
|
|
118
119
|
#### Options
|
|
119
120
|
|
|
120
|
-
-f, --config
|
|
121
|
-
-F, --no-config disable searching for configuration
|
|
121
|
+
-f, --config <file> read options from a custom configuration file
|
|
122
|
+
-F, --no-config disable searching for configuration files
|
|
122
123
|
-s, --sort-keys sort object keys (not when prettifying)
|
|
123
|
-
-E, --extensions
|
|
124
|
-
(default: ["json","JSON"])
|
|
124
|
+
-E, --extensions <ext...> file extensions to process for directory walk (default: ["json","JSON"])
|
|
125
125
|
-i, --in-place overwrite the input files
|
|
126
126
|
-j, --diff print difference instead of writing the output
|
|
127
127
|
-k, --check check that the input is equal to the output
|
|
128
|
-
-t, --indent
|
|
129
|
-
to use for indentation (default: 2)
|
|
128
|
+
-t, --indent <num|char> number of spaces or specific characters to use for indentation (default: 2)
|
|
130
129
|
-c, --compact compact error display
|
|
131
|
-
-M, --mode
|
|
132
|
-
type (default: "json")
|
|
130
|
+
-M, --mode <mode> set other parsing flags according to a format type (default: "json")
|
|
133
131
|
-B, --bom ignore the leading UTF-8 byte-order mark
|
|
134
132
|
-C, --comments recognize and ignore JavaScript-style comments
|
|
135
133
|
-S, --single-quoted-strings support single quotes as string delimiters
|
|
136
134
|
-T, --trailing-commas ignore trailing commas in objects and arrays
|
|
137
135
|
-D, --no-duplicate-keys report duplicate object keys as an error
|
|
138
|
-
-V, --validate
|
|
139
|
-
-e, --environment
|
|
140
|
-
|
|
141
|
-
-x, --context [num] line count used as the diff context (default: 3)
|
|
136
|
+
-V, --validate <file...> JSON Schema file(s) to use for validation (default: [])
|
|
137
|
+
-e, --environment <env> which specification of JSON Schema the validation file uses
|
|
138
|
+
-x, --context <num> line count used as the diff context (default: 3)
|
|
142
139
|
-l, --log-files print only the parsed file names to stdout
|
|
143
140
|
-q, --quiet do not print the parsed json to stdout
|
|
144
141
|
-n, --continue continue with other files if an error occurs
|
|
145
|
-
-p, --pretty-print prettify the input instead of stringifying
|
|
146
|
-
the parsed object
|
|
142
|
+
-p, --pretty-print prettify the input instead of stringifying the parsed object
|
|
147
143
|
-P, --pretty-print-invalid force pretty-printing even for invalid input
|
|
148
144
|
-r, --trailing-newline ensure a line break at the end of the output
|
|
149
145
|
-R, --no-trailing-newline ensure no line break at the end of the output
|
|
150
146
|
--prune-comments omit comments from the prettified output
|
|
151
|
-
--strip-object-keys strip quotes from object keys if possible
|
|
152
|
-
(JSON5)
|
|
147
|
+
--strip-object-keys strip quotes from object keys if possible (JSON5)
|
|
153
148
|
--enforce-double-quotes surrounds all strings with double quotes
|
|
154
|
-
--enforce-single-quotes surrounds all strings with single quotes
|
|
155
|
-
|
|
156
|
-
--trim-trailing-commas omit trailing commas from objects and arrays
|
|
157
|
-
(JSON5)
|
|
149
|
+
--enforce-single-quotes surrounds all strings with single quotes (JSON5)
|
|
150
|
+
--trim-trailing-commas omit trailing commas from objects and arrays (JSON5)
|
|
158
151
|
-v, --version output the version number
|
|
159
|
-
-h, --help
|
|
152
|
+
-h, --help display help for command
|
|
160
153
|
|
|
161
154
|
You can use BASH patterns for including and excluding files (only files).
|
|
162
155
|
Patterns are case-sensitive and have to use slashes as directory separators.
|
|
@@ -169,6 +162,9 @@ for JSON Schema validation are "draft-04", "draft-06", "draft-07",
|
|
|
169
162
|
with "json-schema-". JSON Type Definition can be selected by "rfc8927",
|
|
170
163
|
"json-type-definition" or "jtd". If not specified, it will be "draft-07".
|
|
171
164
|
|
|
165
|
+
If you specify schemas using the "-V" parameter, you will have to separate
|
|
166
|
+
files to test with "--".
|
|
167
|
+
|
|
172
168
|
### Configuration
|
|
173
169
|
|
|
174
170
|
In addition to the command line parameters, the options can be supplied from the following files:
|
|
@@ -274,7 +270,7 @@ The `mode` parameter (string) sets parsing options to match a common format of i
|
|
|
274
270
|
|
|
275
271
|
### Schema Validation
|
|
276
272
|
|
|
277
|
-
You can validate the input against a JSON Schema using the `lib/validator` module. The `
|
|
273
|
+
You can validate the input against a JSON Schema using the `lib/validator` module. The `compile` method accepts either an earlier parsed JSON Schema or a string with it:
|
|
278
274
|
|
|
279
275
|
```js
|
|
280
276
|
const { compile } = require('@prantlf/jsonlint/lib/validator')
|
|
@@ -283,12 +279,18 @@ const validate = compile('string with JSON Schema')
|
|
|
283
279
|
const parsed = validate('string with JSON data')
|
|
284
280
|
```
|
|
285
281
|
|
|
286
|
-
If a string is passed to the `
|
|
282
|
+
If a string is passed to the `compile` method, the same options as for parsing JSON data can be passed as the second parameter. Compiling JSON Schema supports the same options as parsing JSON data too (except for `reviver`). They can be passed as the second (object) parameter. The optional second `environment` parameter (the default value is `draft-07`) ) can be passed either as a string or as an additional property in the options object too:
|
|
287
283
|
|
|
288
284
|
```js
|
|
289
285
|
const validate = compile('string with JSON Schema', { environment: 'draft-2020-12' })
|
|
290
286
|
```
|
|
291
287
|
|
|
288
|
+
If you use external definitions in multiple schemas, you have to pass an array of all schemas to `compile`. The `$id` properties have to be set in each sub-schema according to the `$ref` references in the main schema. The main schema is usually sent as the first one to be compiled immediately, so that the errors in any sub-schema would be reported right away:
|
|
289
|
+
|
|
290
|
+
```js
|
|
291
|
+
const validate = compile(['string with main schema', 'string with a sub-schema'])
|
|
292
|
+
```
|
|
293
|
+
|
|
292
294
|
### Pretty-Printing
|
|
293
295
|
|
|
294
296
|
You can parse a JSON string to an array of tokens and print it back to a string with some changes applied. It can be unification of whitespace, reformatting or stripping comments, for example. (Raw token values must be enabled when tokenizing the JSON input.)
|
|
@@ -372,11 +374,11 @@ If you want to retain comments or whitespace for pretty-printing, for example, s
|
|
|
372
374
|
|
|
373
375
|
### Performance
|
|
374
376
|
|
|
375
|
-
This is a part of an output from the [parser benchmark], when parsing a 4.
|
|
377
|
+
This is a part of an output from the [parser benchmark], when parsing a 4.68 KB formatted string ([package.json](./package.json)) with Node.js 18.14.2:
|
|
376
378
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
379
|
+
the standard jsonlint parser x 78,998 ops/sec ±0.48% (95 runs sampled)
|
|
380
|
+
the extended jsonlint parser x 7,923 ops/sec ±0.51% (93 runs sampled)
|
|
381
|
+
the tokenising jsonlint parser x 6,281 ops/sec ±0.71% (91 runs sampled)
|
|
380
382
|
|
|
381
383
|
A custom JSON parser is [a lot slower] than the built-in one. However, it is more important to have a [clear error reporting] than the highest speed in scenarios like parsing configuration files. (For better error-reporting, the speed can be preserved by using the native parser initially and re-parsing with another parser only in case of failure.) Features like comments or JSON5 are also helpful in configuration files. Tokens preserve the complete input and can be used for pretty-printing without losing the comments.
|
|
382
384
|
|
|
@@ -429,6 +431,7 @@ Licensed under the [MIT License].
|
|
|
429
431
|
[JSON]: https://tools.ietf.org/html/rfc8259
|
|
430
432
|
[JSON5]: https://spec.json5.org
|
|
431
433
|
[JSON Schema]: https://json-schema.org
|
|
434
|
+
[JSON Type Definition]: https://jsontypedef.com/
|
|
432
435
|
[UMD]: https://github.com/umdjs/umd
|
|
433
436
|
[`Grunt`]: https://gruntjs.com/
|
|
434
437
|
[`Gulp`]: http://gulpjs.com/
|
package/lib/cli.js
CHANGED
|
@@ -10,30 +10,30 @@ const { sortObject } = require('./sorter')
|
|
|
10
10
|
const { compile } = require('./validator')
|
|
11
11
|
const { description, version } = require('../package')
|
|
12
12
|
|
|
13
|
-
const collectValues =
|
|
13
|
+
const collectValues = (input, result) => result.concat(input.split(','))
|
|
14
14
|
|
|
15
15
|
const commander = require('commander')
|
|
16
16
|
.name('jsonlint')
|
|
17
17
|
.usage('[options] [<file, directory, pattern> ...]')
|
|
18
18
|
.description(description)
|
|
19
|
-
.option('-f, --config
|
|
19
|
+
.option('-f, --config <file>', 'read options from a custom configuration file')
|
|
20
20
|
.option('-F, --no-config', 'disable searching for configuration files')
|
|
21
21
|
.option('-s, --sort-keys', 'sort object keys (not when prettifying)')
|
|
22
|
-
.option('-E, --extensions
|
|
22
|
+
.option('-E, --extensions <ext...>', 'file extensions to process for directory walk', collectValues, ['json', 'JSON'])
|
|
23
23
|
.option('-i, --in-place', 'overwrite the input files')
|
|
24
24
|
.option('-j, --diff', 'print difference instead of writing the output')
|
|
25
25
|
.option('-k, --check', 'check that the input is equal to the output')
|
|
26
|
-
.option('-t, --indent
|
|
26
|
+
.option('-t, --indent <num|char>', 'number of spaces or specific characters to use for indentation', 2)
|
|
27
27
|
.option('-c, --compact', 'compact error display')
|
|
28
|
-
.option('-M, --mode
|
|
28
|
+
.option('-M, --mode <mode>', 'set other parsing flags according to a format type', 'json')
|
|
29
29
|
.option('-B, --bom', 'ignore the leading UTF-8 byte-order mark')
|
|
30
30
|
.option('-C, --comments', 'recognize and ignore JavaScript-style comments')
|
|
31
31
|
.option('-S, --single-quoted-strings', 'support single quotes as string delimiters')
|
|
32
32
|
.option('-T, --trailing-commas', 'ignore trailing commas in objects and arrays')
|
|
33
33
|
.option('-D, --no-duplicate-keys', 'report duplicate object keys as an error')
|
|
34
|
-
.option('-V, --validate
|
|
35
|
-
.option('-e, --environment
|
|
36
|
-
.option('-x, --context
|
|
34
|
+
.option('-V, --validate <file...>', 'JSON Schema file(s) to use for validation', collectValues, [])
|
|
35
|
+
.option('-e, --environment <env>', 'which specification of JSON Schema the validation file uses')
|
|
36
|
+
.option('-x, --context <num>', 'line count used as the diff context', 3)
|
|
37
37
|
.option('-l, --log-files', 'print only the parsed file names to stdout')
|
|
38
38
|
.option('-q, --quiet', 'do not print the parsed json to stdout')
|
|
39
39
|
.option('-n, --continue', 'continue with other files if an error occurs')
|
|
@@ -59,6 +59,9 @@ const commander = require('commander')
|
|
|
59
59
|
console.log('"draft-2019-09" or "draft-2020-12". The environment may be prefixed')
|
|
60
60
|
console.log('with "json-schema-". JSON Type Definition can be selected by "rfc8927",')
|
|
61
61
|
console.log('"json-type-definition" or "jtd". If not specified, it will be "draft-07".')
|
|
62
|
+
console.log()
|
|
63
|
+
console.log('If you specify schemas using the "-V" parameter, you will have to separate')
|
|
64
|
+
console.log('files to test with "--".')
|
|
62
65
|
})
|
|
63
66
|
.parse(process.argv)
|
|
64
67
|
|
|
@@ -144,16 +147,19 @@ function processContents (source, file) {
|
|
|
144
147
|
allowSingleQuotedStrings: options.singleQuotedStrings,
|
|
145
148
|
allowDuplicateObjectKeys: options.duplicateKeys
|
|
146
149
|
}
|
|
147
|
-
if (options.validate) {
|
|
148
|
-
|
|
150
|
+
if (options.validate.length) {
|
|
151
|
+
const schemas = options.validate.map((file, index) => {
|
|
152
|
+
try {
|
|
153
|
+
return readFileSync(file, 'utf8')
|
|
154
|
+
} catch (error) {
|
|
155
|
+
throw new Error(`Loading the JSON Schema #${index + 1} failed: "${file}".\n${error.message}`)
|
|
156
|
+
}
|
|
157
|
+
})
|
|
158
|
+
parserOptions.environment = options.environment
|
|
149
159
|
try {
|
|
150
|
-
|
|
151
|
-
parserOptions.environment = options.environment
|
|
152
|
-
validate = compile(schema, parserOptions)
|
|
160
|
+
validate = compile(schemas, parserOptions)
|
|
153
161
|
} catch (error) {
|
|
154
|
-
|
|
155
|
-
options.validate + '".\n' + error.message
|
|
156
|
-
throw new Error(message)
|
|
162
|
+
throw new Error(`Loading the JSON Schema failed:\n${error.message}`)
|
|
157
163
|
}
|
|
158
164
|
parsed = validate(source, parserOptions)
|
|
159
165
|
} else {
|
package/lib/index.d.ts
CHANGED
|
@@ -458,7 +458,8 @@ declare module '@prantlf/jsonlint/lib/validator' {
|
|
|
458
458
|
* with multiple options
|
|
459
459
|
* @returns the validator function
|
|
460
460
|
*/
|
|
461
|
-
function compile (schema: string
|
|
461
|
+
function compile (schema: string | string[] | Record<string, unknown> | Record<string, unknown>[],
|
|
462
|
+
environmentOrOptions?: Environment | CompileOptions): Validator
|
|
462
463
|
}
|
|
463
464
|
|
|
464
465
|
declare module '@prantlf/jsonlint/lib/printer' {
|
package/lib/validator.js
CHANGED
|
@@ -123,28 +123,33 @@
|
|
|
123
123
|
const Ajv = requireAjv('AjvJTD')
|
|
124
124
|
ajv = new Ajv()
|
|
125
125
|
} else {
|
|
126
|
-
throw new RangeError(
|
|
127
|
-
environment + '".')
|
|
126
|
+
throw new RangeError(`Unsupported environment for the JSON Schema validation: "${environment}".`)
|
|
128
127
|
}
|
|
129
128
|
return ajv
|
|
130
129
|
}
|
|
131
130
|
|
|
132
131
|
function compileSchema (ajv, schema, parseOptions) {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
132
|
+
if (!Array.isArray(schema)) schema = [schema]
|
|
133
|
+
const [main, ...others] = schema.map((schema, index) => {
|
|
134
|
+
if (typeof schema !== 'string') return schema
|
|
135
|
+
try {
|
|
136
|
+
return jsonlint.parse(schema, parseOptions)
|
|
137
|
+
} catch (error) {
|
|
138
|
+
error.message = `Parsing the JSON Schema #${index + 1} failed.\n${error.message}`
|
|
139
|
+
throw error
|
|
140
|
+
}
|
|
141
|
+
})
|
|
140
142
|
try {
|
|
141
|
-
|
|
143
|
+
for (const schema of others) {
|
|
144
|
+
ajv.addSchema(schema)
|
|
145
|
+
}
|
|
146
|
+
return ajv.compile(main)
|
|
142
147
|
} catch (originalError) {
|
|
143
148
|
const errors = ajv.errors
|
|
144
149
|
const betterError = errors
|
|
145
150
|
? createError(errors, parsed, schema, parseOptions)
|
|
146
151
|
: originalError
|
|
147
|
-
betterError.message =
|
|
152
|
+
betterError.message = `Compiling the JSON Schema failed.\n${betterError.message}`
|
|
148
153
|
throw betterError
|
|
149
154
|
}
|
|
150
155
|
}
|
package/package.json
CHANGED
package/web/validator.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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
|
|
2
|
-
|
|
3
|
-
|
|
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 u=require(l[g]);return!u.$schema&&u.default||u};f(exports,c,d)}else if(typeof define=="function"&&define.amd)define("jsonlint-validator",["exports","jsonlint","ajv"],function(c,l,d){f(c,l,u=>{const m=d[u];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 i=t.find(function(o){return a===f.pathToPointer(o.path)});if(i){const o=i.location.start,r=o.offset,n=o.line,h=o.column,S=f.getErrorTexts(e.reason,s,r,n,h);return e.message=S.message,e.excerpt=S.excerpt,S.pointer&&(e.pointer=S.pointer,e.location={start:{column:h,line:n,offset:r}}),!0}}function d(e,s,t){const a=e.dataPath,i=e.schemaPath,o=(a||"/")+" "+e.message+"; see "+i,r={reason:o,dataPath:a,schemaPath:i};return l(r,s,t,a)||(r.message=o),r}function g(e,s,t,a){t||(t=JSON.stringify(s,void 0,2)),a||(a={}),Object.assign(a,{tokenLocations:!0,tokenPaths:!0});const i=f.tokenize(t,a),o=d(e[0],t,i),r=new SyntaxError(o.message);return Object.assign(r,o),r}function u(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){Array.isArray(s)||(s=[s]);const[a,...i]=s.map((o,r)=>{if(typeof o!="string")return o;try{return f.parse(o,t)}catch(n){throw n.message=`Parsing the JSON Schema #${r+1} failed.
|
|
2
|
+
${n.message}`,n}});try{for(const o of i)e.addSchema(o);return e.compile(a)}catch(o){const r=e.errors,n=r?g(r,parsed,s,t):o;throw n.message=`Compiling the JSON Schema failed.
|
|
3
|
+
${n.message}`,n}}function A(e,s){let t={};typeof s=="object"&&!(s instanceof String)&&(t=s,s=t.environment);const a=u(s),i={mode:t.mode,ignoreBOM:t.ignoreBOM,ignoreComments:t.ignoreComments,ignoreTrailingCommas:t.ignoreTrailingCommas,allowSingleQuotedStrings:t.allowSingleQuotedStrings,allowDuplicateObjectKeys:t.allowDuplicateObjectKeys},o=m(a,e,i);return function(r,n,h){if(typeof r=="string"||r instanceof String?(h=n,n=r,r=f.parse(n,h)):typeof n=="string"||n instanceof String||(h=n,n=void 0),o(r))return r;throw g(o.errors,r,n,h)}}j.compile=A,Object.defineProperty(j,"__esModule",{value:!0})});
|
|
4
4
|
//# sourceMappingURL=validator.min.js.map
|
package/web/validator.min.js.map
CHANGED
|
@@ -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 = {\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(
|
|
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,IA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C,CAAQ,IACpDH,EAAQ,QAAUa,GAEbb,CACT,CAEA,SAASc,EAAaC,EAAQC,EAAMf,EAAOgB,EAAS,CAC7ChB,IACHA,EAAQ,KAAK,UAAUe,EAAM,OAAW,CAAC,GAEtCC,IACHA,EAAU,CAAC,GAEb,OAAO,OAAOA,EAAS,CACrB,eAAgB,GAChB,WAAY,EACd,CAAC,EACD,MAAMf,EAAST,EAAS,SAASQ,EAAOgB,CAAO,EASzCjB,EAAUU,EAAeK,EAAO,CAAC,EAAGd,EAAOC,CAAM,EACjDS,EAAQ,IAAI,YAAYX,EAAQ,OAAO,EAC7C,cAAO,OAAOW,EAAOX,CAAO,EACrBW,CACT,CAEA,SAASO,EAAWC,EAAa,CAC/B,IAAIzB,EACJ,GAAI,CAACyB,GAAeA,IAAgB,wBAA0BA,IAAgB,WAAY,CACxF,MAAMC,EAAMzB,EAAW,OAAO,EAC9BD,EAAM,IAAI0B,EACV1B,EAAI,cAAcC,EAAW,UAAU,CAAC,UAC/BwB,IAAgB,wBAA0BA,IAAgB,WAAY,CAC/E,MAAMC,EAAMzB,EAAW,OAAO,EAC9BD,EAAM,IAAI0B,UACDD,IAAgB,wBAA0BA,IAAgB,WAAY,CAC/E,MAAMC,EAAMzB,EAAW,OAAO,EAC9BD,EAAM,IAAI0B,UACDD,IAAgB,6BAA+BA,IAAgB,gBAAiB,CACzF,MAAMC,EAAMzB,EAAW,SAAS,EAChCD,EAAM,IAAI0B,UACDD,IAAgB,6BAA+BA,IAAgB,gBAAiB,CACzF,MAAMC,EAAMzB,EAAW,SAAS,EAChCD,EAAM,IAAI0B,UACDD,IAAgB,wBAA0BA,IAAgB,OAASA,IAAgB,UAAW,CACvG,MAAMC,EAAMzB,EAAW,QAAQ,EAC/BD,EAAM,IAAI0B,MAEV,OAAM,IAAI,WAAW,
|
|
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", "
|
|
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: \"${environment}\".`)\n }\n return ajv\n }\n\n function compileSchema (ajv, schema, parseOptions) {\n if (!Array.isArray(schema)) schema = [schema]\n const [main, ...others] = schema.map((schema, index) => {\n if (typeof schema !== 'string') return schema\n try {\n return jsonlint.parse(schema, parseOptions)\n } catch (error) {\n error.message = `Parsing the JSON Schema #${index + 1} failed.\\n${error.message}`\n throw error\n }\n })\n try {\n for (const schema of others) {\n ajv.addSchema(schema)\n }\n return ajv.compile(main)\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,E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ported", "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", "main", "others", "index", "originalError", "betterError", "compile", "validate"]
|
|
7
7
|
}
|