@omnifyjp/omnify 3.15.0 → 3.15.1
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": "3.15.
|
|
3
|
+
"version": "3.15.1",
|
|
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": "3.15.
|
|
40
|
-
"@omnifyjp/omnify-darwin-x64": "3.15.
|
|
41
|
-
"@omnifyjp/omnify-linux-x64": "3.15.
|
|
42
|
-
"@omnifyjp/omnify-linux-arm64": "3.15.
|
|
43
|
-
"@omnifyjp/omnify-win32-x64": "3.15.
|
|
39
|
+
"@omnifyjp/omnify-darwin-arm64": "3.15.1",
|
|
40
|
+
"@omnifyjp/omnify-darwin-x64": "3.15.1",
|
|
41
|
+
"@omnifyjp/omnify-linux-x64": "3.15.1",
|
|
42
|
+
"@omnifyjp/omnify-linux-arm64": "3.15.1",
|
|
43
|
+
"@omnifyjp/omnify-win32-x64": "3.15.1"
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -51,7 +51,9 @@ export declare class SchemaReader {
|
|
|
51
51
|
getSchemasWithApi(): Record<string, SchemaDefinition>;
|
|
52
52
|
/** Check if any schema has api options. */
|
|
53
53
|
hasApiSchemas(): boolean;
|
|
54
|
-
/** Check if any schema has File-type properties
|
|
54
|
+
/** Check if any schema has File-type properties OR the project has
|
|
55
|
+
* `file:` config (issue #64: generate File infrastructure even when
|
|
56
|
+
* no schema declares `type: File` yet). */
|
|
55
57
|
hasFileProperties(): boolean;
|
|
56
58
|
/** Get the file config from schemas.json. */
|
|
57
59
|
getFileConfig(): import("../types.js").FileConfigExport | null;
|
|
@@ -172,8 +172,12 @@ export class SchemaReader {
|
|
|
172
172
|
hasApiSchemas() {
|
|
173
173
|
return Object.keys(this.getSchemasWithApi()).length > 0;
|
|
174
174
|
}
|
|
175
|
-
/** Check if any schema has File-type properties
|
|
175
|
+
/** Check if any schema has File-type properties OR the project has
|
|
176
|
+
* `file:` config (issue #64: generate File infrastructure even when
|
|
177
|
+
* no schema declares `type: File` yet). */
|
|
176
178
|
hasFileProperties() {
|
|
179
|
+
if (this.data.fileConfig)
|
|
180
|
+
return true;
|
|
177
181
|
for (const schema of Object.values(this.getObjectSchemas())) {
|
|
178
182
|
const props = schema.properties ?? {};
|
|
179
183
|
for (const prop of Object.values(props)) {
|