Comparing version 0.18.0 to 0.19.0
@@ -6,2 +6,10 @@ # Change Log | ||
# [0.19.0](https://github.com/waitingsong/kmore/compare/v0.18.0...v0.19.0) (2020-06-16) | ||
**Note:** Version bump only for package kmore | ||
# [0.18.0](https://github.com/waitingsong/kmore/compare/v0.17.1...v0.18.0) (2020-06-15) | ||
@@ -8,0 +16,0 @@ |
@@ -5,3 +5,3 @@ /** | ||
* | ||
* @version 0.17.1 | ||
* @version 0.18.0 | ||
* @author waiting | ||
@@ -8,0 +8,0 @@ * @license MIT |
/* eslint-disable @typescript-eslint/no-unsafe-call */ | ||
import { walkDirForCallerFuncTsFiles, retrieveTypeFromTsFile, genTsCodeFromTypes, saveFile, genColsTsCodeFromTypes, DbPropKeys, } from 'kmore-types'; | ||
import { defer } from 'rxjs'; | ||
import { mergeMap } from 'rxjs/operators'; | ||
@@ -20,3 +19,3 @@ import { initBuildSrcOpts } from './config'; | ||
const build$ = walk$.pipe(mergeMap((path) => { | ||
return defer(() => buildKTablesFile(path, opts)); | ||
return buildKTablesFile(path, opts); | ||
}, opts.concurrent)); | ||
@@ -23,0 +22,0 @@ return build$; |
@@ -1,2 +0,2 @@ | ||
import { JointTable, Tables, MultiTableCols, MultiTableScopedCols, MultiTableAliasCols, KTablesBase, Options, DbPropKeys, TTables, TableAliasCols, ColAliasType, KnexColumnsParma } from 'kmore-types'; | ||
import { JointTable, Tables, MultiTableCols, MultiTableScopedCols, MultiTableAliasCols, KTablesBase, Options, DbPropKeys, TTables, TableAliasCols, ColAliasType, KnexColumnsParma, TableModel } from 'kmore-types'; | ||
import * as Knex from 'knex'; | ||
@@ -58,8 +58,7 @@ export { MultiTableCols, Options, Tables, TTables, MultiTableAliasCols, TableAliasCols, ColAliasType, KnexColumnsParma, }; | ||
/** @deprecated use `TTables` instead */ | ||
export declare type TTableListModel = TTables; | ||
/** Type of db.refTables */ | ||
export declare type DbRefBuilder<T> = { | ||
[key in keyof T]: TbQueryBuilder<T[key], T[key][]>; | ||
export declare type DbRefBuilder<T extends TTables> = { | ||
[tb in keyof T]: TbQueryBuilder<T[tb], T[tb][]>; | ||
}; | ||
export declare type TbQueryBuilder<TRecord, TResult = TRecord[]> = <R = void, KeyExcludeOptional = void>() => R extends TTables ? Knex.QueryBuilder<JointTable<TRecord, R, KeyExcludeOptional>, JointTable<TRecord, R, KeyExcludeOptional>[]> : Knex.QueryBuilder<TRecord, TResult>; | ||
export declare type TbQueryBuilder<TRecord extends TableModel, TResult = TRecord[]> = <R = void, KeyExcludeOptional = void>() => R extends TableModel ? Knex.QueryBuilder<JointTable<TRecord, R, KeyExcludeOptional>, JointTable<TRecord, R, KeyExcludeOptional>[]> : Knex.QueryBuilder<TRecord, TResult>; | ||
export declare type CreateColumnNameFn = (options: CreateColumnNameOpts) => string; | ||
@@ -66,0 +65,0 @@ export interface CreateColumnNameOpts { |
{ | ||
"name": "kmore", | ||
"author": "waiting", | ||
"version": "0.18.0", | ||
"version": "0.19.0", | ||
"description": "A Knex little more typed factory of SQL query builder powed by TypeScript, with auto-generated type-safe tables accessor for Node.js", | ||
@@ -40,3 +40,3 @@ "keywords": [ | ||
"@waiting/shared-types": "4", | ||
"kmore-types": "^0.18.0", | ||
"kmore-types": "^0.19.0", | ||
"rxjs": "^6.5.2" | ||
@@ -99,3 +99,3 @@ }, | ||
}, | ||
"gitHead": "836a3108ed61288a81f5e3660fc11452ad3cad06" | ||
"gitHead": "6264a50ab2900cb3b03fc1e3376fb49fcc990428" | ||
} |
@@ -43,3 +43,3 @@ # [kmore](https://waitingsong.github.io/kmore/) | ||
```ts | ||
import { Config } from 'kmore' | ||
import { Config, TTables } from 'kmore' | ||
@@ -59,3 +59,3 @@ // connection config | ||
// Define Types of tables | ||
export interface TbListModel { | ||
export interface TbListModel extends TTables { | ||
tb_user: User | ||
@@ -62,0 +62,0 @@ tb_user_detail: UserDetail |
@@ -43,3 +43,3 @@ # [kmore](https://waitingsong.github.io/kmore/) | ||
```ts | ||
import { Config } from 'kmore' | ||
import { Config, TTables } from 'kmore' | ||
@@ -59,3 +59,3 @@ // connection config | ||
// Define Types of tables | ||
export interface TbListModel { | ||
export interface TbListModel extends TTables { | ||
tb_user: User | ||
@@ -62,0 +62,0 @@ tb_user_detail: UserDetail |
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
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
106657
1204
+ Addedkmore-types@0.19.0(transitive)
- Removedkmore-types@0.18.0(transitive)
Updatedkmore-types@^0.19.0