Comparing version 0.4.1 to 0.4.2
@@ -57,7 +57,8 @@ "use strict"; | ||
prompts = [...prompts, signingKeyPrompt]; | ||
let { createSigningKey, promptTokenId, promptTokenSecret } = await inquirer.prompt(prompts); | ||
const answers = await inquirer.prompt(prompts); | ||
let { createSigningKey, tokenId, tokenSecret } = answers; | ||
// If the token was loaded from an env file they'll already be set in the appropriate environment variables and | ||
// the prompts themselves will be null. | ||
this.muxConfig.tokenId = process.env.MUX_TOKEN_ID = promptTokenId || process.env.MUX_TOKEN_ID; | ||
this.muxConfig.tokenSecret = process.env.MUX_TOKEN_SECRET = promptTokenSecret || process.env.MUX_TOKEN_SECRET; | ||
this.muxConfig.tokenId = process.env.MUX_TOKEN_ID = tokenId || process.env.MUX_TOKEN_ID; | ||
this.muxConfig.tokenSecret = process.env.MUX_TOKEN_SECRET = tokenSecret || process.env.MUX_TOKEN_SECRET; | ||
if (createSigningKey) { | ||
@@ -64,0 +65,0 @@ const { Video } = new Mux(); |
@@ -1,1 +0,1 @@ | ||
{"version":"0.4.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":{"expiresIn":{"name":"expiresIn","type":"option","char":"e","description":"How long the signature is valid for. If no unit is specified, milliseconds is assumed.","default":"7d"},"type":{"name":"type","type":"option","char":"t","description":"What type of token this signature is for.","options":["video","thumbnail","gif"],"default":"video"}},"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}]}}} | ||
{"version":"0.4.2","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":{"expiresIn":{"name":"expiresIn","type":"option","char":"e","description":"How long the signature is valid for. If no unit is specified, milliseconds is assumed.","default":"7d"},"type":{"name":"type","type":"option","char":"t","description":"What type of token this signature is for.","options":["video","thumbnail","gif"],"default":"video"}},"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.4.1", | ||
"version": "0.4.2", | ||
"author": "Matthew McClure @mmcc", | ||
@@ -83,3 +83,6 @@ "bin": { | ||
}, | ||
"types": "lib/index.d.ts" | ||
"types": "lib/index.d.ts", | ||
"volta": { | ||
"node": "8.17.0" | ||
} | ||
} |
@@ -24,3 +24,3 @@ # mux-cli | ||
$ mux (-v|--version|version) | ||
@mux/cli/0.4.1 linux-x64 node-v10.20.1 | ||
@mux/cli/0.4.2 linux-x64 node-v8.17.0 | ||
$ mux --help [COMMAND] | ||
@@ -57,3 +57,3 @@ USAGE | ||
_See code: [src/commands/assets/create.ts](https://github.com/muxinc/cli/blob/v0.4.1/src/commands/assets/create.ts)_ | ||
_See code: [src/commands/assets/create.ts](https://github.com/muxinc/cli/blob/v0.4.2/src/commands/assets/create.ts)_ | ||
@@ -77,3 +77,3 @@ ## `mux assets:upload PATH` | ||
_See code: [src/commands/assets/upload.ts](https://github.com/muxinc/cli/blob/v0.4.1/src/commands/assets/upload.ts)_ | ||
_See code: [src/commands/assets/upload.ts](https://github.com/muxinc/cli/blob/v0.4.2/src/commands/assets/upload.ts)_ | ||
@@ -109,3 +109,3 @@ ## `mux help [COMMAND]` | ||
_See code: [src/commands/init.ts](https://github.com/muxinc/cli/blob/v0.4.1/src/commands/init.ts)_ | ||
_See code: [src/commands/init.ts](https://github.com/muxinc/cli/blob/v0.4.2/src/commands/init.ts)_ | ||
@@ -130,3 +130,3 @@ ## `mux sign PLAYBACK-ID` | ||
_See code: [src/commands/sign.ts](https://github.com/muxinc/cli/blob/v0.4.1/src/commands/sign.ts)_ | ||
_See code: [src/commands/sign.ts](https://github.com/muxinc/cli/blob/v0.4.2/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
25303
488