Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vite-plugin-naria2

Package Overview
Dependencies
Maintainers
0
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-naria2

Vite naria2 integration

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by25%
Maintainers
0
Weekly downloads
 
Created
Source

vite-plugin-naria2

version CI

Make it easy to debug a aria2 client application.

Installation

npm i naria2 @naria2/node vite-plugin-naria2

Usage

// vite.config.ts

import { defineConfig } from 'vite';

import Naria2 from 'vite-plugin-naria2';
import TopLevelAwait from 'vite-plugin-top-level-await';

export default defineConfig({
  plugins: [
    TopLevelAwait(), // Used for transforming the top-level await syntax
    Naria2({
      childProcess: {
        log: './aria2.log',     // Used for debug
        environment: 'ignore',  // Ignore proxy environment variables
        rpc: {
          secret: '123456'      // Use the fixed secret, or generate under the hood
        }
      }
    })
  ]
});

Use the aria2 child process in your application code.

// main.ts

import { socket, client } from '~naria2/jsonrpc';

console.log('naria2 socket:', socket);
console.log('naria2 client:', client);

Warning

The aria2 child process only created in your development so that these exported variables will be undefined in production.

License

MIT License © 2023 XLor

Keywords

FAQs

Package last updated on 06 Oct 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc