first commit

This commit is contained in:
2026-03-10 16:18:05 +00:00
commit 11f9c069b5
31635 changed files with 3187747 additions and 0 deletions

23
node_modules/@expo/devcert/dist/platforms/darwin.d.ts generated vendored Normal file
View File

@@ -0,0 +1,23 @@
import { Options } from '../index';
import { Platform } from '.';
export default class MacOSPlatform implements Platform {
private FIREFOX_BUNDLE_PATH;
private FIREFOX_BIN_PATH;
private FIREFOX_NSS_DIR;
private HOST_FILE_PATH;
/**
* macOS is pretty simple - just add the certificate to the system keychain,
* and most applications will delegate to that for determining trusted
* certificates. Firefox, of course, does it's own thing. We can try to
* automatically install the cert with Firefox if we can use certutil via the
* `nss` Homebrew package, otherwise we go manual with user-facing prompts.
*/
addToTrustStores(certificatePath: string, options?: Options): Promise<void>;
removeFromTrustStores(certificatePath: string): Promise<void>;
addDomainToHostFileIfMissing(domain: string): Promise<void>;
deleteProtectedFiles(filepath: string): Promise<void>;
readProtectedFile(filepath: string): Promise<string>;
writeProtectedFile(filepath: string, contents: string): Promise<void>;
private isFirefoxInstalled;
private isNSSInstalled;
}

133
node_modules/@expo/devcert/dist/platforms/darwin.js generated vendored Normal file

File diff suppressed because one or more lines are too long

11
node_modules/@expo/devcert/dist/platforms/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,11 @@
import { Options } from '../index';
export interface Platform {
addToTrustStores(certificatePath: string, options?: Options): Promise<void>;
removeFromTrustStores(certificatePath: string): Promise<void>;
addDomainToHostFileIfMissing(domain: string): Promise<void>;
deleteProtectedFiles(filepath: string): Promise<void>;
readProtectedFile(filepath: string): Promise<string>;
writeProtectedFile(filepath: string, contents: string): Promise<void>;
}
declare const _default: Platform;
export default _default;

5
node_modules/@expo/devcert/dist/platforms/index.js generated vendored Normal file
View File

@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const PlatformClass = require(`./${process.platform}`).default;
exports.default = new PlatformClass();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5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XMgUGxhdGZvcm07XG4iXX0=

26
node_modules/@expo/devcert/dist/platforms/linux.d.ts generated vendored Normal file
View File

@@ -0,0 +1,26 @@
import { Options } from '../index';
import { Platform } from '.';
export default class LinuxPlatform implements Platform {
private FIREFOX_NSS_DIR;
private CHROME_NSS_DIR;
private FIREFOX_BIN_PATH;
private CHROME_BIN_PATH;
private HOST_FILE_PATH;
/**
* Linux is surprisingly difficult. There seems to be multiple system-wide
* repositories for certs, so we copy ours to each. However, Firefox does it's
* usual separate trust store. Plus Chrome relies on the NSS tooling (like
* Firefox), but uses the user's NSS database, unlike Firefox (which uses a
* separate Mozilla one). And since Chrome doesn't prompt the user with a GUI
* flow when opening certs, if we can't use certutil to install our certificate
* into the user's NSS database, we're out of luck.
*/
addToTrustStores(certificatePath: string, options?: Options): Promise<void>;
removeFromTrustStores(certificatePath: string): Promise<void>;
addDomainToHostFileIfMissing(domain: string): Promise<void>;
deleteProtectedFiles(filepath: string): Promise<void>;
readProtectedFile(filepath: string): Promise<string>;
writeProtectedFile(filepath: string, contents: string): Promise<void>;
private isFirefoxInstalled;
private isChromeInstalled;
}

119
node_modules/@expo/devcert/dist/platforms/linux.js generated vendored Normal file

File diff suppressed because one or more lines are too long

35
node_modules/@expo/devcert/dist/platforms/shared.d.ts generated vendored Normal file
View File

@@ -0,0 +1,35 @@
/**
* Given a directory or glob pattern of directories, attempt to install the
* CA certificate to each directory containing an NSS database.
*/
export declare function addCertificateToNSSCertDB(nssDirGlob: string, certPath: string, certutilPath: string): Promise<void>;
export declare function removeCertificateFromNSSCertDB(nssDirGlob: string, certPath: string, certutilPath: string): Promise<void>;
/**
* Check to see if Firefox is still running, and if so, ask the user to close
* it. Poll until it's closed, then return.
*
* This is needed because Firefox appears to load the NSS database in-memory on
* startup, and overwrite on exit. So we have to ask the user to quite Firefox
* first so our changes don't get overwritten.
*/
export declare function closeFirefox(): Promise<void>;
/**
* Firefox manages it's own trust store for SSL certificates, which can be
* managed via the certutil command (supplied by NSS tooling packages). In the
* event that certutil is not already installed, and either can't be installed
* (Windows) or the user doesn't want to install it (skipCertutilInstall:
* true), it means that we can't programmatically tell Firefox to trust our
* root CA certificate.
*
* There is a recourse though. When a Firefox tab is directed to a URL that
* responds with a certificate, it will automatically prompt the user if they
* want to add it to their trusted certificates. So if we can't automatically
* install the certificate via certutil, we instead start a quick web server
* and host our certificate file. Then we open the hosted cert URL in Firefox
* to kick off the GUI flow.
*
* This method does all this, along with providing user prompts in the terminal
* to walk them through this process.
*/
export declare function openCertificateInFirefox(firefoxPath: string, certPath: string): Promise<void>;
export declare function assertNotTouchingFiles(filepath: string, operation: string): void;

168
node_modules/@expo/devcert/dist/platforms/shared.js generated vendored Normal file

File diff suppressed because one or more lines are too long

21
node_modules/@expo/devcert/dist/platforms/win32.d.ts generated vendored Normal file
View File

@@ -0,0 +1,21 @@
import { Options } from '../index';
import { Platform } from '.';
export default class WindowsPlatform implements Platform {
private HOST_FILE_PATH;
/**
* Windows is at least simple. Like macOS, most applications will delegate to
* the system trust store, which is updated with the confusingly named
* `certutil` exe (not the same as the NSS/Mozilla certutil). Firefox does it's
* own thing as usual, and getting a copy of NSS certutil onto the Windows
* machine to try updating the Firefox store is basically a nightmare, so we
* don't even try it - we just bail out to the GUI.
*/
addToTrustStores(certificatePath: string, options?: Options): Promise<void>;
removeFromTrustStores(certificatePath: string): Promise<void>;
addDomainToHostFileIfMissing(domain: string): Promise<void>;
deleteProtectedFiles(filepath: string): Promise<void>;
readProtectedFile(filepath: string): Promise<string>;
writeProtectedFile(filepath: string, contents: string): Promise<void>;
private encrypt;
private decrypt;
}

104
node_modules/@expo/devcert/dist/platforms/win32.js generated vendored Normal file

File diff suppressed because one or more lines are too long