@lage-run/cli 0.4.9 → 0.4.11
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 +43 -1
- package/CHANGELOG.md +20 -2
- package/lib/commands/run/action.d.ts +2 -1
- package/lib/commands/run/action.js +9 -111
- package/lib/commands/run/action.js.map +1 -1
- package/lib/commands/run/createCacheProvider.d.ts +13 -0
- package/lib/commands/run/createCacheProvider.js +32 -0
- package/lib/commands/run/createCacheProvider.js.map +1 -0
- package/lib/commands/run/createTargetGraph.d.ts +22 -0
- package/lib/commands/run/createTargetGraph.js +36 -0
- package/lib/commands/run/createTargetGraph.js.map +1 -0
- package/lib/commands/run/filterArgsForTasks.d.ts +4 -0
- package/lib/commands/run/filterArgsForTasks.js +12 -0
- package/lib/commands/run/filterArgsForTasks.js.map +1 -0
- package/lib/commands/run/index.js +2 -1
- package/lib/commands/run/index.js.map +1 -1
- package/lib/commands/run/runAction.d.ts +18 -0
- package/lib/commands/run/runAction.js +87 -0
- package/lib/commands/run/runAction.js.map +1 -0
- package/lib/commands/run/watchAction.d.ts +18 -0
- package/lib/commands/run/watchAction.js +124 -0
- package/lib/commands/run/watchAction.js.map +1 -0
- package/lib/commands/run/watcher.d.ts +3 -0
- package/lib/commands/run/watcher.js +69 -0
- package/lib/commands/run/watcher.js.map +1 -0
- package/package.json +5 -4
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,49 @@
|
|
|
2
2
|
"name": "@lage-run/cli",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Sat, 08 Oct 2022 18:44:32 GMT",
|
|
6
|
+
"tag": "@lage-run/cli_v0.4.11",
|
|
7
|
+
"version": "0.4.11",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "beachball",
|
|
12
|
+
"package": "@lage-run/cli",
|
|
13
|
+
"comment": "Bump @lage-run/scheduler to v0.4.7",
|
|
14
|
+
"commit": "a59f3117c0d7085b6eafd7eb62d7bf91bb86354e"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Sat, 08 Oct 2022 17:43:37 GMT",
|
|
21
|
+
"tag": "@lage-run/cli_v0.4.10",
|
|
22
|
+
"version": "0.4.10",
|
|
23
|
+
"comments": {
|
|
24
|
+
"patch": [
|
|
25
|
+
{
|
|
26
|
+
"author": "ken@gizzar.com",
|
|
27
|
+
"package": "@lage-run/cli",
|
|
28
|
+
"commit": "1d21a0e79d11f86ec888f4893091940be4f3451b",
|
|
29
|
+
"comment": "adding a watch mode action"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"author": "beachball",
|
|
33
|
+
"package": "@lage-run/cli",
|
|
34
|
+
"comment": "Bump @lage-run/scheduler to v0.4.6",
|
|
35
|
+
"commit": "1d21a0e79d11f86ec888f4893091940be4f3451b"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"author": "beachball",
|
|
39
|
+
"package": "@lage-run/cli",
|
|
40
|
+
"comment": "Bump @lage-run/reporters to v0.2.22",
|
|
41
|
+
"commit": "1d21a0e79d11f86ec888f4893091940be4f3451b"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"date": "Thu, 06 Oct 2022 16:46:54 GMT",
|
|
6
48
|
"tag": "@lage-run/cli_v0.4.9",
|
|
7
49
|
"version": "0.4.9",
|
|
8
50
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
# Change Log - @lage-run/cli
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Sat, 08 Oct 2022 18:44:32 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.4.11
|
|
8
|
+
|
|
9
|
+
Sat, 08 Oct 2022 18:44:32 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- Bump @lage-run/scheduler to v0.4.7
|
|
14
|
+
|
|
15
|
+
## 0.4.10
|
|
16
|
+
|
|
17
|
+
Sat, 08 Oct 2022 17:43:37 GMT
|
|
18
|
+
|
|
19
|
+
### Patches
|
|
20
|
+
|
|
21
|
+
- adding a watch mode action (ken@gizzar.com)
|
|
22
|
+
- Bump @lage-run/scheduler to v0.4.6
|
|
23
|
+
- Bump @lage-run/reporters to v0.2.22
|
|
24
|
+
|
|
7
25
|
## 0.4.9
|
|
8
26
|
|
|
9
|
-
Thu, 06 Oct 2022 16:46:
|
|
27
|
+
Thu, 06 Oct 2022 16:46:54 GMT
|
|
10
28
|
|
|
11
29
|
### Patches
|
|
12
30
|
|
|
@@ -13,6 +13,7 @@ interface RunOptions extends ReporterInitOptions {
|
|
|
13
13
|
resetCache: boolean;
|
|
14
14
|
nodeArg: string;
|
|
15
15
|
ignore: string[];
|
|
16
|
+
unstableWatch: boolean;
|
|
16
17
|
}
|
|
17
|
-
export declare function
|
|
18
|
+
export declare function action(options: RunOptions, command: Command): Promise<void>;
|
|
18
19
|
export {};
|
|
@@ -1,117 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const getMaxWorkersPerTask_1 = require("../../config/getMaxWorkersPerTask");
|
|
13
|
-
const workspace_tools_1 = require("workspace-tools");
|
|
14
|
-
const reporters_1 = require("@lage-run/reporters");
|
|
15
|
-
const isRunningFromCI_1 = require("../isRunningFromCI");
|
|
16
|
-
const scheduler_1 = require("@lage-run/scheduler");
|
|
17
|
-
const target_graph_1 = require("@lage-run/target-graph");
|
|
18
|
-
const logger_1 = __importDefault(require("@lage-run/logger"));
|
|
19
|
-
function filterArgsForTasks(args) {
|
|
20
|
-
const optionsPosition = args.findIndex((arg) => arg.startsWith("-"));
|
|
21
|
-
return {
|
|
22
|
-
tasks: args.slice(0, optionsPosition === -1 ? undefined : optionsPosition),
|
|
23
|
-
taskArgs: optionsPosition === -1 ? [] : args.slice(optionsPosition),
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
async function runAction(options, command) {
|
|
27
|
-
var _a, _b, _c;
|
|
28
|
-
const cwd = process.cwd();
|
|
29
|
-
const config = await (0, getConfig_1.getConfig)(cwd);
|
|
30
|
-
// Configure logger
|
|
31
|
-
const logger = (0, logger_1.default)();
|
|
32
|
-
(0, reporters_1.initializeReporters)(logger, options);
|
|
33
|
-
if (options.profile !== undefined) {
|
|
34
|
-
const reporter = (0, createProfileReporter_1.createProfileReporter)(options);
|
|
35
|
-
logger.addReporter(reporter);
|
|
36
|
-
}
|
|
37
|
-
// Build Target Graph
|
|
38
|
-
const root = (0, workspace_tools_1.getWorkspaceRoot)(process.cwd());
|
|
39
|
-
const packageInfos = (0, workspace_tools_1.getPackageInfos)(root);
|
|
40
|
-
const builder = new target_graph_1.TargetGraphBuilder(root, packageInfos);
|
|
41
|
-
const { tasks, taskArgs } = filterArgsForTasks(command.args);
|
|
42
|
-
const packages = (0, getFilteredPackages_1.getFilteredPackages)({
|
|
43
|
-
root,
|
|
44
|
-
logger,
|
|
45
|
-
packageInfos,
|
|
46
|
-
includeDependencies: options.dependencies,
|
|
47
|
-
includeDependents: options.dependents,
|
|
48
|
-
since: options.since,
|
|
49
|
-
scope: options.scope,
|
|
50
|
-
repoWideChanges: config.repoWideChanges,
|
|
51
|
-
sinceIgnoreGlobs: options.ignore.concat(config.ignore),
|
|
52
|
-
});
|
|
53
|
-
for (const [id, definition] of Object.entries(config.pipeline)) {
|
|
54
|
-
if (Array.isArray(definition)) {
|
|
55
|
-
builder.addTargetConfig(id, {
|
|
56
|
-
cache: true,
|
|
57
|
-
dependsOn: definition,
|
|
58
|
-
options: {},
|
|
59
|
-
outputs: config.cacheOptions.outputGlob,
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
builder.addTargetConfig(id, definition);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
const targetGraph = builder.buildTargetGraph(tasks, packages);
|
|
67
|
-
const hasRemoteCacheConfig = !!((_a = config.cacheOptions) === null || _a === void 0 ? void 0 : _a.cacheStorageConfig) || !!process.env.BACKFILL_CACHE_PROVIDER || !!process.env.BACKFILL_CACHE_PROVIDER_OPTIONS;
|
|
68
|
-
// Create Cache Provider
|
|
69
|
-
const cacheProvider = new cache_1.RemoteFallbackCacheProvider({
|
|
70
|
-
root,
|
|
71
|
-
logger,
|
|
72
|
-
localCacheProvider: options.skipLocalCache === true
|
|
73
|
-
? undefined
|
|
74
|
-
: new cache_1.BackfillCacheProvider({
|
|
75
|
-
logger,
|
|
76
|
-
root,
|
|
77
|
-
cacheOptions: Object.assign({ outputGlob: config.cacheOptions.outputGlob }, (config.cacheOptions.internalCacheFolder && { internalCacheFolder: config.cacheOptions.internalCacheFolder })),
|
|
78
|
-
}),
|
|
79
|
-
remoteCacheProvider: hasRemoteCacheConfig ? new cache_1.BackfillCacheProvider({ logger, root, cacheOptions: config.cacheOptions }) : undefined,
|
|
80
|
-
writeRemoteCache: ((_b = config.cacheOptions) === null || _b === void 0 ? void 0 : _b.writeRemoteCache) === true || String(process.env.LAGE_WRITE_CACHE).toLowerCase() === "true" || isRunningFromCI_1.isRunningFromCI,
|
|
81
|
-
});
|
|
82
|
-
const hasher = new cache_1.TargetHasher({
|
|
83
|
-
root,
|
|
84
|
-
environmentGlob: config.cacheOptions.environmentGlob,
|
|
85
|
-
cacheKey: config.cacheOptions.cacheKey,
|
|
86
|
-
});
|
|
87
|
-
const scheduler = new scheduler_1.SimpleScheduler({
|
|
88
|
-
logger,
|
|
89
|
-
concurrency: options.concurrency,
|
|
90
|
-
cacheProvider,
|
|
91
|
-
hasher,
|
|
92
|
-
continueOnError: options.continue,
|
|
93
|
-
shouldCache: options.cache,
|
|
94
|
-
shouldResetCache: options.resetCache,
|
|
95
|
-
maxWorkersPerTask: (0, getMaxWorkersPerTask_1.getMaxWorkersPerTask)((_c = config.pipeline) !== null && _c !== void 0 ? _c : {}),
|
|
96
|
-
runners: Object.assign({ npmScript: {
|
|
97
|
-
script: require.resolve("./runners/NpmScriptRunner"),
|
|
98
|
-
options: {
|
|
99
|
-
nodeArg: options.nodeArg,
|
|
100
|
-
taskArgs,
|
|
101
|
-
npmCmd: (0, find_npm_client_1.findNpmClient)(config.npmClient),
|
|
102
|
-
},
|
|
103
|
-
}, worker: {
|
|
104
|
-
script: require.resolve("./runners/WorkerRunner"),
|
|
105
|
-
options: {},
|
|
106
|
-
} }, config.runners),
|
|
107
|
-
});
|
|
108
|
-
const summary = await scheduler.run(root, targetGraph);
|
|
109
|
-
if (summary.results !== "success") {
|
|
110
|
-
process.exitCode = 1;
|
|
3
|
+
exports.action = void 0;
|
|
4
|
+
const runAction_1 = require("./runAction");
|
|
5
|
+
const watchAction_1 = require("./watchAction");
|
|
6
|
+
async function action(options, command) {
|
|
7
|
+
if (options.unstableWatch) {
|
|
8
|
+
return (0, watchAction_1.watchAction)(options, command);
|
|
111
9
|
}
|
|
112
|
-
|
|
113
|
-
|
|
10
|
+
else {
|
|
11
|
+
return (0, runAction_1.runAction)(options, command);
|
|
114
12
|
}
|
|
115
13
|
}
|
|
116
|
-
exports.
|
|
14
|
+
exports.action = action;
|
|
117
15
|
//# sourceMappingURL=action.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.js","sourceRoot":"","sources":["../../../src/commands/run/action.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"action.js","sourceRoot":"","sources":["../../../src/commands/run/action.ts"],"names":[],"mappings":";;;AACA,2CAAwC;AACxC,+CAA4C;AAmBrC,KAAK,UAAU,MAAM,CAAC,OAAmB,EAAE,OAAgB;IAChE,IAAI,OAAO,CAAC,aAAa,EAAE;QACzB,OAAO,IAAA,yBAAW,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;KACtC;SAAM;QACL,OAAO,IAAA,qBAAS,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;KACpC;AACH,CAAC;AAND,wBAMC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CacheOptions, RemoteFallbackCacheProvider, TargetHasher } from "@lage-run/cache";
|
|
2
|
+
import { Logger } from "@lage-run/logger";
|
|
3
|
+
interface CreateCacheOptions {
|
|
4
|
+
cacheOptions?: CacheOptions;
|
|
5
|
+
logger: Logger;
|
|
6
|
+
root: string;
|
|
7
|
+
skipLocalCache: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function createCache(options: CreateCacheOptions): {
|
|
10
|
+
cacheProvider: RemoteFallbackCacheProvider;
|
|
11
|
+
hasher: TargetHasher;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createCache = void 0;
|
|
4
|
+
const cache_1 = require("@lage-run/cache");
|
|
5
|
+
const isRunningFromCI_1 = require("../isRunningFromCI");
|
|
6
|
+
function createCache(options) {
|
|
7
|
+
var _a;
|
|
8
|
+
const { cacheOptions, logger, root, skipLocalCache } = options;
|
|
9
|
+
const hasRemoteCacheConfig = !!(cacheOptions === null || cacheOptions === void 0 ? void 0 : cacheOptions.cacheStorageConfig) || !!process.env.BACKFILL_CACHE_PROVIDER || !!process.env.BACKFILL_CACHE_PROVIDER_OPTIONS;
|
|
10
|
+
// Create Cache Provider
|
|
11
|
+
const cacheProvider = new cache_1.RemoteFallbackCacheProvider({
|
|
12
|
+
root,
|
|
13
|
+
logger,
|
|
14
|
+
localCacheProvider: skipLocalCache === true
|
|
15
|
+
? undefined
|
|
16
|
+
: new cache_1.BackfillCacheProvider({
|
|
17
|
+
logger,
|
|
18
|
+
root,
|
|
19
|
+
cacheOptions: Object.assign(Object.assign({ outputGlob: cacheOptions === null || cacheOptions === void 0 ? void 0 : cacheOptions.outputGlob }, ((cacheOptions === null || cacheOptions === void 0 ? void 0 : cacheOptions.internalCacheFolder) && { internalCacheFolder: cacheOptions.internalCacheFolder })), ((cacheOptions === null || cacheOptions === void 0 ? void 0 : cacheOptions.incrementalCaching) && { incrementalCaching: cacheOptions.incrementalCaching })),
|
|
20
|
+
}),
|
|
21
|
+
remoteCacheProvider: hasRemoteCacheConfig ? new cache_1.BackfillCacheProvider({ logger, root, cacheOptions: cacheOptions !== null && cacheOptions !== void 0 ? cacheOptions : {} }) : undefined,
|
|
22
|
+
writeRemoteCache: (cacheOptions === null || cacheOptions === void 0 ? void 0 : cacheOptions.writeRemoteCache) === true || String(process.env.LAGE_WRITE_CACHE).toLowerCase() === "true" || isRunningFromCI_1.isRunningFromCI,
|
|
23
|
+
});
|
|
24
|
+
const hasher = new cache_1.TargetHasher({
|
|
25
|
+
root,
|
|
26
|
+
environmentGlob: (_a = cacheOptions === null || cacheOptions === void 0 ? void 0 : cacheOptions.environmentGlob) !== null && _a !== void 0 ? _a : [],
|
|
27
|
+
cacheKey: cacheOptions === null || cacheOptions === void 0 ? void 0 : cacheOptions.cacheKey,
|
|
28
|
+
});
|
|
29
|
+
return { cacheProvider, hasher };
|
|
30
|
+
}
|
|
31
|
+
exports.createCache = createCache;
|
|
32
|
+
//# sourceMappingURL=createCacheProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createCacheProvider.js","sourceRoot":"","sources":["../../../src/commands/run/createCacheProvider.ts"],"names":[],"mappings":";;;AAAA,2CAAiH;AAEjH,wDAAqD;AASrD,SAAgB,WAAW,CAAC,OAA2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C,CAAC;IAEH,MAAM,MAAM,GAAG,IAAI,oBAAY,CAAC;QAC9B,IAAI;QACJ,eAAe,EAAE,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,eAAe,mCAAI,EAAE;QACpD,QAAQ,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,QAAQ;KACjC,CAAC,CAAC;IAEH,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC;AACnC,CAAC;AAlCD,kCAkCC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Logger } from "@lage-run/logger";
|
|
2
|
+
import { PackageInfos } from "workspace-tools";
|
|
3
|
+
import type { PipelineDefinition } from "../../types/PipelineDefinition";
|
|
4
|
+
interface CreateTargetGraphOptions {
|
|
5
|
+
logger: Logger;
|
|
6
|
+
root: string;
|
|
7
|
+
dependencies: boolean;
|
|
8
|
+
dependents: boolean;
|
|
9
|
+
since: string;
|
|
10
|
+
scope: string[];
|
|
11
|
+
ignore: string[];
|
|
12
|
+
repoWideChanges: string[];
|
|
13
|
+
pipeline: PipelineDefinition;
|
|
14
|
+
outputs: string[];
|
|
15
|
+
tasks: string[];
|
|
16
|
+
packageInfos: PackageInfos;
|
|
17
|
+
}
|
|
18
|
+
export declare function createTargetGraph(options: CreateTargetGraphOptions): {
|
|
19
|
+
targets: Map<string, import("@lage-run/target-graph").Target>;
|
|
20
|
+
dependencies: [string, string][];
|
|
21
|
+
};
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createTargetGraph = void 0;
|
|
4
|
+
const target_graph_1 = require("@lage-run/target-graph");
|
|
5
|
+
const getFilteredPackages_1 = require("../../filter/getFilteredPackages");
|
|
6
|
+
function createTargetGraph(options) {
|
|
7
|
+
const { logger, root, dependencies, dependents, since, scope, repoWideChanges, ignore, pipeline, outputs, tasks, packageInfos } = options;
|
|
8
|
+
const builder = new target_graph_1.TargetGraphBuilder(root, packageInfos);
|
|
9
|
+
const packages = (0, getFilteredPackages_1.getFilteredPackages)({
|
|
10
|
+
root,
|
|
11
|
+
logger,
|
|
12
|
+
packageInfos,
|
|
13
|
+
includeDependencies: dependencies,
|
|
14
|
+
includeDependents: dependents,
|
|
15
|
+
since,
|
|
16
|
+
scope,
|
|
17
|
+
repoWideChanges,
|
|
18
|
+
sinceIgnoreGlobs: ignore,
|
|
19
|
+
});
|
|
20
|
+
for (const [id, definition] of Object.entries(pipeline)) {
|
|
21
|
+
if (Array.isArray(definition)) {
|
|
22
|
+
builder.addTargetConfig(id, {
|
|
23
|
+
cache: true,
|
|
24
|
+
dependsOn: definition,
|
|
25
|
+
options: {},
|
|
26
|
+
outputs,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
builder.addTargetConfig(id, definition);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return builder.buildTargetGraph(tasks, packages);
|
|
34
|
+
}
|
|
35
|
+
exports.createTargetGraph = createTargetGraph;
|
|
36
|
+
//# sourceMappingURL=createTargetGraph.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createTargetGraph.js","sourceRoot":"","sources":["../../../src/commands/run/createTargetGraph.ts"],"names":[],"mappings":";;;AACA,yDAA4D;AAE5D,0EAAuE;AAmBvE,SAAgB,iBAAiB,CAAC,OAAiC;IACjE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC;IAE1I,MAAM,OAAO,GAAG,IAAI,iCAAkB,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IAE3D,MAAM,QAAQ,GAAG,IAAA,yCAAmB,EAAC;QACnC,IAAI;QACJ,MAAM;QACN,YAAY;QACZ,mBAAmB,EAAE,YAAY;QACjC,iBAAiB,EAAE,UAAU;QAC7B,KAAK;QACL,KAAK;QACL,eAAe;QACf,gBAAgB,EAAE,MAAM;KACzB,CAAC,CAAC;IAEH,KAAK,MAAM,CAAC,EAAE,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;QACvD,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;YAC7B,OAAO,CAAC,eAAe,CAAC,EAAE,EAAE;gBAC1B,KAAK,EAAE,IAAI;gBACX,SAAS,EAAE,UAAU;gBACrB,OAAO,EAAE,EAAE;gBACX,OAAO;aACR,CAAC,CAAC;SACJ;aAAM;YACL,OAAO,CAAC,eAAe,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;SACzC;KACF;IAED,OAAO,OAAO,CAAC,gBAAgB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AACnD,CAAC;AA/BD,8CA+BC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.filterArgsForTasks = void 0;
|
|
4
|
+
function filterArgsForTasks(args) {
|
|
5
|
+
const optionsPosition = args.findIndex((arg) => arg.startsWith("-"));
|
|
6
|
+
return {
|
|
7
|
+
tasks: args.slice(0, optionsPosition === -1 ? undefined : optionsPosition),
|
|
8
|
+
taskArgs: optionsPosition === -1 ? [] : args.slice(optionsPosition),
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
exports.filterArgsForTasks = filterArgsForTasks;
|
|
12
|
+
//# sourceMappingURL=filterArgsForTasks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filterArgsForTasks.js","sourceRoot":"","sources":["../../../src/commands/run/filterArgsForTasks.ts"],"names":[],"mappings":";;;AAAA,SAAgB,kBAAkB,CAAC,IAAc;IAC/C,MAAM,eAAe,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;IACrE,OAAO;QACL,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,eAAe,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC;QAC1E,QAAQ,EAAE,eAAe,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC;KACpE,CAAC;AACJ,CAAC;AAND,gDAMC"}
|
|
@@ -12,7 +12,7 @@ const isRunningFromCI_1 = require("../isRunningFromCI");
|
|
|
12
12
|
const runCommand = new commander_1.Command("run");
|
|
13
13
|
exports.runCommand = runCommand;
|
|
14
14
|
(0, addLoggerOptions_1.addLoggerOptions)(runCommand)
|
|
15
|
-
.action(action_1.
|
|
15
|
+
.action(action_1.action)
|
|
16
16
|
.option("-c, --concurrency <n>", "concurrency", (value) => {
|
|
17
17
|
if (value.endsWith("%")) {
|
|
18
18
|
return (parseInt(value.slice(0, -1)) / 100) * os_1.default.cpus().length;
|
|
@@ -36,6 +36,7 @@ exports.runCommand = runCommand;
|
|
|
36
36
|
.option("--ignore <ignore...>", "ignores files when calculating the scope with `--since` in addition to the files specified in lage.config", [])
|
|
37
37
|
.option("--nodearg|--node-arg <nodeArg>", 'arguments to be passed to node (e.g. --nodearg="--max_old_space_size=1234 --heap-prof" - set via "NODE_OPTIONS" environment variable')
|
|
38
38
|
.option("--continue", "continues the run even on error")
|
|
39
|
+
.option("--unstable-watch", "runs in watch mode")
|
|
39
40
|
.allowUnknownOption(true)
|
|
40
41
|
.addHelpCommand("[run] command1 [command2...commandN] [options]", "run commands")
|
|
41
42
|
.addHelpText("after", `
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/run/index.ts"],"names":[],"mappings":";;;;;;AAAA,yCAA4C;AAC5C,4CAAoB;AACpB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/run/index.ts"],"names":[],"mappings":";;;;;;AAAA,yCAA4C;AAC5C,4CAAoB;AACpB,qCAAkC;AAClC,0DAAuD;AACvD,wDAAqD;AAErD,MAAM,UAAU,GAAG,IAAI,mBAAO,CAAC,KAAK,CAAC,CAAC;AAyG7B,gCAAU;AAvGnB,IAAA,mCAAgB,EAAC,UAAU,CAAC;KACzB,MAAM,CAAC,eAAM,CAAC;KACd,MAAM,CACL,uBAAuB,EACvB,aAAa,EACb,CAAC,KAAK,EAAE,EAAE;IACR,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QACvB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,YAAE,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC;KAChE;SAAM;QACL,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,YAAE,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;KAChD;AACH,CAAC,EACD,YAAE,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CACrB;IACD,iBAAiB;KAChB,MAAM,CAAC,oBAAoB,EAAE,uGAAuG,CAAC;KACrI,MAAM,CAAC,2BAA2B,EAAE,wDAAwD,CAAC;KAC7F,MAAM,CAAC,uCAAuC,EAAE,sFAAsF,CAAC;KACvI,MAAM,CAAC,iBAAiB,EAAE,6EAA6E,CAAC;KACxG,MAAM,CAAC,iBAAiB,EAAE,yEAAyE,CAAC;IAErG,sBAAsB;KACrB,MAAM,CAAC,WAAW,EAAE,iBAAiB,EAAE,KAAK,CAAC;KAC7C,MAAM,CAAC,YAAY,EAAE,oBAAoB,CAAC;KAC1C,MAAM,CAAC,eAAe,EAAE,0CAA0C,CAAC;KACnE,MAAM,CAAC,oBAAoB,EAAE,6DAA6D,EAAE,iCAAe,CAAC;KAC5G,MAAM,CAAC,qBAAqB,EAAE,4EAA4E,CAAC;KAC3G,MAAM,CACL,sBAAsB,EACtB,2GAA2G,EAC3G,EAAE,CACH;KACA,MAAM,CACL,gCAAgC,EAChC,sIAAsI,CACvI;KACA,MAAM,CAAC,YAAY,EAAE,iCAAiC,CAAC;KACvD,MAAM,CAAC,kBAAkB,EAAE,oBAAoB,CAAC;KAChD,kBAAkB,CAAC,IAAI,CAAC;KACxB,cAAc,CAAC,gDAAgD,EAAE,cAAc,CAAC;KAChF,WAAW,CACV,OAAO,EACP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DH,CACE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import type { ReporterInitOptions } from "@lage-run/reporters";
|
|
3
|
+
interface RunOptions extends ReporterInitOptions {
|
|
4
|
+
concurrency: number;
|
|
5
|
+
profile: string | boolean | undefined;
|
|
6
|
+
dependencies: boolean;
|
|
7
|
+
dependents: boolean;
|
|
8
|
+
since: string;
|
|
9
|
+
scope: string[];
|
|
10
|
+
skipLocalCache: boolean;
|
|
11
|
+
continue: boolean;
|
|
12
|
+
cache: boolean;
|
|
13
|
+
resetCache: boolean;
|
|
14
|
+
nodeArg: string;
|
|
15
|
+
ignore: string[];
|
|
16
|
+
}
|
|
17
|
+
export declare function runAction(options: RunOptions, command: Command): Promise<void>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.runAction = void 0;
|
|
7
|
+
const createProfileReporter_1 = require("./createProfileReporter");
|
|
8
|
+
const find_npm_client_1 = require("@lage-run/find-npm-client");
|
|
9
|
+
const getConfig_1 = require("../../config/getConfig");
|
|
10
|
+
const getMaxWorkersPerTask_1 = require("../../config/getMaxWorkersPerTask");
|
|
11
|
+
const workspace_tools_1 = require("workspace-tools");
|
|
12
|
+
const reporters_1 = require("@lage-run/reporters");
|
|
13
|
+
const scheduler_1 = require("@lage-run/scheduler");
|
|
14
|
+
const logger_1 = __importDefault(require("@lage-run/logger"));
|
|
15
|
+
const filterArgsForTasks_1 = require("./filterArgsForTasks");
|
|
16
|
+
const createTargetGraph_1 = require("./createTargetGraph");
|
|
17
|
+
const createCacheProvider_1 = require("./createCacheProvider");
|
|
18
|
+
async function runAction(options, command) {
|
|
19
|
+
var _a;
|
|
20
|
+
const cwd = process.cwd();
|
|
21
|
+
const config = await (0, getConfig_1.getConfig)(cwd);
|
|
22
|
+
// Configure logger
|
|
23
|
+
const logger = (0, logger_1.default)();
|
|
24
|
+
(0, reporters_1.initializeReporters)(logger, options);
|
|
25
|
+
if (options.profile !== undefined) {
|
|
26
|
+
const reporter = (0, createProfileReporter_1.createProfileReporter)(options);
|
|
27
|
+
logger.addReporter(reporter);
|
|
28
|
+
}
|
|
29
|
+
// Build Target Graph
|
|
30
|
+
const root = (0, workspace_tools_1.getWorkspaceRoot)(process.cwd());
|
|
31
|
+
const packageInfos = (0, workspace_tools_1.getPackageInfos)(root);
|
|
32
|
+
const { tasks, taskArgs } = (0, filterArgsForTasks_1.filterArgsForTasks)(command.args);
|
|
33
|
+
const targetGraph = (0, createTargetGraph_1.createTargetGraph)({
|
|
34
|
+
logger,
|
|
35
|
+
root,
|
|
36
|
+
dependencies: options.dependencies,
|
|
37
|
+
dependents: options.dependents,
|
|
38
|
+
ignore: options.ignore.concat(config.ignore),
|
|
39
|
+
pipeline: config.pipeline,
|
|
40
|
+
repoWideChanges: config.repoWideChanges,
|
|
41
|
+
scope: options.scope,
|
|
42
|
+
since: options.since,
|
|
43
|
+
outputs: config.cacheOptions.outputGlob,
|
|
44
|
+
tasks,
|
|
45
|
+
packageInfos,
|
|
46
|
+
});
|
|
47
|
+
const { cacheProvider, hasher } = (0, createCacheProvider_1.createCache)({
|
|
48
|
+
root,
|
|
49
|
+
logger,
|
|
50
|
+
cacheOptions: config.cacheOptions,
|
|
51
|
+
skipLocalCache: options.skipLocalCache,
|
|
52
|
+
});
|
|
53
|
+
const scheduler = new scheduler_1.SimpleScheduler({
|
|
54
|
+
logger,
|
|
55
|
+
concurrency: options.concurrency,
|
|
56
|
+
cacheProvider,
|
|
57
|
+
hasher,
|
|
58
|
+
continueOnError: options.continue,
|
|
59
|
+
shouldCache: options.cache,
|
|
60
|
+
shouldResetCache: options.resetCache,
|
|
61
|
+
maxWorkersPerTask: (0, getMaxWorkersPerTask_1.getMaxWorkersPerTask)((_a = config.pipeline) !== null && _a !== void 0 ? _a : {}),
|
|
62
|
+
runners: Object.assign({ npmScript: {
|
|
63
|
+
script: require.resolve("./runners/NpmScriptRunner"),
|
|
64
|
+
options: {
|
|
65
|
+
nodeArg: options.nodeArg,
|
|
66
|
+
taskArgs,
|
|
67
|
+
npmCmd: (0, find_npm_client_1.findNpmClient)(config.npmClient),
|
|
68
|
+
},
|
|
69
|
+
}, worker: {
|
|
70
|
+
script: require.resolve("./runners/WorkerRunner"),
|
|
71
|
+
options: {},
|
|
72
|
+
} }, config.runners),
|
|
73
|
+
});
|
|
74
|
+
const summary = await scheduler.run(root, targetGraph);
|
|
75
|
+
await scheduler.cleanup();
|
|
76
|
+
displaySummaryAndExit(summary, logger.reporters);
|
|
77
|
+
}
|
|
78
|
+
exports.runAction = runAction;
|
|
79
|
+
function displaySummaryAndExit(summary, reporters) {
|
|
80
|
+
if (summary.results !== "success") {
|
|
81
|
+
process.exitCode = 1;
|
|
82
|
+
}
|
|
83
|
+
for (const reporter of reporters) {
|
|
84
|
+
reporter.summarize(summary);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
//# s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AAE,CAAC;IAE1B,qBAAqB,CAAC,OAAO,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;AACnD,CAAC;AAxED,8BAwEC;AAED,SAAS,qBAAqB,CAAC,OAA4B,EAAE,SAAqB;IAChF,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,EAAE;QACjC,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;KACtB;IAED,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE;QAChC,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;KAC7B;AACH,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import type { ReporterInitOptions } from "@lage-run/reporters";
|
|
3
|
+
interface RunOptions extends ReporterInitOptions {
|
|
4
|
+
concurrency: number;
|
|
5
|
+
profile: string | boolean | undefined;
|
|
6
|
+
dependencies: boolean;
|
|
7
|
+
dependents: boolean;
|
|
8
|
+
since: string;
|
|
9
|
+
scope: string[];
|
|
10
|
+
skipLocalCache: boolean;
|
|
11
|
+
continue: boolean;
|
|
12
|
+
cache: boolean;
|
|
13
|
+
resetCache: boolean;
|
|
14
|
+
nodeArg: string;
|
|
15
|
+
ignore: string[];
|
|
16
|
+
}
|
|
17
|
+
export declare function watchAction(options: RunOptions, command: Command): Promise<void>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.watchAction = void 0;
|
|
27
|
+
const find_npm_client_1 = require("@lage-run/find-npm-client");
|
|
28
|
+
const getConfig_1 = require("../../config/getConfig");
|
|
29
|
+
const getMaxWorkersPerTask_1 = require("../../config/getMaxWorkersPerTask");
|
|
30
|
+
const workspace_tools_1 = require("workspace-tools");
|
|
31
|
+
const reporters_1 = require("@lage-run/reporters");
|
|
32
|
+
const scheduler_1 = require("@lage-run/scheduler");
|
|
33
|
+
const logger_1 = __importStar(require("@lage-run/logger"));
|
|
34
|
+
const filterArgsForTasks_1 = require("./filterArgsForTasks");
|
|
35
|
+
const createTargetGraph_1 = require("./createTargetGraph");
|
|
36
|
+
const createCacheProvider_1 = require("./createCacheProvider");
|
|
37
|
+
const watcher_1 = require("./watcher");
|
|
38
|
+
async function watchAction(options, command) {
|
|
39
|
+
var _a;
|
|
40
|
+
const cwd = process.cwd();
|
|
41
|
+
const config = await (0, getConfig_1.getConfig)(cwd);
|
|
42
|
+
// Configure logger
|
|
43
|
+
const logger = (0, logger_1.default)();
|
|
44
|
+
const reporter = new reporters_1.LogReporter({
|
|
45
|
+
grouped: true,
|
|
46
|
+
logLevel: logger_1.LogLevel[options.logLevel],
|
|
47
|
+
});
|
|
48
|
+
logger.addReporter(reporter);
|
|
49
|
+
// Build Target Graph
|
|
50
|
+
const root = (0, workspace_tools_1.getWorkspaceRoot)(process.cwd());
|
|
51
|
+
const packageInfos = (0, workspace_tools_1.getPackageInfos)(root);
|
|
52
|
+
const { tasks, taskArgs } = (0, filterArgsForTasks_1.filterArgsForTasks)(command.args);
|
|
53
|
+
const targetGraph = (0, createTargetGraph_1.createTargetGraph)({
|
|
54
|
+
logger,
|
|
55
|
+
root,
|
|
56
|
+
dependencies: options.dependencies,
|
|
57
|
+
dependents: options.dependents,
|
|
58
|
+
ignore: options.ignore.concat(config.ignore),
|
|
59
|
+
pipeline: config.pipeline,
|
|
60
|
+
repoWideChanges: config.repoWideChanges,
|
|
61
|
+
scope: options.scope,
|
|
62
|
+
since: options.since,
|
|
63
|
+
outputs: config.cacheOptions.outputGlob,
|
|
64
|
+
tasks,
|
|
65
|
+
packageInfos,
|
|
66
|
+
});
|
|
67
|
+
// Make sure we do not attempt writeRemoteCache in watch mode
|
|
68
|
+
config.cacheOptions.writeRemoteCache = false;
|
|
69
|
+
const { cacheProvider, hasher } = (0, createCacheProvider_1.createCache)({
|
|
70
|
+
root,
|
|
71
|
+
logger,
|
|
72
|
+
cacheOptions: config.cacheOptions,
|
|
73
|
+
skipLocalCache: false,
|
|
74
|
+
});
|
|
75
|
+
const scheduler = new scheduler_1.SimpleScheduler({
|
|
76
|
+
logger,
|
|
77
|
+
concurrency: options.concurrency,
|
|
78
|
+
cacheProvider,
|
|
79
|
+
hasher,
|
|
80
|
+
continueOnError: true,
|
|
81
|
+
shouldCache: options.cache,
|
|
82
|
+
shouldResetCache: options.resetCache,
|
|
83
|
+
maxWorkersPerTask: (0, getMaxWorkersPerTask_1.getMaxWorkersPerTask)((_a = config.pipeline) !== null && _a !== void 0 ? _a : {}),
|
|
84
|
+
runners: Object.assign({ npmScript: {
|
|
85
|
+
script: require.resolve("./runners/NpmScriptRunner"),
|
|
86
|
+
options: {
|
|
87
|
+
nodeArg: options.nodeArg,
|
|
88
|
+
taskArgs,
|
|
89
|
+
npmCmd: (0, find_npm_client_1.findNpmClient)(config.npmClient),
|
|
90
|
+
},
|
|
91
|
+
}, worker: {
|
|
92
|
+
script: require.resolve("./runners/WorkerRunner"),
|
|
93
|
+
options: {},
|
|
94
|
+
} }, config.runners),
|
|
95
|
+
});
|
|
96
|
+
// Initial run
|
|
97
|
+
const summary = await scheduler.run(root, targetGraph);
|
|
98
|
+
displaySummary(summary, logger.reporters);
|
|
99
|
+
logger.info("Running scheduler in watch mode");
|
|
100
|
+
// Disables cache for subsequent runs
|
|
101
|
+
// TODO: support updating hasher + write-only local cacheProvider for subsequent runs
|
|
102
|
+
for (const targetRun of scheduler.targetRuns.values()) {
|
|
103
|
+
targetRun.options.cacheProvider = undefined;
|
|
104
|
+
targetRun.options.hasher = undefined;
|
|
105
|
+
targetRun.options.shouldCache = false;
|
|
106
|
+
}
|
|
107
|
+
// When initial run is done, disable fetching of caches on all targets, keep writing to the cache
|
|
108
|
+
const watcher = (0, watcher_1.watch)(root);
|
|
109
|
+
watcher.on("change", (packageName) => {
|
|
110
|
+
reporter.resetLogEntries();
|
|
111
|
+
for (const target of targetGraph.targets.values()) {
|
|
112
|
+
if (target.packageName === packageName && scheduler.onTargetChange) {
|
|
113
|
+
scheduler.onTargetChange(target.id);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
exports.watchAction = watchAction;
|
|
119
|
+
function displaySummary(summary, reporters) {
|
|
120
|
+
for (const reporter of reporters) {
|
|
121
|
+
reporter.summarize(summary);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=watchAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watchAction.js","sourceRoot":"","sources":["../../../src/commands/run/watchAction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,+DA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F;IACrF,KAAK,MAAM,SAAS,IAAI,SAAS,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE;QACrD,SAAS,CAAC,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC;QAC5C,SAAS,CAAC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;QACrC,SAAS,CAAC,OAAO,CAAC,WAAW,GAAG,KAAK,CAAC;KACvC;IAED,iGAAiG;IACjG,MAAM,OAAO,GAAG,IAAA,eAAK,EAAC,IAAI,CAAC,CAAC;IAC5B,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,EAAE;QACnC,QAAQ,CAAC,eAAe,EAAE,CAAC;QAC3B,KAAK,MAAM,MAAM,IAAI,WAAW,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE;YACjD,IAAI,MAAM,CAAC,WAAW,KAAK,WAAW,IAAI,SAAS,CAAC,cAAc,EAAE;gBAClE,SAAS,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;aACrC;SACF;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AA7FD,kCA6FC;AAED,SAAS,cAAc,CAAC,OAA4B,EAAE,SAAqB;IACzE,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE;QAChC,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;KAC7B;AACH,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.watch = void 0;
|
|
7
|
+
const chokidar_1 = __importDefault(require("chokidar"));
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const workspace_tools_1 = require("workspace-tools");
|
|
10
|
+
const events_1 = __importDefault(require("events"));
|
|
11
|
+
function watch(cwd) {
|
|
12
|
+
const events = new events_1.default();
|
|
13
|
+
const root = (0, workspace_tools_1.getWorkspaceRoot)(cwd);
|
|
14
|
+
const packageInfos = (0, workspace_tools_1.getPackageInfos)(cwd);
|
|
15
|
+
// generate a tree index of all the packages
|
|
16
|
+
const packageIndex = createPackageIndex(root, packageInfos);
|
|
17
|
+
const packagePaths = Object.values(packageInfos).map((pkg) => path_1.default.dirname(pkg.packageJsonPath));
|
|
18
|
+
// watch for changes in the packages
|
|
19
|
+
const watcher = chokidar_1.default.watch(packagePaths, {
|
|
20
|
+
cwd: root,
|
|
21
|
+
ignored: ["**/node_modules/**", "**/dist/**", "**/build/**", "**/lib/**"],
|
|
22
|
+
});
|
|
23
|
+
let timeoutHandle;
|
|
24
|
+
// when a change happens, find the package that changed
|
|
25
|
+
watcher.on("change", (filePath) => {
|
|
26
|
+
if (timeoutHandle) {
|
|
27
|
+
clearTimeout(timeoutHandle);
|
|
28
|
+
}
|
|
29
|
+
timeoutHandle = setTimeout(() => {
|
|
30
|
+
const packageName = findPackageByPath(filePath, packageIndex);
|
|
31
|
+
events.emit("change", packageName);
|
|
32
|
+
}, 200);
|
|
33
|
+
});
|
|
34
|
+
return events;
|
|
35
|
+
}
|
|
36
|
+
exports.watch = watch;
|
|
37
|
+
function createPackageIndex(root, packageInfos) {
|
|
38
|
+
const pathIndex = {};
|
|
39
|
+
// generate a tree index of all the packages
|
|
40
|
+
for (const [packageName, info] of Object.entries(packageInfos)) {
|
|
41
|
+
const packagePath = path_1.default.relative(root, path_1.default.dirname(info.packageJsonPath));
|
|
42
|
+
const pathParts = packagePath.split(/[/\\]/);
|
|
43
|
+
let pointer = pathIndex;
|
|
44
|
+
for (const pathPart of pathParts) {
|
|
45
|
+
if (!pointer[pathPart]) {
|
|
46
|
+
pointer[pathPart] = {};
|
|
47
|
+
}
|
|
48
|
+
pointer = pointer[pathPart];
|
|
49
|
+
}
|
|
50
|
+
pointer.packageName = packageName;
|
|
51
|
+
}
|
|
52
|
+
return pathIndex;
|
|
53
|
+
}
|
|
54
|
+
function findPackageByPath(filePath, index) {
|
|
55
|
+
const pathParts = filePath.split(/[/\\]/);
|
|
56
|
+
let pointer = index;
|
|
57
|
+
for (const pathPart of pathParts) {
|
|
58
|
+
if (!pointer[pathPart]) {
|
|
59
|
+
console.log(pathPart, filePath);
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
if (pointer[pathPart].packageName) {
|
|
63
|
+
return pointer[pathPart].packageName;
|
|
64
|
+
}
|
|
65
|
+
pointer = pointer[pathPart];
|
|
66
|
+
}
|
|
67
|
+
return undefined;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=watcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watcher.js","sourceRoot":"","sources":["../../../src/commands/run/watcher.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAgC;AAEhC,gDAAwB;AACxB,qDAAoE;AAEpE,oDAAkC;AAUlC,SAAgB,KAAK,CAAC,GAAW;IAC/B,MAAM,MAAM,GAAG,IAAI,gBAAY,EAAE,CAAC;IAClC,MAAM,IAAI,GAAG,IAAA,kCAAgB,EAAC,GAAG,CAAC,CAAC;IACnC,MAAM,YAAY,GAAG,IAAA,iCAAe,EAAC,GAAG,CAAC,CAAC;IAE1C,4CAA4C;IAC5C,MAAM,YAAY,GAAG,kBAAkB,CAAC,IAAK,EAAE,YAAY,CAAC,CAAC;IAE7D,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,cAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC;IAEjG,oCAAoC;IACpC,MAAM,OAAO,GAAG,kBAAQ,CAAC,KAAK,CAAC,YAAY,EAAE;QAC3C,GAAG,EAAE,IAAI;QACT,OAAO,EAAE,CAAC,oBAAoB,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,CAAC;KAC1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AC3D,MAAM,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAE1C,IAAI,OAAO,GAAkB,KAAK,CAAC;IAEnC,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE;QAChC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YACtB,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;YAChC,MAAM;SACP;QAED,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE;YACjC,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC;SACtC;QAED,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;KAC7B;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lage-run/cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.11",
|
|
4
4
|
"description": "Command Line Interface for Lage",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/microsoft/lage"
|
|
@@ -19,12 +19,13 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@lage-run/find-npm-client": "^0.1.1",
|
|
21
21
|
"@lage-run/logger": "^1.2.0",
|
|
22
|
-
"@lage-run/scheduler": "^0.4.
|
|
22
|
+
"@lage-run/scheduler": "^0.4.7",
|
|
23
23
|
"@lage-run/target-graph": "^0.4.2",
|
|
24
24
|
"@lage-run/cache": "^0.1.19",
|
|
25
|
-
"@lage-run/reporters": "^0.2.
|
|
25
|
+
"@lage-run/reporters": "^0.2.22",
|
|
26
26
|
"commander": "^9.4.0",
|
|
27
|
-
"workspace-tools": "^0.28.0"
|
|
27
|
+
"workspace-tools": "^0.28.0",
|
|
28
|
+
"chokidar": "3.5.3"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
31
|
"@lage-run/monorepo-fixture": "*"
|