@ooneex/cli 1.0.0 → 1.0.2
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/README.md +54 -65
- package/dist/index.js +112 -97
- package/dist/index.js.map +9 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,11 +22,11 @@ Interactive CLI toolkit for scaffolding Ooneex projects, modules, controllers, s
|
|
|
22
22
|
|
|
23
23
|
✅ **Interactive Prompts** - User-friendly prompts with input validation constraints
|
|
24
24
|
|
|
25
|
-
✅ **Docker Support** -
|
|
25
|
+
✅ **Docker Support** - Add docker services to docker-compose.yml
|
|
26
26
|
|
|
27
27
|
✅ **Migration & Seeds** - Create database migrations and seed files
|
|
28
28
|
|
|
29
|
-
✅ **AI & Vector Database** - Generate AI
|
|
29
|
+
✅ **AI & Vector Database** - Generate AI and vector database classes
|
|
30
30
|
|
|
31
31
|
✅ **Claude Skill Generation** - Scaffold Claude AI skill templates
|
|
32
32
|
|
|
@@ -71,12 +71,12 @@ ooneex make:module
|
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
Creates a new feature module with:
|
|
74
|
-
- Module
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
74
|
+
- Module file (`src/ModuleNameModule.ts`)
|
|
75
|
+
- Migrations directory (`src/migrations/`)
|
|
76
|
+
- Seeds directory (`src/seeds/`)
|
|
77
|
+
- Bin scripts (`bin/migration/up.ts`, `bin/seed/run.ts`)
|
|
78
|
+
- Test file
|
|
79
|
+
- `package.json` and `tsconfig.json`
|
|
80
80
|
|
|
81
81
|
### Generating a Controller
|
|
82
82
|
|
|
@@ -87,9 +87,7 @@ ooneex make:controller
|
|
|
87
87
|
Interactive prompts will ask for:
|
|
88
88
|
- Controller name
|
|
89
89
|
- Socket or HTTP controller
|
|
90
|
-
- Route
|
|
91
|
-
- Resource name
|
|
92
|
-
- Route action
|
|
90
|
+
- Route name (e.g., api.user.create)
|
|
93
91
|
- Route path
|
|
94
92
|
- HTTP method (for HTTP controllers)
|
|
95
93
|
|
|
@@ -107,8 +105,7 @@ ooneex make:service
|
|
|
107
105
|
```
|
|
108
106
|
|
|
109
107
|
Creates a service class with:
|
|
110
|
-
-
|
|
111
|
-
- Interface implementation
|
|
108
|
+
- Service file
|
|
112
109
|
- Test file
|
|
113
110
|
|
|
114
111
|
### Generating an Entity
|
|
@@ -118,46 +115,30 @@ ooneex make:entity
|
|
|
118
115
|
```
|
|
119
116
|
|
|
120
117
|
Creates a TypeORM entity with:
|
|
121
|
-
-
|
|
122
|
-
-
|
|
123
|
-
- Repository integration
|
|
124
|
-
|
|
125
|
-
### Generating CRUD Operations
|
|
126
|
-
|
|
127
|
-
```bash
|
|
128
|
-
ooneex make:crud
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
Scaffolds complete CRUD operations including:
|
|
132
|
-
- List controller
|
|
133
|
-
- Show controller
|
|
134
|
-
- Create controller
|
|
135
|
-
- Update controller
|
|
136
|
-
- Delete controller
|
|
137
|
-
- Associated route types
|
|
138
|
-
- Test files
|
|
118
|
+
- Entity file
|
|
119
|
+
- Test file
|
|
139
120
|
|
|
140
121
|
### Additional Commands
|
|
141
122
|
|
|
142
123
|
| Command | Description |
|
|
143
124
|
|---------|-------------|
|
|
144
|
-
| `make:ai` | Generate AI
|
|
145
|
-
| `make:analytics` | Generate analytics
|
|
146
|
-
| `make:cache` | Generate cache
|
|
147
|
-
| `make:cron` | Generate cron
|
|
148
|
-
| `make:database` | Generate database
|
|
149
|
-
| `make:docker` |
|
|
150
|
-
| `make:logger` | Generate logger
|
|
151
|
-
| `make:mailer` | Generate mailer
|
|
152
|
-
| `make:middleware` | Generate middleware class |
|
|
153
|
-
| `make:migration` | Generate
|
|
154
|
-
| `make:permission` | Generate permission class |
|
|
155
|
-
| `make:pubsub` | Generate
|
|
156
|
-
| `make:repository` | Generate repository class |
|
|
157
|
-
| `make:seed` | Generate
|
|
158
|
-
| `make:storage` | Generate storage
|
|
159
|
-
| `make:vector-database` | Generate vector database
|
|
160
|
-
| `make:claude
|
|
125
|
+
| `make:ai` | Generate a new AI class |
|
|
126
|
+
| `make:analytics` | Generate a new analytics class |
|
|
127
|
+
| `make:cache` | Generate a new cache class |
|
|
128
|
+
| `make:cron` | Generate a new cron class |
|
|
129
|
+
| `make:database` | Generate a new database class |
|
|
130
|
+
| `make:docker` | Add a docker service to docker-compose.yml |
|
|
131
|
+
| `make:logger` | Generate a new logger class |
|
|
132
|
+
| `make:mailer` | Generate a new mailer class |
|
|
133
|
+
| `make:middleware` | Generate a new middleware class |
|
|
134
|
+
| `make:migration` | Generate a new migration file |
|
|
135
|
+
| `make:permission` | Generate a new permission class |
|
|
136
|
+
| `make:pubsub` | Generate a new PubSub event class |
|
|
137
|
+
| `make:repository` | Generate a new repository class |
|
|
138
|
+
| `make:seed` | Generate a new seed file |
|
|
139
|
+
| `make:storage` | Generate a new storage class |
|
|
140
|
+
| `make:vector-database` | Generate a new vector database class |
|
|
141
|
+
| `make:claude:skill` | Generate Claude skills from templates |
|
|
161
142
|
|
|
162
143
|
## API Reference
|
|
163
144
|
|
|
@@ -257,9 +238,11 @@ class MyCustomCommand implements ICommand<MyCommandOptions> {
|
|
|
257
238
|
### Using with Arguments
|
|
258
239
|
|
|
259
240
|
```bash
|
|
260
|
-
ooneex make:controller --name UserList
|
|
241
|
+
ooneex make:controller --name UserList --route-name api.users.list --route-path /api/users --route-method GET
|
|
261
242
|
```
|
|
262
243
|
|
|
244
|
+
Available CLI flags: `--name`, `--route-name`, `--route-path`, `--route-method`, `--is-socket`, `--dir`, `--channel`, `--table-name`.
|
|
245
|
+
|
|
263
246
|
### Programmatic Usage
|
|
264
247
|
|
|
265
248
|
```typescript
|
|
@@ -286,16 +269,22 @@ When running `make:app`, the following structure is created:
|
|
|
286
269
|
|
|
287
270
|
```
|
|
288
271
|
my-app/
|
|
272
|
+
├── .husky/
|
|
273
|
+
│ ├── commit-msg
|
|
274
|
+
│ └── pre-commit
|
|
289
275
|
├── modules/
|
|
290
276
|
│ └── app/
|
|
291
277
|
│ ├── src/
|
|
292
|
-
│ │
|
|
293
|
-
│ │ ├── entities/
|
|
294
|
-
│ │ ├── services/
|
|
278
|
+
│ │ └── AppModule.ts
|
|
295
279
|
│ │ └── index.ts
|
|
296
280
|
│ ├── tests/
|
|
297
|
-
│ └──
|
|
281
|
+
│ │ └── AppModule.spec.ts
|
|
282
|
+
│ ├── var/
|
|
283
|
+
│ ├── package.json
|
|
284
|
+
│ └── tsconfig.json
|
|
298
285
|
├── .commitlintrc.ts
|
|
286
|
+
├── .env
|
|
287
|
+
├── .env.example
|
|
299
288
|
├── .gitignore
|
|
300
289
|
├── biome.jsonc
|
|
301
290
|
├── bunfig.toml
|
|
@@ -309,21 +298,21 @@ my-app/
|
|
|
309
298
|
```
|
|
310
299
|
modules/
|
|
311
300
|
└── user/
|
|
301
|
+
├── bin/
|
|
302
|
+
│ ├── migration/
|
|
303
|
+
│ │ └── up.ts
|
|
304
|
+
│ └── seed/
|
|
305
|
+
│ └── run.ts
|
|
312
306
|
├── src/
|
|
313
|
-
│ ├──
|
|
314
|
-
│
|
|
315
|
-
│
|
|
316
|
-
│
|
|
317
|
-
│
|
|
318
|
-
│ ├── types/
|
|
319
|
-
│ │ └── routes/
|
|
320
|
-
│ └── index.ts
|
|
307
|
+
│ ├── migrations/
|
|
308
|
+
│ │ └── migrations.ts
|
|
309
|
+
│ ├── seeds/
|
|
310
|
+
│ │ └── seeds.ts
|
|
311
|
+
│ └── UserModule.ts
|
|
321
312
|
├── tests/
|
|
322
|
-
│
|
|
323
|
-
│ ├── entities/
|
|
324
|
-
│ └── services/
|
|
313
|
+
│ └── UserModule.spec.ts
|
|
325
314
|
├── package.json
|
|
326
|
-
└──
|
|
315
|
+
└── tsconfig.json
|
|
327
316
|
```
|
|
328
317
|
|
|
329
318
|
## Error Handling
|