@skyreve/reve 1.0.21 → 1.0.24
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 +109 -68
- package/README.npm.md +25 -21
- 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
|
|
|
@@ -237,18 +235,17 @@ npx reve --help
|
|
|
237
235
|
|
|
238
236
|
#### **🔹 Basic Commands**
|
|
239
237
|
|
|
240
|
-
| Command
|
|
241
|
-
|
|
|
242
|
-
| `reve start`
|
|
243
|
-
| `reve
|
|
244
|
-
| `reve
|
|
238
|
+
| Command | Description |
|
|
239
|
+
| --------------------- | ------------------------------------------------------------------------------- |
|
|
240
|
+
| `reve start` | **Quick Start**: Complete 5-step setup process and start environment management |
|
|
241
|
+
| `reve start --force` | Force all 5 setup steps even if already configured |
|
|
242
|
+
| `reve login [email]` | Login to SkyReve platform |
|
|
243
|
+
| `reve project` | Select/create SkyReve project to work with |
|
|
245
244
|
|
|
246
245
|
#### **🔹 Environment Management Commands (`reve env`)**
|
|
247
246
|
|
|
248
247
|
| Command | Description |
|
|
249
248
|
| -------------------------- | --------------------------------------------------------------------------- |
|
|
250
|
-
| `reve env` | Start interactive environment management (same as `reve env start`) |
|
|
251
|
-
| `reve env start` | Start interactive environment management |
|
|
252
249
|
| `reve env info` | Check project info, Git repository info, and GitHub App installation status |
|
|
253
250
|
| `reve env list` | List all Reve environments with linked GitHub branch information |
|
|
254
251
|
| `reve env link <reve_env>` | Link GitHub branch to specific Reve environment |
|
|
@@ -264,28 +261,34 @@ npx reve --help
|
|
|
264
261
|
|
|
265
262
|
#### **🔹 Developer Commands**
|
|
266
263
|
|
|
267
|
-
| Command
|
|
268
|
-
|
|
|
269
|
-
| `reve compile`
|
|
270
|
-
| `reve code [table-name]`
|
|
264
|
+
| Command | Description |
|
|
265
|
+
| ------------------------------------ | ------------------------------------------------------------------------- |
|
|
266
|
+
| `reve compile` | Validate `src/tables` and `src/apis` configuration for errors/warnings |
|
|
267
|
+
| `reve code [table-name]` | Generate admin REST API code and helper files (smart update) |
|
|
268
|
+
| `reve code [table-name] --force` | Force regenerate all functions (overwrites existing files) |
|
|
269
|
+
| `reve code [table-name] -m <method>` | Generate specific methods only (list, create, detail, delete, update) |
|
|
270
|
+
| `reve code -m help` | Generate helper files only (serializers, APIs) |
|
|
271
|
+
| `reve code -m test` | Generate Jest test setup files (package.json, tests/, setup.js) |
|
|
271
272
|
|
|
272
273
|
### **5.5 Usage Examples**
|
|
273
274
|
|
|
274
275
|
#### **First-time Setup (Recommended)**
|
|
275
276
|
|
|
276
277
|
```bash
|
|
277
|
-
# 1. Complete
|
|
278
|
+
# 1. Complete 5-step setup process (Quick Start)
|
|
278
279
|
reve start
|
|
280
|
+
|
|
281
|
+
# Force all steps even if already configured
|
|
282
|
+
reve start --force
|
|
279
283
|
```
|
|
280
284
|
|
|
281
|
-
This **Quick Start** command automatically performs the following
|
|
285
|
+
This **Quick Start** command automatically performs the following 5 steps:
|
|
282
286
|
|
|
283
|
-
1. **🔐 Step 1/
|
|
284
|
-
2. **📁 Step 2/
|
|
285
|
-
3. **🐙 Step 3/
|
|
286
|
-
4. **🔧 Step 4/
|
|
287
|
-
5. **📦 Step 5/
|
|
288
|
-
6. **🚀 Step 6/6**: Start syncing Reve environment
|
|
287
|
+
1. **🔐 Step 1/5**: Login to SkyReve platform
|
|
288
|
+
2. **📁 Step 2/5**: Select/create a project
|
|
289
|
+
3. **🐙 Step 3/5**: Login to GitHub
|
|
290
|
+
4. **🔧 Step 4/5**: Install GitHub App
|
|
291
|
+
5. **📦 Step 5/5**: Link GitHub branch to Reve environment
|
|
289
292
|
|
|
290
293
|
After completion, you'll see: `🎉 All setup steps completed successfully!`
|
|
291
294
|
|
|
@@ -304,8 +307,9 @@ reve github login
|
|
|
304
307
|
# 4. Install GitHub App
|
|
305
308
|
reve github install
|
|
306
309
|
|
|
307
|
-
# 5.
|
|
308
|
-
reve env
|
|
310
|
+
# 5. Check environment list and link a branch
|
|
311
|
+
reve env list
|
|
312
|
+
reve env link <env-name>
|
|
309
313
|
```
|
|
310
314
|
|
|
311
315
|
#### **Daily Usage**
|
|
@@ -333,8 +337,30 @@ reve env deploy --force
|
|
|
333
337
|
|
|
334
338
|
Reve CLI includes powerful code generation and validation tools:
|
|
335
339
|
|
|
336
|
-
- **`reve compile`**: Validates schema consistency across tables and APIs
|
|
337
|
-
- **`reve code`**: Generates
|
|
340
|
+
- **`reve compile`**: Validates schema consistency across tables and APIs — checks for duplicate `meta_id`, invalid references, missing partner files, and module/function existence
|
|
341
|
+
- **`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/`
|
|
342
|
+
|
|
343
|
+
**`reve code` flags:**
|
|
344
|
+
|
|
345
|
+
```bash
|
|
346
|
+
# Generate code for a specific table
|
|
347
|
+
reve code user
|
|
348
|
+
|
|
349
|
+
# Process all tables in src/tables/
|
|
350
|
+
reve code
|
|
351
|
+
|
|
352
|
+
# Force regenerate (overwrite existing files)
|
|
353
|
+
reve code user --force
|
|
354
|
+
|
|
355
|
+
# Generate specific HTTP methods only
|
|
356
|
+
reve code user -m list,create,detail
|
|
357
|
+
|
|
358
|
+
# Generate helper files only (serializers, APIs)
|
|
359
|
+
reve code user -m help
|
|
360
|
+
|
|
361
|
+
# Generate Jest test setup files
|
|
362
|
+
reve code -m test
|
|
363
|
+
```
|
|
338
364
|
|
|
339
365
|
The `reve env sync` command automatically generates the following files in your project:
|
|
340
366
|
|
|
@@ -573,45 +599,60 @@ npm unpublish @skyreve/reve@<version>
|
|
|
573
599
|
|
|
574
600
|
```
|
|
575
601
|
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
|
-
└──
|
|
602
|
+
├── cmd/ # Command definitions
|
|
603
|
+
│ ├── root.go # Root command with logging and config
|
|
604
|
+
│ ├── start.go # Complete setup start command (5-step process)
|
|
605
|
+
│ ├── login.go # SkyReve platform login with email/password
|
|
606
|
+
│ ├── project.go # Project selection/creation
|
|
607
|
+
│ ├── env.go # Environment management command group
|
|
608
|
+
│ ├── github.go # GitHub related commands group
|
|
609
|
+
│ ├── compile.go # Schema validation for tables and APIs
|
|
610
|
+
│ ├── code.go # Code generation entry point
|
|
611
|
+
│ ├── env/ # Environment management sub-commands
|
|
612
|
+
│ │ ├── info.go # Project and environment information
|
|
613
|
+
│ │ ├── list.go # List all environments with branch info
|
|
614
|
+
│ │ ├── link.go # Link GitHub branch to environment
|
|
615
|
+
│ │ ├── sync.go # Sync files (settings, tables, APIs, libs)
|
|
616
|
+
│ │ ├── deploy.go # Deploy to environment
|
|
617
|
+
│ │ └── common.go # Common environment functions
|
|
618
|
+
│ ├── github/ # GitHub sub-commands
|
|
619
|
+
│ │ ├── login.go # GitHub Device Flow authentication
|
|
620
|
+
│ │ ├── install.go # GitHub App installation
|
|
621
|
+
│ │ └── common.go # Shared GitHub helpers
|
|
622
|
+
│ └── code/ # Code generation implementations
|
|
623
|
+
│ ├── admin.go # Admin REST API code generation
|
|
624
|
+
│ ├── helper.go # Helper file generation
|
|
625
|
+
│ ├── test_jest_gen.go # Jest test setup generation
|
|
626
|
+
│ ├── admins/ # Admin API templates (list, create, detail, update, delete)
|
|
627
|
+
│ ├── helpers/ # Helper templates (serializers, APIs, copy)
|
|
628
|
+
│ └── test_jest/ # Jest test templates (package.json, setup)
|
|
629
|
+
├── internal/ # Internal packages
|
|
630
|
+
│ ├── api/ # SkyReve REST API client (endpoints & data types)
|
|
631
|
+
│ ├── config/ # Configuration management (.reve directory)
|
|
632
|
+
│ ├── constants/ # Application constants (URLs, GitHub App IDs by env)
|
|
633
|
+
│ ├── gen/ # File generation (YAML for tables, APIs, settings, libs)
|
|
634
|
+
│ ├── git/ # Git repository operations
|
|
635
|
+
│ ├── github/ # GitHub API client (OAuth, user info)
|
|
636
|
+
│ ├── http/ # HTTP client utilities
|
|
637
|
+
│ ├── logger/ # Logging system (with log rotation)
|
|
638
|
+
│ ├── python/ # Python code parsing and modification
|
|
639
|
+
│ ├── util/ # General utilities (files, strings, validation)
|
|
640
|
+
│ └── cmd_common/ # Common command utilities
|
|
641
|
+
├── version/ # Version management
|
|
642
|
+
│ └── version.go # Version & git hash (injected at build time)
|
|
643
|
+
├── scripts/ # Node.js wrapper scripts
|
|
644
|
+
│ └── reve.js # Cross-platform binary launcher
|
|
645
|
+
├── bin/ # Built binaries (platform-specific)
|
|
646
|
+
├── docs/ # Documentation
|
|
647
|
+
│ └── TESTING.md # Testing guide (unit, integration, CI/CD)
|
|
648
|
+
├── testdata/ # Sample configurations for tests
|
|
649
|
+
├── tests/ # Integration test utilities
|
|
650
|
+
├── main.go # Application entry point
|
|
651
|
+
├── package.json # npm package configuration
|
|
652
|
+
├── go.mod # Go module definition (Go 1.24.0)
|
|
653
|
+
├── Makefile # Build and development commands
|
|
654
|
+
├── README.md # This file
|
|
655
|
+
└── README.npm.md # Condensed README for npm registry
|
|
615
656
|
```
|
|
616
657
|
|
|
617
658
|
### **8.1 Key Components**
|
|
@@ -646,7 +687,7 @@ reve-cli/
|
|
|
646
687
|
## **9. Requirements**
|
|
647
688
|
|
|
648
689
|
- **Node.js**: 14.0.0 or higher
|
|
649
|
-
- **Go**:
|
|
690
|
+
- **Go**: 1.24.0 or higher
|
|
650
691
|
- **Supported OS**: macOS, Linux, Windows
|
|
651
692
|
- **Supported Architectures**: x64, arm64
|
|
652
693
|
|
package/README.npm.md
CHANGED
|
@@ -40,16 +40,18 @@ The easiest way to get started with Reve is using the **Quick Start** command:
|
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
42
|
reve start
|
|
43
|
+
|
|
44
|
+
# Force all steps even if already configured
|
|
45
|
+
reve start --force
|
|
43
46
|
```
|
|
44
47
|
|
|
45
|
-
This command will guide you through a complete
|
|
48
|
+
This command will guide you through a complete 5-step setup process:
|
|
46
49
|
|
|
47
|
-
1. **🔐 Step 1/
|
|
48
|
-
2. **📁 Step 2/
|
|
49
|
-
3. **🐙 Step 3/
|
|
50
|
-
4. **🔧 Step 4/
|
|
51
|
-
5. **📦 Step 5/
|
|
52
|
-
6. **🚀 Step 6/6**: Start syncing Reve environment
|
|
50
|
+
1. **🔐 Step 1/5**: Login to SkyReve platform
|
|
51
|
+
2. **📁 Step 2/5**: Select/create a project
|
|
52
|
+
3. **🐙 Step 3/5**: Login to GitHub
|
|
53
|
+
4. **🔧 Step 4/5**: Install GitHub App
|
|
54
|
+
5. **📦 Step 5/5**: Link GitHub branch to Reve environment
|
|
53
55
|
|
|
54
56
|
After completion, you'll see: `🎉 All setup steps completed successfully!`
|
|
55
57
|
|
|
@@ -57,20 +59,22 @@ After completion, you'll see: `🎉 All setup steps completed successfully!`
|
|
|
57
59
|
|
|
58
60
|
### Main Commands
|
|
59
61
|
|
|
60
|
-
| Command | Description
|
|
61
|
-
| ------------------------ |
|
|
62
|
-
| `reve start` | **Quick Start**: Complete
|
|
63
|
-
| `reve
|
|
64
|
-
| `reve
|
|
65
|
-
| `reve
|
|
66
|
-
| `reve env
|
|
67
|
-
| `reve env
|
|
68
|
-
| `reve env
|
|
69
|
-
| `reve env
|
|
70
|
-
| `reve
|
|
71
|
-
| `reve
|
|
72
|
-
| `reve
|
|
73
|
-
| `reve
|
|
62
|
+
| Command | Description |
|
|
63
|
+
| ------------------------ | ----------------------------------------------------------------------- |
|
|
64
|
+
| `reve start` | **Quick Start**: Complete 5-step setup process |
|
|
65
|
+
| `reve start --force` | Force all 5 setup steps even if already configured |
|
|
66
|
+
| `reve login [email]` | Login to SkyReve platform |
|
|
67
|
+
| `reve project` | Select/create SkyReve project |
|
|
68
|
+
| `reve env` | Start interactive environment management |
|
|
69
|
+
| `reve env info` | Show project info, Git repository info, and GitHub App installation status |
|
|
70
|
+
| `reve env list` | List all Reve environments with linked GitHub branch information |
|
|
71
|
+
| `reve env link <env>` | Link GitHub branch to Reve environment |
|
|
72
|
+
| `reve env sync` | Sync current branch with Reve environment |
|
|
73
|
+
| `reve env deploy` | Deploy current branch to Reve environment |
|
|
74
|
+
| `reve github login` | Login to GitHub using Device Flow |
|
|
75
|
+
| `reve github install` | Install GitHub App for current repository |
|
|
76
|
+
| `reve compile` | Validate `src/tables` and `src/apis` configuration files |
|
|
77
|
+
| `reve code [table-name]` | Generate admin REST API code and helper files |
|
|
74
78
|
|
|
75
79
|
### Getting Help
|
|
76
80
|
|
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
|