|
1 | | -/* eslint-disable @typescript-eslint/no-require-imports, @typescript-eslint/no-explicit-any */ |
2 | | -const { MakerSquirrel } = require("@electron-forge/maker-squirrel"); |
3 | | -const { MakerDMG } = require("@electron-forge/maker-dmg"); |
4 | | -const { MakerZIP } = require("@electron-forge/maker-zip"); |
5 | | -const { MakerDeb } = require("@electron-forge/maker-deb"); |
6 | | -const { MakerRpm } = require("@electron-forge/maker-rpm"); |
7 | | -const { VitePlugin } = require("@electron-forge/plugin-vite"); |
8 | | -const { FusesPlugin } = require("@electron-forge/plugin-fuses"); |
9 | | -const { FuseV1Options, FuseVersion } = require("@electron/fuses"); |
10 | | -const { PublisherS3 } = require("@electron-forge/publisher-s3"); |
| 1 | +import type { ForgeConfig } from "@electron-forge/shared-types"; |
| 2 | +import { MakerSquirrel } from "@electron-forge/maker-squirrel"; |
| 3 | +import { MakerDMG } from "@electron-forge/maker-dmg"; |
| 4 | +import { MakerZIP } from "@electron-forge/maker-zip"; |
| 5 | +import { MakerDeb } from "@electron-forge/maker-deb"; |
| 6 | +import { MakerRpm } from "@electron-forge/maker-rpm"; |
| 7 | +import { VitePlugin } from "@electron-forge/plugin-vite"; |
| 8 | +import { FusesPlugin } from "@electron-forge/plugin-fuses"; |
| 9 | +import { FuseV1Options, FuseVersion } from "@electron/fuses"; |
| 10 | +import { PublisherS3 } from "@electron-forge/publisher-s3"; |
11 | 11 |
|
12 | | -const { execSync } = require("child_process"); |
13 | | -const path = require("path"); |
14 | | -const fs = require("fs"); |
15 | | -const os = require("os"); |
| 12 | +import { type OsxSignOptions } from "@electron/packager/dist/types"; |
| 13 | +import { type NotaryToolCredentials } from "@electron/notarize/lib/types"; |
| 14 | + |
| 15 | +import { execSync } from "child_process"; |
| 16 | +import path from "path"; |
| 17 | +import fs from "fs"; |
| 18 | +import os from "os"; |
16 | 19 |
|
17 | 20 | // Make sure build path exists |
18 | 21 | const buildPath = path.join(__dirname, "build"); |
@@ -124,12 +127,12 @@ const mimeTypeScheme = |
124 | 127 | : "x-scheme-handler/cyd-dev"; |
125 | 128 |
|
126 | 129 | // macOS signing and notarization options |
127 | | -let osxSign: any | undefined; |
128 | | -let osxNotarize: any | undefined; |
| 130 | +let osxSign: OsxSignOptions | undefined; |
| 131 | +let osxNotarize: NotaryToolCredentials | undefined; |
129 | 132 | if (process.env.MACOS_RELEASE === "true") { |
130 | 133 | osxSign = { |
131 | 134 | identity: "Developer ID Application: Lockdown Systems LLC (G762K6CH36)", |
132 | | - optionsForFile: (filePath: string) => { |
| 135 | + optionsForFile: (filePath) => { |
133 | 136 | const entitlementDefault = path.join( |
134 | 137 | assetsPath, |
135 | 138 | "entitlements", |
@@ -175,7 +178,7 @@ if (process.env.MACOS_RELEASE === "true") { |
175 | 178 | }; |
176 | 179 | } |
177 | 180 |
|
178 | | -const config = { |
| 181 | +const config: ForgeConfig = { |
179 | 182 | packagerConfig: { |
180 | 183 | name: process.env.CYD_ENV == "prod" ? "Cyd" : "Cyd Dev", |
181 | 184 | executableName: |
@@ -365,4 +368,4 @@ const config = { |
365 | 368 | ], |
366 | 369 | }; |
367 | 370 |
|
368 | | -module.exports = config; |
| 371 | +export default config; |
0 commit comments