quicktype-core 23.0.151 → 23.0.153
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.
- package/dist/Run.d.ts +4 -4
- package/dist/Type.d.ts +1 -1
- package/dist/input/io/NodeIO.js +7 -2
- package/package.json +1 -1
package/dist/Run.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export declare const inferenceFlagsObject: {
|
|
|
35
35
|
description: string;
|
|
36
36
|
negationDescription: string;
|
|
37
37
|
explanation: string;
|
|
38
|
-
stringType: "
|
|
38
|
+
stringType: "time" | "date" | "date-time" | "uuid" | "uri" | "integer-string" | "bool-string";
|
|
39
39
|
order: number;
|
|
40
40
|
};
|
|
41
41
|
/** Whether to assume that JSON strings that look like dates are dates */
|
|
@@ -43,7 +43,7 @@ export declare const inferenceFlagsObject: {
|
|
|
43
43
|
description: string;
|
|
44
44
|
negationDescription: string;
|
|
45
45
|
explanation: string;
|
|
46
|
-
stringType: "
|
|
46
|
+
stringType: "time" | "date" | "date-time" | "uuid" | "uri" | "integer-string" | "bool-string";
|
|
47
47
|
order: number;
|
|
48
48
|
};
|
|
49
49
|
/** Whether to convert stringified integers to integers */
|
|
@@ -51,7 +51,7 @@ export declare const inferenceFlagsObject: {
|
|
|
51
51
|
description: string;
|
|
52
52
|
negationDescription: string;
|
|
53
53
|
explanation: string;
|
|
54
|
-
stringType: "
|
|
54
|
+
stringType: "time" | "date" | "date-time" | "uuid" | "uri" | "integer-string" | "bool-string";
|
|
55
55
|
order: number;
|
|
56
56
|
};
|
|
57
57
|
/** Whether to convert stringified booleans to boolean values */
|
|
@@ -59,7 +59,7 @@ export declare const inferenceFlagsObject: {
|
|
|
59
59
|
description: string;
|
|
60
60
|
negationDescription: string;
|
|
61
61
|
explanation: string;
|
|
62
|
-
stringType: "
|
|
62
|
+
stringType: "time" | "date" | "date-time" | "uuid" | "uri" | "integer-string" | "bool-string";
|
|
63
63
|
order: number;
|
|
64
64
|
};
|
|
65
65
|
/** Combine similar classes. This doesn't apply to classes from a schema, only from inference. */
|
package/dist/Type.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ export type PrimitiveTypeKind = PrimitiveNonStringTypeKind | PrimitiveStringType
|
|
|
55
55
|
export type NamedTypeKind = "class" | "enum" | "union";
|
|
56
56
|
export type TypeKind = PrimitiveTypeKind | NamedTypeKind | "array" | "object" | "map" | "intersection";
|
|
57
57
|
export type ObjectTypeKind = "object" | "map" | "class";
|
|
58
|
-
export declare const transformedStringTypeKinds: ReadonlySet<"
|
|
58
|
+
export declare const transformedStringTypeKinds: ReadonlySet<"time" | "date" | "date-time" | "uuid" | "uri" | "integer-string" | "bool-string">;
|
|
59
59
|
export declare function isPrimitiveStringTypeKind(kind: string): kind is PrimitiveStringTypeKind;
|
|
60
60
|
export declare function targetTypeKindForTransformedStringTypeKind(kind: PrimitiveStringTypeKind): PrimitiveNonStringTypeKind | undefined;
|
|
61
61
|
export declare function isNumberTypeKind(kind: TypeKind): kind is "integer" | "double";
|
package/dist/input/io/NodeIO.js
CHANGED
|
@@ -31,16 +31,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
31
31
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
+
};
|
|
34
37
|
var _a;
|
|
35
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
39
|
exports.readFromFileOrURL = exports.readableFromFileOrURL = void 0;
|
|
37
40
|
const fs = __importStar(require("fs"));
|
|
41
|
+
const ts_necessities_1 = require("@glideapps/ts-necessities");
|
|
38
42
|
const browser_or_node_1 = require("browser-or-node");
|
|
43
|
+
const cross_fetch_1 = __importDefault(require("cross-fetch"));
|
|
39
44
|
const get_stream_1 = require("./get-stream");
|
|
40
|
-
const ts_necessities_1 = require("@glideapps/ts-necessities");
|
|
41
45
|
const index_1 = require("../../index");
|
|
42
46
|
const isURL = require("is-url");
|
|
43
|
-
|
|
47
|
+
// Only use cross-fetch in CI
|
|
48
|
+
const fetch = process.env.CI ? cross_fetch_1.default : (_a = global.fetch) !== null && _a !== void 0 ? _a : cross_fetch_1.default;
|
|
44
49
|
function parseHeaders(httpHeaders) {
|
|
45
50
|
if (!Array.isArray(httpHeaders)) {
|
|
46
51
|
return {};
|