From 2acdd2a78f181312804723af2549a2ee3e93fd30 Mon Sep 17 00:00:00 2001 From: Ritesh Kumar Date: Wed, 19 Feb 2020 14:24:34 +0530 Subject: [PATCH] fixes --- patches/json-schema-to-typescript+8.0.0.patch | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 patches/json-schema-to-typescript+8.0.0.patch diff --git a/patches/json-schema-to-typescript+8.0.0.patch b/patches/json-schema-to-typescript+8.0.0.patch new file mode 100644 index 0000000..7a05aa1 --- /dev/null +++ b/patches/json-schema-to-typescript+8.0.0.patch @@ -0,0 +1,48 @@ +diff --git a/node_modules/json-schema-to-typescript/dist/src/formatter.js b/node_modules/json-schema-to-typescript/dist/src/formatter.js +index 1c2c709..ccc647b 100644 +--- a/node_modules/json-schema-to-typescript/dist/src/formatter.js ++++ b/node_modules/json-schema-to-typescript/dist/src/formatter.js +@@ -11,9 +11,8 @@ var __assign = (this && this.__assign) || function () { + return __assign.apply(this, arguments); + }; + Object.defineProperty(exports, "__esModule", { value: true }); +-var prettier_1 = require("prettier"); + function format(code, options) { +- return prettier_1.format(code, __assign({ parser: 'typescript' }, options.style)); ++ return code; + } + exports.format = format; + //# sourceMappingURL=formatter.js.map +diff --git a/node_modules/json-schema-to-typescript/dist/src/index.js b/node_modules/json-schema-to-typescript/dist/src/index.js +index 068d6dc..b7c5ac9 100644 +--- a/node_modules/json-schema-to-typescript/dist/src/index.js ++++ b/node_modules/json-schema-to-typescript/dist/src/index.js +@@ -59,9 +59,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) { + } + }; + Object.defineProperty(exports, "__esModule", { value: true }); +-var fs_1 = require("fs"); + var lodash_1 = require("lodash"); +-var path_1 = require("path"); + var formatter_1 = require("./formatter"); + var generator_1 = require("./generator"); + var normalizer_1 = require("./normalizer"); +@@ -88,17 +86,7 @@ exports.DEFAULT_OPTIONS = { + }, + unreachableDefinitions: false + }; +-function compileFromFile(filename, options) { +- if (options === void 0) { options = exports.DEFAULT_OPTIONS; } +- var contents = utils_1.Try(function () { return fs_1.readFileSync(filename); }, function () { +- throw new ReferenceError("Unable to read file \"" + filename + "\""); +- }); +- var schema = utils_1.Try(function () { return JSON.parse(contents.toString()); }, function () { +- throw new TypeError("Error parsing JSON in file \"" + filename + "\""); +- }); +- return compile(schema, utils_1.stripExtension(filename), __assign({ cwd: path_1.dirname(filename) }, options)); +-} +-exports.compileFromFile = compileFromFile; ++ + function compile(schema, name, options) { + if (options === void 0) { options = {}; } + return __awaiter(this, void 0, void 0, function () {