0.1.2 • Published 9 months ago
vite-plugin-naria2 v0.1.2
vite-plugin-naria2
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
0.1.0
10 months ago
0.1.2
9 months ago
0.1.1
9 months ago
0.0.26
10 months ago
0.0.25
1 year ago
0.0.20
2 years ago
0.0.21
2 years ago
0.0.22
2 years ago
0.0.11
2 years ago
0.0.23
2 years ago
0.0.12
2 years ago
0.0.24
2 years ago
0.0.13
2 years ago
0.0.14
2 years ago
0.0.15
2 years ago
0.0.16
2 years ago
0.0.17
2 years ago
0.0.18
2 years ago
0.0.19
2 years ago
0.0.10
2 years ago
0.0.9
2 years ago
0.0.9-beta.4
2 years ago
0.0.9-beta.3
2 years ago