@famgia/omnify 1.0.103 → 1.0.104

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.
@@ -52,6 +52,7 @@ Create `omnify.config.ts` in project root:
52
52
  import { defineConfig } from '@famgia/omnify';
53
53
  import laravel from '@famgia/omnify-laravel/plugin';
54
54
  import typescript from '@famgia/omnify-typescript/plugin';
55
+ import japan from '@famgia/omnify-japan/plugin';
55
56
 
56
57
  export default defineConfig({
57
58
  schemasDir: './schemas',
@@ -59,25 +60,23 @@ export default defineConfig({
59
60
 
60
61
  database: {
61
62
  driver: 'mysql',
62
- devUrl: 'mysql://root:password@localhost:3306/dev_db',
63
+ devUrl: 'docker://mysql/8/omnify_dev',
63
64
  },
64
65
 
65
66
  plugins: [
67
+ japan(), // Japan-specific types
66
68
  laravel({
67
- migrationsPath: 'database/migrations/omnify',
68
- modelsPath: 'app/Models',
69
- baseModelsPath: 'app/Models/OmnifyBase',
70
- providersPath: 'app/Providers',
71
- localesPath: 'app/Models/OmnifyBase/Locales',
69
+ generateRequests: true, // Generate FormRequest classes
70
+ generateResources: true, // Generate API Resource classes
72
71
  }),
73
72
  typescript({
74
- path: './resources/ts/types/models',
73
+ path: './resources/ts/omnify',
75
74
  generateRules: true,
76
75
  }),
77
76
  ],
78
77
 
79
78
  locale: {
80
- locales: ['ja', 'en'],
79
+ locales: ['ja', 'en', 'vi'],
81
80
  defaultLocale: 'ja',
82
81
  },
83
82
  });
@@ -119,21 +118,61 @@ sqlite://path/to/file.db
119
118
  import laravel from '@famgia/omnify-laravel/plugin';
120
119
 
121
120
  laravel({
122
- migrationsPath: 'database/migrations/omnify', // Migration files
123
- modelsPath: 'app/Models', // Model classes
124
- baseModelsPath: 'app/Models/OmnifyBase', // Base model classes (auto-generated)
125
- providersPath: 'app/Providers', // Service provider (OmnifyServiceProvider)
126
- localesPath: 'app/Models/OmnifyBase/Locales', // Locale files
121
+ // Base directory (for monorepo: './backend/')
122
+ base: '',
123
+
124
+ // Path options
125
+ migrationsPath: 'database/migrations/omnify',
126
+ modelsPath: 'app/Models',
127
+ baseModelsPath: 'app/Models/OmnifyBase',
128
+ providersPath: 'app/Providers',
129
+ factoriesPath: 'database/factories',
130
+ requestsPath: 'app/Http/Requests',
131
+ baseRequestsPath: 'app/Http/Requests/OmnifyBase',
132
+ resourcesPath: 'app/Http/Resources',
133
+ baseResourcesPath: 'app/Http/Resources/OmnifyBase',
134
+
135
+ // Generation flags
136
+ generateModels: true, // Generate Eloquent models
137
+ generateFactories: true, // Generate Laravel factories
138
+ generateRequests: true, // Generate FormRequest classes
139
+ generateResources: true, // Generate API Resource classes
140
+
141
+ // Other options
142
+ fakerLocale: 'ja_JP', // Faker locale for factories
127
143
  })
128
144
  ```
129
145
 
130
- | Option | Type | Default | Description |
131
- | ---------------- | -------- | ------------------------------- | ------------------------- |
132
- | `migrationsPath` | `string` | `database/migrations/omnify` | Laravel migrations output |
133
- | `modelsPath` | `string` | `app/Models` | Model classes output |
134
- | `baseModelsPath` | `string` | `app/Models/OmnifyBase` | Base model classes output |
135
- | `providersPath` | `string` | `app/Providers` | Service provider output |
136
- | `localesPath` | `string` | `app/Models/OmnifyBase/Locales` | Locale files output |
146
+ #### Path Options
147
+
148
+ | Option | Type | Default | Description |
149
+ | ------------------- | -------- | ------------------------------- | ----------------------------- |
150
+ | `base` | `string` | `''` | Base dir (monorepo support) |
151
+ | `migrationsPath` | `string` | `database/migrations/omnify` | Migration files |
152
+ | `modelsPath` | `string` | `app/Models` | User-editable models |
153
+ | `baseModelsPath` | `string` | `app/Models/OmnifyBase` | Auto-generated base models |
154
+ | `providersPath` | `string` | `app/Providers` | Service provider |
155
+ | `factoriesPath` | `string` | `database/factories` | Factory files |
156
+ | `requestsPath` | `string` | `app/Http/Requests` | User-editable FormRequests |
157
+ | `baseRequestsPath` | `string` | `app/Http/Requests/OmnifyBase` | Auto-generated base requests |
158
+ | `resourcesPath` | `string` | `app/Http/Resources` | User-editable API Resources |
159
+ | `baseResourcesPath` | `string` | `app/Http/Resources/OmnifyBase` | Auto-generated base resources |
160
+
161
+ #### Generation Flags
162
+
163
+ | Option | Type | Default | Description |
164
+ | ------------------- | --------- | ------- | ------------------------------- |
165
+ | `generateModels` | `boolean` | `true` | Generate Eloquent model classes |
166
+ | `generateFactories` | `boolean` | `true` | Generate Laravel factory files |
167
+ | `generateRequests` | `boolean` | `false` | Generate FormRequest classes |
168
+ | `generateResources` | `boolean` | `false` | Generate API Resource classes |
169
+
170
+ #### Other Options
171
+
172
+ | Option | Type | Default | Description |
173
+ | ------------- | -------- | ------- | ----------------------------- |
174
+ | `fakerLocale` | `string` | `en_US` | Faker locale for factory data |
175
+ | `connection` | `string` | - | Database connection name |
137
176
 
138
177
  ### TypeScript Plugin
139
178
 
@@ -258,29 +297,42 @@ export default defineConfig({
258
297
 
259
298
  database: {
260
299
  driver: 'mysql',
261
- devUrl: process.env.OMNIFY_DEV_URL || 'mysql://root:password@localhost:3306/dev_db',
300
+ devUrl: process.env.OMNIFY_DEV_URL || 'docker://mysql/8/omnify_dev',
262
301
  enableFieldComments: true,
263
302
  },
264
303
 
265
304
  plugins: [
305
+ japan(), // Japan-specific types (load before laravel)
266
306
  laravel({
307
+ // Path options (all use defaults, shown for reference)
267
308
  migrationsPath: 'database/migrations/omnify',
268
309
  modelsPath: 'app/Models',
269
310
  baseModelsPath: 'app/Models/OmnifyBase',
270
311
  providersPath: 'app/Providers',
271
- localesPath: 'app/Models/OmnifyBase/Locales',
312
+ factoriesPath: 'database/factories',
313
+ requestsPath: 'app/Http/Requests',
314
+ baseRequestsPath: 'app/Http/Requests/OmnifyBase',
315
+ resourcesPath: 'app/Http/Resources',
316
+ baseResourcesPath: 'app/Http/Resources/OmnifyBase',
317
+
318
+ // Generation flags
319
+ generateModels: true,
320
+ generateFactories: true,
321
+ generateRequests: true, // Enable FormRequest generation
322
+ generateResources: true, // Enable API Resource generation
323
+
324
+ fakerLocale: 'ja_JP',
272
325
  }),
273
326
  typescript({
274
- path: './resources/ts/types/models',
327
+ path: './resources/ts/omnify',
275
328
  generateRules: true,
276
329
  }),
277
- japan(), // Japan-specific types
278
330
  ],
279
331
 
280
332
  locale: {
281
- locales: ['ja', 'en'],
333
+ locales: ['ja', 'en', 'vi'],
282
334
  defaultLocale: 'ja',
283
- fallbackLocale: 'ja',
335
+ fallbackLocale: 'en',
284
336
  },
285
337
  });
286
338
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@famgia/omnify",
3
- "version": "1.0.103",
3
+ "version": "1.0.104",
4
4
  "description": "Schema-driven database migration system with TypeScript types and Laravel migrations",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -25,14 +25,14 @@
25
25
  "README.md"
26
26
  ],
27
27
  "dependencies": {
28
- "@famgia/omnify-cli": "0.0.99",
29
- "@famgia/omnify-core": "0.0.93",
30
- "@famgia/omnify-typescript": "0.0.81",
31
- "@famgia/omnify-atlas": "0.0.87",
32
- "@famgia/omnify-laravel": "0.0.102",
33
- "@famgia/omnify-types": "0.0.91",
34
- "@famgia/omnify-mcp": "0.0.79",
35
- "@famgia/omnify-japan": "0.0.86"
28
+ "@famgia/omnify-core": "0.0.94",
29
+ "@famgia/omnify-cli": "0.0.100",
30
+ "@famgia/omnify-types": "0.0.92",
31
+ "@famgia/omnify-typescript": "0.0.82",
32
+ "@famgia/omnify-laravel": "0.0.103",
33
+ "@famgia/omnify-atlas": "0.0.88",
34
+ "@famgia/omnify-mcp": "0.0.80",
35
+ "@famgia/omnify-japan": "0.0.87"
36
36
  },
37
37
  "keywords": [
38
38
  "omnify",