UNPKG

lakutata

Version:

An IoC-based universal application framework.

2,008 lines (1,653 loc) 1.87 MB
"use strict"; const e = require("./Package.5.cjs"); const t = require("./Package.13.cjs"); const n = require("./Package.62.cjs"); const a = require("./Package.132.cjs"); const s = require("./Package.7.cjs"); require("./Package.8.cjs"); require("./Package.15.cjs"); const i = require("fs"); const r = require("path"); const o = require("os"); const c = require("crypto"); const l = require("events"); const u = require("stream"); const h = require("module"); const d = require("fs/promises"); require("./Package.11.cjs"); const p = require("url"); require("./Package.10.cjs"); const m = require("util"); const f = require("./Package.63.cjs"); const y = require("node:url"); const E = require("node:path"); const T = require("node:fs"); const g = require("node:fs/promises"); const N = require("node:events"); const b = require("node:stream"); const A = require("node:string_decoder"); const C = e => e && e.__esModule ? e : { default: e }; const R = C(i); const S = C(r); const w = C(o); const M = C(c); const O = C(l); const v = C(u); const I = C(h); const L = C(d); const P = C(p); const D = C(m); const _ = C(y); const $ = C(E); const x = C(T); const q = C(g); const U = C(N); const B = C(b); const j = C(A); var F = {}; var k = {}; var Q = {}; var V = {}; var K = {}; var W = {}; var H = {}; "use strict"; Object.defineProperty(H, "__esModule", { value: true }); var G = H.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; } } } G = H.ObjectUtils = ObjectUtils; var Y = {}; var z = {}; var J = {}; "use strict"; Object.defineProperty(J, "__esModule", { value: true }); var X = J.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; } } } X = J.TypeORMError = TypeORMError; var Z; function ee() { if (Z) return z; Z = 1; "use strict"; Object.defineProperty(z, "__esModule", { value: true }); z.CannotReflectMethodParameterTypeError = void 0; const e = J; 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.`); } }; z.CannotReflectMethodParameterTypeError = t; return z; } var te = {}; var ne; function ae() { if (ne) return te; ne = 1; "use strict"; Object.defineProperty(te, "__esModule", { value: true }); te.AlreadyHasActiveConnectionError = void 0; const e = J; 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.`); } }; te.AlreadyHasActiveConnectionError = t; return te; } var se = {}; var ie; function re() { if (ie) return se; ie = 1; "use strict"; Object.defineProperty(se, "__esModule", { value: true }); se.SubjectWithoutIdentifierError = void 0; const e = J; let t = class SubjectWithoutIdentifierError extends e.TypeORMError { constructor(e) { super(`Internal error. Subject ${e.metadata.targetName} must have an identifier to perform operation.`); } }; se.SubjectWithoutIdentifierError = t; return se; } var oe = {}; var ce; function le() { if (ce) return oe; ce = 1; "use strict"; Object.defineProperty(oe, "__esModule", { value: true }); oe.CannotConnectAlreadyConnectedError = void 0; const e = J; let t = class CannotConnectAlreadyConnectedError extends e.TypeORMError { constructor(e) { super(`Cannot create a "${e}" connection because connection to the database already established.`); } }; oe.CannotConnectAlreadyConnectedError = t; return oe; } var ue = {}; "use strict"; Object.defineProperty(ue, "__esModule", { value: true }); var he = ue.LockNotSupportedOnGivenDriverError = void 0; const de = J; class LockNotSupportedOnGivenDriverError extends de.TypeORMError { constructor() { super(`Locking not supported on given driver.`); } } he = ue.LockNotSupportedOnGivenDriverError = LockNotSupportedOnGivenDriverError; var pe = {}; var me; function fe() { if (me) return pe; me = 1; "use strict"; Object.defineProperty(pe, "__esModule", { value: true }); pe.ConnectionIsNotSetError = void 0; const e = J; let t = class ConnectionIsNotSetError extends e.TypeORMError { constructor(e) { super(`Connection with ${e} database is not established. Check connection configuration.`); } }; pe.ConnectionIsNotSetError = t; return pe; } var ye = {}; "use strict"; Object.defineProperty(ye, "__esModule", { value: true }); var Ee = ye.CannotCreateEntityIdMapError = void 0; const Te = J; class CannotCreateEntityIdMapError extends Te.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.`; } } Ee = ye.CannotCreateEntityIdMapError = CannotCreateEntityIdMapError; var ge = {}; var Ne; function be() { if (Ne) return ge; Ne = 1; "use strict"; Object.defineProperty(ge, "__esModule", { value: true }); ge.MetadataAlreadyExistsError = void 0; const e = J; 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.")); } }; ge.MetadataAlreadyExistsError = t; return ge; } var Ae = {}; var Ce; function Re() { if (Ce) return Ae; Ce = 1; "use strict"; Object.defineProperty(Ae, "__esModule", { value: true }); Ae.CannotDetermineEntityError = void 0; const e = J; 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.`); } }; Ae.CannotDetermineEntityError = t; return Ae; } var Se = {}; "use strict"; Object.defineProperty(Se, "__esModule", { value: true }); var we = Se.UpdateValuesMissingError = void 0; const Me = J; class UpdateValuesMissingError extends Me.TypeORMError { constructor() { super(`Cannot perform update query because update values are not defined. Call "qb.set(...)" method to specify updated values.`); } } we = Se.UpdateValuesMissingError = UpdateValuesMissingError; var Oe = {}; var ve; function Ie() { if (ve) return Oe; ve = 1; "use strict"; Object.defineProperty(Oe, "__esModule", { value: true }); Oe.TreeRepositoryNotSupportedError = void 0; const e = J; let t = class TreeRepositoryNotSupportedError extends e.TypeORMError { constructor(e) { super(`Tree repositories are not supported in ${e.options.type} driver.`); } }; Oe.TreeRepositoryNotSupportedError = t; return Oe; } var Le = {}; "use strict"; Object.defineProperty(Le, "__esModule", { value: true }); var Pe = Le.CustomRepositoryNotFoundError = void 0; const De = J; class CustomRepositoryNotFoundError extends De.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?`); } } Pe = Le.CustomRepositoryNotFoundError = CustomRepositoryNotFoundError; var _e = {}; var $e; function xe() { if ($e) return _e; $e = 1; "use strict"; Object.defineProperty(_e, "__esModule", { value: true }); _e.TransactionNotStartedError = void 0; const e = J; let t = class TransactionNotStartedError extends e.TypeORMError { constructor() { super(`Transaction is not started yet, start transaction before committing or rolling it back.`); } }; _e.TransactionNotStartedError = t; return _e; } var qe = {}; var Ue; function Be() { if (Ue) return qe; Ue = 1; "use strict"; Object.defineProperty(qe, "__esModule", { value: true }); qe.TransactionAlreadyStartedError = void 0; const e = J; let t = class TransactionAlreadyStartedError extends e.TypeORMError { constructor() { super(`Transaction already started for the given connection, commit current transaction before starting a new one.`); } }; qe.TransactionAlreadyStartedError = t; return qe; } var je = {}; var Fe = {}; "use strict"; Object.defineProperty(Fe, "__esModule", { value: true }); exports.InstanceChecker_2 = Fe.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); } } exports.InstanceChecker_2 = Fe.InstanceChecker = InstanceChecker; "use strict"; Object.defineProperty(je, "__esModule", { value: true }); var ke = je.EntityNotFoundError = void 0; const Qe = J; const Ve = H; const Ke = Fe; class EntityNotFoundError extends Qe.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 (Ke.InstanceChecker.isEntitySchema(e)) { return e.options.name; } else if (typeof e === "function") { return e.name; } else if (Ve.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; } } ke = je.EntityNotFoundError = EntityNotFoundError; var We = {}; var He; function Ge() { if (He) return We; He = 1; "use strict"; Object.defineProperty(We, "__esModule", { value: true }); We.EntityMetadataNotFoundError = void 0; const e = J; const t = H; const n = Fe; 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; } } }; We.EntityMetadataNotFoundError = a; return We; } var Ye = {}; var ze; function Je() { if (ze) return Ye; ze = 1; "use strict"; Object.defineProperty(Ye, "__esModule", { value: true }); Ye.MustBeEntityError = void 0; const e = J; let t = class MustBeEntityError extends e.TypeORMError { constructor(e, t) { super(`Cannot ${e}, given value must be an entity, instead "${t}" is given.`); } }; Ye.MustBeEntityError = t; return Ye; } var Xe = {}; "use strict"; Object.defineProperty(Xe, "__esModule", { value: true }); var Ze = Xe.OptimisticLockVersionMismatchError = void 0; const et = J; class OptimisticLockVersionMismatchError extends et.TypeORMError { constructor(e, t, n) { super(`The optimistic lock on entity ${e} failed, version ${t} was expected, but is actually ${n}.`); } } Ze = Xe.OptimisticLockVersionMismatchError = OptimisticLockVersionMismatchError; var tt = {}; "use strict"; Object.defineProperty(tt, "__esModule", { value: true }); var nt = tt.LimitOnUpdateNotSupportedError = void 0; const at = J; class LimitOnUpdateNotSupportedError extends at.TypeORMError { constructor() { super(`Your database does not support LIMIT on UPDATE statements.`); } } nt = tt.LimitOnUpdateNotSupportedError = LimitOnUpdateNotSupportedError; var st = {}; var it; function rt() { if (it) return st; it = 1; "use strict"; Object.defineProperty(st, "__esModule", { value: true }); st.PrimaryColumnCannotBeNullableError = void 0; const e = J; 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.`); } }; st.PrimaryColumnCannotBeNullableError = t; return st; } var ot = {}; var ct; function lt() { if (ct) return ot; ct = 1; "use strict"; Object.defineProperty(ot, "__esModule", { value: true }); ot.CustomRepositoryCannotInheritRepositoryError = void 0; const e = J; 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.`); } }; ot.CustomRepositoryCannotInheritRepositoryError = t; return ot; } var ut = {}; "use strict"; Object.defineProperty(ut, "__esModule", { value: true }); var ht = ut.QueryRunnerProviderAlreadyReleasedError = void 0; const dt = J; class QueryRunnerProviderAlreadyReleasedError extends dt.TypeORMError { constructor() { super(`Database connection provided by a query runner was already ` + `released, cannot continue to use its querying methods anymore.`); } } ht = ut.QueryRunnerProviderAlreadyReleasedError = QueryRunnerProviderAlreadyReleasedError; var pt = {}; var mt; function ft() { if (mt) return pt; mt = 1; "use strict"; Object.defineProperty(pt, "__esModule", { value: true }); pt.CannotAttachTreeChildrenEntityError = void 0; const e = J; 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.`); } }; pt.CannotAttachTreeChildrenEntityError = t; return pt; } var yt = {}; "use strict"; Object.defineProperty(yt, "__esModule", { value: true }); var Et = yt.CustomRepositoryDoesNotHaveEntityError = void 0; const Tt = J; class CustomRepositoryDoesNotHaveEntityError extends Tt.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)? `); } } Et = yt.CustomRepositoryDoesNotHaveEntityError = CustomRepositoryDoesNotHaveEntityError; var gt = {}; var Nt; function bt() { if (Nt) return gt; Nt = 1; "use strict"; Object.defineProperty(gt, "__esModule", { value: true }); gt.MissingDeleteDateColumnError = void 0; const e = J; let t = class MissingDeleteDateColumnError extends e.TypeORMError { constructor(e) { super(`Entity "${e.name}" does not have delete date columns.`); } }; gt.MissingDeleteDateColumnError = t; return gt; } var At = {}; var Ct; function Rt() { if (Ct) return At; Ct = 1; "use strict"; Object.defineProperty(At, "__esModule", { value: true }); At.NoConnectionForRepositoryError = void 0; const e = J; 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.`); } }; At.NoConnectionForRepositoryError = t; return At; } var St = {}; var wt; function Mt() { if (wt) return St; wt = 1; "use strict"; Object.defineProperty(St, "__esModule", { value: true }); St.CircularRelationsError = void 0; const e = J; 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.`); } }; St.CircularRelationsError = t; return St; } var Ot = {}; "use strict"; Object.defineProperty(Ot, "__esModule", { value: true }); var vt = Ot.ReturningStatementNotSupportedError = void 0; const It = J; class ReturningStatementNotSupportedError extends It.TypeORMError { constructor() { super(`OUTPUT or RETURNING clause only supported by PostgreSQL, MariaDB, Microsoft SqlServer or Google Spanner.`); } } vt = Ot.ReturningStatementNotSupportedError = ReturningStatementNotSupportedError; var Lt = {}; var Pt; function Dt() { if (Pt) return Lt; Pt = 1; "use strict"; Object.defineProperty(Lt, "__esModule", { value: true }); Lt.UsingJoinTableIsNotAllowedError = void 0; const e = J; 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.`); } }; Lt.UsingJoinTableIsNotAllowedError = t; return Lt; } var _t = {}; var $t; function xt() { if ($t) return _t; $t = 1; "use strict"; Object.defineProperty(_t, "__esModule", { value: true }); _t.MissingJoinColumnError = void 0; const e = J; 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.`; } } }; _t.MissingJoinColumnError = t; return _t; } var qt = {}; var Ut; function Bt() { if (Ut) return qt; Ut = 1; "use strict"; Object.defineProperty(qt, "__esModule", { value: true }); qt.MissingPrimaryColumnError = void 0; const e = J; 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.`); } }; qt.MissingPrimaryColumnError = t; return qt; } var jt = {}; "use strict"; Object.defineProperty(jt, "__esModule", { value: true }); var Ft = jt.EntityPropertyNotFoundError = void 0; const kt = J; class EntityPropertyNotFoundError extends kt.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.`; } } Ft = jt.EntityPropertyNotFoundError = EntityPropertyNotFoundError; var Qt = {}; var Vt; function Kt() { if (Vt) return Qt; Vt = 1; "use strict"; Object.defineProperty(Qt, "__esModule", { value: true }); Qt.MissingDriverError = void 0; const e = J; let t = class MissingDriverError extends e.TypeORMError { constructor(e, t = []) { super(`Wrong driver: "${e}" given. Supported drivers are: ` + `${t.map((e => `"${e}"`)).join(", ")}.`); } }; Qt.MissingDriverError = t; return Qt; } var Wt = {}; var Ht; function Gt() { if (Ht) return Wt; Ht = 1; "use strict"; Object.defineProperty(Wt, "__esModule", { value: true }); Wt.DriverPackageNotInstalledError = void 0; const e = J; 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`); } }; Wt.DriverPackageNotInstalledError = t; return Wt; } var Yt = {}; var zt; function Jt() { if (zt) return Yt; zt = 1; "use strict"; Object.defineProperty(Yt, "__esModule", { value: true }); Yt.CannotGetEntityManagerNotConnectedError = void 0; const e = J; let t = class CannotGetEntityManagerNotConnectedError extends e.TypeORMError { constructor(e) { super(`Cannot get entity manager for "${e}" connection because connection is not yet established.`); } }; Yt.CannotGetEntityManagerNotConnectedError = t; return Yt; } var Xt = {}; var Zt; function en() { if (Zt) return Xt; Zt = 1; "use strict"; Object.defineProperty(Xt, "__esModule", { value: true }); Xt.ConnectionNotFoundError = void 0; const e = J; let t = class ConnectionNotFoundError extends e.TypeORMError { constructor(e) { super(`Connection "${e}" was not found.`); } }; Xt.ConnectionNotFoundError = t; return Xt; } var tn = {}; "use strict"; Object.defineProperty(tn, "__esModule", { value: true }); var nn = tn.NoVersionOrUpdateDateColumnError = void 0; const an = J; class NoVersionOrUpdateDateColumnError extends an.TypeORMError { constructor(e) { super(`Entity ${e} does not have version or update date columns.`); } } nn = tn.NoVersionOrUpdateDateColumnError = NoVersionOrUpdateDateColumnError; var sn = {}; "use strict"; Object.defineProperty(sn, "__esModule", { value: true }); var rn = sn.InsertValuesMissingError = void 0; const on = J; class InsertValuesMissingError extends on.TypeORMError { constructor() { super(`Cannot perform insert query because values are not defined. ` + `Call "qb.values(...)" method to specify inserted values.`); } } rn = sn.InsertValuesMissingError = InsertValuesMissingError; var cn = {}; "use strict"; Object.defineProperty(cn, "__esModule", { value: true }); var ln = cn.OptimisticLockCanNotBeUsedError = void 0; const un = J; class OptimisticLockCanNotBeUsedError extends un.TypeORMError { constructor() { super(`The optimistic lock can be used only with getOne() method.`); } } ln = cn.OptimisticLockCanNotBeUsedError = OptimisticLockCanNotBeUsedError; var hn = {}; var dn; function pn() { if (dn) return hn; dn = 1; "use strict"; Object.defineProperty(hn, "__esModule", { value: true }); hn.MetadataWithSuchNameAlreadyExistsError = void 0; const e = J; 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?"); } }; hn.MetadataWithSuchNameAlreadyExistsError = t; return hn; } var mn = {}; var fn; function yn() { if (fn) return mn; fn = 1; "use strict"; Object.defineProperty(mn, "__esModule", { value: true }); mn.DriverOptionNotSetError = void 0; const e = J; 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.`); } }; mn.DriverOptionNotSetError = t; return mn; } var En = {}; var Tn; function gn() { if (Tn) return En; Tn = 1; "use strict"; Object.defineProperty(En, "__esModule", { value: true }); En.FindRelationsNotFoundError = void 0; const e = J; 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.`; } } }; En.FindRelationsNotFoundError = t; return En; } var Nn = {}; "use strict"; Object.defineProperty(Nn, "__esModule", { value: true }); var bn = Nn.PessimisticLockTransactionRequiredError = void 0; const An = J; class PessimisticLockTransactionRequiredError extends An.TypeORMError { constructor() { super(`An open transaction is required for pessimistic lock.`); } } bn = Nn.PessimisticLockTransactionRequiredError = PessimisticLockTransactionRequiredError; var Cn = {}; var Rn; function Sn() { if (Rn) return Cn; Rn = 1; "use strict"; Object.defineProperty(Cn, "__esModule", { value: true }); Cn.RepositoryNotTreeError = void 0; const e = J; const t = H; const n = Fe; 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.`; } }; Cn.RepositoryNotTreeError = a; return Cn; } var wn = {}; var Mn; function On() { if (Mn) return wn; Mn = 1; "use strict"; Object.defineProperty(wn, "__esModule", { value: true }); wn.DataTypeNotSupportedError = void 0; const e = J; 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.`; } }; wn.DataTypeNotSupportedError = t; return wn; } var vn = {}; var In; function Ln() { if (In) return vn; In = 1; "use strict"; Object.defineProperty(vn, "__esModule", { value: true }); vn.InitializedRelationError = void 0; const e = J; 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.`); } }; vn.InitializedRelationError = t; return vn; } var Pn = {}; var Dn; function _n() { if (Dn) return Pn; Dn = 1; "use strict"; Object.defineProperty(Pn, "__esModule", { value: true }); Pn.MissingJoinTableError = void 0; const e = J; 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.`; } } }; Pn.MissingJoinTableError = t; return Pn; } var $n = {}; var xn; function qn() { if (xn) return $n; xn = 1; "use strict"; Object.defineProperty($n, "__esModule", { value: true }); $n.QueryFailedError = void 0; const e = H; const t = J; 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 }); } } }; $n.QueryFailedError = n; return $n; } var Un = {}; "use strict"; Object.defineProperty(Un, "__esModule", { value: true }); var Bn = Un.NoNeedToReleaseEntityManagerError = void 0; const jn = J; class NoNeedToReleaseEntityManagerError extends jn.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.`); } } Bn = Un.NoNeedToReleaseEntityManagerError = NoNeedToReleaseEntityManagerError; var Fn = {}; var kn; function Qn() { if (kn) return Fn; kn = 1; "use strict"; Object.defineProperty(Fn, "__esModule", { value: true }); Fn.UsingJoinColumnOnlyOnOneSideAllowedError = void 0; const e = J; 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.`); } }; Fn.UsingJoinColumnOnlyOnOneSideAllowedError = t; return Fn; } var Vn = {}; var Kn; function Wn() { if (Kn) return Vn; Kn = 1; "use strict"; Object.defineProperty(Vn, "__esModule", { value: true }); Vn.UsingJoinTableOnlyOnOneSideAllowedError = void 0; const e = J; 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.`); } }; Vn.UsingJoinTableOnlyOnOneSideAllowedError = t; return Vn; } var Hn = {}; var Gn; function Yn() { if (Gn) return Hn; Gn = 1; "use strict"; Object.defineProperty(Hn, "__esModule", { value: true }); Hn.SubjectRemovedAndUpdatedError = void 0; const e = J; 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).`); } }; Hn.SubjectRemovedAndUpdatedError = t; return Hn; } var zn = {}; var Jn; function Xn() { if (Jn) return zn; Jn = 1; "use strict"; Object.defineProperty(zn, "__esModule", { value: true }); zn.PersistedEntityNotFoundError = void 0; const e = J; let t = class PersistedEntityNotFoundError extends e.TypeORMError { constructor() { super(`Internal error. Persisted entity was not found in the list of prepared operated entities.`); } }; zn.PersistedEntityNotFoundError = t; return zn; } var Zn = {}; var ea; function ta() { if (ea) return Zn; ea = 1; "use strict"; Object.defineProperty(Zn, "__esModule", { value: true }); Zn.UsingJoinColumnIsNotAllowedError = void 0; const e = J; 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.`); } }; Zn.UsingJoinColumnIsNotAllowedError = t; return Zn; } var na = {}; "use strict"; Object.defineProperty(na, "__esModule", { value: true }); var aa = na.ColumnTypeUndefinedError = void 0; const sa = J; class ColumnTypeUndefinedError extends sa.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.`); } } aa = na.ColumnTypeUndefinedError = ColumnTypeUndefinedError; var ia = {}; var ra; function oa() { if (ra) return ia; ra = 1; "use strict"; Object.defineProperty(ia, "__esModule", { value: true }); ia.QueryRunnerAlreadyReleasedError = void 0; const e = J; let t = class QueryRunnerAlreadyReleasedError extends e.TypeORMError { constructor() { super(`Query runner already released. Cannot run queries anymore.`); } }; ia.QueryRunnerAlreadyReleasedError = t; return ia; } var ca = {}; "use strict"; Object.defineProperty(ca, "__esModule", { value: true }); var la = ca.OffsetWithoutLimitNotSupportedError = void 0; const ua = J; class OffsetWithoutLimitNotSupportedError extends ua.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).`); } } la = ca.OffsetWithoutLimitNotSupportedError = OffsetWithoutLimitNotSupportedError; var ha = {}; var da; function pa() { if (da) return ha; da = 1; "use strict"; Object.defineProperty(ha, "__esModule", { value: true }); ha.CannotExecuteNotConnectedError = void 0; const e = J; let t = class CannotExecuteNotConnectedError extends e.TypeORMError { constructor(e) { super(`Cannot execute operation on "${e}" connection because connection is not yet established.`); } }; ha.CannotExecuteNotConnectedError = t; return ha; } var ma = {}; var fa; function ya() { if (fa) return ma; fa = 1; "use strict"; Object.defineProperty(ma, "__esModule", { value: true }); ma.NoConnectionOptionError = void 0; const e = J; 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`); } }; ma.NoConnectionOptionError = t; return ma; } var Ea = {}; var Ta; function ga() { if (Ta) return Ea; Ta = 1; "use strict"; Object.defineProperty(Ea, "__esModule", { value: true }); Ea.ForbiddenTransactionModeOverrideError = void 0; const e = J; 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"`); } }; Ea.ForbiddenTransactionModeOverrideError = t; return Ea; } (function(e) { "use strict"; Object.defineProperty(e, "__esModule", { value: true }); const n = t.require$$0; n.__exportStar(ee(), e); n.__exportStar(ae(), e); n.__exportStar(re(), e); n.__exportStar(le(), e); n.__exportStar(ue, e); n.__exportStar(fe(), e); n.__exportStar(ye, e); n.__exportStar(be(), e); n.__exportStar(Re(), e); n.__exportStar(Se, e); n.__exportStar(Ie(), e); n.__exportStar(Le, e); n.__exportStar(xe(), e); n.__exportStar(Be(), e); n.__exportStar(je, e); n.__exportStar(Ge(), e); n.__exportStar(Je(), e); n.__exportStar(Xe, e); n.__exportStar(tt, e); n.__exportStar(rt(), e); n.__exportStar(lt(), e); n.__exportStar(ut, e); n.__exportStar(ft(), e); n.__exportStar(yt, e); n.__exportStar(bt(), e); n.__exportStar(Rt(), e); n.__exportStar(Mt(), e); n.__exportStar(Ot, e); n.__exportStar(Dt(), e); n.__exportStar(xt(), e); n.__exportStar(Bt(), e); n.__exportStar(jt, e); n.__exportStar(Kt(), e); n.__exportStar(Gt(), e); n.__exportStar(Jt(), e); n.__exportStar(en(), e); n.__exportStar(tn, e); n.__exportStar(sn, e); n.__exportStar(cn, e); n.__exportStar(pn(), e); n.__exportStar(yn(), e); n.__exportStar(gn(), e); n.__exportStar(Nn, e); n.__exportStar(Sn(), e); n.__exportStar(On(), e); n.__exportStar(Ln(), e); n.__exportStar(_n(), e); n.__exportStar(qn(), e); n.__exportStar(Un, e); n.__exportStar(Qn(), e); n.__exportStar(Wn(), e); n.__exportStar(Yn(), e); n.__exportStar(Xn(), e); n.__exportStar(ta(), e); n.__exportStar(na, e); n.__exportStar(oa(), e); n.__exportStar(ca, e); n.__exportStar(pa(), e); n.__exportStar(ya(), e); n.__exportStar(J, e); n.__exportStar(ga(), e); })(Y); const Na = e.getDefaultExportFromCjs(Y); "use strict"; Object.defineProperty(W, "__esModule", { value: true }); var ba = W.Alias = void 0; const Aa = H; const Ca = Y; class Alias { constructor(e) { Aa.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 Ca.TypeORMError(`Cannot get entity metadata for the given alias "${this.name}"`); return this._metadata; } } ba = W.Alias = Alias; var Ra = {}; var Sa = {}; "use strict"; Object.defineProperty(Sa, "__esModule", { value: true }); var wa = Sa.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; } } wa = Sa.QueryBuilderUtils = QueryBuilderUtils; var Ma = {}; var Oa = {}; var va = { exports: {} }; var Ia; var La; function Pa() { if (La) return Ia; La = 1; var e = a.requireSafeBuffer().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"); }; Ia = t; return Ia; } var Da; var _a; function $a() { if (_a) return Da; _a = 1; var e = n.requireInherits(); var t = Pa(); var s = a.requireSafeBuffer().Buffer; var i = [ 1518500249, 1859775393, 2400959708 | 0, 3395469782 | 0 ]; var r = new Array(80); function o() { this.init(); this._w = r; 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 a = this._b | 0; var s = 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, a, s, r) + o + t[d] + i[p] | 0; o = r; r = s; s = l(a); a = n; n = m; } this._a = n + this._a | 0; this._b = a + this._b | 0; this._c = s + this._c | 0; this._d = r + this._d | 0; this._e = o + this._e | 0; }; o.prototype._hash = function() { var e = s.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; }; Da = o; return Da; } var xa; var qa; function Ua() { if (qa) return xa; qa = 1; var e = n.requireInherits(); var t = Pa(); var s = a.requireSafeBuffer().Buffer; var i = [ 1518500249, 1859775393, 2400959708 | 0, 3395469782 | 0 ]; var r = new Array(80); function o() { this.init(); this._w = r; 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 a = this._b | 0; var s = 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, a, s, r) + o + t[p] + i[m] | 0; o = r; r = s; s = u(a); a = n; n = f; } this._a = n + this._a | 0; this._b = a + this._b | 0; this._c = s + this._c | 0; this._d = r + this._d | 0; this._e = o + this._e | 0; }; o.prototype._hash = function() { var e = s.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; }; xa = o; return xa; } var Ba; var ja; function Fa() { if (ja) return Ba; ja = 1; var e = n.requireInherits(); var t = Pa(); var s = a.requireSafeBuffer().Buffer; var i = [ 1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 324