Skip to content

Commit 4a2f797

Browse files
authored
Revert "fix: attempt to fix package build (#570)" (#573)
This reverts commit 8839ba6.
1 parent da8c936 commit 4a2f797

File tree

2 files changed

+25
-22
lines changed

2 files changed

+25
-22
lines changed

forge.config.ts

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
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";
1111

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";
1619

1720
// Make sure build path exists
1821
const buildPath = path.join(__dirname, "build");
@@ -124,12 +127,12 @@ const mimeTypeScheme =
124127
: "x-scheme-handler/cyd-dev";
125128

126129
// 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;
129132
if (process.env.MACOS_RELEASE === "true") {
130133
osxSign = {
131134
identity: "Developer ID Application: Lockdown Systems LLC (G762K6CH36)",
132-
optionsForFile: (filePath: string) => {
135+
optionsForFile: (filePath) => {
133136
const entitlementDefault = path.join(
134137
assetsPath,
135138
"entitlements",
@@ -175,7 +178,7 @@ if (process.env.MACOS_RELEASE === "true") {
175178
};
176179
}
177180

178-
const config = {
181+
const config: ForgeConfig = {
179182
packagerConfig: {
180183
name: process.env.CYD_ENV == "prod" ? "Cyd" : "Cyd Dev",
181184
executableName:
@@ -365,4 +368,4 @@ const config = {
365368
],
366369
};
367370

368-
module.exports = config;
371+
export default config;

scripts/make.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* global console */
2-
const process = require("process");
3-
const os = require("os");
4-
const { execSync } = require("child_process");
2+
import process from "process";
3+
import os from "os";
4+
import { execSync } from "child_process";
55

66
// Validate input
77

0 commit comments

Comments
 (0)