From b3961a4821a18ffce16128e0a37c57b600d7ef58 Mon Sep 17 00:00:00 2001 From: Daniel LaCosse <3759828+daniellacosse@users.noreply.github.com> Date: Mon, 1 Apr 2024 13:44:22 -0400 Subject: [PATCH] Revert Electron, Attempt #1 --- README.md | 6 +++--- client/src/www/app/electron_main.ts | 2 +- {client/src => src}/electron/README.md | 3 ++- {client/src => src}/electron/add_tap_device.bat | 0 {client/src => src}/electron/build.action.mjs | 13 +++++-------- .../src => src}/electron/build_main.action.mjs | 10 +++++----- {client/src => src}/electron/connectivity.ts | 0 .../src => src}/electron/custom_install_steps.nsh | 10 +++++----- .../src => src}/electron/electron-builder.json | 14 +++++++------- .../src => src}/electron/find_tap_device_name.bat | 0 {client/src => src}/electron/go_vpn_tunnel.ts | 2 +- {client/src => src}/electron/icons/mac/icon.icns | Bin .../src => src}/electron/icons/png/1024x1024.png | Bin .../src => src}/electron/icons/png/128x128.png | Bin {client/src => src}/electron/icons/png/16x16.png | Bin {client/src => src}/electron/icons/png/24x24.png | Bin .../src => src}/electron/icons/png/256x256.png | Bin {client/src => src}/electron/icons/png/32x32.png | Bin {client/src => src}/electron/icons/png/48x48.png | Bin .../src => src}/electron/icons/png/512x512.png | Bin {client/src => src}/electron/icons/png/64x64.png | Bin {client/src => src}/electron/icons/win/icon.ico | Bin {client/src => src}/electron/index.ts | 0 .../electron/install_windows_service.bat | 0 {client/src => src}/electron/preload.d.ts | 0 {client/src => src}/electron/preload.ts | 0 {client/src => src}/electron/process.ts | 0 {client/src => src}/electron/routing_service.ts | 4 +++- {client/src => src}/electron/start.action.mjs | 14 +++++++------- {client/src => src}/electron/tsconfig.json | 2 +- {client/src => src}/electron/tunnel_store.ts | 0 .../src => src}/electron/types/socks/index.d.ts | 0 {client/src => src}/electron/vpn_tunnel.ts | 0 .../electron/webpack_electron_main.mjs | 8 ++++---- .../windows/digicert-usb-config/eToken-macos.cfg | 0 .../digicert-usb-config/eToken-windows.cfg | 0 .../windows/electron_builder_signing_plugin.cjs | 12 ++++-------- .../windows/sign_windows_executable.action.mjs | 2 +- 38 files changed, 49 insertions(+), 53 deletions(-) rename {client/src => src}/electron/README.md (85%) rename {client/src => src}/electron/add_tap_device.bat (100%) rename {client/src => src}/electron/build.action.mjs (87%) rename {client/src => src}/electron/build_main.action.mjs (86%) rename {client/src => src}/electron/connectivity.ts (100%) rename {client/src => src}/electron/custom_install_steps.nsh (94%) rename {client/src => src}/electron/electron-builder.json (53%) rename {client/src => src}/electron/find_tap_device_name.bat (100%) rename {client/src => src}/electron/go_vpn_tunnel.ts (99%) rename {client/src => src}/electron/icons/mac/icon.icns (100%) rename {client/src => src}/electron/icons/png/1024x1024.png (100%) rename {client/src => src}/electron/icons/png/128x128.png (100%) rename {client/src => src}/electron/icons/png/16x16.png (100%) rename {client/src => src}/electron/icons/png/24x24.png (100%) rename {client/src => src}/electron/icons/png/256x256.png (100%) rename {client/src => src}/electron/icons/png/32x32.png (100%) rename {client/src => src}/electron/icons/png/48x48.png (100%) rename {client/src => src}/electron/icons/png/512x512.png (100%) rename {client/src => src}/electron/icons/png/64x64.png (100%) rename {client/src => src}/electron/icons/win/icon.ico (100%) rename {client/src => src}/electron/index.ts (100%) rename {client/src => src}/electron/install_windows_service.bat (100%) rename {client/src => src}/electron/preload.d.ts (100%) rename {client/src => src}/electron/preload.ts (100%) rename {client/src => src}/electron/process.ts (100%) rename {client/src => src}/electron/routing_service.ts (99%) rename {client/src => src}/electron/start.action.mjs (68%) rename {client/src => src}/electron/tsconfig.json (57%) rename {client/src => src}/electron/tunnel_store.ts (100%) rename {client/src => src}/electron/types/socks/index.d.ts (100%) rename {client/src => src}/electron/vpn_tunnel.ts (100%) rename {client/src => src}/electron/webpack_electron_main.mjs (87%) rename {client/src => src}/electron/windows/digicert-usb-config/eToken-macos.cfg (100%) rename {client/src => src}/electron/windows/digicert-usb-config/eToken-windows.cfg (100%) rename {client/src => src}/electron/windows/electron_builder_signing_plugin.cjs (87%) rename {client/src => src}/electron/windows/sign_windows_executable.action.mjs (99%) diff --git a/README.md b/README.md index 55e9ff19d0a..bd2986aed6d 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ npm install Outline clients share the same web app across all platforms. This code is located in the src/www directory. If you are making changes to the shared web app and do not need to test platform-specific functionality, you can test in a desktop browser by running: ```sh -npm run action src/www/start +npm run action client/src/www/start ``` The latter command will open a browser instance running the app. Browser platform development will use fake servers to test successful and unsuccessful connections. @@ -52,7 +52,7 @@ The latter command will open a browser instance running the app. Browser platfor The app logic is located in [src/www/app](src/www/app). UI components are located in [src/www/ui_components](src/www/ui_components). If you want to work specifically on an individual UI element, try the storybook!: ```sh -npm run action src/www/storybook +npm run action client/src/www/storybook ``` > [!NOTE] @@ -75,7 +75,7 @@ npm run action src/www/storybook Certain actions take configuration flags - but since we're running them through `npm`, you'll have to use the `--` seperator to funnel them through to the underlying process. For example, to set up a MacOS project in release mode, you'd run: ```sh -SENTRY_DSN= npm run action cordova/setup macos -- --buildMode=release --versionName= +SENTRY_DSN= npm run action client/src/cordova/setup macos -- --buildMode=release --versionName= ``` #### Life of a Packet diff --git a/client/src/www/app/electron_main.ts b/client/src/www/app/electron_main.ts index e4be0325c93..87dc973de58 100644 --- a/client/src/www/app/electron_main.ts +++ b/client/src/www/app/electron_main.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -/// +/// import 'web-animations-js/web-animations-next-lite.min.js'; import '@webcomponents/webcomponentsjs/webcomponents-bundle.js'; diff --git a/client/src/electron/README.md b/src/electron/README.md similarity index 85% rename from client/src/electron/README.md rename to src/electron/README.md index abf8afc5647..331658da54d 100644 --- a/client/src/electron/README.md +++ b/src/electron/README.md @@ -11,10 +11,11 @@ brew install podman podman machine init sudo ln -s $(which podman) /usr/local/bin/docker sudo /opt/homebrew/Cellar/podman//bin/podman-mac-helper install -podman machine set --rootful podman-machine-default podman machine start ``` +> You may run into the error: `/var/folders//xgo-cache: no such file or directory`. If so, simply create that directory with `mkdir -p /var/folders//xgo-cache` and try again. + To build the Electron clients, run (it will also package an installer executable into `build/dist`): ```sh diff --git a/client/src/electron/add_tap_device.bat b/src/electron/add_tap_device.bat similarity index 100% rename from client/src/electron/add_tap_device.bat rename to src/electron/add_tap_device.bat diff --git a/client/src/electron/build.action.mjs b/src/electron/build.action.mjs similarity index 87% rename from client/src/electron/build.action.mjs rename to src/electron/build.action.mjs index 8d1c6c0080d..9b5b5a4f669 100644 --- a/client/src/electron/build.action.mjs +++ b/src/electron/build.action.mjs @@ -13,16 +13,16 @@ // limitations under the License. import minimist from 'minimist'; -import {getBuildParameters} from '../build/get_build_parameters.mjs'; -import {runAction} from '../build/run_action.mjs'; +import {getBuildParameters} from '../../client/src/build/get_build_parameters.mjs'; +import {runAction} from '../../client/src/build/run_action.mjs'; import electron, {Platform} from 'electron-builder'; import copydir from 'copy-dir'; import fs from 'fs/promises'; import url from 'url'; -import {getRootDir} from '../build/get_root_dir.mjs'; +import {getRootDir} from '../../client/src/build/get_root_dir.mjs'; import path from 'path'; -const ELECTRON_BUILD_DIR = 'output'; +const ELECTRON_BUILD_DIR = 'build'; const ELECTRON_PLATFORMS = ['linux', 'windows']; export async function main(...parameters) { @@ -50,9 +50,7 @@ export async function main(...parameters) { await runAction('client/src/www/build', ...parameters); await runAction('client/src/tun2socks/build', ...parameters); - await runAction('client/src/electron/build_main', ...parameters); - - await fs.mkdir(path.join(getRootDir(), ELECTRON_BUILD_DIR, 'icons'), {recursive: true}); + await runAction('src/electron/build_main', ...parameters); await copydir.sync( path.join(getRootDir(), 'src', 'electron', 'icons'), @@ -66,7 +64,6 @@ export async function main(...parameters) { // build electron binary await electron.build({ publish: buildMode === 'release' ? 'always' : 'never', - projectDir: getRootDir(), targets: Platform[platform.toLocaleUpperCase()].createTarget(), config: { ...electronConfig, diff --git a/client/src/electron/build_main.action.mjs b/src/electron/build_main.action.mjs similarity index 86% rename from client/src/electron/build_main.action.mjs rename to src/electron/build_main.action.mjs index 5f9fd253586..0dd6825b666 100644 --- a/client/src/electron/build_main.action.mjs +++ b/src/electron/build_main.action.mjs @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {getBuildParameters} from '../build/get_build_parameters.mjs'; -import {getWebpackBuildMode} from '../build/get_webpack_build_mode.mjs'; -import {runAction} from '../build/run_action.mjs'; -import {runWebpack} from '../build/run_webpack.mjs'; +import {getBuildParameters} from '../../client/src/build/get_build_parameters.mjs'; +import {getWebpackBuildMode} from '../../client/src/build/get_webpack_build_mode.mjs'; +import {runAction} from '../../client/src/build/run_action.mjs'; +import {runWebpack} from '../../client/src/build/run_webpack.mjs'; import electronMainWebpackConfigs from './webpack_electron_main.mjs'; import fs from 'fs/promises'; import path from 'path'; import url from 'url'; import {getRootDir} from '../build/get_root_dir.mjs'; -const ELECTRON_BUILD_DIR = 'output'; +const ELECTRON_BUILD_DIR = 'build'; const ELECTRON_PLATFORMS = ['linux', 'windows']; export async function main(...parameters) { diff --git a/client/src/electron/connectivity.ts b/src/electron/connectivity.ts similarity index 100% rename from client/src/electron/connectivity.ts rename to src/electron/connectivity.ts diff --git a/client/src/electron/custom_install_steps.nsh b/src/electron/custom_install_steps.nsh similarity index 94% rename from client/src/electron/custom_install_steps.nsh rename to src/electron/custom_install_steps.nsh index 991d95ef832..3f106efcd60 100755 --- a/client/src/electron/custom_install_steps.nsh +++ b/src/electron/custom_install_steps.nsh @@ -52,15 +52,15 @@ ${StrRep} File /r "${PROJECT_DIR}\third_party\tap-windows6\bin\i386\*" ${EndIf} SetOutPath - - File "${PROJECT_DIR}\client\src\electron\add_tap_device.bat" - File "${PROJECT_DIR}\client\src\electron\find_tap_device_name.bat" + File "${PROJECT_DIR}\src\electron\add_tap_device.bat" + File "${PROJECT_DIR}\src\electron\find_tap_device_name.bat" ; OutlineService files, stopping the service first in case it's still running. nsExec::Exec "$SYSDIR\net stop OutlineService" - File "${PROJECT_DIR}\client\tools\OutlineService\OutlineService\bin\OutlineService.exe" - File "${PROJECT_DIR}\client\tools\smartdnsblock\bin\smartdnsblock.exe" + File "${PROJECT_DIR}\tools\OutlineService\OutlineService\bin\OutlineService.exe" + File "${PROJECT_DIR}\tools\smartdnsblock\bin\smartdnsblock.exe" File "${PROJECT_DIR}\third_party\newtonsoft\Newtonsoft.Json.dll" - File "${PROJECT_DIR}\client\src\electron\install_windows_service.bat" + File "${PROJECT_DIR}\src\electron\install_windows_service.bat" ; ExecToStack captures both stdout and stderr from the script, in the order output. ; Set a (long) timeout in case the device never becomes visible to netsh. diff --git a/client/src/electron/electron-builder.json b/src/electron/electron-builder.json similarity index 53% rename from client/src/electron/electron-builder.json rename to src/electron/electron-builder.json index 43e55c4bf36..76ade7c8e55 100644 --- a/client/src/electron/electron-builder.json +++ b/src/electron/electron-builder.json @@ -1,17 +1,17 @@ { - "files": ["output/electron", "www", "resources/tray", "!node_modules/electron"], - "asarUnpack": ["../third_party", "tools"], + "files": ["build/electron", "www", "resources/tray", "!node_modules/electron"], + "asarUnpack": ["output", "tools"], "artifactName": "Outline-Client.${ext}", "directories": { - "output": "output/dist" + "output": "output/build/dist" }, "linux": { "target": { "target": "AppImage", "arch": ["x64"] }, - "files": ["output/icons/png", "output/build/linux", "tools/outline_proxy_controller/dist"], - "icon": "output/icons/png", + "files": ["build/icons/png", "output/build/linux", "tools/outline_proxy_controller/dist"], + "icon": "build/icons/png", "category": "Network" }, "win": { @@ -22,8 +22,8 @@ } ], "files": ["output/build/windows"], - "icon": "output/icons/win/icon.ico", - "sign": "client/src/electron/windows/electron_builder_signing_plugin.cjs", + "icon": "build/icons/win/icon.ico", + "sign": "src/electron/windows/electron_builder_signing_plugin.cjs", "signingHashAlgorithms": ["sha256"] }, "nsis": { diff --git a/client/src/electron/find_tap_device_name.bat b/src/electron/find_tap_device_name.bat similarity index 100% rename from client/src/electron/find_tap_device_name.bat rename to src/electron/find_tap_device_name.bat diff --git a/client/src/electron/go_vpn_tunnel.ts b/src/electron/go_vpn_tunnel.ts similarity index 99% rename from client/src/electron/go_vpn_tunnel.ts rename to src/electron/go_vpn_tunnel.ts index 33d11bb2f2c..99f61a26510 100755 --- a/client/src/electron/go_vpn_tunnel.ts +++ b/src/electron/go_vpn_tunnel.ts @@ -221,7 +221,7 @@ class GoTun2socks { private readonly process: ChildProcessHelper; constructor(private readonly config: ShadowsocksSessionConfig) { - this.process = new ChildProcessHelper(pathToEmbeddedBinary('outline-go-tun2socks', 'tun2socks')); + this.process = new ChildProcessHelper(pathToEmbeddedBinary('tun2socks')); } async start(isUdpEnabled: boolean): Promise { diff --git a/client/src/electron/icons/mac/icon.icns b/src/electron/icons/mac/icon.icns similarity index 100% rename from client/src/electron/icons/mac/icon.icns rename to src/electron/icons/mac/icon.icns diff --git a/client/src/electron/icons/png/1024x1024.png b/src/electron/icons/png/1024x1024.png similarity index 100% rename from client/src/electron/icons/png/1024x1024.png rename to src/electron/icons/png/1024x1024.png diff --git a/client/src/electron/icons/png/128x128.png b/src/electron/icons/png/128x128.png similarity index 100% rename from client/src/electron/icons/png/128x128.png rename to src/electron/icons/png/128x128.png diff --git a/client/src/electron/icons/png/16x16.png b/src/electron/icons/png/16x16.png similarity index 100% rename from client/src/electron/icons/png/16x16.png rename to src/electron/icons/png/16x16.png diff --git a/client/src/electron/icons/png/24x24.png b/src/electron/icons/png/24x24.png similarity index 100% rename from client/src/electron/icons/png/24x24.png rename to src/electron/icons/png/24x24.png diff --git a/client/src/electron/icons/png/256x256.png b/src/electron/icons/png/256x256.png similarity index 100% rename from client/src/electron/icons/png/256x256.png rename to src/electron/icons/png/256x256.png diff --git a/client/src/electron/icons/png/32x32.png b/src/electron/icons/png/32x32.png similarity index 100% rename from client/src/electron/icons/png/32x32.png rename to src/electron/icons/png/32x32.png diff --git a/client/src/electron/icons/png/48x48.png b/src/electron/icons/png/48x48.png similarity index 100% rename from client/src/electron/icons/png/48x48.png rename to src/electron/icons/png/48x48.png diff --git a/client/src/electron/icons/png/512x512.png b/src/electron/icons/png/512x512.png similarity index 100% rename from client/src/electron/icons/png/512x512.png rename to src/electron/icons/png/512x512.png diff --git a/client/src/electron/icons/png/64x64.png b/src/electron/icons/png/64x64.png similarity index 100% rename from client/src/electron/icons/png/64x64.png rename to src/electron/icons/png/64x64.png diff --git a/client/src/electron/icons/win/icon.ico b/src/electron/icons/win/icon.ico similarity index 100% rename from client/src/electron/icons/win/icon.ico rename to src/electron/icons/win/icon.ico diff --git a/client/src/electron/index.ts b/src/electron/index.ts similarity index 100% rename from client/src/electron/index.ts rename to src/electron/index.ts diff --git a/client/src/electron/install_windows_service.bat b/src/electron/install_windows_service.bat similarity index 100% rename from client/src/electron/install_windows_service.bat rename to src/electron/install_windows_service.bat diff --git a/client/src/electron/preload.d.ts b/src/electron/preload.d.ts similarity index 100% rename from client/src/electron/preload.d.ts rename to src/electron/preload.d.ts diff --git a/client/src/electron/preload.ts b/src/electron/preload.ts similarity index 100% rename from client/src/electron/preload.ts rename to src/electron/preload.ts diff --git a/client/src/electron/process.ts b/src/electron/process.ts similarity index 100% rename from client/src/electron/process.ts rename to src/electron/process.ts diff --git a/client/src/electron/routing_service.ts b/src/electron/routing_service.ts similarity index 99% rename from client/src/electron/routing_service.ts rename to src/electron/routing_service.ts index 2bf0db29701..0ca1f1bc674 100755 --- a/client/src/electron/routing_service.ts +++ b/src/electron/routing_service.ts @@ -296,7 +296,9 @@ async function installLinuxRoutingServices(): Promise { const src = path.join(srcFolderPath, descriptor.filename); const srcContent = await fsextra.readFile(src); - descriptor.sha256 = createHash('sha256').update(srcContent).digest('hex'); + descriptor.sha256 = createHash('sha256') + .update(srcContent) + .digest('hex'); const dest = path.join(tmp, descriptor.filename); await fsextra.copy(src, dest, {overwrite: true}); diff --git a/client/src/electron/start.action.mjs b/src/electron/start.action.mjs similarity index 68% rename from client/src/electron/start.action.mjs rename to src/electron/start.action.mjs index 5e1809b5176..9ef335799df 100644 --- a/client/src/electron/start.action.mjs +++ b/src/electron/start.action.mjs @@ -15,10 +15,10 @@ import url from 'url'; import electron from 'electron'; -import {runAction} from '../build/run_action.mjs'; -import {getBuildParameters} from '../build/get_build_parameters.mjs'; -import {getRootDir} from '../build/get_root_dir.mjs'; -import {spawnStream} from '../build/spawn_stream.mjs'; +import {runAction} from '../../client/src/build/run_action.mjs'; +import {getBuildParameters} from '../../client/src/build/get_build_parameters.mjs'; +import {getRootDir} from '../../client/src/build/get_root_dir.mjs'; +import {spawnStream} from '../../client/src/build/spawn_stream.mjs'; /** * @description Builds and starts the electron application. @@ -28,9 +28,9 @@ import {spawnStream} from '../build/spawn_stream.mjs'; export async function main(...parameters) { const {platform, buildMode} = getBuildParameters(parameters); - await runAction('client/src/www/build', platform, `--buildMode=${buildMode}`); - await runAction('client/src/electron/build_main', ...parameters); - await runAction('client/src/electron/build', platform, `--buildMode=${buildMode}`); + await runAction('www/build', platform, `--buildMode=${buildMode}`); + await runAction('electron/build_main', ...parameters); + await runAction('electron/build', platform, `--buildMode=${buildMode}`); process.env.OUTLINE_DEBUG = buildMode === 'debug'; diff --git a/client/src/electron/tsconfig.json b/src/electron/tsconfig.json similarity index 57% rename from client/src/electron/tsconfig.json rename to src/electron/tsconfig.json index 9a97ef96b11..89375e09b82 100644 --- a/client/src/electron/tsconfig.json +++ b/src/electron/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../www/tsconfig.json", + "extends": "../../client/src/www/tsconfig.json", "compilerOptions": { "outDir": "../../build/electron" } diff --git a/client/src/electron/tunnel_store.ts b/src/electron/tunnel_store.ts similarity index 100% rename from client/src/electron/tunnel_store.ts rename to src/electron/tunnel_store.ts diff --git a/client/src/electron/types/socks/index.d.ts b/src/electron/types/socks/index.d.ts similarity index 100% rename from client/src/electron/types/socks/index.d.ts rename to src/electron/types/socks/index.d.ts diff --git a/client/src/electron/vpn_tunnel.ts b/src/electron/vpn_tunnel.ts similarity index 100% rename from client/src/electron/vpn_tunnel.ts rename to src/electron/vpn_tunnel.ts diff --git a/client/src/electron/webpack_electron_main.mjs b/src/electron/webpack_electron_main.mjs similarity index 87% rename from client/src/electron/webpack_electron_main.mjs rename to src/electron/webpack_electron_main.mjs index 82fededc387..58b037b9a4f 100755 --- a/client/src/electron/webpack_electron_main.mjs +++ b/src/electron/webpack_electron_main.mjs @@ -22,7 +22,7 @@ const __dirname = path.dirname(__filename); export default ({sentryDsn, appVersion}) => [ { - entry: './client/src/electron/index.ts', + entry: './src/electron/index.ts', target: 'electron-main', node: { __dirname: false, @@ -49,11 +49,11 @@ export default ({sentryDsn, appVersion}) => [ ], output: { filename: 'index.js', - path: path.resolve(__dirname, '..', '..', 'output', 'electron'), + path: path.resolve(__dirname, '..', '..', 'build', 'electron', 'electron'), }, }, { - entry: './client/src/electron/preload.ts', + entry: './src/electron/preload.ts', target: 'electron-preload', devtool: 'inline-source-map', module: { @@ -70,7 +70,7 @@ export default ({sentryDsn, appVersion}) => [ }, output: { filename: 'preload.js', - path: path.resolve(__dirname, '..', '..', 'output', 'electron'), + path: path.resolve(__dirname, '..', '..', 'build', 'electron', 'electron'), }, }, ]; diff --git a/client/src/electron/windows/digicert-usb-config/eToken-macos.cfg b/src/electron/windows/digicert-usb-config/eToken-macos.cfg similarity index 100% rename from client/src/electron/windows/digicert-usb-config/eToken-macos.cfg rename to src/electron/windows/digicert-usb-config/eToken-macos.cfg diff --git a/client/src/electron/windows/digicert-usb-config/eToken-windows.cfg b/src/electron/windows/digicert-usb-config/eToken-windows.cfg similarity index 100% rename from client/src/electron/windows/digicert-usb-config/eToken-windows.cfg rename to src/electron/windows/digicert-usb-config/eToken-windows.cfg diff --git a/client/src/electron/windows/electron_builder_signing_plugin.cjs b/src/electron/windows/electron_builder_signing_plugin.cjs similarity index 87% rename from client/src/electron/windows/electron_builder_signing_plugin.cjs rename to src/electron/windows/electron_builder_signing_plugin.cjs index fac2b89a7c1..cc66e17f3e0 100644 --- a/client/src/electron/windows/electron_builder_signing_plugin.cjs +++ b/src/electron/windows/electron_builder_signing_plugin.cjs @@ -13,7 +13,7 @@ // limitations under the License. // CommonJS module is required, ES6 module is not supported by electron-builder: -// /outline-apps/node_modules/app-builder-lib/out/platformPackager.js:597 +// /outline-client/node_modules/app-builder-lib/out/platformPackager.js:597 // const m = require(p); // ^ // Error [ERR_REQUIRE_ESM]: require() of ES Module .../electron_builder_signing_plugin.mjs not supported. @@ -30,13 +30,9 @@ */ async function electronBuilderEntryPoint(configuration) { const {runAction} = await import('../../build/run_action.mjs'); - await runAction( - 'src/electron/windows/sign_windows_executable', - '--target', - configuration.path, - '--algorithm', - configuration.hash - ); + await runAction('src/electron/windows/sign_windows_executable', + '--target', configuration.path, + '--algorithm', configuration.hash); } exports.default = electronBuilderEntryPoint; diff --git a/client/src/electron/windows/sign_windows_executable.action.mjs b/src/electron/windows/sign_windows_executable.action.mjs similarity index 99% rename from client/src/electron/windows/sign_windows_executable.action.mjs rename to src/electron/windows/sign_windows_executable.action.mjs index 6a9a57e64f8..49697981a53 100644 --- a/client/src/electron/windows/sign_windows_executable.action.mjs +++ b/src/electron/windows/sign_windows_executable.action.mjs @@ -19,7 +19,7 @@ import {dirname, resolve} from 'path'; import {fileURLToPath, pathToFileURL} from 'url'; import {format} from 'util'; -import {jsign} from '../../../../third_party/jsign/index.mjs'; +import {jsign} from '../../../third_party/jsign/index.mjs'; /** * Get the parent folder path of this script.