@lage-run/cli 0.12.0 → 0.13.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.json +73 -1
- package/CHANGELOG.md +25 -2
- package/lib/commands/affected/action.js +1 -1
- package/lib/commands/createReporter.js +13 -1
- package/lib/commands/run/infoAction.js +1 -1
- package/lib/commands/run/runAction.js +1 -1
- package/lib/commands/run/watchAction.js +2 -2
- package/lib/commands/run/watcher.d.ts +2 -1
- package/lib/commands/run/watcher.js +1 -2
- package/package.json +8 -8
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,79 @@
|
|
|
2
2
|
"name": "@lage-run/cli",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "Thu,
|
|
5
|
+
"date": "Thu, 06 Apr 2023 22:27:27 GMT",
|
|
6
|
+
"tag": "@lage-run/cli_v0.13.1",
|
|
7
|
+
"version": "0.13.1",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "kchau@microsoft.com",
|
|
12
|
+
"package": "@lage-run/cli",
|
|
13
|
+
"commit": "ec15819ad8677a57ed2c7b8ce55538da69095c3b",
|
|
14
|
+
"comment": "bumps workspace-tools and use async packageinfos"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@lage-run/cli",
|
|
19
|
+
"comment": "Bump @lage-run/config to v0.1.2",
|
|
20
|
+
"commit": "ec15819ad8677a57ed2c7b8ce55538da69095c3b"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@lage-run/cli",
|
|
25
|
+
"comment": "Bump @lage-run/scheduler to v0.11.1",
|
|
26
|
+
"commit": "ec15819ad8677a57ed2c7b8ce55538da69095c3b"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@lage-run/cli",
|
|
31
|
+
"comment": "Bump @lage-run/scheduler-types to v0.3.6",
|
|
32
|
+
"commit": "ec15819ad8677a57ed2c7b8ce55538da69095c3b"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "beachball",
|
|
36
|
+
"package": "@lage-run/cli",
|
|
37
|
+
"comment": "Bump @lage-run/target-graph to v0.8.2",
|
|
38
|
+
"commit": "ec15819ad8677a57ed2c7b8ce55538da69095c3b"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"author": "beachball",
|
|
42
|
+
"package": "@lage-run/cli",
|
|
43
|
+
"comment": "Bump @lage-run/cache to v0.5.2",
|
|
44
|
+
"commit": "ec15819ad8677a57ed2c7b8ce55538da69095c3b"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"author": "beachball",
|
|
48
|
+
"package": "@lage-run/cli",
|
|
49
|
+
"comment": "Bump @lage-run/reporters to v1.1.1",
|
|
50
|
+
"commit": "ec15819ad8677a57ed2c7b8ce55538da69095c3b"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"date": "Sat, 01 Apr 2023 00:28:31 GMT",
|
|
57
|
+
"tag": "@lage-run/cli_v0.13.0",
|
|
58
|
+
"version": "0.13.0",
|
|
59
|
+
"comments": {
|
|
60
|
+
"minor": [
|
|
61
|
+
{
|
|
62
|
+
"author": "kchau@microsoft.com",
|
|
63
|
+
"package": "@lage-run/cli",
|
|
64
|
+
"commit": "884c8b5aba15cd1cc5f943c06a6a9da4af20f806",
|
|
65
|
+
"comment": "replace ink with @ms-cloudpack/task-reporter"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"author": "beachball",
|
|
69
|
+
"package": "@lage-run/cli",
|
|
70
|
+
"comment": "Bump @lage-run/reporters to v1.1.0",
|
|
71
|
+
"commit": "884c8b5aba15cd1cc5f943c06a6a9da4af20f806"
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"date": "Thu, 30 Mar 2023 23:46:52 GMT",
|
|
6
78
|
"tag": "@lage-run/cli_v0.12.0",
|
|
7
79
|
"version": "0.12.0",
|
|
8
80
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,35 @@
|
|
|
1
1
|
# Change Log - @lage-run/cli
|
|
2
2
|
|
|
3
|
-
This log was last generated on Thu,
|
|
3
|
+
This log was last generated on Thu, 06 Apr 2023 22:27:27 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.13.1
|
|
8
|
+
|
|
9
|
+
Thu, 06 Apr 2023 22:27:27 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- bumps workspace-tools and use async packageinfos (kchau@microsoft.com)
|
|
14
|
+
- Bump @lage-run/config to v0.1.2
|
|
15
|
+
- Bump @lage-run/scheduler to v0.11.1
|
|
16
|
+
- Bump @lage-run/scheduler-types to v0.3.6
|
|
17
|
+
- Bump @lage-run/target-graph to v0.8.2
|
|
18
|
+
- Bump @lage-run/cache to v0.5.2
|
|
19
|
+
- Bump @lage-run/reporters to v1.1.1
|
|
20
|
+
|
|
21
|
+
## 0.13.0
|
|
22
|
+
|
|
23
|
+
Sat, 01 Apr 2023 00:28:31 GMT
|
|
24
|
+
|
|
25
|
+
### Minor changes
|
|
26
|
+
|
|
27
|
+
- replace ink with @ms-cloudpack/task-reporter (kchau@microsoft.com)
|
|
28
|
+
- Bump @lage-run/reporters to v1.1.0
|
|
29
|
+
|
|
7
30
|
## 0.12.0
|
|
8
31
|
|
|
9
|
-
Thu, 30 Mar 2023 23:46:
|
|
32
|
+
Thu, 30 Mar 2023 23:46:52 GMT
|
|
10
33
|
|
|
11
34
|
### Minor changes
|
|
12
35
|
|
|
@@ -21,7 +21,7 @@ async function affectedAction(options) {
|
|
|
21
21
|
const config = await (0, _config.getConfig)(cwd);
|
|
22
22
|
const logger = (0, _logger.default)();
|
|
23
23
|
const root = (0, _workspaceTools.getWorkspaceRoot)(cwd);
|
|
24
|
-
const packageInfos = (0, _workspaceTools.
|
|
24
|
+
const packageInfos = await (0, _workspaceTools.getPackageInfosAsync)(root);
|
|
25
25
|
const packages = (0, _getFilteredPackagesJs.getFilteredPackages)({
|
|
26
26
|
root,
|
|
27
27
|
logger,
|
|
@@ -8,9 +8,20 @@ Object.defineProperty(exports, "createReporter", {
|
|
|
8
8
|
});
|
|
9
9
|
const _logger = require("@lage-run/logger");
|
|
10
10
|
const _reporters = require("@lage-run/reporters");
|
|
11
|
+
const _workspaceTools = require("workspace-tools");
|
|
12
|
+
const _fs = require("fs");
|
|
13
|
+
const _path = /*#__PURE__*/ _interopRequireDefault(require("path"));
|
|
14
|
+
function _interopRequireDefault(obj) {
|
|
15
|
+
return obj && obj.__esModule ? obj : {
|
|
16
|
+
default: obj
|
|
17
|
+
};
|
|
18
|
+
}
|
|
11
19
|
function createReporter(reporter, options) {
|
|
12
20
|
const { verbose , grouped , logLevel: logLevelName , concurrency , profile , progress } = options;
|
|
13
21
|
const logLevel = _logger.LogLevel[logLevelName];
|
|
22
|
+
const root = (0, _workspaceTools.findPackageRoot)(__filename);
|
|
23
|
+
const packageJson = JSON.parse((0, _fs.readFileSync)(_path.default.join(root, "package.json"), "utf-8"));
|
|
24
|
+
const version = packageJson.version;
|
|
14
25
|
switch(reporter){
|
|
15
26
|
case "profile":
|
|
16
27
|
return new _reporters.ChromeTraceEventsReporter({
|
|
@@ -36,7 +47,8 @@ function createReporter(reporter, options) {
|
|
|
36
47
|
default:
|
|
37
48
|
if (progress && !(logLevel >= _logger.LogLevel.verbose || verbose || grouped)) {
|
|
38
49
|
return new _reporters.ProgressReporter({
|
|
39
|
-
concurrency
|
|
50
|
+
concurrency,
|
|
51
|
+
version
|
|
40
52
|
});
|
|
41
53
|
}
|
|
42
54
|
return new _reporters.LogReporter({
|
|
@@ -23,7 +23,7 @@ async function infoAction(options, command) {
|
|
|
23
23
|
const logger = (0, _logger.default)();
|
|
24
24
|
// Build Target Graph
|
|
25
25
|
const root = (0, _workspaceTools.getWorkspaceRoot)(process.cwd());
|
|
26
|
-
const packageInfos = (0, _workspaceTools.
|
|
26
|
+
const packageInfos = await (0, _workspaceTools.getPackageInfosAsync)(root);
|
|
27
27
|
const { tasks } = (0, _filterArgsForTasksJs.filterArgsForTasks)(command.args);
|
|
28
28
|
const targetGraph = (0, _createTargetGraphJs.createTargetGraph)({
|
|
29
29
|
logger,
|
|
@@ -35,7 +35,7 @@ async function runAction(options, command) {
|
|
|
35
35
|
});
|
|
36
36
|
// Build Target Graph
|
|
37
37
|
const root = (0, _workspaceTools.getWorkspaceRoot)(process.cwd());
|
|
38
|
-
const packageInfos = (0, _workspaceTools.
|
|
38
|
+
const packageInfos = await (0, _workspaceTools.getPackageInfosAsync)(root);
|
|
39
39
|
const { tasks , taskArgs } = (0, _filterArgsForTasksJs.filterArgsForTasks)(command.args);
|
|
40
40
|
const targetGraph = (0, _createTargetGraphJs.createTargetGraph)({
|
|
41
41
|
logger,
|
|
@@ -67,7 +67,7 @@ async function watchAction(options, command) {
|
|
|
67
67
|
logger.addReporter(reporter);
|
|
68
68
|
// Build Target Graph
|
|
69
69
|
const root = (0, _workspaceTools.getWorkspaceRoot)(process.cwd());
|
|
70
|
-
const packageInfos = (0, _workspaceTools.
|
|
70
|
+
const packageInfos = await (0, _workspaceTools.getPackageInfosAsync)(root);
|
|
71
71
|
const { tasks , taskArgs } = (0, _filterArgsForTasksJs.filterArgsForTasks)(command.args);
|
|
72
72
|
const targetGraph = (0, _createTargetGraphJs.createTargetGraph)({
|
|
73
73
|
logger,
|
|
@@ -135,7 +135,7 @@ async function watchAction(options, command) {
|
|
|
135
135
|
targetRun.options.shouldCache = false;
|
|
136
136
|
}
|
|
137
137
|
// When initial run is done, disable fetching of caches on all targets, keep writing to the cache
|
|
138
|
-
const watcher = (0, _watcherJs.watch)(root);
|
|
138
|
+
const watcher = await (0, _watcherJs.watch)(root, packageInfos);
|
|
139
139
|
watcher.on("change", async (packageName)=>{
|
|
140
140
|
reporter.resetLogEntries();
|
|
141
141
|
const targets = new Map();
|
|
@@ -15,10 +15,9 @@ function _interopRequireDefault(obj) {
|
|
|
15
15
|
default: obj
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
function watch(cwd) {
|
|
18
|
+
function watch(cwd, packageInfos) {
|
|
19
19
|
const events = new _events.default();
|
|
20
20
|
const root = (0, _workspaceTools.getWorkspaceRoot)(cwd);
|
|
21
|
-
const packageInfos = (0, _workspaceTools.getPackageInfos)(cwd);
|
|
22
21
|
// generate a tree index of all the packages
|
|
23
22
|
const packageIndex = createPackageIndex(root, packageInfos);
|
|
24
23
|
const packagePaths = Object.values(packageInfos).map((pkg)=>_path.default.dirname(pkg.packageJsonPath));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lage-run/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "Command Line Interface for Lage",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/microsoft/lage"
|
|
@@ -18,16 +18,16 @@
|
|
|
18
18
|
"lint": "monorepo-scripts lint"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@lage-run/config": "^0.1.
|
|
21
|
+
"@lage-run/config": "^0.1.2",
|
|
22
22
|
"@lage-run/find-npm-client": "^0.1.4",
|
|
23
23
|
"@lage-run/logger": "^1.2.2",
|
|
24
|
-
"@lage-run/scheduler": "^0.11.
|
|
25
|
-
"@lage-run/scheduler-types": "^0.3.
|
|
26
|
-
"@lage-run/target-graph": "^0.8.
|
|
27
|
-
"@lage-run/cache": "^0.5.
|
|
28
|
-
"@lage-run/reporters": "^1.
|
|
24
|
+
"@lage-run/scheduler": "^0.11.1",
|
|
25
|
+
"@lage-run/scheduler-types": "^0.3.6",
|
|
26
|
+
"@lage-run/target-graph": "^0.8.2",
|
|
27
|
+
"@lage-run/cache": "^0.5.2",
|
|
28
|
+
"@lage-run/reporters": "^1.1.1",
|
|
29
29
|
"commander": "^9.4.0",
|
|
30
|
-
"workspace-tools": "^0.
|
|
30
|
+
"workspace-tools": "^0.32.0",
|
|
31
31
|
"chokidar": "3.5.3",
|
|
32
32
|
"fast-glob": "^3.2.11"
|
|
33
33
|
},
|