@omnifyjp/omnify 1.2.1 → 1.2.2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omnifyjp/omnify",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "Schema-driven code generation for Laravel, TypeScript, and SQL",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"zod": "^3.24.0"
|
|
37
37
|
},
|
|
38
38
|
"optionalDependencies": {
|
|
39
|
-
"@omnifyjp/omnify-darwin-arm64": "1.2.
|
|
40
|
-
"@omnifyjp/omnify-darwin-x64": "1.2.
|
|
41
|
-
"@omnifyjp/omnify-linux-x64": "1.2.
|
|
42
|
-
"@omnifyjp/omnify-linux-arm64": "1.2.
|
|
43
|
-
"@omnifyjp/omnify-win32-x64": "1.2.
|
|
39
|
+
"@omnifyjp/omnify-darwin-arm64": "1.2.2",
|
|
40
|
+
"@omnifyjp/omnify-darwin-x64": "1.2.2",
|
|
41
|
+
"@omnifyjp/omnify-linux-x64": "1.2.2",
|
|
42
|
+
"@omnifyjp/omnify-linux-arm64": "1.2.2",
|
|
43
|
+
"@omnifyjp/omnify-win32-x64": "1.2.2"
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -90,7 +90,7 @@ export function getPropertyType(property, allSchemas) {
|
|
|
90
90
|
return property.enum;
|
|
91
91
|
}
|
|
92
92
|
if (Array.isArray(property.enum)) {
|
|
93
|
-
return property.enum.map(v => `'${v}'`).join(' | ');
|
|
93
|
+
return property.enum.map(v => `'${typeof v === 'string' ? v : v.value}'`).join(' | ');
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
return TYPE_MAP[property.type] ?? 'string';
|
|
@@ -119,7 +119,7 @@ export function propertyToTSProperties(propertyName, property, schema, allSchema
|
|
|
119
119
|
tsType = compoundField.enumRef;
|
|
120
120
|
}
|
|
121
121
|
else {
|
|
122
|
-
tsType = col.enum.map(v => `'${v}'`).join(' | ');
|
|
122
|
+
tsType = col.enum.map(v => `'${typeof v === 'string' ? v : v.value}'`).join(' | ');
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
else {
|