@tsed/objection 8.0.0-alpha.1 → 8.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/createBooleanColumn.js.map +1 -1
- package/lib/esm/components/createIdColumn.js +1 -1
- package/lib/esm/components/createIdColumn.js.map +1 -1
- package/lib/esm/components/createNumberColumn.js.map +1 -1
- package/lib/esm/components/createStringColumn.js.map +1 -1
- package/lib/esm/decorators/belongsToOne.js.map +1 -1
- package/lib/esm/decorators/columnOptions.js.map +1 -1
- package/lib/esm/decorators/decimal.js.map +1 -1
- package/lib/esm/decorators/entity.js +1 -1
- package/lib/esm/decorators/entity.js.map +1 -1
- package/lib/esm/decorators/hasMany.js.map +1 -1
- package/lib/esm/decorators/hasOne.js.map +1 -1
- package/lib/esm/decorators/hasOneThroughRelation.js.map +1 -1
- package/lib/esm/decorators/idColumn.js +2 -2
- package/lib/esm/decorators/idColumn.js.map +1 -1
- package/lib/esm/decorators/manyToMany.js.map +1 -1
- package/lib/esm/decorators/relatesTo.js +2 -2
- package/lib/esm/decorators/relatesTo.js.map +1 -1
- package/lib/esm/services/ColumnTypesContainer.js.map +1 -1
- package/lib/esm/services/ObjectionConnection.js.map +1 -1
- package/lib/esm/utils/createColumns.js +1 -1
- package/lib/esm/utils/createColumns.js.map +1 -1
- package/lib/esm/utils/createJoinKeys.js +1 -1
- package/lib/esm/utils/createJoinKeys.js.map +1 -1
- package/lib/esm/utils/createRelationshipMapping.js.map +1 -1
- package/lib/esm/utils/getColumnCtx.js.map +1 -1
- package/lib/types/components/createIdColumn.d.ts +1 -1
- package/lib/types/decorators/relatesTo.d.ts +1 -1
- package/lib/types/utils/createColumns.d.ts +4 -4
- package/package.json +20 -21
- package/vitest.config.mts +5 -5
- package/lib/cjs/components/createBooleanColumn.js +0 -13
- package/lib/cjs/components/createBooleanColumn.js.map +0 -1
- package/lib/cjs/components/createIdColumn.js +0 -23
- package/lib/cjs/components/createIdColumn.js.map +0 -1
- package/lib/cjs/components/createNumberColumn.js +0 -13
- package/lib/cjs/components/createNumberColumn.js.map +0 -1
- package/lib/cjs/components/createStringColumn.js +0 -13
- package/lib/cjs/components/createStringColumn.js.map +0 -1
- package/lib/cjs/decorators/belongsToOne.js +0 -16
- package/lib/cjs/decorators/belongsToOne.js.map +0 -1
- package/lib/cjs/decorators/columnOptions.js +0 -15
- package/lib/cjs/decorators/columnOptions.js.map +0 -1
- package/lib/cjs/decorators/decimal.js +0 -29
- package/lib/cjs/decorators/decimal.js.map +0 -1
- package/lib/cjs/decorators/entity.js +0 -26
- package/lib/cjs/decorators/entity.js.map +0 -1
- package/lib/cjs/decorators/hasMany.js +0 -16
- package/lib/cjs/decorators/hasMany.js.map +0 -1
- package/lib/cjs/decorators/hasOne.js +0 -16
- package/lib/cjs/decorators/hasOne.js.map +0 -1
- package/lib/cjs/decorators/hasOneThroughRelation.js +0 -16
- package/lib/cjs/decorators/hasOneThroughRelation.js.map +0 -1
- package/lib/cjs/decorators/idColumn.js +0 -25
- package/lib/cjs/decorators/idColumn.js.map +0 -1
- package/lib/cjs/decorators/manyToMany.js +0 -16
- package/lib/cjs/decorators/manyToMany.js.map +0 -1
- package/lib/cjs/decorators/relatesTo.js +0 -25
- package/lib/cjs/decorators/relatesTo.js.map +0 -1
- package/lib/cjs/domain/ColumnOpts.js +0 -3
- package/lib/cjs/domain/ColumnOpts.js.map +0 -1
- package/lib/cjs/domain/RelationshipOpts.js +0 -9
- package/lib/cjs/domain/RelationshipOpts.js.map +0 -1
- package/lib/cjs/domain/interfaces.js +0 -3
- package/lib/cjs/domain/interfaces.js.map +0 -1
- package/lib/cjs/index.js +0 -33
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/package.json +0 -3
- package/lib/cjs/services/ColumnTypesContainer.js +0 -8
- package/lib/cjs/services/ColumnTypesContainer.js.map +0 -1
- package/lib/cjs/services/ObjectionConnection.js +0 -24
- package/lib/cjs/services/ObjectionConnection.js.map +0 -1
- package/lib/cjs/utils/connect.js +0 -13
- package/lib/cjs/utils/connect.js.map +0 -1
- package/lib/cjs/utils/createColumns.js +0 -38
- package/lib/cjs/utils/createColumns.js.map +0 -1
- package/lib/cjs/utils/createJoinKeys.js +0 -40
- package/lib/cjs/utils/createJoinKeys.js.map +0 -1
- package/lib/cjs/utils/createRelationshipMapping.js +0 -22
- package/lib/cjs/utils/createRelationshipMapping.js.map +0 -1
- package/lib/cjs/utils/defineStaticGetter.js +0 -14
- package/lib/cjs/utils/defineStaticGetter.js.map +0 -1
- package/lib/cjs/utils/getColumnCtx.js +0 -13
- package/lib/cjs/utils/getColumnCtx.js.map +0 -1
- package/lib/cjs/utils/getJsonEntityRelationships.js +0 -19
- package/lib/cjs/utils/getJsonEntityRelationships.js.map +0 -1
- package/lib/esm/package.json +0 -3
- package/lib/types-esm/components/createBooleanColumn.d.ts +0 -6
- package/lib/types-esm/components/createIdColumn.d.ts +0 -6
- package/lib/types-esm/components/createNumberColumn.d.ts +0 -6
- package/lib/types-esm/components/createStringColumn.d.ts +0 -6
- package/lib/types-esm/decorators/belongsToOne.d.ts +0 -8
- package/lib/types-esm/decorators/columnOptions.d.ts +0 -8
- package/lib/types-esm/decorators/decimal.d.ts +0 -11
- package/lib/types-esm/decorators/entity.d.ts +0 -11
- package/lib/types-esm/decorators/hasMany.d.ts +0 -9
- package/lib/types-esm/decorators/hasOne.d.ts +0 -8
- package/lib/types-esm/decorators/hasOneThroughRelation.d.ts +0 -8
- package/lib/types-esm/decorators/idColumn.d.ts +0 -7
- package/lib/types-esm/decorators/manyToMany.d.ts +0 -9
- package/lib/types-esm/decorators/relatesTo.d.ts +0 -10
- package/lib/types-esm/domain/ColumnOpts.d.ts +0 -4
- package/lib/types-esm/domain/RelationshipOpts.d.ts +0 -8
- package/lib/types-esm/domain/interfaces.d.ts +0 -8
- package/lib/types-esm/index.d.ts +0 -29
- package/lib/types-esm/services/ColumnTypesContainer.d.ts +0 -6
- package/lib/types-esm/services/ObjectionConnection.d.ts +0 -3
- package/lib/types-esm/utils/connect.d.ts +0 -2
- package/lib/types-esm/utils/createColumns.d.ts +0 -18
- package/lib/types-esm/utils/createJoinKeys.d.ts +0 -14
- package/lib/types-esm/utils/createRelationshipMapping.d.ts +0 -24
- package/lib/types-esm/utils/defineStaticGetter.d.ts +0 -4
- package/lib/types-esm/utils/getColumnCtx.d.ts +0 -13
- package/lib/types-esm/utils/getJsonEntityRelationships.d.ts +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createBooleanColumn.js","sourceRoot":"","sources":["../../../src/components/createBooleanColumn.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createBooleanColumn.js","sourceRoot":"","sources":["../../../src/components/createBooleanColumn.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,oBAAoB,EAAC,MAAM,qCAAqC,CAAC;AAEzE;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAwB,EAAE,EAAC,MAAM,EAAY;IAC/E,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;AACrC,CAAC;AAED,oBAAoB,CAAC,GAAG,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createIdColumn.js","sourceRoot":"","sources":["../../../src/components/createIdColumn.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createIdColumn.js","sourceRoot":"","sources":["../../../src/components/createIdColumn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,QAAQ,CAAC;AAGlC,OAAO,EAAC,oBAAoB,EAAC,MAAM,qCAAqC,CAAC;AAGzE;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,KAAwB,EAAE,EAAC,MAAM,EAAE,OAAO,EAAY;IACnF,QAAQ,OAAO,CAAC,IAAI,EAAE,CAAC;QACrB,KAAK,eAAe;YAClB,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE,CAAC;YACnD,MAAM;QACR,KAAK,YAAY;YACf,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE,CAAC;YAChD,MAAM;QACR,KAAK,MAAM;YACT,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC,CAAC;IACtE,CAAC;AACH,CAAC;AAED,oBAAoB,CAAC,GAAG,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createNumberColumn.js","sourceRoot":"","sources":["../../../src/components/createNumberColumn.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createNumberColumn.js","sourceRoot":"","sources":["../../../src/components/createNumberColumn.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,oBAAoB,EAAC,MAAM,qCAAqC,CAAC;AAGzE;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAwB,EAAE,EAAC,MAAM,EAAE,OAAO,EAAY;IACvF,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;AACvE,CAAC;AAED,oBAAoB,CAAC,GAAG,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createStringColumn.js","sourceRoot":"","sources":["../../../src/components/createStringColumn.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createStringColumn.js","sourceRoot":"","sources":["../../../src/components/createStringColumn.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,oBAAoB,EAAC,MAAM,qCAAqC,CAAC;AAGzE;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAwB,EAAE,EAAC,MAAM,EAAE,MAAM,EAAY;IACtF,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;AACtD,CAAC;AAED,oBAAoB,CAAC,GAAG,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"belongsToOne.js","sourceRoot":"","sources":["../../../src/decorators/belongsToOne.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"belongsToOne.js","sourceRoot":"","sources":["../../../src/decorators/belongsToOne.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,WAAW,CAAC;AAGhC,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,IAAqC;IAChE,OAAO,SAAS,CAAC,KAAK,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"columnOptions.js","sourceRoot":"","sources":["../../../src/decorators/columnOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"columnOptions.js","sourceRoot":"","sources":["../../../src/decorators/columnOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAIpC;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,OAA4B;IACxD,OAAO,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAQ,CAAC;AAC/C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decimal.js","sourceRoot":"","sources":["../../../src/decorators/decimal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AACnD,OAAO,EAAC,QAAQ,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"decimal.js","sourceRoot":"","sources":["../../../src/decorators/decimal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AACnD,OAAO,EAAC,QAAQ,EAAC,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAC,aAAa,EAAC,MAAM,oBAAoB,CAAC;AAOjD;;;;;GAKG;AACH,MAAM,UAAU,OAAO,CAAC,UAA0B,EAAE;IAClD,OAAO,aAAa,CAClB,QAAQ,EAAE,EACV,aAAa,CAAC;QACZ,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE;YACP,IAAI,EAAE,SAAS;YACf,GAAG,OAAO;SACX;KACF,CAAC,EACF,QAAQ,CAAC,WAAW,EAAE;QACpB,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE;YACP,IAAI,EAAE,SAAS;YACf,GAAG,OAAO;SACX;KACF,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { getJsonSchema } from "@tsed/schema";
|
|
1
2
|
import { defineStaticGetter } from "../utils/defineStaticGetter.js";
|
|
2
3
|
import { getJsonEntityRelationships } from "../utils/getJsonEntityRelationships.js";
|
|
3
|
-
import { getJsonSchema } from "@tsed/schema";
|
|
4
4
|
/**
|
|
5
5
|
*
|
|
6
6
|
* @param tableName
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity.js","sourceRoot":"","sources":["../../../src/decorators/entity.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"entity.js","sourceRoot":"","sources":["../../../src/decorators/entity.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,aAAa,EAAC,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAC,kBAAkB,EAAC,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAC,0BAA0B,EAAC,MAAM,wCAAwC,CAAC;AAElF;;;;;GAKG;AACH,MAAM,UAAU,MAAM,CAAC,SAAiB;IACtC,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACjD,CAAC;IAED,OAAO,CAAC,MAAW,EAAE,EAAE;QACrB,MAAM,wBAAwB,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;QAC5D,kBAAkB,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QACzD,kBAAkB,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;QACtE,kBAAkB,CAAC,MAAM,EAAE,kBAAkB,EAAE,GAAG,EAAE,CAAC,wBAAwB,IAAI,0BAA0B,CAAC,MAAM,CAAC,CAAC,CAAC;QACrH,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hasMany.js","sourceRoot":"","sources":["../../../src/decorators/hasMany.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAsB,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"hasMany.js","sourceRoot":"","sources":["../../../src/decorators/hasMany.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAsB,MAAM,WAAW,CAAC;AAGrD,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,UAAU,OAAO,CAAC,IAAyB,EAAE,IAAkC;IACnF,OAAO,SAAS,CAAC,KAAK,CAAC,eAAe,EAAE,EAAC,GAAG,IAAI,EAAE,IAAI,EAAC,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hasOne.js","sourceRoot":"","sources":["../../../src/decorators/hasOne.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"hasOne.js","sourceRoot":"","sources":["../../../src/decorators/hasOne.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,WAAW,CAAC;AAGhC,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,UAAU,MAAM,CAAC,IAAqC;IAC1D,OAAO,SAAS,CAAC,KAAK,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;AAC/C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hasOneThroughRelation.js","sourceRoot":"","sources":["../../../src/decorators/hasOneThroughRelation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hasOneThroughRelation.js","sourceRoot":"","sources":["../../../src/decorators/hasOneThroughRelation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,WAAW,CAAC;AAGhC,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAAkC;IACtE,OAAO,SAAS,CAAC,KAAK,CAAC,qBAAqB,EAAE,IAAI,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useDecorators } from "@tsed/core";
|
|
2
2
|
import { Property } from "@tsed/schema";
|
|
3
3
|
import { defineStaticGetter } from "../utils/defineStaticGetter.js";
|
|
4
|
-
import {
|
|
4
|
+
import { ColumnOptions } from "./columnOptions.js";
|
|
5
5
|
/**
|
|
6
6
|
*
|
|
7
7
|
* @param type
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idColumn.js","sourceRoot":"","sources":["../../../src/decorators/idColumn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"idColumn.js","sourceRoot":"","sources":["../../../src/decorators/idColumn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AACzC,OAAO,EAAC,QAAQ,EAAC,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAC,kBAAkB,EAAC,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAC,aAAa,EAAC,MAAM,oBAAoB,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAC,OAAgD,YAAY;IACnF,OAAO,aAAa,CAClB,QAAQ,EAAE,EACV,aAAa,CAAC;QACZ,UAAU,EAAE,UAAU;QACtB,OAAO,EAAE;YACP,IAAI;SACL;KACF,CAAC,EACF,CAAC,MAAW,EAAE,WAAmB,EAAE,EAAE;QACnC,kBAAkB,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC;IAC5D,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manyToMany.js","sourceRoot":"","sources":["../../../src/decorators/manyToMany.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAsB,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"manyToMany.js","sourceRoot":"","sources":["../../../src/decorators/manyToMany.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAsB,MAAM,WAAW,CAAC;AAGrD,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,IAAyB,EAAE,IAAkC;IACtF,OAAO,SAAS,CAAC,KAAK,CAAC,kBAAkB,EAAE,EAAC,GAAG,IAAI,EAAE,IAAI,EAAC,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { StoreFn, useDecorators } from "@tsed/core";
|
|
1
2
|
import { CollectionOf, Property } from "@tsed/schema";
|
|
2
3
|
import { isModelClassFactory } from "../domain/RelationshipOpts.js";
|
|
3
|
-
import { StoreFn, useDecorators } from "@tsed/core";
|
|
4
|
-
import { OBJECTION_RELATIONSHIP_KEY } from "../utils/getJsonEntityRelationships.js";
|
|
5
4
|
import { createRelationshipMapping } from "../utils/createRelationshipMapping.js";
|
|
5
|
+
import { OBJECTION_RELATIONSHIP_KEY } from "../utils/getJsonEntityRelationships.js";
|
|
6
6
|
/**
|
|
7
7
|
*
|
|
8
8
|
* @param relation
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relatesTo.js","sourceRoot":"","sources":["../../../src/decorators/relatesTo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,QAAQ,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"relatesTo.js","sourceRoot":"","sources":["../../../src/decorators/relatesTo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AAClD,OAAO,EAAC,YAAY,EAAE,QAAQ,EAAC,MAAM,cAAc,CAAC;AAGpD,OAAO,EAAC,mBAAmB,EAAmB,MAAM,+BAA+B,CAAC;AACpF,OAAO,EAAC,yBAAyB,EAAC,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAC,0BAA0B,EAAC,MAAM,wCAAwC,CAAC;AAElF;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,QAAsB,EAAE,IAAuB;IACvE,OAAO,aAAa,CAClB,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EACjD,OAAO,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;QACxB,IAAI,IAAI,IAAI,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YAC3C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QAC1B,CAAC;QACD,KAAK,CAAC,GAAG,CAAC,0BAA0B,EAAE,yBAAyB,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;IAC3F,CAAC,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColumnTypesContainer.js","sourceRoot":"","sources":["../../../src/services/ColumnTypesContainer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ColumnTypesContainer.js","sourceRoot":"","sources":["../../../src/services/ColumnTypesContainer.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAoE,IAAI,GAAG,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectionConnection.js","sourceRoot":"","sources":["../../../src/services/ObjectionConnection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAE,gBAAgB,EAAC,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"ObjectionConnection.js","sourceRoot":"","sources":["../../../src/services/ObjectionConnection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAE,gBAAgB,EAAC,MAAM,UAAU,CAAC;AAGzD,OAAO,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAC;AAErD,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;AAGrE,gBAAgB,CAAC;IACf,OAAO,EAAE,oBAAoB;IAC7B,IAAI,EAAE,CAAC,aAAa,CAAC;IACrB,eAAe,CAAC,aAA4B;QAC1C,MAAM,iBAAiB,GAAG,aAAa,CAAC,GAAG,CAAc,MAAM,CAAE,CAAC;QAElE,IAAI,iBAAiB,EAAE,CAAC;YACtB,IAAI,CAAC;gBACH,OAAO,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;YAC7C,CAAC;YAAC,OAAO,EAAE,EAAE,CAAC;gBACZ,uBAAuB;gBACvB,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACpB,CAAC;QACH,CAAC;QAED,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC7B,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { getProperties } from "@tsed/schema";
|
|
2
1
|
import "../components/createBooleanColumn.js";
|
|
3
2
|
import "../components/createIdColumn.js";
|
|
4
3
|
import "../components/createNumberColumn.js";
|
|
5
4
|
import "../components/createStringColumn.js";
|
|
5
|
+
import { getProperties } from "@tsed/schema";
|
|
6
6
|
import { ColumnTypesContainer } from "../services/ColumnTypesContainer.js";
|
|
7
7
|
import { getColumnCtx } from "./getColumnCtx.js";
|
|
8
8
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createColumns.js","sourceRoot":"","sources":["../../../src/utils/createColumns.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"createColumns.js","sourceRoot":"","sources":["../../../src/utils/createColumns.ts"],"names":[],"mappings":"AAAA,OAAO,sCAAsC,CAAC;AAC9C,OAAO,iCAAiC,CAAC;AACzC,OAAO,qCAAqC,CAAC;AAC7C,OAAO,qCAAqC,CAAC;AAE7C,OAAO,EAAC,aAAa,EAAkB,MAAM,cAAc,CAAC;AAG5D,OAAO,EAAC,oBAAoB,EAAC,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAC,YAAY,EAAC,MAAM,mBAAmB,CAAC;AAE/C;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,KAAwB,EAAE,MAAuB;IAC5E,MAAM,GAAG,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;IAEjC,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;QAC9C,MAAM,eAAe,GAAG,CAAC,UAAU,oFAAoF,CAAC;IAC1H,CAAC;IAED,oBAAoB,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAE,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AACxD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,KAAU;IACnC,OAAO,CAAC,GAAG,aAAa,CAAC,KAAK,EAAE,EAAC,gBAAgB,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;AACtG,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,KAAwB,EAAE,KAAU;IAChE,UAAU,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QAC/B,YAAY,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAC9B,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createJoinKeys.js","sourceRoot":"","sources":["../../../src/utils/createJoinKeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"createJoinKeys.js","sourceRoot":"","sources":["../../../src/utils/createJoinKeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AACpC,OAAO,EAAC,KAAK,EAAe,MAAM,WAAW,CAAC;AAE9C,OAAO,EAAC,6BAA6B,EAAmB,MAAM,+BAA+B,CAAC;AAE9F;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,WAAgB,EAAE,WAAgB,EAAE,WAAmB,EAAE,QAAsB,EAAE,IAAuB;IACrI,MAAM,aAAa,GAAG,IAAI,EAAE,IAAI,IAAI,QAAQ,CAAC,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IAC/E,MAAM,gBAAgB,GAAG,GAAG,WAAW,CAAC,SAAS,IAAI,IAAI,EAAE,IAAI,IAAI,WAAW,CAAC,QAAQ,EAAE,CAAC;IAC1F,MAAM,iBAAiB,GAAG,GAAG,aAAa,CAAC,SAAS,IAAI,IAAI,EAAE,EAAE,IAAI,aAAa,CAAC,QAAQ,EAAE,CAAC;IAE7F,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,KAAK,CAAC,eAAe,CAAC;QAC3B,KAAK,KAAK,CAAC,cAAc;YACvB,OAAO;gBACL,IAAI,EAAE,gBAAgB;gBACtB,EAAE,EAAE,GAAG,aAAa,CAAC,SAAS,IAAI,IAAI,EAAE,EAAE,IAAI,WAAW,CAAC,SAAS,GAAG,IAAI,EAAE;aAC7E,CAAC;QACJ,KAAK,KAAK,CAAC,kBAAkB,CAAC;QAC9B,KAAK,KAAK,CAAC,qBAAqB;YAC9B,OAAO;gBACL,IAAI,EAAE,gBAAgB;gBACtB,OAAO,EAAE,CAAC,6BAA6B,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI;oBAChE,IAAI,EAAE,GAAG,WAAW,CAAC,SAAS,IAAI,aAAa,CAAC,SAAS,IAAI,WAAW,CAAC,SAAS,IAAI;oBACtF,EAAE,EAAE,GAAG,WAAW,CAAC,SAAS,IAAI,aAAa,CAAC,SAAS,IAAI,aAAa,CAAC,SAAS,IAAI;iBACvF;gBACD,EAAE,EAAE,iBAAiB;aACtB,CAAC;QACJ,KAAK,KAAK,CAAC,oBAAoB,CAAC;QAChC;YACE,OAAO;gBACL,IAAI,EAAE,GAAG,WAAW,CAAC,SAAS,IAAI,IAAI,EAAE,IAAI,IAAI,WAAW,GAAG,IAAI,EAAE;gBACpE,EAAE,EAAE,iBAAiB;aACtB,CAAC;IACN,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createRelationshipMapping.js","sourceRoot":"","sources":["../../../src/utils/createRelationshipMapping.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"createRelationshipMapping.js","sourceRoot":"","sources":["../../../src/utils/createRelationshipMapping.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAInE,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAEnD;;GAEG;AACH,MAAM,UAAU,yBAAyB,CAAC,CAAC,MAAM,EAAE,WAAW,CAAsB,EAAE,QAAsB,EAAE,IAAuB;IACnI,OAAO,CAAC,WAAgB,EAAE,EAAE,CAAC,CAAC;QAC5B,CAAC,WAAW,CAAC,EAAE;YACb,QAAQ;YACR,UAAU,EAAE,IAAI,EAAE,IAAI,IAAI,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,WAAW,CAAC;YAC/D,IAAI,EAAE,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC;YAC9E,MAAM,EAAE,IAAI,EAAE,MAAM;YACpB,MAAM,EAAE,IAAI,EAAE,MAAM;YACpB,YAAY,EAAE,IAAI,EAAE,YAAY;SACjC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getColumnCtx.js","sourceRoot":"","sources":["../../../src/utils/getColumnCtx.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getColumnCtx.js","sourceRoot":"","sources":["../../../src/utils/getColumnCtx.ts"],"names":[],"mappings":"AAYA;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,MAAuB;IAClD,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;IACtC,MAAM,EAAC,UAAU,GAAG,MAAM,CAAC,IAAI,EAAE,OAAO,GAAG,EAAE,EAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAsB,WAAW,EAAE,EAAE,CAAC,CAAC;IAExG,OAAO,EAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAC,CAAC;AAC/C,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import "../components/createBooleanColumn.js";
|
|
2
|
+
import "../components/createIdColumn.js";
|
|
3
|
+
import "../components/createNumberColumn.js";
|
|
4
|
+
import "../components/createStringColumn.js";
|
|
1
5
|
import { JsonEntityStore } from "@tsed/schema";
|
|
2
6
|
import { Knex } from "knex";
|
|
3
|
-
import "../components/createBooleanColumn";
|
|
4
|
-
import "../components/createIdColumn";
|
|
5
|
-
import "../components/createNumberColumn";
|
|
6
|
-
import "../components/createStringColumn";
|
|
7
7
|
/**
|
|
8
8
|
* @ignore
|
|
9
9
|
*/
|
package/package.json
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/objection",
|
|
3
3
|
"description": "Objection.js package for Ts.ED framework",
|
|
4
|
-
"type": "
|
|
5
|
-
"version": "8.0.0-alpha.
|
|
4
|
+
"type": "module",
|
|
5
|
+
"version": "8.0.0-alpha.10",
|
|
6
6
|
"source": "./src/index.ts",
|
|
7
|
-
"main": "./lib/
|
|
7
|
+
"main": "./lib/esm/index.js",
|
|
8
8
|
"module": "./lib/esm/index.js",
|
|
9
9
|
"typings": "./lib/types/index.d.ts",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
12
|
"types": "./lib/types/index.d.ts",
|
|
13
13
|
"import": "./lib/esm/index.js",
|
|
14
|
-
"
|
|
15
|
-
"default": "./lib/cjs/index.js"
|
|
14
|
+
"default": "./lib/esm/index.js"
|
|
16
15
|
}
|
|
17
16
|
},
|
|
18
17
|
"scripts": {
|
|
@@ -23,29 +22,29 @@
|
|
|
23
22
|
"test:ci": "vitest run --coverage.thresholds.autoUpdate=true"
|
|
24
23
|
},
|
|
25
24
|
"dependencies": {
|
|
26
|
-
"tslib": "2.
|
|
25
|
+
"tslib": "2.7.0"
|
|
27
26
|
},
|
|
28
27
|
"devDependencies": {
|
|
29
|
-
"@tsed/ajv": "8.0.0-alpha.
|
|
30
|
-
"@tsed/barrels": "8.0.0-alpha.
|
|
31
|
-
"@tsed/core": "8.0.0-alpha.
|
|
32
|
-
"@tsed/di": "8.0.0-alpha.
|
|
33
|
-
"@tsed/json-mapper": "8.0.0-alpha.
|
|
34
|
-
"@tsed/schema": "8.0.0-alpha.
|
|
35
|
-
"@tsed/typescript": "8.0.0-alpha.
|
|
36
|
-
"eslint": "
|
|
28
|
+
"@tsed/ajv": "8.0.0-alpha.10",
|
|
29
|
+
"@tsed/barrels": "8.0.0-alpha.10",
|
|
30
|
+
"@tsed/core": "8.0.0-alpha.10",
|
|
31
|
+
"@tsed/di": "8.0.0-alpha.10",
|
|
32
|
+
"@tsed/json-mapper": "8.0.0-alpha.10",
|
|
33
|
+
"@tsed/schema": "8.0.0-alpha.10",
|
|
34
|
+
"@tsed/typescript": "8.0.0-alpha.10",
|
|
35
|
+
"eslint": "9.12.0",
|
|
37
36
|
"knex": "^3.1.0",
|
|
38
37
|
"objection": "^2.2.18",
|
|
39
38
|
"sqlite3": "^5.1.7",
|
|
40
|
-
"typescript": "4.
|
|
41
|
-
"vitest": "2.
|
|
39
|
+
"typescript": "5.4.5",
|
|
40
|
+
"vitest": "2.1.2"
|
|
42
41
|
},
|
|
43
42
|
"peerDependencies": {
|
|
44
|
-
"@tsed/ajv": "8.0.0-alpha.
|
|
45
|
-
"@tsed/core": "8.0.0-alpha.
|
|
46
|
-
"@tsed/di": "8.0.0-alpha.
|
|
47
|
-
"@tsed/json-mapper": "8.0.0-alpha.
|
|
48
|
-
"@tsed/schema": "8.0.0-alpha.
|
|
43
|
+
"@tsed/ajv": "8.0.0-alpha.10",
|
|
44
|
+
"@tsed/core": "8.0.0-alpha.10",
|
|
45
|
+
"@tsed/di": "8.0.0-alpha.10",
|
|
46
|
+
"@tsed/json-mapper": "8.0.0-alpha.10",
|
|
47
|
+
"@tsed/schema": "8.0.0-alpha.10",
|
|
49
48
|
"knex": ">=0.94.0",
|
|
50
49
|
"objection": ">=2.0.0"
|
|
51
50
|
},
|
package/vitest.config.mts
CHANGED
|
@@ -10,12 +10,12 @@ export default defineConfig(
|
|
|
10
10
|
coverage: {
|
|
11
11
|
...presets.test.coverage,
|
|
12
12
|
thresholds: {
|
|
13
|
-
statements:
|
|
14
|
-
branches:
|
|
15
|
-
functions:
|
|
16
|
-
lines:
|
|
13
|
+
statements: 0,
|
|
14
|
+
branches: 0,
|
|
15
|
+
functions: 0,
|
|
16
|
+
lines: 0
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
);
|
|
21
|
+
);
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createBooleanColumn = void 0;
|
|
4
|
-
const ColumnTypesContainer_js_1 = require("../services/ColumnTypesContainer.js");
|
|
5
|
-
/**
|
|
6
|
-
* @ignore
|
|
7
|
-
*/
|
|
8
|
-
function createBooleanColumn(table, { entity }) {
|
|
9
|
-
table.boolean(entity.propertyName);
|
|
10
|
-
}
|
|
11
|
-
exports.createBooleanColumn = createBooleanColumn;
|
|
12
|
-
ColumnTypesContainer_js_1.ColumnTypesContainer.set("boolean", createBooleanColumn);
|
|
13
|
-
//# sourceMappingURL=createBooleanColumn.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createBooleanColumn.js","sourceRoot":"","sources":["../../../src/components/createBooleanColumn.ts"],"names":[],"mappings":";;;AACA,iFAAyE;AAEzE;;GAEG;AACH,SAAgB,mBAAmB,CAAC,KAAwB,EAAE,EAAC,MAAM,EAAY;IAC/E,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;AACrC,CAAC;AAFD,kDAEC;AAED,8CAAoB,CAAC,GAAG,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createIdColumn = void 0;
|
|
4
|
-
const ColumnTypesContainer_js_1 = require("../services/ColumnTypesContainer.js");
|
|
5
|
-
const crypto_1 = require("crypto");
|
|
6
|
-
/**
|
|
7
|
-
* @ignore
|
|
8
|
-
*/
|
|
9
|
-
function createIdColumn(table, { entity, options }) {
|
|
10
|
-
switch (options.type) {
|
|
11
|
-
case "bigIncrements":
|
|
12
|
-
table.bigIncrements(entity.propertyName).primary();
|
|
13
|
-
break;
|
|
14
|
-
case "increments":
|
|
15
|
-
table.increments(entity.propertyName).primary();
|
|
16
|
-
break;
|
|
17
|
-
case "uuid":
|
|
18
|
-
table.uuid(entity.propertyName).primary().defaultTo((0, crypto_1.randomUUID)());
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.createIdColumn = createIdColumn;
|
|
22
|
-
ColumnTypesContainer_js_1.ColumnTypesContainer.set("idColumn", createIdColumn);
|
|
23
|
-
//# sourceMappingURL=createIdColumn.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createIdColumn.js","sourceRoot":"","sources":["../../../src/components/createIdColumn.ts"],"names":[],"mappings":";;;AACA,iFAAyE;AAEzE,mCAAkC;AAElC;;GAEG;AACH,SAAgB,cAAc,CAAC,KAAwB,EAAE,EAAC,MAAM,EAAE,OAAO,EAAY;IACnF,QAAQ,OAAO,CAAC,IAAI,EAAE;QACpB,KAAK,eAAe;YAClB,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE,CAAC;YACnD,MAAM;QACR,KAAK,YAAY;YACf,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE,CAAC;YAChD,MAAM;QACR,KAAK,MAAM;YACT,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE,CAAC,SAAS,CAAC,IAAA,mBAAU,GAAE,CAAC,CAAC;KACrE;AACH,CAAC;AAXD,wCAWC;AAED,8CAAoB,CAAC,GAAG,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createNumberColumn = void 0;
|
|
4
|
-
const ColumnTypesContainer_js_1 = require("../services/ColumnTypesContainer.js");
|
|
5
|
-
/**
|
|
6
|
-
* @ignore
|
|
7
|
-
*/
|
|
8
|
-
function createNumberColumn(table, { entity, options }) {
|
|
9
|
-
table.decimal(entity.propertyName, options.precision, options.scale);
|
|
10
|
-
}
|
|
11
|
-
exports.createNumberColumn = createNumberColumn;
|
|
12
|
-
ColumnTypesContainer_js_1.ColumnTypesContainer.set("number", createNumberColumn);
|
|
13
|
-
//# sourceMappingURL=createNumberColumn.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createNumberColumn.js","sourceRoot":"","sources":["../../../src/components/createNumberColumn.ts"],"names":[],"mappings":";;;AACA,iFAAyE;AAGzE;;GAEG;AACH,SAAgB,kBAAkB,CAAC,KAAwB,EAAE,EAAC,MAAM,EAAE,OAAO,EAAY;IACvF,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;AACvE,CAAC;AAFD,gDAEC;AAED,8CAAoB,CAAC,GAAG,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createStringColumn = void 0;
|
|
4
|
-
const ColumnTypesContainer_js_1 = require("../services/ColumnTypesContainer.js");
|
|
5
|
-
/**
|
|
6
|
-
* @ignore
|
|
7
|
-
*/
|
|
8
|
-
function createStringColumn(table, { entity, schema }) {
|
|
9
|
-
table.string(entity.propertyName, schema.maxLength);
|
|
10
|
-
}
|
|
11
|
-
exports.createStringColumn = createStringColumn;
|
|
12
|
-
ColumnTypesContainer_js_1.ColumnTypesContainer.set("string", createStringColumn);
|
|
13
|
-
//# sourceMappingURL=createStringColumn.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createStringColumn.js","sourceRoot":"","sources":["../../../src/components/createStringColumn.ts"],"names":[],"mappings":";;;AACA,iFAAyE;AAGzE;;GAEG;AACH,SAAgB,kBAAkB,CAAC,KAAwB,EAAE,EAAC,MAAM,EAAE,MAAM,EAAY;IACtF,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;AACtD,CAAC;AAFD,gDAEC;AAED,8CAAoB,CAAC,GAAG,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BelongsToOne = void 0;
|
|
4
|
-
const objection_1 = require("objection");
|
|
5
|
-
const relatesTo_js_1 = require("./relatesTo.js");
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
* @param opts
|
|
9
|
-
* @decorator
|
|
10
|
-
* @objection
|
|
11
|
-
*/
|
|
12
|
-
function BelongsToOne(opts) {
|
|
13
|
-
return (0, relatesTo_js_1.RelatesTo)(objection_1.Model.BelongsToOneRelation, opts);
|
|
14
|
-
}
|
|
15
|
-
exports.BelongsToOne = BelongsToOne;
|
|
16
|
-
//# sourceMappingURL=belongsToOne.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"belongsToOne.js","sourceRoot":"","sources":["../../../src/decorators/belongsToOne.ts"],"names":[],"mappings":";;;AAAA,yCAAgC;AAChC,iDAAyC;AAGzC;;;;;GAKG;AACH,SAAgB,YAAY,CAAC,IAAqC;IAChE,OAAO,IAAA,wBAAS,EAAC,iBAAK,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC;AACrD,CAAC;AAFD,oCAEC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ColumnOptions = void 0;
|
|
4
|
-
const core_1 = require("@tsed/core");
|
|
5
|
-
/**
|
|
6
|
-
*
|
|
7
|
-
* @param options
|
|
8
|
-
* @decorator
|
|
9
|
-
* @objection
|
|
10
|
-
*/
|
|
11
|
-
function ColumnOptions(options) {
|
|
12
|
-
return (0, core_1.StoreSet)("objection", options);
|
|
13
|
-
}
|
|
14
|
-
exports.ColumnOptions = ColumnOptions;
|
|
15
|
-
//# sourceMappingURL=columnOptions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"columnOptions.js","sourceRoot":"","sources":["../../../src/decorators/columnOptions.ts"],"names":[],"mappings":";;;AAAA,qCAAoC;AAGpC;;;;;GAKG;AACH,SAAgB,aAAa,CAAC,OAA4B;IACxD,OAAO,IAAA,eAAQ,EAAC,WAAW,EAAE,OAAO,CAAQ,CAAC;AAC/C,CAAC;AAFD,sCAEC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Decimal = void 0;
|
|
4
|
-
const core_1 = require("@tsed/core");
|
|
5
|
-
const schema_1 = require("@tsed/schema");
|
|
6
|
-
const columnOptions_js_1 = require("./columnOptions.js");
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* @param options
|
|
10
|
-
* @decorator
|
|
11
|
-
* @objection
|
|
12
|
-
*/
|
|
13
|
-
function Decimal(options = {}) {
|
|
14
|
-
return (0, core_1.useDecorators)((0, schema_1.Property)(), (0, columnOptions_js_1.ColumnOptions)({
|
|
15
|
-
columnType: "number",
|
|
16
|
-
options: {
|
|
17
|
-
type: "decimal",
|
|
18
|
-
...options
|
|
19
|
-
}
|
|
20
|
-
}), (0, core_1.StoreSet)("objection", {
|
|
21
|
-
columnType: "number",
|
|
22
|
-
options: {
|
|
23
|
-
type: "decimal",
|
|
24
|
-
...options
|
|
25
|
-
}
|
|
26
|
-
}));
|
|
27
|
-
}
|
|
28
|
-
exports.Decimal = Decimal;
|
|
29
|
-
//# sourceMappingURL=decimal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"decimal.js","sourceRoot":"","sources":["../../../src/decorators/decimal.ts"],"names":[],"mappings":";;;AAAA,qCAAmD;AACnD,yCAAsC;AACtC,yDAAiD;AAOjD;;;;;GAKG;AACH,SAAgB,OAAO,CAAC,UAA0B,EAAE;IAClD,OAAO,IAAA,oBAAa,EAClB,IAAA,iBAAQ,GAAE,EACV,IAAA,gCAAa,EAAC;QACZ,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE;YACP,IAAI,EAAE,SAAS;YACf,GAAG,OAAO;SACX;KACF,CAAC,EACF,IAAA,eAAQ,EAAC,WAAW,EAAE;QACpB,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE;YACP,IAAI,EAAE,SAAS;YACf,GAAG,OAAO;SACX;KACF,CAAC,CACH,CAAC;AACJ,CAAC;AAlBD,0BAkBC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Entity = void 0;
|
|
4
|
-
const defineStaticGetter_js_1 = require("../utils/defineStaticGetter.js");
|
|
5
|
-
const getJsonEntityRelationships_js_1 = require("../utils/getJsonEntityRelationships.js");
|
|
6
|
-
const schema_1 = require("@tsed/schema");
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* @param tableName
|
|
10
|
-
* @decorator
|
|
11
|
-
* @objection
|
|
12
|
-
*/
|
|
13
|
-
function Entity(tableName) {
|
|
14
|
-
if (!tableName) {
|
|
15
|
-
throw new Error("Please provide a table name");
|
|
16
|
-
}
|
|
17
|
-
return (target) => {
|
|
18
|
-
const originalRelationMappings = target["relationMappings"];
|
|
19
|
-
(0, defineStaticGetter_js_1.defineStaticGetter)(target, "tableName", () => tableName);
|
|
20
|
-
(0, defineStaticGetter_js_1.defineStaticGetter)(target, "jsonSchema", () => (0, schema_1.getJsonSchema)(target));
|
|
21
|
-
(0, defineStaticGetter_js_1.defineStaticGetter)(target, "relationMappings", () => originalRelationMappings || (0, getJsonEntityRelationships_js_1.getJsonEntityRelationships)(target));
|
|
22
|
-
return target;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
exports.Entity = Entity;
|
|
26
|
-
//# sourceMappingURL=entity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entity.js","sourceRoot":"","sources":["../../../src/decorators/entity.ts"],"names":[],"mappings":";;;AACA,0EAAkE;AAClE,0FAAkF;AAClF,yCAA2C;AAE3C;;;;;GAKG;AACH,SAAgB,MAAM,CAAC,SAAiB;IACtC,IAAI,CAAC,SAAS,EAAE;QACd,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;KAChD;IAED,OAAO,CAAC,MAAW,EAAE,EAAE;QACrB,MAAM,wBAAwB,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;QAC5D,IAAA,0CAAkB,EAAC,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QACzD,IAAA,0CAAkB,EAAC,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,CAAC,IAAA,sBAAa,EAAC,MAAM,CAAC,CAAC,CAAC;QACtE,IAAA,0CAAkB,EAAC,MAAM,EAAE,kBAAkB,EAAE,GAAG,EAAE,CAAC,wBAAwB,IAAI,IAAA,0DAA0B,EAAC,MAAM,CAAC,CAAC,CAAC;QACrH,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC;AAZD,wBAYC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HasMany = void 0;
|
|
4
|
-
const objection_1 = require("objection");
|
|
5
|
-
const relatesTo_js_1 = require("./relatesTo.js");
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
* @param opts
|
|
9
|
-
* @decorator
|
|
10
|
-
* @objection
|
|
11
|
-
*/
|
|
12
|
-
function HasMany(type, opts) {
|
|
13
|
-
return (0, relatesTo_js_1.RelatesTo)(objection_1.Model.HasManyRelation, { ...opts, type });
|
|
14
|
-
}
|
|
15
|
-
exports.HasMany = HasMany;
|
|
16
|
-
//# sourceMappingURL=hasMany.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hasMany.js","sourceRoot":"","sources":["../../../src/decorators/hasMany.ts"],"names":[],"mappings":";;;AAAA,yCAAqD;AAErD,iDAAyC;AAGzC;;;;;GAKG;AACH,SAAgB,OAAO,CAAC,IAAyB,EAAE,IAAkC;IACnF,OAAO,IAAA,wBAAS,EAAC,iBAAK,CAAC,eAAe,EAAE,EAAC,GAAG,IAAI,EAAE,IAAI,EAAC,CAAC,CAAC;AAC3D,CAAC;AAFD,0BAEC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HasOne = void 0;
|
|
4
|
-
const objection_1 = require("objection");
|
|
5
|
-
const relatesTo_js_1 = require("./relatesTo.js");
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
* @param opts
|
|
9
|
-
* @decorator
|
|
10
|
-
* @objection
|
|
11
|
-
*/
|
|
12
|
-
function HasOne(opts) {
|
|
13
|
-
return (0, relatesTo_js_1.RelatesTo)(objection_1.Model.HasOneRelation, opts);
|
|
14
|
-
}
|
|
15
|
-
exports.HasOne = HasOne;
|
|
16
|
-
//# sourceMappingURL=hasOne.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hasOne.js","sourceRoot":"","sources":["../../../src/decorators/hasOne.ts"],"names":[],"mappings":";;;AAAA,yCAAgC;AAChC,iDAAyC;AAGzC;;;;;GAKG;AACH,SAAgB,MAAM,CAAC,IAAqC;IAC1D,OAAO,IAAA,wBAAS,EAAC,iBAAK,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;AAC/C,CAAC;AAFD,wBAEC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HasOneThroughRelation = void 0;
|
|
4
|
-
const objection_1 = require("objection");
|
|
5
|
-
const relatesTo_js_1 = require("./relatesTo.js");
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
* @param opts
|
|
9
|
-
* @decorator
|
|
10
|
-
* @objection
|
|
11
|
-
*/
|
|
12
|
-
function HasOneThroughRelation(opts) {
|
|
13
|
-
return (0, relatesTo_js_1.RelatesTo)(objection_1.Model.HasOneThroughRelation, opts);
|
|
14
|
-
}
|
|
15
|
-
exports.HasOneThroughRelation = HasOneThroughRelation;
|
|
16
|
-
//# sourceMappingURL=hasOneThroughRelation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hasOneThroughRelation.js","sourceRoot":"","sources":["../../../src/decorators/hasOneThroughRelation.ts"],"names":[],"mappings":";;;AAEA,yCAAgC;AAChC,iDAAyC;AAEzC;;;;;GAKG;AACH,SAAgB,qBAAqB,CAAC,IAAkC;IACtE,OAAO,IAAA,wBAAS,EAAC,iBAAK,CAAC,qBAAqB,EAAE,IAAI,CAAC,CAAC;AACtD,CAAC;AAFD,sDAEC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IdColumn = void 0;
|
|
4
|
-
const columnOptions_js_1 = require("./columnOptions.js");
|
|
5
|
-
const schema_1 = require("@tsed/schema");
|
|
6
|
-
const defineStaticGetter_js_1 = require("../utils/defineStaticGetter.js");
|
|
7
|
-
const core_1 = require("@tsed/core");
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
10
|
-
* @param type
|
|
11
|
-
* @decorator
|
|
12
|
-
* @objection
|
|
13
|
-
*/
|
|
14
|
-
function IdColumn(type = "increments") {
|
|
15
|
-
return (0, core_1.useDecorators)((0, schema_1.Property)(), (0, columnOptions_js_1.ColumnOptions)({
|
|
16
|
-
columnType: "idColumn",
|
|
17
|
-
options: {
|
|
18
|
-
type
|
|
19
|
-
}
|
|
20
|
-
}), (target, propertyKey) => {
|
|
21
|
-
(0, defineStaticGetter_js_1.defineStaticGetter)(target, "idColumn", () => propertyKey);
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
exports.IdColumn = IdColumn;
|
|
25
|
-
//# sourceMappingURL=idColumn.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"idColumn.js","sourceRoot":"","sources":["../../../src/decorators/idColumn.ts"],"names":[],"mappings":";;;AAAA,yDAAiD;AACjD,yCAAsC;AACtC,0EAAkE;AAClE,qCAAyC;AAEzC;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,OAAgD,YAAY;IACnF,OAAO,IAAA,oBAAa,EAClB,IAAA,iBAAQ,GAAE,EACV,IAAA,gCAAa,EAAC;QACZ,UAAU,EAAE,UAAU;QACtB,OAAO,EAAE;YACP,IAAI;SACL;KACF,CAAC,EACF,CAAC,MAAW,EAAE,WAAmB,EAAE,EAAE;QACnC,IAAA,0CAAkB,EAAC,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC;IAC5D,CAAC,CACF,CAAC;AACJ,CAAC;AAbD,4BAaC"}
|