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
31
electron/node_modules/app-builder-lib/out/util/plist.js
generated
vendored
Normal file
31
electron/node_modules/app-builder-lib/out/util/plist.js
generated
vendored
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.savePlistFile = savePlistFile;
|
||||
exports.parsePlistFile = parsePlistFile;
|
||||
const plist_1 = require("plist");
|
||||
const fs = require("fs/promises");
|
||||
function sortObjectKeys(obj) {
|
||||
if (obj === null || typeof obj !== "object") {
|
||||
return obj;
|
||||
}
|
||||
if (Array.isArray(obj)) {
|
||||
return obj.map(sortObjectKeys);
|
||||
}
|
||||
const result = {};
|
||||
Object.keys(obj)
|
||||
.sort()
|
||||
.forEach(key => {
|
||||
result[key] = sortObjectKeys(obj[key]);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
async function savePlistFile(path, data) {
|
||||
const sortedData = sortObjectKeys(data);
|
||||
const plist = (0, plist_1.build)(sortedData);
|
||||
await fs.writeFile(path, plist);
|
||||
}
|
||||
async function parsePlistFile(file) {
|
||||
const data = await fs.readFile(file, "utf8");
|
||||
return (0, plist_1.parse)(data);
|
||||
}
|
||||
//# sourceMappingURL=plist.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue