mirror of
https://github.com/ritz078/transform.git
synced 2026-11-25 10:14:22 +03:00
fixes
This commit is contained in:
1 parent
5c65f3bfc6
commit
08cdd0e7c3
1 file changed
+48
@@ -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 c3e750a..0acfe57 100644
|
||||
--- a/node_modules/json-schema-to-typescript/dist/src/index.js
|
||||
+++ b/node_modules/json-schema-to-typescript/dist/src/index.js
|
||||
@@ -60,9 +60,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");
|
||||
@@ -91,17 +89,7 @@ exports.DEFAULT_OPTIONS = {
|
||||
unreachableDefinitions: false,
|
||||
unknownAny: true
|
||||
};
|
||||
-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 () {
|
||||
Reference in new issue
Block a user