@depup/typeorm-extension 3.9.0-depup.0 → 4.0.0-depup.0
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/README.MD +268 -134
- package/README.md +4 -6
- package/bin/cli.mjs +538 -267
- package/bin/cli.mjs.map +1 -0
- package/changes.json +3 -11
- package/dist/index.d.mts +1456 -0
- package/dist/index.mjs +3123 -2972
- package/dist/index.mjs.map +1 -1
- package/package.json +50 -56
- package/bin/cli.cjs +0 -275
- package/dist/cli/commands/database/create.d.ts +0 -27
- package/dist/cli/commands/database/drop.d.ts +0 -23
- package/dist/cli/commands/database/index.d.ts +0 -2
- package/dist/cli/commands/index.d.ts +0 -2
- package/dist/cli/commands/seed/create.d.ts +0 -21
- package/dist/cli/commands/seed/index.d.ts +0 -2
- package/dist/cli/commands/seed/run.d.ts +0 -24
- package/dist/cli/index.d.ts +0 -2
- package/dist/data-source/find/index.d.ts +0 -2
- package/dist/data-source/find/module.d.ts +0 -3
- package/dist/data-source/find/type.d.ts +0 -22
- package/dist/data-source/index.d.ts +0 -4
- package/dist/data-source/options/index.d.ts +0 -4
- package/dist/data-source/options/module.d.ts +0 -8
- package/dist/data-source/options/singleton.d.ts +0 -4
- package/dist/data-source/options/type.d.ts +0 -26
- package/dist/data-source/options/utils/env.d.ts +0 -4
- package/dist/data-source/options/utils/index.d.ts +0 -2
- package/dist/data-source/options/utils/merge.d.ts +0 -2
- package/dist/data-source/singleton.d.ts +0 -5
- package/dist/data-source/type.d.ts +0 -2
- package/dist/database/driver/cockroachdb.d.ts +0 -4
- package/dist/database/driver/index.d.ts +0 -9
- package/dist/database/driver/mongodb.d.ts +0 -6
- package/dist/database/driver/mssql.d.ts +0 -6
- package/dist/database/driver/mysql.d.ts +0 -7
- package/dist/database/driver/oracle.d.ts +0 -6
- package/dist/database/driver/postgres.d.ts +0 -8
- package/dist/database/driver/sqlite.d.ts +0 -3
- package/dist/database/driver/types.d.ts +0 -20
- package/dist/database/driver/utils/build.d.ts +0 -3
- package/dist/database/driver/utils/character-set.d.ts +0 -2
- package/dist/database/driver/utils/charset.d.ts +0 -2
- package/dist/database/driver/utils/create.d.ts +0 -2
- package/dist/database/driver/utils/index.d.ts +0 -4
- package/dist/database/index.d.ts +0 -3
- package/dist/database/methods/check/index.d.ts +0 -2
- package/dist/database/methods/check/module.d.ts +0 -7
- package/dist/database/methods/check/types.d.ts +0 -51
- package/dist/database/methods/create/index.d.ts +0 -1
- package/dist/database/methods/create/module.d.ts +0 -10
- package/dist/database/methods/drop/index.d.ts +0 -1
- package/dist/database/methods/drop/module.d.ts +0 -10
- package/dist/database/methods/index.d.ts +0 -4
- package/dist/database/methods/type.d.ts +0 -43
- package/dist/database/utils/context.d.ts +0 -3
- package/dist/database/utils/index.d.ts +0 -5
- package/dist/database/utils/migration.d.ts +0 -2
- package/dist/database/utils/query.d.ts +0 -3
- package/dist/database/utils/schema.d.ts +0 -3
- package/dist/database/utils/type.d.ts +0 -32
- package/dist/env/constants.d.ts +0 -68
- package/dist/env/index.d.ts +0 -3
- package/dist/env/module.d.ts +0 -4
- package/dist/env/type.d.ts +0 -36
- package/dist/env/utils.d.ts +0 -3
- package/dist/errors/base.d.ts +0 -2
- package/dist/errors/driver.d.ts +0 -6
- package/dist/errors/index.d.ts +0 -3
- package/dist/errors/options.d.ts +0 -7
- package/dist/helpers/entity/error.d.ts +0 -20
- package/dist/helpers/entity/index.d.ts +0 -5
- package/dist/helpers/entity/join-columns.d.ts +0 -16
- package/dist/helpers/entity/metadata.d.ts +0 -10
- package/dist/helpers/entity/property-names.d.ts +0 -11
- package/dist/helpers/entity/uniqueness.d.ts +0 -28
- package/dist/helpers/index.d.ts +0 -1
- package/dist/index.cjs +0 -3258
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts +0 -9
- package/dist/query/index.d.ts +0 -4
- package/dist/query/module.d.ts +0 -5
- package/dist/query/parameter/fields/index.d.ts +0 -2
- package/dist/query/parameter/fields/module.d.ts +0 -25
- package/dist/query/parameter/fields/type.d.ts +0 -6
- package/dist/query/parameter/filters/index.d.ts +0 -2
- package/dist/query/parameter/filters/module.d.ts +0 -35
- package/dist/query/parameter/filters/type.d.ts +0 -12
- package/dist/query/parameter/index.d.ts +0 -5
- package/dist/query/parameter/pagination/index.d.ts +0 -2
- package/dist/query/parameter/pagination/module.d.ts +0 -26
- package/dist/query/parameter/pagination/type.d.ts +0 -3
- package/dist/query/parameter/relations/index.d.ts +0 -2
- package/dist/query/parameter/relations/module.d.ts +0 -27
- package/dist/query/parameter/relations/type.d.ts +0 -8
- package/dist/query/parameter/sort/index.d.ts +0 -2
- package/dist/query/parameter/sort/module.d.ts +0 -26
- package/dist/query/parameter/sort/type.d.ts +0 -6
- package/dist/query/type.d.ts +0 -16
- package/dist/query/utils/alias.d.ts +0 -2
- package/dist/query/utils/index.d.ts +0 -3
- package/dist/query/utils/key.d.ts +0 -1
- package/dist/query/utils/option.d.ts +0 -1
- package/dist/seeder/entity.d.ts +0 -42
- package/dist/seeder/executor.d.ts +0 -24
- package/dist/seeder/factory/index.d.ts +0 -4
- package/dist/seeder/factory/manager.d.ts +0 -8
- package/dist/seeder/factory/module.d.ts +0 -17
- package/dist/seeder/factory/type.d.ts +0 -12
- package/dist/seeder/factory/utils.d.ts +0 -7
- package/dist/seeder/index.d.ts +0 -6
- package/dist/seeder/module.d.ts +0 -5
- package/dist/seeder/type.d.ts +0 -44
- package/dist/seeder/utils/file-path.d.ts +0 -7
- package/dist/seeder/utils/index.d.ts +0 -3
- package/dist/seeder/utils/prepare.d.ts +0 -2
- package/dist/seeder/utils/template.d.ts +0 -1
- package/dist/utils/code-transformation/constants.d.ts +0 -4
- package/dist/utils/code-transformation/index.d.ts +0 -2
- package/dist/utils/code-transformation/module.d.ts +0 -3
- package/dist/utils/entity.d.ts +0 -2
- package/dist/utils/file-path.d.ts +0 -9
- package/dist/utils/file-system.d.ts +0 -1
- package/dist/utils/has-property.d.ts +0 -2
- package/dist/utils/index.d.ts +0 -10
- package/dist/utils/object.d.ts +0 -2
- package/dist/utils/promise.d.ts +0 -1
- package/dist/utils/separator.d.ts +0 -3
- package/dist/utils/slash.d.ts +0 -2
- package/dist/utils/tsconfig/index.d.ts +0 -2
- package/dist/utils/tsconfig/module.d.ts +0 -2
- package/dist/utils/tsconfig/type.d.ts +0 -13
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { DatabaseCreateContextInput, DatabaseDropContextInput } from '../methods';
|
|
2
|
-
export declare function executeSimpleCockroachDBQuery(connection: any, query: string, endConnection?: boolean): Promise<unknown>;
|
|
3
|
-
export declare function createCockroachDBDatabase(input?: DatabaseCreateContextInput): Promise<unknown>;
|
|
4
|
-
export declare function dropCockroachDBDatabase(input?: DatabaseDropContextInput): Promise<unknown>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { MongoDriver } from 'typeorm/driver/mongodb/MongoDriver';
|
|
2
|
-
import type { DatabaseCreateContextInput, DatabaseDropContextInput } from '../methods';
|
|
3
|
-
import type { DriverOptions } from './types';
|
|
4
|
-
export declare function createSimpleMongoDBConnection(driver: MongoDriver, options: DriverOptions): Promise<any>;
|
|
5
|
-
export declare function createMongoDBDatabase(input?: DatabaseCreateContextInput): Promise<void>;
|
|
6
|
-
export declare function dropMongoDBDatabase(input?: DatabaseDropContextInput): Promise<any>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { SqlServerDriver } from 'typeorm/driver/sqlserver/SqlServerDriver';
|
|
2
|
-
import type { DatabaseCreateContextInput, DatabaseDropContextInput } from '../methods';
|
|
3
|
-
import type { DriverOptions } from './types';
|
|
4
|
-
export declare function createSimpleMsSQLConnection(driver: SqlServerDriver, options: DriverOptions): Promise<any>;
|
|
5
|
-
export declare function createMsSQLDatabase(input?: DatabaseCreateContextInput): Promise<any>;
|
|
6
|
-
export declare function dropMsSQLDatabase(input?: DatabaseDropContextInput): Promise<any>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { MysqlDriver } from 'typeorm/driver/mysql/MysqlDriver';
|
|
2
|
-
import type { DatabaseCreateContextInput, DatabaseDropContextInput } from '../methods';
|
|
3
|
-
import type { DriverOptions } from './types';
|
|
4
|
-
export declare function createSimpleMySQLConnection(driver: MysqlDriver, options: DriverOptions): Promise<any>;
|
|
5
|
-
export declare function executeSimpleMysqlQuery(connection: any, query: string, endConnection?: boolean): Promise<unknown>;
|
|
6
|
-
export declare function createMySQLDatabase(input?: DatabaseCreateContextInput): Promise<unknown>;
|
|
7
|
-
export declare function dropMySQLDatabase(input?: DatabaseDropContextInput): Promise<unknown>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { OracleDriver } from 'typeorm/driver/oracle/OracleDriver';
|
|
2
|
-
import type { DatabaseCreateContextInput, DatabaseDropContextInput } from '../methods';
|
|
3
|
-
import type { DriverOptions } from './types';
|
|
4
|
-
export declare function createSimpleOracleConnection(driver: OracleDriver, options: DriverOptions): any;
|
|
5
|
-
export declare function createOracleDatabase(input?: DatabaseCreateContextInput): Promise<any>;
|
|
6
|
-
export declare function dropOracleDatabase(_context?: DatabaseDropContextInput): Promise<void>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { PostgresDriver } from 'typeorm/driver/postgres/PostgresDriver';
|
|
2
|
-
import type { CockroachDriver } from 'typeorm/driver/cockroachdb/CockroachDriver';
|
|
3
|
-
import type { DatabaseBaseContext, DatabaseCreateContextInput, DatabaseDropContextInput } from '../methods';
|
|
4
|
-
import type { DriverOptions } from './types';
|
|
5
|
-
export declare function createSimplePostgresConnection(driver: PostgresDriver | CockroachDriver, options: DriverOptions, operationContext: DatabaseBaseContext): Promise<any>;
|
|
6
|
-
export declare function executeSimplePostgresQuery(connection: any, query: string, endConnection?: boolean): Promise<unknown>;
|
|
7
|
-
export declare function createPostgresDatabase(input?: DatabaseCreateContextInput): Promise<unknown>;
|
|
8
|
-
export declare function dropPostgresDatabase(input?: DatabaseDropContextInput): Promise<unknown>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { DatabaseCreateContextInput, DatabaseDropContextInput } from '../methods';
|
|
2
|
-
export declare function createSQLiteDatabase(input?: DatabaseCreateContextInput): Promise<void>;
|
|
3
|
-
export declare function dropSQLiteDatabase(input?: DatabaseDropContextInput): Promise<void>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export type DriverOptions = {
|
|
2
|
-
database?: string;
|
|
3
|
-
host?: string;
|
|
4
|
-
user?: string;
|
|
5
|
-
password?: string;
|
|
6
|
-
port?: number;
|
|
7
|
-
ssl?: any;
|
|
8
|
-
url?: string;
|
|
9
|
-
connectString?: string;
|
|
10
|
-
sid?: string | number;
|
|
11
|
-
serviceName?: string;
|
|
12
|
-
domain?: string;
|
|
13
|
-
charset?: string;
|
|
14
|
-
characterSet?: string;
|
|
15
|
-
schema?: string;
|
|
16
|
-
template?: string;
|
|
17
|
-
extra?: {
|
|
18
|
-
[key: string]: any;
|
|
19
|
-
};
|
|
20
|
-
};
|
package/dist/database/index.d.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import type { DataSource, DataSourceOptions, Migration } from 'typeorm';
|
|
2
|
-
export type DatabaseCheckContext = {
|
|
3
|
-
/**
|
|
4
|
-
* Options for finding the typeorm DataSource.
|
|
5
|
-
*
|
|
6
|
-
* Default: undefined
|
|
7
|
-
*/
|
|
8
|
-
options?: DataSourceOptions;
|
|
9
|
-
/**
|
|
10
|
-
* Use alias to access already registered DataSource / DataSourceOptions.
|
|
11
|
-
*
|
|
12
|
-
* default: undefined
|
|
13
|
-
*/
|
|
14
|
-
alias?: string;
|
|
15
|
-
/**
|
|
16
|
-
* Indicates whether to destroy the data-source
|
|
17
|
-
* afterward or not.
|
|
18
|
-
* If a datasource previously existed, this option will be ignored.
|
|
19
|
-
*
|
|
20
|
-
* default: true
|
|
21
|
-
*/
|
|
22
|
-
dataSourceCleanup?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Use predefined data-source for checks.
|
|
25
|
-
*
|
|
26
|
-
* default: undefined
|
|
27
|
-
*/
|
|
28
|
-
dataSource?: DataSource;
|
|
29
|
-
};
|
|
30
|
-
export type DatabaseCheckResult = {
|
|
31
|
-
/**
|
|
32
|
-
* Indicates whether the database
|
|
33
|
-
* has already been created or not.
|
|
34
|
-
*
|
|
35
|
-
* default: false
|
|
36
|
-
*/
|
|
37
|
-
exists: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Indicates whether the database's schema
|
|
40
|
-
* is up-to-date.
|
|
41
|
-
*
|
|
42
|
-
* default: false
|
|
43
|
-
*/
|
|
44
|
-
schema: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Array of un applied migrations.
|
|
47
|
-
*
|
|
48
|
-
* default: []
|
|
49
|
-
*/
|
|
50
|
-
migrationsPending: Migration[];
|
|
51
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './module';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { DatabaseCreateContextInput } from '../type';
|
|
2
|
-
/**
|
|
3
|
-
* Create database for specified driver in ConnectionOptions.
|
|
4
|
-
*
|
|
5
|
-
* @throws DriverError
|
|
6
|
-
* @throws OptionsError
|
|
7
|
-
*
|
|
8
|
-
* @param input
|
|
9
|
-
*/
|
|
10
|
-
export declare function createDatabase(input?: DatabaseCreateContextInput): Promise<unknown>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './module';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { DatabaseDropContextInput } from '../type';
|
|
2
|
-
/**
|
|
3
|
-
* Drop database for specified driver in ConnectionOptions.
|
|
4
|
-
*
|
|
5
|
-
* @throws DriverError
|
|
6
|
-
* @throws OptionsError
|
|
7
|
-
*
|
|
8
|
-
* @param input
|
|
9
|
-
*/
|
|
10
|
-
export declare function dropDatabase(input?: DatabaseDropContextInput): Promise<unknown>;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { DataSourceOptions } from 'typeorm';
|
|
2
|
-
import type { DataSourceFindOptions } from '../../data-source';
|
|
3
|
-
export type DatabaseBaseContext = {
|
|
4
|
-
/**
|
|
5
|
-
* Options for finding the typeorm DataSource.
|
|
6
|
-
*/
|
|
7
|
-
options: DataSourceOptions;
|
|
8
|
-
/**
|
|
9
|
-
* Options for the find method, where to look for the data-source file.
|
|
10
|
-
*/
|
|
11
|
-
findOptions?: DataSourceFindOptions;
|
|
12
|
-
/**
|
|
13
|
-
* Initial database to connect.
|
|
14
|
-
*
|
|
15
|
-
* default: undefined
|
|
16
|
-
*/
|
|
17
|
-
initialDatabase?: string;
|
|
18
|
-
};
|
|
19
|
-
export type DatabaseBaseContextInput = Partial<DatabaseBaseContext>;
|
|
20
|
-
export type DatabaseCreateContext = Omit<DatabaseBaseContext, 'findOptions'> & {
|
|
21
|
-
/**
|
|
22
|
-
* Only create database if not already exist.
|
|
23
|
-
*
|
|
24
|
-
* default: true
|
|
25
|
-
*/
|
|
26
|
-
ifNotExist: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Synchronize or migrate the database scheme.
|
|
29
|
-
*
|
|
30
|
-
* default: true
|
|
31
|
-
*/
|
|
32
|
-
synchronize: boolean;
|
|
33
|
-
};
|
|
34
|
-
export type DatabaseCreateContextInput = Partial<DatabaseCreateContext>;
|
|
35
|
-
export type DatabaseDropContext = Omit<DatabaseBaseContext, 'findOptions'> & {
|
|
36
|
-
/**
|
|
37
|
-
* Only drop database if existed.
|
|
38
|
-
*
|
|
39
|
-
* Default: true
|
|
40
|
-
*/
|
|
41
|
-
ifExist?: boolean;
|
|
42
|
-
};
|
|
43
|
-
export type DatabaseDropContextInput = Partial<DatabaseDropContext>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { DatabaseCreateContext, DatabaseCreateContextInput, DatabaseDropContext, DatabaseDropContextInput } from '../methods';
|
|
2
|
-
export declare function buildDatabaseCreateContext(input?: DatabaseCreateContextInput): Promise<DatabaseCreateContext>;
|
|
3
|
-
export declare function buildDatabaseDropContext(input?: DatabaseDropContextInput): Promise<DatabaseDropContext>;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { DataSource } from 'typeorm';
|
|
2
|
-
export type MigrationGenerateResult = {
|
|
3
|
-
up: string[];
|
|
4
|
-
down: string[];
|
|
5
|
-
content?: string;
|
|
6
|
-
};
|
|
7
|
-
export type MigrationGenerateCommandContext = {
|
|
8
|
-
/**
|
|
9
|
-
* Directory where the migration(s) should be stored.
|
|
10
|
-
*/
|
|
11
|
-
directoryPath?: string;
|
|
12
|
-
/**
|
|
13
|
-
* Name of the migration class.
|
|
14
|
-
*/
|
|
15
|
-
name?: string;
|
|
16
|
-
/**
|
|
17
|
-
* DataSource used for reference of existing schema.
|
|
18
|
-
*/
|
|
19
|
-
dataSource: DataSource;
|
|
20
|
-
/**
|
|
21
|
-
* Timestamp in milliseconds.
|
|
22
|
-
*/
|
|
23
|
-
timestamp?: number;
|
|
24
|
-
/**
|
|
25
|
-
* Prettify sql statements.
|
|
26
|
-
*/
|
|
27
|
-
prettify?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Only return up- & down-statements instead of backing up the migration to the file system.
|
|
30
|
-
*/
|
|
31
|
-
preview?: boolean;
|
|
32
|
-
};
|
package/dist/env/constants.d.ts
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
export declare enum EnvironmentName {
|
|
2
|
-
DEVELOPMENT = "development",
|
|
3
|
-
PRODUCTION = "production",
|
|
4
|
-
TEST = "test"
|
|
5
|
-
}
|
|
6
|
-
export declare enum EnvironmentVariableName {
|
|
7
|
-
ENV = "NODE_ENV",
|
|
8
|
-
SEEDS = "DB_SEEDS",
|
|
9
|
-
SEEDS_ALT = "TYPEORM_SEEDING_SEEDS",
|
|
10
|
-
FACTORIES = "DB_FACTORIES",
|
|
11
|
-
FACTORIES_ALT = "TYPEORM_SEEDING_FACTORIES",
|
|
12
|
-
TYPE = "DB_TYPE",
|
|
13
|
-
TYPE_ALT = "TYPEORM_CONNECTION",
|
|
14
|
-
URL = "DB_URL",
|
|
15
|
-
URL_ALT = "TYPEORM_URL",
|
|
16
|
-
HOST = "DB_HOST",
|
|
17
|
-
HOST_ALT = "TYPEORM_HOST",
|
|
18
|
-
PORT = "DB_PORT",
|
|
19
|
-
PORT_ALT = "TYPEORM_PORT",
|
|
20
|
-
USERNAME = "DB_USERNAME",
|
|
21
|
-
USERNAME_ALT = "TYPEORM_USERNAME",
|
|
22
|
-
PASSWORD = "DB_PASSWORD",
|
|
23
|
-
PASSWORD_ALT = "TYPEORM_PASSWORD",
|
|
24
|
-
DATABASE = "DB_DATABASE",
|
|
25
|
-
DATABASE_ALT = "TYPEORM_DATABASE",
|
|
26
|
-
SID = "DB_SID",
|
|
27
|
-
SID_ALT = "TYPEORM_SID",
|
|
28
|
-
SCHEMA = "DB_SCHEMA",
|
|
29
|
-
SCHEMA_ALT = "TYPEORM_SCHEMA",
|
|
30
|
-
SCHEMA_DROP = "DB_DROP_SCHEMA",
|
|
31
|
-
SCHEMA_DROP_ALT = "TYPEORM_DROP_SCHEMA",
|
|
32
|
-
DRIVER_EXTRA = "DB_DRIVER_EXTRA",
|
|
33
|
-
DRIVER_EXTRA_ALT = "TYPEORM_DRIVER_EXTRA",
|
|
34
|
-
SYNCHRONIZE = "DB_SYNCHRONIZE",
|
|
35
|
-
SYNCHRONIZE_ALT = "TYPEORM_SYNCHRONIZE",
|
|
36
|
-
MIGRATIONS = "DB_MIGRATIONS",
|
|
37
|
-
MIGRATIONS_ALT = "TYPEORM_MIGRATIONS",
|
|
38
|
-
MIGRATIONS_RUN = "DB_MIGRATIONS_RUN",
|
|
39
|
-
MIGRATIONS_RUN_ALT = "TYPEORM_MIGRATIONS_RUN",
|
|
40
|
-
MIGRATIONS_TABLE_NAME = "DB_MIGRATIONS_TABLE_NAME",
|
|
41
|
-
MIGRATIONS_TABLE_NAME_ALT = "TYPEORM_MIGRATIONS_TABLE_NAME",
|
|
42
|
-
ENTITIES = "DB_ENTITIES",
|
|
43
|
-
ENTITIES_ALT = "TYPEORM_ENTITIES",
|
|
44
|
-
ENTITY_PREFIX = "DB_ENTITY_PREFIX",
|
|
45
|
-
ENTITY_PREFIX_ALT = "TYPEORM_ENTITY_PREFIX",
|
|
46
|
-
METADATA_TABLE_NAME = "DB_METADATA_TABLE_NAME",
|
|
47
|
-
METADATA_TABLE_NAME_ALT = "TYPEORM_METADATA_TABLE_NAME",
|
|
48
|
-
SUBSCRIBERS = "DB_SUBSCRIBERS",
|
|
49
|
-
SUBSCRIBERS_ALT = "TYPEORM_SUBSCRIBERS",
|
|
50
|
-
LOGGING = "DB_LOGGING",
|
|
51
|
-
LOGGING_ALT = "TYPEORM_LOGGING",
|
|
52
|
-
LOGGER = "DB_LOGGER",
|
|
53
|
-
LOGGER_ALT = "TYPEORM_LOGGER",
|
|
54
|
-
MAX_QUERY_EXECUTION_TIME = "DB_MAX_QUERY_EXECUTION_TIME",
|
|
55
|
-
MAX_QUERY_EXECUTION_TIME_ALT = "TYPEORM_MAX_QUERY_EXECUTION_TIME",
|
|
56
|
-
DEBUG = "DB_DEBUG",
|
|
57
|
-
DEBUG_ALT = "TYPEORM_DEBUG",
|
|
58
|
-
UUID_EXTENSION = "DB_UUID_EXTENSION",
|
|
59
|
-
UUID_EXTENSION_ALT = "TYPEORM_UUID_EXTENSION",
|
|
60
|
-
CACHE = "DB_CACHE",
|
|
61
|
-
CACHE_ALT = "TYPEORM_CACHE",
|
|
62
|
-
CACHE_ALWAYS_ENABLED = "DB_CACHE_ALWAYS_ENABLED",
|
|
63
|
-
CACHE_ALWAYS_ENABLED_ALT = "TYPEORM_CACHE_ALWAYS_ENABLED",
|
|
64
|
-
CACHE_OPTIONS = "DB_CACHE_OPTIONS",
|
|
65
|
-
CACHE_OPTIONS_ALT = "TYPEORM_CACHE_OPTIONS",
|
|
66
|
-
CACHE_DURATION = "DB_CACHE_DURATION",
|
|
67
|
-
CACHE_DURATION_ALT = "TYPEORM_CACHE_DURATION"
|
|
68
|
-
}
|
package/dist/env/index.d.ts
DELETED
package/dist/env/module.d.ts
DELETED
package/dist/env/type.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { DatabaseType } from 'typeorm/driver/types/DatabaseType';
|
|
2
|
-
import type { DataSourceCacheOption } from '../data-source';
|
|
3
|
-
import type { EnvironmentName } from './constants';
|
|
4
|
-
export interface Environment {
|
|
5
|
-
env: `${EnvironmentName}`;
|
|
6
|
-
seeds: string[];
|
|
7
|
-
factories: string[];
|
|
8
|
-
type?: DatabaseType;
|
|
9
|
-
url?: string;
|
|
10
|
-
host?: string;
|
|
11
|
-
port?: number;
|
|
12
|
-
username?: string;
|
|
13
|
-
password?: string;
|
|
14
|
-
database?: string;
|
|
15
|
-
sid?: string;
|
|
16
|
-
schema?: string;
|
|
17
|
-
/**
|
|
18
|
-
* dropSchema
|
|
19
|
-
*/
|
|
20
|
-
schemaDrop?: boolean;
|
|
21
|
-
extra?: any;
|
|
22
|
-
synchronize?: boolean;
|
|
23
|
-
migrations: string[];
|
|
24
|
-
migrationsRun?: boolean;
|
|
25
|
-
migrationsTableName?: string;
|
|
26
|
-
entities: string[];
|
|
27
|
-
entityPrefix?: string;
|
|
28
|
-
metadataTableName?: string;
|
|
29
|
-
subscribers: string[];
|
|
30
|
-
logging: string[] | boolean | string;
|
|
31
|
-
logger?: string;
|
|
32
|
-
maxQueryExecutionTime?: number;
|
|
33
|
-
debug?: string;
|
|
34
|
-
cache?: DataSourceCacheOption;
|
|
35
|
-
uuidExtension?: string;
|
|
36
|
-
}
|
package/dist/env/utils.d.ts
DELETED
package/dist/errors/base.d.ts
DELETED
package/dist/errors/driver.d.ts
DELETED
package/dist/errors/index.d.ts
DELETED
package/dist/errors/options.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { TypeormExtensionError } from './base';
|
|
2
|
-
export declare class OptionsError extends TypeormExtensionError {
|
|
3
|
-
constructor(message?: string);
|
|
4
|
-
static undeterminable(): OptionsError;
|
|
5
|
-
static notFound(): OptionsError;
|
|
6
|
-
static databaseNotDefined(): OptionsError;
|
|
7
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { TypeormExtensionError } from '../../errors';
|
|
2
|
-
type TypeormRelationLookupErrorOptions = {
|
|
3
|
-
message: string;
|
|
4
|
-
relation: string;
|
|
5
|
-
columns: string[];
|
|
6
|
-
};
|
|
7
|
-
export declare class EntityRelationLookupError extends TypeormExtensionError {
|
|
8
|
-
/**
|
|
9
|
-
* The property name of the relation.
|
|
10
|
-
*/
|
|
11
|
-
relation: string;
|
|
12
|
-
/**
|
|
13
|
-
* The property names of the join columns.
|
|
14
|
-
*/
|
|
15
|
-
columns: string[];
|
|
16
|
-
constructor(options: TypeormRelationLookupErrorOptions);
|
|
17
|
-
static notReferenced(relation: string, columns: string[]): EntityRelationLookupError;
|
|
18
|
-
static notFound(relation: string, columns: string[]): EntityRelationLookupError;
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { ObjectLiteral } from 'rapiq';
|
|
2
|
-
import type { DataSource, EntityTarget } from 'typeorm';
|
|
3
|
-
type EntityRelationColumnsValidateOptions<T> = {
|
|
4
|
-
dataSource?: DataSource;
|
|
5
|
-
entityTarget: EntityTarget<T>;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Validate join columns of a given entity.
|
|
9
|
-
* It will look up and append the referenced entities to the input entity.
|
|
10
|
-
*
|
|
11
|
-
* @experimental
|
|
12
|
-
* @param entity
|
|
13
|
-
* @param options
|
|
14
|
-
*/
|
|
15
|
-
export declare function validateEntityJoinColumns<T extends ObjectLiteral>(entity: Partial<T>, options: EntityRelationColumnsValidateOptions<T>): Promise<Partial<T>>;
|
|
16
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Repository } from 'typeorm';
|
|
2
|
-
import type { DataSource, EntityMetadata, EntityTarget, ObjectLiteral } from 'typeorm';
|
|
3
|
-
/**
|
|
4
|
-
* Receive metadata for a given repository or entity-target.
|
|
5
|
-
*
|
|
6
|
-
* @experimental
|
|
7
|
-
* @param input
|
|
8
|
-
* @param dataSource
|
|
9
|
-
*/
|
|
10
|
-
export declare function getEntityMetadata<T extends ObjectLiteral>(input: Repository<T> | EntityTarget<T>, dataSource?: DataSource): Promise<EntityMetadata>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { ObjectLiteral } from 'rapiq';
|
|
2
|
-
import { Repository } from 'typeorm';
|
|
3
|
-
import type { DataSource, EntityTarget } from 'typeorm';
|
|
4
|
-
/**
|
|
5
|
-
* Get (relation-) property names of a given entity.
|
|
6
|
-
*
|
|
7
|
-
* @experimental
|
|
8
|
-
* @param input
|
|
9
|
-
* @param dataSource
|
|
10
|
-
*/
|
|
11
|
-
export declare function getEntityPropertyNames<T extends ObjectLiteral>(input: EntityTarget<T> | Repository<T>, dataSource?: DataSource): Promise<string[]>;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { DataSource, EntityTarget, ObjectLiteral } from 'typeorm';
|
|
2
|
-
type EntityUniquenessCheckOptions<T> = {
|
|
3
|
-
/**
|
|
4
|
-
* Repository entity class.
|
|
5
|
-
*/
|
|
6
|
-
entityTarget: EntityTarget<T>;
|
|
7
|
-
/**
|
|
8
|
-
* Entity to insert/update.
|
|
9
|
-
*/
|
|
10
|
-
entity: Partial<T>;
|
|
11
|
-
/**
|
|
12
|
-
* Entity found.
|
|
13
|
-
*/
|
|
14
|
-
entityExisting?: Partial<T> | null;
|
|
15
|
-
/**
|
|
16
|
-
* DataSource to use
|
|
17
|
-
*/
|
|
18
|
-
dataSource?: DataSource;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Check if a given entity does not already exist.
|
|
22
|
-
* Composite unique keys on a null column can only be present once.
|
|
23
|
-
*
|
|
24
|
-
* @experimental
|
|
25
|
-
* @param options
|
|
26
|
-
*/
|
|
27
|
-
export declare function isEntityUnique<T extends ObjectLiteral>(options: EntityUniquenessCheckOptions<T>): Promise<boolean>;
|
|
28
|
-
export {};
|
package/dist/helpers/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './entity';
|