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
24
electron/node_modules/builder-util/out/DebugLogger.js
generated
vendored
24
electron/node_modules/builder-util/out/DebugLogger.js
generated
vendored
|
|
@ -3,10 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||
exports.DebugLogger = void 0;
|
||||
const fs_extra_1 = require("fs-extra");
|
||||
const util_1 = require("./util");
|
||||
const builder_util_runtime_1 = require("builder-util-runtime");
|
||||
class DebugLogger {
|
||||
constructor(isEnabled = true) {
|
||||
this.isEnabled = isEnabled;
|
||||
this.data = {};
|
||||
this.data = new Map();
|
||||
}
|
||||
add(key, value) {
|
||||
if (!this.isEnabled) {
|
||||
|
|
@ -21,26 +22,27 @@ class DebugLogger {
|
|||
break;
|
||||
}
|
||||
else {
|
||||
if (o[p] == null) {
|
||||
o[p] = Object.create(null);
|
||||
if (!o.has(p)) {
|
||||
o.set(p, new Map());
|
||||
}
|
||||
else if (typeof o[p] === "string") {
|
||||
o[p] = [o[p]];
|
||||
else if (typeof o.get(p) === "string") {
|
||||
o.set(p, [o.get(p)]);
|
||||
}
|
||||
o = o[p];
|
||||
o = o.get(p);
|
||||
}
|
||||
}
|
||||
if (Array.isArray(o[lastName])) {
|
||||
o[lastName] = [...o[lastName], value];
|
||||
if (Array.isArray(o.get(lastName))) {
|
||||
o.set(lastName, [...o.get(lastName), value]);
|
||||
}
|
||||
else {
|
||||
o[lastName] = value;
|
||||
o.set(lastName, value);
|
||||
}
|
||||
}
|
||||
save(file) {
|
||||
const data = (0, builder_util_runtime_1.mapToObject)(this.data);
|
||||
// toml and json doesn't correctly output multiline string as multiline
|
||||
if (this.isEnabled && Object.keys(this.data).length > 0) {
|
||||
return fs_extra_1.outputFile(file, util_1.serializeToYaml(this.data));
|
||||
if (this.isEnabled && Object.keys(data).length > 0) {
|
||||
return (0, fs_extra_1.outputFile)(file, (0, util_1.serializeToYaml)(data));
|
||||
}
|
||||
else {
|
||||
return Promise.resolve();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue