forked from olcxjas-softworks/LarpixClient
update electron to v43
This commit is contained in:
parent
68ac0beedf
commit
fb6c8b6ee9
5385 changed files with 513060 additions and 123058 deletions
23
electron/node_modules/app-builder-lib/out/util/toolsetLock.js
generated
vendored
Normal file
23
electron/node_modules/app-builder-lib/out/util/toolsetLock.js
generated
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.withToolsetLock = withToolsetLock;
|
||||
const builder_util_1 = require("builder-util");
|
||||
const promises_1 = require("fs/promises");
|
||||
const lockfile = require("proper-lockfile");
|
||||
const os = require("os");
|
||||
const path = require("path");
|
||||
const LOCK_FILE = path.join(os.tmpdir(), ".electron-builder-toolset.lock");
|
||||
async function withToolsetLock(task) {
|
||||
await (0, promises_1.writeFile)(LOCK_FILE, "", { flag: "a" });
|
||||
const release = await lockfile.lock(LOCK_FILE, {
|
||||
retries: { retries: 100, minTimeout: 1000, maxTimeout: 5000 },
|
||||
stale: 120000,
|
||||
});
|
||||
try {
|
||||
return await task();
|
||||
}
|
||||
finally {
|
||||
await release().catch((err) => builder_util_1.log.warn({ err }, "failed to release toolset lock"));
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=toolsetLock.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue