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

View File

@@ -0,0 +1,4 @@
export interface Limiter {
<Arguments extends unknown[], ReturnType>(fn: (...args: Arguments) => PromiseLike<ReturnType> | ReturnType, ...args: Arguments): Promise<ReturnType>;
}
export declare const createLimiter: (limit?: number) => Limiter;

View File

@@ -0,0 +1,48 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createLimiter = void 0;
const createLimiter = (limit = 1) => {
let running = 0;
let head = null;
let tail = null;
const enqueue = () => new Promise((resolve) => {
const item = { resolve, next: null };
if (tail) {
tail.next = item;
tail = item;
}
else {
head = item;
tail = item;
}
});
const dequeue = () => {
if (running < limit && head !== null) {
const { resolve, next } = head;
head.next = null;
head = next;
if (head === null) {
tail = null;
}
running++;
resolve();
}
};
return async (fn, ...args) => {
if (running < limit) {
running++;
}
else {
await enqueue();
}
try {
return await fn(...args);
}
finally {
running--;
dequeue();
}
};
};
exports.createLimiter = createLimiter;
//# sourceMappingURL=Concurrency.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Concurrency.js","sourceRoot":"","sources":["../../src/utils/Concurrency.ts"],"names":[],"mappings":";;;AAYO,MAAM,aAAa,GAAG,CAAC,KAAK,GAAG,CAAC,EAAW,EAAE;IAClD,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,IAAI,IAAI,GAAqB,IAAI,CAAC;IAClC,IAAI,IAAI,GAAqB,IAAI,CAAC;IAElC,MAAM,OAAO,GAAG,GAAG,EAAE,CACnB,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;QAC5B,MAAM,IAAI,GAAc,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;QAChD,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,GAAG,IAAI,CAAC;QACd,CAAC;aAAM,CAAC;YACN,IAAI,GAAG,IAAI,CAAC;YACZ,IAAI,GAAG,IAAI,CAAC;QACd,CAAC;IACH,CAAC,CAAC,CAAC;IAEL,MAAM,OAAO,GAAG,GAAG,EAAE;QACnB,IAAI,OAAO,GAAG,KAAK,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;YACrC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;YAC/B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,GAAG,IAAI,CAAC;YACZ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;gBAClB,IAAI,GAAG,IAAI,CAAC;YACd,CAAC;YACD,OAAO,EAAE,CAAC;YACV,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,KAAK,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE;QAC3B,IAAI,OAAO,GAAG,KAAK,EAAE,CAAC;YACpB,OAAO,EAAE,CAAC;QACZ,CAAC;aAAM,CAAC;YACN,MAAM,OAAO,EAAE,CAAC;QAClB,CAAC;QACD,IAAI,CAAC;YACH,OAAO,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;QAC3B,CAAC;gBAAS,CAAC;YACT,OAAO,EAAE,CAAC;YACV,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC,CAAC;AACJ,CAAC,CAAC;AA3CW,QAAA,aAAa,iBA2CxB"}

41
node_modules/@expo/fingerprint/build/utils/Path.d.ts generated vendored Normal file
View File

@@ -0,0 +1,41 @@
import { Minimatch, type MinimatchOptions } from 'minimatch';
/**
* Indicate the given `filePath` should be excluded by the `ignorePaths`.
*/
export declare function isIgnoredPath(filePath: string, ignorePaths: string[], minimatchOptions?: MinimatchOptions): boolean;
/**
* Prebuild match objects for `isIgnoredPathWithMatchObjects` calls.
*/
export declare function buildPathMatchObjects(paths: string[], minimatchOptions?: MinimatchOptions): Minimatch[];
/**
* Append a new ignore path to the given `matchObjects`.
*/
export declare function appendIgnorePath(matchObjects: Minimatch[], path: string, minimatchOptions?: MinimatchOptions): void;
/**
* Build an ignore match objects for directories based on the given `ignorePathMatchObjects`.
*/
export declare function buildDirMatchObjects(ignorePathMatchObjects: Minimatch[], minimatchOptions?: MinimatchOptions): Minimatch[];
/**
* Indicate the given `filePath` should be excluded by the prebuilt `matchObjects`.
*/
export declare function isIgnoredPathWithMatchObjects(filePath: string, matchObjects: Minimatch[]): boolean;
/**
* Normalize the given `filePath` to be used for matching against `ignorePaths`.
*
* @param filePath The file path to normalize.
* @param options.stripParentPrefix
* When people use fingerprint inside a monorepo, they may get source files from parent directories.
* However, minimatch '**' doesn't match the parent directories.
* We need to strip the `../` prefix to match the node_modules from parent directories.
*/
export declare function normalizeFilePath(filePath: string, options: {
stripParentPrefix?: boolean;
}): string;
/**
* Convert any platform-specific path to a POSIX path.
*/
export declare function toPosixPath(filePath: string): string;
/**
* Check if the given `filePath` exists.
*/
export declare function pathExistsAsync(filePath: string): Promise<boolean>;

134
node_modules/@expo/fingerprint/build/utils/Path.js generated vendored Normal file
View File

@@ -0,0 +1,134 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.isIgnoredPath = isIgnoredPath;
exports.buildPathMatchObjects = buildPathMatchObjects;
exports.appendIgnorePath = appendIgnorePath;
exports.buildDirMatchObjects = buildDirMatchObjects;
exports.isIgnoredPathWithMatchObjects = isIgnoredPathWithMatchObjects;
exports.normalizeFilePath = normalizeFilePath;
exports.toPosixPath = toPosixPath;
exports.pathExistsAsync = pathExistsAsync;
const promises_1 = __importDefault(require("fs/promises"));
const minimatch_1 = require("minimatch");
const node_process_1 = __importDefault(require("node:process"));
const path_1 = __importDefault(require("path"));
/**
* Indicate the given `filePath` should be excluded by the `ignorePaths`.
*/
function isIgnoredPath(filePath, ignorePaths, minimatchOptions = { dot: true }) {
const matchObjects = buildPathMatchObjects(ignorePaths, minimatchOptions);
return isIgnoredPathWithMatchObjects(filePath, matchObjects);
}
/**
* Prebuild match objects for `isIgnoredPathWithMatchObjects` calls.
*/
function buildPathMatchObjects(paths, minimatchOptions = { dot: true }) {
return paths.map((filePath) => new minimatch_1.Minimatch(filePath, minimatchOptions));
}
/**
* Append a new ignore path to the given `matchObjects`.
*/
function appendIgnorePath(matchObjects, path, minimatchOptions = { dot: true }) {
matchObjects.push(new minimatch_1.Minimatch(path, minimatchOptions));
}
/**
* Build an ignore match objects for directories based on the given `ignorePathMatchObjects`.
*/
function buildDirMatchObjects(ignorePathMatchObjects, minimatchOptions = { dot: true }) {
const dirIgnorePatterns = [];
const ignorePaths = ignorePathMatchObjects.filter((obj) => !obj.negate).map((obj) => obj.pattern);
const negatedIgnorePaths = ignorePathMatchObjects
.filter((obj) => obj.negate)
.map((obj) => obj.pattern);
// [0] Add positive patterns to dirIgnorePatterns
for (const pattern of ignorePaths) {
if (pattern.endsWith('/**/*')) {
// `/**/*` matches
dirIgnorePatterns.push(pattern.slice(0, -5));
}
else if (pattern.endsWith('/**')) {
// `/**` by default matches directories
dirIgnorePatterns.push(pattern.slice(0, -3));
}
else if (pattern.endsWith('/')) {
// `/` suffix matches directories
dirIgnorePatterns.push(pattern.slice(0, -1));
}
}
// [1] If there is a negate pattern in the same directory, we should remove the existing directory.
for (const pattern of negatedIgnorePaths) {
for (let i = 0; i < dirIgnorePatterns.length; ++i) {
const existingPattern = dirIgnorePatterns[i];
if (isSubDirectory(existingPattern, pattern)) {
dirIgnorePatterns.splice(i, 1);
}
}
}
return dirIgnorePatterns.map((pattern) => new minimatch_1.Minimatch(pattern, minimatchOptions));
}
/**
* Indicate the given `filePath` should be excluded by the prebuilt `matchObjects`.
*/
function isIgnoredPathWithMatchObjects(filePath, matchObjects) {
let result = false;
for (const minimatchObj of matchObjects) {
const stripParentPrefix = minimatchObj.pattern.startsWith('**/');
const normalizedFilePath = normalizeFilePath(filePath, { stripParentPrefix });
const currMatch = minimatchObj.match(normalizedFilePath);
if (minimatchObj.negate && result && !currMatch) {
// Special handler for negate (!pattern).
// As long as previous match result is true and not matched from the current negate pattern, we should early return.
return false;
}
if (!minimatchObj.negate) {
result ||= currMatch;
}
}
return result;
}
/**
* Returns true if `parent` is a parent directory of `child`.
*/
function isSubDirectory(parent, child) {
const relative = path_1.default.relative(parent, child);
return !relative.startsWith('..') && !path_1.default.isAbsolute(relative);
}
const STRIP_PARENT_PREFIX_REGEX = /^(\.\.\/)+/g;
/**
* Normalize the given `filePath` to be used for matching against `ignorePaths`.
*
* @param filePath The file path to normalize.
* @param options.stripParentPrefix
* When people use fingerprint inside a monorepo, they may get source files from parent directories.
* However, minimatch '**' doesn't match the parent directories.
* We need to strip the `../` prefix to match the node_modules from parent directories.
*/
function normalizeFilePath(filePath, options) {
if (options.stripParentPrefix) {
return filePath.replace(STRIP_PARENT_PREFIX_REGEX, '');
}
return filePath;
}
const REGEXP_REPLACE_SLASHES = /\\/g;
/**
* Convert any platform-specific path to a POSIX path.
*/
function toPosixPath(filePath) {
return node_process_1.default.platform === 'win32' ? filePath.replace(REGEXP_REPLACE_SLASHES, '/') : filePath;
}
/**
* Check if the given `filePath` exists.
*/
async function pathExistsAsync(filePath) {
try {
const stat = await promises_1.default.stat(filePath);
return stat.isFile() || stat.isDirectory();
}
catch {
return false;
}
}
//# sourceMappingURL=Path.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Path.js","sourceRoot":"","sources":["../../src/utils/Path.ts"],"names":[],"mappings":";;;;;AAQA,sCAOC;AAKD,sDAKC;AAKD,4CAMC;AAKD,oDAmCC;AAKD,sEAmBC;AAqBD,8CAKC;AAOD,kCAEC;AAKD,0CAOC;AAnJD,2DAA6B;AAC7B,yCAA6D;AAC7D,gEAAmC;AACnC,gDAAwB;AAExB;;GAEG;AACH,SAAgB,aAAa,CAC3B,QAAgB,EAChB,WAAqB,EACrB,mBAAqC,EAAE,GAAG,EAAE,IAAI,EAAE;IAElD,MAAM,YAAY,GAAG,qB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I,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,kBAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrC,OAAO,IAAI,CAAC,MAAM,EAAE,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;IAC7C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}

View File

@@ -0,0 +1 @@
export declare function nonNullish<TValue>(value: TValue | null | undefined): value is NonNullable<TValue>;

View File

@@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.nonNullish = nonNullish;
function nonNullish(value) {
return value !== null && value !== undefined;
}
//# sourceMappingURL=Predicates.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Predicates.js","sourceRoot":"","sources":["../../src/utils/Predicates.ts"],"names":[],"mappings":";;AAAA,gCAEC;AAFD,SAAgB,UAAU,CAAS,KAAgC;IACjE,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AAC/C,CAAC"}

View File

@@ -0,0 +1,9 @@
import type { NormalizedOptions } from '../Fingerprint.types';
/**
* Wrap a method and profile the time it takes to execute the method using `EXPO_PROFILE`.
* Works best with named functions (i.e. not arrow functions).
*
* @param fn function to profile.
* @param functionName optional name of the function to display in the profile output.
*/
export declare function profile<IArgs extends any[], T extends (...args: IArgs) => any>(options: NormalizedOptions, fn: T, functionName?: string): T;

42
node_modules/@expo/fingerprint/build/utils/Profile.js generated vendored Normal file
View File

@@ -0,0 +1,42 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.profile = profile;
const chalk_1 = __importDefault(require("chalk"));
/**
* Wrap a method and profile the time it takes to execute the method using `EXPO_PROFILE`.
* Works best with named functions (i.e. not arrow functions).
*
* @param fn function to profile.
* @param functionName optional name of the function to display in the profile output.
*/
function profile(options, fn, functionName = fn.name) {
if (!process.env['DEBUG'] || options.silent) {
return fn;
}
const name = chalk_1.default.dim(`⏱ [profile] ${functionName ?? 'unknown'}`);
return ((...args) => {
// Start the timer.
console.time(name);
// Invoke the method.
const results = fn(...args);
// If non-promise then return as-is.
if (!(results instanceof Promise)) {
console.timeEnd(name);
return results;
}
// Otherwise await to profile after the promise resolves.
return new Promise((resolve, reject) => {
results.then((results) => {
resolve(results);
console.timeEnd(name);
}, (reason) => {
reject(reason);
console.timeEnd(name);
});
});
});
}
//# sourceMappingURL=Profile.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Profile.js","sourceRoot":"","sources":["../../src/utils/Profile.ts"],"names":[],"mappings":";;;;;AAWA,0BAsCC;AAjDD,kDAA0B;AAI1B;;;;;;GAMG;AACH,SAAgB,OAAO,CACrB,OAA0B,EAC1B,EAAK,EACL,eAAuB,EAAE,CAAC,IAAI;IAE9B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;QAC5C,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,IAAI,GAAG,eAAK,CAAC,GAAG,CAAC,gBAAgB,YAAY,IAAI,SAAS,EAAE,CAAC,CAAC;IAEpE,OAAO,CAAC,CAAC,GAAG,IAAW,EAAE,EAAE;QACzB,mBAAmB;QACnB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEnB,qBAAqB;QACrB,MAAM,OAAO,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;QAE5B,oCAAoC;QACpC,IAAI,CAAC,CAAC,OAAO,YAAY,OAAO,CAAC,EAAE,CAAC;YAClC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACtB,OAAO,OAAO,CAAC;QACjB,CAAC;QAED,yDAAyD;QACzD,OAAO,IAAI,OAAO,CAAyB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC7D,OAAO,CAAC,IAAI,CACV,CAAC,OAAO,EAAE,EAAE;gBACV,OAAO,CAAC,OAAO,CAAC,CAAC;gBACjB,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACxB,CAAC,EACD,CAAC,MAAM,EAAE,EAAE;gBACT,MAAM,CAAC,MAAM,CAAC,CAAC;gBACf,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACxB,CAAC,CACF,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAM,CAAC;AACV,CAAC"}

View File

@@ -0,0 +1,6 @@
import { type SpawnOptions, type SpawnPromise, type SpawnResult } from '@expo/spawn-async';
interface SpawnWithIpcResult extends SpawnResult {
message: string;
}
export declare function spawnWithIpcAsync(command: string, args?: string[], options?: SpawnOptions): SpawnPromise<SpawnWithIpcResult>;
export {};

29
node_modules/@expo/fingerprint/build/utils/SpawnIPC.js generated vendored Normal file
View File

@@ -0,0 +1,29 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.spawnWithIpcAsync = spawnWithIpcAsync;
const spawn_async_1 = __importDefault(require("@expo/spawn-async"));
const node_assert_1 = __importDefault(require("node:assert"));
async function spawnWithIpcAsync(command, args, options
// @ts-expect-error: spawnAsync returns a customized Promise
) {
(0, node_assert_1.default)(options?.stdio == null, 'Cannot override stdio when using IPC');
const promise = (0, spawn_async_1.default)(command, args, {
...options,
stdio: ['pipe', 'pipe', 'pipe', 'ipc'],
});
const messageChunks = [];
const appendMessage = (message) => {
messageChunks.push(message);
};
promise.child.on('message', appendMessage);
const result = await promise;
promise.child.off('message', appendMessage);
return {
...result,
message: messageChunks.join(''),
};
}
//# sourceMappingURL=SpawnIPC.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"SpawnIPC.js","sourceRoot":"","sources":["../../src/utils/SpawnIPC.ts"],"names":[],"mappings":";;;;;AAWA,8CAwBC;AAnCD,oEAI2B;AAC3B,8DAAiC;AAM1B,KAAK,UAAU,iBAAiB,CACrC,OAAe,EACf,IAAe,EACf,OAAsB;AACtB,4DAA4D;;IAE5D,IAAA,qBAAM,EAAC,OAAO,EAAE,KAAK,IAAI,IAAI,EAAE,sCAAsC,CAAC,CAAC;IAEvE,MAAM,OAAO,GAAG,IAAA,qBAAU,EAAC,OAAO,EAAE,IAAI,EAAE;QACxC,GAAG,OAAO;QACV,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC;KACvC,CAAC,CAAC;IAEH,MAAM,aAAa,GAAa,EAAE,CAAC;IACnC,MAAM,aAAa,GAAG,CAAC,OAAY,EAAE,EAAE;QACrC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC,CAAC;IACF,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;IAC3C,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC;IAC7B,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;IAC5C,OAAO;QACL,GAAG,MAAM;QACT,OAAO,EAAE,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC;KAChC,CAAC;AACJ,CAAC"}