quicktype-core 23.3.16 → 23.3.18
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.fetch = void 0;
|
|
4
|
-
|
|
4
|
+
// No logging here: this module runs at import time, and anything written to
|
|
5
|
+
// stdout corrupts redirected CLI output (issue #2874).
|
|
5
6
|
exports.fetch = require("cross-fetch").default;
|
package/dist/input/io/NodeIO.js
CHANGED
|
@@ -55,7 +55,7 @@ const is_url_1 = __importDefault(require("is-url"));
|
|
|
55
55
|
const Messages_1 = require("../../Messages");
|
|
56
56
|
const Support_1 = require("../../support/Support");
|
|
57
57
|
const get_stream_1 = require("./get-stream");
|
|
58
|
-
const
|
|
58
|
+
const _fetch_1 = require("./$fetch");
|
|
59
59
|
function parseHeaders(httpHeaders) {
|
|
60
60
|
if (!Array.isArray(httpHeaders)) {
|
|
61
61
|
return {};
|
|
@@ -87,7 +87,7 @@ function readableFromFileOrURL(fileOrURL, httpHeaders) {
|
|
|
87
87
|
return __awaiter(this, void 0, void 0, function* () {
|
|
88
88
|
try {
|
|
89
89
|
if ((0, is_url_1.default)(fileOrURL)) {
|
|
90
|
-
const response = yield (0,
|
|
90
|
+
const response = yield (0, _fetch_1.fetch)(fileOrURL, {
|
|
91
91
|
headers: parseHeaders(httpHeaders),
|
|
92
92
|
});
|
|
93
93
|
return (0, ts_necessities_1.defined)(response.body);
|
|
@@ -323,7 +323,8 @@ class DartRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
|
|
|
323
323
|
!this._options.requiredProperties &&
|
|
324
324
|
(transformedStringType.isNullable || isNullable)) {
|
|
325
325
|
return [
|
|
326
|
-
|
|
326
|
+
dynamic,
|
|
327
|
+
' == null ? null : "${',
|
|
327
328
|
dynamic,
|
|
328
329
|
"!.year.toString().padLeft(4, '0')",
|
|
329
330
|
"}-${",
|