@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
|
@@ -2,136 +2,139 @@
|
|
|
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] = "342ea277-1f36-4228-9276-7d9f2dc979af", e._sentryDebugIdIdentifier = "sentry-dbid-342ea277-1f36-4228-9276-7d9f2dc979af");
|
|
6
6
|
} catch (e2) {
|
|
7
7
|
}
|
|
8
8
|
})();
|
|
9
9
|
import { __exports as ref } from "../../../../../../../../_virtual/ref.js";
|
|
10
|
-
import "../../compile/ref_error.js";
|
|
11
|
-
import "../code.js";
|
|
12
|
-
import "../../compile/codegen/index.js";
|
|
13
|
-
import "../../compile/names.js";
|
|
14
|
-
import "../../compile/index.js";
|
|
15
|
-
import "../../compile/util.js";
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
return callRef(cxt,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
10
|
+
import { __require as requireRef_error } from "../../compile/ref_error.js";
|
|
11
|
+
import { __require as requireCode } from "../code.js";
|
|
12
|
+
import { __require as requireCodegen } from "../../compile/codegen/index.js";
|
|
13
|
+
import { __require as requireNames } from "../../compile/names.js";
|
|
14
|
+
import { __require as requireCompile } from "../../compile/index.js";
|
|
15
|
+
import { __require as requireUtil } from "../../compile/util.js";
|
|
16
|
+
var hasRequiredRef;
|
|
17
|
+
function requireRef() {
|
|
18
|
+
if (hasRequiredRef) return ref;
|
|
19
|
+
hasRequiredRef = 1;
|
|
20
|
+
Object.defineProperty(ref, "__esModule", { value: true });
|
|
21
|
+
ref.callRef = ref.getValidate = void 0;
|
|
22
|
+
const ref_error_1 = /* @__PURE__ */ requireRef_error();
|
|
23
|
+
const code_1 = /* @__PURE__ */ requireCode();
|
|
24
|
+
const codegen_1 = /* @__PURE__ */ requireCodegen();
|
|
25
|
+
const names_1 = /* @__PURE__ */ requireNames();
|
|
26
|
+
const compile_1 = /* @__PURE__ */ requireCompile();
|
|
27
|
+
const util_1 = /* @__PURE__ */ requireUtil();
|
|
28
|
+
const def = {
|
|
29
|
+
keyword: "$ref",
|
|
30
|
+
schemaType: "string",
|
|
31
|
+
code(cxt) {
|
|
32
|
+
const { gen, schema: $ref, it } = cxt;
|
|
33
|
+
const { baseId, schemaEnv: env, validateName, opts, self: self2 } = it;
|
|
34
|
+
const { root } = env;
|
|
35
|
+
if (($ref === "#" || $ref === "#/") && baseId === root.baseId)
|
|
36
|
+
return callRootRef();
|
|
37
|
+
const schOrEnv = compile_1.resolveRef.call(self2, root, baseId, $ref);
|
|
38
|
+
if (schOrEnv === void 0)
|
|
39
|
+
throw new ref_error_1.default(it.opts.uriResolver, baseId, $ref);
|
|
40
|
+
if (schOrEnv instanceof compile_1.SchemaEnv)
|
|
41
|
+
return callValidate(schOrEnv);
|
|
42
|
+
return inlineRefSchema(schOrEnv);
|
|
43
|
+
function callRootRef() {
|
|
44
|
+
if (env === root)
|
|
45
|
+
return callRef(cxt, validateName, env, env.$async);
|
|
46
|
+
const rootName = gen.scopeValue("root", { ref: root });
|
|
47
|
+
return callRef(cxt, (0, codegen_1._)`${rootName}.validate`, root, root.$async);
|
|
48
|
+
}
|
|
49
|
+
function callValidate(sch) {
|
|
50
|
+
const v = getValidate(cxt, sch);
|
|
51
|
+
callRef(cxt, v, sch, sch.$async);
|
|
52
|
+
}
|
|
53
|
+
function inlineRefSchema(sch) {
|
|
54
|
+
const schName = gen.scopeValue("schema", opts.code.source === true ? { ref: sch, code: (0, codegen_1.stringify)(sch) } : { ref: sch });
|
|
55
|
+
const valid = gen.name("valid");
|
|
56
|
+
const schCxt = cxt.subschema({
|
|
57
|
+
schema: sch,
|
|
58
|
+
dataTypes: [],
|
|
59
|
+
schemaPath: codegen_1.nil,
|
|
60
|
+
topSchemaRef: schName,
|
|
61
|
+
errSchemaPath: $ref
|
|
62
|
+
}, valid);
|
|
63
|
+
cxt.mergeEvaluated(schCxt);
|
|
64
|
+
cxt.ok(valid);
|
|
65
|
+
}
|
|
54
66
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
67
|
+
};
|
|
68
|
+
function getValidate(cxt, sch) {
|
|
69
|
+
const { gen } = cxt;
|
|
70
|
+
return sch.validate ? gen.scopeValue("validate", { ref: sch.validate }) : (0, codegen_1._)`${gen.scopeValue("wrapper", { ref: sch })}.validate`;
|
|
71
|
+
}
|
|
72
|
+
ref.getValidate = getValidate;
|
|
73
|
+
function callRef(cxt, v, sch, $async) {
|
|
74
|
+
const { gen, it } = cxt;
|
|
75
|
+
const { allErrors, schemaEnv: env, opts } = it;
|
|
76
|
+
const passCxt = opts.passContext ? names_1.default.this : codegen_1.nil;
|
|
77
|
+
if ($async)
|
|
78
|
+
callAsyncRef();
|
|
79
|
+
else
|
|
80
|
+
callSyncRef();
|
|
81
|
+
function callAsyncRef() {
|
|
82
|
+
if (!env.$async)
|
|
83
|
+
throw new Error("async schema referenced by sync schema");
|
|
84
|
+
const valid = gen.let("valid");
|
|
85
|
+
gen.try(() => {
|
|
86
|
+
gen.code((0, codegen_1._)`await ${(0, code_1.callValidateCode)(cxt, v, passCxt)}`);
|
|
87
|
+
addEvaluatedFrom(v);
|
|
88
|
+
if (!allErrors)
|
|
89
|
+
gen.assign(valid, true);
|
|
90
|
+
}, (e) => {
|
|
91
|
+
gen.if((0, codegen_1._)`!(${e} instanceof ${it.ValidationError})`, () => gen.throw(e));
|
|
92
|
+
addErrorsFrom(e);
|
|
93
|
+
if (!allErrors)
|
|
94
|
+
gen.assign(valid, false);
|
|
95
|
+
});
|
|
66
96
|
cxt.ok(valid);
|
|
67
97
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
addEvaluatedFrom(v);
|
|
90
|
-
if (!allErrors)
|
|
91
|
-
gen.assign(valid, true);
|
|
92
|
-
}, (e) => {
|
|
93
|
-
gen.if((0, codegen_1._)`!(${e} instanceof ${it.ValidationError})`, () => gen.throw(e));
|
|
94
|
-
addErrorsFrom(e);
|
|
95
|
-
if (!allErrors)
|
|
96
|
-
gen.assign(valid, false);
|
|
97
|
-
});
|
|
98
|
-
cxt.ok(valid);
|
|
99
|
-
}
|
|
100
|
-
function callSyncRef() {
|
|
101
|
-
cxt.result((0, code_1.callValidateCode)(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v));
|
|
102
|
-
}
|
|
103
|
-
function addErrorsFrom(source) {
|
|
104
|
-
const errs = (0, codegen_1._)`${source}.errors`;
|
|
105
|
-
gen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`);
|
|
106
|
-
gen.assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`);
|
|
107
|
-
}
|
|
108
|
-
function addEvaluatedFrom(source) {
|
|
109
|
-
var _a;
|
|
110
|
-
if (!it.opts.unevaluated)
|
|
111
|
-
return;
|
|
112
|
-
const schEvaluated = (_a = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a === void 0 ? void 0 : _a.evaluated;
|
|
113
|
-
if (it.props !== true) {
|
|
114
|
-
if (schEvaluated && !schEvaluated.dynamicProps) {
|
|
115
|
-
if (schEvaluated.props !== void 0) {
|
|
116
|
-
it.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it.props);
|
|
98
|
+
function callSyncRef() {
|
|
99
|
+
cxt.result((0, code_1.callValidateCode)(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v));
|
|
100
|
+
}
|
|
101
|
+
function addErrorsFrom(source) {
|
|
102
|
+
const errs = (0, codegen_1._)`${source}.errors`;
|
|
103
|
+
gen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`);
|
|
104
|
+
gen.assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`);
|
|
105
|
+
}
|
|
106
|
+
function addEvaluatedFrom(source) {
|
|
107
|
+
var _a;
|
|
108
|
+
if (!it.opts.unevaluated)
|
|
109
|
+
return;
|
|
110
|
+
const schEvaluated = (_a = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a === void 0 ? void 0 : _a.evaluated;
|
|
111
|
+
if (it.props !== true) {
|
|
112
|
+
if (schEvaluated && !schEvaluated.dynamicProps) {
|
|
113
|
+
if (schEvaluated.props !== void 0) {
|
|
114
|
+
it.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it.props);
|
|
115
|
+
}
|
|
116
|
+
} else {
|
|
117
|
+
const props = gen.var("props", (0, codegen_1._)`${source}.evaluated.props`);
|
|
118
|
+
it.props = util_1.mergeEvaluated.props(gen, props, it.props, codegen_1.Name);
|
|
117
119
|
}
|
|
118
|
-
} else {
|
|
119
|
-
const props = gen.var("props", (0, codegen_1._)`${source}.evaluated.props`);
|
|
120
|
-
it.props = util_1.mergeEvaluated.props(gen, props, it.props, codegen_1.Name);
|
|
121
120
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
121
|
+
if (it.items !== true) {
|
|
122
|
+
if (schEvaluated && !schEvaluated.dynamicItems) {
|
|
123
|
+
if (schEvaluated.items !== void 0) {
|
|
124
|
+
it.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it.items);
|
|
125
|
+
}
|
|
126
|
+
} else {
|
|
127
|
+
const items = gen.var("items", (0, codegen_1._)`${source}.evaluated.items`);
|
|
128
|
+
it.items = util_1.mergeEvaluated.items(gen, items, it.items, codegen_1.Name);
|
|
127
129
|
}
|
|
128
|
-
} else {
|
|
129
|
-
const items = gen.var("items", (0, codegen_1._)`${source}.evaluated.items`);
|
|
130
|
-
it.items = util_1.mergeEvaluated.items(gen, items, it.items, codegen_1.Name);
|
|
131
130
|
}
|
|
132
131
|
}
|
|
133
132
|
}
|
|
133
|
+
ref.callRef = callRef;
|
|
134
|
+
ref.default = def;
|
|
135
|
+
return ref;
|
|
134
136
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
+
export {
|
|
138
|
+
requireRef as __require
|
|
139
|
+
};
|
|
137
140
|
//# sourceMappingURL=ref.js.map
|
package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/ref.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ref.js","sources":["../../../../../../../../../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/ref.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.callRef = exports.getValidate = void 0;\nconst ref_error_1 = require(\"../../compile/ref_error\");\nconst code_1 = require(\"../code\");\nconst codegen_1 = require(\"../../compile/codegen\");\nconst names_1 = require(\"../../compile/names\");\nconst compile_1 = require(\"../../compile\");\nconst util_1 = require(\"../../compile/util\");\nconst def = {\n keyword: \"$ref\",\n schemaType: \"string\",\n code(cxt) {\n const { gen, schema: $ref, it } = cxt;\n const { baseId, schemaEnv: env, validateName, opts, self } = it;\n const { root } = env;\n if (($ref === \"#\" || $ref === \"#/\") && baseId === root.baseId)\n return callRootRef();\n const schOrEnv = compile_1.resolveRef.call(self, root, baseId, $ref);\n if (schOrEnv === undefined)\n throw new ref_error_1.default(it.opts.uriResolver, baseId, $ref);\n if (schOrEnv instanceof compile_1.SchemaEnv)\n return callValidate(schOrEnv);\n return inlineRefSchema(schOrEnv);\n function callRootRef() {\n if (env === root)\n return callRef(cxt, validateName, env, env.$async);\n const rootName = gen.scopeValue(\"root\", { ref: root });\n return callRef(cxt, (0, codegen_1._) `${rootName}.validate`, root, root.$async);\n }\n function callValidate(sch) {\n const v = getValidate(cxt, sch);\n callRef(cxt, v, sch, sch.$async);\n }\n function inlineRefSchema(sch) {\n const schName = gen.scopeValue(\"schema\", opts.code.source === true ? { ref: sch, code: (0, codegen_1.stringify)(sch) } : { ref: sch });\n const valid = gen.name(\"valid\");\n const schCxt = cxt.subschema({\n schema: sch,\n dataTypes: [],\n schemaPath: codegen_1.nil,\n topSchemaRef: schName,\n errSchemaPath: $ref,\n }, valid);\n cxt.mergeEvaluated(schCxt);\n cxt.ok(valid);\n }\n },\n};\nfunction getValidate(cxt, sch) {\n const { gen } = cxt;\n return sch.validate\n ? gen.scopeValue(\"validate\", { ref: sch.validate })\n : (0, codegen_1._) `${gen.scopeValue(\"wrapper\", { ref: sch })}.validate`;\n}\nexports.getValidate = getValidate;\nfunction callRef(cxt, v, sch, $async) {\n const { gen, it } = cxt;\n const { allErrors, schemaEnv: env, opts } = it;\n const passCxt = opts.passContext ? names_1.default.this : codegen_1.nil;\n if ($async)\n callAsyncRef();\n else\n callSyncRef();\n function callAsyncRef() {\n if (!env.$async)\n throw new Error(\"async schema referenced by sync schema\");\n const valid = gen.let(\"valid\");\n gen.try(() => {\n gen.code((0, codegen_1._) `await ${(0, code_1.callValidateCode)(cxt, v, passCxt)}`);\n addEvaluatedFrom(v); // TODO will not work with async, it has to be returned with the result\n if (!allErrors)\n gen.assign(valid, true);\n }, (e) => {\n gen.if((0, codegen_1._) `!(${e} instanceof ${it.ValidationError})`, () => gen.throw(e));\n addErrorsFrom(e);\n if (!allErrors)\n gen.assign(valid, false);\n });\n cxt.ok(valid);\n }\n function callSyncRef() {\n cxt.result((0, code_1.callValidateCode)(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v));\n }\n function addErrorsFrom(source) {\n const errs = (0, codegen_1._) `${source}.errors`;\n gen.assign(names_1.default.vErrors, (0, codegen_1._) `${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`); // TODO tagged\n gen.assign(names_1.default.errors, (0, codegen_1._) `${names_1.default.vErrors}.length`);\n }\n function addEvaluatedFrom(source) {\n var _a;\n if (!it.opts.unevaluated)\n return;\n const schEvaluated = (_a = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a === void 0 ? void 0 : _a.evaluated;\n // TODO refactor\n if (it.props !== true) {\n if (schEvaluated && !schEvaluated.dynamicProps) {\n if (schEvaluated.props !== undefined) {\n it.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it.props);\n }\n }\n else {\n const props = gen.var(\"props\", (0, codegen_1._) `${source}.evaluated.props`);\n it.props = util_1.mergeEvaluated.props(gen, props, it.props, codegen_1.Name);\n }\n }\n if (it.items !== true) {\n if (schEvaluated && !schEvaluated.dynamicItems) {\n if (schEvaluated.items !== undefined) {\n it.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it.items);\n }\n }\n else {\n const items = gen.var(\"items\", (0, codegen_1._) `${source}.evaluated.items`);\n it.items = util_1.mergeEvaluated.items(gen, items, it.items, codegen_1.Name);\n }\n }\n }\n}\nexports.callRef = callRef;\nexports.default = def;\n//# sourceMappingURL=ref.js.map"],"names":["require$$0","require$$1","require$$2","require$$3","require$$4","require$$5","self"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ref.js","sources":["../../../../../../../../../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/core/ref.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.callRef = exports.getValidate = void 0;\nconst ref_error_1 = require(\"../../compile/ref_error\");\nconst code_1 = require(\"../code\");\nconst codegen_1 = require(\"../../compile/codegen\");\nconst names_1 = require(\"../../compile/names\");\nconst compile_1 = require(\"../../compile\");\nconst util_1 = require(\"../../compile/util\");\nconst def = {\n keyword: \"$ref\",\n schemaType: \"string\",\n code(cxt) {\n const { gen, schema: $ref, it } = cxt;\n const { baseId, schemaEnv: env, validateName, opts, self } = it;\n const { root } = env;\n if (($ref === \"#\" || $ref === \"#/\") && baseId === root.baseId)\n return callRootRef();\n const schOrEnv = compile_1.resolveRef.call(self, root, baseId, $ref);\n if (schOrEnv === undefined)\n throw new ref_error_1.default(it.opts.uriResolver, baseId, $ref);\n if (schOrEnv instanceof compile_1.SchemaEnv)\n return callValidate(schOrEnv);\n return inlineRefSchema(schOrEnv);\n function callRootRef() {\n if (env === root)\n return callRef(cxt, validateName, env, env.$async);\n const rootName = gen.scopeValue(\"root\", { ref: root });\n return callRef(cxt, (0, codegen_1._) `${rootName}.validate`, root, root.$async);\n }\n function callValidate(sch) {\n const v = getValidate(cxt, sch);\n callRef(cxt, v, sch, sch.$async);\n }\n function inlineRefSchema(sch) {\n const schName = gen.scopeValue(\"schema\", opts.code.source === true ? { ref: sch, code: (0, codegen_1.stringify)(sch) } : { ref: sch });\n const valid = gen.name(\"valid\");\n const schCxt = cxt.subschema({\n schema: sch,\n dataTypes: [],\n schemaPath: codegen_1.nil,\n topSchemaRef: schName,\n errSchemaPath: $ref,\n }, valid);\n cxt.mergeEvaluated(schCxt);\n cxt.ok(valid);\n }\n },\n};\nfunction getValidate(cxt, sch) {\n const { gen } = cxt;\n return sch.validate\n ? gen.scopeValue(\"validate\", { ref: sch.validate })\n : (0, codegen_1._) `${gen.scopeValue(\"wrapper\", { ref: sch })}.validate`;\n}\nexports.getValidate = getValidate;\nfunction callRef(cxt, v, sch, $async) {\n const { gen, it } = cxt;\n const { allErrors, schemaEnv: env, opts } = it;\n const passCxt = opts.passContext ? names_1.default.this : codegen_1.nil;\n if ($async)\n callAsyncRef();\n else\n callSyncRef();\n function callAsyncRef() {\n if (!env.$async)\n throw new Error(\"async schema referenced by sync schema\");\n const valid = gen.let(\"valid\");\n gen.try(() => {\n gen.code((0, codegen_1._) `await ${(0, code_1.callValidateCode)(cxt, v, passCxt)}`);\n addEvaluatedFrom(v); // TODO will not work with async, it has to be returned with the result\n if (!allErrors)\n gen.assign(valid, true);\n }, (e) => {\n gen.if((0, codegen_1._) `!(${e} instanceof ${it.ValidationError})`, () => gen.throw(e));\n addErrorsFrom(e);\n if (!allErrors)\n gen.assign(valid, false);\n });\n cxt.ok(valid);\n }\n function callSyncRef() {\n cxt.result((0, code_1.callValidateCode)(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v));\n }\n function addErrorsFrom(source) {\n const errs = (0, codegen_1._) `${source}.errors`;\n gen.assign(names_1.default.vErrors, (0, codegen_1._) `${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`); // TODO tagged\n gen.assign(names_1.default.errors, (0, codegen_1._) `${names_1.default.vErrors}.length`);\n }\n function addEvaluatedFrom(source) {\n var _a;\n if (!it.opts.unevaluated)\n return;\n const schEvaluated = (_a = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a === void 0 ? void 0 : _a.evaluated;\n // TODO refactor\n if (it.props !== true) {\n if (schEvaluated && !schEvaluated.dynamicProps) {\n if (schEvaluated.props !== undefined) {\n it.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it.props);\n }\n }\n else {\n const props = gen.var(\"props\", (0, codegen_1._) `${source}.evaluated.props`);\n it.props = util_1.mergeEvaluated.props(gen, props, it.props, codegen_1.Name);\n }\n }\n if (it.items !== true) {\n if (schEvaluated && !schEvaluated.dynamicItems) {\n if (schEvaluated.items !== undefined) {\n it.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it.items);\n }\n }\n else {\n const items = gen.var(\"items\", (0, codegen_1._) `${source}.evaluated.items`);\n it.items = util_1.mergeEvaluated.items(gen, items, it.items, codegen_1.Name);\n }\n }\n }\n}\nexports.callRef = callRef;\nexports.default = def;\n//# sourceMappingURL=ref.js.map"],"names":["require$$0","require$$1","require$$2","require$$3","require$$4","require$$5","self"],"mappings":";;;;;;;;;;;;;;;;;;;AACA,SAAO,eAAe,KAAS,cAAc,EAAE,OAAO,MAAM;AAC5D,MAAA,UAAkB,IAAA,cAAsB;AACxC,QAAM,cAAcA,iCAAA;AACpB,QAAM,SAASC,4BAAA;AACf,QAAM,YAAYC,+BAAA;AAClB,QAAM,UAAUC,6BAAA;AAChB,QAAM,YAAYC,+BAAA;AAClB,QAAM,SAASC,4BAAA;AACf,QAAM,MAAM;AAAA,IACR,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,KAAK,KAAK;AACN,YAAM,EAAE,KAAK,QAAQ,MAAM,GAAE,IAAK;AAClC,YAAM,EAAE,QAAQ,WAAW,KAAK,cAAc,MAAM,MAAAC,MAAI,IAAK;AAC7D,YAAM,EAAE,KAAI,IAAK;AACjB,WAAK,SAAS,OAAO,SAAS,SAAS,WAAW,KAAK;AACnD,eAAO,YAAW;AACtB,YAAM,WAAW,UAAU,WAAW,KAAKA,OAAM,MAAM,QAAQ,IAAI;AACnE,UAAI,aAAa;AACb,cAAM,IAAI,YAAY,QAAQ,GAAG,KAAK,aAAa,QAAQ,IAAI;AACnE,UAAI,oBAAoB,UAAU;AAC9B,eAAO,aAAa,QAAQ;AAChC,aAAO,gBAAgB,QAAQ;AAC/B,eAAS,cAAc;AACnB,YAAI,QAAQ;AACR,iBAAO,QAAQ,KAAK,cAAc,KAAK,IAAI,MAAM;AACrD,cAAM,WAAW,IAAI,WAAW,QAAQ,EAAE,KAAK,MAAM;AACrD,eAAO,QAAQ,MAAK,GAAI,UAAU,KAAM,QAAQ,aAAa,MAAM,KAAK,MAAM;AAAA,MAC1F;AACQ,eAAS,aAAa,KAAK;AACvB,cAAM,IAAI,YAAY,KAAK,GAAG;AAC9B,gBAAQ,KAAK,GAAG,KAAK,IAAI,MA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BAAgB,CAAC,aAAa,cAAc;AAC5C,cAAI,aAAa,UAAU,QAAW;AAClC,eAAG,QAAQ,OAAO,eAAe,MAAM,KAAK,aAAa,OAAO,GAAG,KAAK;AAAA,UAC5F;AAAA,QACA,OACiB;AACD,gBAAM,QAAQ,IAAI,IAAI,UAAS,GAAI,UAAU,KAAM,MAAM,kBAAkB;AAC3E,aAAG,QAAQ,OAAO,eAAe,MAAM,KAAK,OAAO,GAAG,OAAO,UAAU,IAAI;AAAA,QAC3F;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA,MAAA,UAAkB;AAClB,MAAA,UAAkB;;;","x_google_ignoreList":[0]}
|
package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/index.js
CHANGED
|
@@ -2,117 +2,121 @@
|
|
|
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] = "70320655-1085-4f53-af5b-506a2053eb3f", e._sentryDebugIdIdentifier = "sentry-dbid-70320655-1085-4f53-af5b-506a2053eb3f");
|
|
6
6
|
} catch (e2) {
|
|
7
7
|
}
|
|
8
8
|
})();
|
|
9
|
-
import { __exports as discriminator } from "../../../../../../../../_virtual/
|
|
10
|
-
import "../../compile/codegen/index.js";
|
|
11
|
-
import "./types.js";
|
|
12
|
-
import "../../compile/index.js";
|
|
13
|
-
import "../../compile/ref_error.js";
|
|
14
|
-
import "../../compile/util.js";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
throw new Error("discriminator: requires discriminator option");
|
|
40
|
-
}
|
|
41
|
-
const tagName = schema.propertyName;
|
|
42
|
-
if (typeof tagName != "string")
|
|
43
|
-
throw new Error("discriminator: requires propertyName");
|
|
44
|
-
if (schema.mapping)
|
|
45
|
-
throw new Error("discriminator: mapping is not supported");
|
|
46
|
-
if (!oneOf)
|
|
47
|
-
throw new Error("discriminator: requires oneOf keyword");
|
|
48
|
-
const valid = gen.let("valid", false);
|
|
49
|
-
const tag = gen.const("tag", (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(tagName)}`);
|
|
50
|
-
gen.if((0, codegen_1._)`typeof ${tag} == "string"`, () => validateMapping(), () => cxt.error(false, { discrError: types_1.DiscrError.Tag, tag, tagName }));
|
|
51
|
-
cxt.ok(valid);
|
|
52
|
-
function validateMapping() {
|
|
53
|
-
const mapping = getMapping();
|
|
54
|
-
gen.if(false);
|
|
55
|
-
for (const tagValue in mapping) {
|
|
56
|
-
gen.elseIf((0, codegen_1._)`${tag} === ${tagValue}`);
|
|
57
|
-
gen.assign(valid, applyTagSchema(mapping[tagValue]));
|
|
9
|
+
import { __exports as discriminator } from "../../../../../../../../_virtual/index3.js";
|
|
10
|
+
import { __require as requireCodegen } from "../../compile/codegen/index.js";
|
|
11
|
+
import { __require as requireTypes } from "./types.js";
|
|
12
|
+
import { __require as requireCompile } from "../../compile/index.js";
|
|
13
|
+
import { __require as requireRef_error } from "../../compile/ref_error.js";
|
|
14
|
+
import { __require as requireUtil } from "../../compile/util.js";
|
|
15
|
+
var hasRequiredDiscriminator;
|
|
16
|
+
function requireDiscriminator() {
|
|
17
|
+
if (hasRequiredDiscriminator) return discriminator;
|
|
18
|
+
hasRequiredDiscriminator = 1;
|
|
19
|
+
Object.defineProperty(discriminator, "__esModule", { value: true });
|
|
20
|
+
const codegen_1 = /* @__PURE__ */ requireCodegen();
|
|
21
|
+
const types_1 = /* @__PURE__ */ requireTypes();
|
|
22
|
+
const compile_1 = /* @__PURE__ */ requireCompile();
|
|
23
|
+
const ref_error_1 = /* @__PURE__ */ requireRef_error();
|
|
24
|
+
const util_1 = /* @__PURE__ */ requireUtil();
|
|
25
|
+
const error = {
|
|
26
|
+
message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag "${tagName}" must be string` : `value of tag "${tagName}" must be in oneOf`,
|
|
27
|
+
params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`
|
|
28
|
+
};
|
|
29
|
+
const def = {
|
|
30
|
+
keyword: "discriminator",
|
|
31
|
+
type: "object",
|
|
32
|
+
schemaType: "object",
|
|
33
|
+
error,
|
|
34
|
+
code(cxt) {
|
|
35
|
+
const { gen, data, schema, parentSchema, it } = cxt;
|
|
36
|
+
const { oneOf } = parentSchema;
|
|
37
|
+
if (!it.opts.discriminator) {
|
|
38
|
+
throw new Error("discriminator: requires discriminator option");
|
|
58
39
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) {
|
|
77
|
-
const ref = sch.$ref;
|
|
78
|
-
sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref);
|
|
79
|
-
if (sch instanceof compile_1.SchemaEnv)
|
|
80
|
-
sch = sch.schema;
|
|
81
|
-
if (sch === void 0)
|
|
82
|
-
throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref);
|
|
83
|
-
}
|
|
84
|
-
const propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName];
|
|
85
|
-
if (typeof propSch != "object") {
|
|
86
|
-
throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`);
|
|
40
|
+
const tagName = schema.propertyName;
|
|
41
|
+
if (typeof tagName != "string")
|
|
42
|
+
throw new Error("discriminator: requires propertyName");
|
|
43
|
+
if (schema.mapping)
|
|
44
|
+
throw new Error("discriminator: mapping is not supported");
|
|
45
|
+
if (!oneOf)
|
|
46
|
+
throw new Error("discriminator: requires oneOf keyword");
|
|
47
|
+
const valid = gen.let("valid", false);
|
|
48
|
+
const tag = gen.const("tag", (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(tagName)}`);
|
|
49
|
+
gen.if((0, codegen_1._)`typeof ${tag} == "string"`, () => validateMapping(), () => cxt.error(false, { discrError: types_1.DiscrError.Tag, tag, tagName }));
|
|
50
|
+
cxt.ok(valid);
|
|
51
|
+
function validateMapping() {
|
|
52
|
+
const mapping = getMapping();
|
|
53
|
+
gen.if(false);
|
|
54
|
+
for (const tagValue in mapping) {
|
|
55
|
+
gen.elseIf((0, codegen_1._)`${tag} === ${tagValue}`);
|
|
56
|
+
gen.assign(valid, applyTagSchema(mapping[tagValue]));
|
|
87
57
|
}
|
|
88
|
-
|
|
89
|
-
|
|
58
|
+
gen.else();
|
|
59
|
+
cxt.error(false, { discrError: types_1.DiscrError.Mapping, tag, tagName });
|
|
60
|
+
gen.endIf();
|
|
90
61
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
return
|
|
62
|
+
function applyTagSchema(schemaProp) {
|
|
63
|
+
const _valid = gen.name("valid");
|
|
64
|
+
const schCxt = cxt.subschema({ keyword: "oneOf", schemaProp }, _valid);
|
|
65
|
+
cxt.mergeEvaluated(schCxt, codegen_1.Name);
|
|
66
|
+
return _valid;
|
|
96
67
|
}
|
|
97
|
-
function
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
68
|
+
function getMapping() {
|
|
69
|
+
var _a;
|
|
70
|
+
const oneOfMapping = {};
|
|
71
|
+
const topRequired = hasRequired(parentSchema);
|
|
72
|
+
let tagRequired = true;
|
|
73
|
+
for (let i = 0; i < oneOf.length; i++) {
|
|
74
|
+
let sch = oneOf[i];
|
|
75
|
+
if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) {
|
|
76
|
+
const ref = sch.$ref;
|
|
77
|
+
sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref);
|
|
78
|
+
if (sch instanceof compile_1.SchemaEnv)
|
|
79
|
+
sch = sch.schema;
|
|
80
|
+
if (sch === void 0)
|
|
81
|
+
throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref);
|
|
82
|
+
}
|
|
83
|
+
const propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName];
|
|
84
|
+
if (typeof propSch != "object") {
|
|
85
|
+
throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`);
|
|
103
86
|
}
|
|
104
|
-
|
|
105
|
-
|
|
87
|
+
tagRequired = tagRequired && (topRequired || hasRequired(sch));
|
|
88
|
+
addMappings(propSch, i);
|
|
106
89
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
90
|
+
if (!tagRequired)
|
|
91
|
+
throw new Error(`discriminator: "${tagName}" must be required`);
|
|
92
|
+
return oneOfMapping;
|
|
93
|
+
function hasRequired({ required }) {
|
|
94
|
+
return Array.isArray(required) && required.includes(tagName);
|
|
95
|
+
}
|
|
96
|
+
function addMappings(sch, i) {
|
|
97
|
+
if (sch.const) {
|
|
98
|
+
addMapping(sch.const, i);
|
|
99
|
+
} else if (sch.enum) {
|
|
100
|
+
for (const tagValue of sch.enum) {
|
|
101
|
+
addMapping(tagValue, i);
|
|
102
|
+
}
|
|
103
|
+
} else {
|
|
104
|
+
throw new Error(`discriminator: "properties/${tagName}" must have "const" or "enum"`);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
function addMapping(tagValue, i) {
|
|
108
|
+
if (typeof tagValue != "string" || tagValue in oneOfMapping) {
|
|
109
|
+
throw new Error(`discriminator: "${tagName}" values must be unique strings`);
|
|
110
|
+
}
|
|
111
|
+
oneOfMapping[tagValue] = i;
|
|
111
112
|
}
|
|
112
|
-
oneOfMapping[tagValue] = i;
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
}
|
|
115
|
+
};
|
|
116
|
+
discriminator.default = def;
|
|
117
|
+
return discriminator;
|
|
118
|
+
}
|
|
119
|
+
export {
|
|
120
|
+
requireDiscriminator as __require
|
|
116
121
|
};
|
|
117
|
-
discriminator.default = def;
|
|
118
122
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../../../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/index.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst types_1 = require(\"../discriminator/types\");\nconst compile_1 = require(\"../../compile\");\nconst ref_error_1 = require(\"../../compile/ref_error\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag\n ? `tag \"${tagName}\" must be string`\n : `value of tag \"${tagName}\" must be in oneOf`,\n params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._) `{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`,\n};\nconst def = {\n keyword: \"discriminator\",\n type: \"object\",\n schemaType: \"object\",\n error,\n code(cxt) {\n const { gen, data, schema, parentSchema, it } = cxt;\n const { oneOf } = parentSchema;\n if (!it.opts.discriminator) {\n throw new Error(\"discriminator: requires discriminator option\");\n }\n const tagName = schema.propertyName;\n if (typeof tagName != \"string\")\n throw new Error(\"discriminator: requires propertyName\");\n if (schema.mapping)\n throw new Error(\"discriminator: mapping is not supported\");\n if (!oneOf)\n throw new Error(\"discriminator: requires oneOf keyword\");\n const valid = gen.let(\"valid\", false);\n const tag = gen.const(\"tag\", (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(tagName)}`);\n gen.if((0, codegen_1._) `typeof ${tag} == \"string\"`, () => validateMapping(), () => cxt.error(false, { discrError: types_1.DiscrError.Tag, tag, tagName }));\n cxt.ok(valid);\n function validateMapping() {\n const mapping = getMapping();\n gen.if(false);\n for (const tagValue in mapping) {\n gen.elseIf((0, codegen_1._) `${tag} === ${tagValue}`);\n gen.assign(valid, applyTagSchema(mapping[tagValue]));\n }\n gen.else();\n cxt.error(false, { discrError: types_1.DiscrError.Mapping, tag, tagName });\n gen.endIf();\n }\n function applyTagSchema(schemaProp) {\n const _valid = gen.name(\"valid\");\n const schCxt = cxt.subschema({ keyword: \"oneOf\", schemaProp }, _valid);\n cxt.mergeEvaluated(schCxt, codegen_1.Name);\n return _valid;\n }\n function getMapping() {\n var _a;\n const oneOfMapping = {};\n const topRequired = hasRequired(parentSchema);\n let tagRequired = true;\n for (let i = 0; i < oneOf.length; i++) {\n let sch = oneOf[i];\n if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) {\n const ref = sch.$ref;\n sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref);\n if (sch instanceof compile_1.SchemaEnv)\n sch = sch.schema;\n if (sch === undefined)\n throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref);\n }\n const propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName];\n if (typeof propSch != \"object\") {\n throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have \"properties/${tagName}\"`);\n }\n tagRequired = tagRequired && (topRequired || hasRequired(sch));\n addMappings(propSch, i);\n }\n if (!tagRequired)\n throw new Error(`discriminator: \"${tagName}\" must be required`);\n return oneOfMapping;\n function hasRequired({ required }) {\n return Array.isArray(required) && required.includes(tagName);\n }\n function addMappings(sch, i) {\n if (sch.const) {\n addMapping(sch.const, i);\n }\n else if (sch.enum) {\n for (const tagValue of sch.enum) {\n addMapping(tagValue, i);\n }\n }\n else {\n throw new Error(`discriminator: \"properties/${tagName}\" must have \"const\" or \"enum\"`);\n }\n }\n function addMapping(tagValue, i) {\n if (typeof tagValue != \"string\" || tagValue in oneOfMapping) {\n throw new Error(`discriminator: \"${tagName}\" values must be unique strings`);\n }\n oneOfMapping[tagValue] = i;\n }\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=index.js.map"],"names":["require$$0","require$$1","require$$2","require$$3","require$$4"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../../../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/index.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst codegen_1 = require(\"../../compile/codegen\");\nconst types_1 = require(\"../discriminator/types\");\nconst compile_1 = require(\"../../compile\");\nconst ref_error_1 = require(\"../../compile/ref_error\");\nconst util_1 = require(\"../../compile/util\");\nconst error = {\n message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag\n ? `tag \"${tagName}\" must be string`\n : `value of tag \"${tagName}\" must be in oneOf`,\n params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._) `{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`,\n};\nconst def = {\n keyword: \"discriminator\",\n type: \"object\",\n schemaType: \"object\",\n error,\n code(cxt) {\n const { gen, data, schema, parentSchema, it } = cxt;\n const { oneOf } = parentSchema;\n if (!it.opts.discriminator) {\n throw new Error(\"discriminator: requires discriminator option\");\n }\n const tagName = schema.propertyName;\n if (typeof tagName != \"string\")\n throw new Error(\"discriminator: requires propertyName\");\n if (schema.mapping)\n throw new Error(\"discriminator: mapping is not supported\");\n if (!oneOf)\n throw new Error(\"discriminator: requires oneOf keyword\");\n const valid = gen.let(\"valid\", false);\n const tag = gen.const(\"tag\", (0, codegen_1._) `${data}${(0, codegen_1.getProperty)(tagName)}`);\n gen.if((0, codegen_1._) `typeof ${tag} == \"string\"`, () => validateMapping(), () => cxt.error(false, { discrError: types_1.DiscrError.Tag, tag, tagName }));\n cxt.ok(valid);\n function validateMapping() {\n const mapping = getMapping();\n gen.if(false);\n for (const tagValue in mapping) {\n gen.elseIf((0, codegen_1._) `${tag} === ${tagValue}`);\n gen.assign(valid, applyTagSchema(mapping[tagValue]));\n }\n gen.else();\n cxt.error(false, { discrError: types_1.DiscrError.Mapping, tag, tagName });\n gen.endIf();\n }\n function applyTagSchema(schemaProp) {\n const _valid = gen.name(\"valid\");\n const schCxt = cxt.subschema({ keyword: \"oneOf\", schemaProp }, _valid);\n cxt.mergeEvaluated(schCxt, codegen_1.Name);\n return _valid;\n }\n function getMapping() {\n var _a;\n const oneOfMapping = {};\n const topRequired = hasRequired(parentSchema);\n let tagRequired = true;\n for (let i = 0; i < oneOf.length; i++) {\n let sch = oneOf[i];\n if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) {\n const ref = sch.$ref;\n sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref);\n if (sch instanceof compile_1.SchemaEnv)\n sch = sch.schema;\n if (sch === undefined)\n throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref);\n }\n const propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName];\n if (typeof propSch != \"object\") {\n throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have \"properties/${tagName}\"`);\n }\n tagRequired = tagRequired && (topRequired || hasRequired(sch));\n addMappings(propSch, i);\n }\n if (!tagRequired)\n throw new Error(`discriminator: \"${tagName}\" must be required`);\n return oneOfMapping;\n function hasRequired({ required }) {\n return Array.isArray(required) && required.includes(tagName);\n }\n function addMappings(sch, i) {\n if (sch.const) {\n addMapping(sch.const, i);\n }\n else if (sch.enum) {\n for (const tagValue of sch.enum) {\n addMapping(tagValue, i);\n }\n }\n else {\n throw new Error(`discriminator: \"properties/${tagName}\" must have \"const\" or \"enum\"`);\n }\n }\n function addMapping(tagValue, i) {\n if (typeof tagValue != \"string\" || tagValue in oneOfMapping) {\n throw new Error(`discriminator: \"${tagName}\" values must be unique strings`);\n }\n oneOfMapping[tagValue] = i;\n }\n }\n },\n};\nexports.default = def;\n//# sourceMappingURL=index.js.map"],"names":["require$$0","require$$1","require$$2","require$$3","require$$4"],"mappings":";;;;;;;;;;;;;;;;;;AACA,SAAO,eAAe,eAAS,cAAc,EAAE,OAAO,MAAM;AAC5D,QAAM,YAAYA,+BAAA;AAClB,QAAM,UAAUC,6BAAA;AAChB,QAAM,YAAYC,+BAAA;AAClB,QAAM,cAAcC,iCAAA;AACpB,QAAM,SAASC,4BAAA;AACf,QAAM,QAAQ;AAAA,IACV,SAAS,CAAC,EAAE,QAAQ,EAAE,YAAY,QAAO,QAAS,eAAe,QAAQ,WAAW,MAC9E,QAAQ,OAAO,qBACf,iBAAiB,OAAO;AAAA,IAC9B,QAAQ,CAAC,EAAE,QAAQ,EAAE,YAAY,KAAK,QAAO,EAAE,OAAO,GAAI,UAAU,aAAc,UAAU,UAAU,OAAO,eAAe,GAAG;AAAA;AAEnI,QAAM,MAAM;AAAA,IACR,SAAS;AAAA,IACT,MAAM;AAAA,IACN,YAAY;AAAA,IACZ;AAAA,IACA,KAAK,KAAK;AACN,YAAM,EAAE,KAAK,MAAM,QAAQ,cAAc,GAAE,IAAK;AAChD,YAAM,EAAE,MAAK,IAAK;AACl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c;AACzD,kBAAM,IAAI,MAAM,mBAAmB,OAAO,iCAAiC;AAAA,UAC/F;AACgB,uBAAa,QAAQ,IAAI;AAAA,QACzC;AAAA,MACA;AAAA,IACA;AAAA;AAEA,gBAAA,UAAkB;;;","x_google_ignoreList":[0]}
|
package/dist/node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/vocabularies/discriminator/types.js
CHANGED
|
@@ -2,19 +2,25 @@
|
|
|
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] = "540f7628-70a5-4cae-94d6-6cfc8a521cc0", e._sentryDebugIdIdentifier = "sentry-dbid-540f7628-70a5-4cae-94d6-6cfc8a521cc0");
|
|
6
6
|
} catch (e2) {
|
|
7
7
|
}
|
|
8
8
|
})();
|
|
9
9
|
import { __exports as types } from "../../../../../../../../_virtual/types.js";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
var hasRequiredTypes;
|
|
11
|
+
function requireTypes() {
|
|
12
|
+
if (hasRequiredTypes) return types;
|
|
13
|
+
hasRequiredTypes = 1;
|
|
14
|
+
Object.defineProperty(types, "__esModule", { value: true });
|
|
15
|
+
types.DiscrError = void 0;
|
|
16
|
+
var DiscrError;
|
|
17
|
+
(function(DiscrError2) {
|
|
18
|
+
DiscrError2["Tag"] = "tag";
|
|
19
|
+
DiscrError2["Mapping"] = "mapping";
|
|
20
|
+
})(DiscrError || (types.DiscrError = DiscrError = {}));
|
|
21
|
+
return types;
|
|
22
|
+
}
|
|
17
23
|
export {
|
|
18
|
-
|
|
24
|
+
requireTypes as __require
|
|
19
25
|
};
|
|
20
26
|
//# sourceMappingURL=types.js.map
|