@balena/abstract-sql-to-typescript
Advanced tools
Comparing version 1.4.1 to 1.4.2-build-model-subset-7f44648fe2bde3c85914c53cdaec448321f5ffca-1
@@ -7,4 +7,8 @@ # Change Log | ||
## 1.4.1 - 2023-02-13 | ||
## 1.4.2 - 2023-02-15 | ||
* Update typings to the minimal subset of the abstract sql model we need [Pagan Gazzard] | ||
## 1.4.1 - 2023-02-14 | ||
* Update `abstract-sql-compiler` and `odata-to-abstract-sql` [Carol Schulze] | ||
@@ -11,0 +15,0 @@ |
import type { AbstractSqlModel } from '@balena/abstract-sql-compiler'; | ||
type RequiredModelSubset = Pick<AbstractSqlModel, 'tables' | 'relationships' | 'synonyms'>; | ||
export interface Options { | ||
mode?: 'read' | 'write'; | ||
} | ||
export declare const abstractSqlToTypescriptTypes: (m: AbstractSqlModel, opts?: Options) => string; | ||
export declare const abstractSqlToTypescriptTypes: (m: RequiredModelSubset, opts?: Options) => string; | ||
export {}; |
{ | ||
"name": "@balena/abstract-sql-to-typescript", | ||
"version": "1.4.1", | ||
"version": "1.4.2-build-model-subset-7f44648fe2bde3c85914c53cdaec448321f5ffca-1", | ||
"description": "A translator for abstract sql into typescript types.", | ||
@@ -18,16 +18,16 @@ "main": "out/index.js", | ||
"@balena/odata-to-abstract-sql": "^5.9.1", | ||
"@types/node": "^12.20.47", | ||
"@types/node": "^12.20.55", | ||
"common-tags": "^1.8.2" | ||
}, | ||
"devDependencies": { | ||
"@balena/lint": "^6.2.0", | ||
"@types/chai": "^4.3.0", | ||
"@balena/lint": "^6.2.1", | ||
"@types/chai": "^4.3.4", | ||
"@types/common-tags": "^1.8.1", | ||
"@types/mocha": "^10.0.0", | ||
"chai": "^4.3.6", | ||
"husky": "^8.0.0", | ||
"lint-staged": "^13.0.0", | ||
"mocha": "^10.0.0", | ||
"ts-node": "^10.7.0", | ||
"typescript": "^4.6.3" | ||
"@types/mocha": "^10.0.1", | ||
"chai": "^4.3.7", | ||
"husky": "^8.0.3", | ||
"lint-staged": "^13.1.2", | ||
"mocha": "^10.2.0", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^4.9.5" | ||
}, | ||
@@ -44,4 +44,4 @@ "lint-staged": { | ||
"versionist": { | ||
"publishedAt": "2023-02-13T17:57:05.295Z" | ||
"publishedAt": "2023-02-15T13:34:29.198Z" | ||
} | ||
} |
@@ -16,2 +16,7 @@ import type { | ||
type RequiredModelSubset = Pick< | ||
AbstractSqlModel, | ||
'tables' | 'relationships' | 'synonyms' | ||
>; | ||
const typeHelpers = { | ||
@@ -43,3 +48,3 @@ read: ` | ||
const getReferencedDataType = ( | ||
m: AbstractSqlModel, | ||
m: RequiredModelSubset, | ||
{ references }: AbstractSqlField, | ||
@@ -60,3 +65,3 @@ opts: RequiredOptions, | ||
const sqlTypeToTypescriptType = ( | ||
m: AbstractSqlModel, | ||
m: RequiredModelSubset, | ||
f: AbstractSqlField, | ||
@@ -115,3 +120,3 @@ opts: RequiredOptions, | ||
const fieldsToInterfaceProps = ( | ||
m: AbstractSqlModel, | ||
m: RequiredModelSubset, | ||
fields: AbstractSqlField[], | ||
@@ -130,3 +135,3 @@ opts: RequiredOptions, | ||
const recurseRelationships = ( | ||
m: AbstractSqlModel, | ||
m: RequiredModelSubset, | ||
relationships: Relationship, | ||
@@ -172,3 +177,3 @@ inverseSynonyms: Record<string, string>, | ||
const relationshipsToInterfaceProps = ( | ||
m: AbstractSqlModel, | ||
m: RequiredModelSubset, | ||
table: AbstractSqlTable, | ||
@@ -204,3 +209,3 @@ opts: RequiredOptions, | ||
const tableToInterface = ( | ||
m: AbstractSqlModel, | ||
m: RequiredModelSubset, | ||
table: AbstractSqlTable, | ||
@@ -227,3 +232,3 @@ opts: RequiredOptions, | ||
export const abstractSqlToTypescriptTypes = ( | ||
m: AbstractSqlModel, | ||
m: RequiredModelSubset, | ||
opts: Options = {}, | ||
@@ -230,0 +235,0 @@ ): string => { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
84900
741
2
Updated@types/node@^12.20.55