fumadocs-openapi 10.10.3 → 11.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/generated/shared.css +1 -1159
- package/css/preset.css +1 -0
- package/dist/.translations/index.d.ts +80 -0
- package/dist/.translations/keys.js +80 -0
- package/dist/_virtual/_rolldown/runtime.js +1 -10
- package/dist/generate-file.d.ts +0 -4
- package/dist/generate-file.js +4 -5
- package/dist/i18n.d.ts +5 -100
- package/dist/i18n.js +8 -108
- package/dist/index.d.ts +4 -4
- package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.8 → @scalar_openapi-upgrader@0.2.9}/node_modules/@scalar/openapi-upgrader/dist/2.0-to-3.0/upgrade-from-two-to-three.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.8 → @scalar_openapi-upgrader@0.2.9}/node_modules/@scalar/openapi-upgrader/dist/3.0-to-3.1/upgrade-from-three-to-three-one.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.8 → @scalar_openapi-upgrader@0.2.9}/node_modules/@scalar/openapi-upgrader/dist/3.1-to-3.2/upgrade-from-three-one-to-three-two.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.8 → @scalar_openapi-upgrader@0.2.9}/node_modules/@scalar/openapi-upgrader/dist/helpers/traverse.js +1 -1
- package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.8 → @scalar_openapi-upgrader@0.2.9}/node_modules/@scalar/openapi-upgrader/dist/upgrade.js +1 -1
- package/dist/playground/auth.js +4 -4
- package/dist/playground/client.d.ts +12 -21
- package/dist/playground/client.js +80 -59
- package/dist/playground/components/oauth-dialog.js +33 -33
- package/dist/playground/components/result-display.d.ts +1 -2
- package/dist/playground/components/result-display.js +7 -8
- package/dist/playground/components/server-select.js +11 -11
- package/dist/playground/status-info.js +29 -37
- package/dist/requests/generators/csharp.js +3 -3
- package/dist/requests/generators/curl.js +2 -2
- package/dist/requests/generators/go.js +2 -2
- package/dist/requests/generators/index.d.ts +28 -41
- package/dist/requests/generators/index.js +18 -35
- package/dist/requests/generators/java.js +2 -2
- package/dist/requests/generators/javascript.js +2 -2
- package/dist/requests/generators/python.js +2 -2
- package/dist/scalar/client.js +3 -2
- package/dist/scalar/index.d.ts +2 -2
- package/dist/scalar/index.js +10 -9
- package/dist/server/index.d.ts +23 -27
- package/dist/server/index.js +42 -38
- package/dist/server/proxy.d.ts +0 -6
- package/dist/server/proxy.js +2 -4
- package/dist/{_openapi/types.d.ts → types/openapi.d.ts} +127 -136
- package/dist/types.d.ts +14 -18
- package/dist/ui/base.d.ts +15 -162
- package/dist/ui/base.js +148 -107
- package/dist/ui/components/codeblock.js +6 -14
- package/dist/ui/components/heading.js +8 -4
- package/dist/ui/components/markdown.js +12 -0
- package/dist/ui/contexts/api.js +8 -26
- package/dist/ui/index.d.ts +204 -7
- package/dist/ui/index.js +10 -15
- package/dist/ui/operation/context.js +48 -0
- package/dist/ui/operation/index.js +168 -126
- package/dist/ui/operation/request-tabs.d.ts +10 -5
- package/dist/ui/operation/request-tabs.js +35 -22
- package/dist/ui/operation/response-tabs.d.ts +5 -2
- package/dist/ui/operation/response-tabs.js +22 -15
- package/dist/ui/operation/usage-tabs.js +144 -0
- package/dist/utils/document/dereference.d.ts +1 -1
- package/dist/utils/document/dereference.js +5 -8
- package/dist/utils/document/load.js +17 -0
- package/dist/utils/get-example-requests.d.ts +13 -0
- package/dist/{ui/operation → utils}/get-example-requests.js +31 -20
- package/dist/utils/pages/builder.d.ts +38 -10
- package/dist/utils/pages/builder.js +12 -10
- package/dist/utils/pages/preset-auto.d.ts +1 -2
- package/dist/utils/pages/preset-auto.js +15 -15
- package/dist/utils/pages/to-static-data.js +5 -4
- package/dist/utils/pages/to-text.d.ts +1 -0
- package/dist/utils/pages/to-text.js +21 -11
- package/dist/utils/remove-undefined.js +14 -9
- package/dist/utils/schema.d.ts +2 -0
- package/dist/utils/{schema/index.js → schema.js} +3 -30
- package/dist/{ui/client → utils}/storage-key.js +3 -3
- package/package.json +16 -29
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/bundle.js +0 -239
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/dereference.js +0 -187
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/index.js +0 -136
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/normalize-args.js +0 -41
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/options.js +0 -124
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parse.js +0 -109
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/binary.js +0 -30
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/json.js +0 -46
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/text.js +0 -36
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/yaml.js +0 -49
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/pointer.js +0 -242
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/ref.js +0 -247
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/refs.js +0 -210
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolve-external.js +0 -100
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolvers/file.js +0 -41
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolvers/http.js +0 -112
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/convert-path-to-posix.js +0 -8
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/errors.js +0 -146
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/is-windows.js +0 -5
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/maybe.js +0 -18
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/next.js +0 -11
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/plugins.js +0 -99
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/schema-resources.js +0 -30
- package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/url.js +0 -315
- package/dist/node_modules/.pnpm/@fastify_deepmerge@3.2.1/node_modules/@fastify/deepmerge/index.js +0 -108
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/2020.js +0 -110
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/code.js +0 -138
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/index.js +0 -674
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/scope.js +0 -141
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/errors.js +0 -102
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/index.js +0 -223
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/names.js +0 -28
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/ref_error.js +0 -18
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/resolve.js +0 -133
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/rules.js +0 -61
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/util.js +0 -146
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/applicability.js +0 -23
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/boolSchema.js +0 -48
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/dataType.js +0 -172
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/defaults.js +0 -31
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/index.js +0 -433
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/keyword.js +0 -113
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/subschema.js +0 -72
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/core.js +0 -583
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/data.js +0 -18
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/index.js +0 -42
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.js +0 -50
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.js +0 -20
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.js +0 -51
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.js +0 -16
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.js +0 -36
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.js +0 -19
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.js +0 -85
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/schema.js +0 -59
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/equal.js +0 -12
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/ucs2length.js +0 -25
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/uri.js +0 -12
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/validation_error.js +0 -16
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +0 -57
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +0 -96
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js +0 -29
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +0 -16
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/contains.js +0 -89
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +0 -87
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js +0 -16
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/if.js +0 -62
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/index.js +0 -60
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items.js +0 -59
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js +0 -34
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/not.js +0 -31
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +0 -51
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +0 -61
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +0 -17
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/properties.js +0 -52
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +0 -41
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +0 -17
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/code.js +0 -130
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/id.js +0 -14
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/index.js +0 -22
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/ref.js +0 -112
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/index.js +0 -101
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/types.js +0 -14
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft2020.js +0 -35
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +0 -46
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js +0 -45
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/index.js +0 -22
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +0 -20
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js +0 -15
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js +0 -92
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js +0 -10
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/metadata.js +0 -23
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/next.js +0 -19
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/index.js +0 -13
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +0 -46
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +0 -59
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/const.js +0 -27
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js +0 -17
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/enum.js +0 -49
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/index.js +0 -48
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitContains.js +0 -18
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js +0 -28
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js +0 -33
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +0 -47
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +0 -28
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +0 -27
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/pattern.js +0 -38
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/required.js +0 -72
- package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +0 -70
- package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js +0 -33
- package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/index.js +0 -236
- package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/schemes.js +0 -187
- package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/utils.js +0 -282
- package/dist/node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js +0 -78
- package/dist/playground/components/inputs.js +0 -419
- package/dist/playground/components/spinner.js +0 -15
- package/dist/playground/schema.d.ts +0 -15
- package/dist/playground/schema.js +0 -144
- package/dist/ui/api-page.d.ts +0 -31
- package/dist/ui/api-page.js +0 -59
- package/dist/ui/client/boundary.d.ts +0 -11
- package/dist/ui/client/boundary.js +0 -17
- package/dist/ui/client/boundary.lazy.js +0 -19
- package/dist/ui/client/full.js +0 -13
- package/dist/ui/client/i18n.js +0 -16
- package/dist/ui/client/index.d.ts +0 -42
- package/dist/ui/client/index.js +0 -7
- package/dist/ui/components/accordion.js +0 -67
- package/dist/ui/components/codeblock.d.ts +0 -14
- package/dist/ui/components/dialog.js +0 -56
- package/dist/ui/components/input.js +0 -17
- package/dist/ui/components/select-tab.js +0 -56
- package/dist/ui/components/select.js +0 -71
- package/dist/ui/contexts/api.d.ts +0 -29
- package/dist/ui/create-client.d.ts +0 -26
- package/dist/ui/create-client.js +0 -125
- package/dist/ui/operation/client.js +0 -78
- package/dist/ui/operation/get-example-requests.d.ts +0 -11
- package/dist/ui/operation/usage-tabs/client.d.ts +0 -14
- package/dist/ui/operation/usage-tabs/client.js +0 -91
- package/dist/ui/operation/usage-tabs/index.js +0 -54
- package/dist/ui/schema/client.d.ts +0 -18
- package/dist/ui/schema/client.js +0 -410
- package/dist/ui/schema/index.d.ts +0 -61
- package/dist/ui/schema/index.js +0 -256
- package/dist/utils/auto-anchor.client.js +0 -20
- package/dist/utils/auto-anchor.js +0 -17
- package/dist/utils/deep-equal.js +0 -21
- package/dist/utils/document/process.d.ts +0 -6
- package/dist/utils/document/process.js +0 -18
- package/dist/utils/id-to-title.js +0 -12
- package/dist/utils/is-plain-object.js +0 -8
- package/dist/utils/merge-refs.js +0 -11
- package/dist/utils/schema/dereference.js +0 -45
- package/dist/utils/schema/index.d.ts +0 -18
- package/dist/utils/schema/merge.js +0 -156
- package/dist/utils/schema/pick.js +0 -44
- package/dist/utils/schema/ref.js +0 -35
- package/dist/utils/schema/resolve-ref.js +0 -11
- package/dist/utils/schema/sample.js +0 -442
- package/dist/utils/schema/to-string.d.ts +0 -1
- package/dist/utils/schema/to-string.js +0 -53
- package/dist/utils/url.js +0 -39
package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { require_codegen } from "../../compile/codegen/index.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js
|
|
4
|
-
var require_format = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const codegen_1 = require_codegen();
|
|
7
|
-
exports.default = {
|
|
8
|
-
keyword: "format",
|
|
9
|
-
type: ["number", "string"],
|
|
10
|
-
schemaType: "string",
|
|
11
|
-
$data: true,
|
|
12
|
-
error: {
|
|
13
|
-
message: ({ schemaCode }) => (0, codegen_1.str)`must match format "${schemaCode}"`,
|
|
14
|
-
params: ({ schemaCode }) => (0, codegen_1._)`{format: ${schemaCode}}`
|
|
15
|
-
},
|
|
16
|
-
code(cxt, ruleType) {
|
|
17
|
-
const { gen, data, $data, schema, schemaCode, it } = cxt;
|
|
18
|
-
const { opts, errSchemaPath, schemaEnv, self } = it;
|
|
19
|
-
if (!opts.validateFormats) return;
|
|
20
|
-
if ($data) validate$DataFormat();
|
|
21
|
-
else validateFormat();
|
|
22
|
-
function validate$DataFormat() {
|
|
23
|
-
const fmts = gen.scopeValue("formats", {
|
|
24
|
-
ref: self.formats,
|
|
25
|
-
code: opts.code.formats
|
|
26
|
-
});
|
|
27
|
-
const fDef = gen.const("fDef", (0, codegen_1._)`${fmts}[${schemaCode}]`);
|
|
28
|
-
const fType = gen.let("fType");
|
|
29
|
-
const format = gen.let("format");
|
|
30
|
-
gen.if((0, codegen_1._)`typeof ${fDef} == "object" && !(${fDef} instanceof RegExp)`, () => gen.assign(fType, (0, codegen_1._)`${fDef}.type || "string"`).assign(format, (0, codegen_1._)`${fDef}.validate`), () => gen.assign(fType, (0, codegen_1._)`"string"`).assign(format, fDef));
|
|
31
|
-
cxt.fail$data((0, codegen_1.or)(unknownFmt(), invalidFmt()));
|
|
32
|
-
function unknownFmt() {
|
|
33
|
-
if (opts.strictSchema === false) return codegen_1.nil;
|
|
34
|
-
return (0, codegen_1._)`${schemaCode} && !${format}`;
|
|
35
|
-
}
|
|
36
|
-
function invalidFmt() {
|
|
37
|
-
const callFormat = schemaEnv.$async ? (0, codegen_1._)`(${fDef}.async ? await ${format}(${data}) : ${format}(${data}))` : (0, codegen_1._)`${format}(${data})`;
|
|
38
|
-
const validData = (0, codegen_1._)`(typeof ${format} == "function" ? ${callFormat} : ${format}.test(${data}))`;
|
|
39
|
-
return (0, codegen_1._)`${format} && ${format} !== true && ${fType} === ${ruleType} && !${validData}`;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
function validateFormat() {
|
|
43
|
-
const formatDef = self.formats[schema];
|
|
44
|
-
if (!formatDef) {
|
|
45
|
-
unknownFormat();
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
if (formatDef === true) return;
|
|
49
|
-
const [fmtType, format, fmtRef] = getFormat(formatDef);
|
|
50
|
-
if (fmtType === ruleType) cxt.pass(validCondition());
|
|
51
|
-
function unknownFormat() {
|
|
52
|
-
if (opts.strictSchema === false) {
|
|
53
|
-
self.logger.warn(unknownMsg());
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
throw new Error(unknownMsg());
|
|
57
|
-
function unknownMsg() {
|
|
58
|
-
return `unknown format "${schema}" ignored in schema at path "${errSchemaPath}"`;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
function getFormat(fmtDef) {
|
|
62
|
-
const code = fmtDef instanceof RegExp ? (0, codegen_1.regexpCode)(fmtDef) : opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(schema)}` : void 0;
|
|
63
|
-
const fmt = gen.scopeValue("formats", {
|
|
64
|
-
key: schema,
|
|
65
|
-
ref: fmtDef,
|
|
66
|
-
code
|
|
67
|
-
});
|
|
68
|
-
if (typeof fmtDef == "object" && !(fmtDef instanceof RegExp)) return [
|
|
69
|
-
fmtDef.type || "string",
|
|
70
|
-
fmtDef.validate,
|
|
71
|
-
(0, codegen_1._)`${fmt}.validate`
|
|
72
|
-
];
|
|
73
|
-
return [
|
|
74
|
-
"string",
|
|
75
|
-
fmtDef,
|
|
76
|
-
fmt
|
|
77
|
-
];
|
|
78
|
-
}
|
|
79
|
-
function validCondition() {
|
|
80
|
-
if (typeof formatDef == "object" && !(formatDef instanceof RegExp) && formatDef.async) {
|
|
81
|
-
if (!schemaEnv.$async) throw new Error("async format in sync schema");
|
|
82
|
-
return (0, codegen_1._)`await ${fmtRef}(${data})`;
|
|
83
|
-
}
|
|
84
|
-
return typeof format == "function" ? (0, codegen_1._)`${fmtRef}(${data})` : (0, codegen_1._)`${fmtRef}.test(${data})`;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
}));
|
|
90
|
-
//#endregion
|
|
91
|
-
export default require_format();
|
|
92
|
-
export { require_format };
|
package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { require_format as require_format$1 } from "./format.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js
|
|
4
|
-
var require_format = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.default = [require_format$1().default];
|
|
7
|
-
}));
|
|
8
|
-
//#endregion
|
|
9
|
-
export default require_format();
|
|
10
|
-
export { require_format };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/metadata.js
|
|
3
|
-
var require_metadata = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.contentVocabulary = exports.metadataVocabulary = void 0;
|
|
6
|
-
exports.metadataVocabulary = [
|
|
7
|
-
"title",
|
|
8
|
-
"description",
|
|
9
|
-
"default",
|
|
10
|
-
"deprecated",
|
|
11
|
-
"readOnly",
|
|
12
|
-
"writeOnly",
|
|
13
|
-
"examples"
|
|
14
|
-
];
|
|
15
|
-
exports.contentVocabulary = [
|
|
16
|
-
"contentMediaType",
|
|
17
|
-
"contentEncoding",
|
|
18
|
-
"contentSchema"
|
|
19
|
-
];
|
|
20
|
-
}));
|
|
21
|
-
//#endregion
|
|
22
|
-
export default require_metadata();
|
|
23
|
-
export { require_metadata };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { require_dependentRequired } from "./validation/dependentRequired.js";
|
|
3
|
-
import { require_dependentSchemas } from "./applicator/dependentSchemas.js";
|
|
4
|
-
import { require_limitContains } from "./validation/limitContains.js";
|
|
5
|
-
//#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/next.js
|
|
6
|
-
var require_next = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
const dependentRequired_1 = require_dependentRequired();
|
|
9
|
-
const dependentSchemas_1 = require_dependentSchemas();
|
|
10
|
-
const limitContains_1 = require_limitContains();
|
|
11
|
-
exports.default = [
|
|
12
|
-
dependentRequired_1.default,
|
|
13
|
-
dependentSchemas_1.default,
|
|
14
|
-
limitContains_1.default
|
|
15
|
-
];
|
|
16
|
-
}));
|
|
17
|
-
//#endregion
|
|
18
|
-
export default require_next();
|
|
19
|
-
export { require_next };
|
package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { require_unevaluatedProperties } from "./unevaluatedProperties.js";
|
|
3
|
-
import { require_unevaluatedItems } from "./unevaluatedItems.js";
|
|
4
|
-
//#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/index.js
|
|
5
|
-
var require_unevaluated = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
const unevaluatedProperties_1 = require_unevaluatedProperties();
|
|
8
|
-
const unevaluatedItems_1 = require_unevaluatedItems();
|
|
9
|
-
exports.default = [unevaluatedProperties_1.default, unevaluatedItems_1.default];
|
|
10
|
-
}));
|
|
11
|
-
//#endregion
|
|
12
|
-
export default require_unevaluated();
|
|
13
|
-
export { require_unevaluated };
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { require_codegen } from "../../compile/codegen/index.js";
|
|
3
|
-
import { require_util } from "../../compile/util.js";
|
|
4
|
-
//#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js
|
|
5
|
-
var require_unevaluatedItems = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
const codegen_1 = require_codegen();
|
|
8
|
-
const util_1 = require_util();
|
|
9
|
-
exports.default = {
|
|
10
|
-
keyword: "unevaluatedItems",
|
|
11
|
-
type: "array",
|
|
12
|
-
schemaType: ["boolean", "object"],
|
|
13
|
-
error: {
|
|
14
|
-
message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
|
|
15
|
-
params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
|
|
16
|
-
},
|
|
17
|
-
code(cxt) {
|
|
18
|
-
const { gen, schema, data, it } = cxt;
|
|
19
|
-
const items = it.items || 0;
|
|
20
|
-
if (items === true) return;
|
|
21
|
-
const len = gen.const("len", (0, codegen_1._)`${data}.length`);
|
|
22
|
-
if (schema === false) {
|
|
23
|
-
cxt.setParams({ len: items });
|
|
24
|
-
cxt.fail((0, codegen_1._)`${len} > ${items}`);
|
|
25
|
-
} else if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
|
|
26
|
-
const valid = gen.var("valid", (0, codegen_1._)`${len} <= ${items}`);
|
|
27
|
-
gen.if((0, codegen_1.not)(valid), () => validateItems(valid, items));
|
|
28
|
-
cxt.ok(valid);
|
|
29
|
-
}
|
|
30
|
-
it.items = true;
|
|
31
|
-
function validateItems(valid, from) {
|
|
32
|
-
gen.forRange("i", from, len, (i) => {
|
|
33
|
-
cxt.subschema({
|
|
34
|
-
keyword: "unevaluatedItems",
|
|
35
|
-
dataProp: i,
|
|
36
|
-
dataPropType: util_1.Type.Num
|
|
37
|
-
}, valid);
|
|
38
|
-
if (!it.allErrors) gen.if((0, codegen_1.not)(valid), () => gen.break());
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
}));
|
|
44
|
-
//#endregion
|
|
45
|
-
export default require_unevaluatedItems();
|
|
46
|
-
export { require_unevaluatedItems };
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { require_codegen } from "../../compile/codegen/index.js";
|
|
3
|
-
import { require_util } from "../../compile/util.js";
|
|
4
|
-
import { require_names } from "../../compile/names.js";
|
|
5
|
-
//#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js
|
|
6
|
-
var require_unevaluatedProperties = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
const codegen_1 = require_codegen();
|
|
9
|
-
const util_1 = require_util();
|
|
10
|
-
const names_1 = require_names();
|
|
11
|
-
exports.default = {
|
|
12
|
-
keyword: "unevaluatedProperties",
|
|
13
|
-
type: "object",
|
|
14
|
-
schemaType: ["boolean", "object"],
|
|
15
|
-
trackErrors: true,
|
|
16
|
-
error: {
|
|
17
|
-
message: "must NOT have unevaluated properties",
|
|
18
|
-
params: ({ params }) => (0, codegen_1._)`{unevaluatedProperty: ${params.unevaluatedProperty}}`
|
|
19
|
-
},
|
|
20
|
-
code(cxt) {
|
|
21
|
-
const { gen, schema, data, errsCount, it } = cxt;
|
|
22
|
-
/* istanbul ignore if */
|
|
23
|
-
if (!errsCount) throw new Error("ajv implementation error");
|
|
24
|
-
const { allErrors, props } = it;
|
|
25
|
-
if (props instanceof codegen_1.Name) gen.if((0, codegen_1._)`${props} !== true`, () => gen.forIn("key", data, (key) => gen.if(unevaluatedDynamic(props, key), () => unevaluatedPropCode(key))));
|
|
26
|
-
else if (props !== true) gen.forIn("key", data, (key) => props === void 0 ? unevaluatedPropCode(key) : gen.if(unevaluatedStatic(props, key), () => unevaluatedPropCode(key)));
|
|
27
|
-
it.props = true;
|
|
28
|
-
cxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);
|
|
29
|
-
function unevaluatedPropCode(key) {
|
|
30
|
-
if (schema === false) {
|
|
31
|
-
cxt.setParams({ unevaluatedProperty: key });
|
|
32
|
-
cxt.error();
|
|
33
|
-
if (!allErrors) gen.break();
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
if (!(0, util_1.alwaysValidSchema)(it, schema)) {
|
|
37
|
-
const valid = gen.name("valid");
|
|
38
|
-
cxt.subschema({
|
|
39
|
-
keyword: "unevaluatedProperties",
|
|
40
|
-
dataProp: key,
|
|
41
|
-
dataPropType: util_1.Type.Str
|
|
42
|
-
}, valid);
|
|
43
|
-
if (!allErrors) gen.if((0, codegen_1.not)(valid), () => gen.break());
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
function unevaluatedDynamic(evaluatedProps, key) {
|
|
47
|
-
return (0, codegen_1._)`!${evaluatedProps} || !${evaluatedProps}[${key}]`;
|
|
48
|
-
}
|
|
49
|
-
function unevaluatedStatic(evaluatedProps, key) {
|
|
50
|
-
const ps = [];
|
|
51
|
-
for (const p in evaluatedProps) if (evaluatedProps[p] === true) ps.push((0, codegen_1._)`${key} !== ${p}`);
|
|
52
|
-
return (0, codegen_1.and)(...ps);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
}));
|
|
57
|
-
//#endregion
|
|
58
|
-
export default require_unevaluatedProperties();
|
|
59
|
-
export { require_unevaluatedProperties };
|
package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/const.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { require_codegen } from "../../compile/codegen/index.js";
|
|
3
|
-
import { require_util } from "../../compile/util.js";
|
|
4
|
-
import { require_equal } from "../../runtime/equal.js";
|
|
5
|
-
//#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/const.js
|
|
6
|
-
var require_const = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
const codegen_1 = require_codegen();
|
|
9
|
-
const util_1 = require_util();
|
|
10
|
-
const equal_1 = require_equal();
|
|
11
|
-
exports.default = {
|
|
12
|
-
keyword: "const",
|
|
13
|
-
$data: true,
|
|
14
|
-
error: {
|
|
15
|
-
message: "must be equal to constant",
|
|
16
|
-
params: ({ schemaCode }) => (0, codegen_1._)`{allowedValue: ${schemaCode}}`
|
|
17
|
-
},
|
|
18
|
-
code(cxt) {
|
|
19
|
-
const { gen, data, $data, schemaCode, schema } = cxt;
|
|
20
|
-
if ($data || schema && typeof schema == "object") cxt.fail$data((0, codegen_1._)`!${(0, util_1.useFunc)(gen, equal_1.default)}(${data}, ${schemaCode})`);
|
|
21
|
-
else cxt.fail((0, codegen_1._)`${schema} !== ${data}`);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
}));
|
|
25
|
-
//#endregion
|
|
26
|
-
export default require_const();
|
|
27
|
-
export { require_const };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { require_dependencies } from "../applicator/dependencies.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js
|
|
4
|
-
var require_dependentRequired = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const dependencies_1 = require_dependencies();
|
|
7
|
-
exports.default = {
|
|
8
|
-
keyword: "dependentRequired",
|
|
9
|
-
type: "object",
|
|
10
|
-
schemaType: "object",
|
|
11
|
-
error: dependencies_1.error,
|
|
12
|
-
code: (cxt) => (0, dependencies_1.validatePropertyDeps)(cxt)
|
|
13
|
-
};
|
|
14
|
-
}));
|
|
15
|
-
//#endregion
|
|
16
|
-
export default require_dependentRequired();
|
|
17
|
-
export { require_dependentRequired };
|
package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/enum.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { require_codegen } from "../../compile/codegen/index.js";
|
|
3
|
-
import { require_util } from "../../compile/util.js";
|
|
4
|
-
import { require_equal } from "../../runtime/equal.js";
|
|
5
|
-
//#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/enum.js
|
|
6
|
-
var require_enum = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
const codegen_1 = require_codegen();
|
|
9
|
-
const util_1 = require_util();
|
|
10
|
-
const equal_1 = require_equal();
|
|
11
|
-
exports.default = {
|
|
12
|
-
keyword: "enum",
|
|
13
|
-
schemaType: "array",
|
|
14
|
-
$data: true,
|
|
15
|
-
error: {
|
|
16
|
-
message: "must be equal to one of the allowed values",
|
|
17
|
-
params: ({ schemaCode }) => (0, codegen_1._)`{allowedValues: ${schemaCode}}`
|
|
18
|
-
},
|
|
19
|
-
code(cxt) {
|
|
20
|
-
const { gen, data, $data, schema, schemaCode, it } = cxt;
|
|
21
|
-
if (!$data && schema.length === 0) throw new Error("enum must have non-empty array");
|
|
22
|
-
const useLoop = schema.length >= it.opts.loopEnum;
|
|
23
|
-
let eql;
|
|
24
|
-
const getEql = () => eql !== null && eql !== void 0 ? eql : eql = (0, util_1.useFunc)(gen, equal_1.default);
|
|
25
|
-
let valid;
|
|
26
|
-
if (useLoop || $data) {
|
|
27
|
-
valid = gen.let("valid");
|
|
28
|
-
cxt.block$data(valid, loopEnum);
|
|
29
|
-
} else {
|
|
30
|
-
/* istanbul ignore if */
|
|
31
|
-
if (!Array.isArray(schema)) throw new Error("ajv implementation error");
|
|
32
|
-
const vSchema = gen.const("vSchema", schemaCode);
|
|
33
|
-
valid = (0, codegen_1.or)(...schema.map((_x, i) => equalCode(vSchema, i)));
|
|
34
|
-
}
|
|
35
|
-
cxt.pass(valid);
|
|
36
|
-
function loopEnum() {
|
|
37
|
-
gen.assign(valid, false);
|
|
38
|
-
gen.forOf("v", schemaCode, (v) => gen.if((0, codegen_1._)`${getEql()}(${data}, ${v})`, () => gen.assign(valid, true).break()));
|
|
39
|
-
}
|
|
40
|
-
function equalCode(vSchema, i) {
|
|
41
|
-
const sch = schema[i];
|
|
42
|
-
return typeof sch === "object" && sch !== null ? (0, codegen_1._)`${getEql()}(${data}, ${vSchema}[${i}])` : (0, codegen_1._)`${data} === ${sch}`;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
}));
|
|
47
|
-
//#endregion
|
|
48
|
-
export default require_enum();
|
|
49
|
-
export { require_enum };
|
package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/index.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { require_limitNumber } from "./limitNumber.js";
|
|
3
|
-
import { require_multipleOf } from "./multipleOf.js";
|
|
4
|
-
import { require_limitLength } from "./limitLength.js";
|
|
5
|
-
import { require_pattern } from "./pattern.js";
|
|
6
|
-
import { require_limitProperties } from "./limitProperties.js";
|
|
7
|
-
import { require_required } from "./required.js";
|
|
8
|
-
import { require_limitItems } from "./limitItems.js";
|
|
9
|
-
import { require_uniqueItems } from "./uniqueItems.js";
|
|
10
|
-
import { require_const } from "./const.js";
|
|
11
|
-
import { require_enum } from "./enum.js";
|
|
12
|
-
//#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/index.js
|
|
13
|
-
var require_validation = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
const limitNumber_1 = require_limitNumber();
|
|
16
|
-
const multipleOf_1 = require_multipleOf();
|
|
17
|
-
const limitLength_1 = require_limitLength();
|
|
18
|
-
const pattern_1 = require_pattern();
|
|
19
|
-
const limitProperties_1 = require_limitProperties();
|
|
20
|
-
const required_1 = require_required();
|
|
21
|
-
const limitItems_1 = require_limitItems();
|
|
22
|
-
const uniqueItems_1 = require_uniqueItems();
|
|
23
|
-
const const_1 = require_const();
|
|
24
|
-
const enum_1 = require_enum();
|
|
25
|
-
exports.default = [
|
|
26
|
-
limitNumber_1.default,
|
|
27
|
-
multipleOf_1.default,
|
|
28
|
-
limitLength_1.default,
|
|
29
|
-
pattern_1.default,
|
|
30
|
-
limitProperties_1.default,
|
|
31
|
-
required_1.default,
|
|
32
|
-
limitItems_1.default,
|
|
33
|
-
uniqueItems_1.default,
|
|
34
|
-
{
|
|
35
|
-
keyword: "type",
|
|
36
|
-
schemaType: ["string", "array"]
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
keyword: "nullable",
|
|
40
|
-
schemaType: "boolean"
|
|
41
|
-
},
|
|
42
|
-
const_1.default,
|
|
43
|
-
enum_1.default
|
|
44
|
-
];
|
|
45
|
-
}));
|
|
46
|
-
//#endregion
|
|
47
|
-
export default require_validation();
|
|
48
|
-
export { require_validation };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { require_util } from "../../compile/util.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitContains.js
|
|
4
|
-
var require_limitContains = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const util_1 = require_util();
|
|
7
|
-
exports.default = {
|
|
8
|
-
keyword: ["maxContains", "minContains"],
|
|
9
|
-
type: "array",
|
|
10
|
-
schemaType: "number",
|
|
11
|
-
code({ keyword, parentSchema, it }) {
|
|
12
|
-
if (parentSchema.contains === void 0) (0, util_1.checkStrictMode)(it, `"${keyword}" without "contains" is ignored`);
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
}));
|
|
16
|
-
//#endregion
|
|
17
|
-
export default require_limitContains();
|
|
18
|
-
export { require_limitContains };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { require_codegen } from "../../compile/codegen/index.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js
|
|
4
|
-
var require_limitItems = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const codegen_1 = require_codegen();
|
|
7
|
-
exports.default = {
|
|
8
|
-
keyword: ["maxItems", "minItems"],
|
|
9
|
-
type: "array",
|
|
10
|
-
schemaType: "number",
|
|
11
|
-
$data: true,
|
|
12
|
-
error: {
|
|
13
|
-
message({ keyword, schemaCode }) {
|
|
14
|
-
const comp = keyword === "maxItems" ? "more" : "fewer";
|
|
15
|
-
return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} items`;
|
|
16
|
-
},
|
|
17
|
-
params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`
|
|
18
|
-
},
|
|
19
|
-
code(cxt) {
|
|
20
|
-
const { keyword, data, schemaCode } = cxt;
|
|
21
|
-
const op = keyword === "maxItems" ? codegen_1.operators.GT : codegen_1.operators.LT;
|
|
22
|
-
cxt.fail$data((0, codegen_1._)`${data}.length ${op} ${schemaCode}`);
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
}));
|
|
26
|
-
//#endregion
|
|
27
|
-
export default require_limitItems();
|
|
28
|
-
export { require_limitItems };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { require_codegen } from "../../compile/codegen/index.js";
|
|
3
|
-
import { require_util } from "../../compile/util.js";
|
|
4
|
-
import { require_ucs2length } from "../../runtime/ucs2length.js";
|
|
5
|
-
//#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js
|
|
6
|
-
var require_limitLength = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
const codegen_1 = require_codegen();
|
|
9
|
-
const util_1 = require_util();
|
|
10
|
-
const ucs2length_1 = require_ucs2length();
|
|
11
|
-
exports.default = {
|
|
12
|
-
keyword: ["maxLength", "minLength"],
|
|
13
|
-
type: "string",
|
|
14
|
-
schemaType: "number",
|
|
15
|
-
$data: true,
|
|
16
|
-
error: {
|
|
17
|
-
message({ keyword, schemaCode }) {
|
|
18
|
-
const comp = keyword === "maxLength" ? "more" : "fewer";
|
|
19
|
-
return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} characters`;
|
|
20
|
-
},
|
|
21
|
-
params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`
|
|
22
|
-
},
|
|
23
|
-
code(cxt) {
|
|
24
|
-
const { keyword, data, schemaCode, it } = cxt;
|
|
25
|
-
const op = keyword === "maxLength" ? codegen_1.operators.GT : codegen_1.operators.LT;
|
|
26
|
-
const len = it.opts.unicode === false ? (0, codegen_1._)`${data}.length` : (0, codegen_1._)`${(0, util_1.useFunc)(cxt.gen, ucs2length_1.default)}(${data})`;
|
|
27
|
-
cxt.fail$data((0, codegen_1._)`${len} ${op} ${schemaCode}`);
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
}));
|
|
31
|
-
//#endregion
|
|
32
|
-
export default require_limitLength();
|
|
33
|
-
export { require_limitLength };
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { require_codegen } from "../../compile/codegen/index.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js
|
|
4
|
-
var require_limitNumber = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const codegen_1 = require_codegen();
|
|
7
|
-
const ops = codegen_1.operators;
|
|
8
|
-
const KWDs = {
|
|
9
|
-
maximum: {
|
|
10
|
-
okStr: "<=",
|
|
11
|
-
ok: ops.LTE,
|
|
12
|
-
fail: ops.GT
|
|
13
|
-
},
|
|
14
|
-
minimum: {
|
|
15
|
-
okStr: ">=",
|
|
16
|
-
ok: ops.GTE,
|
|
17
|
-
fail: ops.LT
|
|
18
|
-
},
|
|
19
|
-
exclusiveMaximum: {
|
|
20
|
-
okStr: "<",
|
|
21
|
-
ok: ops.LT,
|
|
22
|
-
fail: ops.GTE
|
|
23
|
-
},
|
|
24
|
-
exclusiveMinimum: {
|
|
25
|
-
okStr: ">",
|
|
26
|
-
ok: ops.GT,
|
|
27
|
-
fail: ops.LTE
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
exports.default = {
|
|
31
|
-
keyword: Object.keys(KWDs),
|
|
32
|
-
type: "number",
|
|
33
|
-
schemaType: "number",
|
|
34
|
-
$data: true,
|
|
35
|
-
error: {
|
|
36
|
-
message: ({ keyword, schemaCode }) => (0, codegen_1.str)`must be ${KWDs[keyword].okStr} ${schemaCode}`,
|
|
37
|
-
params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`
|
|
38
|
-
},
|
|
39
|
-
code(cxt) {
|
|
40
|
-
const { keyword, data, schemaCode } = cxt;
|
|
41
|
-
cxt.fail$data((0, codegen_1._)`${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`);
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
}));
|
|
45
|
-
//#endregion
|
|
46
|
-
export default require_limitNumber();
|
|
47
|
-
export { require_limitNumber };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { require_codegen } from "../../compile/codegen/index.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js
|
|
4
|
-
var require_limitProperties = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const codegen_1 = require_codegen();
|
|
7
|
-
exports.default = {
|
|
8
|
-
keyword: ["maxProperties", "minProperties"],
|
|
9
|
-
type: "object",
|
|
10
|
-
schemaType: "number",
|
|
11
|
-
$data: true,
|
|
12
|
-
error: {
|
|
13
|
-
message({ keyword, schemaCode }) {
|
|
14
|
-
const comp = keyword === "maxProperties" ? "more" : "fewer";
|
|
15
|
-
return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} properties`;
|
|
16
|
-
},
|
|
17
|
-
params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`
|
|
18
|
-
},
|
|
19
|
-
code(cxt) {
|
|
20
|
-
const { keyword, data, schemaCode } = cxt;
|
|
21
|
-
const op = keyword === "maxProperties" ? codegen_1.operators.GT : codegen_1.operators.LT;
|
|
22
|
-
cxt.fail$data((0, codegen_1._)`Object.keys(${data}).length ${op} ${schemaCode}`);
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
}));
|
|
26
|
-
//#endregion
|
|
27
|
-
export default require_limitProperties();
|
|
28
|
-
export { require_limitProperties };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { require_codegen } from "../../compile/codegen/index.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js
|
|
4
|
-
var require_multipleOf = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const codegen_1 = require_codegen();
|
|
7
|
-
exports.default = {
|
|
8
|
-
keyword: "multipleOf",
|
|
9
|
-
type: "number",
|
|
10
|
-
schemaType: "number",
|
|
11
|
-
$data: true,
|
|
12
|
-
error: {
|
|
13
|
-
message: ({ schemaCode }) => (0, codegen_1.str)`must be multiple of ${schemaCode}`,
|
|
14
|
-
params: ({ schemaCode }) => (0, codegen_1._)`{multipleOf: ${schemaCode}}`
|
|
15
|
-
},
|
|
16
|
-
code(cxt) {
|
|
17
|
-
const { gen, data, schemaCode, it } = cxt;
|
|
18
|
-
const prec = it.opts.multipleOfPrecision;
|
|
19
|
-
const res = gen.let("res");
|
|
20
|
-
const invalid = prec ? (0, codegen_1._)`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}` : (0, codegen_1._)`${res} !== parseInt(${res})`;
|
|
21
|
-
cxt.fail$data((0, codegen_1._)`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
}));
|
|
25
|
-
//#endregion
|
|
26
|
-
export default require_multipleOf();
|
|
27
|
-
export { require_multipleOf };
|
package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/pattern.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { require_codegen } from "../../compile/codegen/index.js";
|
|
3
|
-
import { require_util } from "../../compile/util.js";
|
|
4
|
-
import { require_code } from "../code.js";
|
|
5
|
-
//#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/pattern.js
|
|
6
|
-
var require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
const code_1 = require_code();
|
|
9
|
-
const util_1 = require_util();
|
|
10
|
-
const codegen_1 = require_codegen();
|
|
11
|
-
exports.default = {
|
|
12
|
-
keyword: "pattern",
|
|
13
|
-
type: "string",
|
|
14
|
-
schemaType: "string",
|
|
15
|
-
$data: true,
|
|
16
|
-
error: {
|
|
17
|
-
message: ({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`,
|
|
18
|
-
params: ({ schemaCode }) => (0, codegen_1._)`{pattern: ${schemaCode}}`
|
|
19
|
-
},
|
|
20
|
-
code(cxt) {
|
|
21
|
-
const { gen, data, $data, schema, schemaCode, it } = cxt;
|
|
22
|
-
const u = it.opts.unicodeRegExp ? "u" : "";
|
|
23
|
-
if ($data) {
|
|
24
|
-
const { regExp } = it.opts.code;
|
|
25
|
-
const regExpCode = regExp.code === "new RegExp" ? (0, codegen_1._)`new RegExp` : (0, util_1.useFunc)(gen, regExp);
|
|
26
|
-
const valid = gen.let("valid");
|
|
27
|
-
gen.try(() => gen.assign(valid, (0, codegen_1._)`${regExpCode}(${schemaCode}, ${u}).test(${data})`), () => gen.assign(valid, false));
|
|
28
|
-
cxt.fail$data((0, codegen_1._)`!${valid}`);
|
|
29
|
-
} else {
|
|
30
|
-
const regExp = (0, code_1.usePattern)(cxt, schema);
|
|
31
|
-
cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
}));
|
|
36
|
-
//#endregion
|
|
37
|
-
export default require_pattern();
|
|
38
|
-
export { require_pattern };
|