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
33
electron/node_modules/app-builder-lib/out/util/AppFileWalker.js
generated
vendored
33
electron/node_modules/app-builder-lib/out/util/AppFileWalker.js
generated
vendored
|
|
@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||
exports.AppFileWalker = exports.FileCopyHelper = void 0;
|
||||
const fs_extra_1 = require("fs-extra");
|
||||
const path = require("path");
|
||||
const nodeModulesSystemDependentSuffix = `${path.sep}node_modules`;
|
||||
function addAllPatternIfNeed(matcher) {
|
||||
if (!matcher.isSpecifiedAsEmptyArray && (matcher.isEmpty() || matcher.containsOnlyIgnore())) {
|
||||
matcher.prependPattern("**/*");
|
||||
|
|
@ -21,7 +20,7 @@ class FileCopyHelper {
|
|||
if (!fileStat.isSymbolicLink()) {
|
||||
return null;
|
||||
}
|
||||
return fs_extra_1.readlink(file).then((linkTarget) => {
|
||||
return (0, fs_extra_1.readlink)(file).then((linkTarget) => {
|
||||
// http://unix.stackexchange.com/questions/105637/is-symlinks-target-relative-to-the-destinations-parent-directory-and-if-so-wh
|
||||
return this.handleSymlink(fileStat, file, parent, linkTarget);
|
||||
});
|
||||
|
|
@ -31,7 +30,7 @@ class FileCopyHelper {
|
|||
const link = path.relative(this.matcher.from, resolvedLinkTarget);
|
||||
if (link.startsWith("..")) {
|
||||
// outside of project, linked module (https://github.com/electron-userland/electron-builder/issues/675)
|
||||
return fs_extra_1.stat(resolvedLinkTarget).then(targetFileStat => {
|
||||
return (0, fs_extra_1.stat)(resolvedLinkTarget).then(targetFileStat => {
|
||||
this.metadata.set(file, targetFileStat);
|
||||
return targetFileStat;
|
||||
});
|
||||
|
|
@ -49,19 +48,7 @@ function createAppFilter(matcher, packager) {
|
|||
if (packager.areNodeModulesHandledExternally) {
|
||||
return matcher.isEmpty() ? null : matcher.createFilter();
|
||||
}
|
||||
const nodeModulesFilter = (file, fileStat) => {
|
||||
return !(fileStat.isDirectory() && file.endsWith(nodeModulesSystemDependentSuffix));
|
||||
};
|
||||
if (matcher.isEmpty()) {
|
||||
return nodeModulesFilter;
|
||||
}
|
||||
const filter = matcher.createFilter();
|
||||
return (file, fileStat) => {
|
||||
if (!nodeModulesFilter(file, fileStat)) {
|
||||
return !!packager.config.includeSubNodeModules;
|
||||
}
|
||||
return filter(file, fileStat);
|
||||
};
|
||||
return matcher.createFilter();
|
||||
}
|
||||
/** @internal */
|
||||
class AppFileWalker extends FileCopyHelper {
|
||||
|
|
@ -73,18 +60,8 @@ class AppFileWalker extends FileCopyHelper {
|
|||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
consume(file, fileStat, parent, siblingNames) {
|
||||
if (fileStat.isDirectory()) {
|
||||
// https://github.com/electron-userland/electron-builder/issues/1539
|
||||
// but do not filter if we inside node_modules dir
|
||||
// update: solution disabled, node module resolver should support such setup
|
||||
if (file.endsWith(nodeModulesSystemDependentSuffix)) {
|
||||
if (!this.packager.config.includeSubNodeModules) {
|
||||
const matchesFilter = this.matcherFilter(file, fileStat);
|
||||
if (!matchesFilter) {
|
||||
// Skip the file
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
const matchesFilter = this.matcherFilter(file, fileStat);
|
||||
return !matchesFilter;
|
||||
}
|
||||
else {
|
||||
// save memory - no need to store stat for directory
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue