@mikro-orm/entity-generator 7.3.0-dev.2 → 7.3.0-dev.21
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/DefineEntitySourceFile.js +4 -0
- package/SourceFile.js +5 -1
- package/package.json +4 -4
|
@@ -137,6 +137,10 @@ export class DefineEntitySourceFile extends EntitySchemaSourceFile {
|
|
|
137
137
|
if (key === 'enum') {
|
|
138
138
|
builder += `(${options.items})`;
|
|
139
139
|
}
|
|
140
|
+
else if (key === 'sequence') {
|
|
141
|
+
const sequence = options.sequence;
|
|
142
|
+
builder += `(${Object.keys(sequence).length === 1 && sequence.startWith != null ? sequence.startWith : this.serializeObject(sequence)})`;
|
|
143
|
+
}
|
|
140
144
|
else if (spreadOptions.has(key) && typeof params === 'string' && params.startsWith('[')) {
|
|
141
145
|
builder += `(${params.slice(1, -1)})`;
|
|
142
146
|
}
|
package/SourceFile.js
CHANGED
|
@@ -736,7 +736,8 @@ export class SourceFile {
|
|
|
736
736
|
if (typeof prop.defaultRaw !== 'undefined' &&
|
|
737
737
|
prop.defaultRaw !== 'null' &&
|
|
738
738
|
prop.defaultRaw !== '' &&
|
|
739
|
-
prop.defaultRaw !==
|
|
739
|
+
prop.defaultRaw !==
|
|
740
|
+
(typeof prop.default === 'string' ? this.platform.quoteDefaultValue(prop.default) : `${prop.default}`)) {
|
|
740
741
|
// kept as a template literal for readability, but raw SQL may contain `${`, which would otherwise interpolate
|
|
741
742
|
options.defaultRaw = `\`${prop.defaultRaw.replaceAll('\\', '\\\\').replaceAll('`', '\\`').replaceAll('${', '\\${')}\``;
|
|
742
743
|
}
|
|
@@ -928,6 +929,9 @@ export class SourceFile {
|
|
|
928
929
|
if (prop.generated) {
|
|
929
930
|
options.generated = typeof prop.generated === 'string' ? this.quote(prop.generated) : `${prop.generated}`;
|
|
930
931
|
}
|
|
932
|
+
if (prop.sequence) {
|
|
933
|
+
options.sequence = prop.sequence;
|
|
934
|
+
}
|
|
931
935
|
}
|
|
932
936
|
getManyToManyDecoratorOptions(options, prop) {
|
|
933
937
|
this.entityImports.add(prop.type);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/entity-generator",
|
|
3
|
-
"version": "7.3.0-dev.
|
|
3
|
+
"version": "7.3.0-dev.21",
|
|
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
|
"keywords": [
|
|
6
6
|
"data-mapper",
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
"copy": "node ../../scripts/copy.mjs"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@mikro-orm/sql": "7.3.0-dev.
|
|
50
|
+
"@mikro-orm/sql": "7.3.0-dev.21"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@mikro-orm/core": "^7.2.
|
|
53
|
+
"@mikro-orm/core": "^7.2.8"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@mikro-orm/core": "7.3.0-dev.
|
|
56
|
+
"@mikro-orm/core": "7.3.0-dev.21"
|
|
57
57
|
},
|
|
58
58
|
"engines": {
|
|
59
59
|
"node": ">= 22.17.0"
|