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

@transloadit/analyze-step

Package Overview
Dependencies
Maintainers
6
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@transloadit/analyze-step - npm Package Compare versions

Comparing version 0.1.3 to 0.2.0

32

dist/analyzeStep.js

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

}
if (countedArray.length === 1) {
if (countedArray.length === 1 && typeof countedArray[0] === 'string') {
return countedArray[0];

@@ -84,3 +84,3 @@ }

if (typeof step[type] === 'string') {
collection[type].push(`Filter by code evaluation`);
collection[type]?.push(`Filter by code evaluation`);
}

@@ -146,3 +146,3 @@ else if (step[type] && Array.isArray(step[type])) {

}
collection[type].push(humanDescr);
collection[type]?.push(humanDescr);
lastTemplate = template;

@@ -192,9 +192,9 @@ }

}
else if ('width' in step) {
else if (step.width) {
str += ` to ${step.width} pixels wide`;
}
else if ('height' in step) {
else if (step.height) {
str += ` to ${step.height} pixels high`;
}
else if ('crop' in step) {
else if (step.crop) {
str += ` to ${step.crop.x2 - step.crop.x1}×${step.crop.y2 - step.crop.y1} starting at ${step.crop.x1}×${step.crop.y1} from the top left`;

@@ -205,2 +205,4 @@ }

function humanPreset(step, extrameta = {}) {
if (!step.preset)
return '';
let str = inflect.humanize(step.preset.replace(/[-_]/g, ' '));

@@ -242,2 +244,4 @@ if (str.match(/^ipad/i)) {

function humanFormat(step) {
if (!step.format)
return '';
let str = inflect.humanize(step.format.replace(/[-_]/g, ' '));

@@ -255,4 +259,4 @@ if (str.match(/^webp/i)) {

const robot = robots[step.robot];
str = robot.purpose_words;
if (robot.rname === '/video/encode') {
str = robot?.purpose_words ?? '';
if (robot?.rname === '/video/encode') {
if (JSON.stringify(step).match(/watermark/)) {

@@ -305,3 +309,3 @@ str = `Watermark videos`;

}
if (robot.rname === '/audio/encode') {
if (robot?.rname === '/audio/encode') {
if ((0, lodash_1.has)(step, 'ffmpeg.ss') && (0, lodash_1.has)(step, 'ffmpeg.t')) {

@@ -328,3 +332,3 @@ str = `Take a ${(0, lodash_1.get)(step, 'ffmpeg.t')}s clip out of audio at a specified offset`;

}
if (robot.rname === '/video/adaptive') {
if (robot?.rname === '/video/adaptive') {
if (step.technique === 'hls') {

@@ -337,3 +341,3 @@ str = `Convert videos to HLS`;

}
if (robot.rname === '/video/merge') {
if (robot?.rname === '/video/merge') {
const types = (0, jsonpath_plus_1.JSONPath)({ path: '$..as', json: step });

@@ -347,6 +351,6 @@ if (types.length) {

}
if (robot.rname === '/file/filter') {
if (robot?.rname === '/file/filter') {
str = humanFilter(step);
}
if (robot.rname === '/audio/artwork') {
if (robot?.rname === '/audio/artwork') {
if ((0, lodash_1.get)(step, 'method') === 'insert') {

@@ -359,3 +363,3 @@ str = `Insert audio artwork`;

}
if (robot.rname === '/image/resize') {
if (robot?.rname === '/image/resize') {
if ('watermark_url' in step) {

@@ -362,0 +366,0 @@ str = `Watermark images`;

@@ -13,3 +13,3 @@ {

"main": "dist/analyzeStep.js",
"typings": "dist/analyzeStep.d.ts",
"types": "dist/analyzeStep.d.ts",
"files": [

@@ -27,4 +27,4 @@ "dist"

"dependencies": {
"@transloadit/format-duration-ms": "^0.1.3",
"@transloadit/prettier-bytes": "^0.1.3",
"@transloadit/format-duration-ms": "^0.2.0",
"@transloadit/prettier-bytes": "^0.2.0",
"inflection": "^3.0.0",

@@ -34,8 +34,8 @@ "jsonpath-plus": "^7.2.0",

},
"version": "0.1.3",
"gitHead": "b9159b6f037336d9325656c35b9b15023d5c1ce7",
"version": "0.2.0",
"gitHead": "3fbbb8c4c18eeb9b9de5e3a5c022d46a7cc40800",
"devDependencies": {
"@types/jsonpath": "^0.2.0",
"@types/lodash": "^4"
"@types/jsonpath": "^0.2.4",
"@types/lodash": "^4.14.202"
}
}

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