()
| 112 | } |
| 113 | |
| 114 | async setOptions() { |
| 115 | await super.setOptions(); |
| 116 | if (this.shouldExit()) return false; |
| 117 | if (this.options.name) { |
| 118 | const msg = utils.validate(this.options.name); |
| 119 | if (typeof msg === 'string') { |
| 120 | this.exit(msg); |
| 121 | return false; |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | this.projectInfo = { |
| 126 | projectType: this.projectType, |
| 127 | dependencies: utils.getDependencies(), |
| 128 | }; |
| 129 | this.projectOptions = [ |
| 130 | 'name', |
| 131 | 'description', |
| 132 | 'outdir', |
| 133 | 'private', |
| 134 | 'apiconnect', |
| 135 | ].concat(this.buildOptions); |
| 136 | this.projectOptions.forEach(n => { |
| 137 | if (typeof n === 'object') { |
| 138 | n = n.name; |
| 139 | } |
| 140 | if (this.options[n]) { |
| 141 | this.projectInfo[n] = this.options[n]; |
| 142 | } |
| 143 | }); |
| 144 | } |
| 145 | |
| 146 | promptProjectName() { |
| 147 | if (this.shouldExit()) return false; |
nothing calls this directly
no test coverage detected