@redocly/cli
Version:
[@Redocly](https://redocly.com) CLI is your all-in-one OpenAPI utility. It builds, manages, improves, and quality-checks your OpenAPI descriptions, all of which comes in handy for various phases of the API Lifecycle. Create your own rulesets to make API g
25 lines (24 loc) • 1.67 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.formatPath = exports.saveBundle = exports.checkForDeprecatedOptions = exports.writeToFileByExtension = exports.getAndValidateFileExtension = exports.sortTopLevelKeysForOas = exports.checkIfRulesetExist = exports.loadConfigAndHandleErrors = exports.writeYaml = exports.exitWithError = exports.handleError = exports.getOutputFileName = exports.printLintTotals = exports.printUnusedWarnings = exports.printExecutionTime = exports.getExecutionTime = exports.pluralize = exports.slash = exports.dumpBundle = exports.getFallbackApisOrExit = void 0;
const config_1 = require("../../__tests__/fixtures/config");
exports.getFallbackApisOrExit = jest.fn((entrypoints) => entrypoints.map((path) => ({ path })));
exports.dumpBundle = jest.fn(() => '');
exports.slash = jest.fn();
exports.pluralize = jest.fn();
exports.getExecutionTime = jest.fn();
exports.printExecutionTime = jest.fn();
exports.printUnusedWarnings = jest.fn();
exports.printLintTotals = jest.fn();
exports.getOutputFileName = jest.fn(() => ({ outputFile: 'test.yaml', ext: 'yaml' }));
exports.handleError = jest.fn();
exports.exitWithError = jest.fn();
exports.writeYaml = jest.fn();
exports.loadConfigAndHandleErrors = jest.fn(() => config_1.ConfigFixture);
exports.checkIfRulesetExist = jest.fn();
exports.sortTopLevelKeysForOas = jest.fn((document) => document);
exports.getAndValidateFileExtension = jest.fn((fileName) => fileName.split('.').pop());
exports.writeToFileByExtension = jest.fn();
exports.checkForDeprecatedOptions = jest.fn();
exports.saveBundle = jest.fn();
exports.formatPath = jest.fn((path) => path);