@emulsify/cli 1.6.0 → 1.8.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/README.md +89 -1
- package/dist/handlers/componentInstall.js +1 -1
- package/dist/handlers/componentList.js +1 -1
- package/dist/handlers/systemInstall.js +24 -9
- package/dist/index.js +12 -21
- package/dist/node_modules/.package-lock.json +24 -24
- package/dist/node_modules/@types/node/LICENSE +0 -0
- package/dist/node_modules/@types/node/README.md +1 -1
- package/dist/node_modules/@types/node/assert.d.ts +33 -31
- package/dist/node_modules/@types/node/async_hooks.d.ts +28 -20
- package/dist/node_modules/@types/node/buffer.d.ts +4 -4
- package/dist/node_modules/@types/node/child_process.d.ts +230 -62
- package/dist/node_modules/@types/node/cluster.d.ts +62 -27
- package/dist/node_modules/@types/node/console.d.ts +6 -6
- package/dist/node_modules/@types/node/constants.d.ts +12 -11
- package/dist/node_modules/@types/node/crypto.d.ts +311 -237
- package/dist/node_modules/@types/node/dgram.d.ts +50 -14
- package/dist/node_modules/@types/node/dns.d.ts +183 -54
- package/dist/node_modules/@types/node/domain.d.ts +4 -4
- package/dist/node_modules/@types/node/events.d.ts +4 -4
- package/dist/node_modules/@types/node/fs/promises.d.ts +105 -39
- package/dist/node_modules/@types/node/fs.d.ts +440 -126
- package/dist/node_modules/@types/node/globals.d.ts +41 -22
- package/dist/node_modules/@types/node/globals.global.d.ts +0 -0
- package/dist/node_modules/@types/node/http.d.ts +306 -217
- package/dist/node_modules/@types/node/http2.d.ts +341 -95
- package/dist/node_modules/@types/node/https.d.ts +250 -118
- package/dist/node_modules/@types/node/index.d.ts +1 -1
- package/dist/node_modules/@types/node/inspector.d.ts +1 -2
- package/dist/node_modules/@types/node/module.d.ts +4 -4
- package/dist/node_modules/@types/node/net.d.ts +28 -12
- package/dist/node_modules/@types/node/os.d.ts +5 -4
- package/dist/node_modules/@types/node/package.json +10 -3
- package/dist/node_modules/@types/node/path.d.ts +35 -24
- package/dist/node_modules/@types/node/perf_hooks.d.ts +5 -5
- package/dist/node_modules/@types/node/process.d.ts +61 -22
- package/dist/node_modules/@types/node/punycode.d.ts +3 -3
- package/dist/node_modules/@types/node/querystring.d.ts +15 -5
- package/dist/node_modules/@types/node/readline.d.ts +16 -6
- package/dist/node_modules/@types/node/repl.d.ts +13 -7
- package/dist/node_modules/@types/node/stream.d.ts +182 -23
- package/dist/node_modules/@types/node/string_decoder.d.ts +3 -3
- package/dist/node_modules/@types/node/timers.d.ts +5 -5
- package/dist/node_modules/@types/node/tls.d.ts +112 -30
- package/dist/node_modules/@types/node/trace_events.d.ts +3 -3
- package/dist/node_modules/@types/node/ts4.8/assert.d.ts +130 -0
- package/dist/node_modules/@types/node/ts4.8/async_hooks.d.ts +237 -0
- package/dist/node_modules/@types/node/ts4.8/buffer.d.ts +89 -0
- package/dist/node_modules/@types/node/ts4.8/child_process.d.ts +682 -0
- package/dist/node_modules/@types/node/ts4.8/cluster.d.ts +300 -0
- package/dist/node_modules/@types/node/ts4.8/console.d.ts +142 -0
- package/dist/node_modules/@types/node/ts4.8/constants.d.ts +19 -0
- package/dist/node_modules/@types/node/ts4.8/crypto.d.ts +1287 -0
- package/dist/node_modules/@types/node/ts4.8/dgram.d.ts +180 -0
- package/dist/node_modules/@types/node/ts4.8/dns.d.ts +516 -0
- package/dist/node_modules/@types/node/ts4.8/domain.d.ts +27 -0
- package/dist/node_modules/@types/node/ts4.8/events.d.ts +82 -0
- package/dist/node_modules/@types/node/ts4.8/fs/promises.d.ts +634 -0
- package/dist/node_modules/@types/node/ts4.8/fs.d.ts +2587 -0
- package/dist/node_modules/@types/node/ts4.8/globals.d.ts +763 -0
- package/dist/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
- package/dist/node_modules/@types/node/ts4.8/http.d.ts +580 -0
- package/dist/node_modules/@types/node/ts4.8/http2.d.ts +1208 -0
- package/dist/node_modules/@types/node/ts4.8/https.d.ts +274 -0
- package/dist/node_modules/@types/node/ts4.8/index.d.ts +53 -0
- package/dist/node_modules/@types/node/ts4.8/inspector.d.ts +3050 -0
- package/dist/node_modules/@types/node/ts4.8/module.d.ts +56 -0
- package/dist/node_modules/@types/node/ts4.8/net.d.ts +324 -0
- package/dist/node_modules/@types/node/ts4.8/os.d.ts +243 -0
- package/dist/node_modules/@types/node/ts4.8/path.d.ts +168 -0
- package/dist/node_modules/@types/node/ts4.8/perf_hooks.d.ts +274 -0
- package/dist/node_modules/@types/node/ts4.8/process.d.ts +452 -0
- package/dist/node_modules/@types/node/ts4.8/punycode.d.ts +78 -0
- package/dist/node_modules/@types/node/ts4.8/querystring.d.ts +41 -0
- package/dist/node_modules/@types/node/ts4.8/readline.d.ts +184 -0
- package/dist/node_modules/@types/node/ts4.8/repl.d.ts +404 -0
- package/dist/node_modules/@types/node/ts4.8/stream.d.ts +518 -0
- package/dist/node_modules/@types/node/ts4.8/string_decoder.d.ts +10 -0
- package/dist/node_modules/@types/node/ts4.8/timers.d.ts +19 -0
- package/dist/node_modules/@types/node/ts4.8/tls.d.ts +866 -0
- package/dist/node_modules/@types/node/ts4.8/trace_events.d.ts +64 -0
- package/dist/node_modules/@types/node/ts4.8/tty.d.ts +69 -0
- package/dist/node_modules/@types/node/ts4.8/url.d.ts +187 -0
- package/dist/node_modules/@types/node/ts4.8/util.d.ts +278 -0
- package/dist/node_modules/@types/node/ts4.8/v8.d.ts +189 -0
- package/dist/node_modules/@types/node/ts4.8/vm.d.ts +155 -0
- package/dist/node_modules/@types/node/ts4.8/wasi.d.ts +88 -0
- package/dist/node_modules/@types/node/ts4.8/worker_threads.d.ts +241 -0
- package/dist/node_modules/@types/node/ts4.8/zlib.d.ts +364 -0
- package/dist/node_modules/@types/node/tty.d.ts +4 -4
- package/dist/node_modules/@types/node/url.d.ts +49 -11
- package/dist/node_modules/@types/node/util.d.ts +103 -41
- package/dist/node_modules/@types/node/v8.d.ts +4 -5
- package/dist/node_modules/@types/node/vm.d.ts +7 -7
- package/dist/node_modules/@types/node/wasi.d.ts +3 -4
- package/dist/node_modules/@types/node/worker_threads.d.ts +8 -8
- package/dist/node_modules/@types/node/zlib.d.ts +13 -13
- package/dist/node_modules/@types/progress/LICENSE +0 -0
- package/dist/node_modules/@types/progress/README.md +2 -3
- package/dist/node_modules/@types/progress/index.d.ts +0 -5
- package/dist/node_modules/@types/progress/package.json +6 -6
- package/dist/node_modules/ajv-formats/node_modules/ajv/README.md +19 -5
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/2019.d.ts +3 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/2019.js +7 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/2019.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/2020.d.ts +3 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/2020.js +7 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/2020.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/ajv.d.ts +3 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/ajv.js +7 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/ajv.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/code.d.ts +5 -5
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/code.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/index.d.ts +2 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/index.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/scope.d.ts +5 -5
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/scope.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/codegen/scope.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/errors.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/errors.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/index.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/index.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/index.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/jtd/parse.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/jtd/serialize.js +18 -7
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/jtd/serialize.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/jtd/types.d.ts +2 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/names.js +6 -6
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/names.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/resolve.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/resolve.js +4 -4
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/resolve.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/rules.d.ts +2 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/util.d.ts +2 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/util.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/util.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/boolSchema.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/dataType.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/dataType.js +2 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/dataType.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/defaults.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/index.js +11 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/index.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/keyword.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/subschema.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/compile/validate/subschema.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/core.d.ts +3 -3
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/core.js +2 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/core.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/jtd.d.ts +4 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/jtd.js +7 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/jtd.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/equal.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/parseJson.js +2 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/parseJson.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/re2.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/ucs2length.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/runtime/uri.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/standalone/index.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/types/index.d.ts +19 -19
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/types/json-schema.d.ts +15 -14
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/types/jtd-schema.d.ts +30 -25
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/additionalItems.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/anyOf.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/contains.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts +2 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/if.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/if.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/index.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/items.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/not.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/not.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/oneOf.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/applicator/propertyNames.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/code.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/index.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/types.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/types.js +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/errors.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/format/format.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/format/format.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/discriminator.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/discriminator.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/elements.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/enum.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/enum.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/error.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/index.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/metadata.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/nullable.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/properties.d.ts +3 -3
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/properties.js +8 -5
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/properties.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/ref.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/type.d.ts +3 -3
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/type.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/values.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/values.js +10 -7
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/jtd/values.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/const.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/const.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/dependentRequired.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/enum.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/enum.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/index.d.ts +2 -2
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/limitContains.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/limitNumber.d.ts +3 -3
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/multipleOf.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/pattern.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/required.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/required.js.map +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/uniqueItems.d.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/2019.ts +4 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/2020.ts +4 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/ajv.ts +4 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/codegen/index.ts +25 -5
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/jtd/serialize.ts +20 -14
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/jtd/types.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/resolve.ts +4 -4
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/rules.ts +1 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/validate/dataType.ts +1 -0
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/compile/validate/index.ts +10 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/core.ts +4 -0
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/jtd.ts +4 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/runtime/parseJson.ts +2 -1
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/types/index.ts +7 -3
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/types/json-schema.ts +1 -0
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/types/jtd-schema.ts +21 -11
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/vocabularies/jtd/properties.ts +13 -6
- package/dist/node_modules/ajv-formats/node_modules/ajv/lib/vocabularies/jtd/values.ts +10 -7
- package/dist/node_modules/ajv-formats/node_modules/ajv/package.json +40 -40
- package/dist/node_modules/commander/Readme.md +407 -169
- package/dist/node_modules/commander/esm.mjs +13 -1
- package/dist/node_modules/commander/index.js +13 -2206
- package/dist/node_modules/commander/lib/argument.js +145 -0
- package/dist/node_modules/commander/lib/command.js +2299 -0
- package/dist/node_modules/commander/lib/error.js +43 -0
- package/dist/node_modules/commander/lib/help.js +457 -0
- package/dist/node_modules/commander/lib/option.js +327 -0
- package/dist/node_modules/commander/lib/suggestSimilar.js +100 -0
- package/dist/node_modules/commander/package.json +46 -34
- package/dist/node_modules/commander/typings/esm.d.mts +3 -0
- package/dist/node_modules/commander/typings/index.d.ts +889 -617
- package/dist/node_modules/graceful-fs/package.json +6 -3
- package/dist/node_modules/graceful-fs/polyfills.js +1 -1
- package/dist/node_modules/punycode/README.md +29 -3
- package/dist/node_modules/punycode/package.json +7 -7
- package/dist/node_modules/punycode/punycode.es6.js +25 -22
- package/dist/node_modules/punycode/punycode.js +25 -22
- package/dist/node_modules/universalify/README.md +1 -1
- package/dist/node_modules/universalify/index.js +6 -6
- package/dist/node_modules/universalify/package.json +2 -2
- package/dist/package.json +1 -2
- package/dist/util/cache/cloneIntoCache.js +1 -1
- package/dist/util/cache/getCachedItemPath.js +4 -2
- package/dist/util/cache/getJsonFromCachedFile.js +2 -2
- package/dist/util/getGitRepoNameFromUrl.js +1 -1
- package/dist/util/getRepositoryLatestTag.js +16 -0
- package/package.json +2 -3
- package/dist/node_modules/commander/CHANGELOG.md +0 -440
package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/const.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"const.js","sourceRoot":"","sources":["../../../lib/vocabularies/validation/const.ts"],"names":[],"mappings":";;AAEA,mDAAuC;AACvC,6CAA0C;AAC1C,+CAAuC;AAIvC,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,2BAA2B;IACpC,MAAM,EAAE,CAAC,EAAC,UAAU,EAAC,EAAE,EAAE,CAAC,IAAA,WAAC,EAAA,kBAAkB,UAAU,GAAG;CAC3D,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,IAAI;IACX,KAAK;IACL,IAAI,CAAC,GAAe;QAClB,MAAM,EAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAC,GAAG,GAAG,CAAA;QAClD,IAAI,KAAK,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,IAAI,QAAQ,CAAC,EAAE;
|
|
1
|
+
{"version":3,"file":"const.js","sourceRoot":"","sources":["../../../lib/vocabularies/validation/const.ts"],"names":[],"mappings":";;AAEA,mDAAuC;AACvC,6CAA0C;AAC1C,+CAAuC;AAIvC,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,2BAA2B;IACpC,MAAM,EAAE,CAAC,EAAC,UAAU,EAAC,EAAE,EAAE,CAAC,IAAA,WAAC,EAAA,kBAAkB,UAAU,GAAG;CAC3D,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,IAAI;IACX,KAAK;IACL,IAAI,CAAC,GAAe;QAClB,MAAM,EAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAC,GAAG,GAAG,CAAA;QAClD,IAAI,KAAK,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,IAAI,QAAQ,CAAC,EAAE,CAAC;YACnD,GAAG,CAAC,SAAS,CAAC,IAAA,WAAC,EAAA,IAAI,IAAA,cAAO,EAAC,GAAG,EAAE,eAAK,CAAC,IAAI,IAAI,KAAK,UAAU,GAAG,CAAC,CAAA;QACnE,CAAC;aAAM,CAAC;YACN,GAAG,CAAC,IAAI,CAAC,IAAA,WAAC,EAAA,GAAG,MAAM,QAAQ,IAAI,EAAE,CAAC,CAAA;QACpC,CAAC;IACH,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CodeKeywordDefinition, ErrorObject } from "../../types";
|
|
2
2
|
import { DependenciesErrorParams, PropertyDependencies } from "../applicator/dependencies";
|
|
3
|
-
export
|
|
3
|
+
export type DependentRequiredError = ErrorObject<"dependentRequired", DependenciesErrorParams, PropertyDependencies>;
|
|
4
4
|
declare const def: CodeKeywordDefinition;
|
|
5
5
|
export default def;
|
package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/enum.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enum.js","sourceRoot":"","sources":["../../../lib/vocabularies/validation/enum.ts"],"names":[],"mappings":";;AAEA,mDAAuD;AACvD,6CAA0C;AAC1C,+CAAuC;AAIvC,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,4CAA4C;IACrD,MAAM,EAAE,CAAC,EAAC,UAAU,EAAC,EAAE,EAAE,CAAC,IAAA,WAAC,EAAA,mBAAmB,UAAU,GAAG;CAC5D,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,OAAO;IACnB,KAAK,EAAE,IAAI;IACX,KAAK;IACL,IAAI,CAAC,GAAe;QAClB,MAAM,EAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QACtD,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;QACpF,MAAM,OAAO,GAAG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BAC3C,CAAC,CAAC,IAAA,WAAC,EAAA,GAAG,IAAI,QAAQ,GAAG,EAAE,CAAA;QAC3B,CAAC;IACH,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"}
|
package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/index.d.ts
CHANGED
|
@@ -8,9 +8,9 @@ import { ConstError } from "./const";
|
|
|
8
8
|
import { EnumError } from "./enum";
|
|
9
9
|
declare const validation: Vocabulary;
|
|
10
10
|
export default validation;
|
|
11
|
-
|
|
11
|
+
type LimitError = ErrorObject<"maxItems" | "minItems" | "minProperties" | "maxProperties" | "minLength" | "maxLength", {
|
|
12
12
|
limit: number;
|
|
13
13
|
}, number | {
|
|
14
14
|
$data: string;
|
|
15
15
|
}>;
|
|
16
|
-
export
|
|
16
|
+
export type ValidationKeywordError = LimitError | LimitNumberError | MultipleOfError | PatternError | RequiredError | UniqueItemsError | ConstError | EnumError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"limitContains.js","sourceRoot":"","sources":["../../../lib/vocabularies/validation/limitContains.ts"],"names":[],"mappings":";;AAEA,6CAAkD;AAElD,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,CAAC,aAAa,EAAE,aAAa,CAAC;IACvC,IAAI,EAAE,OAAO;IACb,UAAU,EAAE,QAAQ;IACpB,IAAI,CAAC,EAAC,OAAO,EAAE,YAAY,EAAE,EAAE,EAAa;QAC1C,IAAI,YAAY,CAAC,QAAQ,KAAK,SAAS,EAAE;
|
|
1
|
+
{"version":3,"file":"limitContains.js","sourceRoot":"","sources":["../../../lib/vocabularies/validation/limitContains.ts"],"names":[],"mappings":";;AAEA,6CAAkD;AAElD,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,CAAC,aAAa,EAAE,aAAa,CAAC;IACvC,IAAI,EAAE,OAAO;IACb,UAAU,EAAE,QAAQ;IACpB,IAAI,CAAC,EAAC,OAAO,EAAE,YAAY,EAAE,EAAE,EAAa;QAC1C,IAAI,YAAY,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;YACxC,IAAA,sBAAe,EAAC,EAAE,EAAE,IAAI,OAAO,iCAAiC,CAAC,CAAA;QACnE,CAAC;IACH,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"}
|
package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/limitNumber.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CodeKeywordDefinition, ErrorObject } from "../../types";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export
|
|
2
|
+
type Kwd = "maximum" | "minimum" | "exclusiveMaximum" | "exclusiveMinimum";
|
|
3
|
+
type Comparison = "<=" | ">=" | "<" | ">";
|
|
4
|
+
export type LimitNumberError = ErrorObject<Kwd, {
|
|
5
5
|
limit: number;
|
|
6
6
|
comparison: Comparison;
|
|
7
7
|
}, number | {
|
package/dist/node_modules/ajv-formats/node_modules/ajv/dist/vocabularies/validation/required.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"required.js","sourceRoot":"","sources":["../../../lib/vocabularies/validation/required.ts"],"names":[],"mappings":";;AAEA,kCAMgB;AAChB,mDAAkE;AAClE,6CAAkD;AAQlD,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,CAAC,EAAC,MAAM,EAAE,EAAC,eAAe,EAAC,EAAC,EAAE,EAAE,CAAC,IAAA,aAAG,EAAA,gCAAgC,eAAe,GAAG;IAC/F,MAAM,EAAE,CAAC,EAAC,MAAM,EAAE,EAAC,eAAe,EAAC,EAAC,EAAE,EAAE,CAAC,IAAA,WAAC,EAAA,qBAAqB,eAAe,GAAG;CAClF,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,UAAU;IACnB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,OAAO;IACnB,KAAK,EAAE,IAAI;IACX,KAAK;IACL,IAAI,CAAC,GAAe;QAClB,MAAM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E,CAAA;oBACX,GAAG,CAAC,KAAK,EAAE,CAAA;gBACb,CAAC,CAAC,CAAA;YACJ,CAAC,EACD,aAAG,CACJ,CAAA;QACH,CAAC;IACH,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"}
|
|
@@ -10,7 +10,7 @@ import addMetaSchema2019 from "./refs/json-schema-2019-09"
|
|
|
10
10
|
|
|
11
11
|
const META_SCHEMA_ID = "https://json-schema.org/draft/2019-09/schema"
|
|
12
12
|
|
|
13
|
-
class Ajv2019 extends AjvCore {
|
|
13
|
+
export class Ajv2019 extends AjvCore {
|
|
14
14
|
constructor(opts: Options = {}) {
|
|
15
15
|
super({
|
|
16
16
|
...opts,
|
|
@@ -44,6 +44,7 @@ class Ajv2019 extends AjvCore {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
module.exports = exports = Ajv2019
|
|
47
|
+
module.exports.Ajv2019 = Ajv2019
|
|
47
48
|
Object.defineProperty(exports, "__esModule", {value: true})
|
|
48
49
|
|
|
49
50
|
export default Ajv2019
|
|
@@ -76,3 +77,5 @@ export {DefinedError} from "./vocabularies/errors"
|
|
|
76
77
|
export {JSONType} from "./compile/rules"
|
|
77
78
|
export {JSONSchemaType} from "./types/json-schema"
|
|
78
79
|
export {_, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions} from "./compile/codegen"
|
|
80
|
+
export {default as ValidationError} from "./runtime/validation_error"
|
|
81
|
+
export {default as MissingRefError} from "./compile/ref_error"
|
|
@@ -7,7 +7,7 @@ import addMetaSchema2020 from "./refs/json-schema-2020-12"
|
|
|
7
7
|
|
|
8
8
|
const META_SCHEMA_ID = "https://json-schema.org/draft/2020-12/schema"
|
|
9
9
|
|
|
10
|
-
class Ajv2020 extends AjvCore {
|
|
10
|
+
export class Ajv2020 extends AjvCore {
|
|
11
11
|
constructor(opts: Options = {}) {
|
|
12
12
|
super({
|
|
13
13
|
...opts,
|
|
@@ -38,6 +38,7 @@ class Ajv2020 extends AjvCore {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
module.exports = exports = Ajv2020
|
|
41
|
+
module.exports.Ajv2020 = Ajv2020
|
|
41
42
|
Object.defineProperty(exports, "__esModule", {value: true})
|
|
42
43
|
|
|
43
44
|
export default Ajv2020
|
|
@@ -70,3 +71,5 @@ export {DefinedError} from "./vocabularies/errors"
|
|
|
70
71
|
export {JSONType} from "./compile/rules"
|
|
71
72
|
export {JSONSchemaType} from "./types/json-schema"
|
|
72
73
|
export {_, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions} from "./compile/codegen"
|
|
74
|
+
export {default as ValidationError} from "./runtime/validation_error"
|
|
75
|
+
export {default as MissingRefError} from "./compile/ref_error"
|
|
@@ -8,7 +8,7 @@ const META_SUPPORT_DATA = ["/properties"]
|
|
|
8
8
|
|
|
9
9
|
const META_SCHEMA_ID = "http://json-schema.org/draft-07/schema"
|
|
10
10
|
|
|
11
|
-
class Ajv extends AjvCore {
|
|
11
|
+
export class Ajv extends AjvCore {
|
|
12
12
|
_addVocabularies(): void {
|
|
13
13
|
super._addVocabularies()
|
|
14
14
|
draft7Vocabularies.forEach((v) => this.addVocabulary(v))
|
|
@@ -32,6 +32,7 @@ class Ajv extends AjvCore {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
module.exports = exports = Ajv
|
|
35
|
+
module.exports.Ajv = Ajv
|
|
35
36
|
Object.defineProperty(exports, "__esModule", {value: true})
|
|
36
37
|
|
|
37
38
|
export default Ajv
|
|
@@ -65,3 +66,5 @@ export {DefinedError} from "./vocabularies/errors"
|
|
|
65
66
|
export {JSONType} from "./compile/rules"
|
|
66
67
|
export {JSONSchemaType} from "./types/json-schema"
|
|
67
68
|
export {_, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions} from "./compile/codegen"
|
|
69
|
+
export {default as ValidationError} from "./runtime/validation_error"
|
|
70
|
+
export {default as MissingRefError} from "./compile/ref_error"
|
|
@@ -41,7 +41,11 @@ abstract class Node {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
class Def extends Node {
|
|
44
|
-
constructor(
|
|
44
|
+
constructor(
|
|
45
|
+
private readonly varKind: Name,
|
|
46
|
+
private readonly name: Name,
|
|
47
|
+
private rhs?: SafeExpr
|
|
48
|
+
) {
|
|
45
49
|
super()
|
|
46
50
|
}
|
|
47
51
|
|
|
@@ -63,7 +67,11 @@ class Def extends Node {
|
|
|
63
67
|
}
|
|
64
68
|
|
|
65
69
|
class Assign extends Node {
|
|
66
|
-
constructor(
|
|
70
|
+
constructor(
|
|
71
|
+
readonly lhs: Code,
|
|
72
|
+
public rhs: SafeExpr,
|
|
73
|
+
private readonly sideEffects?: boolean
|
|
74
|
+
) {
|
|
67
75
|
super()
|
|
68
76
|
}
|
|
69
77
|
|
|
@@ -84,7 +92,12 @@ class Assign extends Node {
|
|
|
84
92
|
}
|
|
85
93
|
|
|
86
94
|
class AssignOp extends Assign {
|
|
87
|
-
constructor(
|
|
95
|
+
constructor(
|
|
96
|
+
lhs: Code,
|
|
97
|
+
private readonly op: Code,
|
|
98
|
+
rhs: SafeExpr,
|
|
99
|
+
sideEffects?: boolean
|
|
100
|
+
) {
|
|
88
101
|
super(lhs, rhs, sideEffects)
|
|
89
102
|
}
|
|
90
103
|
|
|
@@ -211,7 +224,10 @@ class Else extends BlockNode {
|
|
|
211
224
|
class If extends BlockNode {
|
|
212
225
|
static readonly kind = "if"
|
|
213
226
|
else?: If | Else
|
|
214
|
-
constructor(
|
|
227
|
+
constructor(
|
|
228
|
+
private condition: Code | boolean,
|
|
229
|
+
nodes?: ChildNode[]
|
|
230
|
+
) {
|
|
215
231
|
super(nodes)
|
|
216
232
|
}
|
|
217
233
|
|
|
@@ -331,7 +347,11 @@ class ForIter extends For {
|
|
|
331
347
|
|
|
332
348
|
class Func extends BlockNode {
|
|
333
349
|
static readonly kind = "func"
|
|
334
|
-
constructor(
|
|
350
|
+
constructor(
|
|
351
|
+
public name: Name,
|
|
352
|
+
public args: Code,
|
|
353
|
+
public async?: boolean
|
|
354
|
+
) {
|
|
335
355
|
super()
|
|
336
356
|
}
|
|
337
357
|
|
|
@@ -117,7 +117,7 @@ function serializeValues(cxt: SerializeCxt): void {
|
|
|
117
117
|
gen.add(N.json, str`}`)
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
function serializeKeyValue(cxt: SerializeCxt, key: Name, schema: SchemaObject, first
|
|
120
|
+
function serializeKeyValue(cxt: SerializeCxt, key: Name, schema: SchemaObject, first?: Name): void {
|
|
121
121
|
const {gen, data} = cxt
|
|
122
122
|
addComma(cxt, first)
|
|
123
123
|
serializeString({...cxt, data: key})
|
|
@@ -156,20 +156,24 @@ function serializeSchemaProperties(cxt: SerializeCxt, discriminator?: string): v
|
|
|
156
156
|
const optProps = keys(optionalProperties)
|
|
157
157
|
const allProps = allProperties(props.concat(optProps))
|
|
158
158
|
let first = !discriminator
|
|
159
|
+
let firstProp: Name | undefined
|
|
160
|
+
|
|
159
161
|
for (const key of props) {
|
|
162
|
+
if (first) first = false
|
|
163
|
+
else gen.add(N.json, str`,`)
|
|
160
164
|
serializeProperty(key, properties[key], keyValue(key))
|
|
161
165
|
}
|
|
166
|
+
if (first) firstProp = gen.let("first", true)
|
|
162
167
|
for (const key of optProps) {
|
|
163
168
|
const value = keyValue(key)
|
|
164
|
-
gen.if(and(_`${value} !== undefined`, isOwnProperty(gen, data, key)), () =>
|
|
169
|
+
gen.if(and(_`${value} !== undefined`, isOwnProperty(gen, data, key)), () => {
|
|
170
|
+
addComma(cxt, firstProp)
|
|
165
171
|
serializeProperty(key, optionalProperties[key], value)
|
|
166
|
-
)
|
|
172
|
+
})
|
|
167
173
|
}
|
|
168
174
|
if (schema.additionalProperties) {
|
|
169
175
|
gen.forIn("key", data, (key) =>
|
|
170
|
-
gen.if(isAdditional(key, allProps), () =>
|
|
171
|
-
serializeKeyValue(cxt, key, {}, gen.let("first", first))
|
|
172
|
-
)
|
|
176
|
+
gen.if(isAdditional(key, allProps), () => serializeKeyValue(cxt, key, {}, firstProp))
|
|
173
177
|
)
|
|
174
178
|
}
|
|
175
179
|
|
|
@@ -190,8 +194,6 @@ function serializeSchemaProperties(cxt: SerializeCxt, discriminator?: string): v
|
|
|
190
194
|
}
|
|
191
195
|
|
|
192
196
|
function serializeProperty(key: string, propSchema: SchemaObject, value: Name): void {
|
|
193
|
-
if (first) first = false
|
|
194
|
-
else gen.add(N.json, str`,`)
|
|
195
197
|
gen.add(N.json, str`${JSON.stringify(key)}:`)
|
|
196
198
|
serializeCode({...cxt, schema: propSchema, data: value})
|
|
197
199
|
}
|
|
@@ -251,10 +253,14 @@ function serializeEmpty({gen, data}: SerializeCxt): void {
|
|
|
251
253
|
gen.add(N.json, _`JSON.stringify(${data})`)
|
|
252
254
|
}
|
|
253
255
|
|
|
254
|
-
function addComma({gen}: SerializeCxt, first
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
256
|
+
function addComma({gen}: SerializeCxt, first?: Name): void {
|
|
257
|
+
if (first) {
|
|
258
|
+
gen.if(
|
|
259
|
+
first,
|
|
260
|
+
() => gen.assign(first, false),
|
|
261
|
+
() => gen.add(N.json, str`,`)
|
|
262
|
+
)
|
|
263
|
+
} else {
|
|
264
|
+
gen.add(N.json, str`,`)
|
|
265
|
+
}
|
|
260
266
|
}
|
|
@@ -102,16 +102,16 @@ export function getSchemaRefs(this: Ajv, schema: AnySchema, baseId: string): Loc
|
|
|
102
102
|
traverse(schema, {allKeys: true}, (sch, jsonPtr, _, parentJsonPtr) => {
|
|
103
103
|
if (parentJsonPtr === undefined) return
|
|
104
104
|
const fullPath = pathPrefix + jsonPtr
|
|
105
|
-
let
|
|
106
|
-
if (typeof sch[schemaId] == "string")
|
|
105
|
+
let innerBaseId = baseIds[parentJsonPtr]
|
|
106
|
+
if (typeof sch[schemaId] == "string") innerBaseId = addRef.call(this, sch[schemaId])
|
|
107
107
|
addAnchor.call(this, sch.$anchor)
|
|
108
108
|
addAnchor.call(this, sch.$dynamicAnchor)
|
|
109
|
-
baseIds[jsonPtr] =
|
|
109
|
+
baseIds[jsonPtr] = innerBaseId
|
|
110
110
|
|
|
111
111
|
function addRef(this: Ajv, ref: string): string {
|
|
112
112
|
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
113
113
|
const _resolve = this.opts.uriResolver.resolve
|
|
114
|
-
ref = normalizeId(
|
|
114
|
+
ref = normalizeId(innerBaseId ? _resolve(innerBaseId, ref) : ref)
|
|
115
115
|
if (schemaRefs.has(ref)) throw ambiguos(ref)
|
|
116
116
|
schemaRefs.add(ref)
|
|
117
117
|
let schOrRef = this.refs[ref]
|
|
@@ -2,7 +2,7 @@ import type {AddedKeywordDefinition} from "../types"
|
|
|
2
2
|
|
|
3
3
|
const _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"] as const
|
|
4
4
|
|
|
5
|
-
export type JSONType = typeof _jsonTypes[number]
|
|
5
|
+
export type JSONType = (typeof _jsonTypes)[number]
|
|
6
6
|
|
|
7
7
|
const jsonTypes: Set<string> = new Set(_jsonTypes)
|
|
8
8
|
|
|
@@ -30,6 +30,7 @@ export function getSchemaTypes(schema: AnySchemaObject): JSONType[] {
|
|
|
30
30
|
return types
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
33
34
|
export function getJSONTypes(ts: unknown | unknown[]): JSONType[] {
|
|
34
35
|
const types: unknown[] = Array.isArray(ts) ? ts : ts ? [ts] : []
|
|
35
36
|
if (types.every(isJSONType)) return types
|
|
@@ -286,7 +286,7 @@ function checkContextTypes(it: SchemaObjCxt, types: JSONType[]): void {
|
|
|
286
286
|
strictTypesError(it, `type "${t}" not allowed by context "${it.dataTypes.join(",")}"`)
|
|
287
287
|
}
|
|
288
288
|
})
|
|
289
|
-
it
|
|
289
|
+
narrowSchemaTypes(it, types)
|
|
290
290
|
}
|
|
291
291
|
|
|
292
292
|
function checkMultipleTypes(it: SchemaObjCxt, ts: JSONType[]): void {
|
|
@@ -316,6 +316,15 @@ function includesType(ts: JSONType[], t: JSONType): boolean {
|
|
|
316
316
|
return ts.includes(t) || (t === "integer" && ts.includes("number"))
|
|
317
317
|
}
|
|
318
318
|
|
|
319
|
+
function narrowSchemaTypes(it: SchemaObjCxt, withTypes: JSONType[]): void {
|
|
320
|
+
const ts: JSONType[] = []
|
|
321
|
+
for (const t of it.dataTypes) {
|
|
322
|
+
if (includesType(withTypes, t)) ts.push(t)
|
|
323
|
+
else if (withTypes.includes("integer") && t === "number") ts.push("integer")
|
|
324
|
+
}
|
|
325
|
+
it.dataTypes = ts
|
|
326
|
+
}
|
|
327
|
+
|
|
319
328
|
function strictTypesError(it: SchemaObjCxt, msg: string): void {
|
|
320
329
|
const schemaPath = it.schemaEnv.baseId + it.errSchemaPath
|
|
321
330
|
msg += ` at "${schemaPath}" (strictTypes)`
|
|
@@ -343,14 +343,17 @@ export default class Ajv {
|
|
|
343
343
|
validate<T>(schema: JTDSchemaType<T>, data: unknown): data is T
|
|
344
344
|
// This overload is only intended for typescript inference, the first
|
|
345
345
|
// argument prevents manual type annotation from matching this overload
|
|
346
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
346
347
|
validate<N extends never, T extends SomeJTDSchemaType>(
|
|
347
348
|
schema: T,
|
|
348
349
|
data: unknown
|
|
349
350
|
): data is JTDDataType<T>
|
|
351
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
350
352
|
validate<T>(schema: AsyncSchema, data: unknown | T): Promise<T>
|
|
351
353
|
validate<T>(schemaKeyRef: AnySchema | string, data: unknown): data is T | Promise<T>
|
|
352
354
|
validate<T>(
|
|
353
355
|
schemaKeyRef: AnySchema | string, // key, ref or schema object
|
|
356
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
354
357
|
data: unknown | T // to be validated
|
|
355
358
|
): boolean | Promise<T> {
|
|
356
359
|
let v: AnyValidateFunction | undefined
|
|
@@ -374,6 +377,7 @@ export default class Ajv {
|
|
|
374
377
|
compile<T = unknown>(schema: JTDSchemaType<T>, _meta?: boolean): ValidateFunction<T>
|
|
375
378
|
// This overload is only intended for typescript inference, the first
|
|
376
379
|
// argument prevents manual type annotation from matching this overload
|
|
380
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
377
381
|
compile<N extends never, T extends SomeJTDSchemaType>(
|
|
378
382
|
schema: T,
|
|
379
383
|
_meta?: boolean
|
|
@@ -35,7 +35,7 @@ type JTDOptions = CurrentOptions & {
|
|
|
35
35
|
multipleOfPrecision?: never
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
class Ajv extends AjvCore {
|
|
38
|
+
export class Ajv extends AjvCore {
|
|
39
39
|
constructor(opts: JTDOptions = {}) {
|
|
40
40
|
super({
|
|
41
41
|
...opts,
|
|
@@ -93,6 +93,7 @@ class Ajv extends AjvCore {
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
module.exports = exports = Ajv
|
|
96
|
+
module.exports.Ajv = Ajv
|
|
96
97
|
Object.defineProperty(exports, "__esModule", {value: true})
|
|
97
98
|
|
|
98
99
|
export default Ajv
|
|
@@ -127,3 +128,5 @@ export {_, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions} from "./com
|
|
|
127
128
|
|
|
128
129
|
export {JTDSchemaType, SomeJTDSchemaType, JTDDataType}
|
|
129
130
|
export {JTDOptions}
|
|
131
|
+
export {default as ValidationError} from "./runtime/validation_error"
|
|
132
|
+
export {default as MissingRefError} from "./compile/ref_error"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const rxParseJson = /position\s(\d+)
|
|
1
|
+
const rxParseJson = /position\s(\d+)(?: \(line \d+ column \d+\))?$/
|
|
2
2
|
|
|
3
3
|
export function parseJson(s: string, pos: number): unknown {
|
|
4
4
|
let endPos: number | undefined
|
|
@@ -129,6 +129,7 @@ export function parseJsonString(s: string, pos: number): string | undefined {
|
|
|
129
129
|
while (count--) {
|
|
130
130
|
code <<= 4
|
|
131
131
|
c = s[pos]
|
|
132
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
132
133
|
if (c === undefined) {
|
|
133
134
|
errorMessage("unexpected end")
|
|
134
135
|
return undefined
|
|
@@ -48,6 +48,7 @@ export interface DataValidationCxt<T extends string | number = string | number>
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
export interface ValidateFunction<T = unknown> {
|
|
51
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
51
52
|
(this: Ajv | any, data: any, dataCxt?: DataValidationCxt): data is T
|
|
52
53
|
errors?: null | ErrorObject[]
|
|
53
54
|
evaluated?: Evaluated
|
|
@@ -138,9 +139,12 @@ export interface DataValidateFunction {
|
|
|
138
139
|
}
|
|
139
140
|
|
|
140
141
|
export interface SchemaValidateFunction {
|
|
141
|
-
(
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
(
|
|
143
|
+
schema: any,
|
|
144
|
+
data: any,
|
|
145
|
+
parentSchema?: AnySchemaObject,
|
|
146
|
+
dataCxt?: DataValidationCxt
|
|
147
|
+
): boolean | Promise<any>
|
|
144
148
|
errors?: Partial<ErrorObject>[]
|
|
145
149
|
}
|
|
146
150
|
|
|
@@ -74,7 +74,7 @@ type EnumString<T> = [T] extends [never]
|
|
|
74
74
|
: null
|
|
75
75
|
|
|
76
76
|
/** true if type is a union of string literals */
|
|
77
|
-
type IsEnum<T> = null extends EnumString<
|
|
77
|
+
type IsEnum<T> = null extends EnumString<T> ? false : true
|
|
78
78
|
|
|
79
79
|
/** true only if all types are array types (not tuples) */
|
|
80
80
|
// NOTE relies on the fact that tuples don't have an index at 0.5, but arrays
|
|
@@ -88,13 +88,18 @@ type IsElements<T> = false extends IsUnion<T>
|
|
|
88
88
|
: false
|
|
89
89
|
|
|
90
90
|
/** true if the the type is a values type */
|
|
91
|
-
type IsValues<T> = false extends IsUnion<
|
|
92
|
-
|
|
91
|
+
type IsValues<T> = false extends IsUnion<T> ? TypeEquality<keyof T, string> : false
|
|
92
|
+
|
|
93
|
+
/** true if type is a properties type and Union is false, or type is a discriminator type and Union is true */
|
|
94
|
+
type IsRecord<T, Union extends boolean> = Union extends IsUnion<T>
|
|
95
|
+
? null extends EnumString<keyof T>
|
|
96
|
+
? false
|
|
97
|
+
: true
|
|
93
98
|
: false
|
|
94
99
|
|
|
95
|
-
/** true if type
|
|
96
|
-
type
|
|
97
|
-
?
|
|
100
|
+
/** true if type represents an empty record */
|
|
101
|
+
type IsEmptyRecord<T> = [T] extends [Record<string, never>]
|
|
102
|
+
? [T] extends [never]
|
|
98
103
|
? false
|
|
99
104
|
: true
|
|
100
105
|
: false
|
|
@@ -131,7 +136,7 @@ export type JTDSchemaType<T, D extends Record<string, unknown> = Record<string,
|
|
|
131
136
|
? {type: "timestamp"}
|
|
132
137
|
: // enums - only accepts union of string literals
|
|
133
138
|
// TODO we can't actually check that everything in the union was specified
|
|
134
|
-
true extends IsEnum<T
|
|
139
|
+
true extends IsEnum<Exclude<T, null>>
|
|
135
140
|
? {enum: EnumString<Exclude<T, null>>[]}
|
|
136
141
|
: // arrays - only accepts arrays, could be array of unions to be resolved later
|
|
137
142
|
true extends IsElements<Exclude<T, null>>
|
|
@@ -140,15 +145,20 @@ export type JTDSchemaType<T, D extends Record<string, unknown> = Record<string,
|
|
|
140
145
|
elements: JTDSchemaType<E, D>
|
|
141
146
|
}
|
|
142
147
|
: never
|
|
148
|
+
: // empty properties
|
|
149
|
+
true extends IsEmptyRecord<Exclude<T, null>>
|
|
150
|
+
?
|
|
151
|
+
| {properties: Record<string, never>; optionalProperties?: Record<string, never>}
|
|
152
|
+
| {optionalProperties: Record<string, never>}
|
|
143
153
|
: // values
|
|
144
|
-
true extends IsValues<T
|
|
154
|
+
true extends IsValues<Exclude<T, null>>
|
|
145
155
|
? T extends Record<string, infer V>
|
|
146
156
|
? {
|
|
147
157
|
values: JTDSchemaType<V, D>
|
|
148
158
|
}
|
|
149
159
|
: never
|
|
150
160
|
: // properties
|
|
151
|
-
true extends IsRecord<T, false>
|
|
161
|
+
true extends IsRecord<Exclude<T, null>, false>
|
|
152
162
|
? ([RequiredKeys<Exclude<T, null>>] extends [never]
|
|
153
163
|
? {
|
|
154
164
|
properties?: Record<string, never>
|
|
@@ -168,7 +178,7 @@ export type JTDSchemaType<T, D extends Record<string, unknown> = Record<string,
|
|
|
168
178
|
additionalProperties?: boolean
|
|
169
179
|
}
|
|
170
180
|
: // discriminator
|
|
171
|
-
true extends IsRecord<T, true>
|
|
181
|
+
true extends IsRecord<Exclude<T, null>, true>
|
|
172
182
|
? {
|
|
173
183
|
[K in keyof Exclude<T, null>]-?: Exclude<T, null>[K] extends string
|
|
174
184
|
? {
|
|
@@ -176,7 +186,7 @@ export type JTDSchemaType<T, D extends Record<string, unknown> = Record<string,
|
|
|
176
186
|
mapping: {
|
|
177
187
|
// TODO currently allows descriminator to be present in schema
|
|
178
188
|
[M in Exclude<T, null>[K]]: JTDSchemaType<
|
|
179
|
-
Omit<T extends
|
|
189
|
+
Omit<T extends Record<K, M> ? T : never, K>,
|
|
180
190
|
D
|
|
181
191
|
>
|
|
182
192
|
}
|
|
@@ -138,9 +138,7 @@ export function validateProperties(cxt: KeywordCxt): void {
|
|
|
138
138
|
|
|
139
139
|
function validateAdditional(): void {
|
|
140
140
|
gen.forIn("key", data, (key: Name) => {
|
|
141
|
-
const
|
|
142
|
-
it.jtdDiscriminator === undefined ? allProps : [it.jtdDiscriminator].concat(allProps)
|
|
143
|
-
const addProp = isAdditional(key, _allProps, "properties")
|
|
141
|
+
const addProp = isAdditional(key, allProps, "properties", it.jtdDiscriminator)
|
|
144
142
|
const addOptProp = isAdditional(key, allOptProps, "optionalProperties")
|
|
145
143
|
const extra =
|
|
146
144
|
addProp === true ? addOptProp : addOptProp === true ? addProp : and(addProp, addOptProp)
|
|
@@ -159,14 +157,23 @@ export function validateProperties(cxt: KeywordCxt): void {
|
|
|
159
157
|
})
|
|
160
158
|
}
|
|
161
159
|
|
|
162
|
-
function isAdditional(
|
|
160
|
+
function isAdditional(
|
|
161
|
+
key: Name,
|
|
162
|
+
props: string[],
|
|
163
|
+
keyword: string,
|
|
164
|
+
jtdDiscriminator?: string
|
|
165
|
+
): Code | true {
|
|
163
166
|
let additional: Code | boolean
|
|
164
167
|
if (props.length > 8) {
|
|
165
168
|
// TODO maybe an option instead of hard-coded 8?
|
|
166
169
|
const propsSchema = schemaRefOrVal(it, parentSchema[keyword], keyword)
|
|
167
170
|
additional = not(isOwnProperty(gen, propsSchema as Code, key))
|
|
168
|
-
|
|
169
|
-
|
|
171
|
+
if (jtdDiscriminator !== undefined) {
|
|
172
|
+
additional = and(additional, _`${key} !== ${jtdDiscriminator}`)
|
|
173
|
+
}
|
|
174
|
+
} else if (props.length || jtdDiscriminator !== undefined) {
|
|
175
|
+
const ps = jtdDiscriminator === undefined ? props : [jtdDiscriminator].concat(props)
|
|
176
|
+
additional = and(...ps.map((p) => _`${key} !== ${p}`))
|
|
170
177
|
} else {
|
|
171
178
|
additional = true
|
|
172
179
|
}
|