mediasnacks 0.12.1 → 0.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mediasnacks",
3
- "version": "0.12.1",
3
+ "version": "0.12.2",
4
4
  "description": "Utilities for preparing videos, images, and audio for the web",
5
5
  "license": "MIT",
6
6
  "author": "Eric Fortis",
@@ -1,7 +1,7 @@
1
+ import { lstatSync } from 'node:fs'
1
2
  import { randomUUID } from 'node:crypto'
2
3
  import { unlink, rename } from 'node:fs/promises'
3
4
  import { dirname, extname, join } from 'node:path'
4
- import { lstatSync } from 'node:fs'
5
5
 
6
6
 
7
7
  export const lstat = f => lstatSync(f, { throwIfNoEntry: false })
@@ -17,8 +17,8 @@ export async function parseOptions(options = {}, config = {}) {
17
17
  }
18
18
  }
19
19
 
20
- async function resolveGlobs(arr, tokens) {
21
- const terminatorIndex = findTerminatorIndex(tokens)
20
+ async function resolveGlobs(arr, tokens = []) {
21
+ const terminatorIndex = tokens.find(t => t.kind === 'option-terminator')?.index ?? -1
22
22
  const set = new Set()
23
23
 
24
24
  const globable = terminatorIndex === -1
@@ -37,6 +37,3 @@ async function resolveGlobs(arr, tokens) {
37
37
  return Array.from(set)
38
38
  }
39
39
 
40
- function findTerminatorIndex(tokens) {
41
- return (tokens || []).find(t => t.kind === 'option-terminator')?.index ?? -1
42
- }
package/src/vconcat.sh CHANGED
@@ -11,7 +11,7 @@ fi
11
11
 
12
12
  list_file=$(mktemp -p .)
13
13
  for file in "$@"; do
14
- echo "file '$file'" >> "$list_file"
14
+ printf "file %q\n" "$file" >> "$list_file"
15
15
  done
16
16
 
17
17
  first_video="$1"