js-yaml/000755 001751 000177 0000000000 14522514440014110 5ustar00runner000000 000000 1452251444014522514440js-yaml/LICENSE000644 001751 000177 0000002165 14522514440015121 0ustar00runner000000 000000 1452251444014522514440 MIT License Copyright (c) Microsoft Corporation. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE js-yaml/README.md000644 001751 000177 0000001226 14522514440015403 0ustar00runner000000 000000 1452251577414522514440# Installation > `npm install --save @types/js-yaml` # Summary This package contains type definitions for js-yaml (https://github.com/nodeca/js-yaml). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/js-yaml. ### Additional Details * Last updated: Tue, 07 Nov 2023 20:08:00 GMT * Dependencies: none # Credits These definitions were written by [Bart van der Schoor](https://github.com/Bartvds), [Sebastian Clausen](https://github.com/sclausen), [ExE Boss](https://github.com/ExE-Boss), [Armaan Tobaccowalla](https://github.com/ArmaanT), and [Linus Unnebäck](https://github.com/LinusU). js-yaml/index.d.mts000644 001751 000177 0000000102 14522514440016157 0ustar00runner000000 000000 1452251444014522514440export * from "./index.js"; export { default } from "./index.js"; js-yaml/index.d.ts000644 001751 000177 0000013020 14522514440016005 0ustar00runner000000 000000 1452251444014522514440export as namespace jsyaml; export function load(str: string, opts?: LoadOptions): unknown; export class Type { constructor(tag: string, opts?: TypeConstructorOptions); kind: "sequence" | "scalar" | "mapping" | null; resolve(data: any): boolean; construct(data: any, type?: string): any; instanceOf: object | null; predicate: ((data: object) => boolean) | null; represent: ((data: object) => any) | { [x: string]: (data: object) => any } | null; representName: ((data: object) => any) | null; defaultStyle: string | null; multi: boolean; styleAliases: { [x: string]: any }; } export class Schema { constructor(definition: SchemaDefinition | Type[] | Type); extend(types: SchemaDefinition | Type[] | Type): Schema; } export function loadAll(str: string, iterator?: null, opts?: LoadOptions): unknown[]; export function loadAll(str: string, iterator: (doc: unknown) => void, opts?: LoadOptions): void; export function dump(obj: any, opts?: DumpOptions): string; export interface LoadOptions { /** string to be used as a file path in error/warning messages. */ filename?: string | undefined; /** function to call on warning messages. */ onWarning?(this: null, e: YAMLException): void; /** specifies a schema to use. */ schema?: Schema | undefined; /** compatibility with JSON.parse behaviour. */ json?: boolean | undefined; /** listener for parse events */ listener?(this: State, eventType: EventType, state: State): void; } export type EventType = "open" | "close"; export interface State { input: string; filename: string | null; schema: Schema; onWarning: (this: null, e: YAMLException) => void; json: boolean; length: number; position: number; line: number; lineStart: number; lineIndent: number; version: null | number; checkLineBreaks: boolean; kind: string; result: any; implicitTypes: Type[]; } export interface DumpOptions { /** indentation width to use (in spaces). */ indent?: number | undefined; /** when true, will not add an indentation level to array elements */ noArrayIndent?: boolean | undefined; /** do not throw on invalid types (like function in the safe schema) and skip pairs and single values with such types. */ skipInvalid?: boolean | undefined; /** specifies level of nesting, when to switch from block to flow style for collections. -1 means block style everwhere */ flowLevel?: number | undefined; /** Each tag may have own set of styles. - "tag" => "style" map. */ styles?: { [x: string]: any } | undefined; /** specifies a schema to use. */ schema?: Schema | undefined; /** if true, sort keys when dumping YAML. If a function, use the function to sort the keys. (default: false) */ sortKeys?: boolean | ((a: any, b: any) => number) | undefined; /** set max line width. (default: 80) */ lineWidth?: number | undefined; /** if true, don't convert duplicate objects into references (default: false) */ noRefs?: boolean | undefined; /** if true don't try to be compatible with older yaml versions. Currently: don't quote "yes", "no" and so on, as required for YAML 1.1 (default: false) */ noCompatMode?: boolean | undefined; /** * if true flow sequences will be condensed, omitting the space between `key: value` or `a, b`. Eg. `'[a,b]'` or `{a:{b:c}}`. * Can be useful when using yaml for pretty URL query params as spaces are %-encoded. (default: false). */ condenseFlow?: boolean | undefined; /** strings will be quoted using this quoting style. If you specify single quotes, double quotes will still be used for non-printable characters. (default: `'`) */ quotingType?: "'" | "\"" | undefined; /** if true, all non-key strings will be quoted even if they normally don't need to. (default: false) */ forceQuotes?: boolean | undefined; /** callback `function (key, value)` called recursively on each key/value in source object (see `replacer` docs for `JSON.stringify`). */ replacer?: ((key: string, value: any) => any) | undefined; } export interface TypeConstructorOptions { kind?: "sequence" | "scalar" | "mapping" | undefined; resolve?: ((data: any) => boolean) | undefined; construct?: ((data: any, type?: string) => any) | undefined; instanceOf?: object | undefined; predicate?: ((data: object) => boolean) | undefined; represent?: ((data: object) => any) | { [x: string]: (data: object) => any } | undefined; representName?: ((data: object) => any) | undefined; defaultStyle?: string | undefined; multi?: boolean | undefined; styleAliases?: { [x: string]: any } | undefined; } export interface SchemaDefinition { implicit?: Type[] | undefined; explicit?: Type[] | undefined; } /** only strings, arrays and plain objects: http://www.yaml.org/spec/1.2/spec.html#id2802346 */ export let FAILSAFE_SCHEMA: Schema; /** only strings, arrays and plain objects: http://www.yaml.org/spec/1.2/spec.html#id2802346 */ export let JSON_SCHEMA: Schema; /** same as JSON_SCHEMA: http://www.yaml.org/spec/1.2/spec.html#id2804923 */ export let CORE_SCHEMA: Schema; /** all supported YAML types */ export let DEFAULT_SCHEMA: Schema; export interface Mark { buffer: string; column: number; line: number; name: string; position: number; snippet: string; } export class YAMLException extends Error { constructor(reason?: string, mark?: Mark); toString(compact?: boolean): string; name: string; reason: string; message: string; mark: Mark; } js-yaml/package.json000644 001751 000177 0000003103 14522514440016406 0ustar00runner000000 000000 1452251577414522514440{ "name": "@types/js-yaml", "version": "4.0.9", "description": "TypeScript definitions for js-yaml", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/js-yaml", "license": "MIT", "contributors": [ { "name": "Bart van der Schoor", "githubUsername": "Bartvds", "url": "https://github.com/Bartvds" }, { "name": "Sebastian Clausen", "githubUsername": "sclausen", "url": "https://github.com/sclausen" }, { "name": "ExE Boss", "githubUsername": "ExE-Boss", "url": "https://github.com/ExE-Boss" }, { "name": "Armaan Tobaccowalla", "githubUsername": "ArmaanT", "url": "https://github.com/ArmaanT" }, { "name": "Linus Unnebäck", "githubUsername": "LinusU", "url": "https://github.com/LinusU" } ], "main": "", "types": "index.d.ts", "exports": { ".": { "types": { "import": "./index.d.mts", "default": "./index.d.ts" } }, "./package.json": "./package.json" }, "repository": { "type": "git", "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", "directory": "types/js-yaml" }, "scripts": {}, "dependencies": {}, "typesPublisherContentHash": "d8ef94de3166b3cc8a3ce9c4fe2d001ec5dd7eaa19d30e651fbf4b505454972d", "typeScriptVersion": "4.5" }