waveterm/forge.config.js

83 lines
2.0 KiB
JavaScript
Raw Normal View History

var AllowedFirstParts = {
"package.json": true,
2023-08-22 06:37:04 +02:00
dist: true,
2023-10-13 18:09:09 +02:00
public: true,
2023-08-22 06:37:04 +02:00
node_modules: true,
bin: true,
};
var AllowedNodeModules = {
// "lzma-native": true,
// "fs-ext": true,
// "fsevents": true,
"monaco-editor": true,
};
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;
}
if (parts.length > 3) {
if (parts[3] == "build") {
return true;
}
}
let nodeModule = parts[2];
if (!modCache[nodeModule]) {
modCache[nodeModule] = true;
}
if (!AllowedNodeModules[nodeModule]) {
return true;
}
}
return false;
}
2022-11-01 00:41:44 +01:00
module.exports = {
packagerConfig: {
ignore: ignoreFn,
files: [
"package.json",
"dist/*",
2023-10-13 18:09:09 +02:00
"public/*",
"node_modules/lzma-native/**",
"node_modules/fs-ext/**",
"node_modules/fsevents/**",
],
2023-10-25 18:46:51 +02:00
icon: "public/waveterm.icns",
osxNotarize: {
tool: "notarytool",
keychainProfile: "notarytool-creds",
},
osxSign: {
"hardened-runtime": true,
binaries: [
"Contents/Resources/app/bin/wavesrv",
"Contents/Resources/app/bin/mshell/mshell-v0.2-linux.amd64",
"Contents/Resources/app/bin/mshell/mshell-v0.2-linux.arm64",
"Contents/Resources/app/bin/mshell/mshell-v0.2-darwin.amd64",
"Contents/Resources/app/bin/mshell/mshell-v0.2-darwin.arm64",
],
identity: "VYQ48YC2N2",
},
},
rebuildConfig: {},
makers: [
{
2023-08-22 06:37:04 +02:00
name: "@electron-forge/maker-zip",
2023-10-18 07:54:07 +02:00
platforms: ["darwin", "linux"],
},
],
2022-11-01 00:41:44 +01:00
};