@brianbuie/node-kit 0.8.0 → 0.9.1
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/LICENSE +15 -0
- package/README.md +18 -6
- package/package.json +7 -7
- package/src/Cache.ts +1 -1
- package/src/Dir.test.ts +1 -1
- package/src/Dir.ts +1 -1
- package/src/Fetcher.test.ts +1 -1
- package/src/File.test.ts +34 -30
- package/src/File.ts +56 -41
- package/src/Log.test.ts +1 -1
- package/src/Log.ts +1 -1
- package/src/TypeWriter.test.ts +1 -1
- package/src/index.ts +8 -8
- package/src/snapshot.test.ts +2 -2
- package/src/timeout.test.ts +1 -1
- package/dist/Cache.d.ts +0 -16
- package/dist/Cache.js +0 -26
- package/dist/Dir.d.ts +0 -44
- package/dist/Dir.js +0 -64
- package/dist/Fetcher.d.ts +0 -65
- package/dist/Fetcher.js +0 -111
- package/dist/File.d.ts +0 -53
- package/dist/File.js +0 -170
- package/dist/Log.d.ts +0 -43
- package/dist/Log.js +0 -80
- package/dist/TypeWriter.d.ts +0 -452
- package/dist/TypeWriter.js +0 -42
- package/dist/index.d.ts +0 -8
- package/dist/index.js +0 -8
- package/dist/snapshot.d.ts +0 -5
- package/dist/snapshot.js +0 -38
- package/dist/timeout.d.ts +0 -1
- package/dist/timeout.js +0 -5
package/dist/TypeWriter.d.ts
DELETED
|
@@ -1,452 +0,0 @@
|
|
|
1
|
-
import * as qt from 'quicktype-core';
|
|
2
|
-
export declare class TypeWriter {
|
|
3
|
-
moduleName: string;
|
|
4
|
-
input: qt.JSONInput<string>;
|
|
5
|
-
outDir: string;
|
|
6
|
-
qtSettings: {
|
|
7
|
-
lang: string;
|
|
8
|
-
rendererOptions: {
|
|
9
|
-
'just-types': boolean;
|
|
10
|
-
'prefer-types': boolean;
|
|
11
|
-
};
|
|
12
|
-
inferEnums: boolean;
|
|
13
|
-
inferDateTimes: boolean;
|
|
14
|
-
} & {
|
|
15
|
-
allPropertiesOptional?: boolean | undefined;
|
|
16
|
-
alphabetizeProperties?: boolean | undefined;
|
|
17
|
-
checkProvenance?: boolean | undefined;
|
|
18
|
-
debugPrintGatherNames?: boolean | undefined;
|
|
19
|
-
debugPrintGraph?: boolean | undefined;
|
|
20
|
-
debugPrintReconstitution?: boolean | undefined;
|
|
21
|
-
debugPrintSchemaResolving?: boolean | undefined;
|
|
22
|
-
debugPrintTimes?: boolean | undefined;
|
|
23
|
-
debugPrintTransformations?: boolean | undefined;
|
|
24
|
-
fixedTopLevels?: boolean | undefined;
|
|
25
|
-
indentation?: string | undefined;
|
|
26
|
-
inputData?: qt.InputData | undefined;
|
|
27
|
-
lang?: "cjson" | "cJSON" | "c++" | "cpp" | "cplusplus" | "crystal" | "cr" | "crystallang" | "cs" | "csharp" | "dart" | "elixir" | "elm" | "flow" | "go" | "golang" | "haskell" | "java" | "javascript" | "js" | "jsx" | "javascript-prop-types" | "schema" | "json-schema" | "kotlin" | "objc" | "objective-c" | "objectivec" | "php" | "pike" | "pikelang" | "python" | "py" | "ruby" | "rust" | "rs" | "rustlang" | "scala3" | "smithy4a" | "swift" | "swift4" | "typescript" | "ts" | "tsx" | "typescript-effect-schema" | "typescript-zod" | qt.TargetLanguage<import("quicktype-core/dist/TargetLanguage.js").LanguageConfig> | undefined;
|
|
28
|
-
leadingComments?: import("quicktype-core/dist/support/Comments.js").Comment[] | undefined;
|
|
29
|
-
noRender?: boolean | undefined;
|
|
30
|
-
outputFilename?: string | undefined;
|
|
31
|
-
rendererOptions?: qt.RendererOptions<"cjson" | "cJSON" | "c++" | "cpp" | "cplusplus" | "crystal" | "cr" | "crystallang" | "cs" | "csharp" | "dart" | "elixir" | "elm" | "flow" | "go" | "golang" | "haskell" | "java" | "javascript" | "js" | "jsx" | "javascript-prop-types" | "schema" | "json-schema" | "kotlin" | "objc" | "objective-c" | "objectivec" | "php" | "pike" | "pikelang" | "python" | "py" | "ruby" | "rust" | "rs" | "rustlang" | "scala3" | "smithy4a" | "swift" | "swift4" | "typescript" | "ts" | "tsx" | "typescript-effect-schema" | "typescript-zod", import("quicktype-core/dist/RendererOptions/types.js").OptionMap<{
|
|
32
|
-
typeSourceStyle: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"source-style", {
|
|
33
|
-
readonly "single-source": true;
|
|
34
|
-
readonly "multi-source": false;
|
|
35
|
-
}, "single-source" | "multi-source">;
|
|
36
|
-
typeIntegerSize: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"integer-size", {
|
|
37
|
-
readonly int8_t: "int8_t";
|
|
38
|
-
readonly int16_t: "int16_t";
|
|
39
|
-
readonly int32_t: "int32_t";
|
|
40
|
-
readonly int64_t: "int64_t";
|
|
41
|
-
}, "int8_t" | "int16_t" | "int32_t" | "int64_t">;
|
|
42
|
-
hashtableSize: import("quicktype-core/dist/RendererOptions/index.js").StringOption<"hashtable-size">;
|
|
43
|
-
addTypedefAlias: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"typedef-alias", {
|
|
44
|
-
readonly "no-typedef": false;
|
|
45
|
-
readonly "add-typedef": true;
|
|
46
|
-
}, "no-typedef" | "add-typedef">;
|
|
47
|
-
printStyle: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"print-style", {
|
|
48
|
-
readonly "print-formatted": false;
|
|
49
|
-
readonly "print-unformatted": true;
|
|
50
|
-
}, "print-formatted" | "print-unformatted">;
|
|
51
|
-
typeNamingStyle: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"type-style", {
|
|
52
|
-
readonly "pascal-case": "pascal";
|
|
53
|
-
readonly "underscore-case": "underscore";
|
|
54
|
-
readonly "camel-case": "camel";
|
|
55
|
-
readonly "upper-underscore-case": "upper-underscore";
|
|
56
|
-
readonly "pascal-case-upper-acronyms": "pascal-upper-acronyms";
|
|
57
|
-
readonly "camel-case-upper-acronyms": "camel-upper-acronyms";
|
|
58
|
-
}, "pascal-case" | "underscore-case" | "camel-case" | "upper-underscore-case" | "pascal-case-upper-acronyms" | "camel-case-upper-acronyms">;
|
|
59
|
-
memberNamingStyle: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"member-style", {
|
|
60
|
-
readonly "pascal-case": "pascal";
|
|
61
|
-
readonly "underscore-case": "underscore";
|
|
62
|
-
readonly "camel-case": "camel";
|
|
63
|
-
readonly "upper-underscore-case": "upper-underscore";
|
|
64
|
-
readonly "pascal-case-upper-acronyms": "pascal-upper-acronyms";
|
|
65
|
-
readonly "camel-case-upper-acronyms": "camel-upper-acronyms";
|
|
66
|
-
}, "pascal-case" | "underscore-case" | "camel-case" | "upper-underscore-case" | "pascal-case-upper-acronyms" | "camel-case-upper-acronyms">;
|
|
67
|
-
enumeratorNamingStyle: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"enumerator-style", {
|
|
68
|
-
readonly "pascal-case": "pascal";
|
|
69
|
-
readonly "underscore-case": "underscore";
|
|
70
|
-
readonly "camel-case": "camel";
|
|
71
|
-
readonly "upper-underscore-case": "upper-underscore";
|
|
72
|
-
readonly "pascal-case-upper-acronyms": "pascal-upper-acronyms";
|
|
73
|
-
readonly "camel-case-upper-acronyms": "camel-upper-acronyms";
|
|
74
|
-
}, "pascal-case" | "underscore-case" | "camel-case" | "upper-underscore-case" | "pascal-case-upper-acronyms" | "camel-case-upper-acronyms">;
|
|
75
|
-
}> | import("quicktype-core/dist/RendererOptions/types.js").OptionMap<{
|
|
76
|
-
typeSourceStyle: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"source-style", {
|
|
77
|
-
readonly "single-source": true;
|
|
78
|
-
readonly "multi-source": false;
|
|
79
|
-
}, "single-source" | "multi-source">;
|
|
80
|
-
includeLocation: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"include-location", {
|
|
81
|
-
readonly "local-include": true;
|
|
82
|
-
readonly "global-include": false;
|
|
83
|
-
}, "local-include" | "global-include">;
|
|
84
|
-
codeFormat: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"code-format", {
|
|
85
|
-
readonly "with-struct": false;
|
|
86
|
-
readonly "with-getter-setter": true;
|
|
87
|
-
}, "with-struct" | "with-getter-setter">;
|
|
88
|
-
wstring: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"wstring", {
|
|
89
|
-
readonly "use-string": false;
|
|
90
|
-
readonly "use-wstring": true;
|
|
91
|
-
}, "use-string" | "use-wstring">;
|
|
92
|
-
westConst: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"const-style", {
|
|
93
|
-
readonly "west-const": true;
|
|
94
|
-
readonly "east-const": false;
|
|
95
|
-
}, "west-const" | "east-const">;
|
|
96
|
-
justTypes: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"just-types">;
|
|
97
|
-
namespace: import("quicktype-core/dist/RendererOptions/index.js").StringOption<"namespace">;
|
|
98
|
-
enumType: import("quicktype-core/dist/RendererOptions/index.js").StringOption<"enum-type">;
|
|
99
|
-
typeNamingStyle: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"type-style", {
|
|
100
|
-
readonly "pascal-case": "pascal";
|
|
101
|
-
readonly "underscore-case": "underscore";
|
|
102
|
-
readonly "camel-case": "camel";
|
|
103
|
-
readonly "upper-underscore-case": "upper-underscore";
|
|
104
|
-
readonly "pascal-case-upper-acronyms": "pascal-upper-acronyms";
|
|
105
|
-
readonly "camel-case-upper-acronyms": "camel-upper-acronyms";
|
|
106
|
-
}, "pascal-case" | "underscore-case" | "camel-case" | "upper-underscore-case" | "pascal-case-upper-acronyms" | "camel-case-upper-acronyms">;
|
|
107
|
-
memberNamingStyle: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"member-style", {
|
|
108
|
-
readonly "pascal-case": "pascal";
|
|
109
|
-
readonly "underscore-case": "underscore";
|
|
110
|
-
readonly "camel-case": "camel";
|
|
111
|
-
readonly "upper-underscore-case": "upper-underscore";
|
|
112
|
-
readonly "pascal-case-upper-acronyms": "pascal-upper-acronyms";
|
|
113
|
-
readonly "camel-case-upper-acronyms": "camel-upper-acronyms";
|
|
114
|
-
}, "pascal-case" | "underscore-case" | "camel-case" | "upper-underscore-case" | "pascal-case-upper-acronyms" | "camel-case-upper-acronyms">;
|
|
115
|
-
enumeratorNamingStyle: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"enumerator-style", {
|
|
116
|
-
readonly "pascal-case": "pascal";
|
|
117
|
-
readonly "underscore-case": "underscore";
|
|
118
|
-
readonly "camel-case": "camel";
|
|
119
|
-
readonly "upper-underscore-case": "upper-underscore";
|
|
120
|
-
readonly "pascal-case-upper-acronyms": "pascal-upper-acronyms";
|
|
121
|
-
readonly "camel-case-upper-acronyms": "camel-upper-acronyms";
|
|
122
|
-
}, "pascal-case" | "underscore-case" | "camel-case" | "upper-underscore-case" | "pascal-case-upper-acronyms" | "camel-case-upper-acronyms">;
|
|
123
|
-
boost: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"boost">;
|
|
124
|
-
hideNullOptional: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"hide-null-optional">;
|
|
125
|
-
}> | import("quicktype-core/dist/RendererOptions/types.js").OptionMap<{}> | import("quicktype-core/dist/RendererOptions/types.js").OptionMap<{
|
|
126
|
-
readonly framework: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"framework", {
|
|
127
|
-
readonly NewtonSoft: "NewtonSoft";
|
|
128
|
-
readonly SystemTextJson: "SystemTextJson";
|
|
129
|
-
}, "NewtonSoft" | "SystemTextJson">;
|
|
130
|
-
readonly useList: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"array-type", {
|
|
131
|
-
readonly array: false;
|
|
132
|
-
readonly list: true;
|
|
133
|
-
}, "array" | "list">;
|
|
134
|
-
readonly dense: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"density", {
|
|
135
|
-
readonly normal: false;
|
|
136
|
-
readonly dense: true;
|
|
137
|
-
}, "normal" | "dense">;
|
|
138
|
-
readonly namespace: import("quicktype-core/dist/RendererOptions/index.js").StringOption<"namespace">;
|
|
139
|
-
readonly version: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"csharp-version", {
|
|
140
|
-
readonly "5": 5;
|
|
141
|
-
readonly "6": 6;
|
|
142
|
-
}, "5" | "6">;
|
|
143
|
-
readonly virtual: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"virtual">;
|
|
144
|
-
readonly typeForAny: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"any-type", {
|
|
145
|
-
readonly object: "object";
|
|
146
|
-
readonly dynamic: "dynamic";
|
|
147
|
-
}, "object" | "dynamic">;
|
|
148
|
-
readonly useDecimal: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"number-type", {
|
|
149
|
-
readonly double: false;
|
|
150
|
-
readonly decimal: true;
|
|
151
|
-
}, "decimal" | "double">;
|
|
152
|
-
readonly features: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"features", {
|
|
153
|
-
readonly complete: {
|
|
154
|
-
readonly namespaces: true;
|
|
155
|
-
readonly helpers: true;
|
|
156
|
-
readonly attributes: true;
|
|
157
|
-
};
|
|
158
|
-
readonly "attributes-only": {
|
|
159
|
-
readonly namespaces: true;
|
|
160
|
-
readonly helpers: false;
|
|
161
|
-
readonly attributes: true;
|
|
162
|
-
};
|
|
163
|
-
readonly "just-types-and-namespace": {
|
|
164
|
-
readonly namespaces: true;
|
|
165
|
-
readonly helpers: false;
|
|
166
|
-
readonly attributes: false;
|
|
167
|
-
};
|
|
168
|
-
readonly "just-types": {
|
|
169
|
-
readonly namespaces: true;
|
|
170
|
-
readonly helpers: false;
|
|
171
|
-
readonly attributes: false;
|
|
172
|
-
};
|
|
173
|
-
}, "complete" | "just-types" | "attributes-only" | "just-types-and-namespace">;
|
|
174
|
-
readonly baseclass: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"base-class", {
|
|
175
|
-
readonly EntityData: "EntityData";
|
|
176
|
-
readonly Object: undefined;
|
|
177
|
-
}, "EntityData" | "Object">;
|
|
178
|
-
readonly checkRequired: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"check-required">;
|
|
179
|
-
readonly keepPropertyName: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"keep-property-name">;
|
|
180
|
-
}> | import("quicktype-core/dist/RendererOptions/types.js").OptionMap<{
|
|
181
|
-
nullSafety: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"null-safety">;
|
|
182
|
-
justTypes: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"just-types">;
|
|
183
|
-
codersInClass: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"coders-in-class">;
|
|
184
|
-
methodNamesWithMap: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"from-map">;
|
|
185
|
-
requiredProperties: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"required-props">;
|
|
186
|
-
finalProperties: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"final-props">;
|
|
187
|
-
generateCopyWith: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"copy-with">;
|
|
188
|
-
useFreezed: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"use-freezed">;
|
|
189
|
-
useHive: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"use-hive">;
|
|
190
|
-
useJsonAnnotation: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"use-json-annotation">;
|
|
191
|
-
partName: import("quicktype-core/dist/RendererOptions/index.js").StringOption<"part-name">;
|
|
192
|
-
}> | import("quicktype-core/dist/RendererOptions/types.js").OptionMap<{
|
|
193
|
-
justTypes: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"just-types">;
|
|
194
|
-
namespace: import("quicktype-core/dist/RendererOptions/index.js").StringOption<"namespace">;
|
|
195
|
-
}> | import("quicktype-core/dist/RendererOptions/types.js").OptionMap<{
|
|
196
|
-
justTypes: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"just-types">;
|
|
197
|
-
useList: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"array-type", {
|
|
198
|
-
readonly array: false;
|
|
199
|
-
readonly list: true;
|
|
200
|
-
}, "array" | "list">;
|
|
201
|
-
moduleName: import("quicktype-core/dist/RendererOptions/index.js").StringOption<"module">;
|
|
202
|
-
}> | import("quicktype-core/dist/RendererOptions/types.js").OptionMap<{
|
|
203
|
-
acronymStyle: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"acronym-style", {
|
|
204
|
-
readonly original: import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions.Original;
|
|
205
|
-
readonly pascal: import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions.Pascal;
|
|
206
|
-
readonly camel: import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions.Camel;
|
|
207
|
-
readonly lowerCase: import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions.Lower;
|
|
208
|
-
}, import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions>;
|
|
209
|
-
runtimeTypecheck: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"runtime-typecheck">;
|
|
210
|
-
runtimeTypecheckIgnoreUnknownProperties: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"runtime-typecheck-ignore-unknown-properties">;
|
|
211
|
-
converters: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"converters", {
|
|
212
|
-
readonly "top-level": import("quicktype-core/dist/support/Converters.js").ConvertersOptions.TopLevel;
|
|
213
|
-
readonly "all-objects": import("quicktype-core/dist/support/Converters.js").ConvertersOptions.AllObjects;
|
|
214
|
-
}, import("quicktype-core/dist/support/Converters.js").ConvertersOptions>;
|
|
215
|
-
rawType: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"raw-type", {
|
|
216
|
-
readonly json: "json";
|
|
217
|
-
readonly any: "any";
|
|
218
|
-
}, "json" | "any">;
|
|
219
|
-
} & {
|
|
220
|
-
justTypes: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"just-types">;
|
|
221
|
-
nicePropertyNames: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"nice-property-names">;
|
|
222
|
-
declareUnions: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"explicit-unions">;
|
|
223
|
-
preferUnions: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"prefer-unions">;
|
|
224
|
-
preferTypes: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"prefer-types">;
|
|
225
|
-
preferConstValues: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"prefer-const-values">;
|
|
226
|
-
readonly: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"readonly">;
|
|
227
|
-
}> | import("quicktype-core/dist/RendererOptions/types.js").OptionMap<{
|
|
228
|
-
justTypes: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"just-types">;
|
|
229
|
-
justTypesAndPackage: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"just-types-and-package">;
|
|
230
|
-
packageName: import("quicktype-core/dist/RendererOptions/index.js").StringOption<"package">;
|
|
231
|
-
multiFileOutput: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"multi-file-output">;
|
|
232
|
-
fieldTags: import("quicktype-core/dist/RendererOptions/index.js").StringOption<"field-tags">;
|
|
233
|
-
omitEmpty: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"omit-empty">;
|
|
234
|
-
}> | import("quicktype-core/dist/RendererOptions/types.js").OptionMap<{
|
|
235
|
-
justTypes: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"just-types">;
|
|
236
|
-
useList: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"array-type", {
|
|
237
|
-
readonly array: false;
|
|
238
|
-
readonly list: true;
|
|
239
|
-
}, "array" | "list">;
|
|
240
|
-
moduleName: import("quicktype-core/dist/RendererOptions/index.js").StringOption<"module">;
|
|
241
|
-
}> | import("quicktype-core/dist/RendererOptions/types.js").OptionMap<{
|
|
242
|
-
useList: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"array-type", {
|
|
243
|
-
readonly array: false;
|
|
244
|
-
readonly list: true;
|
|
245
|
-
}, "array" | "list">;
|
|
246
|
-
justTypes: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"just-types">;
|
|
247
|
-
dateTimeProvider: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"datetime-provider", {
|
|
248
|
-
readonly java8: "java8";
|
|
249
|
-
readonly legacy: "legacy";
|
|
250
|
-
}, "java8" | "legacy">;
|
|
251
|
-
acronymStyle: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"acronym-style", {
|
|
252
|
-
readonly original: import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions.Original;
|
|
253
|
-
readonly pascal: import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions.Pascal;
|
|
254
|
-
readonly camel: import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions.Camel;
|
|
255
|
-
readonly lowerCase: import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions.Lower;
|
|
256
|
-
}, import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions>;
|
|
257
|
-
packageName: import("quicktype-core/dist/RendererOptions/index.js").StringOption<"package">;
|
|
258
|
-
lombok: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"lombok">;
|
|
259
|
-
lombokCopyAnnotations: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"lombok-copy-annotations">;
|
|
260
|
-
}> | import("quicktype-core/dist/RendererOptions/types.js").OptionMap<{
|
|
261
|
-
acronymStyle: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"acronym-style", {
|
|
262
|
-
readonly original: import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions.Original;
|
|
263
|
-
readonly pascal: import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions.Pascal;
|
|
264
|
-
readonly camel: import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions.Camel;
|
|
265
|
-
readonly lowerCase: import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions.Lower;
|
|
266
|
-
}, import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions>;
|
|
267
|
-
runtimeTypecheck: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"runtime-typecheck">;
|
|
268
|
-
runtimeTypecheckIgnoreUnknownProperties: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"runtime-typecheck-ignore-unknown-properties">;
|
|
269
|
-
converters: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"converters", {
|
|
270
|
-
readonly "top-level": import("quicktype-core/dist/support/Converters.js").ConvertersOptions.TopLevel;
|
|
271
|
-
readonly "all-objects": import("quicktype-core/dist/support/Converters.js").ConvertersOptions.AllObjects;
|
|
272
|
-
}, import("quicktype-core/dist/support/Converters.js").ConvertersOptions>;
|
|
273
|
-
rawType: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"raw-type", {
|
|
274
|
-
readonly json: "json";
|
|
275
|
-
readonly any: "any";
|
|
276
|
-
}, "json" | "any">;
|
|
277
|
-
}> | import("quicktype-core/dist/RendererOptions/types.js").OptionMap<{
|
|
278
|
-
acronymStyle: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"acronym-style", {
|
|
279
|
-
readonly original: import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions.Original;
|
|
280
|
-
readonly pascal: import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions.Pascal;
|
|
281
|
-
readonly camel: import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions.Camel;
|
|
282
|
-
readonly lowerCase: import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions.Lower;
|
|
283
|
-
}, import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions>;
|
|
284
|
-
converters: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"converters", {
|
|
285
|
-
readonly "top-level": import("quicktype-core/dist/support/Converters.js").ConvertersOptions.TopLevel;
|
|
286
|
-
readonly "all-objects": import("quicktype-core/dist/support/Converters.js").ConvertersOptions.AllObjects;
|
|
287
|
-
}, import("quicktype-core/dist/support/Converters.js").ConvertersOptions>;
|
|
288
|
-
moduleSystem: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"module-system", {
|
|
289
|
-
readonly "common-js": false;
|
|
290
|
-
readonly es6: true;
|
|
291
|
-
}, "common-js" | "es6">;
|
|
292
|
-
}> | import("quicktype-core/dist/RendererOptions/types.js").OptionMap<{
|
|
293
|
-
framework: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"framework", {
|
|
294
|
-
readonly "just-types": "None";
|
|
295
|
-
readonly jackson: "Jackson";
|
|
296
|
-
readonly klaxon: "Klaxon";
|
|
297
|
-
readonly kotlinx: "KotlinX";
|
|
298
|
-
}, "just-types" | "jackson" | "klaxon" | "kotlinx">;
|
|
299
|
-
acronymStyle: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"acronym-style", {
|
|
300
|
-
readonly original: import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions.Original;
|
|
301
|
-
readonly pascal: import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions.Pascal;
|
|
302
|
-
readonly camel: import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions.Camel;
|
|
303
|
-
readonly lowerCase: import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions.Lower;
|
|
304
|
-
}, import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions>;
|
|
305
|
-
packageName: import("quicktype-core/dist/RendererOptions/index.js").StringOption<"package">;
|
|
306
|
-
}> | import("quicktype-core/dist/RendererOptions/types.js").OptionMap<{
|
|
307
|
-
features: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"features", {
|
|
308
|
-
readonly all: {
|
|
309
|
-
readonly interface: true;
|
|
310
|
-
readonly implementation: true;
|
|
311
|
-
};
|
|
312
|
-
readonly interface: {
|
|
313
|
-
readonly interface: true;
|
|
314
|
-
readonly implementation: false;
|
|
315
|
-
};
|
|
316
|
-
readonly implementation: {
|
|
317
|
-
readonly interface: false;
|
|
318
|
-
readonly implementation: true;
|
|
319
|
-
};
|
|
320
|
-
}, "all" | "interface" | "implementation">;
|
|
321
|
-
justTypes: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"just-types">;
|
|
322
|
-
marshallingFunctions: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"functions">;
|
|
323
|
-
classPrefix: import("quicktype-core/dist/RendererOptions/index.js").StringOption<"class-prefix">;
|
|
324
|
-
extraComments: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"extra-comments">;
|
|
325
|
-
}> | import("quicktype-core/dist/RendererOptions/types.js").OptionMap<{
|
|
326
|
-
withGet: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"with-get">;
|
|
327
|
-
fastGet: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"fast-get">;
|
|
328
|
-
withSet: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"with-set">;
|
|
329
|
-
withClosing: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"with-closing">;
|
|
330
|
-
acronymStyle: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"acronym-style", {
|
|
331
|
-
readonly original: import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions.Original;
|
|
332
|
-
readonly pascal: import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions.Pascal;
|
|
333
|
-
readonly camel: import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions.Camel;
|
|
334
|
-
readonly lowerCase: import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions.Lower;
|
|
335
|
-
}, import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions>;
|
|
336
|
-
}> | import("quicktype-core/dist/RendererOptions/types.js").OptionMap<{
|
|
337
|
-
features: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"python-version", {
|
|
338
|
-
readonly "3.5": {
|
|
339
|
-
readonly typeHints: false;
|
|
340
|
-
readonly dataClasses: false;
|
|
341
|
-
};
|
|
342
|
-
readonly "3.6": {
|
|
343
|
-
readonly typeHints: true;
|
|
344
|
-
readonly dataClasses: false;
|
|
345
|
-
};
|
|
346
|
-
readonly "3.7": {
|
|
347
|
-
readonly typeHints: true;
|
|
348
|
-
readonly dataClasses: true;
|
|
349
|
-
};
|
|
350
|
-
}, "3.5" | "3.6" | "3.7">;
|
|
351
|
-
justTypes: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"just-types">;
|
|
352
|
-
nicePropertyNames: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"nice-property-names">;
|
|
353
|
-
pydanticBaseModel: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"pydantic-base-model">;
|
|
354
|
-
}> | import("quicktype-core/dist/RendererOptions/types.js").OptionMap<{
|
|
355
|
-
justTypes: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"just-types">;
|
|
356
|
-
strictness: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"strictness", {
|
|
357
|
-
readonly strict: import("quicktype-core/dist/language/Ruby/utils.js").Strictness.Strict;
|
|
358
|
-
readonly coercible: import("quicktype-core/dist/language/Ruby/utils.js").Strictness.Coercible;
|
|
359
|
-
readonly none: import("quicktype-core/dist/language/Ruby/utils.js").Strictness.None;
|
|
360
|
-
}, "none" | "strict" | "coercible">;
|
|
361
|
-
namespace: import("quicktype-core/dist/RendererOptions/index.js").StringOption<"namespace">;
|
|
362
|
-
}> | import("quicktype-core/dist/RendererOptions/types.js").OptionMap<{
|
|
363
|
-
readonly density: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"density", {
|
|
364
|
-
readonly normal: import("quicktype-core/dist/language/Rust/utils.js").Density.Normal;
|
|
365
|
-
readonly dense: import("quicktype-core/dist/language/Rust/utils.js").Density.Dense;
|
|
366
|
-
}, "normal" | "dense">;
|
|
367
|
-
readonly visibility: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"visibility", {
|
|
368
|
-
readonly private: import("quicktype-core/dist/language/Rust/utils.js").Visibility.Private;
|
|
369
|
-
readonly crate: import("quicktype-core/dist/language/Rust/utils.js").Visibility.Crate;
|
|
370
|
-
readonly public: import("quicktype-core/dist/language/Rust/utils.js").Visibility.Public;
|
|
371
|
-
}, "private" | "public" | "crate">;
|
|
372
|
-
readonly deriveDebug: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"derive-debug">;
|
|
373
|
-
readonly deriveClone: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"derive-clone">;
|
|
374
|
-
readonly derivePartialEq: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"derive-partial-eq">;
|
|
375
|
-
readonly skipSerializingNone: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"skip-serializing-none">;
|
|
376
|
-
readonly edition2018: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"edition-2018">;
|
|
377
|
-
readonly leadingComments: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"leading-comments">;
|
|
378
|
-
}> | import("quicktype-core/dist/RendererOptions/types.js").OptionMap<{
|
|
379
|
-
framework: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"framework", {
|
|
380
|
-
readonly "just-types": "None";
|
|
381
|
-
readonly circe: "Circe";
|
|
382
|
-
readonly upickle: "Upickle";
|
|
383
|
-
}, "just-types" | "circe" | "upickle">;
|
|
384
|
-
packageName: import("quicktype-core/dist/RendererOptions/index.js").StringOption<"package">;
|
|
385
|
-
}> | import("quicktype-core/dist/RendererOptions/types.js").OptionMap<{
|
|
386
|
-
framework: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"framework", {
|
|
387
|
-
readonly "just-types": import("quicktype-core/dist/language/Smithy4s/language.js").Framework;
|
|
388
|
-
}, "just-types">;
|
|
389
|
-
packageName: import("quicktype-core/dist/RendererOptions/index.js").StringOption<"package">;
|
|
390
|
-
}> | import("quicktype-core/dist/RendererOptions/types.js").OptionMap<{
|
|
391
|
-
justTypes: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"just-types">;
|
|
392
|
-
convenienceInitializers: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"initializers">;
|
|
393
|
-
explicitCodingKeys: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"coding-keys">;
|
|
394
|
-
codingKeysProtocol: import("quicktype-core/dist/RendererOptions/index.js").StringOption<"coding-keys-protocol">;
|
|
395
|
-
alamofire: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"alamofire">;
|
|
396
|
-
namedTypePrefix: import("quicktype-core/dist/RendererOptions/index.js").StringOption<"type-prefix">;
|
|
397
|
-
useClasses: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"struct-or-class", {
|
|
398
|
-
readonly struct: false;
|
|
399
|
-
readonly class: true;
|
|
400
|
-
}, "class" | "struct">;
|
|
401
|
-
mutableProperties: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"mutable-properties">;
|
|
402
|
-
acronymStyle: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"acronym-style", {
|
|
403
|
-
readonly original: import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions.Original;
|
|
404
|
-
readonly pascal: import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions.Pascal;
|
|
405
|
-
readonly camel: import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions.Camel;
|
|
406
|
-
readonly lowerCase: import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions.Lower;
|
|
407
|
-
}, import("quicktype-core/dist/support/Acronyms.js").AcronymStyleOptions>;
|
|
408
|
-
dense: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"density", {
|
|
409
|
-
readonly dense: true;
|
|
410
|
-
readonly normal: false;
|
|
411
|
-
}, "normal" | "dense">;
|
|
412
|
-
linux: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"support-linux">;
|
|
413
|
-
objcSupport: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"objective-c-support">;
|
|
414
|
-
optionalEnums: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"optional-enums">;
|
|
415
|
-
swift5Support: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"swift-5-support">;
|
|
416
|
-
sendable: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"sendable">;
|
|
417
|
-
multiFileOutput: import("quicktype-core/dist/RendererOptions/index.js").BooleanOption<"multi-file-output">;
|
|
418
|
-
accessLevel: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"access-level", {
|
|
419
|
-
readonly internal: "internal";
|
|
420
|
-
readonly public: "public";
|
|
421
|
-
}, "internal" | "public">;
|
|
422
|
-
protocol: import("quicktype-core/dist/RendererOptions/index.js").EnumOption<"protocol", {
|
|
423
|
-
readonly none: {
|
|
424
|
-
readonly equatable: false;
|
|
425
|
-
readonly hashable: false;
|
|
426
|
-
};
|
|
427
|
-
readonly equatable: {
|
|
428
|
-
readonly equatable: true;
|
|
429
|
-
readonly hashable: false;
|
|
430
|
-
};
|
|
431
|
-
readonly hashable: {
|
|
432
|
-
readonly equatable: false;
|
|
433
|
-
readonly hashable: true;
|
|
434
|
-
};
|
|
435
|
-
}, "none" | "equatable" | "hashable">;
|
|
436
|
-
}>> | undefined;
|
|
437
|
-
inferMaps?: boolean | undefined;
|
|
438
|
-
inferEnums?: boolean | undefined;
|
|
439
|
-
inferUuids?: boolean | undefined;
|
|
440
|
-
inferDateTimes?: boolean | undefined;
|
|
441
|
-
inferIntegerStrings?: boolean | undefined;
|
|
442
|
-
inferBooleanStrings?: boolean | undefined;
|
|
443
|
-
combineClasses?: boolean | undefined;
|
|
444
|
-
ignoreJsonRefs?: boolean | undefined;
|
|
445
|
-
};
|
|
446
|
-
constructor(moduleName: string, settings?: {
|
|
447
|
-
outDir?: string;
|
|
448
|
-
} & Partial<qt.Options>);
|
|
449
|
-
addMember(name: string, _samples: any[]): Promise<void>;
|
|
450
|
-
toString(): Promise<string>;
|
|
451
|
-
toFile(): Promise<void>;
|
|
452
|
-
}
|
package/dist/TypeWriter.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import * as fs from 'node:fs';
|
|
2
|
-
import { merge } from 'lodash-es';
|
|
3
|
-
import * as qt from 'quicktype-core';
|
|
4
|
-
export class TypeWriter {
|
|
5
|
-
moduleName;
|
|
6
|
-
input = qt.jsonInputForTargetLanguage('typescript');
|
|
7
|
-
outDir;
|
|
8
|
-
qtSettings;
|
|
9
|
-
constructor(moduleName, settings = {}) {
|
|
10
|
-
this.moduleName = moduleName;
|
|
11
|
-
const { outDir, ...qtSettings } = settings;
|
|
12
|
-
this.outDir = outDir || './types';
|
|
13
|
-
const defaultSettings = {
|
|
14
|
-
lang: 'typescript',
|
|
15
|
-
rendererOptions: {
|
|
16
|
-
'just-types': true,
|
|
17
|
-
'prefer-types': true,
|
|
18
|
-
},
|
|
19
|
-
inferEnums: false,
|
|
20
|
-
inferDateTimes: false,
|
|
21
|
-
};
|
|
22
|
-
this.qtSettings = merge(defaultSettings, qtSettings);
|
|
23
|
-
}
|
|
24
|
-
async addMember(name, _samples) {
|
|
25
|
-
const samples = _samples.map((s) => (typeof s === 'string' ? s : JSON.stringify(s)));
|
|
26
|
-
await this.input.addSource({ name, samples });
|
|
27
|
-
}
|
|
28
|
-
async toString() {
|
|
29
|
-
const inputData = new qt.InputData();
|
|
30
|
-
inputData.addInput(this.input);
|
|
31
|
-
const result = await qt.quicktype({
|
|
32
|
-
inputData,
|
|
33
|
-
...this.qtSettings,
|
|
34
|
-
});
|
|
35
|
-
return result.lines.join('\n');
|
|
36
|
-
}
|
|
37
|
-
async toFile() {
|
|
38
|
-
const result = await this.toString();
|
|
39
|
-
fs.mkdirSync(this.outDir, { recursive: true });
|
|
40
|
-
fs.writeFileSync(`${this.outDir}/${this.moduleName}.d.ts`, result);
|
|
41
|
-
}
|
|
42
|
-
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { Dir, TempDir, temp } from './Dir.js';
|
|
2
|
-
export { Cache } from './Cache.js';
|
|
3
|
-
export { Fetcher, type Route, type Query, type FetchOptions } from './Fetcher.js';
|
|
4
|
-
export { File, FileType, FileTypeJson, FileTypeNdjson, FileTypeCsv } from './File.js';
|
|
5
|
-
export { Log } from './Log.js';
|
|
6
|
-
export { snapshot } from './snapshot.js';
|
|
7
|
-
export { timeout } from './timeout.js';
|
|
8
|
-
export { TypeWriter } from './TypeWriter.js';
|
package/dist/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { Dir, TempDir, temp } from './Dir.js';
|
|
2
|
-
export { Cache } from './Cache.js';
|
|
3
|
-
export { Fetcher } from './Fetcher.js';
|
|
4
|
-
export { File, FileType, FileTypeJson, FileTypeNdjson, FileTypeCsv } from './File.js';
|
|
5
|
-
export { Log } from './Log.js';
|
|
6
|
-
export { snapshot } from './snapshot.js';
|
|
7
|
-
export { timeout } from './timeout.js';
|
|
8
|
-
export { TypeWriter } from './TypeWriter.js';
|
package/dist/snapshot.d.ts
DELETED
package/dist/snapshot.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { isObjectLike } from 'lodash-es';
|
|
2
|
-
/**
|
|
3
|
-
* Allows special objects (Error, Headers, Set) to be included in JSON.stringify output
|
|
4
|
-
* functions are removed
|
|
5
|
-
*/
|
|
6
|
-
export function snapshot(i, max = 50, depth = 0) {
|
|
7
|
-
if (Array.isArray(i)) {
|
|
8
|
-
if (depth === max)
|
|
9
|
-
return [];
|
|
10
|
-
return i.map((c) => snapshot(c, max, depth + 1));
|
|
11
|
-
}
|
|
12
|
-
if (typeof i === 'function')
|
|
13
|
-
return undefined;
|
|
14
|
-
if (!isObjectLike(i))
|
|
15
|
-
return i;
|
|
16
|
-
if (depth === max)
|
|
17
|
-
return {};
|
|
18
|
-
let output = {};
|
|
19
|
-
// @ts-ignore If it has an 'entries' function, use that for looping (eg. Set, Map, Headers)
|
|
20
|
-
if (typeof i.entries === 'function') {
|
|
21
|
-
// @ts-ignore
|
|
22
|
-
for (let [k, v] of i.entries()) {
|
|
23
|
-
output[k] = snapshot(v, max, depth + 1);
|
|
24
|
-
}
|
|
25
|
-
return output;
|
|
26
|
-
}
|
|
27
|
-
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Enumerability_and_ownership_of_properties
|
|
28
|
-
// Get Enumerable, inherited properties
|
|
29
|
-
const obj = i;
|
|
30
|
-
for (let key in obj) {
|
|
31
|
-
output[key] = snapshot(obj[key], max, depth + 1);
|
|
32
|
-
}
|
|
33
|
-
// Get Non-enumberable, own properties
|
|
34
|
-
Object.getOwnPropertyNames(obj).forEach((key) => {
|
|
35
|
-
output[key] = snapshot(obj[key], max, depth + 1);
|
|
36
|
-
});
|
|
37
|
-
return output;
|
|
38
|
-
}
|
package/dist/timeout.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function timeout(ms: number): Promise<unknown>;
|