extension 3.12.0 → 3.12.1
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/README.md +1 -1
- package/dist/656.cjs +2481 -0
- package/dist/859.cjs +1932 -0
- package/dist/browser/browsers-lib/banner.d.ts +37 -0
- package/dist/browser/browsers-lib/constants.d.ts +2 -0
- package/dist/browser/browsers-lib/content-script-contracts.d.ts +2 -0
- package/dist/browser/browsers-lib/content-script-targets.d.ts +33 -0
- package/dist/browser/browsers-lib/html-merge.d.ts +1 -0
- package/dist/browser/browsers-lib/instance-registry.d.ts +8 -0
- package/dist/browser/browsers-lib/messages.d.ts +208 -0
- package/dist/browser/browsers-lib/output-binaries-resolver.d.ts +5 -0
- package/dist/browser/browsers-lib/ready-message.d.ts +1 -0
- package/dist/browser/browsers-lib/runtime-options.d.ts +12 -0
- package/dist/browser/browsers-lib/shared-utils.d.ts +11 -0
- package/dist/browser/browsers-types.d.ts +270 -0
- package/dist/browser/index.d.ts +74 -0
- package/dist/browser/run-chromium/chromium-context/index.d.ts +20 -0
- package/dist/browser/run-chromium/chromium-launch/browser-config.d.ts +4 -0
- package/dist/browser/run-chromium/chromium-launch/dry-run.d.ts +1 -0
- package/dist/browser/run-chromium/chromium-launch/extension-output-path.d.ts +8 -0
- package/dist/browser/run-chromium/chromium-launch/index.d.ts +31 -0
- package/dist/browser/run-chromium/chromium-launch/master-preferences.d.ts +163 -0
- package/dist/browser/run-chromium/chromium-launch/process-handlers.d.ts +3 -0
- package/dist/browser/run-chromium/chromium-launch/setup-cdp-after-launch.d.ts +3 -0
- package/dist/browser/run-chromium/chromium-launch/wsl-support.d.ts +15 -0
- package/dist/browser/run-chromium/chromium-source-inspection/cdp-client.d.ts +57 -0
- package/dist/browser/run-chromium/chromium-source-inspection/cdp-extension-controller/connect.d.ts +2 -0
- package/dist/browser/run-chromium/chromium-source-inspection/cdp-extension-controller/derive-id.d.ts +2 -0
- package/dist/browser/run-chromium/chromium-source-inspection/cdp-extension-controller/ensure.d.ts +6 -0
- package/dist/browser/run-chromium/chromium-source-inspection/cdp-extension-controller/index.d.ts +58 -0
- package/dist/browser/run-chromium/chromium-source-inspection/cdp-extension-controller/logging.d.ts +7 -0
- package/dist/browser/run-chromium/chromium-source-inspection/discovery.d.ts +2 -0
- package/dist/browser/run-chromium/chromium-source-inspection/extensions.d.ts +9 -0
- package/dist/browser/run-chromium/chromium-source-inspection/page.d.ts +45 -0
- package/dist/browser/run-chromium/chromium-source-inspection/ws.d.ts +2 -0
- package/dist/browser/run-chromium/chromium-types.d.ts +65 -0
- package/dist/browser/run-chromium/manifest-readiness.d.ts +15 -0
- package/dist/browser/run-firefox/firefox-context/index.d.ts +24 -0
- package/dist/browser/run-firefox/firefox-launch/binary-detector.d.ts +10 -0
- package/dist/browser/run-firefox/firefox-launch/browser-config.d.ts +19 -0
- package/dist/browser/run-firefox/firefox-launch/dry-run.d.ts +1 -0
- package/dist/browser/run-firefox/firefox-launch/index.d.ts +37 -0
- package/dist/browser/run-firefox/firefox-launch/master-preferences.d.ts +137 -0
- package/dist/browser/run-firefox/firefox-launch/process-handlers.d.ts +2 -0
- package/dist/browser/run-firefox/firefox-launch/setup-rdp-after-launch.d.ts +6 -0
- package/dist/browser/run-firefox/firefox-launch/wsl-support.d.ts +15 -0
- package/dist/browser/run-firefox/firefox-source-inspection/rdp-extension-controller/index.d.ts +38 -0
- package/dist/browser/run-firefox/firefox-source-inspection/remote-firefox/addons-install.d.ts +10 -0
- package/dist/browser/run-firefox/firefox-source-inspection/remote-firefox/addons.d.ts +1 -0
- package/dist/browser/run-firefox/firefox-source-inspection/remote-firefox/evaluate.d.ts +18 -0
- package/dist/browser/run-firefox/firefox-source-inspection/remote-firefox/firefox-utils.d.ts +17 -0
- package/dist/browser/run-firefox/firefox-source-inspection/remote-firefox/index.d.ts +38 -0
- package/dist/browser/run-firefox/firefox-source-inspection/remote-firefox/logging.d.ts +11 -0
- package/dist/browser/run-firefox/firefox-source-inspection/remote-firefox/message-utils.d.ts +2 -0
- package/dist/browser/run-firefox/firefox-source-inspection/remote-firefox/messaging-client.d.ts +37 -0
- package/dist/browser/run-firefox/firefox-source-inspection/remote-firefox/moz-id.d.ts +2 -0
- package/dist/browser/run-firefox/firefox-source-inspection/remote-firefox/rdp-api.d.ts +29 -0
- package/dist/browser/run-firefox/firefox-source-inspection/remote-firefox/rdp-wire.d.ts +8 -0
- package/dist/browser/run-firefox/firefox-source-inspection/remote-firefox/source-inspect.d.ts +9 -0
- package/dist/browser/run-firefox/firefox-source-inspection/remote-firefox/transport.d.ts +20 -0
- package/dist/browser/run-firefox/firefox-types.d.ts +16 -0
- package/dist/browser/run-only.d.ts +22 -0
- package/dist/cli/cli-lib/extension-develop-runtime.d.ts +9 -0
- package/dist/{utils.d.ts → cli/utils.d.ts} +0 -1
- package/dist/cli.cjs +9943 -1964
- package/package.json +7 -8
- package/dist/cli-lib/extension-develop-runtime.d.ts +0 -3
- /package/dist/{check-updates.d.ts → cli/check-updates.d.ts} +0 -0
- /package/dist/{cli-lib → cli/cli-lib}/manifest-summary.d.ts +0 -0
- /package/dist/{cli-lib → cli/cli-lib}/messages.d.ts +0 -0
- /package/dist/{cli-lib → cli/cli-lib}/project-profile.d.ts +0 -0
- /package/dist/{cli-lib → cli/cli-lib}/telemetry-cli.d.ts +0 -0
- /package/dist/{cli-lib → cli/cli-lib}/telemetry.d.ts +0 -0
- /package/dist/{cli-lib → cli/cli-lib}/workflow-profile.d.ts +0 -0
- /package/dist/{cli-package-json.d.ts → cli/cli-package-json.d.ts} +0 -0
- /package/dist/{commands → cli/commands}/build.d.ts +0 -0
- /package/dist/{commands → cli/commands}/create.d.ts +0 -0
- /package/dist/{commands → cli/commands}/dev-wait.d.ts +0 -0
- /package/dist/{commands → cli/commands}/dev.d.ts +0 -0
- /package/dist/{commands → cli/commands}/install.d.ts +0 -0
- /package/dist/{commands → cli/commands}/preview.d.ts +0 -0
- /package/dist/{commands → cli/commands}/start.d.ts +0 -0
- /package/dist/{index.d.ts → cli/index.d.ts} +0 -0
- /package/dist/{rslib.config.d.ts → cli/rslib.config.d.ts} +0 -0
- /package/dist/{utils → cli/utils}/normalize-options.d.ts +0 -0
- /package/dist/{vitest.config.d.ts → cli/vitest.config.d.ts} +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { CompilationLike } from '../../browsers-types';
|
|
2
|
+
import type { BrowserType, BrowserConfig } from '../../browsers-types';
|
|
3
|
+
type BrowserConfigOptions = {
|
|
4
|
+
browser: BrowserType;
|
|
5
|
+
mode: 'development' | 'production' | 'none';
|
|
6
|
+
browserFlags?: string[];
|
|
7
|
+
excludeBrowserFlags?: string[];
|
|
8
|
+
profile?: string | false;
|
|
9
|
+
preferences?: Record<string, unknown>;
|
|
10
|
+
startingUrl?: string;
|
|
11
|
+
port?: number | string;
|
|
12
|
+
noOpen?: boolean;
|
|
13
|
+
} & BrowserConfig & {
|
|
14
|
+
keepProfileChanges?: boolean;
|
|
15
|
+
copyFromProfile?: string;
|
|
16
|
+
instanceId?: string;
|
|
17
|
+
};
|
|
18
|
+
export declare function browserConfig(compilation: CompilationLike, configOptions: BrowserConfigOptions): Promise<string>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function logFirefoxDryRun(browserBinaryLocation: string, firefoxConfig: string): void;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { CompilationLike } from '../../browsers-types';
|
|
2
|
+
import type { FirefoxContext } from '../firefox-context';
|
|
3
|
+
import type { BrowserType, BrowserConfig } from '../../browsers-types';
|
|
4
|
+
import type { FirefoxPluginRuntime } from '../firefox-types';
|
|
5
|
+
type LaunchOptions = {
|
|
6
|
+
browser: BrowserType;
|
|
7
|
+
mode: 'development' | 'production' | 'none';
|
|
8
|
+
browserFlags?: string[];
|
|
9
|
+
excludeBrowserFlags?: string[];
|
|
10
|
+
profile?: string | false;
|
|
11
|
+
preferences?: Record<string, unknown>;
|
|
12
|
+
startingUrl?: string;
|
|
13
|
+
port?: number | string;
|
|
14
|
+
noOpen?: boolean;
|
|
15
|
+
} & BrowserConfig;
|
|
16
|
+
export declare class FirefoxLaunchPlugin {
|
|
17
|
+
private readonly host;
|
|
18
|
+
private readonly ctx;
|
|
19
|
+
private child;
|
|
20
|
+
private watchTimeout?;
|
|
21
|
+
constructor(host: FirefoxPluginRuntime, ctx: FirefoxContext);
|
|
22
|
+
/**
|
|
23
|
+
* Run the Firefox launch flow without requiring a bundler compiler instance.
|
|
24
|
+
* Intended for run-only preview paths.
|
|
25
|
+
*/
|
|
26
|
+
runOnce(compilation: CompilationLike, options: LaunchOptions): Promise<void>;
|
|
27
|
+
apply(compiler: any): void;
|
|
28
|
+
private launch;
|
|
29
|
+
private resolveSpawnStdio;
|
|
30
|
+
private spawnFirefoxChild;
|
|
31
|
+
private pipeChildOutput;
|
|
32
|
+
private wireChildLifecycle;
|
|
33
|
+
private cleanupInstance;
|
|
34
|
+
private scheduleWatchTimeout;
|
|
35
|
+
private printInstallHint;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
declare const masterPreferences: {
|
|
2
|
+
'browser.aboutwelcome.enabled': boolean;
|
|
3
|
+
'browser.startup.homepage_override.mstone': string;
|
|
4
|
+
'browser.shell.didSkipDefaultBrowserCheckOnFirstRun': boolean;
|
|
5
|
+
'datareporting.policy.dataSubmissionPolicyBypassNotification': boolean;
|
|
6
|
+
'browser.startup.upgradeDialog.enabled': boolean;
|
|
7
|
+
'browser.messaging-system.whatsNewPanel.enabled': boolean;
|
|
8
|
+
'browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons': boolean;
|
|
9
|
+
'browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features': boolean;
|
|
10
|
+
'browser.startup.homepage_override_url': string;
|
|
11
|
+
'app.update.enabled': boolean;
|
|
12
|
+
'browser.dom.window.dump.enabled': boolean;
|
|
13
|
+
'browser.formfill.enable': boolean;
|
|
14
|
+
'browser.link.open_newwindow': number;
|
|
15
|
+
'browser.sessionstore.enabled': boolean;
|
|
16
|
+
'browser.sessionstore.resume_from_crash': boolean;
|
|
17
|
+
'browser.sessionstore.max_resumed_crashes': number;
|
|
18
|
+
'browser.sessionstore.restore_on_demand': boolean;
|
|
19
|
+
'browser.sessionstore.resume_session_once': boolean;
|
|
20
|
+
'toolkit.startup.max_resumed_crashes': number;
|
|
21
|
+
'browser.shell.checkDefaultBrowser': boolean;
|
|
22
|
+
'browser.sync.enabled': boolean;
|
|
23
|
+
'browser.startup.page': number;
|
|
24
|
+
'browser.startup.homepage_welcome_url': string;
|
|
25
|
+
'browser.startup.homepage_welcome_url_additional': string;
|
|
26
|
+
'browser.urlbar.suggest.bookmark': boolean;
|
|
27
|
+
'browser.urlbar.suggest.clipboard': boolean;
|
|
28
|
+
'browser.urlbar.suggest.history': boolean;
|
|
29
|
+
'browser.urlbar.suggest.openpage': boolean;
|
|
30
|
+
'browser.urlbar.suggest.remotetab': boolean;
|
|
31
|
+
'browser.urlbar.suggest.searches': boolean;
|
|
32
|
+
'browser.urlbar.suggest.topsites': boolean;
|
|
33
|
+
'browser.urlbar.suggest.engines': boolean;
|
|
34
|
+
'browser.urlbar.suggest.calculator': boolean;
|
|
35
|
+
'browser.urlbar.suggest.recentsearches': boolean;
|
|
36
|
+
'browser.newtabpage.enabled': boolean;
|
|
37
|
+
'browser.newtabpage.activity-stream.showSearch': boolean;
|
|
38
|
+
'browser.newtabpage.activity-stream.showSponsored': boolean;
|
|
39
|
+
'browser.newtabpage.activity-stream.feeds.topsites': boolean;
|
|
40
|
+
'browser.newtabpage.activity-stream.feeds.section.topstories': boolean;
|
|
41
|
+
'browser.newtabpage.activity-stream.feeds.snippets': boolean;
|
|
42
|
+
'browser.newtabpage.activity-stream.improvesearch.handoffToAwesomebar': boolean;
|
|
43
|
+
'datareporting.policy.dataSubmissionEnabled': boolean;
|
|
44
|
+
'datareporting.policy.firstRunURL': string;
|
|
45
|
+
'devtools.browserconsole.contentMessages': boolean;
|
|
46
|
+
'devtools.chrome.enabled': boolean;
|
|
47
|
+
'devtools.debugger.prompt-connection': boolean;
|
|
48
|
+
'devtools.debugger.remote-enabled': boolean;
|
|
49
|
+
'devtools.errorconsole.enabled': boolean;
|
|
50
|
+
'extensions.installDistroAddons': boolean;
|
|
51
|
+
'extensions.autoDisableScopes': number;
|
|
52
|
+
'extensions.chrome.enabled': boolean;
|
|
53
|
+
'extensions.logging.enabled': boolean;
|
|
54
|
+
'extensions.checkCompatibility.nightly': boolean;
|
|
55
|
+
'extensions.update.enabled': boolean;
|
|
56
|
+
'extensions.update.notifyUser': boolean;
|
|
57
|
+
'extensions.enabledScopes': number;
|
|
58
|
+
'extensions.getAddons.cache.enabled': boolean;
|
|
59
|
+
'network.prefetch.next': boolean;
|
|
60
|
+
'network.speculative.preconnect.enabled': boolean;
|
|
61
|
+
'toolkit.telemetry.enabled': boolean;
|
|
62
|
+
'toolkit.telemetry.archive.enabled': boolean;
|
|
63
|
+
'toolkit.telemetry.newProfilePing.enabled': boolean;
|
|
64
|
+
'toolkit.recovery.enabled': boolean;
|
|
65
|
+
'urlclassifier.updateinterval': number;
|
|
66
|
+
'security.enterprise_roots.enabled': boolean;
|
|
67
|
+
'xpinstall.signatures.required': boolean;
|
|
68
|
+
};
|
|
69
|
+
export default masterPreferences;
|
|
70
|
+
export declare function getPreferences(customPrefs: Record<string, any>): {
|
|
71
|
+
'browser.aboutwelcome.enabled': boolean;
|
|
72
|
+
'browser.startup.homepage_override.mstone': string;
|
|
73
|
+
'browser.shell.didSkipDefaultBrowserCheckOnFirstRun': boolean;
|
|
74
|
+
'datareporting.policy.dataSubmissionPolicyBypassNotification': boolean;
|
|
75
|
+
'browser.startup.upgradeDialog.enabled': boolean;
|
|
76
|
+
'browser.messaging-system.whatsNewPanel.enabled': boolean;
|
|
77
|
+
'browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons': boolean;
|
|
78
|
+
'browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features': boolean;
|
|
79
|
+
'browser.startup.homepage_override_url': string;
|
|
80
|
+
'app.update.enabled': boolean;
|
|
81
|
+
'browser.dom.window.dump.enabled': boolean;
|
|
82
|
+
'browser.formfill.enable': boolean;
|
|
83
|
+
'browser.link.open_newwindow': number;
|
|
84
|
+
'browser.sessionstore.enabled': boolean;
|
|
85
|
+
'browser.sessionstore.resume_from_crash': boolean;
|
|
86
|
+
'browser.sessionstore.max_resumed_crashes': number;
|
|
87
|
+
'browser.sessionstore.restore_on_demand': boolean;
|
|
88
|
+
'browser.sessionstore.resume_session_once': boolean;
|
|
89
|
+
'toolkit.startup.max_resumed_crashes': number;
|
|
90
|
+
'browser.shell.checkDefaultBrowser': boolean;
|
|
91
|
+
'browser.sync.enabled': boolean;
|
|
92
|
+
'browser.startup.page': number;
|
|
93
|
+
'browser.startup.homepage_welcome_url': string;
|
|
94
|
+
'browser.startup.homepage_welcome_url_additional': string;
|
|
95
|
+
'browser.urlbar.suggest.bookmark': boolean;
|
|
96
|
+
'browser.urlbar.suggest.clipboard': boolean;
|
|
97
|
+
'browser.urlbar.suggest.history': boolean;
|
|
98
|
+
'browser.urlbar.suggest.openpage': boolean;
|
|
99
|
+
'browser.urlbar.suggest.remotetab': boolean;
|
|
100
|
+
'browser.urlbar.suggest.searches': boolean;
|
|
101
|
+
'browser.urlbar.suggest.topsites': boolean;
|
|
102
|
+
'browser.urlbar.suggest.engines': boolean;
|
|
103
|
+
'browser.urlbar.suggest.calculator': boolean;
|
|
104
|
+
'browser.urlbar.suggest.recentsearches': boolean;
|
|
105
|
+
'browser.newtabpage.enabled': boolean;
|
|
106
|
+
'browser.newtabpage.activity-stream.showSearch': boolean;
|
|
107
|
+
'browser.newtabpage.activity-stream.showSponsored': boolean;
|
|
108
|
+
'browser.newtabpage.activity-stream.feeds.topsites': boolean;
|
|
109
|
+
'browser.newtabpage.activity-stream.feeds.section.topstories': boolean;
|
|
110
|
+
'browser.newtabpage.activity-stream.feeds.snippets': boolean;
|
|
111
|
+
'browser.newtabpage.activity-stream.improvesearch.handoffToAwesomebar': boolean;
|
|
112
|
+
'datareporting.policy.dataSubmissionEnabled': boolean;
|
|
113
|
+
'datareporting.policy.firstRunURL': string;
|
|
114
|
+
'devtools.browserconsole.contentMessages': boolean;
|
|
115
|
+
'devtools.chrome.enabled': boolean;
|
|
116
|
+
'devtools.debugger.prompt-connection': boolean;
|
|
117
|
+
'devtools.debugger.remote-enabled': boolean;
|
|
118
|
+
'devtools.errorconsole.enabled': boolean;
|
|
119
|
+
'extensions.installDistroAddons': boolean;
|
|
120
|
+
'extensions.autoDisableScopes': number;
|
|
121
|
+
'extensions.chrome.enabled': boolean;
|
|
122
|
+
'extensions.logging.enabled': boolean;
|
|
123
|
+
'extensions.checkCompatibility.nightly': boolean;
|
|
124
|
+
'extensions.update.enabled': boolean;
|
|
125
|
+
'extensions.update.notifyUser': boolean;
|
|
126
|
+
'extensions.enabledScopes': number;
|
|
127
|
+
'extensions.getAddons.cache.enabled': boolean;
|
|
128
|
+
'network.prefetch.next': boolean;
|
|
129
|
+
'network.speculative.preconnect.enabled': boolean;
|
|
130
|
+
'toolkit.telemetry.enabled': boolean;
|
|
131
|
+
'toolkit.telemetry.archive.enabled': boolean;
|
|
132
|
+
'toolkit.telemetry.newProfilePing.enabled': boolean;
|
|
133
|
+
'toolkit.recovery.enabled': boolean;
|
|
134
|
+
'urlclassifier.updateinterval': number;
|
|
135
|
+
'security.enterprise_roots.enabled': boolean;
|
|
136
|
+
'xpinstall.signatures.required': boolean;
|
|
137
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CompilationLike } from '../../browsers-types';
|
|
2
|
+
import { FirefoxRDPController } from '../firefox-source-inspection/rdp-extension-controller';
|
|
3
|
+
import type { FirefoxPluginRuntime } from '../firefox-types';
|
|
4
|
+
export declare function setupRdpAfterLaunch(plugin: FirefoxPluginRuntime & {
|
|
5
|
+
[k: string]: unknown;
|
|
6
|
+
}, compilation: CompilationLike, debugPort: number): Promise<FirefoxRDPController>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ChildProcess } from 'child_process';
|
|
2
|
+
type FirefoxLogger = {
|
|
3
|
+
warn?: (...args: unknown[]) => void;
|
|
4
|
+
};
|
|
5
|
+
export declare function isWslEnv(): boolean;
|
|
6
|
+
export declare function normalizeBinaryPathForWsl(input: string): string;
|
|
7
|
+
export declare function resolveWslWindowsBinary(): string | null;
|
|
8
|
+
export declare function spawnFirefoxProcess(opts: {
|
|
9
|
+
binary: string;
|
|
10
|
+
args: string[];
|
|
11
|
+
stdio: any;
|
|
12
|
+
fallbackBinary?: string | null;
|
|
13
|
+
logger?: FirefoxLogger;
|
|
14
|
+
}): Promise<ChildProcess>;
|
|
15
|
+
export {};
|
package/dist/browser/run-firefox/firefox-source-inspection/rdp-extension-controller/index.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { CompilationLike } from '../../../browsers-types';
|
|
2
|
+
import { RemoteFirefox } from '../remote-firefox';
|
|
3
|
+
import type { BrowserType } from '../../../browsers-types';
|
|
4
|
+
import type { ContentScriptTargetRule } from '../../../browsers-lib/content-script-targets';
|
|
5
|
+
type PluginLike = {
|
|
6
|
+
extension: string | string[];
|
|
7
|
+
browser: BrowserType;
|
|
8
|
+
browserFlags?: string[];
|
|
9
|
+
profile?: string | false;
|
|
10
|
+
preferences?: Record<string, unknown>;
|
|
11
|
+
startingUrl?: string;
|
|
12
|
+
geckoBinary?: string;
|
|
13
|
+
instanceId?: string;
|
|
14
|
+
source?: string | boolean;
|
|
15
|
+
watchSource?: boolean;
|
|
16
|
+
port?: number | string;
|
|
17
|
+
browserVersionLine?: string;
|
|
18
|
+
};
|
|
19
|
+
export declare class FirefoxRDPController {
|
|
20
|
+
private readonly remote;
|
|
21
|
+
private readonly debugPort;
|
|
22
|
+
constructor(plugin: PluginLike, debugPort: number);
|
|
23
|
+
getRemoteFirefox(): RemoteFirefox;
|
|
24
|
+
connect(): Promise<void>;
|
|
25
|
+
ensureLoaded(compilation: CompilationLike): Promise<void>;
|
|
26
|
+
hardReload(compilation: CompilationLike, changedAssets: string[]): Promise<void>;
|
|
27
|
+
reloadMatchingTabsForContentScripts(rules: ContentScriptTargetRule[]): Promise<number>;
|
|
28
|
+
enableUnifiedLogging(opts: {
|
|
29
|
+
level?: string;
|
|
30
|
+
contexts?: string[] | undefined;
|
|
31
|
+
urlFilter?: string | undefined;
|
|
32
|
+
tabFilter?: number | string | undefined;
|
|
33
|
+
format?: 'pretty' | 'json' | 'ndjson';
|
|
34
|
+
timestamps?: boolean;
|
|
35
|
+
color?: boolean;
|
|
36
|
+
}): Promise<void>;
|
|
37
|
+
}
|
|
38
|
+
export { FirefoxRDPController as RDPExtensionController };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CompilationLike } from '../../../browsers-types';
|
|
2
|
+
import { MessagingClient } from './messaging-client';
|
|
3
|
+
export declare function getAddonsActorWithRetry(client: MessagingClient, cached: string | undefined, tries?: number, delayMs?: number): Promise<string | undefined>;
|
|
4
|
+
export declare function computeCandidateAddonPaths(compilation: CompilationLike, extensionsToLoad: string[], projectContext?: string): string[];
|
|
5
|
+
export declare function waitForManagerWelcome(client: MessagingClient): Promise<void>;
|
|
6
|
+
export declare function installTemporaryAddon(client: MessagingClient, addonsActor: string, addonPath: string, openDevTools: boolean): Promise<{
|
|
7
|
+
addon?: {
|
|
8
|
+
id?: string;
|
|
9
|
+
};
|
|
10
|
+
} | undefined>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function resolveAddonDirectory(baseDir: string, inputPath: string): string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface RdpClientLike {
|
|
2
|
+
request: (payload: unknown) => Promise<unknown>;
|
|
3
|
+
getTargetFromDescriptor?: (descriptorId: string) => Promise<unknown>;
|
|
4
|
+
on?: (event: string, listener: (message: unknown) => void) => unknown;
|
|
5
|
+
off?: (event: string, listener: (message: unknown) => void) => unknown;
|
|
6
|
+
removeListener?: (event: string, listener: (message: unknown) => void) => unknown;
|
|
7
|
+
}
|
|
8
|
+
export declare function evaluate(client: RdpClientLike, tabId: string, expression: string): Promise<any>;
|
|
9
|
+
export declare function evaluateRaw(client: RdpClientLike, tabId: string, expression: string): Promise<unknown>;
|
|
10
|
+
export declare function coerceResponseToString(client: RdpClientLike, tabId: string, response: unknown, opts?: {
|
|
11
|
+
fallbackToFullDocument?: boolean;
|
|
12
|
+
}): Promise<string>;
|
|
13
|
+
export declare function resolveActorForEvaluation(client: RdpClientLike, descriptorActor: string, consoleActorHint?: string): Promise<string>;
|
|
14
|
+
export declare function serializeDocument(client: RdpClientLike, actorToUse: string): Promise<string>;
|
|
15
|
+
export declare function extractShadowContent(client: RdpClientLike, actorToUse: string): Promise<string>;
|
|
16
|
+
export declare function mergeShadowIntoMain(mainHTML: string, shadowContent: string): string;
|
|
17
|
+
export declare function getPageHTML(client: RdpClientLike, descriptorActor: string, consoleActorHint?: string): Promise<string>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare function printRunningInDevelopmentSummary(candidateAddonPaths: string[], browser: 'firefox', extensionId?: string, browserVersionLine?: string): Promise<boolean>;
|
|
2
|
+
export declare function printSourceInspection(html: string): void;
|
|
3
|
+
export declare function printLogEventPretty(event: {
|
|
4
|
+
id: string;
|
|
5
|
+
timestamp: number;
|
|
6
|
+
level: string;
|
|
7
|
+
context: string;
|
|
8
|
+
messageParts: string[];
|
|
9
|
+
url: string;
|
|
10
|
+
tabId: number | undefined;
|
|
11
|
+
}, color: boolean, colorFns: {
|
|
12
|
+
red: (s: string) => string;
|
|
13
|
+
yellow: (s: string) => string;
|
|
14
|
+
gray: (s: string) => string;
|
|
15
|
+
blue: (s: string) => string;
|
|
16
|
+
}, showTs: boolean): void;
|
|
17
|
+
export declare function printLogEventJson(event: unknown): void;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { CompilationLike } from '../../../browsers-types';
|
|
2
|
+
import { type PluginInterface } from '../../../browsers-types';
|
|
3
|
+
import { type ContentScriptTargetRule } from '../../../browsers-lib/content-script-targets';
|
|
4
|
+
export declare class RemoteFirefox {
|
|
5
|
+
private readonly options;
|
|
6
|
+
private needsReinstall;
|
|
7
|
+
private client;
|
|
8
|
+
private loggingAttached;
|
|
9
|
+
private cachedAddonsActor;
|
|
10
|
+
private cachedSupportsReload;
|
|
11
|
+
private lastInstalledAddonPath;
|
|
12
|
+
private derivedExtensionId;
|
|
13
|
+
private selectPrimaryAddonPath;
|
|
14
|
+
constructor(configOptions: PluginInterface & {
|
|
15
|
+
browserVersionLine?: string;
|
|
16
|
+
});
|
|
17
|
+
private resolveRdpPort;
|
|
18
|
+
private connectClient;
|
|
19
|
+
installAddons(compilation: CompilationLike): Promise<void>;
|
|
20
|
+
markNeedsReinstall(): void;
|
|
21
|
+
private ensureCapabilities;
|
|
22
|
+
private reloadAddonOrReinstall;
|
|
23
|
+
hardReloadIfNeeded(compilation: CompilationLike, changedAssets: string[]): Promise<void>;
|
|
24
|
+
reloadMatchingTabsForContentScripts(rules: ContentScriptTargetRule[]): Promise<number>;
|
|
25
|
+
inspectSource(compilation: CompilationLike, opts: {
|
|
26
|
+
startingUrl?: string;
|
|
27
|
+
source?: string | boolean;
|
|
28
|
+
}): Promise<void>;
|
|
29
|
+
enableUnifiedLogging(opts: {
|
|
30
|
+
level?: string;
|
|
31
|
+
contexts?: string[] | undefined;
|
|
32
|
+
urlFilter?: string | undefined;
|
|
33
|
+
tabFilter?: number | string | undefined;
|
|
34
|
+
format?: 'pretty' | 'json' | 'ndjson';
|
|
35
|
+
timestamps?: boolean;
|
|
36
|
+
color?: boolean;
|
|
37
|
+
}): Promise<void>;
|
|
38
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MessagingClient } from './messaging-client';
|
|
2
|
+
export declare function attachConsoleListeners(client: MessagingClient): Promise<void>;
|
|
3
|
+
export declare function subscribeUnifiedLogging(client: MessagingClient, opts: {
|
|
4
|
+
level?: string;
|
|
5
|
+
contexts?: string[] | undefined;
|
|
6
|
+
urlFilter?: string | undefined;
|
|
7
|
+
tabFilter?: string;
|
|
8
|
+
format?: 'pretty' | 'json' | 'ndjson';
|
|
9
|
+
timestamps?: boolean;
|
|
10
|
+
color?: boolean;
|
|
11
|
+
}): void;
|
package/dist/browser/run-firefox/firefox-source-inspection/remote-firefox/messaging-client.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import EventEmitter from 'events';
|
|
2
|
+
export declare class MessagingClient extends EventEmitter {
|
|
3
|
+
private transport;
|
|
4
|
+
private forwardingSetup;
|
|
5
|
+
connect(port: number): Promise<void>;
|
|
6
|
+
disconnect(): void;
|
|
7
|
+
request(requestProps: unknown): Promise<unknown>;
|
|
8
|
+
onError(error: Error): void;
|
|
9
|
+
getTargets(): Promise<{
|
|
10
|
+
actor?: string;
|
|
11
|
+
url?: string;
|
|
12
|
+
consoleActor?: string;
|
|
13
|
+
webConsoleActor?: string;
|
|
14
|
+
}[]>;
|
|
15
|
+
navigate(tabId: string, url: string): Promise<void>;
|
|
16
|
+
attach(tabId: string): Promise<unknown>;
|
|
17
|
+
getTargetFromDescriptor(descriptorId: string): Promise<{
|
|
18
|
+
targetActor: string | undefined;
|
|
19
|
+
consoleActor: string | undefined;
|
|
20
|
+
} | {
|
|
21
|
+
targetActor?: undefined;
|
|
22
|
+
consoleActor?: undefined;
|
|
23
|
+
}>;
|
|
24
|
+
addTab(url: string): Promise<unknown>;
|
|
25
|
+
navigateViaScript(consoleActor: string, url: string): Promise<void>;
|
|
26
|
+
waitForPageReady(consoleActor: string, url: string, timeoutMs?: number): Promise<void>;
|
|
27
|
+
waitForLoadEvent(tabId: string): Promise<void>;
|
|
28
|
+
evaluate(tabId: string, expression: string): Promise<any>;
|
|
29
|
+
evaluateRaw(tabId: string, expression: string): Promise<unknown>;
|
|
30
|
+
private coerceResponseToString;
|
|
31
|
+
private resolveActorForEvaluation;
|
|
32
|
+
private serializeDocument;
|
|
33
|
+
private extractShadowContent;
|
|
34
|
+
private mergeShadowIntoMain;
|
|
35
|
+
getPageHTML(descriptorActor: string, consoleActorHint?: string): Promise<string>;
|
|
36
|
+
closeTab(tabId: string): Promise<void>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { RdpTransport } from './transport';
|
|
2
|
+
export declare function listTabs(transport: RdpTransport): Promise<{
|
|
3
|
+
actor?: string;
|
|
4
|
+
url?: string;
|
|
5
|
+
consoleActor?: string;
|
|
6
|
+
webConsoleActor?: string;
|
|
7
|
+
}[]>;
|
|
8
|
+
export declare function addTab(transport: RdpTransport, url: string): Promise<unknown>;
|
|
9
|
+
export declare function navigate(transport: RdpTransport, tabId: string, url: string): Promise<void>;
|
|
10
|
+
export declare function attach(transport: RdpTransport, tabId: string): Promise<unknown>;
|
|
11
|
+
export declare function getTargetFromDescriptor(transport: RdpTransport, descriptorId: string): Promise<{
|
|
12
|
+
frame?: {
|
|
13
|
+
actor?: string;
|
|
14
|
+
consoleActor?: string;
|
|
15
|
+
};
|
|
16
|
+
actor?: string;
|
|
17
|
+
target?: {
|
|
18
|
+
actor?: string;
|
|
19
|
+
consoleActor?: string;
|
|
20
|
+
};
|
|
21
|
+
tab?: {
|
|
22
|
+
actor?: string;
|
|
23
|
+
} | string;
|
|
24
|
+
webConsoleActor?: string;
|
|
25
|
+
consoleActor?: string;
|
|
26
|
+
}>;
|
|
27
|
+
export declare function navigateViaScript(transport: RdpTransport, consoleActor: string, url: string): Promise<void>;
|
|
28
|
+
export declare function waitForPageReady(transport: RdpTransport, consoleActor: string, url: string, timeoutMs?: number): Promise<void>;
|
|
29
|
+
export declare function waitForLoadEvent(transport: RdpTransport, tabId: string): Promise<void>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface RdpFrameParseResult<T = unknown> {
|
|
2
|
+
remainingData: Buffer;
|
|
3
|
+
parsedMessage?: T;
|
|
4
|
+
error?: Error;
|
|
5
|
+
fatal?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function parseRdpFrame<T = unknown>(data: Buffer): RdpFrameParseResult<T>;
|
|
8
|
+
export declare function buildRdpFrame(obj: unknown): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MessagingClient } from './messaging-client';
|
|
2
|
+
export declare function ensureTabForUrl(client: MessagingClient, urlToInspect?: string): Promise<{
|
|
3
|
+
actor: string;
|
|
4
|
+
consoleActor?: string;
|
|
5
|
+
} | null>;
|
|
6
|
+
export declare function navigateTo(client: MessagingClient, tabActor: string, consoleActorHint: string | undefined, url: string): Promise<void>;
|
|
7
|
+
export declare function getPageHTML(client: MessagingClient, descriptorActor: string, consoleActorHint?: string): Promise<any>;
|
|
8
|
+
export declare function resolveConsoleActorMethod(client: MessagingClient, tabActor: string, urlToInspect: string): Promise<string>;
|
|
9
|
+
export declare function waitForContentScriptInjectionMethod(client: MessagingClient, consoleActor: string): Promise<boolean>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import EventEmitter from 'events';
|
|
2
|
+
export declare class RdpTransport extends EventEmitter {
|
|
3
|
+
private conn?;
|
|
4
|
+
private incoming;
|
|
5
|
+
private active;
|
|
6
|
+
private pending;
|
|
7
|
+
connect(port: number): Promise<void>;
|
|
8
|
+
disconnect(): void;
|
|
9
|
+
private rejectAll;
|
|
10
|
+
request(payload: any & {
|
|
11
|
+
to?: string;
|
|
12
|
+
}): Promise<unknown>;
|
|
13
|
+
private flush;
|
|
14
|
+
private expectReply;
|
|
15
|
+
private onData;
|
|
16
|
+
private readMessage;
|
|
17
|
+
private handleMessage;
|
|
18
|
+
private onEnd;
|
|
19
|
+
private onTimeout;
|
|
20
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { PluginInterface } from '../browsers-types';
|
|
2
|
+
import type { FirefoxRDPController } from './firefox-source-inspection/rdp-extension-controller';
|
|
3
|
+
/**
|
|
4
|
+
* Narrowed plugin options used through the Firefox flow.
|
|
5
|
+
*/
|
|
6
|
+
export type FirefoxPluginLike = Pick<PluginInterface, 'extension' | 'browserFlags' | 'profile' | 'preferences' | 'startingUrl' | 'geckoBinary' | 'instanceId' | 'watchSource' | 'sourceFormat' | 'sourceSummary' | 'sourceMeta' | 'sourceProbe' | 'sourceTree' | 'sourceConsole' | 'sourceDom' | 'sourceMaxBytes' | 'sourceRedact' | 'sourceIncludeShadow' | 'sourceDiff' | 'port' | 'logLevel' | 'logContexts' | 'logFormat' | 'logTimestamps' | 'logColor' | 'logUrl' | 'logTab' | 'dryRun'> & {
|
|
7
|
+
browser: PluginInterface['browser'];
|
|
8
|
+
source?: string | boolean;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Runtime state in Firefox flow.
|
|
12
|
+
*/
|
|
13
|
+
export interface FirefoxPluginRuntime extends FirefoxPluginLike {
|
|
14
|
+
rdpController?: FirefoxRDPController;
|
|
15
|
+
browserVersionLine?: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { BrowserType } from './browsers-types';
|
|
2
|
+
type PreviewRunOptions = {
|
|
3
|
+
browser: BrowserType;
|
|
4
|
+
outPath: string;
|
|
5
|
+
contextDir: string;
|
|
6
|
+
extensionsToLoad: string[];
|
|
7
|
+
noOpen?: boolean;
|
|
8
|
+
profile?: string | false;
|
|
9
|
+
persistProfile?: boolean;
|
|
10
|
+
preferences?: Record<string, unknown>;
|
|
11
|
+
browserFlags?: string[];
|
|
12
|
+
excludeBrowserFlags?: string[];
|
|
13
|
+
startingUrl?: string;
|
|
14
|
+
chromiumBinary?: string;
|
|
15
|
+
geckoBinary?: string;
|
|
16
|
+
instanceId?: string;
|
|
17
|
+
port?: number | string;
|
|
18
|
+
dryRun?: boolean;
|
|
19
|
+
readyPath?: string;
|
|
20
|
+
};
|
|
21
|
+
export declare function runOnlyPreviewBrowser(opts: PreviewRunOptions): Promise<void>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function resolveExtensionDevelopRoot(startDir?: string): string;
|
|
2
|
+
export declare function resolveExtensionDevelopVersion(startDir?: string, fallbackVersion?: string): string;
|
|
3
|
+
export declare function loadExtensionDevelopModule<T = any>(startDir?: string): T;
|
|
4
|
+
/**
|
|
5
|
+
* Load only the lightweight preview entry from extension-develop.
|
|
6
|
+
* This avoids pulling in rspack and the full build toolchain, making
|
|
7
|
+
* `extension preview` start significantly faster.
|
|
8
|
+
*/
|
|
9
|
+
export declare function loadExtensionDevelopPreviewModule<T = any>(startDir?: string): T;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export declare function resolveModuleEntry(modulePath: string, pkgJson: any): string | undefined;
|
|
2
1
|
export type Browser = 'chrome' | 'edge' | 'firefox' | 'chromium' | 'chromium-based' | 'gecko-based' | 'firefox-based';
|
|
3
2
|
export declare function parseOptionalBoolean(value?: string): boolean;
|
|
4
3
|
export declare const vendors: (browser?: Browser | "all") => string[];
|