@omnifyjp/omnify 6.0.5 → 6.0.6
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": "6.0.
|
|
3
|
+
"version": "6.0.6",
|
|
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": "6.0.
|
|
40
|
-
"@omnifyjp/omnify-darwin-x64": "6.0.
|
|
41
|
-
"@omnifyjp/omnify-linux-x64": "6.0.
|
|
42
|
-
"@omnifyjp/omnify-linux-arm64": "6.0.
|
|
43
|
-
"@omnifyjp/omnify-win32-x64": "6.0.
|
|
39
|
+
"@omnifyjp/omnify-darwin-arm64": "6.0.6",
|
|
40
|
+
"@omnifyjp/omnify-darwin-x64": "6.0.6",
|
|
41
|
+
"@omnifyjp/omnify-linux-x64": "6.0.6",
|
|
42
|
+
"@omnifyjp/omnify-linux-arm64": "6.0.6",
|
|
43
|
+
"@omnifyjp/omnify-win32-x64": "6.0.6"
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -393,8 +393,15 @@ function buildImports(baseNamespace, modelName, hasSoftDelete, isAuthenticatable
|
|
|
393
393
|
// not under per-module `Modules/File/Traits/`. The import statement
|
|
394
394
|
// here must match, otherwise generated models crash with
|
|
395
395
|
// `Trait "App\Omnify\Modules\File\Traits\HasFiles" not found`.
|
|
396
|
+
//
|
|
397
|
+
// The legacy fallback must use the GLOBAL `config.models.baseNamespace`,
|
|
398
|
+
// exactly like the writer in file-trait-generator.ts and like the audit
|
|
399
|
+
// trait below. The per-model `baseNamespace` argument carries the group
|
|
400
|
+
// (e.g. ...\Base\Space), which yielded `Base\Space\Traits\HasFiles`
|
|
401
|
+
// — a namespace nothing ever writes — so every model holding a File
|
|
402
|
+
// property fataled on load outside the modular structure.
|
|
396
403
|
const fileTraitsNs = config
|
|
397
|
-
? resolveGlobalTraitNamespace(config, baseNamespace + '\\Traits')
|
|
404
|
+
? resolveGlobalTraitNamespace(config, config.models.baseNamespace + '\\Traits')
|
|
398
405
|
: (traitsNamespace || baseNamespace + '\\Traits');
|
|
399
406
|
lines.push(`use ${fileTraitsNs}\\HasFiles;`);
|
|
400
407
|
if (modelNamespace) {
|