8.2.8 • Published 11 months ago

swiff-4 v8.2.8

Weekly downloads
-
License
-
Repository
-
Last release
11 months ago

Swiff 2024

Note: Currently in Development (Will merge to Swiff after approval)

Swiff streamlines common SSH tasks during website/app development, saving you valuable time.

Key Features

🚀 Folder Synchronization

Keep folders in sync between servers effortlessly.

💫 Database Management

Manage databases between servers with automatic backups.

🎩 Composer File Management

Transfer composer files between servers with automatic backups.

💻 Remote Terminal Connection

Launch an SSH session directly into the remote site/app folder.

💻 Logger

Access all logs with swiff.log.

Getting Started

  1. Install Swiff globally with npm:

    npm install --global swiff-4@latest
  2. Run Swiff:

    swiff-4

Additional Features

  • Custom SSH Identity: Swiff uses your identity located at /Users/[currentUser]/.ssh/id_rsa. Specify a custom SSH key path in your .env file with:

    SWIFF_CUSTOM_KEY="/Users/[your-user]/.ssh/[key-filename]"
  • Gzipped Backups: Automatically back up and gzip your files and databases whenever they change.

  • Disable Specific Tasks: Specify tasks to disable via a config setting.

  • Dotenv Setup: Required .env

# The environment currently running in ('dev', 'staging', 'production', etc.)
ENVIRONMENT="dev"

SECURITY_KEY=""

DB_USER="db"
DB_PASSWORD="db"
DB_DATABASE="db"
DB_PORT="3306"
DB_DRIVER="mysql"
DB_SERVER="localhost"
DB_TABLE_PREFIX="craft"

Also this can be prefixed in swiff.config.js

  env: {
    prefix: "CRAFT_",
  },
  • Folder Sync Enhancements: New features include see diff and validation sync with git.

  • Enhanced Logger: swiff.log includes max size settings to manage log file size:

    logging: {
      enabled: true,
      dir: '', // Default root: "./storage/logs/"
      maxSize: 10 * 1024 * 1024, // Recommended 10MB max log file size
    },
  • Multi-Environment Support: Must have defaultEnvironment in environments object.

    defaultEnvironment: "staging",
    environments: {
      staging: {
        user: "",   
        host: "",  
        appPath: "",
        port: 22,
      },
      production: {
        user: "",   
        host: "",  
        appPath: "",    
        port: 22,
      },
    },

Requirements

Swiff requires Node.js LTS version (16.0.0+).

Place the following in swiff.config.js at the root of your application:

export default {
  defaultEnvironment: "staging",
  logging: {
    enabled: true,
    // dir: '', // Default root: "./storage/logs/"
    maxSize: 10 * 1024 * 1024, // Recommended 10MB max log file size
  },
  environments: {
    staging: {
      user: "",   
      host: "",  
      appPath: "",
      port: 22,
    },
    production: {
      user: "",   
      host: "",  
      appPath: "",    
      port: 22,
    },
  },
  local: {
    ddev: true,
  },
  env: {
    prefix: null, // Example: "CRAFT_" for projects above version 4
  },
  pushFolders: [
    // { path: "config", exclude: "/project/*" },
    // 'templates',
    // 'public/dist'
  ],
  pullFolders: [
    // 'public/assets/volumes'
  ],
  disabled: ["databasePush"],
};

Swiff works with MySQL databases and supports ddev (requires local.ddev = true).

Technology

  • Node.js - JavaScript runtime built on Chrome's V8 engine
  • Ink 2 - React for interactive command-line apps
  • Babel - JavaScript transpiler
  • Rollup - JavaScript module bundler
  • Prettier - Code formatter
  • Pino - Logger

Credits

8.2.7

11 months ago

8.0.9

11 months ago

8.2.6

11 months ago

8.0.8

11 months ago

8.2.8

11 months ago

8.2.3

11 months ago

8.0.5

11 months ago

8.0.4

11 months ago

8.2.5

11 months ago

8.0.7

11 months ago

8.2.4

11 months ago

8.0.6

11 months ago

7.0.8

11 months ago

7.0.6

11 months ago

7.0.5

11 months ago

7.0.9

11 months ago

8.1.0

11 months ago

6.0.7

1 year ago

4.0.5

1 year ago

6.0.6

1 year ago

6.0.9

1 year ago

4.0.7

1 year ago

6.0.8

1 year ago

4.0.6

1 year ago

5.0.9

1 year ago

5.0.8

1 year ago

5.0.7

1 year ago

5.0.6

1 year ago

5.0.5

1 year ago

5.0.4

1 year ago

5.0.3

1 year ago

5.0.2

1 year ago

5.0.1

1 year ago

5.0.0

1 year ago

6.0.1

1 year ago

6.0.0

1 year ago

6.0.3

1 year ago

4.0.9

1 year ago

6.0.2

1 year ago

4.0.8

1 year ago

6.0.5

1 year ago

6.0.4

1 year ago

7.0.0

11 months ago

7.0.4

11 months ago

7.0.3

11 months ago

7.0.2

11 months ago

7.0.1

11 months ago

8.0.1

11 months ago

8.0.0

11 months ago

8.2.1

11 months ago

8.0.3

11 months ago

8.2.0

11 months ago

8.0.2

11 months ago

4.0.4

1 year ago

4.0.0

1 year ago

4.0.3

1 year ago

4.0.2

1 year ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.5

1 year ago

2.0.7

1 year ago

2.0.6

1 year ago

2.0.8

1 year ago

3.0.9

1 year ago

3.0.4

1 year ago

3.0.3

1 year ago

3.0.2

1 year ago

3.0.1

1 year ago

3.0.8

1 year ago

3.0.7

1 year ago

3.0.5

1 year ago

3.0.0

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago