@modern-js/monorepo-tools 1.21.5 → 2.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +67 -38
- package/dist/js/modern/cli/new.js +0 -3
- package/dist/js/modern/commands/build.js +4 -9
- package/dist/js/modern/dag/create.js +8 -15
- package/dist/js/modern/dag/edge-manager.js +0 -10
- package/dist/js/modern/dag/operator.js +14 -57
- package/dist/js/modern/dag/task.js +0 -18
- package/dist/js/modern/dag/utils.js +13 -31
- package/dist/js/modern/features/build/index.js +8 -19
- package/dist/js/modern/features/clear/index.js +0 -1
- package/dist/js/modern/features/deploy/index.js +7 -35
- package/dist/js/modern/features/dev/cmds.js +1 -0
- package/dist/js/modern/features/dev/create-task.js +2 -13
- package/dist/js/modern/features/dev/index.js +4 -11
- package/dist/js/modern/features/dev/watch-projects-state.js +0 -19
- package/dist/js/modern/features/install/index.js +0 -12
- package/dist/js/modern/index.js +1 -2
- package/dist/js/modern/log/multi-tasks-log.js +8 -31
- package/dist/js/modern/log/time.js +0 -3
- package/dist/js/modern/log/utils.js +0 -2
- package/dist/js/modern/package/index.js +0 -8
- package/dist/js/modern/parse-config/index.js +3 -6
- package/dist/js/modern/parse-config/monorepo.js +0 -23
- package/dist/js/modern/projects/check-project-change.js +4 -16
- package/dist/js/modern/projects/get-projects-by-packages-config.js +12 -29
- package/dist/js/modern/projects/get-projects-by-workspace-file.js +0 -16
- package/dist/js/modern/projects/get-projects.js +4 -29
- package/dist/js/modern/utils/install.js +0 -2
- package/dist/js/node/cli/build-watch.js +0 -3
- package/dist/js/node/cli/build.js +0 -3
- package/dist/js/node/cli/clear.js +0 -3
- package/dist/js/node/cli/deploy.js +0 -3
- package/dist/js/node/cli/index.js +0 -12
- package/dist/js/node/cli/install.js +0 -3
- package/dist/js/node/cli/new.js +0 -7
- package/dist/js/node/commands/build-watch.js +0 -6
- package/dist/js/node/commands/build.js +2 -14
- package/dist/js/node/commands/clear.js +0 -5
- package/dist/js/node/commands/deploy.js +0 -9
- package/dist/js/node/commands/index.js +0 -10
- package/dist/js/node/commands/install.js +0 -6
- package/dist/js/node/dag/create.js +8 -17
- package/dist/js/node/dag/edge-manager.js +0 -12
- package/dist/js/node/dag/index.js +0 -4
- package/dist/js/node/dag/operator.js +14 -65
- package/dist/js/node/dag/task.js +0 -23
- package/dist/js/node/dag/utils.js +12 -39
- package/dist/js/node/features/build/index.js +8 -29
- package/dist/js/node/features/clear/index.js +0 -15
- package/dist/js/node/features/deploy/index.js +7 -53
- package/dist/js/node/features/dev/cmds.js +1 -0
- package/dist/js/node/features/dev/create-task.js +2 -22
- package/dist/js/node/features/dev/index.js +4 -19
- package/dist/js/node/features/dev/watch-projects-state.js +0 -25
- package/dist/js/node/features/install/index.js +0 -25
- package/dist/js/node/hooks/index.js +0 -2
- package/dist/js/node/index.js +2 -16
- package/dist/js/node/locale/index.js +0 -4
- package/dist/js/node/log/error.js +0 -2
- package/dist/js/node/log/multi-tasks-log.js +8 -34
- package/dist/js/node/log/time.js +0 -10
- package/dist/js/node/log/utils.js +0 -4
- package/dist/js/node/package/index.js +0 -10
- package/dist/js/node/parse-config/index.js +3 -14
- package/dist/js/node/parse-config/monorepo.js +0 -34
- package/dist/js/node/projects/check-project-change.js +4 -33
- package/dist/js/node/projects/clear-memory-files.js +0 -8
- package/dist/js/node/projects/get-projects-by-packages-config.js +12 -41
- package/dist/js/node/projects/get-projects-by-workspace-file.js +0 -36
- package/dist/js/node/projects/get-projects.js +4 -37
- package/dist/js/node/utils/install.js +0 -11
- package/dist/js/node/utils/language.js +0 -2
- package/dist/types/dag/operator.d.ts +0 -3
- package/dist/types/dag/utils.d.ts +0 -1
- package/dist/types/features/dev/index.d.ts +0 -1
- package/dist/types/index.d.ts +0 -2
- package/dist/types/projects/get-projects.d.ts +0 -1
- package/package.json +13 -36
|
@@ -4,13 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.MultitasksLogger = void 0;
|
|
7
|
-
|
|
8
7
|
var _utils = require("@modern-js/utils");
|
|
9
|
-
|
|
10
8
|
var _utils2 = require("./utils");
|
|
11
|
-
|
|
12
9
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
13
|
-
|
|
14
10
|
const createLogger = (name, config) => {
|
|
15
11
|
const options = {
|
|
16
12
|
scope: config.label ? config.label + name : name,
|
|
@@ -24,19 +20,18 @@ const createLogger = (name, config) => {
|
|
|
24
20
|
};
|
|
25
21
|
return new _utils.Signale(options);
|
|
26
22
|
};
|
|
27
|
-
|
|
28
23
|
const createListenHandler = (name, config) => {
|
|
29
24
|
// const sb = new StringBuilder();
|
|
30
|
-
const logger = createLogger(name, config);
|
|
31
|
-
|
|
25
|
+
const logger = createLogger(name, config);
|
|
26
|
+
// eslint-disable-next-line node/prefer-global/buffer
|
|
32
27
|
const stdout = chunk => {
|
|
33
28
|
// console.info(chunk.toString().split(/\r\n|\n\r|\r|\n/g).length);
|
|
34
29
|
logger.info((0, _utils2.formatLog)(chunk.toString()));
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
};
|
|
31
|
+
// eslint-disable-next-line node/prefer-global/buffer
|
|
38
32
|
const stderr = chunk => {
|
|
39
|
-
logger.error(chunk.toString());
|
|
33
|
+
logger.error(chunk.toString());
|
|
34
|
+
// logger.log('#####################');
|
|
40
35
|
};
|
|
41
36
|
|
|
42
37
|
return {
|
|
@@ -44,65 +39,44 @@ const createListenHandler = (name, config) => {
|
|
|
44
39
|
stderr
|
|
45
40
|
};
|
|
46
41
|
};
|
|
47
|
-
|
|
48
42
|
class MultitasksLogger {
|
|
49
43
|
constructor() {
|
|
50
44
|
_defineProperty(this, "_taskNameList", void 0);
|
|
51
|
-
|
|
52
45
|
_defineProperty(this, "_taskStdoutListenerMap", void 0);
|
|
53
|
-
|
|
54
46
|
_defineProperty(this, "_taskStderrListenerMap", void 0);
|
|
55
|
-
|
|
56
47
|
_defineProperty(this, "_taskLogConfigMap", void 0);
|
|
57
|
-
|
|
58
48
|
this._taskNameList = [];
|
|
59
49
|
this._taskStdoutListenerMap = new Map();
|
|
60
50
|
this._taskStderrListenerMap = new Map();
|
|
61
51
|
this._taskLogConfigMap = new Map();
|
|
62
52
|
}
|
|
63
|
-
|
|
64
53
|
addLogProvider(name, config) {
|
|
65
54
|
if (this._taskNameList.includes(name)) {
|
|
66
55
|
var _this$_taskStdoutList, _this$_taskStderrList;
|
|
67
|
-
|
|
68
56
|
(_this$_taskStdoutList = this._taskStdoutListenerMap.get(name)) === null || _this$_taskStdoutList === void 0 ? void 0 : _this$_taskStdoutList.removeAllListeners();
|
|
69
57
|
(_this$_taskStderrList = this._taskStderrListenerMap.get(name)) === null || _this$_taskStderrList === void 0 ? void 0 : _this$_taskStderrList.removeAllListeners();
|
|
70
|
-
|
|
71
58
|
this._taskStdoutListenerMap.delete(name);
|
|
72
|
-
|
|
73
59
|
this._taskStderrListenerMap.delete(name);
|
|
74
60
|
}
|
|
75
|
-
|
|
76
61
|
this._taskNameList.push(name);
|
|
77
|
-
|
|
78
62
|
this._taskLogConfigMap.set(name, config);
|
|
79
|
-
|
|
80
63
|
this._taskStdoutListenerMap.set(name, config.stdout);
|
|
81
|
-
|
|
82
64
|
this._taskStderrListenerMap.set(name, config.stderr);
|
|
83
|
-
|
|
84
65
|
this.startListen(name);
|
|
85
66
|
}
|
|
86
|
-
|
|
87
67
|
startListen(taskName) {
|
|
88
68
|
const listenHandler = createListenHandler(taskName, this._taskLogConfigMap.get(taskName).logConfig);
|
|
89
|
-
|
|
90
69
|
this._taskStdoutListenerMap.get(taskName).on('data', listenHandler.stdout);
|
|
91
|
-
|
|
92
70
|
this._taskStdoutListenerMap.get(taskName).on('error', listenHandler.stderr);
|
|
93
|
-
|
|
94
71
|
this._taskStderrListenerMap.get(taskName).on('data', listenHandler.stderr);
|
|
95
72
|
}
|
|
96
|
-
|
|
97
73
|
startListenAll() {
|
|
98
74
|
for (const taskName of this._taskNameList) {
|
|
99
75
|
this.startListen(taskName);
|
|
100
76
|
}
|
|
101
77
|
}
|
|
102
|
-
|
|
103
|
-
|
|
78
|
+
finishListen() {
|
|
79
|
+
// 是否需要
|
|
104
80
|
}
|
|
105
|
-
|
|
106
81
|
}
|
|
107
|
-
|
|
108
82
|
exports.MultitasksLogger = MultitasksLogger;
|
package/dist/js/node/log/time.js
CHANGED
|
@@ -4,30 +4,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.startTime = exports.initTimeLog = exports.endTime = void 0;
|
|
7
|
-
|
|
8
7
|
var _utils = require("@modern-js/utils");
|
|
9
|
-
|
|
10
8
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11
|
-
|
|
12
9
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13
|
-
|
|
14
10
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
-
|
|
16
11
|
const initTimeLog = (option = {}) => new _utils.Signale(_objectSpread({
|
|
17
12
|
interactive: true,
|
|
18
13
|
scope: 'time-log'
|
|
19
14
|
}, option));
|
|
20
|
-
|
|
21
15
|
exports.initTimeLog = initTimeLog;
|
|
22
|
-
|
|
23
16
|
const startTime = (signaleInstance, prefix = '') => {
|
|
24
17
|
signaleInstance.time(prefix);
|
|
25
18
|
};
|
|
26
|
-
|
|
27
19
|
exports.startTime = startTime;
|
|
28
|
-
|
|
29
20
|
const endTime = (signaleInstance, prefix = '') => {
|
|
30
21
|
signaleInstance.timeEnd(prefix);
|
|
31
22
|
};
|
|
32
|
-
|
|
33
23
|
exports.endTime = endTime;
|
|
@@ -4,15 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.formatLog = void 0;
|
|
7
|
-
|
|
8
7
|
const formatLog = log => {
|
|
9
8
|
const strs = log.split(/\r\n|\n\r|\r|\n/g);
|
|
10
|
-
|
|
11
9
|
if (strs[0].trim() === '') {
|
|
12
10
|
return `\n${strs.slice(1).filter(s => Boolean(s)).join('\n')}`;
|
|
13
11
|
}
|
|
14
|
-
|
|
15
12
|
return strs.filter(s => Boolean(s)).join('\n');
|
|
16
13
|
};
|
|
17
|
-
|
|
18
14
|
exports.formatLog = formatLog;
|
|
@@ -4,34 +4,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Package = void 0;
|
|
7
|
-
|
|
8
7
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
-
|
|
10
8
|
class Package {
|
|
11
9
|
constructor(packageJson, packageConfigPath, rootPath) {
|
|
12
10
|
_defineProperty(this, "json", void 0);
|
|
13
|
-
|
|
14
11
|
_defineProperty(this, "configPath", void 0);
|
|
15
|
-
|
|
16
12
|
_defineProperty(this, "rootPath", void 0);
|
|
17
|
-
|
|
18
13
|
this.configPath = packageConfigPath;
|
|
19
14
|
this.rootPath = rootPath;
|
|
20
15
|
this.json = packageJson;
|
|
21
16
|
}
|
|
22
|
-
|
|
23
17
|
get name() {
|
|
24
18
|
return this.json.name;
|
|
25
19
|
}
|
|
26
|
-
|
|
27
20
|
get path() {
|
|
28
21
|
return this.configPath;
|
|
29
22
|
}
|
|
30
|
-
|
|
31
23
|
get(key) {
|
|
32
24
|
return this.json[key];
|
|
33
25
|
}
|
|
34
|
-
|
|
35
26
|
}
|
|
36
|
-
|
|
37
27
|
exports.Package = Package;
|
|
@@ -4,41 +4,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getFinalConfig = void 0;
|
|
7
|
-
|
|
8
7
|
var path = _interopRequireWildcard(require("path"));
|
|
9
|
-
|
|
10
8
|
var _nodeCoreLibrary = require("@rushstack/node-core-library");
|
|
11
|
-
|
|
12
9
|
var _monorepo = require("./monorepo");
|
|
13
|
-
|
|
14
10
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
-
|
|
16
11
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
-
|
|
18
12
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
19
|
-
|
|
20
13
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
21
|
-
|
|
22
14
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
const defaultConfig = {
|
|
16
|
+
// packagesMatchs: {
|
|
25
17
|
// workspaceFile: 'pnpm-lock.yaml',
|
|
26
18
|
// },
|
|
27
19
|
};
|
|
28
|
-
|
|
29
20
|
const getFinalConfig = async (currentPath = process.cwd()) => {
|
|
30
21
|
// TODO:
|
|
31
22
|
// 1. 初始化获取信息
|
|
32
23
|
// 2. 配置文件是否存在校验
|
|
24
|
+
|
|
33
25
|
const monorepo = (0, _monorepo.getMonorepoBaseData)(currentPath);
|
|
34
26
|
const userConfig = await _nodeCoreLibrary.JsonFile.loadAsync(path.resolve(monorepo.rootPath, 'mono-config.json'));
|
|
35
|
-
|
|
36
27
|
const config = _objectSpread(_objectSpread({}, defaultConfig), userConfig);
|
|
37
|
-
|
|
38
28
|
return {
|
|
39
29
|
monorepo,
|
|
40
30
|
config
|
|
41
31
|
};
|
|
42
32
|
};
|
|
43
|
-
|
|
44
33
|
exports.getFinalConfig = getFinalConfig;
|
|
@@ -4,80 +4,57 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.packageManagerFlag = exports.getWorkspaceFile = exports.getPackageManager = exports.getMonorepoBaseData = exports.findMonorepoRoot = void 0;
|
|
7
|
-
|
|
8
7
|
var path = _interopRequireWildcard(require("path"));
|
|
9
|
-
|
|
10
8
|
var _nodeCoreLibrary = require("@rushstack/node-core-library");
|
|
11
|
-
|
|
12
9
|
var _constants = require("../constants");
|
|
13
|
-
|
|
14
10
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
-
|
|
16
11
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
-
|
|
18
12
|
const useLerna = monorepoRootPath => {
|
|
19
13
|
if (_nodeCoreLibrary.FileSystem.exists(path.join(monorepoRootPath, _constants.WORKSPACE_FILE.LERNA))) {
|
|
20
14
|
return true;
|
|
21
15
|
}
|
|
22
|
-
|
|
23
16
|
return false;
|
|
24
17
|
};
|
|
25
|
-
|
|
26
18
|
const useYarnWorkspaces = monorepoRootPath => {
|
|
27
19
|
if (!_nodeCoreLibrary.FileSystem.exists(path.join(monorepoRootPath, _constants.WORKSPACE_FILE.YARN))) {
|
|
28
20
|
return false;
|
|
29
21
|
}
|
|
30
|
-
|
|
31
22
|
const json = _nodeCoreLibrary.JsonFile.load(path.join(monorepoRootPath, _constants.WORKSPACE_FILE.YARN));
|
|
32
|
-
|
|
33
23
|
if ('workspaces' in json && json.workspaces.packages) {
|
|
34
24
|
return true;
|
|
35
25
|
}
|
|
36
|
-
|
|
37
26
|
return false;
|
|
38
27
|
};
|
|
39
|
-
|
|
40
28
|
const usePnpmWorkspaces = monorepoRootPath => {
|
|
41
29
|
if (_nodeCoreLibrary.FileSystem.exists(path.join(monorepoRootPath, _constants.WORKSPACE_FILE.PNPM))) {
|
|
42
30
|
return true;
|
|
43
31
|
}
|
|
44
|
-
|
|
45
32
|
return false;
|
|
46
33
|
};
|
|
47
|
-
|
|
48
34
|
const isMonorepo = monorepoRootPath => {
|
|
49
35
|
if (usePnpmWorkspaces(monorepoRootPath) || useLerna(monorepoRootPath) || useYarnWorkspaces(monorepoRootPath)) {
|
|
50
36
|
return true;
|
|
51
37
|
}
|
|
52
|
-
|
|
53
38
|
return false;
|
|
54
39
|
};
|
|
55
|
-
|
|
56
40
|
const findMonorepoRoot = starFindPath => {
|
|
57
41
|
let inMonorepo = false;
|
|
58
42
|
let findPath = starFindPath;
|
|
59
|
-
|
|
60
43
|
while (findPath !== '/') {
|
|
61
44
|
if (isMonorepo(findPath)) {
|
|
62
45
|
inMonorepo = true;
|
|
63
46
|
break;
|
|
64
47
|
}
|
|
65
|
-
|
|
66
48
|
findPath = path.dirname(findPath);
|
|
67
49
|
}
|
|
68
|
-
|
|
69
50
|
return inMonorepo ? findPath : undefined;
|
|
70
51
|
};
|
|
71
|
-
|
|
72
52
|
exports.findMonorepoRoot = findMonorepoRoot;
|
|
73
|
-
|
|
74
53
|
const getWorkspaceFile = startFindPath => {
|
|
75
54
|
const rootPath = findMonorepoRoot(startFindPath);
|
|
76
|
-
|
|
77
55
|
if (!rootPath) {
|
|
78
56
|
throw new Error('[Auto Find Mode]: not find any monorepo workspace file, you can set `packagesMatchs.workspaceFile`');
|
|
79
57
|
}
|
|
80
|
-
|
|
81
58
|
if (usePnpmWorkspaces(rootPath)) {
|
|
82
59
|
return _constants.WORKSPACE_FILE.PNPM;
|
|
83
60
|
} else if (useLerna(rootPath)) {
|
|
@@ -88,7 +65,6 @@ const getWorkspaceFile = startFindPath => {
|
|
|
88
65
|
throw new Error('[Auto Find Mode]: not find any monorepo workspace file, you can set `packagesMatchs.workspaceFile`');
|
|
89
66
|
}
|
|
90
67
|
};
|
|
91
|
-
|
|
92
68
|
exports.getWorkspaceFile = getWorkspaceFile;
|
|
93
69
|
const packageManagerFlag = {
|
|
94
70
|
pnpm: [_constants.WORKSPACE_FILE.PNPM, 'pnpm-lock.yaml'],
|
|
@@ -96,40 +72,30 @@ const packageManagerFlag = {
|
|
|
96
72
|
npm: [() => true]
|
|
97
73
|
};
|
|
98
74
|
exports.packageManagerFlag = packageManagerFlag;
|
|
99
|
-
|
|
100
75
|
const usePnpmPackageManager = monorepoRootPath => packageManagerFlag.pnpm.some(flag => _nodeCoreLibrary.FileSystem.exists(path.join(monorepoRootPath, flag)));
|
|
101
|
-
|
|
102
76
|
const useYarnPackageManager = monorepoRootPath => packageManagerFlag.yarn.some(flag => {
|
|
103
77
|
if (typeof flag === 'function') {
|
|
104
78
|
return flag(monorepoRootPath);
|
|
105
79
|
}
|
|
106
|
-
|
|
107
80
|
return _nodeCoreLibrary.FileSystem.exists(path.join(monorepoRootPath, flag));
|
|
108
81
|
});
|
|
109
|
-
|
|
110
82
|
const getPackageManager = monorepoRootPath => {
|
|
111
83
|
if (usePnpmPackageManager(monorepoRootPath)) {
|
|
112
84
|
return 'pnpm';
|
|
113
85
|
} else if (useYarnPackageManager(monorepoRootPath)) {
|
|
114
86
|
return 'yarn';
|
|
115
87
|
}
|
|
116
|
-
|
|
117
88
|
return 'npm';
|
|
118
89
|
};
|
|
119
|
-
|
|
120
90
|
exports.getPackageManager = getPackageManager;
|
|
121
|
-
|
|
122
91
|
const getMonorepoBaseData = (root = process.cwd()) => {
|
|
123
92
|
const rootPath = findMonorepoRoot(root);
|
|
124
|
-
|
|
125
93
|
if (!rootPath) {
|
|
126
94
|
throw new Error('not find any monorepo, you can add lerna、pnpm or yarn workspace file');
|
|
127
95
|
}
|
|
128
|
-
|
|
129
96
|
return {
|
|
130
97
|
rootPath,
|
|
131
98
|
packageManager: getPackageManager(rootPath)
|
|
132
99
|
};
|
|
133
100
|
};
|
|
134
|
-
|
|
135
101
|
exports.getMonorepoBaseData = getMonorepoBaseData;
|
|
@@ -4,30 +4,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.checkProjectChangeByGit = exports.checkProjectChangeByContent = exports.PROJECT_MEMORY_PATH = exports.PROJECT_CONTENT_FILE_NAME = exports.MONOREPO_GIT_FILE_NAME = void 0;
|
|
7
|
-
|
|
8
7
|
var path = _interopRequireWildcard(require("path"));
|
|
9
|
-
|
|
10
8
|
var _nodeCoreLibrary = require("@rushstack/node-core-library");
|
|
11
|
-
|
|
12
9
|
var _packageDepsHash = require("@rushstack/package-deps-hash");
|
|
13
|
-
|
|
14
10
|
var _utils = require("@modern-js/utils");
|
|
15
|
-
|
|
16
11
|
var _md = _interopRequireDefault(require("md5"));
|
|
17
|
-
|
|
18
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
-
|
|
20
13
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
|
-
|
|
22
14
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
-
|
|
24
15
|
const PROJECT_CONTENT_FILE_NAME = 'project-content.json';
|
|
25
16
|
exports.PROJECT_CONTENT_FILE_NAME = PROJECT_CONTENT_FILE_NAME;
|
|
26
17
|
const MONOREPO_GIT_FILE_NAME = 'monorepo-git.json';
|
|
27
18
|
exports.MONOREPO_GIT_FILE_NAME = MONOREPO_GIT_FILE_NAME;
|
|
28
19
|
const PROJECT_MEMORY_PATH = '.project-memory';
|
|
29
20
|
exports.PROJECT_MEMORY_PATH = PROJECT_MEMORY_PATH;
|
|
30
|
-
|
|
31
21
|
const getProjectGitHash = async project => {
|
|
32
22
|
const projectDir = project.extra.path;
|
|
33
23
|
const globOption = {
|
|
@@ -40,43 +30,34 @@ const getProjectGitHash = async project => {
|
|
|
40
30
|
const globPattern = `${projectDir}/**`;
|
|
41
31
|
const files = await (0, _utils.globby)(path.posix.join(globPattern), globOption);
|
|
42
32
|
const hashMap = (0, _packageDepsHash.getGitHashForFiles)(files, projectDir);
|
|
43
|
-
const hashObject = {};
|
|
33
|
+
const hashObject = {};
|
|
44
34
|
|
|
35
|
+
// sort is important
|
|
45
36
|
_nodeCoreLibrary.Sort.sortMapKeys(hashMap);
|
|
46
|
-
|
|
47
37
|
hashMap.forEach((value, key) => {
|
|
48
38
|
hashObject[key] = value;
|
|
49
39
|
});
|
|
50
40
|
return (0, _md.default)(_nodeCoreLibrary.JsonFile.stringify(hashObject));
|
|
51
41
|
};
|
|
52
|
-
|
|
53
42
|
const checkProjectChangeByGit = async (project, rootPath) => {
|
|
54
43
|
const monorepoGitMemory = path.join(rootPath, MONOREPO_GIT_FILE_NAME);
|
|
55
44
|
const currentProjectHash = await getProjectGitHash(project);
|
|
56
|
-
|
|
57
45
|
if (!_nodeCoreLibrary.FileSystem.exists(monorepoGitMemory)) {
|
|
58
46
|
_nodeCoreLibrary.FileSystem.writeFile(monorepoGitMemory, _nodeCoreLibrary.JsonFile.stringify({}), {
|
|
59
47
|
ensureFolderExists: true
|
|
60
48
|
});
|
|
61
49
|
}
|
|
62
|
-
|
|
63
50
|
const monorepoProjectHashJson = _nodeCoreLibrary.JsonFile.load(monorepoGitMemory);
|
|
64
|
-
|
|
65
51
|
const changed = monorepoProjectHashJson[project.name] !== currentProjectHash;
|
|
66
|
-
|
|
67
52
|
if (changed) {
|
|
68
53
|
monorepoProjectHashJson[project.name] = currentProjectHash;
|
|
69
|
-
|
|
70
54
|
_nodeCoreLibrary.FileSystem.writeFile(monorepoGitMemory, _nodeCoreLibrary.JsonFile.stringify(monorepoProjectHashJson), {
|
|
71
55
|
ensureFolderExists: true
|
|
72
56
|
});
|
|
73
57
|
}
|
|
74
|
-
|
|
75
58
|
return changed;
|
|
76
59
|
};
|
|
77
|
-
|
|
78
60
|
exports.checkProjectChangeByGit = checkProjectChangeByGit;
|
|
79
|
-
|
|
80
61
|
const getProjectContentHashObjectForFiles = async project => {
|
|
81
62
|
const projectDir = project.extra.path;
|
|
82
63
|
const globOption = {
|
|
@@ -88,42 +69,32 @@ const getProjectContentHashObjectForFiles = async project => {
|
|
|
88
69
|
};
|
|
89
70
|
const globPattern = `${projectDir}/**`;
|
|
90
71
|
const files = await (0, _utils.globby)(path.posix.join(globPattern), globOption);
|
|
91
|
-
const hashObject = {};
|
|
92
|
-
|
|
72
|
+
const hashObject = {};
|
|
73
|
+
// sort is important
|
|
93
74
|
for (const file of files.sort()) {
|
|
94
75
|
hashObject[file] = (0, _md.default)(_nodeCoreLibrary.FileSystem.readFile(file));
|
|
95
76
|
}
|
|
96
|
-
|
|
97
77
|
return hashObject;
|
|
98
78
|
};
|
|
99
|
-
|
|
100
79
|
const checkProjectChangeByContent = async project => {
|
|
101
80
|
const projectDir = project.extra.path;
|
|
102
81
|
const projectMemoryFolder = path.resolve(projectDir, '.project-memory');
|
|
103
82
|
const projectJsonFile = path.join(projectMemoryFolder, PROJECT_CONTENT_FILE_NAME);
|
|
104
83
|
const currentHashObject = await getProjectContentHashObjectForFiles(project);
|
|
105
|
-
|
|
106
84
|
const currentHashString = _nodeCoreLibrary.JsonFile.stringify(currentHashObject);
|
|
107
|
-
|
|
108
85
|
if (!_nodeCoreLibrary.FileSystem.exists(projectJsonFile)) {
|
|
109
86
|
_nodeCoreLibrary.FileSystem.writeFile(projectJsonFile, currentHashString, {
|
|
110
87
|
ensureFolderExists: true
|
|
111
88
|
});
|
|
112
|
-
|
|
113
89
|
return true;
|
|
114
90
|
}
|
|
115
|
-
|
|
116
91
|
const localHashObject = _nodeCoreLibrary.JsonFile.load(projectJsonFile);
|
|
117
|
-
|
|
118
92
|
const changed = _nodeCoreLibrary.JsonFile.stringify(localHashObject) !== currentHashString;
|
|
119
|
-
|
|
120
93
|
if (changed) {
|
|
121
94
|
_nodeCoreLibrary.FileSystem.writeFile(projectJsonFile, currentHashString, {
|
|
122
95
|
ensureFolderExists: true
|
|
123
96
|
});
|
|
124
97
|
}
|
|
125
|
-
|
|
126
98
|
return changed;
|
|
127
99
|
};
|
|
128
|
-
|
|
129
100
|
exports.checkProjectChangeByContent = checkProjectChangeByContent;
|
|
@@ -4,24 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.clearProjectsMemoryFile = void 0;
|
|
7
|
-
|
|
8
7
|
var path = _interopRequireWildcard(require("path"));
|
|
9
|
-
|
|
10
8
|
var _nodeCoreLibrary = require("@rushstack/node-core-library");
|
|
11
|
-
|
|
12
9
|
var _checkProjectChange = require("./check-project-change");
|
|
13
|
-
|
|
14
10
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
-
|
|
16
11
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
-
|
|
18
12
|
const clearProjectsMemoryFile = projects => {
|
|
19
13
|
for (const project of projects) {
|
|
20
14
|
const memoryFilePath = path.join(project.extra.path, _checkProjectChange.PROJECT_MEMORY_PATH, _checkProjectChange.PROJECT_CONTENT_FILE_NAME);
|
|
21
15
|
console.info('remove', memoryFilePath);
|
|
22
|
-
|
|
23
16
|
_nodeCoreLibrary.FileSystem.deleteFile(memoryFilePath);
|
|
24
17
|
}
|
|
25
18
|
};
|
|
26
|
-
|
|
27
19
|
exports.clearProjectsMemoryFile = clearProjectsMemoryFile;
|
|
@@ -4,33 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.syncGetProjectsByPackageConfig = exports.getProjectsByPackageConfig = void 0;
|
|
7
|
-
|
|
8
7
|
var path = _interopRequireWildcard(require("path"));
|
|
9
|
-
|
|
10
8
|
var _nodeCoreLibrary = require("@rushstack/node-core-library");
|
|
11
|
-
|
|
12
9
|
var _utils = require("@modern-js/utils");
|
|
13
|
-
|
|
14
10
|
var _pMap = _interopRequireDefault(require("p-map"));
|
|
15
|
-
|
|
16
11
|
var _error = require("../log/error");
|
|
17
|
-
|
|
18
12
|
var _package = require("../package");
|
|
19
|
-
|
|
20
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
|
|
22
14
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
-
|
|
24
15
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
-
|
|
26
16
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
27
|
-
|
|
28
17
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
29
|
-
|
|
30
18
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
31
|
-
|
|
32
19
|
const normalize = results => results.map(fp => path.normalize(fp));
|
|
33
|
-
|
|
34
20
|
const getGlobOpts = (rootPath, packageConfigs, ignore = []) => {
|
|
35
21
|
const globOpts = {
|
|
36
22
|
cwd: rootPath,
|
|
@@ -38,45 +24,41 @@ const getGlobOpts = (rootPath, packageConfigs, ignore = []) => {
|
|
|
38
24
|
expandDirectories: false,
|
|
39
25
|
followSymbolicLinks: false
|
|
40
26
|
};
|
|
41
|
-
|
|
42
27
|
if (packageConfigs.some(cfg => cfg.includes('**'))) {
|
|
43
28
|
if (packageConfigs.some(cfg => cfg.includes('node_modules'))) {
|
|
44
29
|
(0, _error.errorLog)('An explicit node_modules package path does not allow globstars (**)');
|
|
45
30
|
}
|
|
46
|
-
|
|
47
|
-
|
|
31
|
+
globOpts.ignore = [
|
|
32
|
+
// allow globs like "packages/**",
|
|
48
33
|
// but avoid picking up node_modules/**/package.json and dist/**/package.json
|
|
49
34
|
'**/dist/**', '**/node_modules/**', ...(ignore || [])];
|
|
50
35
|
}
|
|
51
|
-
|
|
52
36
|
return globOpts;
|
|
53
37
|
};
|
|
54
|
-
|
|
55
38
|
const makeFileFinder = (rootPath, packageConfigs, ignoreConfigs = []) => {
|
|
56
39
|
const globOpts = getGlobOpts(rootPath, packageConfigs, ignoreConfigs);
|
|
57
40
|
return async (fileName, fileMapper, customGlobOpts = {}) => {
|
|
58
41
|
const options = _objectSpread(_objectSpread({}, customGlobOpts), globOpts);
|
|
59
|
-
|
|
60
42
|
const promise = (0, _pMap.default)(Array.from(packageConfigs).sort(), async globPath => {
|
|
61
|
-
let result = await (0, _utils.globby)(path.posix.join(globPath, fileName), options);
|
|
62
|
-
|
|
63
|
-
result = result.sort(); // POSIX results always need to be normalized
|
|
43
|
+
let result = await (0, _utils.globby)(path.posix.join(globPath, fileName), options);
|
|
64
44
|
|
|
45
|
+
// fast-glob does not respect pattern order, so we re-sort by absolute path
|
|
46
|
+
result = result.sort();
|
|
47
|
+
// POSIX results always need to be normalized
|
|
65
48
|
result = normalize(result);
|
|
66
49
|
return fileMapper(result);
|
|
67
50
|
}, {
|
|
68
51
|
concurrency: packageConfigs.length || Infinity
|
|
69
|
-
});
|
|
52
|
+
});
|
|
70
53
|
|
|
54
|
+
// always flatten the results
|
|
71
55
|
const results = await promise;
|
|
72
56
|
return results.reduce((acc, result) => acc.concat(result), []);
|
|
73
57
|
};
|
|
74
58
|
};
|
|
75
|
-
|
|
76
59
|
const getProjectsByPackageConfig = async (rootPath, packagesConfig, ignoreConfigs) => {
|
|
77
60
|
const finder = makeFileFinder(rootPath, packagesConfig, ignoreConfigs);
|
|
78
61
|
const fileName = 'package.json';
|
|
79
|
-
|
|
80
62
|
const mapper = packageConfigPath => {
|
|
81
63
|
const packageJsonLookup = new _nodeCoreLibrary.PackageJsonLookup({
|
|
82
64
|
loadExtraFields: true
|
|
@@ -84,40 +66,31 @@ const getProjectsByPackageConfig = async (rootPath, packagesConfig, ignoreConfig
|
|
|
84
66
|
const packageJson = packageJsonLookup.loadNodePackageJson(packageConfigPath);
|
|
85
67
|
return new _package.Package(packageJson, path.dirname(packageConfigPath), rootPath);
|
|
86
68
|
};
|
|
87
|
-
|
|
88
69
|
const projects = await finder(fileName, filePaths => (0, _pMap.default)(filePaths, mapper, {
|
|
89
70
|
concurrency: filePaths.length || Infinity
|
|
90
71
|
}), {});
|
|
91
72
|
return projects;
|
|
92
73
|
};
|
|
93
|
-
|
|
94
74
|
exports.getProjectsByPackageConfig = getProjectsByPackageConfig;
|
|
95
|
-
|
|
96
75
|
const makeSyncFileFinder = (rootPath, packageConfigs, ignoreConfigs = []) => {
|
|
97
76
|
const globOpts = getGlobOpts(rootPath, packageConfigs, ignoreConfigs);
|
|
98
77
|
return (fileName, fileMapper, customGlobOpts = {}) => {
|
|
99
78
|
const results = [];
|
|
100
|
-
|
|
101
79
|
const options = _objectSpread(_objectSpread({}, customGlobOpts), globOpts);
|
|
102
|
-
|
|
103
80
|
for (const globPath of Array.from(packageConfigs).sort()) {
|
|
104
|
-
let result = _utils.globby.sync(path.posix.join(globPath, fileName), options);
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
81
|
+
let result = _utils.globby.sync(path.posix.join(globPath, fileName), options);
|
|
82
|
+
// fast-glob does not respect pattern order, so we re-sort by absolute path
|
|
83
|
+
result = result.sort();
|
|
84
|
+
// POSIX results always need to be normalized
|
|
109
85
|
result = normalize(result);
|
|
110
86
|
results.push(fileMapper(result));
|
|
111
87
|
}
|
|
112
|
-
|
|
113
88
|
return results.reduce((acc, result) => acc.concat(result), []);
|
|
114
89
|
};
|
|
115
90
|
};
|
|
116
|
-
|
|
117
91
|
const syncGetProjectsByPackageConfig = (rootPath, packagesConfig, ignoreConfigs) => {
|
|
118
92
|
const finder = makeSyncFileFinder(rootPath, packagesConfig, ignoreConfigs);
|
|
119
93
|
const fileName = 'package.json';
|
|
120
|
-
|
|
121
94
|
const mapper = packageConfigPath => {
|
|
122
95
|
const packageJsonLookup = new _nodeCoreLibrary.PackageJsonLookup({
|
|
123
96
|
loadExtraFields: true
|
|
@@ -125,9 +98,7 @@ const syncGetProjectsByPackageConfig = (rootPath, packagesConfig, ignoreConfigs)
|
|
|
125
98
|
const packageJson = packageJsonLookup.loadNodePackageJson(packageConfigPath);
|
|
126
99
|
return new _package.Package(packageJson, path.dirname(packageConfigPath), rootPath);
|
|
127
100
|
};
|
|
128
|
-
|
|
129
101
|
const projects = finder(fileName, filePaths => filePaths.map(filePath => mapper(filePath)), {});
|
|
130
102
|
return projects;
|
|
131
103
|
};
|
|
132
|
-
|
|
133
104
|
exports.syncGetProjectsByPackageConfig = syncGetProjectsByPackageConfig;
|