@lage-run/cli 0.23.2 → 0.23.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 +16 -1
- package/CHANGELOG.md +10 -2
- package/lib/commands/exec/executeRemotely.js +2 -3
- package/lib/commands/info/action.js +0 -2
- package/lib/getBinPaths.js +24 -11
- package/package.json +1 -1
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,22 @@
|
|
|
2
2
|
"name": "@lage-run/cli",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Tue, 08 Oct 2024 20:03:26 GMT",
|
|
6
|
+
"version": "0.23.3",
|
|
7
|
+
"tag": "@lage-run/cli_v0.23.3",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "kchau@microsoft.com",
|
|
12
|
+
"package": "@lage-run/cli",
|
|
13
|
+
"commit": "e0b1d9352f881fd802d982231471152127c65d39",
|
|
14
|
+
"comment": "uses the shell scripts to have a different executable name"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Mon, 07 Oct 2024 19:33:13 GMT",
|
|
6
21
|
"version": "0.23.2",
|
|
7
22
|
"tag": "@lage-run/cli_v0.23.2",
|
|
8
23
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
# Change Log - @lage-run/cli
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on
|
|
3
|
+
<!-- This log was last generated on Tue, 08 Oct 2024 20:03:26 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.23.3
|
|
8
|
+
|
|
9
|
+
Tue, 08 Oct 2024 20:03:26 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- uses the shell scripts to have a different executable name (kchau@microsoft.com)
|
|
14
|
+
|
|
7
15
|
## 0.23.2
|
|
8
16
|
|
|
9
|
-
Mon, 07 Oct 2024 19:33:
|
|
17
|
+
Mon, 07 Oct 2024 19:33:13 GMT
|
|
10
18
|
|
|
11
19
|
### Patches
|
|
12
20
|
|
|
@@ -89,7 +89,6 @@ async function executeRemotely(options, command) {
|
|
|
89
89
|
const binPaths = (0, _getBinPaths.getBinPaths)();
|
|
90
90
|
const lageServerBinPath = binPaths["lage-server"];
|
|
91
91
|
const lageServerArgs = [
|
|
92
|
-
lageServerBinPath,
|
|
93
92
|
"--host",
|
|
94
93
|
host,
|
|
95
94
|
"--port",
|
|
@@ -98,8 +97,8 @@ async function executeRemotely(options, command) {
|
|
|
98
97
|
timeout,
|
|
99
98
|
...args
|
|
100
99
|
];
|
|
101
|
-
logger.info(`Launching lage-server with these parameters:
|
|
102
|
-
const child = (0, _execa.default)(
|
|
100
|
+
logger.info(`Launching lage-server with these parameters: ${lageServerArgs.join(" ")}`);
|
|
101
|
+
const child = (0, _execa.default)(lageServerBinPath, lageServerArgs, {
|
|
103
102
|
detached: true,
|
|
104
103
|
stdio: "ignore"
|
|
105
104
|
});
|
|
@@ -113,7 +113,6 @@ function generateCommand(target, taskArgs, config, options, binPaths) {
|
|
|
113
113
|
} else if (target.type === "worker" && shouldRunWorkersAsService) {
|
|
114
114
|
const { host , port } = (0, _parseServerOption.parseServerOption)(options.server);
|
|
115
115
|
const command = [
|
|
116
|
-
process.execPath,
|
|
117
116
|
binPaths["lage"],
|
|
118
117
|
"exec",
|
|
119
118
|
"--server",
|
|
@@ -132,7 +131,6 @@ function generateCommand(target, taskArgs, config, options, binPaths) {
|
|
|
132
131
|
return command;
|
|
133
132
|
} else if (target.type === "worker") {
|
|
134
133
|
const command = [
|
|
135
|
-
process.execPath,
|
|
136
134
|
binPaths.lage,
|
|
137
135
|
"exec"
|
|
138
136
|
];
|
package/lib/getBinPaths.js
CHANGED
|
@@ -10,24 +10,37 @@ Object.defineProperty(exports, "getBinPaths", {
|
|
|
10
10
|
});
|
|
11
11
|
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
12
12
|
const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
|
|
13
|
+
const _os = /*#__PURE__*/ _interop_require_default(require("os"));
|
|
13
14
|
function _interop_require_default(obj) {
|
|
14
15
|
return obj && obj.__esModule ? obj : {
|
|
15
16
|
default: obj
|
|
16
17
|
};
|
|
17
18
|
}
|
|
18
|
-
function
|
|
19
|
-
let
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
break;
|
|
19
|
+
function findUp(name, dir) {
|
|
20
|
+
let currentDir = dir;
|
|
21
|
+
while(currentDir !== "/"){
|
|
22
|
+
const fullPath = _path.default.join(currentDir, name);
|
|
23
|
+
if (_fs.default.existsSync(fullPath)) {
|
|
24
|
+
return fullPath;
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
currentDir = _path.default.dirname(currentDir);
|
|
27
|
+
}
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
function getBinPaths() {
|
|
31
|
+
const bins = _os.default.platform() === "win32" ? [
|
|
32
|
+
"lage.cmd",
|
|
33
|
+
"lage-server.cmd"
|
|
34
|
+
] : [
|
|
35
|
+
"lage",
|
|
36
|
+
"lage-server"
|
|
37
|
+
];
|
|
38
|
+
const binPaths = bins.map((bin)=>findUp("node_modules/.bin/" + bin, __dirname));
|
|
39
|
+
if (binPaths.some((binPath)=>binPath === undefined)) {
|
|
40
|
+
throw new Error("Could not find bin paths for lage or lage-server");
|
|
27
41
|
}
|
|
28
|
-
const packageJson = JSON.parse(_fs.default.readFileSync(_path.default.join(dir, "package.json"), "utf8"));
|
|
29
42
|
return {
|
|
30
|
-
lage:
|
|
31
|
-
"lage-server":
|
|
43
|
+
lage: binPaths[0],
|
|
44
|
+
"lage-server": binPaths[1]
|
|
32
45
|
};
|
|
33
46
|
}
|