@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,644 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var common = require('./common');
|
|
4
|
-
var YAMLException = require('./exception');
|
|
5
|
-
var DEFAULT_FULL_SCHEMA = require('./schema/default_full');
|
|
6
|
-
var DEFAULT_SAFE_SCHEMA = require('./schema/default_safe');
|
|
7
|
-
var _toString = Object.prototype.toString;
|
|
8
|
-
var _hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
9
|
-
var CHAR_TAB = 0x09;
|
|
10
|
-
var CHAR_LINE_FEED = 0x0A;
|
|
11
|
-
var CHAR_CARRIAGE_RETURN = 0x0D;
|
|
12
|
-
var CHAR_SPACE = 0x20;
|
|
13
|
-
var CHAR_EXCLAMATION = 0x21;
|
|
14
|
-
var CHAR_DOUBLE_QUOTE = 0x22;
|
|
15
|
-
var CHAR_SHARP = 0x23;
|
|
16
|
-
var CHAR_PERCENT = 0x25;
|
|
17
|
-
var CHAR_AMPERSAND = 0x26;
|
|
18
|
-
var CHAR_SINGLE_QUOTE = 0x27;
|
|
19
|
-
var CHAR_ASTERISK = 0x2A;
|
|
20
|
-
var CHAR_COMMA = 0x2C;
|
|
21
|
-
var CHAR_MINUS = 0x2D;
|
|
22
|
-
var CHAR_COLON = 0x3A;
|
|
23
|
-
var CHAR_GREATER_THAN = 0x3E;
|
|
24
|
-
var CHAR_QUESTION = 0x3F;
|
|
25
|
-
var CHAR_COMMERCIAL_AT = 0x40;
|
|
26
|
-
var CHAR_LEFT_SQUARE_BRACKET = 0x5B;
|
|
27
|
-
var CHAR_RIGHT_SQUARE_BRACKET = 0x5D;
|
|
28
|
-
var CHAR_GRAVE_ACCENT = 0x60;
|
|
29
|
-
var CHAR_LEFT_CURLY_BRACKET = 0x7B;
|
|
30
|
-
var CHAR_VERTICAL_LINE = 0x7C;
|
|
31
|
-
var CHAR_RIGHT_CURLY_BRACKET = 0x7D;
|
|
32
|
-
var ESCAPE_SEQUENCES = {};
|
|
33
|
-
ESCAPE_SEQUENCES[0x00] = '\\0';
|
|
34
|
-
ESCAPE_SEQUENCES[0x07] = '\\a';
|
|
35
|
-
ESCAPE_SEQUENCES[0x08] = '\\b';
|
|
36
|
-
ESCAPE_SEQUENCES[0x09] = '\\t';
|
|
37
|
-
ESCAPE_SEQUENCES[0x0A] = '\\n';
|
|
38
|
-
ESCAPE_SEQUENCES[0x0B] = '\\v';
|
|
39
|
-
ESCAPE_SEQUENCES[0x0C] = '\\f';
|
|
40
|
-
ESCAPE_SEQUENCES[0x0D] = '\\r';
|
|
41
|
-
ESCAPE_SEQUENCES[0x1B] = '\\e';
|
|
42
|
-
ESCAPE_SEQUENCES[0x22] = '\\"';
|
|
43
|
-
ESCAPE_SEQUENCES[0x5C] = '\\\\';
|
|
44
|
-
ESCAPE_SEQUENCES[0x85] = '\\N';
|
|
45
|
-
ESCAPE_SEQUENCES[0xA0] = '\\_';
|
|
46
|
-
ESCAPE_SEQUENCES[0x2028] = '\\L';
|
|
47
|
-
ESCAPE_SEQUENCES[0x2029] = '\\P';
|
|
48
|
-
var DEPRECATED_BOOLEANS_SYNTAX = [
|
|
49
|
-
'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON',
|
|
50
|
-
'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF'
|
|
51
|
-
];
|
|
52
|
-
function compileStyleMap(schema, map) {
|
|
53
|
-
var result, keys, index, length, tag, style, type;
|
|
54
|
-
if (null === map) {
|
|
55
|
-
return {};
|
|
56
|
-
}
|
|
57
|
-
result = {};
|
|
58
|
-
keys = Object.keys(map);
|
|
59
|
-
for (index = 0, length = keys.length; index < length; index += 1) {
|
|
60
|
-
tag = keys[index];
|
|
61
|
-
style = String(map[tag]);
|
|
62
|
-
if ('!!' === tag.slice(0, 2)) {
|
|
63
|
-
tag = 'tag:yaml.org,2002:' + tag.slice(2);
|
|
64
|
-
}
|
|
65
|
-
type = schema.compiledTypeMap[tag];
|
|
66
|
-
if (type && _hasOwnProperty.call(type.styleAliases, style)) {
|
|
67
|
-
style = type.styleAliases[style];
|
|
68
|
-
}
|
|
69
|
-
result[tag] = style;
|
|
70
|
-
}
|
|
71
|
-
return result;
|
|
72
|
-
}
|
|
73
|
-
function encodeHex(character) {
|
|
74
|
-
var string, handle, length;
|
|
75
|
-
string = character.toString(16).toUpperCase();
|
|
76
|
-
if (character <= 0xFF) {
|
|
77
|
-
handle = 'x';
|
|
78
|
-
length = 2;
|
|
79
|
-
}
|
|
80
|
-
else if (character <= 0xFFFF) {
|
|
81
|
-
handle = 'u';
|
|
82
|
-
length = 4;
|
|
83
|
-
}
|
|
84
|
-
else if (character <= 0xFFFFFFFF) {
|
|
85
|
-
handle = 'U';
|
|
86
|
-
length = 8;
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF');
|
|
90
|
-
}
|
|
91
|
-
return '\\' + handle + common.repeat('0', length - string.length) + string;
|
|
92
|
-
}
|
|
93
|
-
function State(options) {
|
|
94
|
-
this.schema = options['schema'] || DEFAULT_FULL_SCHEMA;
|
|
95
|
-
this.indent = Math.max(1, (options['indent'] || 2));
|
|
96
|
-
this.skipInvalid = options['skipInvalid'] || false;
|
|
97
|
-
this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']);
|
|
98
|
-
this.styleMap = compileStyleMap(this.schema, options['styles'] || null);
|
|
99
|
-
this.implicitTypes = this.schema.compiledImplicit;
|
|
100
|
-
this.explicitTypes = this.schema.compiledExplicit;
|
|
101
|
-
this.tag = null;
|
|
102
|
-
this.result = '';
|
|
103
|
-
this.duplicates = [];
|
|
104
|
-
this.usedDuplicates = null;
|
|
105
|
-
}
|
|
106
|
-
function indentString(string, spaces) {
|
|
107
|
-
var ind = common.repeat(' ', spaces), position = 0, next = -1, result = '', line, length = string.length;
|
|
108
|
-
while (position < length) {
|
|
109
|
-
next = string.indexOf('\n', position);
|
|
110
|
-
if (next === -1) {
|
|
111
|
-
line = string.slice(position);
|
|
112
|
-
position = length;
|
|
113
|
-
}
|
|
114
|
-
else {
|
|
115
|
-
line = string.slice(position, next + 1);
|
|
116
|
-
position = next + 1;
|
|
117
|
-
}
|
|
118
|
-
if (line.length && line !== '\n') {
|
|
119
|
-
result += ind;
|
|
120
|
-
}
|
|
121
|
-
result += line;
|
|
122
|
-
}
|
|
123
|
-
return result;
|
|
124
|
-
}
|
|
125
|
-
function generateNextLine(state, level) {
|
|
126
|
-
return '\n' + common.repeat(' ', state.indent * level);
|
|
127
|
-
}
|
|
128
|
-
function testImplicitResolving(state, str) {
|
|
129
|
-
var index, length, type;
|
|
130
|
-
for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {
|
|
131
|
-
type = state.implicitTypes[index];
|
|
132
|
-
if (type.resolve(str)) {
|
|
133
|
-
return true;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
return false;
|
|
137
|
-
}
|
|
138
|
-
function StringBuilder(source) {
|
|
139
|
-
this.source = source;
|
|
140
|
-
this.result = '';
|
|
141
|
-
this.checkpoint = 0;
|
|
142
|
-
}
|
|
143
|
-
StringBuilder.prototype.takeUpTo = function (position) {
|
|
144
|
-
var er;
|
|
145
|
-
if (position < this.checkpoint) {
|
|
146
|
-
er = new Error('position should be > checkpoint');
|
|
147
|
-
er.position = position;
|
|
148
|
-
er.checkpoint = this.checkpoint;
|
|
149
|
-
throw er;
|
|
150
|
-
}
|
|
151
|
-
this.result += this.source.slice(this.checkpoint, position);
|
|
152
|
-
this.checkpoint = position;
|
|
153
|
-
return this;
|
|
154
|
-
};
|
|
155
|
-
StringBuilder.prototype.escapeChar = function () {
|
|
156
|
-
var character, esc;
|
|
157
|
-
character = this.source.charCodeAt(this.checkpoint);
|
|
158
|
-
esc = ESCAPE_SEQUENCES[character] || encodeHex(character);
|
|
159
|
-
this.result += esc;
|
|
160
|
-
this.checkpoint += 1;
|
|
161
|
-
return this;
|
|
162
|
-
};
|
|
163
|
-
StringBuilder.prototype.finish = function () {
|
|
164
|
-
if (this.source.length > this.checkpoint) {
|
|
165
|
-
this.takeUpTo(this.source.length);
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
function writeScalar(state, object, level) {
|
|
169
|
-
var simple, first, spaceWrap, folded, literal, single, double, sawLineFeed, linePosition, longestLine, indent, max, character, position, escapeSeq, hexEsc, previous, lineLength, modifier, trailingLineBreaks, result;
|
|
170
|
-
if (0 === object.length) {
|
|
171
|
-
state.dump = "''";
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
if (object.indexOf("!include") == 0) {
|
|
175
|
-
state.dump = "" + object;
|
|
176
|
-
return;
|
|
177
|
-
}
|
|
178
|
-
if (object.indexOf("!$$$novalue") == 0) {
|
|
179
|
-
state.dump = "";
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
|
-
if (-1 !== DEPRECATED_BOOLEANS_SYNTAX.indexOf(object)) {
|
|
183
|
-
state.dump = "'" + object + "'";
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
simple = true;
|
|
187
|
-
first = object.length ? object.charCodeAt(0) : 0;
|
|
188
|
-
spaceWrap = (CHAR_SPACE === first ||
|
|
189
|
-
CHAR_SPACE === object.charCodeAt(object.length - 1));
|
|
190
|
-
if (CHAR_MINUS === first ||
|
|
191
|
-
CHAR_QUESTION === first ||
|
|
192
|
-
CHAR_COMMERCIAL_AT === first ||
|
|
193
|
-
CHAR_GRAVE_ACCENT === first) {
|
|
194
|
-
simple = false;
|
|
195
|
-
}
|
|
196
|
-
if (spaceWrap) {
|
|
197
|
-
simple = false;
|
|
198
|
-
folded = false;
|
|
199
|
-
literal = false;
|
|
200
|
-
}
|
|
201
|
-
else {
|
|
202
|
-
folded = true;
|
|
203
|
-
literal = true;
|
|
204
|
-
}
|
|
205
|
-
single = true;
|
|
206
|
-
double = new StringBuilder(object);
|
|
207
|
-
sawLineFeed = false;
|
|
208
|
-
linePosition = 0;
|
|
209
|
-
longestLine = 0;
|
|
210
|
-
indent = state.indent * level;
|
|
211
|
-
max = 80;
|
|
212
|
-
if (indent < 40) {
|
|
213
|
-
max -= indent;
|
|
214
|
-
}
|
|
215
|
-
else {
|
|
216
|
-
max = 40;
|
|
217
|
-
}
|
|
218
|
-
for (position = 0; position < object.length; position++) {
|
|
219
|
-
character = object.charCodeAt(position);
|
|
220
|
-
if (simple) {
|
|
221
|
-
if (!simpleChar(character)) {
|
|
222
|
-
simple = false;
|
|
223
|
-
}
|
|
224
|
-
else {
|
|
225
|
-
continue;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
if (single && character === CHAR_SINGLE_QUOTE) {
|
|
229
|
-
single = false;
|
|
230
|
-
}
|
|
231
|
-
escapeSeq = ESCAPE_SEQUENCES[character];
|
|
232
|
-
hexEsc = needsHexEscape(character);
|
|
233
|
-
if (!escapeSeq && !hexEsc) {
|
|
234
|
-
continue;
|
|
235
|
-
}
|
|
236
|
-
if (character !== CHAR_LINE_FEED &&
|
|
237
|
-
character !== CHAR_DOUBLE_QUOTE &&
|
|
238
|
-
character !== CHAR_SINGLE_QUOTE) {
|
|
239
|
-
folded = false;
|
|
240
|
-
literal = false;
|
|
241
|
-
}
|
|
242
|
-
else if (character === CHAR_LINE_FEED) {
|
|
243
|
-
sawLineFeed = true;
|
|
244
|
-
single = false;
|
|
245
|
-
if (position > 0) {
|
|
246
|
-
previous = object.charCodeAt(position - 1);
|
|
247
|
-
if (previous === CHAR_SPACE) {
|
|
248
|
-
literal = false;
|
|
249
|
-
folded = false;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
if (folded) {
|
|
253
|
-
lineLength = position - linePosition;
|
|
254
|
-
linePosition = position;
|
|
255
|
-
if (lineLength > longestLine) {
|
|
256
|
-
longestLine = lineLength;
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
if (character !== CHAR_DOUBLE_QUOTE) {
|
|
261
|
-
single = false;
|
|
262
|
-
}
|
|
263
|
-
double.takeUpTo(position);
|
|
264
|
-
double.escapeChar();
|
|
265
|
-
}
|
|
266
|
-
if (simple && testImplicitResolving(state, object)) {
|
|
267
|
-
simple = false;
|
|
268
|
-
}
|
|
269
|
-
modifier = '';
|
|
270
|
-
if (folded || literal) {
|
|
271
|
-
trailingLineBreaks = 0;
|
|
272
|
-
if (object.charCodeAt(object.length - 1) === CHAR_LINE_FEED) {
|
|
273
|
-
trailingLineBreaks += 1;
|
|
274
|
-
if (object.charCodeAt(object.length - 2) === CHAR_LINE_FEED) {
|
|
275
|
-
trailingLineBreaks += 1;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
if (trailingLineBreaks === 0) {
|
|
279
|
-
modifier = '-';
|
|
280
|
-
}
|
|
281
|
-
else if (trailingLineBreaks === 2) {
|
|
282
|
-
modifier = '+';
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
if (literal && longestLine < max) {
|
|
286
|
-
folded = false;
|
|
287
|
-
}
|
|
288
|
-
if (!sawLineFeed) {
|
|
289
|
-
literal = false;
|
|
290
|
-
}
|
|
291
|
-
if (simple) {
|
|
292
|
-
state.dump = object;
|
|
293
|
-
}
|
|
294
|
-
else if (single) {
|
|
295
|
-
state.dump = '\'' + object + '\'';
|
|
296
|
-
}
|
|
297
|
-
else if (folded) {
|
|
298
|
-
result = fold(object, max);
|
|
299
|
-
state.dump = '>' + modifier + '\n' + indentString(result, indent);
|
|
300
|
-
}
|
|
301
|
-
else if (literal) {
|
|
302
|
-
if (!modifier) {
|
|
303
|
-
object = object.replace(/\n$/, '');
|
|
304
|
-
}
|
|
305
|
-
state.dump = '|' + modifier + '\n' + indentString(object, indent);
|
|
306
|
-
}
|
|
307
|
-
else if (double) {
|
|
308
|
-
double.finish();
|
|
309
|
-
state.dump = '"' + double.result + '"';
|
|
310
|
-
}
|
|
311
|
-
else {
|
|
312
|
-
throw new Error('Failed to dump scalar value');
|
|
313
|
-
}
|
|
314
|
-
return;
|
|
315
|
-
}
|
|
316
|
-
function fold(object, max) {
|
|
317
|
-
var result = '', position = 0, length = object.length, trailing = /\n+$/.exec(object), newLine;
|
|
318
|
-
if (trailing) {
|
|
319
|
-
length = trailing.index + 1;
|
|
320
|
-
}
|
|
321
|
-
while (position < length) {
|
|
322
|
-
newLine = object.indexOf('\n', position);
|
|
323
|
-
if (newLine > length || newLine === -1) {
|
|
324
|
-
if (result) {
|
|
325
|
-
result += '\n\n';
|
|
326
|
-
}
|
|
327
|
-
result += foldLine(object.slice(position, length), max);
|
|
328
|
-
position = length;
|
|
329
|
-
}
|
|
330
|
-
else {
|
|
331
|
-
if (result) {
|
|
332
|
-
result += '\n\n';
|
|
333
|
-
}
|
|
334
|
-
result += foldLine(object.slice(position, newLine), max);
|
|
335
|
-
position = newLine + 1;
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
if (trailing && trailing[0] !== '\n') {
|
|
339
|
-
result += trailing[0];
|
|
340
|
-
}
|
|
341
|
-
return result;
|
|
342
|
-
}
|
|
343
|
-
function foldLine(line, max) {
|
|
344
|
-
if (line === '') {
|
|
345
|
-
return line;
|
|
346
|
-
}
|
|
347
|
-
var foldRe = /[^\s] [^\s]/g, result = '', prevMatch = 0, foldStart = 0, match = foldRe.exec(line), index, foldEnd, folded;
|
|
348
|
-
while (match) {
|
|
349
|
-
index = match.index;
|
|
350
|
-
if (index - foldStart > max) {
|
|
351
|
-
if (prevMatch !== foldStart) {
|
|
352
|
-
foldEnd = prevMatch;
|
|
353
|
-
}
|
|
354
|
-
else {
|
|
355
|
-
foldEnd = index;
|
|
356
|
-
}
|
|
357
|
-
if (result) {
|
|
358
|
-
result += '\n';
|
|
359
|
-
}
|
|
360
|
-
folded = line.slice(foldStart, foldEnd);
|
|
361
|
-
result += folded;
|
|
362
|
-
foldStart = foldEnd + 1;
|
|
363
|
-
}
|
|
364
|
-
prevMatch = index + 1;
|
|
365
|
-
match = foldRe.exec(line);
|
|
366
|
-
}
|
|
367
|
-
if (result) {
|
|
368
|
-
result += '\n';
|
|
369
|
-
}
|
|
370
|
-
if (foldStart !== prevMatch && line.length - foldStart > max) {
|
|
371
|
-
result += line.slice(foldStart, prevMatch) + '\n' +
|
|
372
|
-
line.slice(prevMatch + 1);
|
|
373
|
-
}
|
|
374
|
-
else {
|
|
375
|
-
result += line.slice(foldStart);
|
|
376
|
-
}
|
|
377
|
-
return result;
|
|
378
|
-
}
|
|
379
|
-
function simpleChar(character) {
|
|
380
|
-
return CHAR_TAB !== character &&
|
|
381
|
-
CHAR_LINE_FEED !== character &&
|
|
382
|
-
CHAR_CARRIAGE_RETURN !== character &&
|
|
383
|
-
CHAR_COMMA !== character &&
|
|
384
|
-
CHAR_LEFT_SQUARE_BRACKET !== character &&
|
|
385
|
-
CHAR_RIGHT_SQUARE_BRACKET !== character &&
|
|
386
|
-
CHAR_LEFT_CURLY_BRACKET !== character &&
|
|
387
|
-
CHAR_RIGHT_CURLY_BRACKET !== character &&
|
|
388
|
-
CHAR_SHARP !== character &&
|
|
389
|
-
CHAR_AMPERSAND !== character &&
|
|
390
|
-
CHAR_ASTERISK !== character &&
|
|
391
|
-
CHAR_EXCLAMATION !== character &&
|
|
392
|
-
CHAR_VERTICAL_LINE !== character &&
|
|
393
|
-
CHAR_GREATER_THAN !== character &&
|
|
394
|
-
CHAR_SINGLE_QUOTE !== character &&
|
|
395
|
-
CHAR_DOUBLE_QUOTE !== character &&
|
|
396
|
-
CHAR_PERCENT !== character &&
|
|
397
|
-
CHAR_COLON !== character &&
|
|
398
|
-
!ESCAPE_SEQUENCES[character] &&
|
|
399
|
-
!needsHexEscape(character);
|
|
400
|
-
}
|
|
401
|
-
function needsHexEscape(character) {
|
|
402
|
-
return !((0x00020 <= character && character <= 0x00007E) ||
|
|
403
|
-
(0x00085 === character) ||
|
|
404
|
-
(0x000A0 <= character && character <= 0x00D7FF) ||
|
|
405
|
-
(0x0E000 <= character && character <= 0x00FFFD) ||
|
|
406
|
-
(0x10000 <= character && character <= 0x10FFFF));
|
|
407
|
-
}
|
|
408
|
-
function writeFlowSequence(state, level, object) {
|
|
409
|
-
var _result = '', _tag = state.tag, index, length;
|
|
410
|
-
for (index = 0, length = object.length; index < length; index += 1) {
|
|
411
|
-
if (writeNode(state, level, object[index], false, false)) {
|
|
412
|
-
if (0 !== index) {
|
|
413
|
-
_result += ', ';
|
|
414
|
-
}
|
|
415
|
-
_result += state.dump;
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
state.tag = _tag;
|
|
419
|
-
state.dump = '[' + _result + ']';
|
|
420
|
-
}
|
|
421
|
-
function writeBlockSequence(state, level, object, compact) {
|
|
422
|
-
var _result = '', _tag = state.tag, index, length;
|
|
423
|
-
for (index = 0, length = object.length; index < length; index += 1) {
|
|
424
|
-
if (writeNode(state, level + 1, object[index], true, true)) {
|
|
425
|
-
if (!compact || 0 !== index) {
|
|
426
|
-
_result += generateNextLine(state, level);
|
|
427
|
-
}
|
|
428
|
-
_result += '- ' + state.dump;
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
state.tag = _tag;
|
|
432
|
-
state.dump = _result || '[]';
|
|
433
|
-
}
|
|
434
|
-
function writeFlowMapping(state, level, object) {
|
|
435
|
-
var _result = '', _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, pairBuffer;
|
|
436
|
-
for (index = 0, length = objectKeyList.length; index < length; index += 1) {
|
|
437
|
-
pairBuffer = '';
|
|
438
|
-
if (0 !== index) {
|
|
439
|
-
pairBuffer += ', ';
|
|
440
|
-
}
|
|
441
|
-
objectKey = objectKeyList[index];
|
|
442
|
-
objectValue = object[objectKey];
|
|
443
|
-
if (!writeNode(state, level, objectKey, false, false)) {
|
|
444
|
-
continue;
|
|
445
|
-
}
|
|
446
|
-
if (state.dump.length > 1024) {
|
|
447
|
-
pairBuffer += '? ';
|
|
448
|
-
}
|
|
449
|
-
pairBuffer += state.dump + ': ';
|
|
450
|
-
if (!writeNode(state, level, objectValue, false, false)) {
|
|
451
|
-
continue;
|
|
452
|
-
}
|
|
453
|
-
pairBuffer += state.dump;
|
|
454
|
-
_result += pairBuffer;
|
|
455
|
-
}
|
|
456
|
-
state.tag = _tag;
|
|
457
|
-
state.dump = '{' + _result + '}';
|
|
458
|
-
}
|
|
459
|
-
function writeBlockMapping(state, level, object, compact) {
|
|
460
|
-
var _result = '', _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, explicitPair, pairBuffer;
|
|
461
|
-
for (index = 0, length = objectKeyList.length; index < length; index += 1) {
|
|
462
|
-
pairBuffer = '';
|
|
463
|
-
if (!compact || 0 !== index) {
|
|
464
|
-
pairBuffer += generateNextLine(state, level);
|
|
465
|
-
}
|
|
466
|
-
objectKey = objectKeyList[index];
|
|
467
|
-
objectValue = object[objectKey];
|
|
468
|
-
if (!writeNode(state, level + 1, objectKey, true, true)) {
|
|
469
|
-
continue;
|
|
470
|
-
}
|
|
471
|
-
explicitPair = (null !== state.tag && '?' !== state.tag) ||
|
|
472
|
-
(state.dump && state.dump.length > 1024);
|
|
473
|
-
if (explicitPair) {
|
|
474
|
-
if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
|
|
475
|
-
pairBuffer += '?';
|
|
476
|
-
}
|
|
477
|
-
else {
|
|
478
|
-
pairBuffer += '? ';
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
pairBuffer += state.dump;
|
|
482
|
-
if (explicitPair) {
|
|
483
|
-
pairBuffer += generateNextLine(state, level);
|
|
484
|
-
}
|
|
485
|
-
if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {
|
|
486
|
-
continue;
|
|
487
|
-
}
|
|
488
|
-
if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
|
|
489
|
-
pairBuffer += ':';
|
|
490
|
-
}
|
|
491
|
-
else {
|
|
492
|
-
pairBuffer += ': ';
|
|
493
|
-
}
|
|
494
|
-
pairBuffer += state.dump;
|
|
495
|
-
_result += pairBuffer;
|
|
496
|
-
}
|
|
497
|
-
state.tag = _tag;
|
|
498
|
-
state.dump = _result || '{}';
|
|
499
|
-
}
|
|
500
|
-
function detectType(state, object, explicit) {
|
|
501
|
-
var _result, typeList, index, length, type, style;
|
|
502
|
-
typeList = explicit ? state.explicitTypes : state.implicitTypes;
|
|
503
|
-
for (index = 0, length = typeList.length; index < length; index += 1) {
|
|
504
|
-
type = typeList[index];
|
|
505
|
-
if ((type.instanceOf || type.predicate) &&
|
|
506
|
-
(!type.instanceOf || (('object' === typeof object) && (object instanceof type.instanceOf))) &&
|
|
507
|
-
(!type.predicate || type.predicate(object))) {
|
|
508
|
-
state.tag = explicit ? type.tag : '?';
|
|
509
|
-
if (type.represent) {
|
|
510
|
-
style = state.styleMap[type.tag] || type.defaultStyle;
|
|
511
|
-
if ('[object Function]' === _toString.call(type.represent)) {
|
|
512
|
-
_result = type.represent(object, style);
|
|
513
|
-
}
|
|
514
|
-
else if (_hasOwnProperty.call(type.represent, style)) {
|
|
515
|
-
_result = type.represent[style](object, style);
|
|
516
|
-
}
|
|
517
|
-
else {
|
|
518
|
-
throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style');
|
|
519
|
-
}
|
|
520
|
-
state.dump = _result;
|
|
521
|
-
}
|
|
522
|
-
return true;
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
return false;
|
|
526
|
-
}
|
|
527
|
-
function writeNode(state, level, object, block, compact) {
|
|
528
|
-
state.tag = null;
|
|
529
|
-
state.dump = object;
|
|
530
|
-
if (!detectType(state, object, false)) {
|
|
531
|
-
detectType(state, object, true);
|
|
532
|
-
}
|
|
533
|
-
var type = _toString.call(state.dump);
|
|
534
|
-
if (block) {
|
|
535
|
-
block = (0 > state.flowLevel || state.flowLevel > level);
|
|
536
|
-
}
|
|
537
|
-
if ((null !== state.tag && '?' !== state.tag) || (2 !== state.indent && level > 0)) {
|
|
538
|
-
compact = false;
|
|
539
|
-
}
|
|
540
|
-
var objectOrArray = '[object Object]' === type || '[object Array]' === type, duplicateIndex, duplicate;
|
|
541
|
-
if (objectOrArray) {
|
|
542
|
-
duplicateIndex = state.duplicates.indexOf(object);
|
|
543
|
-
duplicate = duplicateIndex !== -1;
|
|
544
|
-
}
|
|
545
|
-
if (duplicate && state.usedDuplicates[duplicateIndex]) {
|
|
546
|
-
state.dump = '*ref_' + duplicateIndex;
|
|
547
|
-
}
|
|
548
|
-
else {
|
|
549
|
-
if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {
|
|
550
|
-
state.usedDuplicates[duplicateIndex] = true;
|
|
551
|
-
}
|
|
552
|
-
if ('[object Object]' === type) {
|
|
553
|
-
if (block && (0 !== Object.keys(state.dump).length)) {
|
|
554
|
-
writeBlockMapping(state, level, state.dump, compact);
|
|
555
|
-
if (duplicate) {
|
|
556
|
-
state.dump = '&ref_' + duplicateIndex + (0 === level ? '\n' : '') + state.dump;
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
else {
|
|
560
|
-
writeFlowMapping(state, level, state.dump);
|
|
561
|
-
if (duplicate) {
|
|
562
|
-
state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
else if ('[object Array]' === type) {
|
|
567
|
-
if (block && (0 !== state.dump.length)) {
|
|
568
|
-
writeBlockSequence(state, level, state.dump, compact);
|
|
569
|
-
if (duplicate) {
|
|
570
|
-
state.dump = '&ref_' + duplicateIndex + (0 === level ? '\n' : '') + state.dump;
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
else {
|
|
574
|
-
writeFlowSequence(state, level, state.dump);
|
|
575
|
-
if (duplicate) {
|
|
576
|
-
state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
else if ('[object String]' === type) {
|
|
581
|
-
if ('?' !== state.tag) {
|
|
582
|
-
writeScalar(state, state.dump, level);
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
else {
|
|
586
|
-
if (state.skipInvalid) {
|
|
587
|
-
return false;
|
|
588
|
-
}
|
|
589
|
-
throw new YAMLException('unacceptable kind of an object to dump ' + type);
|
|
590
|
-
}
|
|
591
|
-
if (null !== state.tag && '?' !== state.tag) {
|
|
592
|
-
state.dump = '!<' + state.tag + '> ' + state.dump;
|
|
593
|
-
}
|
|
594
|
-
}
|
|
595
|
-
return true;
|
|
596
|
-
}
|
|
597
|
-
function getDuplicateReferences(object, state) {
|
|
598
|
-
var objects = [], duplicatesIndexes = [], index, length;
|
|
599
|
-
inspectNode(object, objects, duplicatesIndexes);
|
|
600
|
-
for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {
|
|
601
|
-
state.duplicates.push(objects[duplicatesIndexes[index]]);
|
|
602
|
-
}
|
|
603
|
-
state.usedDuplicates = new Array(length);
|
|
604
|
-
}
|
|
605
|
-
function inspectNode(object, objects, duplicatesIndexes) {
|
|
606
|
-
var type = _toString.call(object), objectKeyList, index, length;
|
|
607
|
-
if (null !== object && 'object' === typeof object) {
|
|
608
|
-
index = objects.indexOf(object);
|
|
609
|
-
if (-1 !== index) {
|
|
610
|
-
if (-1 === duplicatesIndexes.indexOf(index)) {
|
|
611
|
-
duplicatesIndexes.push(index);
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
else {
|
|
615
|
-
objects.push(object);
|
|
616
|
-
if (Array.isArray(object)) {
|
|
617
|
-
for (index = 0, length = object.length; index < length; index += 1) {
|
|
618
|
-
inspectNode(object[index], objects, duplicatesIndexes);
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
else {
|
|
622
|
-
objectKeyList = Object.keys(object);
|
|
623
|
-
for (index = 0, length = objectKeyList.length; index < length; index += 1) {
|
|
624
|
-
inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
function dump(input, options) {
|
|
631
|
-
options = options || {};
|
|
632
|
-
var state = new State(options);
|
|
633
|
-
getDuplicateReferences(input, state);
|
|
634
|
-
if (writeNode(state, 0, input, true, true)) {
|
|
635
|
-
return state.dump + '\n';
|
|
636
|
-
}
|
|
637
|
-
return '';
|
|
638
|
-
}
|
|
639
|
-
exports.dump = dump;
|
|
640
|
-
function safeDump(input, options) {
|
|
641
|
-
return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));
|
|
642
|
-
}
|
|
643
|
-
exports.safeDump = safeDump;
|
|
644
|
-
//# sourceMappingURL=dumper.js.map
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
var YAMLException = (function () {
|
|
3
|
-
function YAMLException(reason, mark, isWarning) {
|
|
4
|
-
if (mark === void 0) { mark = null; }
|
|
5
|
-
if (isWarning === void 0) { isWarning = false; }
|
|
6
|
-
this.name = 'YAMLException';
|
|
7
|
-
this.reason = reason;
|
|
8
|
-
this.mark = mark;
|
|
9
|
-
this.message = this.toString(false);
|
|
10
|
-
this.isWarning = isWarning;
|
|
11
|
-
}
|
|
12
|
-
YAMLException.isInstance = function (instance) {
|
|
13
|
-
if (instance != null && instance.getClassIdentifier
|
|
14
|
-
&& typeof (instance.getClassIdentifier) == "function") {
|
|
15
|
-
for (var _i = 0, _a = instance.getClassIdentifier(); _i < _a.length; _i++) {
|
|
16
|
-
var currentIdentifier = _a[_i];
|
|
17
|
-
if (currentIdentifier == YAMLException.CLASS_IDENTIFIER)
|
|
18
|
-
return true;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return false;
|
|
22
|
-
};
|
|
23
|
-
YAMLException.prototype.getClassIdentifier = function () {
|
|
24
|
-
var superIdentifiers = [];
|
|
25
|
-
return superIdentifiers.concat(YAMLException.CLASS_IDENTIFIER);
|
|
26
|
-
};
|
|
27
|
-
YAMLException.prototype.toString = function (compact) {
|
|
28
|
-
if (compact === void 0) { compact = false; }
|
|
29
|
-
var result;
|
|
30
|
-
result = 'JS-YAML: ' + (this.reason || '(unknown reason)');
|
|
31
|
-
if (!compact && this.mark) {
|
|
32
|
-
result += ' ' + this.mark.toString();
|
|
33
|
-
}
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
YAMLException.CLASS_IDENTIFIER = "yaml-ast-parser.YAMLException";
|
|
37
|
-
return YAMLException;
|
|
38
|
-
}());
|
|
39
|
-
module.exports = YAMLException;
|
|
40
|
-
//# sourceMappingURL=exception.js.map
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
function __export(m) {
|
|
3
|
-
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
4
|
-
}
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var loader_1 = require("./loader");
|
|
7
|
-
exports.load = loader_1.load;
|
|
8
|
-
exports.loadAll = loader_1.loadAll;
|
|
9
|
-
exports.safeLoad = loader_1.safeLoad;
|
|
10
|
-
exports.safeLoadAll = loader_1.safeLoadAll;
|
|
11
|
-
var dumper_1 = require("./dumper");
|
|
12
|
-
exports.dump = dumper_1.dump;
|
|
13
|
-
exports.safeDump = dumper_1.safeDump;
|
|
14
|
-
exports.YAMLException = require("./exception");
|
|
15
|
-
__export(require("./yamlAST"));
|
|
16
|
-
function deprecated(name) {
|
|
17
|
-
return function () {
|
|
18
|
-
throw new Error('Function ' + name + ' is deprecated and cannot be used.');
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
__export(require("./scalarInference"));
|
|
22
|
-
//# sourceMappingURL=index.js.map
|