2022-11-01 00:07:25 -07:00
|
|
|
var AllowedFirstParts = {
|
|
|
|
|
"package.json": true,
|
2023-08-21 21:37:04 -07:00
|
|
|
dist: true,
|
2023-10-13 09:09:09 -07:00
|
|
|
public: true,
|
2023-08-21 21:37:04 -07:00
|
|
|
node_modules: true,
|
|
|
|
|
bin: true,
|
2022-11-01 00:07:25 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var AllowedNodeModules = {
|
2023-09-06 19:51:32 -07:00
|
|
|
"monaco-editor": true,
|
2022-11-01 00:07:25 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var modCache = {};
|
|
|
|
|
|
|
|
|
|
function ignoreFn(path) {
|
|
|
|
|
let parts = path.split("/");
|
|
|
|
|
if (parts.length <= 1) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
let firstPart = parts[1];
|
|
|
|
|
if (!AllowedFirstParts[firstPart]) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
if (firstPart == "node_modules") {
|
|
|
|
|
if (parts.length <= 2) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
2022-12-27 22:55:42 -08:00
|
|
|
if (parts.length > 3) {
|
|
|
|
|
if (parts[3] == "build") {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-11-01 00:07:25 -07:00
|
|
|
let nodeModule = parts[2];
|
|
|
|
|
if (!modCache[nodeModule]) {
|
|
|
|
|
modCache[nodeModule] = true;
|
|
|
|
|
}
|
|
|
|
|
if (!AllowedNodeModules[nodeModule]) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
2023-11-05 00:00:47 -07:00
|
|
|
if (nodeModule == "monaco-editor" && parts.length >= 4 && parts[3] != "min") {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
2022-11-01 00:07:25 -07:00
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-31 16:41:44 -07:00
|
|
|
module.exports = {
|
2022-11-01 00:07:25 -07:00
|
|
|
packagerConfig: {
|
|
|
|
|
ignore: ignoreFn,
|
|
|
|
|
files: [
|
|
|
|
|
"package.json",
|
|
|
|
|
"dist/*",
|
2023-10-13 09:09:09 -07:00
|
|
|
"public/*",
|
2022-11-01 00:07:25 -07:00
|
|
|
],
|
2023-10-25 09:46:51 -07:00
|
|
|
icon: "public/waveterm.icns",
|
2022-11-01 00:07:25 -07:00
|
|
|
},
|
2022-12-27 22:55:42 -08:00
|
|
|
rebuildConfig: {},
|
|
|
|
|
makers: [
|
|
|
|
|
{
|
2023-08-21 21:37:04 -07:00
|
|
|
name: "@electron-forge/maker-zip",
|
2023-10-18 05:54:07 +00:00
|
|
|
platforms: ["darwin", "linux"],
|
2022-12-27 22:55:42 -08:00
|
|
|
},
|
|
|
|
|
],
|
2022-10-31 16:41:44 -07:00
|
|
|
};
|