@famgia/omnify 1.0.103 → 1.0.105

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,20 @@ 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: [
66
- 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',
72
- }),
67
+ japan(), // Japan-specific types
68
+ laravel(), // All generators enabled by default
73
69
  typescript({
74
- path: './resources/ts/types/models',
70
+ path: './resources/ts/omnify',
75
71
  generateRules: true,
76
72
  }),
77
73
  ],
78
74
 
79
75
  locale: {
80
- locales: ['ja', 'en'],
76
+ locales: ['ja', 'en', 'vi'],
81
77
  defaultLocale: 'ja',
82
78
  },
83
79
  });
@@ -119,21 +115,61 @@ sqlite://path/to/file.db
119
115
  import laravel from '@famgia/omnify-laravel/plugin';
120
116
 
121
117
  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
118
+ // Base directory (for monorepo: './backend/')
119
+ base: '',
120
+
121
+ // Path options
122
+ migrationsPath: 'database/migrations/omnify',
123
+ modelsPath: 'app/Models',
124
+ baseModelsPath: 'app/Models/OmnifyBase',
125
+ providersPath: 'app/Providers',
126
+ factoriesPath: 'database/factories',
127
+ requestsPath: 'app/Http/Requests',
128
+ baseRequestsPath: 'app/Http/Requests/OmnifyBase',
129
+ resourcesPath: 'app/Http/Resources',
130
+ baseResourcesPath: 'app/Http/Resources/OmnifyBase',
131
+
132
+ // Generation flags
133
+ generateModels: true, // Generate Eloquent models
134
+ generateFactories: true, // Generate Laravel factories
135
+ generateRequests: true, // Generate FormRequest classes
136
+ generateResources: true, // Generate API Resource classes
137
+
138
+ // Other options
139
+ fakerLocale: 'ja_JP', // Faker locale for factories
127
140
  })
128
141
  ```
129
142
 
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 |
143
+ #### Path Options
144
+
145
+ | Option | Type | Default | Description |
146
+ | ------------------- | -------- | ------------------------------- | ----------------------------- |
147
+ | `base` | `string` | `''` | Base dir (monorepo support) |
148
+ | `migrationsPath` | `string` | `database/migrations/omnify` | Migration files |
149
+ | `modelsPath` | `string` | `app/Models` | User-editable models |
150
+ | `baseModelsPath` | `string` | `app/Models/OmnifyBase` | Auto-generated base models |
151
+ | `providersPath` | `string` | `app/Providers` | Service provider |
152
+ | `factoriesPath` | `string` | `database/factories` | Factory files |
153
+ | `requestsPath` | `string` | `app/Http/Requests` | User-editable FormRequests |
154
+ | `baseRequestsPath` | `string` | `app/Http/Requests/OmnifyBase` | Auto-generated base requests |
155
+ | `resourcesPath` | `string` | `app/Http/Resources` | User-editable API Resources |
156
+ | `baseResourcesPath` | `string` | `app/Http/Resources/OmnifyBase` | Auto-generated base resources |
157
+
158
+ #### Generation Flags
159
+
160
+ | Option | Type | Default | Description |
161
+ | ------------------- | --------- | ------- | ------------------------------- |
162
+ | `generateModels` | `boolean` | `true` | Generate Eloquent model classes |
163
+ | `generateFactories` | `boolean` | `true` | Generate Laravel factory files |
164
+ | `generateRequests` | `boolean` | `true` | Generate FormRequest classes |
165
+ | `generateResources` | `boolean` | `true` | Generate API Resource classes |
166
+
167
+ #### Other Options
168
+
169
+ | Option | Type | Default | Description |
170
+ | ------------- | -------- | ------- | ----------------------------- |
171
+ | `fakerLocale` | `string` | `en_US` | Faker locale for factory data |
172
+ | `connection` | `string` | - | Database connection name |
137
173
 
138
174
  ### TypeScript Plugin
139
175
 
@@ -258,29 +294,37 @@ export default defineConfig({
258
294
 
259
295
  database: {
260
296
  driver: 'mysql',
261
- devUrl: process.env.OMNIFY_DEV_URL || 'mysql://root:password@localhost:3306/dev_db',
297
+ devUrl: process.env.OMNIFY_DEV_URL || 'docker://mysql/8/omnify_dev',
262
298
  enableFieldComments: true,
263
299
  },
264
300
 
265
301
  plugins: [
302
+ japan(), // Japan-specific types (load before laravel)
266
303
  laravel({
267
- migrationsPath: 'database/migrations/omnify',
268
- modelsPath: 'app/Models',
269
- baseModelsPath: 'app/Models/OmnifyBase',
270
- providersPath: 'app/Providers',
271
- localesPath: 'app/Models/OmnifyBase/Locales',
304
+ // All generation flags are true by default:
305
+ // generateModels, generateFactories, generateRequests, generateResources
306
+
307
+ // Optional: customize paths (all use defaults, shown for reference)
308
+ // migrationsPath: 'database/migrations/omnify',
309
+ // modelsPath: 'app/Models',
310
+ // baseModelsPath: 'app/Models/OmnifyBase',
311
+ // requestsPath: 'app/Http/Requests',
312
+ // baseRequestsPath: 'app/Http/Requests/OmnifyBase',
313
+ // resourcesPath: 'app/Http/Resources',
314
+ // baseResourcesPath: 'app/Http/Resources/OmnifyBase',
315
+
316
+ fakerLocale: 'ja_JP', // Optional: customize Faker locale
272
317
  }),
273
318
  typescript({
274
- path: './resources/ts/types/models',
319
+ path: './resources/ts/omnify',
275
320
  generateRules: true,
276
321
  }),
277
- japan(), // Japan-specific types
278
322
  ],
279
323
 
280
324
  locale: {
281
- locales: ['ja', 'en'],
325
+ locales: ['ja', 'en', 'vi'],
282
326
  defaultLocale: 'ja',
283
- fallbackLocale: 'ja',
327
+ fallbackLocale: 'en',
284
328
  },
285
329
  });
286
330
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@famgia/omnify",
3
- "version": "1.0.103",
3
+ "version": "1.0.105",
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-cli": "0.0.101",
29
+ "@famgia/omnify-atlas": "0.0.89",
30
+ "@famgia/omnify-laravel": "0.0.104",
31
+ "@famgia/omnify-core": "0.0.95",
32
+ "@famgia/omnify-japan": "0.0.88",
33
+ "@famgia/omnify-types": "0.0.93",
34
+ "@famgia/omnify-mcp": "0.0.81",
35
+ "@famgia/omnify-typescript": "0.0.83"
36
36
  },
37
37
  "keywords": [
38
38
  "omnify",