Comparing version 0.3.0 to 0.3.1
@@ -21,3 +21,3 @@ "use strict"; | ||
return new Promise((resolve, reject) => { | ||
fs.createReadStream(path.resolve(__dirname, filePath)).pipe(request | ||
fs.createReadStream(path.resolve(process.cwd(), filePath)).pipe(request | ||
.put(url) | ||
@@ -57,3 +57,3 @@ .on('response', resolve) | ||
const files = this.getFilePaths(path.resolve(__dirname, args.path)).filter(file => file.match(regex)); | ||
let prompt; | ||
let prompt = { files }; | ||
if (files.length === 0) { | ||
@@ -90,2 +90,4 @@ return this.log(`We were unable to find any files. You might want to double check your path or make sure your filter isn't too strict`); | ||
})); | ||
// I hate this `any` here, but I'm running into a weird issue casting | ||
// the `tasks` above to an array of `ListrTasks[]`. | ||
const finalCtx = await new Listr(tasks, { | ||
@@ -117,3 +119,3 @@ concurrent: flags.concurrent, | ||
name: 'path', | ||
description: "local path for the file you'd like to create this asset from", | ||
description: "local path for the file (or folder) you'd like to upload", | ||
required: true, | ||
@@ -120,0 +122,0 @@ }, |
@@ -1,1 +0,1 @@ | ||
{"version":"0.3.0","commands":{"init":{"id":"init","description":"set up a user-level config","pluginName":"@mux/cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"envFile","description":"path to a Mux access token .env file","required":false}]},"sign":{"id":"sign","description":"Creates a new signed URL token for a playback ID","pluginName":"@mux/cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"playback-id","description":"Playback ID to create a signed URL token for.","required":true}]},"assets:create":{"id":"assets:create","description":"Create a new asset in Mux using a file that's already available online","pluginName":"@mux/cli","pluginType":"core","aliases":[],"flags":{"private":{"name":"private","type":"boolean","char":"p","description":"add a private playback policy to the created asset","allowNo":false}},"args":[{"name":"input","description":"input URL for the file you'd like to create this asset from","required":true}]},"assets:upload":{"id":"assets:upload","description":"Create a new asset in Mux via a local file","pluginName":"@mux/cli","pluginType":"core","aliases":[],"flags":{"private":{"name":"private","type":"boolean","char":"p","description":"add a private playback policy to the created asset","allowNo":false},"filter":{"name":"filter","type":"option","char":"f","description":"regex that filters the selected destination if the provided path is a folder"},"concurrent":{"name":"concurrent","type":"option","char":"c","description":"max number of files to upload at once","default":3}},"args":[{"name":"path","description":"local path for the file you'd like to create this asset from","required":true}]}}} | ||
{"version":"0.3.1","commands":{"init":{"id":"init","description":"set up a user-level config","pluginName":"@mux/cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"envFile","description":"path to a Mux access token .env file","required":false}]},"sign":{"id":"sign","description":"Creates a new signed URL token for a playback ID","pluginName":"@mux/cli","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"playback-id","description":"Playback ID to create a signed URL token for.","required":true}]},"assets:create":{"id":"assets:create","description":"Create a new asset in Mux using a file that's already available online","pluginName":"@mux/cli","pluginType":"core","aliases":[],"flags":{"private":{"name":"private","type":"boolean","char":"p","description":"add a private playback policy to the created asset","allowNo":false}},"args":[{"name":"input","description":"input URL for the file you'd like to create this asset from","required":true}]},"assets:upload":{"id":"assets:upload","description":"Create a new asset in Mux via a local file","pluginName":"@mux/cli","pluginType":"core","aliases":[],"flags":{"private":{"name":"private","type":"boolean","char":"p","description":"add a private playback policy to the created asset","allowNo":false},"filter":{"name":"filter","type":"option","char":"f","description":"regex that filters the selected destination if the provided path is a folder"},"concurrent":{"name":"concurrent","type":"option","char":"c","description":"max number of files to upload at once","default":3}},"args":[{"name":"path","description":"local path for the file (or folder) you'd like to upload","required":true}]}}} |
{ | ||
"name": "@mux/cli", | ||
"description": "Your friendly neighborhood Mux CLI tool!", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"author": "Matthew McClure @mmcc", | ||
@@ -6,0 +6,0 @@ "bin": { |
@@ -1,3 +0,2 @@ | ||
mux-cli | ||
======= | ||
# mux-cli | ||
@@ -7,11 +6,14 @@ Your friendly neighborhood Mux CLI tool | ||
[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io) | ||
[![Version](https://img.shields.io/npm/v/mux-cli.svg)](https://npmjs.org/package/mux-cli) | ||
[![Downloads/week](https://img.shields.io/npm/dw/mux-cli.svg)](https://npmjs.org/package/mux-cli) | ||
[![License](https://img.shields.io/npm/l/mux-cli.svg)](https://github.com/muxinc/cli/blob/master/package.json) | ||
[![Version](https://img.shields.io/npm/v/@mux/cli.svg)](https://npmjs.org/package/@mux/cli) | ||
[![Downloads/week](https://img.shields.io/npm/dw/@mux/cli.svg)](https://npmjs.org/package/@mux/cli) | ||
[![License](https://img.shields.io/npm/l/@mux/cli.svg)](https://github.com/muxinc/cli/blob/master/package.json) | ||
<!-- toc --> | ||
* [mux-cli](#mux-cli) | ||
* [Usage](#usage) | ||
* [Commands](#commands) | ||
<!-- tocstop --> | ||
# Usage | ||
<!-- usage --> | ||
@@ -23,3 +25,3 @@ ```sh-session | ||
$ mux (-v|--version|version) | ||
@mux/cli/0.3.0 darwin-x64 node-v10.14.2 | ||
@mux/cli/0.3.1 darwin-x64 node-v8.15.1 | ||
$ mux --help [COMMAND] | ||
@@ -31,3 +33,5 @@ USAGE | ||
<!-- usagestop --> | ||
# Commands | ||
<!-- commands --> | ||
@@ -55,3 +59,3 @@ * [`mux assets:create INPUT`](#mux-assetscreate-input) | ||
_See code: [src/commands/assets/create.ts](https://github.com/muxinc/cli/blob/v0.3.0/src/commands/assets/create.ts)_ | ||
_See code: [src/commands/assets/create.ts](https://github.com/muxinc/cli/blob/v0.3.1/src/commands/assets/create.ts)_ | ||
@@ -67,3 +71,3 @@ ## `mux assets:upload PATH` | ||
ARGUMENTS | ||
PATH local path for the file you'd like to create this asset from | ||
PATH local path for the file (or folder) you'd like to upload | ||
@@ -76,3 +80,3 @@ OPTIONS | ||
_See code: [src/commands/assets/upload.ts](https://github.com/muxinc/cli/blob/v0.3.0/src/commands/assets/upload.ts)_ | ||
_See code: [src/commands/assets/upload.ts](https://github.com/muxinc/cli/blob/v0.3.1/src/commands/assets/upload.ts)_ | ||
@@ -108,3 +112,3 @@ ## `mux help [COMMAND]` | ||
_See code: [src/commands/init.ts](https://github.com/muxinc/cli/blob/v0.3.0/src/commands/init.ts)_ | ||
_See code: [src/commands/init.ts](https://github.com/muxinc/cli/blob/v0.3.1/src/commands/init.ts)_ | ||
@@ -123,3 +127,3 @@ ## `mux sign PLAYBACK-ID` | ||
_See code: [src/commands/sign.ts](https://github.com/muxinc/cli/blob/v0.3.0/src/commands/sign.ts)_ | ||
_See code: [src/commands/sign.ts](https://github.com/muxinc/cli/blob/v0.3.1/src/commands/sign.ts)_ | ||
<!-- commandsstop --> |
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
23554
462
122