@@ -6,22 +6,23 @@ const LandoOclifPlugin = require('./../../utils/plugin');
6
6
7
7
module . exports = async ( { id, argv, config} ) => {
8
8
let debug = createDebugger ( config . dirname , 'hooks' , 'init' ) ;
9
- // Check for --debug and internally set DEBUG=* if its set
10
- // @TODO : we should make debug a string flag so it can work like setting DEBUG=something
11
- // @TODO : should we handle --debug on our own or use something lightweight like minimist?
12
- // @TODO : or maybe add this as a util?
13
- // @TODO : this should go at the top of bin/hyperdrive so we get debug output before this point
14
- // @TODO : we should give preference to process.env.DEBUG if its set.
15
- if ( [ id , ...argv ] . find ( element => element === '--debug' ) === '--debug' ) {
16
- require ( 'debug' ) . enable ( '*' ) ; // eslint-disable-line node/no-extraneous-require
17
- }
18
9
// Below is mostly just to DEBUG confirm we can get this far
19
10
debug ( 'cli init start with id=%s, argv=%O' , id , argv ) ;
20
11
12
+ // @TODO : eventually we will want to grab a cached config file that was the result of a previous bootstrap
13
+ // for speed purposes, we want to minimize the time it takes to show the list of commands or help and put all
14
+ // time instensive dep loading after the command has been run().
15
+ // @NOTE that the config file should likely be in a hashmap where landoAppRoot -> someconfigfile because a Landofile
16
+ // may contain plugins that hyperdrive needs to install for that lando app or it may contain some config overrides
17
+ // eg maybe a given lando app wants to set a default plugin install method or provides a new installer/command
18
+ // within itself
19
+ // @TODO : this also implies we have a way to delete the cache, it would be cool if we could target that deletion
20
+ // for specific things so that clearing the cache for app A does not blow away the cache for app B
21
+
21
22
// @TODOS :
22
23
/*
23
24
* ~~1. get debug flag~~
24
- * 2. plugin helper commands that to do not require lodash (find plugins)
25
+ * ~~ 2. plugin helper commands that to do not require lodash (find plugins)~~
25
26
* 3. extended plugin class with extra methods?
26
27
* * eg removeCommand, replaceCommand
27
28
* 4. extended plugin class with ability to dynamically add commands vs from manifest file
0 commit comments