@skyreve/reve 1.0.19 → 1.0.23
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 +99 -49
- package/README.npm.md +15 -12
- package/bin/darwin/reve +0 -0
- package/bin/linux/reve +0 -0
- package/bin/reve +0 -0
- package/bin/windows/reve.exe +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -53,10 +53,8 @@ reve github login
|
|
|
53
53
|
reve github install
|
|
54
54
|
reve env link <skyreve-project-env-name_or_id>
|
|
55
55
|
reve env sync
|
|
56
|
-
|
|
57
|
-
reve
|
|
58
|
-
reve gen api # AI
|
|
59
|
-
reve gen table # AI
|
|
56
|
+
reve compile
|
|
57
|
+
reve code [table-name]
|
|
60
58
|
```
|
|
61
59
|
|
|
62
60
|
---
|
|
@@ -65,7 +63,7 @@ reve gen table # AI
|
|
|
65
63
|
|
|
66
64
|
### **2.1 Install Go**
|
|
67
65
|
|
|
68
|
-
Reve CLI requires **Go**. If Go is not installed, install it using the following commands:
|
|
66
|
+
Reve CLI requires **Go 1.24.0 or higher**. If Go is not installed, install it using the following commands:
|
|
69
67
|
|
|
70
68
|
**macOS:**
|
|
71
69
|
|
|
@@ -247,8 +245,6 @@ npx reve --help
|
|
|
247
245
|
|
|
248
246
|
| Command | Description |
|
|
249
247
|
| -------------------------- | --------------------------------------------------------------------------- |
|
|
250
|
-
| `reve env` | Start interactive environment management (same as `reve env start`) |
|
|
251
|
-
| `reve env start` | Start interactive environment management |
|
|
252
248
|
| `reve env info` | Check project info, Git repository info, and GitHub App installation status |
|
|
253
249
|
| `reve env list` | List all Reve environments with linked GitHub branch information |
|
|
254
250
|
| `reve env link <reve_env>` | Link GitHub branch to specific Reve environment |
|
|
@@ -262,6 +258,17 @@ npx reve --help
|
|
|
262
258
|
| `reve github login` | Login to GitHub using Device Flow |
|
|
263
259
|
| `reve github install` | Install GitHub App for current repository |
|
|
264
260
|
|
|
261
|
+
#### **🔹 Developer Commands**
|
|
262
|
+
|
|
263
|
+
| Command | Description |
|
|
264
|
+
| ------------------------------------ | ------------------------------------------------------------------------- |
|
|
265
|
+
| `reve compile` | Validate `src/tables` and `src/apis` configuration for errors/warnings |
|
|
266
|
+
| `reve code [table-name]` | Generate admin REST API code and helper files (smart update) |
|
|
267
|
+
| `reve code [table-name] --force` | Force regenerate all functions (overwrites existing files) |
|
|
268
|
+
| `reve code [table-name] -m <method>` | Generate specific methods only (list, create, detail, delete, update) |
|
|
269
|
+
| `reve code -m help` | Generate helper files only (serializers, APIs) |
|
|
270
|
+
| `reve code -m test` | Generate Jest test setup files (package.json, tests/, setup.js) |
|
|
271
|
+
|
|
265
272
|
### **5.5 Usage Examples**
|
|
266
273
|
|
|
267
274
|
#### **First-time Setup (Recommended)**
|
|
@@ -297,8 +304,9 @@ reve github login
|
|
|
297
304
|
# 4. Install GitHub App
|
|
298
305
|
reve github install
|
|
299
306
|
|
|
300
|
-
# 5.
|
|
301
|
-
reve env
|
|
307
|
+
# 5. Check environment list and link a branch
|
|
308
|
+
reve env list
|
|
309
|
+
reve env link <env-name>
|
|
302
310
|
```
|
|
303
311
|
|
|
304
312
|
#### **Daily Usage**
|
|
@@ -324,6 +332,33 @@ reve env deploy --force
|
|
|
324
332
|
|
|
325
333
|
#### **🔹 File Generation**
|
|
326
334
|
|
|
335
|
+
Reve CLI includes powerful code generation and validation tools:
|
|
336
|
+
|
|
337
|
+
- **`reve compile`**: Validates schema consistency across tables and APIs — checks for duplicate `meta_id`, invalid references, missing partner files, and module/function existence
|
|
338
|
+
- **`reve code [table-name]`**: Generates admin REST API code and helper files with smart update capability (preserves user-defined functions). Omit `[table-name]` to process all tables in `src/tables/`
|
|
339
|
+
|
|
340
|
+
**`reve code` flags:**
|
|
341
|
+
|
|
342
|
+
```bash
|
|
343
|
+
# Generate code for a specific table
|
|
344
|
+
reve code user
|
|
345
|
+
|
|
346
|
+
# Process all tables in src/tables/
|
|
347
|
+
reve code
|
|
348
|
+
|
|
349
|
+
# Force regenerate (overwrite existing files)
|
|
350
|
+
reve code user --force
|
|
351
|
+
|
|
352
|
+
# Generate specific HTTP methods only
|
|
353
|
+
reve code user -m list,create,detail
|
|
354
|
+
|
|
355
|
+
# Generate helper files only (serializers, APIs)
|
|
356
|
+
reve code user -m help
|
|
357
|
+
|
|
358
|
+
# Generate Jest test setup files
|
|
359
|
+
reve code -m test
|
|
360
|
+
```
|
|
361
|
+
|
|
327
362
|
The `reve env sync` command automatically generates the following files in your project:
|
|
328
363
|
|
|
329
364
|
- **Settings**: `src/settings.yaml` - Project configuration
|
|
@@ -561,45 +596,60 @@ npm unpublish @skyreve/reve@<version>
|
|
|
561
596
|
|
|
562
597
|
```
|
|
563
598
|
reve-cli/
|
|
564
|
-
├── cmd/
|
|
565
|
-
│ ├── root.go
|
|
566
|
-
│ ├── start.go
|
|
567
|
-
│ ├── login.go
|
|
568
|
-
│ ├── project.go
|
|
569
|
-
│ ├── env.go
|
|
570
|
-
│ ├── github.go
|
|
571
|
-
│ ├──
|
|
572
|
-
│
|
|
573
|
-
│
|
|
574
|
-
│ │ ├──
|
|
575
|
-
│ │ ├──
|
|
576
|
-
│ │ ├──
|
|
577
|
-
│ │ ├──
|
|
578
|
-
│ │
|
|
579
|
-
│ └──
|
|
580
|
-
│
|
|
581
|
-
│
|
|
582
|
-
├──
|
|
583
|
-
│
|
|
584
|
-
│
|
|
585
|
-
│
|
|
586
|
-
│
|
|
587
|
-
│
|
|
588
|
-
│
|
|
589
|
-
│
|
|
590
|
-
│
|
|
591
|
-
|
|
592
|
-
│
|
|
593
|
-
├──
|
|
594
|
-
│
|
|
595
|
-
├──
|
|
596
|
-
├──
|
|
597
|
-
├──
|
|
598
|
-
├──
|
|
599
|
-
├──
|
|
600
|
-
├──
|
|
601
|
-
├──
|
|
602
|
-
└──
|
|
599
|
+
├── cmd/ # Command definitions
|
|
600
|
+
│ ├── root.go # Root command with logging and config
|
|
601
|
+
│ ├── start.go # Complete setup start command (6-step process)
|
|
602
|
+
│ ├── login.go # SkyReve platform login with email/password
|
|
603
|
+
│ ├── project.go # Project selection/creation
|
|
604
|
+
│ ├── env.go # Environment management command group
|
|
605
|
+
│ ├── github.go # GitHub related commands group
|
|
606
|
+
│ ├── compile.go # Schema validation for tables and APIs
|
|
607
|
+
│ ├── code.go # Code generation entry point
|
|
608
|
+
│ ├── env/ # Environment management sub-commands
|
|
609
|
+
│ │ ├── info.go # Project and environment information
|
|
610
|
+
│ │ ├── list.go # List all environments with branch info
|
|
611
|
+
│ │ ├── link.go # Link GitHub branch to environment
|
|
612
|
+
│ │ ├── sync.go # Sync files (settings, tables, APIs, libs)
|
|
613
|
+
│ │ ├── deploy.go # Deploy to environment
|
|
614
|
+
│ │ └── common.go # Common environment functions
|
|
615
|
+
│ ├── github/ # GitHub sub-commands
|
|
616
|
+
│ │ ├── login.go # GitHub Device Flow authentication
|
|
617
|
+
│ │ ├── install.go # GitHub App installation
|
|
618
|
+
│ │ └── common.go # Shared GitHub helpers
|
|
619
|
+
│ └── code/ # Code generation implementations
|
|
620
|
+
│ ├── admin.go # Admin REST API code generation
|
|
621
|
+
│ ├── helper.go # Helper file generation
|
|
622
|
+
│ ├── test_jest_gen.go # Jest test setup generation
|
|
623
|
+
│ ├── admins/ # Admin API templates (list, create, detail, update, delete)
|
|
624
|
+
│ ├── helpers/ # Helper templates (serializers, APIs, copy)
|
|
625
|
+
│ └── test_jest/ # Jest test templates (package.json, setup)
|
|
626
|
+
├── internal/ # Internal packages
|
|
627
|
+
│ ├── api/ # SkyReve REST API client (endpoints & data types)
|
|
628
|
+
│ ├── config/ # Configuration management (.reve directory)
|
|
629
|
+
│ ├── constants/ # Application constants (URLs, GitHub App IDs by env)
|
|
630
|
+
│ ├── gen/ # File generation (YAML for tables, APIs, settings, libs)
|
|
631
|
+
│ ├── git/ # Git repository operations
|
|
632
|
+
│ ├── github/ # GitHub API client (OAuth, user info)
|
|
633
|
+
│ ├── http/ # HTTP client utilities
|
|
634
|
+
│ ├── logger/ # Logging system (with log rotation)
|
|
635
|
+
│ ├── python/ # Python code parsing and modification
|
|
636
|
+
│ ├── util/ # General utilities (files, strings, validation)
|
|
637
|
+
│ └── cmd_common/ # Common command utilities
|
|
638
|
+
├── version/ # Version management
|
|
639
|
+
│ └── version.go # Version & git hash (injected at build time)
|
|
640
|
+
├── scripts/ # Node.js wrapper scripts
|
|
641
|
+
│ └── reve.js # Cross-platform binary launcher
|
|
642
|
+
├── bin/ # Built binaries (platform-specific)
|
|
643
|
+
├── docs/ # Documentation
|
|
644
|
+
│ └── TESTING.md # Testing guide (unit, integration, CI/CD)
|
|
645
|
+
├── testdata/ # Sample configurations for tests
|
|
646
|
+
├── tests/ # Integration test utilities
|
|
647
|
+
├── main.go # Application entry point
|
|
648
|
+
├── package.json # npm package configuration
|
|
649
|
+
├── go.mod # Go module definition (Go 1.24.0)
|
|
650
|
+
├── Makefile # Build and development commands
|
|
651
|
+
├── README.md # This file
|
|
652
|
+
└── README.npm.md # Condensed README for npm registry
|
|
603
653
|
```
|
|
604
654
|
|
|
605
655
|
### **8.1 Key Components**
|
|
@@ -634,7 +684,7 @@ reve-cli/
|
|
|
634
684
|
## **9. Requirements**
|
|
635
685
|
|
|
636
686
|
- **Node.js**: 14.0.0 or higher
|
|
637
|
-
- **Go**:
|
|
687
|
+
- **Go**: 1.24.0 or higher
|
|
638
688
|
- **Supported OS**: macOS, Linux, Windows
|
|
639
689
|
- **Supported Architectures**: x64, arm64
|
|
640
690
|
|
package/README.npm.md
CHANGED
|
@@ -57,18 +57,21 @@ After completion, you'll see: `🎉 All setup steps completed successfully!`
|
|
|
57
57
|
|
|
58
58
|
### Main Commands
|
|
59
59
|
|
|
60
|
-
| Command
|
|
61
|
-
|
|
|
62
|
-
| `reve start`
|
|
63
|
-
| `reve login [email]`
|
|
64
|
-
| `reve project`
|
|
65
|
-
| `reve env`
|
|
66
|
-
| `reve env
|
|
67
|
-
| `reve env
|
|
68
|
-
| `reve env
|
|
69
|
-
| `reve env
|
|
70
|
-
| `reve
|
|
71
|
-
| `reve github
|
|
60
|
+
| Command | Description |
|
|
61
|
+
| ------------------------ | ----------------------------------------------------------------------- |
|
|
62
|
+
| `reve start` | **Quick Start**: Complete 6-step setup process |
|
|
63
|
+
| `reve login [email]` | Login to SkyReve platform |
|
|
64
|
+
| `reve project` | Select/create SkyReve project |
|
|
65
|
+
| `reve env` | Start interactive environment management |
|
|
66
|
+
| `reve env info` | Show project info, Git repository info, and GitHub App installation status |
|
|
67
|
+
| `reve env list` | List all Reve environments with linked GitHub branch information |
|
|
68
|
+
| `reve env link <env>` | Link GitHub branch to Reve environment |
|
|
69
|
+
| `reve env sync` | Sync current branch with Reve environment |
|
|
70
|
+
| `reve env deploy` | Deploy current branch to Reve environment |
|
|
71
|
+
| `reve github login` | Login to GitHub using Device Flow |
|
|
72
|
+
| `reve github install` | Install GitHub App for current repository |
|
|
73
|
+
| `reve compile` | Validate `src/tables` and `src/apis` configuration files |
|
|
74
|
+
| `reve code [table-name]` | Generate admin REST API code and helper files |
|
|
72
75
|
|
|
73
76
|
### Getting Help
|
|
74
77
|
|
package/bin/darwin/reve
CHANGED
|
Binary file
|
package/bin/linux/reve
CHANGED
|
Binary file
|
package/bin/reve
CHANGED
|
Binary file
|
package/bin/windows/reve.exe
CHANGED
|
Binary file
|