mirror of
https://github.com/k1tbyte/Wand-Enhancer.git
synced 2026-09-04 16:23:17 +00:00
fix(renderer-scripts): await the bridge bind and retry it on poll
ipcRenderer.invoke rejects asynchronously, so marking the bridge bound before awaiting left set-value dead for the session while the log reported success. Compare installed-app snapshots structurally instead of by an explicit field list, which had already drifted from the bridge copy and hid location changes.
This commit is contained in:
@@ -2,6 +2,7 @@ import { TRAINER_LAUNCH_REQUEST_EXPORT_KEY } from "./constants.js"
|
||||
import {
|
||||
findExportedConstructor,
|
||||
findInstanceInContainerGraph,
|
||||
formatError,
|
||||
isRecord,
|
||||
} from "./runtime.js"
|
||||
|
||||
@@ -13,6 +14,15 @@ export function hasMissingOptionalServices(state) {
|
||||
)
|
||||
}
|
||||
|
||||
export function hasUnresolvedServices(state) {
|
||||
return (
|
||||
hasMissingOptionalServices(state) ||
|
||||
!state.trainerApiService ||
|
||||
!state.trainerService ||
|
||||
!state.trainerLaunchRequestCtor
|
||||
)
|
||||
}
|
||||
|
||||
const OPTIONAL_SERVICE_SPECS = [
|
||||
{
|
||||
stateKey: "unavailableTitlesService",
|
||||
@@ -87,7 +97,7 @@ export function getInstalledAppsService(state, container, webpackRequire) {
|
||||
state.log(
|
||||
"warn",
|
||||
"Failed to resolve installed apps service from Aurelia container.",
|
||||
error?.stack || String(error)
|
||||
formatError(error)
|
||||
)
|
||||
return null
|
||||
}
|
||||
@@ -129,7 +139,7 @@ export function getStoreRef(state, container, webpackRequire) {
|
||||
state.log(
|
||||
"warn",
|
||||
"Failed to resolve Store from container.",
|
||||
error?.stack || String(error)
|
||||
formatError(error)
|
||||
)
|
||||
return null
|
||||
}
|
||||
@@ -216,7 +226,7 @@ function getContainerService(state, container, ctor, warningKey, label) {
|
||||
state.log(
|
||||
"warn",
|
||||
`Failed to resolve ${label.toLowerCase()} from Aurelia container.`,
|
||||
error?.stack || String(error)
|
||||
formatError(error)
|
||||
)
|
||||
return null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user