Skip to content

Commit 8839ba6

Browse files
authored
fix: attempt to fix package build (#570)
1 parent a4e1d6e commit 8839ba6

File tree

2 files changed

+22
-25
lines changed

2 files changed

+22
-25
lines changed

forge.config.ts

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

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";
12+
const { execSync } = require("child_process");
13+
const path = require("path");
14+
const fs = require("fs");
15+
const os = require("os");
1916

2017
// Make sure build path exists
2118
const buildPath = path.join(__dirname, "build");
@@ -127,12 +124,12 @@ const mimeTypeScheme =
127124
: "x-scheme-handler/cyd-dev";
128125

129126
// macOS signing and notarization options
130-
let osxSign: OsxSignOptions | undefined;
131-
let osxNotarize: NotaryToolCredentials | undefined;
127+
let osxSign: any | undefined;
128+
let osxNotarize: any | undefined;
132129
if (process.env.MACOS_RELEASE === "true") {
133130
osxSign = {
134131
identity: "Developer ID Application: Lockdown Systems LLC (G762K6CH36)",
135-
optionsForFile: (filePath) => {
132+
optionsForFile: (filePath: string) => {
136133
const entitlementDefault = path.join(
137134
assetsPath,
138135
"entitlements",
@@ -178,7 +175,7 @@ if (process.env.MACOS_RELEASE === "true") {
178175
};
179176
}
180177

181-
const config: ForgeConfig = {
178+
const config = {
182179
packagerConfig: {
183180
name: process.env.CYD_ENV == "prod" ? "Cyd" : "Cyd Dev",
184181
executableName:
@@ -368,4 +365,4 @@ const config: ForgeConfig = {
368365
],
369366
};
370367

371-
export default config;
368+
module.exports = 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-
import process from "process";
3-
import os from "os";
4-
import { execSync } from "child_process";
2+
const process = require("process");
3+
const os = require("os");
4+
const { execSync } = require("child_process");
55

66
// Validate input
77

0 commit comments

Comments
 (0)