UNPKG

597 BJavaScriptView Raw
1/* @flow */
2'use strict'
3
4/* ::
5import type {
6 CLIFlags,
7 CLIOptions
8} from '../types.js'
9*/
10
11const scope = require('../lib/scope')
12
13module.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}