@expo/fingerprint
Advanced tools
Comparing version 0.0.1-canary-20240222-c729a13 to 0.0.1-canary-20240228-7cee619
@@ -53,2 +53,7 @@ /// <reference types="node" /> | ||
extraSources?: HashSource[]; | ||
/** | ||
* Whether running the functions should mute all console output. This is useful when fingerprinting is being done as | ||
* part of a CLI that outputs a fingerprint and outputting anything else pollutes the results. | ||
*/ | ||
silent?: boolean; | ||
} | ||
@@ -55,0 +60,0 @@ export interface NormalizedOptions extends Options { |
@@ -48,3 +48,3 @@ "use strict"; | ||
case 'dir': | ||
result = await (0, Profile_1.profile)(createDirHashResultsAsync, `createDirHashResultsAsync(${source.filePath})`)(source.filePath, limiter, projectRoot, options); | ||
result = await (0, Profile_1.profile)(options, createDirHashResultsAsync, `createDirHashResultsAsync(${source.filePath})`)(source.filePath, limiter, projectRoot, options); | ||
break; | ||
@@ -51,0 +51,0 @@ default: |
@@ -16,16 +16,16 @@ "use strict"; | ||
// expo | ||
(0, Profile_1.profile)(Expo_1.getExpoAutolinkingAndroidSourcesAsync)(projectRoot, options), | ||
(0, Profile_1.profile)(Expo_1.getExpoAutolinkingIosSourcesAsync)(projectRoot, options), | ||
(0, Profile_1.profile)(Expo_1.getExpoConfigSourcesAsync)(projectRoot, options), | ||
(0, Profile_1.profile)(Expo_1.getEasBuildSourcesAsync)(projectRoot, options), | ||
(0, Profile_1.profile)(options, Expo_1.getExpoAutolinkingAndroidSourcesAsync)(projectRoot, options), | ||
(0, Profile_1.profile)(options, Expo_1.getExpoAutolinkingIosSourcesAsync)(projectRoot, options), | ||
(0, Profile_1.profile)(options, Expo_1.getExpoConfigSourcesAsync)(projectRoot, options), | ||
(0, Profile_1.profile)(options, Expo_1.getEasBuildSourcesAsync)(projectRoot, options), | ||
// bare managed files | ||
(0, Profile_1.profile)(Bare_1.getGitIgnoreSourcesAsync)(projectRoot, options), | ||
(0, Profile_1.profile)(Bare_1.getPackageJsonScriptSourcesAsync)(projectRoot, options), | ||
(0, Profile_1.profile)(options, Bare_1.getGitIgnoreSourcesAsync)(projectRoot, options), | ||
(0, Profile_1.profile)(options, Bare_1.getPackageJsonScriptSourcesAsync)(projectRoot, options), | ||
// bare native files | ||
(0, Profile_1.profile)(Bare_1.getBareAndroidSourcesAsync)(projectRoot, options), | ||
(0, Profile_1.profile)(Bare_1.getBareIosSourcesAsync)(projectRoot, options), | ||
(0, Profile_1.profile)(options, Bare_1.getBareAndroidSourcesAsync)(projectRoot, options), | ||
(0, Profile_1.profile)(options, Bare_1.getBareIosSourcesAsync)(projectRoot, options), | ||
// rn-cli autolinking | ||
(0, Profile_1.profile)(Bare_1.getRncliAutolinkingSourcesAsync)(projectRoot, options), | ||
(0, Profile_1.profile)(options, Bare_1.getRncliAutolinkingSourcesAsync)(projectRoot, options), | ||
// patch-package | ||
(0, Profile_1.profile)(PatchPackage_1.getPatchPackageSourcesAsync)(projectRoot, options), | ||
(0, Profile_1.profile)(options, PatchPackage_1.getPatchPackageSourcesAsync)(projectRoot, options), | ||
]); | ||
@@ -32,0 +32,0 @@ // extra sources |
@@ -0,1 +1,2 @@ | ||
import type { NormalizedOptions } from '../Fingerprint.types'; | ||
/** | ||
@@ -8,2 +9,2 @@ * Wrap a method and profile the time it takes to execute the method using `EXPO_PROFILE`. | ||
*/ | ||
export declare function profile<IArgs extends any[], T extends (...args: IArgs) => any>(fn: T, functionName?: string): T; | ||
export declare function profile<IArgs extends any[], T extends (...args: IArgs) => any>(options: NormalizedOptions, fn: T, functionName?: string): T; |
@@ -15,4 +15,4 @@ "use strict"; | ||
*/ | ||
function profile(fn, functionName = fn.name) { | ||
if (!process.env['DEBUG']) { | ||
function profile(options, fn, functionName = fn.name) { | ||
if (!process.env['DEBUG'] || options.silent) { | ||
return fn; | ||
@@ -19,0 +19,0 @@ } |
{ | ||
"name": "@expo/fingerprint", | ||
"version": "0.0.1-canary-20240222-c729a13", | ||
"version": "0.0.1-canary-20240228-7cee619", | ||
"description": "A library to generate a fingerprint from a React Native project", | ||
@@ -54,7 +54,7 @@ "main": "build/index.js", | ||
"@types/find-up": "^4.0.0", | ||
"expo-module-scripts": "0.0.1-canary-20240222-c729a13", | ||
"expo-module-scripts": "0.0.1-canary-20240228-7cee619", | ||
"glob": "^7.1.7", | ||
"temp-dir": "^2.0.0" | ||
}, | ||
"gitHead": "c729a13f936926743c13c021f569a22921455e49" | ||
"gitHead": "7cee6192338de34ad301922c0cd6f4a4645c0fa9" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
91536
1218