GithubHelp home page GithubHelp logo

opencollective-cli's Introduction

⚠️ This package will not receive further update, we suggest to switch to it's replacement, opencollective-postinstall instead, or removing the postinstall altogether, see: https://blog.opencollective.com/beyond-post-install/

opencollective-cli

Command Line Interface for Open Collective.

Install

$ npm install -g opencollective

This will populate a opencollective (and its shortcut oc) as a command line.

You can also add this as a dependency in your package.json to automatically show the postinstall donate message:

$ npm install --save opencollective

Then run

$ opencollective setup

Commands

$ opencollective [collective] [info|stats]

Shows the latest stats of the collective (number of contributors, number of backers, annual budget and current balance).

$ opencollective [collective] donate [amount] [frequency]

Opens the donate page of your collective. E.g. $ opencollective webpack donate 5 monthly

$ opencollective postinstall [--plain]

Reads the details of your collective in the package.json of the current directory and invite the user to donate after installing your package. Add this command in the postinstall script of your package.json.

If you add the --plain option, it won't show any emoji and ascii art (better for old terminals).

$ opencollective setup

Interactive setup to add your collective info into your package.json and add the backers/sponsors badge and avatars in your README.md.

Coming soon

$ opencollective login

$ opencollective logout

$ opencollective cc | billing

$ opencollective cc ls
$ opencollective cc add
$ opencollective cc rm

$ opencollective apply [github_repo_url]

$ opencollective show <collective>
$ opencollective open <collective>

$ opencollective ls // list the collectives you are contributing to.

Stop your contribution to . Warning: may make someone sad somewhere on this planet.

Credits

Shamelessly inspired by the excellent now-cli

opencollective-cli's People

Contributors

betree avatar xdamman avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

opencollective-cli's Issues

Cancel Ascii Message if `--production` is used

Hello! I've been using packages that use this CLI tool.
I love what can be accomplished with this!

Main issue:

  • When deploying with CI/CD users (npm cmds) need to use || exit 0 or || true to continue pipeline.
  • Full Command: opencollective postinstall || exit 0
  • Npm Command Example: npm install --production
  • NOTE: This is not breaking anything, just seems like a bad UX to have this CLI running during production deploys. Mostlikely they wont even see it on CI/CD, but development mode would be just fine.

Our specific use:

  • Nuxtjs
  • ELB/Auto scaling group

I am filing issue here, as it could be an issue with other packages than nuxt. If you think differently, I'll send to them instead :)

npm install fails on 1.0.4

Hi, I am seeing npm install failures after 1.0.4, also failed on build. https://ci.appveyor.com/project/xdamman/opencollective-cli/build/1.0.20/job/up6bocgtltvxugdf

npm ERR! path /Users/choif/repos/pub-component-product/node_modules/opencollective/dist/bin/opencollective.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/choif/repos/pub-component-product/node_modules/opencollective/dist/bin/opencollective.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

Opt Out

As opencollective is more widely used, it has created an ethical dilemma. Inspiring people to donate to opensource and help grow their favorite projects is a good thing, but this is being used in ways which cause negative externalities including:

  1. The postinstall step is now crowding my npm install with advertisements. The more this is used, the less I am able to quickly see what is wrong with my install
  2. This adds at least 4mb to every install and >150 files (depending on deduping)
  3. CI now has ads in it, which mean writing scripts to parse it must take this into account

I am opening this thread in hope of finding a meaningful way balance encouraging people to donate and not causing them more pain to use great open source software.

I have proposed a NODE_NO_SUPPORT_MESSAGE=true (needs a better name) when seeing projects do this via node -e as well (remy/nodemon#1299). In addition, maybe libraries should make use of optionalDependencies instead of dependencies for this tool (example). Any method to allow for opt out would be greatly appreciated.

Again, I want to be clear that I think using economics to motivate and fund OSS is a worthwhile idea, but we should be careful about creating pain along the way.

increase version of inquirer dependency to rid of warnings

The solution would be in package.json to increase:

  "inquirer": ">=7.0.0",

and

  "version": "1.0.5",

The problem occurs for example when twice dependent doing an npm install that includes a package that uses opencollective:

joe$ npm audit
                       === npm audit security report ===                        
# Run  npm update lodash --depth 4  to resolve 2 vulnerabilities
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High          │ Prototype Pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ lodash                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ javascript-obfuscator [dev]                                  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ javascript-obfuscator > opencollective > inquirer > lodash   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://npmjs.com/advisories/782                             │
└───────────────┴──────────────────────────────────────────────────────────────┘
┌───────────────┬──────────────────────────────────────────────────────────────┐
│ High          │ Prototype Pollution                                          │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Package       │ lodash                                                       │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Dependency of │ javascript-obfuscator [dev]                                  │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ Path          │ javascript-obfuscator > opencollective > inquirer > lodash   │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ More info     │ https://npmjs.com/advisories/1065                            │
└───────────────┴──────────────────────────────────────────────────────────────┘
found 2 high severity vulnerabilities in 518 scanned packages

lodash and inquirer fixed theirs. Now opencollective needs a fix before those who depend on it can increase their version number. If they chose something like ~1.0.4 then they don't need to do anything, because it would get 1.0.5.

Install fails: no such file or directory .../node_modules/opencollective/dist/bin/opencollective.js

Node: 8.10.0
NPM: 5.6.0
OS: RedHat 6.9 (Shared hosting)
Node Environment: NVM and Nodenv; both produce the same result

Issue: When attempting to install, the process fails when executing npm install --save opencollective.

npm ERR! path /home/userx/test/node_modules/opencollective/dist/bin/opencollective.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/home/userx/test/node_modules/opencollective/dist/bin/opencollective.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

I should note that this does not occur on my local machine where I also use Nodenv. Any thoughts on what might be the hangup?

Thanks in advance for any help.

npm install fails on Windows - resource busy or locked

We use styled-components which includes this package as a dependency. It works fine when installing on my local machine (macOS), but when installing on our Azure App Service, I keep getting the following error:

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})

npm ERR! path D:\home\site\wwwroot\node_modules\opencollective\dist\bin\opencollective.js.2403443982
npm ERR! code EBUSY
npm ERR! errno -4082
npm ERR! syscall rename
npm ERR! EBUSY: resource busy or locked, rename 'D:\home\site\wwwroot\node_modules\opencollective\dist\bin\opencollective.js.2403443982' -> 'D:\home\site\wwwroot\node_modules\opencollective\dist\bin\opencollective.js'

Other issues I was able to find with similar behavior pointed to running npm cache clean (MitocGroup/deep-framework#273) or disabling anti-malware (npm/npm#7370).

Running npm cache clean did not resolve the issue for me. I'm still looking into disabling anti-malware as a solution, but I'm not sure yet how to do it on Azure, and it seems like a less-than-ideal solution.

As a temporary measure, I've had to fork styled-components to remove the dependency, and installation works now. Wondering if anyone has encountered this or has any insights. Thanks!

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.