2022-11-01 08:07:25 +01:00
|
|
|
var AllowedFirstParts = {
|
|
|
|
"package.json": true,
|
2023-08-22 06:37:04 +02:00
|
|
|
dist: true,
|
|
|
|
static: true,
|
|
|
|
node_modules: true,
|
|
|
|
bin: true,
|
2022-11-01 08:07:25 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
var AllowedNodeModules = {
|
2022-12-28 07:55:42 +01:00
|
|
|
// "lzma-native": true,
|
|
|
|
// "fs-ext": true,
|
|
|
|
// "fsevents": true,
|
2023-09-07 04:51:32 +02:00
|
|
|
"monaco-editor": true,
|
2022-11-01 08:07:25 +01: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-28 07:55:42 +01:00
|
|
|
if (parts.length > 3) {
|
|
|
|
if (parts[3] == "build") {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
2022-11-01 08:07:25 +01:00
|
|
|
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 = {
|
2022-11-01 08:07:25 +01:00
|
|
|
packagerConfig: {
|
|
|
|
ignore: ignoreFn,
|
|
|
|
files: [
|
|
|
|
"package.json",
|
|
|
|
"dist/*",
|
|
|
|
"static/*",
|
|
|
|
"node_modules/lzma-native/**",
|
|
|
|
"node_modules/fs-ext/**",
|
|
|
|
"node_modules/fsevents/**",
|
|
|
|
],
|
2023-01-26 07:22:51 +01:00
|
|
|
icon: "icon/Prompt.icns",
|
2022-12-28 07:55:42 +01:00
|
|
|
osxNotarize: {
|
|
|
|
tool: "notarytool",
|
|
|
|
keychainProfile: "notarytool-creds",
|
|
|
|
},
|
|
|
|
osxSign: {
|
|
|
|
"hardened-runtime": true,
|
|
|
|
binaries: [
|
|
|
|
"Contents/Resources/app/bin/prompt-local-server",
|
|
|
|
"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",
|
|
|
|
},
|
2022-11-01 08:07:25 +01:00
|
|
|
},
|
2022-12-28 07:55:42 +01:00
|
|
|
rebuildConfig: {},
|
|
|
|
makers: [
|
|
|
|
{
|
2023-08-22 06:37:04 +02:00
|
|
|
name: "@electron-forge/maker-squirrel",
|
2022-12-28 07:55:42 +01:00
|
|
|
config: {},
|
|
|
|
},
|
|
|
|
{
|
2023-08-22 06:37:04 +02:00
|
|
|
name: "@electron-forge/maker-zip",
|
|
|
|
platforms: ["darwin"],
|
2022-12-28 07:55:42 +01:00
|
|
|
},
|
|
|
|
{
|
2023-08-22 06:37:04 +02:00
|
|
|
name: "@electron-forge/maker-deb",
|
2022-12-28 07:55:42 +01:00
|
|
|
config: {},
|
|
|
|
},
|
|
|
|
{
|
2023-08-22 06:37:04 +02:00
|
|
|
name: "@electron-forge/maker-rpm",
|
2022-12-28 07:55:42 +01:00
|
|
|
config: {},
|
|
|
|
},
|
|
|
|
],
|
2022-11-01 00:41:44 +01:00
|
|
|
};
|