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

ffaivideo

Package Overview
Dependencies
Maintainers
0
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ffaivideo - npm Package Compare versions

Comparing version 1.5.1 to 1.5.2

2

dist/material.js

@@ -118,3 +118,3 @@ "use strict";

else {
savedVideoPath = item.url;
savedVideoPath = await (0, file_1.copyLocalFile)(item.url, cacheDir);
}

@@ -121,0 +121,0 @@ progress(40 + Math.floor((index * 45) / validVideoItems.length));

import { Stream } from 'stream';
declare const isFilePath: (url: string) => boolean;
declare const writeFileWithStream: (stream: Stream, videoPath: string) => Promise<unknown>;
export { writeFileWithStream, isFilePath };
declare const copyLocalFile: (targetPath: string, cacheDir: string) => Promise<string | null>;
export { writeFileWithStream, copyLocalFile, isFilePath };

@@ -6,5 +6,6 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.isFilePath = exports.writeFileWithStream = void 0;
exports.isFilePath = exports.copyLocalFile = exports.writeFileWithStream = void 0;
const path_1 = __importDefault(require("path"));
const fs_extra_1 = __importDefault(require("fs-extra"));
const md5_1 = __importDefault(require("md5"));
const log_1 = require("../utils/log");

@@ -29,2 +30,15 @@ const isFilePath = (url) => {

exports.writeFileWithStream = writeFileWithStream;
const copyLocalFile = async (targetPath, cacheDir) => {
try {
await fs_extra_1.default.ensureDir(cacheDir);
const videoId = `vid-${(0, md5_1.default)(Math.random().toString())}`;
const videoPath = path_1.default.join(cacheDir, `${videoId}.mp4`);
await fs_extra_1.default.copy(targetPath, videoPath);
return videoPath;
}
catch (err) {
return null;
}
};
exports.copyLocalFile = copyLocalFile;
//# sourceMappingURL=file.js.map
{
"name": "ffaivideo",
"version": "1.5.1",
"version": "1.5.2",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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