-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js.map
1 lines (1 loc) · 19.8 KB
/
index.js.map
1
{"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";;;;;AAGA,oEAAiE;AAEjE,2EAAwE;AAExE,yCAA6C;AAI7C,0DAAuD;AAIvD,4EAA4E;AAC5E,wBAAwB;AACxB,4EAA4E;AAE5E,iCAA4B;AAG5B,gDAA2C;AAC3C,0DAAqD;AACrD,6DAAwD;AACxD,gEAA2D;AAC3D,uDAAkD;AAClD,0DAAqD;AACrD,uDAAkD;AAClD,wDAAmD;AACnD,uDAAkD;AAClD,qDAAgD;AAChD,uDAAkD;AAClD,uDAAkD;AAClD,wDAAmD;AACnD,wDAAmD;AACnD,wDAAmD;AACnD,2DAAsD;AAOtD,yDAAoD;AACpD,sDAAiD;AACjD,qDAAgD;AAChD,sDAAiD;AACjD,qDAAgD;AAChD,qDAAgD;AAChD,oDAA+C;AAC/C,yDAAoD;AACpD,sDAAiD;AACjD,+CAA0C;AAC1C,uDAAkD;AAClD,yDAAoD;AACpD,sDAAiD;AACjD,yDAAoD;AACpD,0DAAqD;AACrD,+CAA0C;AAC1C,yDAAoD;AACpD,yDAAoD;AACpD,sEAAiE;AACjE,sDAAiD;AACjD,iDAA4C;AAC5C,mDAA8C;AAC9C,uCAAkC;AAClC,gDAA2C;AAC3C,0CAAqC;AACrC,oDAA+C;AAC/C,kDAA6C;AAC7C,0DAAqD;AACrD,8DAAyD;AACzD,yDAAoD;AACpD,8DAAyD;AACzD,yDAAoD;AACpD,8CAAyC;AAEzC,sDAAmD;AAA3C,kCAAA,UAAU,CAAA;AAClB,oEAAiE;AAAzD,gDAAA,iBAAiB,CAAA;AAIzB,6DAA0D;AAAlD,sCAAA,YAAY,CAAA;AAEpB,gEAA6D;AAArD,wCAAA,aAAa,CAAA;AACrB,0EAAuE;AAA/D,kDAAA,kBAAkB,CAAA;AAE1B,iFAA8E;AAAtE,wDAAA,qBAAqB,CAAA;AAE7B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;GAGG;AACH,0BAAiC,cAAkC;IAAlC,+BAAA,EAAA,0BAAkC;IAC/D,MAAM,CAAC,oBAAoB,EAAE,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC;AAC9D,CAAC;AAFD,4CAEC;AAYD;;GAEG;AACH,uBAAsC,iBAA4C,EAAE,cAAkC;IAAlC,+BAAA,EAAA,0BAAkC;IAClH,MAAM,CAAC,oBAAoB,EAAE,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,aAAa,CAAS,iBAAwB,CAAC,CAAC;AACtG,CAAC;AAFD,sCAEC;AAYD;;GAEG;AACH,2BAA0C,iBAA4C,EAAE,cAAkC;IAAlC,+BAAA,EAAA,0BAAkC;IACtH,MAAM,CAAC,oBAAoB,EAAE,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,iBAAiB,CAAS,iBAAwB,CAAC,CAAC;AAC1G,CAAC;AAFD,8CAEC;AAYD;;GAEG;AACH,4BAA2C,iBAA4C,EAAE,cAAkC;IAAlC,+BAAA,EAAA,0BAAkC;IACvH,MAAM,CAAC,oBAAoB,EAAE,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,kBAAkB,CAAS,iBAAwB,CAAC,CAAC;AAC3G,CAAC;AAFD,gDAEC","file":"index.js","sourcesContent":["/*!\r\n */\r\nimport {DriverOptions} from \"./driver/DriverOptions\";\r\nimport {ConnectionManager} from \"./connection/ConnectionManager\";\r\nimport {Connection} from \"./connection/Connection\";\r\nimport {MetadataArgsStorage} from \"./metadata-args/MetadataArgsStorage\";\r\nimport {ConnectionOptions} from \"./connection/ConnectionOptions\";\r\nimport {getFromContainer} from \"./container\";\r\nimport {ObjectType} from \"./common/ObjectType\";\r\nimport {Repository} from \"./repository/Repository\";\r\nimport {EntityManager} from \"./entity-manager/EntityManager\";\r\nimport {PlatformTools} from \"./platform/PlatformTools\";\r\nimport {TreeRepository} from \"./repository/TreeRepository\";\r\nimport {MongoRepository} from \"./repository/MongoRepository\";\r\n\r\n// -------------------------------------------------------------------------\r\n// Commonly Used exports\r\n// -------------------------------------------------------------------------\r\n\r\nexport * from \"./container\";\r\nexport * from \"./common/ObjectType\";\r\nexport * from \"./common/ObjectLiteral\";\r\nexport * from \"./decorator/columns/Column\";\r\nexport * from \"./decorator/columns/CreateDateColumn\";\r\nexport * from \"./decorator/columns/DiscriminatorColumn\";\r\nexport * from \"./decorator/columns/PrimaryGeneratedColumn\";\r\nexport * from \"./decorator/columns/PrimaryColumn\";\r\nexport * from \"./decorator/columns/UpdateDateColumn\";\r\nexport * from \"./decorator/columns/VersionColumn\";\r\nexport * from \"./decorator/columns/ObjectIdColumn\";\r\nexport * from \"./decorator/listeners/AfterInsert\";\r\nexport * from \"./decorator/listeners/AfterLoad\";\r\nexport * from \"./decorator/listeners/AfterRemove\";\r\nexport * from \"./decorator/listeners/AfterUpdate\";\r\nexport * from \"./decorator/listeners/BeforeInsert\";\r\nexport * from \"./decorator/listeners/BeforeRemove\";\r\nexport * from \"./decorator/listeners/BeforeUpdate\";\r\nexport * from \"./decorator/listeners/EventSubscriber\";\r\nexport * from \"./decorator/options/ColumnOptions\";\r\nexport * from \"./decorator/options/IndexOptions\";\r\nexport * from \"./decorator/options/JoinColumnOptions\";\r\nexport * from \"./decorator/options/JoinTableOptions\";\r\nexport * from \"./decorator/options/RelationOptions\";\r\nexport * from \"./decorator/options/EntityOptions\";\r\nexport * from \"./decorator/relations/RelationCount\";\r\nexport * from \"./decorator/relations/JoinColumn\";\r\nexport * from \"./decorator/relations/JoinTable\";\r\nexport * from \"./decorator/relations/ManyToMany\";\r\nexport * from \"./decorator/relations/ManyToOne\";\r\nexport * from \"./decorator/relations/OneToMany\";\r\nexport * from \"./decorator/relations/OneToOne\";\r\nexport * from \"./decorator/relations/RelationCount\";\r\nexport * from \"./decorator/relations/RelationId\";\r\nexport * from \"./decorator/entity/Entity\";\r\nexport * from \"./decorator/entity/AbstractEntity\";\r\nexport * from \"./decorator/entity/ClassEntityChild\";\r\nexport * from \"./decorator/entity/ClosureEntity\";\r\nexport * from \"./decorator/entity/EmbeddableEntity\";\r\nexport * from \"./decorator/entity/SingleEntityChild\";\r\nexport * from \"./decorator/entity/Entity\";\r\nexport * from \"./decorator/entity/TableInheritance\";\r\nexport * from \"./decorator/transaction/Transaction\";\r\nexport * from \"./decorator/transaction/TransactionEntityManager\";\r\nexport * from \"./decorator/tree/TreeLevelColumn\";\r\nexport * from \"./decorator/tree/TreeParent\";\r\nexport * from \"./decorator/tree/TreeChildren\";\r\nexport * from \"./decorator/Index\";\r\nexport * from \"./decorator/NamingStrategy\";\r\nexport * from \"./decorator/Embedded\";\r\nexport * from \"./decorator/DiscriminatorValue\";\r\nexport * from \"./decorator/EntityRepository\";\r\nexport * from \"./schema-builder/schema/ColumnSchema\";\r\nexport * from \"./schema-builder/schema/ForeignKeySchema\";\r\nexport * from \"./schema-builder/schema/IndexSchema\";\r\nexport * from \"./schema-builder/schema/PrimaryKeySchema\";\r\nexport * from \"./schema-builder/schema/TableSchema\";\r\nexport * from \"./driver/mongodb/typings\";\r\n\r\nexport {Connection} from \"./connection/Connection\";\r\nexport {ConnectionManager} from \"./connection/ConnectionManager\";\r\nexport {ConnectionOptions} from \"./connection/ConnectionOptions\";\r\nexport {DriverOptions} from \"./driver/DriverOptions\";\r\nexport {Driver} from \"./driver/Driver\";\r\nexport {QueryBuilder} from \"./query-builder/QueryBuilder\";\r\nexport {QueryRunner} from \"./query-runner/QueryRunner\";\r\nexport {EntityManager} from \"./entity-manager/EntityManager\";\r\nexport {MongoEntityManager} from \"./entity-manager/MongoEntityManager\";\r\nexport {MigrationInterface} from \"./migration/MigrationInterface\";\r\nexport {DefaultNamingStrategy} from \"./naming-strategy/DefaultNamingStrategy\";\r\nexport {NamingStrategyInterface} from \"./naming-strategy/NamingStrategyInterface\";\r\nexport {Repository} from \"./repository/Repository\";\r\nexport {TreeRepository} from \"./repository/TreeRepository\";\r\nexport {SpecificRepository} from \"./repository/SpecificRepository\";\r\nexport {MongoRepository} from \"./repository/MongoRepository\";\r\nexport {FindManyOptions} from \"./find-options/FindManyOptions\";\r\nexport {InsertEvent} from \"./subscriber/event/InsertEvent\";\r\nexport {UpdateEvent} from \"./subscriber/event/UpdateEvent\";\r\nexport {RemoveEvent} from \"./subscriber/event/RemoveEvent\";\r\nexport {EntitySubscriberInterface} from \"./subscriber/EntitySubscriberInterface\";\r\nexport {EntityModel} from \"./repository/EntityModel\";\r\n\r\n// -------------------------------------------------------------------------\r\n// Deprecated\r\n// -------------------------------------------------------------------------\r\n\r\n// -------------------------------------------------------------------------\r\n// Commonly used functionality\r\n// -------------------------------------------------------------------------\r\n\r\n/**\r\n * Gets metadata args storage.\r\n */\r\nexport function getMetadataArgsStorage(): MetadataArgsStorage {\r\n // we should store metadata storage in a global variable otherwise it brings too much problems\r\n // one of the problem is that if any entity (or any other) will be imported before consumer will call\r\n // useContainer method with his own container implementation, that entity will be registered in the\r\n // old old container (default one post probably) and consumer will his entity.\r\n // calling useContainer before he imports any entity (or any other) is not always convenient.\r\n // another reason is that when we run migrations typeorm is being called from a global package\r\n // and it may load entities which register decorators in typeorm of local package\r\n // this leads to impossibility of usage of entities in migrations and cli related operations\r\n const globalScope = PlatformTools.getGlobalVariable();\r\n if (!globalScope.typeormMetadataArgsStorage)\r\n globalScope.typeormMetadataArgsStorage = new MetadataArgsStorage();\r\n\r\n return globalScope.typeormMetadataArgsStorage;\r\n}\r\n\r\n/**\r\n * Gets a ConnectionManager which creates connections.\r\n */\r\nexport function getConnectionManager(): ConnectionManager {\r\n return getFromContainer(ConnectionManager);\r\n}\r\n\r\n/**\r\n * Creates a new connection and registers it in the manager.\r\n *\r\n * If connection options were not specified, then it will try to create connection automatically.\r\n *\r\n * First, it will try to find a \"default\" configuration from ormconfig.json.\r\n * You can also specify a connection name to use from ormconfig.json,\r\n * and you even can specify a path to your custom ormconfig.json.\r\n *\r\n * In the case if options were not specified, and ormconfig.json file also wasn't found,\r\n * it will try to create connection from environment variables.\r\n * There are several environment variables you can set:\r\n *\r\n * - TYPEORM_DRIVER_TYPE - driver type. Can be \"mysql\", \"postgres\", \"mariadb\", \"sqlite\", \"oracle\" or \"mssql\".\r\n * - TYPEORM_URL - database connection url. Should be a string.\r\n * - TYPEORM_HOST - database host. Should be a string.\r\n * - TYPEORM_PORT - database access port. Should be a number.\r\n * - TYPEORM_USERNAME - database username. Should be a string.\r\n * - TYPEORM_PASSWORD - database user's password. Should be a string.\r\n * - TYPEORM_SID - database's SID. Used only for oracle databases. Should be a string.\r\n * - TYPEORM_STORAGE - database's storage url. Used only for sqlite databases. Should be a string.\r\n * - TYPEORM_USE_POOL - indicates if connection pooling should be enabled. By default its enabled. Should be boolean-like value.\r\n * - TYPEORM_DRIVER_EXTRA - extra options to be passed to the driver. Should be a serialized json string of options.\r\n * - TYPEORM_AUTO_SCHEMA_SYNC - indicates if automatic schema synchronization will be performed on each application run. Should be boolean-like value.\r\n * - TYPEORM_ENTITIES - list of directories containing entities to load. Should be string - directory names (can be patterns) split by a comma.\r\n * - TYPEORM_SUBSCRIBERS - list of directories containing subscribers to load. Should be string - directory names (can be patterns) split by a comma.\r\n * - TYPEORM_ENTITY_SCHEMAS - list of directories containing entity schemas to load. Should be string - directory names (can be patterns) split by a comma.\r\n * - TYPEORM_NAMING_STRATEGIES - list of directories containing custom naming strategies to load. Should be string - directory names (can be patterns) split by a comma.\r\n * - TYPEORM_LOGGING_QUERIES - indicates if each executed query must be logged. Should be boolean-like value.\r\n * - TYPEORM_LOGGING_FAILED_QUERIES - indicates if logger should log failed query's error. Should be boolean-like value.\r\n * - TYPEORM_LOGGING_ONLY_FAILED_QUERIES - indicates if only failed queries must be logged. Should be boolean-like value.\r\n *\r\n * TYPEORM_DRIVER_TYPE variable is required. Depend on the driver type some other variables may be required too.\r\n */\r\nexport function createConnection(): Promise<Connection>;\r\n\r\n/**\r\n * Creates connection from the given connection options and registers it in the manager.\r\n */\r\nexport function createConnection(options?: ConnectionOptions): Promise<Connection>;\r\n\r\n/**\r\n * Creates connection with the given connection name from the ormconfig.json file and registers it in the manager.\r\n * Optionally you can specify a path to custom ormconfig.json file.\r\n */\r\nexport function createConnection(connectionNameFromConfig: string, ormConfigPath?: string): Promise<Connection>;\r\n\r\n/**\r\n * Creates connection and and registers it in the manager.\r\n */\r\nexport function createConnection(optionsOrConnectionNameFromConfig?: ConnectionOptions|string, ormConfigPath?: string): Promise<Connection> {\r\n return getConnectionManager().createAndConnect(optionsOrConnectionNameFromConfig as any, ormConfigPath);\r\n}\r\n\r\n/**\r\n * Creates new connections and registers them in the manager.\r\n *\r\n * If array of connection options were not specified, then it will try to create them automatically\r\n * from ormconfig.json. You can also specify path to your custom ormconfig.json.\r\n *\r\n * In the case if options were not specified, and ormconfig.json file also wasn't found,\r\n * it will try to create connection from environment variables.\r\n * There are several environment variables you can set:\r\n *\r\n * - TYPEORM_DRIVER_TYPE - driver type. Can be \"mysql\", \"postgres\", \"mariadb\", \"sqlite\", \"oracle\" or \"mssql\".\r\n * - TYPEORM_URL - database connection url. Should be a string.\r\n * - TYPEORM_HOST - database host. Should be a string.\r\n * - TYPEORM_PORT - database access port. Should be a number.\r\n * - TYPEORM_USERNAME - database username. Should be a string.\r\n * - TYPEORM_PASSWORD - database user's password. Should be a string.\r\n * - TYPEORM_SID - database's SID. Used only for oracle databases. Should be a string.\r\n * - TYPEORM_STORAGE - database's storage url. Used only for sqlite databases. Should be a string.\r\n * - TYPEORM_USE_POOL - indicates if connection pooling should be enabled. By default its enabled. Should be boolean-like value.\r\n * - TYPEORM_DRIVER_EXTRA - extra options to be passed to the driver. Should be a serialized json string of options.\r\n * - TYPEORM_AUTO_SCHEMA_SYNC - indicates if automatic schema synchronization will be performed on each application run. Should be boolean-like value.\r\n * - TYPEORM_ENTITIES - list of directories containing entities to load. Should be string - directory names (can be patterns) split by a comma.\r\n * - TYPEORM_SUBSCRIBERS - list of directories containing subscribers to load. Should be string - directory names (can be patterns) split by a comma.\r\n * - TYPEORM_ENTITY_SCHEMAS - list of directories containing entity schemas to load. Should be string - directory names (can be patterns) split by a comma.\r\n * - TYPEORM_NAMING_STRATEGIES - list of directories containing custom naming strategies to load. Should be string - directory names (can be patterns) split by a comma.\r\n * - TYPEORM_LOGGING_QUERIES - indicates if each executed query must be logged. Should be boolean-like value.\r\n * - TYPEORM_LOGGING_FAILED_QUERIES - indicates if logger should log failed query's error. Should be boolean-like value.\r\n * - TYPEORM_LOGGING_ONLY_FAILED_QUERIES - indicates if only failed queries must be logged. Should be boolean-like value.\r\n *\r\n * TYPEORM_DRIVER_TYPE variable is required. Depend on the driver type some other variables may be required too.\r\n */\r\nexport function createConnections(): Promise<Connection[]>;\r\n\r\n/**\r\n * Creates connections from the given connection options and registers them in the manager.\r\n */\r\nexport function createConnections(options?: ConnectionOptions[]): Promise<Connection[]>;\r\n\r\n/**\r\n * Creates connection with the given connection name from the ormconfig.json file and registers it in the manager.\r\n * Optionally you can specify a path to custom ormconfig.json file.\r\n */\r\nexport function createConnections(ormConfigPath?: string): Promise<Connection[]>;\r\n\r\n/**\r\n * Creates connections and and registers them in the manager.\r\n */\r\nexport function createConnections(optionsOrOrmConfigFilePath?: ConnectionOptions[]|string): Promise<Connection[]> {\r\n return getConnectionManager().createAndConnectToAll(optionsOrOrmConfigFilePath as any);\r\n}\r\n\r\n/**\r\n * Gets connection from the connection manager.\r\n * If connection name wasn't specified, then \"default\" connection will be retrieved.\r\n */\r\nexport function getConnection(connectionName: string = \"default\"): Connection {\r\n return getConnectionManager().get(connectionName);\r\n}\r\n\r\n/**\r\n * Gets entity manager from the connection.\r\n * If connection name wasn't specified, then \"default\" connection will be retrieved.\r\n */\r\nexport function getEntityManager(connectionName: string = \"default\"): EntityManager {\r\n return getConnectionManager().get(connectionName).manager;\r\n}\r\n\r\n/**\r\n * Gets repository for the given entity class.\r\n */\r\nexport function getRepository<Entity>(entityClass: ObjectType<Entity>, connectionName?: string): Repository<Entity>;\r\n\r\n/**\r\n * Gets repository for the given entity name.\r\n */\r\nexport function getRepository<Entity>(entityName: string, connectionName?: string): Repository<Entity>;\r\n\r\n/**\r\n * Gets repository for the given entity class or name.\r\n */\r\nexport function getRepository<Entity>(entityClassOrName: ObjectType<Entity>|string, connectionName: string = \"default\"): Repository<Entity> {\r\n return getConnectionManager().get(connectionName).getRepository<Entity>(entityClassOrName as any);\r\n}\r\n\r\n/**\r\n * Gets tree repository for the given entity class.\r\n */\r\nexport function getTreeRepository<Entity>(entityClass: ObjectType<Entity>, connectionName?: string): TreeRepository<Entity>;\r\n\r\n/**\r\n * Gets tree repository for the given entity name.\r\n */\r\nexport function getTreeRepository<Entity>(entityName: string, connectionName?: string): TreeRepository<Entity>;\r\n\r\n/**\r\n * Gets tree repository for the given entity class or name.\r\n */\r\nexport function getTreeRepository<Entity>(entityClassOrName: ObjectType<Entity>|string, connectionName: string = \"default\"): TreeRepository<Entity> {\r\n return getConnectionManager().get(connectionName).getTreeRepository<Entity>(entityClassOrName as any);\r\n}\r\n\r\n/**\r\n * Gets mongodb repository for the given entity class.\r\n */\r\nexport function getMongoRepository<Entity>(entityClass: ObjectType<Entity>, connectionName?: string): MongoRepository<Entity>;\r\n\r\n/**\r\n * Gets mongodb repository for the given entity name.\r\n */\r\nexport function getMongoRepository<Entity>(entityName: string, connectionName?: string): MongoRepository<Entity>;\r\n\r\n/**\r\n * Gets mongodb repository for the given entity class or name.\r\n */\r\nexport function getMongoRepository<Entity>(entityClassOrName: ObjectType<Entity>|string, connectionName: string = \"default\"): MongoRepository<Entity> {\r\n return getConnectionManager().get(connectionName).getMongoRepository<Entity>(entityClassOrName as any);\r\n}\r\n"],"sourceRoot":"."}