@spotlightjs/spotlight 4.11.4 → 4.11.6
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/dist/_virtual/ajv.js +6 -3
- package/dist/_virtual/ajv2.js +13 -0
- package/dist/_virtual/index.js +6 -3
- package/dist/_virtual/index10.js +3 -3
- package/dist/_virtual/index11.js +3 -3
- package/dist/_virtual/index12.js +13 -0
- package/dist/_virtual/index2.js +3 -3
- package/dist/_virtual/index3.js +3 -3
- package/dist/_virtual/index4.js +3 -3
- package/dist/_virtual/index5.js +3 -3
- package/dist/_virtual/index6.js +3 -3
- package/dist/_virtual/index7.js +3 -3
- package/dist/_virtual/index9.js +3 -3
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js +1 -1
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js.map +1 -1
- package/dist/node_modules/.pnpm/@modelcontextprotocol_sdk@1.27.1_zod@4.1.13/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js +3 -3
- package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/formats.js +203 -194
- package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/formats.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/index.js +47 -47
- package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/index.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/limit.js +77 -69
- package/dist/node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/limit.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/ajv.js +78 -81
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/ajv.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/code.js +145 -136
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/code.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/index.js +692 -685
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/index.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/scope.js +143 -135
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/scope.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/errors.js +122 -116
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/errors.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/index.js +216 -214
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/index.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/names.js +43 -35
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/names.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/ref_error.js +19 -11
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/ref_error.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/resolve.js +149 -144
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/resolve.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/rules.js +31 -25
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/rules.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/util.js +164 -160
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/util.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/applicability.js +23 -17
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/applicability.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/boolSchema.js +7 -10
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/boolSchema.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/dataType.js +174 -173
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/dataType.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/defaults.js +5 -7
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/defaults.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/index.js +21 -28
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/index.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/keyword.js +11 -15
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/keyword.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/subschema.js +5 -7
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/subschema.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/core.js +571 -570
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/core.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/data.json.js +3 -17
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/data.json.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-draft-07.json.js +4 -236
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/refs/json-schema-draft-07.json.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/equal.js +16 -7
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/equal.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/ucs2length.js +27 -18
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/ucs2length.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/uri.js +16 -7
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/uri.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/validation_error.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +55 -48
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +104 -99
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js +30 -22
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +20 -12
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/contains.js +95 -88
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +94 -88
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/if.js +71 -64
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/if.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/index.js +66 -73
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/index.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items.js +60 -54
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js +41 -36
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/not.js +34 -26
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/not.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +60 -53
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +73 -67
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +20 -12
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/properties.js +61 -55
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +46 -39
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +21 -13
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/code.js +132 -129
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/code.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/id.js +17 -8
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/id.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/index.js +27 -20
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/index.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/ref.js +121 -118
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/index.js +104 -100
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/types.js +15 -9
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/draft7.js +30 -26
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/draft7.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/format.js +84 -76
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/format.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/index.js +16 -8
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/format/index.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/metadata.js +24 -18
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/metadata.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/const.js +33 -27
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/const.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/enum.js +53 -47
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/enum.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/index.js +52 -53
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/index.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js +32 -24
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js +37 -31
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +35 -27
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +32 -24
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +31 -23
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/pattern.js +41 -35
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/required.js +80 -74
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/required.js.map +1 -1
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +71 -66
- package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +1 -1
- package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js +34 -27
- package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js.map +1 -1
- package/dist/node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/index.js +250 -245
- package/dist/node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/index.js.map +1 -1
- package/dist/node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/schemes.js +201 -175
- package/dist/node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/schemes.js.map +1 -1
- package/dist/node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/utils.js +267 -259
- package/dist/node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/utils.js.map +1 -1
- package/dist/node_modules/.pnpm/{hono@4.12.18 → hono@4.12.25}/node_modules/hono/dist/helper/streaming/sse.js.map +1 -1
- package/dist/node_modules/.pnpm/{hono@4.12.18 → hono@4.12.25}/node_modules/hono/dist/middleware/cors/index.js +3 -6
- package/dist/node_modules/.pnpm/hono@4.12.25/node_modules/hono/dist/middleware/cors/index.js.map +1 -0
- package/dist/node_modules/.pnpm/{hono@4.12.18 → hono@4.12.25}/node_modules/hono/dist/utils/html.js.map +1 -1
- package/dist/node_modules/.pnpm/{hono@4.12.18 → hono@4.12.25}/node_modules/hono/dist/utils/stream.js +5 -3
- package/dist/node_modules/.pnpm/hono@4.12.25/node_modules/hono/dist/utils/stream.js.map +1 -0
- package/dist/node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js +83 -78
- package/dist/node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js.map +1 -1
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.1.13/node_modules/zod-to-json-schema/dist/esm/Options.js +1 -1
- package/dist/node_modules/.pnpm/zod-to-json-schema@3.25.1_zod@4.1.13/node_modules/zod-to-json-schema/dist/esm/Options.js.map +1 -1
- package/dist/node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/core/util.js +1 -1
- package/dist/node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/core/util.js.map +1 -1
- package/dist/sentry-config.js +2 -2
- package/dist/server/cli/run.js +2 -2
- package/dist/server/cli.js +2 -2
- package/dist/server/main.js +2 -2
- package/dist/server/mcp/mcp.js +2 -2
- package/dist/server/routes/stream/streaming.js +2 -2
- package/dist/ui/assets/index.js +65 -74
- package/dist/ui/assets/index2.js +1 -1
- package/dist/ui/assets/instrumentation.js +18 -18
- package/dist/ui/assets/main.css +1 -1
- package/dist/ui/assets/main.js +1 -1
- package/dist/ui/assets/serverTimingMeta.js +23 -30
- package/package.json +7 -7
- package/dist/node_modules/.pnpm/hono@4.12.18/node_modules/hono/dist/middleware/cors/index.js.map +0 -1
- package/dist/node_modules/.pnpm/hono@4.12.18/node_modules/hono/dist/utils/stream.js.map +0 -1
- /package/dist/node_modules/.pnpm/{hono@4.12.18 → hono@4.12.25}/node_modules/hono/dist/helper/streaming/sse.js +0 -0
- /package/dist/node_modules/.pnpm/{hono@4.12.18 → hono@4.12.25}/node_modules/hono/dist/utils/html.js +0 -0
package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/dataType.js
CHANGED
|
@@ -2,199 +2,200 @@
|
|
|
2
2
|
!(function() {
|
|
3
3
|
try {
|
|
4
4
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
5
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
5
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "02c2a1aa-68fc-4b70-970d-a592ff1e8961", e._sentryDebugIdIdentifier = "sentry-dbid-02c2a1aa-68fc-4b70-970d-a592ff1e8961");
|
|
6
6
|
} catch (e2) {
|
|
7
7
|
}
|
|
8
8
|
})();
|
|
9
9
|
import { __exports as dataType } from "../../../../../../../../_virtual/dataType.js";
|
|
10
|
-
import "../rules.js";
|
|
11
|
-
import "./applicability.js";
|
|
12
|
-
import "../errors.js";
|
|
13
|
-
import "../codegen/index.js";
|
|
14
|
-
import "../util.js";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
10
|
+
import { __require as requireRules } from "../rules.js";
|
|
11
|
+
import { __require as requireApplicability } from "./applicability.js";
|
|
12
|
+
import { __require as requireErrors } from "../errors.js";
|
|
13
|
+
import { __require as requireCodegen } from "../codegen/index.js";
|
|
14
|
+
import { __require as requireUtil } from "../util.js";
|
|
15
|
+
var hasRequiredDataType;
|
|
16
|
+
function requireDataType() {
|
|
17
|
+
if (hasRequiredDataType) return dataType;
|
|
18
|
+
hasRequiredDataType = 1;
|
|
19
|
+
Object.defineProperty(dataType, "__esModule", { value: true });
|
|
20
|
+
dataType.reportTypeError = dataType.checkDataTypes = dataType.checkDataType = dataType.coerceAndCheckDataType = dataType.getJSONTypes = dataType.getSchemaTypes = dataType.DataType = void 0;
|
|
21
|
+
const rules_1 = /* @__PURE__ */ requireRules();
|
|
22
|
+
const applicability_1 = /* @__PURE__ */ requireApplicability();
|
|
23
|
+
const errors_1 = /* @__PURE__ */ requireErrors();
|
|
24
|
+
const codegen_1 = /* @__PURE__ */ requireCodegen();
|
|
25
|
+
const util_1 = /* @__PURE__ */ requireUtil();
|
|
26
|
+
var DataType;
|
|
27
|
+
(function(DataType2) {
|
|
28
|
+
DataType2[DataType2["Correct"] = 0] = "Correct";
|
|
29
|
+
DataType2[DataType2["Wrong"] = 1] = "Wrong";
|
|
30
|
+
})(DataType || (dataType.DataType = DataType = {}));
|
|
31
|
+
function getSchemaTypes(schema) {
|
|
32
|
+
const types = getJSONTypes(schema.type);
|
|
33
|
+
const hasNull = types.includes("null");
|
|
34
|
+
if (hasNull) {
|
|
35
|
+
if (schema.nullable === false)
|
|
36
|
+
throw new Error("type: null contradicts nullable: false");
|
|
37
|
+
} else {
|
|
38
|
+
if (!types.length && schema.nullable !== void 0) {
|
|
39
|
+
throw new Error('"nullable" cannot be used without "type"');
|
|
40
|
+
}
|
|
41
|
+
if (schema.nullable === true)
|
|
42
|
+
types.push("null");
|
|
41
43
|
}
|
|
42
|
-
if (schema.nullable === true)
|
|
43
|
-
types.push("null");
|
|
44
|
-
}
|
|
45
|
-
return types;
|
|
46
|
-
}
|
|
47
|
-
dataType.getSchemaTypes = getSchemaTypes;
|
|
48
|
-
function getJSONTypes(ts) {
|
|
49
|
-
const types = Array.isArray(ts) ? ts : ts ? [ts] : [];
|
|
50
|
-
if (types.every(rules_1.isJSONType))
|
|
51
44
|
return types;
|
|
52
|
-
throw new Error("type must be JSONType or JSONType[]: " + types.join(","));
|
|
53
|
-
}
|
|
54
|
-
dataType.getJSONTypes = getJSONTypes;
|
|
55
|
-
function coerceAndCheckDataType(it, types) {
|
|
56
|
-
const { gen, data, opts } = it;
|
|
57
|
-
const coerceTo = coerceToTypes(types, opts.coerceTypes);
|
|
58
|
-
const checkTypes = types.length > 0 && !(coerceTo.length === 0 && types.length === 1 && (0, applicability_1.schemaHasRulesForType)(it, types[0]));
|
|
59
|
-
if (checkTypes) {
|
|
60
|
-
const wrongType = checkDataTypes(types, data, opts.strictNumbers, DataType.Wrong);
|
|
61
|
-
gen.if(wrongType, () => {
|
|
62
|
-
if (coerceTo.length)
|
|
63
|
-
coerceData(it, types, coerceTo);
|
|
64
|
-
else
|
|
65
|
-
reportTypeError(it);
|
|
66
|
-
});
|
|
67
45
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
function coerceData(it, types, coerceTo) {
|
|
76
|
-
const { gen, data, opts } = it;
|
|
77
|
-
const dataType2 = gen.let("dataType", (0, codegen_1._)`typeof ${data}`);
|
|
78
|
-
const coerced = gen.let("coerced", (0, codegen_1._)`undefined`);
|
|
79
|
-
if (opts.coerceTypes === "array") {
|
|
80
|
-
gen.if((0, codegen_1._)`${dataType2} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen.assign(data, (0, codegen_1._)`${data}[0]`).assign(dataType2, (0, codegen_1._)`typeof ${data}`).if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data)));
|
|
46
|
+
dataType.getSchemaTypes = getSchemaTypes;
|
|
47
|
+
function getJSONTypes(ts) {
|
|
48
|
+
const types = Array.isArray(ts) ? ts : ts ? [ts] : [];
|
|
49
|
+
if (types.every(rules_1.isJSONType))
|
|
50
|
+
return types;
|
|
51
|
+
throw new Error("type must be JSONType or JSONType[]: " + types.join(","));
|
|
81
52
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
53
|
+
dataType.getJSONTypes = getJSONTypes;
|
|
54
|
+
function coerceAndCheckDataType(it, types) {
|
|
55
|
+
const { gen, data, opts } = it;
|
|
56
|
+
const coerceTo = coerceToTypes(types, opts.coerceTypes);
|
|
57
|
+
const checkTypes = types.length > 0 && !(coerceTo.length === 0 && types.length === 1 && (0, applicability_1.schemaHasRulesForType)(it, types[0]));
|
|
58
|
+
if (checkTypes) {
|
|
59
|
+
const wrongType = checkDataTypes(types, data, opts.strictNumbers, DataType.Wrong);
|
|
60
|
+
gen.if(wrongType, () => {
|
|
61
|
+
if (coerceTo.length)
|
|
62
|
+
coerceData(it, types, coerceTo);
|
|
63
|
+
else
|
|
64
|
+
reportTypeError(it);
|
|
65
|
+
});
|
|
86
66
|
}
|
|
67
|
+
return checkTypes;
|
|
87
68
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
69
|
+
dataType.coerceAndCheckDataType = coerceAndCheckDataType;
|
|
70
|
+
const COERCIBLE = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null"]);
|
|
71
|
+
function coerceToTypes(types, coerceTypes) {
|
|
72
|
+
return coerceTypes ? types.filter((t) => COERCIBLE.has(t) || coerceTypes === "array" && t === "array") : [];
|
|
73
|
+
}
|
|
74
|
+
function coerceData(it, types, coerceTo) {
|
|
75
|
+
const { gen, data, opts } = it;
|
|
76
|
+
const dataType2 = gen.let("dataType", (0, codegen_1._)`typeof ${data}`);
|
|
77
|
+
const coerced = gen.let("coerced", (0, codegen_1._)`undefined`);
|
|
78
|
+
if (opts.coerceTypes === "array") {
|
|
79
|
+
gen.if((0, codegen_1._)`${dataType2} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen.assign(data, (0, codegen_1._)`${data}[0]`).assign(dataType2, (0, codegen_1._)`typeof ${data}`).if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data)));
|
|
80
|
+
}
|
|
81
|
+
gen.if((0, codegen_1._)`${coerced} !== undefined`);
|
|
82
|
+
for (const t of coerceTo) {
|
|
83
|
+
if (COERCIBLE.has(t) || t === "array" && opts.coerceTypes === "array") {
|
|
84
|
+
coerceSpecificType(t);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
gen.else();
|
|
88
|
+
reportTypeError(it);
|
|
89
|
+
gen.endIf();
|
|
90
|
+
gen.if((0, codegen_1._)`${coerced} !== undefined`, () => {
|
|
91
|
+
gen.assign(data, coerced);
|
|
92
|
+
assignParentData(it, coerced);
|
|
93
|
+
});
|
|
94
|
+
function coerceSpecificType(t) {
|
|
95
|
+
switch (t) {
|
|
96
|
+
case "string":
|
|
97
|
+
gen.elseIf((0, codegen_1._)`${dataType2} == "number" || ${dataType2} == "boolean"`).assign(coerced, (0, codegen_1._)`"" + ${data}`).elseIf((0, codegen_1._)`${data} === null`).assign(coerced, (0, codegen_1._)`""`);
|
|
98
|
+
return;
|
|
99
|
+
case "number":
|
|
100
|
+
gen.elseIf((0, codegen_1._)`${dataType2} == "boolean" || ${data} === null
|
|
102
101
|
|| (${dataType2} == "string" && ${data} && ${data} == +${data})`).assign(coerced, (0, codegen_1._)`+${data}`);
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
return;
|
|
103
|
+
case "integer":
|
|
104
|
+
gen.elseIf((0, codegen_1._)`${dataType2} === "boolean" || ${data} === null
|
|
106
105
|
|| (${dataType2} === "string" && ${data} && ${data} == +${data} && !(${data} % 1))`).assign(coerced, (0, codegen_1._)`+${data}`);
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
106
|
+
return;
|
|
107
|
+
case "boolean":
|
|
108
|
+
gen.elseIf((0, codegen_1._)`${data} === "false" || ${data} === 0 || ${data} === null`).assign(coerced, false).elseIf((0, codegen_1._)`${data} === "true" || ${data} === 1`).assign(coerced, true);
|
|
109
|
+
return;
|
|
110
|
+
case "null":
|
|
111
|
+
gen.elseIf((0, codegen_1._)`${data} === "" || ${data} === 0 || ${data} === false`);
|
|
112
|
+
gen.assign(coerced, null);
|
|
113
|
+
return;
|
|
114
|
+
case "array":
|
|
115
|
+
gen.elseIf((0, codegen_1._)`${dataType2} === "string" || ${dataType2} === "number"
|
|
117
116
|
|| ${dataType2} === "boolean" || ${data} === null`).assign(coerced, (0, codegen_1._)`[${data}]`);
|
|
117
|
+
}
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
gen.if((0, codegen_1._)`${parentData} !== undefined`, () => gen.assign((0, codegen_1._)`${parentData}[${parentDataProperty}]`, expr));
|
|
123
|
-
}
|
|
124
|
-
function checkDataType(dataType2, data, strictNums, correct = DataType.Correct) {
|
|
125
|
-
const EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ;
|
|
126
|
-
let cond;
|
|
127
|
-
switch (dataType2) {
|
|
128
|
-
case "null":
|
|
129
|
-
return (0, codegen_1._)`${data} ${EQ} null`;
|
|
130
|
-
case "array":
|
|
131
|
-
cond = (0, codegen_1._)`Array.isArray(${data})`;
|
|
132
|
-
break;
|
|
133
|
-
case "object":
|
|
134
|
-
cond = (0, codegen_1._)`${data} && typeof ${data} == "object" && !Array.isArray(${data})`;
|
|
135
|
-
break;
|
|
136
|
-
case "integer":
|
|
137
|
-
cond = numCond((0, codegen_1._)`!(${data} % 1) && !isNaN(${data})`);
|
|
138
|
-
break;
|
|
139
|
-
case "number":
|
|
140
|
-
cond = numCond();
|
|
141
|
-
break;
|
|
142
|
-
default:
|
|
143
|
-
return (0, codegen_1._)`typeof ${data} ${EQ} ${dataType2}`;
|
|
120
|
+
function assignParentData({ gen, parentData, parentDataProperty }, expr) {
|
|
121
|
+
gen.if((0, codegen_1._)`${parentData} !== undefined`, () => gen.assign((0, codegen_1._)`${parentData}[${parentDataProperty}]`, expr));
|
|
144
122
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
123
|
+
function checkDataType(dataType2, data, strictNums, correct = DataType.Correct) {
|
|
124
|
+
const EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ;
|
|
125
|
+
let cond;
|
|
126
|
+
switch (dataType2) {
|
|
127
|
+
case "null":
|
|
128
|
+
return (0, codegen_1._)`${data} ${EQ} null`;
|
|
129
|
+
case "array":
|
|
130
|
+
cond = (0, codegen_1._)`Array.isArray(${data})`;
|
|
131
|
+
break;
|
|
132
|
+
case "object":
|
|
133
|
+
cond = (0, codegen_1._)`${data} && typeof ${data} == "object" && !Array.isArray(${data})`;
|
|
134
|
+
break;
|
|
135
|
+
case "integer":
|
|
136
|
+
cond = numCond((0, codegen_1._)`!(${data} % 1) && !isNaN(${data})`);
|
|
137
|
+
break;
|
|
138
|
+
case "number":
|
|
139
|
+
cond = numCond();
|
|
140
|
+
break;
|
|
141
|
+
default:
|
|
142
|
+
return (0, codegen_1._)`typeof ${data} ${EQ} ${dataType2}`;
|
|
143
|
+
}
|
|
144
|
+
return correct === DataType.Correct ? cond : (0, codegen_1.not)(cond);
|
|
145
|
+
function numCond(_cond = codegen_1.nil) {
|
|
146
|
+
return (0, codegen_1.and)((0, codegen_1._)`typeof ${data} == "number"`, _cond, strictNums ? (0, codegen_1._)`isFinite(${data})` : codegen_1.nil);
|
|
147
|
+
}
|
|
154
148
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
149
|
+
dataType.checkDataType = checkDataType;
|
|
150
|
+
function checkDataTypes(dataTypes, data, strictNums, correct) {
|
|
151
|
+
if (dataTypes.length === 1) {
|
|
152
|
+
return checkDataType(dataTypes[0], data, strictNums, correct);
|
|
153
|
+
}
|
|
154
|
+
let cond;
|
|
155
|
+
const types = (0, util_1.toHash)(dataTypes);
|
|
156
|
+
if (types.array && types.object) {
|
|
157
|
+
const notObj = (0, codegen_1._)`typeof ${data} != "object"`;
|
|
158
|
+
cond = types.null ? notObj : (0, codegen_1._)`!${data} || ${notObj}`;
|
|
159
|
+
delete types.null;
|
|
160
|
+
delete types.array;
|
|
161
|
+
delete types.object;
|
|
162
|
+
} else {
|
|
163
|
+
cond = codegen_1.nil;
|
|
164
|
+
}
|
|
165
|
+
if (types.number)
|
|
166
|
+
delete types.integer;
|
|
167
|
+
for (const t in types)
|
|
168
|
+
cond = (0, codegen_1.and)(cond, checkDataType(t, data, strictNums, correct));
|
|
169
|
+
return cond;
|
|
165
170
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
return cond;
|
|
171
|
-
}
|
|
172
|
-
dataType.checkDataTypes = checkDataTypes;
|
|
173
|
-
const typeError = {
|
|
174
|
-
message: ({ schema }) => `must be ${schema}`,
|
|
175
|
-
params: ({ schema, schemaValue }) => typeof schema == "string" ? (0, codegen_1._)`{type: ${schema}}` : (0, codegen_1._)`{type: ${schemaValue}}`
|
|
176
|
-
};
|
|
177
|
-
function reportTypeError(it) {
|
|
178
|
-
const cxt = getTypeErrorContext(it);
|
|
179
|
-
(0, errors_1.reportError)(cxt, typeError);
|
|
180
|
-
}
|
|
181
|
-
dataType.reportTypeError = reportTypeError;
|
|
182
|
-
function getTypeErrorContext(it) {
|
|
183
|
-
const { gen, data, schema } = it;
|
|
184
|
-
const schemaCode = (0, util_1.schemaRefOrVal)(it, schema, "type");
|
|
185
|
-
return {
|
|
186
|
-
gen,
|
|
187
|
-
keyword: "type",
|
|
188
|
-
data,
|
|
189
|
-
schema: schema.type,
|
|
190
|
-
schemaCode,
|
|
191
|
-
schemaValue: schemaCode,
|
|
192
|
-
parentSchema: schema,
|
|
193
|
-
params: {},
|
|
194
|
-
it
|
|
171
|
+
dataType.checkDataTypes = checkDataTypes;
|
|
172
|
+
const typeError = {
|
|
173
|
+
message: ({ schema }) => `must be ${schema}`,
|
|
174
|
+
params: ({ schema, schemaValue }) => typeof schema == "string" ? (0, codegen_1._)`{type: ${schema}}` : (0, codegen_1._)`{type: ${schemaValue}}`
|
|
195
175
|
};
|
|
176
|
+
function reportTypeError(it) {
|
|
177
|
+
const cxt = getTypeErrorContext(it);
|
|
178
|
+
(0, errors_1.reportError)(cxt, typeError);
|
|
179
|
+
}
|
|
180
|
+
dataType.reportTypeError = reportTypeError;
|
|
181
|
+
function getTypeErrorContext(it) {
|
|
182
|
+
const { gen, data, schema } = it;
|
|
183
|
+
const schemaCode = (0, util_1.schemaRefOrVal)(it, schema, "type");
|
|
184
|
+
return {
|
|
185
|
+
gen,
|
|
186
|
+
keyword: "type",
|
|
187
|
+
data,
|
|
188
|
+
schema: schema.type,
|
|
189
|
+
schemaCode,
|
|
190
|
+
schemaValue: schemaCode,
|
|
191
|
+
parentSchema: schema,
|
|
192
|
+
params: {},
|
|
193
|
+
it
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
return dataType;
|
|
196
197
|
}
|
|
197
198
|
export {
|
|
198
|
-
|
|
199
|
+
requireDataType as __require
|
|
199
200
|
};
|
|
200
201
|
//# sourceMappingURL=dataType.js.map
|
package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/dataType.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataType.js","sources":["../../../../../../../../../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/dataType.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = void 0;\nconst rules_1 = require(\"../rules\");\nconst applicability_1 = require(\"./applicability\");\nconst errors_1 = require(\"../errors\");\nconst codegen_1 = require(\"../codegen\");\nconst util_1 = require(\"../util\");\nvar DataType;\n(function (DataType) {\n DataType[DataType[\"Correct\"] = 0] = \"Correct\";\n DataType[DataType[\"Wrong\"] = 1] = \"Wrong\";\n})(DataType || (exports.DataType = DataType = {}));\nfunction getSchemaTypes(schema) {\n const types = getJSONTypes(schema.type);\n const hasNull = types.includes(\"null\");\n if (hasNull) {\n if (schema.nullable === false)\n throw new Error(\"type: null contradicts nullable: false\");\n }\n else {\n if (!types.length && schema.nullable !== undefined) {\n throw new Error('\"nullable\" cannot be used without \"type\"');\n }\n if (schema.nullable === true)\n types.push(\"null\");\n }\n return types;\n}\nexports.getSchemaTypes = getSchemaTypes;\n// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\nfunction getJSONTypes(ts) {\n const types = Array.isArray(ts) ? ts : ts ? [ts] : [];\n if (types.every(rules_1.isJSONType))\n return types;\n throw new Error(\"type must be JSONType or JSONType[]: \" + types.join(\",\"));\n}\nexports.getJSONTypes = getJSONTypes;\nfunction coerceAndCheckDataType(it, types) {\n const { gen, data, opts } = it;\n const coerceTo = coerceToTypes(types, opts.coerceTypes);\n const checkTypes = types.length > 0 &&\n !(coerceTo.length === 0 && types.length === 1 && (0, applicability_1.schemaHasRulesForType)(it, types[0]));\n if (checkTypes) {\n const wrongType = checkDataTypes(types, data, opts.strictNumbers, DataType.Wrong);\n gen.if(wrongType, () => {\n if (coerceTo.length)\n coerceData(it, types, coerceTo);\n else\n reportTypeError(it);\n });\n }\n return checkTypes;\n}\nexports.coerceAndCheckDataType = coerceAndCheckDataType;\nconst COERCIBLE = new Set([\"string\", \"number\", \"integer\", \"boolean\", \"null\"]);\nfunction coerceToTypes(types, coerceTypes) {\n return coerceTypes\n ? types.filter((t) => COERCIBLE.has(t) || (coerceTypes === \"array\" && t === \"array\"))\n : [];\n}\nfunction coerceData(it, types, coerceTo) {\n const { gen, data, opts } = it;\n const dataType = gen.let(\"dataType\", (0, codegen_1._) `typeof ${data}`);\n const coerced = gen.let(\"coerced\", (0, codegen_1._) `undefined`);\n if (opts.coerceTypes === \"array\") {\n gen.if((0, codegen_1._) `${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen\n .assign(data, (0, codegen_1._) `${data}[0]`)\n .assign(dataType, (0, codegen_1._) `typeof ${data}`)\n .if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data)));\n }\n gen.if((0, codegen_1._) `${coerced} !== undefined`);\n for (const t of coerceTo) {\n if (COERCIBLE.has(t) || (t === \"array\" && opts.coerceTypes === \"array\")) {\n coerceSpecificType(t);\n }\n }\n gen.else();\n reportTypeError(it);\n gen.endIf();\n gen.if((0, codegen_1._) `${coerced} !== undefined`, () => {\n gen.assign(data, coerced);\n assignParentData(it, coerced);\n });\n function coerceSpecificType(t) {\n switch (t) {\n case \"string\":\n gen\n .elseIf((0, codegen_1._) `${dataType} == \"number\" || ${dataType} == \"boolean\"`)\n .assign(coerced, (0, codegen_1._) `\"\" + ${data}`)\n .elseIf((0, codegen_1._) `${data} === null`)\n .assign(coerced, (0, codegen_1._) `\"\"`);\n return;\n case \"number\":\n gen\n .elseIf((0, codegen_1._) `${dataType} == \"boolean\" || ${data} === null\n || (${dataType} == \"string\" && ${data} && ${data} == +${data})`)\n .assign(coerced, (0, codegen_1._) `+${data}`);\n return;\n case \"integer\":\n gen\n .elseIf((0, codegen_1._) `${dataType} === \"boolean\" || ${data} === null\n || (${dataType} === \"string\" && ${data} && ${data} == +${data} && !(${data} % 1))`)\n .assign(coerced, (0, codegen_1._) `+${data}`);\n return;\n case \"boolean\":\n gen\n .elseIf((0, codegen_1._) `${data} === \"false\" || ${data} === 0 || ${data} === null`)\n .assign(coerced, false)\n .elseIf((0, codegen_1._) `${data} === \"true\" || ${data} === 1`)\n .assign(coerced, true);\n return;\n case \"null\":\n gen.elseIf((0, codegen_1._) `${data} === \"\" || ${data} === 0 || ${data} === false`);\n gen.assign(coerced, null);\n return;\n case \"array\":\n gen\n .elseIf((0, codegen_1._) `${dataType} === \"string\" || ${dataType} === \"number\"\n || ${dataType} === \"boolean\" || ${data} === null`)\n .assign(coerced, (0, codegen_1._) `[${data}]`);\n }\n }\n}\nfunction assignParentData({ gen, parentData, parentDataProperty }, expr) {\n // TODO use gen.property\n gen.if((0, codegen_1._) `${parentData} !== undefined`, () => gen.assign((0, codegen_1._) `${parentData}[${parentDataProperty}]`, expr));\n}\nfunction checkDataType(dataType, data, strictNums, correct = DataType.Correct) {\n const EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ;\n let cond;\n switch (dataType) {\n case \"null\":\n return (0, codegen_1._) `${data} ${EQ} null`;\n case \"array\":\n cond = (0, codegen_1._) `Array.isArray(${data})`;\n break;\n case \"object\":\n cond = (0, codegen_1._) `${data} && typeof ${data} == \"object\" && !Array.isArray(${data})`;\n break;\n case \"integer\":\n cond = numCond((0, codegen_1._) `!(${data} % 1) && !isNaN(${data})`);\n break;\n case \"number\":\n cond = numCond();\n break;\n default:\n return (0, codegen_1._) `typeof ${data} ${EQ} ${dataType}`;\n }\n return correct === DataType.Correct ? cond : (0, codegen_1.not)(cond);\n function numCond(_cond = codegen_1.nil) {\n return (0, codegen_1.and)((0, codegen_1._) `typeof ${data} == \"number\"`, _cond, strictNums ? (0, codegen_1._) `isFinite(${data})` : codegen_1.nil);\n }\n}\nexports.checkDataType = checkDataType;\nfunction checkDataTypes(dataTypes, data, strictNums, correct) {\n if (dataTypes.length === 1) {\n return checkDataType(dataTypes[0], data, strictNums, correct);\n }\n let cond;\n const types = (0, util_1.toHash)(dataTypes);\n if (types.array && types.object) {\n const notObj = (0, codegen_1._) `typeof ${data} != \"object\"`;\n cond = types.null ? notObj : (0, codegen_1._) `!${data} || ${notObj}`;\n delete types.null;\n delete types.array;\n delete types.object;\n }\n else {\n cond = codegen_1.nil;\n }\n if (types.number)\n delete types.integer;\n for (const t in types)\n cond = (0, codegen_1.and)(cond, checkDataType(t, data, strictNums, correct));\n return cond;\n}\nexports.checkDataTypes = checkDataTypes;\nconst typeError = {\n message: ({ schema }) => `must be ${schema}`,\n params: ({ schema, schemaValue }) => typeof schema == \"string\" ? (0, codegen_1._) `{type: ${schema}}` : (0, codegen_1._) `{type: ${schemaValue}}`,\n};\nfunction reportTypeError(it) {\n const cxt = getTypeErrorContext(it);\n (0, errors_1.reportError)(cxt, typeError);\n}\nexports.reportTypeError = reportTypeError;\nfunction getTypeErrorContext(it) {\n const { gen, data, schema } = it;\n const schemaCode = (0, util_1.schemaRefOrVal)(it, schema, \"type\");\n return {\n gen,\n keyword: \"type\",\n data,\n schema: schema.type,\n schemaCode,\n schemaValue: schemaCode,\n parentSchema: schema,\n params: {},\n it,\n };\n}\n//# sourceMappingURL=dataType.js.map"],"names":["require$$0","require$$1","require$$2","require$$3","require$$4","DataType","dataType"],"mappings":";;;;;;;;;;;;;;;;;;;AACA,OAAO,eAAe,UAAS,cAAc,EAAE,OAAO,KAAI,CAAE;AAC5D,SAAA,kBAA0B,SAAA,iBAAyB,SAAA,gBAAwB,SAAA,yBAAiC,SAAA,yCAAgD,SAAA,WAAmB;AAC/K,MAAM,UAAUA;AAChB,MAAM,kBAAkBC;AACxB,MAAM,WAAWC;AACjB,MAAM,YAAYC;AAClB,MAAM,SAASC;AACf,IAAI;AAAA,CACH,SAAUC,WAAU;AACjB,EAAAA,UAASA,UAAS,SAAS,IAAI,CAAC,IAAI;AACpC,EAAAA,UAASA,UAAS,OAAO,IAAI,CAAC,IAAI;AACtC,GAAG,aAAa,SAAA,WAAmB,WAAW,CAAA,EAAG;AACjD,SAAS,eAAe,QAAQ;AAC5B,QAAM,QAAQ,aAAa,OAAO,IAAI;AACtC,QAAM,UAAU,MAAM,SAAS,MAAM;AACrC,MAAI,SAAS;AACT,QAAI,OAAO,aAAa;AACpB,YAAM,IAAI,MAAM,wCAAwC;AAAA,EACpE,OACS;AACD,QAAI,CAAC,MAAM,UAAU,OAAO,aAAa,QAAW;AAChD,YAAM,IAAI,MAAM,0CAA0C;AAAA,IACtE;AACQ,QAAI,OAAO,aAAa;AACpB,YAAM,KAAK,MAAM;AAAA,EAC7B;AACI,SAAO;AACX;AACA,SAAA,iBAAyB;AAEzB,SAAS,aAAa,IAAI;AACtB,QAAM,QAAQ,MAAM,QAAQ,EAAE,IAAI,K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AC9B,QAAM,cAAa,GAAI,OAAO,gBAAgB,IAAI,QAAQ,MAAM;AAChE,SAAO;AAAA,IACH;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA,QAAQ,OAAO;AAAA,IACf;AAAA,IACA,aAAa;AAAA,IACb,cAAc;AAAA,IACd,QAAQ,CAAA;AAAA,IACR;AAAA,EACR;AACA;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"dataType.js","sources":["../../../../../../../../../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/dataType.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = void 0;\nconst rules_1 = require(\"../rules\");\nconst applicability_1 = require(\"./applicability\");\nconst errors_1 = require(\"../errors\");\nconst codegen_1 = require(\"../codegen\");\nconst util_1 = require(\"../util\");\nvar DataType;\n(function (DataType) {\n DataType[DataType[\"Correct\"] = 0] = \"Correct\";\n DataType[DataType[\"Wrong\"] = 1] = \"Wrong\";\n})(DataType || (exports.DataType = DataType = {}));\nfunction getSchemaTypes(schema) {\n const types = getJSONTypes(schema.type);\n const hasNull = types.includes(\"null\");\n if (hasNull) {\n if (schema.nullable === false)\n throw new Error(\"type: null contradicts nullable: false\");\n }\n else {\n if (!types.length && schema.nullable !== undefined) {\n throw new Error('\"nullable\" cannot be used without \"type\"');\n }\n if (schema.nullable === true)\n types.push(\"null\");\n }\n return types;\n}\nexports.getSchemaTypes = getSchemaTypes;\n// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\nfunction getJSONTypes(ts) {\n const types = Array.isArray(ts) ? ts : ts ? [ts] : [];\n if (types.every(rules_1.isJSONType))\n return types;\n throw new Error(\"type must be JSONType or JSONType[]: \" + types.join(\",\"));\n}\nexports.getJSONTypes = getJSONTypes;\nfunction coerceAndCheckDataType(it, types) {\n const { gen, data, opts } = it;\n const coerceTo = coerceToTypes(types, opts.coerceTypes);\n const checkTypes = types.length > 0 &&\n !(coerceTo.length === 0 && types.length === 1 && (0, applicability_1.schemaHasRulesForType)(it, types[0]));\n if (checkTypes) {\n const wrongType = checkDataTypes(types, data, opts.strictNumbers, DataType.Wrong);\n gen.if(wrongType, () => {\n if (coerceTo.length)\n coerceData(it, types, coerceTo);\n else\n reportTypeError(it);\n });\n }\n return checkTypes;\n}\nexports.coerceAndCheckDataType = coerceAndCheckDataType;\nconst COERCIBLE = new Set([\"string\", \"number\", \"integer\", \"boolean\", \"null\"]);\nfunction coerceToTypes(types, coerceTypes) {\n return coerceTypes\n ? types.filter((t) => COERCIBLE.has(t) || (coerceTypes === \"array\" && t === \"array\"))\n : [];\n}\nfunction coerceData(it, types, coerceTo) {\n const { gen, data, opts } = it;\n const dataType = gen.let(\"dataType\", (0, codegen_1._) `typeof ${data}`);\n const coerced = gen.let(\"coerced\", (0, codegen_1._) `undefined`);\n if (opts.coerceTypes === \"array\") {\n gen.if((0, codegen_1._) `${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen\n .assign(data, (0, codegen_1._) `${data}[0]`)\n .assign(dataType, (0, codegen_1._) `typeof ${data}`)\n .if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data)));\n }\n gen.if((0, codegen_1._) `${coerced} !== undefined`);\n for (const t of coerceTo) {\n if (COERCIBLE.has(t) || (t === \"array\" && opts.coerceTypes === \"array\")) {\n coerceSpecificType(t);\n }\n }\n gen.else();\n reportTypeError(it);\n gen.endIf();\n gen.if((0, codegen_1._) `${coerced} !== undefined`, () => {\n gen.assign(data, coerced);\n assignParentData(it, coerced);\n });\n function coerceSpecificType(t) {\n switch (t) {\n case \"string\":\n gen\n .elseIf((0, codegen_1._) `${dataType} == \"number\" || ${dataType} == \"boolean\"`)\n .assign(coerced, (0, codegen_1._) `\"\" + ${data}`)\n .elseIf((0, codegen_1._) `${data} === null`)\n .assign(coerced, (0, codegen_1._) `\"\"`);\n return;\n case \"number\":\n gen\n .elseIf((0, codegen_1._) `${dataType} == \"boolean\" || ${data} === null\n || (${dataType} == \"string\" && ${data} && ${data} == +${data})`)\n .assign(coerced, (0, codegen_1._) `+${data}`);\n return;\n case \"integer\":\n gen\n .elseIf((0, codegen_1._) `${dataType} === \"boolean\" || ${data} === null\n || (${dataType} === \"string\" && ${data} && ${data} == +${data} && !(${data} % 1))`)\n .assign(coerced, (0, codegen_1._) `+${data}`);\n return;\n case \"boolean\":\n gen\n .elseIf((0, codegen_1._) `${data} === \"false\" || ${data} === 0 || ${data} === null`)\n .assign(coerced, false)\n .elseIf((0, codegen_1._) `${data} === \"true\" || ${data} === 1`)\n .assign(coerced, true);\n return;\n case \"null\":\n gen.elseIf((0, codegen_1._) `${data} === \"\" || ${data} === 0 || ${data} === false`);\n gen.assign(coerced, null);\n return;\n case \"array\":\n gen\n .elseIf((0, codegen_1._) `${dataType} === \"string\" || ${dataType} === \"number\"\n || ${dataType} === \"boolean\" || ${data} === null`)\n .assign(coerced, (0, codegen_1._) `[${data}]`);\n }\n }\n}\nfunction assignParentData({ gen, parentData, parentDataProperty }, expr) {\n // TODO use gen.property\n gen.if((0, codegen_1._) `${parentData} !== undefined`, () => gen.assign((0, codegen_1._) `${parentData}[${parentDataProperty}]`, expr));\n}\nfunction checkDataType(dataType, data, strictNums, correct = DataType.Correct) {\n const EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ;\n let cond;\n switch (dataType) {\n case \"null\":\n return (0, codegen_1._) `${data} ${EQ} null`;\n case \"array\":\n cond = (0, codegen_1._) `Array.isArray(${data})`;\n break;\n case \"object\":\n cond = (0, codegen_1._) `${data} && typeof ${data} == \"object\" && !Array.isArray(${data})`;\n break;\n case \"integer\":\n cond = numCond((0, codegen_1._) `!(${data} % 1) && !isNaN(${data})`);\n break;\n case \"number\":\n cond = numCond();\n break;\n default:\n return (0, codegen_1._) `typeof ${data} ${EQ} ${dataType}`;\n }\n return correct === DataType.Correct ? cond : (0, codegen_1.not)(cond);\n function numCond(_cond = codegen_1.nil) {\n return (0, codegen_1.and)((0, codegen_1._) `typeof ${data} == \"number\"`, _cond, strictNums ? (0, codegen_1._) `isFinite(${data})` : codegen_1.nil);\n }\n}\nexports.checkDataType = checkDataType;\nfunction checkDataTypes(dataTypes, data, strictNums, correct) {\n if (dataTypes.length === 1) {\n return checkDataType(dataTypes[0], data, strictNums, correct);\n }\n let cond;\n const types = (0, util_1.toHash)(dataTypes);\n if (types.array && types.object) {\n const notObj = (0, codegen_1._) `typeof ${data} != \"object\"`;\n cond = types.null ? notObj : (0, codegen_1._) `!${data} || ${notObj}`;\n delete types.null;\n delete types.array;\n delete types.object;\n }\n else {\n cond = codegen_1.nil;\n }\n if (types.number)\n delete types.integer;\n for (const t in types)\n cond = (0, codegen_1.and)(cond, checkDataType(t, data, strictNums, correct));\n return cond;\n}\nexports.checkDataTypes = checkDataTypes;\nconst typeError = {\n message: ({ schema }) => `must be ${schema}`,\n params: ({ schema, schemaValue }) => typeof schema == \"string\" ? (0, codegen_1._) `{type: ${schema}}` : (0, codegen_1._) `{type: ${schemaValue}}`,\n};\nfunction reportTypeError(it) {\n const cxt = getTypeErrorContext(it);\n (0, errors_1.reportError)(cxt, typeError);\n}\nexports.reportTypeError = reportTypeError;\nfunction getTypeErrorContext(it) {\n const { gen, data, schema } = it;\n const schemaCode = (0, util_1.schemaRefOrVal)(it, schema, \"type\");\n return {\n gen,\n keyword: \"type\",\n data,\n schema: schema.type,\n schemaCode,\n schemaValue: schemaCode,\n parentSchema: schema,\n params: {},\n it,\n };\n}\n//# sourceMappingURL=dataType.js.map"],"names":["require$$0","require$$1","require$$2","require$$3","require$$4","DataType","dataType"],"mappings":";;;;;;;;;;;;;;;;;;AACA,SAAO,eAAe,UAAS,cAAc,EAAE,OAAO,MAAM;AAC5D,WAAA,kBAA0B,SAAA,iBAAyB,SAAA,gBAAwB,SAAA,yBAAiC,SAAA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3
3
|
try {
|
|
4
4
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
5
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
5
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "a23c84e3-c9be-4ff1-8c5a-51e81e4798a3", e._sentryDebugIdIdentifier = "sentry-dbid-a23c84e3-c9be-4ff1-8c5a-51e81e4798a3");
|
|
6
6
|
} catch (e2) {
|
|
7
7
|
}
|
|
8
8
|
})();
|
|
9
9
|
import { __exports as defaults } from "../../../../../../../../_virtual/defaults.js";
|
|
10
|
-
import "../codegen/index.js";
|
|
11
|
-
import "../util.js";
|
|
12
|
-
import { __exports as codegen } from "../../../../../../../../_virtual/index.js";
|
|
13
|
-
import { __exports as util } from "../../../../../../../../_virtual/util.js";
|
|
10
|
+
import { __require as requireCodegen } from "../codegen/index.js";
|
|
11
|
+
import { __require as requireUtil } from "../util.js";
|
|
14
12
|
var hasRequiredDefaults;
|
|
15
13
|
function requireDefaults() {
|
|
16
14
|
if (hasRequiredDefaults) return defaults;
|
|
17
15
|
hasRequiredDefaults = 1;
|
|
18
16
|
Object.defineProperty(defaults, "__esModule", { value: true });
|
|
19
17
|
defaults.assignDefaults = void 0;
|
|
20
|
-
const codegen_1 =
|
|
21
|
-
const util_1 =
|
|
18
|
+
const codegen_1 = /* @__PURE__ */ requireCodegen();
|
|
19
|
+
const util_1 = /* @__PURE__ */ requireUtil();
|
|
22
20
|
function assignDefaults(it, ty) {
|
|
23
21
|
const { properties, items } = it.schema;
|
|
24
22
|
if (ty === "object" && properties) {
|
package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/defaults.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.js","sources":["../../../../../../../../../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/defaults.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assignDefaults = void 0;\nconst codegen_1 = require(\"../codegen\");\nconst util_1 = require(\"../util\");\nfunction assignDefaults(it, ty) {\n const { properties, items } = it.schema;\n if (ty === \"object\" && properties) {\n for (const key in properties) {\n assignDefault(it, key, properties[key].default);\n }\n }\n else if (ty === \"array\" && Array.isArray(items)) {\n items.forEach((sch, i) => assignDefault(it, i, sch.default));\n }\n}\nexports.assignDefaults = assignDefaults;\nfunction assignDefault(it, prop, defaultValue) {\n const { gen, compositeRule, data, opts } = it;\n if (defaultValue === undefined)\n return;\n const childData = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(prop)}`;\n if (compositeRule) {\n (0, util_1.checkStrictMode)(it, `default is ignored for: ${childData}`);\n return;\n }\n let condition = (0, codegen_1._) `${childData} === undefined`;\n if (opts.useDefaults === \"empty\") {\n condition = (0, codegen_1._) `${condition} || ${childData} === null || ${childData} === \"\"`;\n }\n // `${childData} === undefined` +\n // (opts.useDefaults === \"empty\" ? ` || ${childData} === null || ${childData} === \"\"` : \"\")\n gen.if(condition, (0, codegen_1._) `${childData} = ${(0, codegen_1.stringify)(defaultValue)}`);\n}\n//# sourceMappingURL=defaults.js.map"],"names":["require$$0","require$$1"],"mappings":"
|
|
1
|
+
{"version":3,"file":"defaults.js","sources":["../../../../../../../../../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/defaults.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assignDefaults = void 0;\nconst codegen_1 = require(\"../codegen\");\nconst util_1 = require(\"../util\");\nfunction assignDefaults(it, ty) {\n const { properties, items } = it.schema;\n if (ty === \"object\" && properties) {\n for (const key in properties) {\n assignDefault(it, key, properties[key].default);\n }\n }\n else if (ty === \"array\" && Array.isArray(items)) {\n items.forEach((sch, i) => assignDefault(it, i, sch.default));\n }\n}\nexports.assignDefaults = assignDefaults;\nfunction assignDefault(it, prop, defaultValue) {\n const { gen, compositeRule, data, opts } = it;\n if (defaultValue === undefined)\n return;\n const childData = (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(prop)}`;\n if (compositeRule) {\n (0, util_1.checkStrictMode)(it, `default is ignored for: ${childData}`);\n return;\n }\n let condition = (0, codegen_1._) `${childData} === undefined`;\n if (opts.useDefaults === \"empty\") {\n condition = (0, codegen_1._) `${condition} || ${childData} === null || ${childData} === \"\"`;\n }\n // `${childData} === undefined` +\n // (opts.useDefaults === \"empty\" ? ` || ${childData} === null || ${childData} === \"\"` : \"\")\n gen.if(condition, (0, codegen_1._) `${childData} = ${(0, codegen_1.stringify)(defaultValue)}`);\n}\n//# sourceMappingURL=defaults.js.map"],"names":["require$$0","require$$1"],"mappings":";;;;;;;;;;;;;;;AACA,SAAO,eAAe,UAAS,cAAc,EAAE,OAAO,MAAM;AAC5D,WAAA,iBAAyB;AACzB,QAAM,YAAYA,+BAAA;AAClB,QAAM,SAASC,4BAAA;AACf,WAAS,eAAe,IAAI,IAAI;AAC5B,UAAM,EAAE,YAAY,MAAK,IAAK,GAAG;AACjC,QAAI,OAAO,YAAY,YAAY;AAC/B,iBAAW,OAAO,YAAY;AAC1B,sBAAc,IAAI,KAAK,WAAW,GAAG,EAAE,OAAO;AAAA,MAC1D;AAAA,IACA,WACa,OAAO,WAAW,MAAM,QAAQ,KAAK,GAAG;AAC7C,YAAM,QAAQ,CAAC,KAAK,MAAM,cAAc,IAAI,GAAG,IAAI,OAAO,CAAC;AAAA,IACnE;AAAA,EACA;AACA,WAAA,iBAAyB;AACzB,WAAS,cAAc,IAAI,MAAM,cAAc;AAC3C,UAAM,EAAE,KAAK,eAAe,MAAM,KAAI,IAAK;AAC3C,QAAI,iBAAiB;AACjB;AACJ,UAAM,aAAY,GAAI,UAAU,KAAM,IAAI,OAAO,UAAU,aAAa,IAAI,CAAC;AAC7E,QAAI,eAAe;AACf,OAAA,GAAI,OAAO,iBAAiB,IAAI,2BAA2B,SAAS,EAAE;AACtE;AAAA,IACR;AACI,QAAI,aAAY,GAAI,UAAU,KAAM,SAAS;AAC7C,QAAI,KAAK,gBAAgB,SAAS;AAC9B,mBAAY,GAAI,UAAU,KAAM,SAAS,OAAO,SAAS,gBAAgB,SAAS;AAAA,IAC1F;AAGI,QAAI,GAAG,YAAW,GAAI,UAAU,KAAM,SAAS,OAAM,GAAI,UAAU,WAAW,YAAY,CAAC,EAAE;AAAA,EACjG;;;","x_google_ignoreList":[0]}
|
|
@@ -2,47 +2,40 @@
|
|
|
2
2
|
!(function() {
|
|
3
3
|
try {
|
|
4
4
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
5
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
5
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "5531f7c5-c4cf-4aba-8eac-dd5409c154ba", e._sentryDebugIdIdentifier = "sentry-dbid-5531f7c5-c4cf-4aba-8eac-dd5409c154ba");
|
|
6
6
|
} catch (e2) {
|
|
7
7
|
}
|
|
8
8
|
})();
|
|
9
|
-
import { __exports as validate } from "../../../../../../../../_virtual/
|
|
9
|
+
import { __exports as validate } from "../../../../../../../../_virtual/index4.js";
|
|
10
10
|
import { __require as requireBoolSchema } from "./boolSchema.js";
|
|
11
|
-
import "./dataType.js";
|
|
12
|
-
import "./applicability.js";
|
|
11
|
+
import { __require as requireDataType } from "./dataType.js";
|
|
12
|
+
import { __require as requireApplicability } from "./applicability.js";
|
|
13
13
|
import { __require as requireDefaults } from "./defaults.js";
|
|
14
14
|
import { __require as requireKeyword } from "./keyword.js";
|
|
15
15
|
import { __require as requireSubschema } from "./subschema.js";
|
|
16
|
-
import "../codegen/index.js";
|
|
17
|
-
import "../names.js";
|
|
18
|
-
import "../resolve.js";
|
|
19
|
-
import "../util.js";
|
|
20
|
-
import "../errors.js";
|
|
21
|
-
import { __exports as util } from "../../../../../../../../_virtual/util.js";
|
|
22
|
-
import { __exports as names } from "../../../../../../../../_virtual/names.js";
|
|
23
|
-
import { __exports as codegen } from "../../../../../../../../_virtual/index.js";
|
|
24
|
-
import { __exports as errors } from "../../../../../../../../_virtual/errors.js";
|
|
25
|
-
import { __exports as dataType } from "../../../../../../../../_virtual/dataType.js";
|
|
26
|
-
import { __exports as resolve } from "../../../../../../../../_virtual/resolve.js";
|
|
27
|
-
import { __exports as applicability } from "../../../../../../../../_virtual/applicability.js";
|
|
16
|
+
import { __require as requireCodegen } from "../codegen/index.js";
|
|
17
|
+
import { __require as requireNames } from "../names.js";
|
|
18
|
+
import { __require as requireResolve } from "../resolve.js";
|
|
19
|
+
import { __require as requireUtil } from "../util.js";
|
|
20
|
+
import { __require as requireErrors } from "../errors.js";
|
|
28
21
|
var hasRequiredValidate;
|
|
29
22
|
function requireValidate() {
|
|
30
23
|
if (hasRequiredValidate) return validate;
|
|
31
24
|
hasRequiredValidate = 1;
|
|
32
25
|
Object.defineProperty(validate, "__esModule", { value: true });
|
|
33
26
|
validate.getData = validate.KeywordCxt = validate.validateFunctionCode = void 0;
|
|
34
|
-
const boolSchema_1 = requireBoolSchema();
|
|
35
|
-
const dataType_1 =
|
|
36
|
-
const applicability_1 =
|
|
37
|
-
const dataType_2 =
|
|
38
|
-
const defaults_1 = requireDefaults();
|
|
39
|
-
const keyword_1 = requireKeyword();
|
|
40
|
-
const subschema_1 = requireSubschema();
|
|
41
|
-
const codegen_1 =
|
|
42
|
-
const names_1 =
|
|
43
|
-
const resolve_1 =
|
|
44
|
-
const util_1 =
|
|
45
|
-
const errors_1 =
|
|
27
|
+
const boolSchema_1 = /* @__PURE__ */ requireBoolSchema();
|
|
28
|
+
const dataType_1 = /* @__PURE__ */ requireDataType();
|
|
29
|
+
const applicability_1 = /* @__PURE__ */ requireApplicability();
|
|
30
|
+
const dataType_2 = /* @__PURE__ */ requireDataType();
|
|
31
|
+
const defaults_1 = /* @__PURE__ */ requireDefaults();
|
|
32
|
+
const keyword_1 = /* @__PURE__ */ requireKeyword();
|
|
33
|
+
const subschema_1 = /* @__PURE__ */ requireSubschema();
|
|
34
|
+
const codegen_1 = /* @__PURE__ */ requireCodegen();
|
|
35
|
+
const names_1 = /* @__PURE__ */ requireNames();
|
|
36
|
+
const resolve_1 = /* @__PURE__ */ requireResolve();
|
|
37
|
+
const util_1 = /* @__PURE__ */ requireUtil();
|
|
38
|
+
const errors_1 = /* @__PURE__ */ requireErrors();
|
|
46
39
|
function validateFunctionCode(it) {
|
|
47
40
|
if (isSchemaObj(it)) {
|
|
48
41
|
checkKeywords(it);
|