Giter Site home page Giter Site logo

netlify / cli Goto Github PK

View Code? Open in Web Editor NEW
1.6K 54.0 341.0 209.15 MB

Netlify Command Line Interface

Home Page: http://cli.netlify.com

License: MIT License

JavaScript 33.41% HTML 0.89% TypeScript 65.42% Shell 0.07% PowerShell 0.09% Go 0.04% Rust 0.07%
netlify cli

cli's Introduction

Netlify CLI

Coverage Status npm version downloads netlify-status security

Interact with Netlify from the comfort of your CLI.

See the CLI command line reference to get started and the docs on using Netlify Dev to run your site locally.

Table of Contents

Click to expand

Installation

Netlify CLI requires Node.js version 18.14.0 or above. To install, run the following command from any directory in your terminal:

npm install netlify-cli -g

When using the CLI in a CI environment we recommend installing it locally as a development dependency, instead of globally. To install locally, run the following command from the root directory of your project:

npm install --save-dev netlify-cli

Important: Running npm install netlify-cli -g in CI means you're always installing the latest version of the CLI, including breaking changes. When you install locally and use a lock file you guarantee reproducible builds. To manage CLI updates we recommend using an automated tool like renovate or dependabot.

Alternatively you may also use Homebrew: brew install netlify-cli (thanks @cglong).

Usage

Installing the CLI globally provides access to the netlify command.

netlify [command]

# Run `help` for detailed information about CLI commands
netlify [command] help

Documentation

To learn how to log in to Netlify and start deploying sites, visit the documentation on Netlify.

Commands

For a full command reference visit cli.netlify.com.

Contributing

See CONTRIBUTING.md for more info on how to make contributions to this project.

Development

You'll need to follow these steps to run Netlify CLI locally:

uninstall any globally installed versions of netlify-cli
clone and install deps for https://github.com/netlify/cli
npm link from inside the cli folder

Now you're both ready to start testing and to contribute to the project!

License

MIT. See LICENSE for more details.

cli's People

Contributors

anmonteiro avatar bcomnes avatar biilmann avatar calavera avatar danez avatar davbree avatar davidwells avatar dependabot[bot] avatar eduardoboucas avatar ehmicky avatar erezrokah avatar ericapisani avatar hereje avatar jackiewmacharia avatar jasonbarry avatar jgantunes avatar khendrikse avatar lukasholzer avatar netlify-bot avatar netlify-team-account-1 avatar raeesbhatti avatar renovate[bot] avatar sarahetter avatar sgrove avatar skn0tt avatar swyxio avatar tinfoil-knight avatar token-generator-app[bot] avatar verythorough avatar xhmikosr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cli's Issues

node warning

(node:90354) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.

probably an out-of-date dependency

`update-notifier` not found

Attempting to use netlify-cli for the first time:

$ sudo npm install -g netlify-cli
/usr/local/bin/netlify -> /usr/local/lib/node_modules/netlify-cli/bin/cli.js
[email protected] /usr/local/lib/node_modules/netlify-cli
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
$ netlify deploy
module.js:338
    throw err;
          ^
Error: Cannot find module 'update-notifier'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/netlify-cli/bin/cli.js:16:22)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
Rhyss-iMac:web rhys$ sudo npm install -g update-notifier
[email protected] /usr/local/lib/node_modules/update-notifier
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected])
$ netlify deploy
Opening https://app.netlify.com/authorize?

i.e. it worked only after I manually installed update-notifier globally.

$ node --version
v0.12.7
$ npm --version
2.11.3

`netlify deploy` hangs on "path to deploy"

- Do you want to request a feature or report a bug?
Request a feature

- What is the current behavior?
See steps to reproduce

$ netlify deploy
? No site id specified, create a new site Yes
? Path to deploy? (current dir)

At this point the it becomes unresponsive and doesn't echo my typing. ^C does nothing. The only way to stop it is to close the terminal window.

- If the current behavior is a bug, please provide the steps to reproduce.
It works consistently if the .netlify is not present. Deploying an existing project seems to work fine.

- What is the expected behavior?
The expected behavior is that it creates a new project and doesn't become unresponsive. (Duh!)

- Please mention your node.js, and operating system version.
Netlify v1.2.2
Node v8.1.0
Mac OS 10.12.6 Sierra

netlify throws an error if git is not installed

I don't know if this is a bug report or a feature request.

I tried netlify-cli on a bare bone alpine linux and forgot to install the git package first. If netlify cannot spawn the git command, it throws this error. A more user friendly error message would be nice, something like: "git command not found, please install git".

# netlify init -m
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: spawn git ENOENT
    at exports._errnoException (util.js:1018:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:367:16)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)
    at Module.runMain (module.js:606:11)
    at run (bootstrap_node.js:390:7)
    at startup (bootstrap_node.js:150:9)
    at bootstrap_node.js:505:3

Provide more feedback during deploy process

Right now, when hashing many files, and uploading large files, the deploy command appears to hang. We should provide better feedback during this process so the user knows things are happening.

Add clarifying delete text

- Do you want to request a feature or report a bug?

feature

- What is the current behavior?

When I did this:

$  netlify delete a-different-deployment
? Are you sure you want to delete this site? Yes

(missing -s), it deleted the deployment of the directory I was in, causing downtime.

- What is the expected behavior?

Either use the second argument as the site, or give more information in the confirmation, for instance: "defaulting to the current directory, deployment id X. would you like to delete X?"

- Please mention your node.js, and operating system version.

$  node -v
v8.11.2

latest macOS high sierra and npm package

Intermittent errors in deploy error handling

We are deploying a Netlify site as part of a Jenkins build, and sometimes are seeing what look like network connection issues between our CI provider and Netlify. The troublesome aspect here is that Jenkins fails to flag these builds as failed, thinking that they've succeeded regardless of this error output at the bottom of the console log:

+ netlify deploy -t deadbeef .
Deploying folder: .
{ client: 
   { access_token: 'acdc1234',
     client_id: 'abba4321',
     client_secret: undefined,
     redirect_uri: undefined,
     ENDPOINT: 'https://api.netlify.com',
     VERSION: 'v1',
     hostname: 'api.netlify.com',
     ssl: [ 'https://', index: 0, input: 'https://api.netlify.com' ],
     port: 443,
     http: 
      { Server: [Object],
        createServer: [Function],
        globalAgent: [Object],
        Agent: [Object],
        request: [Function],
        get: [Function] } },
  data: 
   { Error: socket hang up
       at createHangUpError (_http_client.js:250:15)
       at TLSSocket.socketOnEnd (_http_client.js:342:23)
       at emitNone (events.js:91:20)
       at TLSSocket.emit (events.js:185:7)
       at endReadableNT (_stream_readable.js:926:12)
       at _combinedTickCallback (internal/process/next_tick.js:74:11)
       at process._tickCallback (internal/process/next_tick.js:98:9) code: 'ECONNRESET' },
  meta: null }
Potentially unhandled rejection [3] SyntaxError: Unexpected token E in JSON at position 0
    at Object.parse (native)
    at Object.exports.log (/data/jenkins-vrci/home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_6.2.0/lib/node_modules/netlify-cli/lib/helpers/error_logger.js:11:21)
    at /data/jenkins-vrci/home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_6.2.0/lib/node_modules/netlify-cli/lib/commands/deploy.js:144:17
    at tryCatchReject (/data/jenkins-vrci/home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_6.2.0/lib/node_modules/netlify-cli/node_modules/when/lib/makePromise.js:845:30)
    at runContinuation1 (/data/jenkins-vrci/home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_6.2.0/lib/node_modules/netlify-cli/node_modules/when/lib/makePromise.js:804:4)
    at Rejected.when (/data/jenkins-vrci/home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_6.2.0/lib/node_modules/netlify-cli/node_modules/when/lib/makePromise.js:625:4)
    at Pending.run (/data/jenkins-vrci/home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_6.2.0/lib/node_modules/netlify-cli/node_modules/when/lib/makePromise.js:483:13)
    at Scheduler._drain (/data/jenkins-vrci/home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_6.2.0/lib/node_modules/netlify-cli/node_modules/when/lib/Scheduler.js:62:19)
    at Scheduler.drain (/data/jenkins-vrci/home/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node.js_6.2.0/lib/node_modules/netlify-cli/node_modules/when/lib/Scheduler.js:27:9)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)

The "error handling error" seems to be trying to parse error.data, containing the string "Error: ..." in error_logger.js. Don't know why that would cause an exit with return code 0 though, or if there are more Jenkins shenanigans actually causing that.

Allow getting access token from environment variable

- Do you want to request a feature or report a bug?
Request a feature

- What is the current behavior?
The CLI gets it's access token from ~/.netlify/config. This can be overridden with the --access-token flag.

- What is the desired behavior?
It would be helpful if the access token could be set with an environment variable.

Why? Because on the CI server, the config file won't be available so you need other means of passing the access token. I can use the cli flag, --access-token $NETLIFY_TOKEN but that means my build script will fail when running locally because the environment variable won't be available.

- Please mention your node.js, and operating system version.
Not relevant.

Add functions:log command

netlify functions:log create-todo => pulls down the function logs that the UI displays

Use case:

As I'm pinging my live functions, it would be awesome to stream in the logs locally to a terminal window.

Questions:

  • Should logs tail by default or should user supply -t flag?

Potential way for handling multiple deploy previews:

# netlify functions:logs create
# streams in all logs from all live preview urls + master
# [context] functionName: log output
[branch-xyz] create: (log blah blah blah)
[branch-xyz] create: (log yaddy yaddy yadda)
[branch-my-other-feature] create: (log blah blah blah)
[master] create: (log blah blah blah)
[master] create: (log blah blah blah)

If I want a specific preview url I could supply as a flag

# netlify functions:logs create -c master
# -c for context, only show master logs
[master] create: (log yaddy yaddy yadda)
[master] create: (log blah blah blah)
[master] create: (log lol lol lol)

How to pass commit message on manual deployment?

- What is the current behavior?
When pushing a manual deployment via netlify cli there is no flag to pass a commit message that later shows in the Deploys section (now: "No deploy message").

- What is the expected behavior?
I would expect to pass an additional argument when using the CLI, such as netlify deploy -m 'Add: Feature X'

- Please mention your node.js, and operating system version.
Latest

deployment crashes when includes multibyte in paths?

- Do you want to request a feature or report a bug?

probably bug.

- What is the current behavior?

netlify deploy fails to deployment.

/usr/bin/netlify deploy --site-id xxxxx --path yyyyyyyyy --access-token xxxxxxxxxxxxxxxxx --draft
Deploying folder: yyyyyyyyyyyyy
[                                        ] UploadingPotentially unhandled rejection [2] Authentication failed (WARNING: non-Error used)
Potentially unhandled rejection [4] Authentication failed (WARNING: non-Error used)
Potentially unhandled rejection [6] Authentication failed (WARNING: non-Error used)
Potentially unhandled rejection [8] Authentication failed (WARNING: non-Error used)
Potentially unhandled rejection [10] Authentication failed (WARNING: non-Error used)
Potentially unhandled rejection [12] Authentication failed (WARNING: non-Error used)
[==                                      ] UploadingPotentially unhandled rejection [14] Authentication failed (WARNING: non-Error used)
Potentially unhandled rejection [16] Authentication failed (WARNING: non-Error used)
Potentially unhandled rejection [18] Authentication failed (WARNING: non-Error used)
Potentially unhandled rejection [20] Authentication failed (WARNING: non-Error used)
/ ProcessingPotentially unhandled rejection [22] Authentication failed (WARNING: non-Error used)
Potentially unhandled rejection [24] Authentication failed (WARNING: non-Error used)
Potentially unhandled rejection [26] Authentication failed (WARNING: non-Error used)
Potentially unhandled rejection [28] Authentication failed (WARNING: non-Error used)
Potentially unhandled rejection [30] Authentication failed (WARNING: non-Error used)
Potentially unhandled rejection [32] Authentication failed (WARNING: non-Error used)
Potentially unhandled rejection [34] Authentication failed (WARNING: non-Error used)
Potentially unhandled rejection [36] Authentication failed (WARNING: non-Error used)
Potentially unhandled rejection [38] Authentication failed (WARNING: non-Error used)
| ProcessingPotentially unhandled rejection [40] Authentication failed (WARNING: non-Error used)
Potentially unhandled rejection [42] Authentication failed (WARNING: non-Error used)
Potentially unhandled rejection [44] Authentication failed (WARNING: non-Error used)
Potentially unhandled rejection [46] Authentication failed (WARNING: non-Error used)
Potentially unhandled rejection [48] Authentication failed (WARNING: non-Error used)
\ ProcessingPotentially unhandled rejection [50] Authentication failed (WARNING: non-Error used)
- ProcessingPotentially unhandled rejection [52] Authentication failed (WARNING: non-Error used)
Authentication failed
Error during deploy:  Authentication failed

- If the current behavior is a bug, please provide the steps to reproduce.

  1. create directory which has index.html and there are subdirectories named with multibyte language. each subdirectories has index.html and some static files.
  2. run netlify deploy

- What is the expected behavior?

deployment without errors until complete.

- Please mention your node.js, and operating system version.

node -v
v4.3.2

netlify --version
1.2.2

cat /etc/os-release 
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.3.3
PRETTY_NAME="Alpine Linux v3.3"

Add functions:log command

netlify functions:log create-todo => pulls down the function logs that the UI displays

Use case:

As I'm pinging my live functions, it would be awesome to stream in the logs locally to a terminal window.

Questions:

  • Should logs tail by default or should user supply -t flag?

Potential way for handling multiple deploy previews:

# netlify functions:logs create
# streams in all logs from all live preview urls + master
# [context] functionName: log output
[branch-xyz] create: (log blah blah blah)
[branch-xyz] create: (log yaddy yaddy yadda)
[branch-my-other-feature] create: (log blah blah blah)
[master] create: (log blah blah blah)
[master] create: (log blah blah blah)

If I want a specific preview url I could supply as a flag

# netlify functions:logs create -c master
# -c for context, only show master logs
[master] create: (log yaddy yaddy yadda)
[master] create: (log blah blah blah)
[master] create: (log lol lol lol)

Update help text

proposed:

file issues at https://github.com/netlify/cli/issues

deploy hangs on "Processing"

On a Mac and Node 8.9.3 (tried a few other major versions as well), CLI version 1.2.2, it seems to hang indefinitely but I'm not sure if it's Netlify itself or a problem with the CLI.

Interesting note is that it does seem to eventually deploy, however the CLI still hangs showing the Processing spinner.

Thanks for the rad service!

Deploy Error - netlify/lib/site.js:90

I cannot deploy anymore :-(

/usr/lib/node_modules/netlify-cli/node_modules/netlify/lib/site.js:90
          data.required.forEach(function(sha) { shas[sha] = true; });
              ^
TypeError: Cannot read property 'required' of null
    at /usr/lib/node_modules/netlify-cli/node_modules/netlify/lib/site.js:90:15
    at IncomingMessage.<anonymous> (/usr/lib/node_modules/netlify-cli/node_modules/netlify/lib/client.js:286:13)
    at IncomingMessage.emit (events.js:117:20)
    at _stream_readable.js:943:16
    at process._tickCallback (node.js:419:13)

add a deploy local command

- Do you want to request a feature or report a bug?

feature

- What is the current behavior?

You have to navigate to a particular page by its eventual url, without being able to rely on the rewrites

- What is the expected behavior?

$ netlify local
...
builds and serves locally

Console output disappears on PowerShell + ConEmu

- Do you want to request a feature or report a bug?

Bug.

- What is the current behavior?

I'm on Windows and I use ConEmu as my console emulator. Whenever I run netlify through ConEmu on PowerShell, the colours break to the point where no text is visible on the console unless I select a block of text. It also persists after the command is finished, even after running cls.

image

image

- If the current behavior is a bug, please provide the steps to reproduce.

  • Install ConEmu.
  • Run a PowerShell console through ConEmu.
  • Run netlify.
  • Text disappears.

- What is the expected behavior?

Normal behaviour when running through a regular cmd/powershell window:

image

- Please mention your node.js, and operating system version.

  • Node 8.9.0
  • Windows 10 (x64) Build 16299

Calling netlify sites inside ~ causes error

When i run netlify sites inside my home ~ directory, I get this error

diwu@burnt ~ » netlify sites
fs.js:732
  var r = binding.read(fd, buffer, offset, length, position);
                  ^

Error: EISDIR: illegal operation on a directory, read
    at Error (native)
    at Object.fs.readSync (fs.js:732:19)
    at tryReadSync (fs.js:487:20)
    at Object.fs.readFileSync (fs.js:535:19)
    at readLocalConfig (/usr/local/lib/node_modules/netlify-cli/lib/settings/config.js:18:26)
    at newConfig (/usr/local/lib/node_modules/netlify-cli/lib/settings/config.js:129:15)
    at Command.<anonymous> (/usr/local/lib/node_modules/netlify-cli/lib/settings/config.js:150:5)
    at Command.listener (/usr/local/lib/node_modules/netlify-cli/node_modules/commander/index.js:301:8)
    at emitTwo (events.js:106:13)
    at Command.emit (events.js:191:7)

Inside any other directory, it seems to work just fine.

Proposal: always compress folders before deploy

Hi, I noticed that when you use netlify deploy on a folder, it will be a lot slower than deploying that same folder as a zip file (expected).

What if the netlify-cli automatically compressed folders before sending them to netlify servers? We could use https://github.com/archiverjs/node-archiver for that.

I would like to hear your feedback on this as there may be a good reason for not compressing folders before sending over the wire.

As a first step, maybe the documentation could be explicit about the fact that folders are sent uncompressed and if you do not have an optic fiber setup then compressing to a zip before sending can be a good idea.

Thanks!

Incorrect hook given in "configure webhook" prompt

Am given https://api.netlify.com/hooks/{xxxxxxx}, which 404s when put into github

Not sure if this is the right one, but the web ui shows a https://api.netlify.com/build_hooks/{xxxxx} api. Was it removed or renamed?

'args.push is not a function' when trying to deploy

Hello,

Apologies if this is not new but I have has look through the issues and can't see anything related.

I've been trying to use the CLI this morning but am getting the following error:

/Users/james/.nvm/versions/node/v6.2.0/lib/node_modules/netlify-cli/node_modules/commander/index.js:298
      args.push(self);
           ^

TypeError: args.push is not a function
    at Command.listener (/Users/james/.nvm/versions/node/v6.2.0/lib/node_modules/netlify-cli/node_modules/commander/index.js:298:12)
    at emitOne (events.js:101:20)
    at Command.emit (events.js:188:7)
    at Command.parseOptions (/Users/james/.nvm/versions/node/v6.2.0/lib/node_modules/netlify-cli/node_modules/commander/index.js:690:14)
    at Command.parse (/Users/james/.nvm/versions/node/v6.2.0/lib/node_modules/netlify-cli/node_modules/commander/index.js:455:21)
    at Object.<anonymous> (/Users/james/.nvm/versions/node/v6.2.0/lib/node_modules/netlify-cli/bin/cli.js:96:9)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)

As you can see I'm using node 6.2.0, I've also tried using node 0.12 just to see if it was something to do with node versions.

The command that I ran was netlify deploy dist -e testing which is what I have always run. Also worth noting that I installed netlify-cli today on my machine (just as it does on the CI I use where I saw the error originally)

I did suspect it might have been a package update - I've taken a look at commander but it doesn't seem to have changed that recently.

Any help on this would be greatly appreciated!

All the best,

James

Bad colored output for conemu

@verythorough was reporting that we are getting odd color output on conemu and some text is the same color as the background:

only-with-help

The help text is auto printed by oclif, so it may be an upstream issue. Just to note, conemu does not support 256 colors:

256colors

Add links to Guides to the CLI

I want to contribute something I notice in the CLI that was lacking. I also want to do this in the Go CLI, but starting somewhere more familiar for now.

 Guides:
    Getting started     https://netlify.com/docs#quickstart
    Custom domains      https://netlify.com/docs/custom-domains
    SSL     https://netlify.com/docs/ssl
    API     https://netlify.com/docs/api#netlify-rest-api

... etc

How do you do a preview deploy?

only seeing this in the deploy help:

 $ netlify deploy --help

  Usage: deploy [options]

  Push a new deploy to netlify

  Options:

    -h, --help         output usage information
    -s --site-id [id]  Deploy to site with <id>
    -p --path [path]   Path to a folder or zip file to deploy
    -d --draft         Deploy as a draft without publishing

I'm wanting to script the deploy so I can avoid using netlify's build tools
image

(I'm using gitlab and have a pretty slick setup so far)

my current production deploy script is:

      BRANCH=$(git rev-parse --abbrev-ref HEAD)

      if [[ "$BRANCH" == "master" ]]; then
        time ./run yarn build:production
        time npm i -g netlify-cli
        time netlify deploy -s emberclear -p packages/frontend/dist -t $NETLIFY_ACCESS_TOKEN -e production
      fi

was hoping to be able to do something for branches / previews as well.

thanks!

failed deploys exit with zero

- Do you want to request a feature or report a bug?
considering that this is still the behavior after others have used the tool for a while, i assume this is more of a feature request, but it could be considered a bug considering common behavior of most cli tools

- What is the current behavior?
exits with 0 after authentication failure (incorrect token) when attempting to deploy

example build that should have failed

- If the current behavior is a bug, please provide the steps to reproduce.
netlify deploy --site-id $NETLIFY_SITE_ID --access-token $NETLIFY_ACCESS_TOKEN --path ./public with an invalid token

- What is the expected behavior?
should exit with a non-zero exit code so that failure can be detected programatically. (most ci services with report the build as failed when commands exit non-zero)

- Please mention your node.js, and operating system version.
node: 9.4.0
OS: Ubuntu 14.04.5 LTS (Travis CI)

Improve input cleaning

On prompts that require user input, we should do a better job at cleaning whitespace and illegal characters.

Improve Github Login Flow

Right now, we use rvagg/ghauth to get a github token, but its more than we need and is inconsistent with the rest of our prompts. Lets replace it with raw octocat usage and inquirer.

allow selective deploy within directory tree

Requested by a customer but perhaps has wider appeal than one person:

an ability to select files to exclude or include during a deploy of a directory.

Perhaps it could behave like .gitignore, where you could set patterns (eg node_modules/* or *.o) not to be deployed?

react sanely to errors

When we show an error that bubbles up from the OS, we often stop dead. Instead, we should:

  1. wait a few seconds, and retry in case the error could be transient (eg: ECONNRESET or ECONNREFUSED)

  2. provide some explanation if the error is something we understand (eg: ENFILE should provide a link to how ulimit works so people can try increasing their # of file handles - something like http://unix.stackexchange.com/questions/108174/how-to-persist-ulimit-settings-in-osx-mavericks, or at least explain that the deploy has too many files for the current OS configuration)

netlify --help output is black on black

- Do you want to request a feature or report a bug?
Bug

- What is the current behavior?
netlify --help output is unreadable as it prints black text on a black background:

- If the current behavior is a bug, please provide the steps to reproduce.

netlify --help

- What is the expected behavior?
I can utilize my eyeballs to ingest the help content

- Please mention your node.js, and operating system version.
Node v7.8.0
Windows 10 insider preview build 16193

does not work with node 10

node[13766]: ../src/node_contextify.cc:631:static void node::contextify::ContextifyScript::New(const FunctionCallbackInfo<v8::Value> &): Assertion `args[1]->IsString()' failed. 1: node::Abort() [/usr/local/bin/node] 2: node::Assert(char const* const (*) [4]) [/usr/local/bin/node] 3: node::contextify::ContextifyScript::New(v8::FunctionCallbackInfo<v8::Value> const&) [/usr/local/bin/node] 4: v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) [/usr/local/bin/node] 5: v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<true>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/usr/local/bin/node] 6: v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/bin/node]

Due to reliance on natives package. See nodejs bug reports nodejs/node#20325, nodejs/node#20281, nodejs/node#20285

Cannot find module internal/fs

I'm getting the following error when running any netlify command e.g. netlify or netlify deploy.

Error: Cannot find module 'internal/fs'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at evalmachine.:18:20
at Object. (/usr/local/lib/node_modules/netlify-cli/node_modules/graceful-fs/fs.js:11:1)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:3
at tryModuleLoad (module.js:447:12)

My environment

  • Node.js: v7.8.0
  • NPM: 4.2.0
  • Yarn: 0.17.8
  • macOS: Sierra 10.12.4 (16E195)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.