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AAC,cAAc,CAAC,CAAC,iBAAiB,CAAS,WAAW,CAAC,CAAC;AAC7F,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAI,gBAA+B,EAAE,cAAkC;IAAlC,+BAAA,EAAA,0BAAkC;IACtG,OAAO,oBAAoB,EAAE,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;AAC5F,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAS,WAAsC,EAAE,cAAkC;IAAlC,+BAAA,EAAA,0BAAkC;IACjH,OAAO,oBAAoB,EAAE,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,kBAAkB,CAAS,WAAW,CAAC,CAAC;AAC9F,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAS,WAAuC,EAAE,KAAc,EAAE,cAAkC;IAAlC,+BAAA,EAAA,0BAAkC;IAClI,IAAI,WAAW,EAAE;QACb,OAAO,aAAa,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;KAC/E;IAED,OAAO,aAAa,CAAC,cAAc,CAAC,CAAC,kBAAkB,EAAE,CAAC;AAC9D,CAAC","file":"index.js","sourcesContent":["/*!\n */\nimport \"reflect-metadata\";\nimport {ConnectionManager} from \"./connection/ConnectionManager\";\nimport {Connection} from \"./connection/Connection\";\nimport {MetadataArgsStorage} from \"./metadata-args/MetadataArgsStorage\";\nimport {ConnectionOptions} from \"./connection/ConnectionOptions\";\nimport {getFromContainer} from \"./container\";\nimport {ObjectType} from \"./common/ObjectType\";\nimport {Repository} from \"./repository/Repository\";\nimport {EntityManager} from \"./entity-manager/EntityManager\";\nimport {PlatformTools} from \"./platform/PlatformTools\";\nimport {TreeRepository} from \"./repository/TreeRepository\";\nimport {MongoRepository} from \"./repository/MongoRepository\";\nimport {ConnectionOptionsReader} from \"./connection/ConnectionOptionsReader\";\nimport {PromiseUtils} from \"./util/PromiseUtils\";\nimport {MongoEntityManager} from \"./entity-manager/MongoEntityManager\";\nimport {SqljsEntityManager} from \"./entity-manager/SqljsEntityManager\";\nimport {SelectQueryBuilder} from \"./query-builder/SelectQueryBuilder\";\nimport {EntitySchema} from \"./entity-schema/EntitySchema\";\n\n// -------------------------------------------------------------------------\n// Commonly Used exports\n// -------------------------------------------------------------------------\n\nexport * from \"./container\";\nexport * from \"./common/ObjectType\";\nexport * from \"./common/ObjectLiteral\";\nexport * from \"./common/DeepPartial\";\nexport * from \"./error/QueryFailedError\";\nexport * from \"./decorator/columns/Column\";\nexport * from \"./decorator/columns/CreateDateColumn\";\nexport * from \"./decorator/columns/PrimaryGeneratedColumn\";\nexport * from \"./decorator/columns/PrimaryColumn\";\nexport * from \"./decorator/columns/UpdateDateColumn\";\nexport * from \"./decorator/columns/VersionColumn\";\nexport * from \"./decorator/columns/ViewColumn\";\nexport * from \"./decorator/columns/ObjectIdColumn\";\nexport * from \"./decorator/listeners/AfterInsert\";\nexport * from \"./decorator/listeners/AfterLoad\";\nexport * from \"./decorator/listeners/AfterRemove\";\nexport * from \"./decorator/listeners/AfterUpdate\";\nexport * from \"./decorator/listeners/BeforeInsert\";\nexport * from \"./decorator/listeners/BeforeRemove\";\nexport * from \"./decorator/listeners/BeforeUpdate\";\nexport * from \"./decorator/listeners/EventSubscriber\";\nexport * from \"./decorator/options/ColumnOptions\";\nexport * from \"./decorator/options/IndexOptions\";\nexport * from \"./decorator/options/JoinColumnOptions\";\nexport * from \"./decorator/options/JoinTableOptions\";\nexport * from \"./decorator/options/RelationOptions\";\nexport * from \"./decorator/options/EntityOptions\";\nexport * from \"./decorator/options/ValueTransformer\";\nexport * from \"./decorator/relations/JoinColumn\";\nexport * from \"./decorator/relations/JoinTable\";\nexport * from \"./decorator/relations/ManyToMany\";\nexport * from \"./decorator/relations/ManyToOne\";\nexport * from \"./decorator/relations/OneToMany\";\nexport * from \"./decorator/relations/OneToOne\";\nexport * from \"./decorator/relations/RelationCount\";\nexport * from \"./decorator/relations/RelationId\";\nexport * from \"./decorator/entity/Entity\";\nexport * from \"./decorator/entity/ChildEntity\";\nexport * from \"./decorator/entity/TableInheritance\";\nexport * from \"./decorator/entity-view/ViewEntity\";\nexport * from \"./decorator/transaction/Transaction\";\nexport * from \"./decorator/transaction/TransactionManager\";\nexport * from \"./decorator/transaction/TransactionRepository\";\nexport * from \"./decorator/tree/TreeLevelColumn\";\nexport * from \"./decorator/tree/TreeParent\";\nexport * from \"./decorator/tree/TreeChildren\";\nexport * from \"./decorator/tree/Tree\";\nexport * from \"./decorator/Index\";\nexport * from \"./decorator/Unique\";\nexport * from \"./decorator/Check\";\nexport * from \"./decorator/Exclusion\";\nexport * from \"./decorator/Generated\";\nexport * from \"./decorator/EntityRepository\";\nexport * from \"./find-options/operator/Any\";\nexport * from \"./find-options/operator/Between\";\nexport * from \"./find-options/operator/Equal\";\nexport * from \"./find-options/operator/In\";\nexport * from \"./find-options/operator/IsNull\";\nexport * from \"./find-options/operator/LessThan\";\nexport * from \"./find-options/operator/LessThanOrEqual\";\nexport * from \"./find-options/operator/Like\";\nexport * from \"./find-options/operator/MoreThan\";\nexport * from \"./find-options/operator/MoreThanOrEqual\";\nexport * from \"./find-options/operator/Not\";\nexport * from \"./find-options/operator/Raw\";\nexport * from \"./find-options/FindConditions\";\nexport * from \"./find-options/FindManyOptions\";\nexport * from \"./find-options/FindOneOptions\";\nexport * from \"./find-options/FindOperator\";\nexport * from \"./find-options/FindOperatorType\";\nexport * from \"./find-options/JoinOptions\";\nexport * from \"./find-options/OrderByCondition\";\nexport * from \"./logger/Logger\";\nexport * from \"./logger/AdvancedConsoleLogger\";\nexport * from \"./logger/SimpleConsoleLogger\";\nexport * from \"./logger/FileLogger\";\nexport * from \"./metadata/EntityMetadata\";\nexport * from \"./entity-manager/EntityManager\";\nexport * from \"./repository/AbstractRepository\";\nexport * from \"./repository/Repository\";\nexport * from \"./repository/BaseEntity\";\nexport * from \"./repository/TreeRepository\";\nexport * from \"./repository/MongoRepository\";\nexport * from \"./repository/RemoveOptions\";\nexport * from \"./repository/SaveOptions\";\nexport * from \"./schema-builder/table/TableColumn\";\nexport * from \"./schema-builder/table/TableForeignKey\";\nexport * from \"./schema-builder/table/TableIndex\";\nexport * from \"./schema-builder/table/Table\";\nexport * from \"./driver/mongodb/typings\";\nexport * from \"./driver/types/DatabaseType\";\nexport * from \"./driver/sqlserver/MssqlParameter\";\n\nexport {ConnectionOptionsReader} from \"./connection/ConnectionOptionsReader\";\nexport {Connection} from \"./connection/Connection\";\nexport {ConnectionManager} from \"./connection/ConnectionManager\";\nexport {ConnectionOptions} from \"./connection/ConnectionOptions\";\nexport {Driver} from \"./driver/Driver\";\nexport {QueryBuilder} from \"./query-builder/QueryBuilder\";\nexport {SelectQueryBuilder} from \"./query-builder/SelectQueryBuilder\";\nexport {DeleteQueryBuilder} from \"./query-builder/DeleteQueryBuilder\";\nexport {InsertQueryBuilder} from \"./query-builder/InsertQueryBuilder\";\nexport {UpdateQueryBuilder} from \"./query-builder/UpdateQueryBuilder\";\nexport {RelationQueryBuilder} from \"./query-builder/RelationQueryBuilder\";\nexport {Brackets} from \"./query-builder/Brackets\";\nexport {WhereExpression} from \"./query-builder/WhereExpression\";\nexport {InsertResult} from \"./query-builder/result/InsertResult\";\nexport {UpdateResult} from \"./query-builder/result/UpdateResult\";\nexport {DeleteResult} from \"./query-builder/result/DeleteResult\";\nexport {QueryRunner} from \"./query-runner/QueryRunner\";\nexport {EntityManager} from \"./entity-manager/EntityManager\";\nexport {MongoEntityManager} from \"./entity-manager/MongoEntityManager\";\nexport {MigrationInterface} from \"./migration/MigrationInterface\";\nexport {DefaultNamingStrategy} from \"./naming-strategy/DefaultNamingStrategy\";\nexport {NamingStrategyInterface} from \"./naming-strategy/NamingStrategyInterface\";\nexport {Repository} from \"./repository/Repository\";\nexport {TreeRepository} from \"./repository/TreeRepository\";\nexport {MongoRepository} from \"./repository/MongoRepository\";\nexport {FindOneOptions} from \"./find-options/FindOneOptions\";\nexport {FindManyOptions} from \"./find-options/FindManyOptions\";\nexport {InsertEvent} from \"./subscriber/event/InsertEvent\";\nexport {UpdateEvent} from \"./subscriber/event/UpdateEvent\";\nexport {RemoveEvent} from \"./subscriber/event/RemoveEvent\";\nexport {EntitySubscriberInterface} from \"./subscriber/EntitySubscriberInterface\";\nexport {BaseEntity} from \"./repository/BaseEntity\";\nexport {EntitySchema} from \"./entity-schema/EntitySchema\";\nexport {EntitySchemaColumnOptions} from \"./entity-schema/EntitySchemaColumnOptions\";\nexport {EntitySchemaIndexOptions} from \"./entity-schema/EntitySchemaIndexOptions\";\nexport {EntitySchemaRelationOptions} from \"./entity-schema/EntitySchemaRelationOptions\";\nexport {ColumnType} from \"./driver/types/ColumnTypes\";\nexport {PromiseUtils} from \"./util/PromiseUtils\";\n\n// -------------------------------------------------------------------------\n// Deprecated\n// -------------------------------------------------------------------------\n\n// -------------------------------------------------------------------------\n// Commonly used functionality\n// -------------------------------------------------------------------------\n\n/**\n * Gets metadata args storage.\n */\nexport function getMetadataArgsStorage(): MetadataArgsStorage {\n // we should store metadata storage in a global variable otherwise it brings too much problems\n // one of the problem is that if any entity (or any other) will be imported before consumer will call\n // useContainer method with his own container implementation, that entity will be registered in the\n // old old container (default one post probably) and consumer will his entity.\n // calling useContainer before he imports any entity (or any other) is not always convenient.\n // another reason is that when we run migrations typeorm is being called from a global package\n // and it may load entities which register decorators in typeorm of local package\n // this leads to impossibility of usage of entities in migrations and cli related operations\n const globalScope = PlatformTools.getGlobalVariable();\n if (!globalScope.typeormMetadataArgsStorage)\n globalScope.typeormMetadataArgsStorage = new MetadataArgsStorage();\n\n return globalScope.typeormMetadataArgsStorage;\n}\n\n/**\n * Reads connection options stored in ormconfig configuration file.\n */\nexport async function getConnectionOptions(connectionName: string = \"default\"): Promise<ConnectionOptions> {\n return new ConnectionOptionsReader().get(connectionName);\n}\n\n/**\n * Gets a ConnectionManager which creates connections.\n */\nexport function getConnectionManager(): ConnectionManager {\n return getFromContainer(ConnectionManager);\n}\n\n/**\n * Creates a new connection and registers it in the manager.\n * Only one connection from ormconfig will be created (name \"default\" or connection without name).\n */\nexport async function createConnection(): Promise<Connection>;\n\n/**\n * Creates a new connection from the ormconfig file with a given name.\n */\nexport async function createConnection(name: string): Promise<Connection>;\n\n/**\n * Creates a new connection and registers it in the manager.\n */\nexport async function createConnection(options: ConnectionOptions): Promise<Connection>;\n\n/**\n * Creates a new connection and registers it in the manager.\n *\n * If connection options were not specified, then it will try to create connection automatically,\n * based on content of ormconfig (json/js/yml/xml/env) file or environment variables.\n * Only one connection from ormconfig will be created (name \"default\" or connection without name).\n */\nexport async function createConnection(optionsOrName?: any): Promise<Connection> {\n const connectionName = typeof optionsOrName === \"string\" ? optionsOrName : \"default\";\n const options = optionsOrName instanceof Object ? optionsOrName : await getConnectionOptions(connectionName);\n return getConnectionManager().create(options).connect();\n}\n\n/**\n * Creates new connections and registers them in the manager.\n *\n * If connection options were not specified, then it will try to create connection automatically,\n * based on content of ormconfig (json/js/yml/xml/env) file or environment variables.\n * All connections from the ormconfig will be created.\n */\nexport async function createConnections(options?: ConnectionOptions[]): Promise<Connection[]> {\n if (!options)\n options = await new ConnectionOptionsReader().all();\n const connections = options.map(options => getConnectionManager().create(options));\n return PromiseUtils.runInSequence(connections, connection => connection.connect());\n}\n\n/**\n * Gets connection from the connection manager.\n * If connection name wasn't specified, then \"default\" connection will be retrieved.\n */\nexport function getConnection(connectionName: string = \"default\"): Connection {\n return getConnectionManager().get(connectionName);\n}\n\n/**\n * Gets entity manager from the connection.\n * If connection name wasn't specified, then \"default\" connection will be retrieved.\n */\nexport function getManager(connectionName: string = \"default\"): EntityManager {\n return getConnectionManager().get(connectionName).manager;\n}\n\n/**\n * Gets MongoDB entity manager from the connection.\n * If connection name wasn't specified, then \"default\" connection will be retrieved.\n */\nexport function getMongoManager(connectionName: string = \"default\"): MongoEntityManager {\n return getConnectionManager().get(connectionName).manager as MongoEntityManager;\n}\n\n/**\n * Gets Sqljs entity manager from connection name.\n * \"default\" connection is used, when no name is specified.\n * Only works when Sqljs driver is used.\n */\nexport function getSqljsManager(connectionName: string = \"default\"): SqljsEntityManager {\n return getConnectionManager().get(connectionName).manager as SqljsEntityManager;\n}\n\n/**\n * Gets repository for the given entity class.\n */\nexport function getRepository<Entity>(entityClass: ObjectType<Entity>|EntitySchema<Entity>|string, connectionName: string = \"default\"): Repository<Entity> {\n return getConnectionManager().get(connectionName).getRepository<Entity>(entityClass);\n}\n\n/**\n * Gets tree repository for the given entity class.\n */\nexport function getTreeRepository<Entity>(entityClass: ObjectType<Entity>|string, connectionName: string = \"default\"): TreeRepository<Entity> {\n return getConnectionManager().get(connectionName).getTreeRepository<Entity>(entityClass);\n}\n\n/**\n * Gets tree repository for the given entity class.\n */\nexport function getCustomRepository<T>(customRepository: ObjectType<T>, connectionName: string = \"default\"): T {\n return getConnectionManager().get(connectionName).getCustomRepository(customRepository);\n}\n\n/**\n * Gets mongodb repository for the given entity class or name.\n */\nexport function getMongoRepository<Entity>(entityClass: ObjectType<Entity>|string, connectionName: string = \"default\"): MongoRepository<Entity> {\n return getConnectionManager().get(connectionName).getMongoRepository<Entity>(entityClass);\n}\n\n/**\n * Creates a new query builder.\n */\nexport function createQueryBuilder<Entity>(entityClass?: ObjectType<Entity>|string, alias?: string, connectionName: string = \"default\"): SelectQueryBuilder<Entity> {\n if (entityClass) {\n return getRepository(entityClass, connectionName).createQueryBuilder(alias);\n }\n\n return getConnection(connectionName).createQueryBuilder();\n}\n"],"sourceRoot":"."}
\No newline at end of file