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/normalizePackageData.js
generated
vendored
31
electron/node_modules/app-builder-lib/out/util/normalizePackageData.js
generated
vendored
|
|
@ -1,15 +1,14 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.normalizePackageData = void 0;
|
||||
const semver = require("semver");
|
||||
exports.normalizePackageData = normalizePackageData;
|
||||
const hosted_git_info_1 = require("hosted-git-info");
|
||||
const url = require("url");
|
||||
const semver = require("semver");
|
||||
const pathManager_1 = require("./pathManager");
|
||||
function normalizePackageData(data) {
|
||||
for (const it of check) {
|
||||
it(data);
|
||||
}
|
||||
}
|
||||
exports.normalizePackageData = normalizePackageData;
|
||||
const depTypes = ["dependencies", "devDependencies", "optionalDependencies"];
|
||||
const check = [
|
||||
function (data) {
|
||||
|
|
@ -23,7 +22,7 @@ const check = [
|
|||
};
|
||||
}
|
||||
if (data.repository != null && data.repository.url) {
|
||||
const hosted = hosted_git_info_1.fromUrl(data.repository.url);
|
||||
const hosted = (0, hosted_git_info_1.fromUrl)(data.repository.url);
|
||||
if (hosted) {
|
||||
data.repository.url = hosted.getDefaultRepresentation() == "shortcut" ? hosted.https() : hosted.toString();
|
||||
}
|
||||
|
|
@ -81,7 +80,7 @@ const check = [
|
|||
if (typeof r !== "string") {
|
||||
delete data[deps][d];
|
||||
}
|
||||
const hosted = hosted_git_info_1.fromUrl(data[deps][d]);
|
||||
const hosted = (0, hosted_git_info_1.fromUrl)(data[deps][d]);
|
||||
if (hosted) {
|
||||
data[deps][d] = hosted.toString();
|
||||
}
|
||||
|
|
@ -89,8 +88,9 @@ const check = [
|
|||
}
|
||||
},
|
||||
function fixBugsField(data) {
|
||||
var _a, _b;
|
||||
if (!data.bugs && data.repository && data.repository.url) {
|
||||
const hosted = hosted_git_info_1.fromUrl(data.repository.url);
|
||||
const hosted = (0, hosted_git_info_1.fromUrl)(data.repository.url);
|
||||
if (hosted && hosted.bugs()) {
|
||||
data.bugs = { url: hosted.bugs() };
|
||||
}
|
||||
|
|
@ -101,7 +101,7 @@ const check = [
|
|||
if (emailRe.test(data.bugs)) {
|
||||
data.bugs = { email: data.bugs };
|
||||
}
|
||||
else if (url.parse(data.bugs).protocol) {
|
||||
else if ((_a = (0, pathManager_1.parseUrl)(data.bugs)) === null || _a === void 0 ? void 0 : _a.protocol) {
|
||||
data.bugs = { url: data.bugs };
|
||||
}
|
||||
}
|
||||
|
|
@ -110,7 +110,7 @@ const check = [
|
|||
const oldBugs = data.bugs;
|
||||
data.bugs = {};
|
||||
if (oldBugs.url) {
|
||||
if (typeof oldBugs.url == "string" && url.parse(oldBugs.url).protocol) {
|
||||
if (typeof oldBugs.url == "string" && ((_b = (0, pathManager_1.parseUrl)(oldBugs.url)) === null || _b === void 0 ? void 0 : _b.protocol)) {
|
||||
data.bugs.url = oldBugs.url;
|
||||
}
|
||||
}
|
||||
|
|
@ -171,8 +171,9 @@ const check = [
|
|||
ensureValidName(data.name);
|
||||
},
|
||||
function fixHomepageField(data) {
|
||||
var _a;
|
||||
if (!data.homepage && data.repository && data.repository.url) {
|
||||
const hosted = hosted_git_info_1.fromUrl(data.repository.url);
|
||||
const hosted = (0, hosted_git_info_1.fromUrl)(data.repository.url);
|
||||
if (hosted && hosted.docs()) {
|
||||
data.homepage = hosted.docs();
|
||||
}
|
||||
|
|
@ -183,7 +184,7 @@ const check = [
|
|||
if (typeof data.homepage !== "string") {
|
||||
delete data.homepage;
|
||||
}
|
||||
if (!url.parse(data.homepage).protocol) {
|
||||
if (!((_a = (0, pathManager_1.parseUrl)(data.homepage)) === null || _a === void 0 ? void 0 : _a.protocol)) {
|
||||
data.homepage = `https://${data.homepage}`;
|
||||
}
|
||||
return;
|
||||
|
|
@ -208,7 +209,7 @@ function fixBundleDependenciesField(data) {
|
|||
if (!data.dependencies) {
|
||||
data.dependencies = {};
|
||||
}
|
||||
if (!("bd" in data.dependencies)) {
|
||||
if (!Object.prototype.hasOwnProperty.call(data.dependencies, bd)) {
|
||||
data.dependencies[bd] = "*";
|
||||
}
|
||||
return true;
|
||||
|
|
@ -295,9 +296,9 @@ function depObjectify(deps) {
|
|||
return typeof d === "string";
|
||||
})
|
||||
.forEach(function (d) {
|
||||
d = d.trim().split(/(:?[@\s><=])/);
|
||||
const dn = d.shift();
|
||||
let dv = d.join("");
|
||||
const arr = d.trim().split(/(:?[@\s><=])/);
|
||||
const dn = arr.shift();
|
||||
let dv = arr.join("");
|
||||
dv = dv.trim();
|
||||
dv = dv.replace(/^@/, "");
|
||||
o[dn] = dv;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue