1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | Object.defineProperty(exports, "__esModule", { value: true });
|
8 | const configs = require("./configs");
|
9 | const fp_1 = require("./fp");
|
10 |
|
11 | function clone(o) {
|
12 | return JSON.parse(JSON.stringify(o));
|
13 | }
|
14 | exports.clone = clone;
|
15 |
|
16 |
|
17 |
|
18 |
|
19 | function find(dirPath, optPattern = /.*/) {
|
20 | return fp_1.safeReaddir(dirPath).map(dirs => {
|
21 | return dirs.filter(file => {
|
22 | return optPattern.test(file);
|
23 | });
|
24 | });
|
25 | }
|
26 | exports.find = find;
|
27 | function getUser() {
|
28 | return configs.getConfig().github_user || process.env.GH_USER;
|
29 | }
|
30 | exports.getUser = getUser;
|
31 |
|
32 | exports.getConfig = configs.getConfig;
|
33 | exports.writeGlobalConfig = configs.writeGlobalConfig;
|
34 |
|
\ | No newline at end of file |