@extension.dev/mcp 4.3.0 → 4.4.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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +5 -2
- package/CHANGELOG.md +30 -0
- package/LICENSE +1 -1
- package/README.md +8 -7
- package/bin/extension-mcp.js +7 -0
- package/claude/CLAUDE.md +29 -39
- package/claude/commands/extension-debug.md +2 -3
- package/claude/rules/mcp-tools.md +68 -18
- package/dist/module.js +332 -17
- package/dist/src/lib/browser-family.d.ts +1 -0
- package/dist/src/lib/launch-flags.d.ts +43 -0
- package/dist/src/tools/build.d.ts +24 -0
- package/dist/src/tools/dev.d.ts +45 -7
- package/dist/src/tools/preview.d.ts +44 -1
- package/dist/src/tools/start.d.ts +44 -1
- package/dist/src/tools/uninstall-browser.d.ts +24 -0
- package/package.json +20 -14
- package/server.json +3 -3
package/dist/module.js
CHANGED
|
@@ -12,7 +12,7 @@ import { filterKeysForThisBrowser } from "browser-extension-manifest-fields";
|
|
|
12
12
|
import ws from "ws";
|
|
13
13
|
import node_http from "node:http";
|
|
14
14
|
import { clearCredentials, exchangeAndPersist, fetchLoginConfig, pollForToken, publish, readCredentials, resolveApiBase, resolveToken, safeApiBase, startDeviceCode } from "@extension.dev/core";
|
|
15
|
-
import { extensionInstall, getManagedBrowsersCacheRoot } from "extension-install";
|
|
15
|
+
import { extensionInstall, extensionUninstall, getManagedBrowsersCacheRoot } from "extension-install";
|
|
16
16
|
import { execFile } from "node:child_process";
|
|
17
17
|
import { promisify } from "node:util";
|
|
18
18
|
var add_feature_namespaceObject = {};
|
|
@@ -177,6 +177,12 @@ __webpack_require__.d(storage_namespaceObject, {
|
|
|
177
177
|
handler: ()=>storage_handler,
|
|
178
178
|
schema: ()=>storage_schema
|
|
179
179
|
});
|
|
180
|
+
var uninstall_browser_namespaceObject = {};
|
|
181
|
+
__webpack_require__.r(uninstall_browser_namespaceObject);
|
|
182
|
+
__webpack_require__.d(uninstall_browser_namespaceObject, {
|
|
183
|
+
handler: ()=>uninstall_browser_handler,
|
|
184
|
+
schema: ()=>uninstall_browser_schema
|
|
185
|
+
});
|
|
180
186
|
var wait_namespaceObject = {};
|
|
181
187
|
__webpack_require__.r(wait_namespaceObject);
|
|
182
188
|
__webpack_require__.d(wait_namespaceObject, {
|
|
@@ -189,7 +195,7 @@ __webpack_require__.d(whoami_namespaceObject, {
|
|
|
189
195
|
handler: ()=>whoami_handler,
|
|
190
196
|
schema: ()=>whoami_schema
|
|
191
197
|
});
|
|
192
|
-
var package_namespaceObject = JSON.parse('{"rE":"4.
|
|
198
|
+
var package_namespaceObject = JSON.parse('{"rE":"4.4.0","El":{"OP":"^4.0.11"}}');
|
|
193
199
|
const create_schema = {
|
|
194
200
|
name: "extension_create",
|
|
195
201
|
description: "Create a new browser extension project from a template in the extension.dev template catalog. Use extension_list_templates to see available options.",
|
|
@@ -379,9 +385,18 @@ const build_schema = {
|
|
|
379
385
|
"chrome",
|
|
380
386
|
"chromium",
|
|
381
387
|
"edge",
|
|
388
|
+
"brave",
|
|
389
|
+
"opera",
|
|
390
|
+
"vivaldi",
|
|
391
|
+
"yandex",
|
|
382
392
|
"firefox",
|
|
393
|
+
"waterfox",
|
|
394
|
+
"librewolf",
|
|
395
|
+
"safari",
|
|
383
396
|
"chromium-based",
|
|
384
|
-
"gecko-based"
|
|
397
|
+
"gecko-based",
|
|
398
|
+
"firefox-based",
|
|
399
|
+
"webkit-based"
|
|
385
400
|
],
|
|
386
401
|
default: "chrome",
|
|
387
402
|
description: "Target browser"
|
|
@@ -395,6 +410,30 @@ const build_schema = {
|
|
|
395
410
|
type: "boolean",
|
|
396
411
|
default: false,
|
|
397
412
|
description: "Include source code zip (required by some stores)"
|
|
413
|
+
},
|
|
414
|
+
zipFilename: {
|
|
415
|
+
type: "string",
|
|
416
|
+
description: "Custom .zip file name (defaults to name and version)"
|
|
417
|
+
},
|
|
418
|
+
polyfill: {
|
|
419
|
+
type: "boolean",
|
|
420
|
+
default: false,
|
|
421
|
+
description: "Apply cross-browser polyfill"
|
|
422
|
+
},
|
|
423
|
+
silent: {
|
|
424
|
+
type: "boolean",
|
|
425
|
+
default: false,
|
|
426
|
+
description: "Suppress build output"
|
|
427
|
+
},
|
|
428
|
+
mode: {
|
|
429
|
+
type: "string",
|
|
430
|
+
enum: [
|
|
431
|
+
"development",
|
|
432
|
+
"production",
|
|
433
|
+
"none"
|
|
434
|
+
],
|
|
435
|
+
default: "production",
|
|
436
|
+
description: "Bundler mode override (also sets NODE_ENV)"
|
|
398
437
|
}
|
|
399
438
|
},
|
|
400
439
|
required: [
|
|
@@ -409,6 +448,18 @@ async function build_handler(args) {
|
|
|
409
448
|
browser: args.browser ?? "chrome",
|
|
410
449
|
zip: args.zip ?? false,
|
|
411
450
|
zipSource: args.zipSource ?? false,
|
|
451
|
+
...args.zipFilename ? {
|
|
452
|
+
zipFilename: args.zipFilename
|
|
453
|
+
} : {},
|
|
454
|
+
...void 0 !== args.polyfill ? {
|
|
455
|
+
polyfill: args.polyfill
|
|
456
|
+
} : {},
|
|
457
|
+
...void 0 !== args.silent ? {
|
|
458
|
+
silent: args.silent
|
|
459
|
+
} : {},
|
|
460
|
+
...args.mode ? {
|
|
461
|
+
mode: args.mode
|
|
462
|
+
} : {},
|
|
412
463
|
exitOnError: false
|
|
413
464
|
});
|
|
414
465
|
return JSON.stringify({
|
|
@@ -521,6 +572,50 @@ function removeSession(projectPath, browser) {
|
|
|
521
572
|
function listSessions() {
|
|
522
573
|
return Array.from(process_manager_sessions.values());
|
|
523
574
|
}
|
|
575
|
+
const LAUNCH_FLAG_SCHEMA = {
|
|
576
|
+
profile: {
|
|
577
|
+
type: "string",
|
|
578
|
+
description: 'Browser profile path, or "false" to reuse the default user profile. Omit for a fresh throwaway profile.'
|
|
579
|
+
},
|
|
580
|
+
startingUrl: {
|
|
581
|
+
type: "string",
|
|
582
|
+
description: "URL the browser opens on launch"
|
|
583
|
+
},
|
|
584
|
+
chromiumBinary: {
|
|
585
|
+
type: "string",
|
|
586
|
+
description: "Path to a custom Chromium-based binary (overrides browser)"
|
|
587
|
+
},
|
|
588
|
+
geckoBinary: {
|
|
589
|
+
type: "string",
|
|
590
|
+
description: "Path to a custom Gecko/Firefox binary (overrides browser)"
|
|
591
|
+
},
|
|
592
|
+
host: {
|
|
593
|
+
type: "string",
|
|
594
|
+
description: "Dev server bind host. Use 0.0.0.0 for Docker or devcontainers. Defaults to 127.0.0.1"
|
|
595
|
+
},
|
|
596
|
+
publicHost: {
|
|
597
|
+
type: "string",
|
|
598
|
+
description: "Connectable host the browser dials for HMR and reload when it differs from the bind host"
|
|
599
|
+
},
|
|
600
|
+
extensions: {
|
|
601
|
+
type: "array",
|
|
602
|
+
items: {
|
|
603
|
+
type: "string"
|
|
604
|
+
},
|
|
605
|
+
description: "Companion extension paths or store URLs to load alongside the project"
|
|
606
|
+
}
|
|
607
|
+
};
|
|
608
|
+
function launchFlagArgs(args) {
|
|
609
|
+
const cli = [];
|
|
610
|
+
if (void 0 !== args.profile) cli.push("--profile", args.profile);
|
|
611
|
+
if (args.startingUrl) cli.push("--starting-url", args.startingUrl);
|
|
612
|
+
if (args.chromiumBinary) cli.push("--chromium-binary", args.chromiumBinary);
|
|
613
|
+
if (args.geckoBinary) cli.push("--gecko-binary", args.geckoBinary);
|
|
614
|
+
if (args.host) cli.push("--host", args.host);
|
|
615
|
+
if (args.publicHost) cli.push("--public-host", args.publicHost);
|
|
616
|
+
if (args.extensions?.length) cli.push("--extensions", args.extensions.join(","));
|
|
617
|
+
return cli;
|
|
618
|
+
}
|
|
524
619
|
const dev_schema = {
|
|
525
620
|
name: "extension_dev",
|
|
526
621
|
description: "Start the extension development server with hot module replacement. Launches a browser with the extension loaded. Returns process info for use with extension_wait and extension_source_inspect.",
|
|
@@ -537,9 +632,18 @@ const dev_schema = {
|
|
|
537
632
|
"chrome",
|
|
538
633
|
"chromium",
|
|
539
634
|
"edge",
|
|
635
|
+
"brave",
|
|
636
|
+
"opera",
|
|
637
|
+
"vivaldi",
|
|
638
|
+
"yandex",
|
|
540
639
|
"firefox",
|
|
640
|
+
"waterfox",
|
|
641
|
+
"librewolf",
|
|
642
|
+
"safari",
|
|
541
643
|
"chromium-based",
|
|
542
|
-
"gecko-based"
|
|
644
|
+
"gecko-based",
|
|
645
|
+
"firefox-based",
|
|
646
|
+
"webkit-based"
|
|
543
647
|
],
|
|
544
648
|
default: "chrome"
|
|
545
649
|
},
|
|
@@ -552,6 +656,12 @@ const dev_schema = {
|
|
|
552
656
|
default: false,
|
|
553
657
|
description: "Start dev server without launching browser"
|
|
554
658
|
},
|
|
659
|
+
polyfill: {
|
|
660
|
+
type: "boolean",
|
|
661
|
+
default: true,
|
|
662
|
+
description: "Apply cross-browser polyfill"
|
|
663
|
+
},
|
|
664
|
+
...LAUNCH_FLAG_SCHEMA,
|
|
555
665
|
allowControl: {
|
|
556
666
|
type: "boolean",
|
|
557
667
|
default: false,
|
|
@@ -578,6 +688,8 @@ async function dev_handler(args) {
|
|
|
578
688
|
];
|
|
579
689
|
if (void 0 !== args.port) cliArgs.push("--port", String(args.port));
|
|
580
690
|
if (args.noBrowser) cliArgs.push("--no-browser");
|
|
691
|
+
if (false === args.polyfill) cliArgs.push("--polyfill", "false");
|
|
692
|
+
cliArgs.push(...launchFlagArgs(args));
|
|
581
693
|
if (args.allowControl) cliArgs.push("--allow-control");
|
|
582
694
|
if (args.allowEval) cliArgs.push("--allow-eval");
|
|
583
695
|
const child = spawnExtensionCli(cliArgs, {
|
|
@@ -627,9 +739,18 @@ const start_schema = {
|
|
|
627
739
|
"chrome",
|
|
628
740
|
"chromium",
|
|
629
741
|
"edge",
|
|
742
|
+
"brave",
|
|
743
|
+
"opera",
|
|
744
|
+
"vivaldi",
|
|
745
|
+
"yandex",
|
|
630
746
|
"firefox",
|
|
747
|
+
"waterfox",
|
|
748
|
+
"librewolf",
|
|
749
|
+
"safari",
|
|
631
750
|
"chromium-based",
|
|
632
|
-
"gecko-based"
|
|
751
|
+
"gecko-based",
|
|
752
|
+
"firefox-based",
|
|
753
|
+
"webkit-based"
|
|
633
754
|
],
|
|
634
755
|
default: "chrome"
|
|
635
756
|
},
|
|
@@ -637,7 +758,17 @@ const start_schema = {
|
|
|
637
758
|
type: "boolean",
|
|
638
759
|
default: true,
|
|
639
760
|
description: "Apply cross-browser polyfill"
|
|
640
|
-
}
|
|
761
|
+
},
|
|
762
|
+
port: {
|
|
763
|
+
type: "number",
|
|
764
|
+
description: "Server port (0 for auto-assign)"
|
|
765
|
+
},
|
|
766
|
+
noBrowser: {
|
|
767
|
+
type: "boolean",
|
|
768
|
+
default: false,
|
|
769
|
+
description: "Build and serve without launching a browser"
|
|
770
|
+
},
|
|
771
|
+
...LAUNCH_FLAG_SCHEMA
|
|
641
772
|
},
|
|
642
773
|
required: [
|
|
643
774
|
"projectPath"
|
|
@@ -652,7 +783,10 @@ async function start_handler(args) {
|
|
|
652
783
|
"--browser",
|
|
653
784
|
browser
|
|
654
785
|
];
|
|
655
|
-
if (false === args.polyfill) cliArgs.push("--
|
|
786
|
+
if (false === args.polyfill) cliArgs.push("--polyfill", "false");
|
|
787
|
+
if (void 0 !== args.port) cliArgs.push("--port", String(args.port));
|
|
788
|
+
if (args.noBrowser) cliArgs.push("--no-browser");
|
|
789
|
+
cliArgs.push(...launchFlagArgs(args));
|
|
656
790
|
const child = spawnExtensionCli(cliArgs, {
|
|
657
791
|
projectDir: args.projectPath
|
|
658
792
|
});
|
|
@@ -698,12 +832,31 @@ const preview_schema = {
|
|
|
698
832
|
"chrome",
|
|
699
833
|
"chromium",
|
|
700
834
|
"edge",
|
|
835
|
+
"brave",
|
|
836
|
+
"opera",
|
|
837
|
+
"vivaldi",
|
|
838
|
+
"yandex",
|
|
701
839
|
"firefox",
|
|
840
|
+
"waterfox",
|
|
841
|
+
"librewolf",
|
|
842
|
+
"safari",
|
|
702
843
|
"chromium-based",
|
|
703
|
-
"gecko-based"
|
|
844
|
+
"gecko-based",
|
|
845
|
+
"firefox-based",
|
|
846
|
+
"webkit-based"
|
|
704
847
|
],
|
|
705
848
|
default: "chrome"
|
|
706
|
-
}
|
|
849
|
+
},
|
|
850
|
+
port: {
|
|
851
|
+
type: "number",
|
|
852
|
+
description: "Server port (0 for auto-assign)"
|
|
853
|
+
},
|
|
854
|
+
noBrowser: {
|
|
855
|
+
type: "boolean",
|
|
856
|
+
default: false,
|
|
857
|
+
description: "Serve the preview without launching a browser"
|
|
858
|
+
},
|
|
859
|
+
...LAUNCH_FLAG_SCHEMA
|
|
707
860
|
},
|
|
708
861
|
required: [
|
|
709
862
|
"projectPath"
|
|
@@ -718,6 +871,9 @@ async function preview_handler(args) {
|
|
|
718
871
|
"--browser",
|
|
719
872
|
browser
|
|
720
873
|
];
|
|
874
|
+
if (void 0 !== args.port) cliArgs.push("--port", String(args.port));
|
|
875
|
+
if (args.noBrowser) cliArgs.push("--no-browser");
|
|
876
|
+
cliArgs.push(...launchFlagArgs(args));
|
|
721
877
|
const child = spawnExtensionCli(cliArgs, {
|
|
722
878
|
projectDir: args.projectPath
|
|
723
879
|
});
|
|
@@ -916,13 +1072,23 @@ const CHROMIUM_FAMILY = new Set([
|
|
|
916
1072
|
"chrome",
|
|
917
1073
|
"chromium",
|
|
918
1074
|
"edge",
|
|
1075
|
+
"brave",
|
|
1076
|
+
"opera",
|
|
1077
|
+
"vivaldi",
|
|
1078
|
+
"yandex",
|
|
919
1079
|
"chromium-based"
|
|
920
1080
|
]);
|
|
921
1081
|
const GECKO_FAMILY = new Set([
|
|
922
1082
|
"firefox",
|
|
1083
|
+
"waterfox",
|
|
1084
|
+
"librewolf",
|
|
923
1085
|
"gecko-based",
|
|
924
1086
|
"firefox-based"
|
|
925
1087
|
]);
|
|
1088
|
+
const WEBKIT_FAMILY = new Set([
|
|
1089
|
+
"safari",
|
|
1090
|
+
"webkit-based"
|
|
1091
|
+
]);
|
|
926
1092
|
function isChromiumFamily(browser) {
|
|
927
1093
|
return CHROMIUM_FAMILY.has(browser);
|
|
928
1094
|
}
|
|
@@ -2832,7 +2998,7 @@ async function wait_handler(args) {
|
|
|
2832
2998
|
}
|
|
2833
2999
|
const add_feature_schema = {
|
|
2834
3000
|
name: "extension_add_feature",
|
|
2835
|
-
description: "
|
|
3001
|
+
description: "Plan a new feature surface for an existing extension. Returns step-by-step instructions, the manifest additions to make, and reference templates from the extension.dev catalog. Does not modify files; apply the returned plan yourself.",
|
|
2836
3002
|
inputSchema: {
|
|
2837
3003
|
type: "object",
|
|
2838
3004
|
properties: {
|
|
@@ -3268,6 +3434,57 @@ async function install_browser_handler(args) {
|
|
|
3268
3434
|
});
|
|
3269
3435
|
}
|
|
3270
3436
|
}
|
|
3437
|
+
const uninstall_browser_schema = {
|
|
3438
|
+
name: "extension_uninstall_browser",
|
|
3439
|
+
description: "Remove a managed browser binary from the Extension.js cache. Only touches the managed cache, never system-installed browsers.",
|
|
3440
|
+
inputSchema: {
|
|
3441
|
+
type: "object",
|
|
3442
|
+
properties: {
|
|
3443
|
+
browser: {
|
|
3444
|
+
type: "string",
|
|
3445
|
+
enum: [
|
|
3446
|
+
"chrome",
|
|
3447
|
+
"chromium",
|
|
3448
|
+
"edge",
|
|
3449
|
+
"firefox"
|
|
3450
|
+
],
|
|
3451
|
+
description: "Managed browser to remove"
|
|
3452
|
+
},
|
|
3453
|
+
all: {
|
|
3454
|
+
type: "boolean",
|
|
3455
|
+
default: false,
|
|
3456
|
+
description: "Remove every managed browser binary"
|
|
3457
|
+
}
|
|
3458
|
+
},
|
|
3459
|
+
required: []
|
|
3460
|
+
}
|
|
3461
|
+
};
|
|
3462
|
+
async function uninstall_browser_handler(args) {
|
|
3463
|
+
const start = Date.now();
|
|
3464
|
+
if (!args.browser && !args.all) return JSON.stringify({
|
|
3465
|
+
status: "error",
|
|
3466
|
+
message: "Provide a browser to remove, or set all: true."
|
|
3467
|
+
});
|
|
3468
|
+
try {
|
|
3469
|
+
await extensionUninstall({
|
|
3470
|
+
browser: args.browser,
|
|
3471
|
+
all: args.all
|
|
3472
|
+
});
|
|
3473
|
+
return JSON.stringify({
|
|
3474
|
+
status: "uninstalled",
|
|
3475
|
+
target: args.all ? "all" : args.browser,
|
|
3476
|
+
duration: Date.now() - start,
|
|
3477
|
+
hint: "Use extension_list_browsers to confirm what remains in the managed cache."
|
|
3478
|
+
});
|
|
3479
|
+
} catch (err) {
|
|
3480
|
+
return JSON.stringify({
|
|
3481
|
+
status: "error",
|
|
3482
|
+
target: args.all ? "all" : args.browser,
|
|
3483
|
+
message: err instanceof Error ? err.message : String(err),
|
|
3484
|
+
duration: Date.now() - start
|
|
3485
|
+
});
|
|
3486
|
+
}
|
|
3487
|
+
}
|
|
3271
3488
|
const list_browsers_schema = {
|
|
3272
3489
|
name: "extension_list_browsers",
|
|
3273
3490
|
description: "List managed browser binaries installed by the extension.dev platform. Shows what browsers are available in the managed cache without checking system-installed browsers.",
|
|
@@ -3341,7 +3558,14 @@ const detect_browsers_schema = {
|
|
|
3341
3558
|
"chrome",
|
|
3342
3559
|
"chromium",
|
|
3343
3560
|
"edge",
|
|
3344
|
-
"
|
|
3561
|
+
"brave",
|
|
3562
|
+
"opera",
|
|
3563
|
+
"vivaldi",
|
|
3564
|
+
"yandex",
|
|
3565
|
+
"firefox",
|
|
3566
|
+
"waterfox",
|
|
3567
|
+
"librewolf",
|
|
3568
|
+
"safari"
|
|
3345
3569
|
]
|
|
3346
3570
|
},
|
|
3347
3571
|
description: "Browsers to check. If omitted, checks all."
|
|
@@ -3353,8 +3577,21 @@ const ALL_BROWSERS = [
|
|
|
3353
3577
|
"chrome",
|
|
3354
3578
|
"chromium",
|
|
3355
3579
|
"edge",
|
|
3356
|
-
"
|
|
3580
|
+
"brave",
|
|
3581
|
+
"opera",
|
|
3582
|
+
"vivaldi",
|
|
3583
|
+
"yandex",
|
|
3584
|
+
"firefox",
|
|
3585
|
+
"waterfox",
|
|
3586
|
+
"librewolf",
|
|
3587
|
+
"safari"
|
|
3357
3588
|
];
|
|
3589
|
+
const MANAGED_INSTALLABLE = new Set([
|
|
3590
|
+
"chrome",
|
|
3591
|
+
"chromium",
|
|
3592
|
+
"edge",
|
|
3593
|
+
"firefox"
|
|
3594
|
+
]);
|
|
3358
3595
|
const SYSTEM_PATHS = {
|
|
3359
3596
|
darwin: {
|
|
3360
3597
|
chrome: [
|
|
@@ -3372,6 +3609,33 @@ const SYSTEM_PATHS = {
|
|
|
3372
3609
|
firefox: [
|
|
3373
3610
|
"/Applications/Firefox.app/Contents/MacOS/firefox",
|
|
3374
3611
|
`${process.env.HOME}/Applications/Firefox.app/Contents/MacOS/firefox`
|
|
3612
|
+
],
|
|
3613
|
+
brave: [
|
|
3614
|
+
"/Applications/Brave Browser.app/Contents/MacOS/Brave Browser",
|
|
3615
|
+
`${process.env.HOME}/Applications/Brave Browser.app/Contents/MacOS/Brave Browser`
|
|
3616
|
+
],
|
|
3617
|
+
opera: [
|
|
3618
|
+
"/Applications/Opera.app/Contents/MacOS/Opera",
|
|
3619
|
+
`${process.env.HOME}/Applications/Opera.app/Contents/MacOS/Opera`
|
|
3620
|
+
],
|
|
3621
|
+
vivaldi: [
|
|
3622
|
+
"/Applications/Vivaldi.app/Contents/MacOS/Vivaldi",
|
|
3623
|
+
`${process.env.HOME}/Applications/Vivaldi.app/Contents/MacOS/Vivaldi`
|
|
3624
|
+
],
|
|
3625
|
+
yandex: [
|
|
3626
|
+
"/Applications/Yandex.app/Contents/MacOS/Yandex",
|
|
3627
|
+
`${process.env.HOME}/Applications/Yandex.app/Contents/MacOS/Yandex`
|
|
3628
|
+
],
|
|
3629
|
+
waterfox: [
|
|
3630
|
+
"/Applications/Waterfox.app/Contents/MacOS/waterfox",
|
|
3631
|
+
`${process.env.HOME}/Applications/Waterfox.app/Contents/MacOS/waterfox`
|
|
3632
|
+
],
|
|
3633
|
+
librewolf: [
|
|
3634
|
+
"/Applications/LibreWolf.app/Contents/MacOS/librewolf",
|
|
3635
|
+
`${process.env.HOME}/Applications/LibreWolf.app/Contents/MacOS/librewolf`
|
|
3636
|
+
],
|
|
3637
|
+
safari: [
|
|
3638
|
+
"/Applications/Safari.app/Contents/MacOS/Safari"
|
|
3375
3639
|
]
|
|
3376
3640
|
},
|
|
3377
3641
|
linux: {
|
|
@@ -3394,6 +3658,31 @@ const SYSTEM_PATHS = {
|
|
|
3394
3658
|
"/usr/bin/firefox",
|
|
3395
3659
|
"/snap/bin/firefox",
|
|
3396
3660
|
"/usr/lib/firefox/firefox"
|
|
3661
|
+
],
|
|
3662
|
+
brave: [
|
|
3663
|
+
"/usr/bin/brave-browser",
|
|
3664
|
+
"/usr/bin/brave",
|
|
3665
|
+
"/snap/bin/brave"
|
|
3666
|
+
],
|
|
3667
|
+
opera: [
|
|
3668
|
+
"/usr/bin/opera",
|
|
3669
|
+
"/snap/bin/opera"
|
|
3670
|
+
],
|
|
3671
|
+
vivaldi: [
|
|
3672
|
+
"/usr/bin/vivaldi",
|
|
3673
|
+
"/usr/bin/vivaldi-stable"
|
|
3674
|
+
],
|
|
3675
|
+
yandex: [
|
|
3676
|
+
"/usr/bin/yandex-browser",
|
|
3677
|
+
"/usr/bin/yandex-browser-stable"
|
|
3678
|
+
],
|
|
3679
|
+
waterfox: [
|
|
3680
|
+
"/usr/bin/waterfox",
|
|
3681
|
+
"/opt/waterfox/waterfox"
|
|
3682
|
+
],
|
|
3683
|
+
librewolf: [
|
|
3684
|
+
"/usr/bin/librewolf",
|
|
3685
|
+
"/opt/librewolf/librewolf"
|
|
3397
3686
|
]
|
|
3398
3687
|
},
|
|
3399
3688
|
win32: {
|
|
@@ -3411,6 +3700,30 @@ const SYSTEM_PATHS = {
|
|
|
3411
3700
|
firefox: [
|
|
3412
3701
|
"C:\\Program Files\\Mozilla Firefox\\firefox.exe",
|
|
3413
3702
|
"C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe"
|
|
3703
|
+
],
|
|
3704
|
+
brave: [
|
|
3705
|
+
"C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe",
|
|
3706
|
+
"C:\\Program Files (x86)\\BraveSoftware\\Brave-Browser\\Application\\brave.exe"
|
|
3707
|
+
],
|
|
3708
|
+
opera: [
|
|
3709
|
+
`${process.env.LOCALAPPDATA || ""}\\Programs\\Opera\\opera.exe`,
|
|
3710
|
+
"C:\\Program Files\\Opera\\opera.exe"
|
|
3711
|
+
],
|
|
3712
|
+
vivaldi: [
|
|
3713
|
+
`${process.env.LOCALAPPDATA || ""}\\Vivaldi\\Application\\vivaldi.exe`,
|
|
3714
|
+
"C:\\Program Files\\Vivaldi\\Application\\vivaldi.exe"
|
|
3715
|
+
],
|
|
3716
|
+
yandex: [
|
|
3717
|
+
`${process.env.LOCALAPPDATA || ""}\\Yandex\\YandexBrowser\\Application\\browser.exe`,
|
|
3718
|
+
"C:\\Program Files (x86)\\Yandex\\YandexBrowser\\Application\\browser.exe"
|
|
3719
|
+
],
|
|
3720
|
+
waterfox: [
|
|
3721
|
+
"C:\\Program Files\\Waterfox\\waterfox.exe",
|
|
3722
|
+
"C:\\Program Files (x86)\\Waterfox\\waterfox.exe"
|
|
3723
|
+
],
|
|
3724
|
+
librewolf: [
|
|
3725
|
+
"C:\\Program Files\\LibreWolf\\librewolf.exe",
|
|
3726
|
+
"C:\\Program Files (x86)\\LibreWolf\\librewolf.exe"
|
|
3414
3727
|
]
|
|
3415
3728
|
}
|
|
3416
3729
|
};
|
|
@@ -3521,7 +3834,8 @@ async function detect_browsers_handler(args) {
|
|
|
3521
3834
|
if (node_fs.existsSync(browserDir)) managed.installed.push(browser);
|
|
3522
3835
|
}
|
|
3523
3836
|
for (const browser of browsersToCheck){
|
|
3524
|
-
const isGecko =
|
|
3837
|
+
const isGecko = isGeckoFamily(browser);
|
|
3838
|
+
const isWebkit = WEBKIT_FAMILY.has(browser);
|
|
3525
3839
|
let binaryPath = findManagedBinary(browser);
|
|
3526
3840
|
let source = "managed";
|
|
3527
3841
|
if (!binaryPath) {
|
|
@@ -3529,14 +3843,14 @@ async function detect_browsers_handler(args) {
|
|
|
3529
3843
|
source = binaryPath ? "system" : "not_found";
|
|
3530
3844
|
}
|
|
3531
3845
|
let version = null;
|
|
3532
|
-
if (binaryPath) version = await getVersion(binaryPath, browser);
|
|
3846
|
+
if (binaryPath && !isWebkit) version = await getVersion(binaryPath, browser);
|
|
3533
3847
|
detected.push({
|
|
3534
3848
|
browser,
|
|
3535
3849
|
binaryPath,
|
|
3536
3850
|
source,
|
|
3537
|
-
engine: isGecko ? "gecko" : "chromium",
|
|
3851
|
+
engine: isWebkit ? "webkit" : isGecko ? "gecko" : "chromium",
|
|
3538
3852
|
version,
|
|
3539
|
-
cdpSupport: !isGecko,
|
|
3853
|
+
cdpSupport: !isGecko && !isWebkit,
|
|
3540
3854
|
rdpSupport: isGecko
|
|
3541
3855
|
});
|
|
3542
3856
|
}
|
|
@@ -3549,7 +3863,7 @@ async function detect_browsers_handler(args) {
|
|
|
3549
3863
|
available: available.map((d)=>d.browser),
|
|
3550
3864
|
missing: missing.map((d)=>d.browser)
|
|
3551
3865
|
},
|
|
3552
|
-
hint: missing.length ? `Missing browser(s): ${missing.map((d)=>d.browser).join(", ")}. Use extension_install_browser to install
|
|
3866
|
+
hint: missing.length ? `Missing browser(s): ${missing.map((d)=>d.browser).join(", ")}.${missing.some((d)=>MANAGED_INSTALLABLE.has(d.browser)) ? ` Use extension_install_browser to install ${missing.filter((d)=>MANAGED_INSTALLABLE.has(d.browser)).map((d)=>d.browser).join(", ")}.` : ""}` : "All requested browsers are available."
|
|
3553
3867
|
});
|
|
3554
3868
|
}
|
|
3555
3869
|
const doctor_schema = {
|
|
@@ -3700,6 +4014,7 @@ const tools = [
|
|
|
3700
4014
|
whoami_namespaceObject,
|
|
3701
4015
|
logout_namespaceObject,
|
|
3702
4016
|
install_browser_namespaceObject,
|
|
4017
|
+
uninstall_browser_namespaceObject,
|
|
3703
4018
|
list_browsers_namespaceObject,
|
|
3704
4019
|
detect_browsers_namespaceObject,
|
|
3705
4020
|
doctor_namespaceObject
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const CHROMIUM_FAMILY: ReadonlySet<string>;
|
|
2
2
|
export declare const GECKO_FAMILY: ReadonlySet<string>;
|
|
3
|
+
export declare const WEBKIT_FAMILY: ReadonlySet<string>;
|
|
3
4
|
export declare function isChromiumFamily(browser: string): boolean;
|
|
4
5
|
export declare function isGeckoFamily(browser: string): boolean;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare const LAUNCH_FLAG_SCHEMA: {
|
|
2
|
+
readonly profile: {
|
|
3
|
+
readonly type: "string";
|
|
4
|
+
readonly description: "Browser profile path, or \"false\" to reuse the default user profile. Omit for a fresh throwaway profile.";
|
|
5
|
+
};
|
|
6
|
+
readonly startingUrl: {
|
|
7
|
+
readonly type: "string";
|
|
8
|
+
readonly description: "URL the browser opens on launch";
|
|
9
|
+
};
|
|
10
|
+
readonly chromiumBinary: {
|
|
11
|
+
readonly type: "string";
|
|
12
|
+
readonly description: "Path to a custom Chromium-based binary (overrides browser)";
|
|
13
|
+
};
|
|
14
|
+
readonly geckoBinary: {
|
|
15
|
+
readonly type: "string";
|
|
16
|
+
readonly description: "Path to a custom Gecko/Firefox binary (overrides browser)";
|
|
17
|
+
};
|
|
18
|
+
readonly host: {
|
|
19
|
+
readonly type: "string";
|
|
20
|
+
readonly description: "Dev server bind host. Use 0.0.0.0 for Docker or devcontainers. Defaults to 127.0.0.1";
|
|
21
|
+
};
|
|
22
|
+
readonly publicHost: {
|
|
23
|
+
readonly type: "string";
|
|
24
|
+
readonly description: "Connectable host the browser dials for HMR and reload when it differs from the bind host";
|
|
25
|
+
};
|
|
26
|
+
readonly extensions: {
|
|
27
|
+
readonly type: "array";
|
|
28
|
+
readonly items: {
|
|
29
|
+
readonly type: "string";
|
|
30
|
+
};
|
|
31
|
+
readonly description: "Companion extension paths or store URLs to load alongside the project";
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export interface LaunchFlagArgs {
|
|
35
|
+
profile?: string;
|
|
36
|
+
startingUrl?: string;
|
|
37
|
+
chromiumBinary?: string;
|
|
38
|
+
geckoBinary?: string;
|
|
39
|
+
host?: string;
|
|
40
|
+
publicHost?: string;
|
|
41
|
+
extensions?: string[];
|
|
42
|
+
}
|
|
43
|
+
export declare function launchFlagArgs(args: LaunchFlagArgs): string[];
|
|
@@ -24,6 +24,26 @@ export declare const schema: {
|
|
|
24
24
|
default: boolean;
|
|
25
25
|
description: string;
|
|
26
26
|
};
|
|
27
|
+
zipFilename: {
|
|
28
|
+
type: string;
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
31
|
+
polyfill: {
|
|
32
|
+
type: string;
|
|
33
|
+
default: boolean;
|
|
34
|
+
description: string;
|
|
35
|
+
};
|
|
36
|
+
silent: {
|
|
37
|
+
type: string;
|
|
38
|
+
default: boolean;
|
|
39
|
+
description: string;
|
|
40
|
+
};
|
|
41
|
+
mode: {
|
|
42
|
+
type: string;
|
|
43
|
+
enum: string[];
|
|
44
|
+
default: string;
|
|
45
|
+
description: string;
|
|
46
|
+
};
|
|
27
47
|
};
|
|
28
48
|
required: string[];
|
|
29
49
|
};
|
|
@@ -33,4 +53,8 @@ export declare function handler(args: {
|
|
|
33
53
|
browser?: string;
|
|
34
54
|
zip?: boolean;
|
|
35
55
|
zipSource?: boolean;
|
|
56
|
+
zipFilename?: string;
|
|
57
|
+
polyfill?: boolean;
|
|
58
|
+
silent?: boolean;
|
|
59
|
+
mode?: "development" | "production" | "none";
|
|
36
60
|
}): Promise<string>;
|