New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details → →
Socket
Book a DemoSign in
Socket

vite-plugin-node-ssh

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-node-ssh

vite plugin power by node-ssh

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

vite-plugin-node-ssh Power by node-ssh

This vite plugin can help you use node-ssh to connect your machine after build. You can upload dist and deploy by ssh, and so on.

Install

npm i vite-plugin-node-ssh -D
# or
pnpm i vite-plugin-node-ssh -D

Usage

// vite.config.ts

import { defineConfig } from "vite";
import { vitePluginNodeSsh, NodeSSh } from "vite-plugin-node-ssh";

export default defineConfig({
  plugins: [
    vitePluginNodeSsh({
      config: {
        host: "localhost",
        username: "steel",
        port: 8089,
        password: 1,
      },
      callback: async (ssh: NodeSSH) => {
        // Command
        await ssh
          .execCommand("hh_client --json", { cwd: "/var/www" })
          .then(function (result) {
            console.log("STDOUT: " + result.stdout);
            console.log("STDERR: " + result.stderr);
          });
        // Command with escaped params
        await ssh
          .exec("hh_client", ["--json"], {
            cwd: "/var/www",
            stream: "stdout",
            options: { pty: true },
          })
          .then(function (result) {
            console.log("STDOUT: " + result);
          });
      },
    }),
  ],
});

For more api about ssh, please check node-ssh

Keywords

vite

FAQs

Package last updated on 10 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts