@diagramers/cli 1.1.23 ā 1.1.25
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 +197 -2
- package/dist/commands/admin.d.ts +3 -0
- package/dist/commands/admin.d.ts.map +1 -0
- package/dist/commands/admin.js +324 -0
- package/dist/commands/admin.js.map +1 -0
- package/dist/index.js +57 -0
- package/dist/index.js.map +1 -1
- package/dist/services/template-processor.d.ts.map +1 -1
- package/dist/services/template-processor.js +461 -148
- package/dist/services/template-processor.js.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
@@ -15,7 +15,7 @@ A powerful command-line interface for managing Diagramers projects, generating m
|
|
15
15
|
|
16
16
|
### Supported Templates
|
17
17
|
- **API Projects** - Full-featured Node.js API with TypeScript
|
18
|
-
- **Admin Projects** -
|
18
|
+
- **Admin Projects** - Modern admin dashboard with React/Vue/Angular support
|
19
19
|
- **Custom Templates** - Extensible template system
|
20
20
|
|
21
21
|
### Database Support
|
@@ -81,7 +81,7 @@ diagramers init api my-api-project
|
|
81
81
|
diagramers init api my-api-project -v 1.1.17
|
82
82
|
|
83
83
|
# Create admin project with specific version
|
84
|
-
diagramers init
|
84
|
+
diagramers admin init react-typescript my-admin-dashboard -v 1.0.0
|
85
85
|
```
|
86
86
|
|
87
87
|
#### Update Project
|
@@ -286,6 +286,201 @@ diagramers extend --list
|
|
286
286
|
diagramers extend --feature <feature-name>
|
287
287
|
```
|
288
288
|
|
289
|
+
## šØ Admin Dashboard Management
|
290
|
+
|
291
|
+
The CLI provides comprehensive support for managing admin dashboard projects with modern frameworks and features.
|
292
|
+
|
293
|
+
### Admin Project Initialization
|
294
|
+
|
295
|
+
#### Initialize New Admin Project
|
296
|
+
```bash
|
297
|
+
diagramers admin init <template-type> <project-name> [options]
|
298
|
+
```
|
299
|
+
|
300
|
+
**Template Types:**
|
301
|
+
- `react-typescript` - React 18 + TypeScript + Tailwind CSS
|
302
|
+
- `vue-typescript` - Vue 3 + TypeScript + Tailwind CSS
|
303
|
+
- `angular` - Angular 17 + TypeScript + Tailwind CSS
|
304
|
+
|
305
|
+
**Options:**
|
306
|
+
- `-f, --framework <framework>` - Framework to use (react, vue, angular)
|
307
|
+
- `-t, --template <template>` - Template package name
|
308
|
+
- `-v, --version <version>` - Template version to use
|
309
|
+
- `-y, --yes` - Skip prompts and use defaults
|
310
|
+
- `--typescript` - Use TypeScript (default: true)
|
311
|
+
- `--tailwind` - Use Tailwind CSS (default: true)
|
312
|
+
- `--api-url <url>` - API URL for the backend
|
313
|
+
- `--socket-url <url>` - Socket.IO URL for real-time features
|
314
|
+
|
315
|
+
**Examples:**
|
316
|
+
```bash
|
317
|
+
# Create React admin project
|
318
|
+
diagramers admin init react-typescript my-admin-app
|
319
|
+
|
320
|
+
# Create Vue admin project with specific version
|
321
|
+
diagramers admin init vue-typescript my-vue-admin --version 1.0.0
|
322
|
+
|
323
|
+
# Create Angular admin project with custom API URL
|
324
|
+
diagramers admin init angular my-angular-admin --api-url http://localhost:3000
|
325
|
+
|
326
|
+
# Create with all options
|
327
|
+
diagramers admin init react-typescript my-admin-app \
|
328
|
+
--framework react \
|
329
|
+
--typescript \
|
330
|
+
--tailwind \
|
331
|
+
--api-url http://localhost:3000 \
|
332
|
+
--socket-url http://localhost:3000
|
333
|
+
```
|
334
|
+
|
335
|
+
### Admin Project Extension
|
336
|
+
|
337
|
+
#### Extend Admin Project
|
338
|
+
```bash
|
339
|
+
diagramers admin extend [options]
|
340
|
+
```
|
341
|
+
|
342
|
+
**Options:**
|
343
|
+
- `-p, --page <name>` - Generate a new page
|
344
|
+
- `-c, --component <name>` - Generate a new component
|
345
|
+
- `-s, --service <name>` - Generate a new service
|
346
|
+
- `-h, --hook <name>` - Generate a new custom hook
|
347
|
+
- `-m, --module <name>` - Generate a complete module with CRUD
|
348
|
+
- `--crud` - Include CRUD operations for module
|
349
|
+
- `--api` - Include API integration for module
|
350
|
+
- `--socket` - Include Socket.IO integration for module
|
351
|
+
- `--table` - Include data table for module
|
352
|
+
- `--form` - Include form components for module
|
353
|
+
- `--chart` - Include chart components for module
|
354
|
+
- `--auth` - Include authentication for module
|
355
|
+
- `--path <path>` - Custom path for generated files
|
356
|
+
|
357
|
+
**Examples:**
|
358
|
+
```bash
|
359
|
+
# Generate a new module with CRUD operations
|
360
|
+
diagramers admin extend --module products --crud --api --table
|
361
|
+
|
362
|
+
# Generate a new page
|
363
|
+
diagramers admin extend --page analytics
|
364
|
+
|
365
|
+
# Generate a new component
|
366
|
+
diagramers admin extend --component ProductCard
|
367
|
+
|
368
|
+
# Generate a new service
|
369
|
+
diagramers admin extend --service orderService
|
370
|
+
|
371
|
+
# Generate a new custom hook
|
372
|
+
diagramers admin extend --hook useOrders
|
373
|
+
|
374
|
+
# Generate complete module with all features
|
375
|
+
diagramers admin extend --module orders --crud --api --socket --table --form --chart --auth
|
376
|
+
```
|
377
|
+
|
378
|
+
### Admin Project Updates
|
379
|
+
|
380
|
+
#### Update Admin Project
|
381
|
+
```bash
|
382
|
+
diagramers admin update [options]
|
383
|
+
```
|
384
|
+
|
385
|
+
**Options:**
|
386
|
+
- `-t, --template <template>` - Template to update
|
387
|
+
- `-v, --version <version>` - Version to update to
|
388
|
+
- `--force` - Force update even if conflicts exist
|
389
|
+
- `--backup` - Create backup before updating
|
390
|
+
|
391
|
+
**Examples:**
|
392
|
+
```bash
|
393
|
+
# Update to latest version
|
394
|
+
diagramers admin update
|
395
|
+
|
396
|
+
# Update to specific version
|
397
|
+
diagramers admin update --version 1.0.0
|
398
|
+
|
399
|
+
# Force update with backup
|
400
|
+
diagramers admin update --force --backup
|
401
|
+
```
|
402
|
+
|
403
|
+
### Admin Version Management
|
404
|
+
|
405
|
+
#### Check Admin Version
|
406
|
+
```bash
|
407
|
+
diagramers admin version [options]
|
408
|
+
```
|
409
|
+
|
410
|
+
**Options:**
|
411
|
+
- `-c, --check <version>` - Check if specific version exists
|
412
|
+
|
413
|
+
**Examples:**
|
414
|
+
```bash
|
415
|
+
# Show current version info
|
416
|
+
diagramers admin version
|
417
|
+
|
418
|
+
# Check specific version
|
419
|
+
diagramers admin version --check 1.0.0
|
420
|
+
```
|
421
|
+
|
422
|
+
#### List Available Admin Versions
|
423
|
+
```bash
|
424
|
+
diagramers admin versions [options]
|
425
|
+
```
|
426
|
+
|
427
|
+
**Options:**
|
428
|
+
- `-a, --all` - Show all versions (default: show last 10)
|
429
|
+
|
430
|
+
**Examples:**
|
431
|
+
```bash
|
432
|
+
# Show last 10 versions
|
433
|
+
diagramers admin versions
|
434
|
+
|
435
|
+
# Show all available versions
|
436
|
+
diagramers admin versions --all
|
437
|
+
```
|
438
|
+
|
439
|
+
### Admin Project Features
|
440
|
+
|
441
|
+
#### Available Templates
|
442
|
+
- **React TypeScript Admin** - React 18 + TypeScript + Tailwind CSS
|
443
|
+
- **Vue TypeScript Admin** - Vue 3 + TypeScript + Tailwind CSS
|
444
|
+
- **Angular Admin** - Angular 17 + TypeScript + Tailwind CSS
|
445
|
+
|
446
|
+
#### Built-in Features
|
447
|
+
- **Authentication System** - Login, register, password reset, JWT management
|
448
|
+
- **Dashboard** - Analytics overview, metric cards, chart widgets
|
449
|
+
- **User Management** - User CRUD, profiles, role management, activity tracking
|
450
|
+
- **Real-time Updates** - Socket.IO integration, live notifications
|
451
|
+
- **Data Tables** - Advanced filtering, sorting, pagination, bulk actions
|
452
|
+
- **Charts & Analytics** - Line, bar, pie, area charts with real-time data
|
453
|
+
- **Form Builder** - Dynamic forms, validation, file uploads, multi-step forms
|
454
|
+
- **File Upload** - Drag & drop, progress tracking, file preview
|
455
|
+
- **Notifications** - Toast notifications, notification center, push notifications
|
456
|
+
- **Settings Panel** - Application settings, user preferences, theme customization
|
457
|
+
|
458
|
+
#### Project Structure
|
459
|
+
```
|
460
|
+
my-admin-app/
|
461
|
+
āāā src/
|
462
|
+
ā āāā components/ # Reusable UI components
|
463
|
+
ā ā āāā ui/ # Base UI components
|
464
|
+
ā ā āāā layout/ # Layout components
|
465
|
+
ā āāā features/ # Feature modules
|
466
|
+
ā ā āāā auth/ # Authentication
|
467
|
+
ā ā āāā dashboard/ # Dashboard
|
468
|
+
ā ā āāā users/ # User management
|
469
|
+
ā ā āāā [modules]/ # Generated modules
|
470
|
+
ā āāā hooks/ # Custom React hooks
|
471
|
+
ā āāā services/ # API services
|
472
|
+
ā āāā lib/ # Utilities and configurations
|
473
|
+
ā āāā types/ # TypeScript type definitions
|
474
|
+
ā āāā styles/ # Global styles
|
475
|
+
ā āāā assets/ # Static assets
|
476
|
+
āāā public/ # Public assets
|
477
|
+
āāā package.json # Dependencies and scripts
|
478
|
+
āāā tsconfig.json # TypeScript configuration
|
479
|
+
āāā tailwind.config.js # Tailwind CSS configuration
|
480
|
+
āāā vite.config.ts # Vite configuration
|
481
|
+
āāā .env # Environment variables
|
482
|
+
```
|
483
|
+
|
289
484
|
### Email System Management
|
290
485
|
|
291
486
|
#### Generate Email Module
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../src/commands/admin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,WA+T5C"}
|
@@ -0,0 +1,324 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.adminCommand = adminCommand;
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
8
|
+
const child_process_1 = require("child_process");
|
9
|
+
const fs_1 = require("fs");
|
10
|
+
const path_1 = require("path");
|
11
|
+
function adminCommand(program) {
|
12
|
+
const admin = program
|
13
|
+
.command('admin')
|
14
|
+
.description('Admin dashboard commands for diagramers projects');
|
15
|
+
// Version command
|
16
|
+
admin
|
17
|
+
.command('version')
|
18
|
+
.description('Show current admin template version')
|
19
|
+
.option('-c, --check <version>', 'Check if specific version exists')
|
20
|
+
.action(async (options) => {
|
21
|
+
try {
|
22
|
+
if (options.check) {
|
23
|
+
console.log(chalk_1.default.blue(`š Checking @diagramers/admin version: ${options.check}`));
|
24
|
+
try {
|
25
|
+
const versionInfo = (0, child_process_1.execSync)(`npm view @diagramers/admin@${options.check} version`, {
|
26
|
+
encoding: 'utf8',
|
27
|
+
timeout: 5000
|
28
|
+
}).trim();
|
29
|
+
console.log(chalk_1.default.green(`ā
Version ${options.check} exists: ${versionInfo}`));
|
30
|
+
}
|
31
|
+
catch (error) {
|
32
|
+
console.log(chalk_1.default.red(`ā Version ${options.check} not found`));
|
33
|
+
// Show available versions
|
34
|
+
try {
|
35
|
+
const versionsOutput = (0, child_process_1.execSync)('npm view @diagramers/admin versions --json', {
|
36
|
+
encoding: 'utf8',
|
37
|
+
timeout: 10000
|
38
|
+
});
|
39
|
+
const versions = JSON.parse(versionsOutput);
|
40
|
+
const recentVersions = Array.isArray(versions) ? versions.slice(-5) : [versions];
|
41
|
+
console.log(chalk_1.default.yellow('\nš¦ Recent available versions:'));
|
42
|
+
recentVersions.forEach((version) => {
|
43
|
+
console.log(chalk_1.default.yellow(` ${version}`));
|
44
|
+
});
|
45
|
+
}
|
46
|
+
catch (versionError) {
|
47
|
+
console.log(chalk_1.default.gray('Could not fetch available versions'));
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
51
|
+
else {
|
52
|
+
// Show current version info
|
53
|
+
console.log(chalk_1.default.blue('š¦ @diagramers/admin version information:'));
|
54
|
+
try {
|
55
|
+
const latestVersion = (0, child_process_1.execSync)('npm view @diagramers/admin version', {
|
56
|
+
encoding: 'utf8',
|
57
|
+
timeout: 5000
|
58
|
+
}).trim();
|
59
|
+
console.log(chalk_1.default.green(`Latest: ${latestVersion}`));
|
60
|
+
}
|
61
|
+
catch (error) {
|
62
|
+
console.log(chalk_1.default.red('Could not fetch latest version'));
|
63
|
+
}
|
64
|
+
// Check local version if in a project
|
65
|
+
try {
|
66
|
+
const localVersion = (0, child_process_1.execSync)('npm list @diagramers/admin --depth=0', {
|
67
|
+
encoding: 'utf8',
|
68
|
+
timeout: 5000
|
69
|
+
});
|
70
|
+
console.log(chalk_1.default.blue('Local project version:'));
|
71
|
+
console.log(localVersion);
|
72
|
+
}
|
73
|
+
catch (error) {
|
74
|
+
console.log(chalk_1.default.gray('No local @diagramers/admin installation found'));
|
75
|
+
}
|
76
|
+
}
|
77
|
+
}
|
78
|
+
catch (error) {
|
79
|
+
console.error(chalk_1.default.red(`ā Error checking version: ${error.message}`));
|
80
|
+
process.exit(1);
|
81
|
+
}
|
82
|
+
});
|
83
|
+
// Init command
|
84
|
+
admin
|
85
|
+
.command('init <template-type> <project-name>')
|
86
|
+
.description('Initialize a new admin dashboard project')
|
87
|
+
.option('-f, --framework <framework>', 'Framework to use (react, vue, angular)', 'react')
|
88
|
+
.option('-t, --template <template>', 'Template package name')
|
89
|
+
.option('-v, --version <version>', 'Template version to use')
|
90
|
+
.option('-y, --yes', 'Skip prompts and use defaults')
|
91
|
+
.option('--typescript', 'Use TypeScript (default: true)')
|
92
|
+
.option('--tailwind', 'Use Tailwind CSS (default: true)')
|
93
|
+
.option('--api-url <url>', 'API URL for the backend')
|
94
|
+
.option('--socket-url <url>', 'Socket.IO URL for real-time features')
|
95
|
+
.action(async (templateType, projectName, options) => {
|
96
|
+
try {
|
97
|
+
console.log(chalk_1.default.blue(`š Initializing admin project: ${projectName}`));
|
98
|
+
console.log(chalk_1.default.blue(`š¦ Template type: ${templateType}`));
|
99
|
+
// Validate template type
|
100
|
+
const validTemplates = ['react-typescript', 'vue-typescript', 'angular'];
|
101
|
+
if (!validTemplates.includes(templateType)) {
|
102
|
+
throw new Error(`Invalid template type. Must be one of: ${validTemplates.join(', ')}`);
|
103
|
+
}
|
104
|
+
// Determine framework from template type
|
105
|
+
const framework = options.framework || templateType.split('-')[0];
|
106
|
+
// Build command arguments
|
107
|
+
const args = [
|
108
|
+
'init',
|
109
|
+
templateType,
|
110
|
+
projectName,
|
111
|
+
'--framework', framework
|
112
|
+
];
|
113
|
+
if (options.version)
|
114
|
+
args.push('--version', options.version);
|
115
|
+
if (options.yes)
|
116
|
+
args.push('--yes');
|
117
|
+
if (options.typescript)
|
118
|
+
args.push('--typescript');
|
119
|
+
if (options.tailwind)
|
120
|
+
args.push('--tailwind');
|
121
|
+
if (options.apiUrl)
|
122
|
+
args.push('--api-url', options.apiUrl);
|
123
|
+
if (options.socketUrl)
|
124
|
+
args.push('--socket-url', options.socketUrl);
|
125
|
+
// Execute the admin CLI command
|
126
|
+
const command = `npx @diagramers/admin ${args.join(' ')}`;
|
127
|
+
console.log(chalk_1.default.gray(`Executing: ${command}`));
|
128
|
+
(0, child_process_1.execSync)(command, {
|
129
|
+
stdio: 'inherit',
|
130
|
+
cwd: process.cwd()
|
131
|
+
});
|
132
|
+
console.log(chalk_1.default.green(`ā
Admin project '${projectName}' initialized successfully!`));
|
133
|
+
}
|
134
|
+
catch (error) {
|
135
|
+
console.error(chalk_1.default.red(`ā Error initializing admin project: ${error.message}`));
|
136
|
+
process.exit(1);
|
137
|
+
}
|
138
|
+
});
|
139
|
+
// Extend command
|
140
|
+
admin
|
141
|
+
.command('extend')
|
142
|
+
.description('Extend existing admin project with new features')
|
143
|
+
.option('-p, --page <name>', 'Generate a new page')
|
144
|
+
.option('-c, --component <name>', 'Generate a new component')
|
145
|
+
.option('-s, --service <name>', 'Generate a new service')
|
146
|
+
.option('-h, --hook <name>', 'Generate a new custom hook')
|
147
|
+
.option('-m, --module <name>', 'Generate a complete module with CRUD')
|
148
|
+
.option('--crud', 'Include CRUD operations for module')
|
149
|
+
.option('--api', 'Include API integration for module')
|
150
|
+
.option('--socket', 'Include Socket.IO integration for module')
|
151
|
+
.option('--table', 'Include data table for module')
|
152
|
+
.option('--form', 'Include form components for module')
|
153
|
+
.option('--chart', 'Include chart components for module')
|
154
|
+
.option('--auth', 'Include authentication for module')
|
155
|
+
.option('--path <path>', 'Custom path for generated files')
|
156
|
+
.action(async (options) => {
|
157
|
+
try {
|
158
|
+
// Validate that we're in an admin project
|
159
|
+
const projectPath = process.cwd();
|
160
|
+
const packageJsonPath = (0, path_1.join)(projectPath, 'package.json');
|
161
|
+
if (!(0, fs_1.existsSync)(packageJsonPath)) {
|
162
|
+
throw new Error('No package.json found. Please run this command from an admin project directory.');
|
163
|
+
}
|
164
|
+
const packageJson = JSON.parse((0, fs_1.readFileSync)(packageJsonPath, 'utf8'));
|
165
|
+
const isAdminProject = packageJson.name?.includes('admin') ||
|
166
|
+
packageJson.description?.includes('admin') ||
|
167
|
+
(0, fs_1.existsSync)((0, path_1.join)(projectPath, 'src', 'components')) ||
|
168
|
+
(0, fs_1.existsSync)((0, path_1.join)(projectPath, 'src', 'features'));
|
169
|
+
if (!isAdminProject) {
|
170
|
+
throw new Error('This does not appear to be an admin project. Please run this command from an admin project directory.');
|
171
|
+
}
|
172
|
+
// Build command arguments
|
173
|
+
const args = ['extend'];
|
174
|
+
if (options.page)
|
175
|
+
args.push('--page', options.page);
|
176
|
+
if (options.component)
|
177
|
+
args.push('--component', options.component);
|
178
|
+
if (options.service)
|
179
|
+
args.push('--service', options.service);
|
180
|
+
if (options.hook)
|
181
|
+
args.push('--hook', options.hook);
|
182
|
+
if (options.module)
|
183
|
+
args.push('--module', options.module);
|
184
|
+
if (options.crud)
|
185
|
+
args.push('--crud');
|
186
|
+
if (options.api)
|
187
|
+
args.push('--api');
|
188
|
+
if (options.socket)
|
189
|
+
args.push('--socket');
|
190
|
+
if (options.table)
|
191
|
+
args.push('--table');
|
192
|
+
if (options.form)
|
193
|
+
args.push('--form');
|
194
|
+
if (options.chart)
|
195
|
+
args.push('--chart');
|
196
|
+
if (options.auth)
|
197
|
+
args.push('--auth');
|
198
|
+
if (options.path)
|
199
|
+
args.push('--path', options.path);
|
200
|
+
// Execute the admin CLI command
|
201
|
+
const command = `npx @diagramers/admin ${args.join(' ')}`;
|
202
|
+
console.log(chalk_1.default.gray(`Executing: ${command}`));
|
203
|
+
(0, child_process_1.execSync)(command, {
|
204
|
+
stdio: 'inherit',
|
205
|
+
cwd: process.cwd()
|
206
|
+
});
|
207
|
+
console.log(chalk_1.default.green(`ā
Project extended successfully!`));
|
208
|
+
}
|
209
|
+
catch (error) {
|
210
|
+
console.error(chalk_1.default.red(`ā Error extending project: ${error.message}`));
|
211
|
+
process.exit(1);
|
212
|
+
}
|
213
|
+
});
|
214
|
+
// Update command
|
215
|
+
admin
|
216
|
+
.command('update')
|
217
|
+
.description('Update admin project template')
|
218
|
+
.option('-t, --template <template>', 'Template to update')
|
219
|
+
.option('-v, --version <version>', 'Version to update to')
|
220
|
+
.option('--force', 'Force update even if conflicts exist')
|
221
|
+
.option('--backup', 'Create backup before updating')
|
222
|
+
.action(async (options) => {
|
223
|
+
try {
|
224
|
+
// Validate that we're in an admin project
|
225
|
+
const projectPath = process.cwd();
|
226
|
+
const packageJsonPath = (0, path_1.join)(projectPath, 'package.json');
|
227
|
+
if (!(0, fs_1.existsSync)(packageJsonPath)) {
|
228
|
+
throw new Error('No package.json found. Please run this command from an admin project directory.');
|
229
|
+
}
|
230
|
+
const packageJson = JSON.parse((0, fs_1.readFileSync)(packageJsonPath, 'utf8'));
|
231
|
+
const isAdminProject = packageJson.name?.includes('admin') ||
|
232
|
+
packageJson.description?.includes('admin') ||
|
233
|
+
(0, fs_1.existsSync)((0, path_1.join)(projectPath, 'src', 'components')) ||
|
234
|
+
(0, fs_1.existsSync)((0, path_1.join)(projectPath, 'src', 'features'));
|
235
|
+
if (!isAdminProject) {
|
236
|
+
throw new Error('This does not appear to be an admin project. Please run this command from an admin project directory.');
|
237
|
+
}
|
238
|
+
// Build command arguments
|
239
|
+
const args = ['update'];
|
240
|
+
if (options.template)
|
241
|
+
args.push('--template', options.template);
|
242
|
+
if (options.version)
|
243
|
+
args.push('--version', options.version);
|
244
|
+
if (options.force)
|
245
|
+
args.push('--force');
|
246
|
+
if (options.backup)
|
247
|
+
args.push('--backup');
|
248
|
+
// Execute the admin CLI command
|
249
|
+
const command = `npx @diagramers/admin ${args.join(' ')}`;
|
250
|
+
console.log(chalk_1.default.gray(`Executing: ${command}`));
|
251
|
+
(0, child_process_1.execSync)(command, {
|
252
|
+
stdio: 'inherit',
|
253
|
+
cwd: process.cwd()
|
254
|
+
});
|
255
|
+
console.log(chalk_1.default.green(`ā
Project updated successfully!`));
|
256
|
+
}
|
257
|
+
catch (error) {
|
258
|
+
console.error(chalk_1.default.red(`ā Error updating project: ${error.message}`));
|
259
|
+
process.exit(1);
|
260
|
+
}
|
261
|
+
});
|
262
|
+
// Versions command
|
263
|
+
admin
|
264
|
+
.command('versions')
|
265
|
+
.description('List available versions of @diagramers/admin')
|
266
|
+
.option('-a, --all', 'Show all versions (default: show last 10)')
|
267
|
+
.action(async (options) => {
|
268
|
+
try {
|
269
|
+
console.log(chalk_1.default.blue('š¦ Fetching available versions of @diagramers/admin...'));
|
270
|
+
const versionsOutput = (0, child_process_1.execSync)('npm view @diagramers/admin versions --json', {
|
271
|
+
encoding: 'utf8',
|
272
|
+
timeout: 10000
|
273
|
+
});
|
274
|
+
const versions = JSON.parse(versionsOutput);
|
275
|
+
console.log(chalk_1.default.green('\nā
Available versions:'));
|
276
|
+
if (Array.isArray(versions)) {
|
277
|
+
const displayVersions = options.all ? versions : versions.slice(-10);
|
278
|
+
displayVersions.forEach((version) => {
|
279
|
+
console.log(chalk_1.default.yellow(` ${version}`));
|
280
|
+
});
|
281
|
+
if (!options.all && versions.length > 10) {
|
282
|
+
console.log(chalk_1.default.gray(`\n ... and ${versions.length - 10} more versions`));
|
283
|
+
console.log(chalk_1.default.gray(' Use --all to see all versions'));
|
284
|
+
}
|
285
|
+
}
|
286
|
+
else {
|
287
|
+
console.log(chalk_1.default.yellow(` ${versions}`));
|
288
|
+
}
|
289
|
+
// Show current version
|
290
|
+
try {
|
291
|
+
const currentVersion = (0, child_process_1.execSync)('npm view @diagramers/admin version', {
|
292
|
+
encoding: 'utf8',
|
293
|
+
timeout: 5000
|
294
|
+
}).trim();
|
295
|
+
console.log(chalk_1.default.green(`\nš Latest version: ${currentVersion}`));
|
296
|
+
}
|
297
|
+
catch (error) {
|
298
|
+
// Ignore if we can't get current version
|
299
|
+
}
|
300
|
+
console.log(chalk_1.default.blue('\nš Usage examples:'));
|
301
|
+
console.log(chalk_1.default.gray(' diagramers admin init react-typescript my-admin --version 1.0.0'));
|
302
|
+
console.log(chalk_1.default.gray(' diagramers admin update --version 1.0.0'));
|
303
|
+
}
|
304
|
+
catch (error) {
|
305
|
+
console.error(chalk_1.default.red(`ā Failed to fetch versions: ${error.message}`));
|
306
|
+
console.log(chalk_1.default.yellow('š” Make sure you have internet connection and npm is installed'));
|
307
|
+
// Fallback: try to get just the latest version
|
308
|
+
try {
|
309
|
+
console.log(chalk_1.default.blue('\nš Trying to get latest version...'));
|
310
|
+
const latestVersion = (0, child_process_1.execSync)('npm view @diagramers/admin version', {
|
311
|
+
encoding: 'utf8',
|
312
|
+
timeout: 5000
|
313
|
+
}).trim();
|
314
|
+
console.log(chalk_1.default.green(`ā
Latest version: ${latestVersion}`));
|
315
|
+
}
|
316
|
+
catch (fallbackError) {
|
317
|
+
console.log(chalk_1.default.red('ā Could not fetch any version information'));
|
318
|
+
}
|
319
|
+
process.exit(1);
|
320
|
+
}
|
321
|
+
});
|
322
|
+
return admin;
|
323
|
+
}
|
324
|
+
//# sourceMappingURL=admin.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"admin.js","sourceRoot":"","sources":["../../src/commands/admin.ts"],"names":[],"mappings":";;;;;AAMA,oCA+TC;AApUD,kDAA0B;AAC1B,iDAAyC;AACzC,2BAA8C;AAC9C,+BAA4B;AAE5B,SAAgB,YAAY,CAAC,OAAgB;IAC3C,MAAM,KAAK,GAAG,OAAO;SAClB,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,kDAAkD,CAAC,CAAC;IAEnE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