camoucore 0.3.0 → 0.6.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/LICENSE +4 -3
- package/dist/camoufox/__main__.d.ts +10 -0
- package/dist/camoufox/__main__.js +1175 -0
- package/dist/camoufox/__version__.d.ts +31 -0
- package/dist/camoufox/__version__.js +32 -0
- package/dist/camoufox/_humanize_playwright.d.ts +54 -0
- package/dist/camoufox/_humanize_playwright.js +429 -0
- package/dist/camoufox/addons.d.ts +21 -0
- package/dist/camoufox/addons.js +56 -0
- package/dist/camoufox/async_api.d.ts +9 -0
- package/dist/camoufox/async_api.js +9 -0
- package/dist/camoufox/browser-pin.d.ts +46 -0
- package/dist/camoufox/browser-pin.js +96 -0
- package/dist/camoufox/cli.d.ts +7 -0
- package/dist/camoufox/cli.js +20 -0
- package/dist/camoufox/coherence.d.ts +141 -0
- package/dist/camoufox/coherence.js +708 -0
- package/dist/camoufox/data-files/browser-pin.json +7 -0
- package/dist/camoufox/data-files/essential-fonts.json +5 -0
- package/dist/camoufox/data-files/fingerprint-presets-v150.json +14544 -0
- package/dist/camoufox/data-files/fingerprint-presets.json +5192 -0
- package/dist/camoufox/data-files/font-bases.json +1887 -0
- package/dist/camoufox/data-files/font-groups.json +716 -0
- package/dist/camoufox/data-files/fonts.json +240 -0
- package/dist/camoufox/data-files/fpgen.yml +44 -0
- package/dist/camoufox/data-files/launcher-constants.json +66 -0
- package/dist/camoufox/data-files/media-devices.json +148 -0
- package/dist/camoufox/data-files/repos.yml +40 -0
- package/dist/camoufox/data-files/voice-manifests.json +1864 -0
- package/dist/camoufox/data-files/voice-uris.json +188 -0
- package/dist/camoufox/data-files/warnings.yml +132 -0
- package/dist/camoufox/display_profile.d.ts +17 -0
- package/dist/camoufox/display_profile.js +72 -0
- package/dist/camoufox/driver_defaults.d.ts +25 -0
- package/dist/camoufox/driver_defaults.js +114 -0
- package/dist/camoufox/exceptions.d.ts +78 -0
- package/dist/camoufox/exceptions.js +135 -0
- package/dist/camoufox/fingerprints.d.ts +341 -0
- package/dist/camoufox/fingerprints.js +1682 -0
- package/dist/camoufox/gpudisplay.d.ts +158 -0
- package/dist/camoufox/gpudisplay.js +695 -0
- package/dist/camoufox/host_rendering.d.ts +38 -0
- package/dist/camoufox/host_rendering.js +180 -0
- package/dist/camoufox/humanize.d.ts +89 -0
- package/dist/camoufox/humanize.js +143 -0
- package/dist/camoufox/index.d.ts +21 -0
- package/dist/camoufox/index.js +21 -0
- package/dist/camoufox/ip.d.ts +45 -0
- package/dist/camoufox/ip.js +114 -0
- package/dist/camoufox/multiversion.d.ts +131 -0
- package/dist/camoufox/multiversion.js +489 -0
- package/dist/camoufox/node-floor.d.ts +5 -0
- package/dist/camoufox/node-floor.js +17 -0
- package/dist/camoufox/paths.d.ts +45 -0
- package/dist/camoufox/paths.js +59 -0
- package/dist/camoufox/pkgman.d.ts +331 -0
- package/dist/camoufox/pkgman.js +972 -0
- package/dist/camoufox/product.d.ts +8 -0
- package/dist/camoufox/product.js +8 -0
- package/dist/camoufox/pycompat.d.ts +97 -0
- package/dist/camoufox/pycompat.js +458 -0
- package/dist/camoufox/server.d.ts +36 -0
- package/dist/camoufox/server.js +82 -0
- package/dist/camoufox/sync_api.d.ts +77 -0
- package/dist/camoufox/sync_api.js +194 -0
- package/dist/camoufox/utils.d.ts +515 -0
- package/dist/camoufox/utils.js +1995 -0
- package/dist/camoufox/warnings.d.ts +16 -0
- package/dist/camoufox/warnings.js +65 -0
- package/dist/camoufox/webgl.d.ts +52 -0
- package/dist/camoufox/webgl.js +264 -0
- package/dist/camouwolf/__main__.d.ts +10 -0
- package/dist/camouwolf/__main__.js +1180 -0
- package/dist/camouwolf/__version__.d.ts +31 -0
- package/dist/camouwolf/__version__.js +32 -0
- package/dist/camouwolf/_humanize_playwright.d.ts +53 -0
- package/dist/camouwolf/_humanize_playwright.js +427 -0
- package/dist/camouwolf/addons.d.ts +42 -0
- package/dist/camouwolf/addons.js +113 -0
- package/dist/camouwolf/async_api.d.ts +9 -0
- package/dist/camouwolf/async_api.js +9 -0
- package/dist/camouwolf/browser-pin.d.ts +46 -0
- package/dist/camouwolf/browser-pin.js +96 -0
- package/dist/camouwolf/cli.d.ts +7 -0
- package/dist/camouwolf/cli.js +20 -0
- package/dist/camouwolf/clienthints.d.ts +61 -0
- package/dist/camouwolf/clienthints.js +176 -0
- package/dist/camouwolf/coherence.d.ts +152 -0
- package/dist/camouwolf/coherence.js +554 -0
- package/dist/camouwolf/data-files/browser-pin.json +7 -0
- package/dist/camouwolf/data-files/camouwolf.defaults.json +118 -0
- package/dist/camouwolf/data-files/data/bundle-fonts.json +1983 -0
- package/dist/camouwolf/data-files/data/chrome-languages.json +517 -0
- package/dist/camouwolf/data-files/data/properties.json +321 -0
- package/dist/camouwolf/data-files/data/system-colors.json +35 -0
- package/dist/camouwolf/data-files/data/ubo.json +6 -0
- package/dist/camouwolf/data-files/fpgen.yml +41 -0
- package/dist/camouwolf/data-files/launcher-constants.json +26 -0
- package/dist/camouwolf/data-files/repos.yml +23 -0
- package/dist/camouwolf/data-files/warnings.yml +96 -0
- package/dist/camouwolf/driver_defaults.d.ts +25 -0
- package/dist/camouwolf/driver_defaults.js +114 -0
- package/dist/camouwolf/exceptions.d.ts +95 -0
- package/dist/camouwolf/exceptions.js +150 -0
- package/dist/camouwolf/fingerprints.d.ts +227 -0
- package/dist/camouwolf/fingerprints.js +753 -0
- package/dist/camouwolf/gpudisplay.d.ts +171 -0
- package/dist/camouwolf/gpudisplay.js +711 -0
- package/dist/camouwolf/host_rendering.d.ts +18 -0
- package/dist/camouwolf/host_rendering.js +114 -0
- package/dist/camouwolf/humanize.d.ts +84 -0
- package/dist/camouwolf/humanize.js +128 -0
- package/dist/camouwolf/index.d.ts +22 -0
- package/dist/camouwolf/index.js +21 -0
- package/dist/camouwolf/multiversion.d.ts +131 -0
- package/dist/camouwolf/multiversion.js +491 -0
- package/dist/camouwolf/node-floor.d.ts +5 -0
- package/dist/camouwolf/node-floor.js +17 -0
- package/dist/camouwolf/paths.d.ts +34 -0
- package/dist/camouwolf/paths.js +58 -0
- package/dist/camouwolf/pkgman.d.ts +331 -0
- package/dist/camouwolf/pkgman.js +972 -0
- package/dist/camouwolf/product.d.ts +3 -0
- package/dist/camouwolf/product.js +3 -0
- package/dist/camouwolf/pycompat.d.ts +92 -0
- package/dist/camouwolf/pycompat.js +461 -0
- package/dist/camouwolf/server.d.ts +36 -0
- package/dist/camouwolf/server.js +81 -0
- package/dist/camouwolf/switches.d.ts +77 -0
- package/dist/camouwolf/switches.js +222 -0
- package/dist/camouwolf/sync_api.d.ts +84 -0
- package/dist/camouwolf/sync_api.js +173 -0
- package/dist/camouwolf/utils.d.ts +644 -0
- package/dist/camouwolf/utils.js +2057 -0
- package/dist/camouwolf/warnings.d.ts +14 -0
- package/dist/camouwolf/warnings.js +59 -0
- package/dist/camouwolf/webgl.d.ts +41 -0
- package/dist/camouwolf/webgl.js +198 -0
- package/dist/data.d.ts +1 -1
- package/dist/data.js +3 -3
- package/dist/download.js +1 -1
- package/dist/exceptions.d.ts +1 -1
- package/dist/exceptions.js +1 -1
- package/dist/geolocation.js +1 -1
- package/dist/host.js +1 -1
- package/dist/ip.js +1 -1
- package/dist/locales.js +1 -1
- package/dist/mcp/cli.d.ts +15 -0
- package/dist/mcp/cli.js +108 -0
- package/dist/mcp/index.d.ts +8 -0
- package/dist/mcp/index.js +8 -0
- package/dist/mcp/main.d.ts +2 -0
- package/dist/mcp/main.js +8 -0
- package/dist/mcp/secrets.d.ts +50 -0
- package/dist/mcp/secrets.js +193 -0
- package/dist/mcp/server.d.ts +48 -0
- package/dist/mcp/server.js +653 -0
- package/dist/mcp/tree.d.ts +10 -0
- package/dist/mcp/tree.js +36 -0
- package/dist/passthrough.d.ts +1 -1
- package/dist/product.js +1 -1
- package/dist/settings.js +1 -1
- package/dist/telemetry.d.ts +0 -1
- package/dist/telemetry.js +5 -4
- package/dist/virtdisplay.d.ts +1 -1
- package/dist/virtdisplay.js +1 -1
- package/dist/warnings.js +1 -1
- package/package.json +57 -13
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
import type { Writable } from "node:stream";
|
|
2
|
+
/**
|
|
3
|
+
* Ensure Chromium's Linux configuration directory exists before startup.
|
|
4
|
+
*
|
|
5
|
+
* Chromium probes ~/.config/camouwolf even when Playwright supplies a temporary
|
|
6
|
+
* profile.
|
|
7
|
+
* On a read-only HOME -- the normal shape for a container that bakes the bundle
|
|
8
|
+
* in as root and runs as a non-root user -- a missing directory makes startup
|
|
9
|
+
* stall with no diagnostic, surfacing as a launch timeout rather than as a
|
|
10
|
+
* permissions error. An existing directory may itself still be read-only, which
|
|
11
|
+
* is fine: Chromium only needs it to be there.
|
|
12
|
+
*/
|
|
13
|
+
export declare function ensureBrowserProfileDir(env?: Record<string, unknown>): string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Parse a semver string into a comparable tuple.
|
|
16
|
+
*/
|
|
17
|
+
export declare function parseSemver(version: string): number[];
|
|
18
|
+
/**
|
|
19
|
+
* A comparable browser version string (up to 5 parts).
|
|
20
|
+
*/
|
|
21
|
+
export declare class Version {
|
|
22
|
+
readonly build: string;
|
|
23
|
+
readonly version?: string;
|
|
24
|
+
readonly sortedRel: number[];
|
|
25
|
+
constructor(build: string, version?: string);
|
|
26
|
+
get fullString(): string;
|
|
27
|
+
/** Whether the build channel is alpha (like "alpha.26"). */
|
|
28
|
+
get isAlpha(): boolean;
|
|
29
|
+
compare(other: Version): number;
|
|
30
|
+
equals(other: Version): boolean;
|
|
31
|
+
lessThan(other: Version): boolean;
|
|
32
|
+
greaterOrEqual(other: Version): boolean;
|
|
33
|
+
isSupported(): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Read the version from version.json at the given path.
|
|
36
|
+
*/
|
|
37
|
+
static fromPath(dir?: string): Version;
|
|
38
|
+
static buildMinMax(): [Version, Version];
|
|
39
|
+
}
|
|
40
|
+
export declare const VERSION_MIN: Version, VERSION_MAX: Version;
|
|
41
|
+
/**
|
|
42
|
+
* Seams the Python tests reach with monkeypatch (VERSION_MIN,
|
|
43
|
+
* _resolved_playwright_version, CamouwolfFetcher). Production code never
|
|
44
|
+
* reassigns these.
|
|
45
|
+
*/
|
|
46
|
+
export declare const pkgmanDeps: {
|
|
47
|
+
versionMin: () => Version;
|
|
48
|
+
resolvedPlaywrightVersion: () => number[] | null;
|
|
49
|
+
/** The fetcher the auto-install path runs `install()` on. */
|
|
50
|
+
newFetcher: () => Promise<{
|
|
51
|
+
install(): Promise<unknown>;
|
|
52
|
+
}>;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* The resolved playwright-core version string, or null when it cannot be read.
|
|
56
|
+
* The Python twin asks importlib.metadata for `playwright`; the npm package
|
|
57
|
+
* that plays that role here is playwright-core.
|
|
58
|
+
*/
|
|
59
|
+
export declare function resolvedPlaywrightVersionRaw(): string | null;
|
|
60
|
+
/** An installed npm package's version, or null if it cannot be read. */
|
|
61
|
+
export declare function installedPackageVersion(name: string): string | null;
|
|
62
|
+
/** The installed Playwright version, or null if it cannot be determined. */
|
|
63
|
+
export declare function resolvedPlaywrightVersion(): number[] | null;
|
|
64
|
+
/** The installed Playwright version for messages ("the installed version"
|
|
65
|
+
* when it cannot be read). */
|
|
66
|
+
export declare function resolvedPlaywrightVersionStr(): string;
|
|
67
|
+
/**
|
|
68
|
+
* The lowest browser build this install can actually talk to.
|
|
69
|
+
*
|
|
70
|
+
* VERSION_MIN, raised by whatever the resolved Playwright requires. When the
|
|
71
|
+
* Playwright version cannot be read we fall back to VERSION_MIN rather than
|
|
72
|
+
* assuming the worst: a spurious forced re-download is worse than leaving a
|
|
73
|
+
* working install alone, and package.json caps Playwright anyway.
|
|
74
|
+
*/
|
|
75
|
+
export declare function effectiveVersionMin(): Version;
|
|
76
|
+
/** One `versions:` entry of a browser repo in repos.yml. */
|
|
77
|
+
export interface BrowserVersionConstraint {
|
|
78
|
+
python_library?: {
|
|
79
|
+
min?: string;
|
|
80
|
+
max?: string;
|
|
81
|
+
};
|
|
82
|
+
/** Absent means "assume every build is supported". */
|
|
83
|
+
browser?: {
|
|
84
|
+
stable?: {
|
|
85
|
+
min?: string;
|
|
86
|
+
max?: string;
|
|
87
|
+
};
|
|
88
|
+
prerelease?: {
|
|
89
|
+
min?: string;
|
|
90
|
+
max?: string;
|
|
91
|
+
};
|
|
92
|
+
min?: string;
|
|
93
|
+
max?: string;
|
|
94
|
+
} | null;
|
|
95
|
+
}
|
|
96
|
+
/** One `browsers:` entry of repos.yml. */
|
|
97
|
+
export interface BrowserRepoEntry {
|
|
98
|
+
/** Primary repo first, then fallbacks: a comma-separated string or a list. */
|
|
99
|
+
repo: string | string[];
|
|
100
|
+
name: string;
|
|
101
|
+
pattern?: string;
|
|
102
|
+
versions?: BrowserVersionConstraint[];
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Configuration for a Camouwolf repository.
|
|
106
|
+
*/
|
|
107
|
+
export declare class RepoConfig {
|
|
108
|
+
repos: string[];
|
|
109
|
+
name: string;
|
|
110
|
+
pattern: string;
|
|
111
|
+
stableMin?: string;
|
|
112
|
+
stableMax?: string;
|
|
113
|
+
prereleaseMin?: string;
|
|
114
|
+
prereleaseMax?: string;
|
|
115
|
+
constructor(init: {
|
|
116
|
+
repos: string[];
|
|
117
|
+
name: string;
|
|
118
|
+
pattern: string;
|
|
119
|
+
stableMin?: string;
|
|
120
|
+
stableMax?: string;
|
|
121
|
+
prereleaseMin?: string;
|
|
122
|
+
prereleaseMax?: string;
|
|
123
|
+
});
|
|
124
|
+
/** Primary GitHub repo. */
|
|
125
|
+
get repo(): string;
|
|
126
|
+
static loadRepos(spoofLibraryVersion?: string): RepoConfig[];
|
|
127
|
+
static getDefaultName(): string;
|
|
128
|
+
static fromEntry(entry: BrowserRepoEntry, spoofLibraryVersion?: string): RepoConfig;
|
|
129
|
+
static getDefault(): RepoConfig;
|
|
130
|
+
static findByName(name: string): RepoConfig | undefined;
|
|
131
|
+
getOsName(spoofOs?: string): string;
|
|
132
|
+
getArch(spoofArch?: string): string;
|
|
133
|
+
/**
|
|
134
|
+
* Build the asset regex from the config pattern string.
|
|
135
|
+
*/
|
|
136
|
+
buildPattern(spoofOs?: string, spoofArch?: string): RegExp;
|
|
137
|
+
/**
|
|
138
|
+
* Check if a build is within the supported range for its channel.
|
|
139
|
+
*/
|
|
140
|
+
isVersionSupported(version: Version, isPrerelease?: boolean): boolean;
|
|
141
|
+
}
|
|
142
|
+
export interface GitHubAsset {
|
|
143
|
+
name: string;
|
|
144
|
+
browser_download_url: string;
|
|
145
|
+
id?: number;
|
|
146
|
+
size?: number;
|
|
147
|
+
updated_at?: string;
|
|
148
|
+
created_at?: string;
|
|
149
|
+
digest?: string;
|
|
150
|
+
}
|
|
151
|
+
export interface GitHubRelease {
|
|
152
|
+
prerelease?: boolean;
|
|
153
|
+
assets: GitHubAsset[];
|
|
154
|
+
}
|
|
155
|
+
/** Whether this library speaks a browser's declared interface. */
|
|
156
|
+
export declare function interfaceSupported(iface: number): boolean;
|
|
157
|
+
/**
|
|
158
|
+
* The browser interface a GitHub release declares in its manifest.json. A
|
|
159
|
+
* release without a manifest, or a manifest without the field, predates the
|
|
160
|
+
* field and is interface 1.
|
|
161
|
+
*/
|
|
162
|
+
export declare function releaseInterface(release: GitHubRelease): Promise<number>;
|
|
163
|
+
/** The interface recorded in an install's version.json at install time. */
|
|
164
|
+
export declare function installedInterface(installPath: string): number;
|
|
165
|
+
/** Why a browser needs a newer package, and the command that gets one. */
|
|
166
|
+
export declare function upgradeMessage(version: Version, iface: number): string;
|
|
167
|
+
export declare function incompatibleMessage(version: Version, iface: number): string;
|
|
168
|
+
/** A build the last `camouwolf sync` found that needs a newer package. */
|
|
169
|
+
export interface IncompatibleBuild {
|
|
170
|
+
repo: string;
|
|
171
|
+
version: string;
|
|
172
|
+
build: string;
|
|
173
|
+
interface: number;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Warn once when the last `camouwolf sync` found a browser release that needs
|
|
177
|
+
* a newer package. Reads the sync cache, so a launch makes no request.
|
|
178
|
+
*/
|
|
179
|
+
export declare function warnIfPackageOutdated(): void;
|
|
180
|
+
/** Test hook: forget that the warning was already issued. */
|
|
181
|
+
export declare function resetOutdatedWarning(): void;
|
|
182
|
+
/**
|
|
183
|
+
* Information about an available Camouwolf version on GitHub.
|
|
184
|
+
*/
|
|
185
|
+
export declare class AvailableVersion {
|
|
186
|
+
version: Version;
|
|
187
|
+
url: string;
|
|
188
|
+
isPrerelease: boolean;
|
|
189
|
+
assetId?: number;
|
|
190
|
+
assetSize?: number;
|
|
191
|
+
assetUpdatedAt?: string;
|
|
192
|
+
sha256?: string;
|
|
193
|
+
assetCreatedAt?: string;
|
|
194
|
+
interface: number;
|
|
195
|
+
constructor(init: {
|
|
196
|
+
version: Version;
|
|
197
|
+
url: string;
|
|
198
|
+
isPrerelease: boolean;
|
|
199
|
+
assetId?: number;
|
|
200
|
+
assetSize?: number;
|
|
201
|
+
assetUpdatedAt?: string;
|
|
202
|
+
sha256?: string;
|
|
203
|
+
assetCreatedAt?: string;
|
|
204
|
+
interface?: number;
|
|
205
|
+
});
|
|
206
|
+
/** First 8 hex chars of the sha256, or empty when unknown. */
|
|
207
|
+
get sha8(): string;
|
|
208
|
+
get display(): string;
|
|
209
|
+
toMetadata(): Record<string, any>;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Handles fetching and installing Camouwolf.
|
|
213
|
+
*/
|
|
214
|
+
export declare class CamouwolfFetcher {
|
|
215
|
+
githubRepos: string[];
|
|
216
|
+
githubRepo: string;
|
|
217
|
+
isPrerelease: boolean;
|
|
218
|
+
repoConfig: RepoConfig;
|
|
219
|
+
arch: string;
|
|
220
|
+
pattern: RegExp;
|
|
221
|
+
installedSha256?: string;
|
|
222
|
+
installedCreatedAt?: string;
|
|
223
|
+
installedInterface: number;
|
|
224
|
+
_versionObj?: Version;
|
|
225
|
+
_selectedVersion?: AvailableVersion;
|
|
226
|
+
_url?: string;
|
|
227
|
+
constructor(repoConfig?: RepoConfig, selectedVersion?: AvailableVersion);
|
|
228
|
+
/**
|
|
229
|
+
* The Python constructor calls fetch_latest() inline; downloads are async in
|
|
230
|
+
* JS, so callers do `await new CamouwolfFetcher().init()` instead.
|
|
231
|
+
*/
|
|
232
|
+
init(): Promise<this>;
|
|
233
|
+
/** First 8 hex chars of the installed asset sha, or empty. */
|
|
234
|
+
get installedSha8(): string;
|
|
235
|
+
/**
|
|
236
|
+
* Match a release asset against version constraints, OS, and arch.
|
|
237
|
+
*/
|
|
238
|
+
checkAsset(asset: GitHubAsset, release?: GitHubRelease): [Version, string] | null;
|
|
239
|
+
/**
|
|
240
|
+
* Whether a release whose asset checkAsset() matched may be used. The
|
|
241
|
+
* Python twin decides this inside check_asset(); reading a manifest is
|
|
242
|
+
* async here, so it is a separate step.
|
|
243
|
+
*/
|
|
244
|
+
acceptRelease(release: GitHubRelease, [version]: [Version, string]): Promise<boolean>;
|
|
245
|
+
missingAssetError(): never;
|
|
246
|
+
protected getReleases(githubRepo: string): Promise<GitHubRelease[]>;
|
|
247
|
+
/**
|
|
248
|
+
* Fetch the first matching release asset, trying fallback repos on failure.
|
|
249
|
+
*/
|
|
250
|
+
getAsset(): Promise<[Version, string]>;
|
|
251
|
+
getPlatformArch(): string;
|
|
252
|
+
/**
|
|
253
|
+
* Fetch the latest camouwolf release for the current platform.
|
|
254
|
+
*/
|
|
255
|
+
fetchLatest(): Promise<void>;
|
|
256
|
+
static downloadFile(file: Writable, url: string): Promise<void>;
|
|
257
|
+
/**
|
|
258
|
+
* Download and install camouwolf to a versioned subdirectory.
|
|
259
|
+
*/
|
|
260
|
+
install(replace?: boolean): Promise<boolean>;
|
|
261
|
+
get url(): string;
|
|
262
|
+
get version(): string;
|
|
263
|
+
get build(): string;
|
|
264
|
+
get verstr(): string;
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Fetch all supported versions from GitHub for the current platform. With
|
|
268
|
+
* includeIncompatible, builds that need a newer package are returned too
|
|
269
|
+
* (check `interfaceSupported(v.interface)`) instead of being reported.
|
|
270
|
+
*/
|
|
271
|
+
export declare function listAvailableVersions(repoConfig?: RepoConfig, includePrerelease?: boolean, spoofOs?: string, spoofArch?: string, includeIncompatible?: boolean): Promise<AvailableVersion[]>;
|
|
272
|
+
/**
|
|
273
|
+
* The supported builds the release tagged `tag` holds for this platform, read
|
|
274
|
+
* with one API call per repo of the source. Empty when no repo has the tag.
|
|
275
|
+
*/
|
|
276
|
+
export declare function taggedVersions(repoConfig: RepoConfig, tag: string): Promise<AvailableVersion[]>;
|
|
277
|
+
/**
|
|
278
|
+
* Get the full version string of the active install.
|
|
279
|
+
*/
|
|
280
|
+
export declare function installedVerStr(fromDir?: string): string;
|
|
281
|
+
/**
|
|
282
|
+
* Whether INSTALL_DIR's root holds a supported build.
|
|
283
|
+
*
|
|
284
|
+
* Only the pre-multiversion flat layout wrote version.json at the root; the
|
|
285
|
+
* versioned layout keeps it under browsers/<repo>/<version>/. A missing root
|
|
286
|
+
* version.json means "no legacy install here", so the caller should fall
|
|
287
|
+
* through to a fetch rather than raise. The alpha.1 floor masked this: no
|
|
288
|
+
* install was ever unsupported, so this branch was never reached.
|
|
289
|
+
*/
|
|
290
|
+
export declare function rootInstallSupported(): boolean;
|
|
291
|
+
/**
|
|
292
|
+
* Full path to the active camouwolf folder.
|
|
293
|
+
*
|
|
294
|
+
* This is the Python twin's camouwolf_path(download_if_missing=False): it is
|
|
295
|
+
* called from synchronous path helpers, and a download is asynchronous in JS.
|
|
296
|
+
* `ensureCamouwolfInstalled()` is the download_if_missing=True half;
|
|
297
|
+
* `launchOptions()` awaits it before any path lookup, so first-run
|
|
298
|
+
* auto-download behaviour is preserved.
|
|
299
|
+
*/
|
|
300
|
+
export declare function camouwolfPath(): string;
|
|
301
|
+
/**
|
|
302
|
+
* Resolve the active browser, downloading it first when nothing usable is
|
|
303
|
+
* installed. The async counterpart to the Python twin's camouwolf_path().
|
|
304
|
+
*/
|
|
305
|
+
export declare function ensureCamouwolfInstalled(): Promise<string>;
|
|
306
|
+
/**
|
|
307
|
+
* A file the build ships, found from its executable: beside it, or in
|
|
308
|
+
* Contents/Resources when the executable is a macOS app bundle's Contents/MacOS/.
|
|
309
|
+
*/
|
|
310
|
+
export declare function buildFile(executablePath: string, name: string): string;
|
|
311
|
+
/** Get the path to a file in the camouwolf directory. */
|
|
312
|
+
export declare function getPath(file: string): string;
|
|
313
|
+
/**
|
|
314
|
+
* Get the path to the camouwolf executable.
|
|
315
|
+
*/
|
|
316
|
+
export declare function launchPath(browserPath?: string): string;
|
|
317
|
+
/**
|
|
318
|
+
* The executable of the installed build `specifier` names (the `browser`
|
|
319
|
+
* launch option). Like `camouwolf set`, it overrides the pairing: it never
|
|
320
|
+
* downloads, and it warns when the build is not the paired one.
|
|
321
|
+
*/
|
|
322
|
+
export declare function selectedLaunchPath(specifier: string): string;
|
|
323
|
+
/**
|
|
324
|
+
* chmod -R 755 on POSIX so the freshly-extracted binaries are executable.
|
|
325
|
+
* (The zip does not carry usable permission bits on every platform.)
|
|
326
|
+
*/
|
|
327
|
+
export declare function makeExecutable(dir: string): void;
|
|
328
|
+
/**
|
|
329
|
+
* Format an asset timestamp as "Mon D", or "Mon D, YYYY" when the year differs.
|
|
330
|
+
*/
|
|
331
|
+
export declare function formatAssetDate(iso?: string, now?: Date): string;
|