@@ -212,8 +212,8 @@ const patchMonacoCssNestingWarnings = async (dashboardDir) => {
212212const LEGACY_DESKTOP_BRIDGE_PATTERNS = {
213213 trayRestartGuard :
214214 / i f \s * \( \s * ! d e s k t o p B r i d g e \? \. i s E l e c t r o n \s * \| \| \s * ! d e s k t o p B r i d g e \. o n T r a y R e s t a r t B a c k e n d \s * \) \s * \{ / ,
215- typeIsElectron : / ^ \s + i s E l e c t r o n : \s * b o o l e a n ; \r ? \n / m,
216- typeIsElectronRuntime : / ^ \s + i s E l e c t r o n R u n t i m e : \s * \( \) \s * = > \s * P r o m i s e < b o o l e a n > ; \r ? \n / m,
215+ typeIsElectron : / ^ ( \s + ) i s E l e c t r o n : \s * b o o l e a n ; ( \r ? \n ) / m,
216+ typeIsElectronRuntime : / ^ ( \s + ) i s E l e c t r o n R u n t i m e : \s * \( \) \s * = > \s * P r o m i s e < b o o l e a n > ; ( \r ? \n ) / m,
217217 electronAppFlagToken : / \b i s E l e c t r o n A p p \b / ,
218218 electronAppFlagReplace : / \b i s E l e c t r o n A p p \b / g,
219219 desktopReleaseEnvGuard :
@@ -297,11 +297,11 @@ const patchLegacyDesktopBridgeArtifacts = async (dashboardDir) => {
297297 let patched = source ;
298298 patched = patched . replace (
299299 LEGACY_DESKTOP_BRIDGE_PATTERNS . typeIsElectron ,
300- ' isDesktop : boolean;\n ' ,
300+ '$1isDesktop : boolean;$2 ' ,
301301 ) ;
302302 patched = patched . replace (
303303 LEGACY_DESKTOP_BRIDGE_PATTERNS . typeIsElectronRuntime ,
304- ' isDesktopRuntime : () => Promise<boolean>;\n ' ,
304+ '$1isDesktopRuntime : () => Promise<boolean>;$2 ' ,
305305 ) ;
306306 return patched ;
307307 } ,
0 commit comments