1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.findFlowRoot = findFlowRoot;
|
7 |
|
8 | var _fileUtils = require("./fileUtils");
|
9 |
|
10 | var _node = require("./node");
|
11 |
|
12 |
|
13 | async function findFlowRoot(start) {
|
14 | return (0, _fileUtils.searchUpDirPath)(start, async dirPath => {
|
15 | const flowConfigPath = _node.path.join(dirPath, '.flowconfig');
|
16 |
|
17 | try {
|
18 | return _node.fs.statSync(flowConfigPath).isFile();
|
19 | } catch (e) {
|
20 |
|
21 | return false;
|
22 | }
|
23 | });
|
24 | } |
\ | No newline at end of file |