UNPKG

lakutata

Version:

An IoC-based universal application framework.

1,976 lines (1,639 loc) 1.86 MB
import { g as e, a as t, c as n } from "./Package.5.mjs"; import { r as a } from "./Package.13.mjs"; import { r as s, s as i } from "./Package.62.mjs"; import { r } from "./Package.132.mjs"; import { c as o } from "./Package.7.mjs"; import "./Package.8.mjs"; import "./Package.15.mjs"; import c from "fs"; import l from "path"; import u from "os"; import h from "crypto"; import d from "events"; import p from "stream"; import m from "module"; import f from "fs/promises"; import "./Package.11.mjs"; import y from "url"; import "./Package.10.mjs"; import E from "util"; import { b as T } from "./Package.63.mjs"; import g from "node:url"; import N from "node:path"; import A from "node:fs"; import b from "node:fs/promises"; import C from "node:events"; import R from "node:stream"; import S from "node:string_decoder"; // -- Shims -- import cjsUrl from 'node:url'; import cjsPath from 'node:path'; import cjsModule from 'node:module'; const __filename = cjsUrl.fileURLToPath(import.meta.url); const __dirname = cjsPath.dirname(__filename); const require = cjsModule.createRequire(import.meta.url); var w = {}; var M = {}; var O = {}; var v = {}; var I = {}; var L = {}; var P = {}; "use strict"; Object.defineProperty(P, "__esModule", { value: true }); var D = P.ObjectUtils = void 0; class ObjectUtils { static isObject(e) { return e !== null && typeof e === "object"; } static isObjectWithName(e) { return e !== null && typeof e === "object" && e["name"] !== undefined; } static assign(e, ...t) { for (const n of t) { for (const t of Object.getOwnPropertyNames(n)) { e[t] = n[t]; } } } static mixedListToArray(e) { if (e !== null && typeof e === "object") { return Object.keys(e).map((t => e[t])); } else { return e; } } } D = P.ObjectUtils = ObjectUtils; var _ = {}; var $ = {}; var x = {}; "use strict"; Object.defineProperty(x, "__esModule", { value: true }); var q = x.TypeORMError = void 0; class TypeORMError extends Error { get name() { return this.constructor.name; } constructor(e) { super(e); if (Object.setPrototypeOf) { Object.setPrototypeOf(this, new.target.prototype); } else { this.__proto__ = new.target.prototype; } } } q = x.TypeORMError = TypeORMError; var U; function B() { if (U) return $; U = 1; "use strict"; Object.defineProperty($, "__esModule", { value: true }); $.CannotReflectMethodParameterTypeError = void 0; const e = x; let t = class CannotReflectMethodParameterTypeError extends e.TypeORMError { constructor(e, t) { super(`Cannot get reflected type for a "${t}" method's parameter of "${e.name}" class. ` + `Make sure you have turned on an "emitDecoratorMetadata": true option in tsconfig.json. ` + `Also make sure you have imported "reflect-metadata" on top of the main entry file in your application.`); } }; $.CannotReflectMethodParameterTypeError = t; return $; } var F = {}; var k; function j() { if (k) return F; k = 1; "use strict"; Object.defineProperty(F, "__esModule", { value: true }); F.AlreadyHasActiveConnectionError = void 0; const e = x; let t = class AlreadyHasActiveConnectionError extends e.TypeORMError { constructor(e) { super(`Cannot create a new connection named "${e}", because connection with such name ` + `already exist and it now has an active connection session.`); } }; F.AlreadyHasActiveConnectionError = t; return F; } var Q = {}; var V; function K() { if (V) return Q; V = 1; "use strict"; Object.defineProperty(Q, "__esModule", { value: true }); Q.SubjectWithoutIdentifierError = void 0; const e = x; let t = class SubjectWithoutIdentifierError extends e.TypeORMError { constructor(e) { super(`Internal error. Subject ${e.metadata.targetName} must have an identifier to perform operation.`); } }; Q.SubjectWithoutIdentifierError = t; return Q; } var W = {}; var H; function G() { if (H) return W; H = 1; "use strict"; Object.defineProperty(W, "__esModule", { value: true }); W.CannotConnectAlreadyConnectedError = void 0; const e = x; let t = class CannotConnectAlreadyConnectedError extends e.TypeORMError { constructor(e) { super(`Cannot create a "${e}" connection because connection to the database already established.`); } }; W.CannotConnectAlreadyConnectedError = t; return W; } var Y = {}; "use strict"; Object.defineProperty(Y, "__esModule", { value: true }); var z = Y.LockNotSupportedOnGivenDriverError = void 0; const J = x; class LockNotSupportedOnGivenDriverError extends J.TypeORMError { constructor() { super(`Locking not supported on given driver.`); } } z = Y.LockNotSupportedOnGivenDriverError = LockNotSupportedOnGivenDriverError; var X = {}; var Z; function ee() { if (Z) return X; Z = 1; "use strict"; Object.defineProperty(X, "__esModule", { value: true }); X.ConnectionIsNotSetError = void 0; const e = x; let t = class ConnectionIsNotSetError extends e.TypeORMError { constructor(e) { super(`Connection with ${e} database is not established. Check connection configuration.`); } }; X.ConnectionIsNotSetError = t; return X; } var te = {}; "use strict"; Object.defineProperty(te, "__esModule", { value: true }); var ne = te.CannotCreateEntityIdMapError = void 0; const ae = x; class CannotCreateEntityIdMapError extends ae.TypeORMError { constructor(e, t) { super(); const n = e.primaryColumns.reduce(((e, t, n) => { t.setEntityValue(e, n + 1); return e; }), {}); this.message = `Cannot use given entity id "${t}" because "${e.targetName}" contains multiple primary columns, you must provide object in following form: ${JSON.stringify(n)} as an id.`; } } ne = te.CannotCreateEntityIdMapError = CannotCreateEntityIdMapError; var se = {}; var ie; function re() { if (ie) return se; ie = 1; "use strict"; Object.defineProperty(se, "__esModule", { value: true }); se.MetadataAlreadyExistsError = void 0; const e = x; let t = class MetadataAlreadyExistsError extends e.TypeORMError { constructor(e, t, n) { super(e + " metadata already exists for the class constructor " + JSON.stringify(t) + (n ? " on property " + n : ". If you previously renamed or moved entity class, make sure" + " that compiled version of old entity class source wasn't left in the compiler output directory.")); } }; se.MetadataAlreadyExistsError = t; return se; } var oe = {}; var ce; function le() { if (ce) return oe; ce = 1; "use strict"; Object.defineProperty(oe, "__esModule", { value: true }); oe.CannotDetermineEntityError = void 0; const e = x; let t = class CannotDetermineEntityError extends e.TypeORMError { constructor(e) { super(`Cannot ${e}, given value must be instance of entity class, ` + `instead object literal is given. Or you must specify an entity target to method call.`); } }; oe.CannotDetermineEntityError = t; return oe; } var ue = {}; "use strict"; Object.defineProperty(ue, "__esModule", { value: true }); var he = ue.UpdateValuesMissingError = void 0; const de = x; class UpdateValuesMissingError extends de.TypeORMError { constructor() { super(`Cannot perform update query because update values are not defined. Call "qb.set(...)" method to specify updated values.`); } } he = ue.UpdateValuesMissingError = UpdateValuesMissingError; var pe = {}; var me; function fe() { if (me) return pe; me = 1; "use strict"; Object.defineProperty(pe, "__esModule", { value: true }); pe.TreeRepositoryNotSupportedError = void 0; const e = x; let t = class TreeRepositoryNotSupportedError extends e.TypeORMError { constructor(e) { super(`Tree repositories are not supported in ${e.options.type} driver.`); } }; pe.TreeRepositoryNotSupportedError = t; return pe; } var ye = {}; "use strict"; Object.defineProperty(ye, "__esModule", { value: true }); var Ee = ye.CustomRepositoryNotFoundError = void 0; const Te = x; class CustomRepositoryNotFoundError extends Te.TypeORMError { constructor(e) { super(`Custom repository ${typeof e === "function" ? e.name : e.constructor.name} was not found. ` + `Did you forgot to put @EntityRepository decorator on it?`); } } Ee = ye.CustomRepositoryNotFoundError = CustomRepositoryNotFoundError; var ge = {}; var Ne; function Ae() { if (Ne) return ge; Ne = 1; "use strict"; Object.defineProperty(ge, "__esModule", { value: true }); ge.TransactionNotStartedError = void 0; const e = x; let t = class TransactionNotStartedError extends e.TypeORMError { constructor() { super(`Transaction is not started yet, start transaction before committing or rolling it back.`); } }; ge.TransactionNotStartedError = t; return ge; } var be = {}; var Ce; function Re() { if (Ce) return be; Ce = 1; "use strict"; Object.defineProperty(be, "__esModule", { value: true }); be.TransactionAlreadyStartedError = void 0; const e = x; let t = class TransactionAlreadyStartedError extends e.TypeORMError { constructor() { super(`Transaction already started for the given connection, commit current transaction before starting a new one.`); } }; be.TransactionAlreadyStartedError = t; return be; } var Se = {}; var we = {}; "use strict"; Object.defineProperty(we, "__esModule", { value: true }); var Me = we.InstanceChecker = void 0; class InstanceChecker { static isMssqlParameter(e) { return this.check(e, "MssqlParameter"); } static isEntityMetadata(e) { return this.check(e, "EntityMetadata"); } static isColumnMetadata(e) { return this.check(e, "ColumnMetadata"); } static isSelectQueryBuilder(e) { return this.check(e, "SelectQueryBuilder"); } static isInsertQueryBuilder(e) { return this.check(e, "InsertQueryBuilder"); } static isDeleteQueryBuilder(e) { return this.check(e, "DeleteQueryBuilder"); } static isUpdateQueryBuilder(e) { return this.check(e, "UpdateQueryBuilder"); } static isSoftDeleteQueryBuilder(e) { return this.check(e, "SoftDeleteQueryBuilder"); } static isRelationQueryBuilder(e) { return this.check(e, "RelationQueryBuilder"); } static isBrackets(e) { return this.check(e, "Brackets") || this.check(e, "NotBrackets"); } static isNotBrackets(e) { return this.check(e, "NotBrackets"); } static isSubject(e) { return this.check(e, "Subject"); } static isRdbmsSchemaBuilder(e) { return this.check(e, "RdbmsSchemaBuilder"); } static isMongoEntityManager(e) { return this.check(e, "MongoEntityManager"); } static isSqljsEntityManager(e) { return this.check(e, "SqljsEntityManager"); } static isEntitySchema(e) { return this.check(e, "EntitySchema"); } static isBaseEntityConstructor(e) { return typeof e === "function" && typeof e.hasId === "function" && typeof e.save === "function" && typeof e.useDataSource === "function"; } static isFindOperator(e) { return this.check(e, "FindOperator") || this.check(e, "EqualOperator"); } static isEqualOperator(e) { return this.check(e, "EqualOperator"); } static isQuery(e) { return this.check(e, "Query"); } static isTable(e) { return this.check(e, "Table"); } static isTableCheck(e) { return this.check(e, "TableCheck"); } static isTableColumn(e) { return this.check(e, "TableColumn"); } static isTableExclusion(e) { return this.check(e, "TableExclusion"); } static isTableForeignKey(e) { return this.check(e, "TableForeignKey"); } static isTableIndex(e) { return this.check(e, "TableIndex"); } static isTableUnique(e) { return this.check(e, "TableUnique"); } static isView(e) { return this.check(e, "View"); } static isDataSource(e) { return this.check(e, "DataSource"); } static check(e, t) { return typeof e === "object" && e !== null && e["@instanceof"] === Symbol.for(t); } } Me = we.InstanceChecker = InstanceChecker; "use strict"; Object.defineProperty(Se, "__esModule", { value: true }); var Oe = Se.EntityNotFoundError = void 0; const ve = x; const Ie = P; const Le = we; class EntityNotFoundError extends ve.TypeORMError { constructor(e, t) { super(); this.entityClass = e; this.criteria = t; this.message = `Could not find any entity of type "${this.stringifyTarget(e)}" ` + `matching: ${this.stringifyCriteria(t)}`; } stringifyTarget(e) { if (Le.InstanceChecker.isEntitySchema(e)) { return e.options.name; } else if (typeof e === "function") { return e.name; } else if (Ie.ObjectUtils.isObject(e) && "name" in e) { return e.name; } else { return e; } } stringifyCriteria(e) { try { return JSON.stringify(e, null, 4); } catch (e) {} return "" + e; } } Oe = Se.EntityNotFoundError = EntityNotFoundError; var Pe = {}; var De; function _e() { if (De) return Pe; De = 1; "use strict"; Object.defineProperty(Pe, "__esModule", { value: true }); Pe.EntityMetadataNotFoundError = void 0; const e = x; const t = P; const n = we; let a = class EntityMetadataNotFoundError extends e.TypeORMError { constructor(e) { super(); this.message = `No metadata for "${this.stringifyTarget(e)}" was found.`; } stringifyTarget(e) { if (n.InstanceChecker.isEntitySchema(e)) { return e.options.name; } else if (typeof e === "function") { return e.name; } else if (t.ObjectUtils.isObject(e) && "name" in e) { return e.name; } else { return e; } } }; Pe.EntityMetadataNotFoundError = a; return Pe; } var $e = {}; var xe; function qe() { if (xe) return $e; xe = 1; "use strict"; Object.defineProperty($e, "__esModule", { value: true }); $e.MustBeEntityError = void 0; const e = x; let t = class MustBeEntityError extends e.TypeORMError { constructor(e, t) { super(`Cannot ${e}, given value must be an entity, instead "${t}" is given.`); } }; $e.MustBeEntityError = t; return $e; } var Ue = {}; "use strict"; Object.defineProperty(Ue, "__esModule", { value: true }); var Be = Ue.OptimisticLockVersionMismatchError = void 0; const Fe = x; class OptimisticLockVersionMismatchError extends Fe.TypeORMError { constructor(e, t, n) { super(`The optimistic lock on entity ${e} failed, version ${t} was expected, but is actually ${n}.`); } } Be = Ue.OptimisticLockVersionMismatchError = OptimisticLockVersionMismatchError; var ke = {}; "use strict"; Object.defineProperty(ke, "__esModule", { value: true }); var je = ke.LimitOnUpdateNotSupportedError = void 0; const Qe = x; class LimitOnUpdateNotSupportedError extends Qe.TypeORMError { constructor() { super(`Your database does not support LIMIT on UPDATE statements.`); } } je = ke.LimitOnUpdateNotSupportedError = LimitOnUpdateNotSupportedError; var Ve = {}; var Ke; function We() { if (Ke) return Ve; Ke = 1; "use strict"; Object.defineProperty(Ve, "__esModule", { value: true }); Ve.PrimaryColumnCannotBeNullableError = void 0; const e = x; let t = class PrimaryColumnCannotBeNullableError extends e.TypeORMError { constructor(e, t) { super(`Primary column ${e.constructor.name}#${t} cannot be nullable. ` + `Its not allowed for primary keys. Try to remove nullable option.`); } }; Ve.PrimaryColumnCannotBeNullableError = t; return Ve; } var He = {}; var Ge; function Ye() { if (Ge) return He; Ge = 1; "use strict"; Object.defineProperty(He, "__esModule", { value: true }); He.CustomRepositoryCannotInheritRepositoryError = void 0; const e = x; let t = class CustomRepositoryCannotInheritRepositoryError extends e.TypeORMError { constructor(e) { super(`Custom entity repository ${typeof e === "function" ? e.name : e.constructor.name} ` + ` cannot inherit Repository class without entity being set in the @EntityRepository decorator.`); } }; He.CustomRepositoryCannotInheritRepositoryError = t; return He; } var ze = {}; "use strict"; Object.defineProperty(ze, "__esModule", { value: true }); var Je = ze.QueryRunnerProviderAlreadyReleasedError = void 0; const Xe = x; class QueryRunnerProviderAlreadyReleasedError extends Xe.TypeORMError { constructor() { super(`Database connection provided by a query runner was already ` + `released, cannot continue to use its querying methods anymore.`); } } Je = ze.QueryRunnerProviderAlreadyReleasedError = QueryRunnerProviderAlreadyReleasedError; var Ze = {}; var et; function tt() { if (et) return Ze; et = 1; "use strict"; Object.defineProperty(Ze, "__esModule", { value: true }); Ze.CannotAttachTreeChildrenEntityError = void 0; const e = x; let t = class CannotAttachTreeChildrenEntityError extends e.TypeORMError { constructor(e) { super(`Cannot attach entity "${e}" to its parent. Please make sure parent ` + `is saved in the database before saving children nodes.`); } }; Ze.CannotAttachTreeChildrenEntityError = t; return Ze; } var nt = {}; "use strict"; Object.defineProperty(nt, "__esModule", { value: true }); var at = nt.CustomRepositoryDoesNotHaveEntityError = void 0; const st = x; class CustomRepositoryDoesNotHaveEntityError extends st.TypeORMError { constructor(e) { super(`Custom repository ${typeof e === "function" ? e.name : e.constructor.name} does not have managed entity. ` + `Did you forget to specify entity for it @EntityRepository(MyEntity)? `); } } at = nt.CustomRepositoryDoesNotHaveEntityError = CustomRepositoryDoesNotHaveEntityError; var it = {}; var rt; function ot() { if (rt) return it; rt = 1; "use strict"; Object.defineProperty(it, "__esModule", { value: true }); it.MissingDeleteDateColumnError = void 0; const e = x; let t = class MissingDeleteDateColumnError extends e.TypeORMError { constructor(e) { super(`Entity "${e.name}" does not have delete date columns.`); } }; it.MissingDeleteDateColumnError = t; return it; } var ct = {}; var lt; function ut() { if (lt) return ct; lt = 1; "use strict"; Object.defineProperty(ct, "__esModule", { value: true }); ct.NoConnectionForRepositoryError = void 0; const e = x; let t = class NoConnectionForRepositoryError extends e.TypeORMError { constructor(e) { super(`Cannot get a Repository for "${e} connection, because connection with the database ` + `is not established yet. Call connection#connect method to establish connection.`); } }; ct.NoConnectionForRepositoryError = t; return ct; } var ht = {}; var dt; function pt() { if (dt) return ht; dt = 1; "use strict"; Object.defineProperty(ht, "__esModule", { value: true }); ht.CircularRelationsError = void 0; const e = x; let t = class CircularRelationsError extends e.TypeORMError { constructor(e) { super(`Circular relations detected: ${e}. To resolve this issue you need to ` + `set nullable: true somewhere in this dependency structure.`); } }; ht.CircularRelationsError = t; return ht; } var mt = {}; "use strict"; Object.defineProperty(mt, "__esModule", { value: true }); var ft = mt.ReturningStatementNotSupportedError = void 0; const yt = x; class ReturningStatementNotSupportedError extends yt.TypeORMError { constructor() { super(`OUTPUT or RETURNING clause only supported by PostgreSQL, MariaDB, Microsoft SqlServer or Google Spanner.`); } } ft = mt.ReturningStatementNotSupportedError = ReturningStatementNotSupportedError; var Et = {}; var Tt; function gt() { if (Tt) return Et; Tt = 1; "use strict"; Object.defineProperty(Et, "__esModule", { value: true }); Et.UsingJoinTableIsNotAllowedError = void 0; const e = x; let t = class UsingJoinTableIsNotAllowedError extends e.TypeORMError { constructor(e, t) { super(`Using JoinTable on ${e.name}#${t.propertyName} is wrong. ` + `${e.name}#${t.propertyName} has ${t.relationType} relation, ` + `however you can use JoinTable only on many-to-many relations.`); } }; Et.UsingJoinTableIsNotAllowedError = t; return Et; } var Nt = {}; var At; function bt() { if (At) return Nt; At = 1; "use strict"; Object.defineProperty(Nt, "__esModule", { value: true }); Nt.MissingJoinColumnError = void 0; const e = x; let t = class MissingJoinColumnError extends e.TypeORMError { constructor(e, t) { super(); if (t.inverseRelation) { this.message = `JoinColumn is missing on both sides of ${e.name}#${t.propertyName} and ` + `${t.inverseEntityMetadata.name}#${t.inverseRelation.propertyName} one-to-one relationship. ` + `You need to put JoinColumn decorator on one of the sides.`; } else { this.message = `JoinColumn is missing on ${e.name}#${t.propertyName} one-to-one relationship. ` + `You need to put JoinColumn decorator on it.`; } } }; Nt.MissingJoinColumnError = t; return Nt; } var Ct = {}; var Rt; function St() { if (Rt) return Ct; Rt = 1; "use strict"; Object.defineProperty(Ct, "__esModule", { value: true }); Ct.MissingPrimaryColumnError = void 0; const e = x; let t = class MissingPrimaryColumnError extends e.TypeORMError { constructor(e) { super(`Entity "${e.name}" does not have a primary column. Primary column is required to ` + `have in all your entities. Use @PrimaryColumn decorator to add a primary column to your entity.`); } }; Ct.MissingPrimaryColumnError = t; return Ct; } var wt = {}; "use strict"; Object.defineProperty(wt, "__esModule", { value: true }); var Mt = wt.EntityPropertyNotFoundError = void 0; const Ot = x; class EntityPropertyNotFoundError extends Ot.TypeORMError { constructor(e, t) { super(e); Object.setPrototypeOf(this, EntityPropertyNotFoundError.prototype); this.message = `Property "${e}" was not found in "${t.targetName}". Make sure your query is correct.`; } } Mt = wt.EntityPropertyNotFoundError = EntityPropertyNotFoundError; var vt = {}; var It; function Lt() { if (It) return vt; It = 1; "use strict"; Object.defineProperty(vt, "__esModule", { value: true }); vt.MissingDriverError = void 0; const e = x; let t = class MissingDriverError extends e.TypeORMError { constructor(e, t = []) { super(`Wrong driver: "${e}" given. Supported drivers are: ` + `${t.map((e => `"${e}"`)).join(", ")}.`); } }; vt.MissingDriverError = t; return vt; } var Pt = {}; var Dt; function _t() { if (Dt) return Pt; Dt = 1; "use strict"; Object.defineProperty(Pt, "__esModule", { value: true }); Pt.DriverPackageNotInstalledError = void 0; const e = x; let t = class DriverPackageNotInstalledError extends e.TypeORMError { constructor(e, t) { super(`${e} package has not been found installed. ` + `Try to install it: npm install ${t} --save`); } }; Pt.DriverPackageNotInstalledError = t; return Pt; } var $t = {}; var xt; function qt() { if (xt) return $t; xt = 1; "use strict"; Object.defineProperty($t, "__esModule", { value: true }); $t.CannotGetEntityManagerNotConnectedError = void 0; const e = x; let t = class CannotGetEntityManagerNotConnectedError extends e.TypeORMError { constructor(e) { super(`Cannot get entity manager for "${e}" connection because connection is not yet established.`); } }; $t.CannotGetEntityManagerNotConnectedError = t; return $t; } var Ut = {}; var Bt; function Ft() { if (Bt) return Ut; Bt = 1; "use strict"; Object.defineProperty(Ut, "__esModule", { value: true }); Ut.ConnectionNotFoundError = void 0; const e = x; let t = class ConnectionNotFoundError extends e.TypeORMError { constructor(e) { super(`Connection "${e}" was not found.`); } }; Ut.ConnectionNotFoundError = t; return Ut; } var kt = {}; "use strict"; Object.defineProperty(kt, "__esModule", { value: true }); var jt = kt.NoVersionOrUpdateDateColumnError = void 0; const Qt = x; class NoVersionOrUpdateDateColumnError extends Qt.TypeORMError { constructor(e) { super(`Entity ${e} does not have version or update date columns.`); } } jt = kt.NoVersionOrUpdateDateColumnError = NoVersionOrUpdateDateColumnError; var Vt = {}; "use strict"; Object.defineProperty(Vt, "__esModule", { value: true }); var Kt = Vt.InsertValuesMissingError = void 0; const Wt = x; class InsertValuesMissingError extends Wt.TypeORMError { constructor() { super(`Cannot perform insert query because values are not defined. ` + `Call "qb.values(...)" method to specify inserted values.`); } } Kt = Vt.InsertValuesMissingError = InsertValuesMissingError; var Ht = {}; "use strict"; Object.defineProperty(Ht, "__esModule", { value: true }); var Gt = Ht.OptimisticLockCanNotBeUsedError = void 0; const Yt = x; class OptimisticLockCanNotBeUsedError extends Yt.TypeORMError { constructor() { super(`The optimistic lock can be used only with getOne() method.`); } } Gt = Ht.OptimisticLockCanNotBeUsedError = OptimisticLockCanNotBeUsedError; var zt = {}; var Jt; function Xt() { if (Jt) return zt; Jt = 1; "use strict"; Object.defineProperty(zt, "__esModule", { value: true }); zt.MetadataWithSuchNameAlreadyExistsError = void 0; const e = x; let t = class MetadataWithSuchNameAlreadyExistsError extends e.TypeORMError { constructor(e, t) { super(e + " metadata with such name " + t + " already exists. " + "Do you apply decorator twice? Or maybe try to change a name?"); } }; zt.MetadataWithSuchNameAlreadyExistsError = t; return zt; } var Zt = {}; var en; function tn() { if (en) return Zt; en = 1; "use strict"; Object.defineProperty(Zt, "__esModule", { value: true }); Zt.DriverOptionNotSetError = void 0; const e = x; let t = class DriverOptionNotSetError extends e.TypeORMError { constructor(e) { super(`Driver option (${e}) is not set. ` + `Please set it to perform connection to the database.`); } }; Zt.DriverOptionNotSetError = t; return Zt; } var nn = {}; var an; function sn() { if (an) return nn; an = 1; "use strict"; Object.defineProperty(nn, "__esModule", { value: true }); nn.FindRelationsNotFoundError = void 0; const e = x; let t = class FindRelationsNotFoundError extends e.TypeORMError { constructor(e) { super(); if (e.length === 1) { this.message = `Relation "${e[0]}" was not found; please check if it is correct and really exists in your entity.`; } else { this.message = `Relations ${e.map((e => `"${e}"`)).join(", ")} were not found; please check if relations are correct and they exist in your entities.`; } } }; nn.FindRelationsNotFoundError = t; return nn; } var rn = {}; "use strict"; Object.defineProperty(rn, "__esModule", { value: true }); var on = rn.PessimisticLockTransactionRequiredError = void 0; const cn = x; class PessimisticLockTransactionRequiredError extends cn.TypeORMError { constructor() { super(`An open transaction is required for pessimistic lock.`); } } on = rn.PessimisticLockTransactionRequiredError = PessimisticLockTransactionRequiredError; var ln = {}; var un; function hn() { if (un) return ln; un = 1; "use strict"; Object.defineProperty(ln, "__esModule", { value: true }); ln.RepositoryNotTreeError = void 0; const e = x; const t = P; const n = we; let a = class RepositoryNotTreeError extends e.TypeORMError { constructor(e) { super(); let a; if (n.InstanceChecker.isEntitySchema(e)) { a = e.options.name; } else if (typeof e === "function") { a = e.name; } else if (t.ObjectUtils.isObject(e) && "name" in e) { a = e.name; } else { a = e; } this.message = `Repository of the "${a}" class is not a TreeRepository. Try to apply @Tree decorator on your entity.`; } }; ln.RepositoryNotTreeError = a; return ln; } var dn = {}; var pn; function mn() { if (pn) return dn; pn = 1; "use strict"; Object.defineProperty(dn, "__esModule", { value: true }); dn.DataTypeNotSupportedError = void 0; const e = x; let t = class DataTypeNotSupportedError extends e.TypeORMError { constructor(e, t, n) { super(); const a = typeof t === "string" ? t : t.name; this.message = `Data type "${a}" in "${e.entityMetadata.targetName}.${e.propertyName}" is not supported by "${n}" database.`; } }; dn.DataTypeNotSupportedError = t; return dn; } var fn = {}; var yn; function En() { if (yn) return fn; yn = 1; "use strict"; Object.defineProperty(fn, "__esModule", { value: true }); fn.InitializedRelationError = void 0; const e = x; let t = class InitializedRelationError extends e.TypeORMError { constructor(e) { super(`Array initializations are not allowed in entity relations. ` + `Please remove array initialization (= []) from "${e.entityMetadata.targetName}#${e.propertyPath}". ` + `This is ORM requirement to make relations to work properly. Refer docs for more information.`); } }; fn.InitializedRelationError = t; return fn; } var Tn = {}; var gn; function Nn() { if (gn) return Tn; gn = 1; "use strict"; Object.defineProperty(Tn, "__esModule", { value: true }); Tn.MissingJoinTableError = void 0; const e = x; let t = class MissingJoinTableError extends e.TypeORMError { constructor(e, t) { super(); if (t.inverseRelation) { this.message = `JoinTable is missing on both sides of ${e.name}#${t.propertyName} and ` + `${t.inverseEntityMetadata.name}#${t.inverseRelation.propertyName} many-to-many relationship. ` + `You need to put decorator decorator on one of the sides.`; } else { this.message = `JoinTable is missing on ${e.name}#${t.propertyName} many-to-many relationship. ` + `You need to put JoinTable decorator on it.`; } } }; Tn.MissingJoinTableError = t; return Tn; } var An = {}; var bn; function Cn() { if (bn) return An; bn = 1; "use strict"; Object.defineProperty(An, "__esModule", { value: true }); An.QueryFailedError = void 0; const e = P; const t = x; let n = class QueryFailedError extends t.TypeORMError { constructor(t, n, a) { super(a.toString().replace(/^error: /, "").replace(/^Error: /, "").replace(/^Request/, "")); this.query = t; this.parameters = n; this.driverError = a; if (a) { const {name: t, ...n} = a; e.ObjectUtils.assign(this, { ...n }); } } }; An.QueryFailedError = n; return An; } var Rn = {}; "use strict"; Object.defineProperty(Rn, "__esModule", { value: true }); var Sn = Rn.NoNeedToReleaseEntityManagerError = void 0; const wn = x; class NoNeedToReleaseEntityManagerError extends wn.TypeORMError { constructor() { super(`Entity manager is not using single database connection and cannot be released. ` + `Only entity managers created by connection#createEntityManagerWithSingleDatabaseConnection ` + `methods have a single database connection and they should be released.`); } } Sn = Rn.NoNeedToReleaseEntityManagerError = NoNeedToReleaseEntityManagerError; var Mn = {}; var On; function vn() { if (On) return Mn; On = 1; "use strict"; Object.defineProperty(Mn, "__esModule", { value: true }); Mn.UsingJoinColumnOnlyOnOneSideAllowedError = void 0; const e = x; let t = class UsingJoinColumnOnlyOnOneSideAllowedError extends e.TypeORMError { constructor(e, t) { super(`Using JoinColumn is allowed only on one side of the one-to-one relationship. ` + `Both ${e.name}#${t.propertyName} and ${t.inverseEntityMetadata.name}#${t.inverseRelation.propertyName} ` + `has JoinTable decorators. Choose one of them and left JoinTable decorator only on it.`); } }; Mn.UsingJoinColumnOnlyOnOneSideAllowedError = t; return Mn; } var In = {}; var Ln; function Pn() { if (Ln) return In; Ln = 1; "use strict"; Object.defineProperty(In, "__esModule", { value: true }); In.UsingJoinTableOnlyOnOneSideAllowedError = void 0; const e = x; let t = class UsingJoinTableOnlyOnOneSideAllowedError extends e.TypeORMError { constructor(e, t) { super(`Using JoinTable is allowed only on one side of the many-to-many relationship. ` + `Both ${e.name}#${t.propertyName} and ${t.inverseEntityMetadata.name}#${t.inverseRelation.propertyName} ` + `has JoinTable decorators. Choose one of them and left JoinColumn decorator only on it.`); } }; In.UsingJoinTableOnlyOnOneSideAllowedError = t; return In; } var Dn = {}; var _n; function $n() { if (_n) return Dn; _n = 1; "use strict"; Object.defineProperty(Dn, "__esModule", { value: true }); Dn.SubjectRemovedAndUpdatedError = void 0; const e = x; let t = class SubjectRemovedAndUpdatedError extends e.TypeORMError { constructor(e) { super(`Removed entity "${e.metadata.name}" is also scheduled for update operation. ` + `Make sure you are not updating and removing same object (note that update or remove may be executed by cascade operations).`); } }; Dn.SubjectRemovedAndUpdatedError = t; return Dn; } var xn = {}; var qn; function Un() { if (qn) return xn; qn = 1; "use strict"; Object.defineProperty(xn, "__esModule", { value: true }); xn.PersistedEntityNotFoundError = void 0; const e = x; let t = class PersistedEntityNotFoundError extends e.TypeORMError { constructor() { super(`Internal error. Persisted entity was not found in the list of prepared operated entities.`); } }; xn.PersistedEntityNotFoundError = t; return xn; } var Bn = {}; var Fn; function kn() { if (Fn) return Bn; Fn = 1; "use strict"; Object.defineProperty(Bn, "__esModule", { value: true }); Bn.UsingJoinColumnIsNotAllowedError = void 0; const e = x; let t = class UsingJoinColumnIsNotAllowedError extends e.TypeORMError { constructor(e, t) { super(`Using JoinColumn on ${e.name}#${t.propertyName} is wrong. ` + `You can use JoinColumn only on one-to-one and many-to-one relations.`); } }; Bn.UsingJoinColumnIsNotAllowedError = t; return Bn; } var jn = {}; "use strict"; Object.defineProperty(jn, "__esModule", { value: true }); var Qn = jn.ColumnTypeUndefinedError = void 0; const Vn = x; class ColumnTypeUndefinedError extends Vn.TypeORMError { constructor(e, t) { super(`Column type for ${e.constructor.name}#${t} is not defined and cannot be guessed. ` + `Make sure you have turned on an "emitDecoratorMetadata": true option in tsconfig.json. ` + `Also make sure you have imported "reflect-metadata" on top of the main entry file in your application (before any entity imported).` + `If you are using JavaScript instead of TypeScript you must explicitly provide a column type.`); } } Qn = jn.ColumnTypeUndefinedError = ColumnTypeUndefinedError; var Kn = {}; var Wn; function Hn() { if (Wn) return Kn; Wn = 1; "use strict"; Object.defineProperty(Kn, "__esModule", { value: true }); Kn.QueryRunnerAlreadyReleasedError = void 0; const e = x; let t = class QueryRunnerAlreadyReleasedError extends e.TypeORMError { constructor() { super(`Query runner already released. Cannot run queries anymore.`); } }; Kn.QueryRunnerAlreadyReleasedError = t; return Kn; } var Gn = {}; "use strict"; Object.defineProperty(Gn, "__esModule", { value: true }); var Yn = Gn.OffsetWithoutLimitNotSupportedError = void 0; const zn = x; class OffsetWithoutLimitNotSupportedError extends zn.TypeORMError { constructor() { super(`RDBMS does not support OFFSET without LIMIT in SELECT statements. You must use limit in ` + `conjunction with offset function (or take in conjunction with skip function if you are ` + `using pagination).`); } } Yn = Gn.OffsetWithoutLimitNotSupportedError = OffsetWithoutLimitNotSupportedError; var Jn = {}; var Xn; function Zn() { if (Xn) return Jn; Xn = 1; "use strict"; Object.defineProperty(Jn, "__esModule", { value: true }); Jn.CannotExecuteNotConnectedError = void 0; const e = x; let t = class CannotExecuteNotConnectedError extends e.TypeORMError { constructor(e) { super(`Cannot execute operation on "${e}" connection because connection is not yet established.`); } }; Jn.CannotExecuteNotConnectedError = t; return Jn; } var ea = {}; var ta; function na() { if (ta) return ea; ta = 1; "use strict"; Object.defineProperty(ea, "__esModule", { value: true }); ea.NoConnectionOptionError = void 0; const e = x; let t = class NoConnectionOptionError extends e.TypeORMError { constructor(e) { super(`Option "${e}" is not set in your connection options, please ` + `define "${e}" option in your connection options or ormconfig.json`); } }; ea.NoConnectionOptionError = t; return ea; } var aa = {}; var sa; function ia() { if (sa) return aa; sa = 1; "use strict"; Object.defineProperty(aa, "__esModule", { value: true }); aa.ForbiddenTransactionModeOverrideError = void 0; const e = x; let t = class ForbiddenTransactionModeOverrideError extends e.TypeORMError { constructor(e) { const t = e.map((e => `"${e.name}"`)); super(`Migrations ${t.join(", ")} override the transaction mode, but the global transaction mode is "all"`); } }; aa.ForbiddenTransactionModeOverrideError = t; return aa; } (function(e) { "use strict"; Object.defineProperty(e, "__esModule", { value: true }); const t = a; t.__exportStar(B(), e); t.__exportStar(j(), e); t.__exportStar(K(), e); t.__exportStar(G(), e); t.__exportStar(Y, e); t.__exportStar(ee(), e); t.__exportStar(te, e); t.__exportStar(re(), e); t.__exportStar(le(), e); t.__exportStar(ue, e); t.__exportStar(fe(), e); t.__exportStar(ye, e); t.__exportStar(Ae(), e); t.__exportStar(Re(), e); t.__exportStar(Se, e); t.__exportStar(_e(), e); t.__exportStar(qe(), e); t.__exportStar(Ue, e); t.__exportStar(ke, e); t.__exportStar(We(), e); t.__exportStar(Ye(), e); t.__exportStar(ze, e); t.__exportStar(tt(), e); t.__exportStar(nt, e); t.__exportStar(ot(), e); t.__exportStar(ut(), e); t.__exportStar(pt(), e); t.__exportStar(mt, e); t.__exportStar(gt(), e); t.__exportStar(bt(), e); t.__exportStar(St(), e); t.__exportStar(wt, e); t.__exportStar(Lt(), e); t.__exportStar(_t(), e); t.__exportStar(qt(), e); t.__exportStar(Ft(), e); t.__exportStar(kt, e); t.__exportStar(Vt, e); t.__exportStar(Ht, e); t.__exportStar(Xt(), e); t.__exportStar(tn(), e); t.__exportStar(sn(), e); t.__exportStar(rn, e); t.__exportStar(hn(), e); t.__exportStar(mn(), e); t.__exportStar(En(), e); t.__exportStar(Nn(), e); t.__exportStar(Cn(), e); t.__exportStar(Rn, e); t.__exportStar(vn(), e); t.__exportStar(Pn(), e); t.__exportStar($n(), e); t.__exportStar(Un(), e); t.__exportStar(kn(), e); t.__exportStar(jn, e); t.__exportStar(Hn(), e); t.__exportStar(Gn, e); t.__exportStar(Zn(), e); t.__exportStar(na(), e); t.__exportStar(x, e); t.__exportStar(ia(), e); })(_); const ra = e(_); "use strict"; Object.defineProperty(L, "__esModule", { value: true }); var oa = L.Alias = void 0; const ca = P; const la = _; class Alias { constructor(e) { ca.ObjectUtils.assign(this, e || {}); } get target() { return this.metadata.target; } get hasMetadata() { return !!this._metadata; } set metadata(e) { this._metadata = e; } get metadata() { if (!this._metadata) throw new la.TypeORMError(`Cannot get entity metadata for the given alias "${this.name}"`); return this._metadata; } } oa = L.Alias = Alias; var ua = {}; var ha = {}; "use strict"; Object.defineProperty(ha, "__esModule", { value: true }); var da = ha.QueryBuilderUtils = void 0; class QueryBuilderUtils { static isAliasProperty(e) { if (typeof e !== "string" || e.indexOf(".") === -1) return false; const [t, n] = e.split("."); if (!t || !n) return false; if (e.indexOf("(") !== -1 || e.indexOf(")") !== -1) return false; return true; } } da = ha.QueryBuilderUtils = QueryBuilderUtils; var pa = {}; var ma = {}; var fa = { exports: {} }; var ya; var Ea; function Ta() { if (Ea) return ya; Ea = 1; var e = r().Buffer; function t(t, n) { this._block = e.alloc(t); this._finalSize = n; this._blockSize = t; this._len = 0; } t.prototype.update = function(t, n) { if (typeof t === "string") { n = n || "utf8"; t = e.from(t, n); } var a = this._block; var s = this._blockSize; var i = t.length; var r = this._len; for (var o = 0; o < i; ) { var c = r % s; var l = Math.min(i - o, s - c); for (var u = 0; u < l; u++) { a[c + u] = t[o + u]; } r += l; o += l; if (r % s === 0) { this._update(a); } } this._len += i; return this; }; t.prototype.digest = function(e) { var t = this._len % this._blockSize; this._block[t] = 128; this._block.fill(0, t + 1); if (t >= this._finalSize) { this._update(this._block); this._block.fill(0); } var n = this._len * 8; if (n <= 4294967295) { this._block.writeUInt32BE(n, this._blockSize - 4); } else { var a = (n & 4294967295) >>> 0; var s = (n - a) / 4294967296; this._block.writeUInt32BE(s, this._blockSize - 8); this._block.writeUInt32BE(a, this._blockSize - 4); } this._update(this._block); var i = this._hash(); return e ? i.toString(e) : i; }; t.prototype._update = function() { throw new Error("_update must be implemented by subclass"); }; ya = t; return ya; } var ga; var Na; function Aa() { if (Na) return ga; Na = 1; var e = s(); var t = Ta(); var n = r().Buffer; var a = [ 1518500249, 1859775393, 2400959708 | 0, 3395469782 | 0 ]; var i = new Array(80); function o() { this.init(); this._w = i; t.call(this, 64, 56); } e(o, t); o.prototype.init = function() { this._a = 1732584193; this._b = 4023233417; this._c = 2562383102; this._d = 271733878; this._e = 3285377520; return this; }; function c(e) { return e << 5 | e >>> 27; } function l(e) { return e << 30 | e >>> 2; } function u(e, t, n, a) { if (e === 0) return t & n | ~t & a; if (e === 2) return t & n | t & a | n & a; return t ^ n ^ a; } o.prototype._update = function(e) { var t = this._w; var n = this._a | 0; var s = this._b | 0; var i = this._c | 0; var r = this._d | 0; var o = this._e | 0; for (var h = 0; h < 16; ++h) t[h] = e.readInt32BE(h * 4); for (;h < 80; ++h) t[h] = t[h - 3] ^ t[h - 8] ^ t[h - 14] ^ t[h - 16]; for (var d = 0; d < 80; ++d) { var p = ~~(d / 20); var m = c(n) + u(p, s, i, r) + o + t[d] + a[p] | 0; o = r; r = i; i = l(s); s = n; n = m; } this._a = n + this._a | 0; this._b = s + this._b | 0; this._c = i + this._c | 0; this._d = r + this._d | 0; this._e = o + this._e | 0; }; o.prototype._hash = function() { var e = n.allocUnsafe(20); e.writeInt32BE(this._a | 0, 0); e.writeInt32BE(this._b | 0, 4); e.writeInt32BE(this._c | 0, 8); e.writeInt32BE(this._d | 0, 12); e.writeInt32BE(this._e | 0, 16); return e; }; ga = o; return ga; } var ba; var Ca; function Ra() { if (Ca) return ba; Ca = 1; var e = s(); var t = Ta(); var n = r().Buffer; var a = [ 1518500249, 1859775393, 2400959708 | 0, 3395469782 | 0 ]; var i = new Array(80); function o() { this.init(); this._w = i; t.call(this, 64, 56); } e(o, t); o.prototype.init = function() { this._a = 1732584193; this._b = 4023233417; this._c = 2562383102; this._d = 271733878; this._e = 3285377520; return this; }; function c(e) { return e << 1 | e >>> 31; } function l(e) { return e << 5 | e >>> 27; } function u(e) { return e << 30 | e >>> 2; } function h(e, t, n, a) { if (e === 0) return t & n | ~t & a; if (e === 2) return t & n | t & a | n & a; return t ^ n ^ a; } o.prototype._update = function(e) { var t = this._w; var n = this._a | 0; var s = this._b | 0; var i = this._c | 0; var r = this._d | 0; var o = this._e | 0; for (var d = 0; d < 16; ++d) t[d] = e.readInt32BE(d * 4); for (;d < 80; ++d) t[d] = c(t[d - 3] ^ t[d - 8] ^ t[d - 14] ^ t[d - 16]); for (var p = 0; p < 80; ++p) { var m = ~~(p / 20); var f = l(n) + h(m, s, i, r) + o + t[p] + a[m] | 0; o = r; r = i; i = u(s); s = n; n = f; } this._a = n + this._a | 0; this._b = s + this._b | 0; this._c = i + this._c | 0; this._d = r + this._d | 0; this._e = o + this._e | 0; }; o.prototype._hash = function() { var e = n.allocUnsafe(20); e.writeInt32BE(this._a | 0, 0); e.writeInt32BE(this._b | 0, 4); e.writeInt32BE(this._c | 0, 8); e.writeInt32BE(this._d | 0, 12); e.writeInt32BE(this._e | 0, 16); return e; }; ba = o; return ba; } var Sa; var wa; function Ma() { if (wa) return Sa; wa = 1; var e = s(); var t = Ta(); var n = r().Buffer; var a = [ 1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344,