New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@naria2/node

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@naria2/node - npm Package Compare versions

Comparing version 0.0.22 to 0.0.23

client/assets/index-21cccc5a.js

2

dist/index.d.ts

@@ -5,3 +5,3 @@ import * as execa from 'execa';

import { SpawnOptionsWithoutStdio, ChildProcessWithoutNullStreams, SpawnOptionsWithStdioTuple, StdioPipe, ChildProcessByStdio, StdioNull, SpawnOptions, ChildProcess } from 'node:child_process';
export { C as ChildProcessOptions, a as ChildProcessSocket, R as ResolvedChildProcessOptions, c as createChildProcess } from './shared/node.1b460090.js';
export { C as ChildProcessOptions, a as ChildProcessSocket, R as ResolvedChildProcessOptions, c as createChildProcess } from './shared/node.87401953.js';
import 'maria2/conn-46b064ba';

@@ -8,0 +8,0 @@ import 'type-fest';

import * as http from 'http';
import { IncomingMessage, ServerResponse } from 'node:http';
import { a as ChildProcessSocket } from './shared/node.1b460090.js';
import { a as ChildProcessSocket } from './shared/node.87401953.js';
import 'maria2/conn-46b064ba';

@@ -5,0 +5,0 @@ import 'type-fest';

{
"name": "@naria2/node",
"version": "0.0.22",
"version": "0.0.23",
"description": "Cross-platform wrapper of aria2",

@@ -64,3 +64,3 @@ "keywords": [

"ws": "^8.14.2",
"@naria2/options": "0.0.22"
"@naria2/options": "0.0.23"
},

@@ -74,8 +74,8 @@ "devDependencies": {

"optionalDependencies": {
"@naria2/linux-arm64": "0.1.0-beta.0",
"@naria2/darwin-arm64": "0.1.0-beta.0",
"@naria2/darwin-x64": "0.1.0-beta.0",
"@naria2/win32-ia32": "0.1.0-beta.0",
"@naria2/win32-x64": "0.1.0-beta.0",
"@naria2/win32-ia32": "0.1.0-beta.0",
"@naria2/darwin-x64": "0.1.0-beta.0",
"@naria2/linux-x64": "0.1.0-beta.0"
"@naria2/linux-x64": "0.1.0-beta.0",
"@naria2/linux-arm64": "0.1.0-beta.0"
},

@@ -82,0 +82,0 @@ "engines": {

@@ -6,4 +6,7 @@ # @naria2/node

Cross-platform wrapper of aria2
Cross-platform wrapper of aria2.
+ Download aria2 according to your platform
+ Web UI for aria2c (more features is working in progress)
## Installation

@@ -29,5 +32,30 @@

// Create a aria2 child process and initialize a client
const client = await createClient(createChildProcess())
// Start downloading a magnet
const torrent = await client.downloadUri('...')
// Watch metadata progress
await torrent.watch((torrent) => {
console.log(`Downloading [MEATADATA]`)
})
// Watch torrent progress
await torrent.watchFollowedBy((torrent) => {
console.log(`Downloading ${torrent.name}`)
})
// Shutdown client
await client.shutdown()
```
Due to the implementation of [aria2](https://aria2.github.io/manual/en/html/index.html), the downloading progress of a magnet uri includes **two steps**:
1. Download the torrent metadata which contains only a special file named `[METADATA]`;
2. Download the torrent content itself.
So that, in the above code, you should first wait for downloading metadata, and then wait for downloading the followed by task which is the torrent content itself.
You can find an example using Node.js [here](https://github.com/yjl9903/naria2/blob/main/scripts/download.mjs).
> **Warning**

@@ -34,0 +62,0 @@ >

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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