@lage-run/cli 0.6.1 → 0.6.3
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 +37 -1
- package/CHANGELOG.md +19 -2
- package/lib/commands/cache/cacheDir.d.ts +0 -3
- package/lib/commands/cache/cacheDir.js +3 -19
- package/lib/commands/cache/runners/ClearCacheRunner.js +10 -2
- package/lib/commands/cache/runners/PruneCacheRunner.js +10 -2
- package/package.json +3 -3
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,43 @@
|
|
|
2
2
|
"name": "@lage-run/cli",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Fri, 27 Jan 2023 00:28:03 GMT",
|
|
6
|
+
"tag": "@lage-run/cli_v0.6.3",
|
|
7
|
+
"version": "0.6.3",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "beachball",
|
|
12
|
+
"package": "@lage-run/cli",
|
|
13
|
+
"comment": "Bump @lage-run/scheduler to v0.8.1",
|
|
14
|
+
"commit": "b0f0b5a7773a71c111799f3a3b0a48a7824b838b"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@lage-run/cli",
|
|
19
|
+
"comment": "Bump @lage-run/reporters to v0.3.1",
|
|
20
|
+
"commit": "b0f0b5a7773a71c111799f3a3b0a48a7824b838b"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"date": "Wed, 18 Jan 2023 23:27:05 GMT",
|
|
27
|
+
"tag": "@lage-run/cli_v0.6.2",
|
|
28
|
+
"version": "0.6.2",
|
|
29
|
+
"comments": {
|
|
30
|
+
"patch": [
|
|
31
|
+
{
|
|
32
|
+
"author": "kchau@microsoft.com",
|
|
33
|
+
"package": "@lage-run/cli",
|
|
34
|
+
"commit": "a81971fa10a5b39552f79e062e120808302580ce",
|
|
35
|
+
"comment": "get rid of any imports not from node built-ins for these runners"
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"date": "Wed, 18 Jan 2023 19:11:10 GMT",
|
|
6
42
|
"tag": "@lage-run/cli_v0.6.1",
|
|
7
43
|
"version": "0.6.1",
|
|
8
44
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,29 @@
|
|
|
1
1
|
# Change Log - @lage-run/cli
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 27 Jan 2023 00:28:03 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.6.3
|
|
8
|
+
|
|
9
|
+
Fri, 27 Jan 2023 00:28:03 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- Bump @lage-run/scheduler to v0.8.1
|
|
14
|
+
- Bump @lage-run/reporters to v0.3.1
|
|
15
|
+
|
|
16
|
+
## 0.6.2
|
|
17
|
+
|
|
18
|
+
Wed, 18 Jan 2023 23:27:05 GMT
|
|
19
|
+
|
|
20
|
+
### Patches
|
|
21
|
+
|
|
22
|
+
- get rid of any imports not from node built-ins for these runners (kchau@microsoft.com)
|
|
23
|
+
|
|
7
24
|
## 0.6.1
|
|
8
25
|
|
|
9
|
-
Wed, 18 Jan 2023 19:11:
|
|
26
|
+
Wed, 18 Jan 2023 19:11:10 GMT
|
|
10
27
|
|
|
11
28
|
### Patches
|
|
12
29
|
|
|
@@ -2,18 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
get: all[name]
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
getCacheDir: ()=>getCacheDir,
|
|
13
|
-
removeCacheEntry: ()=>removeCacheEntry
|
|
5
|
+
Object.defineProperty(exports, "getCacheDir", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: ()=>getCacheDir
|
|
14
8
|
});
|
|
15
9
|
const _path = /*#__PURE__*/ _interopRequireDefault(require("path"));
|
|
16
|
-
const _promises = require("fs/promises");
|
|
17
10
|
function _interopRequireDefault(obj) {
|
|
18
11
|
return obj && obj.__esModule ? obj : {
|
|
19
12
|
default: obj
|
|
@@ -23,12 +16,3 @@ function getCacheDir(workspace, internalCacheFolder) {
|
|
|
23
16
|
const cacheFolder = !internalCacheFolder ? undefined : internalCacheFolder;
|
|
24
17
|
return _path.default.join(workspace, cacheFolder ?? "node_modules/.cache/backfill");
|
|
25
18
|
}
|
|
26
|
-
async function removeCacheEntry(entryPath, entryStat) {
|
|
27
|
-
if (entryStat.isDirectory()) {
|
|
28
|
-
return (0, _promises.rm)(entryPath, {
|
|
29
|
-
recursive: true
|
|
30
|
-
});
|
|
31
|
-
} else {
|
|
32
|
-
return (0, _promises.unlink)(entryPath);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -9,7 +9,6 @@ Object.defineProperty(exports, "ClearCacheRunner", {
|
|
|
9
9
|
const _fs = /*#__PURE__*/ _interopRequireDefault(require("fs"));
|
|
10
10
|
const _path = /*#__PURE__*/ _interopRequireDefault(require("path"));
|
|
11
11
|
const _promises = require("fs/promises");
|
|
12
|
-
const _cacheDirJs = require("../cacheDir.js");
|
|
13
12
|
function _interopRequireDefault(obj) {
|
|
14
13
|
return obj && obj.__esModule ? obj : {
|
|
15
14
|
default: obj
|
|
@@ -28,9 +27,18 @@ class ClearCacheRunner {
|
|
|
28
27
|
for (const entry of entries){
|
|
29
28
|
const entryPath = _path.default.join(cachePath, entry);
|
|
30
29
|
const entryStat = await (0, _promises.stat)(entryPath);
|
|
31
|
-
await
|
|
30
|
+
await removeCacheEntry(entryPath, entryStat);
|
|
32
31
|
}
|
|
33
32
|
}
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
35
|
}
|
|
36
|
+
async function removeCacheEntry(entryPath, entryStat) {
|
|
37
|
+
if (entryStat.isDirectory()) {
|
|
38
|
+
return (0, _promises.rm)(entryPath, {
|
|
39
|
+
recursive: true
|
|
40
|
+
});
|
|
41
|
+
} else {
|
|
42
|
+
return (0, _promises.unlink)(entryPath);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -9,7 +9,6 @@ Object.defineProperty(exports, "PruneCacheRunner", {
|
|
|
9
9
|
const _fs = /*#__PURE__*/ _interopRequireDefault(require("fs"));
|
|
10
10
|
const _path = /*#__PURE__*/ _interopRequireDefault(require("path"));
|
|
11
11
|
const _promises = require("fs/promises");
|
|
12
|
-
const _cacheDirJs = require("../cacheDir.js");
|
|
13
12
|
function _interopRequireDefault(obj) {
|
|
14
13
|
return obj && obj.__esModule ? obj : {
|
|
15
14
|
default: obj
|
|
@@ -30,10 +29,19 @@ class PruneCacheRunner {
|
|
|
30
29
|
const entryPath = _path.default.join(cachePath, entry);
|
|
31
30
|
const entryStat = await (0, _promises.stat)(entryPath);
|
|
32
31
|
if (now - entryStat.mtime.getTime() > prunePeriod * MS_IN_A_DAY) {
|
|
33
|
-
await
|
|
32
|
+
await removeCacheEntry(entryPath, entryStat);
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
35
|
}
|
|
37
36
|
}
|
|
38
37
|
}
|
|
39
38
|
}
|
|
39
|
+
async function removeCacheEntry(entryPath, entryStat) {
|
|
40
|
+
if (entryStat.isDirectory()) {
|
|
41
|
+
return (0, _promises.rm)(entryPath, {
|
|
42
|
+
recursive: true
|
|
43
|
+
});
|
|
44
|
+
} else {
|
|
45
|
+
return (0, _promises.unlink)(entryPath);
|
|
46
|
+
}
|
|
47
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lage-run/cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"description": "Command Line Interface for Lage",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/microsoft/lage"
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@lage-run/find-npm-client": "^0.1.4",
|
|
22
22
|
"@lage-run/logger": "^1.2.2",
|
|
23
|
-
"@lage-run/scheduler": "^0.8.
|
|
23
|
+
"@lage-run/scheduler": "^0.8.1",
|
|
24
24
|
"@lage-run/scheduler-types": "^0.3.0",
|
|
25
25
|
"@lage-run/target-graph": "^0.6.1",
|
|
26
26
|
"@lage-run/cache": "^0.2.3",
|
|
27
|
-
"@lage-run/reporters": "^0.3.
|
|
27
|
+
"@lage-run/reporters": "^0.3.1",
|
|
28
28
|
"commander": "^9.4.0",
|
|
29
29
|
"workspace-tools": "^0.29.0",
|
|
30
30
|
"chokidar": "3.5.3",
|