Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Secret generator removed? #200

Closed
gerwintown opened this issue Nov 22, 2019 · 3 comments
Closed

Secret generator removed? #200

gerwintown opened this issue Nov 22, 2019 · 3 comments

Comments

@gerwintown
Copy link

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: feathersjs-ecosystem/generator-feathers#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
Copy link
Member

daffl commented Nov 22, 2019

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'))

@daffl daffl closed this as completed Nov 22, 2019
@panstromek
Copy link

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

@daffl
Copy link
Member

daffl commented Nov 25, 2019

Good point. Done.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants