1 |
|
2 | 'use strict'
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | const scope = require('../lib/scope')
|
12 |
|
13 | module.exports = function (
|
14 | input /* : Array<string> */,
|
15 | flags /* : CLIFlags */,
|
16 | logger /* : typeof console */,
|
17 | options /* : CLIOptions */
|
18 | ) /* : Promise<void> */ {
|
19 | const cwd = flags.cwd
|
20 | const project = input[0]
|
21 | const region = flags.region
|
22 | return Promise.resolve()
|
23 | .then(() => {
|
24 | if (project) {
|
25 | return scope.write(cwd, {
|
26 | project,
|
27 | region
|
28 | })
|
29 | }
|
30 | })
|
31 | .then(() => scope.display(logger, cwd))
|
32 | }
|