@drippy-music/commons
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -1,5 +0,1 @@ | ||
import { Writable } from "stream"; | ||
import { ChildProcess } from "child_process"; | ||
import { MessagePort } from "worker_threads"; | ||
import Match from "./model/match"; | ||
@@ -10,13 +6,2 @@ | ||
/** | ||
* Creates a new ChildProcess for ffmpeg | ||
*/ | ||
ffmpeg: ChildProcess; | ||
/** | ||
* Creates a new Writable stream to be used with 'worker_threads' | ||
* @param port The worker's parent port | ||
*/ | ||
createWorkerStream(port: MessagePort): Writable; | ||
/** | ||
* Validate an object and its properties | ||
@@ -23,0 +8,0 @@ * @param params The object to be validated |
15
index.js
@@ -1,5 +0,1 @@ | ||
const { Writable } = require('stream'); | ||
const { spawn } = require('child_process'); | ||
const ffmpeg_static = require('ffmpeg-static'); | ||
const fuzz = require('fuzzball'); | ||
@@ -10,3 +6,2 @@ const Fuse = require('fuse.js'); | ||
const args = ['-f', 'mp3', '-i', 'pipe:0', '-acodec', 'libopus', '-f', 'webm', 'pipe:1']; | ||
const _mergeScores = (matches = [[]]) => { | ||
@@ -27,12 +22,2 @@ const merged = []; | ||
get ffmpeg() { | ||
return spawn(ffmpeg_static, args); | ||
} | ||
createWorkerStream(port) { | ||
const worker_stream = new Writable(); | ||
worker_stream.write = (data) => port.postMessage(data.buffer); | ||
return worker_stream; | ||
} | ||
validate(params = {}, required = []) { | ||
@@ -39,0 +24,0 @@ const fields = []; |
{ | ||
"name": "@drippy-music/commons", | ||
"version": "1.0.0", | ||
"description": "Drippy's common Node.JS utilities", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/Drippy-Music/drippy-commons.git" | ||
}, | ||
"author": "Vitor Mac", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/Drippy-Music/drippy-commons/issues" | ||
}, | ||
"homepage": "https://github.com/Drippy-Music/drippy-commons#readme", | ||
"dependencies": { | ||
"ffmpeg-static": "^4.1.0", | ||
"fuse.js": "^5.1.0", | ||
"fuzzball": "^1.3.0" | ||
} | ||
} | ||
"name": "@drippy-music/commons", | ||
"version": "1.0.1", | ||
"description": "Drippy's common Node.JS utilities", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/Drippy-Music/drippy-commons.git" | ||
}, | ||
"author": "Vitor Mac", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/Drippy-Music/drippy-commons/issues" | ||
}, | ||
"homepage": "https://github.com/Drippy-Music/drippy-commons#readme", | ||
"dependencies": { | ||
"fuse.js": "^5.1.0", | ||
"fuzzball": "^1.3.0" | ||
} | ||
} |
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
2
0
5668
97
- Removedffmpeg-static@^4.1.0
- Removed@derhuerst/http-basic@8.2.4(transitive)
- Removed@types/node@10.17.60(transitive)
- Removedagent-base@6.0.2(transitive)
- Removedbuffer-from@1.1.2(transitive)
- Removedcaseless@0.12.0(transitive)
- Removedconcat-stream@2.0.0(transitive)
- Removeddebug@4.4.0(transitive)
- Removedenv-paths@2.2.1(transitive)
- Removedffmpeg-static@4.4.1(transitive)
- Removedhttp-response-object@3.0.2(transitive)
- Removedhttps-proxy-agent@5.0.1(transitive)
- Removedinherits@2.0.4(transitive)
- Removedms@2.1.3(transitive)
- Removedparse-cache-control@1.0.1(transitive)
- Removedprogress@2.0.3(transitive)
- Removedreadable-stream@3.6.2(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedstring_decoder@1.3.0(transitive)
- Removedtypedarray@0.0.6(transitive)
- Removedutil-deprecate@1.0.2(transitive)