@skyreve/reve 1.0.21 → 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 +93 -55
- package/README.npm.md +15 -14
- package/bin/darwin/reve +0 -0
- package/bin/linux/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 |
|
|
@@ -264,10 +260,14 @@ npx reve --help
|
|
|
264
260
|
|
|
265
261
|
#### **🔹 Developer Commands**
|
|
266
262
|
|
|
267
|
-
| Command
|
|
268
|
-
|
|
|
269
|
-
| `reve compile`
|
|
270
|
-
| `reve code [table-name]`
|
|
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
271
|
|
|
272
272
|
### **5.5 Usage Examples**
|
|
273
273
|
|
|
@@ -304,8 +304,9 @@ reve github login
|
|
|
304
304
|
# 4. Install GitHub App
|
|
305
305
|
reve github install
|
|
306
306
|
|
|
307
|
-
# 5.
|
|
308
|
-
reve env
|
|
307
|
+
# 5. Check environment list and link a branch
|
|
308
|
+
reve env list
|
|
309
|
+
reve env link <env-name>
|
|
309
310
|
```
|
|
310
311
|
|
|
311
312
|
#### **Daily Usage**
|
|
@@ -333,8 +334,30 @@ reve env deploy --force
|
|
|
333
334
|
|
|
334
335
|
Reve CLI includes powerful code generation and validation tools:
|
|
335
336
|
|
|
336
|
-
- **`reve compile`**: Validates schema consistency across tables and APIs
|
|
337
|
-
- **`reve code`**: Generates
|
|
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
|
+
```
|
|
338
361
|
|
|
339
362
|
The `reve env sync` command automatically generates the following files in your project:
|
|
340
363
|
|
|
@@ -573,45 +596,60 @@ npm unpublish @skyreve/reve@<version>
|
|
|
573
596
|
|
|
574
597
|
```
|
|
575
598
|
reve-cli/
|
|
576
|
-
├── cmd/
|
|
577
|
-
│ ├── root.go
|
|
578
|
-
│ ├── start.go
|
|
579
|
-
│ ├── login.go
|
|
580
|
-
│ ├── project.go
|
|
581
|
-
│ ├── env.go
|
|
582
|
-
│ ├── github.go
|
|
583
|
-
│ ├──
|
|
584
|
-
│
|
|
585
|
-
│
|
|
586
|
-
│ │ ├──
|
|
587
|
-
│ │ ├──
|
|
588
|
-
│ │ ├──
|
|
589
|
-
│ │ ├──
|
|
590
|
-
│ │
|
|
591
|
-
│ └──
|
|
592
|
-
│
|
|
593
|
-
│
|
|
594
|
-
├──
|
|
595
|
-
│
|
|
596
|
-
│
|
|
597
|
-
│
|
|
598
|
-
│
|
|
599
|
-
│
|
|
600
|
-
│
|
|
601
|
-
│
|
|
602
|
-
│
|
|
603
|
-
|
|
604
|
-
│
|
|
605
|
-
├──
|
|
606
|
-
│
|
|
607
|
-
├──
|
|
608
|
-
├──
|
|
609
|
-
├──
|
|
610
|
-
├──
|
|
611
|
-
├──
|
|
612
|
-
├──
|
|
613
|
-
├──
|
|
614
|
-
└──
|
|
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
|
|
615
653
|
```
|
|
616
654
|
|
|
617
655
|
### **8.1 Key Components**
|
|
@@ -646,7 +684,7 @@ reve-cli/
|
|
|
646
684
|
## **9. Requirements**
|
|
647
685
|
|
|
648
686
|
- **Node.js**: 14.0.0 or higher
|
|
649
|
-
- **Go**:
|
|
687
|
+
- **Go**: 1.24.0 or higher
|
|
650
688
|
- **Supported OS**: macOS, Linux, Windows
|
|
651
689
|
- **Supported Architectures**: x64, arm64
|
|
652
690
|
|
package/README.npm.md
CHANGED
|
@@ -57,20 +57,21 @@ After completion, you'll see: `🎉 All setup steps completed successfully!`
|
|
|
57
57
|
|
|
58
58
|
### Main Commands
|
|
59
59
|
|
|
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
|
|
67
|
-
| `reve env
|
|
68
|
-
| `reve env
|
|
69
|
-
| `reve env
|
|
70
|
-
| `reve
|
|
71
|
-
| `reve github
|
|
72
|
-
| `reve
|
|
73
|
-
| `reve
|
|
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 |
|
|
74
75
|
|
|
75
76
|
### Getting Help
|
|
76
77
|
|
package/bin/darwin/reve
CHANGED
|
Binary file
|
package/bin/linux/reve
CHANGED
|
Binary file
|
package/bin/windows/reve.exe
CHANGED
|
Binary file
|