@openclaw/lobster 2026.3.11 → 2026.3.13
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/package.json +1 -1
- package/src/windows-spawn.test.ts +15 -12
package/package.json
CHANGED
|
@@ -14,6 +14,19 @@ describe("resolveWindowsLobsterSpawn", () => {
|
|
|
14
14
|
let tempDir = "";
|
|
15
15
|
const originalProcessState = snapshotPlatformPathEnv();
|
|
16
16
|
|
|
17
|
+
async function expectUnwrappedShim(params: {
|
|
18
|
+
scriptPath: string;
|
|
19
|
+
shimPath: string;
|
|
20
|
+
shimLine: string;
|
|
21
|
+
}) {
|
|
22
|
+
await createWindowsCmdShimFixture(params);
|
|
23
|
+
|
|
24
|
+
const target = resolveWindowsLobsterSpawn(params.shimPath, ["run", "noop"], process.env);
|
|
25
|
+
expect(target.command).toBe(process.execPath);
|
|
26
|
+
expect(target.argv).toEqual([params.scriptPath, "run", "noop"]);
|
|
27
|
+
expect(target.windowsHide).toBe(true);
|
|
28
|
+
}
|
|
29
|
+
|
|
17
30
|
beforeEach(async () => {
|
|
18
31
|
tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-lobster-win-spawn-"));
|
|
19
32
|
setProcessPlatform("win32");
|
|
@@ -30,31 +43,21 @@ describe("resolveWindowsLobsterSpawn", () => {
|
|
|
30
43
|
it("unwraps cmd shim with %dp0% token", async () => {
|
|
31
44
|
const scriptPath = path.join(tempDir, "shim-dist", "lobster-cli.cjs");
|
|
32
45
|
const shimPath = path.join(tempDir, "shim", "lobster.cmd");
|
|
33
|
-
await
|
|
46
|
+
await expectUnwrappedShim({
|
|
34
47
|
shimPath,
|
|
35
48
|
scriptPath,
|
|
36
49
|
shimLine: `"%dp0%\\..\\shim-dist\\lobster-cli.cjs" %*`,
|
|
37
50
|
});
|
|
38
|
-
|
|
39
|
-
const target = resolveWindowsLobsterSpawn(shimPath, ["run", "noop"], process.env);
|
|
40
|
-
expect(target.command).toBe(process.execPath);
|
|
41
|
-
expect(target.argv).toEqual([scriptPath, "run", "noop"]);
|
|
42
|
-
expect(target.windowsHide).toBe(true);
|
|
43
51
|
});
|
|
44
52
|
|
|
45
53
|
it("unwraps cmd shim with %~dp0% token", async () => {
|
|
46
54
|
const scriptPath = path.join(tempDir, "shim-dist", "lobster-cli.cjs");
|
|
47
55
|
const shimPath = path.join(tempDir, "shim", "lobster.cmd");
|
|
48
|
-
await
|
|
56
|
+
await expectUnwrappedShim({
|
|
49
57
|
shimPath,
|
|
50
58
|
scriptPath,
|
|
51
59
|
shimLine: `"%~dp0%\\..\\shim-dist\\lobster-cli.cjs" %*`,
|
|
52
60
|
});
|
|
53
|
-
|
|
54
|
-
const target = resolveWindowsLobsterSpawn(shimPath, ["run", "noop"], process.env);
|
|
55
|
-
expect(target.command).toBe(process.execPath);
|
|
56
|
-
expect(target.argv).toEqual([scriptPath, "run", "noop"]);
|
|
57
|
-
expect(target.windowsHide).toBe(true);
|
|
58
61
|
});
|
|
59
62
|
|
|
60
63
|
it("ignores node.exe shim entries and picks lobster script", async () => {
|