@omnifyjp/omnify 5.8.14 → 5.8.15
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": "5.8.
|
|
3
|
+
"version": "5.8.15",
|
|
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": "5.8.
|
|
40
|
-
"@omnifyjp/omnify-darwin-x64": "5.8.
|
|
41
|
-
"@omnifyjp/omnify-linux-x64": "5.8.
|
|
42
|
-
"@omnifyjp/omnify-linux-arm64": "5.8.
|
|
43
|
-
"@omnifyjp/omnify-win32-x64": "5.8.
|
|
39
|
+
"@omnifyjp/omnify-darwin-arm64": "5.8.15",
|
|
40
|
+
"@omnifyjp/omnify-darwin-x64": "5.8.15",
|
|
41
|
+
"@omnifyjp/omnify-linux-x64": "5.8.15",
|
|
42
|
+
"@omnifyjp/omnify-linux-arm64": "5.8.15",
|
|
43
|
+
"@omnifyjp/omnify-win32-x64": "5.8.15"
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -65,7 +65,16 @@ function generateForSchema(name, schema, reader, config) {
|
|
|
65
65
|
}
|
|
66
66
|
function generateBasePolicyClass(name, schema, reader, config) {
|
|
67
67
|
const modelName = toPascalCase(name);
|
|
68
|
-
|
|
68
|
+
// Issue #98 v5.8.15: legacy structure must nest the policy base's
|
|
69
|
+
// `namespace ...;` declaration by group folder so it matches the
|
|
70
|
+
// grouped path on disk. Pre-fix every base emitted
|
|
71
|
+
// `namespace App\\Omnify\\Policies;` (FLAT) while the file lived at
|
|
72
|
+
// `app/Omnify/Policies/<Group>/<Name>Policy.php` — PSR-4 autoload
|
|
73
|
+
// failed at runtime for every grouped policy. Same template fix
|
|
74
|
+
// that v5.8.2 applied to Requests / Resources / Services.
|
|
75
|
+
const baseNamespace = config.structure === 'modular'
|
|
76
|
+
? resolveModularBaseNamespace(config, name, 'Policies', config.policies.baseNamespace)
|
|
77
|
+
: nestByGroup({ path: '', namespace: config.policies.baseNamespace }, schema.group).namespace;
|
|
69
78
|
// Issue #98 v5.8.13: policy method signatures (`view(User $user,
|
|
70
79
|
// <Model> $record): bool`) must type-hint the USER-EDITABLE Model
|
|
71
80
|
// class. Same root cause + fix as the v5.8.11 service / controller
|