Derive TS type from JSON Schema

So we don't define (almost) the same schema twice
This commit is contained in:
2026-01-22 13:36:08 +07:00
parent 5f55fc1da1
commit 8851323012
3 changed files with 56 additions and 41 deletions
+23
View File
@@ -15,6 +15,9 @@ importers:
specifier: ^3.0.2
version: 3.0.2
devDependencies:
json-schema-to-ts:
specifier: ^3.1.1
version: 3.1.1
remotestoragejs:
specifier: ^2.0.0-beta.8
version: 2.0.0-beta.8
@@ -27,6 +30,10 @@ importers:
packages:
'@babel/runtime@7.28.6':
resolution: {integrity: sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA==}
engines: {node: '>=6.9.0'}
'@isaacs/balanced-match@4.0.1':
resolution: {integrity: sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==}
engines: {node: 20 || >=22}
@@ -54,6 +61,10 @@ packages:
resolution: {integrity: sha512-tvZgpqk6fz4BaNZ66ZsRaZnbHvP/jG3uKJvAZOwEVUL4RTA5nJeeLYfyN9/VA8NX/V3IBG+hkeuGpKjvELkVhA==}
engines: {node: 20 || >=22}
json-schema-to-ts@3.1.1:
resolution: {integrity: sha512-+DWg8jCJG2TEnpy7kOm/7/AxaYoaRbjVB4LFZLySZlWn8exGs3A4OLJR966cVvU26N7X9TWxl+Jsw7dzAqKT6g==}
engines: {node: '>=16'}
latlon-geohash@2.0.0:
resolution: {integrity: sha512-OKBswTwrvTdtenV+9C9euBmvgGuqyjJNAzpQCarRz1m8/pYD2nz9fKkXmLs2S3jeXaLi3Ry76twQplKKUlgS/g==}
@@ -84,6 +95,9 @@ packages:
engines: {node: 20 || >=22}
hasBin: true
ts-algebra@2.0.0:
resolution: {integrity: sha512-FPAhNPFMrkwz76P7cdjdmiShwMynZYN6SgOujD1urY4oNm80Ou9oMdmbR45LotcKOXoy7wSmHkRFE6Mxbrhefw==}
tv4@1.3.0:
resolution: {integrity: sha512-afizzfpJgvPr+eDkREK4MxJ/+r8nEEHcmitwgnPUqpaP+FpwQyadnxNoSACbgc/b1LsZYtODGoPiFxQrgJgjvw==}
engines: {node: '>= 0.8.0'}
@@ -109,6 +123,8 @@ packages:
snapshots:
'@babel/runtime@7.28.6': {}
'@isaacs/balanced-match@4.0.1': {}
'@isaacs/brace-expansion@5.0.0':
@@ -132,6 +148,11 @@ snapshots:
minipass: 7.1.2
path-scurry: 2.0.1
json-schema-to-ts@3.1.1:
dependencies:
'@babel/runtime': 7.28.6
ts-algebra: 2.0.0
latlon-geohash@2.0.0: {}
lru-cache@11.2.4: {}
@@ -165,6 +186,8 @@ snapshots:
glob: 13.0.0
package-json-from-dist: 1.0.1
ts-algebra@2.0.0: {}
tv4@1.3.0: {}
typescript@5.9.3: {}