@narumitw/pi-chrome-devtools 0.6.2 → 0.8.0
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/chrome-devtools.ts +9 -9
package/package.json
CHANGED
package/src/chrome-devtools.ts
CHANGED
|
@@ -36,13 +36,13 @@ const CHROME_DEVTOOLS_TOOL_NAMES = [
|
|
|
36
36
|
"chrome_devtools_screenshot",
|
|
37
37
|
] as const;
|
|
38
38
|
const COMMAND_COMPLETIONS = [
|
|
39
|
-
{ value: "help", label: "Show command usage" },
|
|
40
|
-
{ value: "quickstart", label: "Show endpoint and launch help" },
|
|
41
|
-
{ value: "status", label: "Show tool and settings status" },
|
|
42
|
-
{ value: "tools", label: "Select Chrome DevTools tools" },
|
|
43
|
-
{ value: "toggle", label: "Select Chrome DevTools tools" },
|
|
44
|
-
{ value: "enable", label: "Enable all Chrome DevTools tools" },
|
|
45
|
-
{ value: "disable", label: "Disable all Chrome DevTools tools" },
|
|
39
|
+
{ value: "help", label: "help", description: "Show command usage" },
|
|
40
|
+
{ value: "quickstart", label: "quickstart", description: "Show endpoint and launch help" },
|
|
41
|
+
{ value: "status", label: "status", description: "Show tool and settings status" },
|
|
42
|
+
{ value: "tools", label: "tools", description: "Select Chrome DevTools tools" },
|
|
43
|
+
{ value: "toggle", label: "toggle", description: "Select Chrome DevTools tools" },
|
|
44
|
+
{ value: "enable", label: "enable", description: "Enable all Chrome DevTools tools" },
|
|
45
|
+
{ value: "disable", label: "disable", description: "Disable all Chrome DevTools tools" },
|
|
46
46
|
];
|
|
47
47
|
const MENU_OPTIONS = {
|
|
48
48
|
quickstart: "Quick start / endpoint help",
|
|
@@ -467,8 +467,8 @@ export function parseCommand(args: string): CommandAction | "unknown" {
|
|
|
467
467
|
}
|
|
468
468
|
|
|
469
469
|
export function commandCompletions(prefix: string) {
|
|
470
|
-
const normalized = prefix.
|
|
471
|
-
if (normalized
|
|
470
|
+
const normalized = prefix.trimStart().toLowerCase();
|
|
471
|
+
if (/\s/.test(normalized)) return null;
|
|
472
472
|
|
|
473
473
|
const matches = COMMAND_COMPLETIONS.filter((completion) =>
|
|
474
474
|
completion.value.startsWith(normalized),
|