@@ -2,6 +2,7 @@ import path from "path";
22import fs from "fs-extra" ;
33import { LOCALES } from "@triliumnext/commons" ;
44import { PRODUCT_NAME } from "../src/app-info.js" ;
5+ import type { ForgeConfig } from "@electron-forge/shared-types" ;
56
67const ELECTRON_FORGE_DIR = __dirname ;
78
@@ -23,13 +24,13 @@ const windowsSignConfiguration = process.env.WINDOWS_SIGN_EXECUTABLE ? {
2324const macosSignConfiguration = process . env . APPLE_ID ? {
2425 osxSign : { } ,
2526 osxNotarize : {
26- appleId : process . env . APPLE_ID ,
27- appleIdPassword : process . env . APPLE_ID_PASSWORD ,
28- teamId : process . env . APPLE_TEAM_ID
27+ appleId : process . env . APPLE_ID ! ,
28+ appleIdPassword : process . env . APPLE_ID_PASSWORD ! ,
29+ teamId : process . env . APPLE_TEAM_ID !
2930 }
3031} : undefined ;
3132
32- module . exports = {
33+ const config : ForgeConfig = {
3334 outDir : "out" ,
3435 // Documentation of `packagerConfig` options: https://electron.github.io/packager/main/interfaces/Options.html
3536 packagerConfig : {
@@ -143,7 +144,7 @@ module.exports = {
143144 ] ,
144145 hooks : {
145146 // Remove unused locales from the packaged app to save some space.
146- postPackage ( _ , packageResult ) {
147+ async postPackage ( _ , packageResult ) {
147148 const isMac = ( process . platform === "darwin" ) ;
148149 let localesToKeep = LOCALES
149150 . filter ( locale => ! locale . contentOnly )
@@ -212,7 +213,7 @@ module.exports = {
212213 }
213214 } ,
214215 // Gather all the artifacts produced by the makers and copy them to a common upload directory.
215- postMake ( _ , makeResults ) {
216+ async postMake ( _ , makeResults ) {
216217 const outputDir = path . join ( __dirname , ".." , "upload" ) ;
217218 fs . mkdirpSync ( outputDir ) ;
218219 for ( const makeResult of makeResults ) {
@@ -261,3 +262,5 @@ function getExtraResourcesForPlatform() {
261262
262263 return resources ;
263264}
265+
266+ export default config ;
0 commit comments