extension 3.12.0 → 3.12.2
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/728.cjs +1890 -0
- package/dist/browsers.cjs +4962 -0
- package/dist/cli.cjs +6621 -1684
- package/dist/extension/browsers/browsers-lib/banner.d.ts +37 -0
- package/dist/extension/browsers/browsers-lib/constants.d.ts +14 -0
- package/dist/extension/browsers/browsers-lib/content-script-contracts.d.ts +2 -0
- package/dist/extension/browsers/browsers-lib/content-script-targets.d.ts +33 -0
- package/dist/extension/browsers/browsers-lib/html-merge.d.ts +1 -0
- package/dist/extension/browsers/browsers-lib/instance-registry.d.ts +8 -0
- package/dist/extension/browsers/browsers-lib/messages.d.ts +208 -0
- package/dist/extension/browsers/browsers-lib/normalize-options.d.ts +12 -0
- package/dist/extension/browsers/browsers-lib/output-binaries-resolver.d.ts +5 -0
- package/dist/extension/browsers/browsers-lib/ready-message.d.ts +1 -0
- package/dist/extension/browsers/browsers-lib/runtime-options.d.ts +12 -0
- package/dist/extension/browsers/browsers-lib/shared-utils.d.ts +11 -0
- package/dist/extension/browsers/browsers-lib/source-output.d.ts +86 -0
- package/dist/extension/browsers/browsers-types.d.ts +270 -0
- package/dist/extension/browsers/index.d.ts +74 -0
- package/dist/extension/browsers/run-chromium/chromium-context/index.d.ts +20 -0
- package/dist/extension/browsers/run-chromium/chromium-launch/browser-config.d.ts +4 -0
- package/dist/extension/browsers/run-chromium/chromium-launch/dry-run.d.ts +1 -0
- package/dist/extension/browsers/run-chromium/chromium-launch/extension-output-path.d.ts +8 -0
- package/dist/extension/browsers/run-chromium/chromium-launch/index.d.ts +31 -0
- package/dist/extension/browsers/run-chromium/chromium-launch/master-preferences.d.ts +163 -0
- package/dist/extension/browsers/run-chromium/chromium-launch/process-handlers.d.ts +3 -0
- package/dist/extension/browsers/run-chromium/chromium-launch/setup-cdp-after-launch.d.ts +3 -0
- package/dist/extension/browsers/run-chromium/chromium-launch/wsl-support.d.ts +15 -0
- package/dist/extension/browsers/run-chromium/chromium-source-inspection/cdp-client.d.ts +60 -0
- package/dist/extension/browsers/run-chromium/chromium-source-inspection/cdp-extension-controller/connect.d.ts +2 -0
- package/dist/extension/browsers/run-chromium/chromium-source-inspection/cdp-extension-controller/derive-id.d.ts +2 -0
- package/dist/extension/browsers/run-chromium/chromium-source-inspection/cdp-extension-controller/ensure.d.ts +6 -0
- package/dist/extension/browsers/run-chromium/chromium-source-inspection/cdp-extension-controller/index.d.ts +58 -0
- package/dist/extension/browsers/run-chromium/chromium-source-inspection/cdp-extension-controller/logging.d.ts +7 -0
- package/dist/extension/browsers/run-chromium/chromium-source-inspection/deterministic-hmr-harness.d.ts +21 -0
- package/dist/extension/browsers/run-chromium/chromium-source-inspection/discovery.d.ts +2 -0
- package/dist/extension/browsers/run-chromium/chromium-source-inspection/extensions.d.ts +9 -0
- package/dist/extension/browsers/run-chromium/chromium-source-inspection/extract.d.ts +2 -0
- package/dist/extension/browsers/run-chromium/chromium-source-inspection/index.d.ts +79 -0
- package/dist/extension/browsers/run-chromium/chromium-source-inspection/page.d.ts +45 -0
- package/dist/extension/browsers/run-chromium/chromium-source-inspection/readiness.d.ts +1 -0
- package/dist/extension/browsers/run-chromium/chromium-source-inspection/sessions.d.ts +2 -0
- package/dist/extension/browsers/run-chromium/chromium-source-inspection/targets.d.ts +7 -0
- package/dist/extension/browsers/run-chromium/chromium-source-inspection/ws.d.ts +2 -0
- package/dist/extension/browsers/run-chromium/chromium-types.d.ts +65 -0
- package/dist/extension/browsers/run-chromium/chromium-unified-logger/index.d.ts +22 -0
- package/dist/extension/browsers/run-chromium/chromium-unified-logger/unified-logging.d.ts +2 -0
- package/dist/extension/browsers/run-chromium/manifest-readiness.d.ts +15 -0
- package/dist/extension/browsers/run-firefox/firefox-context/index.d.ts +24 -0
- package/dist/extension/browsers/run-firefox/firefox-launch/binary-detector.d.ts +10 -0
- package/dist/extension/browsers/run-firefox/firefox-launch/browser-config.d.ts +19 -0
- package/dist/extension/browsers/run-firefox/firefox-launch/dry-run.d.ts +1 -0
- package/dist/extension/browsers/run-firefox/firefox-launch/index.d.ts +37 -0
- package/dist/extension/browsers/run-firefox/firefox-launch/master-preferences.d.ts +137 -0
- package/dist/extension/browsers/run-firefox/firefox-launch/process-handlers.d.ts +2 -0
- package/dist/extension/browsers/run-firefox/firefox-launch/setup-rdp-after-launch.d.ts +6 -0
- package/dist/extension/browsers/run-firefox/firefox-launch/wsl-support.d.ts +15 -0
- package/dist/extension/browsers/run-firefox/firefox-source-inspection/index.d.ts +52 -0
- package/dist/extension/browsers/run-firefox/firefox-source-inspection/rdp-extension-controller/index.d.ts +38 -0
- package/dist/extension/browsers/run-firefox/firefox-source-inspection/remote-firefox/addons-install.d.ts +10 -0
- package/dist/extension/browsers/run-firefox/firefox-source-inspection/remote-firefox/addons.d.ts +1 -0
- package/dist/extension/browsers/run-firefox/firefox-source-inspection/remote-firefox/evaluate.d.ts +18 -0
- package/dist/extension/browsers/run-firefox/firefox-source-inspection/remote-firefox/firefox-utils.d.ts +17 -0
- package/dist/extension/browsers/run-firefox/firefox-source-inspection/remote-firefox/index.d.ts +38 -0
- package/dist/extension/browsers/run-firefox/firefox-source-inspection/remote-firefox/logging.d.ts +11 -0
- package/dist/extension/browsers/run-firefox/firefox-source-inspection/remote-firefox/message-utils.d.ts +2 -0
- package/dist/extension/browsers/run-firefox/firefox-source-inspection/remote-firefox/messaging-client.d.ts +42 -0
- package/dist/extension/browsers/run-firefox/firefox-source-inspection/remote-firefox/moz-id.d.ts +2 -0
- package/dist/extension/browsers/run-firefox/firefox-source-inspection/remote-firefox/rdp-api.d.ts +29 -0
- package/dist/extension/browsers/run-firefox/firefox-source-inspection/remote-firefox/rdp-wire.d.ts +8 -0
- package/dist/extension/browsers/run-firefox/firefox-source-inspection/remote-firefox/setup-firefox-inspection-actors.d.ts +5 -0
- package/dist/extension/browsers/run-firefox/firefox-source-inspection/remote-firefox/setup-firefox-inspection-navigation.d.ts +2 -0
- package/dist/extension/browsers/run-firefox/firefox-source-inspection/remote-firefox/source-inspect.d.ts +9 -0
- package/dist/extension/browsers/run-firefox/firefox-source-inspection/remote-firefox/transport.d.ts +20 -0
- package/dist/extension/browsers/run-firefox/firefox-types.d.ts +16 -0
- package/dist/extension/browsers/run-firefox/firefox-unified-logger/index.d.ts +14 -0
- package/dist/extension/browsers/run-only.d.ts +22 -0
- package/dist/extension/helpers/extension-develop-runtime.d.ts +9 -0
- package/dist/{utils.d.ts → extension/helpers/vendors.d.ts} +0 -1
- package/dist/extension/vitest.config.d.ts +2 -0
- package/package.json +19 -9
- package/dist/cli-lib/extension-develop-runtime.d.ts +0 -3
- /package/dist/{vitest.config.d.ts → extension/browsers/vitest.config.d.ts} +0 -0
- /package/dist/{commands → extension/commands}/build.d.ts +0 -0
- /package/dist/{commands → extension/commands}/create.d.ts +0 -0
- /package/dist/{commands → extension/commands}/dev-wait.d.ts +0 -0
- /package/dist/{commands → extension/commands}/dev.d.ts +0 -0
- /package/dist/{commands → extension/commands}/install.d.ts +0 -0
- /package/dist/{commands → extension/commands}/preview.d.ts +0 -0
- /package/dist/{commands → extension/commands}/start.d.ts +0 -0
- /package/dist/{check-updates.d.ts → extension/helpers/check-updates.d.ts} +0 -0
- /package/dist/{cli-package-json.d.ts → extension/helpers/cli-package-json.d.ts} +0 -0
- /package/dist/{cli-lib → extension/helpers}/manifest-summary.d.ts +0 -0
- /package/dist/{cli-lib → extension/helpers}/messages.d.ts +0 -0
- /package/dist/{utils → extension/helpers}/normalize-options.d.ts +0 -0
- /package/dist/{cli-lib → extension/helpers}/project-profile.d.ts +0 -0
- /package/dist/{cli-lib → extension/helpers}/telemetry-cli.d.ts +0 -0
- /package/dist/{cli-lib → extension/helpers}/telemetry.d.ts +0 -0
- /package/dist/{cli-lib → extension/helpers}/workflow-profile.d.ts +0 -0
- /package/dist/{index.d.ts → extension/index.d.ts} +0 -0
- /package/dist/{rslib.config.d.ts → extension/rslib.config.d.ts} +0 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { BrowserType } from '../browsers-types';
|
|
2
|
+
export declare function isBannerPrinted(): boolean;
|
|
3
|
+
type Info = {
|
|
4
|
+
extensionId?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
version?: string;
|
|
7
|
+
} | null;
|
|
8
|
+
type HostPort = {
|
|
9
|
+
host?: string;
|
|
10
|
+
port?: number | string;
|
|
11
|
+
};
|
|
12
|
+
export declare function printDevBannerOnce(opts: {
|
|
13
|
+
browser: BrowserType;
|
|
14
|
+
outPath: string;
|
|
15
|
+
hostPort?: HostPort;
|
|
16
|
+
getInfo: () => Promise<Info>;
|
|
17
|
+
fallback?: {
|
|
18
|
+
name?: string;
|
|
19
|
+
version?: string;
|
|
20
|
+
extensionId?: string;
|
|
21
|
+
};
|
|
22
|
+
browserVersionLine?: string;
|
|
23
|
+
}): Promise<boolean>;
|
|
24
|
+
export declare function printProdBannerOnce(opts: {
|
|
25
|
+
browser: BrowserType;
|
|
26
|
+
outPath: string;
|
|
27
|
+
browserVersionLine?: string;
|
|
28
|
+
runtime?: {
|
|
29
|
+
extensionId?: string;
|
|
30
|
+
name?: string;
|
|
31
|
+
version?: string;
|
|
32
|
+
};
|
|
33
|
+
includeExtensionId?: boolean;
|
|
34
|
+
readyPath?: string;
|
|
35
|
+
includeRunId?: boolean;
|
|
36
|
+
}): Promise<boolean>;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const DEFAULT_DEBUG_PORT = 9222;
|
|
2
|
+
export declare const PORT_OFFSET = 100;
|
|
3
|
+
/** CDP sendCommand default timeout (ms). Override: EXTENSION_CDP_COMMAND_TIMEOUT_MS */
|
|
4
|
+
export declare const CDP_COMMAND_TIMEOUT_MS: number;
|
|
5
|
+
/** CDP HTTP endpoint timeout for /json discovery (ms). Override: EXTENSION_CDP_HTTP_TIMEOUT_MS */
|
|
6
|
+
export declare const CDP_HTTP_TIMEOUT_MS: number;
|
|
7
|
+
/** Firefox RDP evaluation timeout (ms). Override: EXTENSION_RDP_EVAL_TIMEOUT_MS */
|
|
8
|
+
export declare const RDP_EVAL_TIMEOUT_MS: number;
|
|
9
|
+
/** Firefox RDP connect retry count. Override: EXTENSION_RDP_MAX_RETRIES */
|
|
10
|
+
export declare const RDP_MAX_RETRIES: number;
|
|
11
|
+
/** Firefox RDP connect retry interval (ms). Override: EXTENSION_RDP_RETRY_INTERVAL_MS */
|
|
12
|
+
export declare const RDP_RETRY_INTERVAL_MS: number;
|
|
13
|
+
/** CDP WebSocket heartbeat interval (ms). Override: EXTENSION_CDP_HEARTBEAT_INTERVAL_MS */
|
|
14
|
+
export declare const CDP_HEARTBEAT_INTERVAL_MS: number;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { CompilationLike } from '../browsers-types';
|
|
2
|
+
export type ContentScriptTargetRule = {
|
|
3
|
+
index: number;
|
|
4
|
+
world: 'extension' | 'main';
|
|
5
|
+
matches: string[];
|
|
6
|
+
excludeMatches: string[];
|
|
7
|
+
includeGlobs: string[];
|
|
8
|
+
excludeGlobs: string[];
|
|
9
|
+
};
|
|
10
|
+
type ManifestLike = {
|
|
11
|
+
content_scripts?: Array<{
|
|
12
|
+
world?: string;
|
|
13
|
+
matches?: string[];
|
|
14
|
+
exclude_matches?: string[];
|
|
15
|
+
include_globs?: string[];
|
|
16
|
+
exclude_globs?: string[];
|
|
17
|
+
}>;
|
|
18
|
+
};
|
|
19
|
+
export declare function isContentScriptEntryName(entryName: string): boolean;
|
|
20
|
+
export declare function isCanonicalContentScriptAsset(assetName: string): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Resolves the on-disk file for a canonical content bundle. In development the
|
|
23
|
+
* emitted name may include a fullhash (e.g. content_scripts/content-0.a1b2c3d4.js).
|
|
24
|
+
*/
|
|
25
|
+
export declare function resolveEmittedContentScriptFile(extensionOutPath: string, index: number, ext: 'js' | 'css'): string | null;
|
|
26
|
+
export declare function getChangedContentScriptEntryNames(modifiedFilePaths: string[], dependencyPathsByEntry: Map<string, Set<string>>): string[];
|
|
27
|
+
export declare function normalizeModuleResourcePath(resourcePath: unknown): string | undefined;
|
|
28
|
+
export declare function readContentScriptRules(compilation: CompilationLike, extensionRoot?: string): ContentScriptTargetRule[];
|
|
29
|
+
export declare function getContentScriptRulesFromManifest(manifest: ManifestLike): ContentScriptTargetRule[];
|
|
30
|
+
export declare function selectContentScriptRules(rules: ContentScriptTargetRule[], entryNames: string[]): ContentScriptTargetRule[];
|
|
31
|
+
export declare function urlMatchesContentScriptRule(rawUrl: string, rule: ContentScriptTargetRule): boolean;
|
|
32
|
+
export declare function urlMatchesAnyContentScriptRule(rawUrl: string, rules: ContentScriptTargetRule[]): boolean;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mergeShadowIntoDocument(mainHTML: string, shadowContent: string): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type InstanceRecord = {
|
|
2
|
+
cdpPort?: number;
|
|
3
|
+
rdpPort?: number;
|
|
4
|
+
};
|
|
5
|
+
export declare function setInstancePorts(instanceId: string | undefined, ports: InstanceRecord): void;
|
|
6
|
+
export declare function getInstancePorts(instanceId: string | undefined): InstanceRecord | undefined;
|
|
7
|
+
export declare function getLastCDPPort(): number | undefined;
|
|
8
|
+
export declare function getLastRDPPort(): number | undefined;
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import type { BrowserType } from '../browsers-types';
|
|
2
|
+
type Browser = BrowserType;
|
|
3
|
+
type Mode = 'development' | 'production' | 'none';
|
|
4
|
+
export declare function capitalizedBrowserName(browser: Browser): string;
|
|
5
|
+
export declare function creatingUserProfile(profilePath: string): string;
|
|
6
|
+
export declare function browserInstanceAlreadyRunning(browser: Browser): string;
|
|
7
|
+
export declare function browserInstanceExited(browser: Browser): string;
|
|
8
|
+
export declare function stdoutData(browser: Browser, mode: Mode): string;
|
|
9
|
+
export declare function cdpClientAttachedToTarget(sessionId: string, targetType: string): string;
|
|
10
|
+
export declare function cdpPendingRejectFailed(message: string): string;
|
|
11
|
+
export declare function cdpFailedToHandleMessage(message: string): string;
|
|
12
|
+
export declare function cdpAutoAttachSetupFailed(message: string): string;
|
|
13
|
+
export declare function cdpProtocolEventHandlerError(message: string): string;
|
|
14
|
+
export declare function cdpFallbackManifestReadFailed(message: string): string;
|
|
15
|
+
export declare function bannerEventHandlerFailed(message: string): string;
|
|
16
|
+
export declare function bestEffortBannerPrintFailed(message: string): string;
|
|
17
|
+
export declare function firefoxUnifiedLoggingFailed(message: string): string;
|
|
18
|
+
export declare function firefoxRdpReloadCapabilitySummary(mode: 'native' | 'reinstall'): string;
|
|
19
|
+
export declare function rdpAddTabFailed(message: string): string;
|
|
20
|
+
export declare function skippingBrowserLaunchDueToCompileErrors(): string;
|
|
21
|
+
export declare function manifestPreflightSummary(errorCount: number): string;
|
|
22
|
+
export declare function browserNotInstalledError(browser: Browser, browserBinaryLocation: string): string;
|
|
23
|
+
export declare function installDifferentBrowserHint(): string;
|
|
24
|
+
export declare function injectingAddOnsError(browser: Browser, error: unknown): string;
|
|
25
|
+
export declare function firefoxServiceWorkerError(browser: Browser): string;
|
|
26
|
+
export declare function browserLaunchError(browser: Browser, error: unknown): string;
|
|
27
|
+
export declare function enhancedProcessManagementStarting(browser: Browser): string;
|
|
28
|
+
export declare function enhancedProcessManagementCleanup(browser: Browser): string;
|
|
29
|
+
export declare function enhancedProcessManagementTerminating(browser: Browser): string;
|
|
30
|
+
export declare function enhancedProcessManagementForceKill(browser: Browser): string;
|
|
31
|
+
export declare function enhancedProcessManagementCleanupError(browser: Browser, error: unknown): string;
|
|
32
|
+
export declare function enhancedProcessManagementInstanceCleanup(browser: Browser): string;
|
|
33
|
+
export declare function enhancedProcessManagementInstanceCleanupComplete(browser: Browser): string;
|
|
34
|
+
export declare function enhancedProcessManagementSignalHandling(browser: Browser): string;
|
|
35
|
+
export declare function enhancedProcessManagementUncaughtException(browser: Browser, error: unknown): string;
|
|
36
|
+
export declare function enhancedProcessManagementUnhandledRejection(browser: Browser, reason: unknown): string;
|
|
37
|
+
export declare function generalBrowserError(browser: Browser, error: unknown): string;
|
|
38
|
+
export declare function errorConnectingToBrowser(browser: Browser): string;
|
|
39
|
+
export declare function addonInstallError(browser: Browser, message: string): string;
|
|
40
|
+
export declare function pathIsNotDirectoryError(browser: Browser, profilePath: string): string;
|
|
41
|
+
export declare function messagingClientClosedError(browser: Browser): string;
|
|
42
|
+
export declare function requestWithoutTargetActorError(browser: Browser, requestType: string): string;
|
|
43
|
+
export declare function connectionClosedError(browser: Browser): string;
|
|
44
|
+
export declare function targetActorHasActiveRequestError(browser: Browser, targetActor: string): string;
|
|
45
|
+
export declare function parsingPacketError(browser: Browser, error: unknown): string;
|
|
46
|
+
export declare function messageWithoutSenderError(browser: Browser, message: {
|
|
47
|
+
from?: string;
|
|
48
|
+
type?: string;
|
|
49
|
+
error?: unknown;
|
|
50
|
+
}): string;
|
|
51
|
+
export declare function unexpectedMessageReceivedError(browser: Browser, message: string): string;
|
|
52
|
+
export declare function isUsingStartingUrl(browser: Browser, value: unknown): string;
|
|
53
|
+
export declare function profileFallbackWarning(browser: Browser, reason: string): string;
|
|
54
|
+
export declare function pathPermissionError(browser: Browser, profilePath: string): string;
|
|
55
|
+
export declare function profileCreationError(browser: Browser, error: unknown): string;
|
|
56
|
+
export declare function chromeProcessExited(code: number): string;
|
|
57
|
+
export declare function chromeProcessError(error: unknown): string;
|
|
58
|
+
export declare function chromeFailedToSpawn(error: unknown): string;
|
|
59
|
+
export declare function chromeInitializingEnhancedReload(): string;
|
|
60
|
+
export declare function wslDockerDesktopRunnerDisabled(): string;
|
|
61
|
+
export declare function locatingBrowser(browser: Browser): string;
|
|
62
|
+
export declare function devChromeProfilePath(path: string): string;
|
|
63
|
+
export declare function usingChromiumRunner(browser: Browser): string;
|
|
64
|
+
export declare function usingFirefoxRunner(browser: Browser): string;
|
|
65
|
+
export declare function chromiumDryRunNotLaunching(): string;
|
|
66
|
+
export declare function chromiumDryRunBinary(path: string): string;
|
|
67
|
+
export declare function chromiumDryRunFlags(flags: string): string;
|
|
68
|
+
export declare function prettyPuppeteerInstallGuidance(browser: Browser, rawGuidance: string, cacheDir: string): string;
|
|
69
|
+
export declare function firefoxLaunchCalled(): string;
|
|
70
|
+
export declare function firefoxDetectionFailed(error: unknown): string;
|
|
71
|
+
export declare function firefoxBinaryArgsExtracted(args: string): string;
|
|
72
|
+
export declare function firefoxNoBinaryArgsFound(): string;
|
|
73
|
+
export declare function firefoxFailedToExtractProfilePath(): string;
|
|
74
|
+
export declare function firefoxFailedToStart(error: unknown): string;
|
|
75
|
+
export declare function firefoxDryRunNotLaunching(): string;
|
|
76
|
+
export declare function firefoxDryRunBinary(path: string): string;
|
|
77
|
+
export declare function firefoxDryRunConfig(cfg: string): string;
|
|
78
|
+
export declare function sourceInspectorInitialized(): string;
|
|
79
|
+
export declare function sourceInspectorInitializationFailed(error: string): string;
|
|
80
|
+
export declare function sourceInspectorChromeDebuggingRequired(port: number): string;
|
|
81
|
+
export declare function sourceInspectorFirefoxDebuggingRequired(port: number): string;
|
|
82
|
+
export declare function sourceInspectorWaitingForFirefox(): string;
|
|
83
|
+
export declare function firefoxRemoteDebuggingReady(): string;
|
|
84
|
+
export declare function sourceInspectorFirefoxNotReadyYet(retries: number, maxRetries: number): string;
|
|
85
|
+
export declare function sourceInspectorWaitingForChrome(): string;
|
|
86
|
+
export declare function chromeRemoteDebuggingReady(): string;
|
|
87
|
+
export declare function sourceInspectorChromeNotReadyYet(retries: number, maxRetries: number): string;
|
|
88
|
+
export declare function sourceInspectorOpeningUrl(url: string): string;
|
|
89
|
+
export declare function sourceInspectorWaitingForPageLoad(): string;
|
|
90
|
+
export declare function sourceInspectorCreatingTarget(): string;
|
|
91
|
+
export declare function sourceInspectorFindingExistingTarget(): string;
|
|
92
|
+
export declare function sourceInspectorUsingExistingTarget(targetId: string): string;
|
|
93
|
+
export declare function sourceInspectorTargetCreated(targetId: string): string;
|
|
94
|
+
export declare function sourceInspectorAttachingToTarget(): string;
|
|
95
|
+
export declare function sourceInspectorAttachedToTarget(sessionId: string): string;
|
|
96
|
+
export declare function sourceInspectorExtractingHTML(): string;
|
|
97
|
+
export declare function sourceInspectorHTMLExtractionComplete(): string;
|
|
98
|
+
export declare function sourceInspectorInspectionFailed(error: string): string;
|
|
99
|
+
export declare function sourceInspectorStartingWatchMode(): string;
|
|
100
|
+
export declare function sourceInspectorWatchModeActive(): string;
|
|
101
|
+
export declare function sourceInspectorWatchModeStopped(): string;
|
|
102
|
+
export declare function sourceInspectorCDPConnectionMaintained(): string;
|
|
103
|
+
export declare function sourceInspectorNoActiveSession(): string;
|
|
104
|
+
export declare function sourceInspectorReExtractingHTML(): string;
|
|
105
|
+
export declare function sourceInspectorAttemptingReconnection(): string;
|
|
106
|
+
export declare function sourceInspectorCannotReconnect(): string;
|
|
107
|
+
export declare function sourceInspectorReconnectingToTarget(): string;
|
|
108
|
+
export declare function sourceInspectorReconnectedToTarget(sessionId: string): string;
|
|
109
|
+
export declare function sourceInspectorReconnectionFailed(error: string): string;
|
|
110
|
+
export declare function sourceInspectorEnsuringNavigation(): string;
|
|
111
|
+
export declare function sourceInspectorEnablingPageDomain(): string;
|
|
112
|
+
export declare function sourceInspectorWaitingForContentScripts(): string;
|
|
113
|
+
export declare function sourceInspectorWaitingForContentScriptReinjection(): string;
|
|
114
|
+
export declare function sourceInspectorFileChanged(): string;
|
|
115
|
+
export declare function sourceInspectorHTMLUpdateFailed(error: string): string;
|
|
116
|
+
export declare function sourceInspectorCleanupComplete(): string;
|
|
117
|
+
export declare function sourceInspectorCleanupError(error: string): string;
|
|
118
|
+
export declare function sourceInspectorNotInitialized(): string;
|
|
119
|
+
export declare function sourceInspectorInvalidWebSocketServer(): string;
|
|
120
|
+
export declare function sourceInspectorUrlRequired(): string;
|
|
121
|
+
export declare function sourceInspectorWillInspect(url: string): string;
|
|
122
|
+
export declare function sourceInspectorSetupFailed(error: string): string;
|
|
123
|
+
export declare function sourceInspectorHTMLOutputHeader(): string;
|
|
124
|
+
export declare function sourceInspectorHTMLOutputTitle(title: string): string;
|
|
125
|
+
export declare function sourceInspectorHTMLOutputFooter(): string;
|
|
126
|
+
export declare function sourceInspectorClientNotInitialized(): string;
|
|
127
|
+
export declare function sourceInspectorNoTabActorAvailable(): string;
|
|
128
|
+
export declare function sourceInspectorNoTabTargetFound(): string;
|
|
129
|
+
export declare function sourceInspectorHtmlExtractFailed(): string;
|
|
130
|
+
export declare function cdpClientFoundTargets(count: number): string;
|
|
131
|
+
export declare function cdpClientTargetWebSocketUrlStored(): string;
|
|
132
|
+
export declare function cdpClientConnected(host: string, port: number): string;
|
|
133
|
+
export declare function cdpClientConnectionError(error: string): string;
|
|
134
|
+
export declare function cdpClientBrowserConnectionEstablished(): string;
|
|
135
|
+
export declare function cdpClientConnectionClosed(): string;
|
|
136
|
+
export declare function cdpClientMessageParseError(error: string): string;
|
|
137
|
+
export declare function cdpClientPageLoadEventFired(): string;
|
|
138
|
+
export declare function cdpClientLoadEventTimeout(): string;
|
|
139
|
+
export declare function cdpClientTestingEvaluation(): string;
|
|
140
|
+
export declare function cdpClientShadowDOMContentFound(found: boolean): string;
|
|
141
|
+
export declare function cdpClientShadowDOMContentLength(length: number): string;
|
|
142
|
+
export declare function cdpClientProcessingShadowDOM(): string;
|
|
143
|
+
export declare function cdpClientFinalHTMLWithShadowDOMLength(length: number): string;
|
|
144
|
+
export declare function cdpClientReturningMainHTML(): string;
|
|
145
|
+
export declare function cdpClientExtensionReloadFailed(extensionId: string, error: string): string;
|
|
146
|
+
export declare function cdpClientExtensionUnloadFailed(extensionId: string, error: string): string;
|
|
147
|
+
export declare function cdpClientExtensionInfoFailed(extensionId: string, error: string): string;
|
|
148
|
+
export declare function cdpClientExtensionLoadFailed(path: string, error: string): string;
|
|
149
|
+
export declare function firefoxRdpClientFoundTargets(count: number): string;
|
|
150
|
+
export declare function firefoxRdpClientUsingTarget(title: string, url: string): string;
|
|
151
|
+
export declare function firefoxRdpClientConnected(host: string, port: number): string;
|
|
152
|
+
export declare function firefoxRdpClientConnectionError(error: string): string;
|
|
153
|
+
export declare function firefoxRdpClientConnectionClosed(): string;
|
|
154
|
+
export declare function firefoxRdpClientNoSuitableTargets(): string;
|
|
155
|
+
export declare function firefoxRdpClientPageLoadEventFired(): string;
|
|
156
|
+
export declare function firefoxRdpClientLoadEventTimeout(): string;
|
|
157
|
+
export declare function firefoxRdpClientTestingEvaluation(): string;
|
|
158
|
+
export declare function firefoxRdpClientDocumentTitle(title: string): string;
|
|
159
|
+
export declare function firefoxRdpClientFailedToGetMainHTML(): string;
|
|
160
|
+
export declare function firefoxRdpClientFinalHTMLLength(length: number): string;
|
|
161
|
+
export interface DevManifestInfo {
|
|
162
|
+
name?: string;
|
|
163
|
+
version?: string;
|
|
164
|
+
hostPermissions?: string[];
|
|
165
|
+
permissions?: string[];
|
|
166
|
+
}
|
|
167
|
+
export interface DevClientManagementInfo {
|
|
168
|
+
name?: string;
|
|
169
|
+
version?: string;
|
|
170
|
+
}
|
|
171
|
+
export interface DevClientMessage {
|
|
172
|
+
data?: {
|
|
173
|
+
id?: string;
|
|
174
|
+
management?: DevClientManagementInfo;
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
export declare function runningInDevelopment(manifest: DevManifestInfo, browser: BrowserType, message: DevClientMessage, browserVersionLine?: string, updateSuffix?: string, opts?: {
|
|
178
|
+
includeExtensionId?: boolean;
|
|
179
|
+
runLabel?: string;
|
|
180
|
+
}): string;
|
|
181
|
+
export declare function emptyLine(): string;
|
|
182
|
+
export declare function separatorLine(): string;
|
|
183
|
+
export declare function devChromiumDebugPort(finalPort: number, requestedPort: number): string;
|
|
184
|
+
export declare function devFirefoxDebugPort(finalPort: number, requestedPort: number): string;
|
|
185
|
+
export declare function devFirefoxProfilePath(profilePath: string): string;
|
|
186
|
+
export declare function unifiedLogLine(head: string, message: string): string;
|
|
187
|
+
export declare function devHtmlSampleRetry(sample: string): string;
|
|
188
|
+
export declare function devHtmlSampleLate(sample: string): string;
|
|
189
|
+
export declare function devSvelteProbeDetected(probe: string): string;
|
|
190
|
+
export declare function cdpUnifiedExtensionLog(ts: string, payload: unknown): string;
|
|
191
|
+
export declare function firefoxInspectSourceNonFatal(message: string): string;
|
|
192
|
+
export declare function browserPluginFailedToLoad(browser: string, error: unknown): string;
|
|
193
|
+
export declare function unsupportedBrowser(browser: string): string;
|
|
194
|
+
export declare function browserRunnerError(body: string): string;
|
|
195
|
+
export declare function requireChromiumBinaryForChromiumBased(): string;
|
|
196
|
+
export declare function requireGeckoBinaryForGeckoBased(): string;
|
|
197
|
+
export declare function invalidChromiumBinaryPath(p: string): string;
|
|
198
|
+
export declare function invalidGeckoBinaryPath(p: string): string;
|
|
199
|
+
export declare function firefoxDetectedFlatpak(): string;
|
|
200
|
+
export declare function firefoxDetectedSnap(): string;
|
|
201
|
+
export declare function firefoxDetectedTraditional(path: string): string;
|
|
202
|
+
export declare function firefoxDetectedCustom(path: string): string;
|
|
203
|
+
export declare function firefoxUsingFlatpakWithSandbox(): string;
|
|
204
|
+
export declare function firefoxVersion(version: string): string;
|
|
205
|
+
export declare function rdpInvalidRequestPayload(): string;
|
|
206
|
+
export declare function chromiumDeveloperModeGuidance(browser?: BrowserType): string;
|
|
207
|
+
export declare function chromiumHardReloadFailed(browser?: BrowserType): string;
|
|
208
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { BrowserType } from '../browsers-types';
|
|
2
|
+
import { PluginInterface } from '../browsers-types';
|
|
3
|
+
export type NormalizedBrowser = BrowserType;
|
|
4
|
+
export interface NormalizedOptions extends Omit<PluginInterface, 'browser'> {
|
|
5
|
+
browser: NormalizedBrowser;
|
|
6
|
+
noOpen?: boolean;
|
|
7
|
+
profile?: string | false;
|
|
8
|
+
startingUrl?: string;
|
|
9
|
+
source?: string;
|
|
10
|
+
dryRun?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function normalizePluginOptions(options: PluginInterface): NormalizedOptions;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { CompilationLike } from '../browsers-types';
|
|
2
|
+
export declare function getCompilationOutputPath(compilation: CompilationLike): string;
|
|
3
|
+
export declare function computeBinariesBaseDir(compilation: CompilationLike): string;
|
|
4
|
+
export declare function managedBrowserCacheEnv(cacheRoot: string, browser: 'chrome' | 'chromium' | 'firefox' | 'edge' | 'chromium-based' | 'gecko-based' | 'firefox-based'): Record<string, string>;
|
|
5
|
+
export declare function resolveFromBinaries(compilation: CompilationLike, browser: 'chrome' | 'chromium' | 'firefox' | 'edge'): string | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ready(mode: 'development' | 'production', browser: string): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { BrowserConfig } from '../browsers-types';
|
|
2
|
+
import type { PluginInterface } from '../browsers-types';
|
|
3
|
+
export declare const sharedBrowserRuntimeOptionKeys: readonly ["extension", "browser", "noOpen", "browserFlags", "excludeBrowserFlags", "profile", "preferences", "startingUrl", "instanceId", "port", "source", "watchSource", "sourceFormat", "sourceSummary", "sourceMeta", "sourceProbe", "sourceTree", "sourceConsole", "sourceDom", "sourceMaxBytes", "sourceRedact", "sourceIncludeShadow", "sourceDiff", "dryRun", "logLevel", "logContexts", "logFormat", "logTimestamps", "logColor", "logUrl", "logTab"];
|
|
4
|
+
export type SharedBrowserRuntimeOptions = Pick<PluginInterface, (typeof sharedBrowserRuntimeOptionKeys)[number]>;
|
|
5
|
+
export declare function pickSharedBrowserRuntimeOptions(options: SharedBrowserRuntimeOptions): SharedBrowserRuntimeOptions;
|
|
6
|
+
export type BrowserLaunchRequestSource = Pick<PluginInterface, 'browser' | 'browserFlags' | 'excludeBrowserFlags' | 'profile' | 'preferences' | 'startingUrl' | 'port'>;
|
|
7
|
+
export type BrowserLaunchRequest = Pick<PluginInterface & BrowserConfig, 'browser' | 'browserFlags' | 'excludeBrowserFlags' | 'profile' | 'preferences' | 'startingUrl' | 'port'> & {
|
|
8
|
+
mode: 'development' | 'production' | 'none';
|
|
9
|
+
};
|
|
10
|
+
export declare function buildBrowserLaunchRequest<T extends object = {}>(options: BrowserLaunchRequestSource, mode: 'development' | 'production' | 'none', extras?: T): BrowserLaunchRequest & T;
|
|
11
|
+
export declare function toExtensionLoadList(extension: PluginInterface['extension']): string[];
|
|
12
|
+
export declare function publishUserExtensionRoot(extension: PluginInterface['extension'], setExtensionRoot?: (root?: string) => void): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare function shortInstanceId(instanceId?: string): string;
|
|
2
|
+
export declare function instanceOffsetFromId(instanceId?: string): number;
|
|
3
|
+
export declare function deriveDebugPortWithInstance(optionPort?: number | string, instanceId?: string): number;
|
|
4
|
+
export declare function calculateDebugPort(portFromConfig?: number | string, devServerPort?: number, defaultPort?: number): number;
|
|
5
|
+
export declare function filterBrowserFlags(defaultFlags: string[], excludeFlags?: string[]): string[];
|
|
6
|
+
export declare function findAvailablePortNear(startPort: number, maxAttempts?: number, host?: string): Promise<number>;
|
|
7
|
+
export declare function prepareChromiumProfileForLaunch(profilePath: string): {
|
|
8
|
+
removedArtifacts: string[];
|
|
9
|
+
};
|
|
10
|
+
export declare function markManagedEphemeralProfile(profilePath: string): void;
|
|
11
|
+
export declare function cleanupOldTempProfiles(baseDir: string, excludeBasename: string | undefined, maxAgeHours?: number): void;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
export type SourceFormat = 'pretty' | 'json' | 'ndjson';
|
|
2
|
+
export type SourceRedact = 'off' | 'safe' | 'strict';
|
|
3
|
+
export type SourceIncludeShadow = 'off' | 'open-only' | 'all';
|
|
4
|
+
export type SourceStage = 'pre_injection' | 'post_injection' | 'updated';
|
|
5
|
+
export type SourceOutputMeta = {
|
|
6
|
+
stage: SourceStage;
|
|
7
|
+
browser?: string;
|
|
8
|
+
mode?: string;
|
|
9
|
+
url?: string;
|
|
10
|
+
title?: string;
|
|
11
|
+
tabId?: number | string;
|
|
12
|
+
};
|
|
13
|
+
export type SourceSummary = {
|
|
14
|
+
counts: {
|
|
15
|
+
extensionRoots: number;
|
|
16
|
+
shadowRoots: number;
|
|
17
|
+
scripts: number;
|
|
18
|
+
styles: number;
|
|
19
|
+
};
|
|
20
|
+
markers: {
|
|
21
|
+
hasExtensionRootId: boolean;
|
|
22
|
+
hasContentScriptMarker: boolean;
|
|
23
|
+
};
|
|
24
|
+
snippet?: string;
|
|
25
|
+
};
|
|
26
|
+
export type DomSnapshotNode = {
|
|
27
|
+
key: string;
|
|
28
|
+
tag: string;
|
|
29
|
+
id?: string;
|
|
30
|
+
classes?: string;
|
|
31
|
+
role?: string;
|
|
32
|
+
ariaLabel?: string;
|
|
33
|
+
name?: string;
|
|
34
|
+
type?: string;
|
|
35
|
+
textLength?: number;
|
|
36
|
+
childCount?: number;
|
|
37
|
+
};
|
|
38
|
+
export type DomSnapshot = {
|
|
39
|
+
rootMode: 'shadow' | 'element';
|
|
40
|
+
depthLimit: number;
|
|
41
|
+
nodeLimit: number;
|
|
42
|
+
truncated: boolean;
|
|
43
|
+
nodes: DomSnapshotNode[];
|
|
44
|
+
};
|
|
45
|
+
export type NormalizedSourceOutputConfig = {
|
|
46
|
+
format: SourceFormat;
|
|
47
|
+
summary: boolean;
|
|
48
|
+
maxBytes: number;
|
|
49
|
+
redact: SourceRedact;
|
|
50
|
+
includeShadow: SourceIncludeShadow;
|
|
51
|
+
};
|
|
52
|
+
export declare function normalizeSourceOutputConfig(input: {
|
|
53
|
+
format?: string;
|
|
54
|
+
summary?: boolean;
|
|
55
|
+
maxBytes?: number;
|
|
56
|
+
redact?: string;
|
|
57
|
+
includeShadow?: string;
|
|
58
|
+
sourceEnabled?: boolean;
|
|
59
|
+
logFormat?: string;
|
|
60
|
+
}): NormalizedSourceOutputConfig;
|
|
61
|
+
export declare function applySourceRedaction(html: string, redact: SourceRedact): string;
|
|
62
|
+
export declare function truncateByBytes(input: string, maxBytes: number): {
|
|
63
|
+
output: string;
|
|
64
|
+
truncated: boolean;
|
|
65
|
+
byteLength: number;
|
|
66
|
+
};
|
|
67
|
+
export declare function hashStringFNV1a(input: string): string;
|
|
68
|
+
export declare function diffDomSnapshots(prev: DomSnapshot | undefined, next: DomSnapshot): {
|
|
69
|
+
added: number;
|
|
70
|
+
removed: number;
|
|
71
|
+
changed: number;
|
|
72
|
+
addedKeys: string[];
|
|
73
|
+
removedKeys: string[];
|
|
74
|
+
changedKeys: string[];
|
|
75
|
+
};
|
|
76
|
+
export declare function resolveActionFormat(): SourceFormat;
|
|
77
|
+
export declare function emitActionEvent(action: string, payload?: Record<string, unknown>, _format?: SourceFormat): void;
|
|
78
|
+
export declare function buildHtmlSummary(html: string): SourceSummary;
|
|
79
|
+
export declare function formatHtmlSentinelBegin(meta: {
|
|
80
|
+
url?: string;
|
|
81
|
+
title?: string;
|
|
82
|
+
tabId?: number | string;
|
|
83
|
+
stage?: string;
|
|
84
|
+
truncated?: boolean;
|
|
85
|
+
}): string;
|
|
86
|
+
export declare function formatHtmlSentinelEnd(): string;
|