@lage-run/cli 0.15.1 → 0.15.2
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 +58 -1
- package/CHANGELOG.md +17 -2
- package/lib/cache/createCacheProvider.d.ts +14 -0
- package/lib/cache/createCacheProvider.js +24 -0
- package/lib/cache/isRunningFromCI.d.ts +1 -0
- package/lib/cache/isRunningFromCI.js +11 -0
- package/lib/commands/run/runAction.js +9 -0
- package/lib/commands/run/watchAction.js +9 -0
- package/package.json +8 -7
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,64 @@
|
|
|
2
2
|
"name": "@lage-run/cli",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "Mon, 08 May 2023
|
|
5
|
+
"date": "Mon, 08 May 2023 22:26:52 GMT",
|
|
6
|
+
"tag": "@lage-run/cli_v0.15.2",
|
|
7
|
+
"version": "0.15.2",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "kchau@microsoft.com",
|
|
12
|
+
"package": "@lage-run/cli",
|
|
13
|
+
"commit": "5a132808f166179bc316a279c9e11a13d3a39103",
|
|
14
|
+
"comment": "fixed to utilize the correct package for the hasher"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@lage-run/cli",
|
|
19
|
+
"comment": "Bump @lage-run/cache to v1.1.1",
|
|
20
|
+
"commit": "5a132808f166179bc316a279c9e11a13d3a39103"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@lage-run/cli",
|
|
25
|
+
"comment": "Bump @lage-run/config to v0.2.1",
|
|
26
|
+
"commit": "5a132808f166179bc316a279c9e11a13d3a39103"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@lage-run/cli",
|
|
31
|
+
"comment": "Bump @lage-run/hasher to v1.0.0",
|
|
32
|
+
"commit": "5a132808f166179bc316a279c9e11a13d3a39103"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "beachball",
|
|
36
|
+
"package": "@lage-run/cli",
|
|
37
|
+
"comment": "Bump @lage-run/reporters to v1.2.2",
|
|
38
|
+
"commit": "5a132808f166179bc316a279c9e11a13d3a39103"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"author": "beachball",
|
|
42
|
+
"package": "@lage-run/cli",
|
|
43
|
+
"comment": "Bump @lage-run/scheduler to v1.0.0",
|
|
44
|
+
"commit": "5a132808f166179bc316a279c9e11a13d3a39103"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"author": "beachball",
|
|
48
|
+
"package": "@lage-run/cli",
|
|
49
|
+
"comment": "Bump @lage-run/scheduler-types to v0.3.9",
|
|
50
|
+
"commit": "5a132808f166179bc316a279c9e11a13d3a39103"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"author": "beachball",
|
|
54
|
+
"package": "@lage-run/cli",
|
|
55
|
+
"comment": "Bump @lage-run/target-graph to v0.8.6",
|
|
56
|
+
"commit": "5a132808f166179bc316a279c9e11a13d3a39103"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"date": "Mon, 08 May 2023 16:33:24 GMT",
|
|
6
63
|
"tag": "@lage-run/cli_v0.15.1",
|
|
7
64
|
"version": "0.15.1",
|
|
8
65
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,27 @@
|
|
|
1
1
|
# Change Log - @lage-run/cli
|
|
2
2
|
|
|
3
|
-
This log was last generated on Mon, 08 May 2023
|
|
3
|
+
This log was last generated on Mon, 08 May 2023 22:26:52 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.15.2
|
|
8
|
+
|
|
9
|
+
Mon, 08 May 2023 22:26:52 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- fixed to utilize the correct package for the hasher (kchau@microsoft.com)
|
|
14
|
+
- Bump @lage-run/cache to v1.1.1
|
|
15
|
+
- Bump @lage-run/config to v0.2.1
|
|
16
|
+
- Bump @lage-run/hasher to v1.0.0
|
|
17
|
+
- Bump @lage-run/reporters to v1.2.2
|
|
18
|
+
- Bump @lage-run/scheduler to v1.0.0
|
|
19
|
+
- Bump @lage-run/scheduler-types to v0.3.9
|
|
20
|
+
- Bump @lage-run/target-graph to v0.8.6
|
|
21
|
+
|
|
7
22
|
## 0.15.1
|
|
8
23
|
|
|
9
|
-
Mon, 08 May 2023 16:33:
|
|
24
|
+
Mon, 08 May 2023 16:33:24 GMT
|
|
10
25
|
|
|
11
26
|
### Patches
|
|
12
27
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CacheOptions } from "@lage-run/cache";
|
|
2
|
+
import { TargetHasher } from "@lage-run/hasher";
|
|
3
|
+
import type { Logger } from "@lage-run/logger";
|
|
4
|
+
interface CreateCacheOptions {
|
|
5
|
+
cacheOptions?: CacheOptions;
|
|
6
|
+
logger: Logger;
|
|
7
|
+
root: string;
|
|
8
|
+
skipLocalCache: boolean;
|
|
9
|
+
cliArgs: string[];
|
|
10
|
+
}
|
|
11
|
+
export declare function createCache(options: CreateCacheOptions): Promise<{
|
|
12
|
+
hasher: TargetHasher;
|
|
13
|
+
}>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "createCache", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return createCache;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _hasher = require("@lage-run/hasher");
|
|
12
|
+
async function createCache(options) {
|
|
13
|
+
const { cacheOptions , root , cliArgs } = options;
|
|
14
|
+
const hasher = new _hasher.TargetHasher({
|
|
15
|
+
root,
|
|
16
|
+
environmentGlob: cacheOptions?.environmentGlob ?? [],
|
|
17
|
+
cacheKey: cacheOptions?.cacheKey,
|
|
18
|
+
cliArgs
|
|
19
|
+
});
|
|
20
|
+
await hasher.initialize();
|
|
21
|
+
return {
|
|
22
|
+
hasher
|
|
23
|
+
};
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isRunningFromCI: boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "isRunningFromCI", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return isRunningFromCI;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const isRunningFromCI = process.env.NODE_ENV !== "test" && (!!process.env.CI || !!process.env.TF_BUILD);
|
|
@@ -18,6 +18,7 @@ const _initializeReporters = require("../initializeReporters.js");
|
|
|
18
18
|
const _scheduler = require("@lage-run/scheduler");
|
|
19
19
|
const _logger = /*#__PURE__*/ _interop_require_default(require("@lage-run/logger"));
|
|
20
20
|
const _errors = require("../../types/errors.js");
|
|
21
|
+
const _createCacheProvider = require("../../cache/createCacheProvider.js");
|
|
21
22
|
function _interop_require_default(obj) {
|
|
22
23
|
return obj && obj.__esModule ? obj : {
|
|
23
24
|
default: obj
|
|
@@ -57,6 +58,13 @@ async function runAction(options, command) {
|
|
|
57
58
|
logger.verbose(`Running with ${concurrency} workers`);
|
|
58
59
|
const filteredPipeline = (0, _filterPipelineDefinitions.filterPipelineDefinitions)(targetGraph.targets.values(), config.pipeline);
|
|
59
60
|
const maxWorkersPerTaskMap = (0, _config.getMaxWorkersPerTaskFromOptions)(options.maxWorkersPerTask);
|
|
61
|
+
const { hasher } = await (0, _createCacheProvider.createCache)({
|
|
62
|
+
root,
|
|
63
|
+
logger,
|
|
64
|
+
cacheOptions: config.cacheOptions,
|
|
65
|
+
cliArgs: taskArgs,
|
|
66
|
+
skipLocalCache: options.skipLocalCache
|
|
67
|
+
});
|
|
60
68
|
const scheduler = new _scheduler.SimpleScheduler({
|
|
61
69
|
logger,
|
|
62
70
|
concurrency,
|
|
@@ -93,6 +101,7 @@ async function runAction(options, command) {
|
|
|
93
101
|
...(0, _config.getMaxWorkersPerTask)(filteredPipeline, concurrency),
|
|
94
102
|
...maxWorkersPerTaskMap
|
|
95
103
|
]),
|
|
104
|
+
hasher,
|
|
96
105
|
workerIdleMemoryLimit: config.workerIdleMemoryLimit
|
|
97
106
|
});
|
|
98
107
|
const summary = await scheduler.run(root, targetGraph);
|
|
@@ -18,6 +18,7 @@ const _reporters = require("@lage-run/reporters");
|
|
|
18
18
|
const _scheduler = require("@lage-run/scheduler");
|
|
19
19
|
const _watcher = require("./watcher.js");
|
|
20
20
|
const _logger = /*#__PURE__*/ _interop_require_wildcard(require("@lage-run/logger"));
|
|
21
|
+
const _createCacheProvider = require("../../cache/createCacheProvider.js");
|
|
21
22
|
function _getRequireWildcardCache(nodeInterop) {
|
|
22
23
|
if (typeof WeakMap !== "function") return null;
|
|
23
24
|
var cacheBabelInterop = new WeakMap();
|
|
@@ -89,6 +90,13 @@ async function watchAction(options, command) {
|
|
|
89
90
|
config.cacheOptions.writeRemoteCache = false;
|
|
90
91
|
const filteredPipeline = (0, _filterPipelineDefinitions.filterPipelineDefinitions)(targetGraph.targets.values(), config.pipeline);
|
|
91
92
|
const maxWorkersPerTaskMap = (0, _config.getMaxWorkersPerTaskFromOptions)(options.maxWorkersPerTask);
|
|
93
|
+
const { hasher } = await (0, _createCacheProvider.createCache)({
|
|
94
|
+
root,
|
|
95
|
+
logger,
|
|
96
|
+
cacheOptions: config.cacheOptions,
|
|
97
|
+
cliArgs: taskArgs,
|
|
98
|
+
skipLocalCache: options.skipLocalCache
|
|
99
|
+
});
|
|
92
100
|
const scheduler = new _scheduler.SimpleScheduler({
|
|
93
101
|
logger,
|
|
94
102
|
concurrency,
|
|
@@ -125,6 +133,7 @@ async function watchAction(options, command) {
|
|
|
125
133
|
...(0, _config.getMaxWorkersPerTask)(filteredPipeline, concurrency),
|
|
126
134
|
...maxWorkersPerTaskMap
|
|
127
135
|
]),
|
|
136
|
+
hasher,
|
|
128
137
|
workerIdleMemoryLimit: config.workerIdleMemoryLimit
|
|
129
138
|
});
|
|
130
139
|
// Initial run
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lage-run/cli",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.2",
|
|
4
4
|
"description": "Command Line Interface for Lage",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -20,14 +20,15 @@
|
|
|
20
20
|
"lint": "monorepo-scripts lint"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@lage-run/cache": "^
|
|
24
|
-
"@lage-run/config": "^0.2.
|
|
23
|
+
"@lage-run/cache": "^1.1.1",
|
|
24
|
+
"@lage-run/config": "^0.2.1",
|
|
25
25
|
"@lage-run/find-npm-client": "^0.1.4",
|
|
26
|
+
"@lage-run/hasher": "^1.0.0",
|
|
26
27
|
"@lage-run/logger": "^1.3.0",
|
|
27
|
-
"@lage-run/reporters": "^1.2.
|
|
28
|
-
"@lage-run/scheduler": "^0.
|
|
29
|
-
"@lage-run/scheduler-types": "^0.3.
|
|
30
|
-
"@lage-run/target-graph": "^0.8.
|
|
28
|
+
"@lage-run/reporters": "^1.2.2",
|
|
29
|
+
"@lage-run/scheduler": "^1.0.0",
|
|
30
|
+
"@lage-run/scheduler-types": "^0.3.9",
|
|
31
|
+
"@lage-run/target-graph": "^0.8.6",
|
|
31
32
|
"chokidar": "3.5.3",
|
|
32
33
|
"commander": "^9.4.0",
|
|
33
34
|
"execa": "5.1.1",
|