@transloadit/analyze-step
Advanced tools
Comparing version 0.4.3 to 1.0.0
@@ -33,2 +33,3 @@ type Condition = [value: string, operator: string, value: string]; | ||
filter_complex?: string; | ||
map?: string[]; | ||
t?: string | number; | ||
@@ -47,3 +48,3 @@ ss?: string | number; | ||
type Step = FileFilterStep & StepWithDimensions & PresetStep & FormatStep & StepData; | ||
declare const _default: (step: Step, robots: Robots, extrameta?: ExtraMeta) => string; | ||
export = _default; | ||
export declare function analyzeStep(step: Step, robots: Robots, extrameta?: ExtraMeta): string; | ||
export {}; |
"use strict"; | ||
const formatDurationMs = require("@transloadit/format-duration-ms"); | ||
const prettierBytes = require("@transloadit/prettier-bytes"); | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.analyzeStep = analyzeStep; | ||
const format_duration_ms_1 = require("@transloadit/format-duration-ms"); | ||
const prettier_bytes_1 = require("@transloadit/prettier-bytes"); | ||
const inflect = require("inflection"); | ||
@@ -78,9 +80,9 @@ const JSONPath = require("jsonpath-plus"); | ||
if (humanKey === 'filesize') { | ||
humanVal = prettierBytes(Number.parseInt(humanVal, 10)); | ||
humanVal = (0, prettier_bytes_1.prettierBytes)(Number.parseInt(humanVal, 10)); | ||
} | ||
if (humanKey.match(/ bitrate$/) && humanVal) { | ||
humanVal = `${prettierBytes(Number.parseInt(humanVal, 10))}`.replace('B', 'bit/s'); | ||
humanVal = `${(0, prettier_bytes_1.prettierBytes)(Number.parseInt(humanVal, 10))}`.replace('B', 'bit/s'); | ||
} | ||
if (humanKey === 'duration') { | ||
humanVal = formatDurationMs(Number.parseInt(humanVal, 10) * 1000); | ||
humanVal = (0, format_duration_ms_1.formatDurationMs)(Number.parseInt(humanVal, 10) * 1000); | ||
} | ||
@@ -227,3 +229,3 @@ if (humanVal === | ||
} | ||
module.exports = function humanize(step, robots, extrameta = {}) { | ||
function analyzeStep(step, robots, extrameta = {}) { | ||
let str = ``; | ||
@@ -353,3 +355,3 @@ const robotName = step.robot; | ||
return str; | ||
}; | ||
} | ||
//# sourceMappingURL=analyzeStep.js.map |
{ | ||
"name": "@transloadit/analyze-step", | ||
"version": "0.4.3", | ||
"version": "1.0.0", | ||
"repository": { | ||
@@ -12,11 +12,15 @@ "type": "git", | ||
"types": "dist/analyzeStep.d.ts", | ||
"files": [ | ||
"dist", | ||
"src", | ||
"!*.test.*" | ||
], | ||
"scripts": { | ||
"build": "tsc --build --clean && tsc --build", | ||
"typecheck": "tsc --noEmit", | ||
"test": "tsx --test src/**/*.test.ts", | ||
"test:watch": "tsx --test --watch src/**/*.test.ts" | ||
"prepack": "tsc --build", | ||
"test": "tsc --build && node --test --enable-source-maps", | ||
"test:watch": "node --test --enable-source-maps --watch" | ||
}, | ||
"dependencies": { | ||
"@transloadit/format-duration-ms": "^0.4.3", | ||
"@transloadit/prettier-bytes": "^0.3.5", | ||
"@transloadit/format-duration-ms": "^1.0.0", | ||
"@transloadit/prettier-bytes": "^1.0.0", | ||
"inflection": "^3.0.0", | ||
@@ -23,0 +27,0 @@ "jsonpath-plus": "^10.1.0", |
@@ -1,3 +0,3 @@ | ||
import formatDurationMs = require('@transloadit/format-duration-ms') | ||
import prettierBytes = require('@transloadit/prettier-bytes') | ||
import { formatDurationMs } from '@transloadit/format-duration-ms' | ||
import { prettierBytes } from '@transloadit/prettier-bytes' | ||
import inflect = require('inflection') | ||
@@ -309,2 +309,3 @@ import JSONPath = require('jsonpath-plus') | ||
filter_complex?: string | ||
map?: string[] | ||
t?: string | number | ||
@@ -326,3 +327,3 @@ ss?: string | number | ||
export = function humanize(step: Step, robots: Robots, extrameta: ExtraMeta = {}): string { | ||
export function analyzeStep(step: Step, robots: Robots, extrameta: ExtraMeta = {}): string { | ||
let str = `` | ||
@@ -329,0 +330,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
78980
7
792
+ Added@transloadit/format-duration-ms@1.0.0(transitive)
+ Added@transloadit/prettier-bytes@1.0.0(transitive)
- Removed@transloadit/format-duration-ms@0.4.3(transitive)
- Removed@transloadit/prettier-bytes@0.3.5(transitive)