@skyreve/reve 1.0.3 → 1.0.5

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Reve - SkyReve Platform Command Line Tool
2
2
 
3
- Reve is a command line tool that connects the SkyReve platform with GitHub repositories to manage projects and environments seamlessly.
3
+ Reve is a comprehensive command line tool that connects the SkyReve platform with GitHub repositories to manage projects, environments, and deployments seamlessly. It provides a complete workflow for syncing local development with cloud environments.
4
4
 
5
5
  ## 📋 Table of Contents
6
6
 
@@ -11,6 +11,7 @@ Reve is a command line tool that connects the SkyReve platform with GitHub repos
11
11
  5. [Using Reve CLI](#5-using-reve-cli)
12
12
  6. [Development Tools](#6-development-tools)
13
13
  7. [Publishing to npm](#7-publishing-to-npm)
14
+ 8. [Project Structure](#8-project-structure)
14
15
 
15
16
  ---
16
17
 
@@ -302,6 +303,30 @@ reve env deploy
302
303
  reve env deploy --force
303
304
  ```
304
305
 
306
+ ### **5.6 Advanced Features**
307
+
308
+ #### **🔹 File Generation**
309
+
310
+ The `reve env sync` command automatically generates the following files in your project:
311
+
312
+ - **Settings**: `src/settings.yaml` - Project configuration
313
+ - **Tables**: `src/tables/*.yaml` - Database table definitions
314
+ - **APIs**: `src/apis/*.yaml` + `src/apis/*.apy` - API endpoint definitions and view code
315
+ - **Libraries**: `src/libs/*.apy` - Code library implementations
316
+
317
+ #### **🔹 Environment Management**
318
+
319
+ - **Multiple Environments**: Support for dev, staging, production environments
320
+ - **Branch Linking**: Link specific Git branches to Reve environments
321
+ - **Auto Deploy**: Configure automatic deployment on Git push
322
+ - **Conflict Resolution**: Handle deployment conflicts with force option
323
+
324
+ #### **🔹 GitHub Integration**
325
+
326
+ - **Device Flow Authentication**: Secure GitHub login without storing passwords
327
+ - **GitHub App Installation**: Automated GitHub App setup for repositories
328
+ - **Repository Linking**: Connect GitHub repositories to SkyReve projects
329
+
305
330
  ---
306
331
 
307
332
  ## **6. Development Tools**
@@ -394,6 +419,7 @@ npm version major
394
419
  ```
395
420
 
396
421
  3. **Publish to npm**:
422
+
397
423
  ```bash
398
424
  npm publish
399
425
  ```
@@ -488,39 +514,73 @@ npm unpublish @skyreve/reve@version
488
514
  ```
489
515
  reve-cli/
490
516
  ├── cmd/ # Command definitions
491
- │ ├── root.go # Root command
492
- │ ├── start.go # Complete setup start command
493
- │ ├── login.go # Login command
494
- │ ├── project.go # Project selection command
495
- │ ├── env.go # Environment management command
496
- │ ├── github.go # GitHub related commands
517
+ │ ├── root.go # Root command with logging and config
518
+ │ ├── start.go # Complete setup start command (6-step process)
519
+ │ ├── login.go # SkyReve platform login with email/password
520
+ │ ├── project.go # Project selection/creation
521
+ │ ├── env.go # Environment management command group
522
+ │ ├── github.go # GitHub related commands group
497
523
  │ ├── env/ # Environment management sub-commands
498
- │ │ ├── start.go # Environment management start
499
- │ │ ├── info.go # Project info check
500
- │ │ ├── list.go # Environment list
501
- │ │ ├── link.go # Branch linking
502
- │ │ ├── sync.go # Synchronization
503
- │ │ ├── deploy.go # Deployment
504
- │ │ └── common.go # Common functions
524
+ │ │ ├── start.go # Interactive environment management
525
+ │ │ ├── info.go # Project and environment information
526
+ │ │ ├── list.go # List all environments with branch info
527
+ │ │ ├── link.go # Link GitHub branch to environment
528
+ │ │ ├── sync.go # Sync files (settings, tables, APIs, libs)
529
+ │ │ ├── deploy.go # Deploy to environment
530
+ │ │ └── common.go # Common environment functions
505
531
  │ └── github/ # GitHub sub-commands
506
- │ ├── login.go # GitHub login
532
+ │ ├── login.go # GitHub Device Flow authentication
507
533
  │ └── install.go # GitHub App installation
508
534
  ├── internal/ # Internal packages
509
- │ ├── config/ # Configuration management
510
- │ ├── constants/ # Constant definitions
511
- │ ├── git/ # Git related functionality
512
- │ ├── github/ # GitHub API
513
- │ ├── logger/ # Logging
514
- └── reve/ # Reve API and utilities
535
+ │ ├── api/ # SkyReve API client and data structures
536
+ │ ├── config/ # Configuration management (.reve directory)
537
+ │ ├── constants/ # Application constants
538
+ │ ├── gen/ # File generation (YAML files for tables, APIs, etc.)
539
+ │ ├── git/ # Git repository operations
540
+ ├── github/ # GitHub API client
541
+ │ ├── http/ # HTTP client utilities
542
+ │ ├── logger/ # Logging system
543
+ │ ├── reve/ # SkyReve platform utilities
544
+ │ └── cmd_common/ # Common command utilities
515
545
  ├── scripts/ # Node.js wrapper scripts
516
- │ └── reve.js # Main wrapper script
517
- ├── bin/ # Built binaries
518
- ├── main.go # Main entry point
546
+ │ └── reve.js # Cross-platform binary launcher
547
+ ├── bin/ # Built binaries (platform-specific)
548
+ ├── samples/ # Example files and configurations
549
+ ├── tests/ # Test files
550
+ ├── main.go # Application entry point
519
551
  ├── package.json # npm package configuration
520
552
  ├── go.mod # Go module definition
553
+ ├── Makefile # Build and development commands
521
554
  └── README.md # This file
522
555
  ```
523
556
 
557
+ ### **8.1 Key Components**
558
+
559
+ #### **🔹 Command Structure**
560
+
561
+ - **Cobra Framework**: Modern CLI framework with subcommands and flags
562
+ - **Persistent Flags**: Global logging and configuration options
563
+ - **Command Groups**: Organized commands (`env`, `github`)
564
+
565
+ #### **🔹 Configuration Management**
566
+
567
+ - **`.reve` Directory**: Local configuration storage
568
+ - **Multi-Environment**: Support for dev/staging/production configs
569
+ - **Secure Storage**: Encrypted token storage
570
+
571
+ #### **🔹 File Generation System**
572
+
573
+ - **YAML Configuration**: Human-readable configuration files for settings, tables, and API definitions
574
+ - **APY Implementation**: Actual implementation code files for APIs and libraries
575
+ - **Modular Structure**: Separate files for tables, APIs, libraries
576
+ - **Template System**: Consistent file generation across environments
577
+
578
+ #### **🔹 GitHub Integration**
579
+
580
+ - **Device Flow**: Secure OAuth without password storage
581
+ - **App Installation**: Automated GitHub App setup
582
+ - **Repository Linking**: Connect repos to SkyReve projects
583
+
524
584
  ---
525
585
 
526
586
  ## **9. Requirements**
package/bin/darwin/reve CHANGED
Binary file
package/bin/linux/reve CHANGED
Binary file
package/bin/reve CHANGED
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyreve/reve",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Reve - A command line tool for Reve platform",
5
5
  "main": "index.js",
6
6
  "scripts": {