schemastore-to-typescript 1.0.2 → 1.0.4
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/CHANGELOG.json +213 -1
- package/CHANGELOG.md +44 -2
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/package.json +19 -17
- package/readme.md +12 -13
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,219 @@
|
|
|
2
2
|
"name": "schemastore-to-typescript",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Mon, 19 Oct 2026 17:11:37 GMT",
|
|
6
|
+
"version": "1.0.4",
|
|
7
|
+
"tag": "schemastore-to-typescript_v1.0.4",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "email not defined",
|
|
12
|
+
"package": "schemastore-to-typescript",
|
|
13
|
+
"commit": "50260cd9b6fc9520f5c7e9a6d55720e90b329d4e",
|
|
14
|
+
"comment": "Update dependency pnpm to v12.10.0"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "email not defined",
|
|
18
|
+
"package": "schemastore-to-typescript",
|
|
19
|
+
"commit": "50260cd9b6fc9520f5c7e9a6d55720e90b329d4e",
|
|
20
|
+
"comment": "Update dependency pnpm to v12.10.1"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "email not defined",
|
|
24
|
+
"package": "schemastore-to-typescript",
|
|
25
|
+
"commit": "50260cd9b6fc9520f5c7e9a6d55720e90b329d4e",
|
|
26
|
+
"comment": "Update @langri-sha/projen-project to 0.37.0"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "email not defined",
|
|
30
|
+
"package": "schemastore-to-typescript",
|
|
31
|
+
"commit": "50260cd9b6fc9520f5c7e9a6d55720e90b329d4e",
|
|
32
|
+
"comment": "Update dependency got to v16.1.0"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "email not defined",
|
|
36
|
+
"package": "schemastore-to-typescript",
|
|
37
|
+
"commit": "50260cd9b6fc9520f5c7e9a6d55720e90b329d4e",
|
|
38
|
+
"comment": "Update dependency pnpm to v12.14.0"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"author": "filip.dupanovic@gmail.com",
|
|
42
|
+
"package": "schemastore-to-typescript",
|
|
43
|
+
"commit": "50260cd9b6fc9520f5c7e9a6d55720e90b329d4e",
|
|
44
|
+
"comment": "Compile Renovate 44.168.4 and later schemas"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"author": "email not defined",
|
|
48
|
+
"package": "schemastore-to-typescript",
|
|
49
|
+
"commit": "50260cd9b6fc9520f5c7e9a6d55720e90b329d4e",
|
|
50
|
+
"comment": "Update dependency @langri-sha/projen-project to v0.36.0"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"author": "email not defined",
|
|
54
|
+
"package": "schemastore-to-typescript",
|
|
55
|
+
"commit": "50260cd9b6fc9520f5c7e9a6d55720e90b329d4e",
|
|
56
|
+
"comment": "Update dependency @types/node to v24.19.2"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"author": "email not defined",
|
|
60
|
+
"package": "schemastore-to-typescript",
|
|
61
|
+
"commit": "50260cd9b6fc9520f5c7e9a6d55720e90b329d4e",
|
|
62
|
+
"comment": "Update dependency keyv to v6"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"author": "email not defined",
|
|
66
|
+
"package": "schemastore-to-typescript",
|
|
67
|
+
"commit": "50260cd9b6fc9520f5c7e9a6d55720e90b329d4e",
|
|
68
|
+
"comment": "Update dependency pnpm to v12.11.2"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"author": "email not defined",
|
|
72
|
+
"package": "schemastore-to-typescript",
|
|
73
|
+
"commit": "50260cd9b6fc9520f5c7e9a6d55720e90b329d4e",
|
|
74
|
+
"comment": "Update dependency vitest to v5.0.5"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"author": "email not defined",
|
|
78
|
+
"package": "schemastore-to-typescript",
|
|
79
|
+
"commit": "50260cd9b6fc9520f5c7e9a6d55720e90b329d4e",
|
|
80
|
+
"comment": "Update langri-sha projen toolchain"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"author": "email not defined",
|
|
84
|
+
"package": "schemastore-to-typescript",
|
|
85
|
+
"commit": "50260cd9b6fc9520f5c7e9a6d55720e90b329d4e",
|
|
86
|
+
"comment": "Update dependency @langri-sha/projen-project to v0.33.0"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"author": "email not defined",
|
|
90
|
+
"package": "schemastore-to-typescript",
|
|
91
|
+
"commit": "50260cd9b6fc9520f5c7e9a6d55720e90b329d4e",
|
|
92
|
+
"comment": "Update dependency pnpm to v12.11.1"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"author": "email not defined",
|
|
96
|
+
"package": "schemastore-to-typescript",
|
|
97
|
+
"commit": "50260cd9b6fc9520f5c7e9a6d55720e90b329d4e",
|
|
98
|
+
"comment": "Update langri-sha projen toolchain"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"author": "email not defined",
|
|
102
|
+
"package": "schemastore-to-typescript",
|
|
103
|
+
"commit": "50260cd9b6fc9520f5c7e9a6d55720e90b329d4e",
|
|
104
|
+
"comment": "Update dependency pnpm to v12.13.0"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"author": "email not defined",
|
|
108
|
+
"package": "schemastore-to-typescript",
|
|
109
|
+
"commit": "50260cd9b6fc9520f5c7e9a6d55720e90b329d4e",
|
|
110
|
+
"comment": "Update langri-sha projen toolchain"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"author": "email not defined",
|
|
114
|
+
"package": "schemastore-to-typescript",
|
|
115
|
+
"commit": "50260cd9b6fc9520f5c7e9a6d55720e90b329d4e",
|
|
116
|
+
"comment": "Update dependency pnpm to v12.11.0"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"author": "filip.dupanovic@gmail.com",
|
|
120
|
+
"package": "schemastore-to-typescript",
|
|
121
|
+
"commit": "50260cd9b6fc9520f5c7e9a6d55720e90b329d4e",
|
|
122
|
+
"comment": "Restore the Keyv version supported by got caching"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"author": "email not defined",
|
|
126
|
+
"package": "schemastore-to-typescript",
|
|
127
|
+
"commit": "50260cd9b6fc9520f5c7e9a6d55720e90b329d4e",
|
|
128
|
+
"comment": "Update dependency vitest to v5.0.4"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"author": "email not defined",
|
|
132
|
+
"package": "schemastore-to-typescript",
|
|
133
|
+
"commit": "50260cd9b6fc9520f5c7e9a6d55720e90b329d4e",
|
|
134
|
+
"comment": "Update dependency @langri-sha/projen-project to v0.39.0"
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
"none": [
|
|
138
|
+
{
|
|
139
|
+
"author": "filip.dupanovic@gmail.com",
|
|
140
|
+
"package": "schemastore-to-typescript",
|
|
141
|
+
"commit": "50260cd9b6fc9520f5c7e9a6d55720e90b329d4e",
|
|
142
|
+
"comment": "Opt into the default Worktrunk hooks"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"author": "filip.dupanovic@gmail.com",
|
|
146
|
+
"package": "schemastore-to-typescript",
|
|
147
|
+
"commit": "50260cd9b6fc9520f5c7e9a6d55720e90b329d4e",
|
|
148
|
+
"comment": "Simplify the README"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"author": "filip.dupanovic@gmail.com",
|
|
152
|
+
"package": "schemastore-to-typescript",
|
|
153
|
+
"commit": "50260cd9b6fc9520f5c7e9a6d55720e90b329d4e",
|
|
154
|
+
"comment": "Keep the Dagger files out of the package"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"author": "filip.dupanovic@gmail.com",
|
|
158
|
+
"package": "schemastore-to-typescript",
|
|
159
|
+
"commit": "50260cd9b6fc9520f5c7e9a6d55720e90b329d4e",
|
|
160
|
+
"comment": "Link the contributing guide from the readme"
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"date": "Wed, 07 Oct 2026 10:15:46 GMT",
|
|
167
|
+
"version": "1.0.3",
|
|
168
|
+
"tag": "schemastore-to-typescript_v1.0.3",
|
|
169
|
+
"comments": {
|
|
170
|
+
"patch": [
|
|
171
|
+
{
|
|
172
|
+
"author": "email not defined",
|
|
173
|
+
"package": "schemastore-to-typescript",
|
|
174
|
+
"commit": "fbb978d98918c4880dce51e63a38895eb1a8c837",
|
|
175
|
+
"comment": "Update dependency vitest to v5.0.3"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"author": "email not defined",
|
|
179
|
+
"package": "schemastore-to-typescript",
|
|
180
|
+
"commit": "fbb978d98918c4880dce51e63a38895eb1a8c837",
|
|
181
|
+
"comment": "Update dependency pnpm to v12.9.1"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"author": "email not defined",
|
|
185
|
+
"package": "schemastore-to-typescript",
|
|
186
|
+
"commit": "fbb978d98918c4880dce51e63a38895eb1a8c837",
|
|
187
|
+
"comment": "Update dependency @langri-sha/projen-project to v0.32.0"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"author": "email not defined",
|
|
191
|
+
"package": "schemastore-to-typescript",
|
|
192
|
+
"commit": "fbb978d98918c4880dce51e63a38895eb1a8c837",
|
|
193
|
+
"comment": "Update dependency pnpm to v12.9.0"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"author": "email not defined",
|
|
197
|
+
"package": "schemastore-to-typescript",
|
|
198
|
+
"commit": "fbb978d98918c4880dce51e63a38895eb1a8c837",
|
|
199
|
+
"comment": "Update dependency @types/node to v24.19.1"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"author": "email not defined",
|
|
203
|
+
"package": "schemastore-to-typescript",
|
|
204
|
+
"commit": "fbb978d98918c4880dce51e63a38895eb1a8c837",
|
|
205
|
+
"comment": "Update dependency pnpm to v12.8.2"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"author": "email not defined",
|
|
209
|
+
"package": "schemastore-to-typescript",
|
|
210
|
+
"commit": "fbb978d98918c4880dce51e63a38895eb1a8c837",
|
|
211
|
+
"comment": "Update langri-sha projen toolchain"
|
|
212
|
+
}
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"date": "Fri, 02 Oct 2026 20:06:12 GMT",
|
|
6
218
|
"version": "1.0.2",
|
|
7
219
|
"tag": "schemastore-to-typescript_v1.0.2",
|
|
8
220
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,54 @@
|
|
|
1
1
|
# Change Log - schemastore-to-typescript
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on
|
|
3
|
+
<!-- This log was last generated on Mon, 19 Oct 2026 17:11:37 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 1.0.4
|
|
8
|
+
|
|
9
|
+
Mon, 19 Oct 2026 17:11:37 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- Update dependency pnpm to v12.10.0
|
|
14
|
+
- Update dependency pnpm to v12.10.1
|
|
15
|
+
- Update @langri-sha/projen-project to 0.37.0
|
|
16
|
+
- Update dependency got to v16.1.0
|
|
17
|
+
- Update dependency pnpm to v12.14.0
|
|
18
|
+
- Compile Renovate 44.168.4 and later schemas (filip.dupanovic@gmail.com)
|
|
19
|
+
- Update dependency @langri-sha/projen-project to v0.36.0
|
|
20
|
+
- Update dependency @types/node to v24.19.2
|
|
21
|
+
- Update dependency keyv to v6
|
|
22
|
+
- Update dependency pnpm to v12.11.2
|
|
23
|
+
- Update dependency vitest to v5.0.5
|
|
24
|
+
- Update langri-sha projen toolchain
|
|
25
|
+
- Update dependency @langri-sha/projen-project to v0.33.0
|
|
26
|
+
- Update dependency pnpm to v12.11.1
|
|
27
|
+
- Update langri-sha projen toolchain
|
|
28
|
+
- Update dependency pnpm to v12.13.0
|
|
29
|
+
- Update langri-sha projen toolchain
|
|
30
|
+
- Update dependency pnpm to v12.11.0
|
|
31
|
+
- Restore the Keyv version supported by got caching (filip.dupanovic@gmail.com)
|
|
32
|
+
- Update dependency vitest to v5.0.4
|
|
33
|
+
- Update dependency @langri-sha/projen-project to v0.39.0
|
|
34
|
+
|
|
35
|
+
## 1.0.3
|
|
36
|
+
|
|
37
|
+
Wed, 07 Oct 2026 10:15:46 GMT
|
|
38
|
+
|
|
39
|
+
### Patches
|
|
40
|
+
|
|
41
|
+
- Update dependency vitest to v5.0.3
|
|
42
|
+
- Update dependency pnpm to v12.9.1
|
|
43
|
+
- Update dependency @langri-sha/projen-project to v0.32.0
|
|
44
|
+
- Update dependency pnpm to v12.9.0
|
|
45
|
+
- Update dependency @types/node to v24.19.1
|
|
46
|
+
- Update dependency pnpm to v12.8.2
|
|
47
|
+
- Update langri-sha projen toolchain
|
|
48
|
+
|
|
7
49
|
## 1.0.2
|
|
8
50
|
|
|
9
|
-
Fri, 02 Oct 2026 20:06:
|
|
51
|
+
Fri, 02 Oct 2026 20:06:12 GMT
|
|
10
52
|
|
|
11
53
|
### Patches
|
|
12
54
|
|
package/dist/index.js
CHANGED
|
@@ -60,6 +60,13 @@ const nonSchemaKeys = new Set(['default', 'examples', 'const', 'enum']);
|
|
|
60
60
|
* So optional members are dropped in favour of `additionalProperties`, which
|
|
61
61
|
* is the general contract they were there to narrow. Required ones stay: they
|
|
62
62
|
* are a promise the type has to keep.
|
|
63
|
+
*
|
|
64
|
+
* Renovate 44.168.4 began listing the per-manager overrides (`lockFileMaintenance`,
|
|
65
|
+
* `minor`, `group`, …) among the members of every manager, while each of them
|
|
66
|
+
* still declares `$ref: '#'` beside an `allOf` that spells out the same
|
|
67
|
+
* members. `json-schema-to-typescript` cannot resolve that cycle and throws
|
|
68
|
+
* on an intersection with no parameters. The `allOf` already carries what the
|
|
69
|
+
* self-reference would inherit, so the `$ref` goes.
|
|
63
70
|
*/
|
|
64
71
|
const sanitizeSchema = (node) => {
|
|
65
72
|
if (Array.isArray(node)) {
|
|
@@ -77,6 +84,9 @@ const sanitizeSchema = (node) => {
|
|
|
77
84
|
sanitized.additionalProperties !== null) {
|
|
78
85
|
delete sanitized.$ref;
|
|
79
86
|
}
|
|
87
|
+
if (sanitized.$ref === '#' && Array.isArray(sanitized.allOf)) {
|
|
88
|
+
delete sanitized.$ref;
|
|
89
|
+
}
|
|
80
90
|
if (sanitized.additionalProperties !== undefined &&
|
|
81
91
|
sanitized.additionalProperties !== false &&
|
|
82
92
|
typeof sanitized.properties === 'object' &&
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AAEjC,OAAO,WAAW,MAAM,OAAO,CAAA;AAC/B,OAAO,QAAQ,MAAM,WAAW,CAAA;AAChC,OAAO,GAAG,EAAE,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AACpC,OAAO,EAEL,OAAO,IAAI,aAAa,GACzB,MAAM,2BAA2B,CAAA;AAClC,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEpC,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEhD,MAAM,KAAK,GAAG,WAAW,CAAC,4BAA4B,CAAC,CAAA;AACvD,MAAM,KAAK,GAAG,QAAQ,CAAC,2BAA2B,CAAC,CAAA;AAEnD,MAAM,KAAK,GAAG,IAAI,QAAQ,C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AAM,CAAC,CAAC,IAAI,aAAa,CAAC,CAAC,QAAQ,CAAC,UAAU,EAAE,EAClG,EAAE,KAAK,EAAE,CAAC,EAAE,CACb,CAAA;QACH,CAAC;QAED,IAAI,CAAC,YAAY,KAAK,IAAI,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,CAAC;YAClE,MAAM,IAAI,KAAK,CACb,6BAA6B,aAAa,CAAC,GAAG,yEAAyE,CAAC,CAAC,OAAO,EAAE,EAClI,EAAE,KAAK,EAAE,CAAC,EAAE,CACb,CAAA;QACH,CAAC;QAED,MAAM,CAAC,CAAA;IACT,CAAC;IAED,IAAI,KAAK,EAAE,CAAC;QACV,MAAM,UAAU,EAAE,CAAA;IACpB,CAAC;IAED,OAAO,aAAa,CAAC,cAAc,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;AACrE,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "schemastore-to-typescript",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Fetch JSON schemas from the JSON Schema Store catalog and compile them to TypeScript typings",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -29,43 +29,45 @@
|
|
|
29
29
|
"schemastore-to-typescript": "dist/cli.js"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
|
-
"change": "
|
|
33
|
-
"default": "
|
|
32
|
+
"change": "projen change",
|
|
33
|
+
"default": "projen default",
|
|
34
34
|
"prepare": "husky",
|
|
35
35
|
"prepublishOnly": "rm -rf dist; tsc --project tsconfig.build.json",
|
|
36
|
-
"renovate": "
|
|
37
|
-
"test": "vitest"
|
|
36
|
+
"renovate": "projen renovate",
|
|
37
|
+
"test": "vitest",
|
|
38
|
+
"worktrunk:dry-run": "projen worktrunk:dry-run",
|
|
39
|
+
"worktrunk:show": "projen worktrunk:show"
|
|
38
40
|
},
|
|
39
41
|
"dependencies": {
|
|
40
42
|
"commander": "15.0.0",
|
|
41
43
|
"debug": "4.4.3",
|
|
42
44
|
"env-paths": "4.0.0",
|
|
43
45
|
"es-main": "1.4.0",
|
|
44
|
-
"got": "16.
|
|
46
|
+
"got": "16.1.0",
|
|
45
47
|
"json-schema-to-typescript": "16.0.0",
|
|
46
48
|
"keyv": "5.6.0",
|
|
47
49
|
"keyv-file": "5.3.5"
|
|
48
50
|
},
|
|
49
51
|
"devDependencies": {
|
|
50
|
-
"@langri-sha/eslint-config": "0.
|
|
51
|
-
"@langri-sha/lint-staged": "0.9.
|
|
52
|
-
"@langri-sha/prettier": "0.4.
|
|
53
|
-
"@langri-sha/projen-project": "0.
|
|
54
|
-
"@langri-sha/tsconfig": "1.1.
|
|
55
|
-
"@langri-sha/vitest": "0.2.
|
|
52
|
+
"@langri-sha/eslint-config": "0.10.0",
|
|
53
|
+
"@langri-sha/lint-staged": "0.9.11",
|
|
54
|
+
"@langri-sha/prettier": "0.4.11",
|
|
55
|
+
"@langri-sha/projen-project": "0.39.0",
|
|
56
|
+
"@langri-sha/tsconfig": "1.1.1",
|
|
57
|
+
"@langri-sha/vitest": "0.2.3",
|
|
56
58
|
"@types/debug": "4.1.13",
|
|
57
|
-
"@types/node": "24.19.
|
|
59
|
+
"@types/node": "24.19.2",
|
|
58
60
|
"beachball": "2.66.0",
|
|
59
|
-
"eslint": "10.
|
|
61
|
+
"eslint": "10.12.0",
|
|
60
62
|
"husky": "9.1.7",
|
|
61
63
|
"lint-staged": "17.6.0",
|
|
62
64
|
"prettier": "3.9.9",
|
|
63
|
-
"projen": "0.
|
|
65
|
+
"projen": "0.104.1",
|
|
64
66
|
"tsx": "4.23.15",
|
|
65
67
|
"typescript": "5.9.3",
|
|
66
|
-
"vitest": "5.0.
|
|
68
|
+
"vitest": "5.0.5"
|
|
67
69
|
},
|
|
68
|
-
"packageManager": "pnpm@12.
|
|
70
|
+
"packageManager": "pnpm@12.14.0",
|
|
69
71
|
"devEngines": {
|
|
70
72
|
"runtime": {
|
|
71
73
|
"name": "node",
|
package/readme.md
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
# schemastore-to-typescript
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
The tool first fetches the schema catalog from the JSON Schema Store API,
|
|
7
|
-
searches for the requested schema by name (case-insensitive), and then downloads
|
|
8
|
-
and compiles the schema to TypeScript definitions.
|
|
3
|
+
Generate [TypeScript typings] for any schema in the [JSON Schema Store] catalog,
|
|
4
|
+
by name.
|
|
9
5
|
|
|
10
6
|
## Features
|
|
11
7
|
|
|
@@ -20,19 +16,17 @@ and compiles the schema to TypeScript definitions.
|
|
|
20
16
|
npm install -D schemastore-to-typescript
|
|
21
17
|
```
|
|
22
18
|
|
|
23
|
-
Name a schema as it appears in the catalog, and optionally where to
|
|
24
|
-
typings — `<schema>.d.ts` in the working directory by default:
|
|
19
|
+
Name a schema as it appears in the catalog, in any case, and optionally where to
|
|
20
|
+
write its typings — `<schema>.d.ts` in the working directory by default:
|
|
25
21
|
|
|
26
22
|
```sh
|
|
27
23
|
schemastore-to-typescript renovate src/renovate.ts
|
|
28
24
|
schemastore-to-typescript 'cargo manifest' src/cargo.ts
|
|
29
25
|
```
|
|
30
26
|
|
|
31
|
-
|
|
32
|
-
`~/.cache/schemastore-to-typescript-nodejs` on Linux. Pass `--no-cache` to skip
|
|
33
|
-
it.
|
|
27
|
+
Downloads are cached; pass `--no-cache` to skip the cache.
|
|
34
28
|
|
|
35
|
-
The same is available as a function, which resolves to the
|
|
29
|
+
The same is available as a function, which resolves to the generated module and
|
|
36
30
|
takes `false` as its second argument to skip the cache:
|
|
37
31
|
|
|
38
32
|
```ts
|
|
@@ -41,12 +35,17 @@ import { compile } from 'schemastore-to-typescript'
|
|
|
41
35
|
const typings = await compile('swcrc')
|
|
42
36
|
```
|
|
43
37
|
|
|
38
|
+
## Contributing
|
|
39
|
+
|
|
40
|
+
See [CONTRIBUTING.md] in `langri-sha/github`.
|
|
41
|
+
|
|
42
|
+
[contributing.md]:
|
|
43
|
+
https://github.com/langri-sha/github/blob/main/CONTRIBUTING.md
|
|
44
44
|
[`got`]: https://www.npmjs.com/package/got
|
|
45
45
|
[`json-schema-to-typescript`]:
|
|
46
46
|
https://www.npmjs.com/package/json-schema-to-typescript
|
|
47
47
|
[json schema store]: https://www.schemastore.org/
|
|
48
48
|
[json schema store catalog api]:
|
|
49
49
|
https://www.schemastore.org/api/json/catalog.json
|
|
50
|
-
[json schema]: https://json-schema.org/
|
|
51
50
|
[typescript typings]:
|
|
52
51
|
https://www.typescriptlang.org/docs/handbook/declaration-files/templates/module-d-ts.html
|