@mikro-orm/entity-generator 6.4.17-dev.5 → 6.4.17-dev.51
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/SourceFile.js +8 -2
- package/package.json +3 -3
package/SourceFile.js
CHANGED
|
@@ -102,9 +102,12 @@ class SourceFile {
|
|
|
102
102
|
if (typeof index.name === 'string') {
|
|
103
103
|
indexOpt.name = this.quote(index.name);
|
|
104
104
|
}
|
|
105
|
-
if (index.expression) {
|
|
105
|
+
if (typeof index.expression === 'string') {
|
|
106
106
|
indexOpt.expression = this.quote(index.expression);
|
|
107
107
|
}
|
|
108
|
+
else if (typeof index.expression === 'function') {
|
|
109
|
+
indexOpt.expression = `${index.expression}`;
|
|
110
|
+
}
|
|
108
111
|
if (isAtEntityLevel && index.properties) {
|
|
109
112
|
indexOpt.properties = core_1.Utils.asArray(index.properties).map(prop => this.quote('' + prop));
|
|
110
113
|
}
|
|
@@ -115,9 +118,12 @@ class SourceFile {
|
|
|
115
118
|
if (typeof index.name === 'string') {
|
|
116
119
|
uniqueOpt.name = this.quote(index.name);
|
|
117
120
|
}
|
|
118
|
-
if (index.expression) {
|
|
121
|
+
if (typeof index.expression === 'string') {
|
|
119
122
|
uniqueOpt.expression = this.quote(index.expression);
|
|
120
123
|
}
|
|
124
|
+
else if (typeof index.expression === 'function') {
|
|
125
|
+
uniqueOpt.expression = `${index.expression}`;
|
|
126
|
+
}
|
|
121
127
|
if (isAtEntityLevel && index.properties) {
|
|
122
128
|
uniqueOpt.properties = core_1.Utils.asArray(index.properties).map(prop => this.quote('' + prop));
|
|
123
129
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/entity-generator",
|
|
3
|
-
"version": "6.4.17-dev.
|
|
3
|
+
"version": "6.4.17-dev.51",
|
|
4
4
|
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.mjs",
|
|
@@ -58,13 +58,13 @@
|
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@mikro-orm/knex": "6.4.17-dev.
|
|
61
|
+
"@mikro-orm/knex": "6.4.17-dev.51",
|
|
62
62
|
"fs-extra": "11.3.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@mikro-orm/core": "^6.4.16"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
|
-
"@mikro-orm/core": "6.4.17-dev.
|
|
68
|
+
"@mikro-orm/core": "6.4.17-dev.51"
|
|
69
69
|
}
|
|
70
70
|
}
|