@kubb/agent 4.27.2 → 4.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/server/chunks/nitro/nitro.mjs +330 -194
- package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
- package/.output/server/chunks/routes/api/health.get.mjs +10 -5
- package/.output/server/chunks/routes/api/health.get.mjs.map +1 -1
- package/.output/server/index.mjs +11 -6
- package/.output/server/index.mjs.map +1 -1
- package/.output/server/node_modules/anymatch/index.js +104 -0
- package/.output/server/node_modules/anymatch/package.json +48 -0
- package/.output/server/node_modules/chokidar/handler.js +632 -0
- package/.output/server/node_modules/chokidar/index.js +822 -0
- package/.output/server/node_modules/chokidar/package.json +63 -0
- package/.output/server/node_modules/normalize-path/index.js +35 -0
- package/.output/server/node_modules/normalize-path/package.json +77 -0
- package/.output/server/node_modules/picomatch/index.js +1 -15
- package/.output/server/node_modules/picomatch/lib/constants.js +5 -6
- package/.output/server/node_modules/picomatch/lib/parse.js +9 -3
- package/.output/server/node_modules/picomatch/lib/picomatch.js +4 -3
- package/.output/server/node_modules/picomatch/lib/utils.js +16 -24
- package/.output/server/node_modules/picomatch/package.json +5 -7
- package/.output/server/node_modules/readdirp/index.js +272 -0
- package/.output/server/node_modules/readdirp/package.json +66 -0
- package/.output/server/package.json +6 -10
- package/LICENSE +21 -0
- package/README.md +98 -42
- package/package.json +17 -24
- package/.output/server/node_modules/@redocly/ajv/dist/2020.js +0 -55
- package/.output/server/node_modules/@redocly/ajv/dist/ajv.js +0 -50
- package/.output/server/node_modules/@redocly/ajv/dist/compile/codegen/code.js +0 -156
- package/.output/server/node_modules/@redocly/ajv/dist/compile/codegen/index.js +0 -697
- package/.output/server/node_modules/@redocly/ajv/dist/compile/codegen/scope.js +0 -143
- package/.output/server/node_modules/@redocly/ajv/dist/compile/errors.js +0 -123
- package/.output/server/node_modules/@redocly/ajv/dist/compile/index.js +0 -249
- package/.output/server/node_modules/@redocly/ajv/dist/compile/names.js +0 -29
- package/.output/server/node_modules/@redocly/ajv/dist/compile/ref_error.js +0 -12
- package/.output/server/node_modules/@redocly/ajv/dist/compile/resolve.js +0 -155
- package/.output/server/node_modules/@redocly/ajv/dist/compile/rules.js +0 -26
- package/.output/server/node_modules/@redocly/ajv/dist/compile/util.js +0 -178
- package/.output/server/node_modules/@redocly/ajv/dist/compile/validate/applicability.js +0 -19
- package/.output/server/node_modules/@redocly/ajv/dist/compile/validate/boolSchema.js +0 -50
- package/.output/server/node_modules/@redocly/ajv/dist/compile/validate/dataType.js +0 -203
- package/.output/server/node_modules/@redocly/ajv/dist/compile/validate/defaults.js +0 -35
- package/.output/server/node_modules/@redocly/ajv/dist/compile/validate/index.js +0 -534
- package/.output/server/node_modules/@redocly/ajv/dist/compile/validate/keyword.js +0 -124
- package/.output/server/node_modules/@redocly/ajv/dist/compile/validate/subschema.js +0 -81
- package/.output/server/node_modules/@redocly/ajv/dist/core.js +0 -632
- package/.output/server/node_modules/@redocly/ajv/dist/draft4.js +0 -56
- package/.output/server/node_modules/@redocly/ajv/dist/refs/data.json +0 -13
- package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/index.js +0 -30
- package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/applicator.json +0 -48
- package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/content.json +0 -17
- package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/core.json +0 -51
- package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json +0 -14
- package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json +0 -37
- package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json +0 -15
- package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/meta/validation.json +0 -90
- package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-2020-12/schema.json +0 -55
- package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-draft-04.json +0 -138
- package/.output/server/node_modules/@redocly/ajv/dist/refs/json-schema-draft-07.json +0 -151
- package/.output/server/node_modules/@redocly/ajv/dist/runtime/equal.js +0 -7
- package/.output/server/node_modules/@redocly/ajv/dist/runtime/ucs2length.js +0 -24
- package/.output/server/node_modules/@redocly/ajv/dist/runtime/uri.js +0 -6
- package/.output/server/node_modules/@redocly/ajv/dist/runtime/validation_error.js +0 -11
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/additionalItems.js +0 -49
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/additionalProperties.js +0 -107
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/allOf.js +0 -23
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/anyOf.js +0 -12
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/contains.js +0 -95
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/dependencies.js +0 -85
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/dependentSchemas.js +0 -11
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/if.js +0 -66
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/index.js +0 -44
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/items.js +0 -52
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/items2020.js +0 -30
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/not.js +0 -26
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/oneOf.js +0 -60
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/patternProperties.js +0 -75
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/prefixItems.js +0 -12
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/properties.js +0 -55
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/propertyNames.js +0 -38
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/applicator/thenElse.js +0 -13
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/code.js +0 -138
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/core/id.js +0 -10
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/core/index.js +0 -16
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/core/ref.js +0 -132
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/discriminator/index.js +0 -139
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/discriminator/types.js +0 -9
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/draft2020.js +0 -23
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/draft4.js +0 -29
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/draft7.js +0 -17
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +0 -30
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/dynamic/dynamicRef.js +0 -51
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/dynamic/index.js +0 -9
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +0 -16
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/dynamic/recursiveRef.js +0 -10
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/format/format.js +0 -92
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/format/index.js +0 -6
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/metadata.js +0 -26
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/next.js +0 -8
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/oasContext.js +0 -26
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/unevaluated/index.js +0 -7
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +0 -40
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +0 -84
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/const.js +0 -25
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/dependentRequired.js +0 -12
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/draft04/limitNumber.js +0 -43
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/draft04/limitNumberExclusive.js +0 -19
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/enum.js +0 -48
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/index.js +0 -37
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/limitContains.js +0 -15
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/limitItems.js +0 -24
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/limitLength.js +0 -27
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/limitNumber.js +0 -27
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/limitProperties.js +0 -24
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/multipleOf.js +0 -26
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/pattern.js +0 -24
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/readOnly.js +0 -20
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/required.js +0 -86
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/uniqueItems.js +0 -64
- package/.output/server/node_modules/@redocly/ajv/dist/vocabularies/validation/writeOnly.js +0 -20
- package/.output/server/node_modules/@redocly/ajv/package.json +0 -130
- package/.output/server/node_modules/@redocly/config/lib/common.js +0 -90
- package/.output/server/node_modules/@redocly/config/lib/constants.js +0 -73
- package/.output/server/node_modules/@redocly/config/lib/default-theme-config-schema.js +0 -54
- package/.output/server/node_modules/@redocly/config/lib/entities-catalog-config-schema.js +0 -186
- package/.output/server/node_modules/@redocly/config/lib/entities-catalog-entity-file-schema.js +0 -283
- package/.output/server/node_modules/@redocly/config/lib/ex-theme-config-schemas.js +0 -661
- package/.output/server/node_modules/@redocly/config/lib/feedback-config-schema.js +0 -88
- package/.output/server/node_modules/@redocly/config/lib/graphql-config-schema.js +0 -157
- package/.output/server/node_modules/@redocly/config/lib/index.js +0 -38
- package/.output/server/node_modules/@redocly/config/lib/product-override-schema.js +0 -43
- package/.output/server/node_modules/@redocly/config/lib/redoc-config-schema.js +0 -120
- package/.output/server/node_modules/@redocly/config/lib/reference-docs-config-schema.js +0 -518
- package/.output/server/node_modules/@redocly/config/lib/remove-property-recursively.js +0 -25
- package/.output/server/node_modules/@redocly/config/lib/reunite-config-schema.js +0 -103
- package/.output/server/node_modules/@redocly/config/lib/root-config-schema.js +0 -551
- package/.output/server/node_modules/@redocly/config/lib/scorecards-config-schema.js +0 -244
- package/.output/server/node_modules/@redocly/config/lib/types/api-functions-types.js +0 -3
- package/.output/server/node_modules/@redocly/config/lib/types/catalog-entity-types.js +0 -3
- package/.output/server/node_modules/@redocly/config/lib/types/code-walkthrough-types.js +0 -3
- package/.output/server/node_modules/@redocly/config/lib/types/config-types.js +0 -3
- package/.output/server/node_modules/@redocly/config/lib/types/index.js +0 -21
- package/.output/server/node_modules/@redocly/config/lib/types/portal-shared-types.js +0 -18
- package/.output/server/node_modules/@redocly/config/package.json +0 -28
- package/.output/server/node_modules/@redocly/openapi-core/lib/bundle/bundle-document.js +0 -85
- package/.output/server/node_modules/@redocly/openapi-core/lib/bundle/bundle-visitor.js +0 -257
- package/.output/server/node_modules/@redocly/openapi-core/lib/bundle/bundle.js +0 -74
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/all.js +0 -310
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/builtIn.js +0 -58
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/bundle-extends.js +0 -27
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/config-resolvers.js +0 -335
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/config.js +0 -338
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/constants.js +0 -13
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/get-resolve-config.js +0 -9
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/group-assertion-rules.js +0 -51
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/index.js +0 -8
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/load.js +0 -98
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/minimal.js +0 -289
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/recommended-strict.js +0 -289
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/recommended.js +0 -289
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/rules.js +0 -35
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/spec.js +0 -289
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/types.js +0 -2
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/utils.js +0 -129
- package/.output/server/node_modules/@redocly/openapi-core/lib/config/visitors.js +0 -88
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/arazzo/index.js +0 -2
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/async2/index.js +0 -2
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/async3/index.js +0 -2
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/common/filters/filter-helper.js +0 -65
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/common/filters/filter-in.js +0 -14
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/common/filters/filter-out.js +0 -14
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/common/info-description-override.js +0 -21
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/common/info-override.js +0 -14
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/common/media-type-examples-override.js +0 -58
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/common/operation-description-override.js +0 -27
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/common/remove-x-internal.js +0 -68
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/common/tag-description-override.js +0 -23
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/oas2/index.js +0 -19
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/oas2/remove-unused-components.js +0 -88
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/oas3/index.js +0 -21
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/oas3/remove-unused-components.js +0 -116
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/openrpc/index.js +0 -2
- package/.output/server/node_modules/@redocly/openapi-core/lib/decorators/overlay1/index.js +0 -2
- package/.output/server/node_modules/@redocly/openapi-core/lib/detect-spec.js +0 -79
- package/.output/server/node_modules/@redocly/openapi-core/lib/env.js +0 -5
- package/.output/server/node_modules/@redocly/openapi-core/lib/errors/yaml-parse-error.js +0 -14
- package/.output/server/node_modules/@redocly/openapi-core/lib/format/codeframes.js +0 -177
- package/.output/server/node_modules/@redocly/openapi-core/lib/format/format.js +0 -365
- package/.output/server/node_modules/@redocly/openapi-core/lib/index.js +0 -49
- package/.output/server/node_modules/@redocly/openapi-core/lib/js-yaml/index.js +0 -11
- package/.output/server/node_modules/@redocly/openapi-core/lib/lint-entity.js +0 -171
- package/.output/server/node_modules/@redocly/openapi-core/lib/lint.js +0 -123
- package/.output/server/node_modules/@redocly/openapi-core/lib/logger.js +0 -56
- package/.output/server/node_modules/@redocly/openapi-core/lib/oas-types.js +0 -35
- package/.output/server/node_modules/@redocly/openapi-core/lib/ref-utils.js +0 -106
- package/.output/server/node_modules/@redocly/openapi-core/lib/resolve.js +0 -326
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/ajv.js +0 -106
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/criteria-unique.js +0 -68
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/index.js +0 -52
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/outputs-defined.js +0 -139
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/parameters-unique.js +0 -27
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/requestBody-replacements-unique.js +0 -30
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/sourceDescription-type.js +0 -19
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/sourceDescriptions-name-unique.js +0 -21
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/sourceDescriptions-not-empty.js +0 -15
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/step-onFailure-unique.js +0 -27
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/step-onSuccess-unique.js +0 -27
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/stepId-unique.js +0 -23
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/workflow-dependsOn.js +0 -53
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/arazzo/workflowId-unique.js +0 -19
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/async2/channels-kebab-case.js +0 -16
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/async2/index.js +0 -32
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/async2/no-channel-trailing-slash.js +0 -13
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/async3/channels-kebab-case.js +0 -16
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/async3/index.js +0 -32
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/async3/no-channel-trailing-slash.js +0 -13
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/catalog-entity/entity-key-valid.js +0 -39
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/assertions/asserts.js +0 -269
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/assertions/index.js +0 -22
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/assertions/utils.js +0 -215
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/info-contact.js +0 -14
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/info-license-strict.js +0 -23
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/info-license.js +0 -14
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-ambiguous-paths.js +0 -42
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-duplicated-tag-names.js +0 -21
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-enum-type-mismatch.js +0 -38
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-http-verbs-in-paths.js +0 -31
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-identical-paths.js +0 -21
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-invalid-parameter-examples.js +0 -32
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-invalid-schema-examples.js +0 -34
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-path-trailing-slash.js +0 -13
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-required-schema-properties-undefined.js +0 -78
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-schema-type-mismatch.js +0 -19
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/no-unresolved-refs.js +0 -42
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-2xx-response.js +0 -20
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-4xx-response.js +0 -20
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-description.js +0 -9
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-operationId-unique.js +0 -17
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-operationId-url-safe.js +0 -15
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-operationId.js +0 -13
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-parameters-unique.js +0 -37
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-singular-tag.js +0 -13
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-summary.js +0 -9
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/operation-tag-defined.js +0 -27
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/parameter-description.js +0 -19
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/path-declaration-must-exist.js +0 -13
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/path-http-verbs-order.js +0 -23
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/path-not-include-query.js +0 -15
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/path-params-defined.js +0 -125
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/path-segment-plural.js +0 -30
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/paths-kebab-case.js +0 -17
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/required-string-property-missing-min-length.js +0 -34
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/response-contains-header.js +0 -26
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/scalar-property-missing-example.js +0 -39
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/security-defined.js +0 -62
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/spec-strict-refs.js +0 -27
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/struct.js +0 -150
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/tag-description.js +0 -9
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/common/tags-alphabetical.js +0 -18
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas2/boolean-parameter-prefixes.js +0 -19
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas2/index.js +0 -93
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas2/request-mime-type.js +0 -14
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas2/response-contains-property.js +0 -34
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas2/response-mime-type.js +0 -14
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/array-parameter-serialization.js +0 -26
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/boolean-parameter-prefixes.js +0 -21
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/component-name-unique.js +0 -130
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/index.js +0 -129
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/no-empty-servers.js +0 -20
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/no-example-value-and-externalValue.js +0 -13
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/no-invalid-media-type-examples.js +0 -59
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/no-server-example.com.js +0 -15
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/no-server-trailing-slash.js +0 -15
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/no-server-variables-empty-enum.js +0 -58
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/no-undefined-server-variable.js +0 -28
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/no-unused-components.js +0 -83
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/nullable-type-sibling.js +0 -15
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/operation-4xx-problem-details-rfc7807.js +0 -33
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/request-mime-type.js +0 -28
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/response-contains-property.js +0 -36
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/response-mime-type.js +0 -28
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/spec-components-invalid-map-name.js +0 -59
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/spec-discriminator-defaultMapping.js +0 -32
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/spec-example-values.js +0 -31
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/spec-no-invalid-encoding-combinations.js +0 -16
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/spec-no-invalid-tag-parents.js +0 -38
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/oas3/spec-querystring-parameters.js +0 -65
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/openrpc/index.js +0 -20
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/openrpc/no-unused-components.js +0 -82
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/openrpc/spec-no-duplicated-method-params.js +0 -28
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/openrpc/spec-no-required-params-after-optional.js +0 -31
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/other/stats.js +0 -74
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/overlay1/index.js +0 -12
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/respect/no-criteria-xpath.js +0 -20
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/respect/no-x-security-both-scheme-and-scheme-name.js +0 -30
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/respect/no-x-security-scheme-name-without-openapi.js +0 -25
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/respect/respect-supported-versions.js +0 -18
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/respect/x-security-scheme-name-reference.js +0 -35
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/respect/x-security-scheme-required-values.js +0 -60
- package/.output/server/node_modules/@redocly/openapi-core/lib/rules/utils.js +0 -172
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/arazzo.js +0 -482
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/asyncapi2.js +0 -1157
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/asyncapi3.js +0 -511
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/entity.js +0 -32
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/index.js +0 -90
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/json-schema-adapter.js +0 -174
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/json-schema-draft7.shared.js +0 -101
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/oas2.js +0 -454
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/oas3.js +0 -828
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/oas3_1.js +0 -292
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/oas3_2.js +0 -306
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/openrpc.js +0 -360
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/overlay.js +0 -61
- package/.output/server/node_modules/@redocly/openapi-core/lib/types/redocly-yaml.js +0 -555
- package/.output/server/node_modules/@redocly/openapi-core/lib/typings/arazzo.js +0 -3
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/assign-config.js +0 -28
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/dequal.js +0 -36
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/does-yaml-file-exist.js +0 -7
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/error.js +0 -3
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/get-intersection-length.js +0 -11
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/get-matching-status-code-range.js +0 -4
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/get-own.js +0 -4
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/identity.js +0 -4
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-custom-rule-id.js +0 -4
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-defined.js +0 -4
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-empty-array.js +0 -4
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-empty-object.js +0 -5
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-not-empty-array.js +0 -4
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-not-empty-object.js +0 -6
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-not-string.js +0 -5
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-ordered.js +0 -27
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-path-parameter.js +0 -4
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-plain-object.js +0 -4
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-string.js +0 -4
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/is-truthy.js +0 -4
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/keys-of.js +0 -6
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/make-ref-id.js +0 -4
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/next-tick.js +0 -6
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/oas-has-component.js +0 -4
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/omit.js +0 -8
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/pause.js +0 -4
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/pluralize.js +0 -8
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/read-file-from-url.js +0 -26
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/regex-from-string.js +0 -5
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/scorecards.js +0 -99
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/slash.js +0 -11
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/split-camel-case-into-words.js +0 -13
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/stack.js +0 -7
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/validate-mime-type.js +0 -31
- package/.output/server/node_modules/@redocly/openapi-core/lib/utils/yaml-fs-helper.js +0 -23
- package/.output/server/node_modules/@redocly/openapi-core/lib/visitors.js +0 -177
- package/.output/server/node_modules/@redocly/openapi-core/lib/walk.js +0 -303
- package/.output/server/node_modules/@redocly/openapi-core/package.json +0 -74
- package/.output/server/node_modules/ajv-formats/dist/formats.js +0 -208
- package/.output/server/node_modules/ajv-formats/dist/index.js +0 -37
- package/.output/server/node_modules/ajv-formats/dist/limit.js +0 -69
- package/.output/server/node_modules/ajv-formats/package.json +0 -74
- package/.output/server/node_modules/colorette/index.js +0 -82
- package/.output/server/node_modules/colorette/package.json +0 -39
- package/.output/server/node_modules/js-levenshtein/index.js +0 -105
- package/.output/server/node_modules/js-levenshtein/package.json +0 -49
- package/.output/server/node_modules/pluralize/package.json +0 -40
- package/.output/server/node_modules/pluralize/pluralize.js +0 -503
- package/.output/server/node_modules/yaml-ast-parser/dist/src/common.js +0 -45
- package/.output/server/node_modules/yaml-ast-parser/dist/src/dumper.js +0 -644
- package/.output/server/node_modules/yaml-ast-parser/dist/src/exception.js +0 -40
- package/.output/server/node_modules/yaml-ast-parser/dist/src/index.js +0 -22
- package/.output/server/node_modules/yaml-ast-parser/dist/src/loader.js +0 -1416
- package/.output/server/node_modules/yaml-ast-parser/dist/src/mark.js +0 -62
- package/.output/server/node_modules/yaml-ast-parser/dist/src/scalarInference.js +0 -82
- package/.output/server/node_modules/yaml-ast-parser/dist/src/schema/core.js +0 -8
- package/.output/server/node_modules/yaml-ast-parser/dist/src/schema/default_full.js +0 -14
- package/.output/server/node_modules/yaml-ast-parser/dist/src/schema/default_safe.js +0 -19
- package/.output/server/node_modules/yaml-ast-parser/dist/src/schema/failsafe.js +0 -10
- package/.output/server/node_modules/yaml-ast-parser/dist/src/schema/json.js +0 -14
- package/.output/server/node_modules/yaml-ast-parser/dist/src/schema.js +0 -78
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/binary.js +0 -92
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/bool.js +0 -32
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/float.js +0 -95
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/int.js +0 -155
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/js/regexp.js +0 -64
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/js/undefined.js +0 -22
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/map.js +0 -7
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/merge.js +0 -10
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/null.js +0 -30
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/omap.js +0 -46
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/pairs.js +0 -55
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/seq.js +0 -7
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/set.js +0 -22
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/str.js +0 -7
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type/timestamp.js +0 -70
- package/.output/server/node_modules/yaml-ast-parser/dist/src/type.js +0 -54
- package/.output/server/node_modules/yaml-ast-parser/dist/src/yamlAST.js +0 -82
- package/.output/server/node_modules/yaml-ast-parser/package.json +0 -39
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import process from 'node:process';globalThis._importMeta_=globalThis._importMeta_||{url:"file:///_entry.js",env:process.env};import
|
|
1
|
+
import process from 'node:process';globalThis._importMeta_=globalThis._importMeta_||{url:"file:///_entry.js",env:process.env};import urlNode from 'node:url'
|
|
2
|
+
import pathNode from 'node:path'
|
|
3
|
+
const __filename = urlNode.fileURLToPath(globalThis._importMeta_.url)
|
|
4
|
+
const __dirname = pathNode.dirname(__filename)
|
|
5
|
+
import http, { Server as Server$2 } from 'node:http';
|
|
2
6
|
import https, { Server as Server$1 } from 'node:https';
|
|
3
7
|
import { EventEmitter } from 'node:events';
|
|
4
8
|
import { Buffer as Buffer$1 } from 'node:buffer';
|
|
5
|
-
import fs$2, { promises, existsSync, readFileSync,
|
|
6
|
-
import path$2, { resolve, dirname,
|
|
7
|
-
import
|
|
9
|
+
import fs$2, { promises, existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
10
|
+
import path$2, { resolve, dirname, relative, join, normalize } from 'node:path';
|
|
11
|
+
import anymatch from 'anymatch';
|
|
12
|
+
import { createHash, randomBytes } from 'node:crypto';
|
|
8
13
|
import process$1, { version as version$2 } from 'node:process';
|
|
9
14
|
import { orderBy } from 'natural-orderby';
|
|
10
15
|
import { merge as merge$1, mergeDeep, isPlainObject as isPlainObject$1, uniqueWith, isDeepEqual, isNumber, isFunction, difference } from 'remeda';
|
|
11
|
-
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
12
16
|
import { execaCommand, execa } from 'execa';
|
|
13
|
-
import createJiti, { createJiti as createJiti$1 } from 'jiti';
|
|
14
|
-
import pc from 'picocolors';
|
|
15
17
|
import os$1 from 'node:os';
|
|
18
|
+
import pc from 'picocolors';
|
|
16
19
|
import fs$1 from 'fs-extra';
|
|
17
20
|
import { switcher } from 'js-runtime';
|
|
18
21
|
import { performance as performance$1 } from 'node:perf_hooks';
|
|
@@ -20,12 +23,14 @@ import mod, { createRequire } from 'node:module';
|
|
|
20
23
|
import { createFabric, createReactFabric, App, File, Function as Function$1, Const, FunctionParams, Type as Type$1, useApp } from '@kubb/react-fabric';
|
|
21
24
|
import { typescriptParser } from '@kubb/react-fabric/parsers';
|
|
22
25
|
import { fsPlugin } from '@kubb/react-fabric/plugins';
|
|
26
|
+
import { pathToFileURL, fileURLToPath } from 'node:url';
|
|
23
27
|
import { coerce, satisfies } from 'semver';
|
|
24
28
|
import { parseArgsStringToArgv } from 'string-argv';
|
|
25
|
-
import {
|
|
29
|
+
import { createJiti } from 'jiti';
|
|
26
30
|
import jsonpointer from 'jsonpointer';
|
|
27
31
|
import BaseOas from 'oas';
|
|
28
|
-
import {
|
|
32
|
+
import { matchesMimeType } from 'oas/utils';
|
|
33
|
+
import { bundle } from '@readme/openapi-parser';
|
|
29
34
|
import { isRef } from 'oas/types';
|
|
30
35
|
import OASNormalize from 'oas-normalize';
|
|
31
36
|
import swagger2openapi from 'swagger2openapi';
|
|
@@ -2597,11 +2602,11 @@ function defineDriver$1(factory) {
|
|
|
2597
2602
|
return factory;
|
|
2598
2603
|
}
|
|
2599
2604
|
|
|
2600
|
-
const DRIVER_NAME$
|
|
2605
|
+
const DRIVER_NAME$2 = "memory";
|
|
2601
2606
|
const memory = defineDriver$1(() => {
|
|
2602
2607
|
const data = /* @__PURE__ */ new Map();
|
|
2603
2608
|
return {
|
|
2604
|
-
name: DRIVER_NAME$
|
|
2609
|
+
name: DRIVER_NAME$2,
|
|
2605
2610
|
getInstance: () => data,
|
|
2606
2611
|
hasItem(key) {
|
|
2607
2612
|
return data.has(key);
|
|
@@ -3150,6 +3155,118 @@ async function rmRecursive(dir) {
|
|
|
3150
3155
|
);
|
|
3151
3156
|
}
|
|
3152
3157
|
|
|
3158
|
+
const PATH_TRAVERSE_RE$1 = /\.\.:|\.\.$/;
|
|
3159
|
+
const DRIVER_NAME$1 = "fs";
|
|
3160
|
+
const unstorage_47drivers_47fs = defineDriver((userOptions = {}) => {
|
|
3161
|
+
if (!userOptions.base) {
|
|
3162
|
+
throw createRequiredError(DRIVER_NAME$1, "base");
|
|
3163
|
+
}
|
|
3164
|
+
const base = resolve(userOptions.base);
|
|
3165
|
+
const ignore = anymatch(
|
|
3166
|
+
userOptions.ignore || ["**/node_modules/**", "**/.git/**"]
|
|
3167
|
+
);
|
|
3168
|
+
const r = (key) => {
|
|
3169
|
+
if (PATH_TRAVERSE_RE$1.test(key)) {
|
|
3170
|
+
throw createError(
|
|
3171
|
+
DRIVER_NAME$1,
|
|
3172
|
+
`Invalid key: ${JSON.stringify(key)}. It should not contain .. segments`
|
|
3173
|
+
);
|
|
3174
|
+
}
|
|
3175
|
+
const resolved = join(base, key.replace(/:/g, "/"));
|
|
3176
|
+
return resolved;
|
|
3177
|
+
};
|
|
3178
|
+
let _watcher;
|
|
3179
|
+
const _unwatch = async () => {
|
|
3180
|
+
if (_watcher) {
|
|
3181
|
+
await _watcher.close();
|
|
3182
|
+
_watcher = void 0;
|
|
3183
|
+
}
|
|
3184
|
+
};
|
|
3185
|
+
return {
|
|
3186
|
+
name: DRIVER_NAME$1,
|
|
3187
|
+
options: userOptions,
|
|
3188
|
+
flags: {
|
|
3189
|
+
maxDepth: true
|
|
3190
|
+
},
|
|
3191
|
+
hasItem(key) {
|
|
3192
|
+
return existsSync(r(key));
|
|
3193
|
+
},
|
|
3194
|
+
getItem(key) {
|
|
3195
|
+
return readFile(r(key), "utf8");
|
|
3196
|
+
},
|
|
3197
|
+
getItemRaw(key) {
|
|
3198
|
+
return readFile(r(key));
|
|
3199
|
+
},
|
|
3200
|
+
async getMeta(key) {
|
|
3201
|
+
const { atime, mtime, size, birthtime, ctime } = await promises.stat(r(key)).catch(() => ({}));
|
|
3202
|
+
return { atime, mtime, size, birthtime, ctime };
|
|
3203
|
+
},
|
|
3204
|
+
setItem(key, value) {
|
|
3205
|
+
if (userOptions.readOnly) {
|
|
3206
|
+
return;
|
|
3207
|
+
}
|
|
3208
|
+
return writeFile(r(key), value, "utf8");
|
|
3209
|
+
},
|
|
3210
|
+
setItemRaw(key, value) {
|
|
3211
|
+
if (userOptions.readOnly) {
|
|
3212
|
+
return;
|
|
3213
|
+
}
|
|
3214
|
+
return writeFile(r(key), value);
|
|
3215
|
+
},
|
|
3216
|
+
removeItem(key) {
|
|
3217
|
+
if (userOptions.readOnly) {
|
|
3218
|
+
return;
|
|
3219
|
+
}
|
|
3220
|
+
return unlink(r(key));
|
|
3221
|
+
},
|
|
3222
|
+
getKeys(_base, topts) {
|
|
3223
|
+
return readdirRecursive(r("."), ignore, topts?.maxDepth);
|
|
3224
|
+
},
|
|
3225
|
+
async clear() {
|
|
3226
|
+
if (userOptions.readOnly || userOptions.noClear) {
|
|
3227
|
+
return;
|
|
3228
|
+
}
|
|
3229
|
+
await rmRecursive(r("."));
|
|
3230
|
+
},
|
|
3231
|
+
async dispose() {
|
|
3232
|
+
if (_watcher) {
|
|
3233
|
+
await _watcher.close();
|
|
3234
|
+
}
|
|
3235
|
+
},
|
|
3236
|
+
async watch(callback) {
|
|
3237
|
+
if (_watcher) {
|
|
3238
|
+
return _unwatch;
|
|
3239
|
+
}
|
|
3240
|
+
const { watch } = await import('chokidar');
|
|
3241
|
+
await new Promise((resolve2, reject) => {
|
|
3242
|
+
const watchOptions = {
|
|
3243
|
+
ignoreInitial: true,
|
|
3244
|
+
...userOptions.watchOptions
|
|
3245
|
+
};
|
|
3246
|
+
if (!watchOptions.ignored) {
|
|
3247
|
+
watchOptions.ignored = [];
|
|
3248
|
+
} else if (Array.isArray(watchOptions.ignored)) {
|
|
3249
|
+
watchOptions.ignored = [...watchOptions.ignored];
|
|
3250
|
+
} else {
|
|
3251
|
+
watchOptions.ignored = [watchOptions.ignored];
|
|
3252
|
+
}
|
|
3253
|
+
watchOptions.ignored.push(ignore);
|
|
3254
|
+
_watcher = watch(base, watchOptions).on("ready", () => {
|
|
3255
|
+
resolve2();
|
|
3256
|
+
}).on("error", reject).on("all", (eventName, path) => {
|
|
3257
|
+
path = relative(base, path);
|
|
3258
|
+
if (eventName === "change" || eventName === "add") {
|
|
3259
|
+
callback("update", path);
|
|
3260
|
+
} else if (eventName === "unlink") {
|
|
3261
|
+
callback("remove", path);
|
|
3262
|
+
}
|
|
3263
|
+
});
|
|
3264
|
+
});
|
|
3265
|
+
return _unwatch;
|
|
3266
|
+
}
|
|
3267
|
+
};
|
|
3268
|
+
});
|
|
3269
|
+
|
|
3153
3270
|
const PATH_TRAVERSE_RE = /\.\.:|\.\.$/;
|
|
3154
3271
|
const DRIVER_NAME = "fs-lite";
|
|
3155
3272
|
const unstorage_47drivers_47fs_45lite = defineDriver((opts = {}) => {
|
|
@@ -3220,6 +3337,7 @@ const storage = createStorage({});
|
|
|
3220
3337
|
|
|
3221
3338
|
storage.mount('/assets', assets);
|
|
3222
3339
|
|
|
3340
|
+
storage.mount('kubb', unstorage_47drivers_47fs({"driver":"fs","base":"./.kubb/cache"}));
|
|
3223
3341
|
storage.mount('data', unstorage_47drivers_47fs_45lite({"driver":"fsLite","base":"./.data/kv"}));
|
|
3224
3342
|
|
|
3225
3343
|
function useStorage(base = "") {
|
|
@@ -5875,16 +5993,6 @@ async function detectLinter() {
|
|
|
5875
5993
|
"eslint"
|
|
5876
5994
|
]) if (await isLinterAvailable(linter)) return linter;
|
|
5877
5995
|
}
|
|
5878
|
-
function resolveModuleSource(pkgName) {
|
|
5879
|
-
const parentURL = globalThis._importMeta_.url;
|
|
5880
|
-
const resolved = createJiti(parentURL).esmResolve(pkgName, parentURL);
|
|
5881
|
-
const filePath = resolved.startsWith("file:") ? fileURLToPath(resolved) : resolved;
|
|
5882
|
-
return {
|
|
5883
|
-
path: filePath,
|
|
5884
|
-
source: readFileSync(filePath, { encoding: "utf-8" }),
|
|
5885
|
-
ext: path$2.extname(filePath)
|
|
5886
|
-
};
|
|
5887
|
-
}
|
|
5888
5996
|
function serializePluginOptions(options) {
|
|
5889
5997
|
if (options === null || options === void 0) return {};
|
|
5890
5998
|
if (typeof options !== "object") return options;
|
|
@@ -5901,40 +6009,14 @@ function serializePluginOptions(options) {
|
|
|
5901
6009
|
function isCommandMessage(msg) {
|
|
5902
6010
|
return msg.type === "command";
|
|
5903
6011
|
}
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
const interfaces = os$1.networkInterfaces();
|
|
5907
|
-
const macs = [];
|
|
5908
|
-
for (const name in interfaces) {
|
|
5909
|
-
for (const iface of interfaces[name]) {
|
|
5910
|
-
if (!iface.internal && iface.mac !== "00:00:00:00:00:00") {
|
|
5911
|
-
macs.push(iface.mac);
|
|
5912
|
-
}
|
|
5913
|
-
}
|
|
5914
|
-
}
|
|
5915
|
-
const hostname = os$1.hostname();
|
|
5916
|
-
const rawId = macs.join(",") + hostname;
|
|
5917
|
-
return nodeCrypto.createHash("sha256").update(rawId).digest("hex");
|
|
6012
|
+
function isPongMessage(msg) {
|
|
6013
|
+
return msg.type === "pong";
|
|
5918
6014
|
}
|
|
5919
6015
|
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
function loadAgentConfig() {
|
|
5923
|
-
try {
|
|
5924
|
-
const content = readFileSync(CONFIG_FILE, "utf-8");
|
|
5925
|
-
return JSON.parse(content);
|
|
5926
|
-
} catch (_error) {
|
|
5927
|
-
return { sessions: {} };
|
|
5928
|
-
}
|
|
5929
|
-
}
|
|
5930
|
-
function saveAgentConfig(config) {
|
|
5931
|
-
try {
|
|
5932
|
-
mkdirSync(CONFIG_DIR, { recursive: true });
|
|
5933
|
-
writeFileSync(CONFIG_FILE, JSON.stringify(config, null, 2), "utf-8");
|
|
5934
|
-
} catch (_error) {
|
|
5935
|
-
logger.warn("Failed to save agent config");
|
|
5936
|
-
}
|
|
6016
|
+
function getSessionKey(token) {
|
|
6017
|
+
return `sessions:${createHash("sha512").update(token).digest("hex")}`;
|
|
5937
6018
|
}
|
|
6019
|
+
|
|
5938
6020
|
function isSessionValid(session) {
|
|
5939
6021
|
try {
|
|
5940
6022
|
const expiresAt = new Date(session.expiresAt);
|
|
@@ -5944,80 +6026,65 @@ function isSessionValid(session) {
|
|
|
5944
6026
|
return false;
|
|
5945
6027
|
}
|
|
5946
6028
|
}
|
|
5947
|
-
|
|
5948
|
-
|
|
5949
|
-
|
|
5950
|
-
const config = loadAgentConfig();
|
|
5951
|
-
const sessionKey = hashAgentToken(agentToken);
|
|
5952
|
-
const session = (_a = config.sessions) == null ? void 0 : _a[sessionKey];
|
|
5953
|
-
if (!session) {
|
|
5954
|
-
return null;
|
|
5955
|
-
}
|
|
5956
|
-
if (!isSessionValid(session)) {
|
|
5957
|
-
deleteCachedSession(agentToken);
|
|
5958
|
-
return null;
|
|
5959
|
-
}
|
|
5960
|
-
return session;
|
|
5961
|
-
} catch (_error) {
|
|
5962
|
-
logger.warn("Failed to get cached session");
|
|
5963
|
-
return null;
|
|
5964
|
-
}
|
|
6029
|
+
|
|
6030
|
+
function generateToken() {
|
|
6031
|
+
return randomBytes(32).toString("hex");
|
|
5965
6032
|
}
|
|
5966
|
-
function
|
|
5967
|
-
|
|
5968
|
-
const config = loadAgentConfig();
|
|
5969
|
-
const sessionKey = hashAgentToken(agentToken);
|
|
5970
|
-
if (!config.sessions) {
|
|
5971
|
-
config.sessions = {};
|
|
5972
|
-
}
|
|
5973
|
-
config.sessions[sessionKey] = {
|
|
5974
|
-
...session,
|
|
5975
|
-
storedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
5976
|
-
};
|
|
5977
|
-
saveAgentConfig(config);
|
|
5978
|
-
logger.success("Cached agent session");
|
|
5979
|
-
} catch (_error) {
|
|
5980
|
-
logger.warn("Failed to cache session");
|
|
5981
|
-
}
|
|
6033
|
+
function generateSecureToken(id = generateToken()) {
|
|
6034
|
+
return createHash("sha256").update(id).digest("hex");
|
|
5982
6035
|
}
|
|
5983
|
-
function
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
6036
|
+
function generateMachineToken() {
|
|
6037
|
+
if (process.env.KUBB_AGENT_SECRET) {
|
|
6038
|
+
return generateSecureToken(process.env.KUBB_AGENT_SECRET);
|
|
6039
|
+
}
|
|
6040
|
+
const interfaces = os$1.networkInterfaces();
|
|
6041
|
+
const macs = [];
|
|
6042
|
+
for (const name in interfaces) {
|
|
6043
|
+
for (const iface of interfaces[name]) {
|
|
6044
|
+
if (!iface.internal && iface.mac !== "00:00:00:00:00:00") {
|
|
6045
|
+
macs.push(iface.mac);
|
|
6046
|
+
}
|
|
5991
6047
|
}
|
|
5992
|
-
} catch (_error) {
|
|
5993
|
-
logger.warn("Failed to delete cached session");
|
|
5994
6048
|
}
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
return
|
|
6049
|
+
const hostname = os$1.hostname();
|
|
6050
|
+
const rawId = macs.join(",") + hostname;
|
|
6051
|
+
return generateSecureToken(rawId);
|
|
5998
6052
|
}
|
|
5999
6053
|
|
|
6000
6054
|
async function createAgentSession({ token, studioUrl, noCache }) {
|
|
6001
|
-
const
|
|
6002
|
-
if (
|
|
6003
|
-
|
|
6004
|
-
|
|
6055
|
+
const storage = useStorage("kubb");
|
|
6056
|
+
if (!noCache) {
|
|
6057
|
+
const sessionKey = getSessionKey(token);
|
|
6058
|
+
const stored = await storage.getItem(sessionKey);
|
|
6059
|
+
if (stored && isSessionValid(stored)) {
|
|
6060
|
+
logger.success("Using cached agent session");
|
|
6061
|
+
return stored;
|
|
6062
|
+
}
|
|
6063
|
+
if (stored) {
|
|
6064
|
+
await storage.removeItem(sessionKey);
|
|
6065
|
+
}
|
|
6005
6066
|
}
|
|
6006
6067
|
const connectUrl = `${studioUrl}/api/agent/session/create`;
|
|
6007
6068
|
try {
|
|
6069
|
+
const machineToken = generateMachineToken();
|
|
6008
6070
|
const data = await $fetch(connectUrl, {
|
|
6009
6071
|
method: "POST",
|
|
6010
6072
|
headers: {
|
|
6011
6073
|
Authorization: `Bearer ${token}`
|
|
6012
6074
|
},
|
|
6013
|
-
body: {
|
|
6075
|
+
body: { machineToken }
|
|
6014
6076
|
});
|
|
6015
|
-
if (data && !noCache) {
|
|
6016
|
-
cacheSession(token, data);
|
|
6017
|
-
}
|
|
6018
6077
|
if (!data) {
|
|
6019
6078
|
throw new Error("No data available for agent session");
|
|
6020
6079
|
}
|
|
6080
|
+
if (!noCache) {
|
|
6081
|
+
const sessionKey = getSessionKey(token);
|
|
6082
|
+
await storage.setItem(sessionKey, {
|
|
6083
|
+
...data,
|
|
6084
|
+
storedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
6085
|
+
});
|
|
6086
|
+
logger.success("Cached agent session");
|
|
6087
|
+
}
|
|
6021
6088
|
logger.success("Agent session created");
|
|
6022
6089
|
return data;
|
|
6023
6090
|
} catch (error) {
|
|
@@ -6026,7 +6093,7 @@ async function createAgentSession({ token, studioUrl, noCache }) {
|
|
|
6026
6093
|
}
|
|
6027
6094
|
async function registerAgent({ token, studioUrl }) {
|
|
6028
6095
|
var _a, _b;
|
|
6029
|
-
const
|
|
6096
|
+
const machineToken = generateMachineToken();
|
|
6030
6097
|
const registerUrl = `${studioUrl}/api/agent/register`;
|
|
6031
6098
|
try {
|
|
6032
6099
|
await $fetch(registerUrl, {
|
|
@@ -6034,7 +6101,7 @@ async function registerAgent({ token, studioUrl }) {
|
|
|
6034
6101
|
headers: {
|
|
6035
6102
|
Authorization: `Bearer ${token}`
|
|
6036
6103
|
},
|
|
6037
|
-
body: {
|
|
6104
|
+
body: { machineToken }
|
|
6038
6105
|
});
|
|
6039
6106
|
logger.success("Agent registered with Studio");
|
|
6040
6107
|
} catch (error) {
|
|
@@ -6089,7 +6156,7 @@ var BaseGenerator = (_a$3 = class {
|
|
|
6089
6156
|
function isInputPath(config) {
|
|
6090
6157
|
return typeof (config == null ? void 0 : config.input) === "object" && config.input !== null && "path" in config.input;
|
|
6091
6158
|
}
|
|
6092
|
-
var version$1 = "4.
|
|
6159
|
+
var version$1 = "4.28.0";
|
|
6093
6160
|
function getDiagnosticInfo() {
|
|
6094
6161
|
return {
|
|
6095
6162
|
nodeVersion: version$2,
|
|
@@ -6705,7 +6772,7 @@ async function generate({ config, events }) {
|
|
|
6705
6772
|
}
|
|
6706
6773
|
|
|
6707
6774
|
const tsLoader = async (configFile) => {
|
|
6708
|
-
const jiti = createJiti
|
|
6775
|
+
const jiti = createJiti(globalThis._importMeta_.url, {
|
|
6709
6776
|
jsx: {
|
|
6710
6777
|
runtime: "automatic",
|
|
6711
6778
|
importSource: "@kubb/react-fabric"
|
|
@@ -11033,16 +11100,15 @@ function getDefaultValue(schema) {
|
|
|
11033
11100
|
}
|
|
11034
11101
|
if (schema.type === "object" || schema.properties) return "{}";
|
|
11035
11102
|
}
|
|
11036
|
-
async function parse$3(pathOrApi, { oasClass = Oas,
|
|
11037
|
-
if (typeof pathOrApi === "string" &&
|
|
11038
|
-
|
|
11039
|
-
|
|
11040
|
-
|
|
11041
|
-
|
|
11042
|
-
|
|
11043
|
-
|
|
11044
|
-
|
|
11045
|
-
});
|
|
11103
|
+
async function parse$3(pathOrApi, { oasClass = Oas, enablePaths = true } = {}) {
|
|
11104
|
+
if (typeof pathOrApi === "string" && !pathOrApi.match(/\n/) && !pathOrApi.match(/^\s*\{/) && enablePaths) try {
|
|
11105
|
+
return parse$3(await bundle(pathOrApi), {
|
|
11106
|
+
oasClass,
|
|
11107
|
+
enablePaths
|
|
11108
|
+
});
|
|
11109
|
+
} catch (e) {
|
|
11110
|
+
console.warn(`[kubb] Failed to bundle external $refs in "${pathOrApi}": ${e.message}. Falling back to plain load.`);
|
|
11111
|
+
}
|
|
11046
11112
|
const document = await new OASNormalize(pathOrApi, {
|
|
11047
11113
|
enablePaths,
|
|
11048
11114
|
colorizeErrors: true
|
|
@@ -11056,8 +11122,7 @@ async function parse$3(pathOrApi, { oasClass = Oas, canBundle = true, enablePath
|
|
|
11056
11122
|
async function merge(pathOrApi, { oasClass = Oas } = {}) {
|
|
11057
11123
|
const instances = await Promise.all(pathOrApi.map((p) => parse$3(p, {
|
|
11058
11124
|
oasClass,
|
|
11059
|
-
enablePaths: false
|
|
11060
|
-
canBundle: false
|
|
11125
|
+
enablePaths: false
|
|
11061
11126
|
})));
|
|
11062
11127
|
if (instances.length === 0) throw new Error("No OAS instances provided for merging.");
|
|
11063
11128
|
return parse$3(instances.reduce((acc, current) => {
|
|
@@ -12433,7 +12498,7 @@ parseSchemaObject_fn = function({ schema: _schemaObject, name, parentName, rootN
|
|
|
12433
12498
|
}
|
|
12434
12499
|
if (schemaObject.format) {
|
|
12435
12500
|
if (schemaObject.type === "integer" && schemaObject.format === "int64") {
|
|
12436
|
-
baseItems.unshift({ keyword: schemaKeywords.bigint });
|
|
12501
|
+
baseItems.unshift({ keyword: options.integerType === "number" ? schemaKeywords.integer : schemaKeywords.bigint });
|
|
12437
12502
|
return baseItems;
|
|
12438
12503
|
}
|
|
12439
12504
|
if (schemaObject.type === "integer" && schemaObject.format === "int32") {
|
|
@@ -12646,6 +12711,27 @@ parseSchemaObject_fn = function({ schema: _schemaObject, name, parentName, rootN
|
|
|
12646
12711
|
}));
|
|
12647
12712
|
return (await Promise.all(writeTasks)).flat();
|
|
12648
12713
|
}, _b);
|
|
12714
|
+
function getRequestBody(operationSchema) {
|
|
12715
|
+
var _a2, _b2;
|
|
12716
|
+
const requestBody = (_b2 = (_a2 = operationSchema == null ? void 0 : operationSchema.operation) == null ? void 0 : _a2.schema) == null ? void 0 : _b2.requestBody;
|
|
12717
|
+
if (!requestBody || "$ref" in requestBody) return;
|
|
12718
|
+
return requestBody;
|
|
12719
|
+
}
|
|
12720
|
+
function isRequestBodyRequired(operationSchema) {
|
|
12721
|
+
const requestBody = getRequestBody(operationSchema);
|
|
12722
|
+
return !!requestBody && requestBody.required === true;
|
|
12723
|
+
}
|
|
12724
|
+
function withRequiredRequestBodySchema(operationSchema) {
|
|
12725
|
+
if (!operationSchema || !isRequestBodyRequired(operationSchema)) return operationSchema;
|
|
12726
|
+
if (Array.isArray(operationSchema.schema.required) && operationSchema.schema.required.length > 0) return operationSchema;
|
|
12727
|
+
return {
|
|
12728
|
+
...operationSchema,
|
|
12729
|
+
schema: {
|
|
12730
|
+
...operationSchema.schema,
|
|
12731
|
+
required: ["__kubb_required_request_body__"]
|
|
12732
|
+
}
|
|
12733
|
+
};
|
|
12734
|
+
}
|
|
12649
12735
|
|
|
12650
12736
|
function getDefaultBanner({ title, description, version, config }) {
|
|
12651
12737
|
try {
|
|
@@ -13389,6 +13475,18 @@ var OperationGenerator = (_a = class extends BaseGenerator {
|
|
|
13389
13475
|
var _a3, _b2;
|
|
13390
13476
|
return ((_a3 = item.statusCode) == null ? void 0 : _a3.toString().startsWith("4")) || ((_b2 = item.statusCode) == null ? void 0 : _b2.toString().startsWith("5"));
|
|
13391
13477
|
});
|
|
13478
|
+
const request = withRequiredRequestBodySchema(requestSchema ? {
|
|
13479
|
+
name: this.context.UNSTABLE_NAMING ? resolveName(transformers_default.pascalCase(`${operationId} RequestData`)) : resolveName(transformers_default.pascalCase(`${operationId} ${operation.method === "get" ? "queryRequest" : "mutationRequest"}`)),
|
|
13480
|
+
description: (_a2 = operation.schema.requestBody) == null ? void 0 : _a2.description,
|
|
13481
|
+
operation,
|
|
13482
|
+
operationName,
|
|
13483
|
+
schema: requestSchema,
|
|
13484
|
+
keys: resolveKeys(requestSchema),
|
|
13485
|
+
keysToOmit: (_b = resolveKeys(requestSchema)) == null ? void 0 : _b.filter((key) => {
|
|
13486
|
+
var _a3, _b2;
|
|
13487
|
+
return (_b2 = (_a3 = requestSchema.properties) == null ? void 0 : _a3[key]) == null ? void 0 : _b2.readOnly;
|
|
13488
|
+
})
|
|
13489
|
+
} : void 0);
|
|
13392
13490
|
return {
|
|
13393
13491
|
pathParams: pathParamsSchema ? {
|
|
13394
13492
|
name: resolveName(transformers_default.pascalCase(`${operationId} PathParams`)),
|
|
@@ -13411,18 +13509,7 @@ var OperationGenerator = (_a = class extends BaseGenerator {
|
|
|
13411
13509
|
schema: headerParamsSchema,
|
|
13412
13510
|
keys: resolveKeys(headerParamsSchema)
|
|
13413
13511
|
} : void 0,
|
|
13414
|
-
request
|
|
13415
|
-
name: this.context.UNSTABLE_NAMING ? resolveName(transformers_default.pascalCase(`${operationId} RequestData`)) : resolveName(transformers_default.pascalCase(`${operationId} ${operation.method === "get" ? "queryRequest" : "mutationRequest"}`)),
|
|
13416
|
-
description: (_a2 = operation.schema.requestBody) == null ? void 0 : _a2.description,
|
|
13417
|
-
operation,
|
|
13418
|
-
operationName,
|
|
13419
|
-
schema: requestSchema,
|
|
13420
|
-
keys: resolveKeys(requestSchema),
|
|
13421
|
-
keysToOmit: (_b = resolveKeys(requestSchema)) == null ? void 0 : _b.filter((key) => {
|
|
13422
|
-
var _a3, _b2;
|
|
13423
|
-
return (_b2 = (_a3 = requestSchema.properties) == null ? void 0 : _a3[key]) == null ? void 0 : _b2.readOnly;
|
|
13424
|
-
})
|
|
13425
|
-
} : void 0,
|
|
13512
|
+
request,
|
|
13426
13513
|
response: {
|
|
13427
13514
|
name: this.context.UNSTABLE_NAMING ? resolveName(transformers_default.pascalCase(`${operationId} ResponseData`)) : resolveName(transformers_default.pascalCase(`${operationId} ${operation.method === "get" ? "queryResponse" : "mutationResponse"}`)),
|
|
13428
13515
|
operation,
|
|
@@ -13629,7 +13716,12 @@ const pluginOas = definePlugin((options) => {
|
|
|
13629
13716
|
async install() {
|
|
13630
13717
|
const oas = await this.getOas({ validate });
|
|
13631
13718
|
if (!output) return;
|
|
13632
|
-
await oas.dereference()
|
|
13719
|
+
await oas.dereference().catch((err) => {
|
|
13720
|
+
this.events.emit("debug", {
|
|
13721
|
+
date: /* @__PURE__ */ new Date(),
|
|
13722
|
+
logs: [`Unable to fully dereference schema: ${err.message}`]
|
|
13723
|
+
});
|
|
13724
|
+
});
|
|
13633
13725
|
const schemaFiles = await new SchemaGenerator({
|
|
13634
13726
|
unknownType: "unknown",
|
|
13635
13727
|
emptySchemaType: "unknown",
|
|
@@ -213383,13 +213475,14 @@ const pluginTs = definePlugin((options) => {
|
|
|
213383
213475
|
const { output = {
|
|
213384
213476
|
path: "types",
|
|
213385
213477
|
barrelType: "named"
|
|
213386
|
-
}, group, exclude = [], include, override = [], enumType = "asConst", enumKeyCasing = "none", enumSuffix = "enum", dateType = "string", unknownType = "any", optionalType = "questionToken", arrayType = "array", emptySchemaType = unknownType, syntaxType = "type", transformers: transformers$1 = {}, mapper = {}, paramsCasing, generators = [typeGenerator].filter(Boolean), contentType, UNSTABLE_NAMING } = options;
|
|
213478
|
+
}, group, exclude = [], include, override = [], enumType = "asConst", enumKeyCasing = "none", enumSuffix = "enum", dateType = "string", integerType = "bigint", unknownType = "any", optionalType = "questionToken", arrayType = "array", emptySchemaType = unknownType, syntaxType = "type", transformers: transformers$1 = {}, mapper = {}, paramsCasing, generators = [typeGenerator].filter(Boolean), contentType, UNSTABLE_NAMING } = options;
|
|
213387
213479
|
return {
|
|
213388
213480
|
name: pluginTsName,
|
|
213389
213481
|
options: {
|
|
213390
213482
|
output,
|
|
213391
213483
|
transformers: transformers$1,
|
|
213392
213484
|
dateType,
|
|
213485
|
+
integerType,
|
|
213393
213486
|
optionalType,
|
|
213394
213487
|
arrayType,
|
|
213395
213488
|
enumType,
|
|
@@ -213735,6 +213828,8 @@ const zodGenerator = createReactGenerator({
|
|
|
213735
213828
|
}
|
|
213736
213829
|
});
|
|
213737
213830
|
|
|
213831
|
+
const source$3 = "/**\n * See https://github.com/colinhacks/tozod/blob/master/src/index.ts\n * Adapted based on https://github.com/colinhacks/zod/issues/372\n */\n\nimport type * as z from 'zod'\n\ntype IsAny<T> = [any extends T ? 'true' : 'false'] extends ['true'] ? true : false\ntype NonOptional<T> = T extends undefined ? never : T\ntype NonNullable<T> = T extends null ? never : T\ntype Equals<X, Y> = [X] extends [Y] ? ([Y] extends [X] ? true : false) : false\n\ntype ZodKey<T> =\n IsAny<T> extends true\n ? 'any'\n : Equals<T, boolean> extends true //[T] extends [booleanUtil.Type]\n ? 'boolean'\n : [undefined] extends [T]\n ? 'optional'\n : [null] extends [T]\n ? 'nullable'\n : T extends any[]\n ? 'array'\n : Equals<T, string> extends true\n ? 'string'\n : Equals<T, bigint> extends true //[T] extends [bigintUtil.Type]\n ? 'bigint'\n : Equals<T, number> extends true //[T] extends [numberUtil.Type]\n ? 'number'\n : Equals<T, Date> extends true //[T] extends [dateUtil.Type]\n ? 'date'\n : T extends { [k: string]: any } //[T] extends [structUtil.Type]\n ? 'object'\n : 'rest'\n\nexport type ToZod<T> = {\n any: z.ZodAny\n optional: z.ZodOptional<ToZod<NonOptional<T>>>\n nullable: z.ZodNullable<ToZod<NonNullable<T>>>\n array: T extends Array<infer U> ? z.ZodArray<ToZod<U>> : never\n string: z.ZodString\n bigint: z.ZodBigInt\n number: z.ZodNumber\n boolean: z.ZodBoolean\n date: z.ZodDate\n object: z.ZodObject<\n // @ts-expect-error cannot convert without Extract but Extract removes the type\n {\n [K in keyof T]: T[K]\n },\n 'passthrough',\n unknown,\n T\n >\n rest: z.ZodType<T>\n}[ZodKey<T>]\n\nexport type ZodShape<T> = {\n // Require all the keys from T\n [key in keyof T]-?: ToZod<T[key]>\n}\n";
|
|
213832
|
+
|
|
213738
213833
|
const pluginZodName = "plugin-zod";
|
|
213739
213834
|
const pluginZod = definePlugin((options) => {
|
|
213740
213835
|
const { output = {
|
|
@@ -213800,7 +213895,7 @@ const pluginZod = definePlugin((options) => {
|
|
|
213800
213895
|
path: path$2.resolve(root, ".kubb/ToZod.ts"),
|
|
213801
213896
|
sources: [{
|
|
213802
213897
|
name: "ToZod",
|
|
213803
|
-
value:
|
|
213898
|
+
value: source$3
|
|
213804
213899
|
}],
|
|
213805
213900
|
imports: [],
|
|
213806
213901
|
exports: []
|
|
@@ -214490,6 +214585,12 @@ const staticClassClientGenerator = createReactGenerator({
|
|
|
214490
214585
|
}
|
|
214491
214586
|
});
|
|
214492
214587
|
|
|
214588
|
+
const source$2 = "import type { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios'\nimport axios from 'axios'\n\ndeclare const AXIOS_BASE: string\ndeclare const AXIOS_HEADERS: string\n\n/**\n * Subset of AxiosRequestConfig\n */\nexport type RequestConfig<TData = unknown> = {\n baseURL?: string\n url?: string\n method?: 'GET' | 'PUT' | 'PATCH' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD'\n params?: unknown\n data?: TData | FormData\n responseType?: 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream'\n signal?: AbortSignal\n validateStatus?: (status: number) => boolean\n headers?: AxiosRequestConfig['headers']\n}\n\n/**\n * Subset of AxiosResponse\n */\nexport type ResponseConfig<TData = unknown> = {\n data: TData\n status: number\n statusText: string\n headers: AxiosResponse['headers']\n}\n\nexport type ResponseErrorConfig<TError = unknown> = AxiosError<TError>\n\nexport type Client = <TData, _TError = unknown, TVariables = unknown>(config: RequestConfig<TVariables>) => Promise<ResponseConfig<TData>>\n\nlet _config: Partial<RequestConfig> = {\n baseURL: typeof AXIOS_BASE !== 'undefined' ? AXIOS_BASE : undefined,\n headers: typeof AXIOS_HEADERS !== 'undefined' ? JSON.parse(AXIOS_HEADERS) : undefined,\n}\n\nexport const getConfig = () => _config\n\nexport const setConfig = (config: RequestConfig) => {\n _config = config\n return getConfig()\n}\n\nexport const mergeConfig = <T extends RequestConfig>(...configs: Array<Partial<T>>): Partial<T> => {\n return configs.reduce<Partial<T>>((merged, config) => {\n return {\n ...merged,\n ...config,\n headers: {\n ...merged.headers,\n ...config.headers,\n },\n }\n }, {})\n}\n\nexport const axiosInstance = axios.create(getConfig())\n\nexport const fetch = async <TData, TError = unknown, TVariables = unknown>(config: RequestConfig<TVariables>): Promise<ResponseConfig<TData>> => {\n return axiosInstance.request<TData, ResponseConfig<TData>>(mergeConfig(getConfig(), config)).catch((e: AxiosError<TError>) => {\n throw e\n })\n}\n\nfetch.getConfig = getConfig\nfetch.setConfig = setConfig\n";
|
|
214589
|
+
|
|
214590
|
+
const source$1 = "/**\n * RequestCredentials\n */\nexport type RequestCredentials = 'omit' | 'same-origin' | 'include'\n\n/**\n * Subset of FetchRequestConfig\n */\nexport type RequestConfig<TData = unknown> = {\n baseURL?: string\n url?: string\n method?: 'GET' | 'PUT' | 'PATCH' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD'\n params?: unknown\n data?: TData | FormData\n responseType?: 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream'\n signal?: AbortSignal\n headers?: [string, string][] | Record<string, string>\n credentials?: RequestCredentials\n}\n\n/**\n * Subset of FetchResponse\n */\nexport type ResponseConfig<TData = unknown> = {\n data: TData\n status: number\n statusText: string\n headers: Headers\n}\n\nlet _config: Partial<RequestConfig> = {}\n\nexport const getConfig = () => _config\n\nexport const setConfig = (config: Partial<RequestConfig>) => {\n _config = config\n return getConfig()\n}\n\nexport const mergeConfig = <T extends RequestConfig>(...configs: Array<Partial<T>>): Partial<T> => {\n return configs.reduce<Partial<T>>((merged, config) => {\n return {\n ...merged,\n ...config,\n headers: {\n ...(Array.isArray(merged.headers) ? Object.fromEntries(merged.headers) : merged.headers),\n ...(Array.isArray(config.headers) ? Object.fromEntries(config.headers) : config.headers),\n },\n }\n }, {})\n}\n\nexport type ResponseErrorConfig<TError = unknown> = TError\n\nexport type Client = <TData, _TError = unknown, TVariables = unknown>(config: RequestConfig<TVariables>) => Promise<ResponseConfig<TData>>\n\nexport const fetch = async <TData, _TError = unknown, TVariables = unknown>(paramsConfig: RequestConfig<TVariables>): Promise<ResponseConfig<TData>> => {\n const normalizedParams = new URLSearchParams()\n\n const config = mergeConfig(getConfig(), paramsConfig)\n\n Object.entries(config.params || {}).forEach(([key, value]) => {\n if (value !== undefined) {\n normalizedParams.append(key, value === null ? 'null' : value.toString())\n }\n })\n\n let targetUrl = [config.baseURL, config.url].filter(Boolean).join('')\n\n if (config.params) {\n targetUrl += `?${normalizedParams}`\n }\n\n const response = await globalThis.fetch(targetUrl, {\n credentials: config.credentials || 'same-origin',\n method: config.method?.toUpperCase(),\n body: config.data instanceof FormData ? config.data : JSON.stringify(config.data),\n signal: config.signal,\n headers: config.headers,\n })\n\n const data = [204, 205, 304].includes(response.status) || !response.body ? {} : await response.json()\n\n return {\n data: data as TData,\n status: response.status,\n statusText: response.statusText,\n headers: response.headers as Headers,\n }\n}\n\nfetch.getConfig = getConfig\nfetch.setConfig = setConfig\n";
|
|
214591
|
+
|
|
214592
|
+
const source = "export function buildFormData<T = unknown>(data: T): FormData {\n const formData = new FormData()\n\n function appendData(key: string, value: any) {\n if (value instanceof Blob) {\n formData.append(key, value)\n return\n }\n if (value instanceof Date) {\n formData.append(key, value.toISOString())\n return\n }\n if (typeof value === 'number' || typeof value === 'boolean') {\n formData.append(key, String(value))\n return\n }\n if (typeof value === 'string') {\n formData.append(key, value)\n return\n }\n if (typeof value === 'object') {\n formData.append(key, new Blob([JSON.stringify(value)], { type: 'application/json' }))\n return\n }\n }\n\n if (data) {\n Object.entries(data).forEach(([key, value]) => {\n if (value === undefined || value === null) return\n\n if (Array.isArray(value)) {\n for (const valueItem of value) {\n if (valueItem === undefined || valueItem === null) continue\n appendData(key, valueItem)\n }\n } else {\n appendData(key, value)\n }\n })\n }\n\n return formData\n}\n";
|
|
214593
|
+
|
|
214493
214594
|
const pluginClientName = "plugin-client";
|
|
214494
214595
|
const pluginClient = definePlugin((options) => {
|
|
214495
214596
|
var _a;
|
|
@@ -214553,7 +214654,7 @@ const pluginClient = definePlugin((options) => {
|
|
|
214553
214654
|
path: path$2.resolve(root, ".kubb/fetch.ts"),
|
|
214554
214655
|
sources: [{
|
|
214555
214656
|
name: "fetch",
|
|
214556
|
-
value:
|
|
214657
|
+
value: this.plugin.options.client === "fetch" ? source$1 : source$2,
|
|
214557
214658
|
isExportable: true,
|
|
214558
214659
|
isIndexable: true
|
|
214559
214660
|
}],
|
|
@@ -214565,7 +214666,7 @@ const pluginClient = definePlugin((options) => {
|
|
|
214565
214666
|
path: path$2.resolve(root, ".kubb/config.ts"),
|
|
214566
214667
|
sources: [{
|
|
214567
214668
|
name: "config",
|
|
214568
|
-
value:
|
|
214669
|
+
value: source,
|
|
214569
214670
|
isExportable: false,
|
|
214570
214671
|
isIndexable: false
|
|
214571
214672
|
}],
|
|
@@ -215835,7 +215936,7 @@ const pluginMcp = definePlugin((options) => {
|
|
|
215835
215936
|
path: path$2.resolve(root, ".kubb/fetch.ts"),
|
|
215836
215937
|
sources: [{
|
|
215837
215938
|
name: "fetch",
|
|
215838
|
-
value:
|
|
215939
|
+
value: this.plugin.options.client.client === "fetch" ? source$1 : source$2,
|
|
215839
215940
|
isExportable: true,
|
|
215840
215941
|
isIndexable: true
|
|
215841
215942
|
}],
|
|
@@ -215847,7 +215948,7 @@ const pluginMcp = definePlugin((options) => {
|
|
|
215847
215948
|
path: path$2.resolve(root, ".kubb/config.ts"),
|
|
215848
215949
|
sources: [{
|
|
215849
215950
|
name: "config",
|
|
215850
|
-
value:
|
|
215951
|
+
value: source,
|
|
215851
215952
|
isExportable: false,
|
|
215852
215953
|
isIndexable: false
|
|
215853
215954
|
}],
|
|
@@ -216382,7 +216483,9 @@ function QueryOptions$4({ name, clientName, dataReturnType, typeSchemas, paramsC
|
|
|
216382
216483
|
${enabledText}
|
|
216383
216484
|
queryKey,
|
|
216384
216485
|
queryFn: async ({ signal }) => {
|
|
216385
|
-
config.signal
|
|
216486
|
+
if (!config.signal) {
|
|
216487
|
+
config.signal = signal
|
|
216488
|
+
}
|
|
216386
216489
|
return ${clientName}(${clientParams.toCall({})})
|
|
216387
216490
|
},
|
|
216388
216491
|
})
|
|
@@ -216672,7 +216775,9 @@ function InfiniteQueryOptions$1({ name, clientName, initialPageParam, cursorPara
|
|
|
216672
216775
|
${enabledText}
|
|
216673
216776
|
queryKey,
|
|
216674
216777
|
queryFn: async ({ signal, pageParam }) => {
|
|
216675
|
-
config.signal
|
|
216778
|
+
if (!config.signal) {
|
|
216779
|
+
config.signal = signal
|
|
216780
|
+
}
|
|
216676
216781
|
${infiniteOverrideParams}
|
|
216677
216782
|
return ${clientName}(${clientParams.toCall()})
|
|
216678
216783
|
},
|
|
@@ -216695,7 +216800,9 @@ function InfiniteQueryOptions$1({ name, clientName, initialPageParam, cursorPara
|
|
|
216695
216800
|
${enabledText}
|
|
216696
216801
|
queryKey,
|
|
216697
216802
|
queryFn: async ({ signal }) => {
|
|
216698
|
-
config.signal
|
|
216803
|
+
if (!config.signal) {
|
|
216804
|
+
config.signal = signal
|
|
216805
|
+
}
|
|
216699
216806
|
return ${clientName}(${clientParams.toCall()})
|
|
216700
216807
|
},
|
|
216701
216808
|
${queryOptions.join(",\n")}
|
|
@@ -217350,7 +217457,9 @@ function SuspenseInfiniteQueryOptions({ name, clientName, initialPageParam, curs
|
|
|
217350
217457
|
${enabledText}
|
|
217351
217458
|
queryKey,
|
|
217352
217459
|
queryFn: async ({ signal, pageParam }) => {
|
|
217353
|
-
config.signal
|
|
217460
|
+
if (!config.signal) {
|
|
217461
|
+
config.signal = signal
|
|
217462
|
+
}
|
|
217354
217463
|
${infiniteOverrideParams}
|
|
217355
217464
|
return ${clientName}(${clientParams.toCall()})
|
|
217356
217465
|
},
|
|
@@ -217373,7 +217482,9 @@ function SuspenseInfiniteQueryOptions({ name, clientName, initialPageParam, curs
|
|
|
217373
217482
|
${enabledText}
|
|
217374
217483
|
queryKey,
|
|
217375
217484
|
queryFn: async ({ signal }) => {
|
|
217376
|
-
config.signal
|
|
217485
|
+
if (!config.signal) {
|
|
217486
|
+
config.signal = signal
|
|
217487
|
+
}
|
|
217377
217488
|
return ${clientName}(${clientParams.toCall()})
|
|
217378
217489
|
},
|
|
217379
217490
|
${queryOptions.join(",\n")}
|
|
@@ -219034,7 +219145,7 @@ const pluginReactQuery = definePlugin((options) => {
|
|
|
219034
219145
|
path: path$2.resolve(root, ".kubb/fetch.ts"),
|
|
219035
219146
|
sources: [{
|
|
219036
219147
|
name: "fetch",
|
|
219037
|
-
value:
|
|
219148
|
+
value: this.plugin.options.client.client === "fetch" ? source$1 : source$2,
|
|
219038
219149
|
isExportable: true,
|
|
219039
219150
|
isIndexable: true
|
|
219040
219151
|
}],
|
|
@@ -219046,7 +219157,7 @@ const pluginReactQuery = definePlugin((options) => {
|
|
|
219046
219157
|
path: path$2.resolve(root, ".kubb/config.ts"),
|
|
219047
219158
|
sources: [{
|
|
219048
219159
|
name: "config",
|
|
219049
|
-
value:
|
|
219160
|
+
value: source,
|
|
219050
219161
|
isExportable: false,
|
|
219051
219162
|
isIndexable: false
|
|
219052
219163
|
}],
|
|
@@ -219112,7 +219223,8 @@ const pluginRedoc = definePlugin((options) => {
|
|
|
219112
219223
|
pre: [pluginOasName],
|
|
219113
219224
|
async install() {
|
|
219114
219225
|
const oas = await this.getOas();
|
|
219115
|
-
await oas.dereference()
|
|
219226
|
+
await oas.dereference().catch((err) => {
|
|
219227
|
+
});
|
|
219116
219228
|
const root = path$2.resolve(this.config.root, this.config.output.path);
|
|
219117
219229
|
const pageHTML = await getPageHTML(oas.api);
|
|
219118
219230
|
await this.addFile({
|
|
@@ -219463,7 +219575,9 @@ function QueryOptions$3({ name, clientName, typeSchemas, paramsCasing, paramsTyp
|
|
|
219463
219575
|
${enabledText}
|
|
219464
219576
|
queryKey,
|
|
219465
219577
|
queryFn: async ({ signal }) => {
|
|
219466
|
-
config.signal
|
|
219578
|
+
if (!config.signal) {
|
|
219579
|
+
config.signal = signal
|
|
219580
|
+
}
|
|
219467
219581
|
return ${clientName}(${clientParams.toCall()})
|
|
219468
219582
|
},
|
|
219469
219583
|
})
|
|
@@ -220097,7 +220211,7 @@ const pluginSolidQuery = definePlugin((options) => {
|
|
|
220097
220211
|
path: path$2.resolve(root, ".kubb/fetch.ts"),
|
|
220098
220212
|
sources: [{
|
|
220099
220213
|
name: "fetch",
|
|
220100
|
-
value:
|
|
220214
|
+
value: this.plugin.options.client.client === "fetch" ? source$1 : source$2,
|
|
220101
220215
|
isExportable: true,
|
|
220102
220216
|
isIndexable: true
|
|
220103
220217
|
}],
|
|
@@ -220109,7 +220223,7 @@ const pluginSolidQuery = definePlugin((options) => {
|
|
|
220109
220223
|
path: path$2.resolve(root, ".kubb/config.ts"),
|
|
220110
220224
|
sources: [{
|
|
220111
220225
|
name: "config",
|
|
220112
|
-
value:
|
|
220226
|
+
value: source,
|
|
220113
220227
|
isExportable: false,
|
|
220114
220228
|
isIndexable: false
|
|
220115
220229
|
}],
|
|
@@ -220474,7 +220588,9 @@ function QueryOptions$2({ name, clientName, typeSchemas, paramsCasing, paramsTyp
|
|
|
220474
220588
|
${enabledText}
|
|
220475
220589
|
queryKey,
|
|
220476
220590
|
queryFn: async ({ signal }) => {
|
|
220477
|
-
config.signal
|
|
220591
|
+
if (!config.signal) {
|
|
220592
|
+
config.signal = signal
|
|
220593
|
+
}
|
|
220478
220594
|
return ${clientName}(${clientParams.toCall()})
|
|
220479
220595
|
},
|
|
220480
220596
|
})
|
|
@@ -221108,7 +221224,7 @@ const pluginSvelteQuery = definePlugin((options) => {
|
|
|
221108
221224
|
path: path$2.resolve(root, ".kubb/fetch.ts"),
|
|
221109
221225
|
sources: [{
|
|
221110
221226
|
name: "fetch",
|
|
221111
|
-
value:
|
|
221227
|
+
value: this.plugin.options.client.client === "fetch" ? source$1 : source$2,
|
|
221112
221228
|
isExportable: true,
|
|
221113
221229
|
isIndexable: true
|
|
221114
221230
|
}],
|
|
@@ -221120,7 +221236,7 @@ const pluginSvelteQuery = definePlugin((options) => {
|
|
|
221120
221236
|
path: path$2.resolve(root, ".kubb/config.ts"),
|
|
221121
221237
|
sources: [{
|
|
221122
221238
|
name: "config",
|
|
221123
|
-
value:
|
|
221239
|
+
value: source,
|
|
221124
221240
|
isExportable: false,
|
|
221125
221241
|
isIndexable: false
|
|
221126
221242
|
}],
|
|
@@ -222143,7 +222259,7 @@ const pluginSwr = definePlugin((options) => {
|
|
|
222143
222259
|
path: path$2.resolve(root, ".kubb/fetch.ts"),
|
|
222144
222260
|
sources: [{
|
|
222145
222261
|
name: "fetch",
|
|
222146
|
-
value:
|
|
222262
|
+
value: this.plugin.options.client.client === "fetch" ? source$1 : source$2,
|
|
222147
222263
|
isExportable: true,
|
|
222148
222264
|
isIndexable: true
|
|
222149
222265
|
}],
|
|
@@ -222155,7 +222271,7 @@ const pluginSwr = definePlugin((options) => {
|
|
|
222155
222271
|
path: path$2.resolve(root, ".kubb/config.ts"),
|
|
222156
222272
|
sources: [{
|
|
222157
222273
|
name: "config",
|
|
222158
|
-
value:
|
|
222274
|
+
value: source,
|
|
222159
222275
|
isExportable: false,
|
|
222160
222276
|
isIndexable: false
|
|
222161
222277
|
}],
|
|
@@ -222380,7 +222496,9 @@ function QueryOptions({ name, clientName, dataReturnType, typeSchemas, paramsCas
|
|
|
222380
222496
|
${enabledText}
|
|
222381
222497
|
queryKey,
|
|
222382
222498
|
queryFn: async ({ signal }) => {
|
|
222383
|
-
config.signal
|
|
222499
|
+
if (!config.signal) {
|
|
222500
|
+
config.signal = signal
|
|
222501
|
+
}
|
|
222384
222502
|
return ${clientName}(${clientParams.toCall({ transformName(name$1) {
|
|
222385
222503
|
return `toValue(${name$1})`;
|
|
222386
222504
|
} })})
|
|
@@ -222691,7 +222809,9 @@ function InfiniteQueryOptions({ name, clientName, initialPageParam, cursorParam,
|
|
|
222691
222809
|
${enabledText}
|
|
222692
222810
|
queryKey,
|
|
222693
222811
|
queryFn: async ({ signal, pageParam }) => {
|
|
222694
|
-
config.signal
|
|
222812
|
+
if (!config.signal) {
|
|
222813
|
+
config.signal = signal
|
|
222814
|
+
}
|
|
222695
222815
|
${infiniteOverrideParams}
|
|
222696
222816
|
return ${clientName}(${clientParams.toCall({ transformName(name$1) {
|
|
222697
222817
|
return `toValue(${name$1})`;
|
|
@@ -223763,7 +223883,7 @@ const pluginVueQuery = definePlugin((options) => {
|
|
|
223763
223883
|
path: path$2.resolve(root, ".kubb/fetch.ts"),
|
|
223764
223884
|
sources: [{
|
|
223765
223885
|
name: "fetch",
|
|
223766
|
-
value:
|
|
223886
|
+
value: this.plugin.options.client.client === "fetch" ? source$1 : source$2,
|
|
223767
223887
|
isExportable: true,
|
|
223768
223888
|
isIndexable: true
|
|
223769
223889
|
}],
|
|
@@ -223775,7 +223895,7 @@ const pluginVueQuery = definePlugin((options) => {
|
|
|
223775
223895
|
path: path$2.resolve(root, ".kubb/config.ts"),
|
|
223776
223896
|
sources: [{
|
|
223777
223897
|
name: "config",
|
|
223778
|
-
value:
|
|
223898
|
+
value: source,
|
|
223779
223899
|
isExportable: false,
|
|
223780
223900
|
isIndexable: false
|
|
223781
223901
|
}],
|
|
@@ -223806,25 +223926,25 @@ const pluginVueQuery = definePlugin((options) => {
|
|
|
223806
223926
|
};
|
|
223807
223927
|
});
|
|
223808
223928
|
|
|
223809
|
-
const pluginRegistry =
|
|
223810
|
-
"@kubb/plugin-client"
|
|
223811
|
-
"@kubb/plugin-cypress"
|
|
223812
|
-
"@kubb/plugin-faker"
|
|
223813
|
-
"@kubb/plugin-mcp"
|
|
223814
|
-
"@kubb/plugin-msw"
|
|
223815
|
-
"@kubb/plugin-oas"
|
|
223816
|
-
"@kubb/plugin-react-query"
|
|
223817
|
-
"@kubb/plugin-redoc"
|
|
223818
|
-
"@kubb/plugin-solid-query"
|
|
223819
|
-
"@kubb/plugin-svelte-query"
|
|
223820
|
-
"@kubb/plugin-swr"
|
|
223821
|
-
"@kubb/plugin-ts"
|
|
223822
|
-
"@kubb/plugin-vue-query"
|
|
223823
|
-
"@kubb/plugin-zod"
|
|
223824
|
-
|
|
223929
|
+
const pluginRegistry = /* @__PURE__ */ new Map([
|
|
223930
|
+
["@kubb/plugin-client", pluginClient],
|
|
223931
|
+
["@kubb/plugin-cypress", pluginCypress],
|
|
223932
|
+
["@kubb/plugin-faker", pluginFaker],
|
|
223933
|
+
["@kubb/plugin-mcp", pluginMcp],
|
|
223934
|
+
["@kubb/plugin-msw", pluginMsw],
|
|
223935
|
+
["@kubb/plugin-oas", pluginOas],
|
|
223936
|
+
["@kubb/plugin-react-query", pluginReactQuery],
|
|
223937
|
+
["@kubb/plugin-redoc", pluginRedoc],
|
|
223938
|
+
["@kubb/plugin-solid-query", pluginSolidQuery],
|
|
223939
|
+
["@kubb/plugin-svelte-query", pluginSvelteQuery],
|
|
223940
|
+
["@kubb/plugin-swr", pluginSwr],
|
|
223941
|
+
["@kubb/plugin-ts", pluginTs],
|
|
223942
|
+
["@kubb/plugin-vue-query", pluginVueQuery],
|
|
223943
|
+
["@kubb/plugin-zod", pluginZod]
|
|
223944
|
+
]);
|
|
223825
223945
|
function resolvePlugins(plugins) {
|
|
223826
223946
|
return plugins.map(({ name, options }) => {
|
|
223827
|
-
const factory = pluginRegistry
|
|
223947
|
+
const factory = pluginRegistry.get(name);
|
|
223828
223948
|
if (typeof factory !== "function") {
|
|
223829
223949
|
throw new Error(`Plugin "${name}" is not supported. Supported plugins: ${Object.keys(pluginRegistry).join(", ")}`);
|
|
223830
223950
|
}
|
|
@@ -223977,7 +224097,7 @@ function setupEventsStream(ws, events) {
|
|
|
223977
224097
|
});
|
|
223978
224098
|
}
|
|
223979
224099
|
|
|
223980
|
-
var version = "4.
|
|
224100
|
+
var version = "4.28.0";
|
|
223981
224101
|
|
|
223982
224102
|
const _zcw7I4pYH8OiCfaDcjy_x7I6IH1tLDQR3W_yRZgP6E = defineNitroPlugin(async (nitro) => {
|
|
223983
224103
|
const studioUrl = process$1.env.KUBB_STUDIO_URL || "https://studio.kubb.dev";
|
|
@@ -223994,6 +224114,7 @@ const _zcw7I4pYH8OiCfaDcjy_x7I6IH1tLDQR3W_yRZgP6E = defineNitroPlugin(async (nit
|
|
|
223994
224114
|
}
|
|
223995
224115
|
const resolvedConfigPath = path$2.isAbsolute(configPath) ? configPath : path$2.resolve(root, configPath);
|
|
223996
224116
|
const events = new AsyncEventEmitter();
|
|
224117
|
+
const storage = useStorage("kubb");
|
|
223997
224118
|
async function loadConfig() {
|
|
223998
224119
|
const result = await getCosmiConfig(resolvedConfigPath);
|
|
223999
224120
|
const configs = await getConfigs(result.config, {});
|
|
@@ -224046,7 +224167,7 @@ const _zcw7I4pYH8OiCfaDcjy_x7I6IH1tLDQR3W_yRZgP6E = defineNitroPlugin(async (nit
|
|
|
224046
224167
|
}
|
|
224047
224168
|
async function connectToStudio() {
|
|
224048
224169
|
try {
|
|
224049
|
-
const { sessionToken, wsUrl } = await createAgentSession({
|
|
224170
|
+
const { sessionToken, wsUrl, isSandbox } = await createAgentSession({
|
|
224050
224171
|
noCache,
|
|
224051
224172
|
token,
|
|
224052
224173
|
studioUrl
|
|
@@ -224055,10 +224176,13 @@ const _zcw7I4pYH8OiCfaDcjy_x7I6IH1tLDQR3W_yRZgP6E = defineNitroPlugin(async (nit
|
|
|
224055
224176
|
const onError = async () => {
|
|
224056
224177
|
cleanup();
|
|
224057
224178
|
logger.error(`Failed to connect to Kubb Studio on "${wsUrl}"`);
|
|
224058
|
-
|
|
224059
|
-
|
|
224060
|
-
|
|
224061
|
-
|
|
224179
|
+
if (!noCache) {
|
|
224180
|
+
const sessionKey = getSessionKey(token);
|
|
224181
|
+
const stored = await storage.getItem(sessionKey);
|
|
224182
|
+
if (stored && isSessionValid(stored)) {
|
|
224183
|
+
await storage.removeItem(sessionKey);
|
|
224184
|
+
await reconnectToStudio();
|
|
224185
|
+
}
|
|
224062
224186
|
}
|
|
224063
224187
|
};
|
|
224064
224188
|
const onOpen = () => {
|
|
@@ -224073,7 +224197,7 @@ const _zcw7I4pYH8OiCfaDcjy_x7I6IH1tLDQR3W_yRZgP6E = defineNitroPlugin(async (nit
|
|
|
224073
224197
|
studioUrl,
|
|
224074
224198
|
token
|
|
224075
224199
|
}).catch(async () => {
|
|
224076
|
-
|
|
224200
|
+
await storage.removeItem(getSessionKey(token));
|
|
224077
224201
|
await reconnectToStudio();
|
|
224078
224202
|
});
|
|
224079
224203
|
}
|
|
@@ -224094,23 +224218,35 @@ const _zcw7I4pYH8OiCfaDcjy_x7I6IH1tLDQR3W_yRZgP6E = defineNitroPlugin(async (nit
|
|
|
224094
224218
|
}, 3e4);
|
|
224095
224219
|
setupEventsStream(ws, events);
|
|
224096
224220
|
ws.addEventListener("message", async (message) => {
|
|
224097
|
-
var _a, _b, _c;
|
|
224221
|
+
var _a, _b, _c, _d;
|
|
224098
224222
|
try {
|
|
224099
224223
|
const data = JSON.parse(message.data);
|
|
224224
|
+
if (isPongMessage(data)) {
|
|
224225
|
+
logger.info("Received pong from Studio");
|
|
224226
|
+
return;
|
|
224227
|
+
}
|
|
224100
224228
|
if (isCommandMessage(data)) {
|
|
224101
224229
|
if (data.command === "generate") {
|
|
224102
224230
|
const config = await loadConfig();
|
|
224103
224231
|
const studioConfig = readStudioConfig(resolvedConfigPath);
|
|
224104
224232
|
const patch = (_a = data.payload) != null ? _a : studioConfig;
|
|
224105
224233
|
const resolvedPlugins = (patch == null ? void 0 : patch.plugins) ? resolvePlugins(patch.plugins) : void 0;
|
|
224234
|
+
if (allowWrite && isSandbox) {
|
|
224235
|
+
logger.warn("Agent is running in a sandbox environment, write will be disabled");
|
|
224236
|
+
}
|
|
224237
|
+
if ((patch == null ? void 0 : patch.input) && !isSandbox) {
|
|
224238
|
+
logger.warn("Input override via payload is only supported in sandbox mode and will be ignored");
|
|
224239
|
+
}
|
|
224240
|
+
const inputOverride = isSandbox ? { data: (_b = patch.input) != null ? _b : "" } : void 0;
|
|
224106
224241
|
await generate({
|
|
224107
224242
|
config: {
|
|
224108
224243
|
...config,
|
|
224244
|
+
input: inputOverride != null ? inputOverride : config.input,
|
|
224109
224245
|
plugins: resolvedPlugins != null ? resolvedPlugins : config.plugins,
|
|
224110
224246
|
root,
|
|
224111
224247
|
output: {
|
|
224112
224248
|
...config.output,
|
|
224113
|
-
write: allowWrite
|
|
224249
|
+
write: isSandbox ? false : allowWrite
|
|
224114
224250
|
}
|
|
224115
224251
|
},
|
|
224116
224252
|
events
|
|
@@ -224128,11 +224264,11 @@ const _zcw7I4pYH8OiCfaDcjy_x7I6IH1tLDQR3W_yRZgP6E = defineNitroPlugin(async (nit
|
|
|
224128
224264
|
version,
|
|
224129
224265
|
configPath,
|
|
224130
224266
|
permissions: {
|
|
224131
|
-
allowAll,
|
|
224132
|
-
allowWrite
|
|
224267
|
+
allowAll: isSandbox ? false : allowWrite,
|
|
224268
|
+
allowWrite: isSandbox ? false : allowWrite
|
|
224133
224269
|
},
|
|
224134
224270
|
config: {
|
|
224135
|
-
plugins: (
|
|
224271
|
+
plugins: (_c = config.plugins) == null ? void 0 : _c.map((plugin) => ({
|
|
224136
224272
|
name: `@kubb/${plugin.name}`,
|
|
224137
224273
|
options: serializePluginOptions(plugin.options)
|
|
224138
224274
|
}))
|
|
@@ -224144,11 +224280,11 @@ const _zcw7I4pYH8OiCfaDcjy_x7I6IH1tLDQR3W_yRZgP6E = defineNitroPlugin(async (nit
|
|
|
224144
224280
|
}
|
|
224145
224281
|
logger.warn(`Unknown message type from Kubb Studio: ${message.data}`);
|
|
224146
224282
|
} catch (error) {
|
|
224147
|
-
logger.error(`[unhandledRejection] ${(
|
|
224283
|
+
logger.error(`[unhandledRejection] ${(_d = error == null ? void 0 : error.message) != null ? _d : error}`);
|
|
224148
224284
|
}
|
|
224149
224285
|
});
|
|
224150
224286
|
} catch (error) {
|
|
224151
|
-
|
|
224287
|
+
await storage.removeItem(getSessionKey(token));
|
|
224152
224288
|
logger.error(`Something went wrong ${error}`);
|
|
224153
224289
|
await reconnectToStudio();
|
|
224154
224290
|
}
|