Skip to content

A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.

TypeScript fluxerfluxerapp

refactor(desktop): remove dead code and repeated helpers

Hampusd7aeee00b0a7
diff --git a/fluxer_desktop/native/app-store/loader-diagnostics.cjs b/fluxer_desktop/native/app-store/loader-diagnostics.cjs
index cd22891ec..265bc9344 100644
--- a/fluxer_desktop/native/app-store/loader-diagnostics.cjs
+++ b/fluxer_desktop/native/app-store/loader-diagnostics.cjs
@@ -472,10 +472,10 @@ function createNativeLoadError({
return error;
}
-function resolveProbeTimeoutMs(explicitTimeoutMs) {
+function resolveProbeTimeoutMs() {
const configured = Number.parseInt(process.env[PROBE_TIMEOUT_ENV] ?? '', 10);
if (Number.isFinite(configured) && configured > 0) return configured;
- return explicitTimeoutMs ?? DEFAULT_PROBE_TIMEOUT_MS;
+ return DEFAULT_PROBE_TIMEOUT_MS;
}
function probeReachedRequire(result) {
@@ -562,7 +562,7 @@ function recordProbePass(nativePath) {
}
}
-function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv, timeoutMs}) {
+function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv}) {
if (!skipNativeProbeEnv || process.env[skipNativeProbeEnv] === '1') {
return null;
}
@@ -576,7 +576,7 @@ function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skip
env: {...process.env, ELECTRON_RUN_AS_NODE: '1', [skipNativeProbeEnv]: '1'},
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'pipe'],
- timeout: resolveProbeTimeoutMs(timeoutMs),
+ timeout: resolveProbeTimeoutMs(),
});
if (result.status === 0) {
recordProbePass(nativePath);
@@ -646,11 +646,4 @@ function loadNativeBinding({moduleName, nativePath, nativeRoot, packageDir, skip
}
}
-module.exports = {
- collectNativeDiagnostics,
- createNativeLoadError,
- formatNativeDiagnostics,
- isNativeLoadError,
- loadNativeBinding,
- probeNativeBinary,
-};
+module.exports = {createNativeLoadError, loadNativeBinding};
diff --git a/fluxer_desktop/native/gateway-socket/loader-diagnostics.cjs b/fluxer_desktop/native/gateway-socket/loader-diagnostics.cjs
index cd22891ec..265bc9344 100644
--- a/fluxer_desktop/native/gateway-socket/loader-diagnostics.cjs
+++ b/fluxer_desktop/native/gateway-socket/loader-diagnostics.cjs
@@ -472,10 +472,10 @@ function createNativeLoadError({
return error;
}
-function resolveProbeTimeoutMs(explicitTimeoutMs) {
+function resolveProbeTimeoutMs() {
const configured = Number.parseInt(process.env[PROBE_TIMEOUT_ENV] ?? '', 10);
if (Number.isFinite(configured) && configured > 0) return configured;
- return explicitTimeoutMs ?? DEFAULT_PROBE_TIMEOUT_MS;
+ return DEFAULT_PROBE_TIMEOUT_MS;
}
function probeReachedRequire(result) {
@@ -562,7 +562,7 @@ function recordProbePass(nativePath) {
}
}
-function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv, timeoutMs}) {
+function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv}) {
if (!skipNativeProbeEnv || process.env[skipNativeProbeEnv] === '1') {
return null;
}
@@ -576,7 +576,7 @@ function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skip
env: {...process.env, ELECTRON_RUN_AS_NODE: '1', [skipNativeProbeEnv]: '1'},
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'pipe'],
- timeout: resolveProbeTimeoutMs(timeoutMs),
+ timeout: resolveProbeTimeoutMs(),
});
if (result.status === 0) {
recordProbePass(nativePath);
@@ -646,11 +646,4 @@ function loadNativeBinding({moduleName, nativePath, nativeRoot, packageDir, skip
}
}
-module.exports = {
- collectNativeDiagnostics,
- createNativeLoadError,
- formatNativeDiagnostics,
- isNativeLoadError,
- loadNativeBinding,
- probeNativeBinary,
-};
+module.exports = {createNativeLoadError, loadNativeBinding};
diff --git a/fluxer_desktop/native/hardware-encoder/index.js b/fluxer_desktop/native/hardware-encoder/index.js
index 08e11b4b5..09dad653a 100644
--- a/fluxer_desktop/native/hardware-encoder/index.js
+++ b/fluxer_desktop/native/hardware-encoder/index.js
@@ -53,7 +53,7 @@ function unavailableHardwareEncoderCapability(reason, detail) {
};
}
-function getHardwareEncoderCapability() {
+function getHardwareEncoderCapabilities() {
if (!binding) {
return unavailableHardwareEncoderCapability(
'native_binding_unavailable',
@@ -69,10 +69,6 @@ function getHardwareEncoderCapability() {
return binding.getHardwareEncoderCapability();
}
-function getHardwareEncoderCapabilities() {
- return getHardwareEncoderCapability();
-}
-
module.exports = {
getHardwareEncoderCapabilities,
};
diff --git a/fluxer_desktop/native/linux-audio-capture/loader-diagnostics.cjs b/fluxer_desktop/native/linux-audio-capture/loader-diagnostics.cjs
index cd22891ec..265bc9344 100644
--- a/fluxer_desktop/native/linux-audio-capture/loader-diagnostics.cjs
+++ b/fluxer_desktop/native/linux-audio-capture/loader-diagnostics.cjs
@@ -472,10 +472,10 @@ function createNativeLoadError({
return error;
}
-function resolveProbeTimeoutMs(explicitTimeoutMs) {
+function resolveProbeTimeoutMs() {
const configured = Number.parseInt(process.env[PROBE_TIMEOUT_ENV] ?? '', 10);
if (Number.isFinite(configured) && configured > 0) return configured;
- return explicitTimeoutMs ?? DEFAULT_PROBE_TIMEOUT_MS;
+ return DEFAULT_PROBE_TIMEOUT_MS;
}
function probeReachedRequire(result) {
@@ -562,7 +562,7 @@ function recordProbePass(nativePath) {
}
}
-function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv, timeoutMs}) {
+function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv}) {
if (!skipNativeProbeEnv || process.env[skipNativeProbeEnv] === '1') {
return null;
}
@@ -576,7 +576,7 @@ function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skip
env: {...process.env, ELECTRON_RUN_AS_NODE: '1', [skipNativeProbeEnv]: '1'},
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'pipe'],
- timeout: resolveProbeTimeoutMs(timeoutMs),
+ timeout: resolveProbeTimeoutMs(),
});
if (result.status === 0) {
recordProbePass(nativePath);
@@ -646,11 +646,4 @@ function loadNativeBinding({moduleName, nativePath, nativeRoot, packageDir, skip
}
}
-module.exports = {
- collectNativeDiagnostics,
- createNativeLoadError,
- formatNativeDiagnostics,
- isNativeLoadError,
- loadNativeBinding,
- probeNativeBinary,
-};
+module.exports = {createNativeLoadError, loadNativeBinding};
diff --git a/fluxer_desktop/native/linux-evdev/loader-diagnostics.cjs b/fluxer_desktop/native/linux-evdev/loader-diagnostics.cjs
index cd22891ec..265bc9344 100644
--- a/fluxer_desktop/native/linux-evdev/loader-diagnostics.cjs
+++ b/fluxer_desktop/native/linux-evdev/loader-diagnostics.cjs
@@ -472,10 +472,10 @@ function createNativeLoadError({
return error;
}
-function resolveProbeTimeoutMs(explicitTimeoutMs) {
+function resolveProbeTimeoutMs() {
const configured = Number.parseInt(process.env[PROBE_TIMEOUT_ENV] ?? '', 10);
if (Number.isFinite(configured) && configured > 0) return configured;
- return explicitTimeoutMs ?? DEFAULT_PROBE_TIMEOUT_MS;
+ return DEFAULT_PROBE_TIMEOUT_MS;
}
function probeReachedRequire(result) {
@@ -562,7 +562,7 @@ function recordProbePass(nativePath) {
}
}
-function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv, timeoutMs}) {
+function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv}) {
if (!skipNativeProbeEnv || process.env[skipNativeProbeEnv] === '1') {
return null;
}
@@ -576,7 +576,7 @@ function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skip
env: {...process.env, ELECTRON_RUN_AS_NODE: '1', [skipNativeProbeEnv]: '1'},
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'pipe'],
- timeout: resolveProbeTimeoutMs(timeoutMs),
+ timeout: resolveProbeTimeoutMs(),
});
if (result.status === 0) {
recordProbePass(nativePath);
@@ -646,11 +646,4 @@ function loadNativeBinding({moduleName, nativePath, nativeRoot, packageDir, skip
}
}
-module.exports = {
- collectNativeDiagnostics,
- createNativeLoadError,
- formatNativeDiagnostics,
- isNativeLoadError,
- loadNativeBinding,
- probeNativeBinary,
-};
+module.exports = {createNativeLoadError, loadNativeBinding};
diff --git a/fluxer_desktop/native/linux-input-hook/loader-diagnostics.cjs b/fluxer_desktop/native/linux-input-hook/loader-diagnostics.cjs
index cd22891ec..265bc9344 100644
--- a/fluxer_desktop/native/linux-input-hook/loader-diagnostics.cjs
+++ b/fluxer_desktop/native/linux-input-hook/loader-diagnostics.cjs
@@ -472,10 +472,10 @@ function createNativeLoadError({
return error;
}
-function resolveProbeTimeoutMs(explicitTimeoutMs) {
+function resolveProbeTimeoutMs() {
const configured = Number.parseInt(process.env[PROBE_TIMEOUT_ENV] ?? '', 10);
if (Number.isFinite(configured) && configured > 0) return configured;
- return explicitTimeoutMs ?? DEFAULT_PROBE_TIMEOUT_MS;
+ return DEFAULT_PROBE_TIMEOUT_MS;
}
function probeReachedRequire(result) {
@@ -562,7 +562,7 @@ function recordProbePass(nativePath) {
}
}
-function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv, timeoutMs}) {
+function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv}) {
if (!skipNativeProbeEnv || process.env[skipNativeProbeEnv] === '1') {
return null;
}
@@ -576,7 +576,7 @@ function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skip
env: {...process.env, ELECTRON_RUN_AS_NODE: '1', [skipNativeProbeEnv]: '1'},
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'pipe'],
- timeout: resolveProbeTimeoutMs(timeoutMs),
+ timeout: resolveProbeTimeoutMs(),
});
if (result.status === 0) {
recordProbePass(nativePath);
@@ -646,11 +646,4 @@ function loadNativeBinding({moduleName, nativePath, nativeRoot, packageDir, skip
}
}
-module.exports = {
- collectNativeDiagnostics,
- createNativeLoadError,
- formatNativeDiagnostics,
- isNativeLoadError,
- loadNativeBinding,
- probeNativeBinary,
-};
+module.exports = {createNativeLoadError, loadNativeBinding};
diff --git a/fluxer_desktop/native/linux-notifications/index.d.ts b/fluxer_desktop/native/linux-notifications/index.d.ts
index e38fce071..0241fdcef 100644
--- a/fluxer_desktop/native/linux-notifications/index.d.ts
+++ b/fluxer_desktop/native/linux-notifications/index.d.ts
@@ -40,13 +40,6 @@ export type FreedesktopNotificationEvent =
| {kind: 'actionInvoked'; id: number; actionKey: string}
| {kind: 'closed'; id: number; reason: number};
-export interface ServerInformation {
- name: string;
- vendor: string;
- version: string;
- specVersion: string;
-}
-
export declare class FreedesktopNotifications {
constructor(onEvent: (event: FreedesktopNotificationEvent) => void);
@@ -59,6 +52,4 @@ export declare class FreedesktopNotifications {
close(): Promise<void>;
}
-export declare function getServerInformation(): Promise<ServerInformation>;
-
export declare const loadError: Error | null;
diff --git a/fluxer_desktop/native/linux-notifications/index.js b/fluxer_desktop/native/linux-notifications/index.js
index 0546762e9..50a3bef8a 100644
--- a/fluxer_desktop/native/linux-notifications/index.js
+++ b/fluxer_desktop/native/linux-notifications/index.js
@@ -41,7 +41,6 @@ function bindingSurface(bindingValue) {
freedesktopNotificationsType: typeof freedesktopNotifications,
freedesktopNotificationsName: freedesktopNotifications ? freedesktopNotifications.name : null,
freedesktopNotificationsPrototypeKeys: ownPropertyNames(prototype),
- getServerInformationType: typeof (bindingValue ? bindingValue.getServerInformation : null),
};
}
@@ -57,9 +56,6 @@ function validateBindingSurface(bindingValue, nativeRoot, nativePath) {
}
}
}
- if (typeof bindingValue?.getServerInformation !== 'function') {
- missing.push('getServerInformation');
- }
if (missing.length === 0) return;
throw createNativeLoadError({
moduleName: MODULE_NAME,
@@ -105,6 +101,5 @@ if (process.platform === 'linux') {
module.exports = {
FreedesktopNotifications: binding ? binding.FreedesktopNotifications : null,
- getServerInformation: binding ? binding.getServerInformation : null,
loadError,
};
diff --git a/fluxer_desktop/native/linux-notifications/loader-diagnostics.cjs b/fluxer_desktop/native/linux-notifications/loader-diagnostics.cjs
index cd22891ec..265bc9344 100644
--- a/fluxer_desktop/native/linux-notifications/loader-diagnostics.cjs
+++ b/fluxer_desktop/native/linux-notifications/loader-diagnostics.cjs
@@ -472,10 +472,10 @@ function createNativeLoadError({
return error;
}
-function resolveProbeTimeoutMs(explicitTimeoutMs) {
+function resolveProbeTimeoutMs() {
const configured = Number.parseInt(process.env[PROBE_TIMEOUT_ENV] ?? '', 10);
if (Number.isFinite(configured) && configured > 0) return configured;
- return explicitTimeoutMs ?? DEFAULT_PROBE_TIMEOUT_MS;
+ return DEFAULT_PROBE_TIMEOUT_MS;
}
function probeReachedRequire(result) {
@@ -562,7 +562,7 @@ function recordProbePass(nativePath) {
}
}
-function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv, timeoutMs}) {
+function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv}) {
if (!skipNativeProbeEnv || process.env[skipNativeProbeEnv] === '1') {
return null;
}
@@ -576,7 +576,7 @@ function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skip
env: {...process.env, ELECTRON_RUN_AS_NODE: '1', [skipNativeProbeEnv]: '1'},
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'pipe'],
- timeout: resolveProbeTimeoutMs(timeoutMs),
+ timeout: resolveProbeTimeoutMs(),
});
if (result.status === 0) {
recordProbePass(nativePath);
@@ -646,11 +646,4 @@ function loadNativeBinding({moduleName, nativePath, nativeRoot, packageDir, skip
}
}
-module.exports = {
- collectNativeDiagnostics,
- createNativeLoadError,
- formatNativeDiagnostics,
- isNativeLoadError,
- loadNativeBinding,
- probeNativeBinary,
-};
+module.exports = {createNativeLoadError, loadNativeBinding};
diff --git a/fluxer_desktop/native/linux-portals/loader-diagnostics.cjs b/fluxer_desktop/native/linux-portals/loader-diagnostics.cjs
index cd22891ec..265bc9344 100644
--- a/fluxer_desktop/native/linux-portals/loader-diagnostics.cjs
+++ b/fluxer_desktop/native/linux-portals/loader-diagnostics.cjs
@@ -472,10 +472,10 @@ function createNativeLoadError({
return error;
}
-function resolveProbeTimeoutMs(explicitTimeoutMs) {
+function resolveProbeTimeoutMs() {
const configured = Number.parseInt(process.env[PROBE_TIMEOUT_ENV] ?? '', 10);
if (Number.isFinite(configured) && configured > 0) return configured;
- return explicitTimeoutMs ?? DEFAULT_PROBE_TIMEOUT_MS;
+ return DEFAULT_PROBE_TIMEOUT_MS;
}
function probeReachedRequire(result) {
@@ -562,7 +562,7 @@ function recordProbePass(nativePath) {
}
}
-function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv, timeoutMs}) {
+function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv}) {
if (!skipNativeProbeEnv || process.env[skipNativeProbeEnv] === '1') {
return null;
}
@@ -576,7 +576,7 @@ function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skip
env: {...process.env, ELECTRON_RUN_AS_NODE: '1', [skipNativeProbeEnv]: '1'},
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'pipe'],
- timeout: resolveProbeTimeoutMs(timeoutMs),
+ timeout: resolveProbeTimeoutMs(),
});
if (result.status === 0) {
recordProbePass(nativePath);
@@ -646,11 +646,4 @@ function loadNativeBinding({moduleName, nativePath, nativeRoot, packageDir, skip
}
}
-module.exports = {
- collectNativeDiagnostics,
- createNativeLoadError,
- formatNativeDiagnostics,
- isNativeLoadError,
- loadNativeBinding,
- probeNativeBinary,
-};
+module.exports = {createNativeLoadError, loadNativeBinding};
diff --git a/fluxer_desktop/native/mac-app-audio/loader-diagnostics.cjs b/fluxer_desktop/native/mac-app-audio/loader-diagnostics.cjs
index cd22891ec..265bc9344 100644
--- a/fluxer_desktop/native/mac-app-audio/loader-diagnostics.cjs
+++ b/fluxer_desktop/native/mac-app-audio/loader-diagnostics.cjs
@@ -472,10 +472,10 @@ function createNativeLoadError({
return error;
}
-function resolveProbeTimeoutMs(explicitTimeoutMs) {
+function resolveProbeTimeoutMs() {
const configured = Number.parseInt(process.env[PROBE_TIMEOUT_ENV] ?? '', 10);
if (Number.isFinite(configured) && configured > 0) return configured;
- return explicitTimeoutMs ?? DEFAULT_PROBE_TIMEOUT_MS;
+ return DEFAULT_PROBE_TIMEOUT_MS;
}
function probeReachedRequire(result) {
@@ -562,7 +562,7 @@ function recordProbePass(nativePath) {
}
}
-function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv, timeoutMs}) {
+function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv}) {
if (!skipNativeProbeEnv || process.env[skipNativeProbeEnv] === '1') {
return null;
}
@@ -576,7 +576,7 @@ function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skip
env: {...process.env, ELECTRON_RUN_AS_NODE: '1', [skipNativeProbeEnv]: '1'},
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'pipe'],
- timeout: resolveProbeTimeoutMs(timeoutMs),
+ timeout: resolveProbeTimeoutMs(),
});
if (result.status === 0) {
recordProbePass(nativePath);
@@ -646,11 +646,4 @@ function loadNativeBinding({moduleName, nativePath, nativeRoot, packageDir, skip
}
}
-module.exports = {
- collectNativeDiagnostics,
- createNativeLoadError,
- formatNativeDiagnostics,
- isNativeLoadError,
- loadNativeBinding,
- probeNativeBinary,
-};
+module.exports = {createNativeLoadError, loadNativeBinding};
diff --git a/fluxer_desktop/native/mac-clipboard/loader-diagnostics.cjs b/fluxer_desktop/native/mac-clipboard/loader-diagnostics.cjs
index cd22891ec..265bc9344 100644
--- a/fluxer_desktop/native/mac-clipboard/loader-diagnostics.cjs
+++ b/fluxer_desktop/native/mac-clipboard/loader-diagnostics.cjs
@@ -472,10 +472,10 @@ function createNativeLoadError({
return error;
}
-function resolveProbeTimeoutMs(explicitTimeoutMs) {
+function resolveProbeTimeoutMs() {
const configured = Number.parseInt(process.env[PROBE_TIMEOUT_ENV] ?? '', 10);
if (Number.isFinite(configured) && configured > 0) return configured;
- return explicitTimeoutMs ?? DEFAULT_PROBE_TIMEOUT_MS;
+ return DEFAULT_PROBE_TIMEOUT_MS;
}
function probeReachedRequire(result) {
@@ -562,7 +562,7 @@ function recordProbePass(nativePath) {
}
}
-function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv, timeoutMs}) {
+function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv}) {
if (!skipNativeProbeEnv || process.env[skipNativeProbeEnv] === '1') {
return null;
}
@@ -576,7 +576,7 @@ function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skip
env: {...process.env, ELECTRON_RUN_AS_NODE: '1', [skipNativeProbeEnv]: '1'},
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'pipe'],
- timeout: resolveProbeTimeoutMs(timeoutMs),
+ timeout: resolveProbeTimeoutMs(),
});
if (result.status === 0) {
recordProbePass(nativePath);
@@ -646,11 +646,4 @@ function loadNativeBinding({moduleName, nativePath, nativeRoot, packageDir, skip
}
}
-module.exports = {
- collectNativeDiagnostics,
- createNativeLoadError,
- formatNativeDiagnostics,
- isNativeLoadError,
- loadNativeBinding,
- probeNativeBinary,
-};
+module.exports = {createNativeLoadError, loadNativeBinding};
diff --git a/fluxer_desktop/native/mac-screen-capture/loader-diagnostics.cjs b/fluxer_desktop/native/mac-screen-capture/loader-diagnostics.cjs
index cd22891ec..265bc9344 100644
--- a/fluxer_desktop/native/mac-screen-capture/loader-diagnostics.cjs
+++ b/fluxer_desktop/native/mac-screen-capture/loader-diagnostics.cjs
@@ -472,10 +472,10 @@ function createNativeLoadError({
return error;
}
-function resolveProbeTimeoutMs(explicitTimeoutMs) {
+function resolveProbeTimeoutMs() {
const configured = Number.parseInt(process.env[PROBE_TIMEOUT_ENV] ?? '', 10);
if (Number.isFinite(configured) && configured > 0) return configured;
- return explicitTimeoutMs ?? DEFAULT_PROBE_TIMEOUT_MS;
+ return DEFAULT_PROBE_TIMEOUT_MS;
}
function probeReachedRequire(result) {
@@ -562,7 +562,7 @@ function recordProbePass(nativePath) {
}
}
-function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv, timeoutMs}) {
+function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv}) {
if (!skipNativeProbeEnv || process.env[skipNativeProbeEnv] === '1') {
return null;
}
@@ -576,7 +576,7 @@ function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skip
env: {...process.env, ELECTRON_RUN_AS_NODE: '1', [skipNativeProbeEnv]: '1'},
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'pipe'],
- timeout: resolveProbeTimeoutMs(timeoutMs),
+ timeout: resolveProbeTimeoutMs(),
});
if (result.status === 0) {
recordProbePass(nativePath);
@@ -646,11 +646,4 @@ function loadNativeBinding({moduleName, nativePath, nativeRoot, packageDir, skip
}
}
-module.exports = {
- collectNativeDiagnostics,
- createNativeLoadError,
- formatNativeDiagnostics,
- isNativeLoadError,
- loadNativeBinding,
- probeNativeBinary,
-};
+module.exports = {createNativeLoadError, loadNativeBinding};
diff --git a/fluxer_desktop/native/mac-sysctl/index.d.ts b/fluxer_desktop/native/mac-sysctl/index.d.ts
index 6edf36746..7f2ed9b81 100644
--- a/fluxer_desktop/native/mac-sysctl/index.d.ts
+++ b/fluxer_desktop/native/mac-sysctl/index.d.ts
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
export declare const sysctlByNameInt: ((name: string) => Promise<number | null>) | null;
-export declare const sysctlByNameString: ((name: string) => Promise<string | null>) | null;
export declare const loadError: Error | null;
diff --git a/fluxer_desktop/native/mac-sysctl/index.js b/fluxer_desktop/native/mac-sysctl/index.js
index 42135e591..5625a3917 100644
--- a/fluxer_desktop/native/mac-sysctl/index.js
+++ b/fluxer_desktop/native/mac-sysctl/index.js
@@ -59,6 +59,5 @@ if (process.platform === 'darwin') {
module.exports = {
sysctlByNameInt: binding ? binding.sysctlByNameInt : null,
- sysctlByNameString: binding ? binding.sysctlByNameString : null,
loadError,
};
diff --git a/fluxer_desktop/native/mac-sysctl/loader-diagnostics.cjs b/fluxer_desktop/native/mac-sysctl/loader-diagnostics.cjs
index cd22891ec..265bc9344 100644
--- a/fluxer_desktop/native/mac-sysctl/loader-diagnostics.cjs
+++ b/fluxer_desktop/native/mac-sysctl/loader-diagnostics.cjs
@@ -472,10 +472,10 @@ function createNativeLoadError({
return error;
}
-function resolveProbeTimeoutMs(explicitTimeoutMs) {
+function resolveProbeTimeoutMs() {
const configured = Number.parseInt(process.env[PROBE_TIMEOUT_ENV] ?? '', 10);
if (Number.isFinite(configured) && configured > 0) return configured;
- return explicitTimeoutMs ?? DEFAULT_PROBE_TIMEOUT_MS;
+ return DEFAULT_PROBE_TIMEOUT_MS;
}
function probeReachedRequire(result) {
@@ -562,7 +562,7 @@ function recordProbePass(nativePath) {
}
}
-function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv, timeoutMs}) {
+function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv}) {
if (!skipNativeProbeEnv || process.env[skipNativeProbeEnv] === '1') {
return null;
}
@@ -576,7 +576,7 @@ function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skip
env: {...process.env, ELECTRON_RUN_AS_NODE: '1', [skipNativeProbeEnv]: '1'},
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'pipe'],
- timeout: resolveProbeTimeoutMs(timeoutMs),
+ timeout: resolveProbeTimeoutMs(),
});
if (result.status === 0) {
recordProbePass(nativePath);
@@ -646,11 +646,4 @@ function loadNativeBinding({moduleName, nativePath, nativeRoot, packageDir, skip
}
}
-module.exports = {
- collectNativeDiagnostics,
- createNativeLoadError,
- formatNativeDiagnostics,
- isNativeLoadError,
- loadNativeBinding,
- probeNativeBinary,
-};
+module.exports = {createNativeLoadError, loadNativeBinding};
diff --git a/fluxer_desktop/native/mac-sysctl/src/lib.rs b/fluxer_desktop/native/mac-sysctl/src/lib.rs
index 19f36e20f..996a33d47 100644
--- a/fluxer_desktop/native/mac-sysctl/src/lib.rs
+++ b/fluxer_desktop/native/mac-sysctl/src/lib.rs
@@ -106,26 +106,6 @@ fn read_int_blocking(_: String) -> Result<Option<f64>> {
Err(unsupported_platform_error())
}
-#[cfg(target_os = "macos")]
-fn read_string_blocking(name: String) -> Result<Option<String>> {
- let Some(ctl) = ctl_for_name(&name)? else {
- return Ok(None);
- };
- match ctl.value().map_err(map_sysctl_error)? {
- CtlValue::None => Ok(None),
- CtlValue::String(value) => Ok(Some(value)),
- _ => Err(Error::new(
- Status::GenericFailure,
- "sysctlbyname failed (errno 22)".to_owned(),
- )),
- }
-}
-
-#[cfg(not(target_os = "macos"))]
-fn read_string_blocking(_: String) -> Result<Option<String>> {
- Err(unsupported_platform_error())
-}
-
async fn spawn_sysctl<T: Send + 'static>(
work: impl FnOnce() -> Result<T> + Send + 'static,
) -> Result<T> {
@@ -144,11 +124,3 @@ pub async fn sysctl_by_name_int(name: String) -> Result<Option<f64>> {
}
spawn_sysctl(move || read_int_blocking(name)).await
}
-
-#[napi(js_name = "sysctlByNameString")]
-pub async fn sysctl_by_name_string(name: String) -> Result<Option<String>> {
- if name.is_empty() {
- return Err(invalid_name_error("sysctlByNameString"));
- }
- spawn_sysctl(move || read_string_blocking(name)).await
-}
diff --git a/fluxer_desktop/native/mac-tcc/loader-diagnostics.cjs b/fluxer_desktop/native/mac-tcc/loader-diagnostics.cjs
index cd22891ec..265bc9344 100644
--- a/fluxer_desktop/native/mac-tcc/loader-diagnostics.cjs
+++ b/fluxer_desktop/native/mac-tcc/loader-diagnostics.cjs
@@ -472,10 +472,10 @@ function createNativeLoadError({
return error;
}
-function resolveProbeTimeoutMs(explicitTimeoutMs) {
+function resolveProbeTimeoutMs() {
const configured = Number.parseInt(process.env[PROBE_TIMEOUT_ENV] ?? '', 10);
if (Number.isFinite(configured) && configured > 0) return configured;
- return explicitTimeoutMs ?? DEFAULT_PROBE_TIMEOUT_MS;
+ return DEFAULT_PROBE_TIMEOUT_MS;
}
function probeReachedRequire(result) {
@@ -562,7 +562,7 @@ function recordProbePass(nativePath) {
}
}
-function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv, timeoutMs}) {
+function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv}) {
if (!skipNativeProbeEnv || process.env[skipNativeProbeEnv] === '1') {
return null;
}
@@ -576,7 +576,7 @@ function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skip
env: {...process.env, ELECTRON_RUN_AS_NODE: '1', [skipNativeProbeEnv]: '1'},
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'pipe'],
- timeout: resolveProbeTimeoutMs(timeoutMs),
+ timeout: resolveProbeTimeoutMs(),
});
if (result.status === 0) {
recordProbePass(nativePath);
@@ -646,11 +646,4 @@ function loadNativeBinding({moduleName, nativePath, nativeRoot, packageDir, skip
}
}
-module.exports = {
- collectNativeDiagnostics,
- createNativeLoadError,
- formatNativeDiagnostics,
- isNativeLoadError,
- loadNativeBinding,
- probeNativeBinary,
-};
+module.exports = {createNativeLoadError, loadNativeBinding};
diff --git a/fluxer_desktop/native/macos-input-hook/loader-diagnostics.cjs b/fluxer_desktop/native/macos-input-hook/loader-diagnostics.cjs
index cd22891ec..265bc9344 100644
--- a/fluxer_desktop/native/macos-input-hook/loader-diagnostics.cjs
+++ b/fluxer_desktop/native/macos-input-hook/loader-diagnostics.cjs
@@ -472,10 +472,10 @@ function createNativeLoadError({
return error;
}
-function resolveProbeTimeoutMs(explicitTimeoutMs) {
+function resolveProbeTimeoutMs() {
const configured = Number.parseInt(process.env[PROBE_TIMEOUT_ENV] ?? '', 10);
if (Number.isFinite(configured) && configured > 0) return configured;
- return explicitTimeoutMs ?? DEFAULT_PROBE_TIMEOUT_MS;
+ return DEFAULT_PROBE_TIMEOUT_MS;
}
function probeReachedRequire(result) {
@@ -562,7 +562,7 @@ function recordProbePass(nativePath) {
}
}
-function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv, timeoutMs}) {
+function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv}) {
if (!skipNativeProbeEnv || process.env[skipNativeProbeEnv] === '1') {
return null;
}
@@ -576,7 +576,7 @@ function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skip
env: {...process.env, ELECTRON_RUN_AS_NODE: '1', [skipNativeProbeEnv]: '1'},
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'pipe'],
- timeout: resolveProbeTimeoutMs(timeoutMs),
+ timeout: resolveProbeTimeoutMs(),
});
if (result.status === 0) {
recordProbePass(nativePath);
@@ -646,11 +646,4 @@ function loadNativeBinding({moduleName, nativePath, nativeRoot, packageDir, skip
}
}
-module.exports = {
- collectNativeDiagnostics,
- createNativeLoadError,
- formatNativeDiagnostics,
- isNativeLoadError,
- loadNativeBinding,
- probeNativeBinary,
-};
+module.exports = {createNativeLoadError, loadNativeBinding};
diff --git a/fluxer_desktop/native/platform-info/loader-diagnostics.cjs b/fluxer_desktop/native/platform-info/loader-diagnostics.cjs
index cd22891ec..265bc9344 100644
--- a/fluxer_desktop/native/platform-info/loader-diagnostics.cjs
+++ b/fluxer_desktop/native/platform-info/loader-diagnostics.cjs
@@ -472,10 +472,10 @@ function createNativeLoadError({
return error;
}
-function resolveProbeTimeoutMs(explicitTimeoutMs) {
+function resolveProbeTimeoutMs() {
const configured = Number.parseInt(process.env[PROBE_TIMEOUT_ENV] ?? '', 10);
if (Number.isFinite(configured) && configured > 0) return configured;
- return explicitTimeoutMs ?? DEFAULT_PROBE_TIMEOUT_MS;
+ return DEFAULT_PROBE_TIMEOUT_MS;
}
function probeReachedRequire(result) {
@@ -562,7 +562,7 @@ function recordProbePass(nativePath) {
}
}
-function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv, timeoutMs}) {
+function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv}) {
if (!skipNativeProbeEnv || process.env[skipNativeProbeEnv] === '1') {
return null;
}
@@ -576,7 +576,7 @@ function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skip
env: {...process.env, ELECTRON_RUN_AS_NODE: '1', [skipNativeProbeEnv]: '1'},
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'pipe'],
- timeout: resolveProbeTimeoutMs(timeoutMs),
+ timeout: resolveProbeTimeoutMs(),
});
if (result.status === 0) {
recordProbePass(nativePath);
@@ -646,11 +646,4 @@ function loadNativeBinding({moduleName, nativePath, nativeRoot, packageDir, skip
}
}
-module.exports = {
- collectNativeDiagnostics,
- createNativeLoadError,
- formatNativeDiagnostics,
- isNativeLoadError,
- loadNativeBinding,
- probeNativeBinary,
-};
+module.exports = {createNativeLoadError, loadNativeBinding};
diff --git a/fluxer_desktop/native/system-hunspell/loader-diagnostics.cjs b/fluxer_desktop/native/system-hunspell/loader-diagnostics.cjs
index cd22891ec..265bc9344 100644
--- a/fluxer_desktop/native/system-hunspell/loader-diagnostics.cjs
+++ b/fluxer_desktop/native/system-hunspell/loader-diagnostics.cjs
@@ -472,10 +472,10 @@ function createNativeLoadError({
return error;
}
-function resolveProbeTimeoutMs(explicitTimeoutMs) {
+function resolveProbeTimeoutMs() {
const configured = Number.parseInt(process.env[PROBE_TIMEOUT_ENV] ?? '', 10);
if (Number.isFinite(configured) && configured > 0) return configured;
- return explicitTimeoutMs ?? DEFAULT_PROBE_TIMEOUT_MS;
+ return DEFAULT_PROBE_TIMEOUT_MS;
}
function probeReachedRequire(result) {
@@ -562,7 +562,7 @@ function recordProbePass(nativePath) {
}
}
-function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv, timeoutMs}) {
+function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv}) {
if (!skipNativeProbeEnv || process.env[skipNativeProbeEnv] === '1') {
return null;
}
@@ -576,7 +576,7 @@ function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skip
env: {...process.env, ELECTRON_RUN_AS_NODE: '1', [skipNativeProbeEnv]: '1'},
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'pipe'],
- timeout: resolveProbeTimeoutMs(timeoutMs),
+ timeout: resolveProbeTimeoutMs(),
});
if (result.status === 0) {
recordProbePass(nativePath);
@@ -646,11 +646,4 @@ function loadNativeBinding({moduleName, nativePath, nativeRoot, packageDir, skip
}
}
-module.exports = {
- collectNativeDiagnostics,
- createNativeLoadError,
- formatNativeDiagnostics,
- isNativeLoadError,
- loadNativeBinding,
- probeNativeBinary,
-};
+module.exports = {createNativeLoadError, loadNativeBinding};
diff --git a/fluxer_desktop/native/webauthn/loader-diagnostics.cjs b/fluxer_desktop/native/webauthn/loader-diagnostics.cjs
index cd22891ec..265bc9344 100644
--- a/fluxer_desktop/native/webauthn/loader-diagnostics.cjs
+++ b/fluxer_desktop/native/webauthn/loader-diagnostics.cjs
@@ -472,10 +472,10 @@ function createNativeLoadError({
return error;
}
-function resolveProbeTimeoutMs(explicitTimeoutMs) {
+function resolveProbeTimeoutMs() {
const configured = Number.parseInt(process.env[PROBE_TIMEOUT_ENV] ?? '', 10);
if (Number.isFinite(configured) && configured > 0) return configured;
- return explicitTimeoutMs ?? DEFAULT_PROBE_TIMEOUT_MS;
+ return DEFAULT_PROBE_TIMEOUT_MS;
}
function probeReachedRequire(result) {
@@ -562,7 +562,7 @@ function recordProbePass(nativePath) {
}
}
-function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv, timeoutMs}) {
+function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv}) {
if (!skipNativeProbeEnv || process.env[skipNativeProbeEnv] === '1') {
return null;
}
@@ -576,7 +576,7 @@ function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skip
env: {...process.env, ELECTRON_RUN_AS_NODE: '1', [skipNativeProbeEnv]: '1'},
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'pipe'],
- timeout: resolveProbeTimeoutMs(timeoutMs),
+ timeout: resolveProbeTimeoutMs(),
});
if (result.status === 0) {
recordProbePass(nativePath);
@@ -646,11 +646,4 @@ function loadNativeBinding({moduleName, nativePath, nativeRoot, packageDir, skip
}
}
-module.exports = {
- collectNativeDiagnostics,
- createNativeLoadError,
- formatNativeDiagnostics,
- isNativeLoadError,
- loadNativeBinding,
- probeNativeBinary,
-};
+module.exports = {createNativeLoadError, loadNativeBinding};
diff --git a/fluxer_desktop/native/win-clipboard/loader-diagnostics.cjs b/fluxer_desktop/native/win-clipboard/loader-diagnostics.cjs
index cd22891ec..265bc9344 100644
--- a/fluxer_desktop/native/win-clipboard/loader-diagnostics.cjs
+++ b/fluxer_desktop/native/win-clipboard/loader-diagnostics.cjs
@@ -472,10 +472,10 @@ function createNativeLoadError({
return error;
}
-function resolveProbeTimeoutMs(explicitTimeoutMs) {
+function resolveProbeTimeoutMs() {
const configured = Number.parseInt(process.env[PROBE_TIMEOUT_ENV] ?? '', 10);
if (Number.isFinite(configured) && configured > 0) return configured;
- return explicitTimeoutMs ?? DEFAULT_PROBE_TIMEOUT_MS;
+ return DEFAULT_PROBE_TIMEOUT_MS;
}
function probeReachedRequire(result) {
@@ -562,7 +562,7 @@ function recordProbePass(nativePath) {
}
}
-function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv, timeoutMs}) {
+function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv}) {
if (!skipNativeProbeEnv || process.env[skipNativeProbeEnv] === '1') {
return null;
}
@@ -576,7 +576,7 @@ function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skip
env: {...process.env, ELECTRON_RUN_AS_NODE: '1', [skipNativeProbeEnv]: '1'},
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'pipe'],
- timeout: resolveProbeTimeoutMs(timeoutMs),
+ timeout: resolveProbeTimeoutMs(),
});
if (result.status === 0) {
recordProbePass(nativePath);
@@ -646,11 +646,4 @@ function loadNativeBinding({moduleName, nativePath, nativeRoot, packageDir, skip
}
}
-module.exports = {
- collectNativeDiagnostics,
- createNativeLoadError,
- formatNativeDiagnostics,
- isNativeLoadError,
- loadNativeBinding,
- probeNativeBinary,
-};
+module.exports = {createNativeLoadError, loadNativeBinding};
diff --git a/fluxer_desktop/native/win-game-capture/loader-diagnostics.cjs b/fluxer_desktop/native/win-game-capture/loader-diagnostics.cjs
index cd22891ec..265bc9344 100644
--- a/fluxer_desktop/native/win-game-capture/loader-diagnostics.cjs
+++ b/fluxer_desktop/native/win-game-capture/loader-diagnostics.cjs
@@ -472,10 +472,10 @@ function createNativeLoadError({
return error;
}
-function resolveProbeTimeoutMs(explicitTimeoutMs) {
+function resolveProbeTimeoutMs() {
const configured = Number.parseInt(process.env[PROBE_TIMEOUT_ENV] ?? '', 10);
if (Number.isFinite(configured) && configured > 0) return configured;
- return explicitTimeoutMs ?? DEFAULT_PROBE_TIMEOUT_MS;
+ return DEFAULT_PROBE_TIMEOUT_MS;
}
function probeReachedRequire(result) {
@@ -562,7 +562,7 @@ function recordProbePass(nativePath) {
}
}
-function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv, timeoutMs}) {
+function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv}) {
if (!skipNativeProbeEnv || process.env[skipNativeProbeEnv] === '1') {
return null;
}
@@ -576,7 +576,7 @@ function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skip
env: {...process.env, ELECTRON_RUN_AS_NODE: '1', [skipNativeProbeEnv]: '1'},
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'pipe'],
- timeout: resolveProbeTimeoutMs(timeoutMs),
+ timeout: resolveProbeTimeoutMs(),
});
if (result.status === 0) {
recordProbePass(nativePath);
@@ -646,11 +646,4 @@ function loadNativeBinding({moduleName, nativePath, nativeRoot, packageDir, skip
}
}
-module.exports = {
- collectNativeDiagnostics,
- createNativeLoadError,
- formatNativeDiagnostics,
- isNativeLoadError,
- loadNativeBinding,
- probeNativeBinary,
-};
+module.exports = {createNativeLoadError, loadNativeBinding};
diff --git a/fluxer_desktop/native/win-process-loopback/loader-diagnostics.cjs b/fluxer_desktop/native/win-process-loopback/loader-diagnostics.cjs
index cd22891ec..265bc9344 100644
--- a/fluxer_desktop/native/win-process-loopback/loader-diagnostics.cjs
+++ b/fluxer_desktop/native/win-process-loopback/loader-diagnostics.cjs
@@ -472,10 +472,10 @@ function createNativeLoadError({
return error;
}
-function resolveProbeTimeoutMs(explicitTimeoutMs) {
+function resolveProbeTimeoutMs() {
const configured = Number.parseInt(process.env[PROBE_TIMEOUT_ENV] ?? '', 10);
if (Number.isFinite(configured) && configured > 0) return configured;
- return explicitTimeoutMs ?? DEFAULT_PROBE_TIMEOUT_MS;
+ return DEFAULT_PROBE_TIMEOUT_MS;
}
function probeReachedRequire(result) {
@@ -562,7 +562,7 @@ function recordProbePass(nativePath) {
}
}
-function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv, timeoutMs}) {
+function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv}) {
if (!skipNativeProbeEnv || process.env[skipNativeProbeEnv] === '1') {
return null;
}
@@ -576,7 +576,7 @@ function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skip
env: {...process.env, ELECTRON_RUN_AS_NODE: '1', [skipNativeProbeEnv]: '1'},
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'pipe'],
- timeout: resolveProbeTimeoutMs(timeoutMs),
+ timeout: resolveProbeTimeoutMs(),
});
if (result.status === 0) {
recordProbePass(nativePath);
@@ -646,11 +646,4 @@ function loadNativeBinding({moduleName, nativePath, nativeRoot, packageDir, skip
}
}
-module.exports = {
- collectNativeDiagnostics,
- createNativeLoadError,
- formatNativeDiagnostics,
- isNativeLoadError,
- loadNativeBinding,
- probeNativeBinary,
-};
+module.exports = {createNativeLoadError, loadNativeBinding};
diff --git a/fluxer_desktop/native/win-shell/loader-diagnostics.cjs b/fluxer_desktop/native/win-shell/loader-diagnostics.cjs
index cd22891ec..265bc9344 100644
--- a/fluxer_desktop/native/win-shell/loader-diagnostics.cjs
+++ b/fluxer_desktop/native/win-shell/loader-diagnostics.cjs
@@ -472,10 +472,10 @@ function createNativeLoadError({
return error;
}
-function resolveProbeTimeoutMs(explicitTimeoutMs) {
+function resolveProbeTimeoutMs() {
const configured = Number.parseInt(process.env[PROBE_TIMEOUT_ENV] ?? '', 10);
if (Number.isFinite(configured) && configured > 0) return configured;
- return explicitTimeoutMs ?? DEFAULT_PROBE_TIMEOUT_MS;
+ return DEFAULT_PROBE_TIMEOUT_MS;
}
function probeReachedRequire(result) {
@@ -562,7 +562,7 @@ function recordProbePass(nativePath) {
}
}
-function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv, timeoutMs}) {
+function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv}) {
if (!skipNativeProbeEnv || process.env[skipNativeProbeEnv] === '1') {
return null;
}
@@ -576,7 +576,7 @@ function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skip
env: {...process.env, ELECTRON_RUN_AS_NODE: '1', [skipNativeProbeEnv]: '1'},
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'pipe'],
- timeout: resolveProbeTimeoutMs(timeoutMs),
+ timeout: resolveProbeTimeoutMs(),
});
if (result.status === 0) {
recordProbePass(nativePath);
@@ -646,11 +646,4 @@ function loadNativeBinding({moduleName, nativePath, nativeRoot, packageDir, skip
}
}
-module.exports = {
- collectNativeDiagnostics,
- createNativeLoadError,
- formatNativeDiagnostics,
- isNativeLoadError,
- loadNativeBinding,
- probeNativeBinary,
-};
+module.exports = {createNativeLoadError, loadNativeBinding};
diff --git a/fluxer_desktop/native/windows-input-hook/loader-diagnostics.cjs b/fluxer_desktop/native/windows-input-hook/loader-diagnostics.cjs
index cd22891ec..265bc9344 100644
--- a/fluxer_desktop/native/windows-input-hook/loader-diagnostics.cjs
+++ b/fluxer_desktop/native/windows-input-hook/loader-diagnostics.cjs
@@ -472,10 +472,10 @@ function createNativeLoadError({
return error;
}
-function resolveProbeTimeoutMs(explicitTimeoutMs) {
+function resolveProbeTimeoutMs() {
const configured = Number.parseInt(process.env[PROBE_TIMEOUT_ENV] ?? '', 10);
if (Number.isFinite(configured) && configured > 0) return configured;
- return explicitTimeoutMs ?? DEFAULT_PROBE_TIMEOUT_MS;
+ return DEFAULT_PROBE_TIMEOUT_MS;
}
function probeReachedRequire(result) {
@@ -562,7 +562,7 @@ function recordProbePass(nativePath) {
}
}
-function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv, timeoutMs}) {
+function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skipNativeProbeEnv}) {
if (!skipNativeProbeEnv || process.env[skipNativeProbeEnv] === '1') {
return null;
}
@@ -576,7 +576,7 @@ function probeNativeBinary({moduleName, nativePath, nativeRoot, packageDir, skip
env: {...process.env, ELECTRON_RUN_AS_NODE: '1', [skipNativeProbeEnv]: '1'},
encoding: 'utf8',
stdio: ['ignore', 'pipe', 'pipe'],
- timeout: resolveProbeTimeoutMs(timeoutMs),
+ timeout: resolveProbeTimeoutMs(),
});
if (result.status === 0) {
recordProbePass(nativePath);
@@ -646,11 +646,4 @@ function loadNativeBinding({moduleName, nativePath, nativeRoot, packageDir, skip
}
}
-module.exports = {
- collectNativeDiagnostics,
- createNativeLoadError,
- formatNativeDiagnostics,
- isNativeLoadError,
- loadNativeBinding,
- probeNativeBinary,
-};
+module.exports = {createNativeLoadError, loadNativeBinding};
diff --git a/fluxer_desktop/src/main/LinuxDesktopEntry.ts b/fluxer_desktop/src/main/LinuxDesktopEntry.ts
index 7d9e740ab..1ea4ba593 100644
--- a/fluxer_desktop/src/main/LinuxDesktopEntry.ts
+++ b/fluxer_desktop/src/main/LinuxDesktopEntry.ts
@@ -348,21 +348,21 @@ function desktopEntryResolves(): boolean {
return findSystemDesktopEntry() !== null || readExistingDesktopFile(getDesktopFilePath()) !== null;
}
-export function ensureLinuxDesktopEntry(): boolean {
- if (process.platform !== 'linux') return false;
+export function ensureLinuxDesktopEntry(): void {
+ if (process.platform !== 'linux') return;
if (!app.isPackaged) {
logger.debug('Skipping .desktop entry management for an unpackaged run');
- return false;
+ return;
}
if (isFlatpakRuntime()) {
logger.debug('Skipping .desktop entry creation in Flatpak; package export owns launcher/protocol integration');
registerProtocolClient();
- return false;
+ return;
}
if (process.env.FLUXER_DISABLE_DESKTOP_FILE === '1') {
logger.debug('Skipping .desktop entry management; FLUXER_DISABLE_DESKTOP_FILE=1');
if (findSystemDesktopEntry() !== null) registerProtocolClient();
- return desktopEntryResolves();
+ return;
}
let changed = removeLegacyGeneratedDesktopEntry();
try {
@@ -378,7 +378,5 @@ export function ensureLinuxDesktopEntry(): boolean {
actionRefreshSubscribed = true;
onDirectMessagesAvailabilityChange(refreshDesktopEntryActions);
}
- const resolves = desktopEntryResolves();
- if (resolves) registerProtocolClient();
- return resolves;
+ if (desktopEntryResolves()) registerProtocolClient();
}
diff --git a/fluxer_desktop/src/main/index.ts b/fluxer_desktop/src/main/index.ts
index 52100b09c..cb218350f 100644
--- a/fluxer_desktop/src/main/index.ts
+++ b/fluxer_desktop/src/main/index.ts
@@ -417,11 +417,7 @@ if (launchConfigurationError) {
}
stopStartupIfQuitting();
try {
- runStartupPhase('linux-desktop-entry', () => {
- if (ensureLinuxDesktopEntry()) {
- process.env.FLUXER_LINUX_PORTAL_APP_ID = LINUX_DESKTOP_ENTRY_ID;
- }
- });
+ runStartupPhase('linux-desktop-entry', ensureLinuxDesktopEntry);
} catch (error) {
log.error('[Init] Failed to ensure the Linux desktop entry:', error);
}