feathersjs-ecosystem / cli

The command line interface for scaffolding Feathers applications
https://github.com/feathersjs/feathers
MIT License
155 stars 27 forks source link

Secret generator removed? #200

Closed gerwintown closed 4 years ago

gerwintown commented 4 years ago

Seems to have been removed from generator-feathers/meta.json.

I can't find any documentation or discussion in the Issues on neither this cli repo nor the generator-feathers repo. Only this commit: https://github.com/feathersjs/generator-feathers/pull/422

$ feathers g secret
events.js:187
      throw er; // Unhandled 'error' event
      ^

Error: You don't seem to have a generator with the name “feathers:secret” installed.
But help is on the way:

You can see available generators via npm search yeoman-generator or via http://yeoman.io/generators/. 
Install them with npm install generator-feathers:secret.

To see all your installed generators run yo without any arguments. Adding the --help option will also show subgenerators. 

//stacktrace (pruned)

also:

$ feathers -h
Usage: feathers generate [type]

Options:
  -V, --version      output the version number
  -h, --help         output usage information

Commands:
  generate|g [type]  Run a generator. Type can be
        • app - Create a new Feathers application in the current folder
        • authentication - Set up authentication for the current application
        • connection - Initialize a new database connection
        • hook - Create a new hook
        • middleware - Create an Express middleware
        • service - Generate a new service
        • plugin - Create a new Feathers plugin

  upgrade|u          Try to automatically upgrade to the latest Feathers version
  *

System configuration

Module versions (especially the part that's not working): 4.2.3

NodeJS version: 12.13.0

Operating System: OSX 10.13

daffl commented 4 years ago

An authentication secret is generated automatically so the secret generator didn't make much sense (and was generating far too long of a sequence to be useful). You can generate a random string with most standard tools, e.g. from the command line via

cat /dev/random | LC_CTYPE=C tr -dc "[:alpha:]" | head -c 16

Or in Node with the one-liner of

console.log(require('crypto').randomBytes(64).toString('hex'))
panstromek commented 4 years ago

It's still in the readme, though, you should remove it.

daffl commented 4 years ago

Good point. Done.