flipper-common
Advanced tools
Comparing version 0.131.1 to 0.136.0
@@ -5,9 +5,10 @@ "use strict"; | ||
function buildClientId(clientInfo) { | ||
const escapedName = escape(clientInfo.app); | ||
const result = `${escapedName}#${clientInfo.os}#${clientInfo.device}#${clientInfo.device_id}`; | ||
for (const key of ['app', 'os', 'device']) { | ||
if (!clientInfo[key]) { | ||
console.error(`Attempted to build clientId with invalid ${key}: "${clientInfo[key]}`); | ||
console.error(`Attempted to build clientId with invalid ${key}: "${clientInfo[key]} (identifier: ${result})`); | ||
} | ||
} | ||
const escapedName = escape(clientInfo.app); | ||
return `${escapedName}#${clientInfo.os}#${clientInfo.device}#${clientInfo.device_id}`; | ||
return result; | ||
} | ||
@@ -14,0 +15,0 @@ exports.buildClientId = buildClientId; |
@@ -51,2 +51,5 @@ export declare namespace FlipperDoctor { | ||
}; | ||
type SubprocessHealtcheckRunResult = HealthcheckRunResult & { | ||
stdout?: string; | ||
}; | ||
type CategoryResult = [ | ||
@@ -53,0 +56,0 @@ string, |
@@ -64,2 +64,3 @@ export interface PluginDetails { | ||
lastUpdated: Date; | ||
isEnabledByDefault: boolean; | ||
} | ||
@@ -66,0 +67,0 @@ export declare type UpdateResult = { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.timeout = void 0; | ||
const sleep_1 = require("./sleep"); | ||
function timeout(ms, promise, timeoutMessage) { | ||
const timeout = (0, sleep_1.sleep)(ms).then(() => { | ||
throw new Error(timeoutMessage || `Timed out in ${ms} ms.`); | ||
return new Promise((resolve, reject) => { | ||
const timeoutHandle = setTimeout(() => { | ||
reject(new Error(timeoutMessage || `Timed out in ${ms} ms.`)); | ||
}, ms); | ||
promise | ||
.then(resolve) | ||
.finally(() => { | ||
clearTimeout(timeoutHandle); | ||
}) | ||
.catch(reject); | ||
}); | ||
return Promise.race([promise, timeout]); | ||
} | ||
exports.timeout = timeout; | ||
//# sourceMappingURL=timeout.js.map |
{ | ||
"name": "flipper-common", | ||
"version": "0.131.1", | ||
"version": "0.136.0", | ||
"description": "Server & UI shared Flipper utilities", | ||
@@ -5,0 +5,0 @@ "repository": "facebook/flipper", |
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
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
94889
1422