mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-06 16:34:36 +00:00
fix(plugins): preserve CLI diagnostics and exercise reviewed updates
Move new source capability coverage to real browser journeys. Update the requirements regression to exercise preview and apply, and preserve the existing duplicate-selector diagnostic across positional option scopes.
This commit is contained in:
@@ -31,7 +31,10 @@ describe("global command options", () => {
|
||||
it("rejects conflicting parent and command selectors", async () => {
|
||||
await expect(
|
||||
parseHost(["--host", "first:6767", "ls", "--host", "last:6767"]),
|
||||
).rejects.toMatchObject({ code: "TARGET_AMBIGUOUS" });
|
||||
).rejects.toMatchObject({
|
||||
code: "TARGET_AMBIGUOUS",
|
||||
message: "Conflicting duplicate --host selectors.",
|
||||
});
|
||||
});
|
||||
|
||||
it("lets local-only commands ignore a global host", async () => {
|
||||
|
||||
@@ -47,8 +47,10 @@ export function withGlobalOptions<Args extends unknown[], Result>(
|
||||
if (typeof value === "string") selectors[key].add(value);
|
||||
}
|
||||
}
|
||||
if (selectors.home.size > 1 || selectors.host.size > 1)
|
||||
throw { code: "TARGET_AMBIGUOUS", message: "Conflicting duplicate daemon selectors." };
|
||||
for (const key of ["home", "host"] as const) {
|
||||
if (selectors[key].size > 1)
|
||||
throw { code: "TARGET_AMBIGUOUS", message: `Conflicting duplicate --${key} selectors.` };
|
||||
}
|
||||
const localOnly = localCommands.has(command);
|
||||
options.daemonTarget = selectDaemonTarget(options, process.env, localOnly);
|
||||
mergedArgs[mergedArgs.length - 2] = options;
|
||||
|
||||
Reference in New Issue
Block a user