chore: Remove typeORM (#9005)

* chore: rename js files to txt

* chore: rename ts files to txt

* chore: delete environment helpers

* chore: convert global setup & teardown to txt

* chore: rename helper js/ts files to txt

* chore: rename seeder js/ts files to txt

* chore: remove typeorm

* chore: reintroduce used helpers
This commit is contained in:
Riqwan Thamir
2024-09-05 15:45:30 +02:00
committed by GitHub
parent 440f598de8
commit 0573bb924a
124 changed files with 80 additions and 1386 deletions
+10 -88
View File
@@ -1,15 +1,3 @@
import {
FindManyOptions,
FindOneOptions,
FindOperator,
FindOptionsSelect,
FindOptionsWhere,
OrderByCondition,
} from "typeorm"
import { FindOptionsOrder } from "typeorm/find-options/FindOptionsOrder"
import { FindOptionsRelations } from "typeorm/find-options/FindOptionsRelations"
/**
* Prettify complex types to a flat object structure
*/
@@ -61,17 +49,6 @@ export interface SoftDeletableEntity extends BaseEntity {
deleted_at: Date | null
}
/**
* @ignore
*/
export type Writable<T> = {
-readonly [key in keyof T]:
| T[key]
| FindOperator<T[key]>
| FindOperator<T[key][]>
| FindOperator<string[]>
}
/**
* @interface
*
@@ -124,48 +101,6 @@ export interface FindConfig<Entity> {
options?: Record<string, any>
}
/**
* @ignore
*/
export type ExtendedFindConfig<TEntity> = (
| Omit<FindOneOptions<TEntity>, "where" | "relations" | "select">
| Omit<FindManyOptions<TEntity>, "where" | "relations" | "select">
) & {
select?: FindOptionsSelect<TEntity>
relations?: FindOptionsRelations<TEntity>
where: FindOptionsWhere<TEntity> | FindOptionsWhere<TEntity>[]
order?: FindOptionsOrder<TEntity>
skip?: number
take?: number
}
/**
* @ignore
*/
export type QuerySelector<TEntity> = Selector<TEntity> & {
q?: string
}
/**
* @ignore
*/
export type TreeQuerySelector<TEntity> = QuerySelector<TEntity> & {
include_descendants_tree?: boolean
}
/**
* @ignore
*/
export type Selector<TEntity> = {
[key in keyof TEntity]?:
| TEntity[key]
| TEntity[key][]
| DateComparisonOperator
| StringComparisonOperator
| NumericalComparisonOperator
| FindOperator<TEntity[key][] | string | string[]>
}
/**
* @ignore
*/
@@ -180,29 +115,6 @@ export type TotalField =
| "gift_card_total"
| "gift_card_tax_total"
/**
* @ignore
*/
export interface CustomFindOptions<TModel, InKeys extends keyof TModel> {
select?: FindManyOptions<TModel>["select"]
where?: FindManyOptions<TModel>["where"] & {
[P in InKeys]?: TModel[P][]
}
order?: OrderByCondition
skip?: number
take?: number
}
/**
* @ignore
*/
export type QueryConfig<TEntity extends BaseEntity> = {
deafults?: (keyof TEntity | string)[]
allowed?: (keyof TEntity | string)[]
defaultLimit?: number
isList?: boolean
}
/**
* @interface
*
@@ -390,3 +302,13 @@ export type RawRounding = {
value: string
precision: number
}
/**
* @ignore
*/
export type QueryConfig<TEntity extends BaseEntity> = {
deafults?: (keyof TEntity | string)[]
allowed?: (keyof TEntity | string)[]
defaultLimit?: number
isList?: boolean
}
@@ -4,7 +4,6 @@ import {
} from "../modules-sdk"
import type { RedisOptions } from "ioredis"
import type { LoggerOptions } from "typeorm"
import type { InlineConfig } from "vite"
/**
@@ -263,7 +262,7 @@ export type ProjectConfigOptions = {
* })
* ```
*/
databaseLogging?: LoggerOptions
databaseLogging?: boolean
/**
* @ignore
@@ -1,5 +1 @@
import { EntityManager } from "typeorm"
export interface ITransactionBaseService {
withTransaction(transactionManager?: EntityManager): this
}
export interface ITransactionBaseService {}